Index: mouse_public_3mode_usb/do.bat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/do.bat	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/do.bat	(working copy)
@@ -0,0 +1,97 @@
+@set FPGA_PATH=fpgajic\fpga
+@set ROM_PATH=.
+@set MV_PATCH=mv\src\yichip
+@set YC_PATCH_FILE=yc_patch_yc1021.h
+@set enc=1
+@set enckey=0000000000000000
+@rem set device_option=rfbqb
+@set device_option=mouse
+@rem set device_option=shutter
+@rem set device_option=hci
+@rem set device_option=antilost
+@rem set device_option=dongle
+@rem set device_option=module
+@rem set device_option=car
+@rem set device_option=remote_car
+@rem set device_option=mesh
+@echo off
+
+setlocal enabledelayedexpansion
+for %%f in (program\ble_protocol_stack\*.prog) do @set progs=!progs! %%f
+for %%f in (program\g24_protocol_stack\*.prog) do @set progs=!progs! %%f
+for %%f in (program\mesh_protocol_stack\*.prog) do @set progs=!progs! %%f
+for %%f in (program\*.prog) do @if not %%f==program\bt.prog if not %%f==program\patch.prog if not %%f==program\sim.prog set progs=!progs! %%f
+type program\bt.prog %progs% > output\bt_program23.meta
+
+::for %%f in (format\peipherals_config\*.format) do set fmts=!fmts! %%f
+for %%f in (format\ble_protocol_stack\*.format) do set fmts=!fmts! %%f
+for %%f in (format\g24_protocol_stack\*.format) do set fmts=!fmts! %%f
+for %%f in (format\mesh_protocol_stack\*.format) do set fmts=!fmts! %%f
+for %%f in (format\*.format) do @if not %%f==format\bt.format if not %%f==format\command.format set fmts=!fmts! %%f
+type format\bt.format %fmts% format\command.format > output\bt_format.meta
+::perl util/memalloc.pl output/bt_format.meta
+
+
+if "%device_option%" equ "hci" (
+  copy sched\hci_boot.dat output\sched.rom
+) else if "%device_option%" equ "mouse" (
+  copy sched\mouse.dat output\sched.rom
+) else if "%device_option%" equ "module" (
+  copy sched\DM_module.dat + sched\1308.dat output\sched.rom
+) else if "%device_option%" equ "shutter" (
+  copy sched\shutter.dat output\sched.rom
+) else if "%device_option%" equ "antilost" (
+  copy sched\antilost.dat + sched\1308.dat output\sched.rom
+) else if "%device_option%" equ "dongle" (
+  copy sched\dongle.dat output\sched.rom
+) else if "%device_option%" equ "car" (
+  copy sched\car.dat + sched\1308.dat output\sched.rom
+) else if "%device_option%" equ "remote_car" (
+  copy sched\remote_car.dat + sched\1308.dat output\sched.rom
+) else if "%device_option%" equ "esl" (
+  copy sched\esl.dat + sched\1308.dat output\sched.rom  
+ ) else if "%device_option%" equ "mesh" (
+  copy sched\mesh.dat output\sched.rom
+) else (
+
+cd ..
+echo **********************************
+echo Error: illegal device_option !
+echo **********************************
+goto end
+) 
+
+perl util/mergepatch.pl 
+
+cd output
+osiuasm bt_program23 -O-W
+
+::geneep -n -k key.dat
+echo no c51 code
+geneep -n
+::echo exist c51 code
+::geneep
+
+if "%device_option%" equ "mouse" (
+cd ..\output
+copy eeprom.dat ..\util\eeprom.dat
+cd ..\util
+eeprom2fulleeprom.exe eeprom.dat 64>compare2.dat
+crc16.exe compare2.dat 2 >..\output\eeprom.dat
+del eeprom.dat
+del compare2.dat
+cd ..\output
+copy eeprom.dat ..\output\flash.dat 
+
+)
+
+
+if "%device_option%" equ "module" (
+	perl eeprom2hciimage_1021s.pl
+
+)
+:: perl ..\util\eeprom2hciimage.pl
+:: perl ..\util\bin2array.pl > bt_patch.h
+
+:end
+
Index: mouse_public_3mode_usb/f.bat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/f.bat	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/f.bat	(working copy)
@@ -0,0 +1,16 @@
+call do.bat eep
+e pu
+e 8043 00
+e 8070 0000000000000000
+e 8078 0000000000000000
+e 8080 00000000
+e 8078 20
+e 8080 1f2122
+e 8085 00
+e fa
+e fr 0 100
+e fc
+e fr 0 100
+e fp output/eeprom.dat
+e fr 0 100
+e ku
Index: mouse_public_3mode_usb/format/Hid.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/Hid.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/Hid.format	(working copy)
@@ -0,0 +1,21 @@
+
+(
+/*HID TYPE*/
+0x01 HID_TYPE_CONTROL
+0x04 HID_TYPE_GET_REPORT
+0x05 HID_TYPE_SET_REPORT
+0x07 HID_TYPE_SET_PROTOCOL
+0x09 HID_TYPE_SET_IDLE
+0x0a HID_TYPE_DATA
+/*HID REPORT ID*/
+0x01 HID_REPORT_ID_KB
+
+0x00 HID_CONTROL_P_NOOPERATION
+0x01 HID_CONTROL_P_HARDRESET
+0x02 HID_CONTROL_P_SOFTRESET
+0x03 HID_CONTROL_P_SUSPEND
+0x04 HID_CONTROL_P_EXITSUSPEND
+0x05 HID_CONTROL_P_VIRTUALCABLEUNPLUG
+)
+
+
Index: mouse_public_3mode_usb/format/app.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app.format	(working copy)
@@ -0,0 +1,391 @@
+
+memalloc(
+
+/* load code */
+1 mem_ucode_status
+1 mem_spid_tbuf				/* spid buf: 03 addr[23:16] addr[15:8] addr[7:0] */
+0 mem_iicd_tbuf				/* iicd buf: iic_adr addr[15:8] addr[7:0] iic_adr */
+1 mem_addr_hi
+1 mem_addr_mi
+1 mem_addr_lo
+1 mem_iicd_addr
+4 mem_spid_rbuf
+2 mem_ucode_buf
+2 mem_ucode_len
+2 mem_sched_addr
+2 mem_ucode_ptr
+16 mem_ucode_keybuf
+
+1 mem_spid2_tbuf
+1 mem_addr_hi2
+1 mem_addr_mi2
+1 mem_addr_lo2
+4 mem_spid2_rbuf
+1 mem_reconnect_flag
+1 mem_switch_fail_master_count
+1 mem_app_evt_timer_count
+)
+
+xmemalloc(
+1 mem_app_handshake_flag
+2 mem_sniff_param_interval
+2 mem_sniff_param_attempt
+2 mem_sniff_param_timeout
+
+/*App Callback Functons*/
+2 mem_cb_check_wakelock
+2 mem_cb_before_hibernate
+2 mem_cb_before_lpm
+2 mem_cb_le_process
+2 mem_cb_bt_process
+2 mem_cb_idle_process
+2 mem_cb_bb_event_process
+2 mem_cb_discovry_timeout
+2 mem_cb_att_write
+2 mem_cb_ble_transmit
+2 mem_cb_event_timer
+2 mem_cb_bt_set_mult
+2 mem_cb_spi_flash_write_complate
+2 mem_cb_spi2_flash_write_complate
+2 mem_cb_bt_slave_match
+2 mem_cb_before_lpm_sleep
+
+2 mem_eeprom_base
+
+1 mem_unsniff2sniff_timer_count
+//lpm mode
+1 mem_wake_up_delay_timer
+
+1 mem_app_connection_options
+
+//
+2 mem_app_disconn_reason
+2 mem_app_disconn_reason_flag
+1 mem_xrecord_mode
+
+1 mem_eeprom_block_size
+1 mem_spi_init_clk
+1 mem_spi_init_delay_time
+1 mem_spi_ncs_gpio
+
+2 mem_nv_data_ptr
+1 mem_nv_data_number
+
+2 mem_queue_ptr
+
+1 mem_ui_led_struct_num
+2 mem_ui_led_struct_ptr
+
+//adc
+1 mem_adc_wait_count
+2 mem_3v_adc_io_data
+2 mem_2v_adc_hvin_data
+2 mem_2v_adc_vinlpm_data
+2 mem_1v_adc_io_data
+2 mem_3v_adc_hvin_data
+2 mem_3v_adc_vinlpm_data
+1 mem_app_adc_read_count
+1 mem_start_adc_clkn
+2 mem_reference_voltage
+1 mem_adc_config_flag
+1 mem_adc_channel
+2 mem_adc_current_value
+1 mem_adc_power_flag	//bit0:low power falg ; bit1:no power flag
+
+3 mem_spi_write_addr
+2 mem_spi_write_ptr
+2 mem_spi_write_len
+1 mem_spi_write_flash_sm
+3 mem_spi2_write_addr
+2 mem_spi2_write_ptr
+2 mem_spi2_write_len
+1 mem_spi2_write_flash_sm
+
+1 mem_spi_cs_gpio
+1 mem_spi_si_gpio
+1 mem_spi_so_gpio
+1 mem_spi_sclk_gpio
+1 mem_spi_wp_gpio
+1 mem_spi_hold_gpio
+1 mem_spi2_cs_gpio
+1 mem_spi2_si_gpio
+1 mem_spi2_so_gpio
+1 mem_spi2_sclk_gpio
+1 mem_spi2_wp_gpio
+1 mem_spi2_hold_gpio
+
+1 mem_eeprom_wp_gpio
+1 mem_eeprom_scl_gpio
+1 mem_eeprom_sda_gpio
+2 mem_kscan_ptr
+0 mem_key_num_ptr
+2 mem_keyscan_ptr
+2 mem_key_value_retention
+2 mem_power_param_ptr
+3 mem_efuse_header
+
+1 mem_seqi
+
+1 mem_dig_aon_vsel
+1 mem_syn_afc_cfg1
+1 mem_rf_ldo_cfg1
+1 mem_rc_cal
+
+1 mem_nec_decode_error_value
+
+ifdef AC_50HZ
+1 mem_ac_detect_gpio
+0 mem_ac_detect_control
+1 mem_ac_detect_div
+1 mem_ac_detect_window
+endif
+
+)
+//adc read
+(
+0 ADC_CONFIG_VINLPM
+1 ADC_CONFIG_HVIN
+2 ADC_CONFIG_GPIO
+)
+
+
+(
+0 QUEUE_OFFSET_EACH_SIZE
+1 QUEUE_OFFSET_LENGTH
+2 QUEUE_OFFSET_CURR_NUM
+3 QUEUE_OFFSET_READ_PTR
+4 QUEUE_OFFSET_WRITE_PTR
+5 QUEUE_OFFSET_ELE_INIT_ADDR
+)
+(
+//Flash Register
+0x05 FLASH_READ_SATUS
+
+// Flash Status Register
+0x00 FLASH_STATUS_WIP
+0X01 FLASH_STATUS_WEL
+0X02 FLASH_STATUS_BP0
+0X03 FLASH_STATUS_BP1
+
+//Flash Write Sm
+0X00 FLASH_SM_NO_BUYS
+0X01 FLASH_SM_START
+0X02 FLASH_SM_ERASE_SECTOR
+0X03 FLASH_SM_WAIT_ERASE_SECTOR
+0X04 FLASH_SM_WRITE_DATA
+0X05 FLASH_SM_WAIT_WRITE_DATA
+
+
+//Flash Command
+0x02 FLASH_COMMAND_WRITE_DATA
+0x03 FLASH_COMMAND_READ_DATA
+0x06 FLASH_COMMAND_WRITE_ENABLE
+0x20 FLASH_COMMAND_SECTOR_ERASE
+0xAB FLASH_COMMAND_RELEASE_FROM_POWERDOWN
+0xB9 FLASH_COMMAND_POWERDOWN
+
+)
+
+
+//efuse 
+(
+0x00 EFUSE_OFFSET_UCODE	//1B
+0X01 EFUSE_OFFSET_DEVICE_LOCK
+0x02 EFUSE_OFFSET_PERIPHERALS_LOCK
+0X03 EFUSE_OFFSET_OFFSET
+
+0x2b EFUSE_OFFSET_HCI_BOOT_CLKSEL	//bit7
+0x2b EFUSE_OFFSET_LOADCODE_DELAY	 //bit6
+0x2b EFUSE_OFFSET_DIG_AON_VSEL	//bit5-4
+0x2b EFUSE_OFFSET_DEVICE_OPTION	//bit3-0
+0x2c EFUSE_OFFSET_XTAL_OFFSET	//0x813a
+0x2d EFUSE_OFFSET_XTAL_CNT	//0x813c
+0x2e EFUSE_OFFSET_AGC_TABLE	//2B
+0x30 EFUSE_OFFSET_ADC_PARAM	//bit7-4
+0x30 EFUSE_OFFSET_APP_VSEL	//bit3-0
+0x31 EFUSE_OFFSET_AGC_SEL	//bit7 agc sel
+0x31 EFUSE_OFFSET_AGC_SEC_EN	//bit6 agc second en 0x8960[3]
+0x31 EFUSE_OFFSET_LDO_CFG1	//bit5-4:0x8a0d[2:0]
+0x31 EFUSE_OFFSET_TX_VCO_CURRENT //bit3-0:0x8a87[3:0]
+0x32 EFUSE_OFFSET_RC_CAL	//0x8a6c
+0x33 EFUSE_OFFSET_ADC		//9B
+0x3c EFUSE_OFFSET_KEY_ADDR	//4B
+
+//EFUSE_OFFSET_PERIPHERALS_LOCK
+0 EFUSE_SPI_LOCK_BIT
+1 EFUSE_SPI2_LOCK_BIT
+2 EFUSE_UART_LOCK_BIT
+3 EFUSE_UARTB_LOCK_BIT
+4 EFUSE_IIC_LOCK_BIT
+6 EFUSE_LE_LOCK_BIT
+7 EFUSE_BR_LOCK_BIT
+)
+
+/* data stored in eeprom */
+(
+0	eeprom_nv_ram
+
+)
+
+/*mem_app_handshake_flag*/
+(
+0 APP_HANDSHAKE_NULL
+1 APP_HANDSHAKE_DONE
+
+)
+/*mem_device_option*/
+(
+1 dvc_op_hci
+2 dvc_op_esl
+4 dvc_op_dongle
+5 dvc_op_test
+8 dvc_op_mouse
+9 dvc_op_shutter
+0x0a dvc_op_module
+0x0b dvc_op_ali_mesh
+0x0c dvc_op_hci_boot
+0x0d dvc_op_remote_car
+0x0e dvc_op_car
+0x0f dvc_op_antilost
+   
+)
+
+(
+3 UCODE_FLAG_ENC
+2 UCODE_FLAG_SKIP_EEP
+1 UCODE_FLAG_SKIP_FLASH
+0 UCODE_FLAG_HCI
+)
+
+
+(
+7 gpio_active_bit
+)
+(
+2 HID_HANDSHAKE_TIMEOUT
+
+)
+
+(
+1 APP_FLAG_RECONNECT
+)
+(
+5 LPM_WAKE_UP_DELAY_TIMER
+)
+
+
+//mem_app_disconn_reason
+//mem_app_disconn_reason_flag
+//bit map
+(
+2 APP_DISC_RSN_SIZE
+)
+(
+0 APP_DISC_BY_BUTTON
+1 APP_DISC_AFTER_PAIRING
+2 APP_DISC_AFTER_RECONN
+3 APP_DISC_AFTER_SNIFF
+4 APP_DISC_AFTER_SETUP_DONE
+5 APP_DISC_AFTER_HANDSHAKE
+6 APP_DISC_BT
+7 APP_DISC_BLE
+8 APP_DISC_L2CAP_REFUSED
+9 APP_DISC_SWITCH_FAIL
+)
+//eeprom init flag
+(
+0xaa55 EEPROM_INIT_FLAG
+)
+
+(
+1 KEY_CONF_STRUCT_LEN
+0 KEY_PIN_OFFSET
+)
+
+(
+12000000 PWM_12MHZ
+24000000 PWM_24MHZ
+33000 PWM_33KHZ
+)
+(
+0 POWER_OFF
+1 POWER_STARTING
+2 POWER_STANDBY
+)
+//power parameter offset(8 byte)
+(
+0 power_state_offset
+1 power_timer_offset
+2 power_off_timeout_offset
+3 power_starting_timeout_offset
+4 power_off_cb_offset
+6 power_starting_cb_offset
+8 power_standby_cb_offset
+10 ui_butten_up_cb_offset
+)
+
+
+//auth rom address
+(
+0x9000 mem_b_box
+0x9100 mem_e_box
+0x9200 mem_l_box
+0x9300 memk
+0x9400 mem_theta
+0x9420 mem_local_sig
+0x9fff mem_sim_slave
+//mouse
+0x9468 MOUSE_BT_SDP_ADDR
+0x9732 MOUSE_BLE_ATT_LIST_ADDR
+//dongle
+0x99A4 USB_KBDATA_VENDOR_DEFINE_ADDR
+0x99BF USB_KBDATA_ADDR
+0x99FF USB_MSDATA_ADDR
+0x9AA3 USB_DEVICEDATA_ADDR
+0x9AB6 USB_CONFDATA_ADDR
+//shutter
+0x9AF2 BLE_SHUTTER_GATT_LIST
+0x9C70 CLASSIC_SHUTTER_SDP_LIST
+0x9E57 BLE_SHUTTER_KEY_VALUE_LIST
+0x9E7F CLASSIC_SHUTTER_KEY_VALUE_LIST
+//car
+0x9EA7 BLE_CAR_ATT_LIST
+//tx power list
+//0x9F73 TX_POWER_LIST
+)
+
+
+
+(//NEC 61212
+9000 NEC61212_BOOT_CODE_START_TIME
+4500 NEC61212_BOOT_CODE_END_TIME
+
+9000 NEC61212_REPEAT_START_TIME
+2250 NEC61212_REPEAT_END_TIME
+
+560 NEC61212_DATA_BIT_1_START_TIME
+1690 NEC61212_DATA_BIT_1_END_TIME
+
+560 NEC61212_DATA_BIT_0_START_TIME
+560 NEC61212_DATA_BIT_0_END_TIME
+
+560 NEC61212_STOP_TIME
+
+42580 NEC61212_DATA2REPEAT_TIME
+98190 NEC61212_REPEAT2REPEAT_TIME
+
+0xffff NEC61212_TIMEOUT_TIME
+)
+
+
+(
+0 ADC_GPIO_4
+1 ADC_GPIO_5
+2 ADC_GPIO_6
+3 ADC_GPIO_7
+4 ADC_GPIO_9
+5 ADC_GPIO_10
+6 ADC_GPIO_11
+7 ADC_GPIO_12
+)
+
Index: mouse_public_3mode_usb/format/app_antiLost.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_antiLost.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_antiLost.format	(working copy)
@@ -0,0 +1,207 @@
+xmemalloc antilost(
+// memblock for cover the variables portion at shutter.format
+2 mem_antl_lpm_interval
+2 mem_antl_adv_interval
+2 mem_antl_slow_adv_lpm_interval
+2 mem_antl_slow_adv_adv_interval
+0 mem_antl_led_style
+1 mem_antl_led_type
+1 mem_antl_led_blink_count
+1 mem_antl_led_gpio
+2 mem_antl_led_on_time
+2 mem_antl_led_off_time
+2 mem_antl_led_cb_on
+2 mem_antl_led_cb_off
+
+0 mem_antl_buzzer_style
+1 mem_antl_buzzer_type
+1 mem_antl_buzzer_blink_count
+1 mem_antl_buzzer_gpio
+2 mem_antl_buzzer_on_time
+2 mem_antl_buzzer_off_time
+2 mem_antl_buzzer_cb_on
+2 mem_antl_buzzer_cb_off
+
+0 mem_antl_fast_adv_led_style
+1 mem_antl_fast_adv_led_type
+1 mem_antl_fast_adv_led_blink_count
+1 mem_antl_fast_adv_led_gpio
+2 mem_antl_fast_adv_led_on_time
+2 mem_antl_fast_adv_led_off_time
+
+0 mem_antl_slow_adv_led_style
+1 mem_antl_slow_adv_led_type
+1 mem_antl_slow_adv_led_blink_count
+1 mem_antl_slow_adv_led_gpio
+2 mem_antl_slow_adv_led_on_time
+2 mem_antl_slow_adv_led_off_time
+
+0 mem_antl_power_starting_led_style
+1 mem_antl_power_starting_led_type
+1 mem_antl_power_starting_led_blink_count
+1 mem_antl_power_starting_led_gpio
+2 mem_antl_power_starting_led_on_time
+2 mem_antl_power_starting_led_off_time
+
+7 mem_antl_power_starting_buzzer_style
+
+0 mem_antl_power_off_led_style
+1 mem_antl_power_off_led_type
+1 mem_antl_power_off_led_link_count
+1 mem_antl_power_off_led_gpio
+2 mem_antl_power_off_led_on_time
+2 mem_antl_power_off_led_off_time
+
+0 mem_antl_power_off_buzzer_style
+1 mem_antl_power_off_buzzer_type
+1 mem_antl_power_off_buzzer_link_count
+1 mem_antl_power_off_buzzer_gpio
+2 mem_antl_power_off_buzzer_on_time
+2 mem_antl_power_off_buzzer_off_time
+
+7 mem_antl_alert_led_stlye
+
+0 mem_antl_alert_buzzer_stlye
+1 mem_antl_alert_buzzer_type
+1 mem_antl_alert_buzzer_blink_count
+1 mem_antl_alert_buzzer_gpio
+2 mem_antl_alert_buzzer_on_time
+2 mem_antl_alert_buzzer_off_time
+
+0 mem_antl_key_led_style
+1 mem_antl_key_led_type
+1 mem_antl_key_led_blink_count
+1 mem_antl_key_led_gpio
+2 mem_antl_key_led_on_time
+2 mem_antl_key_led_off_time
+
+7 mem_antl_key_buzzer_style
+
+1 mem_antl_queue_width
+1 mem_antl_queue_depth
+1 mem_antl_queue_curr_num
+1 mem_antl_queue_read_ptr
+1 mem_antl_queue_write_ptr
+80 mem_antl_queue_buff
+
+1 mem_antl_key_scan_enable
+1 mem_antl_led_num
+4 mem_antl_led_gpio_map
+
+0 mem_antl_power_param
+1 mem_antl_power_state
+1 mem_antl_power_timer
+1 mem_antl_power_off_timeout
+1 mem_antl_power_starting_timeout
+2 mem_antl_power_off_cb
+2 mem_antl_power_starting_cb
+2 mem_antl_power_standby_cb
+2 mem_event_button_up_cb
+
+1 mem_antl_key_num
+2 mem_cb_antl_key
+4 mem_antl_key_conf0
+
+15 mem_antl_key0_press
+15 mem_antl_key0_release
+
+///////
+1 mem_antl_conn_updata_procedure_state
+2 mem_client_characteristic_configuration_descriptor
+///////
+
+
+//100ms timer
+2 mem_adc_timer
+1 mem_antl_conn_update_timer
+1 mem_antl_send_updata_le_param_timer
+////
+
+2 mem_antl_le_sleep_timer
+2 mem_antl_fast_adv_timer
+2 mem_antl_fast_adv_timeout
+2 mem_antl_le_sleep_timeout
+1 mem_double_click_timer
+1 mem_butten_click_cnt
+
+//1 mem_dvc_seq
+/////////anti lost alarm state/////
+1 mem_antl_led_state
+1 mem_antl_buzzer_state
+1 mem_antl_key_state
+1 mem_antl_lost_mode
+1 mem_alarm_config
+1 mem_alarm_config_notfy_cnt
+
+6 mem_buzzer_pwm_conf
+
+
+/////////anti lost battery adc read////////
+2 mem_adc_timeout
+1 mem_voltage_remain_percent
+
+0 mem_battery_calculate_set
+2 mem_battery_full_voltage
+2 mem_battery_empty_voltage
+2 mem_battery_low_voltage
+2 mem_battery_current_voltage
+
+
+2 mem_rx_window_sniff_inc
+2 mem_interval_increment
+
+2 mem_antl_le_interval_min
+2 mem_antl_le_interval_max
+2 mem_antl_le_latency
+2 mem_antl_le_timeout
+2 mem_antl_le_unnormal_interval_min
+2 mem_antl_le_unnormal_interval_max
+2 mem_antl_le_unnormal_latency
+2 mem_antl_le_unnormal_timeout
+
+400 mem_AntiLost_le_att_list
+1 mem_lestate_update_param_flag
+1 mem_antilost_conn_battery_send_timer
+
+2 mem_antl_disconn_buzzer_on_timer
+2 mem_antl_disconn_buzzer_on_timeout
+)
+
+//app new specific
+(
+0 CONN_PARAM_UPDATA_PROCEDURE_NO_INIT
+1 CONN_PARAM_UPDATA_PROCEDURE_STARTING
+2 CONN_PARAM_UPDATA_PROCEDURE_COMPLETE
+3 CONN_PARAM_UPDATA_PROCEDURE_FAILD
+)
+(
+0 NEW_SPEC_HEADER_OFFSET
+2 NEW_SPEC_OPCODE_OFFSET
+3 NEW_SPEC_DLEGTH_OFFSET  //data length offset
+5 NEW_SPEC_DADDR_OFFSET   //data address offset
+)
+(
+1 OPCODE1_BUTTEN_CLICK_ONCE
+2 OPCODE2_BUTTEN_DOUBLE_CLICK
+3 OPCODE3_ANTL_START_ALRAM
+4 OPCODE4_CURRENT_ALARM_STATE
+5 OPCODE5_BATTER_INFORMATION
+7 OPCODE7_ANTL_CONFIG_ALRAM
+)
+(
+0x0a NEW_SPEC_NOTIFY_HANDLE
+0x0b NEW_SPEC_NOTIFICATION_ENABLE_HANDLE
+0x0d NEW_SPEC_WRITE_HANDLE
+)
+//app new specific end
+
+//mem_anti_lost_mode
+(
+0x01 ANTI_LE_ALARM_ON
+0x00 ANTI_LE_ALARM_OFF
+)
+(
+0 NOTIFICATION_ENABLE_BIT
+1 INDICATION_ENABLE_BIT
+)
+
Index: mouse_public_3mode_usb/format/app_car.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_car.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_car.format	(working copy)
@@ -0,0 +1,326 @@
+
+
+xmemalloc g24_rx_car(
+1 mem_car_hard_soft_switch
+1 mem_car_queue_each_size
+1 mem_car__queue_length
+
+1 mem_car_queue_curr_num
+1 mem_car_queue_read_ptr
+1 mem_car_queue_write_ptr
+120 mem_car_queue_ele
+
+20 mem_car_pop_queue_buff
+
+1 mem_car_led_num
+10 mem_car_led_map
+
+1 mem_car_style1_led_type
+1 mem_car_style1_blink_count
+1 mem_car_style1_struct_led_gpio
+2 mem_car_style1_on_time
+2 mem_car_style1_off_time
+2 mem_car_style1_cb_ledon
+2 mem_car_style1_cb_ledoff
+
+1 mem_car_style2_led_type
+1 mem_car_style2_blink_count
+1 mem_car_style2_struct_led_gpio
+2 mem_car_style2_on_time
+2 mem_car_style2_off_time
+2 mem_car_style2_cb_ledon
+2 mem_car_style2_cb_ledoff
+
+//////motor
+0 mem_le_receive_data
+2 mem_le_receive_packet_head
+1 mem_le_receive_cmd
+2 mem_le_receive_length
+10 mem_le_receive_payload
+1 mem_le_receive_checksum
+1 mem_motor1_status
+1 mem_motor1_speed
+1 mem_motor2_status
+1 mem_motor2_speed
+1 mem_motor3_status
+1 mem_motor3_speed
+
+0 mem_motor1_pwm_set
+1 mem_motor1_pwm_pin1_set
+1 mem_motor1_pwm_pin2_set
+1 mem_motor1_pwm_pin_set
+1 mem_motor1_pwm_channel_set
+3 mem_motor1_pwm_freq_set
+1 mem_motor1_pwm_dute_set
+0 mem_motor2_pwm_set
+1 mem_motor2_pwm_pin1_set
+1 mem_motor2_pwm_pin2_set
+1 mem_motor2_pwm_pin_set
+1 mem_motor2_pwm_channel_set
+3 mem_motor2_pwm_freq_set
+1 mem_motor2_pwm_dute_set
+0 mem_motor3_pwm_set
+1 mem_motor3_pwm_pin1_set
+1 mem_motor3_pwm_pin2_set
+1 mem_motor3_pwm_pin_set
+1 mem_motor3_pwm_channel_set
+3 mem_motor3_pwm_freq_set
+1 mem_motor3_pwm_dute_set
+
+1 mem_motor_select_p_n
+1 mem_car_motor_status
+1 mem_car_motor_speed
+0 mem_motor_pwm_set
+1 mem_motor_pwm_pin1_set
+1 mem_motor_pwm_pin2_set
+1 mem_motor_pwm_pin_set
+1 mem_motor_pwm_channel_set
+3 mem_motor_pwm_freq_set
+1 mem_motor_pwm_dute_set
+
+1 mem_ir_rx_gpio
+2 mem_ir_data
+2 mem_ir_rx_buf
+4 mem_ir_receive_clkn
+
+3 mem_ir_notify_data
+5 mem_ir_notify_data_head
+2 mem_ir_notify_data_payload
+1 mem_ir_notify_data_check_sum
+1 mem_car_ir_breakdown_check_timer
+1 mem_car_ir_breakdown_flag
+
+0 mem_car_led_control
+1 mem_car_led1_status
+1 mem_car_led2_status
+1 mem_car_led3_status
+1 mem_car_led4_status
+1 mem_car_led5_status
+1 mem_car_led6_status
+1 mem_car_led7_status
+1 mem_car_led8_status
+1 mem_car_led_control_timer
+1 mem_car_led_blink_status
+1 mem_car_led_no
+
+3 mem_car_info_request
+5 mem_car_info_request_head
+8 mem_car_info_request_payload
+1 mem_car_info_request_checksum
+
+0 mem_car_config_param
+1 mem_car_config_setting_flag
+1 mem_car_config_device_select
+1 mem_car_config_motor_layout
+1 mem_car_config_ir_enable
+1 mem_car_config_ir_rx_gpio
+1 mem_car_config_pairing_led_conn_status
+1 mem_car_config_pairing_led_gpio
+1 mem_car_config_led_num
+0 mem_car_config_blood_led_gpio
+1 mem_car_config_blood_led1_gpio
+1 mem_car_config_blood_led2_gpio
+1 mem_car_config_blood_led3_gpio
+1 mem_car_config_blood_led4_gpio
+1 mem_car_config_blood_led5_gpio
+1 mem_car_config_blood_led6_gpio
+1 mem_car_config_blood_led7_gpio
+1 mem_car_config_blood_led8_gpio
+1 mem_car_config_bat_notify_enable
+1 mem_car_config_low_voltage_led_gpio
+1 mem_car_config_low_voltage_percent
+1 mem_car_config_soft_switch_enable
+1 mem_car_config_soft_switch_gpio
+
+1 mem_car_notify_vdd_count
+1 mem_car_notify_vdd_timer
+1 mem_car_notify_vdd_value_last
+1 mem_car_notify_vdd_percent
+1 mem_car_working_flag
+1 mem_low_bat_flag
+
+3 mem_notify_bat_packet
+5 mem_notify_bat_head
+1 mem_notify_bat_payload
+1 mem_notify_bat_check_sum
+
+1 mem_vdd_notify_flag
+2 mem_car_current_vdd_value_temp
+2 mem_car_last_vdd_value
+
+0 mem_vdd_calculate_set
+2 mem_vdd_full_vol
+2 mem_vdd_empty_vol
+2 mem_vdd_low_vol
+2 mem_vdd_now_vol
+
+
+1 mem_car_24g_status
+2 mem_car_24g_no_data_timeout_count
+2 mem_car_24g_no_data_timeout_timer
+
+1 mem_car_24g_ir_receive_attack_count
+1 mem_car_24g_go_die_flag
+1 mem_car_attack_shake_timer
+1 mem_car_attack_shake_flag
+
+0 mem_car_soft_power
+1 mem_car_power_state
+1 mem_car_power_timer
+1 mem_car_power_off_timeout
+1 mem_car_power_starting_timeout
+2 mem_car_power_off_cb
+2 mem_car_power_starting_cb
+2 mem_car_power_standby_cb
+2 mem_car_ui_button_up_cb
+
+
+500 mem_car_le_att_list
+
+1 mem_car_moto1_blank_timer
+1 mem_car_moto2_blank_timer
+1 mem_car_moto3_blank_timer
+
+1 mem_car_motor_gpio_num
+0 mem_car_motor_gpio_map
+1 mem_car_motor_left_gpio
+1 mem_car_motor_right_gpio
+1 mem_car_motor_front_gpio
+1 mem_car_motor_back_gpio
+1 mem_car_gpio
+1 mem_car_app_send_speed
+
+2 mem_rssi_sum
+2 mem_check_rssi_high_count
+8 mem_rssi_data
+
+1 mem_car_24g_received_pac
+1 mem_car_24g_bind_enable_delay_count
+
+0 mem_car_keyscan
+1 mem_car_key_num
+2 mem_cb_car_keyscan
+
+2 mem_car_enter_lpm_timer_count
+2 mem_car_enter_lpm_timer
+1 mem_car_enter_lpm_flag
+
+1 mem_car_24g_ch_polling
+
+8 mem_car_rssi_noise_buffer
+8 mem_car_rssi_noise_car_buffer
+8 mem_car_rssi_noise_remote_buffer
+
+
+)
+
+(
+//20ms
+0x0020	FAST_ADV_INTERVAL_VALUE_CAR
+)
+
+(
+0x14 ATT_CAR_CONTROL_HANDLE
+0x14 ATT_SPEED_SET_HANDLE
+)
+
+
+(
+0 TURN_FRONT
+1 TURN_LEFT
+2 TURN_RIGHT
+0 MOTOR_STOP
+1 GO_FRONT
+2 GO_BACK
+0x6b5a LE_RECEIVE_PACKET_HEAD
+)
+
+(
+0 FLAG_IR_DISABLE
+1 FLAG_IR_ENABLE
+)
+
+(
+0 DEVICE_CAR
+1 DEVICE_TANK
+2 DEVICE_BATTLE_CAR
+3 DEVICE_BATTLE_TANK
+4 DEVICE_REMOTE
+)
+
+(
+0 F_B_MOTOR
+1 L_R_MOTOR
+2 F_B_BATTERY
+3 L_R_BATTERY
+)
+
+(
+0 CAR_WORK	   		//connect mode normal
+1 CAR_BIND			//code pair mode
+2 CAR_TEST			//test mode
+3 CAR_CODE			//PC_application
+4 CAR_PCBA			//PCBA_TEST
+5 CAR_DEBUG
+6 CAR_MODE_MAX
+7 CAR_SEARCH
+)
+
+(
+1 SPEED_LEVEL_1
+2 SPEED_LEVEL_2
+3 SPEED_LEVEL_3
+4 SPEED_LEVEL_4
+5 SPEED_LEVEL_5
+6 SPEED_LEVEL_6
+7 SPEED_LEVEL_7
+8 SPEED_LEVEL_8
+9 SPEED_LEVEL_9
+10 SPEED_LEVEL_10
+)
+
+(
+0 PWM0_DUTY_SETTING
+1 PWM1_DUTY_SETTING
+2 PWM2_DUTY_SETTING
+)
+
+(
+1 CAR_CMD_BATTERY
+2 CAR_CMD_OLD_CAR_CONTROL
+3 CAR_CMD_OLD_SPEED_CONTROL
+4 CAR_CMD_L_R_MOTOR_CONTROL
+5 CAR_CMD_F_B_MOTOR_CONTROL
+6 CAR_CMD_IR_CONTROL
+7 CAR_CMD_LED_CONTROL
+8 CAR_CMD_DEVICE_INFO
+)
+
+(
+0 CAR_REMOTE_CHECK_BUTTON
+1 CAR_REMOTE_CHECK_ROCKER
+)
+
+(
+0x11 CAR_NOTIFY_HANDLE
+)
+
+(
+0 LED_OFF
+1 LED_ON
+2 LED_BLINK
+0xFF LED_INVALID
+)
+
+(
+0xFF INVALID_PIN_NUM
+)
+
+
+(
+0 POWER_ON
+1 WORK_PAIRED
+2 WORK_SEARCH
+)
+
+
Index: mouse_public_3mode_usb/format/app_dongle.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_dongle.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_dongle.format	(working copy)
@@ -0,0 +1,138 @@
+
+memalloc usb_dongle(
+256 mem_dg_rssi_noise_buffer
+256 mem_dg_rssi_noise_dg_buffer
+256 mem_dg_rssi_noise_ms_buffer
+256 mem_dg_rssi_noise_kb_buffer
+
+)
+
+
+xmemalloc g24_rx_dongle(
+1 mem_dg_kb_bind_flag
+8 mem_dg_kb_data_sta_data
+8 mem_dg_kb_data_last_data
+3 mem_dg_kb_multikey_sta_data
+3 mem_dg_kb_multikey_last_data
+3 mem_dg_kb_system_sta_data
+3 mem_dg_kb_system_last_data
+1 mem_dg_kb_blank_data_enable
+1 mem_dg_kb_mul_blank_data_enable
+1 mem_dg_ms_blank_data_enable
+
+1 mem_dg_sys_config
+9 mem_dg_usb_vid_pid
+1 mem_dg_usb_tx_interval
+30 mem_dg_usb_device_name
+1 mem_dg_kb_bind_success
+1 mem_dg_pc_sleep_flag
+
+1 mem_test_blank_data
+)
+
+
+//eeprom address offset
+(
+0x5A DONGLE_KB_BIND_SUCCESS
+0x00 DONGLE_KB_BIND_EEPROM_OFFECT
+0x2A DONGLE_KB_BIND_EFUSE_OFFECT
+)
+
+(
+5 WORK_MODE_DELAY
+7 BIND_MODE_DELAY
+)
+
+(
+0 DONGLE_WORK	   		//connect mode normal
+1 DONGLE_BIND			//code pair mode
+2 DONGLE_TEST			//test mode
+3 DONGLE_CODE			//PC_application
+4 DONGLE_PCBA			//PCBA_TEST
+5 DONGLE_DEBUG
+6 DONGLE_MODE_MAX
+7 DONGLE_SEARCH
+0 CLEAR_INIT
+)
+
+
+(
+0xa0 COMMAND_MODE     //BYTE 0
+0x81 COM_MODE_BIND	//BYTE 1
+0x82 COM_MODE_TEST	//BYTE 1
+)
+(
+0xa1 COMMAND_BIND		//BYTE 0
+0x01 COM_BIND_GET		//1
+0x84 COM_BIND_EXIT		//1
+0xa7 COM_READ_MODE		//1
+)
+(
+0xa2 COMMAND_TEST	//BYTE 0
+0x81 COM_TEST_SC		//	进入单载波
+0x82 COM_TEST_CD		// fcc测试
+0x83 COM_TEST_DAT		// 数据测试
+0x84 COM_TEST_LOW_CH  //低频点
+0x85 COM_TEST_MID_CH	//中频点
+0x86 COM_TEST_HIG_CH	//高频点
+0x87 COM_TEST_SW_HIG	//自动切换频点为高 1mhz
+0x88 COIM_TEST_SW_LOW	//自动切换频点为低 1mhz
+0x89 COM_TEST_SW_STOP	//停止自动切换频点
+0x8a COM_TEST_POW_5		//设置输出功率5dbm
+0x8b COM_TEST_POW_0		//0dbm
+0x8c COM_TEST_POW_N5		//-5dbm
+0x8d COM_TEST_POW_N10		//-10dbm
+0x8e COM_TEST_EXIT			//退出测试模式
+)
+(
+0xa6 COMMAND_CURRENT_PROJECT
+0xa7 COMMAND_CURRENT_MODE
+0xa9 COMMAND_CURRENT_FW_VERSION
+0xb0 COMMAND_USER_DEFINED		//user defined cmd
+)
+
+(
+0x15 PRODUCT_ID
+0 FW_VERSION0
+0 FW_VERSION1
+1 FW_VERSION2
+7 FW_VERSION3
+)
+
+(
+8 TIMER_NODATA
+640 TIMER_NODATA_DELAY	//200ms
+
+11 TIMER_MS_BLANK
+384 TIMER_MS_BLANK_DELAY
+
+12 TIMER_KB_MUL_BLANK
+384 TIMER_KB_MUL_BLANK_DELAY
+
+14 TIMER_KB_BLANK
+384 TIMER_KB_BLANK_DELAY
+)
+
+(
+0 KB_NORMAL_REPORT_ID
+1 MS_REPORT_ID
+2 KB_SYSTEM_CONCTRL_REPORT_ID
+3 KB_MULTIKEY_REPORT_ID
+)
+
+
+(
+0x01 BIND_ACKPAYLOAD
+0x03 KB_LED_ACKPAYLOAD
+)
+
+//mem_dg_sys_config
+(
+7 DG_ENABLE_XTAL_24M
+6 DG_ENABLE_NEW_CHMAP
+5 DG_ENABLE_EEPROM
+4 DG_ENABLE_KB_ICON
+//bit3-0
+//tx power
+)
+
Index: mouse_public_3mode_usb/format/app_esl.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_esl.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_esl.format	(working copy)
@@ -0,0 +1,181 @@
+ifdef COMPILE_ESL
+
+memalloc esl(
+256 mem_uncom_the_first_two_buff
+//uncompress pic buffers
+2200 mem_uncom_dest
+0 mem_uncom_clear_everytime_start
+2 mem_uncom_dest_index
+1 mem_uncom_src_index
+1 mem_uncom_block_len
+1 mem_uncom_block_head
+2 mem_uncom_block_body_ptr
+0 mem_uncom_clear_everytime_end
+
+0 mem_uncom_clear_once_start
+1 mem_uncom_the_first_two_index
+1 mem_uncom_repetitive
+1 mem_uncom_left_len
+2 mem_uncom_current_len
+2 mem_uncom_total_len
+2 mem_uncom_src_end
+0 mem_uncom_clear_once_end
+)
+
+xmemalloc esl(
+//eink_log
+96 mem_eink_log_ring_buffer
+1 mem_eink_log_front
+1 mem_eink_log_end
+12 mem_eink_log_ring_buffer_flag
+1 mem_eink_log_pend
+1 mem_eink_log_draw_byte
+
+1 mem_eink_log_last_star
+0 mem_eink_log_last_info
+1 mem_eink_log_last_letter
+1 mem_eink_log_last_cmd
+1 mem_eink_log_last_ch
+1 mem_eink_log_last_rssi
+1 mem_eink_log_last_is_byte
+
+0 mem_eink_log_info
+1 mem_eink_log_letter
+1 mem_eink_log_cmd
+1 mem_eink_log_ch
+1 mem_eink_log_rssi
+1 mem_eink_log_is_byte
+
+20 mem_eink_log_hex2dec
+1 mem_eink_log_hex2dec_len
+1 mem_eink_log_hex2dec_ptr
+1 mem_eink_log_push_zero
+
+//uncompress
+1 mem_uncom_fliter_datalen
+1 mem_uncom_fliter_data_flag
+1 mem_uncom_image_att_flag
+62 mem_uncom_image_att_buf
+
+//eink_init
+1 mem_scl
+1 mem_sda
+1 mem_cs
+1 mem_dc
+1 mem_res
+1 mem_busy
+1 mem_pb1
+3 mem_eink_xy
+8 mem_eink_orig
+8 mem_eink_setxy
+6 mem_eink_display
+2 mem_eink_size
+60 mem_eink_init
+20 mem_eink_init_offset
+6 mem_eink_reg_red
+6 mem_eink_reg_blank
+368 mem_eink_font
+48 mem_code93
+1 mem_barcode_start
+20 mem_barcode
+1 mem_barcode_len
+
+2 mem_eink_head
+2 mem_image_ptr
+2 mem_rx_cnt
+1 mem_update_state
+2 mem_parse_cnt
+1 mem_esl_24g_current_ch
+1 mem_esl_24g_behavior
+4 mem_esl_24g_id
+32 mem_esl_24g_rxpayload
+1 mem_esl_24g_rssi_save
+2 mem_battery_vol
+
+1 mem_rssi_save
+1 mem_rssi_temp
+)
+
+(
+//chars: ascii
+0x20 CHAR_SPACE
+0x21 CHAR_EXCLAMATION
+0x22 CHAR_DITTO
+0x23 CHAR_POUND
+0x24 CHAR_DOLLAR
+0x25 CHAR_PERCENT
+0x26 CHAR_AMPERSAND
+0x27 CHAR_APOSTROPHE
+0x28 CHAR_OPENING_PARENTHESIS
+0x29 CHAR_CLOSING_PARENTHESIS
+0x2a CHAR_ASTERISK
+0x2b CHAR_PLUS
+0x2c CHAR_COMMA
+0x2d CHAR_MINUS
+0x2e CHAR_DOT
+0x2f CHAR_SLASH
+
+0x8b CHAR_AT
+
+//letter: ascii - 0x20
+0x61 LETTER_A
+0x62 LETTER_B
+0x63 LETTER_C
+0x64 LETTER_D
+0x65 LETTER_E
+0x66 LETTER_F
+0x67 LETTER_G
+0x68 LETTER_H
+0x69 LETTER_I
+0x6a LETTER_J
+0x6b LETTER_K
+0x6c LETTER_L
+0x6d LETTER_M
+0x6e LETTER_N
+0x6f LETTER_O
+0x70 LETTER_P
+0x71 LETTER_Q
+0x72 LETTER_R
+0x73 LETTER_S
+0x74 LETTER_T
+0x75 LETTER_U
+0x76 LETTER_V
+0x77 LETTER_W
+0x78 LETTER_X
+0x79 LETTER_Y
+0x7a LETTER_Z
+)
+
+/* endpoint eink log */
+(
+0x60 EINK_LOG_MAX
+0x108 EINK_LOG_XY_START
+
+//fail reason
+0x00 EINK_LOG_RX_LOST
+0x01 EINK_LOG_OLD_PAC
+0x02 EINK_LOG_RX_NULL
+)
+
+(
+32 UNCOM_SRC_LENGTH
+31 UNCOM_SRC_INDEX
+62 UNCOM_IMAGE_ATT_LENTH
+)
+
+(
+2 mark_24g_old_packet
+7 mark_eink_red
+13 mark_barcode_end
+)
+
+(
+7 STATE_DATA_FINISH
+)
+
+(
+37 barcode_dot
+)
+
+endif
+
Index: mouse_public_3mode_usb/format/app_module.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_module.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_module.format	(working copy)
@@ -0,0 +1,289 @@
+
+memalloc module(
+	//ble
+	2 mem_module_le_rx_data_len
+	2 mem_module_le_rx_data_address
+	2 mem_module_le_rx_data_handle
+
+ifdef COMPILE_WECHAT
+	0 mem_wechat_tx_buffer
+	1 mem_wechat_tx_bMagicNumber
+	1 mem_wechat_tx_bVer
+	2 mem_wechat_tx_nLength
+	2 mem_wechat_tx_nCmdId
+	2 mem_wechat_tx_nSeq1
+	255 mem_wechat_tx_payload
+
+	0 mem_wechat_rx_buffer
+	1 mem_wechat_rx_bMagicNumber
+	1 mem_wechat_rx_bVer
+	2 mem_wechat_rx_nLength
+	2 mem_wechat_rx_nCmdId
+	2 mem_wechat_rx_nSeq
+	255 mem_wechat_rx_payload
+
+	255 mem_module_wechat_local_data_buffer
+
+endif
+)
+
+xmemalloc module(	
+	2 mem_soft_version_num
+	1 mem_module_wake_up_gpio
+	1 mem_module_state_gpio
+	1 mem_module_connect_state_gpio
+
+	2 mem_current_packet_length
+	1 mem_module_state
+	
+	1 mem_module_mcu_wake_pin
+	4 mem_module_mcu_wake_delay_us
+
+	1 mem_module_spp_lpm_mult
+	1 mem_module_le_lpm_mult	
+	1 mem_module_bluetooth_stauts_by_command
+
+	//uart
+	2 mem_module_uart_rx_buffer
+	2 mem_module_uart_rx_buffer_end
+	2 mem_module_uart_tx_buffer
+	2 mem_module_uart_tx_buffer_end
+	2 mem_module_uarta_baud_rate
+
+	//ADC
+	1 mem_module_read_vdd_flag
+	1 mem_module_read_vdd_count
+	1 mem_module_vdd_quotient
+	1 mem_module_vdd_remainder
+
+	//ble
+	1 mem_module_ble_data_uart_max_length
+
+	//flag
+	2 mem_module_flag
+
+	1 mem_module_hci_notify_len
+	2 mem_module_hci_notify_handle
+	2 mem_module_hci_nofiy_addr
+	1 mem_module_hci_notify_type
+
+	4 mem_last_transmite_clock
+
+ifdef COMPILE_WECHAT
+	1 mem_module_wechat_indication_handle
+	1 mem_module_wechat_write_handle
+	2 mem_module_wechat_tx_buffer_ptr
+	2 mem_module_wechat_rx_buffer_ptr
+	2 mem_module_wechat_rx_push_data_cb
+	2 mem_module_wechat_tx_nSeq
+	2 mem_module_wechat_tx_len
+	2 mem_module_wechat_tx_address
+	2 mem_module_wechat_rx_len
+	2 mem_module_wechat_rx_address
+	1 mem_module_wechat_receive_push_data
+endif
+	
+	300 mem_module_uuid_list
+	0 mem_module_uuid_list_end
+	600 mem_module_le_att_list
+	0 mem_module_le_att_list_end
+	0 mem_module_nv_data
+	34 mem_module_nv_data0
+	34 mem_module_nv_data1
+	34 mem_module_nv_data2
+	34 mem_module_nv_data3
+	34 mem_module_nv_data4
+	0 mem_module_nv_data_end
+)
+
+
+(//mem_module_flag
+//bit0~bit7 config module function
+0 MODULE_FLAG_UART_FLOW_CONTROL
+1 MODULE_FLAG_BLE_SEND_MTU23
+2 MODULE_FLAG_BLE_DATA_ENCRYPT
+
+//bit8~bit15 module states change
+8 MODULE_FLAG_BLE_DATA_FINISH
+9 MOUDLE_TASK_UNSNIFF
+10 MOUDLE_TASK_SNIFF
+
+)
+
+(
+34 NV_DATA_LEN
+-1 DECREASED_ONE
+)
+
+
+
+(
+	5 FLAG_MODULE_READ_VDD_COUNT
+)
+
+(
+	0x200 UART_AIR_CONTROL_THRESHOLD
+)
+
+(
+0x01 HCI_DISCARD_PACKET
+0x00 HCI_NOT_DISCARD_PACKET
+)
+
+
+
+(//Command
+0x00 HCI_CMD_SET_BT_ADDR_REQ
+0x01 HCI_CMD_SET_LE_ADDR_REQ
+0x02 HCI_CMD_SET_VISIBILITY_REQ
+0x03 HCI_CMD_SET_BT_NAME_REQ
+0x04 HCI_CMD_SET_LE_NAME_REQ
+0x05 HCI_CMD_SPP_DATA_REQ
+0x09 HCI_CMD_LE_DATA_REQ
+0x0b HCI_CMD_STATUS_IRQ
+0x0c HCI_CMD_SET_PAIRING_REQ
+0x0d HCI_CMD_SET_PINCODE_REQ
+0x0e HCI_CMD_SET_UARTCONTROL_REQ
+0x0f HCI_CMD_SET_UART_BAUD_REQ
+0x10 HCI_CMD_VERSION_REQ
+0x11 HCI_CMD_BT_DISCONNECT
+0x12 HCI_CMD_BLE_DISCONNECT
+0x13 HCI_CMD_DELETE_DEVICE
+0x14 HCI_CMD_CREATE_CONNECT
+0x15 HCI_CMD_SET_COD
+0x26 HCI_CMD_SET_NVRAM_REQ
+0x27 HCI_CMD_SLEEP
+0x28 HCI_CMD_CONFIRM_GKEY
+0x29 HCI_CMD_SET_CREDIT_GIVEN
+0x2a HCI_CMD_AUTO_ADV_SCAN
+0x2b HCI_CMD_POWER_REQ
+0x2c HCI_CMD_POWER_SET
+0x30 HCI_CMD_PASSKEY_ENTRY
+0x31 HCI_CMD_SET_GPIO
+0x32 HCI_CMD_READ_GPIO
+0x33 HCI_CMD_LE_SET_PAIRING
+0x34 HCI_CMD_LE_SET_ADV_DATA
+0x35 HCI_CMD_LE_SET_SCAN_DATA
+0x36 HCI_CMD_LE_SEND_CONN_UPDATE_REQ
+0x37 HCI_CMD_LE_SET_ADV_PARM
+0x38 HCI_CMD_LE_START_PAIRING
+0x40 HCI_CMD_SET_WAKE_GPIO
+0x42 HCI_CMD_SET_TX_POWER
+0x43 HCI_CMD_BOOT_VERSION_REQ
+0x48 HCI_CMD_LE_CONFIRM_GKEY
+0x49 HCI_CMD_REJECT_JUSTWORK
+0x51 HCI_CMD_RESET_CHIP_REQ
+
+0x61 HCI_CMD_LE_SET_FIXED_PASSKEY
+
+0x76 HCI_CMD_DELETE_CUSTOMIZE_SERVICE
+0x77 HCI_CMD_ADD_SERVICE_UUID
+0x78 HCI_CMD_ADD_CHARACTERISTIC_UUID
+0x7a HCI_CMD_PASSKEY_ENTRY_INPUT
+
+0x90 HCI_CMD_BLE_SET_PHY
+0x91 HCI_CMD_BLE_READ_CURRENT_PHY
+0x92 HCI_CMD_BLE_SET_DLE
+0x93 HCI_CMD_READ_CHIP_DATA
+0x94 HCI_CMD_WRITE_CHIP_DATA
+ifdef COMPILE_WECHAT
+0x95 HCI_CMD_WECHAT_SEND_DATA
+endif
+0xff HCI_CMD_CLOSE_LPM
+)
+
+(//event
+0x00 HCI_EVENT_SPP_CONN_REP
+0x01 HCI_EVENT_HID_CONN_REP
+0x02 HCI_EVENT_LE_CONN_REP
+0x03 HCI_EVENT_SPP_DIS_REP
+0x04 HCI_EVENT_HID_DIS_REP
+0x05 HCI_EVENT_LE_DIS_REP
+0x06 HCI_EVENT_CMD_RES
+0x07 HCI_EVENT_SPP_DATA_REP
+0x08 HCI_EVENT_LE_DATA_REP
+0x09 HCI_EVENT_STANDBY_REP
+
+0x0a HCI_EVENT_STATUS_RES
+
+0x0D HCI_EVENT_NVRAM_REP
+0x0e HCI_EVENT_GKEY
+0x0F HCI_EVENT_INVALID_PACKET
+0x10 HCI_EVENT_GET_PASSKEY
+0x11 HCI_EVENT_LE_TK
+0x12 HCI_EVENT_REMOTE_MTU
+0x14 HCI_EVENT_LE_PAIRING_STATE
+0X15 HCI_EVENT_LE_ENCRYPTION_STATE
+0x17 HCI_EVENT_LE_CONNECTION_UPDATE
+0x1d HCI_EVENT_LE_GKEY
+0x29 HCI_EVENT_UUID_HANDLE
+0x2b HCI_EVENT_LE_INPUT_GKEY
+
+0x40 HCI_BLE_UPDATE_PHY_EVENT
+ifdef COMPILE_WECHAT
+0x41 HCI_BLE_WECHAT_RECEIVE_PUSH_DATA
+endif
+)
+
+
+(//command HCI_CMD_SET_GPIO
+//byte 0
+0x00 HCI_CMD_CONFIG_GPIO_INPUT
+0x01 HCI_CMD_CONFIG_GPIO_OUTPUT
+//byte 1 input state
+0x00 GPIO_INPUT_PULLUP
+0x01 GPIO_INPUT_PULLDOWN
+0x02 GPIO_INPUT_HIGH_IMPEDANCE
+)
+
+
+
+(
+0x7e0 OTP_ADDR_RF_PARAM_FIX
+//struct of RF_PARAM_FIX
+// uint8       //length = param_pair_count * 2 
+// uint16     //param-pair-1
+// uint16     //param-pair-2
+// uint16     //param-pair-3
+// uint16     //param-pair-4
+// uint16     //param-pair-5
+// uint16     //param-pair-6
+// uint16     //param-pair-7
+)
+
+(
+0	BR_PAIRING_MODE_PINCODE
+1	BR_PAIRING_MODE_JUSTWORK
+2	BR_PAIRING_MODE_PASSKEY
+3	BR_PAIRING_MODE_NUMERIC
+
+0x81 BR_PAIRING_MODE_SECURE_CONNECT_JUSTWORK
+0x82 BR_PAIRING_MODE_SECURE_CONNECT_PASSKEY
+0x83 BR_PAIRING_MODE_SECURE_CONNECT_NUMERIC
+)
+
+
+(
+0x0001	FLAG_BT_PAIRING_SUCCESS
+0x0101	FLAG_BT_PAIRING_FAIL
+0x0080	FLAG_BLE_PAIRING_SUCCESS
+0x0180	FLAG_BLE_PAIRING_FAIL
+)
+
+
+(
+1	FLAG_EVENT_START_ENC
+0	FLAG_EVENT_PAUSE_ENC
+)
+
+(
+0 MOUDLE_STATE_BT_BIT
+1 MOUDLE_STATE_BLE_BIT
+)
+
+(
+5 BIT_OF_NOTIFY_AUTHENTICATED
+6 BIT_OF_READ_AUTHENTICATED
+7 BIT_OF_WRITE_AUTHENTICATED
+)
+
Index: mouse_public_3mode_usb/format/app_mouse.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_mouse.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_mouse.format	(working copy)
@@ -0,0 +1,917 @@
+
+memalloc mouse(
+2 mem_init_cnt
+2 mem_data_pre
+2 mem_data_current
+3 mem_data_sum
+2 mem_data_value
+
+)
+
+
+memalloc usb_mouse(
+16 mem_usb_mem_temp
+)
+
+
+
+xmemalloc g24_tx_mouse(
+// Mouse Work Area
+1 mem_mouse_key
+2 mem_mouse_x
+2 mem_mouse_y
+1 mem_mouse_z
+1 mem_mouse_tz
+1 mem_mouse_xy_h
+1 mem_mouse_key_last
+
+//mouse wheel
+1 mem_wheel_tb_old_pinlevel
+1 mem_wheel_tb_new_pinlevel
+1 mem_wheel_tog 
+1 mem_mouse_tz_data
+1 mem_mwheel_b_old_pinlevel
+1 mem_mwheel_b_new_pinlevel
+1 mem_mwheel_tog 
+1 mem_mouse_z_data
+1 mem_mouse_wheel_trigger
+1 mem_mouse_wheel_trigger_timer
+
+// adc
+//adc struct
+0 mem_mouse_vdd_calculate_set
+2 mem_mouse_vdd_full_vol
+2 mem_mouse_vdd_empty_vol
+2 mem_mouse_vdd_low_vol
+2 mem_mouse_vdd_now_vol
+
+2 mem_mouse_vdd_button_press_vol
+2 mem_mouse_vdd_switch_gnd_24g_vol
+2 mem_mouse_vdd_switch_gnd_full_vol
+2 mem_mouse_vdd_switch_gnd_shutdown_voltage
+2 mem_mouse_vdd_switch_gnd_low_voltage
+1 mem_adc_mux_status
+1 mem_adc_read_timer
+1 mem_adc_read_time_init
+1 mem_adc_low_volatage_led_timer_count
+1 mem_adc_low_volatage_led_blink_enable
+1 mem_mouse_adc_last_low_voltage_flag
+1 mem_mouse_adc_button_press_flag
+1 mem_adc_channel_gpio
+
+1 mem_adc_config_flag_init
+
+//efuse configured start		26byte
+2 mem_mouse_discovery_timeout
+2 mem_mouse_24g_pair_timeout_init
+1 mem_mouse_direct_timeout
+1 mem_mouse_24g_reconn_timeout_init
+1 mem_mouse_24g_pair_tx_power
+1 mem_rssi_dis_min_24g_init
+1 mem_rssi_dis_max_24g_init
+1 mem_rssi_hex_received_max_value_init
+1 mem_rssi_dis_min_ble_init
+1 mem_rssi_dis_max_ble_init
+1 mem_mouse_enable_flag
+1 mem_mouse_global_setup
+1 mem_mouse_global_setup1
+
+1 mem_bk_button_gpio
+1 mem_fw_button_gpio
+1 mem_dpi_button_gpio
+1 mem_matrix_public_gpio
+1 mem_sensor_motion_gpio
+1 mem_customer_key_gpio
+1 mem_whee_a_data_gpio
+1 mem_whee_b_data_gpio
+1 mem_config_device_24g_led_gpio
+1 mem_select_sensor_angle_gpio
+1 mem_mouse_reuse_2ice_gpio
+
+//efuse configured end
+
+1 mem_lbutton_gpio
+1 mem_rbutton_gpio
+1 mem_mbutton_gpio
+1 mem_config_select_device_button_gpio
+1 mem_whee_ta_data_gpio
+1 mem_whee_tb_data_gpio
+1 mem_device_switch_gpio
+1 mem_mouse_sensor_sclk_gpio
+1 mem_mouse_sensor_sdio_gpio
+1 mem_config_low_voltage_alarm_gpio
+1 mem_config_device_bt1_led_gpio
+1 mem_config_device_bt2_led_gpio	
+1 mem_dpi_led_gpio 
+
+
+1 mem_sensor_angle_default
+1 mem_sensor_angle_switch
+1 mem_config_sensor_dpi
+1 mem_config_sensor_type
+1 mem_config_sensor_angle
+
+
+// usb
+1 mem_wire_usb_interval
+1 mem_usb_addr
+1 mem_mouse_usb_vdd_status
+1 mem_mouse_usb_keyboard_flag
+
+
+//led struct
+1 mem_mouse_led_type
+1 mem_mouse_blink_count
+1 mem_mouse_struct_led_gpio
+2 mem_mouse_on_time
+2 mem_mouse_off_time
+2 mem_mouse_cb_ledon
+2 mem_mouse_cb_ledoff
+
+//three devices param
+//eeprom/flash
+0 mem_mouse_information_start
+1 mem_device_flag
+1 mem_device1_type
+6 mem_device1_addr
+16 mem_device1_link_key
+6 mem_device1_locall_addr
+
+1 mem_device2_type
+6 mem_device2_addr
+16 mem_device2_link_key
+6 mem_device2_locall_addr
+
+1 mem_device3_type
+0 mem_mouse_compare_addr_ff
+6 mem_device3_addr
+16 mem_device3_link_key
+6 mem_device3_locall_addr
+2 mem_store_flag
+1 mem_mouse_dpi
+4 mem_mouse_24g_addr
+2 mem_random_addr_increase_count
+31 mem_mouse_retention
+0 mem_mouse_information_end
+
+3 mem_flash_base
+4 mem_write_flash_head_temp
+1 mem_store_information_delay_timer
+1 mem_store_information_delay_timer_init
+
+//sensor param
+1 mem_sensor_id1
+1 mem_sensor_id2
+
+1 mem_sensor_shutter_hi
+1 mem_sensor_shutter_lo
+1 mem_sensor_smart_flag
+1 mem_sensor_squal_reg
+1 mem_sensor_iqc
+1 mem_mouse_move_flag
+
+1 mem_mouse_asm_flag
+2 mem_mouse_x_pre
+2 mem_mouse_y_pre
+1 mem_mouse_data_xtemp
+1 mem_mouse_data_ytemp
+
+0 mem_mouse_dpi_seting
+1 mem_320x_dpi_0
+1 mem_320x_dpi_1
+1 mem_320x_dpi_2
+1 mem_320x_dpi_3
+1 mem_3212_dpi_0
+1 mem_3212_dpi_1
+1 mem_3212_dpi_2
+1 mem_3212_dpi_3
+1 mem_ka8g2_dpi_0
+1 mem_ka8g2_dpi_1
+1 mem_ka8g2_dpi_2
+1 mem_ka8g2_dpi_3
+1 mem_mouse_cpi_count
+1 mem_mouse_dpi_button_state
+1 mem_mouse_dpi_long_press_flag
+
+10 mem_sensor_3212_init
+10 mem_sensor_3204_init
+10 mem_sensor_3205_init
+26 mem_sensor_32xx_init
+34 mem_sensor_32xx_init_1
+38 mem_sensor_8650_init
+30 mem_sensor_ka8ul_init
+16 mem_sensor_8009_init
+22 mem_sensor_ka8g2_init
+12 mem_sensor_p6520_init
+8 mem_sensor_poweron_init
+
+1 mem_sensor_reset_gpio
+1 mem_mouse_clear_sensor_data_flag
+1 mem_bluetooth_125hz_cnt
+
+//no motion pin
+1 mem_mouse_long_mult_flag
+1 mem_mouse_current_mult_timer
+
+1 mem_reconn_times
+1 mem_reconn_times_init
+2 mem_mouse_no_data_timer
+1 mem_device_flag_temp
+8 mem_mouse_rssi_signal_buf				
+4 mem_btclk_sensor
+1 mem_mouse_bluetooth_fast_conn_flag
+2 mem_mouse_discovery_timer
+1 mem_mouse_bluetooth_reconnect_timeout
+1 mem_mouse_need_soft_reset
+
+// le
+1 mem_mouse_le_bb_connected_flag
+1 mem_mouse_le_reconnect_flag
+1 mem_mouse_send_secutiry_request_timer
+
+3 mem_mouse_le_lap_temp
+3 mem_le_adv_ind
+3 mem_le_adv_direct_ind
+20 mem_le_adv_swift_pair
+1 mem_le_data_len
+2 mem_le_keyboard_handle
+2 mem_le_multimedia_handle
+2 mem_le_systemctrl_handle
+2 mem_le_battery_level_handle
+1 mem_le_battery_level_percentage
+2 mem_le_battery_level_updata_timer_init
+2 mem_le_battery_level_updata_timer
+1 mem_mouse_le_conn_param_reject
+32 mem_le_tx_buffer0_omemalloc
+32 mem_le_tx_buffer1_omemalloc
+32 mem_le_tx_buffer2_omemalloc
+32 mem_le_tx_buffer3_omemalloc
+1 mem_le_connect_status_flag
+1 mem_le_start_encrypt_timer
+1 mem_mouse_direct_timer
+
+//bt
+7 mem_device_addr_temp
+1 mem_mouse_enter_sniff_count
+1 mem_mouse_bt_boot_mode
+5 mem_mouse_bt_boot_data
+1 mem_bt_send_max_slot_req_accept_after_switch
+1 mem_mouse_bt_send_first_package_timer
+1 mem_mouse_bt_send_first_package_flag
+1 mem_lmi_opcode_temp 
+1 mem_lpm_mult_init
+
+// mouse key
+1 mem_customer_key
+1 mem_customer_data_trigger
+1 mem_customer_data_trigger_last
+
+1 mem_mouse_lkey_press_status
+1 mem_mouse_rkey_press_status
+1 mem_mouse_mkey_press_status
+1 mem_mouse_bkkey_press_status
+1 mem_mouse_fwkey_press_status
+1 mem_mouse_dpikey_press_status
+1 mem_mouse_pbkey_press_status
+1 mem_mouse_customerkey_press_status
+1 mem_mouse_key_temp
+1 mem_mouse_key_status
+
+1 mem_mouse_matrix_key_cow_count
+1 mem_mouse_matrix_key_row_count
+1 mem_mouse_ghost_flag
+1 mem_bt_discovery_count
+1 mem_select_device_count
+1 mem_mouse_commbination_key
+1 mem_select_device_button_statue
+1 mem_commbination_key_statue
+1 mem_combination_ui_button_count
+
+// 2.4G
+1 mem_mouse_search_dongle_interval
+1 mem_mouse_search_dongle_ch
+1 mem_mouse_search_dongle_count
+1 mem_mouse_search_dongle_action
+1 mem_24g_enter_lpm_timer
+1 mem_mouse_24g_enter_lpm_enable
+
+//led
+1 mem_mouse_device_poweron_timer_count
+1 mem_mouse_dpi_led_delay_count
+1 mem_mouse_led_off_4_led
+1 mem_24g_device_led_status
+
+// mouse configured param
+8 mem_mouse_flag 
+1 mem_mouse_bluetooth_type
+1 mem_device_number
+2 mem_mouse_page_to
+1 mem_mouse_fast_direct_timeout
+2 mem_mouse_fast_page_to
+2 mem_mouse_24g_power_on_fast_conn_timer
+2 mem_mouse_24g_search_dongle_time_init
+2 mem_mouse_no_data_timeout
+
+1 mem_mouse_device_poweron_timer_count_init
+1 mem_mouse_dpi_led_delay_count_init
+2 mem_mouse_dpi_led_blink_time
+2 mem_mouse_disconvey_led_blink_time
+2 mem_mouse_low_v_led_blink_time
+2 mem_adc_low_volatage_led_blink_timer
+
+1 mem_mouse_commbination_key_bt
+1 mem_mouse_commbination_key_24g
+
+9 mem_customer_key_press
+9 mem_customer_key_release
+3 mem_mouse_set_high_impedance_bit_set
+
+1 mem_sensor_shutdown_flag
+1 mem_24g_long_sleep_set_level
+
+// patch area
+1 mem_power_on_flag
+
+8 mem_ka8g2_sensor_poweron_init
+2 mem_24g_pair_count
+
+1 mem_le_name_patch_len
+19 mem_le_name_patch
+
+1 mem_mouse_logo_led_gpio
+2 mem_mouse_logo_led_on_time_init
+
+// 24g repotr rate area start
+4 mem_24g_tsniff
+1 mem_tx_count
+6 mem_tx_time_last
+4 mem_tx_time_last_delt
+5 mem_tx_time_sum
+1 mem_tx_time_sum_count
+1 mem_tx_time_offset
+
+3 mem_24g_short_sleep_set_init
+2 mem_retransmit
+1 mem_sleep_miss
+1 mem_long_sleep_flag
+4 mem_sleep_miss_temp
+0 mem_mouse_end
+// 24g repotr rate area end
+
+16 mem_mouse_rssi_signal_buf_patch
+16 mem_mouse_rssi_signal_buf_temp
+
+1 mem_g24_fast_conn_enable
+1 mem_xtal_cache
+
+//uart start 
+1 mem_device_uart_tx_gpio
+1 mem_device_uart_rx_gpio
+2 mem_device_uart_rx_buffer
+2 mem_device_uart_rx_buffer_end
+2 mem_device_uart_tx_buffer
+2 mem_device_uart_tx_buffer_end
+2 mem_device_uart_baud_rate
+//uart end
+
+//rssi log start
+1 mem_24g_paccnt
+1 mem_rssi_mouse
+4 mem_clkn_bt_patch
+2 mem_txpower_print
+//rssi log end
+
+1 mem_sensor_read_count
+1 mem_sensor_param_change_count
+
+//le conn param update
+1 mem_mouse_le_send_conn_param_update
+1 mem_mouse_le_send_conn_param_update_timer
+
+1 mem_soft_agc_en
+
+//tx power
+1 mem_normal_tx_power
+
+1 mem_mouse_24g_clear_sensor_data_flag
+
+12 mem_sensor_ka5857_init
+
+0 mem_3212_dpi_new
+1 mem_3212_dpi_0_new
+1 mem_3212_dpi_1_new
+1 mem_3212_dpi_2_new
+1 mem_3212_dpi_3_new
+1 mem_3212_dpi_4_new
+
+1 mem_24g_reconn_pairing_switch
+
+
+//usb retention
+1 mem_usb_offline_gpio_retention
+1 mem_usb_tx_interval_retention
+9 mem_usb_vid_pid_retention
+30 mem_usb_device_name_retention
+1 mem_usb_mode_enable
+
+//led parm
+1 mem_mouse_led_new_interface_enable
+1 mem_mouse_multi_led_blink_enable
+1 mem_mouse_multi_led_type
+1 mem_mouse_multi_led_state
+1 mem_mouse_le_reconn_led_fuction_enable
+1 mem_mouse_led_multi_type
+
+1 mem_mouse_multi_led_powon_timer
+1 mem_mouse_multi_led_blink_timer_init
+1 mem_mouse_multi_led_blink_timer
+
+1 mem_mouse_1io2led_multi_24gled		//io confige
+1 mem_mouse_1io2led_multi_bt1led
+1 mem_mouse_1io2led_multi_bt2led
+1 mem_mouse_1io2led_dpi_led
+1 mem_mouse_1io2led_low_led
+
+1 mem_mouse_pair_success
+1 mem_mouse_dpi_led_blink_enable
+1 mem_mouse_dpi_blink_count
+1 mem_mouse_dpi_blink_time
+
+//zcode
+1 mem_zcode_temp_param0	//zcode num
+2 mem_zcode_temp_param1	//patch ram func addr
+2 mem_zcode_temp_param2	//patch ram func addr
+
+1 mem_zcode_current_number
+3 mem_xip_flash_offset
+3 mem_flash_start_addr
+3 mem_flash_address
+4 mem_zcode_head
+)
+
+(
+0x1f00 mem_zcode_buff   
+
+256 ZCODE_BUFF_SIZE
+64 ZCODE_CODE_SIZE
+0xff ZCODE_FLAG
+
+0x00 ZCODE_00
+0x01 ZCODE_01
+0x02 ZCODE_02
+0x03 ZCODE_03
+0x04 ZCODE_04
+0x05 ZCODE_05
+0x06 ZCODE_06
+0x07 ZCODE_07
+0x10 ZCODE_10
+0x11 ZCODE_11
+0x12 ZCODE_12
+0x13 ZCODE_13
+0x14 ZCODE_14
+0x15 ZCODE_15
+0x16 ZCODE_16
+0x17 ZCODE_17
+0x20 ZCODE_20
+0x21 ZCODE_21
+0x22 ZCODE_22
+0x23 ZCODE_23
+0x24 ZCODE_24
+0x25 ZCODE_25
+0x26 ZCODE_26
+0x27 ZCODE_27 
+0x30 ZCODE_30
+0x31 ZCODE_31
+0x32 ZCODE_32
+0x33 ZCODE_33
+0x34 ZCODE_34
+0x35 ZCODE_35
+0x36 ZCODE_36
+0x37 ZCODE_37 
+0x40 ZCODE_40
+0x41 ZCODE_41
+0x42 ZCODE_42
+0x43 ZCODE_43
+0x44 ZCODE_44
+0x45 ZCODE_45
+0x46 ZCODE_46
+0x47 ZCODE_47
+0x50 ZCODE_50
+0x51 ZCODE_51
+0x52 ZCODE_52
+0x53 ZCODE_53
+0x54 ZCODE_54
+0x55 ZCODE_55
+0x56 ZCODE_56
+0x57 ZCODE_57
+0x60 ZCODE_60
+0x61 ZCODE_61
+0x62 ZCODE_62
+0x63 ZCODE_63
+0x64 ZCODE_64
+0x65 ZCODE_65
+0x66 ZCODE_66
+0x67 ZCODE_67
+0x70 ZCODE_70
+0x71 ZCODE_71
+0x72 ZCODE_72
+0x73 ZCODE_73
+0x74 ZCODE_74
+0x75 ZCODE_75
+0x76 ZCODE_76
+0x77 ZCODE_77
+0x80 ZCODE_80
+0x81 ZCODE_81
+0x82 ZCODE_82
+0x83 ZCODE_83
+0x84 ZCODE_84
+0x85 ZCODE_85
+0x86 ZCODE_86
+0x87 ZCODE_87
+0x90 ZCODE_90
+0x91 ZCODE_91
+0x92 ZCODE_92
+0x93 ZCODE_93
+0x94 ZCODE_94
+0x95 ZCODE_95
+0x96 ZCODE_96
+0x97 ZCODE_97
+0xA0 ZCODE_A0
+0xA1 ZCODE_A1
+0xA2 ZCODE_A2
+0xA3 ZCODE_A3
+0xA4 ZCODE_A4
+0xA5 ZCODE_A5
+0xA6 ZCODE_A6
+0xA7 ZCODE_A7
+0xB0 ZCODE_B0
+0xB1 ZCODE_B1
+0xB2 ZCODE_B2
+0xB3 ZCODE_B3
+0xB4 ZCODE_B4
+0xB5 ZCODE_B5
+0xB6 ZCODE_B6
+0xB7 ZCODE_B7
+0xC0 ZCODE_C0
+0xC1 ZCODE_C1
+0xC2 ZCODE_C2
+0xC3 ZCODE_C3
+0xC4 ZCODE_C4
+0xC5 ZCODE_C5
+0xC6 ZCODE_C6
+0xC7 ZCODE_C7
+0xd0 ZCODE_D0
+0xd1 ZCODE_D1
+0xe0 ZCODE_e0
+0xe1 ZCODE_e1
+0xe2 ZCODE_e2
+)
+
+
+(
+//combination
+0x01 MOUSE_L_BUTTON
+0X02 MOUSE_R_BUTTON
+0x03 MOUSE_LR_BUTTON
+0X04 MOUSE_M_BUTTON
+0X05 MOUSE_LM_BUTTON
+0X06 MOUSE_RM_BUTTON
+0X07 MOUSE_LMR_BUTTON
+0x09 MOUSE_L_BK_BUTTON
+0x0a MOUSE_R_BK_BUTTON
+0x11 MOUSE_L_FW_BUTTON
+0x14 MOUSE_M_FW_BUTTON
+0X18 MOUSE_BK_FW_BUTTON
+//mouse default gpio
+0x1B MOUSE_DEFAULT_XA_GPIO
+0x1C MOUSE_DEFAULT_XB_GPIO
+
+//ui led blink
+0X00C8  LED_RECONNECT_BLINK //200
+0X0190  LED_DPI_BLINK //400
+0X03E8  LED_DPI_BLINK_FIXED    //1000
+0X03E8  LED_DISCOVERY_BLINK    //1000
+0XFF    LED_LONG_BLINK
+0x05	LED_SENSOR_BLINK_CNT
+//mode device number
+0x00 MODE_24G_DEVICE
+0x01 MODE_BT_DEVICE1
+0x02 MODE_BT_DEVICE2
+0x03 MODE_BT_DEVICE3
+//mouse  flag
+0X00 WRITE_REQ_ENABLE_FLAG
+0X01 LL_START_ENC_FLAG
+0X02 LL_PAIRING_SUCCESS_FLAG
+
+
+//mouse_function_flag
+0x08 MOUSE_FLAG_LEN
+//byte 1
+0x00 MOUSE_SELECT_DEVICE_FLAG
+0x01 MOUSE_24G_PAIRING_FLAG
+0x02 MOUSE_STORE_EEPROM_FLAG
+0x03 MOUSE_BT_CANNEL_RECONN_FLAG
+0x04 MOUSE_LOW_VOLTAGE_FLAG
+0x05 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG
+0x06 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG
+
+//byte 2
+0x08 MOUSE_ENABLE_BLE_RANDOM_ADDRE
+0x09 MOUSE_ENABLE_2K_EEPROM
+0x0a MOUSE_ENABLE_INIT_DELAY
+0x0b MOUSE_ENABLE_WAKEUP_FROM_POWER
+0x0c MOUSE_ENABLE_16M
+0x0d MOUSE_ENABLE_USB
+
+//byte 3
+0x10 MOUSE_ENABLE_SPI2
+0x11 MOUSE_ENABLE_24G
+0x12 MOUSE_ENABLE_FLASH
+0x13 MOUSE_ENABLE_EEPROM
+0x14 MOUSE_ENABLE_ADC
+0x15 MOUSE_ENABLE_KEYBOARD
+0x16 MOUSE_ENABLE_24G_SEARCH_DONGLE
+
+//byte 4
+0x18 MOUSE_ENABLE_24G_250Hz
+0x19 MOUSE_ENABLE_24G_500Hz
+0x1a MOUSE_ENABLE_24G_1000
+0x1b MOUSE_ENABLE_BT_125Hz
+0x1c MOUSE_ENABLE_DPI_LEVEL_4
+0x1d MOUSE_ENABLE_USB_250
+0x1e MOUSE_ENABLE_USB_500
+0x1f MOUSE_ENABLE_USB_1000
+
+//byte 5
+0x20 MOUSE_ENABLE_POWER_ON_LED
+0x21 MOUSE_ENABLE_LOW_VOLTAGE_LED
+0x22 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED
+0x23 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND
+0x24 MOUSE_ENABLE_4_LED
+0x25 MOUSE_ENABLE_DPI_FOR_4_LED
+0x26 MOUSE_ENABLE_BT2_FOR_4_LED
+0x27 MOUSE_ENABLE_LOW_V_FOR_4_LED
+
+
+//byte 6
+0x28 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON
+0x29 MOUSE_ENABLE_SELECT_DEVICE_BY_PB_BUTTON
+0x2a MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO
+0x2b MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC
+0x2c MOUSE_ENABLE_DPI_KEY_CONNECT_GND
+0x2d MOUSE_ENABLE_PB_BUTTON_CONNECT_GND
+0x2e MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+0x2f MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING
+//byte 7 
+0x30 MOUSE_ENABLE_AUTO_24G_PARING
+0x31 MOUSE_ENABLE_24G_POWER_ON_PAIRING
+0x32 MOUSE_ENABLE_COMMBINATION_KEY_BY_24G_PAIRING
+0x33 MOUSE_ENABLE_BT_RECONNECT_TIMEOUT_ENTER_DISCOVERY
+0x34 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+0x35 MOUSE_ENABLE_COMMBINATION_KEY_BY_BT_DISCOVERY
+0x36 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY
+0x37 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY
+
+//byte 8
+0x38 MOUSE_ENABLE_SMOOTHER
+0x39 MOUSE_ENABLE_XY_OFFSET
+0x3a MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED
+0x3b MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+0x3c MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+0x3d MOUSE_ENABLE_DOUBLE_DPI_KEY
+
+//mouse dpi level
+0x00 MOUSE_DPI_LEVEL1
+0x01 MOUSE_DPI_LEVEL2
+0x02 MOUSE_DPI_LEVEL3
+0x03 MOUSE_DPI_LEVEL4
+0x04 MOUSE_DPI_LEVEL5
+
+
+//mouse sensor angle
+0x00 MOUSE_6CLK_ANGLE
+0X01 MOUSE_9CLK_ANGLE
+0X02 MOUSE_12CLK_ANGLE
+0X03 MOUSE_3CLK_ANGLE
+
+
+
+0xFF GPIO_DISABLE
+
+//DPI button state 
+0x00 DPI_BUTTON_STATE_UP
+0x01 DPI_BUTTON_STATE_DOWN
+
+
+//PB button state 
+0x00 PB_BUTTON_STATE_UP
+0x01 PB_BUTTON_STATE_DOWN
+
+//Commbination_key state 
+0x00 COMMBINATION_KEY_STATE_UP
+0x01 COMMBINATION_KEY_STATE_DOWN
+
+
+//eeprom address offect
+0X00 MOUSE_INFO_EEPROM_OFFECT
+0x58 MOUSE_STORE_FLAG
+0X5A MOUSE_DPI_EEPROM_OFFECT	//1byte
+0X5B MOUSE_G24_ADDR_EEPROM_OFFECT	//4bytes
+0X5F MOUSE_RANDOM_ADDR_COUNT_EEPROM_OFFSET	//2bytes
+0X61 MOUSE_EEPROM_MODULE_INIT_FLAG
+
+// Sensor id number
+0x30 P32XX_ID1
+0x31 P3065_ID1
+0x02 P3212_ID2
+0xD1 P3205_TJ3T_ID2
+0XD2 P3204_TJ3L_ID2
+0x54 PKA8_ID2
+0x70 P3065_XY_ID2
+0x00 P3065_ID2
+0x5a P_MX8650
+0xD8 P8009_ID2
+0x50 P6520A_ID2
+0x57 KA5857_ID2
+0x58 PKA8G2_ID1
+0x59 PKA8G2_ID2
+0xc0 P3204_TJDM_ID2
+
+
+//Sensor type
+0X00 P3205
+0X01 P3065
+0X02 P3204
+0X03 P3212
+0X04 P3065_XY
+0x05 MX8650
+0x06 P8009
+0x07 P6520
+0X08 KA8
+0X09 KA8_UL
+0X0a KA8_HD
+0X0b KA8G2
+0X0c KA5857
+
+
+//SENSOR REG
+0x00 PAN_REG_PID_L
+0x01 PAN_REG_PID_H
+0x02 PAN_REG_MOTION_STAUS
+0x03 PAN_REG_DELTA_X
+0x04 PAN_REG_DELTA_Y
+0x05 PAN_REG_OPRATION_MODE
+0x06 PAN_REG_CONFIG
+0x07 PAN_REG_IMAGE_QUALITY
+0x08 PAN_REG_OPRATION_STATE
+0x09 PAN_REG_WRITE_PROTECT
+0x0A PAN_REG_SLEEP_1
+0x0B PAN_REG_ENTER_TIME
+0x0C PAN_REG_SLEEP_2
+0x0D PAN_REG_IMAGE_THRESHOLD
+0x0E PAN_REG_IMAGE_RECGNITION
+
+
+0x06 MOUSE_DPI_ADDRESS
+0x05 MOUSE_P3610_DPI_ADDRESS
+0x0D MOUSE_P3212_DPI_XADDRESS
+0x0E MOUSE_P3212_DPI_YADDRESS
+
+)
+
+(
+0x01 ADV_FLAG_LIMITED_DISCOVERABLE
+0x04 ADV_FLAG_BREDR_NOT_SUPPORTED
+)
+
+(
+2 BIT_POWER_ON
+)
+//device option low 2
+(
+0 MODE_3_MOUSE
+1 MODE_4_MOUSE
+)
+
+
+(
+10 LE_LPM_DISABLE_TO
+1 LE_LPM_DISABLE
+0 LE_LPM_ENABLE
+
+12 LE_INTERVAL_15MS
+9 LE_INTERVAL_11_25MS//11.25ms
+7 LE_INTERVAL_8_75MS//8.75ms
+6 LE_INTERVAL_7_5MS//7.5ms
+12 CLASSIC_INTERVAL_7_5MS
+14 CLASSIC_INTERVAL_8_75MS
+18 CLASSIC_INTERVAL_11_25MS
+)
+
+(
+0x00 MOUSE_L_KEY
+0x01 MOUSE_R_KEY
+0x02 MOUSE_M_KEY
+0x03 MOUSE_BK_KEY
+0x04 MOUSE_FW_KEY
+0x05 MOUSE_DPI_KEY
+0x06 MOUSE_PB_KEY
+0x07 MOUSE_CUSTOMER_KEY
+
+0x00 MOUSE_DPI_ANOTHER_KEY
+)
+
+
+(
+0 G24_DISCONN_STATE
+1 G24_CONN_STATE
+
+8 G24_CH_NUMBER
+16 G24_CH_POLL_COUNT
+)
+
+(
+0 MOUSE_ADC_CHECK_BATTERY_ONLY
+1 MOUSE_ADC_CHECK_MULTIPLE
+2 MOUSE_ADC_CHECK_GPIO_MULTIPLE
+3 MOUSE_ADC_CHECK_VINLPM_MULTIPLE
+)
+
+
+(
+0x5a MOUSE_USB_INTERFACE_INSERT
+0xa5 MOUSE_USB_INTERFACE_REMOVE
+)
+
+(
+0x10 MOUSE_BLE_L2CAP_TXBUFF_SIZE
+)
+
+(
+0 MOUSE_ADC_ENABLE
+1 MOUSE_SEARCH_DONGLE_ENABLE
+2 MOUSE_24G_250HZ_ENABLE
+3 MOUSE_CLK_16M_ENABLE
+4 MOUSE_DPI_4_LEVEL_ENABLE
+5 MOUSE_KEYBOARD_ENABLE
+
+7 MOUSE_DEVICE_NUMBER_FLAG
+)
+
+
+//G24 ota
+(
+0x0001 G24_OTA_VERSION
+0x5a G24_OTA_DATA_HEADER
+
+0 G24_OTA_STORAGE_ERROR
+0x02 G24_OTA_STORAGE_EEPROM
+0x03 G24_OTA_STORAGE_OTP
+0x04 G24_OTA_STORAGE_FLASH
+
+0x00 G24_OTA_STATUS_SUCCESS
+0x01 G24_OTA_STATUS_FAIL
+
+0x01 G24_OTA_TARGET_DONGLE
+0x02 G24_OTA_TARGET_MOUSE
+0x03 G24_OTA_TARGET_DONGLE_MOUSE
+
+0x1 G24_OTA_CMD_VERSION
+0x2 G24_OTA_CMD_INFO
+0X3 G24_OTA_CMD_CONFIG
+0X4 G24_OTA_CMD_SET_CONFIG_END
+0X5 G24_OTA_CMD_DATA
+0X6 G24_OTA_CMD_RESET
+0xff G24_OTA_CMD_PING
+
+0x01 G24_OTA_SM_RX_VERSION
+0x02 G24_OTA_SM_TX_VERSION
+0x03 G24_OTA_SM_TX_VERSION_OK
+0X04 G24_OTA_SM_RX_INFO
+0X05 G24_OTA_SM_TX_INFO
+0X06 G24_OTA_SM_TX_INFO_OK
+0X07 G24_OTA_SM_RX_CONFIG
+0X08 G24_OTA_SM_TX_CONFIG
+0X09 G24_OTA_SM_TX_CONFIG_OK
+0X0A G24_OTA_SM_RX_SET_CONFIG_END
+0X0B G24_OTA_SM_TX_SET_CONFIG_END
+0X0C G24_OTA_SM_TX_SET_CONFIG_END_OK
+0X0D G24_OTA_SM_RX_DATA
+0X0E G24_OTA_SM_TX_DATA
+0X0F G24_OTA_SM_TX_DATA_OK
+0X10 G24_OTA_SM_RX_RESET
+0X11 G24_OTA_SM_TX_RESET
+0X12 G24_OTA_SM_TX_RESET_OK
+
+)
+
+(
+0 MULTI_LED_ON
+1 MULTI_LED_BLINK
+)
+
+(
+0 LED_MULTI_DPI
+1 LED_MULTI_LOW
+)
+
Index: mouse_public_3mode_usb/format/app_remote_car.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_remote_car.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_remote_car.format	(working copy)
@@ -0,0 +1,159 @@
+
+xmemalloc g24_tx_remote(
+1 mem_remote_car_hard_soft_switch
+
+1 mem_remote_car_queue_each_size
+1 mem_remote_car_queue_length
+
+1 mem_remote_car_queue_curr_num
+1 mem_remote_car_queue_read_ptr
+1 mem_remote_car_queue_write_ptr
+90 mem_remote_car_queue_ele
+
+1 mem_remote_style_led_type
+1 mem_remote_style_blink_count
+1 mem_remote_style_struct_led_gpio
+2 mem_remote_style_on_time
+2 mem_remote_style_off_time
+2 mem_remote_style_cb_ledon
+2 mem_remote_style_cb_ledoff
+
+
+1 mem_remote_car_led_num
+8 mem_remote_car_led_map
+
+0 mem_remote_car_keyscan
+1 mem_remote_car_key_num
+2 mem_cb_remote_car_keyscan
+
+0 mem_remote_car_key_conf0
+1 mem_remote_car_key_conf0_pin
+0 mem_remote_car_key_conf1
+1 mem_remote_car_key_conf1_pin
+0 mem_remote_car_key_conf2
+1 mem_remote_car_key_conf2_pin
+0 mem_remote_car_key_conf3
+1 mem_remote_car_key_conf3_pin
+0 mem_remote_car_key_conf4
+1 mem_remote_car_key_conf4_pin
+0 mem_remote_car_key_conf5
+1 mem_remote_car_key_conf5_pin
+0 mem_remote_car_key_conf6
+1 mem_remote_car_key_conf6_pin
+
+
+//rocker
+1 mem_rocker_negative_flag
+1 mem_rocker_work_status
+2 mem_current_vdd_value_default_mid_x
+2 mem_current_vdd_value_default_mid_y
+2 mem_current_vdd_value_default_mid_temp
+2 mem_current_vdd_default_range
+2 mem_rocker_last_status
+0 mem_rocker_status
+1 mem_rocker_x_status
+1 mem_rocker_y_status
+
+0 mem_remote_car_config_param
+1 mem_remote_car_config_setting_flag
+1 mem_remote_car_config_key_map
+1 mem_remote_car_config_layout
+1 mem_remote_car_config_connect_led_gpio
+1 mem_remote_car_config_check_way
+1 mem_remote_car_config_soft_switch_enable
+1 mem_remote_car_config_soft_switch_gpio
+1 mem_remote_car_config_timeout_shutdown_enable
+
+0 mem_remote_car_24g_motor_packet
+1 mem_remote_car_24g_motor_packet_lenght
+2 mem_remote_car_24g_motor_send_packet_head
+1 mem_remote_car_24g_motor_send_cmd
+2 mem_remote_car_24g_motor_send_length
+0 mem_remote_car_24g_motor_send_payload
+2 mem_remote_car_24g_motor1_payload
+2 mem_remote_car_24g_motor2_payload
+2 mem_remote_car_24g_motor3_payload
+1 mem_remote_car_24g_motor_send_checksum
+
+0 mem_remote_car_24g_fire_packet
+1 mem_remote_car_24g_fire_packet_lenght
+2 mem_remote_car_24g_fire_send_packet_head
+1 mem_remote_car_24g_fire_send_cmd
+2 mem_remote_car_24g_fire_send_length
+2 mem_remote_car_24g_fire_send_payload
+1 mem_remote_car_24g_fire_send_checksum
+
+15 mem_remote_car_24g_tx_temp
+
+2 mem_remote_car_no_data_timeout
+2 mem_remote_car_no_data_timer
+
+0 mem_remote_car_soft_power
+1 mem_remote_car_power_state
+1 mem_remote_car_power_timer
+1 mem_remote_car_power_off_timeout
+1 mem_remote_car_power_starting_timeout
+2 mem_remote_car_power_off_cb
+2 mem_remote_car_power_starting_cb
+2 mem_remote_car_power_standby_cb
+
+1 mem_remote_key_status
+1 mem_remote_car_24g_status
+
+1 mem_remote_car_24g_auto_work_step
+1 mem_remote_car_24g_pair_success_flag
+1 mem_remote_car_empty_packet
+
+1 mem_remote_car_motor1_key0_press_state
+1 mem_remote_car_motor1_key1_press_state
+1 mem_remote_car_motor2_key2_press_state
+1 mem_remote_car_motor2_key3_press_state
+1 mem_remote_car_motor1_rel_state
+1 mem_remote_car_motor2_rel_state
+
+1 mem_remote_car_no_data_check
+)
+
+
+(
+// eeprom config
+0xb0 REMOTE_PARAM_EEPROM_CONFIG_ADDR
+//eeprom address offect
+0X00 REMOTE_INFO_EEPROM_OFFECT
+
+)
+
+
+(
+0x00 CONTROL_F_B_MOTOR
+0x02 CONTROL_L_R_MOTOR
+)
+
+(
+0x00 KEY_MAP_TEN
+0x01 KEY_MAP_LR
+)
+
+(
+0x00 CONTROL_F_B_TEN
+0x02 CONTROL_L_R_TEN
+0x03 CONTROL_L_R_LR
+)
+
+(
+0 KEY_CHECK
+1 ROCKER_CHECK
+)
+
+(
+1 MOTOR_POSITIVE
+2 MOTOR_NEGATIVE
+)
+
+(
+0 ROCKER_MIDDLE_KEY
+1 ROCKER_POSITIVE_KEY
+2 ROCKER_NEGATIVE_KEY
+)
+
+
Index: mouse_public_3mode_usb/format/app_shutter.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_shutter.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/app_shutter.format	(working copy)
@@ -0,0 +1,248 @@
+
+
+xmemalloc shutter(
+
+////////////////////////////////////
+//shutter common config
+1 mem_shutter_bluetooth_type
+////////////////////////////////////
+
+2 mem_shutter_config_eeprom_offset_addr
+
+////////
+2 mem_shutter_config_eeprom_start_flag
+1 mem_shutter_config_user_size
+///////
+1 mem_shutter_config_label
+2 mem_shutter_config_otp_addr
+///////////////////////////////////
+
+////////////////////////////////////
+//classic shutter config
+1 mem_classic_shutter_cable_unplug_conut
+1 mem_classic_shutter_hid_disconn_count
+2 mem_classic_shutter_random_mac_offset_addr
+////////////////////////////////////
+
+////////////////////////////////////
+//ble shutter config
+1 mem_ble_shutter_enable_notify
+2 mem_ble_shutter_reconn_adv_interval
+2 mem_ble_shutter_discovery_adv_interval
+2 mem_ble_shutter_reconn_timeout
+2 mem_ble_shutter_reconn_timer
+2 mem_ble_shutter_reconn_blink_on_time
+2 mem_ble_shutter_reconn_blink_off_time
+2 mem_ble_shutter_discovery_blink_on_time
+2 mem_ble_shutter_discovery_blink_off_time
+
+2 mem_ble_shutter_interval_min
+2 mem_ble_shutter_interval_max
+2 mem_ble_shutter_latency
+2 mem_ble_shutter_timeout
+
+2 mem_ble_shutter_interval_min_new
+2 mem_ble_shutter_interval_max_new
+2 mem_ble_shutter_latency_new
+2 mem_ble_shutter_timeout_new
+
+//////////////////shutter sleep timeout//////////////////
+2 mem_classic_shutter_discovery_timeout
+2 mem_classic_shutter_connect_timeout
+2 mem_ble_shutter_discovery_timeout
+2 mem_ble_shutter_connect_timeout
+2 mem_shutter_sleep_timeout
+2 mem_shutter_sleep_timer
+
+/////////////////////////////////////////////////////////////////
+1 mem_shutter_hard_soft_switch_case
+1 mem_shutter_soft_switch_button_gpio
+1 mem_shutter_soft_switch_power_state
+1 mem_shutter_soft_switch_poweron_time
+1 mem_shutter_soft_switch_poweroff_time
+2 mem_shutter_soft_switch_poweron_callback_function
+2 mem_shutter_soft_switch_poweroff_callback_function
+
+
+0 mem_shutter_keyscan
+1 mem_shutter_key_num
+2 mem_cb_shutter_keycan
+1 mem_shutter_key_conf0
+1 mem_shutter_key_conf1
+1 mem_shutter_key_conf2
+1 mem_shutter_key_conf3
+1 mem_shutter_key_conf4
+1 mem_shutter_key_conf5
+1 mem_shutter_key_conf6
+1 mem_shutter_key_conf7
+
+
+5 mem_key0_press
+5 mem_key1_press
+5 mem_key2_press
+5 mem_key3_press
+5 mem_key4_press
+5 mem_key5_press
+5 mem_key6_press
+5 mem_key7_press
+
+5 mem_key0_release	
+5 mem_key1_release
+5 mem_key2_release
+5 mem_key3_release
+5 mem_key4_release
+5 mem_key5_release
+5 mem_key6_release
+5 mem_key7_release
+
+5 mem_ble_data_buffer1
+5 mem_ble_data_buffer2
+5 mem_ble_data_buffer3
+5 mem_ble_data_buffer4
+5 mem_ble_data_buffer5
+5 mem_ble_data_buffer6
+5 mem_ble_data_buffer7
+5 mem_ble_data_buffer8
+50 mem_ble_data_buffer9_58
+
+5 mem_classic_data_buffer
+
+5 mem_classic_data_buffer1
+5 mem_classic_data_buffer2
+5 mem_classic_data_buffer3
+5 mem_classic_data_buffer4
+5 mem_classic_data_buffer5
+5 mem_classic_data_buffer6
+5 mem_classic_data_buffer7
+5 mem_classic_data_buffer8
+50 mem_classic_data_buffer9_58
+
+1 mem_queue_each_size
+1 mem_queue_length
+1 mem_queue_curr_num
+1 mem_queue_read_ptr
+1 mem_queue_write_ptr
+32 mem_queue_ele
+
+
+170 mem_shutter_nv_data
+
+0 mem_shutter_led_struct_app_led
+1 mem_shutter_led_struct_app_led_type
+1 mem_shutter_led_struct_app_led_blink_count
+1 mem_shutter_led_struct_app_led_gpio
+2 mem_shutter_led_struct_app_led_on_time
+2 mem_shutter_led_struct_app_led_off_time
+2 mem_shutter_led_struct_app_led_on_callback
+2 mem_shutter_led_struct_app_led_off_callback
+
+0 mem_shutter_power_off_led_style
+1 mem_shutter_power_off_led_style_type
+1 mem_shutter_power_off_led_style_blink_count
+1 mem_shutter_power_off_led_style_gpio
+2 mem_shutter_power_off_led_style_on_time
+2 mem_shutter_power_off_led_style_off_time
+2 mem_shutter_power_off_led_style_on_callback
+2 mem_shutter_power_off_led_style_off_callback
+
+1 mem_shutter_soft_swtich_botton_down
+11 mem_shutter_soft_swtich_led_struct_temp
+1 mem_shutter_power_off_timeout
+1 mem_shutter_power_off_timer
+
+//continue address
+2 mem_shutter_key_conf0_temp
+1 mem_shutter_led_struct_app_led_gpio_temp
+1 mem_shutter_hard_soft_switch_case_temp
+1 mem_shutter_soft_switch_button_gpio_temp
+//modified name
+1 mem_shutter_le_name_len
+30 mem_shutter_le_name
+
+)
+
+
+
+
+(
+0 BLE_SHUTTER
+1 CLASSIC_SHUTTER
+)
+
+(
+0x0000 NVRAM_EEPROM_OFFSET
+)
+
+(
+0x1b3a SHUTTER_EEPROM_CONFIG_CRC
+)
+
+(
+5 MAX_QUEUE_NUM
+5 SHUTTER_BLE_DATA_BUFFER
+5 SHUTTER_CLASSIC_DATA_BUFFER
+)
+
+
+(
+0x13	GATT_CONSUMER_NOTIFY_HANDLE
+0x14	GATT_CONSUMER_WRITE_HANDLE
+0x17	GATT_KEYBOARD_NOTIFY_HANDLE
+0x18	GATT_KEYBOARD_WRITE_HANDLE
+)
+
+(
+//20ms
+0x0020	FAST_ADV_INTERVAL_VALUE
+//100ms
+0x00a0	SLOW_ADV_INTERVAL_VALUE
+)
+
+
+(
+0 ATT_BIT_NOTIFICATION
+1 ATT_BIT_INDICATION
+)
+///////////////////////////////////////////////////////////////////////////////////////
+
+(
+0 HARD_SWITCH
+1 SOFT_SWITCH
+)
+
+
+(
+1  FLAG_SHUTTER_HID_DISCONN_TIMEOUT
+5 FLAG_SHUTTER_CABLE_UNPLUG_TIMEOUT
+)
+
+(//Data Rom Buffer Addr
+382		BLE_GATT_LIST_SIZE
+487		BT_SDP_LIST_SIZE
+40		BLE_KEY_VALUE_LIST_SIZE
+40		BT_KEY_VALUE_LIST_SIZE
+)
+
+
+(//soft switch power state
+0		SS_STATE_POWER_UP
+1		SS_STATE_POWER_ON
+2		SS_STATE_POWER_OFF
+)
+
+(
+0		SS_POWER_STATE_OFFSET
+1		SS_POWER_ON_TIME
+2		SS_POWER_OFF_TIME
+3		SS_POWER_ON_CB
+5		SS_POWER_OFF_CB
+
+)
+
+(
+
+0x4FFE SIM_IIC_SCL_GPIO_NUM
+0x4FFF SIM_IIC_SDA_GPIO_NUM
+
+)
+
Index: mouse_public_3mode_usb/format/ble_protocol_stack/le.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le.format	(working copy)
@@ -0,0 +1,437 @@
+
+memalloc(
+260 mem_le_rxbuf
+
+/* security temp */
+4 mem_le_mic
+4 mem_le_peer_mic
+//8 mem_le_skdm
+//8 mem_le_skds
+16 mem_le_mrand
+
+
+/* ========= le context =========== */
+1 mem_le_state
+1 mem_le_mode
+2 mem_le_tsniff
+4 mem_le_anchor
+6 mem_le_clk_offset
+2 mem_le_receive_window
+6 mem_le_plap
+1 mem_le_conn_handle
+1 mem_le_arq
+1 mem_le_ch
+1 mem_le_hop
+2 mem_le_event_count
+4 mem_le_supervision_timer
+2 mem_le_instant
+1 mem_le_channels
+1 mem_le_op
+
+	/* these 3 should NOT be seperated */
+4 mem_le_access
+3 mem_le_crcinit
+1 mem_le_window_size
+
+	/* these 3 should NOT be seperated */
+2 mem_le_slave_latency
+2 mem_le_superto
+5 mem_le_channel_map
+
+
+1 mem_le_rx_phy
+1 mem_le_tx_phy
+
+9 mem_le_update_new_param
+
+16 mem_le_sk
+
+1 mem_le_peer_sca
+1 mem_le_err_code
+1 mem_le_ll_pairing_fail_reason
+
+5 mem_le_context_reserve
+/* ========= le context ending =========== */
+
+/* test */
+1 mem_le_testtype
+1 mem_cmd_le_create_conn
+
+)
+
+amemalloc mem_le_update_new_param(
+//update connection parameter
+	0 mem_le_new_param
+	1 mem_le_new_transmitwindowsize
+	2 mem_le_new_transmitwindowoffset
+	2 mem_le_new_conninterval
+	2 mem_le_new_connslavelatency
+	2 mem_le_new_connsupervisiontimeout
+)
+
+amemalloc mem_le_update_new_param(
+//update map parameter
+	5 mem_le_new_map
+)
+
+amemalloc mem_le_update_new_param(
+//update phy parameter
+	1 mem_le_new_m2s_phy
+	1 mem_le_new_s2m_phy
+)
+
+amemalloc mem_le_rxbuf(
+//data channel PDU
+	1 mem_le_rxbuf_data_header
+	1 mem_le_rxbuf_data_length
+	255 mem_le_rxbuf_data_payload
+)
+
+amemalloc mem_le_rxbuf(
+//data channel LL control PDU
+	1 mem_le_rxbuf_data_ll_header
+	1 mem_le_rxbuf_data_ll_length
+	1 mem_le_rxbuf_data_ll_opcode
+	26 mem_le_rxbuf_data_ll_control_data
+)
+
+xmemalloc(
+2 mem_le_dsniff
+
+2 mem_le_conn_interval
+
+1 mem_le_txheader
+1 mem_le_txlen
+256 mem_le_txpayload
+
+//modified name
+1 mem_le_name_len
+30 mem_le_name
+
+
+/* smp related */
+
+16 mem_le_ltk
+1 mem_ltk_exists
+16 mem_le_rconfirm
+16 mem_le_srand
+1 mem_le_iat
+1 mem_le_rat
+1 mem_le_preq
+1 mem_le_preq_iocap
+1 mem_le_preq_oob
+1 mem_le_preq_auth
+1 mem_le_preq_max_keysize
+1 mem_le_preq_init_key_distribution
+1 mem_le_preq_resp_key_distribution
+1 mem_le_pres
+1 mem_le_pres_iocap
+1 mem_le_pres_oob
+1 mem_le_pres_auth
+1 mem_le_pres_max_keysize
+1 mem_le_pres_init_key_distribution
+1 mem_le_pres_resp_key_distribution
+
+/* att related */
+
+2 mem_le_notify_handle
+1 mem_le_search_uuid_length
+16 mem_le_search_uuid
+
+
+
+//START of LE conn parameter structure
+0 mem_le_conn_param
+1 mem_le_conn_peer_addr_type
+6 mem_le_conn_peer_addr
+1 mem_le_conn_own_addr_type
+2 mem_le_interval_min
+2 mem_le_interval_max
+2 mem_le_latency
+2 mem_le_timeout
+//START of LE conn parameter structure
+
+
+3 mem_le_lap
+1 mem_le_uap
+2 mem_le_nap
+
+
+2 mem_le_local_mtu
+2 mem_le_remote_mtu
+
+8 mem_le_skdm
+8 mem_le_skds
+
+2 mem_le_init_superto
+2 mem_ui_le_uuid_table
+
+1 mem_le_secure_connect_flag
+1 mem_le_secure_connect_state
+1 mem_le_sc_confirm_gkey_flag
+
+
+1 mem_le_pairing_state
+1 mem_le_enc_state
+1 mem_le_pairing_mode
+4 mem_le_tk
+2 mem_le_ediv
+8 mem_le_rand
+16 mem_le_irk
+
+//LE attribute list
+4 mem_le_transmit_window
+
+//ble General configuration 
+1 mem_le_configuration
+16 mem_le_fixed_ltk
+2 mem_le_pairing_handle
+
+
+1 mem_le_packet_llid
+
+//for continue
+2 mem_le_l2cap_size
+2 mem_le_packet_len_recved
+2 mem_le_payload_ptr
+
+
+//ble gatt signaling
+1 mem_le_signaling_identifier
+2 mem_le_l2cap_signaling_conn_param_update_rsp_result
+
+1 mem_le_md_count
+
+2 mem_ble_l2cap_tx_buff0_ptr
+2 mem_ble_l2cap_tx_buff_size_ptr
+)
+
+(//mem_le_T_IFS
+150 PARAM_T_IFS_150US
+20000 PARAM_20MS_INIT
+-13 PARAM_SYNC_TIME_DIFFERENCE
+40 PARAM_CODED_C1_TERM1_TIME_40US
+1666 PARAM_WINDOWN_SIZE
+//T_IFS = 150-modem(CRC time)
+)
+
+
+(
+0 DEFAULT_STATES
+1 IPHONE_LOST_LTK
+2 MODULE_LOST_LTK
+3 LTK_NOT_LOST
+)
+
+	//BLE ErrorCodes
+	(    
+	0x01 ERROR_UNKNOWN_HCI_COMMAND
+	0x02 ERROR_NO_CONNECTION
+	0x03 ERROR_HARDWARE_FAILURE
+	0x04 ERROR_PAGE_TIMEOUT
+	0x05 ERROR_AUTHENTICATION_FAILURE
+	0x06 ERROR_KEY_MISSING
+	0x07 ERROR_MEMORY_FULL
+	0x08 ERROR_CONNECTION_TIMEOUT
+	0x09 ERROR_MAX_CONNECTIONS
+	0x0A ERROR_MAX_SCO_CONNECTIONS
+	0x0B ERROR_MAX_ACL_CONNECTIONS
+	0x0C ERROR_COMMAND_DISALLOWED
+	0x0D ERROR_HOST_REJECT_LIMITED_RESOURCES
+	0x0E ERROR_HOST_REJECT_SECURITY_REASONS
+	0x0F ERROR_HOST_REJECT_REMOTE_IS_ONLY_PERSONAL
+	0x10 ERROR_HOST_TIMEOUT
+	0x11 ERROR_UNSUPPORTED_FEATURE_OR_PARAMETER_VALUE
+	0x12 ERROR_INVALID_HCI_COMMAND_PARAMETERS
+	0x13 ERROR_REMOTE_USER_TERMINATED_CONNECTION
+	0x14 ERROR_REMOTE_LOW_RESOURCES
+	0x15 ERROR_REMOTE_POWERING_OFF
+	0x16 ERROR_CONNECTION_TERMINATED_BY_LOCAL_HOST
+	0x17 ERROR_REPEATED_ATTEMPTS
+	0x18 ERROR_PAIRING_NOT_ALLOWED
+	0x19 ERROR_UNKNOWN_LMP_PDU
+	0x1A ERROR_UNSUPPORTED_REMOTE_FEATURE
+	0x1B ERROR_SCO_OFFSET_REJECTED
+	0x1C ERROR_SCO_INTERVAL_REJECTED
+	0x1D ERROR_SCO_AIR_MODE_REJECTED
+	0x1E ERROR_INVALID_LMP_PARAMETER
+	0x1F ERROR_UNSPECIFIED_ERROR
+	0x20 ERROR_UNSUPPORTED_LMP_PARAMETER_VALUE
+	0x21 ERROR_ROLE_CHANGE_NOT_ALLOWD
+	0x22 ERROR_LMP_RESPONSE_TIMEOUT
+	0x23 ERROR_ERROR_TRANSACTION_COLLISION
+	0x24 ERROR_LMP_PDU_NOT_ALLOWED
+	0x25 ERROR_ENCRYPTION_MODE_NOT_ACCEPTABLE
+	0x26 ERROR_UNIT_KEY_USED
+	0x27 ERROR_QOS_NOT_SUPPORTED
+	0x28 ERROR_INSTANT_PASSED
+	0x29 ERROR_PAIRING_W_UNIT_KEY_NOT_SUPPORTED
+	0x2a ERROR_DIFFERENT_TRANSACTION_COLLISION
+	0x2c ERROR_QOS_UNACCEPTABLE_PARAMETER
+	0x2d ERROR_QOS_REJECTED
+	0x2e ERROR_CHANNEL_CLASSIFICATION_NOT_SUPPORTED
+	0x2f ERROR_INSUFFICIENT_SECURITY
+	0x30 ERROR_PARAMETER_OUT_OF_MANDATORY_PANGE
+	0x32 ERROR_ROLE_SWITCH_PENDING
+	0x34 ERROR_RESERVED_SLOT_VIOLATION
+	0x35 ERROR_ROLE_SWITCH_FAILED
+	0x36 ERROR_EXTENDED_INQUIRY_RESPONSE_TOO_LARGE
+	0x37 ERROR_SIMPLE_PAIRING_NOT_SUPPORTED_BY_HOST
+	0x38 ERROR_HOST_BUSY_PAIRING
+	0x3d ERROR_MIC_FAILURE
+	)
+
+
+	//modified_name
+	(
+	0X20 SPACE	
+	)
+	/* LE L2CAP CID */
+	(
+	0x0004 LE_L2CAP_CID_ATT
+	0x0005 LE_L2CAP_CID_SIGNAL
+	0x0006 LE_L2CAP_CID_SMP
+	)
+
+	//LE address type
+	(
+	0 LE_ADDR_TYPE_PUBLIC
+	1 LE_ADDR_TYPE_RANDOM
+	)
+	//LE address type bitmap
+	(
+	7 LE_RECEIVER_ADDR_BIT
+	6 LE_SENDER_ADDR_BIT
+	)
+	//LE SCAN TYPE
+	(
+	0x00 LE_SCAN_TYPE_PASSIVE //no SCAN_REQ shall be sent
+	0x01 LE_SCAN_TYPE_ACTIVE
+	)
+
+	//LE SCAN ENABLE
+	(
+	0x00 LE_SCAN_DISABLE
+	0x01 LE_SCAN_ENABLE
+	0x0101 LE_ACTIVE_SCAN_ENABLE
+	)
+
+	//LE FIND INFORMATION RESPONSE
+	//THE FORMAT OF THE INFORMATION DATA
+	(
+	0x01 UUID_SIZE_16BIT
+	0x02 UUID_SIZE_128BIT
+	)
+
+//	le_state_map 0-2 is reserved for state_inconn,state_insniff and state_sco
+(
+3 lestate_got_first_packet
+4 lestate_encryption
+5 lestate_update_param
+6 lestate_update_map
+7 lestate_update_phy
+)
+
+// 	le mode
+(
+0 lemode_idle
+1 lemode_slave
+3 lemode_master
+0x20 lemode_2m
+0x40 lemode_lr_s2
+0xc0 lemode_lr_s8
+)
+
+(
+0 llid0
+1 llid1
+2 nesn
+3 sn
+4 md
+5 wak
+6 txdat
+)
+
+(
+0x01 LLID_CONTINUE
+0x02 LLID_START
+0x03 LLID_LE_LL
+0x01 LLID_EMPTY
+)
+
+(
+4 LE_TX_BUFF_COUNT
+3 LE_TX_BUFF_UPDATE_LOOPCNT //LE_TX_BUFF_COUNT-1
+
+12 LE_MD_MAX_COUNT
+)
+
+
+(
+0 LE_INITATOR_LTK_BIT
+1 LE_INITATOR_IRK_BIT
+2 LE_INITATOR_CSRK_BIT
+)
+
+
+
+
+
+(
+0  LE_FIND_BY_TYPE_VAL_RES_NOT_FOUND
+1  LE_FIND_BY_TYPE_VAL_RES_FOUND_STARTING_HANDLE
+2  LE_FIND_BY_TYPE_VAL_RES_FOUND_ENDING_HANDLE
+
+)
+
+(
+0 MASTER_PUBLIC_ADDR
+1 MASTER_RANDOM_ADDR
+)
+
+(
+0x06 LE_ERR_PIN_OR_KEY_MISSING
+)
+
+(
+39 LE_CCM_DIRECTIONBIT
+)
+(
+36 BR_CCM_0_LENGTH_CONTINUATION
+37 BR_CCM_DIRECTIONBIT
+)
+
+(
+96000 TIMER_SMP_PAIRING_TIMEOUT //30S
+)
+
+
+
+//mem_le_enc_state
+(
+0 FLAG_LE_ENC_NULL
+1 FLAG_LE_RCV_ENC_START
+2 FLAG_LE_ENC_PAUSE
+3 FLAG_LE_RCV_START_ENC_RSP
+4 FLAG_LE_SEND_START_ENC_RSP
+5 FLAG_LE_SEND_START_ENC_REQ
+0xff FLAG_LE_ENC_END
+)
+
+(//mem_le_configuration
+//bit0:use fixed key , ble passkey pairing
+0 BIT_BLE_PASSKEY_FIXED_KEY
+//bit1:ble pairing use fixed long term key
+1 BIT_BLE_PAIRING_FIXED_LTK
+//bit2:ble transmit packet will set more data flag
+2 BIT_BLE_TRANSMIT_PACKET_BY_MD
+//bit3:master read handle, with requires an authenticated link
+3 BIT_BLE_READ_AUTH
+//bit4:master write handle, with requires an authenticated link
+4 BIT_BLE_WRITE_AUTH
+//bit5:cannot enter long sleep
+5 BIT_BLE_SHORT_MULT
+//bit6:DEAL baseband packet
+6 BIT_BLE_DEAL_BB_PACKET
+)
+
Index: mouse_public_3mode_usb/format/ble_protocol_stack/le_advertising.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_advertising.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_advertising.format	(working copy)
@@ -0,0 +1,104 @@
+
+xmemalloc(
+// parameters
+1 mem_le_scan_enable
+2 mem_le_scan_interval
+2 mem_le_scan_window
+
+
+1 mem_le_adv_data_len
+31 mem_le_adv_data
+1 mem_le_scan_data_len
+31 mem_le_scan_data
+
+//START of LE adv parameter structure
+1 mem_le_adv_enable
+0 mem_le_adv_param
+2 mem_le_adv_interval
+1 mem_le_adv_type
+1 mem_le_adv_own_addr_type
+6 mem_le_adv_direct_addr
+1 mem_le_adv_channel_map
+//END of LE adv parameter structure
+
+//START of LE scan parameter structure
+0 mem_le_scan_params
+1 mem_le_scan_type
+1 mem_le_scan_own_addr_type
+//END of LE scan parameter structure
+)
+
+amemalloc mem_le_rxbuf(
+//advertising channel PDU
+	1 mem_le_rxbuf_adv_header
+	1 mem_le_rxbuf_adv_length
+	255 mem_le_rxbuf_adv_payload
+)
+
+amemalloc mem_le_rxbuf(
+//advertising channel PDU
+//Scan Req
+	1 mem_le_rxbuf_adv_scan_req_header
+	1 mem_le_rxbuf_adv_scan_req_length
+	6 mem_le_rxbuf_adv_scan_req_scan_address
+	6 mem_le_rxbuf_adv_scan_req_adv_address
+)
+
+amemalloc mem_le_rxbuf(
+//advertising channel PDU
+//Connect IND
+	1 mem_le_rxbuf_adv_connect_ind_header
+	1 mem_le_rxbuf_adv_connect_ind_length
+	6 mem_le_rxbuf_adv_connect_ind_init_address
+	6 mem_le_rxbuf_adv_connect_ind_adv_address
+	4 mem_le_rxbuf_adv_connect_ind_access_address
+	3 mem_le_rxbuf_adv_connect_ind_crc_init
+	1 mem_le_rxbuf_adv_connect_ind_win_size
+	2 mem_le_rxbuf_adv_connect_ind_win_offset
+	2 mem_le_rxbuf_adv_connect_ind_interval
+	2 mem_le_rxbuf_adv_connect_ind_latency
+	2 mem_le_rxbuf_adv_connect_ind_timeout
+	5 mem_le_rxbuf_adv_connect_ind_channel_map
+	1 mem_le_rxbuf_adv_connect_ind_hop_and_sca
+)
+
+(
+0x01	GAP_ADTYPE_FLAGS
+0x02	GAP_ADTYPE_16BIT_MORE
+0x03	GAP_ADTYPE_16BIT_COMPLETE
+0x04	GAP_ADTYPE_32BIT_MORE
+0x05	GAP_ADTYPE_32BIT_COMPLETE
+0x06	GAP_ADTYPE_128BIT_MORE
+0x07	GAP_ADTYPE_128BIT_COMPLETE
+0x08	GAP_ADTYPE_LOCAL_NAME_SHORT
+0x09	GAP_ADTYPE_LOCAL_NAME_COMPLETE
+0x0a	GAP_ADTYPE_POWER_LEVEL
+0x16	GAP_ADTYPE_SERVICE_DATA
+0x2a	GAP_ADTYPE_MESH_MESSAGE
+0x2b 	GAP_ADTYPE_MESH_BEACON
+0xff	GAP_ADTYPE_MANUFACTURER_SPECIFIC
+)
+
+/* advertising channel PDU type */
+(
+0 ADV_IND
+1 ADV_DIRECT_IND
+2 ADV_NONCONN_IND
+3 SCAN_REQ
+3 AUX_SCAN_REQ
+4 SCAN_RSP
+5 CONNECT_REQ
+5 AUX_CONNECT_REQ
+6 ADV_SCAN_IND
+)
+
+(
+0 BIT_ADV_CHANNEL_MAP_37
+1 BIT_ADV_CHANNEL_MAP_38
+2 BIT_ADV_CHANNEL_MAP_39
+)
+
+(
+0xa0 param_le_sca
+)
+
Index: mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_att.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_att.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_att.format	(working copy)
@@ -0,0 +1,194 @@
+
+xmemalloc(
+	1 mem_le_l2cap_att_states
+
+	/* should be together */
+	1 mem_le_att_opcode
+	2 mem_le_att_handle
+	1 mem_le_search_res
+
+)
+
+amemalloc mem_temp_block2(
+	2 mem_le_search_handle_start
+	2 mem_le_search_handle_end
+	0 mem_le_att_offset
+	1 mem_le_search_att_type_length
+	16 mem_le_search_att_type
+
+	1 mem_le_curr_att_len
+
+	2 mem_le_cur_attlist_start_ptr
+	2 mem_le_cur_handle_start
+	2 mem_le_cur_handle_end
+	1 mem_le_cur_uuid_length
+	16 mem_le_cur_uuid
+)
+
+
+amemalloc mem_le_rxbuf(
+//data channel ATT start PDU
+	1 mem_le_rxbuf_data_att_header
+	1 mem_le_rxbuf_data_att_length
+	2 mem_le_rxbuf_data_att_l2cap_length
+	2 mem_le_rxbuf_data_att_cid
+	1 mem_le_rxbuf_data_att_opcode
+	250 mem_le_rxbuf_data_att_payload
+)
+
+
+amemalloc mem_le_rxbuf(
+//data channel ATT continue PDU
+	1 mem_le_rxbuf_data_continue_header
+	1 mem_le_rxbuf_data_continue_length
+	255 mem_le_rxbuf_data_continue_payload
+)
+
+amemalloc mem_le_rxbuf(
+//data channel ATT write request PDU
+	1 mem_le_rxbuf_data_att_write_header
+	1 mem_le_rxbuf_data_att_write_length
+	2 mem_le_rxbuf_data_att_write_l2cap_length
+	2 mem_le_rxbuf_data_att_write_cid
+	1 mem_le_rxbuf_data_att_write_opcode
+	2 mem_le_rxbuf_data_att_write_handle
+	248 mem_le_rxbuf_data_att_write_payload
+)
+
+amemalloc mem_le_rxbuf(
+//data channel ATT prepare write request PDU
+	1 mem_le_rxbuf_data_prepare_att_write_header
+	1 mem_le_rxbuf_data_prepare_att_write_length
+	2 mem_le_rxbuf_data_prepare_att_write_l2cap_length
+	2 mem_le_rxbuf_data_prepare_att_write_cid
+	1 mem_le_rxbuf_data_prepare_att_write_opcode
+	2 mem_le_rxbuf_data_prepare_att_write_handle
+	2 mem_le_rxbuf_data_prepare_att_write_offset
+	246 mem_le_rxbuf_data_prepare_att_write_payload
+)
+
+(//bit of mem_le_l2cap_att_states
+0 BLE_L2CAP_SEND_INDICATION_PACKET
+0 BLE_L2CAP_RECV_CONFIRMATION_PACKET
+1 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET
+)
+
+(//bit map of att handle
+14 BIT_OF_ATT_HANDLE_READ_AUTHENTICATED
+15 BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED
+)
+
+
+
+(
+0 BIT_CHARACTERISTIC_BROADCAST
+1 BIT_CHARACTERISTIC_READ
+2 BIT_CHARACTERISTIC_WRITE_WITHOUT_RESPONSE
+3 BIT_CHARACTERISTIC_WRITE
+4 BIT_CHARACTERISTIC_NOTIFY
+5 BIT_CHARACTERISTIC_INDICATE
+6 BIT_CHARACTERISTIC_SIGNED_WRITE
+7 BIT_CHARACTERISTIC_EXTENDED_PROPERTIES
+)
+
+/* ATT OPCODE */
+(
+0x01 ATTOP_ERROR_RESPONSE
+0x02 ATTOP_EXCHANGE_MTU_REQUEST
+0x03 ATTOP_EXCHANGE_MTU_RESPONSE
+0x04 ATTOP_FIND_INFORMATION_REQUEST
+0x05 ATTOP_FIND_INFORMATION_RESPONSE
+0x06 ATTOP_FIND_BY_TYPE_VALUE_REQUEST
+0x07 ATTOP_FIND_BY_TYPE_VALUE_RESPONSE
+0x08 ATTOP_READ_BY_TYPE_REQUEST
+0x09 ATTOP_READ_BY_TYPE_RESPONSE
+0x0A ATTOP_READ_REQUEST
+0x0B ATTOP_READ_RESPONSE
+0x0C ATTOP_READ_BLOB_REQUEST
+0x0D ATTOP_READ_BLOB_RESPONSE
+0x0E ATTOP_READ_MULTIPLE_REQUEST
+0x0F ATTOP_READ_MULTIPLE_RESPONSE
+0x10 ATTOP_READ_BY_GROUP_TYPE_REQUEST
+0x11 ATTOP_READ_BY_GROUP_TYPE_RESPONSE
+0x12 ATTOP_WRITE_REQUEST
+0x13 ATTOP_WRITE_RESPONSE
+0x16 ATTOP_PREPARE_WRITE_REQUEST
+0x17 ATTOP_PREPARE_WRITE_RESPONSE
+0x18 ATTOP_EXECUTE_WRITE_REQUEST
+0x19 ATTOP_EXECUTE_WRITE_RESPONSE
+0x1B ATTOP_HANDLE_VALUE_NOTIFICATION
+0x1D ATTOP_HANDLE_VALUE_INDICATION
+0x1E ATTOP_HANDLE_VALUE_CONFIRMATION
+0x52 ATTOP_WRITE_COMMAND
+0xD2 ATTOP_SIGNED_WRITE_COMMAND
+0x1f ATTOP_CONTINUE
+0x9e EMPTY_LE_DATA_PRE
+0x9f EMPTY_LE_DATA
+)
+
+/* ATT error code */
+(
+0x01 ATT_ERR_INVALID_HANDLE
+0x02 ATT_ERR_READ_NOT_PERMITTED
+0x03 ATT_ERR_WRITE_NOT_PERMITTED
+0x04 ATT_ERR_INVALID_PDU
+0x05 ATT_ERR_INSUFFICIENT_AUTHENTICATION
+0x06 ATT_ERR_REQUEST_NOT_SUPPORTED
+0x07 ATT_ERR_INVALID_OFFSET
+0x08 ATT_ERR_INSUFFICIENT_AUTHORIZATION
+0x09 ATT_ERR_PREPARE_QUEUE_FULL
+0x0A ATT_ERR_ATTRIBUTE_NOT_FOUND
+0x0B ATT_ERR_ATTRIBUTE_NOT_LONG
+0x0C ATT_ERR_INSUFFICIENT_ENCRYPTION_KEY_SIZE
+0x0D ATT_ERR_INVALID_ATTRIBUTE_VALUE_LENGTH
+0x0E ATT_ERR_UNLIKELY_ERROR
+0x0F ATT_ERR_INSUFFICIENT_ENCRYPTION
+0x10 ATT_ERR_UNSUPPORTED_GROUP_TYPE
+0x11 ATT_ERR_INSUFFICIENT_RESOURCES
+)
+
+/* GATT Specifications*/
+(
+0X2900 CHARACTERTIC_EXTENDED_PROPERTIES
+0X2901 CHARACTERTIC_USER_DESCRIPTION
+0X2902 CLIENT_CHARACTERTIC_CONFIGURATION
+0X2903 SERVER_CHARACTERTIC_CONFIGURATION
+0X2904 CHARACTERTIC_PRESENTATION_FORMAT
+0X2905 CHARACTERTIC_AGGREGATE
+0X2906 VALID_RANGE
+0X2907 EXTERNAL_REPORT_REFERENCE
+0X2908 REPORT_REFERENCE
+0X290B ENVIR_SENSING_CONFIGURATION
+0X290C ENVIR_SENSING_MEASUREMENT
+0X290D ENVIR_SENSING_TRIGGER_SETTING
+)
+
+
+/*	SERVICE UUID	*/
+(
+0x1800 UUID_SERVICE_GENERIC_ACC
+0x1801 UUID_SERVICE_GENERIC_ATT
+0x180a UUID_SERVICE_DEVICE_INFO
+0x180f UUID_SERVICE_BATTERY
+0x1812 UUID_SERVICE_HIDS
+0x2800 UUID_GATT_PRIMARY_SERVICE
+0x2801 UUID_GATT_SECONDARY_SERVICE
+0X2802 UUID_GATT_INCLUDE
+0X2803 UUID_GATT_CHARACTERISTIC
+0X2A00 UUID_CHRCTR_DEVICE_NAME
+0X2A19 UUID_CHRCTR_BATTERY_LEVEL
+0X2A22 UUID_CHRCTR_KEYBOARD_INPUT
+0X2A23 UUID_CHRCTR_SYSTEM_ID 
+0X2A25 UUID_CHRCTR_SERIAL_NUMBER
+0X2A26 UUID_CHRCTR_FIRMWARE
+0X2A32 UUID_CHRCTR_KEYBOARD_OUTPUT
+0X2A33 UUID_CHRCTR_MOUSE_INPUT
+0X2A4A UUID_CHRCTR_HID_INFO
+0X2A4B UUID_CHRCTR_REPORT_MAP
+0X2A4C UUID_CHRCTR_HID_CTRL_POINT
+0X2A4D UUID_CHRCTR_REPORT
+0X2A4E UUID_CHRCTR_PROTOCOL_MODE
+)
+
+
+
Index: mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_att_wechat.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_att_wechat.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_att_wechat.format	(working copy)
@@ -0,0 +1,85 @@
+ifdef COMPILE_WECHAT
+
+amemalloc mem_temp_block2(
+	0 mem_wechat_initreq_base_request
+	2 mem_wechat_authreq_base_request
+	4 mem_wechat_authreq_protocol_version
+	2 mem_wechat_authreq_auth_protocol
+	2 mem_wechat_authreq_eam_mac_no_encrypt
+	2 mem_wechat_authreq_mac_address
+	6 mem_wechat_authreq_device_address
+
+	1 mem_wechat_indication_handle
+	1 mem_wechat_write_handle
+	2 mem_wechat_tx_buffer_ptr
+	2 mem_wechat_rx_buffer_ptr
+	2 mem_wechat_rx_push_data_cb
+	2 mem_wechat_tx_nSeq
+	2 mem_wechat_tx_len
+	2 mem_wechat_tx_address
+	2 mem_wechat_rx_len
+	2 mem_wechat_rx_address
+	1 mem_wechat_receive_push_data
+
+)
+
+xmemalloc(
+
+/*
+wechat Air sync protocol parse
+uint8_t indication handle
+uint8_t write handle
+
+*/
+2 mem_le_wechat_air_sync_ptr
+
+)
+
+(
+17 WECHAT_AIR_SYNC_STRUCT_SIZE
+)
+
+(
+0x0000 ECI_NONE
+0x1127 ECI_REQ_AUTH
+0x1227 ECI_REQ_SEND_DATA
+0x1327 ECI_REQ_INIT
+0x214E ECI_RESPONSE_AUTH
+0x224E ECI_RESPONSE_SEND_DATA
+0x234E ECI_RESPONSE_INIT
+0x3175 ECI_PUSH_RECEIVE_DATA
+0x3275 ECI_PUSH_SWITCH_VIEW
+0x3375 ECI_PUSH_SWITCH_BACKGROUD
+0x2F75 ECI_ERR_DECODE
+)
+
+(
+2 ECI_REQ_INIT_MESSAGE_LENGTH
+18 ECI_REQ_AUTH_MESSAGE_LENGTH
+)
+
+(
+0xFE WECHAT_HEAD_MAGIC_NUMBER
+0x01 WECAHT_HEAD_VERSION
+0x01FE WECHAT_RX_HEAD
+)
+
+(
+//push data
+0x0a 	TAG_RecvDataPush_BasePush
+0x12	TAG_RecvDataPush_Data
+0x18	TAG_RecvDataPush_Type
+)
+
+
+(
+0 WECHAT_PROTOCOL_MESSAGE_B_MAGIC_NUMBER
+1 WECHAT_PROTOCOL_MESSAGE_B_VER
+2 WECHAT_PROTOCOL_MESSAGE_N_LENGTH
+4 WECHAT_PROTOCOL_MESSAGE_N_CMD_ID
+6 WECHAT_PROTOCOL_MESSAGE_N_SEQ
+8 WECHAT_PROTOCOL_MESSAGE_PAYLOAD
+)
+
+endif
+
Index: mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_signalling.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_signalling.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_signalling.format	(working copy)
@@ -0,0 +1,14 @@
+
+/* L2CAP Signaling OPCODE */
+(
+0x12 L2CAP_CONNECTION_PARAMETER_UPDATE_REQUEST
+0x13 L2CAP_CONNECTION_PARAMETER_UPDATE_RESPONSE
+)
+
+(
+0x0000 BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
+0x0001 BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_REJECTED
+)
+
+
+
Index: mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_smp.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_smp.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_l2cap_smp.format	(working copy)
@@ -0,0 +1,113 @@
+
+
+(
+0x00 LE_PAIRING_MODE_NONE
+0x01 LE_PAIRING_MODE_LAGACY_JUSTWORK
+0x02 LE_PAIRING_MODE_LAGACY_PASSKEY
+0x04 LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT
+0x81 LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK
+0x82 LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC
+0x83 LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY
+0x84 LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT
+
+7 LE_PAIRING_MODE_SECURE_CONNECT_BIT
+)
+
+
+(
+0 FLAG_IOCAP_DISPLAYONLY
+1 FLAG_IOCAP_DISPLAYYESNO
+2 FLAG_IOCAP_KEYBOARDONLY
+3 FLAG_IOCAP_NOINPUTNOOUTPUT
+4 FLAG_IOCAP_KEYBOARDDISPLAY
+
+0x00 FLAG_OOB_DATA_FLAG_NO
+)
+
+(
+0x00 FLAG_LE_NO_BONDING_NO_MITM
+0x01 FLAG_LE_BONDING_NO_MITM
+0x04 FLAG_LE_NO_BONDING_MITM
+0x05 FLAG_LE_BONDING_MITM
+0x09 FLAG_LE_BONDING_NO_MITM_SECURE
+0x0D FLAG_LE_BONDING_MITM_SECURE
+
+2 LE_AUTH_MITM_BIT
+3 LE_AUTH_SECURE_CONNECTION_PAIRING_BIT
+)
+
+//mem_le_pairing_state
+(
+0 FLAG_LE_PAIRING_NULL
+1 FLAG_LE_PAIRING_START
+2 FLAG_LE_PAIRING_SEND_RECURITY_REQ
+3 FLAG_LE_PAIRING_RCV_PAIRING_REQ
+4 FLAG_LE_PAIRING_WAIT_STK_GENERATION
+5 FLAG_LE_PAIRING_RECEIVE_PAIRING_CONFIRM
+6 FLAG_LE_PAIRING_SEND_PAIRING_CONFIRM
+7 FLAG_LE_PAIRING_RECEIVE_PAIRING_RANDOM
+8 FLAG_LE_PAIRING_SEND_PAIRING_RANDOM
+9 FLAG_LE_PAIRING_AFTER_AUTH
+10 FLAG_LE_PAIRING_SEND_START_ENC_RSP
+11 FLAG_LE_PARING_SEND_ENC_INFORMATION
+12 FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION 
+13 FLAG_LE_PARING_SEND_INDENTITY_INFORMATION
+0xff FLAG_LE_PAIRING_END
+)
+
+/* Security Manager Protocol Code */
+(
+0x01 SMP_PAIRING_REQUEST
+0x02 SMP_PAIRING_RESPONSE
+0x03 SMP_PAIRING_CONFIRM
+0x04 SMP_PAIRING_RANDOM
+0x05 SMP_PAIRING_FAILED
+0x06 SMP_ENCRYPTION_INFORMATION
+0x07 SMP_MASTER_IDENTIFICATION
+0x08 SMP_IDENTITY_INFORMATION
+0x09 SMP_IDENTITY_ADDRESS_INFORMATION
+0x0A SMP_SIGNING_INFORMATION
+0x0B SMP_SECURITY_REQUEST
+0x0c SMP_PAIRING_PUBLIC_KEY
+0x0d SMP_PAIRING_DHKEY_CHECK
+)
+
+(// pairing failed reason
+0x00 PAIRING_FAILED_RESERVED
+0X01 PAIRING_FAILED_PASSKEY_ENTRY_FAILED
+0X02 PAIRING_FAILED_OOB_NOT_AVAILABLE
+0X03 PAIRING_FAILED_AUTHENTICATION_REQUIRE
+0X04 PAIRING_FAILED_CONFIRM_VALUE_FAILED
+0X05 PAIRING_FAILED_PAIRING_NOT_SUPPORTED
+0X06 PAIRING_FAILED_ENCRYPTION_KEY_SIZE
+0X07 PAIRING_FAILED_COMMAND_NOT_SUPPORTED
+0X08 PAIRING_FAILED_UNSPECIFIED_REASON
+0X09 PAIRING_FAILED_REPEATED_ATTEMPTS
+0X0A PAIRING_FAILED_INVALID_PARAMETERS
+0X0B PAIRING_FAILED_DHKEY_CHECK_FAILED
+0X0C PAIRING_FAILED_NUMERIC_COMPARISON_FAILED
+0X0D PAIRING_FAILED_BR_EDR_PAIRING_IN_PROGRESS
+0X0E PAIRING_FAILED_KEY_DERIVATION_GENERATION_NOT_ALLOWED
+)
+
+/*LE secure connect state */
+(
+0x00 LE_SC_STAT_NULL
+0x01 LE_SC_STAT_RECEIVE_PUBLIC_KEY
+0x02 LE_SC_STAT_WAIT_SEND_PUBLIC_KEY
+0x03 LE_SC_STAT_SEND_PUBLIC_KEY
+0x04 LE_SC_STAT_RECEIVE_RANDOM
+0x05 LE_SC_STAT_SEND_RANDOM
+0x06 LE_SC_STAT_RECEIVE_DHKEY
+0x07 LE_SC_STAT_WAIT_CONFIRM_GKEY
+0x08 LE_SC_STAT_PASSKEY_WAIT_CONFIRM
+)
+
+
+(
+0 FLAG_LE_SC_CONFRIM_NULL
+1 FLAG_LE_SC_CONFRIM_GKEY_OK
+)
+
+
+
Index: mouse_public_3mode_usb/format/ble_protocol_stack/le_ll.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_ll.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ble_protocol_stack/le_ll.format	(working copy)
@@ -0,0 +1,120 @@
+xmemalloc(
+8 mem_le_local_feature
+1 mem_le_tx_phys
+1 mem_le_rx_phys
+
+2 mem_remote_rx_max_octets
+2 mem_remote_rx_max_time
+2 mem_remote_tx_max_octets
+2 mem_remote_tx_max_time
+2 mem_local_rx_max_octets
+2 mem_local_rx_max_time
+2 mem_local_tx_max_octets
+2 mem_local_tx_max_time
+
+)
+
+/* LE control packet type */
+(
+0x00 LL_CONNECTION_UPDATE_IND
+0x01 LL_CHANNEL_MAP_IND
+0x02 LL_TERMINATE_IND
+0x03 LL_ENC_REQ
+0x04 LL_ENC_RSP
+0x05 LL_START_ENC_REQ
+0x06 LL_START_ENC_RSP
+0x07 LL_UNKNOWN_RSP
+0x08 LL_FEATURE_REQ
+0x09 LL_FEATURE_RSP
+0x0A LL_PAUSE_ENC_REQ
+0x0B LL_PAUSE_ENC_RSP
+0x0C LL_VERSION_IND
+0x0D LL_REJECT_IND
+0x0E LL_SLAVE_FEATURE_REQ
+0x0F LL_CONNECTION_PARAM_REQ
+0x10 LL_CONNECTION_PARAM_RSP
+0x11 LL_REJECT_IND_EXT
+0x12 LL_PING_REQ
+0x13 LL_PING_RSP
+0x14 LL_LENGTH_REQ
+0x15 LL_LENGTH_RSP
+0x16 LL_PHY_REQ
+0x17 LL_PHY_RSP
+0x18 LL_PHY_UPDATE_IND
+0x19 LL_MIN_USED_CHANNELS_IND
+0x1A LL_CTE_REQ
+0x1B LL_CTE_RSP
+0x1C LL_PERIODIC_SYNC_IND
+0x1D LL_CLOCK_ACCURACY_REQ
+0x1E LL_CLOCK_ACCURACY_RSP
+0x1F LL_CIS_REQ
+0x20 LL_CIS_RSP
+0x21 LL_CIS_IND
+0x22 LL_CIS_TERMINATE_IND
+0x23 LL_POWER_CONTROL_REQ
+0x24 LL_POWER_CONTROL_RSP
+0x25 LL_POWER_CHANGE_IND
+)
+
+
+
+(//bit map of mem_le_ll_feature
+//LL_FEATURE_REQ
+0 BIT_LL_FEATURE_LE_ENCRYPTION
+1 BIT_LL_FEATURE_CONNECTION_PARAMETERS_REQUEST_PROCEDURE
+2 BIT_LL_FEATURE_EXTENDED_REJECT_INDICATION
+3 BIT_LL_FEATURE_SLAVE_INITIATED_FEATURES_EXCHANGE
+4 BIT_LL_FEATURE_LE_PING
+5 BIT_LL_FEATURE_LE_DATA_PACKET_LENGTH_EXTENSION
+6 BIT_LL_FEATURE_LL_PRIVACY
+7 BIT_LL_FEATURE_EXTENDED_SCANNER_FILTER_POLICIES
+8 BIT_LL_FEATURE_LE_2M_PHY
+9 BIT_LL_FEATURE_STABLE_MODULATION_INDEX_TRANSMITTER
+10 BIT_LL_FEATURE_STABLE_MODULATION_INDEX_RECEIVER
+11 BIT_LL_FEATURE_LE_CODED_PHY
+12 BIT_LL_FEATURE_LE_EXTENDED_ADVERTISING
+13 BIT_LL_FEATURE_LE_PERIODIC_ADVERTISING
+14 BIT_LL_FEATURE_CHANNEL_SELECTION_ALGORITHM
+15 BIT_LL_FEATURE_LE_POWER_CLASS_1
+16 BIT_LL_FEATURE_MINIMUM_NUMBER_OF_USED_CHANNELS_PROCEDURE
+)
+(//function map of mem_le_ll_feature
+//LL_FEATURE_REQ
+0x1 FUN_LL_FEATURE_LE_ENCRYPTION
+0x2 FUN_LL_FEATURE_CONNECTION_PARAMETERS_REQUEST_PROCEDURE
+0x4 FUN_LL_FEATURE_EXTENDED_REJECT_INDICATION
+0x8 FUN_LL_FEATURE_SLAVE_INITIATED_FEATURES_EXCHANGE
+0x10 FUN_LL_FEATURE_LE_PING
+0x20 FUN_LL_FEATURE_LE_DATA_PACKET_LENGTH_EXTENSION
+0x40 FUN_LL_FEATURE_LL_PRIVACY
+0x80 FUN_LL_FEATURE_EXTENDED_SCANNER_FILTER_POLICIES
+0x100 FUN_LL_FEATURE_LE_2M_PHY
+0x200 FUN_LL_FEATURE_STABLE_MODULATION_INDEX_TRANSMITTER
+0x400 FUN_LL_FEATURE_STABLE_MODULATION_INDEX_RECEIVER
+0x800 FUN_LL_FEATURE_LE_CODED_PHY
+0x1000 FUN_LL_FEATURE_LE_EXTENDED_ADVERTISING
+0x2000 FUN_LL_FEATURE_LE_PERIODIC_ADVERTISING
+0x4000 FUN_LL_FEATURE_CHANNEL_SELECTION_ALGORITHM
+0x8000 FUN_LL_FEATURE_LE_POWER_CLASS_1
+0x10000 FUN_LL_FEATURE_MINIMUM_NUMBER_OF_USED_CHANNELS_PROCEDURE
+)
+
+(//bit of mem_le_tx_phys and mem_le_rx_phys
+0x00 BIT_LE_1M_PHY
+0x01 BIT_LE_2M_PHY
+0x02 BIT_LE_CODED_PHY
+
+0x02 BIT_LE_CODED_PHY_S2
+0x07 BIT_LE_CODED_PHY_S8
+)
+
+(//map of mem_le_tx_phys and mem_le_rx_phys
+0x01 FUN_TX_LL_1M_PHY
+0x02 FUN_TX_LL_2M_PHY
+0x04 FUN_TX_LL_CODED_PHY
+
+0x01 FUN_RX_LL_1M_PHY
+0x02 FUN_RX_LL_2M_PHY
+0x04 FUN_RX_LL_CODED_PHY
+)
+
Index: mouse_public_3mode_usb/format/bt.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/bt.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/bt.format	(working copy)
@@ -0,0 +1,1099 @@
+
+	width = 32
+	const length = 12000
+
+	/* ========= memory ============== */
+memalloc(
+/* 00-0f most frequently used area  */
+1 mem_le_adv_transmit
+1 mem_le_adv_waitcnt
+1 mem_le_adv_rcv
+1 mem_le_req_rcv
+1 mem_le_scanrsp_rcv
+1 mem_le_conn_rcv
+
+1 mem_inquiryscan_waitcnt
+1 mem_inquiryscan_rcvcnt
+1 mem_pagescan_waitcnt
+1 mem_pagescan_rcvcnt
+1 mem_pagescan_rcvfhscnt
+1 mem_slave_rcvcnt
+1 mem_page_transmit
+1 mem_page_rcv
+1 mem_page_rcv_fhs
+1 mem_master_rcvcnt
+
+/* 10-1f debug area */
+1 mem_fhs_wait_counter
+1 mem_newconnto_counter
+1 mem_inquiry_transmit
+1 mem_inquiry_rcv
+1 mem_fw_ver
+1 mem_current_context
+1 mem_le_ch_mapped
+1 mem_last_freq
+1 mem_rssi
+1 mem_rx_type
+2 mem_rx_hec_err
+2 mem_rx_crc_err
+2 mem_context_ptr
+8 mem_display
+8 mem_bcd
+
+		/* context swappable area */
+1 mem_state
+1 mem_mode
+2 mem_tsniff
+4 mem_sniff_anchor
+6 mem_clk_offset
+2 mem_rx_window
+3 mem_plap
+1 mem_puap
+2 mem_pnap
+1 mem_conn_handle
+1 mem_arq
+1 mem_lmp_to_send
+1 mem_lmi_opcode
+1 mem_lmo_reason
+1 mem_op
+1 mem_state_map
+4 mem_supervision_timer
+2 mem_supervision_to
+1 mem_name_offset
+1 mem_key_size
+1 mem_conn_sm
+12 mem_aco
+16 mem_kc
+1 mem_conn_timer
+1 mem_sniff_attempt
+1 mem_sniff_timeout
+2 mem_dsniff
+1 mem_amaddr
+1 mem_lmo_opcode1
+1 mem_lmi_opcode1
+1 mem_lmo_reason1
+1 mem_lmo_tid1
+1 mem_lmo_opcode2
+1 mem_lmi_opcode2
+1 mem_lmo_reason2
+1 mem_lmo_tid2
+8 mem_bt_context_reserve
+	/*context ending*/
+
+/*above param can not be modified*/
+
+1 mem_current_sniff_attempt
+1 mem_current_sniff_timeout
+1 mem_nfreq_index_inq
+1 mem_nfreq_index_page
+1 mem_ninqy_index
+1 mem_fhs_misc
+
+
+
+/* lpo related */
+4 mem_subsniff_instant
+1 mem_subsniff_rate
+2 mem_subsniff_tcmax
+1 mem_subsniff_tsniff
+1 mem_lpm_adjust
+6 mem_sync_clke
+1 mem_lpm_current_mult
+4 mem_gpio_wakeup_low
+4 mem_gpio_wakeup_high
+
+
+//page
+1 mem_npage_index
+1 mem_page_mode
+4 mem_page_clk
+
+
+
+/*temp mem*/
+1 mem_temp_am_addr
+1 mem_temp_arq
+
+//
+2 mem_len
+4 mem_clkn_bt
+4 mem_clke_bt
+4 mem_dpll_clkn
+1 mem_connection_options
+
+1 mem_nameres_cnt
+2 mem_txptr
+2 mem_slot_offset
+
+//extm
+1 extm_fhs_misc
+1 extm_newconn_am_addr
+3 extm_class
+3 extm_lap
+1 extm_uap
+3 extm_nap
+
+21 mem_rxbuf
+
+//debug
+1 mem_debug_config
+1 mem_lch_code
+1 mem_fhs_am_addr
+1 mem_select_list_item
+0 mem_temp_reconn_record
+1 mem_record_bt_mode
+6 mem_temp_lap
+2 mem_list_item_ptr
+
+100 mem_eir
+1 mem_rssi_hex
+
+
+2 mem_param_tx_setup
+2 mem_param_rf_setup
+2 mem_param_conn_access
+2 mem_param_clke_cal
+2 mem_param_pll_setup
+2 mem_param_rx_setup
+2 mem_param_dpll_start_delay
+2 mem_param_rt_rthalfslot
+2 mem_param_clke_cal_le_1m
+2 mem_param_clke_cal_le_2m
+2 mem_param_clke_cal_le_coded
+
+)
+
+memalloc iqcal (
+2 mem_vdk
+4 mem_vok
+6 mem_omega
+4 mem_b1
+4 mem_b2
+16 mem_u1
+16 mem_u2
+16 mem_q
+)
+
+memalloc test (
+/* test related */
+2 mem_tst_pktcnt_sync
+2 mem_tst_pktcnt_hec
+2 mem_tst_pktcnt_crc
+2 mem_tst_pktcnt_dmh
+3 mem_tmp_buffer_head
+80 mem_tmp_buffer
+
+
+1 mem_tester_emulate
+0 mem_temp_payload
+1 test_mode_scenario
+1 test_mode_hopping_mode
+1 test_mode_tx_freq
+1 test_mode_rx_freq
+1 test_mode_power_mode
+1 test_mode_poll_period
+1 test_mode_packet_type
+2 test_mode_data_length
+1 mem_test_mode_old_debug_config
+1 mem_tester_cnt
+
+)
+
+
+xmemalloc(
+/* patch enable 0x4000-0x403f  */
+
+1 mem_patch00
+1 mem_patch01
+1 mem_patch02
+1 mem_patch03
+1 mem_patch04
+1 mem_patch05
+1 mem_patch06
+1 mem_patch07
+1 mem_patch08
+1 mem_patch09
+1 mem_patch0a
+1 mem_patch0b
+1 mem_patch0c
+1 mem_patch0d
+1 mem_patch0e
+1 mem_patch0f
+1 mem_patch10
+1 mem_patch11
+1 mem_patch12
+1 mem_patch13
+1 mem_patch14
+1 mem_patch15
+1 mem_patch16
+1 mem_patch17
+1 mem_patch18
+1 mem_patch19
+1 mem_patch1a
+1 mem_patch1b
+1 mem_patch1c
+1 mem_patch1d
+1 mem_patch1e
+1 mem_patch1f
+1 mem_patch20
+1 mem_patch21
+1 mem_patch22
+1 mem_patch23
+1 mem_patch24
+1 mem_patch25
+1 mem_patch26
+1 mem_patch27
+1 mem_patch28
+1 mem_patch29
+1 mem_patch2a
+1 mem_patch2b
+1 mem_patch2c
+1 mem_patch2d
+1 mem_patch2e
+1 mem_patch2f
+1 mem_patch30
+1 mem_patch31
+1 mem_patch32
+1 mem_patch33
+1 mem_patch34
+1 mem_patch35
+1 mem_patch36
+1 mem_patch37
+1 mem_patch38
+1 mem_patch39
+1 mem_patch3a
+1 mem_patch3b
+1 mem_patch3c
+1 mem_patch3d
+1 mem_patch3e
+1 mem_patch3f
+
+	/* 3 device contexts  */
+88 mem_context
+1 mem_current_amaddr
+1 mem_lpm_mode
+1 mem_device_option
+1 mem_scan_mode
+4 mem_last_clkn
+
+	/* parameters */
+8 mem_features
+3 mem_lap
+1 mem_uap
+2 mem_nap
+1 mem_npage
+3 mem_glap
+3 mem_class
+2 mem_iscan_window
+2 mem_iscan_interval
+2 mem_pscan_window
+2 mem_pscan_interval
+2 mem_page_interval
+2 mem_page_window
+2 mem_page_to
+2 mem_inq_window
+1 mem_fcomp_div
+2 mem_rx_window_init
+2 mem_rx_window_sniff
+2 mem_rf_init_ptr
+
+	/* connection related */
+1 mem_last_type
+1 mem_last_type_esco
+1 mem_last_type_saved
+2 mem_retransmission_cnt
+4 mem_next_btclk
+
+1 mem_rf_rccal
+1 mem_handle_num
+1 mem_max_slot
+1 mem_eir_enable
+
+/* AFH related */
+4 mem_afh_instant
+2 mem_afh_error_total
+1 mem_afh_cfg
+1 mem_afh_new_mod
+5 mem_afh_map_lo
+5 mem_afh_map_hi
+1 mem_afh_used
+2 mem_afh_index
+11 mem_afh_map_new
+80 mem_afh_map
+4 mem_afh_timer
+10 mem_afh_classify_channel_map
+
+
+	/* lpm related */
+2 mem_lpm_wake_lock
+2 mem_lpm_interval
+1 mem_lpm_overhead
+1 mem_lpm_hibernate_switch
+1 mem_esco_addr
+1 mem_sniff_unint_lost
+1 mem_ptt
+4 mem_sleep_counter   //should be 0x41fc in REVC
+4 mem_sleep_counter_all
+6 mem_sleep_clkn
+3 mem_sniff_rcv
+3 mem_sniff_lost
+3 mem_clks_per_lpo
+
+1 mem_lpm_mult
+1 mem_lpm_mult_timeout
+1 mem_lpm_mult_cnt
+
+/* 8139-813b lpm_ctrl[31:12] */
+0 mem_lpm_config				
+1 mem_lpm_xtal_ib
+1 mem_lpm_ctrim
+1 mem_lpm_padding
+
+1 mem_lpm_xtalcnt
+1 mem_lpm_buckcnt
+1 mem_lpm_ldocnt
+1 mem_lpm_isogate
+1 mem_lpm_isogate_final
+4 mem_lpm_ctrl3
+20 mem_saved_gpio	// should be 0x421e in REVC
+3 mem_saved_gsel
+8 mem_saved_mark
+1 mem_saved_spidctrl
+2 mem_patch_ptr
+2 mem_patch_len
+
+32 mem_timers
+
+/*LINK KEY*/
+1 mem_link_key_exists
+16 mem_link_key
+
+
+/* HCI */
+1 mem_hci_cmd
+1 mem_hci_conn_handle
+3 mem_hci_plap
+1 mem_hci_puap
+2 mem_hci_pnap
+
+
+1 mem_loadcode_times
+1 mem_llid
+
+1 mem_tx_lch
+2 mem_tx_len
+
+1 mem_tx_power
+1 mem_modem_rssi
+1 mem_gain_fix
+3 mem_gain_table
+1 mem_gain_second_agc_en
+
+ifdef DEBUG_RF_INIT
+1 mem_rf_init_data
+endif
+1 mem_system_clk
+)
+
+(//mem_system_clk
+12 SYSTEM_CLK_12M
+24 SYSTEM_CLK_24M
+)
+
+(//bluetooth tx power
+0x00 TX_POWER_0DB
+0x03 TX_POWER_3DB
+0x05 TX_POWER_5DB
+0x06 TX_POWER_6DB
+0x07 TX_POWER_7DB
+0x0a TX_POWER_10DB
+
+0x83 TX_POWER_F3DB
+0x85 TX_POWER_F5DB
+0x91 TX_POWER_F17DB
+0x94 TX_POWER_F20DB
+0x95 TX_POWER_PAIR
+0x9e TX_POWER_F30DB
+0xaa TX_POWER_FAST_CONN
+
+)
+
+
+	/* context */
+(
+0x01 coffset_mode
+0x02 coffset_tsniff
+0x04 coffset_sniff_anchor
+0x08 coffset_clk_offset
+0x0e coffset_rx_window
+0x10 coffset_plap
+0x16 coffset_conn_handle
+0x17 coffset_arq
+	/* 3.0 only */
+0x18 coffset_lmp_to_send
+0x1b coffset_op
+0x1c coffset_state_map
+	/* le only */
+0x18 coffset_le_ch
+0x19 coffset_le_hop
+0x1a coffset_le_event_cnt
+0x1c coffset_le_supervision_timer
+0x20 coffset_le_instant
+0x22 coffset_le_channels
+0x23 coffset_le_op
+0x24 coffset_le_access
+0x28 coffset_le_crcinit
+0x2b coffset_le_window_size
+0x2c coffset_le_slave_latency
+0x2e coffset_le_slave_superto
+0x30 coffset_le_channel_map
+0x35 coffset_le_rx_phy
+0x36 coffset_le_tx_phy
+0x37 coffset_le_new_map
+0x37 coffset_le_new_m2s_phy
+0x38 coffset_le_new_s2m_phy
+0x37 coffest_le_new_transmitwindowsize
+0x38 coffest_le_new_transmitwindowoffset
+0x3a coffest_le_new_conninterval
+0x3c coffest_le_new_connslavelatency
+0x3e coffest_le_new_connsupervisiontimeout
+0x40 coffset_le_sk
+0x50 coffset_le_peer_sca
+0x53 coffset_le_transmit_window
+	
+88 context_size
+1 context_num
+)
+
+(
+0 lpm_flag_wake
+1 lpm_flag_loadcode
+)
+
+/* ========= parameters ============== */
+(
+0x0050 param_newconn_arq
+0x0007 param_esco_addr
+0x0010 param_conn_handle
+0x01f0 param_conn_handle_comp
+0x0020 param_newconnto
+0x0008 param_pagerespto
+0x0a00 param_snooze_setup_orig
+0x5353 param_snooze_ahead_orig
+0x00ff param_ninquiry
+0x2000 param_page_to
+0x0005 param_max_slot
+0x0010 param_sco_poll
+
+/* 24Mhz clock setting */
+ifdef CLK24M
+0x1c86 param_tx_setup
+0x0c00 param_rf_setup
+0x0c00 param_conn_access 
+0x1a00 param_rx_setup
+0x0776 param_clke_cal
+0x0a00 param_pll_setup
+4000 param_dpll_start_delay
+7500 param_halfclk
+60084 param_halfclk_neg
+-60084 param_halfclk_neg1
+else
+/* 12Mhz clock setting */
+0x0e43 param_tx_setup
+0x0600 param_rf_setup
+0x0600 param_conn_access 
+0x03bb param_clke_cal
+0x0500 param_pll_setup		// 120 is minimum
+0x0d00 param_rx_setup	// 114us before sync
+2000 param_dpll_start_delay
+3750 param_rt_rthalfslot
+
+480 param_clke_cal_le_1m	//preamble(1B) & access address(4B) time (1+4)*8*1 * 12
+288 	param_clke_cal_le_2m	//preamble(2B) & access address(4B) time (1+4)*8*1 * 12
+282 param_clke_cal_le_coded	//preamble(80us) & access address(256us)-312.5us(0.5slot)
+endif
+
+110 param_lpm_fix
+10 param_lpo_extra
+200 param_lpm_adjmax
+
+ifdef SIM
+20 param_hibernate_clks
+3 param_chgpump_delay
+else
+-1 param_hibernate_clks
+3000 param_chgpump_delay
+endif
+
+3 param_featrue_ssp
+0x0101 param_lmpext_ssp_enable
+30   param_sco_pktlen
+1     param_acl_pktcnt		/*buffer acl pkt cnt*/
+7     param_sco_pktcnt
+
+
+0x8fffff param_features0
+0x9d83fe param_features1  // not support afh
+0x8359     param_features2
+0x000033 param_unap
+0x001177 param_lap
+0x9e8b33 param_glap
+0x002540 param_class//0x180208 //0x002580//402500//240404
+0x000a04 param_lmp_version//0x0a04
+0x000a06 param_lmp_version0
+0x12e9 param_lmp_subversion
+0x0012 param_tisw
+0x0012 param_tpsw
+0x1000 param_tisi
+0x0800 param_tpsi
+0x0020 param_page_window
+0x0020 param_inq_window
+0x1c80 param_supervision_to
+39 param_fcomp_div
+2 param_fcomp_mul
+6     param_name_len
+0x535442 param_name
+0x344950 param_name1
+
+
+)
+
+/* ======= packet types  ========= */
+(
+0x0      type_null    
+0x1      type_poll   
+0x2      type_fhs    
+0x3      type_dm1    
+0x4      type_dh1    
+0x5      type_hv1    
+0x6      type_hv2    
+0x7      type_hv3    
+0x8      type_3dh1     
+0x9      type_aux1   
+0xa      type_dm3    
+0xb      type_dh3    
+0xe      type_dm5    
+0xf      type_dh5    
+0x10     type_id
+0x11     type_shutdown
+0x13     type_lmp
+)
+
+/* ========== flag[6] =============== */
+(
+0        always        /* always 1 */
+1        true          /* set/rstn by verify,compare,icompare (true) */
+2        positive      /* set/rstn by all alu operations (opcode = 0x03,0x13,0x0f,0x1f), if alu output >= 0 */
+3        timeout       /* read only, the timeout from timers */
+5        zero          /* set/rstn by all alu operations (opcode = 0x03,0x13,0x0f,0x1f), if alu output == 0 */
+6        crc_failed    /* level, cleared by hop_start */
+7        enable_white  /* outside mux decide whether to load bt_clk or response_X */
+8        enable_parity /* level */
+9        enable_crc    /* level */
+10       enable_hec    /* level */
+11       decode_fec1   /* level */
+12       decode_fec2   /* level */
+13       decode_fec0   /* level */
+14       encrypt       /* level */
+15       crc16       /* for caculate ccitt crc16 */
+16       swfine	/* =0 stop_watch count based on oneslot =1 on 1 clock */
+20       rqst_freq    /* pulse, to start calculating frequency */
+21       recalc        /* pulse, to recalculate the fhs_parity */
+22       init_encrypt  /* pulse, issued to initialize encrption */
+23       mhalfbnd    /* half slot boundary of clke_rt, or when clke_bt[0] toggles */
+24       sync          /* sync found as a result of correlation,set/rstn by correlate opcode */
+25       user10    /* user10 */
+26       kc_p_activate  /* pulse to recalc the kc_p */
+27       encode_fec1   /* level */
+28       encode_fec2   /* level */
+29       encode_fec0   /* level */
+30       packet_end    /* pulse */
+32       is_tx         /* level */
+33       is_rx         /* level */
+34       halfslot     /* pulse, read only, when clkn_bt[0] toggles */
+35       oneslot      /* pulse, read only, when clkn_bt[1] toggles */
+36       mslotbnd     /* pulse, read only, when clke_bt[1] toggles */
+37       expire       /* level, read only, when selected clock source exceed timeup value */
+38       meet         /* level, read only, when selected clock source meet timeup value */
+39       tx_clear     /* level, read only, indicate tx pipe is cleared */
+40       user         /* user0 */
+41       master        /* user1 */
+42       slave2         /* user2 */
+43       wake           /* user3 */
+44       user2        /* user4 */
+45       match         /* user5 */
+46       attempt        /* user6 */
+47       user3          /* user7 */
+48       clknt         /* user8 */
+49	   user7 	/* user9 */
+50       synchronize   /* synchronize lpo and regular version of the clock */
+51       lpo_edge  /* read only, 3 clocks after risling edge of lpo clock */
+52       blank         /* C0 only, means pdata == 0 */
+53       modone          /* set divide operation is done */
+54       le		/* bluetooth 4.0 LE enable */
+55       aes_ready	/* set when aes is ok */
+56       encode_fec3   /* level */
+57       dewhiten_code_calc   /* dewhiten code calculate */
+58       lr_s2en       /* long range s2 enable */
+60	   ble_coded_info	//1:s2 0:s8
+63       never         /* read only, always 0 */
+)
+
+default flag = always
+
+/* ========== reg[6] =============== */
+(
+0        mark   /* for keeping strobes, more permanent */
+1        type   /* save and verify during rx */     /* rw */
+2        temp   /* general purpose register, 64 bits */
+3        contu  /* contr uart */
+3	 contru	/*contr uart*/
+3	 contwu	/*contw uart*/
+4        am_addr      /* verify during rx, read and send during tx */ /* ro */
+5        contw        /* last mem_addr during write */
+6        contr        /* last mem_addr during read */
+7        queue    /* the index of qset*,qisolate* commands, ie, if queue = 3, qset/qisolate operate on bit3 */
+8        debug    /* can be wired out for observation */
+9        access   /* the 72 bit access word */
+10       contus   /* contw uart */
+11       timeup        /* when does certain counter expire */
+12       pwindow       /* bit 71-61 of pdata; because on rx, bits shifts in from 71 down */
+13       fhs_parity    /* re-gernated based on bt_adr( {nap,uap,lap} ) when recalc flag is pulsed */
+14       white_init    /* init value of the whitening */
+15       crc24_init        /* init crc24 lfsr, 24 bits */
+16       contue    /* set interrupts, 40 bits */
+17       rega          /* general purpose register, 32 bits */
+18       regb          /* general purpose register, 32 bits */
+19       regc          /* general purpose register, 17 bits */
+20       regab         /* concat of {rega,regb}, thus 64 bits */
+21       radio_ctrl   /* radio i/f direct i/o ctrl, check following "radio_ctrl" section */
+
+23       freq_index   /* 7 bit read only */
+24       regd    /* 32 bit regext[1,0] */
+25       clkn              /* {clkn_bt, clkn_rt} */
+26       clke              /* {clke_bt, clke_rt} */
+27       stop_watch		
+28       fhs_misc   /* SR, SP, pscan mode */
+29       fhs_class  /* class field in fhs */
+30       fhs0   /* read only, bit 0-71 of fhs word */
+31       fhs1   /* read only, bit 72-142 of fhs word */
+32       bt_adr /* r/w, the bt_addr to access gen and freq hopping, contain only lap and uap */
+33       bt_clk /* r/w, the bt_clk for freq hopping */
+34       clkn_bt  /* read only, native bluetooth clock, free running 3.2KHz  or controlled by RTHALFSLOT register */
+35       clkn_rt  /* read only, native realtime clock, free running 12MHz, count from 0-3749, or controlled by RTHALFSLOT register */
+36       freq_mode
+37       xin   /* x parameter, read only */
+38       N_tx_slot /* the N factor in equations for Xi,Xp,Xprm,Xprs */
+39 	   auxcnt
+40       clke_bt  /* r/w,  external bluetooth clock , free running 3.2KHz or controlled by RTHALFSLOT register */
+41       clke_rt  /* r/w,  external realtime clock, , free running 12MHz, count from 0-3749, or controlled by RTHALFSLOT register */
+42       branch_addr	/* last branch address */
+43       rege         /* 64bit regext[3,2] */
+44       lap
+45       uap
+46       nap         
+47       regext		/* r/w extended 12x32bit registers,  indexed by regext_index */
+48       alarm             /* r/w, lpo wake up time, this is also how lpo and current clock keep sync */
+49       lpo_time          /* read only, this is the value to be copied back to clkn/clke after wakeup */
+50       kc_ls             /* secret key,                71: 0 */
+51       kc_ms             /* secret key,               127:72 */
+52       g1l               /* encryption length                */
+53		mask3ff		/* for mask 0x3ff operation */
+54       aes_ctrl		
+55       regf			/* 64bit regext[5,4] */
+56       regext_index   /* index of regext */
+57	     loopcnt
+58      stack			/* current return address */
+59       stack_ptr		/* stack depth */
+61         pc /* direct goto */
+62       null              /* to nowhere */
+63       pdata /* the shift register */
+)
+default reg = pdata
+
+/* regext_index */
+(
+0 regidx_data
+4 regidx_key
+8 regidx_xor
+12 regidx_result
+)
+/* ========== radio_ctrl========= */
+(
+0 TXGFSK
+1 PSK
+2 PSK3M
+3 RESET
+)
+/* assign BPWR = radio_ctrl[0]; */
+/* assign PARAMP = radio_ctrl[1]; */
+/* assign XTALPU = radio_ctrl[2]; */
+/* assign SYNTHPU = radio_ctrl[3]; */
+/* assign TXPU = radio_ctrl[4]; */
+/* assign RXPU = radio_ctrl[5]; */
+/* assign SLCTRL = radio_ctrl[6]; */
+/* assign XTALSEL_MUX_SEL = radio_ctrl[7] */
+
+
+/* =========== destination[4] ============== */
+(
+0 bucket
+1 rxf
+2 back
+3 mod
+)
+default dest = bucket
+
+/* =========== source[4] ============= */
+(
+1 txf
+3 demod
+)
+default source = 0
+
+
+/* ============== mark ============= */
+(
+0  mark_fhs_eir  
+1  mark_rxbuf_inuse
+2  mark_tx_l2cap
+3  mark_switch_initiated
+4  mark_accept_switch
+5  mark_loopback
+7  mark_esco
+8  mark_esco_rxok
+9  mark_context
+10 mark_am_addr_broadcast
+11 mark_fhs_already_good
+12 mark_page_trainb
+13 mark_lpm_mult_enable
+14 mark_usb_first_resp
+15 mark_old_packet
+16 mark_longpacket
+17 mark_testmode
+18 mark_ar2
+28 mark_inquiry_on
+29 mark_inquiry_state
+30 mark_inquiry_trainb
+31 mark_periodical_diac
+32 mark_all_diac
+33 mark_slave_in_rand_accepted
+34 mark_reconn_recieve_switch
+35 mark_isstr
+36 mark_loadcode
+37 mark_ext_patch
+38 mark_24g
+39 mark_24g_rxmode
+40 mark_eeprom_size
+41 mark_ble_tx_md
+42 mark_ble_rx_md
+43 mark_otp_encrypt
+44 mark_temp
+45 mark_ble_2M
+46 mark_ble_lr_s8
+47 mark_ble_lr
+48 mark_ble_crc_fail
+49 mark_role_switch_receive_fhs
+50 mark_ble_encryption
+51 mark_first_packet
+)
+
+(
+1 reload_type_otp
+2 reload_type_spi
+3 reload_type_iic
+)
+
+
+/* ============== soft timers ============== */
+(
+0 le_adv_interval_timer
+1 inquiry_length_timer
+2 le_scan_interval_timer
+3 page_length_timer
+4 iscan_interval_timer
+5 pscan_interval_timer
+6 switch_wait_timer
+7 enpt_delay_timer
+8 page_interval_timer
+9 key_scan_timer
+10 smp_pairing_timer
+11  ui_led_blink   //led timer 可扩展
+12  ui_led_blink1
+13 ui_led_blink2
+
+//不使用mesh应用可以复用
+//Tiny Mesh 广播APP回复
+13 mesh_ble_adv_app
+//Tiny Mesh广播tmall回复
+14 mesh_ble_adv_tmall
+//Tiny Mesh relay
+15 mesh_ble_relay_timer
+
+)
+
+(
+1 hci_cmd_inquiry
+2 hci_cmd_inquiry_cancel
+3 hci_cmd_remote_name_req
+4 hci_cmd_remote_feature_req
+5 hci_cmd_create_conn
+6 hci_cmd_disconn
+7 hci_cmd_accept_conn
+8 hci_cmd_reject_conn
+9 hci_cmd_pair
+10 hci_cmd_nopair
+11 hci_cmd_linkkey
+12 hci_cmd_nokey
+13 hci_cmd_auth
+14 hci_cmd_stopencrypt
+15 hci_cmd_startencrypt
+16 hci_cmd_setup_sco
+17 hci_cmd_disconn_sco
+18 hci_cmd_in_sniff
+19 hci_cmd_exit_sniff
+20 hci_cmd_remote_version_req
+21 hci_cmd_remote_ext_features_req
+22 hci_cmd_io_cap
+23 hci_cmd_role_discovery
+24 hci_cmd_role_switch
+25 hci_cmd_accept_with_switch
+26 hci_cmd_detach
+27 hci_cmd_le_create_conn
+28 hci_cmd_accept_sco_conn
+29 hci_cmd_le_disconn
+30 hci_cmd_le_att_req
+80 hci_cmd_wait_remote_feature
+81 hci_cmd_wait_remote_ext_feature
+82 hci_cmd_wait_remote_name
+)
+
+
+
+/* ============== debug ============= */
+(
+0 debug_neg_skew
+1 debug_bitbucket
+2 debug_dont_clear_got_tx
+3 debug_scatter_enabled
+4 debug_tx_fixed_freq
+5 debug_rx_fixed_freq
+6 debug_tx_pattern
+)
+
+/* ============== tester_emulator ============= */
+(
+0 tester_fixed_flow
+1 tester_fixed_flow_polarity
+2 tester_change
+3 tester_exit
+4 tester_pattern_test
+5 tester_whitening_change
+6 tester_fixed_freq
+7 tester_no_whitening
+)
+
+/* ============== mode ==========*/
+(
+0 mode_le
+1 mode_master
+2 afh_enable
+3 afh_change
+4 first_seqnx
+)
+
+/* ============== state_map ==========*/
+(
+0 smap_lmptidinit
+1 smap_lmptid
+2 smap_encryption
+3 smap_name_res
+4 smap_name_req
+5 smap_edr
+6 smap_rxlmp
+7 smap_rxl2cap
+)
+(
+0 state_inconn
+1 state_insniff
+2 state_insco 
+3 state_inpage
+4 state_conn_comp
+5 state_init_seq
+6 state_combkey
+7 state_linkkey
+)
+(
+0 op_send_sres
+1 op_auth_req
+2 op_inrand_req
+3 op_disconn
+4 op_stop_enc
+5 op_start_enc
+6 op_txl2cap
+7 op_pkt_comp
+)
+
+
+/* ============== arq [3] ================ */
+(
+0 flow
+1 arqn
+2 seqn
+3 wack
+4 flowx              /* out */  /* not really in memory */
+5 arqnx              /* out */
+6 seqnx              /* out */
+7 bcast1             /* first broadcast received */
+)
+
+/* arq          {flow,arqn,seqn}, read/write */
+/* [0] flow r/w  acl full status of the other, store during rx, checked during tx */
+/* [1] arqn r/w  ack of the other during rx (ack tx fifo),                        */
+/* [2] seqn r/w  seqn of the other, check during rx                               */ 
+/* arqx         {flowx,arqnx,seqnx} */
+/* [0] flowx r/o flow back to the other, 1 alow send, 0 not to send, read only tx */
+/* [1] arqnx r/w ack to the other, set by rx, send back on tx                     */
+/* [2] seqnx r/w toggled by arqn, to be send during tx                            */ 
+
+ 
+/* AFH flags */
+(
+0 AFH_CFG_ON
+1 AFH_CFG_TIMER
+2 send_lmp_set_afh
+3 AFH_CFG_REPORT_MODE
+4 AFH_CFG_MASTER_SENT_REQ
+)
+
+/* LLID CODE */
+(	
+1 LLID_L2CAP_CONT
+2 LLID_L2CAP_START
+3 LLID_LMP
+)
+
+/* ============== master_state ==========*/
+(
+0  master_in_idle
+1  master_in_inquiry
+2  master_in_page
+10 master_in_becoming_slave
+15 master_in_conn
+)
+(
+0 newrev_feature_bettx
+1 newrev_feature_betplltx
+2 newrev_feature_skip_retransmit
+3 newrev_feature_init_radio_after_sleep
+4 newrev_feature_no_lpolog
+)
+/*************mem_pincode_state****************/
+(
+0 pincode_state_ilde
+1 pincode_state_wait_pincode
+2 pincode_state_pincode_ready
+)
+
+
+// lpm_write
+(
+1 lpmreg_sel_ctrl
+2 lpmreg_sel_ctrl2
+4 lpmreg_sel_gpiolow
+8 lpmreg_sel_gpiohigh
+16 lpmreg_sel_counter
+32 lpmreg_sel_ctrl3
+)
+
+// lpm_write2
+(
+0x02 lpmreg_sel_option
+)
+
+(
+8 lpmreg_spi_lock_bit
+9 lpmreg_spi2_lock_bit
+0x0a lpmreg_uart_lock_bit
+0x0b lpmreg_uartb_lock_bit
+0x0c lpmreg_iic_lock_bit
+0x0d lpmreg_rom_lock_bit
+0x0e lpmreg_ice_mode_bit
+
+0x01 lpmreg_spi_lock
+0x02 lpmreg_spi2_lock
+0x04 lpmreg_uart_lock
+0x08 lpmreg_uartb_lock
+0x10 lpmreg_iic_lock
+0x20 lpmreg_rom_lock
+0x40 lpmreg_ice_mode
+)
+
+
+
+//scan_mode
+(
+0 inq_scan_mode
+1 page_scan_mode
+2 page_inq_enable
+)
+//mem_neogotiation_state
+(
+ 0 default_neogotiation_state
+ 1 prarm_neogotiation
+)
+
+//mem_lpm_wake_lock
+(
+0 wake_lock_ble_rx
+1 wake_lock_ble_tx
+
+3 wake_lock_key_press
+4 wake_lock_ble_tx_patch
+5 wake_lock_uart_tx
+6 wake_lock_uart_rx
+7 wake_lock_button
+8 wake_lock_cmd
+9 wake_lock_app
+10 wake_lock_lmp_tx
+11 wake_lock_lmp_rx
+12 wake_lock_l2cap_tx
+13 wake_lock_l2cap_rx
+14 wake_lock_ipc_c512bt
+15 wake_lock_ipc_bt2c51
+
+)
+
+(//mem_fcomp_div
+0x18 XTAL_24M
+0x08 XTAL_16M
+)
+
+( //verion
+6 BLUETOOTH_CORE_SPECIFICATION_4_0
+7 BLUETOOTH_CORE_SPECIFICATION_4_1
+8 BLUETOOTH_CORE_SPECIFICATION_4_2
+9 BLUETOOTH_CORE_SPECIFICATION_5_0
+10 BLUETOOTH_CORE_SPECIFICATION_5_1
+)
+
+(
+0x050e COMPANY_ID_YICHIP
+)
+
+(
+0x33  REC_3_MODE
+0x34  REC_4_MODE
+0x35  REC_4_MODE_STATIC_ADDRESS
+0x36  REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS
+0x37  REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS
+)
+
+
+//sniff UART_TX UART_RX
+(
+6 UART_WAKEUP_TX
+7 UART_WAKEUP_RX
+)
+
+
Index: mouse_public_3mode_usb/format/command.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/command.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/command.format	(working copy)
@@ -0,0 +1,1379 @@
+
+/* Parse Command:
+TX: take bits from tx fifo, jam it into shift and a destination (rf,bucket)
+RX: take bits from demod,  jam it into shift and a destination (acl,sco,bucket) */
+
+/* Inject Command:
+TX: 0 into shift, send tail of shift into a destination (rf,bucket)
+RX: 0 into shift, send tail of shift into a destination (acl,sco,bucket) */
+
+format
+  ! 15 romdat
+  % d0
+  % d1
+  % d2
+  % d3
+  [8] d0
+  [8] d1
+  [8] d2
+  [8] d3
+end
+
+format
+  ! 15 enable   /* set flag to 1 */
+  % flag
+  [5] opcode
+  [6] 1
+  [6] flag
+  [6] null
+  [9] 0
+end
+ /* High 5 bytes of channel map */
+format
+  ! 15 pulse   /* set flag to 1 */
+  % flag
+  [5] opcode
+  [6] 1
+  [6] flag
+  [6] null
+  [9] 0
+end
+
+format
+  ! 15 disable   /* set flag to 0 */
+  % flag
+  [5] opcode
+  [6] 2
+  [6] flag
+  [6] null
+  [9] 0
+end
+
+format
+  ! 15 set0  /* set selected bit of reg to 0 */
+  % immediate
+  % reg
+  [5] opcode
+  [6] 9
+  [6] never
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 set1  /* set selected bit of reg to 1 */
+  % immediate
+  % reg
+  [5] opcode
+  [6] 9          /* alu op demux */
+  [6] always
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 setflag  /* set selected bit of the reg to the polarity of the flag */
+  % flag
+  % immediate
+  % reg
+  [5] opcode
+  [6] 9
+  [6] flag
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 nsetflag  /* set the selected bit of the reg to the opposite polarity of the flag */
+  % flag
+  % immediate
+  % reg
+  [5] opcode
+  [6] 0x29
+  [6] flag
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 15 setflip    /* invert the selected bit of the reg */
+  % immediate
+  % reg
+  [5] opcode
+  [6] 10            /* this is alu op */
+  [6] always
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 0x1f qset1      /* demux the lowest 4 bit of queue and OR it with regr into regw */
+  % reg             /* in short, set the bit in reg indexed by queue to 1 */
+  [5] opcode
+  [6] 9
+  [6] always
+  [6] reg
+  [9] 0
+end
+  
+format
+  ! 0x1f qset0      /* demux the lowest 4 bit of queue and AND it with regr into regw */
+  % reg             /* in short, set the bit in reg indexed by queue to 0 */
+  [5] opcode
+  [6] 9
+  [6] never
+  [6] reg
+  [9] 0
+end
+
+format 
+  ! 0x1f qsetflag   /* set the bit in reg index by queue to same as flag */
+  % flag
+  % reg
+  [5] opcode
+  [6] 9
+  [6] flag
+  [6] reg
+  [9] 0
+end
+
+format 
+  ! 0x1f nqsetflag   /* set the bit in the reg index by queue to opposite of flag */
+  % flag
+  % reg
+  [5] opcode
+  [6] 0x29
+  [6] flag
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 0x1f qsetflip      /* flip the bit in reg index by queue */
+  % reg
+  [5] opcode
+  [6] 10
+  [6] always
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 1 parse       /* take bits out of source (sco_tx,tx_buffer,rx-elas) into pdata and dest (sco_rx,rx_fifo,tx-elas) */
+  % source
+  % dest
+  % immediate
+  [5] opcode
+  [4] source      /* voice, data, demod */
+  [2] 0
+  [6] 0    
+  [2] 0           /* parse or inject */ 
+  [4] dest        /* acl, sco, mod, bucket */
+  [9] immediate   /* number of bits to parse off */
+end
+
+format
+  ! 1 inject      /* shift data from pdata into destination (tx-elas,rx_fifo,sco_rx) */
+  % destination
+  % immediate
+  [5] opcode
+  [4] 0
+  [2] 0
+  [6] 1
+  [2] 0
+  [4] destination /* acl,sco,mod,bucket */
+  [9] immediate   /* number of bits to be injected */
+end
+
+format
+  ! 1 iinject
+  % destination
+  % regr
+  [5] opcode
+  [6] regr       /* contain the number of bits to inject */
+  [6] 3
+  [2] 0
+  [4] destination /* acl,sco,mod,bucket */
+  [9] 0 
+end
+
+format
+  ! 1 stuff  /* automatic parse, stuff_counter decrement on every bit until hits zero */
+  % source
+  % destination
+  [5] opcode
+  [4] source
+  [2] 0
+  [6] 2
+  [2] 0
+  [4] destination
+  [9] 0
+end
+
+format    /* force immediate value into registers */
+  ! 3 force
+  % immediate
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 0    /* alu operation force */
+  [6] regw  /* destination register */
+  [9] immediate
+end
+
+format    /* force whatever is on shift_reg to regsiters */
+  ! 0x13 iforce
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 0    /* alu operation force */
+  [6] regw  /* destination register */
+  [9] 0
+end
+
+format    /* force immediate value into registers */
+  ! 3 increase
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 1    /* alu operation add */
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 3 pincrease
+  % immediate
+  [5] opcode
+  [6] -1  /* pdata */
+  [6] 1   /* alu add */
+  [6] -1  /* back to pdata */
+  [9] immediate
+end
+
+format    /* force immediate value into registers */
+  ! 3 and_into
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 2    /* alu operation and into */
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 3 and
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 2    /* alu operation and into */
+  [6] regw
+  [9] immediate
+end
+  
+format
+  ! 0x13 iand    /* pdata & regr -> regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 2    /* alu operation and into */
+  [6] regw
+  [9] 0
+end
+  
+
+format    /* and whatever is in shiftreg with reg */
+  ! 0x13 iand_into
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 2    /* alu operation and into */
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 3 or_into
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 3    /* alu operation or into */
+  [6] reg
+  [9] immediate
+end
+
+format
+  ! 3 or
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 3    /* alu operation or into */
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 ior
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 3    /* alu operation or into */
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 0x13 ior_into
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 3    /* alu operation or into */
+  [6] reg
+  [9] 0
+end
+
+format
+  ! 3 skip_to   /* jump to location stored in reg */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 4   /* alu operation copy */
+  [6] rom_addr
+  [9] 0
+end
+
+format
+  ! 3 copy
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 4   /* alu operation copy */
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 deposit   /* copy the register content thru alu to shift register, not prealigned like preload */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 4   /* alu operation copy */
+  [6] -1  /* pdata */
+  [9] 0
+end
+
+format
+  ! 3 icopy     /* copy the shift register lsb content directly to register, not aligned */
+  % regw
+  [5] opcode
+  [6] -1  /* pdata */
+  [6]  4  /* alu copy */
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 add
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 1
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 iadd       /* regr + pdata -> regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 1
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 sub          /* immediate - regr -> regw */
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 12
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 isub       /* pdata - regr -> regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 12
+  [6] regw
+  [9] 0
+end
+
+
+format
+  ! 3 flip
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 5
+  [6] reg
+  [9] immediate
+end
+  
+format
+  ! 0x13 iflip  /* use shift register as immediate to do xor */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 5
+  [6] regw
+  [9] 0
+end
+  
+format
+  ! 3 xor
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 5
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 3 xor_into
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 5
+  [6] reg
+  [9] immediate
+end
+  
+format
+  ! 0x13 ixor  /* pdata xor regr and store result in regw */
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 5
+  [6] regw
+  [9] 0
+end
+  
+format
+  ! 3 invert
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 8
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 pinvert    /* invert pdata into itself */
+  [5] opcode
+  [6] -1
+  [6] 8
+  [6] -1
+  [9] 0
+end
+
+format
+  ! 3 div                 /* regr div immediate div */
+  % reg
+  % immediate
+  [5] opcode
+  [6] reg
+  [6] 13                   /* generate diven pulse to div */
+  [6] null
+  [9] immediate
+end
+
+format
+  ! 0x13 idiv           /* pdata div regr data ready at most after 41 nops */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 13                   /* generate diven pulse to div */
+  [6] null
+  [9] 0
+end
+
+format
+  ! 0x13 idiv48           /* pdata div regr data 48bit */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 17                   /* generate diven pulse to div */
+  [6] null
+  [9] 0
+end
+
+format
+  ! 3 remainder            /* harvest div remainder */
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 14
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 quotient             /* harvest div quotient */
+  % regw
+  [5] opcode
+  [6] 0
+  [6] 15
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 6
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift2
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 22
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift3
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 18
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift4
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 35
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift8
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 25
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift16
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 34
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 rshift32
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 30
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 7
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift2
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 23
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift8
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 26
+  [6] regw
+  [9] 0
+end
+
+  
+format
+  ! 3 lshift3
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 19
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 lshift4
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 36
+  [6] regw
+  [9] 0
+end
+  
+
+format
+  ! 3 lshift16
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 32
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 random               /* random number into regw */
+  % reg
+  [5] opcode
+  [6] 0
+  [6] 20
+  [6] reg
+  [9] 0
+end
+
+format                     /* bit reverse within a byte */
+  ! 3 reverse
+  % reg
+  % regw
+  [5] opcode
+  [6] reg
+  [6] 27
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 priority    /* priority encode reg into regw, lsb is the top priority, ie, priority(8'b00010000) = 4 */
+  % reg
+  % regw
+  [5] opcode
+  [6] reg
+  [6] 21
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 7 setsect   /* set a section of pdata */
+  % section    /* 0 sets 17:0 of pdata with set_data, 1 sets 35:18, 2 sets 53:36, 3 sets 71:54 */
+  % set_data
+  [5] opcode
+  [7] 0
+  [2] section
+  [18] set_data
+end
+
+format
+  ! 10 preload   /* load stuff into pdata according to fhs format, check us.v */
+  % reg
+  [5] opcode
+  [6] reg
+  [6] 0
+  [6] -1
+  [9] 0
+end
+
+format  /* load register with pdata content, according to fhs format, check us.v */
+  ! 10 ialigned   /* all bits are in position */
+  % regw
+  [5] opcode
+  [6] -1
+  [6] 0
+  [6] regw
+  [9] 0
+end
+
+format  /* load register to another according to fhs format */
+  ! 10 aligned
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 0
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 4 branch
+  % addr
+  % flag
+  [5] opcode
+  [6] 1
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 call
+  % addr
+  % flag
+  [5] opcode
+  [6] 2
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 rtn
+  % flag
+  [5] opcode
+  [6] 3
+  [6] flag
+  [15] 0
+end
+
+format
+  ! 0x0d fetch          /* read from memory, data into pdata, address from immediate then mem_ptr */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 63
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x0d fetcht          /* read from memory, data into temp, address from immediate won't increment */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 2
+  [1] addr
+  [1] 1
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x1d ifetch         /* read from memory, data into pdata, address from regr then mem_ptr */
+  % num_bytes
+  % reg
+  [5] opcode
+  [6] 63
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] reg
+end
+
+format
+  ! 0x1d ifetcht         /* read from memory, data into temp, address from regr won't increment */
+  % num_bytes
+  % reg
+  [5] opcode
+  [6] 2
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] reg
+end
+
+format
+  ! 0x0c store          /* write to memory, data from pdata, address from immediate then mem_ptr */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 63
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x0c storet          /* write to memory, data from temp, address from immediate won't increment */
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] 2
+  [1] addr
+  [1] 1
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x1c istore        /* write pdata to memory, address from regaddr */
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] 63            
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+format
+  ! 0x1c istoret        /* write temp to memory, address from regaddr */
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] 2            
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+format
+  ! 0x0d crc         // read from memory, count from loopcnt, put crc result into pdata 
+  % addr
+  [5] opcode
+  [6] 63
+  [6] 0
+  [15] addr
+end
+
+format
+  ! 0x1d icrc         /* read from memory, address from reg, count from loopcnt, put crc result into pdata */
+  % reg
+  [5] opcode
+  [6] 63
+  [15] 0
+  [6] reg
+end
+
+
+format
+  ! 0x0c storer          /* write reg to memory, address from immediate then mem_ptr */
+  % reg
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] reg               
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+
+format
+  ! 0x1c istorer        /* write regr to memory, address from regaddr */
+  % regr
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] regr            
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+
+format
+  ! 0x0d fetchr          /* read reg from memory, address from immediate then mem_ptr */
+  % reg
+  % num_bytes
+  % addr
+  [5] opcode
+  [6] reg               
+  [1] addr
+  [1] 0
+  [4] num_bytes
+  [15] addr
+end
+
+format
+  ! 0x1d ifetchr        /* read regr from memory, address from regaddr */
+  % regr
+  % num_bytes
+  % regaddr
+  [5] opcode
+  [6] regr
+  [2] 0
+  [4] num_bytes
+  [9] 0
+  [6] regaddr
+end
+
+
+
+
+format
+  ! 0x0e jam
+  % immediate
+  % addr
+  [5] opcode
+  [3] 0
+  [16] addr
+  [8] immediate
+end
+
+format			/* 0x242... */
+  ! 4 nbranch
+  % addr
+  % flag
+  [5] opcode
+  [1] 1
+  [5] 1
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 ncall
+  % addr
+  % flag
+  [5] opcode
+  [1] 1
+  [5] 2
+  [6] flag
+  [15] addr
+end
+
+format
+  ! 4 nrtn
+  % flag
+  [5] opcode
+  [1] 1
+  [5] 3
+  [6] flag
+  [15] 0
+end
+
+format
+  ! 4 nop
+  % addr  /* no-op for addr+2 clocks */
+  [5] opcode
+  [6] 0     
+  [6] 0     /* always */ 
+  [15] addr
+end
+
+format
+  ! 4 clear_stack
+  [5] opcode
+  [6] 4
+  [6] 0    /* always */
+  [15] 0
+end
+
+format
+  ! 6 until
+  % reg
+  % flag
+  [5] opcode
+  [6] reg
+  [6] flag
+  [6] 1
+  [9] 0
+end
+  
+format
+  ! 6 correlate   /* quit if 1. flag is true 2, regr time up 3, found sync,(cond_true) */
+  % reg          /* expire counter to check against */
+  % flag
+  [5] opcode
+  [6] reg
+  [6] flag
+  [6] 2           /* correlate */
+  [9] 0           
+end
+
+format
+  ! 5 compare   /* sets cond flag,  if reg equals immediate */
+  % immediate
+  % reg
+  % mask
+  [5] opcode
+  [6] reg
+  [3] 0
+  [9] mask
+  [9] immediate
+end
+
+format
+  ! 0x15 icompare   /* sets cond flag,  if reg equals pdata */
+  % mask
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 0
+  [9] mask
+  [9] 0
+end
+
+format   /* sets cond. flag, if reg equals LS half of shift reg with MS half of reg being mask */
+  ! 5 iverify
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 2
+  [18] 0
+end
+
+format
+  ! 0x15 qisolate1
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [18] -1
+end
+
+format
+  ! 0x15 qisolate0
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [18] 0
+end
+
+	/* REVAB bug: cannot access bit above 35 */
+format
+  ! 5 isolate1
+  % addr
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [9] -1
+  [9] addr
+end
+
+format
+  ! 5 isolate0
+  % addr
+  % reg
+  [5] opcode
+  [6] reg
+  [3] 3
+  [9] 0
+  [9] addr
+end
+
+format
+  ! 11 setarg
+  % immediate
+  [5] opcode
+  [27] immediate
+end
+
+format
+  ! 0x1b arg
+  % immediate
+  % reg
+  [5] opcode
+  [6] reg
+  [21] immediate
+end
+
+  
+format
+  ! 0 sleep
+  [5] opcode
+  [27] 0
+end
+
+format
+  ! 0 snooze
+  [5] opcode
+  [6] -1
+  [21] 0
+end
+
+format
+  ! 0 revision
+  % rev_num
+  [5] opcode
+  [27] rev_num
+end
+
+format
+  ! 0x18 loop   /* branch when loopcnt is NOT zero, and decrease loopcnt */
+  % addr
+  [5] opcode
+  [4] 4
+  [8] 0
+  [15] addr
+end
+
+format
+  ! 0x18 beq   /* branch when pdata is equal to immediate */
+  % imme
+  % addr
+  [5] opcode
+  [4] 0
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bne   /* branch when pdata is NOT equal to immediate */
+  % imme
+  % addr
+  [5] opcode
+  [4] 1
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 rtneq   /* return when pdata is equal to immediate */
+  % imme
+  [5] opcode
+  [4] 2
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 rtnne   /* return when pdata is NOT equal to immediate */
+  % imme
+  [5] opcode
+  [4] 3
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 bbit1   /* branch when pdata's imme bit is 1 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 5
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bbit0   /* branch when pdata's imme bit is 0 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 6
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 rtnbit1   /* return when pdata's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 7
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 rtnbit0   /* return when pdata's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 8
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 8	bpatch
+  % imme
+  % addr
+  [5] opcode
+  [4] 9
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 8	bpatchx
+  % imme
+  % addr
+  [5] opcode
+  [4] 14
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bmark1   /* branch when mark's imme bit is 1 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 10
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 bmark0   /* branch when mark's imme bit is 0 */
+  % imme
+  % addr
+  [5] opcode
+  [4] 11
+  [8] imme
+  [15] addr
+end
+
+format
+  ! 0x18 rtnmark1   /* return when mark's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 12
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 0x18 rtnmark0   /* return when mark's imme bit is 0 */
+  % imme
+  [5] opcode
+  [4] 13
+  [8] imme
+  [15] 0
+end
+
+format
+  ! 3 mul32                  /* immediate mult regr */ 
+  % regr
+  % immediate                                  
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 31           
+  [6] regw
+  [9] immediate
+end
+
+format
+  ! 0x13 imul32           /* pdata mult regr 32x32=64bit */  
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 31                   
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 0x13 imults           /* pdata mult regr 32x32=64bit, signed */  
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 16
+  [6] regw
+  [9] 0
+end
+
+
+format
+  ! 3 byteswap
+  % regr
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 33
+  [6] regw
+  [9] 0
+end
+
+format
+  ! 3 shasx          /* SHA256 Sx operation, immediate is Sx */
+  % regr
+  % immediate
+  % regw
+  [5] opcode
+  [6] regr
+  [6] 28
+  [6] regw
+  [9] immediate
+end
+
+
+format
+  ! 0x13 regexrot 	/* regext[0] <- regext[7], regext[1] <- regext[0], regext[2] <- regext[1] ... */
+  [5] opcode
+  [6] 0
+  [6] 29
+  [6] null
+  [9] 0
+end
+
Index: mouse_public_3mode_usb/format/debug.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/debug.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/debug.format	(working copy)
@@ -0,0 +1,5 @@
+xmemalloc(
+
+1 mem_rf_debug_rx_gpio
+1 mem_rf_debug_tx_gpio
+)
Index: mouse_public_3mode_usb/format/g24_protocol_stack/24g.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g.format	(working copy)
@@ -0,0 +1,66 @@
+
+xmemalloc g24(
+34 mem_24g_rxbuf
+32 mem_24g_txbuf
+36 mem_24g_txpayload
+32 mem_24g_rxpayload
+1 mem_24g_rxdata_length
+1 mem_24g_pid
+1 mem_24g_no_ack
+3 mem_24g_sta_crc
+3 mem_24g_last_crc
+1 mem_24g_sta_pid
+1 mem_24g_last_pid
+1 mem_24g_datalen
+1 mem_24g_data_type
+1 mem_24g_txlen
+2 mem_24g_rx_window
+1 mem_24g_ch
+1 mem_24g_current_ch_number
+4 mem_24g_addr
+4 mem_24g_ch_map1
+4 mem_24g_ch_map2
+4 mem_24g_ch_map3
+4 mem_24g_ch_map4
+4 mem_24g_tx_btclk
+1 mem_24g_interval
+1 mem_24g_interval_min
+1 mem_24g_interval_max
+2 mem_24g_syncword
+1 mem_24g_syncword_crc8
+1 mem_24g_get_syncword_crc8
+1 mem_24g_pair_switch
+8 mem_24g_enter_hibernate
+
+1 mem_24g_rx_phy
+1 mem_24g_tx_phy
+
+1 mem_24g_ch_map_update
+4 mem_24g_ch_update_map1
+4 mem_24g_ch_update_map2
+4 mem_24g_ch_update_map3
+4 mem_24g_ch_update_map4
+
+1 mem_24g_disable_fec1
+)
+
+
+xmemalloc g24_tx(
+1 mem_rssi_hex_received
+
+)
+
+
+
+(//mem_24g_data_type
+1 TYPE_MS
+2 TYPE_KB
+0x07 bits_data
+//0-2 data type
+3 bit_abort
+4 bit_hop
+5 bit_sync
+//6-7 channel offset
+)
+
+
Index: mouse_public_3mode_usb/format/g24_protocol_stack/24g_pair.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_pair.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_pair.format	(working copy)
@@ -0,0 +1,51 @@
+
+
+xmemalloc g24(
+4 mem_24g_pair_addr
+1 mem_24g_pair_ch
+1 mem_24g_pair_tx_power
+
+)
+
+xmemalloc g24_tx(
+1 mem_24g_pair_sm
+1 mem_24g_pair_no_ack
+2 mem_24g_pair_timeout_init
+2 mem_24g_pair_timeout
+
+)
+
+xmemalloc g24_rx(
+1 mem_24g_device1_bind_step
+1 mem_24g_device2_bind_step
+1 mem_24g_bind_device_status
+8 mem_24g_bind_payload
+
+)
+
+(//mem_24g_pair_sm
+0 STATE_24G_PAIRING_NULL
+1 STATE_24G_PAIRING_1
+2 STATE_24G_PAIRING_2
+3 STATE_24G_PAIRING_3
+4 STATE_24G_PAIRING_4
+0X11 STATE_24G_PAIRING_1_WAITING_ACK
+0X12 STATE_24G_PAIRING_2_WAITING_ACK
+0X13 STATE_24G_PAIRING_3_WAITING_ACK
+0X14 STATE_24G_PAIRING_4_WAITING_ACK
+0XFF STATE_24G_PAIRING_SUCCESS
+)
+
+(
+0x01 DATATYPE_DEVICE1	//mouse
+0x02 DATATYPE_DEVICE2	//keyboard
+0xaa DATATYPE_BIND		//bind step 1
+0x55 DATATYPE_CONFIG	//bind step 2
+0x22 DATATYPE_OK		//bind step 3
+0xff DATATYPE_ATTEMP	//reconn
+0xaf DATATYPE_OTA
+)
+
+(
+5 BIND_MODE_CONTINUE
+)
Index: mouse_public_3mode_usb/format/g24_protocol_stack/24g_receiver.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_receiver.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_receiver.format	(working copy)
@@ -0,0 +1,50 @@
+
+
+xmemalloc g24_rx(
+2 mem_cb_24g_receive_process
+2 mem_cb_24g_ackpayload
+2 mem_cb_24g_data_device1
+2 mem_cb_24g_data_device2
+34 mem_24g_rxdata_temp
+1 mem_24g_abort_packet
+4 mem_24g_hop_btclk
+1 mem_24g_hop_interval
+1 mem_24g_pair_mode
+1 mem_24g_ackpayload_enable
+1 mem_24g_hop_packet
+1 mem_24g_mode_switch
+1 mem_24g_nodata_timer_enable
+
+1 mem_24g_mode_init
+1 mem_24g_work_mode
+1 mem_24g_time_slice
+1 mem_24g_self_last_ch
+1 mem_24g_self_ch_number
+1 mem_24g_self_config_ch_once
+1 mem_24g_device1_last_ch
+1 mem_24g_device1_ch_number
+1 mem_24g_device1_config_ch_once
+1 mem_24g_device2_last_ch
+1 mem_24g_device2_ch_number
+1 mem_24g_device2_config_ch_once
+1 mem_24g_led_status
+1 mem_24g_bind_mode_continue
+
+1 mem_tx_power_temp
+
+1 mem_24g_mode_B_S_switch
+1 mem_24g_mode_B_S_switch_init
+2 mem_24g_mode_B_S_switch_cnt
+1 mem_24g_mode_B_S_switch_exit
+1 mem_24g_B_S_time_slice
+1 mem_24g_B_S_mode_switch_disable
+
+1 mem_24g_bind_device_living
+)
+
+
+(
+0 bit_ack_24g
+)
+
+
Index: mouse_public_3mode_usb/format/g24_protocol_stack/24g_reconn.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_reconn.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_reconn.format	(working copy)
@@ -0,0 +1,30 @@
+xmemalloc g24_tx(
+2 mem_24g_reconn_timeout_init
+2 mem_24g_reconn_timeout
+2 mem_24g_reconn_count
+1 mem_24g_reconn_type
+1 mem_24g_fast_conn_enable
+4 mem_24g_fast_conn_addr
+4 mem_24g_receiver_addr
+1 mem_24g_fast_conn_temp_ch
+1 mem_24g_receiver_temp_ch
+1 mem_24g_device_temp_ch
+
+)
+
+xmemalloc g24_rx(
+4 mem_24g_transmitter_addr
+4 mem_24g_device1_addr
+4 mem_24g_device2_addr
+
+)
+
+(//mem_24g_reconn_type
+0 DEFAULT_24G_DEVICE
+1 FAST_CONN_AND_RECEIVER
+2 FAST_CONN_AND_3_0_ADDR
+3 RECEIVER_AND_3_0_ADDR
+4 PAIR_AND_3_0_ADDR
+5 PAIR_AND_RECEIVER
+)
+
Index: mouse_public_3mode_usb/format/g24_protocol_stack/24g_rssi.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_rssi.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_rssi.format	(working copy)
@@ -0,0 +1,40 @@
+
+xmemalloc g24(
+1 mem_rssi_buff_index
+)
+
+
+xmemalloc g24_tx(
+1 mem_rssi_signal_index
+2 mem_rssi_signal_buf_ptr
+
+)
+
+
+xmemalloc g24_rx(
+1 mem_rssi_noise_avg
+1 mem_rssi_noise_index
+
+1 mem_rssi_noise_self_avg
+1 mem_rssi_noise_device1_avg
+1 mem_rssi_noise_device2_avg
+1 mem_rssi_noise_self_index
+1 mem_rssi_noise_device1_index
+1 mem_rssi_noise_device2_index
+
+2 mem_rssi_noise_buffer_ptr
+2 mem_rssi_noise_self_buffer_ptr
+2 mem_rssi_noise_device1_buffer_ptr
+2 mem_rssi_noise_device2_buffer_ptr
+
+)
+
+
+
+(
+0x50 RSSI_THRESH_NOISE
+)
+
+
+
+
Index: mouse_public_3mode_usb/format/g24_protocol_stack/24g_transmitter.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_transmitter.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_transmitter.format	(working copy)
@@ -0,0 +1,66 @@
+
+
+xmemalloc g24_tx(
+2 mem_cb_24g_transmit_data
+2 mem_cb_24g_search_receiver
+2 mem_cb_24g_lpm_before
+
+1 mem_24g_conn_sm
+
+1 mem_24g_ensure
+2 mem_24g_txfail_cnt
+1 mem_24g_attempt_fail_flag
+
+1 mem_24g_retry
+1 mem_24g_abort_pac
+1 mem_24g_max_retry
+4 mem_24g_device_addr
+3 mem_24g_short_sleep_set
+8 mem_24g_long_sleep_set
+4 mem_24g_long_sleep_set1
+
+1 mem_24g_pac_index
+1 mem_24g_transmit_by_interrupt
+2 mem_24g_transmit_by_interrupt_exit_count
+2 mem_24g_transmit_by_interrupt_exit_count_init
+2 mem_24g_long_sleep_param_update_timer_init
+2 mem_24g_long_sleep_param_update_timer
+
+1 mem_24g_fast_hop_count
+)
+
+(
+1 NO_ACK_24G
+0 WITH_ACK_24G
+)
+
+(//mem_24g_conn_sm
+0 STATE_24G_STOP
+0 STATE_24G_START
+1 STATE_24G_PAIR
+2 STATE_24G_RECONN
+3 STATE_24G_OTA
+)
+
+(//mem_24g_transmit_by_interrupt
+1 G24_TX_TIMER_INT_ENABLE
+0 G24_TX_TIMER_INT_DISABLE
+)
+
+
+(
+1 OFFSET_DATA_TYPE
+2 OFFSET_LR_DATA_TYPE
+)
+
+(
+0x017700 G24_LONG_SLEEP_STEP1	//8ms
+0x36ee80 G24_LONG_SLEEP_STEP2	//300ms
+0x124f80 G24_LONG_SLEEP_STEP3	//100ms
+63500 G24_8MS_INTERVAL_PARAM	//8ms
+12210 G24_4MS_INTERVAL_PARAM
+4200 G24_2MS_INTERVAL_PARAM
+)
+
+
+
Index: mouse_public_3mode_usb/format/g24_protocol_stack/24g_txpower_ctrl.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_txpower_ctrl.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/g24_protocol_stack/24g_txpower_ctrl.format	(working copy)
@@ -0,0 +1,20 @@
+
+xmemalloc g24_tx(
+1 mem_rssi_avg_received
+1 mem_power_ctrl_level
+1 mem_power_ctrl_pac_succ_cnt
+1 mem_power_ctrl_pac_succ_cnt_init
+
+1 mem_rssi_dis_min_24g
+1 mem_rssi_dis_max_24g
+1 mem_rssi_hex_received_max_value
+
+1 mem_rssi_dis_min_ble
+1 mem_rssi_dis_max_ble
+)
+
+
+(
+50 POWER_CTRL_DECRS_THRESHOLD
+)
+
Index: mouse_public_3mode_usb/format/hci.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/hci.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/hci.format	(working copy)
@@ -0,0 +1,520 @@
+
+
+memalloc hci_boot(
+2 mem_hci_opcode_ocf
+1 mem_hci_opcode_ogf
+
+//event head
+1 mem_hci_event_head_type
+1 mem_hci_event_head_event_code
+1 mem_hci_event_para_total_length
+
+//command complete
+1 mem_hci_command_complete_num_hci_command_packet
+0 mem_hci_command_complete_command_opcode
+2 mem_hci_opcode
+0 mem_hci_command_complete_return_parameter
+1 mem_hci_command_complete_return_parameter_status
+0 mem_hci_command_complete_return_parameter_chip_id
+
+)
+
+xmemalloc hci_boot(
+1 mem_hci_uart_tx_gpio
+1 mem_hci_uart_rx_gpio
+1 mem_hci_uart_rts_gpio
+1 mem_hci_uart_cts_gpio
+1 mem_hci_pwm_12mhz_gpio
+)
+
+(
+0x0d HCI_UART_TX_GPIO_NUM
+0x0e HCI_UART_RX_GPIO_NUM
+0x09 HCI_UART_RTS_GPIO_NUM
+0x0a HCI_UART_CTS_GPIO_NUM
+0x0c HCI_PMW_12MHZ_GPIO_NUM
+)
+
+(
+0x00 COMMAND_SUCCEEDED
+0x01 COMMAND_UNKNOWN
+0x0c COMMAND_DISALLOWED
+)
+
+//HCI H4 Packet TYPE
+(
+0x01 HCI_H4_TYPE_CMD
+0x02 HCI_H4_TYPE_ACL
+0x04 HCI_H4_TYPE_EVENT
+)
+
+(
+0x00 BT_ACL_START_NO_FLUSH
+0x01 BT_ACL_CONT
+0x02 BT_ACL_START
+)
+
+// HCI command opcode group field values
+(
+0x01 HCI_OGF_LINK_CONTROL
+0x02 HCI_OGF_LINK_POLICY
+0x03 HCI_OGF_CONTROLLER_AND_BASEBAND
+0x04 HCI_OGF_INFOMATIONAL_PARAM
+0x05 HCI_OGF_STATUS_PARAM
+0x06 HCI_OGF_TEST
+0x08 HCI_OGF_LE_CONTROLLER
+0x3f HCI_OGF_VENDOR_SPECIFIC_DEBUG
+)
+
+// HCI link control opcode command field values, OGF=1
+(
+0x01 HCI_INQUIRY 
+0x02 HCI_INQUIRY_CANCEL 
+0x03 HCI_PERIODIC_INQUIRY_MODE 
+0x04 HCI_EXIT_PERIODIC_INQUIRY_MODE 
+0x05 HCI_CREATE_CONNECTION 
+0x06 HCI_DISCONNECT 
+0x07 HCI_ADD_SCO_CONNECTION 
+0x08 HCI_CREATE_CONNECTION_CANCEL
+0x09 HCI_ACCEPT_CONNECTION 
+0x0A HCI_REJECT_CONNECTION 
+0x0B HCI_LINK_KEY_REQUEST_REPLY 
+0x0C HCI_LINK_KEY_REQUEST_NEGATIVE_REPLY 
+0x0D HCI_PIN_CODE_REQUEST_REPLY 
+0x0E HCI_PIN_CODE_REQUEST_NEGATIVE_REPLY 
+0x0F HCI_CHANGE_CONNECTION_PACKET_TYPE 
+0x11 HCI_AUTHENTICATION_REQUESTED 
+0x13 HCI_SET_CONNECTION_ENCRYPTION 
+0x15 HCI_CHANGE_CONNECTION_LINK_KEY 
+0x17 HCI_MASTER_LINK_KEY 
+0x19 HCI_REMOTE_NAME_REQUEST 
+0x1A HCI_REMOTE_NAME_REQUEST_CANCEL
+0x1B HCI_READ_REMOTE_SUPPORTED_FEATURES 
+0x1C HCI_READ_REMOTE_EXT_FEATURES 
+0x1D HCI_READ_REMOTE_VERSION_INFORMATION 
+0x1F HCI_READ_CLOCK_OFFSET 
+0x20 HCI_READ_LMP_HANDLE
+0x28 HCI_SETUP_SCO_CONNECTION
+0x29 HCI_ACCEPT_SCO_CONNECTION
+0x2A HCI_REJECT_SCO_CONNECTION
+0x2B HCI_IO_CAP_REQUEST_REPLY
+0x2C HCI_USER_CONFIRMATION_REQUEST_REPLY
+0x2D HCI_USER_CONFIRMATION_REQUEST_NEGATIVE_REPLY
+0x2E HCI_USER_PASSKEY_REQUEST_REPLY
+0x2F HCI_USER_PASSKEY_REQUEST_NEGATIVE_REPLY
+0x30 HCI_REMOTE_OOB_DATA_REQUEST_REPLY
+0x33 HCI_REMOTE_OOB_DATA_REQUEST_NEGATIVE_REPLY
+0x34 HCI_IO_CAPABILITY_REQUEST_NEGATIVE_REPLY
+0x35 HCI_CREATE_PHYSICAL_LINK
+0x36 HCI_ACCEPT_PHYSICAL_LINK
+0x37 HCI_DISCONNECT_PHYSICAL_LINK
+0x38 HCI_CREATE_LOGICAL_LINK
+0x39 HCI_ACCEPT_LOGICAL_LINK
+0x3A HCI_DISCONNECT_LOGICAL_LINK
+0x3B HCI_LOGICAL_LINK_CANCEL
+0x3C HCI_FLOW_SPEC_MODIFY
+0x3D HCI_ENHANCED_SETUP_SYNCHRONOUS_CONNECTION
+0x3E HCI_ENHANCED_ACCEPT_SYNCHRONOUS_CONNECTION_REQUEST
+0x3F HCI_TRUNCATED_PAGE
+0x40 HCI_TRUNCATED_PAGE_CANCEL
+0x41 HCI_SET_CONNECTIONLESS_SLAVE_BROADCAST
+0x42 HCI_SET_CONNECTIONLESS_SLAVE_BROADCAST_RECEIVE
+0x43 HCI_START_SYNCHRONIZATION_TRAIN
+0x44 HCI_RECEIVE_SYNCHRONIZATION_TRAIN
+0x45 HCI_REMOTE_OOB_EXTENDED_DATA_REQUEST_REPLY
+)
+
+
+// HCI link policy commands OCF value, OGF=2
+(
+0x01 HCI_HOLD_MODE 
+0x03 HCI_SNIFF_MODE 
+0x04 HCI_EXIT_SNIFF_MODE 
+0x05 HCI_PARK_MODE 
+0x06 HCI_EXIT_PARK_MODE 
+0x07 HCI_QOS_SETUP 
+0x09 HCI_ROLE_DISCOVERY 
+0x0B HCI_SWITCH_ROLE 
+0x0C HCI_READ_LINK_POLICY_SETTINGS 
+0x0D HCI_WRITE_LINK_POLICY_SETTINGS 
+0x0e HCI_READ_DEFAULT_LINK_POLICY_SETTINGS
+0x0f HCI_WRITE_DEFAULT_LINK_POLICY_SETTINGS
+0x10 HCI_FLOW_SPECIFICATION
+0x11 HCI_SNIFF_SUBRATING
+)
+
+// HCI host controller and baseband commands OCF values, OGF=3
+(
+0x01 HCI_SET_EVENT_MASK 
+0x03 HCI_RESET 
+0x05 HCI_SET_EVENT_FILTER 
+0x08 HCI_FLUSH 
+0x09 HCI_READ_PIN_TYPE 
+0x0A HCI_WRITE_PIN_TYPE 
+0x0B HCI_CREATE_NEW_UNIT_KEY 
+0x0D HCI_READ_STORED_LINK_KEY 
+0x11 HCI_WRITE_STORED_LINK_KEY 
+0x12 HCI_DELETE_STORED_LINK_KEY 
+0x13 HCI_WRITE_LOCAL_NAME 
+0x14 HCI_READ_LOCAL_NAME 
+0x15 HCI_READ_CONN_ACCEPT_TIMEOUT 
+0x16 HCI_WRITE_CONN_ACCEPT_TIMEOUT 
+0x17 HCI_READ_PAGE_TIMEOUT 
+0x18 HCI_WRITE_PAGE_TIMEOUT 
+0x19 HCI_READ_SCAN_ENABLE 
+0x1A HCI_WRITE_SCAN_ENABLE 
+0x1B HCI_READ_PAGE_SCAN_ACTIVITY 
+0x1C HCI_WRITE_PAGE_SCAN_ACTIVITY 
+0x1D HCI_READ_INQUIRY_SCAN_ACTIVITY 
+0x1E HCI_WRITE_INQUIRY_SCAN_ACTIVITY 
+0x1F HCI_READ_AUTHENTICATION_ENABLE 
+0x20 HCI_WRITE_AUTHENTICATION_ENABLE 
+0x21 HCI_READ_ENCRYPTION_MODE 
+0x22 HCI_WRITE_ENCRYPTION_MODE 
+0x23 HCI_READ_CLASS_OF_DEVICE 
+0x24 HCI_WRITE_CLASS_OF_DEVICE 
+0x25 HCI_READ_VOICE_SETTING 
+0x26 HCI_WRITE_VOICE_SETTING 
+0x27 HCI_READ_AUTOMATIC_FLUSH_TIMEOUT 
+0x28 HCI_WRITE_AUTOMATIC_FLUSH_TIMEOUT 
+0x29 HCI_READ_NUM_BROADCAST_RETRANSMISSIONS 
+0x2A HCI_WRITE_NUM_BROADCAST_RETRANSMISSIONS 
+0x2B HCI_READ_HOLD_MODE_ACTIVITY 
+0x2C HCI_WRITE_HOLD_MODE_ACTIVITY 
+0x2D HCI_READ_TRANSMIT_POWER_LEVEL 
+0x2E HCI_READ_SCO_FLOW_CONTROL_ENABLE 
+0x2F HCI_WRITE_SCO_FLOW_CONTROL_ENABLE 
+0x31 HCI_SET_CONTROLLER_TO_HOST_FLOW_CONTROL 
+0x33 HCI_HOST_BUFFER_SIZE 
+0x35 HCI_HOST_NUM_COMPLETED_PACKETS 
+0x36 HCI_READ_LINK_SUPERVISION_TIMEOUT 
+0x37 HCI_WRITE_LINK_SUPERVISION_TIMEOUT 
+0x38 HCI_READ_NUMBER_OF_SUPPORTED_IAC 
+0x39 HCI_READ_CURRENT_IAC_LAP 
+0x3A HCI_WRITE_CURRENT_IAC_LAP 
+0x3B HCI_READ_PAGE_SCAN_PERIOD_MODE 
+0x3C HCI_WRITE_PAGE_SCAN_PERIOD_MODE 
+0x3D HCI_READ_PAGE_SCAN_MODE 
+0x3E HCI_WRITE_PAGE_SCAN_MODE 
+0x3F HCI_SET_AFH_CHANNEL_CLASSIFICATION 
+
+
+0x42 HCI_READ_INQUIRY_SCAN_TYPE 
+0x43 HCI_WRITE_INQUIRY_SCAN_TYPE 
+0x44 HCI_READ_INQUIRY_MODE 
+0x45 HCI_WRITE_INQUIRY_MODE 
+0x46 HCI_READ_PAGE_SCAN_TYPE 
+0x47 HCI_WRITE_PAGE_SCAN_TYPE 
+
+0x48 HCI_READ_AFH_CHANNEL_ACCESSMENT_MODE 
+0x49 HCI_WRITE_AFH_CHANNEL_ACCESSMENT_MODE 
+0x51 HCI_READ_EXTENDED_INQUIRY_RESPONSE
+0x52 HCI_WRITE_EXTENDED_INQUIRY_RESPONSE
+0x53 HCI_REFRESH_ENCRYPTION_KEY
+0x55 HCI_READ_SIMPLE_PAIRING_MODE
+0x56 HCI_WRITE_SIMPLE_PAIRING_MODE
+0x57 HCI_READ_LOCAL_OOB_DATA
+0x58 HCI_READ_INQUIRY_RESPONSE_TRANSMIT_POWER_LEVEL
+0x59 HCI_WRITE_INQUIRY_TRANSMIT_POWER_LEVEL
+0x60 HCI_SEND_KEYPRESS_NOTIFICATION
+0x5A HCI_READ_DEFAULT_ERRONEOUS_DATA_REPORTING
+0x5B HCI_WRITE_DEFAULT_ERRONEOUS_DATA_REPORTING
+0x5F HCI_ENHANCED_FLUSH
+0x61 HCI_READ_LOGICAL_LINK_ACCEPT_TIMEOUT
+0x62 HCI_WRITE_LOGICAL_LINK_ACCEPT_TIMEOUT
+0x63 HCI_SET_EVENT_MASK_PAGE_2
+0x64 HCI_READ_LOCATION_DATA
+0x65 HCI_WRITE_LOCATION_DATA
+0x66 HCI_READ_FLOW_CONTROL_MODE
+0x67 HCI_WRITE_FLOW_CONTROL_MODE
+0x68 HCI_READ_ENHANCE_TRANSMIT_POWER_LEVEL
+0x69 HCI_READ_BEST_EFFORT_FLUSH_TIMEOUT
+0x6A HCI_WRITE_BEST_EFFORT_FLUSH_TIMEOUT
+0x6B HCI_SHORT_RANGE_MODE
+0x6C HCI_READ_LE_HOST_SUPPORT
+0x6D HCI_WRITE_LE_HOST_SUPPORT
+0x6E HCI_SET_MWS_CHANNEL_PARAMETERS
+0x6F HCI_SET_EXTERNAL_FRAME_CONFIGURATION
+0x70 HCI_SET_MWS_SIGNALING
+0x71 HCI_SET_MWS_TRANSPORT_LAYER
+0x72 HCI_SET_MWS_SCAN_FREQUENCY_TABLE
+0x73 HCI_SET_MWS_PATTERN_CONFIGURATION
+0x74 HCI_SET_RESERVED_LT_ADDR
+0x75 HCI_DELETE_RESERVED_LT_ADDR
+0x76 HCI_SET_CONNECTIONLESS_SLAVE_BROADCAST_DATA
+0x77 HCI_READ_SYNCHRONIZATION_TRAIN_PARAMETERS
+0x78 HCI_WRITE_SYNCHRONIZATION_TRAIN_PARAMETERS
+0x79 HCI_READ_SECURE_CONNECTIONS_HOST_SUPPORT
+0x7A HCI_WRITE_SECURE_CONNECTIONS_HOST_SUPPORT
+0x7B HCI_READ_AUTHENTICATED_PAYLOAD_TIMEOUT
+0x7C HCI_WRITE_AUTHENTICATED_PAYLOAD_TIMEOUT
+0x7D HCI_READ_LOCAL_OOB_EXTENDED_DATA
+0x7E HCI_READ_EXTENDED_PAGE_TIMEOUT
+0x7F HCI_WRITE_EXTENDED_PAGE_TIMEOUT
+0x80 HCI_READ_EXTENDED_INQUIRY_LENGTH
+0x81 HCI_WRITE_EXTENDED_INQUIRY_LENGTH
+)
+
+
+// HCI informational parameters OCF values, OGF=4
+(
+0x01 HCI_READ_LOCAL_VERSION_INFORMATION 
+0x02 HCI_READ_LOCAL_SUPPORTED_COMMANDS
+0x03 HCI_READ_LOCAL_SUPPORTED_FEATURES 
+0x04 HCI_READ_LOCAL_EXT_FEATURES 
+0x05 HCI_READ_BUFFER_SIZE 
+0x07 HCI_READ_COUNTRY_CODE 
+0x09 HCI_READ_BD_ADDR 
+0x0A HCI_REJECT_CONNECTION_REQUEST
+0x0B HCI_READ_LOCAL_SUPPORTED_CODECS
+)
+
+// HCI status parameters OCF values, OGF=5
+(
+0x01 HCI_READ_FAILED_CONTACT_COUNTER 
+0x02 HCI_RESET_FAILED_CONTACT_COUNTER 
+0x03 HCI_GET_LINK_QUALITY 
+0x05 HCI_READ_RSSI 
+0x06 HCI_READ_AFH_CHANNEL_MAP
+0x07 HCI_READ_BD_CLOCK
+0x08 HCI_READ_ENCRYPTION_KEY_SIZE
+0x09 HCI_READ_LOCAL_AMP_INFO
+0x0A HCI_READ_LOCAL_AMP_ASSOC
+0x0B HCI_WRITE_REMOTE_AMP_ASSOC
+0x0C HCI_GET_MWS_TRANSPORT_LAYER_CONFIGURATION
+0x0D HCI_SET_TRIGGERED_CLOCK_CAPTURE
+)
+
+// HCI testing command OCF values, OGF=6
+(
+0x01 HCI_READ_LOOPBACK_MODE 
+0x02 HCI_WRITE_LOOPBACK_MODE 
+0x03 HCI_ENABLE_DEVICE_UNDER_TEST_MODE 
+0x04 HCI_WRITE_SIMPLE_PAIRING_DEBUG_MODE
+0x07 HCI_ENABLE_AMP_RECEIVER_REPORTS
+0x08 HCI_AMP_TEST_END
+0x09 HCI_AMP_TEST
+0x0A HCI_WRITE_SECURE_CONNECTIONS_TEST_MODE
+)
+
+// HCI vendor specific command OCF values -OGF=3F
+(
+0x01 HCI_WRITE_BD_ADDR 
+0x02 HCI_READ_INQUIRY_RESPONSE_TIMEOUT 
+0x03 HCI_WRITE_INQUIRY_RESPONSE_TIMEOUT 
+0x04 HCI_READ_PAGE_SCAN_REPETITION_MODE 
+0x05 HCI_WRITE_PAGE_SCAN_REPETITION_MODE 
+0x06 HCI_READ_PAGE_RESPONSE_TIMEOUT 
+0x07 HCI_WRITE_PAGE_RESPONSE_TIMEOUT 
+0x08 HCI_READ_NEW_CONNECTION_TIMEOUT 
+0x09 HCI_WRITE_NEW_CONNECTION_TIMEOUT 
+0x0a HCI_INITIALIZE_BASEBAND 
+0x0b HCI_WRITE_LOCAL_SUPPORTED_FEATURES 
+0x0c HCI_WRITE_PARK_PARAMETERS 
+0x0d HCI_READ_PARK_PARAMETERS 
+0x0e HCI_WRITE_QUALITY_OF_SERVICE 
+0x0f HCI_NOT_USED 
+0x10 HCI_MODIFY_BEACON_PARAMETERS 
+0x11 HCI_UNPARK_USING_PM_ADDR 
+0x12 HCI_WRITE_HOPPING_CHANNELS 
+0x13 HCI_SLEEP_FOREVER_MODE 
+0x14 HCI_WRITE_AUTO_PAGE_SCAN_ENABLE 
+0x15 HCI_READ_AUTO_PAGE_SCAN_ENABLE 
+0x16 HCI_SET_ENCRYPTION_KEY_SIZE 
+0x17 HCI_INVALIDATE_FLASH_AND_REBOOT 
+0x18 HCI_UPDATE_UART_BAUD_RATE 
+0x19 HCI_WRITE_GPIO_1_4_AS_OUTPUT 
+0x1A HCI_WRITE_GPIO_2_LED 
+0x1B HCI_SET_TESTMODE_TYPE 
+0x1C HCI_WRITE_SCO_PCM_INT_PARAM 
+0x1D HCI_READ_SCO_PCM_INT_PARAM 
+0x1E HCI_WRITE_PCM_DATA_FORMAT_PARAM 
+0x1F HCI_READ_PCM_DATA_FORMAT_PARAM 
+0x20 HCI_WRITE_COMFORT_NOISE_PARAM 
+0x21 HCI_READ_COMFORT_NOISE_PARAM 
+0x22 HCI_WRITE_SCO_TS 
+0x23 HCI_READ_SCO_TS 
+0x24 HCI_WRITE_PCM_LOOPBACK_MODE 
+0x25 HCI_READ_PCM_LOOPBACK_MODE 
+0x26 HCI_SET_TRANSMIT_POWER 
+0x27 HCI_SET_SLEEPMODE_PARAM 
+0x28 HCI_READ_SLEEPMODE_PARAM 
+0x29 HCI_SLEEPMODE_CMD 
+0x2A HCI_DELAY_PERIPHERAL_SCO_STARTUP 
+0x2B HCI_WRITE_RECEIVE_ONLY 
+0x2C HCI_WRITE_RATE_CONTROL 
+0x2D HCI_TX_UNMOD_CARRIER 
+0x2E HCI_DOWNLOAD_MINIDRIVER 
+0x2F HCI_CRYSTAL_PPM 
+0x30 HCI_SET_POWER_AMP_BIAS 
+0x31 HCI_SET_HAM_BEHAVIOR 
+0x32 HCI_SET_AFH_BEHAVIOR 
+0x33 HCI_READ_USER_DEFINED_NVRAM 
+0x34 HCI_ENABLE_RADIO 
+0x35 HCI_READ_DIAGNOSTIC_INFO 
+0x36 HCI_GET_HID_DEVICE_LIST 
+0x37 HCI_ADD_HID_DEVICE 
+0x38 HCI_READ_APP_FW_CONFIG_VERSION 
+0x39 HCI_DELETE_HID_DEVICE 
+0x3B HCI_ENABLE_USB_HID_EMULATION 
+// 0x3A available
+// 0x3B available
+0x3C HCI_SEND_LMPDU 
+0x3D HCI_AUTO_PAIR_REQ 
+0x3E HCI_READ_VS_EXTENSION 
+0x3F HCI_WRITE_VS_EXTENSION 
+
+0x77 HCI_OPCODE_FC77
+0x79 HCI_OPCODE_FC79
+0xC4 HCI_DOWNLOAD_PATCH
+0xCC HCI_OPCODE_FCCC
+
+0x00 HCI_VENDOR_CMD_RESET
+0x01 HCI_VENDOR_CMD_CHIPID
+0x02 HCI_VENDOR_CMD_BAUD
+0x03 HCI_VENDOR_CMD_PATCH
+0x04 HCI_VENDOR_CMD_PATCH_DONE
+0x05 HCI_VENDOR_CMD_ECHO
+0x06 HCI_VENDOR_CMD_BDADDR
+
+0x07 HCI_VENDOR_CMD_ENTER_LPM
+0x08 HCI_VENDOR_CMD_COMMU_READY
+
+0x10 HCI_VENDOR_CMD_MEM
+0x11 HCI_VENDOR_CMD_EEP
+
+0X12 HCI_VENDOR_CMD_PATCH_SEC_INIT
+0X13 HCI_VENDOR_CMD_PATCH_SEC
+0x14 HCI_VENDOR_CMD_SET_FLOW_CONTROL
+)
+
+//HCI LE controller command OCF values, OGF=8
+(
+0x01 HCI_LE_SET_EVENT_MASK
+0x02 HCI_LE_READ_BUFFER_SIZE
+0x03 HCI_LE_READ_LOCAL_SUPPORTED_FEATURES
+0x05 HCI_LE_SET_RANDOM_ADDRESS
+0x06 HCI_LE_SET_ADVERTISING_PARAMETERS
+0x07 HCI_LE_READ_ADVERTISING_CHANNEL_TX_POWER
+0x08 HCI_LE_SET_ADVERTISING_DATA
+0x09 HCI_LE_SET_SCAN_RESPONSE_DATA
+0x0A HCI_LE_SET_ADVERTISE_ENABLE
+0x0B HCI_LE_SET_SCAN_PARAMETERS
+0x0C HCI_LE_SET_SCAN_ENABLE
+0x0D HCI_LE_CREATE_CONNECTION
+0x0E HCI_LE_CREATE_CONNECTION_CANCEL
+0x0F HCI_LE_READ_WHITE_LIST_SIZE
+0x10 HCI_LE_CLEAR_WHITE_LIST
+0x11 HCI_LE_ADD_DEVICE_TO_WHITE_LIST
+0x12 HCI_LE_REMOVE_DEVICE_FROM_WHITE_LIST
+0x13 HCI_LE_CONNECTION_UPDATE
+0x14 HCI_LE_SET_HOST_CHANNEL_CLASSIFICATION
+0x15 HCI_LE_READ_CHANNEL_MAP
+0x16 HCI_LE_READ_REMOTE_USED_FEATURES
+0x17 HCI_LE_ENCRYPT
+0x18 HCI_LE_RAND
+0x19 HCI_LE_START_ENCRYPTION
+0x1A HCI_LE_LONG_TERM_KEY_REQUEST_REPLY
+0x1B HCI_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY
+0x1C HCI_LE_READ_SUPPORTED_STATES
+0x1D HCI_LE_RECEIVER_TEST
+0x1E HCI_LE_TRANSMITTER_TEST
+0x1F HCI_LE_TEST_END
+0x20 HCI_LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY
+0x21 HCI_LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY
+)
+// HCI event code
+(
+0x01 HCI_EVENT_INQUIRY_COMPLETE
+0x02 HCI_EVENT_INQUIRY_RESULT
+0x03 HCI_EVENT_CONNECTION_COMPLETE
+0x04 HCI_EVENT_CONNECTION_REQUEST
+0x05 HCI_EVENT_DISCONNECTION_COMPLETE
+0x06 HCI_EVENT_AUTHENTICATION_COMPLETE
+0x07 HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE
+0x08 HCI_EVENT_ENCRYPTION_CHANGE_COMPLETE
+0x09 HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE
+0x0A HCI_EVENT_MASTER_LINK_KEY_COMPLETE
+0x0B HCI_EVENT_READ_REMOTE_FEATURES_COMPLETE
+0x0C HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE
+0x0D HCI_EVENT_QOS_SETUP_COMPLETE
+0x0E HCI_EVENT_COMMAND_COMPLETE
+0x0F HCI_EVENT_COMMAND_STATUS
+0x10 HCI_EVENT_HARDWARE_ERROR
+0x11 HCI_EVENT_FLUSH_OCCURRED
+0x12 HCI_EVENT_ROLE_CHANGE
+0x13 HCI_EVENT_NUM_COMPLETED_PACKETS
+0x14 HCI_EVENT_MODE_CHANGE
+0x15 HCI_EVENT_RETURN_LINK_KEYS
+0x16 HCI_EVENT_PIN_CODE_REQUEST
+0x17 HCI_EVENT_LINK_KEY_REQUEST
+0x18 HCI_EVENT_LINK_KEY_NOTIFICATION
+0x19 HCI_EVENT_LOOPBACK_COMMAND
+0x1A HCI_EVENT_DATA_BUFFER_OVERFLOW
+0x1B HCI_EVENT_MAX_SLOTS_CHANGE
+0x1C HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE
+0x1D HCI_EVENT_CONNECTION_PACKET_TYPE_CHANGED
+0x1E HCI_EVENT_QOS_VIOLATION
+0x1F HCI_EVENT_PAGE_SCAN_MODE_CHANGE
+0x20 HCI_EVENT_PAGE_SCAN_REPETITION_MODE_CHANGE
+0x21 HCI_EVENT_FLOW_SPECIFICATION_COMPLETE
+0x22 HCI_EVENT_INQUIRY_RESULT_WITHRSSI
+0x23 HCI_EVENT_READ_REMOTE_EXT_FEATURES_COMPLETE
+0x2C HCI_EVENT_SCO_CONNECTION_COMPLETE
+0x2D HCI_EVENT_SCO_CONNECTION_CHANGED
+0x2E HCI_EVENT_SNIFF_SUBRATING
+0x2F HCI_EVENT_EXT_INQUIRY_RESULT
+0x30 HCI_EVENT_ENCRYPT_KEY_REFRESH_COMPLETE
+0x31 HCI_EVENT_IO_CAP_REQ
+0x32 HCI_EVENT_IO_CAP_RESPONSE
+0x33 HCI_EVENT_USER_CONFIRMATION_REQUEST
+0x34 HCI_EVENT_UESR_PASSKEY_REQUEST
+0x35 HCI_EVENT_REMOTE_OOB_DATA_REQUEST
+0x36 HCI_EVENT_SIMPLE_PAIRING_COMPLETE
+0x38 HCI_EVENT_LINK_SUPERVISION_TIMEOUT_CHANGED
+0x39 HCI_EVENT_ENHANCED_FLUSH_COMPLETE
+0x3B HCI_EVENT_USER_PASSKEY_NOTIFICATION
+0x3C HCI_EVENT_KEYPRESS_NOTIFICATION
+0x3D HCI_EVENT_REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION 
+0x3E HCI_EVENT_LE_META_EVENT
+0x40 HCI_EVENT_PHYSICAL_LINK_COMPLETE
+0x41 HCI_EVENT_CHANNEL_SELECTED
+0x42 HCI_EVENT_DISCONNECTION_PHYSICAL_LINK_COMPLETE
+0x43 HCI_EVENT_PHYSICAL_LINK_LOSS_EARLY_WARNING
+0x44 HCI_EVENT_PHYSICAL_LINK_RECOVERY
+0x45 HCI_EVENT_LOGICAL_LINK_COMPLETE
+0x46 HCI_EVENT_DISCONNECTION_LOGICAL_LINK_COMPLETE
+0x47 HCI_EVENT_FLOW_SPEC_MODIFY_COMPLETE
+0x48 HCI_EVENT_NUMBER_OF_COMPLETED_DATA_BLOCKS
+0x49 HCI_EVENT_AMP_START_TEST
+0x4A HCI_EVENT_AMP_TEST_END
+0x4B HCI_EVENT_AMP_RECEIVER_REPORT
+0x4C HCI_EVENT_SHORT_RANGE_MODE_CHANGE_COMPLETE
+0x4D HCI_EVENT_AMP_STATUS_CHANGE
+0x4E HCI_EVENT_TRIGGERED_CLOCK_CAPTURE
+0x4F HCI_EVENT_SYNCHRONIZATION_TRAIN_COMPLETE
+0x50 HCI_EVENT_SYNCHRONIZATION_TRAIN_RECEIVED
+0x51 HCI_EVENT_CONNECTIONLESS_SLAVE_BROADCAST_RECEIVE
+0x52 HCI_EVENT_CONNECTIONLESS_SLAVE_BROADCAST_TIMEOUT
+0x53 HCI_EVENT_TRUNCATED_PAGE_COMPLETE
+0x54 HCI_EVENT_SLAVE_PAGE_RESPONSE_TIMEOUT
+0x55 HCI_EVENT_CONNECTIONLESS_SLAVE_BROADCAST_CHANNEL_MAP_CHANGE
+0x56 HCI_EVENT_INQUIRY_RESPONSE_NOTIFICATION
+0x57 HCI_EVENT_AUTHENTICATED_PAYLOAD_TIMEOUT_EXPIRED
+
+0xFE HCI_EVENT_LOGO_TESTING
+0xFF HCI_EVENT_VENDOR_SPECIFIC
+)
+(
+0x01 HCI_VENDOR_EVENT_COMMU_READY
+)
+//HCI LE SUBEVENT CODE
+(
+0x01 HCI_LE_SUBEVENT_CONN_COMPLETE
+0x02 HCI_LE_SUBEVENT_ADV_REPORT
+0x03 HCI_LE_SUBEVENT_CONN_UPDATE_COMPLETE
+0x04 HCI_LE_SUBEVENT_REMOTE_FEATURE_COMPLETE
+0x05 HCI_LE_SUBEVENT_LTK_REQUEST
+0x06 HCI_LE_SUBEVENT_REMOTE_CONN_PARAM_REQ
+)
+
Index: mouse_public_3mode_usb/format/kscan_peipherals.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/kscan_peipherals.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/kscan_peipherals.format	(working copy)
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+//0 mem_kscan_head_ptr
+//1 mem_col_num
+//1 mem_row_num
+//4 mem_col_conf_pin
+//4 mem_row_conf_pin
+//1 mem_row_count
+//1 mem_count_shift
+//2 mem_kscan_value_temp
+//2 mem_kscan_lastvalue
+//2 mem_kscan_value
+//4 mem_btclk_kscan
+//1 mem_btclk_kscan_interval
+
+
+0x00 KEYSCAN_OFFECT_COL_NUM
+0x01 KEYSCAN_OFFECT_ROW_NUM
+0x02 KEYSCAN_OFFECT_COL_CONF_PIN
+0x06 KEYSCAN_OFFECT_ROW_CONF_PIN
+
+0x0a KEYSCAN_OFFECT_ROW_COUNT
+0x0b KEYSCAN_OFFECT_SHIFT_COUNT
+
+0X0C KEYSCAN_OFFECT_VALUE_TEMP
+0X0E KEYSCAN_OFFECT_LASVALUE
+0X10 KEYSCAN_OFFECT_VALUE
+0x12 KEYSCAN_OFFECT_BTCLK
+0x16 KEYSCAN_OFFECT_BTCLK_INTERVAL
+
+
Index: mouse_public_3mode_usb/format/l2cap.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/l2cap.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/l2cap.format	(working copy)
@@ -0,0 +1,443 @@
+
+memalloc(
+0 mem_l2cap_mem_start
+// L2CAP RX 
+2 mem_l2cap_rxbuff1_len
+2 mem_l2cap_rxbuff2_len
+2 mem_l2cap_rxbuff_new
+1 mem_l2cap_rxbuff_inuse
+2 mem_l2cap_payload_ptr
+2 mem_l2cap_rx_pkt_length
+2 mem_l2cap_rx_cid
+1 mem_l2cap_rx_done
+
+
+
+// L2CAP TX Signal channel
+2 mem_l2cap_signal_tx_buff_ptr
+2 mem_l2cap_signal_tx_payload_ptr
+2 mem_l2cap_signal_tx_length
+// L2CAP TX SDP channel
+2 mem_sdp_tx_buff_ptr
+2 mem_sdp_tx_payload_ptr
+2 mem_sdp_tx_pkt_length
+// L2CAP TX RFCOMM channel
+2 mem_rfcomm_tx_buff_ptr
+2 mem_rfcomm_tx_payload_ptr
+2 mem_rfcomm_tx_pkt_length
+
+
+
+//L2CAP Util
+
+2 memL2CAP_T1
+
+1 mem_CONTROL_tasks
+1 mem_send_config_req
+
+
+1 mem_config_identifier
+2 mem_config_req_dest_CID
+1 mem_rfcomm_malloc_fail_flag
+
+//L2CAP STATE MACHINE
+1 mem_message_to_uppersm
+1 mem_upper_sm_remote_page
+1 mem_upper_sm_reconn
+1 mem_upper_sm_ss
+
+
+64 mem_tx_malloc_log
+0 mem_l2cap_mem_end
+
+
+2 mem_scid
+2 mem_cmd_length
+2 mem_tt2
+2 mem_tt3
+2 mem_id
+2 mem_psm
+
+
+4 mem_l2cap_sdpres_delay_time
+)
+
+xmemalloc(
+0 mem_l2cap_xmem_start
+//*******************L2CAP TX MULTI-PACKET*********************//
+2 mem_l2cap_tx_multi_offset //0 means single packet
+
+//*******************CHANNEL ID*********************//
+2 mem_sdp_remote_cid
+2 mem_rfcomm_remote_cid
+2 mem_hid_ctrl_remote_cid
+2 mem_hid_int_remote_cid
+//*******************CHANNEL STATE*********************//
+1 mem_sdp_state
+1 mem_rfcomm_state
+1 mem_hid_control_state
+1 mem_hid_interrupt_state
+1 mem_spp_state
+1 mem_ML2CAP_comm_id
+
+//*******************L2CAP malloc********************//
+1 mem_used_map
+0 mem_tx_fifo0
+1 mem_tx_fifo0_map
+2 mem_tx_fifo0_ptr
+0 mem_tx_fifo1
+1 mem_tx_fifo1_map
+2 mem_tx_fifo1_ptr
+0 mem_tx_fifo2
+1 mem_tx_fifo2_map
+2 mem_tx_fifo2_ptr
+0 mem_tx_fifo3
+1 mem_tx_fifo3_map
+2 mem_tx_fifo3_ptr
+0 mem_tx_fifo_end
+256 mem_l2cap_lpm_txbuf
+//*******************MISC*********************//
+1 mem_l2cap_flow_ctrl_flag
+1 mem_l2cap_pending_item
+1 mem_l2cap_rcv_hidtype
+0 mem_l2cap_xmem_end
+
+)
+
+
+//mem_l2cap_lpm_txbuf
+(
+256 l2cap_lpm_txbuf_len
+)
+
+(
+4 L2CAP_TX_FIFO_SIZE
+8 L2CAP_TX_BUFF_CNT
+
+)
+(
+0x0002 L2CAP_SIG_EXT_FEATRUE
+0x0003 L2CAP_SIG_FIX_FEATRUE
+)
+
+
+(
+0 HS_IDLE
+1 AG_INIT_CALL
+2 HS_INIT_CALL
+)
+(
+0 M_ACL_LINK_ABSENT
+1 M_ACL_LINK_EXIST
+)
+
+(
+0 L2CAP_INUSE_BUFF1
+1 L2CAP_INUSE_BUFF2
+)
+/* upper layer interface w/ lower layer */
+(
+1 MAX_NUM_LINKS_ALLOWED
+1 MAX_NUM_SCO_ALLOWED
+1 ACL_LINK_PRESENT
+0 ACL_LINK_ABSENT
+)
+(
+1 L2CAP_RX_DONE 
+0 L2CAP_RX_CLEAR
+)
+/* Scheduler */
+(
+0 L2CAP_DISCONNECT_INTERRUPT
+1 RFCOMM_wants_service
+2 L2CAP_sig_Tx_buff_full
+3 RFCOMM_Tx_buff_full
+4 SDP_Tx_buff_full
+5 got_complete_L2CAP_pkt	
+6 L2CAP_init_Config_Req
+7 L2CAP_DISCONNECT_CONTROL
+)
+
+/* mem_CONTROL_tasks2 */
+(
+0 UI_NEED_SERVICE
+)
+/* L2CAP logic channel identifiers (2 bytes) p.261 */
+(
+0x0001 L2CAP_signal_channel
+0x0050 L2CAP_SDP_channel
+0x0051 L2CAP_RFCOMM_channel
+0x0052 L2CAP_HID_Control_channel   
+0x0053 L2CAP_HID_Interrupt_channel
+0x0077 L2CAP_AVDTP_signal_channel		//------avdtp
+0x0078 L2CAP_AVDTP_media_channel
+0x0079 L2CAP_AVDTP_report_channel
+0x0080 L2CAP_AVDTP_recovery_channel
+0x00dd L2CAP_AVCTP_Control_channel
+)
+/* L2CAP signalling command codes (1 byte) p.284 */
+(
+0x00 reserved
+0x01 signal_cmd_reject
+0x02 signal_connect_req
+0x03 signal_connect_rsp
+0x04 signal_config_req
+0x05 signal_config_rsp
+0x06 signal_disconnect_req
+0x07 signal_disconnect_rsp
+0x08 signal_echo_req
+0x09 signal_echo_rsp
+0x0a signal_info_req
+0x0b signal_info_rsp
+)
+/* L2CAP signal_command_reject reason code (2 bytes), p.285 */
+(
+0x0000 cmd_not_understood
+0x0001 signalling_MTU_exceeded
+0x0002 invalid_CID_in_req
+)
+/* L2CAP PSM values used in signal_connect_req (2 bytes), p.286 */
+(
+0x0001 PSM_SDP
+0x0003 PSM_RFCOMM
+0x0005 PSM_TCS
+0x0011 PSM_HID_control
+0x0013 PSM_HID_interrupt
+0x0017 PSM_AVCTP
+0x0019 PSM_AVDTP
+)
+/* L2CAP connection response result code (2 bytes), p.288 */
+(
+0x0000 L2CAP_connect_successful
+0x0001 L2CAP_connect_pending
+0x0002 L2CAP_connect_refused_PSM_unsupported
+0x0003 L2CAP_connect_refused_security_block
+0x0004 L2CAP_connect_refused_no_resources
+)
+/* L2CAP connection status values (2 bytes), p.288 */
+(
+0x0000 L2CAP_no_info_available
+0x0001 L2CAP_authentication_pending
+0x0002 L2CAP_authorization_pending
+)
+/* L2CAP configuration response result code (2 bytes), p.292 */
+(
+0x0000 L2CAP_config_success
+0x0001 L2CAP_config_failure_bad_parameters
+0x0002 L2CAP_config_failure_no_reason
+0x0003 L2CAP_config_failure_unknown_options
+)
+/* L2CAP constant definitions */
+(
+128 L2CAP_Rx_buff_size
+48  L2CAP_signal_Tx_buff_size
+128 SDP_Tx_buff_size
+128 RFCOMM_Tx_buff_size
+1 AM_ADDRESS
+3 DM1TYPE
+4 DH1TYPE
+11 DH3TYPE
+8 DVTYPE
+0 channel_state_closed
+1 channel_state_config
+2 channel_state_open
+0x0030 L2CAP_config_MTU_SDP
+0xffff L2CAP_config_ftimeout_SDP
+0x03e3 L2CAP_config_MTU_RFCOMM
+0xffff L2CAP_config_ftimeout_RFCOMM
+260 l2cap_max_pkt_len
+)
+
+(
+0 FAILURE
+1 SUCCESS
+2 IN_PROGRESS
+)
+(
+0x00	IDLE
+0x01	WAIT_4_BB_PAGE
+0x02	WAIT_4_LMP_CONN
+0x03	WAIT_4_SCO_CONN
+0x04	WAIT_4_SCO_KILLED
+)
+
+/*mem_master_mss*/
+(
+0 STOP_ENC
+1 SEND_SWITCH_REQ
+)
+(
+0 HF_HS_READY
+1 HF_AG_READY
+)
+/* mem_hf_state */
+(
+0 HF_STATE_WAITING_RFCOMM_CONN
+1 HF_STATE_HF_SEND_FEATURE
+2 HF_STATE_WAITING_AG_FEATURE_OK
+3 HF_STATE_HF_SEND_INDICATORS
+4 HF_STATE_WAITING_AG_INDICATORS_OK
+5 HF_STATE_HF_SEND_CURR_STATUS
+6 HF_STATE_WAITING_AG_STATUS_OK
+7 HF_STATE_HF_SEND_UPDATE_STATUS
+8 HF_STATE_WAITING_AG_UPDATE_STATUS_OK
+9 HF_STATE_CONNECTED
+0x0a HF_STATE_HF_SEND_RECEIVE_INFO
+0x0b HF_STATE_WAITING_AG_INFO
+0x0c HF_STATE_HF_SEND_AT_CLIP
+0x0d HF_STATE_WAITING_AT_CLIP
+0x0e HF_STATE_HF_SEND_AT_CCWA
+0x0f HF_STATE_WAITING_AT_CCWA
+)
+/*mem_hf_call_state*/
+(
+0 HF_CALL_STATE_INACTIVE
+1 HF_CALL_STATE_SETUP
+2 HF_CALL_STATE_ACTIVE 
+)
+/* mem_pairing_state bit definition */
+(
+0 PAIR_INQUIRY_START
+1 PAIR_INQUIRY_TIME_OUT
+2 PAIR_INQUIRY_FAILED
+3 PAIR_INQUIRY_SUCCESS
+4 PAIR_READY_CONN
+5 PAIR_WAIT_CANCEL_RESPONSE
+6 PAIR_CONN_SUCCESS
+7 PAIR_WAIT_DETACH
+)  
+
+/* mem_pairing_mode bit definition */
+(
+0 FORCE_AUTHENTICATION
+)
+/* mem_hid_protecol_type */
+(
+0 PROTECOL_BOOT /*default*/
+1 PROTECOL_REPORT
+)
+
+/* mem_upper_sm_reconn */
+(
+1 UPPERSM_SEND_SDP_CONN_REQ
+2 UPPERSM_SEND_SDP_CFG_REQ
+3 UPPERSM_SEND_SDP_HF_SS
+4 UPPERSM_SEND_SDP_DISC_REQ
+5 UPPERSM_SEND_RFCOMM_CONN_REQ
+6 UPPERSM_SEND_RFCOMM_CFG_REQ
+7 UPPERSM_SEND_SABM_CMD
+8 UPPERSM_SEND_DISC
+9 UPPERSM_SEND_WAIT
+10 UPPERSM_SEND_HID_CONTROL_CONN_REQ
+11 UPPERSM_SEND_HID_CONTROL_CFG_REQ
+12 UPPERSM_SEND_HID_INTERRUPT_CONN_REQ
+13 UPPERSM_SEND_HID_INTERRUPT_CFG_REQ
+14 UPPERSM_SEND_SDP_HS_SS
+15 UPPERSM_SEND_SDP_PBAP_SS
+16 UPPERSM_SEND_SDP_AVTARG_SS
+)
+/* mem_upper_sm_remote_page */
+(
+1 UPPERSM_RP_SEND_SDP_CONN_REQ
+2 UPPERSM_RP_SEND_SDP_CFG_REQ
+3 UPPERSM_RP_SEND_SDP_HF_SS
+4 UPPERSM_RP_SEND_SDP_HS_SS
+5 UPPERSM_RP_SEND_SDP_PBAP_SS
+6 UPPERSM_RP_SEND_SDP_AVTARG_SS
+7 UPPERSM_RP_SEND_SDP_DISC_REQ
+8 UPPERSM_RP_SEND_AVCTP_CONN_REQ
+9 UPPERSM_RP_SEND_AVCTP_CFG_REQ
+)
+
+/* mem_ML2CAP_flag */
+(
+0 MSCHEDULER_HID_CONTROL_CONN_DONE
+1 MSCHEDULER_HID_INTERRUPT_CONN_DONE
+2 MSCHEDULER_HID_CONTROL_CFG_REQ_DONE
+3 MSCHEDULER_HID_CONTROL_CFG_RSP_DONE
+4 MSCHEDULER_HID_INTERRUPT_CFG_REQ_DONE
+5 MSCHEDULER_HID_INTERRUPT_CFG_RSP_DONE
+6 MSCHEDULER_HID_CONTROL_DISC_DONE
+7 MSCHEDULER_HID_INTERRUPT_DISC_DONE
+)
+/*    ui event    --add by lj*/
+(
+0x00 UI_DATA_EVNET_NONE
+0x01 UI_DATA_EVNET_HID
+0x02 UI_DATA_EVNET_AVDTP_S
+0x03 UI_DATA_EVNET_AVDTP_M
+0x04 UI_DATA_EVNET_AVCTP
+0x05 UI_DATA_EVNET_HS
+0x06 UI_DATA_EVNET_HF
+0x07 UI_DATA_EVNET_SPP
+0x08 UI_DATA_EVNET_OBEX
+)
+/*    ui ack --add by lj*/
+(
+0x00 UI_DATA_TX_NONE
+0x01 UI_DATA_TX_HID
+0x02 UI_DATA_TX_AVDTP_S
+0x03 UI_DATA_TX_AVDTP_M
+0x04 UI_DATA_TX_AVCTP
+0x05 UI_DATA_TX_HS
+0x06 UI_DATA_TX_HF
+0x07 UI_DATA_TX_SPP
+0x08 UI_DATA_TX_OBEX
+0x10 ACL_TX_L2CAP_SIGNAL
+0x11 ACL_TX_SDP
+0x12 ACL_TX_RFCOMM
+
+)
+
+(
+0 L2CAP_SDP_interface_conn
+1 L2CAP_SDP_interface_cfg
+)
+
+(                                   
+0 L2CAP_CHANNEL_STATE_CONN_REQ      
+1 L2CAP_CHANNEL_STATE_CONN_RES      
+2 L2CAP_CHANNEL_STATE_SND_CFG_REQ   
+3 L2CAP_CHANNEL_STATE_SND_CFG_RES   
+4 L2CAP_CHANNEL_STATE_RCV_CFG_REQ   
+5 L2CAP_CHANNEL_STATE_RCV_CFG_RES
+6 L2CAP_CHANNEL_RFCOMM_ONLY_SABM
+7 L2CAP_CHANNEL_RFCOMM_ONLY_UA
+6 L2CAP_CHANNEL_AVDTP_SIGNAL_INIT //set avdtp init complete
+6 L2CAP_CHANNEL_HID_HANDSHAKE_DONE
+0x3f L2CAP_CHANNEL_SETUP_COMPLETE
+0x7f L2CAP_CHANNEL_AVDTP_SIGNAL_COMPLETE
+0xff L2CAP_CHANNEL_RFCOMM_DLCI0_OPENED
+)                                     
+
+/*  AVDTP---lj*/
+(
+0 L2CAP_AVDTP_SIGNAL_CONNECT
+1 L2CAP_AVDTP_SIGNAL_CONFIG
+2 L2CAP_AVDTP_MEDIA_CONNECT
+3 L2CAP_AVDTP_MEDIA_CONFIG
+4 L2CAP_AVDTP_REPORT_CONNECT
+5 L2CAP_AVDTP_REPORT_CONFIG
+6 L2CAP_AVDTP_RECOVERY_CONNECT
+7 L2CAP_AVDTP_RECOVERY_CONFIG
+)
+/*  AVCTP---lj*/
+(
+0 L2CAP_AVCTP_SIGNAL_CONNECT
+1 L2CAP_AVCTP_SIGNAL_CONFIG
+)
+
+127 L2CAP_SIGNAL_MALLOC_SIZE
+
+//1 mem_rfcomm_malloc_fail_flag
+(
+0 RFCOMM_MALLOC_SUCCEED
+1 RFCOMM_MALLOC_FAIL
+)
+
+//mem_l2cap_flow_ctrl_flag
+(
+0 L2CAP_FLOW_CTRL_DISABLE
+1 L2CAP_FLOW_CTRL_ENABLE
+)
+
Index: mouse_public_3mode_usb/format/lmp.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/lmp.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/lmp.format	(working copy)
@@ -0,0 +1,249 @@
+
+memalloc(
+
+1 mem_lmo_header_length
+1 mem_lmo_header_opcode
+17 mem_lmo_payload
+1 mem_lmi_accepted_opcode
+1 mem_disconn_reason_send
+1 mem_tx_fixed_freq
+1 mem_rx_fixed_freq
+1 mem_ext_features_page
+2 mem_lmpext_ssp_enable
+1 mem_remote_sppcap
+
+1 mem_lmp_conn_state
+2 mem_soft_timer
+1 mem_pincode_state
+
+1 mem_sres_tid
+1 mem_accptsco_tid
+
+1 mem_wait_encryption
+
+16 mem_sniff_payload
+4 mem_aurand_send_delay_time
+)
+
+xmemalloc(
+1 mem_lmo_header_opcode_x
+1 mem_lmp_version
+2 mem_lmp_compid
+2 mem_lmp_subversion
+1 mem_local_name_length
+3 mem_local_name
+64 mem_local_name2
+1 mem_local_name_end
+1 mem_unsniff2sniff_timer
+1 mem_switch_flag
+1 mem_classic_bt_flag
+1 mem_encapsulated_major_type
+1 mem_encapsulated_minor_type
+1 mem_encapsulated_len
+1 mem_remote_br_sc_support
+)
+
+	(
+	//bit flag:mem_classic_bt_flag
+	0 FLAG_SSP_REJECT_JUSTWORK
+	1 SHORT_MULT_FLAG
+	)
+	
+	(
+	//bit map
+	0 pair_state_inrand
+	1 pair_state_inrand_acpt
+	2 pair_state_send_comb
+	3 pair_state_recv_comb
+	4 pair_state_send_aurand
+	5 pair_state_recv_sres
+	6 pair_state_recv_aurand
+	7 pair_state_send_sres	
+	)
+	/* LMP opcodes */
+	(
+	1 LMP_NAME_REQ 
+	2 LMP_NAME_RES 
+	3 LMP_ACCEPTED 
+	4 LMP_NOT_ACCEPTED 
+	5 LMP_CLKOFFSET_REQ 
+	6 LMP_CLKOFFSET_RES 
+	7 LMP_DETACH 
+	8 LMP_IN_RAND 
+	9 LMP_COMB_KEY 
+	10 LMP_UNIT_KEY 
+	11 LMP_AU_RAND 
+	12 LMP_SRES 
+	13 LMP_TEMP_RAND 
+	14 LMP_TEMP_KEY 
+	15 LMP_ENCRYPTION_MODE_REQ 
+	16 LMP_ENCRYPTION_KEY_SIZE_REQ 
+	17 LMP_START_ENCRYPTION_REQ 
+	18 LMP_STOP_ENCRYPTION_REQ 
+	19 LMP_SWITCH_REQ 
+	20 LMP_HOLD
+	21 LMP_HOLD_REQ
+	23 LMP_SNIFF_REQ 
+	24 LMP_UNSNIFF_REQ 
+	26 LMP_PARK_REQ 
+	27 LMP_SET_BROADCAST_SCAN_WINDOW 
+	28 LMP_MODIFY_BEACON 
+	29 LMP_UNPARK_BD_ADDR_REQ 
+	30 LMP_UNPARK_PM_ADDR_REQ 
+	31 LMP_INCR_POWER_REQ 
+	32 LMP_DECR_POWER_REQ 
+	33 LMP_MAX_POWER 
+	34 LMP_MIN_POWER 
+	35 LMP_AUTO_RATE 
+	36 LMP_PREFERRED_RATE 
+	37 LMP_VERSION_REQ 
+	38 LMP_VERSION_RES 
+	39 LMP_FEATURES_REQ 
+	40 LMP_FEATURES_RES 
+	41 LMP_QUALITY_OF_SERVICE 
+	42 LMP_QUALITY_OF_SERVICE_REQ 
+	43 LMP_SCO_LINK_REQ 
+	44 LMP_REMOVE_SCO_LINK_REQ 
+	45 LMP_MAX_SLOT 
+	46 LMP_MAX_SLOT_REQ 
+	47 LMP_TIMING_ACCURACY_REQ 
+	48 LMP_TIMING_ACCURACY_RES 
+	49 LMP_SETUP_COMPLETE 
+	50 LMP_USE_SEMI_PERMANENT_KEY 
+	51 LMP_HOST_CONNECTION_REQ 
+	52 LMP_SLOT_OFFSET 
+	53 LMP_PAGE_MODE_REQ 
+	54 LMP_PAGE_SCAN_MODE_REQ 
+	55 LMP_SUPERVISION_TIMEOUT 
+	56 LMP_TEST_ACTIVATE
+	57 LMP_TEST_CONTROL
+	58 LMP_ENC_KEY_SIZE_MASK_REQ
+	59 LMP_ENC_KEY_SIZE_MASK_RES
+	60 LMP_SET_AFH
+
+	/* simple pairing support */
+	61 LMP_ENCAPSULATED_HEADER
+	62 LMP_ENCAPSULATED_PAYLOAD
+	63 LMP_SIMPLE_PAIRING_CONFIRM
+	64 LMP_SIMPLE_PAIRING_NUMBER
+	65 LMP_DHKEY_CHECK
+	127 LMP_ESCAPE
+	127 LMP_ESCAPE_4   /* add 2bytes LMP header support  */   
+	)
+	/* LMP EXT opcodes, ORed with bit 7 to make difference to nonEXT */
+	(
+	129 LMP_EXT_ACCEPTED
+	130 LMP_NOT_ACCEPTED_EXT
+	131 LMP_EXT_FEATURES_REQ
+	132 LMP_EXT_FEATURES_RES
+	139 LMP_PACKET_TYPE_TABLE_REQ
+	140 LMP_EXT_ESCO_LINK_REQ
+	141 LMP_EXT_REMOVE_ESCO_REQ
+	144 LMP_EXT_CHN_CLASSIFICATION_REQ
+	145 LMP_EXT_CHN_CLASSIFICATION
+	149 LMP_SNIFF_SUBRATING_REQ
+	150 LMP_SNIFF_SUBRATING_RES
+	151 LMP_PAUSE_ENCRYPTION_REQ
+	152 LMP_RESUME_ENCRYPTION_REQ
+	153 LMP_IO_CAP_REQ
+	154 LMP_IO_CAP_RES
+	161 LMP_PING_REQ
+	162 LMP_PING_RES
+	)
+	/* LMP reason codes */
+	(
+	0x05 AUTHENTICATION_FAILURE_ERROR
+	0x06 KEY_MISSING
+	0x0b ACL_CONNECTION_ALREADY_EXISTS
+	0x13 OTHER_END_TERMINATED
+	0x15 ABOUT_TO_POEWR_OFF
+	0x16 LOCAL_HOST
+	0x18 PAIRING_NOT_ALLOWED
+	0x19 UNKNOWN_LMP_PDU
+	0x1A UNSUPPORTED_LMP_FEATURE 
+	0x1F UNSPECIFIED_ERROR
+	0x20 UNSUPPORTED_PARAMETERS
+	0x21 SWITCH_NOT_ALLOWED
+	0x23 TRANSACTION_COLLISION
+	0x24 PDU_NOT_ALLOWED
+	0x25 ENCRYPTION_MODE_NOT_ACCEPTABLE
+	0x2e NOT_SUPPORT_CHN_CLASSIFICATION
+	0x37 NOT_SUPPORT_SSP
+	)
+
+	/* test mode scenarios */
+	(
+	0 PAUSE_TEST_MODE
+	1 ZERO_PATTERN
+	2 ONE_PATTERN
+	3 ALT_PATTERN
+	4 PSEUDORANDOM
+	5 CLOSED_LOOP_BACK_ACL
+	6 CLOSED_LOOP_BACK_SCO
+	7 ACL_WITHOUT_WHITENING
+	8 SCO_WITHOUT_WHITENING
+	9 ALT2_PATTERN
+	255 EXIT_TEST_MODE
+	)
+	/* test mode hoppig modes */
+	(
+	0 FIXED_FREQ
+	1 NORMAL_HOP
+	)
+
+	/* mem_lmp_tid indicates which type of LMP will be sent */
+	(
+	0 TID_NORM_REPLY
+	1 TID_NORM_SEND
+	2 TID_ONE
+	3 TID_ZERO
+	4 TID_PAIRING
+	5 TID_ENCRYPTION
+	6 TID_VARIABLE
+	7 TID_RX
+	)
+
+	/* ============== lmp status ==========*/
+	(
+	0 lmp_incoming
+	1 lmp_outgoing
+	2 lmp_reject_msg
+	3 lmp_clear_msg
+	4 upper_reject_msg
+	5 upper_clear_msg
+	)
+
+(
+0x2ee00 TIMER_ONE_MINUTE //96000*2
+80 TIMER_SWITCH_WAITE
+12 TIMER_ENPT_WAITE
+)
+
+(
+0 SWITCH_FLAG_INIT
+1 SWITCH_FLAG_ACCEPT
+2 SWITCH_FLAG_NOT_ACCEPT
+)
+(
+0 NULL_ENCRYP
+1 DONE_ENCRYP
+)
+
+
+(
+3 LMP_FEATURES_EXT_PAGE1_SC_HOST_BIT
+)
+
+(
+8 LMP_FEATURES_EXT_PAGE2_SC_CONTROLLER_BIT
+)
+
+
+//mem_remote_br_sc_support
+(
+0 REMOTE_BR_SC_HOST_BIT
+1 REMOTE_BR_SC_CONTROLLER_BIT
+)
+  
+
+
Index: mouse_public_3mode_usb/format/memblocks.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/memblocks.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/memblocks.format	(working copy)
@@ -0,0 +1,54 @@
+//
+//
+//Large memory blocks defined in this file.
+//Blocks Shall be defined with absolute address.
+//Blocks' length Shall be specified in comment following Blocks' names.
+//Different blocks MAY be overlap.
+//Blocks defined in this file Shall NOT be overlap with variable in memmap.format.
+
+// USB C51 exchange area
+(
+0xff0 mem_mcmd
+0xff1 mem_mouse_data
+)
+
+//l2cap RX buffers
+(
+0x1000 mem_le_l2cap_buf		//0x400
+0x1000 mem_l2cap_rxbuff1		//0x400
+0x1400 mem_l2cap_rxbuff2		//0x400
+//end address:0x17ff
+)
+//l2cap TX buffers
+(
+0x1800 mem_tx_buff0		//128
+0x0080 mem_bt_l2cap_tx_buff_size
+0x1400 mem_ble_tx_buff0
+0x0100 mem_ble_l2cap_tx_buff_size
+)
+
+(
+0x1800 mem_le_tx_buffer0
+0x1900 mem_le_tx_buffer1
+0x1a00 mem_le_tx_buffer2
+0x1b00 mem_le_tx_buffer3
+//end addr:0x1dff
+)
+
+
+//uart buffer
+(
+0x1800 mem_h5rx_buf//0x400
+0x1bff mem_h5rx_buf_end
+0x1c00 mem_h5tx_buf
+0x1fff mem_h5tx_buf_end
+)
+
+
+(
+0x1800 mem_ir_record
+0x1c      mem_ir_record_max
+)
+
+0x4c00 mem_savelist
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_access_layer.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_access_layer.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_access_layer.format	(working copy)
@@ -0,0 +1,348 @@
+
+memalloc ali_mesh(
+	1 mem_mesh_receive_model_message_payload_len
+	1 mem_mesh_receive_model_message_payload_opcode
+	23 mem_mesh_receive_model_message_payload
+
+	1 mem_mesh_access_layer_payload_len
+	0 mem_mesh_access_layer_payload
+	50 mem_mesh_access_payload
+	50 mem_mesh_access_payload_padding	//为了透传模块预留
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	3 mem_mesh_NETKeyindex_and_APPKeyindex
+	16 mem_mesh_receive_application_key
+)
+
+
+(//status codes
+0 STATUS_CODE_SUCCESS
+)
+
+
+// ali vendor message
+(
+0xD0 VENDOR_MESSAGE_ATTR_GET
+0xD1 VENDOR_MESSAGE_ATTR_SET
+0xD2 VENDOR_MESSAGE_ATTR_SET_UNACKNOWLEDGED
+0xD3 VENDOR_MESSAGE_ATTR_STATUS
+0xD4 VENDOR_MESSAGE_ATTR_INDICATION
+0xD5 VENDOR_MESSAGE_ATTR_CONFIRMATION
+0xCF VENDOR_MESSAGE_TRANSPARENT_MSG
+)
+
+
+
+(//configuration message and health message opcode
+0x80 MESH_CONFIGURATION_AND_HEALTH_MESSAGE_OPCODE_HEADER
+
+0x00 MESH_MESSAGE_OPCODE_CONFIG_APPKEY_ADD
+0x01 MESH_MESSAGE_OPCODE_CONFIG_APPKEY_UPDATE
+0x02 MESH_MESSAGE_OPCODE_CONFIG_COMPOSITION_DATA_STATUS
+0x03 MESH_MESSAGE_OPCODE_CONFIG_CONFIG_MODEL_PUBLICATION_SET
+0x04 MESH_MESSAGE_OPCODE_HEALTH_CURRENT_STATUS
+0x05 MESH_MESSAGE_OPCODE_HEALTH_FAULT_STATUS
+0x06 MESH_MESSAGE_OPCODE_CONFIG_HEARTBEAT_PUBLICATION_STATUS
+0x00 MESH_MESSAGE_OPCODE_CONFIG_APPKEY_DELETE_NO_HEAD
+0x01 MESH_MESSAGE_OPCODE_CONFIG_APPKEY_GET_NO_HEAD
+0x02 MESH_MESSAGE_OPCODE_CONFIG_APPKEY_LIST_NO_HEAD
+0x03 MESH_MESSAGE_OPCODE_CONFIG_APPKEY_STATUS_NO_HEAD
+0x04 MESH_MESSAGE_OPCODE_HEALTH_ATTENTION_GET_NO_HEAD
+0x05 MESH_MESSAGE_OPCODE_HEALTH_ATTENTION_SET_NO_HEAD
+0x06 MESH_MESSAGE_OPCODE_HEALTH_ATTENTION_SET_UNACKNOWLEDGED_NO_HEAD
+0x07 MESH_MESSAGE_OPCODE_HEALTH_ATTENTION_STATUS_NO_HEAD
+0x08 MESH_MESSAGE_OPCODE_CONFIG_COMPOSITION_DATA_GET_NO_HEAD
+0x09 MESH_MESSAGE_OPCODE_CONFIG_BEACON_GET_NO_HEAD
+0x0A MESH_MESSAGE_OPCODE_CONFIG_BEACON_SET_NO_HEAD
+0x0B MESH_MESSAGE_OPCODE_CONFIG_BEACON_STATUS_NO_HEAD
+0x0C MESH_MESSAGE_OPCODE_CONFIG_DEFAULT_TTL_GET_NO_HEAD
+0x0D MESH_MESSAGE_OPCODE_CONFIG_DEFAULT_TTL_SET_NO_HEAD
+0x0E MESH_MESSAGE_OPCODE_CONFIG_DEFAULT_TTL_STATUS_NO_HEAD
+0x0F MESH_MESSAGE_OPCODE_CONFIG_FRIEND_GET_NO_HEAD
+0x10 MESH_MESSAGE_OPCODE_CONFIG_FRIEND_SET_NO_HEAD
+0x11 MESH_MESSAGE_OPCODE_CONFIG_FRIEND_STATUS_NO_HEAD
+0x12 MESH_MESSAGE_OPCODE_CONFIG_GATT_PROXY_GET_NO_HEAD
+0x13 MESH_MESSAGE_OPCODE_CONFIG_GATT_PROXY_SET_NO_HEAD
+0x14 MESH_MESSAGE_OPCODE_CONFIG_GATT_PROXY_STATUS_NO_HEAD
+0x15 MESH_MESSAGE_OPCODE_CONFIG_KEY_REFRESH_PHASE_GET_NO_HEAD
+0x16 MESH_MESSAGE_OPCODE_CONFIG_KEY_REFRESH_PHASE_SET_NO_HEAD
+0x17 MESH_MESSAGE_OPCODE_CONFIG_KEY_REFRESH_PHASE_STATUS_NO_HEAD
+0x18 MESH_MESSAGE_OPCODE_CONFIG_MODEL_PUBLICATION_GET_NO_HEAD
+0x19 MESH_MESSAGE_OPCODE_CONFIG_MODEL_PUBLICATION_STATUS_NO_HEAD
+0x1A MESH_MESSAGE_OPCODE_CONFIG_MODEL_PUBLICATION_VIRTUAL_ADDRESS_SET_NO_HEAD
+0x1B MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_ADD_NO_HEAD
+0x1C MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_DELETE_NO_HEAD
+0x1D MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_DELETE_ALL_NO_HEAD
+0x1E MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_OVERWRITE_NO_HEAD
+0x1F MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_STATUS_NO_HEAD
+0x20 MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_VIRTUAL_ADDRESS_ADD_NO_HEAD
+0x21 MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_VIRTUAL_ADDRESS_DELETE_NO_HEAD
+0x22 MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_VIRTUAL_ADDRESS_OVERWRITE_NO_HEAD
+0x23 MESH_MESSAGE_OPCODE_CONFIG_NETWORK_TRANSMIT_GET_NO_HEAD
+0x24 MESH_MESSAGE_OPCODE_CONFIG_NETWORK_TRANSMIT_SET_NO_HEAD
+0x25 MESH_MESSAGE_OPCODE_CONFIG_NETWORK_TRANSMIT_STATUS_NO_HEAD
+0x26 MESH_MESSAGE_OPCODE_CONFIG_RELAY_GET_NO_HEAD
+0x27 MESH_MESSAGE_OPCODE_CONFIG_RELAY_SET_NO_HEAD
+0x28 MESH_MESSAGE_OPCODE_CONFIG_RELAY_STATUS_NO_HEAD
+0x29 MESH_MESSAGE_OPCODE_CONFIG_SIG_MODEL_SUBSCRIPTION_GET_NO_HEAD
+0x2A MESH_MESSAGE_OPCODE_CONFIG_SIG_MODEL_SUBSCRIPTION_LIST_NO_HEAD
+0x2B MESH_MESSAGE_OPCODE_CONFIG_VENDOR_MODEL_SUBSCRIPTION_GET_NO_HEAD
+0x2C MESH_MESSAGE_OPCODE_CONFIG_VENDOR_MODEL_SUBSCRIPTION_LIST_NO_HEAD
+0x2D MESH_MESSAGE_OPCODE_CONFIG_LOW_POWER_NODE_POLLTIMEOUT_GET_NO_HEAD
+0x2E MESH_MESSAGE_OPCODE_CONFIG_LOW_POWER_NODE_POLLTIMEOUT_STATUS_NO_HEAD
+0x2F MESH_MESSAGE_OPCODE_HEALTH_FAULT_CLEAR_NO_HEAD
+0x30 MESH_MESSAGE_OPCODE_HEALTH_FAULT_CLEAR_UNACKNOWLEDGED_NO_HEAD
+0x31 MESH_MESSAGE_OPCODE_HEALTH_FAULT_GET_NO_HEAD
+0x32 MESH_MESSAGE_OPCODE_HEALTH_FAULT_TEST_NO_HEAD
+0x33 MESH_MESSAGE_OPCODE_HEALTH_FAULT_TEST_UNACKNOWLEDGED_NO_HEAD
+0x34 MESH_MESSAGE_OPCODE_HEALTH_PERIOD_GET_NO_HEAD
+0x35 MESH_MESSAGE_OPCODE_HEALTH_PERIOD_SET_NO_HEAD
+0x36 MESH_MESSAGE_OPCODE_HEALTH_PERIOD_SET_UNACKNOWLEDGED_NO_HEAD
+0x37 MESH_MESSAGE_OPCODE_HEALTH_PERIOD_STATUS_NO_HEAD
+0x38 MESH_MESSAGE_OPCODE_CONFIG_HEARTBEAT_PUBLICATION_GET_NO_HEAD
+0x39 MESH_MESSAGE_OPCODE_CONFIG_HEARTBEAT_PUBLICATION_SET_NO_HEAD
+0x3A MESH_MESSAGE_OPCODE_CONFIG_HEARTBEAT_SUBSCRIPTION_GET_NO_HEAD
+0x3B MESH_MESSAGE_OPCODE_CONFIG_HEARTBEAT_SUBSCRIPTION_SET_NO_HEAD
+0x3C MESH_MESSAGE_OPCODE_CONFIG_HEARTBEAT_SUBSCRIPTION_STATUS_NO_HEAD
+0x3D MESH_MESSAGE_OPCODE_CONFIG_MODEL_APP_BIND_NO_HEAD
+0x3E MESH_MESSAGE_OPCODE_CONFIG_MODEL_APP_STATUS_NO_HEAD
+0x3F MESH_MESSAGE_OPCODE_CONFIG_MODEL_APP_UNBIND_NO_HEAD
+0x40 MESH_MESSAGE_OPCODE_CONFIG_NETKEY_ADD_NO_HEAD
+0x41 MESH_MESSAGE_OPCODE_CONFIG_NETKEY_DELETE_NO_HEAD
+0x42 MESH_MESSAGE_OPCODE_CONFIG_NETKEY_GET_NO_HEAD
+0x43 MESH_MESSAGE_OPCODE_CONFIG_NETKEY_LIST_NO_HEAD
+0x44 MESH_MESSAGE_OPCODE_CONFIG_NETKEY_STATUS_NO_HEAD
+0x45 MESH_MESSAGE_OPCODE_CONFIG_NETKEY_UPDATE_NO_HEAD
+0x46 MESH_MESSAGE_OPCODE_CONFIG_NODE_IDENTITY_GET_NO_HEAD
+0x47 MESH_MESSAGE_OPCODE_CONFIG_NODE_IDENTITY_SET_NO_HEAD
+0x48 MESH_MESSAGE_OPCODE_CONFIG_NODE_IDENTITY_STATUS_NO_HEAD
+0x49 MESH_MESSAGE_OPCODE_CONFIG_NODE_RESET_NO_HEAD
+0x4A MESH_MESSAGE_OPCODE_CONFIG_NODE_RESET_STATUS_NO_HEAD
+0x4B MESH_MESSAGE_OPCODE_CONFIG_SIG_MODEL_APP_GET_NO_HEAD
+0x4C MESH_MESSAGE_OPCODE_CONFIG_SIG_MODEL_APP_LIST_NO_HEAD
+0x4D MESH_MESSAGE_OPCODE_CONFIG_VENDOR_MODEL_APP_GET_NO_HEAD
+0x4E MESH_MESSAGE_OPCODE_CONFIG_VENDOR_MODEL_APP_LIST_NO_HEAD
+)
+
+(//Modle message opcode
+0x82 MESH_MODULE_MESSAGE_OPCODE_HEADER
+
+0x01 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONOFF_GET_NO_HEAD
+0x02 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONOFF_SET_NO_HEAD
+0x03 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONOFF_SET_UNACKNOWLEDGED_NO_HEAD
+0x04 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONOFF_STATUS_NO_HEAD
+0x05 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LEVEL_GET_NO_HEAD
+0x06 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LEVEL_SET_NO_HEAD
+0x07 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LEVEL_SET_UNACKNOWLEDGED_NO_HEAD
+0x08 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LEVEL_STATUS_NO_HEAD
+0x09 MESH_MODULE_MESSAGE_OPCODE_GENERIC_DELTA_SET_NO_HEAD
+0x0A MESH_MODULE_MESSAGE_OPCODE_GENERIC_DELTA_SET_UNACKNOWLEDGED_NO_HEAD
+0x0B MESH_MODULE_MESSAGE_OPCODE_GENERIC_MOVE_SET_NO_HEAD
+0x0C MESH_MODULE_MESSAGE_OPCODE_GENERIC_MOVE_SET_UNACKNOWLEDGED_NO_HEAD
+0x0D MESH_MODULE_MESSAGE_OPCODE_GENERIC_DEFAULT_TRANSITION_TIME_GET_NO_HEAD
+0x0E MESH_MODULE_MESSAGE_OPCODE_GENERIC_DEFAULT_TRANSITION_TIME_SET_NO_HEAD
+0x0F MESH_MODULE_MESSAGE_OPCODE_GENERIC_DEFAULT_TRANSITION_TIME_SET_UNACKNOWLEDGED_NO_HEAD
+0x10 MESH_MODULE_MESSAGE_OPCODE_GENERIC_DEFAULT_TRANSITION_TIME_STATUS_NO_HEAD
+0x11 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONPOWERUP_GET_NO_HEAD
+0x12 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONPOWERUP_STATUS_NO_HEAD
+0x13 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONPOWERUP_SET_NO_HEAD
+0x14 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONPOWERUP_SET_UNACKNOWLEDGED_NO_HEAD
+0x15 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_LEVEL_GET_NO_HEAD
+0x16 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_LEVEL_SET_NO_HEAD
+0x17 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_LEVEL_SET_UNACKNOWLEDGED_NO_HEAD
+0x18 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_LEVEL_STATUS_NO_HEAD
+0x19 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_LAST_GET_NO_HEAD
+0x1A MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_LAST_STATUS_NO_HEAD
+0x1B MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_DEFAULT_GET_NO_HEAD
+0x1C MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_DEFAULT_STATUS_NO_HEAD
+0x1D MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_RANGE_GET_NO_HEAD
+0x1E MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_RANGE_STATUS_NO_HEAD
+0x1F MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_DEFAULT_SET_NO_HEAD
+0x20 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_DEFAULT_SET_UNACKNOWLEDGED_NO_HEAD
+0x21 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_RANGE_SET_NO_HEAD
+0x22 MESH_MODULE_MESSAGE_OPCODE_GENERIC_POWER_RANGE_SET_UNACKNOWLEDGED_NO_HEAD
+0x23 MESH_MODULE_MESSAGE_OPCODE_GENERIC_BATTERY_GET_NO_HEAD
+0x24 MESH_MODULE_MESSAGE_OPCODE_GENERIC_BATTERY_STATUS_NO_HEAD
+0x25 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_GLOBAL_GET_NO_HEAD
+0x40 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_GLOBAL_STATUS
+0x26 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_LOCAL_GET_NO_HEAD
+0x27 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_LOCAL_STATUS_NO_HEAD
+0x41 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_GLOBAL_SET
+0x42 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_GLOBAL_SET_UNACKNOWLEDGED
+0x28 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_LOCAL_SET_NO_HEAD
+0x29 MESH_MODULE_MESSAGE_OPCODE_GENERIC_LOCATION_LOCAL_SET_UNACKNOWLEDGED_NO_HEAD
+0x2A MESH_MODULE_MESSAGE_OPCODE_GENERIC_MANUFACTURER_PROPERTIES_GET_NO_HEAD
+0x43 MESH_MODULE_MESSAGE_OPCODE_GENERIC_MANUFACTURER_PROPERTIES_STATUS
+0x2B MESH_MODULE_MESSAGE_OPCODE_GENERIC_MANUFACTURER_PROPERTY_GET_NO_HEAD
+0x44 MESH_MODULE_MESSAGE_OPCODE_GENERIC_MANUFACTURER_PROPERTY_SET
+0x45 MESH_MODULE_MESSAGE_OPCODE_GENERIC_MANUFACTURER_PROPERTY_SET_UNACKNOWLEDGED
+0x46 MESH_MODULE_MESSAGE_OPCODE_GENERIC_MANUFACTURER_PROPERTY_STATUS
+0x2C MESH_MODULE_MESSAGE_OPCODE_GENERIC_ADMIN_PROPERTIES_GET_NO_HEAD
+0x47 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ADMIN_PROPERTIES_STATUS
+0x2D MESH_MODULE_MESSAGE_OPCODE_GENERIC_ADMIN_PROPERTY_GET_NO_HEAD
+0x48 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ADMIN_PROPERTY_SET
+0x49 MESH_MODULE_MESSAGE_OPCODE_GENERIC_ADMIN_PROPERTY_SET_UNACKNOWLEDGED
+0x4A MESH_MODULE_MESSAGE_OPCODE_GENERIC_ADMIN_PROPERTY_STATUS
+0x2E MESH_MODULE_MESSAGE_OPCODE_GENERIC_USER_PROPERTIES_GET_NO_HEAD
+0x4B MESH_MODULE_MESSAGE_OPCODE_GENERIC_USER_PROPERTIES_STATUS
+0x2F MESH_MODULE_MESSAGE_OPCODE_GENERIC_USER_PROPERTY_GET_NO_HEAD
+0x4C MESH_MODULE_MESSAGE_OPCODE_GENERIC_USER_PROPERTY_SET
+0x4D MESH_MODULE_MESSAGE_OPCODE_GENERIC_USER_PROPERTY_SET_UNACKNOWLEDGED
+0x4E MESH_MODULE_MESSAGE_OPCODE_GENERIC_USER_PROPERTY_STATUS
+0x4F MESH_MODULE_MESSAGE_OPCODE_GENERIC_CLIENT_PROPERTIES_GET
+0x50 MESH_MODULE_MESSAGE_OPCODE_GENERIC_CLIENT_PROPERTIES_STATUS
+0x30 MESH_MODULE_MESSAGE_OPCODE_SENSOR_DESCRIPTOR_GET_NO_HEAD
+0x51 MESH_MODULE_MESSAGE_OPCODE_SENSOR_DESCRIPTOR_STATUS
+0x31 MESH_MODULE_MESSAGE_OPCODE_SENSOR_GET_NO_HEAD
+0x52 MESH_MODULE_MESSAGE_OPCODE_SENSOR_STATUS
+0x32 MESH_MODULE_MESSAGE_OPCODE_SENSOR_COLUMN_GET_NO_HEAD
+0x53 MESH_MODULE_MESSAGE_OPCODE_SENSOR_COLUMN_STATUS
+0x33 MESH_MODULE_MESSAGE_OPCODE_SENSOR_SERIES_GET_NO_HEAD
+0x54 MESH_MODULE_MESSAGE_OPCODE_SENSOR_SERIES_STATUS
+0x34 MESH_MODULE_MESSAGE_OPCODE_SENSOR_CADENCE_GET_NO_HEAD
+0x55 MESH_MODULE_MESSAGE_OPCODE_SENSOR_CADENCE_SET
+0x56 MESH_MODULE_MESSAGE_OPCODE_SENSOR_CADENCE_SET_UNACKNOWLEDGED
+0x57 MESH_MODULE_MESSAGE_OPCODE_SENSOR_CADENCE_STATUS
+0x35 MESH_MODULE_MESSAGE_OPCODE_SENSOR_SETTINGS_GET_NO_HEAD
+0x58 MESH_MODULE_MESSAGE_OPCODE_SENSOR_SETTINGS_STATUS
+0x36 MESH_MODULE_MESSAGE_OPCODE_SENSOR_SETTING_GET_NO_HEAD
+0x59 MESH_MODULE_MESSAGE_OPCODE_SENSOR_SETTING_SET
+0x5A MESH_MODULE_MESSAGE_OPCODE_SENSOR_SETTING_SET_UNACKNOWLEDGED
+0x5B MESH_MODULE_MESSAGE_OPCODE_SENSOR_SETTING_STATUS
+0x37 MESH_MODULE_MESSAGE_OPCODE_TIME_GET_NO_HEAD
+0x5C MESH_MODULE_MESSAGE_OPCODE_TIME_SET
+0x5D MESH_MODULE_MESSAGE_OPCODE_TIME_STATUS
+0x38 MESH_MODULE_MESSAGE_OPCODE_TIME_ROLE_GET_NO_HEAD
+0x39 MESH_MODULE_MESSAGE_OPCODE_TIME_ROLE_SET_NO_HEAD
+0x3A MESH_MODULE_MESSAGE_OPCODE_TIME_ROLE_STATUS_NO_HEAD
+0x3B MESH_MODULE_MESSAGE_OPCODE_TIME_ZONE_GET_NO_HEAD
+0x3C MESH_MODULE_MESSAGE_OPCODE_TIME_ZONE_SET_NO_HEAD
+0x3D MESH_MODULE_MESSAGE_OPCODE_TIME_ZONE_STATUS_NO_HEAD
+0x3E MESH_MODULE_MESSAGE_OPCODE_TAI_UTC_DELTA_GET_NO_HEAD
+0x3F MESH_MODULE_MESSAGE_OPCODE_TAI_UTC_DELTA_SET_NO_HEAD
+0x40 MESH_MODULE_MESSAGE_OPCODE_TAI_UTC_DELTA_STATUS_NO_HEAD
+0x41 MESH_MODULE_MESSAGE_OPCODE_SCENE_GET_NO_HEAD
+0x42 MESH_MODULE_MESSAGE_OPCODE_SCENE_RECALL_NO_HEAD
+0x43 MESH_MODULE_MESSAGE_OPCODE_SCENE_RECALL_UNACKNOWLEDGED_NO_HEAD
+0x5E MESH_MODULE_MESSAGE_OPCODE_SCENE_STATUS
+0x44 MESH_MODULE_MESSAGE_OPCODE_SCENE_REGISTER_GET_NO_HEAD
+0x45 MESH_MODULE_MESSAGE_OPCODE_SCENE_REGISTER_STATUS_NO_HEAD
+0x46 MESH_MODULE_MESSAGE_OPCODE_SCENE_STORE_NO_HEAD
+0x47 MESH_MODULE_MESSAGE_OPCODE_SCENE_STORE_UNACKNOWLEDGED_NO_HEAD
+0x9E MESH_MODULE_MESSAGE_OPCODE_SCENE_DELETE_NO_HEAD
+0x9F MESH_MODULE_MESSAGE_OPCODE_SCENE_DELETE_UNACKNOWLEDGED_NO_HEAD
+0x48 MESH_MODULE_MESSAGE_OPCODE_SCHEDULER_ACTION_GET_NO_HEAD
+0x5F MESH_MODULE_MESSAGE_OPCODE_SCHEDULER_ACTION_STATUS
+0x49 MESH_MODULE_MESSAGE_OPCODE_SCHEDULER_GET_NO_HEAD
+0x4A MESH_MODULE_MESSAGE_OPCODE_SCHEDULER_STATUS_NO_HEAD
+0x60 MESH_MODULE_MESSAGE_OPCODE_SCHEDULER_ACTION_SET
+0x61 MESH_MODULE_MESSAGE_OPCODE_SCHEDULER_ACTION_SET_UNACKNOWLEDGED
+0x4B MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_LIGHT_LIGHTNESS_GET_NO_HEAD
+0x4C MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_SET_NO_HEAD
+0x4D MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_SET_UNACKNOWLEDGED_NO_HEAD
+0x4E MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_STATUS_NO_HEAD
+0x4F MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_LINEAR_GET_NO_HEAD
+0x50 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_LINEAR_SET_NO_HEAD
+0x51 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_LINEAR_SET_UNACKNOWLEDGED_NO_HEAD
+0x52 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_LINEAR_STATUS_NO_HEAD
+0x53 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_LAST_GET_NO_HEAD
+0x54 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_LAST_STATUS_NO_HEAD
+0x55 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_DEFAULT_GET_NO_HEAD
+0x56 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_DEFAULT_STATUS_NO_HEAD
+0x57 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_RANGE_GET_NO_HEAD
+0x58 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_RANGE_STATUS_NO_HEAD
+0x59 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_DEFAULT_SET_NO_HEAD
+0x5A MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_DEFAULT_SET_UNACKNOWLEDGED_NO_HEAD
+0x5B MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_RANGE_SET_NO_HEAD
+0x5C MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_RANGE_SET_UNACKNOWLEDGED_NO_HEAD
+0x5D MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_GET_NO_HEAD
+0x5E MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_SET_NO_HEAD
+0x5F MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_SET_UNACKNOWLEDGED_NO_HEAD
+0x60 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_STATUS_NO_HEAD
+0x61 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_GET_NO_HEAD
+0x62 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_RANGE_GET_NO_HEAD
+0x63 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_RANGE_STATUS_NO_HEAD
+0x64 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_SET_NO_HEAD
+0x65 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_SET_UNACKNOWLEDGED_NO_HEAD
+0x66 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_STATUS_NO_HEAD
+0x67 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_DEFAULT_GET_NO_HEAD
+0x68 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_DEFAULT_STATUS_NO_HEAD
+0x69 MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_DEFAULT_SET_NO_HEAD
+0x6A MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_DEFAULT_SET_UNACKNOWLEDGED_NO_HEAD
+0x6B MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_RANGE_SET_NO_HEAD
+0x6C MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_TEMPERATURE_RANGE_SET_UNACKNOWLEDGED_NO_HEAD
+0x6D MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_GET_NO_HEAD
+0x6E MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_HUE_GET_NO_HEAD
+0x6F MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_HUE_SET_NO_HEAD
+0x70 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_HUE_SET_UNACKNOWLEDGED_NO_HEAD
+0x71 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_HUE_STATUS_NO_HEAD
+0x72 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_SATURATION_GET_NO_HEAD
+0x73 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_SATURATION_SET_NO_HEAD
+0x74 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_SATURATION_SET_UNACKNOWLEDGED_NO_HEAD
+0x75 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_SATURATION_STATUS_NO_HEAD
+0x76 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_SET_NO_HEAD
+0x77 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_SET_UNACKNOWLEDGED_NO_HEAD
+0x78 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_STATUS_NO_HEAD
+0x79 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_TARGET_GET_NO_HEAD
+0x7A MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_TARGET_STATUS_NO_HEAD
+0x7B MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_DEFAULT_GET_NO_HEAD
+0x7C MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_DEFAULT_STATUS_NO_HEAD
+0x7D MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_RANGE_GET_NO_HEAD
+0x7E MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_RANGE_STATUS_NO_HEAD
+0x7F MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_DEFAULT_SET_NO_HEAD
+0x80 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_DEFAULT_SET_UNACKNOWLEDGED_NO_HEAD
+0x81 MESH_MODULE_MESSAGE_OPCODE_LIGHT_HSL_RANGE_SET_NO_HEAD
+0x83 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_GET_NO_HEAD
+0x84 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_SET_NO_HEAD
+0x85 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_SET_UNACKNOWLEDGED_NO_HEAD
+0x86 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_STATUS_NO_HEAD
+0x87 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_TARGET_GET_NO_HEAD
+0x88 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_TARGET_STATUS_NO_HEAD
+0x89 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_DEFAULT_GET_NO_HEAD
+0x8A MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_DEFAULT_STATUS_NO_HEAD
+0x8B MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_RANGE_GET_NO_HEAD
+0x8C MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_RANGE_STATUS_NO_HEAD
+0x8D MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_DEFAULT_SET_NO_HEAD
+0x8E MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_DEFAULT_SET_UNACKNOWLEDGED_NO_HEAD
+0x8F MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_RANGE_SET_NO_HEAD
+0x90 MESH_MODULE_MESSAGE_OPCODE_LIGHT_XYL_RANGE_SET_UNACKNOWLEDGED_NO_HEAD
+0x91 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_MODE_GET_NO_HEAD
+0x92 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_MODE_SET_NO_HEAD
+0x93 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_MODE_SET_UNACKNOWLEDGED_NO_HEAD
+0x94 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_MODE_STATUS_NO_HEAD
+0x95 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_OM_GET_NO_HEAD
+0x96 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_OM_SET_NO_HEAD
+0x97 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_OM_SET_UNACKNOWLEDGED_NO_HEAD
+0x98 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_OM_STATUS_NO_HEAD
+0x99 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_LIGHT_ONOFF_GET_NO_HEAD
+0x9A MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_LIGHT_ONOFF_SET_NO_HEAD
+0x9B MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_LIGHT_ONOFF_SET_UNACKNOWLEDGED_NO_HEAD
+0x9C MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_LIGHT_ONOFF_STATUS_NO_HEAD
+0x9D MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_PROPERTY_GET_NO_HEAD
+0x62 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_PROPERTY_SET
+0x63 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_PROPERTY_SET_UNACKNOWLEDGED
+0x64 MESH_MODULE_MESSAGE_OPCODE_LIGHT_LC_PROPERTY_STATUS)
+
+// status code
+(
+0x00 MESH_SUCCESS
+0x01 MESH_INVALID_ADDRESS
+0x02 MESH_INVALID_MODEL
+0x03 MESH_INVALID_APPKEYINDEX
+0x04 MESH_INVALID_NETKEYINDEX
+0x05 MESH_INSUFFICIENT_RESOURCES
+0x06 MESH_KEYINDEX_ALREAD_STORED
+0x07 MESH_INVALID_PUBLISH_PARAMETERS
+0x08 MESH_NOT_A_SUBSCRIBE_MODEL
+0x09 MESH_STORAGE_FAILURE
+0x0a MESH_FEATURE_NOT_SUPPORTED
+0x0b MESH_CANNOT_UPDATE
+0x0c MESH_CANNOT_REMOVE
+0x0d MESH_CANNOT_BIND
+0x0e MESH_TEMPORARILY_UNABLE_TO_CHANGE_STATE
+0x0f MESH_CANNOT_SET
+0x10 MESH_UNSPECIFIED_ERROR
+0x11 MESH_INVALID_BINDING
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_ali_vendor_message.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_ali_vendor_message.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_ali_vendor_message.format	(working copy)
@@ -0,0 +1,149 @@
+
+xmemalloc ali_mesh(
+	1 mem_mesh_vendor_mesh_receive_tid
+	1 mem_mesh_vendor_mesh_send_tid
+
+	4 mem_mesh_vendor_timer_current_time
+	4 mem_system_time
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	2 mem_mesh_vendor_message_cid
+	1 mem_mesh_vendor_message_tid
+	2 mem_mesh_vendor_message_attr_type
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_header
+	0 mem_mesh_vendor_attr_parameter
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_delay_close_time_header
+	2 mem_mesh_vendor_delay_close_time
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_night_light_onoff_header
+	1 mem_mesh_vendor_night_light_onoff
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_color_header
+	2 mem_mesh_vendor_color_lightness
+	2 mem_mesh_vendor_color_hue
+	2 mem_mesh_vendor_color_saturation
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_back_light_onoff_header
+	1 mem_mesh_vendor_back_light_onoff
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_main_light_onoff_header
+	1 mem_mesh_vendor_main_light_onoff
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_standby_brightness_header
+	2 mem_mesh_vendor_standby_brightness
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_current_time_header
+	4 mem_mesh_vendor_message_current_time
+)
+
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_timer_header
+	1 mem_mesh_vendor_timer_timing_index
+	0 mem_mesh_vendor_timer_timing_index1
+	4 mem_mesh_vendor_timer_timing_time
+	2 mem_mesh_vendor_timer_timing_attr_type
+	1 mem_mesh_vendor_timer_timing_attr_para
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	5 mem_mesh_vendor_message_timer_cyclic_header
+	1 mem_mesh_vendor_timer_timing_index_cyclic
+	2 mem_mesh_vendor_timer_timing_time_cyclic
+	1 mem_mesh_vendor_timer_timing_weekdays_cyclic
+	2 mem_mesh_vendor_timer_timing_attr_type_cyclic
+	1 mem_mesh_vendor_timer_timing_attr_para_cyclic
+	1 mem_mesh_vendor_timer_timing_cyclic_flag
+)
+
+amemalloc mem_mesh_access_layer_payload(
+	//ali mesh vendor struct
+	1 mem_mesh_access_layer_payload_vendor_command
+	2 mem_mesh_access_layer_payload_vendor_CID
+	1 mem_mesh_access_layer_payload_vendor_tid
+	2 mem_mesh_access_layer_payload_vendor_attr_type
+	1 mem_mesh_access_layer_payload_vendor_attr_parameter
+)
+
+
+(
+0x00F0 VENDOR_MESSAGE_TMALL_DST
+)
+
+(// vendor model attribute
+0x0123 VENDOR_ATTR_COLOR_SERVER
+0x0100 VENDOR_ATTR_GENERIC_ONOFF_SERVER
+0x0121 VENDOR_ATTR_LIGHTNESS_LEVEL_SERVER
+0x0122 VENDOR_ATTR_COLOR_TEMPERATURE_SERVER
+0x0534 VENDOR_ATTR_MAIN_LIGHT_SERVER
+0x0533 VENDOR_ATTR_BACKGROUND_LIGHT_ONOFF_SERVER
+0xf004 VENDOR_ATTR_SCENE_SERVER
+)
+
+(//Timer opcode
+0x01A8 VENDOR_MESSAGE_OPCODE_COMPANY_ID
+//时间
+0xF01F VENDOR_MESSAGE_ATTR_TYPE_TIME
+//时区
+0xF01E VENDOR_MESSAGE_ATTR_TYPE_TIME_ZONE
+//对时
+0xF01D VENDOR_MESSAGE_ATTR_TYPE_ON_TIME
+//定时
+0xF010 VENDOR_MESSAGE_ATTR_TYPE_TIMING
+//周期定时
+0xF011 VENDOR_MESSAGE_ATTR_TYPE_CYCLE_TIMING
+//删除定时
+0xF012 VENDOR_MESSAGE_ATTR_TYPE_DELETE_TIMING
+
+//颜色
+0x0123 VENDOR_MESSAGE_ATTR_TYPE_COLOR
+//主灯
+0x0534 VENDOR_MESSAGE_ATTR_TYPE_MAIN_LIGHT
+//背光灯
+0x0533 VENDOR_MESSAGE_ATTR_TYPE_BACKGROUND_LIGHT
+)
+
+(//天猫event事件表
+//设备发生的事件，比如上电或者定时完成
+0xF009 VENDOR_ATTR_TYPE_EVENT_TRIGGER
+
+//天猫设备上电
+0x03 VENDOR_MESSAGE_EVENT_DEVICE_POWER_ON
+//天猫定时完成
+0x11 VENDOR_MESSAGE_EVENT_FINISH_TIMING
+)
+
+(
+0x80 VENDOR_MESSAGE_SEND_TID_MIN
+0xC0 VENDOR_MESSAGE_SEND_TID_MAX
+)
+
+(
+0x59 TIMER_CYCLICAL_FALG
+60 SECONDS_OF_MIN
+345600 SECONDS_OF_FOUR_DAYS
+604800 SECONDS_OF_WEEK
+86400 SECONDS_OF_DAY
+0x01e0 EIGHT_HOURS_TIME_ZONE_OFFSET
+
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_bearer_layer.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_bearer_layer.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_bearer_layer.format	(working copy)
@@ -0,0 +1,10 @@
+
+memalloc ali_mesh(
+	0 mem_mesh_queue_ele_temp
+	1 mem_mesh_queue_ele_duration
+	1 mem_mesh_queue_ele_gatt_msg_id
+	1 mem_mesh_queue_ele_len
+	31 mem_mesh_queue_ele_payload
+	1 mem_mesh_queue_ele_padding
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_ble_core_advertising.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_ble_core_advertising.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_ble_core_advertising.format	(working copy)
@@ -0,0 +1,26 @@
+
+memalloc ali_mesh(
+	39 mem_le_txheader_mesh_temp
+	
+)
+
+xmemalloc ali_mesh(
+
+	
+	1 mem_mesh_adv_data_len
+	31 mem_mesh_adv_data
+
+	1 mem_mesh_adv_scan_channel
+)
+
+
+(
+6 ADV_PACKET_MIN_LENGTH
+37 ADV_PACKET_MAX_LENGTH
+
+1 AD_TYPE_MIN_LENGTH
+30 AD_TYPE_MAX_LENGTH
+)
+
+
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_chip_peripherals.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_chip_peripherals.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_chip_peripherals.format	(working copy)
@@ -0,0 +1,34 @@
+
+
+amemalloc mem_temp_block0(
+	64 mem_mesh_subscription_eep_temp
+)
+
+(//transport mic cache parameter
+10 TRANSPORT_MIC_CACHE_SPACE_NUM
+4 TRANSPORT_MIC_CACHE_SPACE_SIZE
+//总长度少一个space
+36 TRANSPORT_MIC_CACHE_TOTAL_SIZE
+)
+
+(
+0x00 MESH_EEP_THREE_TUPLE_OFFSET
+0x1a MESH_EEP_NETWORK_KEY_OFFSET
+0x2d MESH_EEP_APPLICATION_KEY_OFFSET
+0x3d MESH_EEP_DEVICE_KEY_OFFSET
+0x4d MESH_EEP_RESET_COUNT_OFFSET
+0x4e MESH_EEP_SEQ_OFFSET
+0x51 MESH_EEP_SUBSCRIPTION_OFFSET
+)
+
+(
+0x1a MESH_EEP_THREE_TUPLE_LENGTH
+0x13 MESH_EEP_NETWORK_KEY_LENGTH
+0x10 MESH_EEP_APPLICATION_KEY_LENGTH
+0x10 MESH_EEP_DEVICE_KEY_LENGTH
+0x01 MESH_EEP_RESET_COUNT_LENGTH
+0x03 MESH_EEP_SEQ_LENGTH
+0x10 MESH_EEP_SUBSCRIPTION_LENGTH
+0x40 MESH_EEP_SUBSCRIPTION_TOTAL_LENGTH
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_control_ble_advertising.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_control_ble_advertising.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_control_ble_advertising.format	(working copy)
@@ -0,0 +1,57 @@
+
+
+xmemalloc ali_mesh(
+	1 mem_mesh_advertising_unprovisioned_device_beacon_switch
+	//未配网广播间隔
+	2 mem_mesh_advertising_unprovisioned_device_beacon_timer
+
+	//广播生存周期
+	1 mem_mesh_advertising_unprovisioned_device_beacon_duration
+	//广播周期之间的间隔
+	1 mem_mesh_advertising_unprovisioned_device_beacon_interval
+
+)
+
+(//mem_mesh_advertising_unprovisioned_device_beacon_switch
+0 DEVICE_BEACON_OFF
+1 DEVICE_BEACON_ON
+)
+
+(
+//未配网广播超时10min
+0x1770	ADV_UNPROVISIONED_DEVICE_BEACON_TIMEOUT
+//未配网广播间隔500ms
+5		ADV_UNPROVISIONED_DEVICE_BEACON_INTERVAL
+//未配网广播时长120ms=20ms*6
+6		ADV_UNPROVISIONED_DEVICE_BEACON_DURATION
+
+//静默广播超时:无
+0		ADV_SILENCE_DEVICE_BEACON_TIMEOUT
+//静默广播间隔60s
+600		ADV_SILENCE_DEVICE_BEACON_INTERVAL
+//静默广播时长120ms=20ms*6
+6		ADV_SILENCE_DEVICE_BEACON_DURATION
+
+
+//配网后广播间隔
+0x54		ADV_PAIRING_MESH_MESSAGE_INTERVAL
+//配网后广播时长
+20		ADV_PAIRING_MESH_MESSAGE_DURATION
+
+10		ADV_RELAY_MESH_MESSAGE_DURATION
+)
+
+(
+0x12 MAX_APP_MSSAGE_PAYLOAD_LENGTH
+7 BIT_OF_APP_PACKAGE_NUM
+6 BIT_OF_ADV_IN_OFF
+)
+
+(
+//mesh 回复APP广播间隔24*0.625ms = 15ms
+0x15 MESH_ADV_APP_MESSAGE_INTERVAL
+//mesh回复tmall广播间隔32*0.625ms = 20ms
+0x1d MESH_ADV_TMALL_MESSAGE_INTERVAL
+)
+
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_encrypt_function.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_encrypt_function.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_encrypt_function.format	(working copy)
@@ -0,0 +1,111 @@
+memalloc ali_mesh(
+	// sha256
+	0 mem_mesh_sha256_chunk_start
+	64 mem_mesh_sha256_chunk1
+	64 mem_mesh_sha256_chunk2
+	64 mem_mesh_sha256_chunk3
+	64 mem_mesh_sha256_chunk4
+
+	//obfuscation network PDU Header
+	0 mem_mesh_Privacy_Plaintext
+	5 mem_mesh_Privacy_Plaintext_Zero_String
+	4 mem_mesh_Privacy_Plaintext_IV_Index
+	0 mem_mesh_Privacy_Plaintext_Privacy_Random
+	2 mem_mesh_Privacy_Plaintext_Privacy_Random_EncDST
+	5 mem_mesh_Privacy_Plaintext_Privacy_Random_EncTransportPDU_or_NetMIC
+	16 mem_mesh_PECB
+
+	//basic function
+	//aes-ccm
+	2 mem_nonce_ptr
+	1 mem_ccm_data_len
+	2 mem_ccm_data_ptr
+	8 mem_ccm_mic
+	1 mem_ccm_type
+
+
+)
+
+xmemalloc ali_mesh(
+
+	0 mem_mesh_calc_ConfirmationCloud_data
+	8 mem_mesh_ConfirmationCloud_RandomB
+	8 mem_mesh_ConfirmationCloud_RandomA
+	16 mem_mesh_AuthValueProv
+	16 mem_mesh_ConfirmationCloud
+
+
+	//provisioning random  / provisioning_confirmation
+	0 mem_mesh_ConfirmationDevice
+	0 mem_mesh_calc_ConfirmationDevice_data
+	8 mem_mesh_provisioning_random_A
+	8 mem_mesh_provisioning_random_B
+	16 mem_mesh_AuthValueDevice
+
+	16 mem_mesh_Device_Key
+
+
+// CMAC Key
+	16 mem_mesh_Confirmationkey
+
+	//sha256 init data
+	15 mem_mesh_sha256_ConfirmationKey_ascii
+	10 mem_mesh_sha256_SessionKey_ascii
+	9 mem_mesh_sha256_DeviceKey_ascii
+
+	//sha256
+	1 mem_mesh_sha256_load_first_data_flag
+
+	8 mem_mesh_sha256_data_len_byte
+	8 mem_mesh_sha256_data_len_bit
+	2 mem_mesh_sha256_data_end_addr
+	2 mem_mesh_sha256_data_len_addr
+	1 mem_mesh_sha256_chunk_count
+	2 mem_mesh_sha256_chunk_data_ptr
+	2 mem_mesh_sha256_chunk_ptr
+
+
+	//function K2
+	//f2 input
+	1 mem_k2_P_len
+	16 mem_k2_P
+	16 mem_k2_N
+	//f2 init data
+	16 mem_k2_SALT
+	//f2 output
+	16 mem_k2_T
+	0 mem_k2_T0
+	16 mem_k2_T1
+	1 mem_k2_NID
+	16 mem_k2_T3
+	16 mem_k2_T2
+
+
+	//k4 function
+	16 mem_k4_SALT
+	16 mem_k4_T
+	16 mem_k4_id6_01
+	16 mem_k4_k4N
+	1 mem_mesh_transport_AID
+
+	16 mem_k3_SALT
+	16 mem_k3_T
+	5 mem_k3_id64_01
+	8 mem_k3_k4N
+	8 mem_mesh_network_id
+
+
+)
+
+(
+0x2c COMMA
+-4 DECREASED_FOUR
+
+)
+
+(
+0x19 MIC_SIZE_64BIT
+0x09 MIC_SIZE_32BIT
+)
+
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_fast_pairing.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_fast_pairing.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_fast_pairing.format	(working copy)
@@ -0,0 +1,182 @@
+memalloc ali_mesh(
+
+	16 mem_mesh_Device_UUID
+	
+	1 mem_mesh_receive_VID
+
+)
+
+
+xmemalloc ali_mesh(
+
+	// provisioning flag 标志是否入网
+	1 mem_mesh_provisioned_flag
+
+	//入网时的状态机
+	1 mem_mesh_Provisioning_State_Flag
+	
+	1 mem_mesh_Device_PID
+	1 mem_mesh_UUID_FeatureFlag
+	2 mem_mesh_PDU_RFU
+	2 mem_mesh_OOB_information
+
+	//Provisioning_Data
+	0 mem_mesh_Encrypt_Provisioning_Data
+	2 mem_mesh_provisioning_data_Mac_addr
+	1 mem_mesh_KeyFresh_and_Update_flag
+	16 mem_mesh_Network_Key
+	1 mem_mesh_last_IV_Index_byte
+	2 mem_mesh_Unicast_Address
+
+	4 mem_mesh_adv_last_time
+	2 mem_mesh_send_packet_timeout
+
+	1 mem_mesh_gatt_package_send_msg_id
+
+)
+
+
+(
+33 GATT_RECEIVE_MSG_BUFFER_SIZE
+)
+
+xmemalloc ali_mesh(
+//GATT 协议
+	1 mem_mesh_gatt_receive_msg_timer
+	//fast pairing 
+	//APP control 
+
+	GATT_RECEIVE_MSG_BUFFER_SIZE mem_mesh_gatt_packet_receive_msg_buffer1
+	GATT_RECEIVE_MSG_BUFFER_SIZE mem_mesh_gatt_packet_receive_msg_buffer2
+
+)
+
+amemalloc mem_mesh_queue_ele_temp(
+	2 mem_mesh_gatt_package_receive_msg_buffer_ptr
+	0 mem_mesh_gatt_package_receive_msg_buffer_temp
+	2 mem_mesh_gatt_package_receive_msg_id
+	0 mem_mesh_gatt_package_receive_MAC
+	1 mem_mesh_gatt_package_receive_msg_num
+	1 mem_mesh_gatt_package_receive_msg_total_length
+	29 mem_mesh_gatt_package_receive_msg_payload
+)
+
+amemalloc mem_mesh_Device_UUID(
+	2 mem_mesh_receive_service_uuid_company_id
+	1 mem_mesh_receive_service_uuid_vid
+	1 mem_mesh_receive_service_uuid_provisioning_type
+	2 mem_mesh_receive_service_uuid_mac
+	1 mem_mesh_receive_service_uuid_msg_id
+	1 mem_mesh_receive_service_uuid_package_num
+	1 mem_mesh_receive_service_uuid_length
+	7 mem_mesh_receive_service_uuid_payload_data
+)
+
+amemalloc mem_mesh_Device_UUID(
+	2 mem_mesh_receive_service_uuid_ios_data_company_id
+	1 mem_mesh_receive_service_uuid_ios_data_vid
+	1 mem_mesh_receive_service_uuid_ios_data_provisioning_type
+	1 mem_mesh_receive_service_uuid_ios_data_NID
+	1 mem_mesh_receive_service_uuid_ios_data_msg_id
+	1 mem_mesh_receive_service_uuid_ios_data_package_num
+	1 mem_mesh_receive_service_uuid_ios_data_length
+	8 mem_mesh_receive_service_uuid_ios_data_payload_data
+)
+
+
+(//mem_mesh_provisioned_flag
+0 PAIRED_STATUS
+1 UNPROVISIONED_BEACON_STATUS
+2 PAIRING_STATUS
+3 SILENCE_BEACON_STATUS
+4 RECEIVED_CONFIG_APPKEY_ADD
+)
+
+(//mem_mesh_UUID_FeatureFlag
+0 BIT_SILENCE_ADV_FLAG
+)
+
+//mem Beacon Tmall Length
+(
+0x01 UNPROVISIONED_ADLEN_LENGTH
+0x01 UNPROVISIONED_ADTYPE_LENGTH
+0x01 UNPROVISIONED_DEVICE_BEACON_LENGTH
+0x10 UNPROVISIONED_DEVICE_UUID_LENGTH
+0x02 UNPROVISIONED_OOB_INFORMATION_LENGTH
+)
+
+// mem Beacon Type
+(
+0x00 UNPROVISIONED_DEVICE_BEACON
+0x01 SECURE_NETWORK_BEACON
+0x1827 MESH_PROVISIONING_UUID
+0x1828 MESH_PROXY_SERVICE
+
+)
+
+// Provisioning Type
+(
+0x00 PROVISIONING_RANDOM
+0x01 PROVISIONING_CONFIRMATION
+0x02 PROVISIONING_DATA
+0x03 PROVISIONING_COMPLETE
+0x04 PROVISIONING_CONFIG
+0x05 PROVISIONING_CONFIG_ACK
+0x06 PROVISIONING_IOS_DATA
+0x07 PROVISIONING_SEND_IOS_DATA
+)
+
+(//mem_mesh_Provisioning_State_Flag
+// FLAG bit1:Provisioning Confirmation
+1 RECEIVE_PROVISIONING_RANDOM
+2 RECEIVE_PROVISIONING_DATA
+)
+
+
+(//provisioning packet info size
+3 PROVISIONING_PACKET_LENGTH_FLAGS
+6 PROVISIONING_PACKET_LENGTH_AD_TYPE_COMPANY_ID_VID_PROVISIONING_TYPE
+5 PROVISIONING_PACKET_AD_TYPE_COMPANY_ID_VID_PROVISIONING_TYPE
+1 PROVISIONING_PACKET_LENGTH
+1 PROVISIONING_PACKET_AD_TYPE
+2 PROVISIONING_PACKET_COMPANY_ID
+1 PROVISIONING_PACKET_VID
+1 PROVISIONING_PACKET_PROVISIONING_TYPE
+//provisioning random
+2 PROVISIONING_PACKET_RANDOM_MAC
+8 PROVISIONING_PACKET_RANDOM_RANDOM_A
+8 PROVISIONING_PACKET_RANDOM_RANDOM_B
+//provisioning confirmation
+2 PROVISIONING_PACKET_CONFIRMATION_MAC
+16 PROVISIONING_PACKET_CONFIRMATION_DEVICE
+//provisioning complete
+6 PROVISIONING_PACKET_COMPLETE_MAC
+
+2 PROVISIONING_CONFIG_ACK_MAC
+1 PROVISIONING_CONFIG_ACK_FIELD
+
+)
+
+(
+0x01 PROVISIONING_CONFIG_ACK_NOTE
+)
+
+(//gatt package struct
+0 GATT_PACKAGE_MSG_ID
+1 GATT_PACKAGE_PACKAGE_NUM
+2 GATT_PACKAGE_LENGTH
+3 GATT_PACKAGE_PAYLOAD
+)
+
+(
+0x12 MAX_LENGTH_PRIVISIONING_CONTROL_MSG_ANDROID
+0x08 MAX_LENGTH_PRIVISIONING_CONTROL_MSG_IOS
+0x07 MAX_LENGTH_PRIVISIONING_PAIRING_MSG_IOS
+)
+
+(
+4 MAX_GATT_PACKAGE_NUM
+50 GATT_RECEIVE_TIMEOUT
+)
+
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_health_message.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_health_message.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_health_message.format	(working copy)
@@ -0,0 +1,16 @@
+
+amemalloc mem_mesh_receive_model_message_payload(
+	1 mem_mesh_configuration_health_message_opcode
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	1 mem_mesh_configuration_health_message_opcode_config_model_subscription
+	2 mem_mesh_subscription_element_address
+	2 mem_mesh_subscription_value_address
+	2 mem_mesh_subscription_model_identifier
+)
+
+(
+8 SUBSCRIPTION_MAX_COUNT
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_init.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_init.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_init.format	(working copy)
@@ -0,0 +1,198 @@
+memalloc ali_mesh(
+	2 mem_mesh_mic_cache_ptr
+)
+
+
+xmemalloc ali_mesh(
+	// three tuple 阿里云平台分配的三元组
+	4 mem_mesh_three_tuple_ProductID
+	6 mem_mesh_three_tuple_MAC
+	16 mem_mesh_three_tuple_secret
+
+	//ble 核心协议栈，scan到数据的回调
+	2 mem_mesh_cb_receive_advertising
+
+	//alarm寄存器不能修改
+	//mesh核心规范接收到任何TMALL指令
+	2 mem_mesh_cb_receive_access_message
+
+	//接收到配置application key指令(可以认为入网成功)
+	2 mem_mesh_cb_receive_config_appkey_add
+
+	//各种原因配网失败回调
+	2 mem_mesh_cb_pairing_fail
+
+	//ali vendor message cb
+	2 mem_mesh_cb_recv_vendor
+
+	2 mem_mesh_scan_selete_next_ch
+	
+	2 mem_mesh_cb_generic_onoff_get
+	2 mem_mesh_cb_generic_onoff_set
+	2 mem_mesh_cb_scene_recall
+	2 mem_mesh_cb_light_lightness_set
+	2 mem_mesh_cb_light_lightness_get
+	2 mem_mesh_cb_light_ctl_set
+
+	2 mem_mesh_cb_main_light_onoff_set
+	2 mem_mesh_cb_background_onoff_set
+	2 mem_mesh_cb_color_set
+
+	//relay 的功能回调
+	2 mem_mesh_cb_network_relay
+
+	//模块复位的回调，需要3s之后复位
+	2 mem_mesh_cb_receive_node_reset
+
+	//seq改变时的回调，需要存到对应的存储器中
+	2 mem_mesh_cb_seq_changed
+
+	2 mem_mesh_cb_subscriptuion_list_changed
+
+	//Timer 定时器改变时，需要存到对应的存储器中
+	2 mem_mesh_cb_vendor_timing_changed
+	
+
+	2 mem_mesh_core_feature
+
+	1 mem_mesh_element_number
+	2 mem_mesh_element_device_ptr
+	2 mem_mesh_element_device_length
+
+)
+
+(//typedef struct of mem_mesh_element_device
+0 ELEMENT_DEVICE_GROUP_ADDR
+2 ELEMENT_DEVICE_QUEUE_BUFFER_PTR
+4 ELEMENT_DEVICE_VENDOR_TIME_PTR
+6 ELEMENT_DEVICE_SUBSCRIPTION_LABEL
+22 ELEMENT_DEVICE_UPPER_ADV_FLAG
+23 ELEMENT_DEVICE_UPPER_QUEUE_PTR
+25 ELEMENT_DEVICE_TRAN_PACKAGE_TID
+26 ELEMENT_DEVICE_TRAN_PACKAGE_TYPE
+27 SIZEOF_ELEMENT_DEVICE
+
+)
+
+
+xmemalloc ali_mesh_element(
+	0 mem_mesh_element_device
+	2 mem_mesh_element_device_group_addr
+	2 mem_mesh_element_device_queue_buffer_ptr
+	2 mem_mesh_element_device_timing_ptr
+	16 mem_mesh_element_device_element_subscription_label
+	1 mem_mesh_element_upper_adv_flag
+	2 mem_mesh_element_upper_queue_buffer_ptr
+	1 mem_mesh_element_tran_package_tid
+	1 mem_mesh_element_tran_package_type
+
+	SIZEOF_ELEMENT_DEVICE mem_mesh_element_device1
+	SIZEOF_ELEMENT_DEVICE mem_mesh_element_device2
+)
+
+(
+36 MESH_SEGMENT_SIZE
+)
+
+xmemalloc ali_mesh_element(
+	MESH_SEGMENT_SIZE mem_mesh_segmented_access_message_Segment
+)
+
+xmemalloc ali_mesh_element(
+	1 mem_mesh_element_device_queue_each_size
+	1 mem_mesh_element_device_queue_length
+	1 mem_mesh_element_device_queue_current_num
+	1 mem_mesh_element_device_queue_read_ptr
+	1 mem_mesh_element_device_queue_write_ptr
+	136 mem_mesh_element_device_queue_ele
+
+	1 mem_mesh_element_device_upper_queue_each_size
+	1 mem_mesh_element_device_upper_queue_length
+	1 mem_mesh_element_device_upper_queue_current_num
+	1 mem_mesh_element_device_upper_queue_read_ptr
+	1 mem_mesh_element_device_upper_queue_write_ptr
+	//元素长度为47
+	188 mem_mesh_element_device_upper_queue_ele
+
+)
+
+(
+320 MESH_TIMER_BUFFER_SIZE
+)
+
+/*
+xmemalloc ali_mesh_element_timer(
+	MESH_TIMER_BUFFER_SIZE mem_mesh_element_timing
+	MESH_TIMER_BUFFER_SIZE mem_mesh_element_timing1
+	MESH_TIMER_BUFFER_SIZE mem_mesh_element_timing2
+)
+*/
+
+(//bit map of mem_mesh_core_feature
+0 MESH_FEATURE_DISABLE_LOG
+1 MESH_FEATURE_DISABLE_RELAY
+2 MESH_FEATURE_DISABLE_SUBSCRIPTION
+3 MESH_FEATURE_DISABLE_APP_PAIRING
+)
+
+(//taobao id
+0x01a8	COMPANY_IDENTIFIERS_ALIBABA
+0x0d	ALI_MESH_VID_NUMBER
+0x0da801 COMPANY_ID_ALIBABA_AND_VID
+0x0ea801 COMPANY_ID_ALIBABA_AND_VID_GATT
+)
+
+
+(
+0x00 MESH_CODE_INIT
+0x01 MESH_RECEIVE_PROVISIONING_PACKET
+0x02 MESH_RECEIVE_PROVISIONING_RANDOM_PACKET
+0x03 MESH_SEND_PROVISIONING_CONFIRMATION_PACKET
+0x04 MESH_RECEIVE_PROVISIONING_DATA_PACKET
+0x05 MESH_SEND_PROVISIONING_COMPLETE_PACKET
+0x06 MESH_RECEIVE_PROVISIONING_FAILED_PACKET
+
+0x10 MESH_ENCRYPT_SHA256_FUNCTION_INPUT
+0x11 MESH_ENCRYPT_SHA256_FUNCTION_RESULT
+0x12 MESH_ENCRYPT_AES_CMAC_FUNCTION_INPUT_M
+0x13 MESH_ENCRYPT_AES_CMAC_FUNCTION_INPUT_K
+0x14 MESH_ENCRYPT_AES_CMAC_FUNCTION_RESULT
+
+0x20 MESH_NETWORK_RECEIVE_PACKET
+0x21 MESH_NETWORK_RELAY_PACKET
+
+0x30 MESH_LOWER_RECEIVE_PACKET
+0x40 MESH_UPPER_RECEIVE_PACKET
+0x41 MESH_UPPER_SEND_PACKET
+
+0x50 MESH_ACCESS_RECEIVE_MESSAGE
+
+0x60 MESH_PROXY_RECEIVE_MESSAGE_HANDLE
+0x61 MESH_PROXY_RECEIVE_MESSAGE
+
+0xF0 MESH_MESSAGE_GENERIC_ONOFF_SET
+0xF1 MESH_MESSAGE_SET_LIGHT_LIGHTNESS
+0xF2 MESH_MESSAGE_SET_CTL
+)
+
+(//LUA LOG 
+0xAA LUA_LOG_PACKET_HEADER
+0x03 LUA_LOG_PAKCET_TYPE
+0xBB LUA_LOG_PACKET_TRAIL
+)
+
+(//logging level
+0 LOGGING_DEBUG
+1 LOGGING_INFO
+2 LOGGING_WARNING
+3 LOGGING_ERROR
+4 LOGGING_CRITICAL
+)
+
+(
+0x1c00 mem_mesh_uart_log_rx_buff
+0x1c01 mem_mesh_uart_log_rx_buff_end
+0x1c02 mem_mesh_uart_log_tx_buff
+0x1fff mem_mesh_uart_log_tx_buff_end
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_lower_transport_layer.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_lower_transport_layer.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_lower_transport_layer.format	(working copy)
@@ -0,0 +1,53 @@
+memalloc ali_mesh(
+	1 mem_mesh_lower_transport_layer_payload_len
+
+)
+
+
+
+xmemalloc ali_mesh(
+	//current segmented access message head
+	1 mem_mesh_segmented_access_message_SZMIC
+	2 mem_mesh_segmented_access_message_SeqZero
+	1 mem_mesh_segmented_access_message_SegO
+	1 mem_mesh_segmented_access_message_SegN
+
+	4 mem_mesh_segmented_access_message_BlockAck
+	1 mem_mesh_segmented_access_message_receive_finish
+	1 mem_mesh_segmented_access_message_current_length
+
+	1 mem_mesh_segmented_access_message_SegN_upper_limit
+	2 mem_mesh_segmented_access_message_Segment_ptr
+)
+
+amemalloc mem_mesh_send_access_lower_transport_layer(
+	//bit7 is SEQ 0=Unsegment Message
+	//bit6 is AKF
+	//bit5-bit0 is AID
+	1 mem_mesh_unsegmented_access_lower_transport_layer_head
+	11 mem_mesh_unsegmented_access_lower_transport_layer_parameters
+	4 mem_mesh_unsegmented_access_lower_transport_layer_mic
+)
+
+amemalloc mem_mesh_send_access_lower_transport_layer(
+	//bit7 is SEQ 1=segment Message
+	//bit6 is AKF
+	//bit5-bit0 is AID
+	1 mem_mesh_segmented_access_lower_transport_layer_head
+	//bit23 is SZMIC size of transMIC
+	//bit22-bit10 is SeqZero Least significant bits of SeqAuth
+	//bit9-bit5 is SegO Segment offset number
+	//bit4-bit0 is SegN Last Segment number
+	3 mem_mesh_segmented_access_lower_transport_layer_SZMIC_SeqZero_SegO_SegN
+	8 mem_mesh_segmented_access_lower_transport_layer_parameters
+	4 mem_mesh_segmented_access_lower_transport_layer_mic
+)
+
+(
+7 TRANSPORT_HEAD_BIT_SEG
+6 TRANSPORT_HEAD_BIT_AKF
+05 TRANSPORT_HEAD_BIT_AID
+7 BIT_CTL
+)
+
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_model_layer.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_model_layer.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_model_layer.format	(working copy)
@@ -0,0 +1,70 @@
+
+
+xmemalloc ali_mesh(
+	2 mem_mesh_last_CTL_Temperature
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	1 mem_mesh_module_message_opcode
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	//generic OnOff Set
+	1 mem_mesh_module_message_opcode_onoff_set
+	1 mem_mesh_generic_onoff_set_payload_OnOff
+	1 mem_mesh_generic_onoff_set_payload_TID
+	1 mem_mesh_generic_onoff_set_payload_Transition_Time
+	1 mem_mesh_generic_onoff_set_payload_Delay
+
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	//Scene recall 模式设置
+	1 mem_mesh_module_message_opcode_scene_recall
+	2 mem_mesh_scene_recall_payload_scene_number
+	1 mem_mesh_scene_recall_payload_TID
+	1 mem_mesh_scene_recall_payload_Transition_Time
+	1 mem_mesh_scene_recall_payload_Delay
+
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	//light lightness
+	1 mem_mesh_module_message_opcode_set_light_lightness
+	2 mem_mesh_light_lightness_set_payload_lightness
+	1 mem_mesh_light_lightness_set_payload_TID
+	1 mem_mesh_light_lightness_set_payload_Transition_Time
+	1 mem_mesh_light_lightness_set_payload_Delay
+	1 mem_mesh_light_lightness_calc_lightness
+)
+
+amemalloc mem_mesh_receive_model_message_payload(
+	//light CTL
+	1 mem_mesh_module_message_opcode_set_light_ctl
+	2 mem_mesh_CTL_Lightness
+	2 mem_mesh_CTL_Temperature
+	2 mem_mesh_CTL_Delta_UV
+	1 mem_mesh_CTL_lightness_TID
+	1 mem_mesh_CTL_lightness_Transition_Time
+	1 mem_mesh_CTL_lightness_Delay	
+	1 mem_mesh_CTL_calc_lightness
+	1 mem_mesh_CTL_calc_temperature
+
+)
+
+(//Generic OnOff
+0x00 GENERIC_ONOFF_CMD_OFF
+0x01 GENERIC_ONOFF_CMD_ON
+)
+
+(//LIGHTNESS
+0xFFFF ALI_MESH_LIGHTNESS_MAX
+0x0064 ALI_MESH_LIGHTNESS_LEVEL
+)
+
+(//TEMPERATURE
+0x4E20 ALI_MESH_TEMPERATURE_MAX
+0x0320 ALI_MESH_TEMPERATURE_MIN
+0x0064 ALI_MESH_TEMPERATURE_LEVEL
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_more_element_check.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_more_element_check.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_more_element_check.format	(working copy)
@@ -0,0 +1,17 @@
+
+memalloc ali_mesh(
+	2 mem_mesh_loopcnt_tmep
+	2 mem_mesh_rega_temp
+	2 mem_mesh_regb_temp
+	2 mem_mesh_regc_temp
+	2 mem_mesh_alarm_temp
+	
+)
+
+
+
+xmemalloc ali_mesh(
+	1 mem_mesh_receive_group_address
+	1 mem_mesh_receive_element_number
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_network_layer.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_network_layer.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_network_layer.format	(working copy)
@@ -0,0 +1,113 @@
+
+
+memalloc ali_mesh(
+	1 mem_mesh_message_Transport_NetMIC_length
+
+	1 mem_mesh_message_NID
+	1 mem_mesh_message_TTL
+	3 mem_mesh_message_SEQ
+	2 mem_mesh_message_SRC
+	2 mem_mesh_message_DST
+	0 mem_mesh_message_Transport_NetMIC
+	1 mem_mesh_message_Transport_Head
+	//unsegmented access message
+	0 mem_mesh_message_Transport_unsegmented_access_messagePDU
+	//segmented access message
+	0 mem_mesh_message_Transport_segmented_access_messagePDU
+	3 mem_mesh_message_segment_access_SZMIC_SeqZero_SegO_SegN
+	0 mem_mesh_message_Transport_segmented_access_messagePDU_Segment
+	16 mem_mesh_message_Transport_NetMIC_end
+
+	13 mem_mesh_nonce_struct
+
+	2 mem_mesh_send_message_DST
+	3 mem_mesh_last_message_SEQ
+	1 mem_mesh_network_packet_type
+
+)
+
+xmemalloc ali_mesh(
+	4 mem_mesh_IV_Index
+
+
+
+// mesh SRC/SEQ  cache
+	0 mem_mesh_TMALL_cache_start
+	2 mem_mesh_TMALL_SRC1
+	3 mem_mesh_TMALL_SEQ1
+	45 mem_mesh_TMALL_cache
+	0 mem_mesh_TMALL_cache_end
+
+	0 mem_mesh_transport_message_mic_cache
+	4 mem_mesh_transport_message_mic_cache_buff1
+	36 mem_mesh_transport_message_mic_cache_buff2_10
+
+	0 mem_mesh_network_relay_queue
+	1 mem_mesh_network_relay_queue_each_size
+	1 mem_mesh_network_relay_queue_length
+	1 mem_mesh_network_relay_queue_current_num
+	1 mem_mesh_network_relay_queue_read_ptr
+	1 mem_mesh_network_relay_queue_write_ptr
+	136 mem_mesh_network_relay_queue_ele
+
+)
+
+amemalloc mem_le_txheader_mesh_temp(
+	1 mem_mesh_network_packet_type_temp
+	29 mem_mesh_message_NID_temp
+)
+
+amemalloc mem_k2_T2(
+	16 mem_k2_EncryptionKey
+)
+
+amemalloc mem_k2_T3(
+	16 mem_k2_PrivacyKey
+)
+
+amemalloc mem_mesh_nonce_struct(
+	//DST and TransportPDU encryption
+	0 mem_mesh_Network_Nonce
+	1 mem_mesh_Network_Nonce_nonce_type
+	1 mem_mesh_Network_Nonce_CTL_and_TTL
+	3 mem_mesh_Network_Nonce_SEQ
+	2 mem_mesh_Network_Nonce_SRC
+	2 mem_mesh_Network_Nonce_Pad	//0x0000
+	4 mem_mesh_Network_Nonce_IV_Index
+
+)
+
+(//nonce type
+0x00 NETWORK_NONCE
+0x01 APPLICATION_NONCE
+0x02 DEVICE_NONCE
+0x03 PROXY_NONCE
+)
+
+
+(
+0x00c0 GROUP_ADDRESS_0XC000_little_endian
+0xffcf GROUP_ADDRESS_0XCFFF_little_endian
+0x02c0 GROUP_ADDRESS_0XC002_little_endian
+0x07c0 GROUP_ADDRESS_0XC007_little_endian
+0x01c0 GROUP_ADDRESS_0XC001_little_endian
+0xffff GROUP_ADDRESS_0XFFFF_little_endian
+)
+
+
+(//SRC SEQ cache parameter
+10 CACHE_SPACE_NUM
+5 CACHE_SPACE_SIZE
+)
+
+(
+12 MESH_NETWORK_PACKET_MIN_LENGTH
+30 MESH_NETWORK_PACKET_MAX_LENGTH
+)
+
+(
+0 MESH_MESSAGE_TMALL
+1 MESH_MESSAGE_APP
+2 MESH_MESSAGE_PROXY
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_proxy_layer.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_proxy_layer.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_proxy_layer.format	(working copy)
@@ -0,0 +1,26 @@
+
+xmemalloc ali_mesh_element(
+	152 mem_mesh_le_att_list
+)
+
+(
+0x00 MESH_PROXY_SERVICE_DATA_ID_TYPE_NETWORK_ID
+0x01 MESH_PROXY_SERVICE_DATA_ID_TYPE_NODE_IDENTITY
+)
+
+(
+0x00 MESH_PROXY_MESSAGE_TYPE_NETWORK_PDU
+0x01 MESH_PROXY_MESSAGE_TYPE_MESH_BEACON
+0x02 MESH_PROXY_MESSAGE_TYPE_PROXY_CONFIGURATION
+0x03 MESH_PROXY_MESSAGE_TYPE_PROVISIONING_PDU
+)
+
+(
+0x0e	MESH_PROXY_DATA_IN_HANDLE
+0x10	MESH_PROXY_DATA_OUT_HANDLE
+0x11	MESH_PROXY_ENABLE_DATA_OUT_HANDLE
+0x14	MESH_PROVISIONING_DATA_IN_HANDLE
+0x16	MESH_PROVISIONING_DATA_OUT_HANDLE
+0x17	MESH_PROVISIONING_ENABLE_DATA_OUT_HANDLE
+)
+
Index: mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_upper_transport_layer.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_upper_transport_layer.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/mesh_protocol_stack/mesh_upper_transport_layer.format	(working copy)
@@ -0,0 +1,131 @@
+
+memalloc ali_mesh(
+	2 mem_mesh_upper_transport_layer_payload_ptr
+	1 mem_mesh_segmented_upper_transport_layer_payload_len
+	2 mem_mesh_segmented_lower_transport_layer_SegZero
+	1 mem_mesh_segmented_lower_transport_layer_SegO
+	1 mem_mesh_segmented_lower_transport_layer_SegN
+	1 mem_mesh_segmented_last_packet_upper_teansport_payload_len
+
+	0 mem_mesh_upper_tran_layer_queue_temp
+	1 mem_mesh_upper_tran_layer_temp_packet_flag
+	2 mem_mesh_upper_tran_layer_temp_packet_transmit_delay
+	1 mem_mesh_upper_tran_layer_temp_packet_TID
+	1 mem_mesh_upper_tran_layer_temp_packet_header_IVI_NID
+	1 mem_mesh_upper_tran_layer_temp_packet_header_CTL_TTL
+	3 mem_mesh_upper_tran_layer_temp_packet_header_SEQ
+	2 mem_mesh_upper_tran_layer_temp_packet_header_SRC
+	2 mem_mesh_upper_tran_layer_temp_packet_header_DST
+	1 mem_mesh_upper_tran_layer_temp_packet_length
+	108 mem_mesh_upper_tran_layer_temp_packet_payload
+
+)
+
+xmemalloc ali_mesh(
+	16 mem_mesh_application_key
+	1 mem_mesh_ASZMIC
+
+	0 mem_mesh_access_message_mic_cache
+	4 mem_mesh_access_message_mic_cache_buff1
+	36 mem_mesh_access_message_mic_cache_buff2_10
+
+	3 mem_mesh_send_message_SEQ
+
+	2 mem_mesh_send_message_SRC
+
+	1 mem_mesh_send_message_TTL
+
+	//Upper transport access PDU
+	1 mem_mesh_send_upper_layer_IVI_and_NID
+	1 mem_mesh_send_upper_layer_CTL_and_TTL
+	3 mem_mesh_send_upper_layer_SEQ
+	2 mem_mesh_send_upper_layer_SRC
+	2 mem_mesh_send_upper_layer_DST
+	16 mem_mesh_send_access_lower_transport_layer
+	4 mem_mesh_send_network_layer_NetMIC
+
+)
+
+
+amemalloc mem_mesh_nonce_struct(
+	//application payload encryption
+	0 mem_mesh_Application_Nonce
+	1 mem_mesh_Application_Nonce_Nonce_Type
+	//bit7 is ASZMIC
+	1 mem_mesh_Application_Nonce_ASZMIC_and_Pad	//
+	3 mem_mesh_Application_Nonce_SEQ
+	2 mem_mesh_Application_Nonce_SRC
+	2 mem_mesh_Application_Nonce_DST
+	4 mem_mesh_Application_Nonce_IV_Index
+)
+
+amemalloc mem_mesh_nonce_struct(
+	//application payload encryption
+	0 mem_mesh_Device_Nonce
+	1 mem_mesh_Device_Nonce_Nonce_Type
+	1 mem_mesh_Device_Nonce_ASZMIC_and_Pad	//
+	3 mem_mesh_Device_Nonce_SEQ
+	2 mem_mesh_Device_Nonce_SRC
+	2 mem_mesh_Device_Nonce_DST
+	4 mem_mesh_Device_Nonce_IV_Index
+)
+
+amemalloc mem_mesh_access_layer_payload_len(
+	1 mem_mesh_upper_transport_layer_payload_len
+)
+
+amemalloc mem_mesh_upper_tran_layer_temp_packet_payload(
+//unsegment access message
+	0 mem_mesh_upper_tran_layer_temp_pakcet_AKF_AID
+	1 mem_mesh_upper_tran_layer_temp_unsegmented_pakcet_AKF_AID
+	4 mem_mesh_upper_tran_layer_temp_unsegmented_packet_fill
+	0 mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu
+	15 mem_mesh_upper_tran_layer_temp_unsegmented_pakcet_upper_tran_access_pdu
+)
+
+amemalloc mem_mesh_upper_tran_layer_temp_packet_payload(
+//segment access message
+	1 mem_mesh_upper_tran_layer_temp_segmented_pakcet_AKF_AID
+	2 mem_mesh_upper_tran_layer_temp_segmented_pakcet_SeqZero
+	1 mem_mesh_upper_tran_layer_temp_segmented_pakcet_SegO
+	1 mem_mesh_upper_tran_layer_temp_segmented_pakcet_SegN
+	104 mem_mesh_upper_tran_layer_temp_segmented_pakcet_upper_tran_access_pdu
+)
+
+
+
+(
+15 UNSEGMENTED_ACCESS_MESSAGE_MAX_UPPER_TRANSPORT_ACCESS_PDU_LEN
+12 SEGMENTED_ACCESS_MESSAGE_UNINT_PDU_LEN
+)
+
+(//bit of mem_mesh_upper_tran_layer_temp_packet_flag
+7 BIT_UPPER_FLAG_PROXY_CONTROL
+6 BIT_UPPER_FLAG_APP_CONTROL
+5 BIT_UPPER_FLAG_VENDOR_INDICATION
+4 BIT_UPPER_FLAG_RETRANSMIT
+//BIT3-0
+0x0f DATA_UPPER_FLAG_MAX_RETRY_COUNT
+
+2 UPPER_RETRY_COUNT_STATUS
+1 UPPER_RETRY_COUNT_INDICATION
+)
+
+(
+0 NULL_PACKET_ADVERTISING
+1 PACKET_IN_BEARER
+2 PACKET_IN_ADVERTING
+3 PACKET_RECEIVE_INDICATION
+)
+
+(
+1 UPPER_TRAN_TMALL_MESSAGE
+2 UPPER_TRAN_APP_MESSAGE
+3 UPPER_TRAN_TMALL_AND_APP
+
+0 BIT_UPPER_TRAN_TMALL_MESSAGE
+1 BIT_UPPER_TRAN_APP_MESSAGE
+2 BIT_UUPER_TRAN_PROXY_MESSAGE
+)
+
+
Index: mouse_public_3mode_usb/format/meter.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/meter.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/meter.format	(working copy)
@@ -0,0 +1,24 @@
+omemalloc (
+3 mem_dummy
+1 mem_seq
+1 mem_context_cnt
+1 mem_context_map
+768 mem_context_new
+1 mem_att_cmd_len
+15 mem_att_cmd
+1 mem_att_resp_handle
+1 mem_att_resp_len
+30 mem_att_resp
+600 mem_meter_att_list
+)
+
+(
+7 context_num_new_m1
+8 context_num_new
+96 context_size_new
+)
+
+(
+0x4040 mem_anchor_array
+)
+
Index: mouse_public_3mode_usb/format/patch.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/patch.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/patch.format	(working copy)
@@ -0,0 +1,516 @@
+
+(
+	  0 patch00_0
+	  1 patch00_1
+	  2 patch00_2
+	  3 patch00_3
+	  4 patch00_4
+	  5 patch00_5
+	  6 patch00_6
+	  7 patch00_7
+	  8 patch01_0
+	  9 patch01_1
+	 10 patch01_2
+	 11 patch01_3
+	 12 patch01_4
+	 13 patch01_5
+	 14 patch01_6
+	 15 patch01_7
+	 16 patch02_0
+	 17 patch02_1
+	 18 patch02_2
+	 19 patch02_3
+	 20 patch02_4
+	 21 patch02_5
+	 22 patch02_6
+	 23 patch02_7
+	 24 patch03_0
+	 25 patch03_1
+	 26 patch03_2
+	 27 patch03_3
+	 28 patch03_4
+	 29 patch03_5
+	 30 patch03_6
+	 31 patch03_7
+	 32 patch04_0
+	 33 patch04_1
+	 34 patch04_2
+	 35 patch04_3
+	 36 patch04_4
+	 37 patch04_5
+	 38 patch04_6
+	 39 patch04_7
+	 40 patch05_0
+	 41 patch05_1
+	 42 patch05_2
+	 43 patch05_3
+	 44 patch05_4
+	 45 patch05_5
+	 46 patch05_6
+	 47 patch05_7
+	 48 patch06_0
+	 49 patch06_1
+	 50 patch06_2
+	 51 patch06_3
+	 52 patch06_4
+	 53 patch06_5
+	 54 patch06_6
+	 55 patch06_7
+	 56 patch07_0
+	 57 patch07_1
+	 58 patch07_2
+	 59 patch07_3
+	 60 patch07_4
+	 61 patch07_5
+	 62 patch07_6
+	 63 patch07_7
+	 64 patch08_0
+	 65 patch08_1
+	 66 patch08_2
+	 67 patch08_3
+	 68 patch08_4
+	 69 patch08_5
+	 70 patch08_6
+	 71 patch08_7
+	 72 patch09_0
+	 73 patch09_1
+	 74 patch09_2
+	 75 patch09_3
+	 76 patch09_4
+	 77 patch09_5
+	 78 patch09_6
+	 79 patch09_7
+	 80 patch0a_0
+	 81 patch0a_1
+	 82 patch0a_2
+	 83 patch0a_3
+	 84 patch0a_4
+	 85 patch0a_5
+	 86 patch0a_6
+	 87 patch0a_7
+	 88 patch0b_0
+	 89 patch0b_1
+	 90 patch0b_2
+	 91 patch0b_3
+	 92 patch0b_4
+	 93 patch0b_5
+	 94 patch0b_6
+	 95 patch0b_7
+	 96 patch0c_0
+	 97 patch0c_1
+	 98 patch0c_2
+	 99 patch0c_3
+	100 patch0c_4
+	101 patch0c_5
+	102 patch0c_6
+	103 patch0c_7
+	104 patch0d_0
+	105 patch0d_1
+	106 patch0d_2
+	107 patch0d_3
+	108 patch0d_4
+	109 patch0d_5
+	110 patch0d_6
+	111 patch0d_7
+	112 patch0e_0
+	113 patch0e_1
+	114 patch0e_2
+	115 patch0e_3
+	116 patch0e_4
+	117 patch0e_5
+	118 patch0e_6
+	119 patch0e_7
+	120 patch0f_0
+	121 patch0f_1
+	122 patch0f_2
+	123 patch0f_3
+	124 patch0f_4
+	125 patch0f_5
+	126 patch0f_6
+	127 patch0f_7
+	128 patch10_0
+	129 patch10_1
+	130 patch10_2
+	131 patch10_3
+	132 patch10_4
+	133 patch10_5
+	134 patch10_6
+	135 patch10_7
+	136 patch11_0
+	137 patch11_1
+	138 patch11_2
+	139 patch11_3
+	140 patch11_4
+	141 patch11_5
+	142 patch11_6
+	143 patch11_7
+	144 patch12_0
+	145 patch12_1
+	146 patch12_2
+	147 patch12_3
+	148 patch12_4
+	149 patch12_5
+	150 patch12_6
+	151 patch12_7
+	152 patch13_0
+	153 patch13_1
+	154 patch13_2
+	155 patch13_3
+	156 patch13_4
+	157 patch13_5
+	158 patch13_6
+	159 patch13_7
+	160 patch14_0
+	161 patch14_1
+	162 patch14_2
+	163 patch14_3
+	164 patch14_4
+	165 patch14_5
+	166 patch14_6
+	167 patch14_7
+	168 patch15_0
+	169 patch15_1
+	170 patch15_2
+	171 patch15_3
+	172 patch15_4
+	173 patch15_5
+	174 patch15_6
+	175 patch15_7
+	176 patch16_0
+	177 patch16_1
+	178 patch16_2
+	179 patch16_3
+	180 patch16_4
+	181 patch16_5
+	182 patch16_6
+	183 patch16_7
+	184 patch17_0
+	185 patch17_1
+	186 patch17_2
+	187 patch17_3
+	188 patch17_4
+	189 patch17_5
+	190 patch17_6
+	191 patch17_7
+	192 patch18_0
+	193 patch18_1
+	194 patch18_2
+	195 patch18_3
+	196 patch18_4
+	197 patch18_5
+	198 patch18_6
+	199 patch18_7
+	200 patch19_0
+	201 patch19_1
+	202 patch19_2
+	203 patch19_3
+	204 patch19_4
+	205 patch19_5
+	206 patch19_6
+	207 patch19_7
+	208 patch1a_0
+	209 patch1a_1
+	210 patch1a_2
+	211 patch1a_3
+	212 patch1a_4
+	213 patch1a_5
+	214 patch1a_6
+	215 patch1a_7
+	216 patch1b_0
+	217 patch1b_1
+	218 patch1b_2
+	219 patch1b_3
+	220 patch1b_4
+	221 patch1b_5
+	222 patch1b_6
+	223 patch1b_7
+	224 patch1c_0
+	225 patch1c_1
+	226 patch1c_2
+	227 patch1c_3
+	228 patch1c_4
+	229 patch1c_5
+	230 patch1c_6
+	231 patch1c_7
+	232 patch1d_0
+	233 patch1d_1
+	234 patch1d_2
+	235 patch1d_3
+	236 patch1d_4
+	237 patch1d_5
+	238 patch1d_6
+	239 patch1d_7
+	240 patch1e_0
+	241 patch1e_1
+	242 patch1e_2
+	243 patch1e_3
+	244 patch1e_4
+	245 patch1e_5
+	246 patch1e_6
+	247 patch1e_7
+	248 patch1f_0
+	249 patch1f_1
+	250 patch1f_2
+	251 patch1f_3
+	252 patch1f_4
+	253 patch1f_5
+	254 patch1f_6
+	255 patch1f_7
+	  0 patch20_0
+	  1 patch20_1
+	  2 patch20_2
+	  3 patch20_3
+	  4 patch20_4
+	  5 patch20_5
+	  6 patch20_6
+	  7 patch20_7
+	  8 patch21_0
+	  9 patch21_1
+	 10 patch21_2
+	 11 patch21_3
+	 12 patch21_4
+	 13 patch21_5
+	 14 patch21_6
+	 15 patch21_7
+	 16 patch22_0
+	 17 patch22_1
+	 18 patch22_2
+	 19 patch22_3
+	 20 patch22_4
+	 21 patch22_5
+	 22 patch22_6
+	 23 patch22_7
+	 24 patch23_0
+	 25 patch23_1
+	 26 patch23_2
+	 27 patch23_3
+	 28 patch23_4
+	 29 patch23_5
+	 30 patch23_6
+	 31 patch23_7
+	 32 patch24_0
+	 33 patch24_1
+	 34 patch24_2
+	 35 patch24_3
+	 36 patch24_4
+	 37 patch24_5
+	 38 patch24_6
+	 39 patch24_7
+	 40 patch25_0
+	 41 patch25_1
+	 42 patch25_2
+	 43 patch25_3
+	 44 patch25_4
+	 45 patch25_5
+	 46 patch25_6
+	 47 patch25_7
+	 48 patch26_0
+	 49 patch26_1
+	 50 patch26_2
+	 51 patch26_3
+	 52 patch26_4
+	 53 patch26_5
+	 54 patch26_6
+	 55 patch26_7
+	 56 patch27_0
+	 57 patch27_1
+	 58 patch27_2
+	 59 patch27_3
+	 60 patch27_4
+	 61 patch27_5
+	 62 patch27_6
+	 63 patch27_7
+	 64 patch28_0
+	 65 patch28_1
+	 66 patch28_2
+	 67 patch28_3
+	 68 patch28_4
+	 69 patch28_5
+	 70 patch28_6
+	 71 patch28_7
+	 72 patch29_0
+	 73 patch29_1
+	 74 patch29_2
+	 75 patch29_3
+	 76 patch29_4
+	 77 patch29_5
+	 78 patch29_6
+	 79 patch29_7
+	 80 patch2a_0
+	 81 patch2a_1
+	 82 patch2a_2
+	 83 patch2a_3
+	 84 patch2a_4
+	 85 patch2a_5
+	 86 patch2a_6
+	 87 patch2a_7
+	 88 patch2b_0
+	 89 patch2b_1
+	 90 patch2b_2
+	 91 patch2b_3
+	 92 patch2b_4
+	 93 patch2b_5
+	 94 patch2b_6
+	 95 patch2b_7
+	 96 patch2c_0
+	 97 patch2c_1
+	 98 patch2c_2
+	 99 patch2c_3
+	100 patch2c_4
+	101 patch2c_5
+	102 patch2c_6
+	103 patch2c_7
+	104 patch2d_0
+	105 patch2d_1
+	106 patch2d_2
+	107 patch2d_3
+	108 patch2d_4
+	109 patch2d_5
+	110 patch2d_6
+	111 patch2d_7
+	112 patch2e_0
+	113 patch2e_1
+	114 patch2e_2
+	115 patch2e_3
+	116 patch2e_4
+	117 patch2e_5
+	118 patch2e_6
+	119 patch2e_7
+	120 patch2f_0
+	121 patch2f_1
+	122 patch2f_2
+	123 patch2f_3
+	124 patch2f_4
+	125 patch2f_5
+	126 patch2f_6
+	127 patch2f_7
+	128 patch30_0
+	129 patch30_1
+	130 patch30_2
+	131 patch30_3
+	132 patch30_4
+	133 patch30_5
+	134 patch30_6
+	135 patch30_7
+	136 patch31_0
+	137 patch31_1
+	138 patch31_2
+	139 patch31_3
+	140 patch31_4
+	141 patch31_5
+	142 patch31_6
+	143 patch31_7
+	144 patch32_0
+	145 patch32_1
+	146 patch32_2
+	147 patch32_3
+	148 patch32_4
+	149 patch32_5
+	150 patch32_6
+	151 patch32_7
+	152 patch33_0
+	153 patch33_1
+	154 patch33_2
+	155 patch33_3
+	156 patch33_4
+	157 patch33_5
+	158 patch33_6
+	159 patch33_7
+	160 patch34_0
+	161 patch34_1
+	162 patch34_2
+	163 patch34_3
+	164 patch34_4
+	165 patch34_5
+	166 patch34_6
+	167 patch34_7
+	168 patch35_0
+	169 patch35_1
+	170 patch35_2
+	171 patch35_3
+	172 patch35_4
+	173 patch35_5
+	174 patch35_6
+	175 patch35_7
+	176 patch36_0
+	177 patch36_1
+	178 patch36_2
+	179 patch36_3
+	180 patch36_4
+	181 patch36_5
+	182 patch36_6
+	183 patch36_7
+	184 patch37_0
+	185 patch37_1
+	186 patch37_2
+	187 patch37_3
+	188 patch37_4
+	189 patch37_5
+	190 patch37_6
+	191 patch37_7
+	192 patch38_0
+	193 patch38_1
+	194 patch38_2
+	195 patch38_3
+	196 patch38_4
+	197 patch38_5
+	198 patch38_6
+	199 patch38_7
+	200 patch39_0
+	201 patch39_1
+	202 patch39_2
+	203 patch39_3
+	204 patch39_4
+	205 patch39_5
+	206 patch39_6
+	207 patch39_7
+	208 patch3a_0
+	209 patch3a_1
+	210 patch3a_2
+	211 patch3a_3
+	212 patch3a_4
+	213 patch3a_5
+	214 patch3a_6
+	215 patch3a_7
+	216 patch3b_0
+	217 patch3b_1
+	218 patch3b_2
+	219 patch3b_3
+	220 patch3b_4
+	221 patch3b_5
+	222 patch3b_6
+	223 patch3b_7
+	224 patch3c_0
+	225 patch3c_1
+	226 patch3c_2
+	227 patch3c_3
+	228 patch3c_4
+	229 patch3c_5
+	230 patch3c_6
+	231 patch3c_7
+	232 patch3d_0
+	233 patch3d_1
+	234 patch3d_2
+	235 patch3d_3
+	236 patch3d_4
+	237 patch3d_5
+	238 patch3d_6
+	239 patch3d_7
+	240 patch3e_0
+	241 patch3e_1
+	242 patch3e_2
+	243 patch3e_3
+	244 patch3e_4
+	245 patch3e_5
+	246 patch3e_6
+	247 patch3e_7
+	248 patch3f_0
+	249 patch3f_1
+	250 patch3f_2
+	251 patch3f_3
+	252 patch3f_4
+	253 patch3f_5
+	254 patch3f_6
+	255 patch3f_7
+
+)
Index: mouse_public_3mode_usb/format/peipherals_config/peipherals_50hz.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_50hz.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_50hz.format	(working copy)
@@ -0,0 +1,10 @@
+ifdef COMPLIE_TEST
+
+memalloc ac_test(
+
+10 mem_ac_50hz_buf
+
+)
+
+endif
+
Index: mouse_public_3mode_usb/format/peipherals_config/peipherals_iic.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_iic.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_iic.format	(working copy)
@@ -0,0 +1,25 @@
+
+ifdef COMPLIE_TEST
+
+memalloc iic_test(
+
+64 mem_iic_test_txbuf1
+64 mem_iic_test_txbuf2
+64 mem_iic_test_rxbuf
+2 mem_iic_test_loopcnt
+1 mem_iic_test_loopcnt2
+2 mem_iic_test_offset
+
+//camera
+6 mem_camera_pwm_conf
+3 mem_camera_txbuf
+1 mem_camera_rxbuf
+1 mem_camera_id
+)
+
+(
+10 IIC_TEST_CNT
+)
+
+endif
+
Index: mouse_public_3mode_usb/format/peipherals_config/peipherals_nec.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_nec.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_nec.format	(working copy)
@@ -0,0 +1,31 @@
+ifdef COMPLIE_TEST
+
+omemalloc(
+	1 mem_nec_receive_flag
+	4 mem_nec_receive_data
+)
+
+(//NEC 61212
+9000 NEC61212_BOOT_CODE_START_TIME
+4500 NEC61212_BOOT_CODE_END_TIME
+
+9000 NEC61212_REPEAT_START_TIME
+2250 NEC61212_REPEAT_END_TIME
+
+560 NEC61212_DATA_BIT_1_START_TIME
+1690 NEC61212_DATA_BIT_1_END_TIME
+
+560 NEC61212_DATA_BIT_0_START_TIME
+560 NEC61212_DATA_BIT_0_END_TIME
+
+560 NEC61212_STOP_TIME
+
+42580 NEC61212_DATA2REPEAT_TIME
+98190 NEC61212_REPEAT2REPEAT_TIME
+
+0xffff NEC61212_TIMEOUT_TIME
+
+
+)
+endif
+
Index: mouse_public_3mode_usb/format/peipherals_config/peipherals_spi.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_spi.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_spi.format	(working copy)
@@ -0,0 +1,34 @@
+
+ifdef COMPLIE_TEST
+
+omemalloc(
+
+3 mem_flash_test_base
+4 mem_spi_test_write_buff
+64 mem_spi_test_flash_data_buff
+64 mem_spi_test_read_buff
+64 mem_spi_test_data_buff
+3 mem_flash_test_base2
+4 mem_spi2_test_write_buff
+64 mem_spi2_test_flash_data_buff
+64 mem_spi2_test_read_buff
+64 mem_spi2_test_data_buff
+
+18 mem_spi_ctrl_test_param_buff
+18 mem_spi2_ctrl_test_param_buff
+2 mem_spi_test_param_buff_addr
+2 mem_spi2_test_param_buff_addr
+
+1 mem_spi_test_erase_count
+1 mem_spi_test_write_count
+1 mem_spi_test_read_count
+1 mem_spi_test_compare_data_count
+1 mem_spi2_test_erase_count
+1 mem_spi2_test_write_count
+1 mem_spi2_test_read_count
+1 mem_spi2_test_compare_data_count
+
+)
+
+endif
+
Index: mouse_public_3mode_usb/format/peipherals_config/peipherals_uart.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_uart.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/peipherals_config/peipherals_uart.format	(working copy)
@@ -0,0 +1,17 @@
+
+ifdef COMPLIE_TEST
+
+omemalloc(
+
+1 mem_uart_test_opcode
+1 mem_uart_test_len
+255 mem_uart_test_rx_buffer
+2 mem_uart_test_uarta_rx_start_address
+2 mem_uart_test_uarta_rx_end_address
+2 mem_uart_test_uarta_tx_start_address
+2 mem_uart_test_uarta_tx_end_address
+
+)
+
+endif
+
Index: mouse_public_3mode_usb/format/regs.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/regs.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/regs.format	(working copy)
@@ -0,0 +1,550 @@
+(
+	0x8000 core_chipid
+	0x8003 core_kick
+	0x8004 core_write_wdt
+	0x8005 core_lpm_wr
+	0x8006 core_misc_ctrl
+	0x8007 core_efuse_rdata
+	0x800a core_ccm_ctrl
+	0x800b core_write_wdt2
+	0x8010 core_reset
+	0x8011 core_encrypt
+	0x8012 core_lpm_wr2
+	0x8013 core_mpu_s0_saddr
+	0x8015 core_mpu_s0_eaddr
+	0x8017 core_mpu_s1_saddr
+	0x8019 core_mpu_s1_eaddr
+	0x8022 core_ucode_hi
+	0x8023 core_ucode_ctrl
+	0x8024 core_ucode_low
+	0x8025 core_ucode_data
+
+	0x8040 core_halfslot
+	0x8042 core_clksel
+	0x8043 core_uart_clksel
+	0x8043 core_config
+	0x8044 core_xtal_stable_time
+	0x8045 core_efuse_addr
+	0x8046 core_bist_ctrl
+	0x8047 core_efuse_ctrl
+	0x8048 core_ac_ctrl
+	0x804a core_ac_saddr
+	0x804c core_lpm_reg
+	0x804f core_lpm_isogate
+	0x8050 core_clkoff
+	0x8052 core_uart_baud
+	0x8053 core_sum_en
+	0x8054 core_uart_rsaddr
+	0x8056 core_uart_readdr
+	0x8058 core_uart_rrptr
+	0x805a core_uart_tsaddr
+	0x805c core_uart_teaddr
+	0x805e core_uart_twptr
+	0x8060 core_uart_ctrl
+	0x8061 core_uartb_ctrl
+	0x8062 core_uartb_baud
+	0x8064 core_uartb_rsaddr
+	0x8066 core_uartb_readdr
+	0x8068 core_uartb_rrptr
+	0x806a core_uartb_tsaddr
+	0x806c core_uartb_teaddr
+	0x806e core_uartb_twptr
+	0x8070 core_gpio_conf
+	0x8084 core_pwm_en
+	0x8085 core_aes_en
+	0x8086 core_spid_ctrl
+	0x8087 core_spid_delay
+	0x8088 core_spid_txlen
+	0x808a core_spid_txaddr
+	0x808c core_spid_rxaddr
+	0x808e core_spid_rxlen
+	0x8090 core_iicd_ctrl
+	0x8091 core_iicd_scl_low
+	0x8092 core_iicd_scl_high
+	0x8093 core_iicd_start_setup
+	0x8094 core_iicd_start_hold
+	0x8095 core_iicd_stop_setup
+	0x8096 core_iicd_data_setup
+	0x8097 core_iicd_data_hold
+	0x8098 core_iicd_txlen
+	0x809a core_iicd_txaddr
+	0x809c core_iicd_rxaddr
+	0x809e core_iicd_rxlen
+	0x80a0 core_pwm_pcnt0
+	0x80a2 core_pwm_ncnt0
+	0x80a4 core_pwm_pcnt1
+	0x80a6 core_pwm_ncnt1
+	0x80a8 core_pwm_pcnt2
+	0x80aa core_pwm_ncnt2
+	0x80ac core_pwm_pcnt3
+	0x80ae core_pwm_ncnt3
+	0x80b0 core_pwm_pcnt4
+	0x80b2 core_pwm_ncnt4
+	0x80b4 core_pwm_pcnt5
+	0x80b6 core_pwm_ncnt5
+	0x80b8 core_pwm_pcnt6
+	0x80ba core_pwm_ncnt6
+	0x80bc core_pwm_pcnt7
+	0x80be core_pwm_ncnt7
+	0x80c0 core_spid2_ctrl
+	0x80c1 core_spid2_delay
+	0x80c2 core_spid2_txlen
+	0x80c4 core_spid2_txaddr
+	0x80c6 core_spid2_rxaddr
+	0x80c8 core_spid2_rxlen
+	0x80ca core_nec_start_addr
+	0x80cc core_nec_end_addr
+	0x80ce core_nec_rptr
+	0x80d0 core_nec_control
+	0x80d1 core_ccm_input_playload_addr
+	0x80d3 core_ccm_output_playload_addr
+	0x80d5 core_ccm_aad0
+	0x80d6 core_ccm_aad1
+	0x80d7 core_ccm_aad2
+	0x80d8 core_pwm_init
+	0x80d9 core_ac_buf_len
+	0x80da core_ccm_inptr
+	0x80dc core_sum_ctrl
+	0x80dd core_pwm_srst
+	0x8108 core_misc_status
+	0x8109 core_qdec_cntx
+	0x810a core_watchdog_cnt
+	0x810b core_uart_status
+	0x810c core_uart_rbaud
+	0x810e core_uart_txitems
+	0x8110 core_uart_trptr
+	0x8112 core_uart_rxitems
+	0x8114 core_uart_rdptr
+	0x8116 core_uart_rwptr
+	0x8118 core_debug_baud
+	0x811a core_ccm_outptr
+	0x811c core_gpio_in
+	0x811d core_gpio_in1
+	0x8120 core_ucode_flag
+	0x8121 core_peripheral_lock
+	0x8122 core_nec_wptr
+	0x8124 core_current_efuse_addr
+	0x8126 core_spid2_remain
+	0x8128 core_spid_remain
+	0x812a core_iicd_remain
+	0x812c core_dma_status
+	0x812d core_perf_status
+	0x812e core_adc_in
+	0x8130 core_nec_rxitem
+	0x8134 core_lpm_ctrl2
+	0x8138 core_lpm_ctrl
+	0x813c core_lpm_xtalcnt
+	0x813d core_lpm_buckcnt
+	0x813e core_lpm_ldocnt
+	0x813f core_lpm_latch
+	0x8140 core_gpio_wakeup_low
+	0x8144 core_gpio_wakeup_high
+	0x8149 core_clk_counter
+	0x8150 core_adc_sum
+	0x8152 core_uartb_status
+	0x8152 core_uartb_rbaud
+	0x8154 core_uartb_txitems
+	0x8156 core_uartb_trptr
+	0x8158 core_uartb_rxitems
+	0x815a core_uartb_rdptr
+	0x815c core_uartb_rwptr
+
+	0x8203 core_ice_ctrl
+	0x8204 core_ice_status
+	0x8205 core_ice_break0
+	0x8207 core_ice_break1
+  
+	0x8280 core_docd_ctrl
+	0x8288 core_docd_paddr
+	0x828a core_docd_pdata
+
+	0x8900 modem_en
+	0x8938 mod_value_scale1
+	0x8960 core_rf_rx_agc_ctrl
+	0x8961 core_rf_rx_gain_fix
+	0x8968 core_agc_wb_sat_th
+	0x8969 core_agc_nb_sat_th
+	0x89a0 modem_rssi
+	0x89a1 modem_wb_pow
+	0x89a2 modem_nb_pow
+	0x89a3 modem_gain
+	0x89a4 modem_status
+
+	0x89f0 fpga_rf_gain
+	0x89f1 fpga_rf_gain_ctrl
+	0x89f2 fpga_uart_ctrl
+	0x89f3 fpga_uart_wdata
+	0x89f4 fpga_uart_rdata
+	0x89f5 fpga_uart_status
+
+	0x8921 core_rx_ctrl1
+	0x8a00 core_clkpll_ctrl0              
+	0x8a01 core_clkpll_ctrl1              
+	0x8a02 core_clkpll_ctrl2              
+	0x8a03 core_clkpll_cfg0               
+	0x8a04 core_clkpll_cfg1               
+	0x8a05 core_clkpll_cfg2               
+	0x8a06 core_clkpll_cfg3               
+	0x8a07 core_clkpll_cfg4               
+	0x8a08 core_clkpll_cfg5               
+	0x8a09 core_clkpll_cfg6               
+	0x8a0a core_rf_ldo_en0                
+	0x8a0b core_rf_ldo_en1                
+	0x8a0c core_rf_ldo_cfg0               
+	0x8a0d core_rf_ldo_cfg1               
+	0x8a0e core_rf_ldo_cfg2               
+	0x8a0f core_rf_ldo_cfg3               
+	0x8a10 core_rf_ldo_cfg4               
+	0x8a11 core_rf_ldo_cfg5               
+	0x8a12 core_rf_ldo_cfg6               
+	0x8a13 core_rf_ldo_cfg7               
+	0x8a14 core_rf_ldo_cfg8               
+	0x8a15 core_rf_ldo_cfg9               
+	0x8a16 core_syn_en                    
+	0x8a17 core_rx_en0                    
+	0x8a18 core_rx_en1                    
+	0x8a19 core_tx_en0                    
+	0x8a1a core_tx_en1                    
+	0x8a1b core_force_ctrl                
+	0x8a1c core_rx_lna_gc_gc0             
+	0x8a1d core_rx_lna_gc_gc1             
+	0x8a1e core_rx_lna_gc_gc2             
+	0x8a1f core_rx_lna_gc_gc3             
+	0x8a20 core_rx_lna_gc_gc4             
+	0x8a21 core_rx_lna_gc_gc5             
+	0x8a22 core_rx_lna_gc_gc6             
+	0x8a23 core_rx_lna_gc_gc7             
+	0x8a24 core_rx_lna_gc_gc8             
+	0x8a25 core_rx_lna_hg_isel_gc6        
+	0x8a26 core_rx_lna_hg_isel_gc7        
+	0x8a27 core_rx_lna_hg_isel_gc8        
+	0x8a28 core_rx_lna_lg_isel_gc0        
+	0x8a29 core_rx_lna_lg_isel_gc1        
+	0x8a2a core_rx_lna_lg_isel_gc2        
+	0x8a2b core_rx_lna_lg_isel_gc3        
+	0x8a2c core_rx_lna_lg_isel_gc4        
+	0x8a2d core_rx_lna_lg_isel_gc5        
+	0x8a2e core_rx_bq_gc_gc0              
+	0x8a2f core_rx_bq_gc_gc1              
+	0x8a30 core_rx_bq_gc_gc2              
+	0x8a31 core_rx_bq_gc_gc3              
+	0x8a32 core_rx_bq_gc_gc4              
+	0x8a33 core_rx_bq_gc_gc5              
+	0x8a34 core_rx_bq_gc_gc6              
+	0x8a35 core_rx_bq_gc_gc7              
+	0x8a36 core_rx_bq_gc_gc8              
+	0x8a37 core_rx_gain_force             
+	0x8a38 core_rx_lna_isel_force         
+	0x8a39 core_tx_pwr_ctrl0              
+	0x8a3a core_tx_pwr_ctrl1              
+	0x8a3b core_tx_pwr_ctrl2              
+	0x8a3c core_tx_pwr_ctrl3              
+	0x8a3d core_syn_top_ctrl              
+	0x8a3e core_syn_mmd_cp_ctrl           
+	0x8a3f core_syn_divr_int              
+	0x8a40 core_syn_divr_frac2            
+	0x8a41 core_syn_divr_frac1            
+	0x8a42 core_syn_divr_frac0            
+	0x8a43 core_syn_cal_ctrl              
+	0x8a44 core_rx_tiai_dcoc_gc0          
+	0x8a45 core_rx_tiaq_dcoc_gc0          
+	0x8a46 core_rx_tiai_dcoc_gc1          
+	0x8a47 core_rx_tiaq_dcoc_gc1          
+	0x8a48 core_rx_tiai_dcoc_gc2          
+	0x8a49 core_rx_tiaq_dcoc_gc2          
+	0x8a4a core_rx_tiai_dcoc_gc3          
+	0x8a4b core_rx_tiaq_dcoc_gc3          
+	0x8a4c core_rx_tiai_dcoc_gc4          
+	0x8a4d core_rx_tiaq_dcoc_gc4          
+	0x8a4e core_rx_tiai_dcoc_gc5          
+	0x8a4f core_rx_tiaq_dcoc_gc5          
+	0x8a50 core_rx_tiai_dcoc_gc6          
+	0x8a51 core_rx_tiaq_dcoc_gc6          
+	0x8a52 core_rx_tiai_dcoc_gc7          
+	0x8a53 core_rx_tiaq_dcoc_gc7          
+	0x8a54 core_rx_tiai_dcoc_gc8          
+	0x8a55 core_rx_tiaq_dcoc_gc8          
+	0x8a56 core_rx_bq_daci_gc0            
+	0x8a57 core_rx_bq_dacq_gc0            
+	0x8a58 core_rx_bq_daci_gc1            
+	0x8a59 core_rx_bq_dacq_gc1            
+	0x8a5a core_rx_bq_daci_gc2            
+	0x8a5b core_rx_bq_dacq_gc2            
+	0x8a5c core_rx_bq_daci_gc3            
+	0x8a5d core_rx_bq_dacq_gc3            
+	0x8a5e core_rx_bq_daci_gc4            
+	0x8a5f core_rx_bq_dacq_gc4            
+	0x8a60 core_rx_bq_daci_gc5            
+	0x8a61 core_rx_bq_dacq_gc5            
+	0x8a62 core_rx_bq_daci_gc6            
+	0x8a63 core_rx_bq_dacq_gc6            
+	0x8a64 core_rx_bq_daci_gc7            
+	0x8a65 core_rx_bq_dacq_gc7            
+	0x8a66 core_rx_bq_daci_gc8            
+	0x8a67 core_rx_bq_dacq_gc8            
+	0x8a68 core_rx_tiai_dcoc_force        
+	0x8a69 core_rx_tiaq_dcoc_force        
+	0x8a6a core_rx_bq_daci_force          
+	0x8a6b core_rx_bq_dacq_force          
+	0x8a6c core_rx_bq_bw_cal              
+	0x8a6d core_rx_bq_cfg0                
+	0x8a6e core_rx_bq_cfg1                
+	0x8a6f core_rx_bq_cfg2                
+	0x8a70 core_rx_bq_cfg3                
+	0x8a71 core_rx_bq_cfg4                
+	0x8a72 core_rx_lna_cfg0               
+	0x8a73 core_rx_lna_cfg1               
+	0x8a74 core_rx_lna_cfg2               
+	0x8a75 core_rx_lna_cfg3               
+	0x8a76 core_rx_mixer_cfg0             
+	0x8a77 core_rx_mixer_cfg1             
+	0x8a78 core_rx_mixer_cfg2             
+	0x8a79 core_rx_adc_clk_cfg            
+	0x8a7a core_rx_iqadc_cfg              
+	0x8a7b core_rx_rssiadc_cfg            
+	0x8a7c core_syn_state0                
+	0x8a7d core_syn_state1                
+	0x8a7e core_syn_bias_cfg              
+	0x8a7f core_syn_cdb_cfg0              
+	0x8a80 core_syn_cdb_cfg1              
+	0x8a81 core_syn_cdb_cfg2              
+	0x8a82 core_syn_cdb_cfg3              
+	0x8a83 core_syn_pfd_lkd_cfg           
+	0x8a84 core_syn_cp_lpf_cfg            
+	0x8a85 core_syn_loopdiv_dsm_cfg       
+	0x8a86 core_syn_afc_cfg0              
+	0x8a87 core_syn_afc_cfg1              
+	0x8a88 core_syn_afc_cfg2              
+	0x8a89 core_syn_afc_cfg3              
+	0x8a8a core_syn_aac_cfg0              
+	0x8a8b core_syn_aac_cfg1              
+	0x8a8c core_logen_process_cal0        
+	0x8a8d core_logen_process_cal1        
+	0x8a8e core_logen_process_cal2        
+	0x8a8f core_logen_process_cal3        
+	0x8a90 core_logen_process_cal4        
+	0x8a91 core_logen_process_cal5        
+	0x8a92 core_logen_process_cal6        
+	0x8a93 core_logen_process_cal7        
+	0x8a94 core_logen_process_cal8        
+	0x8a95 core_logen_process_ca9         
+	0x8a96 core_logen_process_ca10        
+	0x8a97 core_gpadc_ctrl                
+	0x8a98 core_tx_abb_cfg                
+	0x8a99 core_tx_mixer_cfg0             
+	0x8a9a core_tx_mixer_cfg1             
+	0x8a9b core_tx_mixer_cfg2             
+	0x8a9c core_tx_pa_cfg                 
+	0x8a9d core_syn_tst_ctrl              
+	0x8a9e core_ana_test_control0         
+	0x8a9f core_ana_test_control1         
+
+
+	0x8c00 core_usb_config
+	0x8c01 core_usb_int_mask
+	0x8c02 core_usb_addr
+	0x8c03 core_usb_rx_saddr
+	0x8c05 core_usb_rx_eaddr
+	0x8c07 core_usb_rxptr
+	0x8c09 core_usb_tx_saddr0
+	0x8c0b core_usb_tx_saddr1
+	0x8c0d core_usb_tx_saddr2
+	0x8c0f core_usb_tx_saddr3
+	0x8c11 core_usb_hmode
+	0x8c18 core_usb_trig
+	0x8c19 core_usb_stall
+	0x8c1a core_usb_clear		//7bit reset   
+	0x8c20 core_usb_rx_wptr
+	0x8c22 core_usb_stall_status
+	0x8c23 core_usb_status
+	0x8c24 core_usb_txbusy
+	0x8c25 core_usb_sof_cntl
+	0x8c26 core_usb_sof_cnth
+	
+)
+
+
+(
+4 rx_freq_offset
+2 tx_freq_offset
+)
+
+(
+/* bit difinitions */
+  4 whiteoff_bit
+  6 clksel_rc
+  1 clksel_dpll_24M
+  5 clksel_dpll
+  4 clksel_xtal
+  5 adc_rccal
+  0 bpf_rccal
+  1 demod_clkoff
+)
+
+(
+  2 reload_code
+  3 gpio_latch
+  4 enable_retmem
+  7 cold_wake
+  0xef isogate_mask
+  0xe0 cs_mask
+)
+
+
+// misc ctrl
+(
+  0x01 spid2_start
+  0x02 spid_start
+  0x04 iicd_start
+  0x08 lock_otp
+  0x10 x_sethi
+  0x20 y_sethi
+  0x40 z_sethi
+  0x80 ccnt_start
+)
+// dma status bit
+(
+  0 otpd_crcok
+  1 otpd_done
+  2 spid_crcok
+  3 spid_done
+  4 iicd_crcok
+  5 iicd_done
+  6 iicd_ack
+)
+
+//bit map of core_uart_status
+(
+1 UART_STATUS_TX_BUSY
+2 UART_STATUS_RX_FIFO_EMPTY
+3 UART_STATUS_RX_FIFO_FULL
+4 UARTB_STATUS_TX_BUSY
+5 UARTB_STATUS_RX_FIFO_EMPTY
+6 UARTB_STATUS_RX_FIFO_FULL
+)
+
+(//core_uart_clksel
+0 UART_CLOCK_SELECT_BIT
+0xFE UART_CLOCK_SELECT_CRYSTAL
+0x01 UART_CLOCK_SELECT_DPLL
+
+24000000 uart_clock_freq_24M
+48000000 uart_clock_freq_48M
+)
+
+
+(//bit map of core_uart_ctrl
+0 BIT_UART_CONTROL_ENABLE
+1 BIT_UART_CONTROL_PARITY
+2 BIT_UART_CONTROL_DATA_LENGTH
+3 BIT_UART_CONTROL_STOP_BIT_SIZE
+4 BIT_UART_CONTROL_FLOW_CONTROL
+5 BIT_UART_CONTROL_7816_SMART_CARD_PROTOCOL
+6 BIT_UART_CONTROL_HALF_DUPLEX_SINGLE_LINE_UART
+7 BIT_UART_CONTROL_RATE_BAUD_SETTING
+)
+(//FUN of core_uart_ctrl
+0x01 FUN_UART_CONTROL_ENABLE
+0x06 FUN_UART_CONTROL_PARITY_ODD
+0x04 FUN_UART_CONTROL_PARITY_EVEN
+0x08 FUN_UART_CONTROL_STOP_2BIT
+0x00 FUN_UART_CONTROL_STOP_1BIT
+0x10 FUN_UART_CONTROL_FLOW_CONTROL_ENABLE
+0x20 FUN_UART_CONTROL_7816_SMART_CARD_PROTOCOL
+0x40 FUN_UART_CONTROL_HALF_DUPLEX_SINGLE_LINE_UART
+0x80 FUN_UART_CONTROL_SETTING_RATE_BAUD
+)
+
+(//bit map of core_nec_control
+0x00 BIT_NEC_ENABLE
+0x01 BIT_NEC_CLK_DIVIDE_NUM
+)
+
+(//FUN  of core_nec_control
+0x01 FUN_NEC_ENABLE
+0x30 FUN_NEC_CLK_DIVIDE_24	//24M , 
+)
+
+0x8b uart_ctrl_default //BCSP
+0x81 uart_ctrl_h4 //H4
+0x81 uart_ctrl_normal
+0x91 uart_ctrl_5line
+0x81 uart_ctrl_57600
+2 uart_baud_len
+0x00 uartclk_crystal
+0x01 uartclk_dpll
+0x1a0 uart_baud_115200
+0xbb uart_baud_256000
+0x340 uart_baud_57600
+0x34 uart_baud_921600
+0x9c4 uart_baud_9600
+
+//core_clkoff
+(
+	0 CLOCK_OFF_AUTH_ROM
+	1 CLOCK_OFF_UC_ROM
+	2 CLOCK_OFF_DEBUG_UART
+	3 CLOCK_OFF_SCHED_RAM
+	4 CLOCK_OFF_TRANCE_FIFO
+	5 CLOCK_OFF_CORDIC
+	6 CLOCK_OFF_OTPD
+	7 CLOCK_OFF_I2C
+	8 CLICK_OFF_8051
+	9 CLOCK_OFF_KEYSCAN
+	0x0a CLOCK_OFF_USB
+	0x0b CLOCK_OFF_QDECODER
+	0x0c CLOCK_OFF_SPI
+	0x0d CLOCK_OFF_PWM
+	0x0e CLOCK_OFF_UARTB
+	0x0f CLOCK_OFF_UART
+)
+
+// gpio config types
+(
+  0 gpcfg_input
+  2 gpcfg_qspi_ncs
+  3 gpcfg_qspi_sck
+  4 gpcfg_qspi_io0
+  5 gpcfg_qspi_io1
+  6 gpcfg_qspi_io2
+  7 gpcfg_qspi_io3
+  8 gpcfg_uart_txd
+  9 gpcfg_uart_rxd
+  10 gpcfg_uart_rts
+  11 gpcfg_uart_cts
+  12 gpcfg_uartb_txd
+  13 gpcfg_uartb_rxd
+  14 gpcfg_uartb_rts
+  15 gpcfg_uartb_cts
+  16 gpcfg_pwm_out0
+  17 gpcfg_pwm_out1
+  18 gpcfg_pwm_out2
+  19 gpcfg_pwm_out3
+  20 gpcfg_pwm_out4
+  21 gpcfg_pwm_out5
+  22 gpcfg_pwm_out6
+  23 gpcfg_pwm_out7
+  24 gpcfg_nec_input
+  25 gpcfg_ac_input
+  31 gpcfg_spid_miso
+  32 gpcfg_spid_ncs
+  33 gpcfg_spid_sck
+  34 gpcfg_spid_mosi
+  35 gpcfg_spid_sdio
+  
+  39 gpcfg_spid2_miso
+  40 gpcfg_spid2_ncs
+  41 gpcfg_spid2_sck
+  42 gpcfg_spid2_mosi
+  43 gpcfg_spid2_sdio
+  44 gpcfg_iic_scl
+  45 gpcfg_iic_sda
+  62 gpcfg_output_low
+  63 gpcfg_output_high
+  
+  0x00 gpcfg_high_impedance
+  0x40 gpcfg_pullup
+  0x80 gpcfg_pulldown
+  0xc0 gpcfg_no_ie
+)
+
Index: mouse_public_3mode_usb/format/rfcomm.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/rfcomm.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/rfcomm.format	(working copy)
@@ -0,0 +1,391 @@
+/*****************************************************************************/
+/* RCS HEADER -- DO NOT ERASE                                                */
+/* $Author: Administrator $                                                           */
+/* $Id: bt_rfcomm_format.upper,v 1.1 2009-09-28 04:06:17 Administrator Exp $ */
+/* Orisil Technology                                                      */
+/*****************************************************************************/
+
+/**********/
+/* memory */
+/**********/
+
+memalloc(
+1 memRemoteRPNBitRate
+1 memRemotePRNDataBits
+1 memRemotePRNStopBit
+1 memRemotePRNParity
+1 memRemotePRNFlowControl
+1 memRemotePRNXon
+1 memRemotePRNXoff
+
+
+3 mem_mod2div_temp
+2 mem_contw_temp
+2 mem_attrib_list
+
+//rfcomm head
+1 mem_current_adss
+1 mem_current_channel
+1 mem_current_frame_type
+1 mem_current_fcs
+2 mem_current_length
+2 mem_rfcomm_uih_payload_ptr
+
+//rfcomm uih
+1 mem_uih_cmd_type
+2 mem_uih_length
+2 mem_param_payload_ptr
+
+
+//rfcomm modem status
+1 mem_ms_param
+
+//rfcomm pn
+1 mem_pn_credit_flow_type_info
+1 mem_pn_priority
+1 mem_pn_acknowledg_timer
+1 mem_pn_max_retrans
+
+1 mem_rfcomm_send_adss
+1 mem_rfcomm_send_frame_type
+1 mem_rfcomm_send_fcs
+1 mem_rfcomm_send_offset
+
+)
+
+xmemalloc(
+1 mem_pn_dlci
+2 mem_pn_max_frame_size
+
+1 memFCStemp1
+1 memFCStemp2
+1 memFCStemp3
+
+1 mem_rfcomm_initiator
+
+1 mem_remote_spp_channel
+
+1 mem_HIUfcs_SPP
+1 mem_HIUfcs_SPP_WCredits
+
+1 mem_rfcomm_send_more_pkt
+
+1 mem_remote_credits
+1 mem_credit_given
+
+//rfcomm modem status
+1 mem_ms_channel
+
+1 mem_rfcomm_credit_flag
+
+2 mem_rfcomm_max_frame_size
+1 mem_rfcomm_credit_init_data
+
+2 mem_cb_receive_spp_data
+
+2 mem_nl_rx_data_src
+2 mem_nl_rx_len_all
+)
+
+
+(
+0 CREDIT_DISABLE
+1 CREDIT_ENABLE
+)
+
+
+/************************************************************************/
+  
+
+ 
+/************/
+/* constant */
+/************/
+
+/* RFCOMM state for Headset (memRFCOMM_State) */ 
+  (
+    0 RFCOMM_IDLE           /* before the responsor HS receive SABM            */
+    1 RFCOMM_W4_DLCI0_OPEN
+    2 RFCOMM_W4_DLCI0_CLOSE
+    3 RFCOMM_START_DLCI0    /* After respond SABM frame (DLCI=0)               */
+    4 RFCOMM_W4_DLCI_OPEN
+    5 RFCOMM_W4_DLCI_CLOSE
+    6 RFCOMM_DLCI_OPENED    
+   
+  )
+  
+/* RFCOMM timer constants   */
+  (
+    1000  RFCOMM_T1         /* Used by SABM and DISC frames,100*20ms = 20s     */     
+    1000  RFCOMM_T2         /* Used by commands send in UIH on DLCI0,          */
+    300   RFCOMM_T3_RINGON  /* 6s for ring fade time                           */
+  
+  )
+
+/* Command Type */
+  (
+    0x3F RSP_RX_SABM        /*responsor expect SABM from initiator             */
+    0x3F INI_TX_SABM
+	
+    0x73 RSP_TX_UA          /*responsor send out UA command                    */
+    0x73 UA_WFBIT_SET	    /* UA control field with F bit set                 */
+	
+    0xEF RSP_RX_UIH         /*responsor expect UIH from initiator              */
+
+    0xEF RSP_TX_UIH         /*responsor send UIH to initiator                  */
+     
+    0x1F RSP_TX_DM          /*responsor send DM to initiator                   */
+    0x1F DM_WFBIT_SET       /* DM control field with F bit set                 */
+    0x0F DM_WFBIT_CLEAR     /* DM control field with F bit clear               */
+
+    0x53 RSP_RX_DISC        /*responsor expect DISC from initiator             */
+    0x53 INI_TX_DISC	    /*initiator send DISC control type command         */
+     
+    0xFF RSP_RX_UIH_WDATA   /*UIH data with credit flow control info           */
+    
+    
+  )
+
+/* Multiplexor commands and responses frames */
+  (
+    0x83 PN_COMMAND           /* Bit 0 EA C/R Type = 000001         */
+    0x81 PN_RESPONSOR         /* Bit 0 EA C/R Type = 000001         */
+    
+    0xE3 MSC_COMMAND          /* Bit 0 EA C/R Type = 000111         */
+    0xE1 MSC_RESPONSOR
+ 
+    0x13 NSC_COMMAND          /* Bit 0 EA C/R Type = 001000         */
+    0x11 NSC_RESPONSOR        /* Bit 0 EA C/R Type = 001000         */
+
+    0x23 TEST_COMMAND         /* Bit 0 EA C/R Type = 000111         */
+    0x21 TEST_RESPONSOR 
+    
+    0x93 RPN_COMMAND          /* Bit 0 EA C/R Type = 001001         */
+    0x91 RPN_RESPONSOR 
+    
+    0x53 RLS_COMMAND          /* Bit 0 EA C/R Type = 001010         */
+    0x51 RLS_RESPONSOR 
+
+    0xA3 FCON_COMMAND         /* Bit 0 EA C/R Type = 000101         */
+    0xA1 FCON_RESPONSOR 
+    
+    0x63 FCOFF_COMMAND        /* Bit 0 EA C/R Type = 000110         */
+    0x61 FCOFF_RESPONSOR 
+    	
+    0x03 RLS_OVERRUN
+    0x05 RLS_PARITY_ERROR
+    0x09 RLS_FRAMING_ERROR
+  )
+
+/* memLocalCredit */
+  (
+    0x01 RFCOMM_CREDIT
+  )
+
+  (
+  	0x007f RFCOMM_MAX_FRAME_SIZE
+  )
+
+/* UIH received Data length */
+  (
+    0  LENGTH_ZERO
+    
+    6  LENGTH_OK
+    7  LENGTH_HOT
+    8  LENGTH_RING
+    9  LENGTH_ERROR
+    9  LENGTH_AGVOL_ONEBYTE
+    10 LENGTH_AGVOL_TWOBYTE
+    10 LENGTH_VOL_ONEBYTE
+    11 LENGTH_VOL_TWOBYTE
+    12 LENGTH_BRSF
+    13 LENGTH_PLUS_CIEV
+    15 LENGTH_INBANDRING
+    14 LENGTH_CIEV_CALL
+    17 LENGTH_CRING
+    20 LENGTH_BRSF_OK
+    24 LENGTH_CIND0
+    28 LENGTH_CIEV_TWO
+    32 LENGTH_CIND_OK
+    59 LENGTH_CIND_OK2
+    100 LENGTH_DISCARD
+  )
+  
+/************/
+/* flags    */
+/************/
+  
+/* memRFCOMM_L2CAP_Interface */
+  (
+    0 RFCOMM_TX_W4BUF_FLAG    /* Wait for Tx buffer empty flag */
+    1 RFCOMM_CLOSE_LINK_FLAG
+  )
+  
+
+    
+/* memRemoteMSC		*/
+  (
+    0 MSC_EA_BIT
+    1 MSC_FC_BIT
+    2 MSC_RTC_BIT
+    3 MSC_RTR_BIT
+    6 MSC_IC_BIT
+    7 MSC_DV_BIT
+  )
+
+/* memRemoteRLS         */
+  (
+    0x0C OVERRUN_ERROR
+    0x0A PARITY_ERROR
+    0x09 FRAMING_RERROR
+  )
+  
+/* memRemoteRPNBitRate  */
+  (
+    0x00 BITS2400
+    0x01 BITS4800
+    0x02 BITS7200
+    0x03 BITS9600
+    0x04 BITS19200
+    0x05 BITS38400
+    0x06 BITS57600
+    0x07 BITS115200
+    0x08 BITS230400
+  )
+  
+/* memRemotePRNDataBits	*/
+  (
+    0x00 DATABITS5
+    0x01 DATABITS6
+    0x02 DATABITS7
+    0x03 DATABITS8
+  )
+  
+/* memRemotePRNStopBit	*/
+  (
+    0    ONESTOP
+    1    ONEHALFSTOP
+  )
+  
+/* memRemotePRNParity   */
+  (
+    0    ODDPARITY
+    1    EVENPARITY
+    2    MARKPARITY
+    3    SPACEPARITY
+    
+    7    PARITY_ENABLE_BIT
+  )
+
+/* RPN bit mask(in)     */
+  (
+     0   BIT_RATE_MASK_BIT
+     1   DATA_BITS_MASK_BIT
+     2   STOP_BITS_MASK_BIT
+     3   PARITY_MASK_BIT
+     4   PARITY_TYPE_MASK_BIT
+     5   XON_CHAR_MASK_BIT
+     6   XOFF_CHAR_MASK_BIT
+  )
+  
+/* RPN bit mask(in) 2    */
+  (
+     0   XON_XOFF_INPUT_MASK_BIT
+     1   XON_XOFF_OUTPUT_MASK_BIT
+     2	 RTR_INPUT_MASK_BIT
+     3   RTR_OUTPUT_MASK_BIT
+     4   RTC_INPUT_MASK_BIT
+     5   RTC_OUTPUT_MASK_BIT
+
+  )
+
+/* memRFCOMM_Request	*/
+  (
+    0 SEND_MSC_CMD_REQ_FLAG
+    1 SEND_AT_CKPD_REQ_FLAG
+    2 SEND_RING_REQ_FLAG
+    3 SEND_SABM_CMD
+  )
+  
+/* memRFCOMM_Misc_Flag  */
+  (
+    0 MSC_CDM_ALREADY_SEND_FLAG
+    1 CREDIT_FLOW_USED_FLAG
+    2 DONT_EMBEDDED_CREDIT_FLAG 
+    3 MSC_EXCHANGE_DONE_FLAG
+    4 FLOW_CONTROL_FCOFF_BIT            /* set when receive FCoff, clear when FCon   */
+  )
+  
+/* memRemoteMSC		*/
+  (
+    1 FLOW_CONTROL_FC_BIT		/* received MSC FC bits                      */
+  
+  )
+/* Address filed        */
+  (
+    0 ADDR_EA_BIT
+    1 ADDR_CR_BIT
+    2 ADDR_D_BIT
+  )
+//should be same as descripted in SDP
+(
+    1 SPP_SLAVE_CHANNEL
+    7 OBEX_SERVER_CHANNEL
+    8 HF_SERVER_CHANNEL 
+    9 HS_SERVER_CHANNEL
+)
+/* memRFCOMM_Flag */
+(
+	0 USING_HF_PROFILE
+	1 USING_HS_PROFILE
+	2 USING_SPP_PROFILE
+)
+/*RFCOMM Frame Type*/
+(
+	0x3f RFCOMM_FRAME_TYPE_SABM
+	0x73 RFCOMM_FRAME_TYPE_UA
+	0xEF RFCOMM_FRAME_TYPE_UIH
+	0xFF RFCOMM_FRAME_TYPE_UIH_CREDITS
+	0x53 RFCOMM_FRAME_TYPE_DISCONN
+)
+/*RFCOMM UIH CMD TYPE*/
+(
+	0x41 UIH_PARAM_NEG_CMD
+	0x40 UIH_PARAM_NEG_RES
+	0x49 UIH_PARAM_CMD_REMOVE_PORT
+	0x71 UIH_MODEM_STATUS_CMD
+	0x70 UIH_MODEM_STATUS_RES
+)
+
+/*bits in rfcomm address*/
+(
+	0 RFCOMM_ADDRESS_EXT_LEN
+	1 RFCOMM_ADDRESS_CR
+	2 RFCOMM_ADDRESS_DERECTION
+
+
+)
+
+	(                                   
+	0 RFCOMM_CHANNEL_STATE_PN_CMD
+	1 RFCOMM_CHANNEL_STATE_PN_RES
+	2 RFCOMM_CHANNEL_STATE_SABM
+	3 RFCOMM_CHANNEL_STATE_UA
+	4 RFCOMM_CHANNEL_STATE_SND_MS_CMD
+	5 RFCOMM_CHANNEL_STATE_RCV_MS_CMD
+	6 RFCOMM_CHANNEL_STATE_SND_MS_RES
+	7 RFCOMM_CHANNEL_STATE_RCV_MS_RES
+	0xff RFCOMM_CHANNEL_SETUP_COMPLETE
+	) 
+
+	/*mem_rfcomm_send_more_pkt*/
+	(
+	1 MORE_PKT_MSC_CMD_HF
+	2 MORE_PKT_MSC_CMD_HS
+	3 MORE_PKT_MSC_CMD_SPP
+	4 MORE_PKT_MSC_CMD_OBEX
+	)
+
+	(
+	127 RFCOMM_MALLOC_SIZE
+	)
\ No newline at end of file
Index: mouse_public_3mode_usb/format/sdp.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/sdp.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/sdp.format	(working copy)
@@ -0,0 +1,70 @@
+
+memalloc(
+0 mem_sdp_mem_start
+8 mem_sdp_uuid_search_ptr
+2 mem_sdp_continue_byte
+1 mem_sdp_pduid
+2 mem_sdp_transactionid
+2 mem_sdp_transactionid_local
+2 mem_sdp_attribute_maxbyte
+2 mem_sdp_record_maxcnt
+4 mem_sdp_record_handle
+1 mem_sdp_LACAP_found
+1 mem_sdp_RFCOMM_found
+0 mem_sdp_handle_list
+32 mem_sdp_attrib_list
+2 mem_sdp_error_code
+2 mem_sdp_all_length
+1 mem_handle_humber
+2 mem_search_uuid
+0 mem_sdp_mem_end
+)
+xmemalloc(
+2 mem_ui_uuid_table
+22 mem_all_uuid_16bits
+34 mem_all_uuid_128bits
+2 mem_sdp_l2capch_ptr
+)
+(
+0 AGORHS_SERVICE
+1 GENAUDIO_SERVICE
+2 HANDSFREE_SERVICE
+)
+(
+0 ATTRIBUTEID_0000
+1 ATTRIBUTEID_0001
+2 ATTRIBUTEID_0004
+3 ATTRIBUTEID_0009
+4 ATTRIBUTEID_0100
+5 ATTRIBUTEID_0302
+6 ATTRIBUTEID_0006
+7 ATTRIBUTEID_0311
+)
+
+(
+0x01 SDP_ERROR_RES
+0x02 SDP_SEARCH_REQ
+0x03 SDP_SEARCH_RES
+0x04 SDP_ATTRIBUTE_REQ
+0x05 SDP_ATTRIBUTE_RES
+0x06 SDP_SEARCHATTRIB_REQ
+0x07 SDP_SEARCHATTRIB_RES
+)
+0x2600 sdp_max_amount
+250 SDP_MALLOC_SIZE
+0x6e sdp_tid_spp //any number
+
+(
+0x1f11 SDP_UUID_HS_AUDIO_GATEWAY
+)
+
+(
+0X09 SDP_ATTRIBUTE_ID
+0x0a SDP_ATTRIBUTE_RANGE
+)
+
+(//mem_sdp_handle_list
+7 SDP_MAX_HANDLE_NUMBER
+)
+
+ 
Index: mouse_public_3mode_usb/format/security.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/security.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/security.format	(working copy)
@@ -0,0 +1,108 @@
+
+memalloc (
+
+
+16 mem_random_number
+16 mem_round_key
+16 mem_kinit
+
+16 mem_input_store
+16 mem_x
+15 mem_y
+1 mem_y15
+17 mem_key_store
+1 mem_key_store_end
+2 memp_ar_key
+2 memp_ar_input
+10 mem_ar_hround
+
+
+1 mem_ec_infinite
+2 mem_ec_loopc
+1 mem_aes_cmac_data_length
+
+0 memdat
+/* ecc calculation */
+
+24 mem_ax
+24  mem_ay
+24  mem_az
+24 mem_bx
+0 mem_ax_256 //32 bytes
+24 mem_by
+8 mem_bz
+16 mem_ay_256 // 32 bytes
+16 mem_cx
+8 mem_az_256 // 32 bytes
+23 mem_cy
+1 mem_cy5
+0 mem_bx_256 // 32 bytes
+24 mem_cz
+8  mem_k
+16 mem_by_256 // 31 bytes
+16 mem_align
+
+0 mem_bz_256  //32 bytes
+0 mem_tmp1
+24 memahbak
+8 mem_tmp5
+0 mem_cx_256  //32 bytes
+16 memahsave
+16  mem_tmp2
+0 mem_cy_256  // 32 bytes
+0  memahsave_end 
+1  mem_addr_padding 
+7   mem_addr_value         /* 12 bytes     */ 
+0 mem_tmp3
+5 mem_t1
+3  mem_addr_value_end   
+15 mem_addr_iocap_end
+1 mem_cy5_256 // 1 byte
+0 mem_cz_256 // 32 bytes
+0 mem_tmp0
+8 mem_t0
+16 mem_tmp0a
+8  mem_t2
+16 mem_k_256 //32 bytes
+16 mem_t3
+8  mem_tmp1_256 //32 bytes
+24 mem_t7
+
+
+32 mem_tmp5_256
+32  mem_tmp2_256
+0 mem_tmp3_256
+32 mem_t1_256
+0 mem_tmp0_256
+32 mem_t0_256
+32 mem_t2_256
+32 mem_t3_256
+32 mem_t7_256
+
+24 mem_p		
+24 mem_a
+24 mem_b
+24 mem_gx
+24 mem_gy
+32 memh0
+
+
+32 mem_p_256		
+32 mem_a_256
+32 mem_gx_256
+32 mem_gy_256
+16 mem_le_slat
+
+)
+
+xmemalloc(
+5 mem_ccm_pcnt_tx
+5 mem_ccm_pcnt_rx
+4 mem_ccm_last_mic
+0 mem_ccm_iv
+4 mem_ccm_ivm
+4 mem_ccm_ivs
+2 mem_ccm_len
+2 mem_ccm_rx_ptr
+)
+
Index: mouse_public_3mode_usb/format/simple_pairing.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/simple_pairing.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/simple_pairing.format	(working copy)
@@ -0,0 +1,212 @@
+/* simple pairing page */
+
+memalloc(
+
+//4 mem_hci_ssp_mode
+0 mem_sp_state_start
+1 mem_sp_state
+1 mem_master_sp_state
+1 mem_sp_flag
+1 mem_master_sp_flag
+1 mem_sp_calc
+1 mem_sp_dh_ready
+1 mem_sp_localsm
+1 mem_pairing_auth
+
+1 mem_sp_local_key_send_count
+1 mem_sp_remote_key_recv_count
+1 mem_sp_remote_key_invalid
+1 mem_sp_dhkey_invalid
+4 mem_gkey
+0 mem_sp_state_end
+
+8 mem_le_pubkey_remote_x_256
+0 mem_sp_pubkey_remote
+24 mem_sp_pubkey_remote_x
+0 mem_sp_pubkey_remote_x_end
+8 mem_le_pubkey_remote_y_256
+24 mem_sp_pubkey_remote_y
+
+8 mem_le_dhkey_256
+24 mem_sp_dhkey
+0 mem_sp_dhkey_end
+
+16 mem_sp_random_local
+0 mem_sp_random_local_end
+16 mem_sp_random_remote
+0 mem_sp_random_remote_end
+0 memresult
+0 mem_sp_calc_result
+4 memh
+4 memg
+4 memf
+4 meme
+0 mem_sp_calc_result_high
+4 memd
+4 memc
+4 memb
+4 mema
+16 mem_sp_check_result
+16 mem_sp_confirm_remote
+16 mem_sp_prarm_stack
+)
+
+xmemalloc(
+1 mem_sc_only_mode
+1 mem_sp_debug_mode
+1 mem_secure_connections_enable
+1 mem_sp_local_key_invalid
+1 mem_sc_calc
+1 mem_sc_local_key_invalid
+
+
+32 mem_sc_private_key_256
+32 mem_sc_pubkey_local_x_256
+32 mem_sc_pubkey_local_y_256
+
+24 mem_sp_private_key
+0 mem_sp_pubkey_local
+24 mem_sp_pubkey_local_x
+0 mem_sp_pubkey_local_x_end
+24 mem_sp_pubkey_local_y
+
+1 mem_ssp_enable
+1 mem_lmp_io_cap_payload_iocap
+1 mem_lmp_io_cap_payload_oob_auth_data
+1 mem_lmp_io_cap_payload_auth_req
+
+0 mem_sp_state_xmem
+3 mem_sp_iocap_remote
+1 mem_flag_mode_ssp_pin
+1 mem_ssp_mode_flag
+1 mem_authentication_passkey_times
+1 mem_passkey_1bit
+1 mem_flag_pairing_state
+0 mem_sp_state_xmem_end
+)
+/* simple pairing status flag */
+(
+  0x00   SP_FLAG_STANDBY
+  0x01   SP_FLAG_COMMIT
+  0x02   LE_SP_FLAG_COMMIT_256
+
+)
+
+/* simple pairing calc flag */
+(
+  0x00   SP_CALC_STANDBY
+  0x01   SP_CALC_PUBKEY
+  0x02   SP_CALC_DHKEY
+  0x03   SP_CALC_PUBKEY_256
+  0x04   SP_CALC_DHKEY_256
+)
+
+/* simple pairing state */
+(
+  0x00   SP_STAT_NULL
+  0x01   SP_STAT_KEY_RECV
+  0x02   SP_STAT_KEY_GENERATE
+  0x03   SP_STAT_KEY_SEND
+  0x04   SP_STAT_COMMIT_CALC
+  0x05   SP_STAT_COMMIT_SEND
+  0x06   SP_STAT_RANDOM_RECV
+  0x07   SP_STAT_RANDOM_SEND
+  0x08   SP_STAT_CONFIRM_RECV
+  0x09   SP_STAT_CONFIRM_CHECK
+  0x0A   SP_STAT_CONFIRM_CALC
+  0x0B   SP_STAT_CONFIRM_SEND
+  0x0C   SP_STAT_LINK_KEY_CALC
+  0x0F   SP_STAT_DONE
+  0x10   SP_STAT_FEATURE_EXT_SEND
+  0x11   SP_STAT_GKEY_CALC
+  /*simple pairing master only*/
+  0x12   SP_MASTER_STAT_START_SKIP
+  0x13   SP_MASTER_STAT_START_DONE
+  0x14   SP_STAT_COMMITMENT_COMPARE
+  0x15   SP_STATE_END
+)
+
+
+/* simple paring invalid flag */
+(
+  0x00   SP_KEY_INVALID
+  0x01   SP_KEY_VALID
+  0x03   SP_KEY_VALID_256
+
+)
+
+/* encapsulated defination for P-256 key */
+(
+  0x01  ENCAPSULATED_MAJOR_TYPE
+  0x02  ENCAPSULATED_MINOR_TYPE_P256
+  0x40  ENCAPSULATED_LEN_P256
+)
+/* encapsulated defination for P-192 key */
+(
+  0x01  ENCAPSULATED_MAJOR_TYPE_P192
+  0x01  ENCAPSULATED_MINOR_TYPE_P192
+  0x30  ENCAPSULATED_LEN_P192
+)
+
+/* bluetooth 2.1 support flag */
+(
+  0x00  SIMPLE_PAIRING_ENABLE
+  0x01  ENCRYPTION_PAUSE_ENABLE
+  0x02  EXTENDED_INQUIRY_RESPOSE_ENABLE
+  0x03  SNIFF_SUBRATING_ENABLE
+)
+
+/*mem_sp_localsm*/
+(
+  0x00 DEFAULT_STATEMACHINE
+  0x01 LOCAL_STATEMACHINE
+)
+
+(
+ 0x00 DEFALT_PAIRING_AUTH
+ 0x01 PAIRING_AUTH
+)
+
+//mem_secure_connections_enable
+(
+0 SECURE_CONNECTIONS_LE_BIT
+1 SECURE_CONNECTIONS_BR_BIT
+)
+
+(
+1 SSP_MODE_SSP_PIN_FLAG
+2 SSP_MODE_PASSKEY_ENTRY_FLAG
+3 SSP_MODE_JUST_WORK_FLAG
+)
+
+(
+7 FLAG_MODE_SSP_PIN_REVICEVE_COMPARISON_BIT
+6 FLAG_MODE_SSP_PIN_RECIEVE_DHKEY_BIT
+0 FLAG_MODE_SSP_PIN_COMPARISON_RESULT_BIT
+)
+(
+1 FLAG_PAIRING_STATE_PAIRING
+0 FLAG_PAIRING_STATE_NOT_PAIRING
+)
+(//LMP_IO_CAP_REQ & LMP_IO_CAP_RES
+//IO capability
+0x00 IO_CAPABILITY_DISPLAY_ONLY
+0x01 IO_CAPABILITY_DISPLAY_YESNO
+0x02 IO_CAPABILITY_KEYBOARD_ONLY
+0x03 IO_CAPABILITY_NO_INPUT_NO_OUTPUT
+
+//oob data Present
+0x00 OOB_DATA_PRESENT_NOT_PRESENT
+0x01 OOB_DATA_PRESENT_P192_DATA
+0x02 OOB_DATA_PRESENT_P256_DATA
+0x03 OOB_DATA_PRESENT_P192_P256_DATA
+// authentication requirements
+0x00 AUTH_REQ_MITM_PROTECTION_NOT_REQUIRED_NO_BONDING
+0x01 AUTH_REQ_MITM_PROTECTION_REQUIRED_NO_BONDING
+0x02 AUTH_REQ_MITM_PROTECTION_NOT_REQUIRED_DEDICATED_BONDING
+0x03 AUTH_REQ_MITM_PROTECTION_REQUIRED_DEDICATED_BONDING
+0x04 AUTH_REQ_MITM_PROTECTION_NOT_REQUIRED_GENERAL_BONDING
+0x05 AUTH_REQ_MITM_PROTECTION_REQUIRED_GENERAL_BONDING
+)
+
+  
Index: mouse_public_3mode_usb/format/ui.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ui.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/ui.format	(working copy)
@@ -0,0 +1,451 @@
+/*****************************************************************************/
+/* RCS HEADER -- DO NOT ERASE                                                */
+/* $Author: Administrator $                                                           */
+/* $Id: bt_ui_format.upper,v 1.1 2009-09-28 04:06:17 Administrator Exp $     */
+/************************************************************************/
+
+
+	/* ========= memory ============== */
+memalloc(
+2 mem_UI_data_txbuff_length
+
+1 mem_ipc_skip_continue_proc
+0 mem_ui_timer_temp  //length 4
+4 mem_ipc_rega_temp
+) 
+
+xmemalloc(
+//UI Work area
+1 mem_ipc_lock_bt
+1 mem_ipc_lock_c51
+8 mem_ipc_fifo_bt2c51
+8 mem_ipc_fifo_c512bt
+
+1 mem_ui_button_timer
+1 mem_ui_button_last_state
+4 mem_ui_timer_last_btclk
+2 mem_discovery_timeout_timer_count
+1 mem_hid_handshake_timer_count
+1 memui_reconnect_mode
+2 mem_ui_state_map
+
+//UI Config area
+1 mem_ui_profile_supported
+1 mem_ui_button_timeout
+1 mem_ui_button_gpio
+2 mem_discovery_timeout
+1 mem_pin_length
+16 mem_pin
+
+)
+/************/
+/* constant */
+/************/
+
+//mem_ui_state_map
+(
+0 UI_STATE_BT_CONNECTED
+1 UI_STATE_BT_SETUP_COMPLETE
+2 UI_STATE_BT_HID_CONN
+3 UI_STATE_BT_HID_HANDSHAKE
+4 UI_STATE_BT_SPP_CONN
+5 UI_STATE_BT_SNIFF
+6 UI_STATE_BT_DISCOVERY
+7 UI_STATE_BT_RECONNECT
+8 UI_STATE_BT_SLAVE_ROLE
+9 UI_STATE_BLE_CONNECTED
+10 UI_STATE_BLE_WRITE_RCV
+11 UI_STATE_BLE_ADV
+12 UI_STATE_BTN_DOWN
+)
+
+(
+1 UI_STATE_SPP_NL_AUTO_DISCOVER
+
+)
+
+/* UI state for Headset (memui_HS_State) */ 
+   (
+    0 UI_HEADSET_DISCONNECT
+    1 UI_HEADSET_IDLE                   /* before the responsor HS receive SABM      */
+    2 UI_HEADSET_W4CONNECT
+    3 UI_HEADSET_RINGING
+    4 UI_HEADSET_CONNECTED
+    5 UI_HEADSET_PARING
+  )
+/* memui_BB_State */
+(
+  0 UI_BB_OFF
+  1 UI_BB_IDLE
+  2 UI_BB_DISCOVERY
+  3 UI_BB_CONNECTED_ACTIVE_NO_SCO
+  4 UI_BB_CONNECTED_ACTIVE_WITH_SCO
+  5 UI_BB_CONNECTED_ACTIVE_WAIT_SNIFF
+  6 UI_BB_CONNECTED_SNIFF
+  7 UI_BB_RECONNECT
+  8 UI_BB_CONNECTED_SNIFF_WITH_SCO
+)
+
+/************/
+/* flags    */
+/************/
+  
+/* memui_Misc_Flags */
+  (
+    5 NO_IDLE_TURN_OFF
+    7 ANSWER_RING_FLAG               /* 1 Answer,0 no*/
+  )
+
+/* mem_UI_SCH_Interface */
+  (
+    0  UI_HS_PAIRING 
+    2  UI_REQ_CLOSE_RFCOMM
+    3  UI_LINK_LOST
+    4  UI_REQ_OPEN_SCO
+    6  UI_REQ_CLOSE_SCO
+  )
+  
+/* memui_PassOverKey */
+  (
+    0  ANSWER_RING_BIT
+    0  AG_SEND_RING_BIT
+    1  VOL_UP_BIT
+    2  VOL_DOWN_BIT
+    3  INI_CALL_BIT
+    4  DAIL_LAST_CALL
+    5  END_CALL_BIT
+    6  NOKIA_VOICE_ACTIVE 
+    7  REJECT_CALL_BIT
+  )
+  
+/* memui_reconnect_mode */
+(
+  0 NO_RECONNECTION
+  1 RECONNECT_HID
+  2 RECONNECT_HF
+  3 RECONNECT_HS
+  4 RECONNECT_HID_HF
+  5 RECONNECT_HID_HS
+)
+/* memui_Commands */
+(
+0 BT_CMD_STANDBY
+1 BT_CMD_START_DISCOVERY
+2 BT_CMD_STOP_DISCOVERY
+3 BT_CMD_RECONNECT
+4 BT_CMD_DISCONNECT
+5 BT_CMD_ENTER_SNIFF
+6 BT_CMD_EXIT_SNIFF
+7 BT_CMD_ENTER_SNIFF_SUBRATING
+8 BT_CMD_EXIT_SNIFF_SUBRATING
+9 BT_CMD_SNIFF_TEST
+10 BT_CMD_SET_PIN_CODE
+11 BT_CMD_START_INQUIRY
+12 BT_CMD_STOP_INQUIRY
+13 BT_CMD_START_ADV
+14 BT_CMD_STOP_ADV
+15 BT_CMD_START_DIRECT_ADV
+16 BT_CMD_STOP_DIRECT_ADV
+17 BT_CMD_LE_DISCONNECT
+18 BT_CMD_LE_UPDATE_CONN
+19 BT_CMD_LED_OFF
+20 BT_CMD_LED_ON
+21 BT_CMD_LED_BLINK
+22 BT_CMD_LE_START_CONN
+23 BT_CMD_LE_START_SCAN
+24 BT_CMD_LE_STOP_SCAN
+25 BT_CMD_ENTER_HIBERNATE
+27 BT_CMD_LE_SMP_SECURITY_REQUEST
+29 BT_CMD_ROLE_SWITCH
+30 BT_CMD_BB_RECONN_CANCEL
+31 BT_CMD_STORE_RECONN_INFO_LE
+32 BT_CMD_STORE_RECONN_INFO_BT
+33 BT_CMD_DHKEY_NOT_ACCEPT
+34 BT_CMD_START_24G
+35 BT_CMD_STOP_24G
+36 BT_CMD_PAIR_24G
+37 BT_CMD_STORE_RECONN_INFO
+)
+
+(
+0x00 BT_EVT_NULL
+0x01 BT_EVT_BB_CONNECTED
+0x02 BT_EVT_BB_DISCONNECTED
+0x03 BT_EVT_RECONN_STARTED
+0x04 BT_EVT_RECONN_FAILED
+0x05 BT_EVT_SETUP_COMPLETE
+0x06 BT_EVT_HID_CONNECTED
+0x07 BT_EVT_HID_DISCONNECTED
+0x08 BT_EVT_SPP_CONNECTED
+0x09 BT_EVT_SPP_DISCONNECTED
+0x0A BT_EVT_PINCODE_REQ
+0x0B BT_EVT_ENTER_SNIFF
+0x0C BT_EVT_EXIT_SNIFF
+0x0D BT_EVT_ENTER_SNIFF_SUB
+0x0E BT_EVT_EXIT_SNIFF_SUB
+0x0F BT_EVT_DISCOVERY_STOPED
+0x10 BT_EVT_BUTTON_LONG_PRESSED
+0x12 BT_EVT_HID_HANDSHAKE
+0X13 BT_EVT_RECONN_PAGE_TIMEOUT
+0x14 BT_EVT_LE_CONNECTED
+0X15 BT_EVT_LE_DISCONNECTED
+0x16 BT_EVT_ML2CAP_CONN_REFUSED
+0x17 BT_EVT_BUTTON_ENTER_HIBERNATE
+0x18 BT_EVT_LINKKEY_GENERATE
+0x19 BT_EVT_SWITCH_NOT_ACCEPT
+0x20 BT_EVT_SWITCH_ACCEPT
+0x21 BT_EVT_SNIFF_NOT_ACCEPT
+0x22 BT_EVT_SNIFF_ACCEPT
+0x23 BT_EVT_UNSNIFF_ACCEPT
+0x24 BT_EVT_UNSNIFF_NOT_ACCEPT
+0x25 BT_EVT_BUTTON_ADJUST_DPI
+0x26 BT_EVT_SEND_UNSNIFF_ACCEPT
+0x27 BT_EVT_VIRTUAL_CABLE_UNPLUG
+0x28 BT_EVT_LE_WRITE_REQUEST
+0x29 BT_EVT_LE_ENC_INFO
+0x2a BT_EVT_SWITCH_FAIL_MASTER
+0x2b BT_EVT_SWITCH_SUCCESS_MASTER
+0x2c BT_EVT_BUTTON_DOWN
+0x2d BT_EVT_BUTTON_UP
+0x2e BT_EVT_REMOTE_UNSNIFF
+0x30 BT_EVT_LE_PAIRING_FAIL
+0x31 BT_EVT_LE_PAIRING_SUCCESS
+0x32 BT_EVT_LE_START_ENC
+0X33 BT_EVT_LE_PAUSE_ENC
+0X34 BT_EVT_LE_TK_GENERATE
+0x35 BT_EVT_BT_GKEY_GENERATE
+0x36 BT_EVT_BT_GET_PASSKEY
+0x37 BT_EVT_BT_PAIRING_FAIL
+0x38 BT_EVT_BT_PAIRING_SUCCESS
+0x39 BT_EVT_24G_PAIRING_COMPLETE
+0x3a BT_EVT_24G_ATTEMPT_FAIL
+0x3b BT_EVT_LE_GKEY_GENERATE
+0x3c BT_EVT_24G_ATTEMPT_SUCCESS
+0x3d BT_EVT_STORE_NVRAM
+0x3e BT_EVT_LE_PAIRING_COMPLETE
+0x3F BT_EVT_LE_RECONNECT_COMPLETE
+0x40 BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP
+0x41 BT_EVT_LE_LTK_LOST
+0x42 BT_EVT_LE_UPDATE_PHY
+0x43 BT_EVT_LE_GET_PASSKEY
+0x44 BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED
+)
+//switch
+(
+0 OFF
+1 ON
+)
+/* memui_mem_lock */
+(
+    0 MEM_UNLOCK
+    1 MEM_LOCK
+)
+/* memui_flag0 */
+(
+    0 UI_USER_DATA_FLAG
+    1 UI_WII_WAITING_SLEEP
+    2 UI_KEYBOARD_SNIFF_SKIP
+)
+/* mem_master_type */
+(
+    0 MTYPE_HID_DEFAULT
+    1 MTYPE_HID_SSP
+    2 MTYPE_SPP
+)
+
+	(	
+	0x01 RECIEVE_SDP_CONN_RES
+	0x02 RECIEVE_SDP_CFG_REQ
+	0x03 RECIEVE_SDP_CFG_RES
+	0x04 RECIEVE_RFCOMM_CONN_RES
+	0x05 RECIEVE_RFCOMM_CFG_REQ
+	0x06 RECIEVE_RFCOMM_CFG_RES
+	0x07 RECIEVE_HID_CTRL_CONN_RES
+	0x08 RECIEVE_HID_CTRL_CFG_REQ
+	0x09 RECIEVE_HID_CTRL_CFG_RES
+	0x0A RECIEVE_HID_INT_CONN_RES
+	0x0B RECIEVE_HID_INT_CFG_REQ
+	0x0C RECIEVE_HID_INT_CFG_RES
+	0x0D RECIEVE_AVCTP_CONN_RES
+	0x0E RECIEVE_AVCTP_CFG_REQ
+	0x0F RECIEVE_AVCTP_CFG_RES
+	0x10 RECIEVE_AVDTP_SIGNAL_CONN_RES
+	0x11 RECIEVE_AVDTP_SIGNAL_CFG_REQ
+	0x12 RECIEVE_AVDTP_SIGNAL_CFG_RES
+	0x13 RECIEVE_AVDTP_MEDIA_CONN_RES
+	0x14 RECIEVE_AVDTP_MEDIA_CFG_REQ
+	0x15 RECIEVE_AVDTP_MEDIA_CFG_RES
+	0x16 RECIEVE_SS_REASULT_HS                  
+	0x17 RECIEVE_SS_REASULT_HF                  
+	0x18 RECIEVE_SS_REASULT_AVTARG		          
+	0x19 RECIEVE_SS_REASULT_OBEX		            
+	0x1A RECIEVE_DLCI0_UA
+	0x1B RECIEVE_HS_PARAM_NEG_RES
+	0x1C RECIEVE_HS_UA
+	0x1D RECIEVE_HS_MODEM_STATUS_RES
+	0x1E RECIEVE_HS_MODEm_STATUS_CMD
+	0x1F RECIEVE_HF_PARAM_NEG_RES   
+	0x20 RECIEVE_HF_UA              
+	0x21 RECIEVE_HF_MODEM_STATUS_RES
+	0x22 RECIEVE_HF_MODEm_STATUS_CMD 
+	0x23 RECIEVE_OBEX_PARAM_NEG_RES     
+	0x24 RECIEVE_OBEX_UA              
+	0x25 RECIEVE_OBEX_MODEM_STATUS_RES
+	0x26 RECIEVE_OBEX_MODEm_STATUS_CMD    
+	0x27 RECIEVE_SPP_PARAM_NEG_RES   
+	0x28 RECIEVE_SPP_UA              
+	0x29 RECIEVE_SPP_MODEM_STATUS_RES
+	0x2A RECIEVE_SPP_MODEm_STATUS_CMD
+	0x2b RECIEVE_SDP_DISCONN_RES
+	)
+
+
+
+	(
+	0 UPPERSM_RP_IDLE
+	1 UPPERSM_RP_SDP_CONN
+	2 UPPERSM_RP_SDP_CONN_WAIT
+	3 UPPERSM_RP_SDP_CFG
+	4 UPPERSM_RP_SDP_CFG_WAIT
+	5 UPPERSM_RP_SS_AVTARG
+	6 UPPERSM_RP_SS_AVTARG_WAIT
+	7 UPPERSM_RP_SS_OBEX
+	8 UPPERSM_RP_SS_OBEX_WAIT
+	9 UPPERSM_RP_SDP_DISCONN
+	10 UPPERSM_RP_SDP_DISCONN_WAIT
+	11 UPPERSM_RP_AVDTP_CONN_WAIT
+	12 UPPERSM_RP_AVCTP_CONN
+	13 UPPERSM_RP_AVCTP_CONN_WAIT
+	14 UPPERSM_RP_AVCTP_CFG
+	15 UPPERSM_RP_AVCTP_CFG_WAIT
+	16 UPPERSM_RP_OBEX_CMD_PN
+	17 UPPERSM_RP_OBEX_CMD_PN_WAIT
+	18 UPPERSM_RP_OBEX_SABM
+	19 UPPERSM_RP_OBEX_SABM_WAIT
+	20 UPPERSM_RP_OBEX_CMD_MS
+	21 UPPERSM_RP_OBEX_CMD_MS_WAIT
+	)
+	(		/*mem_upper_sm_reconn*/
+	0 UPPERSM_RECONN_IDLE		
+	1 UPPERSM_RECONN_SDP_CONN		
+	2 UPPERSM_RECONN_SDP_CONN_WAIT		
+	3 UPPERSM_RECONN_SDP_CFG		
+	4 UPPERSM_RECONN_SDP_CFG_WAIT		
+	5 UPPERSM_RECONN_SS_HS
+	6 UPPERSM_RECONN_SS_HS_WAIT
+	7 UPPERSM_RECONN_SS_HF
+	8 UPPERSM_RECONN_SS_HF_WAIT
+	9 UPPERSM_RECONN_SS_AVTARG		
+	10 UPPERSM_RECONN_SS_AVTARG_WAIT		    
+	11 UPPERSM_RECONN_SS_OBEX		            
+	12 UPPERSM_RECONN_SS_OBEX_WAIT		      
+	13 UPPERSM_RECONN_SDP_DISCONN		        
+	14 UPPERSM_RECONN_SDP_DISCONN_WAIT      
+	15 UPPERSM_RECONN_HID_CTRL_CONN		      
+	16 UPPERSM_RECONN_HID_CTRL_CONN_WAIT		
+	17 UPPERSM_RECONN_HID_CTRL_CFG		      
+	18 UPPERSM_RECONN_HID_CTRL_CFG_WAIT     
+	19 UPPERSM_RECONN_HID_INT_CONN		      
+	20 UPPERSM_RECONN_HID_INT_CONN_WAIT		  
+	21 UPPERSM_RECONN_HID_INT_CFG		        
+	22 UPPERSM_RECONN_HID_INT_CFG_WAIT      
+	23 UPPERSM_RECONN_RFCOMM_CONN		        
+	24 UPPERSM_RECONN_RFCOMM_CONN_WAIT		  
+	25 UPPERSM_RECONN_RFCOMM_CFG		        
+	26 UPPERSM_RECONN_RFCOMM_CFG_WAIT       
+	27 UPPERSM_RECONN_RFCOMM_SABM		        
+	28 UPPERSM_RECONN_RFCOMM_SABM_WAIT		  
+	29 UPPERSM_RECONN_SPP_CMD_PN		        
+	30 UPPERSM_RECONN_SPP_CMD_PN_WAIT		    
+	31 UPPERSM_RECONN_SPP_SABM		          
+	32 UPPERSM_RECONN_SPP_SABM_WAIT		      
+	33 UPPERSM_RECONN_SPP_CMD_MS		        
+	34 UPPERSM_RECONN_SPP_CMD_MS_WAIT       
+	35 UPPERSM_RECONN_HF_CMD_PN		          
+	36 UPPERSM_RECONN_HF_CMD_PN_WAIT		    
+	37 UPPERSM_RECONN_HF_SABM		            
+	38 UPPERSM_RECONN_HF_SABM_WAIT		      
+	39 UPPERSM_RECONN_HF_CMD_MS		          
+	40 UPPERSM_RECONN_HF_CMD_MS_WAIT        
+	41 UPPERSM_RECONN_AVDTPs_CONN		        
+	42 UPPERSM_RECONN_AVDTPs_CONN_WAIT		  
+	43 UPPERSM_RECONN_AVDTPs_CFG		        
+	44 UPPERSM_RECONN_AVDTPs_CFG_WAIT       
+	45 UPPERSM_RECONN_AVDTPm_CONN		        
+	46 UPPERSM_RECONN_AVDTPm_CONN_WAIT		  
+	47 UPPERSM_RECONN_AVDTPm_CFG		        
+	48 UPPERSM_RECONN_AVDTPm_CFG_WAIT       
+	49 UPPERSM_RECONN_AVCTP_CONN		        
+	50 UPPERSM_RECONN_AVCTP_CONN_WAIT		    
+	51 UPPERSM_RECONN_AVCTP_CFG		          
+	52 UPPERSM_RECONN_AVCTP_CFG_WAIT		    
+	53 UPPERSM_RECONN_OBEX_CMD_PN		        
+	54 UPPERSM_RECONN_OBEX_CMD_PN_WAIT		  
+	55 UPPERSM_RECONN_OBEX_SABM		          
+	56 UPPERSM_RECONN_OBEX_SABM_WAIT		    
+	57 UPPERSM_RECONN_OBEX_CMD_MS		        
+	58 UPPERSM_RECONN_OBEX_CMD_MS_WAIT     
+	59 UPPERSM_RECONN_SS_SPP
+	60 UPPERSM_RECONN_SS_SPP_WAIT
+	)
+	(/*mem_UI_profile_supported*/
+	0 support_HID
+	1 support_A2DP
+	2 support_AVRCP
+	3 support_HF
+	4 support_HS
+	5 support_PBAP
+	6 support_SPP
+	)
+	/*mem_upper_sm_ss*/
+	(
+	0 UPPERSM_SS_HS
+	1 UPPERSM_SS_HF
+	2 UPPERSM_SS_AVTARG
+	3 UPPERSM_SS_OBEX
+	)
+
+	(
+	160 UI_HUNDRED_MILLISECOND_TIME
+	0XFF UI_BUTTON_GPIO_DISABLE
+	)
+	(
+	0x01 UI_BB_INCONNECT
+	0x10 UI_BB_DISCONNECT
+	)
+(
+0x00 UI_BUTTON_STATE_DOWN
+0x01 UI_BUTTON_STATE_UP
+)
+
+//mem_ipc_skip_continue_proc
+(
+	0 IPC_CONTINUE_PROCESS
+	1 IPC_SKIP_CONTINUE_PROCESS
+)
+
+
+(//led style struct 
+0 		LED_OFFSET_LED_TYPE
+1 		LED_OFFSET_BLINK_COUNT
+2		LED_OFFSET_LED_GPIO
+3		LED_OFFSET_ON_TIME
+5		LED_OFFSET_OFF_TIME
+7 		LED_OFFSET_CB_LEDON
+9		LED_OFFSET_CB_LEDOFF
+11		LED_OFFSET_LENGTH
+)
+
+(//LED state
+0 UI_LED_STATE_BLINK_STOP
+1 UI_LED_STATE_BLINK_START
+2 UI_LED_STATE_LIGHTING
+3 UI_LED_STATE_DARKING
+4 UI_LED_STATE_BLINK_LIGHTING
+5 UI_LED_STATE_BLINK_DARKING
+
+0xFF LED_INFINITE_FLASH_NUM
+
+)
+
+
Index: mouse_public_3mode_usb/format/usb.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/usb.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/usb.format	(working copy)
@@ -0,0 +1,254 @@
+memalloc usb(
+1 mem_usb_status
+1 mem_usb_fifo_empty
+2 mem_usb_read_len
+65 mem_usb_txbuf
+10 mem_usb_txbuf1
+10 mem_usb_txbuf2
+64 mem_usb_rxbuf
+1 mem_usb_rxbuf_end
+2 mem_bufptr
+1 mem_remain
+2 mem_hidreportdesc_kb
+2 mem_hidreportdesc_m
+19 mem_devicedesc
+60 mem_confdesc
+5 mem_string0
+30 mem_string1
+30 mem_string2
+30 mem_string3
+2 mem_cb_usb_config
+
+1 mem_usb_tx_interval
+9 mem_usb_vid_pid
+2 mem_usb_zero_packet
+2 mem_usb_ones_packet
+2 mem_usb_two_packet
+1 mem_usb0_state
+1 mem_usb_offline_check_gpio
+
+0 mem_usb_clear_mem_start
+0 mem_usb_setup
+1 mem_usb_setup_bmRequestType
+1 mem_usb_setup_bRequest
+1 mem_usb_setup_bValue
+1 mem_usb_setup_bValueH
+2 mem_usb_setup_wIndex
+1 mem_usb_setup_bLength
+1 mem_usb_setup_bLengthH
+64 mem_usb0_set_report_data
+64 mem_usb0_get_report_data
+2 mem_usb_setup_bValue_temp
+1 mem_usb0_get_set_report
+1 mem_usb0_data_ready_report
+1 mem_usb_tx_win_enable
+1 mem_usb_tx_mac_enable
+1 mem_usb_idle_flag
+1 mem_usb_idle_rate
+1 mem_usb_get_protocol_flag
+1 mem_usb_set_protocol_status
+1 mem_usb_set_protocol_value
+1 mem_usb_state
+1 mem_usb_remote_wakeup
+1 mem_usb_clear_remote_wakeup
+1 mem_sdsystem_wakeup_flag
+1 mem_usb_ep0_stall_status
+1 mem_usb_ep1_stall_status
+1 mem_usb_ep2_stall_status
+1 mem_usb_ep3_stall_status
+2 mem_dsc_info_data_pointer
+1 mem_dsc_info_len
+1 mem_usb_ep1_data
+1 mem_usb_ep2_data
+1 mem_usb_tx_enable
+1 mem_usb_device_enumeration_endflag
+1 mem_usb_wakestate_onetime_flag
+1 mem_usb_mac_wakeup_trig
+1 mem_usb_set_high_addr_flag
+1 mem_usb_clear_halt
+16 mem_usb_mouse_data
+16 mem_usb_kb_data
+16 mem_usb_kb_multikey
+16 mem_usb_kb_system
+2 mem_usb_test_cnt
+10 mem_usb_test_kb
+0 mem_usb_clear_mem_end
+
+)
+
+//class type
+(
+0x00 STANDARD_REQ
+0x01 CLASS_REQ
+0x02 MANUFACTURER_REQ
+)
+//Standard Request Codes
+(
+0x00 GET_STATUS                // Code for Get Status
+0x01 CLEAR_FEATURE             // Code for Clear Feature
+0x03 SET_FEATURE              // Code for Set Feature
+0x05 SET_ADDRESS              // Code for Set Address
+0x06 GET_DESCRIPTOR           // Code for Get Descriptor
+0x07 SET_DESCRIPTOR           // Code for Set Descriptor(not used)
+0x08 GET_CONFIGURATION        // Code for Get Configuration
+0x09 SET_CONFIGURATION        // Code for Set Configuration
+0x0A GET_INTERFACE            // Code for Get Interface
+0x0B SET_INTERFACE            // Code for Set Interface
+0x0C SYNCH_FRAME              // Code for Synch Frame(not used)
+)
+//Standard Descriptor Types
+(
+0x01 DSC_DEVICE               // Device Descriptor
+0x02 DSC_CONFIG               // Configuration Descriptor
+0x03 DSC_STRING               // String Descriptor
+0x04 DSC_INTERFACE            // Interface Descriptor
+0x05 DSC_ENDPOINT             // Endpoint Descriptor
+)
+//HID Descriptor Types
+(
+0x21 DSC_HID			      // HID Class Descriptor
+0x22 DSC_HID_REPORT			  // HID Report Descriptor
+)
+//Define bmRequestType bitmaps
+(
+0x80 IN_DEVICE                // Request made to device,
+                              // direction is IN
+0x00 OUT_DEVICE               // Request made to device,
+                              // direction is OUT
+0x81 IN_INTERFACE             // Request made to interface,
+                              // direction is IN
+0x01 OUT_INTERFACE            // Request made to interface,
+                              // direction is OUT
+0x82 IN_ENDPOINT              // Request made to endpoint,
+                              // direction is IN
+0x02 OUT_ENDPOINT             // Request made to endpoint,
+)
+//HID Request Codes
+(
+0x01 GET_REPORT 		       // Code for Get Report
+0x02 GET_IDLE				   // Code for Get Idle
+0x03 GET_PROTOCOL			   // Code for Get Protocol
+0x09 SET_REPORT				   // Code for Set Report
+0x0A SET_IDLE				   // Code for Set Idle
+0x0B SET_PROTOCOL			   // Code for Set Protocol
+0xF2 HID_REPORT_ID           
+64 EP0_PACKET_SIZE         
+6 EP1_PACKET_SIZE         
+16 HID_REPORT_SIZE         
+0x001B HID_REPORT_DESCRIPTOR_SIZE    
+)
+//math cordic
+(
+0 TYPE_SIN		
+1 TYPE_ATAN	
+2 TYPE_MULT	
+3 TYPE_DIV		
+4 TYPE_ASIN	
+5 TYPE_SQRT	
+6 TYPE_COS		
+7 TYPE_TAN		 
+)
+   
+(
+0 DFIFO0_IN_EMPTY
+1 DFIFO1_IN_EMPTY
+2 DFIFO2_IN_EMPTY
+3 DFIFO3_IN_EMPTY
+4 DFIFO0_OUT_EMPTY
+5 DFIFO1_OUT_EMPTY
+6 DFIFO2_OUT_EMPTY
+7 DFIFO3_OUT_EMPTY
+)
+
+(
+)
+
+(
+0 USB_STATUS_SETUP
+1 USB_STATUS_SUSPEND
+2 USB_STATUS_NAK
+3 USB_STATUS_RESET
+4 USB_STATUS_ACK
+5 USB_STATUS_RXREADY
+6 USB_STATUS_TXEMPTY
+6 USB_STATUS_RXEMPTY
+)
+
+(
+1 USB_GOT_REPORT_REQ
+2 USB_CONNECTED
+3 USB_SLEEP
+4 USB_RESUME
+5 USB_SETIDLE_1
+)
+
+(
+0x10 USB_EP1_KB
+0x20 USB_EP2_MS
+0x21 USB_EP2_MULTIKEY
+0x22 USB_EP2_SYSTEMKEY
+0x01 MAC_BOOT_MODE
+0x02 R_KEY
+0x03 LR_KEY
+)
+
+
+(
+0x01ba PC_GET_REPORT
+0x02ba PC_SET_REPORT
+0x0200 PC_SET_REPORT_bValue
+0x0000 PC_SET_REPORT_wIndex
+0x0001 PC_SET_REPORT_bLength
+0xba PC_REPORT_ID
+
+0x01 PC_GET_DATA
+0x00 PC_GET_NONDATA
+)
+
+(
+//--------------------------------------------------
+// Define device states
+0x00 DEV_ATTACHED	// Device is in Attached State
+0x01 DEV_POWERED	// Device is in Powered State
+0x02 DEV_DEFAULT		// Device is in Default State
+0x03 DEV_ADDRESS	// Device is in Addressed State
+0x04 DEV_CONFIGURED	// Device is in Configured State
+0x05 DEV_SUSPENDED	// Device is in Suspended State
+)
+
+(
+// Define wIndex bitmaps
+0x81 IN_EP1                    // Index values used by Set and Clear
+0x01 OUT_EP1                   // commands for Endpoint_Halt
+0x82 IN_EP2              
+0x02 OUT_EP2             
+0x83 IN_EP3              
+0x03 OUT_EP3             
+)
+
+(
+0 EP0_STALL
+1 EP1_IN_STALL
+2 EP1_OUT_STALL
+3 EP2_IN_STALL
+4 EP2_OUT_STALL
+5 EP3_IN_STALL
+6 EP3_OUT_STALL
+)
+
+(
+// Define wValue bitmaps for Standard Feature Selectors
+0x00 ENDPOINT_HALT             // Endpoint_Halt feature selector
+0x01 DEVICE_REMOTE_WAKEUP      // Remote wakeup feature(not used)
+0x00 BOOT_PROTOCOL
+0x01 REPORT_PROTOCOL
+0x01 USB_MAX_NUM_CFG
+)
+
+(
+0 TIMER_NAK
+640 TIMER_NAK_DELAY
+15 TIMER_WAKEUP
+5000 TIMER_WAKEUP_DELAY
+)
+
Index: mouse_public_3mode_usb/format/utility.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/utility.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/utility.format	(working copy)
@@ -0,0 +1,191 @@
+
+memalloc(
+
+/*
+    temp parameter
+*/
+2 mem_hold_contr
+2 mem_hold_contw
+1 mem_fifo_temp
+
+8 mem_pdatatemp
+8 mem_temp //8 bytes
+4 mem_timeup // 4 bytes
+4 mem_rega //4 bytes
+4 mem_regb //4 bytes
+3 mem_regc //3 bytes
+2 mem_contr //2 bytes
+2 mem_contw //2 bytes
+2 mem_contus
+2 mem_contue
+2 mem_contu
+2 mem_queue
+2 mem_loopcnt
+
+
+1 mem_wakup_from_power_flag
+4 mem_saved_gpio_in
+
+0 mem_module_rx_error_data_buffer
+0 mem_shutter_random_mac_data_temp
+0 mem_shutter_config_data_temp
+0 mem_le_adv_channel_map_temp
+0 mem_le_data_len_temp	//1byte
+0 mem_tx_fifo_map_temp
+0 mem_rpn_dlci		//1byte
+0 mem_event_cmd_response_content	//2byte
+0 mem_le_prand		//16byte
+0 mem_AES_CMAC_k	 //16 bytes
+0 mem_regext_index 	//1 bytes
+1 mem_temp_block0
+0 mem_le_data_temp	//15bytes
+15 mem_temp_block1
+0 mem_le_aes_128	//16byte
+0 mem_regext   //64 bytes
+0 mem_AES_CMAC_k1  //16 bytes
+16 mem_temp_block2
+0 mem_AES_CMAC_k2  //16 bytes
+16 mem_temp_block3
+0 mem_AES_CMAC_temp  // 16 bytes
+16 mem_temp_block4
+0 mem_AES_CMAC_M_last // 16 bytes
+1 mem_module_uart_cmd
+1 mem_module_uart_opcode
+1 mem_module_uart_len
+1 mem_module_temp_nl_discard_packet
+12 mem_temp_block5
+0 mem_le_mackey //16 bytes
+0 mem_app_receive_temp
+2 mem_key_value_temp
+2 mem_key_value
+1 mem_key_value_temp1
+1 mem_key_value_temp2
+1 mem_key_value_temp3
+1 mem_key_value_temp4
+1 mem_key_value_temp5
+1 mem_key_value_temp6
+6 mem_temp_block6
+
+3 mem_scale_ratio
+3 mem_xcnt
+2 mem_scale_ratio_temp
+)
+
+
+(
+/*mem_util_timer_flag0_7*/
+    0   UTIL_TIMER_0_USED
+    1   UTIL_TIMER_1_USED
+    2   UTIL_TIMER_2_USED
+    3   UTIL_TIMER_3_USED
+    4   UTIL_TIMER_4_USED
+    5   UTIL_TIMER_5_USED
+    6   UTIL_TIMER_6_USED
+    7   UTIL_TIMER_7_USED
+/*mem_util_timer_flag8_15*/
+    0   UTIL_TIMER_8_USED
+    1   UTIL_TIMER_9_USED
+    2   UTIL_TIMER_10_USED
+    3   UTIL_TIMER_11_USED
+    4   UTIL_TIMER_12_USED
+    5   UTIL_TIMER_13_USED
+    6   UTIL_TIMER_14_USED
+    7   UTIL_TIMER_15_USED
+)
+
+/* 24g */
+(
+6 dlen_24g
+14 plen_24g
+90 blen_tx_24g
+106 blen_rx_24g
+42 blen_txack_24g
+58 blen_rxack_24g
+0xaaf08e acc_24g
+0x15c4 crc_data_3byte
+0xbb81 crc_data_6byte
+0x4160 crc_ack
+)
+
+//util fifo param
+(
+
+8 UTIL_FIFO_LEN
+-1 UTIL_FIFO_OFFSET
+)
+
+
+(
+	0xAA DEBUGLOG_HEAD
+	0x00 DEBUGLOG_TYPE
+	0x04 DEBUGLOG_LEN
+	0xBB DEBUGLOG_TAIL
+)
+
+(
+	0x1000 DEBUGLOG_DTYPE_CALLBACK
+	0x1001 DEBUGLOG_DTYPE_EVENT
+	0x1002 DEBUGLOG_DTYPE_CMD
+	0x1003 DEBUGLOG_DTYPE_STATUS
+	0x1004 DEBUGLOG_DTYPE_MISC
+	0x1005 DEBUGLOG_DTYPE_PARSE_LMP
+	0x1006 DEBUGLOG_DTYPE_SEND_LMP
+	0x1007 DEBUGLOG_DTYPE_CONN_SM
+	0x1008 DEBUGLOG_DTYPE_UPPER_SM
+)
+
+//DEBUGLOG_DTYPE_CALLBACK
+(
+	0x0000 CALLBACK_24G_DATA
+	0x0001 CALLBACK_LE_PROCESS
+	0x0002 CALLBACK_BT_PROCESS
+	0x0003 CALLBACK_BEFORE_LPM
+	0x0004 CALLBACK_BB_EVENT_PROCESS
+	0x0005 CALLBACK_IDLE_PROCESS
+	0x0006 CALLBACK_BEFORE_HIBERNATE
+	0x0007 CALLBACK_ATT_WRITE
+	0x0008 CALLBACK_EVENT_TIMER
+	0x0009 CALLBACK_SLAVE_LOOP
+	0x000a CALLBACK_SDP_PROCESS
+)
+
+//DEBUGLOG_DTYPE_EVENT
+//(
+
+//)
+
+//DEBUGLOG_DTYPE_CMD
+//(
+
+//)
+
+//DEBUGLOG_DTYPE_STATUS
+(
+	0x0000 STATUS_CODE_WAKE
+	0x0001 STATUS_LPM_WAKE
+	0x0002 STATUS_INQUIRY_SCAN
+	0x0003 STATUS_SEND_EIR
+	0x0004 STATUS_PAGE_SCAN
+	0x0005 STATUS_PAGE_SCAN_RECV_ID_PACK
+	0x0006 STATUS_PAGE_SCAN_WAIT_FHS
+	0x0007 STATUS_PAGE_SCAN_CONNECTED
+	0x0008 STATUS_START_DISCOVER
+	0x0009 STATUS_STOP_DISCOVER
+)
+//DEBUG_DTYPE_MISC
+(
+	0x0000 MISC_LE_RETRANSMIT
+	0x0001 MISC_LOST_MOUSEDATA
+	0x0002 MISC_TXPOWER_0
+	0x0003 MISC_TXPOWER_1
+	0x0004 MISC_TXPOWER_2
+	0x0005 MISC_BT_RETRANSMIT
+	0x0006 MISC_BT_UPPER_SM_ERR
+	0x0007 MISC_BT_CONN_SM_ERR
+)
+
+//mem_creat_mouse_flag
+(
+	0x55 CREAT_MOUSE_DATA_OK
+	0x00 CREAT_MOUSE_DATA_FAIL
+
Index: mouse_public_3mode_usb/format/var.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/var.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/format/var.format	(working copy)
@@ -0,0 +1,442 @@
+/************************************************************************/
+/* RCS HEADER -- DO NOT ERASE                                           */
+/* $Author: Administrator $                                                     */
+/* $Id: bt_var.osi,v 1.1 2009-09-28 04:06:18 Administrator Exp $   */
+/* Orisil Technology                                                 */
+/************************************************************************/
+
+
+/* packet types */
+(
+  0x02 FHS_PACKET 
+  0x03 DM1_PACKET 
+  0x03 DM1_LMP_PACKET 
+  0x04 DH1_PACKET 
+  0x05 HV1_PACKET 
+  0x06 HV2_PACKET 
+  0x07 HV3_PACKET 
+  0x08 DV_PACKET 
+  0x09 AUX1_PACKET 
+  0x0a DM3_PACKET 
+  0x0b DH3_PACKET 
+  0x0e DM5_PACKET 
+  0x0f DH5_PACKET 
+)
+
+
+/* mem_lmp_respond */
+(
+  0 RESPOND_TO_ALL
+  1 PASS_EVERYTHING
+  2 PASS_ONLY_UNKNOWNS
+  3 RESPOND_TO_LMPS
+)
+/* SCO algorithm defines */
+(
+  0 ULAW
+  1 ALAW
+  2 CVSD
+)
+/* encryption modes */
+(
+  0 NO_ENCRYPTION
+  1 PT_PT_ENCRYPTION
+  2 PT_BROADCAST_ENCRYPTION
+)
+
+/* bits used in mem_lmp_state1 variable */
+(
+  0 LMP_STATE_DETACH
+  1 LMP_STATE_HOLD
+  2 LMP_STATE_SNIFF
+  3 LMP_STATE_PARK
+  4 LMP_STATE_WAIT_SCO_CREATE
+  5 LMP_STATE_WAIT_SCO_KILL
+  6 LMP_STATE_SCO3
+  7 LMP_STATE_WAIT_SCO_START
+)
+/* mem_lmp_state2 */
+(
+  0 LMP_WAIT_FOR_SNIFF_ACCEPT
+  1 LMP_WAIT_FOR_PARK_ACCEPT
+  2 LMP_SEND_UNPARK_ACCEPTED
+  3 LMP_SEND_ENCRYPTION_START
+  4 LMP_SEND_ENCRYPTION_STOP
+  5 MESSAGE_QUEUE
+  7 LMP_STATE_WAIT_BEACON
+)
+/* mem_lmp_state3 */
+(
+ 0 INQUIRY_STATE_CHECK
+ 1 HOST_DELAY_MESSAGE
+ 2 VARIABLE_DELAY
+ 3 TEST_MODE_START_LOOPBACK
+ 4 TEST_MODE_START_PATTERN
+ 5 PARSE_TEST_CONTROL_MESSAGE
+ 6 H_AUTH_SEND_COMB_KEY
+)
+/* mem_rx_status */
+(
+  0 FROM_MASTER
+)
+/* mem_ms_flag */
+(
+  0 MS_RECEIVE_SWITCH_REQ
+  1 MS_SEND_SETUP_COMPLATE
+)
+/* mem_conn_sm */
+(
+  0 CONN_SM_STANDBY
+  1 CONN_SM_WAIT_PAGE
+  2 CONN_SM_SEND_FEATURES
+  3 CONN_SM_WAIT_FEATURES_RES
+  4 CONN_SM_SEND_CONN_REQ
+  5 CONN_SM_WAIT_CONN_ACCEPT
+  6 CONN_SM_AUTH_PAIR
+  7 CONN_SM_AUTH_PAIR_WAIT
+  8 CONN_SM_WAIT_MUTAL_AUTH
+  9 CONN_SM_ENCRYPT
+  0xa CONN_SM_ENCRYPT_WAIT
+  0xb CONN_SM_ENCRYPT_WAIT_CLEAR
+  0xc CONN_SM_SEND_SETUP_COMPLETE
+  0xd CONN_SM_WAIT_SETUP_COMPLETE 
+  0xe CONN_SM_SEND_SWITCH
+  0xf CONN_SM_DETACH_DELAY
+  0x10 CONN_SM_WAIT_SWITCH_AFTER_HOST_CONNECTION
+  0x11 CONN_SM_DELAY_RESTART_CONNECTION
+  0x12 CONN_SM_SEND_VERSION
+  0X13 CONN_SM_WAIT_VERSION
+  0x14 CONN_SM_SEND_FEATURES_EXT
+  0x15 CONN_SM_WAIT_FEATURES_EXT
+  0x16 CONN_SM_PAIRING
+  0x17 CONN_SM_AUTH
+  0x18 CONN_SM_PAIRING_WAIT
+  0x19 CONN_SM_AUTH_WAIT
+  0x1a CONN_SM_DONE
+  0x1b CONN_SM_WAIT_DONE
+)
+
+/* btStateConn1 */
+(
+  0 CONN_STANDBY
+  1 CONN_MASTER_SEND_CONN_REQ
+  2 CONN_MASTER_WAIT_FOR_CONN_ACCEPTED
+  3 CONN_MASTER_AUTH
+  4 CONN_MASTER_WAIT_FOR_FEATURES
+  5 CONN_MASTER_WAIT_FOR_SETUP_COMPLETE
+  6 CONN_MASTER_WAIT_FOR_MAX_SLOT
+  7 CONN_SLAVE_CONN_REQUESTED
+  8 CONN_SLAVE_WAIT_FOR_SETUP_COMPLETE
+  9 CONN_SLAVE_AUTH
+  10 CONN_USING_HOST_OPCODE
+  11 CONN_SLAVE_AUTH_WAIT
+  12 CONN_SLAVE_ENCRYPT_WAIT
+)
+
+/* mem_lmp_conn_state */
+(
+  0 RECEIVED_CONN_REQ
+  1 SENT_CONN_REQ
+  2 RECEIVED_SETUP_COMPLETE
+  3 SENT_SETUP_COMPLETE
+  4 HOST_CONNECTION_MADE
+  6 INIT_COMPLETE
+  7 SNIFF_NEGOTIATE
+)
+/* btStateAuth1 */
+(
+  0 WAIT_FOR_KINIT
+  1 WAIT_FOR_LKA
+  2 WAIT_FOR_LKB
+  3 WAIT_FOR_SRES
+  4 EXAMINE_RECEIVED_SRES
+  5 SEND_AU_RAND
+  6 WAIT_FOR_KC
+  7 DELAYED_ENCRYPT_RESPONSE
+)
+/* btStateAuth2 */
+(
+  0 SENT_SRES
+  1 RECEIVED_IN_RAND
+  2 SENT_AU_RAND
+  3 AUTHENTICATION_FAILED
+  4 AUTHENTICATION_PASSED
+  5 STARTED_AUTH
+  6 SENT_COMB_KEY
+  7 SENT_IN_RAND
+)
+/* btStateAuth3 */
+(
+  0 RECEIVED_AU_RAND
+  1 RECEIVED_SRES
+  2 MUTUALLY_AUTHENTICATE
+)
+/* btStateHost */
+(
+  0 H_AUTH_STARTED
+  2 H_ENCRYPTION_MODE_REQ_PT
+  3 H_ENCRYPTION_KEY_SIZE
+  4 H_ENCRYPTION_START
+  5 H_ENCRYPTION_STOP
+  6 H_AUTH_SECOND_TRY
+)
+/* btStateEncrypt2 */
+(
+  0 RECEIVED_ENCRYPT_MODE_REQ_PT
+  1 RECEIVED_ENCRYPT_KEY_SIZE
+  2 RECEIVED_ENCRYPT_START
+  3 RECEIVED_ENCRYPT_STOP
+  4 STARTED_ENCRYPT_START
+)
+/* mem_ms_state */
+(
+  0x00 MS_STANDBY
+  0x11 M_MINIT_1
+  0x12 M_MINIT_2
+  0x20 M_SINIT_0
+  0x30 S_MINIT_0
+  0x31 S_MINIT_1
+  0x32 S_MINIT_2
+  0x41 S_SINIT_1
+  0x42 S_SINIT_2
+  0x43 S_SINIT_3
+)
+/* mem_test_mode */
+(
+  0 TEST_MODE_ALLOWED
+  1 TEST_MODE_ACTIVE
+)
+/* values for mem_tester_emulate */
+(
+  0x00 NO_TEST_MODE
+  0x00 CONTINUOUS_TRANSMIT
+  0x10 TRANSMIT_TEST
+  0x08 LOOPBACK
+)
+
+/* mem_tx_misc */
+(
+  1 SEND_TX_ADDR
+)
+/* BBHWREG_page_stat */
+(
+  5 PAGE_MODE_END
+)
+/* host_return_parameters_status codes */
+(
+  0x00 HOST_RETURN_SUCCESS
+  0x01 HOST_RETURN_SLAVE_CANT_ISSUE
+  0x02 HOST_RETURN_NO_CONNECTION
+  0x04 HOST_RETURN_PAGE_TIMEOUT
+  0x05 HOST_RETURN_INQUIRY_TIMEOUT
+  0x08 HOST_RETURN_CONNECTION_TIMEOUT
+  0x09 HOST_RETURN_MAX_NUM_CONNECTIONS
+  0x0a HOST_RETURN_MAX_NUM_SCO
+  0x0b HOST_RETURN_MAX_NUM_ACL
+  0x0c HOST_RETURN_SECURITY_REASONS
+  0x10 HOST_RETURN_HOST_TIMEOUT
+  0x11 HOST_RETURN_UNSUPPORTED_FEATURE_PARAMETER
+  0x13 HOST_RETURN_OTHER_END_USER
+  0x14 HOST_RETURN_OTHER_END_LOW_RESOURCE
+  0x15 HOST_RETURN_OTHER_END_POWER_OFF
+  0x16 HOST_RETURN_LOCAL_HOST
+  0x18 HOST_RETURN_PAIRING_NOT_ALLOWED
+  0x19 HOST_RETURN_UNKNOWN_PDU
+  0x1a HOST_RETURN_UNSUPPORTED_REMOTE_FEATURE
+  0x1d HOST_RETURN_SCO_AIR_MODE_REJECTED
+  0x20 HOST_RETURN_UNSUPPORTED_LMP_VALUE
+  0x21 HOST_RETURN_AUTHENTICATION_FAILURE
+  0x22 HOST_RETURN_CHANGED_EXISTING_SCO
+  0x23 HOST_RETURN_HOST_REJECTED
+  0x24 HOST_RETURN_UNSPECIFIED_ERROR
+  0x25 HOST_RESET
+  0x26 HOST_RETURN_BAD_HANDLE
+
+  0x00 HOST_RETURN_ACCEPT_COMMAND
+  0x01 HOST_RETURN_REJECT_COMMAND
+)
+/* host_present */
+(
+  0 HOST_IS_PRESENT
+  1 BCI_IS_PRESENT
+  2 DONT_INIT_RADIO
+)
+/* mem_master_state */
+(
+  0 MASTER_STATE_STANDBY
+  1 MASTER_INQUIRY
+)
+/* misc */
+(
+  92 SECOND_SWITCH_REQ
+  93 SLAVE_DELAY_DETACH
+  94 MASTER_DELAY_DETACH
+  95 UNSNIFF_DELAY_DETACH
+  0 WE_STARTED_AS_MASTER
+  1 WE_STARTED_AS_SLAVE
+)
+/* mem_host_commands */
+(
+  0x01 HOST_INQUIRY
+  0x02 HOST_INQUIRY_CANCEL
+  0x03 HOST_CREATE_CONNECTION
+  0x04 HOST_DISCONNECT_CONNECTION
+  0x05 HOST_ADD_SCO_REQUEST
+  0x06 HOST_REMOTE_NAME_REQUEST
+  0x07 HOST_WRITE_SUPPORTED_FEATURES
+  0x08 HOST_SET_TX_LEVEL
+  0x09 HOST_SET_RX_LEVEL
+  0x0a HOST_SNIFF_REQUEST
+  0x0b HOST_UNSNIFF_REQUEST
+  0x0c HOST_WRITE_LINK_SUPERVISION_TIMEOUT
+  0x0e HOST_WRITE_SCAN_ENABLE
+  0x0f HOST_READ_AUDIO_QUALITY
+  0x10 HOST_ENABLE_DEVICE_UNDER_TEST
+  0x14 HOST_BUTTON_CONFIGURE
+  0x15 HOST_SET_LOW_BATTERY_LEVEL
+  0x16 HOST_WRITE_LOCAL_NAME
+  0x17 HOST_WRITE_LOCAL_PIN
+  0x18 HOST_KILL_SCO_REQUEST
+  0x19 HOST_QOS_REQ
+
+  0x1a HOST_FEATURES_REQUEST
+  0x1b HOST_VERSION_REQUEST
+  0x1c HOST_TIMING_REQUEST
+  0x1d HOST_CLK_OFFSET_REQUEST
+  0x1e HOST_AUTHENTICATE
+  0x1f HOST_START_ENCRYPTION
+  0x20 HOST_STOP_ENCRYPTION
+  0x21 HOST_HOLD_REQUEST
+  0x22 HOST_HOLD_FORCE
+  0x23 HOST_PARK_REQUEST
+  0x24 HOST_MOD_BEACON
+  0x25 HOST_SET_BROADCAST_SCAN_WINDOW
+  0x26 HOST_UNPARK_PM_REQUEST
+  0x27 HOST_UNPARK_BD_REQUEST
+  0x28 HOST_SLAVE_REQUEST_UNPARK
+  0x29 HOST_DECREASE_POWER_REQUEST
+  0x2a HOST_INCREASE_POWER_REQUEST
+  0x2b HOST_SEND_PREFERRED_RATE
+  0x2c HOST_MAX_SLOT_REQ
+  0x2d HOST_MAX_SLOT_FORCE
+  0x2e HOST_PAGE_MODE_REQUEST
+  0x2f HOST_PAGE_SCAN_MODE_REQUEST
+  0x30 HOST_MASTER_SLAVE_SWITCH
+  0x31 HOST_SEND_AUTO_RATE
+  0x32 HOST_PAGE_CANCEL
+  0x33 HOST_CHANGE_LINK_KEY
+  0x34 HOST_RADIO_READ
+  0x35 HOST_RADIO_WRITE
+  0x36 HOST_REMOTE_SLAVE_INIT_UNPARK_REQUESTED
+
+  0x40 HOST_REMOTE_CONNECTION_REQUESTED
+  0x41 HOST_REMOTE_DETACH
+  0x42 HOST_REMOTE_SCO_CREATE_REQUESTED
+  0x43 HOST_REMOTE_SCO_KILL_REQUESTED
+  0x44 HOST_REMOTE_PARK_REQUESTED
+  0x45 HOST_REMOTE_UNPARK_REQUESTED
+  0x46 HOST_REMOTE_SNIFF_REQUESTED
+  0x47 HOST_REMOTE_UNSNIFF_REQUESTED
+  0x48 HOST_REMOTE_HOLD_REQUESTED
+  0x49 HOST_REMOTE_AUTHENTICATION
+  0x4a HOST_REMOTE_START_ENCRYPTION_REQUESTED
+  0x4b HOST_REMOTE_STOP_ENCRYPTION_REQUESTED
+  0x4c HOST_MODE_CHANGE_EVENT
+  0x4d HOST_REMOTE_TEST_ACTIVATE
+  0x4e HOST_REMOTE_TEST_CONTROL
+  0x4f HOST_REMOTE_TIMING_REQUEST
+)
+/* BCI interface (not used if not compiled in ) */
+(
+  0x01 BCI_INQUIRY
+  0x02 BCI_INQUIRY_CANCEL
+  0x03 BCI_CREATE_CONNECTION
+  0x04 BCI_DISCONNECT
+  0x05 BCI_ADD_SCO_CONNECTION
+  0x06 BCI_REMOTE_NAME_REQUEST
+  0x07 BCI_WRITE_SUPPORTED_FEATURES
+  0x08 BCI_SET_TX_POWER_LEVEL
+  0x09 BCI_SET_RX_POWER_LEVEL
+  0x0a BCI_SNIFF_MODE
+  0x0b BCI_EXIT_SNIFF_MODE
+  0x0c BCI_WRITE_LINK_SUPERVISION_TIMEOUT
+  0x0d BCI_WRITE_PAGE_TIMEOUT
+  0x0e BCI_WRITE_SCAN_ENABLE
+  0x0f BCI_GET_AUDIO_QUALITY
+  0x10 BCI_ENABLE_DEVICE_UNDER_TEST
+  0x11 BCI_SEND_DATA
+  0x12 BCI_REGISTER_SERVICE_RECORD
+  0x13 BCI_SERVICE_SEARCH_ATTRIB_REQ
+  0x14 BCI_BUTTON_CONFIGURE
+  0x15 BCI_SET_LOW_BATTERY_LEVEL
+  0x16 BCI_WRITE_LOCAL_NAME
+  0x17 BCI_WRITE_LOCAL_PIN
+  0x18 BCI_REMOVE_SCO_CONNECTION
+  0x19 BCI_QUALITY_OF_SERVICE
+  0x40 BCI_REMOTE_CONNECTION_REQUEST
+  0x41 BCI_REMOTE_DETACH
+  0x42 BCI_REMOTE_ADD_SCO_REQUEST
+  0x43 BCI_REMOTE_REMOVE_SCO_REQUEST
+  0x44 BCI_REMOTE_PARK_REQUEST
+  0x45 BCI_REMOTE_UNPARK_REQUEST
+  0x46 BCI_REMOTE_SNIFF_REQUEST
+  0x47 BCI_REMOTE_UNSNIFF_REQUEST
+  0x48 BCI_REMOTE_HOLD_REQUEST
+  0x49 BCI_REMOTE_AUTHENTICATION_PAIRING_REQUEST
+  0x4a BCI_REMOTE_START_ENCRYPTION_REQUEST
+  0x4b BCI_REMOTE_STOP_ENCRYPTION_REQUEST
+  0x4c BCI_MODE_CHANGE_EVENT
+)
+/* mode changes */
+(
+  0 MODE_CHANGE_ACTIVE
+  1 MODE_CHANGE_SNIFFING
+  2 MODE_CHANGE_PARKED
+  3 MODE_CHANGE_HOLDING
+  4 MODE_CHANGE_SCO_ADDED
+  5 MODE_CHANGE_SCO_REMOVED
+  6 MODE_CHANGE_ACL_CONNECTION
+  7 MODE_CHANGE_DISCONNECT
+  8 MODE_CHANGE_SCO_CHANGED
+  9 MODE_CHANGE_ENCRYPTING
+  10 MODE_CHANGE_NOT_ENCRYPTING
+  11 MODE_CHANGE_BUTTON_UP
+  12 MODE_CHANGE_BUTTON_DOWN
+  13 MODE_CHANGE_BATTERY_LOW
+  14 MODE_CHANGE_RESET
+  15 MODE_CHANGE_INQUIRY_CANCELED_RMTCMD
+  16 MODE_ACTIVE_MSSWITCH_PASSED
+  17 MODE_ACTIVE_MSSWITCH_FAILED
+)
+/* mem_battery - low nibble is level information, upper nibble is status info */
+(
+  6 BATTERY_CHECK_LEVEL
+  7 BATTERY_SENT_STATUS
+)
+/* mem_radio_version */
+(
+  0x02 RADIO_2001
+  0x12 RADIO_2002
+  0x32 RADIO_2002_DDM
+  0x42 RADIO_1008A1
+  0x52 RADIO_1018A0
+)
+/* mem_slave_initiated_conn */
+(
+  0 SLAVE_INIT_AUTHENTICATION
+  1 SLAVE_INIT_ENCRYPTION
+  2 SLAVE_INIT_MASTER_SLAVE_SWITCH
+)
+/* connection_options */
+(
+  0 CONNECTION_AUTH
+  1 CONNECTION_ENCRYPT
+  2 CONNECTION_SWITCH
+  3 CONNECTION_ACL
+  4 CONNECTION_FEATURE_EXT
+)
+/* mem_debug_config */
+(
+  7 AA_INSERTION
+)
+
Index: mouse_public_3mode_usb/load_spi_conf_code/1300f_efuse.dat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/load_spi_conf_code/1300f_efuse.dat	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/load_spi_conf_code/1300f_efuse.dat	(working copy)
@@ -0,0 +1,64 @@
+f0
+f0
+00
+04
+00
+04
+b7
+44
+08
+10
+12
+11
+00
+1e
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+00
+00
+c2
+89
+d3
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
Index: mouse_public_3mode_usb/load_spi_conf_code/1300f_efuse_skip_iic.dat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/load_spi_conf_code/1300f_efuse_skip_iic.dat	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/load_spi_conf_code/1300f_efuse_skip_iic.dat	(working copy)
@@ -0,0 +1,64 @@
+b4
+f0
+00
+04
+00
+04
+b7
+44
+08
+10
+12
+11
+00
+e2
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+70
+00
+00
+c2
+89
+d3
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
Index: mouse_public_3mode_usb/output/bin2array.pl
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/bin2array.pl	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/bin2array.pl	(working copy)
@@ -0,0 +1,42 @@
+printf "/*******************************************************************************\n";
+printf "*-------------------------------------------------------------------------------\n";
+printf "*\n";
+printf "* Copyright (c), 2014 Yichip Corp.\n";
+printf "*\n";
+printf "*ALL RIGHTS RESERVED\n";
+printf "*                                                                               \n";
+printf "********************************************************************************\n";
+printf "*                                                                               \n";
+printf "* File Name: YC_bt_patch.h                                                      \n";
+printf "*                                                                               \n";
+printf "* Abstract:                                                                     \n";
+printf "*This file use for save the patch code of YC1021.                               \n";
+printf "*******************************************************************************/\n";
+printf "                                                                                \n";
+printf "#ifndef __YC_BT_PATCH_H_                                                        \n";
+printf "#define __YC_BT_PATCH_H_                                                        \n";
+printf "                                                                                \n";
+open(BINFILE,"bt_patch.bin") or die $!;
+binmode (BINFILE);
+printf "const unsigned char yc_patch[] = \n{\n";
+while( read(BINFILE, $binData, 1) )
+{
+
+	if(ord($binData) < 0x10){
+		printf "0x0";
+	}else{
+		printf "0x";
+	}
+	printf "%X, ", ord($binData);
+	$cnt += 1;
+	if($cnt > 15){
+		$cnt = 0;
+		printf "\n";
+	}
+}
+printf "\n};\n";
+close (BINFILE);
+
+
+printf "                                                                                \n";
+printf "#endif\n";
\ No newline at end of file
Index: mouse_public_3mode_usb/output/eeprom.dat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/eeprom.dat	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/eeprom.dat	(working copy)
@@ -0,0 +1,8192 @@
+00
+02
+aa
+55
+22
+19
+20
+20
+00
+40
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+c2
+84
+00
+5d
+c0
+00
+00
+98
+c0
+31
+05
+7c
+c0
+41
+00
+c2
+c0
+41
+80
+c9
+c0
+45
+00
+dc
+c0
+45
+80
+d7
+c0
+56
+80
+e6
+c0
+61
+82
+76
+c0
+63
+03
+f0
+c0
+64
+03
+fb
+c0
+64
+84
+1f
+c0
+65
+82
+fb
+c0
+66
+85
+b6
+c0
+67
+04
+57
+c0
+67
+84
+60
+c0
+68
+05
+e2
+c0
+69
+03
+ca
+c0
+69
+83
+df
+c0
+6a
+84
+73
+c0
+6c
+02
+cc
+c0
+6e
+84
+24
+c0
+6f
+00
+88
+c0
+70
+00
+70
+c0
+70
+80
+6c
+c0
+6c
+85
+63
+c0
+6d
+05
+6d
+c0
+6e
+03
+c3
+20
+20
+13
+7e
+c0
+0f
+80
+ef
+c0
+42
+85
+70
+c0
+53
+05
+74
+c0
+6e
+80
+78
+c0
+6f
+02
+11
+c0
+70
+82
+ac
+c0
+71
+04
+e7
+c0
+71
+85
+0f
+c0
+74
+85
+19
+c0
+75
+01
+61
+c0
+76
+05
+58
+c0
+4f
+85
+84
+c0
+50
+85
+8e
+c0
+5f
+05
+90
+20
+20
+13
+7e
+18
+42
+7e
+00
+c1
+7f
+80
+00
+1f
+e2
+04
+00
+20
+20
+49
+7d
+18
+42
+7e
+00
+c1
+7f
+80
+00
+1f
+e2
+04
+00
+20
+20
+49
+79
+6f
+e0
+cb
+c0
+24
+7a
+00
+00
+70
+44
+8e
+00
+20
+60
+00
+00
+c5
+13
+a3
+e1
+c6
+93
+00
+00
+6f
+e0
+c8
+a5
+c2
+80
+a2
+f6
+c2
+81
+25
+89
+6f
+e0
+c8
+c1
+c0
+00
+80
+80
+20
+20
+01
+61
+6f
+e4
+4b
+bc
+c2
+8d
+00
+84
+c2
+8c
+80
+84
+20
+20
+26
+cd
+20
+40
+22
+a0
+24
+74
+00
+00
+20
+40
+26
+e2
+20
+20
+26
+28
+6f
+e0
+cb
+c5
+c1
+00
+80
+00
+20
+40
+03
+3c
+20
+40
+47
+00
+60
+48
+c9
+3d
+70
+41
+ca
+00
+20
+40
+47
+18
+20
+40
+00
+92
+20
+40
+31
+e6
+20
+20
+46
+fb
+6f
+e1
+47
+8f
+c3
+83
+80
+00
+20
+20
+43
+58
+6f
+e0
+c1
+7b
+67
+e0
+cc
+58
+20
+60
+00
+00
+20
+80
+00
+00
+70
+80
+86
+73
+24
+55
+80
+95
+20
+40
+31
+66
+24
+55
+80
+74
+58
+00
+4c
+37
+67
+e1
+48
+9d
+20
+40
+3c
+b3
+20
+40
+12
+46
+70
+80
+42
+04
+6f
+e0
+c0
+c5
+c0
+0c
+00
+a5
+70
+80
+42
+05
+6f
+e0
+cc
+58
+67
+e0
+c1
+7b
+58
+00
+0f
+0f
+d8
+a0
+0f
+ff
+98
+a1
+0a
+00
+6f
+e0
+c1
+7a
+1f
+e1
+7e
+f0
+1f
+ed
+7e
+00
+98
+a1
+fe
+00
+79
+3f
+fe
+02
+67
+f1
+00
+4c
+ef
+e1
+00
+06
+e7
+e1
+00
+05
+58
+00
+00
+01
+37
+d9
+82
+00
+67
+f0
+80
+05
+70
+41
+7b
+08
+20
+20
+08
+05
+6f
+f2
+01
+38
+79
+20
+7e
+02
+67
+f2
+00
+4c
+58
+00
+00
+01
+37
+d9
+82
+00
+67
+f0
+80
+05
+37
+d9
+82
+00
+37
+d9
+82
+00
+37
+d9
+82
+00
+20
+00
+27
+10
+20
+60
+00
+00
+6f
+e0
+c1
+ea
+67
+e0
+89
+64
+20
+40
+11
+4c
+70
+8a
+0a
+00
+6f
+e0
+89
+64
+67
+e0
+c1
+ea
+20
+60
+00
+00
+70
+89
+00
+05
+20
+00
+00
+02
+70
+89
+00
+00
+6f
+e0
+c0
+c5
+c0
+0c
+11
+64
+70
+8a
+87
+29
+20
+20
+11
+79
+6f
+f0
+8a
+0a
+79
+20
+7e
+03
+67
+f0
+8a
+0a
+20
+00
+00
+f0
+79
+3f
+fe
+03
+67
+f0
+8a
+0a
+20
+60
+00
+00
+70
+41
+ea
+ff
+70
+8a
+85
+00
+70
+89
+21
+40
+20
+40
+00
+d0
+20
+20
+12
+52
+6f
+e0
+c1
+e8
+c0
+55
+00
+e0
+c0
+4a
+80
+e3
+20
+20
+12
+37
+70
+8a
+39
+0a
+70
+8a
+3a
+00
+20
+20
+12
+26
+70
+8a
+39
+0a
+70
+8a
+3a
+00
+20
+20
+12
+26
+20
+40
+6e
+5e
+20
+40
+01
+18
+20
+40
+41
+e7
+20
+75
+80
+00
+20
+40
+04
+61
+20
+40
+47
+66
+20
+40
+01
+2b
+20
+40
+03
+e9
+20
+20
+3c
+7f
+6f
+e0
+c9
+23
+20
+20
+5b
+56
+6f
+e0
+cb
+ff
+20
+7a
+00
+00
+1f
+e0
+f2
+01
+d8
+c0
+4b
+ff
+d8
+a0
+42
+f7
+20
+20
+7d
+d4
+6f
+e4
+4b
+bc
+c2
+8d
+00
+fc
+c2
+8c
+81
+02
+c2
+8c
+01
+08
+20
+20
+01
+0d
+70
+48
+ca
+05
+58
+01
+01
+01
+67
+e1
+c8
+57
+58
+00
+2e
+e0
+67
+e1
+cc
+16
+20
+20
+26
+e8
+70
+48
+ca
+09
+58
+08
+06
+06
+67
+e1
+c8
+57
+58
+00
+5c
+1c
+67
+e1
+cc
+16
+20
+20
+26
+e8
+58
+00
+bb
+80
+67
+e1
+cc
+16
+70
+48
+ca
+0f
+58
+00
+60
+00
+20
+20
+01
+11
+58
+01
+77
+00
+67
+e1
+cc
+16
+70
+48
+ca
+1e
+58
+01
+17
+60
+67
+e1
+c8
+b1
+67
+e1
+cc
+2c
+20
+60
+00
+00
+58
+00
+00
+00
+67
+e0
+cc
+1a
+67
+e2
+cc
+25
+20
+60
+00
+00
+20
+75
+80
+00
+20
+40
+26
+0e
+d8
+40
+03
+58
+60
+49
+48
+3b
+20
+40
+22
+b5
+20
+40
+01
+14
+20
+40
+3f
+60
+20
+40
+00
+f1
+20
+40
+3d
+d6
+20
+40
+03
+29
+20
+40
+00
+f7
+20
+40
+01
+25
+20
+20
+3c
+ab
+6f
+e0
+c1
+e8
+67
+e0
+cc
+72
+20
+60
+00
+00
+6f
+e0
+cc
+72
+67
+e0
+c1
+e8
+20
+60
+00
+00
+58
+00
+49
+02
+67
+e1
+44
+79
+58
+00
+01
+30
+67
+e1
+48
+9f
+20
+20
+3c
+89
+c6
+93
+00
+00
+20
+40
+3f
+b0
+24
+74
+00
+00
+6f
+e0
+cc
+32
+70
+4c
+32
+00
+24
+5a
+04
+1d
+6f
+e4
+4b
+bc
+c3
+0a
+81
+3a
+6f
+e0
+cb
+9c
+24
+3a
+48
+c1
+20
+40
+01
+51
+6f
+e4
+4b
+bc
+c2
+8c
+81
+3f
+c2
+8d
+01
+3f
+20
+20
+48
+ac
+6f
+e0
+c8
+39
+c2
+80
+81
+4d
+68
+48
+c7
+ca
+6f
+e0
+c8
+d4
+98
+41
+fe
+00
+67
+e0
+c8
+d4
+68
+48
+c7
+cf
+6f
+e0
+c8
+d9
+98
+40
+fe
+00
+67
+e0
+c8
+d9
+68
+48
+c7
+d0
+6f
+e0
+c8
+da
+98
+40
+fe
+00
+67
+e0
+c8
+da
+70
+48
+39
+01
+da
+20
+00
+07
+da
+40
+48
+d4
+20
+20
+26
+e8
+6f
+e0
+c9
+15
+c1
+ff
+80
+00
+6f
+e0
+cc
+73
+24
+3a
+01
+56
+20
+20
+43
+0d
+70
+4c
+73
+00
+20
+20
+43
+0f
+6f
+e2
+48
+95
+68
+4a
+48
+91
+98
+46
+7c
+00
+20
+22
+81
+5e
+70
+41
+ea
+ff
+20
+60
+00
+00
+70
+41
+ea
+00
+70
+41
+e8
+aa
+20
+60
+00
+00
+20
+40
+26
+38
+24
+34
+04
+a3
+20
+40
+01
+f8
+20
+40
+01
+58
+6f
+e0
+cb
+f2
+24
+3a
+01
+6b
+6f
+e4
+48
+b4
+67
+e4
+48
+5f
+6f
+e1
+48
+c6
+67
+e1
+48
+c8
+20
+40
+26
+c2
+24
+74
+00
+00
+6f
+e0
+cc
+31
+70
+4c
+31
+00
+1f
+e6
+7c
+00
+24
+22
+81
+76
+68
+49
+4c
+2f
+18
+46
+7c
+00
+20
+22
+81
+a2
+6f
+e2
+4c
+21
+20
+3a
+01
+a2
+68
+4a
+4c
+33
+28
+4f
+fe
+1f
+20
+20
+81
+9d
+6f
+e2
+4c
+21
+98
+40
+fe
+00
+68
+4a
+4c
+16
+98
+46
+04
+00
+60
+4a
+4c
+33
+24
+21
+01
+a5
+6f
+e1
+c8
+b1
+98
+46
+7e
+00
+24
+21
+01
+ac
+d8
+40
+06
+00
+98
+46
+7c
+00
+24
+21
+01
+ac
+6f
+e1
+c8
+b1
+20
+40
+7e
+1f
+60
+4a
+41
+60
+6f
+e0
+c0
+c5
+c0
+04
+01
+8c
+58
+00
+00
+00
+67
+f1
+8a
+00
+70
+4c
+2b
+fa
+20
+40
+12
+d1
+6f
+e2
+41
+64
+98
+40
+fe
+00
+67
+e2
+41
+64
+18
+02
+7e
+00
+67
+e4
+41
+9d
+d8
+c0
+80
+70
+d8
+a0
+41
+86
+20
+40
+7d
+74
+6f
+f0
+80
+86
+67
+e0
+c1
+a5
+20
+40
+14
+10
+6f
+f0
+80
+42
+1f
+e1
+fe
+14
+67
+f0
+80
+42
+20
+20
+14
+6d
+df
+ff
+ff
+ff
+98
+46
+5e
+00
+6f
+e2
+4c
+21
+9d
+e6
+7e
+00
+20
+20
+01
+7b
+20
+40
+01
+a9
+6f
+e1
+c8
+b1
+20
+20
+01
+85
+18
+46
+04
+00
+6f
+e1
+c8
+b1
+98
+40
+fe
+00
+20
+20
+01
+85
+58
+00
+00
+00
+67
+e2
+4c
+33
+20
+60
+00
+00
+70
+4c
+31
+01
+20
+60
+00
+00
+6f
+e4
+4b
+bc
+c3
+8c
+80
+00
+c3
+8d
+00
+00
+6f
+e0
+c8
+c1
+c0
+00
+81
+f4
+6f
+e0
+cc
+1a
+20
+3a
+01
+f4
+1b
+22
+7e
+00
+68
+4b
+4c
+1b
+67
+e3
+4c
+1b
+20
+40
+7e
+0a
+67
+e2
+4c
+21
+6f
+e0
+cc
+31
+24
+7a
+00
+00
+6f
+e1
+4c
+2f
+24
+7a
+00
+00
+6f
+e2
+4c
+33
+24
+7a
+00
+00
+6f
+e2
+4c
+21
+68
+4a
+4c
+16
+18
+43
+84
+00
+98
+46
+7c
+00
+20
+21
+01
+14
+68
+4a
+cc
+25
+98
+40
+fe
+00
+67
+e2
+cc
+25
+68
+48
+cc
+1a
+6f
+e0
+cc
+2a
+98
+46
+7c
+00
+20
+22
+81
+cf
+18
+40
+84
+01
+60
+48
+cc
+1a
+20
+60
+00
+00
+70
+4c
+1a
+01
+d8
+40
+00
+00
+6f
+e2
+cc
+25
+60
+4a
+cc
+25
+68
+48
+cc
+2a
+98
+46
+fc
+00
+20
+40
+7e
+64
+18
+07
+a2
+00
+6f
+e2
+4c
+16
+68
+48
+cc
+2b
+98
+46
+04
+00
+1a
+22
+7e
+00
+98
+46
+7e
+00
+20
+21
+01
+e8
+1f
+e6
+7e
+00
+1f
+eb
+7e
+00
+68
+49
+c8
+b1
+98
+40
+84
+00
+6f
+e1
+cc
+2c
+da
+20
+18
+00
+9a
+20
+fe
+00
+98
+46
+7c
+00
+24
+21
+01
+f2
+60
+49
+c8
+b1
+20
+60
+00
+00
+1f
+eb
+04
+00
+6f
+e1
+c8
+b1
+98
+46
+04
+00
+6f
+e1
+cc
+2c
+da
+20
+18
+00
+9a
+26
+7e
+00
+98
+46
+7c
+00
+20
+21
+01
+f2
+60
+49
+c8
+b1
+20
+60
+00
+00
+67
+e1
+c8
+b1
+20
+60
+00
+00
+70
+4c
+1a
+01
+1b
+22
+7e
+00
+67
+e3
+4c
+1b
+20
+60
+00
+00
+58
+00
+00
+00
+67
+e0
+c8
+aa
+67
+e1
+4c
+2f
+20
+40
+02
+02
+24
+2c
+02
+2a
+24
+37
+82
+2a
+20
+40
+01
+ae
+20
+40
+26
+79
+20
+40
+02
+6b
+20
+20
+26
+58
+78
+57
+fc
+00
+20
+40
+21
+f8
+6f
+e0
+c8
+2f
+c0
+00
+a1
+f1
+18
+00
+2a
+00
+6f
+e2
+48
+3f
+98
+00
+12
+00
+20
+40
+10
+ac
+68
+48
+80
+17
+20
+40
+11
+8b
+20
+00
+01
+2c
+20
+40
+11
+a2
+20
+40
+02
+19
+20
+57
+a1
+f1
+20
+60
+00
+00
+6f
+e0
+c8
+67
+20
+40
+16
+37
+6f
+e2
+48
+3f
+98
+00
+12
+00
+20
+40
+10
+ac
+20
+40
+11
+5d
+68
+48
+c8
+3d
+20
+40
+16
+74
+20
+40
+21
+81
+c5
+97
+82
+1e
+78
+3c
+fc
+00
+20
+00
+00
+1e
+20
+40
+21
+81
+78
+57
+fc
+00
+78
+26
+fc
+00
+78
+30
+fc
+00
+78
+50
+7c
+00
+78
+28
+7c
+00
+6f
+e1
+48
+3b
+98
+00
+36
+00
+37
+c1
+84
+00
+24
+2c
+21
+ef
+20
+40
+4d
+0d
+c5
+17
+a1
+a4
+20
+20
+21
+a4
+6f
+e0
+ca
+d6
+24
+7a
+00
+00
+20
+40
+02
+5b
+6f
+e0
+c8
+ab
+24
+7a
+00
+00
+6f
+e1
+48
+a7
+1f
+e0
+fe
+01
+67
+e1
+48
+a7
+6f
+e1
+48
+a7
+c2
+84
+26
+80
+20
+40
+02
+39
+6f
+e1
+4c
+2f
+1f
+e0
+fe
+01
+67
+e1
+4c
+2f
+20
+20
+01
+fb
+68
+48
+c8
+aa
+6f
+e0
+c8
+ca
+98
+46
+7c
+00
+24
+21
+02
+53
+18
+40
+84
+01
+60
+48
+c8
+aa
+6f
+e0
+c8
+ca
+c0
+02
+82
+4f
+c0
+04
+02
+4b
+c0
+07
+82
+47
+6f
+e0
+c8
+aa
+c0
+0a
+26
+9d
+c0
+0f
+26
+9d
+20
+60
+00
+00
+6f
+e0
+c8
+aa
+c0
+05
+26
+9d
+c0
+07
+a6
+9d
+20
+60
+00
+00
+6f
+e0
+c8
+aa
+c0
+03
+26
+9d
+c0
+04
+a6
+9d
+20
+60
+00
+00
+6f
+e0
+c8
+aa
+c0
+01
+a6
+9d
+c0
+02
+a6
+9d
+20
+60
+00
+00
+20
+40
+02
+55
+20
+20
+22
+81
+6f
+e0
+c8
+a7
+1f
+e6
+7c
+80
+20
+61
+00
+00
+70
+4c
+73
+01
+df
+20
+00
+28
+20
+20
+7d
+86
+6f
+e0
+c9
+1f
+c1
+7f
+80
+00
+da
+20
+00
+00
+70
+4b
+a7
+06
+68
+48
+c9
+1f
+20
+40
+46
+a8
+67
+e0
+cb
+a5
+6f
+e0
+c9
+14
+c0
+7f
+82
+68
+20
+40
+41
+a8
+1a
+22
+7e
+00
+c2
+83
+46
+cb
+20
+20
+46
+be
+68
+48
+c9
+1f
+20
+40
+3f
+96
+20
+20
+02
+65
+6f
+e0
+cb
+f2
+24
+5a
+02
+6f
+70
+4b
+f2
+00
+20
+60
+00
+00
+20
+40
+03
+cc
+6f
+e4
+4b
+bc
+c4
+1e
+00
+00
+6f
+e0
+c9
+17
+20
+40
+3f
+96
+6f
+e0
+c9
+18
+20
+20
+3f
+96
+6f
+e4
+4b
+bc
+c3
+0a
+02
+83
+20
+40
+61
+66
+20
+40
+61
+8d
+67
+e1
+48
+ed
+68
+49
+44
+96
+6f
+e1
+44
+a4
+98
+46
+7c
+00
+20
+21
+02
+76
+da
+20
+48
+e7
+20
+40
+3f
+1a
+6f
+e0
+c4
+a6
+c2
+80
+be
+5a
+6f
+e4
+4b
+bc
+c2
+97
+82
+97
+6f
+e0
+c9
+3d
+c0
+00
+02
+9e
+20
+40
+03
+71
+20
+40
+43
+54
+6f
+e0
+c9
+3d
+c0
+00
+82
+8d
+c0
+01
+02
+92
+20
+60
+00
+00
+6f
+e3
+49
+3f
+68
+4b
+49
+79
+98
+46
+7c
+00
+20
+22
+c3
+2b
+20
+20
+3e
+1c
+6f
+e3
+49
+5c
+68
+4b
+49
+79
+98
+46
+7c
+00
+20
+22
+c3
+2b
+20
+20
+3e
+1c
+20
+40
+3e
+28
+20
+34
+48
+55
+70
+49
+3d
+00
+6f
+e1
+4b
+cb
+67
+e1
+48
+8b
+70
+48
+8f
+01
+20
+20
+25
+62
+6f
+e4
+4b
+bc
+c3
+08
+c8
+42
+20
+40
+03
+65
+20
+40
+3e
+28
+20
+34
+48
+45
+6f
+e4
+4b
+bc
+c2
+98
+02
+99
+c3
+18
+c8
+4b
+20
+40
+41
+50
+1a
+21
+7e
+07
+68
+48
+cb
+dc
+98
+46
+7c
+00
+20
+22
+84
+cd
+20
+20
+48
+4b
+6f
+e0
+c8
+68
+20
+40
+16
+37
+6f
+e2
+48
+3f
+98
+00
+12
+00
+20
+40
+21
+81
+20
+40
+21
+f5
+79
+20
+2a
+00
+78
+2e
+fc
+00
+78
+30
+7c
+00
+78
+50
+fc
+00
+20
+40
+4d
+13
+78
+5d
+7c
+00
+c5
+17
+a2
+29
+c5
+16
+82
+c0
+19
+31
+7e
+00
+1f
+ec
+fe
+00
+1f
+f1
+fe
+00
+08
+00
+86
+28
+c5
+17
+a2
+10
+20
+20
+22
+10
+6f
+e0
+c1
+f0
+1f
+e3
+72
+00
+20
+00
+00
+02
+c2
+00
+02
+c2
+19
+31
+7e
+00
+1f
+ec
+fe
+00
+1f
+f1
+84
+00
+18
+42
+7e
+00
+08
+00
+86
+08
+18
+42
+7e
+00
+08
+00
+86
+28
+20
+20
+02
+be
+20
+40
+3e
+dc
+20
+40
+03
+18
+20
+40
+22
+e1
+20
+40
+25
+5f
+20
+40
+02
+e0
+20
+40
+03
+31
+20
+40
+02
+e5
+20
+40
+40
+bc
+20
+40
+04
+40
+20
+40
+03
+77
+20
+40
+45
+3f
+20
+40
+03
+8e
+20
+40
+45
+52
+20
+40
+03
+92
+20
+40
+45
+55
+20
+40
+03
+95
+20
+40
+45
+75
+20
+40
+40
+62
+20
+40
+03
+ad
+20
+20
+03
+98
+da
+60
+48
+c8
+da
+40
+02
+e3
+20
+20
+31
+fc
+20
+40
+03
+a9
+20
+20
+48
+0e
+6f
+e0
+cc
+bf
+20
+7a
+00
+00
+6f
+e0
+cc
+c1
+1f
+e0
+fe
+01
+67
+e0
+cc
+c1
+c0
+01
+82
+ed
+c0
+03
+02
+f1
+20
+60
+00
+00
+6f
+e0
+cc
+b5
+c2
+80
+03
+44
+68
+48
+cc
+bc
+20
+20
+61
+0d
+70
+4c
+c1
+00
+6f
+e0
+cc
+c0
+1f
+e0
+ff
+ff
+67
+e0
+cc
+c0
+24
+3a
+02
+f7
+70
+4c
+bf
+00
+6f
+e0
+cc
+b5
+c2
+80
+03
+4a
+68
+48
+cc
+bc
+20
+20
+61
+09
+70
+48
+fa
+00
+20
+40
+61
+66
+20
+40
+61
+8d
+67
+e1
+48
+ed
+6f
+e0
+c4
+a2
+c0
+81
+03
+07
+68
+49
+48
+ed
+18
+4f
+fe
+08
+1f
+e6
+fc
+0a
+20
+40
+7e
+61
+98
+40
+fe
+00
+67
+e1
+48
+ed
+da
+20
+48
+e7
+20
+40
+3f
+1a
+6f
+e0
+c4
+a6
+c2
+80
+bf
+5e
+c3
+00
+03
+0e
+70
+48
+fe
+01
+20
+20
+3f
+10
+d8
+e0
+00
+04
+20
+40
+47
+32
+70
+48
+fc
+0c
+6f
+e0
+c8
+fe
+20
+7a
+00
+00
+70
+48
+fe
+00
+6f
+e0
+cc
+b5
+c2
+80
+83
+4a
+68
+48
+cc
+bd
+20
+20
+61
+09
+6f
+e0
+cc
+be
+20
+7a
+00
+00
+6f
+e4
+4b
+bc
+c4
+02
+00
+00
+6f
+e0
+c8
+fc
+1f
+e0
+fe
+01
+67
+e0
+c8
+fc
+1f
+e6
+7c
+14
+24
+41
+03
+27
+1f
+e6
+7c
+0a
+20
+21
+03
+14
+6f
+e0
+cc
+b5
+c2
+80
+83
+44
+68
+48
+cc
+bd
+20
+20
+61
+0d
+70
+48
+fc
+01
+20
+60
+00
+00
+70
+4c
+b1
+00
+70
+4c
+bf
+00
+70
+4c
+c1
+00
+20
+40
+03
+56
+20
+40
+03
+58
+20
+40
+03
+5a
+20
+40
+02
+f7
+20
+20
+03
+14
+6f
+e0
+cc
+b1
+20
+7a
+00
+00
+6f
+e0
+cc
+b2
+c0
+00
+83
+3e
+6f
+e0
+cc
+b6
+20
+3a
+03
+3a
+1f
+e0
+ff
+ff
+67
+e0
+cc
+b6
+20
+20
+03
+44
+70
+4c
+be
+01
+70
+4c
+b6
+00
+70
+4c
+b1
+00
+20
+20
+03
+4a
+da
+60
+4c
+b8
+da
+40
+03
+41
+20
+20
+31
+fc
+20
+40
+03
+5c
+6f
+e0
+cc
+b3
+c0
+00
+83
+4a
+70
+4c
+b3
+01
+6f
+e0
+c9
+3d
+c0
+00
+03
+50
+c0
+00
+83
+52
+c0
+01
+03
+54
+20
+60
+00
+00
+70
+4c
+b3
+00
+6f
+e0
+c9
+3d
+c0
+00
+03
+56
+c0
+00
+83
+58
+c0
+01
+03
+5a
+20
+60
+00
+00
+68
+48
+cc
+b9
+20
+20
+61
+0d
+68
+48
+cc
+ba
+20
+20
+61
+0d
+68
+48
+cc
+bb
+20
+20
+61
+0d
+68
+48
+cc
+b9
+20
+20
+61
+09
+68
+48
+cc
+ba
+20
+20
+61
+09
+68
+48
+cc
+bb
+20
+20
+61
+09
+6f
+e0
+cc
+b7
+67
+e0
+cc
+b8
+20
+60
+00
+00
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+70
+4c
+b6
+14
+70
+4c
+b2
+00
+70
+4c
+b1
+01
+20
+60
+00
+00
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+70
+4c
+b7
+02
+70
+4c
+b3
+00
+70
+4c
+b8
+03
+70
+4c
+b1
+01
+70
+4c
+b2
+01
+20
+20
+03
+44
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+70
+4c
+b7
+02
+20
+20
+03
+68
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+6f
+e0
+cc
+b4
+20
+7a
+00
+00
+70
+4c
+b7
+05
+20
+20
+03
+68
+6f
+e0
+c9
+3d
+c0
+00
+03
+7d
+6f
+e4
+4b
+bc
+c4
+1a
+80
+00
+68
+48
+cb
+db
+20
+20
+03
+80
+6f
+e4
+4b
+bc
+c4
+19
+00
+00
+68
+48
+cb
+dc
+60
+48
+cb
+ae
+20
+40
+41
+55
+1f
+e1
+7e
+07
+68
+48
+cb
+ae
+98
+46
+7c
+00
+20
+22
+83
+87
+20
+20
+45
+2b
+20
+40
+03
+8c
+6f
+e0
+cb
+b0
+c1
+00
+80
+00
+70
+4b
+b0
+01
+20
+60
+00
+00
+da
+40
+04
+cd
+20
+20
+45
+37
+da
+60
+4b
+88
+da
+40
+45
+4a
+20
+40
+31
+fc
+20
+20
+45
+47
+6f
+e4
+4b
+bc
+c3
+9d
+80
+00
+20
+20
+45
+5f
+da
+60
+4c
+70
+da
+40
+43
+ac
+20
+20
+31
+fc
+da
+60
+4a
+c3
+da
+40
+03
+9b
+20
+20
+32
+03
+6f
+e0
+c9
+2f
+c3
+83
+80
+00
+6f
+e0
+c9
+3d
+c0
+80
+43
+5b
+70
+48
+a9
+00
+20
+40
+26
+59
+5f
+ff
+ff
+ff
+67
+e2
+48
+5f
+58
+00
+00
+00
+67
+e3
+c8
+d4
+70
+4b
+f2
+01
+20
+40
+03
+e9
+20
+40
+03
+a9
+20
+20
+04
+a8
+6f
+e4
+4b
+bc
+c2
+8c
+a6
+d7
+c2
+8d
+26
+d7
+20
+60
+00
+00
+da
+60
+49
+c4
+da
+40
+03
+b0
+20
+20
+31
+fc
+20
+40
+03
+b7
+20
+40
+46
+31
+20
+40
+03
+bb
+6f
+e0
+ca
+d6
+20
+7a
+00
+00
+20
+40
+00
+b7
+20
+20
+46
+fe
+68
+48
+c9
+23
+20
+40
+3f
+96
+68
+48
+c9
+24
+20
+20
+3f
+96
+68
+48
+c4
+b7
+20
+40
+3f
+96
+68
+48
+c4
+ba
+20
+40
+3f
+96
+68
+48
+c4
+b8
+20
+40
+3f
+96
+68
+48
+c4
+b9
+20
+20
+3f
+96
+6f
+e4
+4b
+bc
+c2
+89
+c6
+7f
+20
+40
+5d
+af
+20
+40
+46
+4a
+20
+40
+46
+5f
+20
+40
+5d
+b4
+20
+20
+46
+46
+20
+40
+3f
+a5
+20
+75
+80
+00
+20
+40
+42
+76
+20
+40
+41
+f5
+c0
+18
+03
+d4
+c0
+18
+c2
+57
+c0
+2c
+03
+d8
+20
+40
+41
+f2
+20
+00
+1a
+f4
+20
+20
+03
+cd
+6f
+e0
+c9
+c7
+1f
+e1
+7e
+f0
+c0
+60
+42
+5e
+20
+20
+41
+fc
+6f
+e0
+c9
+c7
+c0
+2b
+83
+dc
+c0
+2c
+c2
+64
+20
+20
+03
+cd
+70
+49
+2c
+0c
+da
+60
+4c
+74
+20
+20
+03
+e4
+20
+40
+3f
+a5
+6f
+e0
+c9
+2c
+c0
+05
+83
+e6
+20
+40
+42
+72
+da
+60
+4a
+b4
+20
+40
+42
+6b
+20
+20
+04
+61
+20
+40
+03
+f9
+da
+60
+4b
+f5
+20
+20
+03
+e4
+20
+40
+41
+e7
+20
+40
+3f
+a5
+6f
+e0
+c9
+2c
+c0
+05
+83
+ee
+20
+20
+42
+7e
+58
+00
+1f
+06
+20
+20
+5d
+5e
+58
+00
+00
+06
+20
+40
+5d
+65
+c2
+81
+be
+5d
+20
+40
+03
+f6
+20
+40
+03
+e9
+20
+20
+3e
+5d
+6f
+e0
+c9
+2c
+c0
+05
+83
+f9
+20
+20
+42
+72
+58
+00
+97
+06
+20
+20
+42
+73
+20
+40
+43
+29
+20
+40
+7f
+52
+20
+40
+40
+55
+68
+48
+c9
+14
+20
+40
+61
+0d
+68
+48
+c9
+14
+20
+40
+60
+e6
+6f
+e0
+c9
+24
+20
+40
+06
+12
+20
+40
+3e
+80
+20
+40
+3e
+72
+d8
+40
+00
+01
+20
+40
+61
+0d
+d8
+40
+00
+13
+20
+40
+3f
+96
+20
+40
+03
+2c
+20
+40
+04
+0f
+20
+40
+04
+13
+d8
+40
+00
+00
+20
+20
+60
+e6
+6f
+e0
+c9
+22
+c1
+7f
+80
+00
+68
+48
+c9
+22
+20
+20
+61
+21
+6f
+e4
+4b
+bc
+c4
+1e
+00
+00
+68
+48
+c9
+17
+20
+40
+60
+e6
+68
+48
+c9
+18
+20
+40
+60
+e6
+68
+48
+c9
+17
+20
+40
+3f
+94
+68
+48
+c9
+18
+20
+20
+3f
+94
+20
+40
+7f
+52
+20
+20
+15
+5d
+68
+48
+c9
+17
+20
+40
+60
+f4
+68
+48
+c9
+18
+20
+40
+60
+f4
+20
+20
+3e
+81
+20
+40
+49
+dd
+20
+40
+79
+a1
+20
+40
+04
+43
+20
+40
+04
+2c
+20
+40
+04
+2f
+20
+40
+47
+14
+20
+40
+3f
+c8
+20
+60
+00
+00
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+20
+20
+46
+93
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+6f
+e4
+4b
+bc
+c4
+15
+00
+00
+68
+48
+c9
+22
+20
+40
+3f
+96
+68
+48
+c9
+22
+20
+40
+60
+fd
+20
+20
+c6
+ef
+6f
+e0
+c9
+3d
+c1
+00
+80
+00
+70
+49
+3d
+01
+20
+20
+46
+fe
+6f
+e0
+c9
+3d
+c1
+00
+00
+00
+70
+49
+3d
+00
+20
+20
+46
+fe
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+20
+20
+45
+0c
+6f
+e4
+4b
+bc
+c2
+97
+40
+76
+6f
+e0
+c9
+13
+c1
+7f
+80
+00
+da
+20
+00
+00
+70
+4b
+a7
+05
+68
+48
+c9
+13
+20
+40
+04
+4c
+20
+20
+40
+6f
+6f
+e4
+4b
+bc
+c2
+96
+40
+88
+6f
+e0
+cb
+a4
+1f
+e2
+26
+00
+6f
+e0
+c9
+14
+c0
+7f
+84
+53
+20
+20
+40
+7f
+6f
+e0
+c9
+13
+20
+40
+06
+15
+68
+48
+c9
+13
+20
+20
+41
+d5
+20
+40
+40
+b2
+20
+74
+00
+00
+6f
+e0
+c9
+97
+1f
+e0
+fe
+01
+1f
+e1
+7e
+03
+67
+e0
+c9
+97
+20
+40
+04
+60
+20
+40
+04
+64
+20
+20
+46
+2e
+20
+40
+40
+cf
+6f
+e0
+c9
+2c
+c0
+06
+40
+fb
+20
+20
+40
+d8
+6f
+e0
+cc
+be
+20
+7a
+00
+00
+6f
+e0
+c9
+97
+c0
+00
+04
+6d
+c0
+00
+84
+6f
+c0
+01
+04
+6b
+20
+60
+00
+00
+58
+00
+00
+01
+20
+20
+04
+70
+58
+00
+00
+02
+20
+20
+04
+70
+58
+00
+00
+03
+67
+e0
+cc
+c0
+70
+4c
+bf
+01
+20
+60
+00
+00
+1a
+62
+7e
+00
+c0
+1e
+04
+8a
+c0
+1c
+84
+86
+c0
+1d
+04
+9a
+c0
+19
+04
+d0
+c0
+0a
+84
+dc
+c0
+0a
+04
+e5
+c0
+20
+04
+d7
+c0
+01
+04
+7d
+20
+20
+43
+76
+70
+4b
+90
+00
+70
+4b
+99
+00
+20
+40
+44
+33
+20
+40
+44
+49
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+20
+20
+44
+42
+20
+40
+01
+5c
+20
+20
+01
+28
+20
+40
+04
+84
+20
+40
+45
+84
+20
+40
+03
+5f
+20
+20
+48
+96
+6f
+e2
+48
+3f
+67
+e2
+48
+95
+67
+e2
+49
+98
+20
+40
+25
+87
+20
+40
+45
+84
+20
+40
+43
+0a
+70
+4a
+bf
+00
+70
+48
+a5
+00
+70
+48
+8f
+00
+6f
+e2
+48
+95
+68
+4a
+48
+91
+98
+46
+7c
+00
+20
+62
+80
+00
+20
+40
+03
+5f
+20
+40
+04
+84
+20
+20
+48
+61
+70
+4c
+be
+00
+20
+40
+04
+84
+6f
+e0
+c8
+a9
+24
+3a
+03
+9f
+6f
+e0
+c8
+8f
+c0
+01
+04
+c0
+c0
+00
+84
+c0
+c0
+02
+c8
+83
+20
+20
+48
+76
+6f
+e0
+c8
+ab
+20
+5a
+04
+b2
+6f
+e0
+c8
+c1
+c1
+00
+80
+00
+20
+40
+26
+a6
+20
+40
+26
+c2
+24
+74
+00
+00
+20
+40
+26
+cb
+70
+4c
+31
+00
+70
+4c
+32
+01
+20
+40
+01
+14
+6f
+e0
+cb
+f2
+24
+5a
+3e
+6a
+6f
+e2
+48
+5f
+20
+20
+26
+bf
+70
+48
+39
+01
+70
+48
+ab
+01
+20
+40
+26
+49
+67
+e0
+c7
+c9
+58
+00
+00
+00
+67
+e3
+c7
+ca
+6f
+e2
+48
+ad
+67
+e2
+47
+d1
+70
+48
+38
+0c
+6f
+e0
+c8
+39
+79
+20
+7e
+03
+67
+e0
+c8
+39
+20
+40
+22
+47
+20
+20
+01
+63
+6f
+e4
+4b
+bc
+c2
+97
+84
+c9
+c2
+98
+04
+c9
+c3
+1d
+48
+45
+6f
+e2
+49
+98
+68
+4a
+49
+79
+98
+46
+7c
+00
+20
+22
+84
+cd
+20
+20
+48
+45
+6f
+e1
+48
+85
+67
+e1
+48
+8b
+70
+48
+8f
+05
+20
+20
+25
+62
+70
+48
+8f
+00
+20
+40
+03
+65
+20
+20
+48
+66
+6f
+e0
+ca
+d8
+c0
+00
+84
+d4
+70
+4b
+87
+14
+20
+20
+43
+b3
+20
+40
+43
+ac
+70
+4b
+87
+0a
+20
+20
+43
+b3
+6f
+e0
+cc
+6f
+24
+7a
+00
+00
+70
+4c
+6f
+01
+70
+4c
+70
+1e
+20
+60
+00
+00
+58
+00
+00
+00
+67
+e1
+4b
+03
+67
+e0
+cc
+6f
+67
+e0
+cc
+70
+67
+e0
+ca
+d7
+70
+4b
+05
+00
+70
+4a
+bd
+00
+20
+40
+1a
+c8
+20
+20
+04
+7d
+20
+40
+03
+5f
+20
+20
+43
+90
+70
+48
+8f
+00
+6f
+e1
+4b
+fd
+1f
+e0
+fe
+01
+67
+e1
+4b
+fd
+6f
+e0
+cb
+fd
+1f
+e1
+7e
+ff
+c0
+00
+04
+ef
+20
+60
+00
+00
+6f
+e0
+c8
+83
+c0
+7f
+a3
+44
+c0
+00
+84
+f6
+c0
+01
+04
+f8
+c0
+01
+84
+fe
+c0
+02
+05
+04
+20
+60
+00
+00
+70
+47
+c9
+ff
+20
+20
+05
+05
+6f
+e0
+c8
+5e
+20
+3a
+04
+fc
+6f
+e2
+48
+ad
+20
+40
+22
+92
+70
+47
+c9
+aa
+20
+20
+05
+05
+70
+47
+c9
+55
+6f
+e0
+c8
+5e
+20
+3a
+05
+05
+6f
+e2
+48
+95
+67
+e2
+47
+cb
+20
+20
+05
+07
+70
+47
+c9
+22
+6f
+e2
+48
+ad
+67
+e2
+47
+cb
+6f
+e0
+c8
+39
+1f
+e1
+7e
+07
+67
+e0
+c7
+ca
+70
+47
+cf
+00
+70
+48
+38
+07
+20
+40
+22
+47
+20
+40
+02
+02
+20
+20
+23
+16
+6f
+e0
+c8
+83
+c1
+7f
+80
+00
+c0
+01
+05
+13
+20
+20
+23
+1d
+6f
+e0
+c8
+5e
+20
+3a
+23
+2d
+6f
+e2
+48
+0f
+20
+7a
+00
+00
+67
+e2
+48
+95
+20
+20
+23
+2d
+6f
+e1
+48
+8d
+d8
+40
+01
+f8
+98
+41
+7e
+00
+20
+3a
+05
+24
+6f
+e1
+48
+8d
+1f
+e0
+fe
+01
+67
+e1
+48
+8d
+20
+60
+00
+00
+6f
+e4
+4b
+bc
+c2
+98
+22
+e4
+20
+20
+25
+77
+20
+40
+25
+a3
+20
+40
+02
+02
+24
+2c
+05
+42
+24
+37
+85
+42
+20
+40
+26
+79
+6f
+e0
+c8
+2d
+20
+3a
+05
+3b
+6f
+e2
+48
+7b
+68
+4a
+48
+3f
+98
+46
+7c
+00
+20
+22
+85
+21
+6f
+e2
+48
+ad
+68
+4a
+48
+3f
+98
+46
+7c
+00
+20
+42
+85
+3e
+6f
+e0
+c8
+a5
+79
+3f
+fe
+02
+67
+e0
+c8
+a5
+58
+00
+00
+00
+67
+e1
+48
+87
+67
+e1
+48
+8d
+67
+e1
+48
+8b
+20
+20
+25
+9e
+6f
+e2
+48
+0f
+20
+7a
+00
+00
+20
+20
+05
+2b
+6f
+e2
+48
+0f
+20
+7a
+00
+00
+67
+e2
+48
+95
+20
+20
+25
+87
+6f
+e0
+c8
+90
+20
+3a
+22
+81
+6f
+e1
+48
+8d
+1f
+e0
+fe
+01
+67
+e1
+48
+8d
+2f
+ef
+fe
+09
+6f
+e0
+c8
+8f
+c0
+02
+85
+4d
+c0
+02
+05
+56
+c0
+01
+05
+53
+20
+20
+25
+b1
+20
+20
+a5
+77
+20
+20
+22
+ef
+20
+20
+a5
+77
+20
+20
+25
+6f
+20
+20
+a5
+77
+20
+20
+22
+ef
+20
+20
+a5
+7e
+70
+41
+e8
+aa
+20
+20
+25
+71
+20
+20
+a5
+7e
+20
+20
+22
+ef
+6f
+e0
+cb
+bb
+24
+3a
+7e
+c7
+78
+34
+7c
+00
+20
+40
+14
+36
+6f
+e1
+c1
+74
+20
+3a
+7e
+c7
+6f
+e0
+c0
+99
+20
+3a
+7e
+c7
+6f
+e0
+c8
+c1
+c0
+00
+fe
+c7
+20
+60
+00
+00
+20
+40
+03
+6d
+6f
+e1
+47
+8f
+2f
+ef
+fe
+0b
+20
+40
+c5
+c1
+6f
+e1
+47
+8f
+2f
+ef
+fe
+07
+20
+40
+c3
+62
+58
+00
+00
+00
+67
+e1
+4b
+03
+20
+20
+45
+94
+58
+00
+00
+00
+67
+e1
+4a
+d3
+20
+20
+45
+b7
+6f
+e0
+cb
+f4
+24
+5a
+78
+cc
+70
+4b
+f4
+00
+20
+20
+78
+bc
+18
+42
+7e
+00
+c2
+80
+16
+51
+c2
+80
+85
+78
+20
+20
+16
+3c
+20
+40
+16
+40
+20
+40
+05
+7e
+70
+8a
+6d
+89
+20
+60
+00
+00
+20
+40
+05
+7e
+20
+20
+0e
+7d
+6f
+e4
+4b
+bc
+c2
+8c
+85
+82
+c2
+8d
+05
+82
+20
+60
+00
+00
+70
+89
+30
+02
+20
+60
+00
+00
+6f
+e0
+c3
+dd
+1f
+e0
+fe
+01
+67
+e0
+c3
+dd
+c0
+06
+16
+06
+20
+40
+18
+c7
+20
+40
+19
+16
+6f
+e0
+82
+bd
+20
+40
+16
+37
+20
+40
+17
+e4
+20
+20
+16
+01
+20
+40
+0e
+7c
+20
+20
+16
+0d
+ef
+e1
+00
+06
+c0
+02
+05
+93
+20
+20
+19
+90
+ef
+e1
+80
+06
+67
+e1
+c4
+36
+c0
+05
+05
+98
+c0
+09
+05
+a7
+20
+20
+1c
+7f
+6f
+e4
+4b
+bc
+c3
+1d
+9d
+93
+20
+40
+1e
+39
+68
+49
+44
+37
+6f
+e0
+c3
+c0
+c2
+81
+85
+a2
+6f
+e1
+44
+37
+c0
+18
+1e
+74
+68
+49
+44
+37
+20
+20
+1d
+97
+6f
+e1
+43
+d1
+98
+46
+7c
+00
+24
+22
+85
+9e
+24
+34
+05
+9e
+20
+20
+1d
+bc
+18
+c2
+22
+00
+6f
+e1
+43
+d4
+1f
+e0
+a5
+fd
+20
+40
+19
+d1
+6f
+e0
+ca
+d2
+c0
+7f
+9e
+1f
+6f
+e0
+ca
+d8
+20
+3a
+1e
+1f
+6f
+e0
+cb
+86
+c2
+80
+9e
+1f
+58
+00
+00
+1a
+68
+49
+44
+37
+98
+46
+7c
+00
+24
+22
+9e
+1f
+20
+20
+1d
+bc
+78
+54
+7c
+00
+58
+00
+00
+00
+67
+e3
+48
+d5
+20
+40
+05
+c6
+58
+00
+00
+89
+20
+40
+5d
+5e
+20
+40
+04
+61
+20
+40
+3f
+be
+20
+40
+3f
+c3
+20
+40
+05
+df
+6f
+e0
+c8
+d4
+1f
+e1
+7e
+1f
+67
+e0
+c8
+d4
+24
+34
+47
+66
+20
+40
+05
+d6
+20
+20
+45
+84
+6f
+e0
+c4
+ae
+c1
+80
+00
+00
+6f
+e0
+c9
+2c
+c0
+06
+05
+cc
+c0
+05
+85
+cc
+20
+20
+42
+83
+20
+40
+43
+04
+6f
+e0
+c9
+15
+c0
+7f
+85
+d2
+68
+48
+c9
+15
+20
+40
+60
+fd
+24
+60
+80
+00
+58
+00
+00
+00
+20
+40
+5d
+65
+c0
+ac
+41
+f2
+20
+20
+42
+b9
+6f
+e4
+4b
+bc
+c3
+8c
+80
+00
+c3
+8d
+00
+00
+c3
+8f
+80
+00
+6f
+e0
+c9
+2c
+c1
+01
+80
+00
+c1
+05
+80
+00
+20
+40
+47
+58
+20
+60
+00
+00
+20
+40
+05
+e2
+20
+40
+41
+2d
+20
+20
+41
+1e
+6f
+e0
+cb
+f2
+24
+5a
+41
+61
+da
+20
+00
+00
+20
+40
+05
+e9
+20
+40
+05
+f8
+20
+40
+06
+05
+20
+20
+41
+5e
+6f
+e0
+c9
+1c
+20
+40
+06
+12
+20
+40
+41
+64
+68
+48
+c9
+1c
+20
+40
+3f
+96
+6f
+e0
+c9
+1d
+20
+40
+06
+12
+20
+40
+41
+6a
+68
+48
+c9
+1d
+20
+40
+3f
+96
+6f
+e0
+c9
+1e
+20
+40
+06
+12
+20
+40
+41
+70
+68
+48
+c9
+1e
+20
+20
+3f
+96
+6f
+e0
+c9
+11
+c1
+7f
+80
+00
+70
+4b
+a7
+03
+6f
+e0
+cb
+a2
+1f
+e2
+26
+00
+68
+48
+c9
+11
+6f
+e0
+c9
+14
+c0
+7f
+86
+01
+20
+20
+41
+7e
+6f
+e0
+c9
+11
+20
+40
+06
+15
+68
+48
+c9
+11
+20
+20
+41
+8b
+6f
+e0
+c9
+12
+c1
+7f
+80
+00
+70
+4b
+a7
+04
+6f
+e0
+cb
+a3
+1f
+e2
+26
+00
+68
+48
+c9
+12
+6f
+e0
+c9
+14
+c0
+7f
+86
+0e
+20
+20
+41
+97
+6f
+e0
+c9
+12
+20
+40
+06
+15
+68
+48
+c9
+12
+20
+20
+41
+a4
+c1
+7f
+80
+00
+d8
+40
+00
+3f
+20
+20
+61
+2c
+c1
+7f
+80
+00
+d8
+40
+00
+3e
+20
+20
+61
+2c
+68
+48
+cc
+c2
+18
+51
+84
+00
+6f
+e0
+cc
+c7
+98
+46
+7c
+00
+20
+22
+86
+3a
+60
+48
+cc
+c7
+18
+40
+84
+01
+58
+00
+01
+00
+98
+4f
+84
+00
+6f
+e1
+cc
+c8
+98
+46
+7e
+00
+68
+49
+cc
+cb
+98
+40
+fe
+00
+67
+e1
+cc
+ce
+20
+40
+06
+3c
+20
+40
+03
+b7
+20
+40
+5e
+18
+6f
+e1
+cc
+ce
+d8
+40
+01
+00
+da
+20
+1f
+00
+20
+40
+5d
+d2
+20
+40
+06
+3f
+24
+22
+86
+26
+20
+40
+03
+bb
+6f
+e2
+1f
+00
+68
+4a
+4c
+d1
+98
+46
+7c
+00
+24
+22
+86
+26
+58
+00
+1f
+00
+67
+e1
+41
+a6
+70
+41
+a8
+40
+20
+40
+5c
+a3
+58
+00
+00
+00
+67
+e2
+41
+a6
+6f
+e0
+cc
+c2
+20
+20
+00
+01
+d8
+a0
+1f
+00
+df
+20
+01
+00
+20
+20
+7d
+9b
+d8
+c0
+1f
+00
+da
+20
+00
+00
+df
+20
+00
+3f
+ef
+e2
+00
+06
+9a
+20
+a2
+00
+c2
+00
+06
+42
+ef
+e2
+00
+06
+9a
+26
+7c
+00
+20
+60
+00
+00
+86
+e9
+aa
+55
+40
+00
+00
+40
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+0c
+0c
+00
+00
+00
+20
+00
+00
+48
+eb
+2d
+77
+03
+00
+00
+00
+00
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+80
+42
+00
+00
+40
+00
+00
+00
+60
+0e
+16
+00
+00
+aa
+55
+01
+00
+9a
+40
+08
+aa
+55
+03
+00
+7a
+41
+88
+12
+ce
+aa
+55
+01
+00
+c5
+40
+18
+aa
+55
+01
+00
+ef
+41
+ff
+aa
+55
+02
+00
+ca
+40
+ef
+41
+aa
+55
+01
+00
+7d
+41
+38
+aa
+55
+01
+00
+d2
+44
+00
+aa
+55
+05
+00
+ea
+41
+ff
+04
+00
+00
+08
+aa
+55
+08
+00
+bc
+4b
+04
+09
+46
+02
+00
+22
+01
+1c
+aa
+55
+0c
+00
+02
+49
+b0
+04
+58
+02
+64
+64
+95
+75
+85
+63
+75
+80
+aa
+55
+08
+00
+11
+49
+02
+0f
+0e
+ff
+03
+ff
+06
+04
+aa
+55
+0b
+00
+1a
+49
+ff
+ff
+02
+0f
+0e
+00
+ff
+ff
+ff
+05
+07
+aa
+55
+03
+00
+29
+49
+00
+00
+00
+aa
+55
+01
+00
+b0
+4c
+01
+aa
+55
+01
+00
+b5
+4c
+00
+aa
+55
+01
+00
+b4
+4c
+01
+aa
+55
+05
+00
+b9
+4c
+8a
+8d
+ff
+ff
+81
+aa
+55
+03
+00
+13
+4c
+ff
+58
+02
+aa
+55
+12
+00
+dd
+4b
+00
+05
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+01
+00
+99
+40
+01
+aa
+55
+02
+00
+c4
+4b
+03
+02
+aa
+55
+08
+00
+3d
+49
+00
+34
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+07
+00
+5b
+49
+34
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+17
+00
+78
+49
+33
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+0b
+00
+c6
+4b
+00
+40
+0a
+60
+06
+0a
+00
+64
+00
+70
+17
+aa
+55
+02
+00
+db
+4b
+07
+05
+aa
+55
+01
+00
+c5
+49
+01
+aa
+55
+01
+00
+01
+49
+02
+aa
+55
+01
+00
+a3
+44
+05
+aa
+55
+06
+00
+e7
+48
+0f
+01
+a2
+00
+b4
+00
+aa
+55
+01
+00
+fb
+48
+0a
+aa
+55
+03
+00
+ef
+4b
+00
+00
+00
+aa
+55
+01
+00
+bc
+4a
+ff
+aa
+55
+01
+00
+f4
+4b
+01
+aa
+55
+01
+00
+77
+41
+20
+aa
+55
+01
+00
+9b
+4b
+20
+aa
+55
+01
+00
+7f
+44
+06
+aa
+55
+06
+00
+a8
+40
+19
+36
+11
+52
+08
+53
+aa
+55
+0c
+00
+ff
+45
+0b
+42
+54
+33
+2e
+30
+20
+4d
+6f
+75
+73
+65
+aa
+55
+05
+00
+55
+44
+0e
+00
+01
+00
+02
+aa
+55
+01
+00
+44
+46
+0a
+aa
+55
+01
+00
+67
+47
+01
+aa
+55
+01
+00
+7b
+46
+00
+aa
+55
+01
+00
+5f
+41
+00
+aa
+55
+03
+00
+68
+47
+03
+00
+04
+aa
+55
+01
+00
+91
+47
+01
+aa
+55
+01
+00
+d8
+40
+01
+aa
+55
+0c
+00
+e7
+43
+1f
+02
+01
+05
+03
+03
+12
+18
+03
+19
+c2
+03
+aa
+55
+14
+00
+e3
+4a
+06
+ff
+06
+00
+03
+00
+80
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0e
+00
+07
+44
+1f
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0c
+00
+f7
+42
+0b
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0c
+00
+ff
+4b
+0b
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+06
+00
+7a
+43
+03
+b1
+2a
+4e
+8e
+ed
+aa
+55
+08
+00
+72
+43
+06
+00
+09
+00
+20
+00
+2c
+01
+aa
+55
+06
+00
+dd
+4a
+03
+12
+18
+ff
+00
+00
+aa
+55
+04
+00
+28
+44
+00
+00
+00
+00
+aa
+55
+01
+00
+32
+44
+07
+aa
+55
+08
+00
+4c
+44
+fb
+00
+48
+08
+fb
+00
+48
+08
+aa
+55
+02
+00
+f8
+4a
+15
+00
+aa
+55
+02
+00
+57
+43
+19
+00
+aa
+55
+06
+00
+fa
+4a
+1d
+00
+21
+00
+30
+00
+aa
+55
+02
+00
+d1
+43
+2d
+00
+aa
+55
+01
+00
+01
+4b
+96
+aa
+55
+01
+00
+88
+44
+ff
+aa
+55
+0c
+00
+d5
+49
+03
+04
+01
+02
+20
+2a
+3f
+15
+14
+1b
+11
+0e
+aa
+55
+05
+00
+80
+4c
+2a
+35
+3f
+15
+20
+aa
+55
+74
+00
+e4
+49
+09
+5a
+26
+34
+19
+04
+09
+00
+ff
+ff
+09
+5a
+0d
+f0
+1d
+e3
+7d
+d2
+ff
+ff
+09
+5a
+0d
+10
+1d
+ed
+7d
+80
+ff
+ff
+1b
+35
+28
+b4
+29
+46
+2a
+96
+2b
+8c
+2c
+6e
+2d
+64
+38
+5f
+39
+0f
+3a
+32
+3b
+47
+42
+10
+ff
+ff
+54
+2e
+55
+f2
+61
+f4
+63
+70
+75
+52
+76
+41
+77
+ed
+78
+23
+79
+46
+7a
+e5
+7c
+48
+7e
+77
+7f
+01
+0b
+00
+7f
+00
+09
+00
+ff
+ff
+09
+5a
+ff
+27
+ab
+40
+be
+d1
+a0
+41
+a1
+12
+a5
+84
+a7
+ff
+b5
+d0
+b6
+00
+ff
+00
+09
+00
+ff
+ff
+aa
+55
+40
+00
+64
+4a
+09
+5a
+0d
+10
+0e
+c5
+5b
+9a
+10
+38
+11
+42
+28
+28
+41
+23
+49
+39
+4a
+b0
+4b
+a0
+4c
+90
+4d
+70
+09
+00
+ff
+ff
+09
+5a
+06
+02
+09
+69
+0d
+48
+0e
+9f
+0f
+ba
+09
+00
+ff
+ff
+09
+a5
+26
+34
+19
+04
+60
+07
+69
+04
+7d
+20
+7e
+00
+09
+00
+ff
+ff
+aa
+55
+08
+00
+b4
+4a
+09
+5a
+0b
+f3
+09
+00
+ff
+ff
+aa
+55
+08
+00
+f5
+4b
+09
+a5
+0b
+f3
+09
+00
+ff
+ff
+aa
+55
+0c
+00
+74
+4c
+09
+a5
+46
+34
+6a
+c0
+69
+24
+09
+00
+ff
+ff
+aa
+55
+01
+00
+7a
+48
+01
+aa
+55
+01
+00
+68
+48
+02
+aa
+55
+01
+00
+67
+48
+02
+aa
+55
+01
+00
+39
+48
+01
+aa
+55
+01
+00
+ac
+48
+06
+aa
+55
+02
+00
+3b
+48
+c0
+12
+aa
+55
+03
+00
+57
+48
+19
+19
+1c
+aa
+55
+01
+00
+5e
+48
+00
+aa
+55
+05
+00
+7b
+48
+20
+15
+10
+05
+4e
+aa
+55
+05
+00
+90
+48
+01
+0f
+0f
+0f
+0f
+aa
+55
+06
+00
+b1
+48
+0c
+f8
+00
+00
+77
+01
+aa
+55
+03
+00
+5f
+48
+00
+48
+60
+aa
+55
+01
+00
+81
+48
+0f
+aa
+55
+02
+00
+9d
+48
+37
+4c
+aa
+55
+01
+00
+ce
+48
+80
+aa
+55
+02
+00
+c6
+48
+14
+00
+aa
+55
+02
+00
+c4
+48
+50
+00
+aa
+55
+03
+00
+bc
+48
+00
+a6
+0e
+aa
+55
+03
+00
+bd
+49
+00
+50
+00
+aa
+55
+02
+00
+7b
+44
+80
+1f
+aa
+55
+01
+00
+85
+44
+80
+aa
+55
+01
+00
+e8
+41
+0a
+aa
+55
+01
+00
+2a
+4c
+10
+aa
+55
+04
+00
+c7
+4c
+ff
+00
+00
+00
+aa
+55
+04
+00
+d1
+4c
+20
+20
+00
+40
+aa
+55
+02
+00
+8f
+44
+32
+49
+aa
+55
+01
+00
+8e
+44
+00
+aa
+55
+01
+00
+93
+47
+ff
+aa
+55
+01
+00
+92
+47
+1e
+aa
+55
+01
+00
+58
+0b
+ff
+aa
+55
+09
+00
+88
+4c
+01
+53
+31
+30
+10
+53
+31
+30
+30
+aa
+55
+01
+00
+87
+4c
+01
+aa
+55
+11
+00
+91
+4c
+10
+77
+69
+72
+65
+64
+5f
+6d
+6f
+73
+75
+65
+5f
+31
+33
+30
+38
+aa
+55
+01
+00
+2f
+49
+00
+aa
+55
+01
+00
+86
+4c
+ff
+aa
+55
+01
+00
+19
+49
+ff
+aa
+55
+02
+00
+26
+49
+ff
+ff
+aa
+55
+01
+00
+25
+49
+ff
+aa
+55
+01
+00
+28
+49
+ff
+aa
+55
+0a
+00
+d1
+4b
+14
+0a
+90
+01
+e8
+03
+90
+01
+64
+00
+aa
+55
+0a
+00
+ef
+48
+10
+00
+52
+00
+35
+00
+21
+00
+25
+00
+55
+aa
+aa
+55
+14
+a1
+e3
+4b
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+7e
+17
Index: mouse_public_3mode_usb/output/flash.dat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/flash.dat	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/flash.dat	(working copy)
@@ -0,0 +1,8192 @@
+00
+02
+aa
+55
+22
+19
+20
+20
+00
+40
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+20
+00
+00
+01
+c2
+84
+00
+5d
+c0
+00
+00
+98
+c0
+31
+05
+7c
+c0
+41
+00
+c2
+c0
+41
+80
+c9
+c0
+45
+00
+dc
+c0
+45
+80
+d7
+c0
+56
+80
+e6
+c0
+61
+82
+76
+c0
+63
+03
+f0
+c0
+64
+03
+fb
+c0
+64
+84
+1f
+c0
+65
+82
+fb
+c0
+66
+85
+b6
+c0
+67
+04
+57
+c0
+67
+84
+60
+c0
+68
+05
+e2
+c0
+69
+03
+ca
+c0
+69
+83
+df
+c0
+6a
+84
+73
+c0
+6c
+02
+cc
+c0
+6e
+84
+24
+c0
+6f
+00
+88
+c0
+70
+00
+70
+c0
+70
+80
+6c
+c0
+6c
+85
+63
+c0
+6d
+05
+6d
+c0
+6e
+03
+c3
+20
+20
+13
+7e
+c0
+0f
+80
+ef
+c0
+42
+85
+70
+c0
+53
+05
+74
+c0
+6e
+80
+78
+c0
+6f
+02
+11
+c0
+70
+82
+ac
+c0
+71
+04
+e7
+c0
+71
+85
+0f
+c0
+74
+85
+19
+c0
+75
+01
+61
+c0
+76
+05
+58
+c0
+4f
+85
+84
+c0
+50
+85
+8e
+c0
+5f
+05
+90
+20
+20
+13
+7e
+18
+42
+7e
+00
+c1
+7f
+80
+00
+1f
+e2
+04
+00
+20
+20
+49
+7d
+18
+42
+7e
+00
+c1
+7f
+80
+00
+1f
+e2
+04
+00
+20
+20
+49
+79
+6f
+e0
+cb
+c0
+24
+7a
+00
+00
+70
+44
+8e
+00
+20
+60
+00
+00
+c5
+13
+a3
+e1
+c6
+93
+00
+00
+6f
+e0
+c8
+a5
+c2
+80
+a2
+f6
+c2
+81
+25
+89
+6f
+e0
+c8
+c1
+c0
+00
+80
+80
+20
+20
+01
+61
+6f
+e4
+4b
+bc
+c2
+8d
+00
+84
+c2
+8c
+80
+84
+20
+20
+26
+cd
+20
+40
+22
+a0
+24
+74
+00
+00
+20
+40
+26
+e2
+20
+20
+26
+28
+6f
+e0
+cb
+c5
+c1
+00
+80
+00
+20
+40
+03
+3c
+20
+40
+47
+00
+60
+48
+c9
+3d
+70
+41
+ca
+00
+20
+40
+47
+18
+20
+40
+00
+92
+20
+40
+31
+e6
+20
+20
+46
+fb
+6f
+e1
+47
+8f
+c3
+83
+80
+00
+20
+20
+43
+58
+6f
+e0
+c1
+7b
+67
+e0
+cc
+58
+20
+60
+00
+00
+20
+80
+00
+00
+70
+80
+86
+73
+24
+55
+80
+95
+20
+40
+31
+66
+24
+55
+80
+74
+58
+00
+4c
+37
+67
+e1
+48
+9d
+20
+40
+3c
+b3
+20
+40
+12
+46
+70
+80
+42
+04
+6f
+e0
+c0
+c5
+c0
+0c
+00
+a5
+70
+80
+42
+05
+6f
+e0
+cc
+58
+67
+e0
+c1
+7b
+58
+00
+0f
+0f
+d8
+a0
+0f
+ff
+98
+a1
+0a
+00
+6f
+e0
+c1
+7a
+1f
+e1
+7e
+f0
+1f
+ed
+7e
+00
+98
+a1
+fe
+00
+79
+3f
+fe
+02
+67
+f1
+00
+4c
+ef
+e1
+00
+06
+e7
+e1
+00
+05
+58
+00
+00
+01
+37
+d9
+82
+00
+67
+f0
+80
+05
+70
+41
+7b
+08
+20
+20
+08
+05
+6f
+f2
+01
+38
+79
+20
+7e
+02
+67
+f2
+00
+4c
+58
+00
+00
+01
+37
+d9
+82
+00
+67
+f0
+80
+05
+37
+d9
+82
+00
+37
+d9
+82
+00
+37
+d9
+82
+00
+20
+00
+27
+10
+20
+60
+00
+00
+6f
+e0
+c1
+ea
+67
+e0
+89
+64
+20
+40
+11
+4c
+70
+8a
+0a
+00
+6f
+e0
+89
+64
+67
+e0
+c1
+ea
+20
+60
+00
+00
+70
+89
+00
+05
+20
+00
+00
+02
+70
+89
+00
+00
+6f
+e0
+c0
+c5
+c0
+0c
+11
+64
+70
+8a
+87
+29
+20
+20
+11
+79
+6f
+f0
+8a
+0a
+79
+20
+7e
+03
+67
+f0
+8a
+0a
+20
+00
+00
+f0
+79
+3f
+fe
+03
+67
+f0
+8a
+0a
+20
+60
+00
+00
+70
+41
+ea
+ff
+70
+8a
+85
+00
+70
+89
+21
+40
+20
+40
+00
+d0
+20
+20
+12
+52
+6f
+e0
+c1
+e8
+c0
+55
+00
+e0
+c0
+4a
+80
+e3
+20
+20
+12
+37
+70
+8a
+39
+0a
+70
+8a
+3a
+00
+20
+20
+12
+26
+70
+8a
+39
+0a
+70
+8a
+3a
+00
+20
+20
+12
+26
+20
+40
+6e
+5e
+20
+40
+01
+18
+20
+40
+41
+e7
+20
+75
+80
+00
+20
+40
+04
+61
+20
+40
+47
+66
+20
+40
+01
+2b
+20
+40
+03
+e9
+20
+20
+3c
+7f
+6f
+e0
+c9
+23
+20
+20
+5b
+56
+6f
+e0
+cb
+ff
+20
+7a
+00
+00
+1f
+e0
+f2
+01
+d8
+c0
+4b
+ff
+d8
+a0
+42
+f7
+20
+20
+7d
+d4
+6f
+e4
+4b
+bc
+c2
+8d
+00
+fc
+c2
+8c
+81
+02
+c2
+8c
+01
+08
+20
+20
+01
+0d
+70
+48
+ca
+05
+58
+01
+01
+01
+67
+e1
+c8
+57
+58
+00
+2e
+e0
+67
+e1
+cc
+16
+20
+20
+26
+e8
+70
+48
+ca
+09
+58
+08
+06
+06
+67
+e1
+c8
+57
+58
+00
+5c
+1c
+67
+e1
+cc
+16
+20
+20
+26
+e8
+58
+00
+bb
+80
+67
+e1
+cc
+16
+70
+48
+ca
+0f
+58
+00
+60
+00
+20
+20
+01
+11
+58
+01
+77
+00
+67
+e1
+cc
+16
+70
+48
+ca
+1e
+58
+01
+17
+60
+67
+e1
+c8
+b1
+67
+e1
+cc
+2c
+20
+60
+00
+00
+58
+00
+00
+00
+67
+e0
+cc
+1a
+67
+e2
+cc
+25
+20
+60
+00
+00
+20
+75
+80
+00
+20
+40
+26
+0e
+d8
+40
+03
+58
+60
+49
+48
+3b
+20
+40
+22
+b5
+20
+40
+01
+14
+20
+40
+3f
+60
+20
+40
+00
+f1
+20
+40
+3d
+d6
+20
+40
+03
+29
+20
+40
+00
+f7
+20
+40
+01
+25
+20
+20
+3c
+ab
+6f
+e0
+c1
+e8
+67
+e0
+cc
+72
+20
+60
+00
+00
+6f
+e0
+cc
+72
+67
+e0
+c1
+e8
+20
+60
+00
+00
+58
+00
+49
+02
+67
+e1
+44
+79
+58
+00
+01
+30
+67
+e1
+48
+9f
+20
+20
+3c
+89
+c6
+93
+00
+00
+20
+40
+3f
+b0
+24
+74
+00
+00
+6f
+e0
+cc
+32
+70
+4c
+32
+00
+24
+5a
+04
+1d
+6f
+e4
+4b
+bc
+c3
+0a
+81
+3a
+6f
+e0
+cb
+9c
+24
+3a
+48
+c1
+20
+40
+01
+51
+6f
+e4
+4b
+bc
+c2
+8c
+81
+3f
+c2
+8d
+01
+3f
+20
+20
+48
+ac
+6f
+e0
+c8
+39
+c2
+80
+81
+4d
+68
+48
+c7
+ca
+6f
+e0
+c8
+d4
+98
+41
+fe
+00
+67
+e0
+c8
+d4
+68
+48
+c7
+cf
+6f
+e0
+c8
+d9
+98
+40
+fe
+00
+67
+e0
+c8
+d9
+68
+48
+c7
+d0
+6f
+e0
+c8
+da
+98
+40
+fe
+00
+67
+e0
+c8
+da
+70
+48
+39
+01
+da
+20
+00
+07
+da
+40
+48
+d4
+20
+20
+26
+e8
+6f
+e0
+c9
+15
+c1
+ff
+80
+00
+6f
+e0
+cc
+73
+24
+3a
+01
+56
+20
+20
+43
+0d
+70
+4c
+73
+00
+20
+20
+43
+0f
+6f
+e2
+48
+95
+68
+4a
+48
+91
+98
+46
+7c
+00
+20
+22
+81
+5e
+70
+41
+ea
+ff
+20
+60
+00
+00
+70
+41
+ea
+00
+70
+41
+e8
+aa
+20
+60
+00
+00
+20
+40
+26
+38
+24
+34
+04
+a3
+20
+40
+01
+f8
+20
+40
+01
+58
+6f
+e0
+cb
+f2
+24
+3a
+01
+6b
+6f
+e4
+48
+b4
+67
+e4
+48
+5f
+6f
+e1
+48
+c6
+67
+e1
+48
+c8
+20
+40
+26
+c2
+24
+74
+00
+00
+6f
+e0
+cc
+31
+70
+4c
+31
+00
+1f
+e6
+7c
+00
+24
+22
+81
+76
+68
+49
+4c
+2f
+18
+46
+7c
+00
+20
+22
+81
+a2
+6f
+e2
+4c
+21
+20
+3a
+01
+a2
+68
+4a
+4c
+33
+28
+4f
+fe
+1f
+20
+20
+81
+9d
+6f
+e2
+4c
+21
+98
+40
+fe
+00
+68
+4a
+4c
+16
+98
+46
+04
+00
+60
+4a
+4c
+33
+24
+21
+01
+a5
+6f
+e1
+c8
+b1
+98
+46
+7e
+00
+24
+21
+01
+ac
+d8
+40
+06
+00
+98
+46
+7c
+00
+24
+21
+01
+ac
+6f
+e1
+c8
+b1
+20
+40
+7e
+1f
+60
+4a
+41
+60
+6f
+e0
+c0
+c5
+c0
+04
+01
+8c
+58
+00
+00
+00
+67
+f1
+8a
+00
+70
+4c
+2b
+fa
+20
+40
+12
+d1
+6f
+e2
+41
+64
+98
+40
+fe
+00
+67
+e2
+41
+64
+18
+02
+7e
+00
+67
+e4
+41
+9d
+d8
+c0
+80
+70
+d8
+a0
+41
+86
+20
+40
+7d
+74
+6f
+f0
+80
+86
+67
+e0
+c1
+a5
+20
+40
+14
+10
+6f
+f0
+80
+42
+1f
+e1
+fe
+14
+67
+f0
+80
+42
+20
+20
+14
+6d
+df
+ff
+ff
+ff
+98
+46
+5e
+00
+6f
+e2
+4c
+21
+9d
+e6
+7e
+00
+20
+20
+01
+7b
+20
+40
+01
+a9
+6f
+e1
+c8
+b1
+20
+20
+01
+85
+18
+46
+04
+00
+6f
+e1
+c8
+b1
+98
+40
+fe
+00
+20
+20
+01
+85
+58
+00
+00
+00
+67
+e2
+4c
+33
+20
+60
+00
+00
+70
+4c
+31
+01
+20
+60
+00
+00
+6f
+e4
+4b
+bc
+c3
+8c
+80
+00
+c3
+8d
+00
+00
+6f
+e0
+c8
+c1
+c0
+00
+81
+f4
+6f
+e0
+cc
+1a
+20
+3a
+01
+f4
+1b
+22
+7e
+00
+68
+4b
+4c
+1b
+67
+e3
+4c
+1b
+20
+40
+7e
+0a
+67
+e2
+4c
+21
+6f
+e0
+cc
+31
+24
+7a
+00
+00
+6f
+e1
+4c
+2f
+24
+7a
+00
+00
+6f
+e2
+4c
+33
+24
+7a
+00
+00
+6f
+e2
+4c
+21
+68
+4a
+4c
+16
+18
+43
+84
+00
+98
+46
+7c
+00
+20
+21
+01
+14
+68
+4a
+cc
+25
+98
+40
+fe
+00
+67
+e2
+cc
+25
+68
+48
+cc
+1a
+6f
+e0
+cc
+2a
+98
+46
+7c
+00
+20
+22
+81
+cf
+18
+40
+84
+01
+60
+48
+cc
+1a
+20
+60
+00
+00
+70
+4c
+1a
+01
+d8
+40
+00
+00
+6f
+e2
+cc
+25
+60
+4a
+cc
+25
+68
+48
+cc
+2a
+98
+46
+fc
+00
+20
+40
+7e
+64
+18
+07
+a2
+00
+6f
+e2
+4c
+16
+68
+48
+cc
+2b
+98
+46
+04
+00
+1a
+22
+7e
+00
+98
+46
+7e
+00
+20
+21
+01
+e8
+1f
+e6
+7e
+00
+1f
+eb
+7e
+00
+68
+49
+c8
+b1
+98
+40
+84
+00
+6f
+e1
+cc
+2c
+da
+20
+18
+00
+9a
+20
+fe
+00
+98
+46
+7c
+00
+24
+21
+01
+f2
+60
+49
+c8
+b1
+20
+60
+00
+00
+1f
+eb
+04
+00
+6f
+e1
+c8
+b1
+98
+46
+04
+00
+6f
+e1
+cc
+2c
+da
+20
+18
+00
+9a
+26
+7e
+00
+98
+46
+7c
+00
+20
+21
+01
+f2
+60
+49
+c8
+b1
+20
+60
+00
+00
+67
+e1
+c8
+b1
+20
+60
+00
+00
+70
+4c
+1a
+01
+1b
+22
+7e
+00
+67
+e3
+4c
+1b
+20
+60
+00
+00
+58
+00
+00
+00
+67
+e0
+c8
+aa
+67
+e1
+4c
+2f
+20
+40
+02
+02
+24
+2c
+02
+2a
+24
+37
+82
+2a
+20
+40
+01
+ae
+20
+40
+26
+79
+20
+40
+02
+6b
+20
+20
+26
+58
+78
+57
+fc
+00
+20
+40
+21
+f8
+6f
+e0
+c8
+2f
+c0
+00
+a1
+f1
+18
+00
+2a
+00
+6f
+e2
+48
+3f
+98
+00
+12
+00
+20
+40
+10
+ac
+68
+48
+80
+17
+20
+40
+11
+8b
+20
+00
+01
+2c
+20
+40
+11
+a2
+20
+40
+02
+19
+20
+57
+a1
+f1
+20
+60
+00
+00
+6f
+e0
+c8
+67
+20
+40
+16
+37
+6f
+e2
+48
+3f
+98
+00
+12
+00
+20
+40
+10
+ac
+20
+40
+11
+5d
+68
+48
+c8
+3d
+20
+40
+16
+74
+20
+40
+21
+81
+c5
+97
+82
+1e
+78
+3c
+fc
+00
+20
+00
+00
+1e
+20
+40
+21
+81
+78
+57
+fc
+00
+78
+26
+fc
+00
+78
+30
+fc
+00
+78
+50
+7c
+00
+78
+28
+7c
+00
+6f
+e1
+48
+3b
+98
+00
+36
+00
+37
+c1
+84
+00
+24
+2c
+21
+ef
+20
+40
+4d
+0d
+c5
+17
+a1
+a4
+20
+20
+21
+a4
+6f
+e0
+ca
+d6
+24
+7a
+00
+00
+20
+40
+02
+5b
+6f
+e0
+c8
+ab
+24
+7a
+00
+00
+6f
+e1
+48
+a7
+1f
+e0
+fe
+01
+67
+e1
+48
+a7
+6f
+e1
+48
+a7
+c2
+84
+26
+80
+20
+40
+02
+39
+6f
+e1
+4c
+2f
+1f
+e0
+fe
+01
+67
+e1
+4c
+2f
+20
+20
+01
+fb
+68
+48
+c8
+aa
+6f
+e0
+c8
+ca
+98
+46
+7c
+00
+24
+21
+02
+53
+18
+40
+84
+01
+60
+48
+c8
+aa
+6f
+e0
+c8
+ca
+c0
+02
+82
+4f
+c0
+04
+02
+4b
+c0
+07
+82
+47
+6f
+e0
+c8
+aa
+c0
+0a
+26
+9d
+c0
+0f
+26
+9d
+20
+60
+00
+00
+6f
+e0
+c8
+aa
+c0
+05
+26
+9d
+c0
+07
+a6
+9d
+20
+60
+00
+00
+6f
+e0
+c8
+aa
+c0
+03
+26
+9d
+c0
+04
+a6
+9d
+20
+60
+00
+00
+6f
+e0
+c8
+aa
+c0
+01
+a6
+9d
+c0
+02
+a6
+9d
+20
+60
+00
+00
+20
+40
+02
+55
+20
+20
+22
+81
+6f
+e0
+c8
+a7
+1f
+e6
+7c
+80
+20
+61
+00
+00
+70
+4c
+73
+01
+df
+20
+00
+28
+20
+20
+7d
+86
+6f
+e0
+c9
+1f
+c1
+7f
+80
+00
+da
+20
+00
+00
+70
+4b
+a7
+06
+68
+48
+c9
+1f
+20
+40
+46
+a8
+67
+e0
+cb
+a5
+6f
+e0
+c9
+14
+c0
+7f
+82
+68
+20
+40
+41
+a8
+1a
+22
+7e
+00
+c2
+83
+46
+cb
+20
+20
+46
+be
+68
+48
+c9
+1f
+20
+40
+3f
+96
+20
+20
+02
+65
+6f
+e0
+cb
+f2
+24
+5a
+02
+6f
+70
+4b
+f2
+00
+20
+60
+00
+00
+20
+40
+03
+cc
+6f
+e4
+4b
+bc
+c4
+1e
+00
+00
+6f
+e0
+c9
+17
+20
+40
+3f
+96
+6f
+e0
+c9
+18
+20
+20
+3f
+96
+6f
+e4
+4b
+bc
+c3
+0a
+02
+83
+20
+40
+61
+66
+20
+40
+61
+8d
+67
+e1
+48
+ed
+68
+49
+44
+96
+6f
+e1
+44
+a4
+98
+46
+7c
+00
+20
+21
+02
+76
+da
+20
+48
+e7
+20
+40
+3f
+1a
+6f
+e0
+c4
+a6
+c2
+80
+be
+5a
+6f
+e4
+4b
+bc
+c2
+97
+82
+97
+6f
+e0
+c9
+3d
+c0
+00
+02
+9e
+20
+40
+03
+71
+20
+40
+43
+54
+6f
+e0
+c9
+3d
+c0
+00
+82
+8d
+c0
+01
+02
+92
+20
+60
+00
+00
+6f
+e3
+49
+3f
+68
+4b
+49
+79
+98
+46
+7c
+00
+20
+22
+c3
+2b
+20
+20
+3e
+1c
+6f
+e3
+49
+5c
+68
+4b
+49
+79
+98
+46
+7c
+00
+20
+22
+c3
+2b
+20
+20
+3e
+1c
+20
+40
+3e
+28
+20
+34
+48
+55
+70
+49
+3d
+00
+6f
+e1
+4b
+cb
+67
+e1
+48
+8b
+70
+48
+8f
+01
+20
+20
+25
+62
+6f
+e4
+4b
+bc
+c3
+08
+c8
+42
+20
+40
+03
+65
+20
+40
+3e
+28
+20
+34
+48
+45
+6f
+e4
+4b
+bc
+c2
+98
+02
+99
+c3
+18
+c8
+4b
+20
+40
+41
+50
+1a
+21
+7e
+07
+68
+48
+cb
+dc
+98
+46
+7c
+00
+20
+22
+84
+cd
+20
+20
+48
+4b
+6f
+e0
+c8
+68
+20
+40
+16
+37
+6f
+e2
+48
+3f
+98
+00
+12
+00
+20
+40
+21
+81
+20
+40
+21
+f5
+79
+20
+2a
+00
+78
+2e
+fc
+00
+78
+30
+7c
+00
+78
+50
+fc
+00
+20
+40
+4d
+13
+78
+5d
+7c
+00
+c5
+17
+a2
+29
+c5
+16
+82
+c0
+19
+31
+7e
+00
+1f
+ec
+fe
+00
+1f
+f1
+fe
+00
+08
+00
+86
+28
+c5
+17
+a2
+10
+20
+20
+22
+10
+6f
+e0
+c1
+f0
+1f
+e3
+72
+00
+20
+00
+00
+02
+c2
+00
+02
+c2
+19
+31
+7e
+00
+1f
+ec
+fe
+00
+1f
+f1
+84
+00
+18
+42
+7e
+00
+08
+00
+86
+08
+18
+42
+7e
+00
+08
+00
+86
+28
+20
+20
+02
+be
+20
+40
+3e
+dc
+20
+40
+03
+18
+20
+40
+22
+e1
+20
+40
+25
+5f
+20
+40
+02
+e0
+20
+40
+03
+31
+20
+40
+02
+e5
+20
+40
+40
+bc
+20
+40
+04
+40
+20
+40
+03
+77
+20
+40
+45
+3f
+20
+40
+03
+8e
+20
+40
+45
+52
+20
+40
+03
+92
+20
+40
+45
+55
+20
+40
+03
+95
+20
+40
+45
+75
+20
+40
+40
+62
+20
+40
+03
+ad
+20
+20
+03
+98
+da
+60
+48
+c8
+da
+40
+02
+e3
+20
+20
+31
+fc
+20
+40
+03
+a9
+20
+20
+48
+0e
+6f
+e0
+cc
+bf
+20
+7a
+00
+00
+6f
+e0
+cc
+c1
+1f
+e0
+fe
+01
+67
+e0
+cc
+c1
+c0
+01
+82
+ed
+c0
+03
+02
+f1
+20
+60
+00
+00
+6f
+e0
+cc
+b5
+c2
+80
+03
+44
+68
+48
+cc
+bc
+20
+20
+61
+0d
+70
+4c
+c1
+00
+6f
+e0
+cc
+c0
+1f
+e0
+ff
+ff
+67
+e0
+cc
+c0
+24
+3a
+02
+f7
+70
+4c
+bf
+00
+6f
+e0
+cc
+b5
+c2
+80
+03
+4a
+68
+48
+cc
+bc
+20
+20
+61
+09
+70
+48
+fa
+00
+20
+40
+61
+66
+20
+40
+61
+8d
+67
+e1
+48
+ed
+6f
+e0
+c4
+a2
+c0
+81
+03
+07
+68
+49
+48
+ed
+18
+4f
+fe
+08
+1f
+e6
+fc
+0a
+20
+40
+7e
+61
+98
+40
+fe
+00
+67
+e1
+48
+ed
+da
+20
+48
+e7
+20
+40
+3f
+1a
+6f
+e0
+c4
+a6
+c2
+80
+bf
+5e
+c3
+00
+03
+0e
+70
+48
+fe
+01
+20
+20
+3f
+10
+d8
+e0
+00
+04
+20
+40
+47
+32
+70
+48
+fc
+0c
+6f
+e0
+c8
+fe
+20
+7a
+00
+00
+70
+48
+fe
+00
+6f
+e0
+cc
+b5
+c2
+80
+83
+4a
+68
+48
+cc
+bd
+20
+20
+61
+09
+6f
+e0
+cc
+be
+20
+7a
+00
+00
+6f
+e4
+4b
+bc
+c4
+02
+00
+00
+6f
+e0
+c8
+fc
+1f
+e0
+fe
+01
+67
+e0
+c8
+fc
+1f
+e6
+7c
+14
+24
+41
+03
+27
+1f
+e6
+7c
+0a
+20
+21
+03
+14
+6f
+e0
+cc
+b5
+c2
+80
+83
+44
+68
+48
+cc
+bd
+20
+20
+61
+0d
+70
+48
+fc
+01
+20
+60
+00
+00
+70
+4c
+b1
+00
+70
+4c
+bf
+00
+70
+4c
+c1
+00
+20
+40
+03
+56
+20
+40
+03
+58
+20
+40
+03
+5a
+20
+40
+02
+f7
+20
+20
+03
+14
+6f
+e0
+cc
+b1
+20
+7a
+00
+00
+6f
+e0
+cc
+b2
+c0
+00
+83
+3e
+6f
+e0
+cc
+b6
+20
+3a
+03
+3a
+1f
+e0
+ff
+ff
+67
+e0
+cc
+b6
+20
+20
+03
+44
+70
+4c
+be
+01
+70
+4c
+b6
+00
+70
+4c
+b1
+00
+20
+20
+03
+4a
+da
+60
+4c
+b8
+da
+40
+03
+41
+20
+20
+31
+fc
+20
+40
+03
+5c
+6f
+e0
+cc
+b3
+c0
+00
+83
+4a
+70
+4c
+b3
+01
+6f
+e0
+c9
+3d
+c0
+00
+03
+50
+c0
+00
+83
+52
+c0
+01
+03
+54
+20
+60
+00
+00
+70
+4c
+b3
+00
+6f
+e0
+c9
+3d
+c0
+00
+03
+56
+c0
+00
+83
+58
+c0
+01
+03
+5a
+20
+60
+00
+00
+68
+48
+cc
+b9
+20
+20
+61
+0d
+68
+48
+cc
+ba
+20
+20
+61
+0d
+68
+48
+cc
+bb
+20
+20
+61
+0d
+68
+48
+cc
+b9
+20
+20
+61
+09
+68
+48
+cc
+ba
+20
+20
+61
+09
+68
+48
+cc
+bb
+20
+20
+61
+09
+6f
+e0
+cc
+b7
+67
+e0
+cc
+b8
+20
+60
+00
+00
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+70
+4c
+b6
+14
+70
+4c
+b2
+00
+70
+4c
+b1
+01
+20
+60
+00
+00
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+70
+4c
+b7
+02
+70
+4c
+b3
+00
+70
+4c
+b8
+03
+70
+4c
+b1
+01
+70
+4c
+b2
+01
+20
+20
+03
+44
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+70
+4c
+b7
+02
+20
+20
+03
+68
+6f
+e0
+cc
+b0
+20
+7a
+00
+00
+6f
+e0
+cc
+b4
+20
+7a
+00
+00
+70
+4c
+b7
+05
+20
+20
+03
+68
+6f
+e0
+c9
+3d
+c0
+00
+03
+7d
+6f
+e4
+4b
+bc
+c4
+1a
+80
+00
+68
+48
+cb
+db
+20
+20
+03
+80
+6f
+e4
+4b
+bc
+c4
+19
+00
+00
+68
+48
+cb
+dc
+60
+48
+cb
+ae
+20
+40
+41
+55
+1f
+e1
+7e
+07
+68
+48
+cb
+ae
+98
+46
+7c
+00
+20
+22
+83
+87
+20
+20
+45
+2b
+20
+40
+03
+8c
+6f
+e0
+cb
+b0
+c1
+00
+80
+00
+70
+4b
+b0
+01
+20
+60
+00
+00
+da
+40
+04
+cd
+20
+20
+45
+37
+da
+60
+4b
+88
+da
+40
+45
+4a
+20
+40
+31
+fc
+20
+20
+45
+47
+6f
+e4
+4b
+bc
+c3
+9d
+80
+00
+20
+20
+45
+5f
+da
+60
+4c
+70
+da
+40
+43
+ac
+20
+20
+31
+fc
+da
+60
+4a
+c3
+da
+40
+03
+9b
+20
+20
+32
+03
+6f
+e0
+c9
+2f
+c3
+83
+80
+00
+6f
+e0
+c9
+3d
+c0
+80
+43
+5b
+70
+48
+a9
+00
+20
+40
+26
+59
+5f
+ff
+ff
+ff
+67
+e2
+48
+5f
+58
+00
+00
+00
+67
+e3
+c8
+d4
+70
+4b
+f2
+01
+20
+40
+03
+e9
+20
+40
+03
+a9
+20
+20
+04
+a8
+6f
+e4
+4b
+bc
+c2
+8c
+a6
+d7
+c2
+8d
+26
+d7
+20
+60
+00
+00
+da
+60
+49
+c4
+da
+40
+03
+b0
+20
+20
+31
+fc
+20
+40
+03
+b7
+20
+40
+46
+31
+20
+40
+03
+bb
+6f
+e0
+ca
+d6
+20
+7a
+00
+00
+20
+40
+00
+b7
+20
+20
+46
+fe
+68
+48
+c9
+23
+20
+40
+3f
+96
+68
+48
+c9
+24
+20
+20
+3f
+96
+68
+48
+c4
+b7
+20
+40
+3f
+96
+68
+48
+c4
+ba
+20
+40
+3f
+96
+68
+48
+c4
+b8
+20
+40
+3f
+96
+68
+48
+c4
+b9
+20
+20
+3f
+96
+6f
+e4
+4b
+bc
+c2
+89
+c6
+7f
+20
+40
+5d
+af
+20
+40
+46
+4a
+20
+40
+46
+5f
+20
+40
+5d
+b4
+20
+20
+46
+46
+20
+40
+3f
+a5
+20
+75
+80
+00
+20
+40
+42
+76
+20
+40
+41
+f5
+c0
+18
+03
+d4
+c0
+18
+c2
+57
+c0
+2c
+03
+d8
+20
+40
+41
+f2
+20
+00
+1a
+f4
+20
+20
+03
+cd
+6f
+e0
+c9
+c7
+1f
+e1
+7e
+f0
+c0
+60
+42
+5e
+20
+20
+41
+fc
+6f
+e0
+c9
+c7
+c0
+2b
+83
+dc
+c0
+2c
+c2
+64
+20
+20
+03
+cd
+70
+49
+2c
+0c
+da
+60
+4c
+74
+20
+20
+03
+e4
+20
+40
+3f
+a5
+6f
+e0
+c9
+2c
+c0
+05
+83
+e6
+20
+40
+42
+72
+da
+60
+4a
+b4
+20
+40
+42
+6b
+20
+20
+04
+61
+20
+40
+03
+f9
+da
+60
+4b
+f5
+20
+20
+03
+e4
+20
+40
+41
+e7
+20
+40
+3f
+a5
+6f
+e0
+c9
+2c
+c0
+05
+83
+ee
+20
+20
+42
+7e
+58
+00
+1f
+06
+20
+20
+5d
+5e
+58
+00
+00
+06
+20
+40
+5d
+65
+c2
+81
+be
+5d
+20
+40
+03
+f6
+20
+40
+03
+e9
+20
+20
+3e
+5d
+6f
+e0
+c9
+2c
+c0
+05
+83
+f9
+20
+20
+42
+72
+58
+00
+97
+06
+20
+20
+42
+73
+20
+40
+43
+29
+20
+40
+7f
+52
+20
+40
+40
+55
+68
+48
+c9
+14
+20
+40
+61
+0d
+68
+48
+c9
+14
+20
+40
+60
+e6
+6f
+e0
+c9
+24
+20
+40
+06
+12
+20
+40
+3e
+80
+20
+40
+3e
+72
+d8
+40
+00
+01
+20
+40
+61
+0d
+d8
+40
+00
+13
+20
+40
+3f
+96
+20
+40
+03
+2c
+20
+40
+04
+0f
+20
+40
+04
+13
+d8
+40
+00
+00
+20
+20
+60
+e6
+6f
+e0
+c9
+22
+c1
+7f
+80
+00
+68
+48
+c9
+22
+20
+20
+61
+21
+6f
+e4
+4b
+bc
+c4
+1e
+00
+00
+68
+48
+c9
+17
+20
+40
+60
+e6
+68
+48
+c9
+18
+20
+40
+60
+e6
+68
+48
+c9
+17
+20
+40
+3f
+94
+68
+48
+c9
+18
+20
+20
+3f
+94
+20
+40
+7f
+52
+20
+20
+15
+5d
+68
+48
+c9
+17
+20
+40
+60
+f4
+68
+48
+c9
+18
+20
+40
+60
+f4
+20
+20
+3e
+81
+20
+40
+49
+dd
+20
+40
+79
+a1
+20
+40
+04
+43
+20
+40
+04
+2c
+20
+40
+04
+2f
+20
+40
+47
+14
+20
+40
+3f
+c8
+20
+60
+00
+00
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+20
+20
+46
+93
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+6f
+e4
+4b
+bc
+c4
+15
+00
+00
+68
+48
+c9
+22
+20
+40
+3f
+96
+68
+48
+c9
+22
+20
+40
+60
+fd
+20
+20
+c6
+ef
+6f
+e0
+c9
+3d
+c1
+00
+80
+00
+70
+49
+3d
+01
+20
+20
+46
+fe
+6f
+e0
+c9
+3d
+c1
+00
+00
+00
+70
+49
+3d
+00
+20
+20
+46
+fe
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+20
+20
+45
+0c
+6f
+e4
+4b
+bc
+c2
+97
+40
+76
+6f
+e0
+c9
+13
+c1
+7f
+80
+00
+da
+20
+00
+00
+70
+4b
+a7
+05
+68
+48
+c9
+13
+20
+40
+04
+4c
+20
+20
+40
+6f
+6f
+e4
+4b
+bc
+c2
+96
+40
+88
+6f
+e0
+cb
+a4
+1f
+e2
+26
+00
+6f
+e0
+c9
+14
+c0
+7f
+84
+53
+20
+20
+40
+7f
+6f
+e0
+c9
+13
+20
+40
+06
+15
+68
+48
+c9
+13
+20
+20
+41
+d5
+20
+40
+40
+b2
+20
+74
+00
+00
+6f
+e0
+c9
+97
+1f
+e0
+fe
+01
+1f
+e1
+7e
+03
+67
+e0
+c9
+97
+20
+40
+04
+60
+20
+40
+04
+64
+20
+20
+46
+2e
+20
+40
+40
+cf
+6f
+e0
+c9
+2c
+c0
+06
+40
+fb
+20
+20
+40
+d8
+6f
+e0
+cc
+be
+20
+7a
+00
+00
+6f
+e0
+c9
+97
+c0
+00
+04
+6d
+c0
+00
+84
+6f
+c0
+01
+04
+6b
+20
+60
+00
+00
+58
+00
+00
+01
+20
+20
+04
+70
+58
+00
+00
+02
+20
+20
+04
+70
+58
+00
+00
+03
+67
+e0
+cc
+c0
+70
+4c
+bf
+01
+20
+60
+00
+00
+1a
+62
+7e
+00
+c0
+1e
+04
+8a
+c0
+1c
+84
+86
+c0
+1d
+04
+9a
+c0
+19
+04
+d0
+c0
+0a
+84
+dc
+c0
+0a
+04
+e5
+c0
+20
+04
+d7
+c0
+01
+04
+7d
+20
+20
+43
+76
+70
+4b
+90
+00
+70
+4b
+99
+00
+20
+40
+44
+33
+20
+40
+44
+49
+6f
+e0
+cc
+af
+24
+7a
+00
+00
+20
+20
+44
+42
+20
+40
+01
+5c
+20
+20
+01
+28
+20
+40
+04
+84
+20
+40
+45
+84
+20
+40
+03
+5f
+20
+20
+48
+96
+6f
+e2
+48
+3f
+67
+e2
+48
+95
+67
+e2
+49
+98
+20
+40
+25
+87
+20
+40
+45
+84
+20
+40
+43
+0a
+70
+4a
+bf
+00
+70
+48
+a5
+00
+70
+48
+8f
+00
+6f
+e2
+48
+95
+68
+4a
+48
+91
+98
+46
+7c
+00
+20
+62
+80
+00
+20
+40
+03
+5f
+20
+40
+04
+84
+20
+20
+48
+61
+70
+4c
+be
+00
+20
+40
+04
+84
+6f
+e0
+c8
+a9
+24
+3a
+03
+9f
+6f
+e0
+c8
+8f
+c0
+01
+04
+c0
+c0
+00
+84
+c0
+c0
+02
+c8
+83
+20
+20
+48
+76
+6f
+e0
+c8
+ab
+20
+5a
+04
+b2
+6f
+e0
+c8
+c1
+c1
+00
+80
+00
+20
+40
+26
+a6
+20
+40
+26
+c2
+24
+74
+00
+00
+20
+40
+26
+cb
+70
+4c
+31
+00
+70
+4c
+32
+01
+20
+40
+01
+14
+6f
+e0
+cb
+f2
+24
+5a
+3e
+6a
+6f
+e2
+48
+5f
+20
+20
+26
+bf
+70
+48
+39
+01
+70
+48
+ab
+01
+20
+40
+26
+49
+67
+e0
+c7
+c9
+58
+00
+00
+00
+67
+e3
+c7
+ca
+6f
+e2
+48
+ad
+67
+e2
+47
+d1
+70
+48
+38
+0c
+6f
+e0
+c8
+39
+79
+20
+7e
+03
+67
+e0
+c8
+39
+20
+40
+22
+47
+20
+20
+01
+63
+6f
+e4
+4b
+bc
+c2
+97
+84
+c9
+c2
+98
+04
+c9
+c3
+1d
+48
+45
+6f
+e2
+49
+98
+68
+4a
+49
+79
+98
+46
+7c
+00
+20
+22
+84
+cd
+20
+20
+48
+45
+6f
+e1
+48
+85
+67
+e1
+48
+8b
+70
+48
+8f
+05
+20
+20
+25
+62
+70
+48
+8f
+00
+20
+40
+03
+65
+20
+20
+48
+66
+6f
+e0
+ca
+d8
+c0
+00
+84
+d4
+70
+4b
+87
+14
+20
+20
+43
+b3
+20
+40
+43
+ac
+70
+4b
+87
+0a
+20
+20
+43
+b3
+6f
+e0
+cc
+6f
+24
+7a
+00
+00
+70
+4c
+6f
+01
+70
+4c
+70
+1e
+20
+60
+00
+00
+58
+00
+00
+00
+67
+e1
+4b
+03
+67
+e0
+cc
+6f
+67
+e0
+cc
+70
+67
+e0
+ca
+d7
+70
+4b
+05
+00
+70
+4a
+bd
+00
+20
+40
+1a
+c8
+20
+20
+04
+7d
+20
+40
+03
+5f
+20
+20
+43
+90
+70
+48
+8f
+00
+6f
+e1
+4b
+fd
+1f
+e0
+fe
+01
+67
+e1
+4b
+fd
+6f
+e0
+cb
+fd
+1f
+e1
+7e
+ff
+c0
+00
+04
+ef
+20
+60
+00
+00
+6f
+e0
+c8
+83
+c0
+7f
+a3
+44
+c0
+00
+84
+f6
+c0
+01
+04
+f8
+c0
+01
+84
+fe
+c0
+02
+05
+04
+20
+60
+00
+00
+70
+47
+c9
+ff
+20
+20
+05
+05
+6f
+e0
+c8
+5e
+20
+3a
+04
+fc
+6f
+e2
+48
+ad
+20
+40
+22
+92
+70
+47
+c9
+aa
+20
+20
+05
+05
+70
+47
+c9
+55
+6f
+e0
+c8
+5e
+20
+3a
+05
+05
+6f
+e2
+48
+95
+67
+e2
+47
+cb
+20
+20
+05
+07
+70
+47
+c9
+22
+6f
+e2
+48
+ad
+67
+e2
+47
+cb
+6f
+e0
+c8
+39
+1f
+e1
+7e
+07
+67
+e0
+c7
+ca
+70
+47
+cf
+00
+70
+48
+38
+07
+20
+40
+22
+47
+20
+40
+02
+02
+20
+20
+23
+16
+6f
+e0
+c8
+83
+c1
+7f
+80
+00
+c0
+01
+05
+13
+20
+20
+23
+1d
+6f
+e0
+c8
+5e
+20
+3a
+23
+2d
+6f
+e2
+48
+0f
+20
+7a
+00
+00
+67
+e2
+48
+95
+20
+20
+23
+2d
+6f
+e1
+48
+8d
+d8
+40
+01
+f8
+98
+41
+7e
+00
+20
+3a
+05
+24
+6f
+e1
+48
+8d
+1f
+e0
+fe
+01
+67
+e1
+48
+8d
+20
+60
+00
+00
+6f
+e4
+4b
+bc
+c2
+98
+22
+e4
+20
+20
+25
+77
+20
+40
+25
+a3
+20
+40
+02
+02
+24
+2c
+05
+42
+24
+37
+85
+42
+20
+40
+26
+79
+6f
+e0
+c8
+2d
+20
+3a
+05
+3b
+6f
+e2
+48
+7b
+68
+4a
+48
+3f
+98
+46
+7c
+00
+20
+22
+85
+21
+6f
+e2
+48
+ad
+68
+4a
+48
+3f
+98
+46
+7c
+00
+20
+42
+85
+3e
+6f
+e0
+c8
+a5
+79
+3f
+fe
+02
+67
+e0
+c8
+a5
+58
+00
+00
+00
+67
+e1
+48
+87
+67
+e1
+48
+8d
+67
+e1
+48
+8b
+20
+20
+25
+9e
+6f
+e2
+48
+0f
+20
+7a
+00
+00
+20
+20
+05
+2b
+6f
+e2
+48
+0f
+20
+7a
+00
+00
+67
+e2
+48
+95
+20
+20
+25
+87
+6f
+e0
+c8
+90
+20
+3a
+22
+81
+6f
+e1
+48
+8d
+1f
+e0
+fe
+01
+67
+e1
+48
+8d
+2f
+ef
+fe
+09
+6f
+e0
+c8
+8f
+c0
+02
+85
+4d
+c0
+02
+05
+56
+c0
+01
+05
+53
+20
+20
+25
+b1
+20
+20
+a5
+77
+20
+20
+22
+ef
+20
+20
+a5
+77
+20
+20
+25
+6f
+20
+20
+a5
+77
+20
+20
+22
+ef
+20
+20
+a5
+7e
+70
+41
+e8
+aa
+20
+20
+25
+71
+20
+20
+a5
+7e
+20
+20
+22
+ef
+6f
+e0
+cb
+bb
+24
+3a
+7e
+c7
+78
+34
+7c
+00
+20
+40
+14
+36
+6f
+e1
+c1
+74
+20
+3a
+7e
+c7
+6f
+e0
+c0
+99
+20
+3a
+7e
+c7
+6f
+e0
+c8
+c1
+c0
+00
+fe
+c7
+20
+60
+00
+00
+20
+40
+03
+6d
+6f
+e1
+47
+8f
+2f
+ef
+fe
+0b
+20
+40
+c5
+c1
+6f
+e1
+47
+8f
+2f
+ef
+fe
+07
+20
+40
+c3
+62
+58
+00
+00
+00
+67
+e1
+4b
+03
+20
+20
+45
+94
+58
+00
+00
+00
+67
+e1
+4a
+d3
+20
+20
+45
+b7
+6f
+e0
+cb
+f4
+24
+5a
+78
+cc
+70
+4b
+f4
+00
+20
+20
+78
+bc
+18
+42
+7e
+00
+c2
+80
+16
+51
+c2
+80
+85
+78
+20
+20
+16
+3c
+20
+40
+16
+40
+20
+40
+05
+7e
+70
+8a
+6d
+89
+20
+60
+00
+00
+20
+40
+05
+7e
+20
+20
+0e
+7d
+6f
+e4
+4b
+bc
+c2
+8c
+85
+82
+c2
+8d
+05
+82
+20
+60
+00
+00
+70
+89
+30
+02
+20
+60
+00
+00
+6f
+e0
+c3
+dd
+1f
+e0
+fe
+01
+67
+e0
+c3
+dd
+c0
+06
+16
+06
+20
+40
+18
+c7
+20
+40
+19
+16
+6f
+e0
+82
+bd
+20
+40
+16
+37
+20
+40
+17
+e4
+20
+20
+16
+01
+20
+40
+0e
+7c
+20
+20
+16
+0d
+ef
+e1
+00
+06
+c0
+02
+05
+93
+20
+20
+19
+90
+ef
+e1
+80
+06
+67
+e1
+c4
+36
+c0
+05
+05
+98
+c0
+09
+05
+a7
+20
+20
+1c
+7f
+6f
+e4
+4b
+bc
+c3
+1d
+9d
+93
+20
+40
+1e
+39
+68
+49
+44
+37
+6f
+e0
+c3
+c0
+c2
+81
+85
+a2
+6f
+e1
+44
+37
+c0
+18
+1e
+74
+68
+49
+44
+37
+20
+20
+1d
+97
+6f
+e1
+43
+d1
+98
+46
+7c
+00
+24
+22
+85
+9e
+24
+34
+05
+9e
+20
+20
+1d
+bc
+18
+c2
+22
+00
+6f
+e1
+43
+d4
+1f
+e0
+a5
+fd
+20
+40
+19
+d1
+6f
+e0
+ca
+d2
+c0
+7f
+9e
+1f
+6f
+e0
+ca
+d8
+20
+3a
+1e
+1f
+6f
+e0
+cb
+86
+c2
+80
+9e
+1f
+58
+00
+00
+1a
+68
+49
+44
+37
+98
+46
+7c
+00
+24
+22
+9e
+1f
+20
+20
+1d
+bc
+78
+54
+7c
+00
+58
+00
+00
+00
+67
+e3
+48
+d5
+20
+40
+05
+c6
+58
+00
+00
+89
+20
+40
+5d
+5e
+20
+40
+04
+61
+20
+40
+3f
+be
+20
+40
+3f
+c3
+20
+40
+05
+df
+6f
+e0
+c8
+d4
+1f
+e1
+7e
+1f
+67
+e0
+c8
+d4
+24
+34
+47
+66
+20
+40
+05
+d6
+20
+20
+45
+84
+6f
+e0
+c4
+ae
+c1
+80
+00
+00
+6f
+e0
+c9
+2c
+c0
+06
+05
+cc
+c0
+05
+85
+cc
+20
+20
+42
+83
+20
+40
+43
+04
+6f
+e0
+c9
+15
+c0
+7f
+85
+d2
+68
+48
+c9
+15
+20
+40
+60
+fd
+24
+60
+80
+00
+58
+00
+00
+00
+20
+40
+5d
+65
+c0
+ac
+41
+f2
+20
+20
+42
+b9
+6f
+e4
+4b
+bc
+c3
+8c
+80
+00
+c3
+8d
+00
+00
+c3
+8f
+80
+00
+6f
+e0
+c9
+2c
+c1
+01
+80
+00
+c1
+05
+80
+00
+20
+40
+47
+58
+20
+60
+00
+00
+20
+40
+05
+e2
+20
+40
+41
+2d
+20
+20
+41
+1e
+6f
+e0
+cb
+f2
+24
+5a
+41
+61
+da
+20
+00
+00
+20
+40
+05
+e9
+20
+40
+05
+f8
+20
+40
+06
+05
+20
+20
+41
+5e
+6f
+e0
+c9
+1c
+20
+40
+06
+12
+20
+40
+41
+64
+68
+48
+c9
+1c
+20
+40
+3f
+96
+6f
+e0
+c9
+1d
+20
+40
+06
+12
+20
+40
+41
+6a
+68
+48
+c9
+1d
+20
+40
+3f
+96
+6f
+e0
+c9
+1e
+20
+40
+06
+12
+20
+40
+41
+70
+68
+48
+c9
+1e
+20
+20
+3f
+96
+6f
+e0
+c9
+11
+c1
+7f
+80
+00
+70
+4b
+a7
+03
+6f
+e0
+cb
+a2
+1f
+e2
+26
+00
+68
+48
+c9
+11
+6f
+e0
+c9
+14
+c0
+7f
+86
+01
+20
+20
+41
+7e
+6f
+e0
+c9
+11
+20
+40
+06
+15
+68
+48
+c9
+11
+20
+20
+41
+8b
+6f
+e0
+c9
+12
+c1
+7f
+80
+00
+70
+4b
+a7
+04
+6f
+e0
+cb
+a3
+1f
+e2
+26
+00
+68
+48
+c9
+12
+6f
+e0
+c9
+14
+c0
+7f
+86
+0e
+20
+20
+41
+97
+6f
+e0
+c9
+12
+20
+40
+06
+15
+68
+48
+c9
+12
+20
+20
+41
+a4
+c1
+7f
+80
+00
+d8
+40
+00
+3f
+20
+20
+61
+2c
+c1
+7f
+80
+00
+d8
+40
+00
+3e
+20
+20
+61
+2c
+68
+48
+cc
+c2
+18
+51
+84
+00
+6f
+e0
+cc
+c7
+98
+46
+7c
+00
+20
+22
+86
+3a
+60
+48
+cc
+c7
+18
+40
+84
+01
+58
+00
+01
+00
+98
+4f
+84
+00
+6f
+e1
+cc
+c8
+98
+46
+7e
+00
+68
+49
+cc
+cb
+98
+40
+fe
+00
+67
+e1
+cc
+ce
+20
+40
+06
+3c
+20
+40
+03
+b7
+20
+40
+5e
+18
+6f
+e1
+cc
+ce
+d8
+40
+01
+00
+da
+20
+1f
+00
+20
+40
+5d
+d2
+20
+40
+06
+3f
+24
+22
+86
+26
+20
+40
+03
+bb
+6f
+e2
+1f
+00
+68
+4a
+4c
+d1
+98
+46
+7c
+00
+24
+22
+86
+26
+58
+00
+1f
+00
+67
+e1
+41
+a6
+70
+41
+a8
+40
+20
+40
+5c
+a3
+58
+00
+00
+00
+67
+e2
+41
+a6
+6f
+e0
+cc
+c2
+20
+20
+00
+01
+d8
+a0
+1f
+00
+df
+20
+01
+00
+20
+20
+7d
+9b
+d8
+c0
+1f
+00
+da
+20
+00
+00
+df
+20
+00
+3f
+ef
+e2
+00
+06
+9a
+20
+a2
+00
+c2
+00
+06
+42
+ef
+e2
+00
+06
+9a
+26
+7c
+00
+20
+60
+00
+00
+86
+e9
+aa
+55
+40
+00
+00
+40
+01
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+04
+00
+00
+00
+0c
+0c
+00
+00
+00
+20
+00
+00
+48
+eb
+2d
+77
+03
+00
+00
+00
+00
+00
+00
+80
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+20
+00
+00
+80
+42
+00
+00
+40
+00
+00
+00
+60
+0e
+16
+00
+00
+aa
+55
+01
+00
+9a
+40
+08
+aa
+55
+03
+00
+7a
+41
+88
+12
+ce
+aa
+55
+01
+00
+c5
+40
+18
+aa
+55
+01
+00
+ef
+41
+ff
+aa
+55
+02
+00
+ca
+40
+ef
+41
+aa
+55
+01
+00
+7d
+41
+38
+aa
+55
+01
+00
+d2
+44
+00
+aa
+55
+05
+00
+ea
+41
+ff
+04
+00
+00
+08
+aa
+55
+08
+00
+bc
+4b
+04
+09
+46
+02
+00
+22
+01
+1c
+aa
+55
+0c
+00
+02
+49
+b0
+04
+58
+02
+64
+64
+95
+75
+85
+63
+75
+80
+aa
+55
+08
+00
+11
+49
+02
+0f
+0e
+ff
+03
+ff
+06
+04
+aa
+55
+0b
+00
+1a
+49
+ff
+ff
+02
+0f
+0e
+00
+ff
+ff
+ff
+05
+07
+aa
+55
+03
+00
+29
+49
+00
+00
+00
+aa
+55
+01
+00
+b0
+4c
+01
+aa
+55
+01
+00
+b5
+4c
+00
+aa
+55
+01
+00
+b4
+4c
+01
+aa
+55
+05
+00
+b9
+4c
+8a
+8d
+ff
+ff
+81
+aa
+55
+03
+00
+13
+4c
+ff
+58
+02
+aa
+55
+12
+00
+dd
+4b
+00
+05
+00
+04
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+aa
+55
+01
+00
+99
+40
+01
+aa
+55
+02
+00
+c4
+4b
+03
+02
+aa
+55
+08
+00
+3d
+49
+00
+34
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+07
+00
+5b
+49
+34
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+17
+00
+78
+49
+33
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+0b
+00
+c6
+4b
+00
+40
+0a
+60
+06
+0a
+00
+64
+00
+70
+17
+aa
+55
+02
+00
+db
+4b
+07
+05
+aa
+55
+01
+00
+c5
+49
+01
+aa
+55
+01
+00
+01
+49
+02
+aa
+55
+01
+00
+a3
+44
+05
+aa
+55
+06
+00
+e7
+48
+0f
+01
+a2
+00
+b4
+00
+aa
+55
+01
+00
+fb
+48
+0a
+aa
+55
+03
+00
+ef
+4b
+00
+00
+00
+aa
+55
+01
+00
+bc
+4a
+ff
+aa
+55
+01
+00
+f4
+4b
+01
+aa
+55
+01
+00
+77
+41
+20
+aa
+55
+01
+00
+9b
+4b
+20
+aa
+55
+01
+00
+7f
+44
+06
+aa
+55
+06
+00
+a8
+40
+19
+36
+11
+52
+08
+53
+aa
+55
+0c
+00
+ff
+45
+0b
+42
+54
+33
+2e
+30
+20
+4d
+6f
+75
+73
+65
+aa
+55
+05
+00
+55
+44
+0e
+00
+01
+00
+02
+aa
+55
+01
+00
+44
+46
+0a
+aa
+55
+01
+00
+67
+47
+01
+aa
+55
+01
+00
+7b
+46
+00
+aa
+55
+01
+00
+5f
+41
+00
+aa
+55
+03
+00
+68
+47
+03
+00
+04
+aa
+55
+01
+00
+91
+47
+01
+aa
+55
+01
+00
+d8
+40
+01
+aa
+55
+0c
+00
+e7
+43
+1f
+02
+01
+05
+03
+03
+12
+18
+03
+19
+c2
+03
+aa
+55
+14
+00
+e3
+4a
+06
+ff
+06
+00
+03
+00
+80
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0e
+00
+07
+44
+1f
+0c
+09
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0c
+00
+f7
+42
+0b
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+0c
+00
+ff
+4b
+0b
+42
+54
+35
+2e
+32
+20
+4d
+6f
+75
+73
+65
+aa
+55
+06
+00
+7a
+43
+03
+b1
+2a
+4e
+8e
+ed
+aa
+55
+08
+00
+72
+43
+06
+00
+09
+00
+20
+00
+2c
+01
+aa
+55
+06
+00
+dd
+4a
+03
+12
+18
+ff
+00
+00
+aa
+55
+04
+00
+28
+44
+00
+00
+00
+00
+aa
+55
+01
+00
+32
+44
+07
+aa
+55
+08
+00
+4c
+44
+fb
+00
+48
+08
+fb
+00
+48
+08
+aa
+55
+02
+00
+f8
+4a
+15
+00
+aa
+55
+02
+00
+57
+43
+19
+00
+aa
+55
+06
+00
+fa
+4a
+1d
+00
+21
+00
+30
+00
+aa
+55
+02
+00
+d1
+43
+2d
+00
+aa
+55
+01
+00
+01
+4b
+96
+aa
+55
+01
+00
+88
+44
+ff
+aa
+55
+0c
+00
+d5
+49
+03
+04
+01
+02
+20
+2a
+3f
+15
+14
+1b
+11
+0e
+aa
+55
+05
+00
+80
+4c
+2a
+35
+3f
+15
+20
+aa
+55
+74
+00
+e4
+49
+09
+5a
+26
+34
+19
+04
+09
+00
+ff
+ff
+09
+5a
+0d
+f0
+1d
+e3
+7d
+d2
+ff
+ff
+09
+5a
+0d
+10
+1d
+ed
+7d
+80
+ff
+ff
+1b
+35
+28
+b4
+29
+46
+2a
+96
+2b
+8c
+2c
+6e
+2d
+64
+38
+5f
+39
+0f
+3a
+32
+3b
+47
+42
+10
+ff
+ff
+54
+2e
+55
+f2
+61
+f4
+63
+70
+75
+52
+76
+41
+77
+ed
+78
+23
+79
+46
+7a
+e5
+7c
+48
+7e
+77
+7f
+01
+0b
+00
+7f
+00
+09
+00
+ff
+ff
+09
+5a
+ff
+27
+ab
+40
+be
+d1
+a0
+41
+a1
+12
+a5
+84
+a7
+ff
+b5
+d0
+b6
+00
+ff
+00
+09
+00
+ff
+ff
+aa
+55
+40
+00
+64
+4a
+09
+5a
+0d
+10
+0e
+c5
+5b
+9a
+10
+38
+11
+42
+28
+28
+41
+23
+49
+39
+4a
+b0
+4b
+a0
+4c
+90
+4d
+70
+09
+00
+ff
+ff
+09
+5a
+06
+02
+09
+69
+0d
+48
+0e
+9f
+0f
+ba
+09
+00
+ff
+ff
+09
+a5
+26
+34
+19
+04
+60
+07
+69
+04
+7d
+20
+7e
+00
+09
+00
+ff
+ff
+aa
+55
+08
+00
+b4
+4a
+09
+5a
+0b
+f3
+09
+00
+ff
+ff
+aa
+55
+08
+00
+f5
+4b
+09
+a5
+0b
+f3
+09
+00
+ff
+ff
+aa
+55
+0c
+00
+74
+4c
+09
+a5
+46
+34
+6a
+c0
+69
+24
+09
+00
+ff
+ff
+aa
+55
+01
+00
+7a
+48
+01
+aa
+55
+01
+00
+68
+48
+02
+aa
+55
+01
+00
+67
+48
+02
+aa
+55
+01
+00
+39
+48
+01
+aa
+55
+01
+00
+ac
+48
+06
+aa
+55
+02
+00
+3b
+48
+c0
+12
+aa
+55
+03
+00
+57
+48
+19
+19
+1c
+aa
+55
+01
+00
+5e
+48
+00
+aa
+55
+05
+00
+7b
+48
+20
+15
+10
+05
+4e
+aa
+55
+05
+00
+90
+48
+01
+0f
+0f
+0f
+0f
+aa
+55
+06
+00
+b1
+48
+0c
+f8
+00
+00
+77
+01
+aa
+55
+03
+00
+5f
+48
+00
+48
+60
+aa
+55
+01
+00
+81
+48
+0f
+aa
+55
+02
+00
+9d
+48
+37
+4c
+aa
+55
+01
+00
+ce
+48
+80
+aa
+55
+02
+00
+c6
+48
+14
+00
+aa
+55
+02
+00
+c4
+48
+50
+00
+aa
+55
+03
+00
+bc
+48
+00
+a6
+0e
+aa
+55
+03
+00
+bd
+49
+00
+50
+00
+aa
+55
+02
+00
+7b
+44
+80
+1f
+aa
+55
+01
+00
+85
+44
+80
+aa
+55
+01
+00
+e8
+41
+0a
+aa
+55
+01
+00
+2a
+4c
+10
+aa
+55
+04
+00
+c7
+4c
+ff
+00
+00
+00
+aa
+55
+04
+00
+d1
+4c
+20
+20
+00
+40
+aa
+55
+02
+00
+8f
+44
+32
+49
+aa
+55
+01
+00
+8e
+44
+00
+aa
+55
+01
+00
+93
+47
+ff
+aa
+55
+01
+00
+92
+47
+1e
+aa
+55
+01
+00
+58
+0b
+ff
+aa
+55
+09
+00
+88
+4c
+01
+53
+31
+30
+10
+53
+31
+30
+30
+aa
+55
+01
+00
+87
+4c
+01
+aa
+55
+11
+00
+91
+4c
+10
+77
+69
+72
+65
+64
+5f
+6d
+6f
+73
+75
+65
+5f
+31
+33
+30
+38
+aa
+55
+01
+00
+2f
+49
+00
+aa
+55
+01
+00
+86
+4c
+ff
+aa
+55
+01
+00
+19
+49
+ff
+aa
+55
+02
+00
+26
+49
+ff
+ff
+aa
+55
+01
+00
+25
+49
+ff
+aa
+55
+01
+00
+28
+49
+ff
+aa
+55
+0a
+00
+d1
+4b
+14
+0a
+90
+01
+e8
+03
+90
+01
+64
+00
+aa
+55
+0a
+00
+ef
+48
+10
+00
+52
+00
+35
+00
+21
+00
+25
+00
+55
+aa
+aa
+55
+14
+a1
+e3
+4b
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+7e
+17
Index: mouse_public_3mode_usb/output/memmap.format
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/memmap.format	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/memmap.format	(working copy)
@@ -0,0 +1,2577 @@
+0x0000 mem_le_adv_transmit
+0x0001 mem_le_adv_waitcnt
+0x0002 mem_le_adv_rcv
+0x0003 mem_le_req_rcv
+0x0004 mem_le_scanrsp_rcv
+0x0005 mem_le_conn_rcv
+0x0006 mem_inquiryscan_waitcnt
+0x0007 mem_inquiryscan_rcvcnt
+0x0008 mem_pagescan_waitcnt
+0x0009 mem_pagescan_rcvcnt
+0x000a mem_pagescan_rcvfhscnt
+0x000b mem_slave_rcvcnt
+0x000c mem_page_transmit
+0x000d mem_page_rcv
+0x000e mem_page_rcv_fhs
+0x000f mem_master_rcvcnt
+0x0010 mem_fhs_wait_counter
+0x0011 mem_newconnto_counter
+0x0012 mem_inquiry_transmit
+0x0013 mem_inquiry_rcv
+0x0014 mem_fw_ver
+0x0015 mem_current_context
+0x0016 mem_le_ch_mapped
+0x0017 mem_last_freq
+0x0018 mem_rssi
+0x0019 mem_rx_type
+0x001a mem_rx_hec_err
+0x001c mem_rx_crc_err
+0x001e mem_context_ptr
+0x0020 mem_display
+0x0028 mem_bcd
+0x0030 mem_state
+0x0031 mem_mode
+0x0032 mem_tsniff
+0x0034 mem_sniff_anchor
+0x0038 mem_clk_offset
+0x003e mem_rx_window
+0x0040 mem_plap
+0x0043 mem_puap
+0x0044 mem_pnap
+0x0046 mem_conn_handle
+0x0047 mem_arq
+0x0048 mem_lmp_to_send
+0x0049 mem_lmi_opcode
+0x004a mem_lmo_reason
+0x004b mem_op
+0x004c mem_state_map
+0x004d mem_supervision_timer
+0x0051 mem_supervision_to
+0x0053 mem_name_offset
+0x0054 mem_key_size
+0x0055 mem_conn_sm
+0x0056 mem_aco
+0x0062 mem_kc
+0x0072 mem_conn_timer
+0x0073 mem_sniff_attempt
+0x0074 mem_sniff_timeout
+0x0075 mem_dsniff
+0x0077 mem_amaddr
+0x0078 mem_lmo_opcode1
+0x0079 mem_lmi_opcode1
+0x007a mem_lmo_reason1
+0x007b mem_lmo_tid1
+0x007c mem_lmo_opcode2
+0x007d mem_lmi_opcode2
+0x007e mem_lmo_reason2
+0x007f mem_lmo_tid2
+0x0080 mem_bt_context_reserve
+0x0088 mem_current_sniff_attempt
+0x0089 mem_current_sniff_timeout
+0x008a mem_nfreq_index_inq
+0x008b mem_nfreq_index_page
+0x008c mem_ninqy_index
+0x008d mem_fhs_misc
+0x008e mem_subsniff_instant
+0x0092 mem_subsniff_rate
+0x0093 mem_subsniff_tcmax
+0x0095 mem_subsniff_tsniff
+0x0096 mem_lpm_adjust
+0x0097 mem_sync_clke
+0x009d mem_lpm_current_mult
+0x009e mem_gpio_wakeup_low
+0x00a2 mem_gpio_wakeup_high
+0x00a6 mem_npage_index
+0x00a7 mem_page_mode
+0x00a8 mem_page_clk
+0x00ac mem_temp_am_addr
+0x00ad mem_temp_arq
+0x00ae mem_len
+0x00b0 mem_clkn_bt
+0x00b4 mem_clke_bt
+0x00b8 mem_dpll_clkn
+0x00bc mem_connection_options
+0x00bd mem_nameres_cnt
+0x00be mem_txptr
+0x00c0 mem_slot_offset
+0x00c2 extm_fhs_misc
+0x00c3 extm_newconn_am_addr
+0x00c4 extm_class
+0x00c7 extm_lap
+0x00ca extm_uap
+0x00cb extm_nap
+0x00ce mem_rxbuf
+0x00e3 mem_debug_config
+0x00e4 mem_lch_code
+0x00e5 mem_fhs_am_addr
+0x00e6 mem_select_list_item
+0x00e7 mem_temp_reconn_record
+0x00e7 mem_record_bt_mode
+0x00e8 mem_temp_lap
+0x00ee mem_list_item_ptr
+0x00f0 mem_eir
+0x0154 mem_rssi_hex
+0x0155 mem_param_tx_setup
+0x0157 mem_param_rf_setup
+0x0159 mem_param_conn_access
+0x015b mem_param_clke_cal
+0x015d mem_param_pll_setup
+0x015f mem_param_rx_setup
+0x0161 mem_param_dpll_start_delay
+0x0163 mem_param_rt_rthalfslot
+0x0165 mem_param_clke_cal_le_1m
+0x0167 mem_param_clke_cal_le_2m
+0x0169 mem_param_clke_cal_le_coded
+0x016b mem_le_rxbuf
+0x026f mem_le_mic
+0x0273 mem_le_peer_mic
+0x0277 mem_le_mrand
+0x0287 mem_le_state
+0x0288 mem_le_mode
+0x0289 mem_le_tsniff
+0x028b mem_le_anchor
+0x028f mem_le_clk_offset
+0x0295 mem_le_receive_window
+0x0297 mem_le_plap
+0x029d mem_le_conn_handle
+0x029e mem_le_arq
+0x029f mem_le_ch
+0x02a0 mem_le_hop
+0x02a1 mem_le_event_count
+0x02a3 mem_le_supervision_timer
+0x02a7 mem_le_instant
+0x02a9 mem_le_channels
+0x02aa mem_le_op
+0x02ab mem_le_access
+0x02af mem_le_crcinit
+0x02b2 mem_le_window_size
+0x02b3 mem_le_slave_latency
+0x02b5 mem_le_superto
+0x02b7 mem_le_channel_map
+0x02bc mem_le_rx_phy
+0x02bd mem_le_tx_phy
+0x02be mem_le_update_new_param
+0x02c7 mem_le_sk
+0x02d7 mem_le_peer_sca
+0x02d8 mem_le_err_code
+0x02d9 mem_le_ll_pairing_fail_reason
+0x02da mem_le_context_reserve
+0x02df mem_le_testtype
+0x02e0 mem_cmd_le_create_conn
+0x02e1 mem_ucode_status
+0x02e2 mem_spid_tbuf
+0x02e3 mem_iicd_tbuf
+0x02e3 mem_addr_hi
+0x02e4 mem_addr_mi
+0x02e5 mem_addr_lo
+0x02e6 mem_iicd_addr
+0x02e7 mem_spid_rbuf
+0x02eb mem_ucode_buf
+0x02ed mem_ucode_len
+0x02ef mem_sched_addr
+0x02f1 mem_ucode_ptr
+0x02f3 mem_ucode_keybuf
+0x0303 mem_spid2_tbuf
+0x0304 mem_addr_hi2
+0x0305 mem_addr_mi2
+0x0306 mem_addr_lo2
+0x0307 mem_spid2_rbuf
+0x030b mem_reconnect_flag
+0x030c mem_switch_fail_master_count
+0x030d mem_app_evt_timer_count
+0x030e mem_l2cap_mem_start
+0x030e mem_l2cap_rxbuff1_len
+0x0310 mem_l2cap_rxbuff2_len
+0x0312 mem_l2cap_rxbuff_new
+0x0314 mem_l2cap_rxbuff_inuse
+0x0315 mem_l2cap_payload_ptr
+0x0317 mem_l2cap_rx_pkt_length
+0x0319 mem_l2cap_rx_cid
+0x031b mem_l2cap_rx_done
+0x031c mem_l2cap_signal_tx_buff_ptr
+0x031e mem_l2cap_signal_tx_payload_ptr
+0x0320 mem_l2cap_signal_tx_length
+0x0322 mem_sdp_tx_buff_ptr
+0x0324 mem_sdp_tx_payload_ptr
+0x0326 mem_sdp_tx_pkt_length
+0x0328 mem_rfcomm_tx_buff_ptr
+0x032a mem_rfcomm_tx_payload_ptr
+0x032c mem_rfcomm_tx_pkt_length
+0x032e memL2CAP_T1
+0x0330 mem_CONTROL_tasks
+0x0331 mem_send_config_req
+0x0332 mem_config_identifier
+0x0333 mem_config_req_dest_CID
+0x0335 mem_rfcomm_malloc_fail_flag
+0x0336 mem_message_to_uppersm
+0x0337 mem_upper_sm_remote_page
+0x0338 mem_upper_sm_reconn
+0x0339 mem_upper_sm_ss
+0x033a mem_tx_malloc_log
+0x037a mem_l2cap_mem_end
+0x037a mem_scid
+0x037c mem_cmd_length
+0x037e mem_tt2
+0x0380 mem_tt3
+0x0382 mem_id
+0x0384 mem_psm
+0x0386 mem_l2cap_sdpres_delay_time
+0x038a mem_lmo_header_length
+0x038b mem_lmo_header_opcode
+0x038c mem_lmo_payload
+0x039d mem_lmi_accepted_opcode
+0x039e mem_disconn_reason_send
+0x039f mem_tx_fixed_freq
+0x03a0 mem_rx_fixed_freq
+0x03a1 mem_ext_features_page
+0x03a2 mem_lmpext_ssp_enable
+0x03a4 mem_remote_sppcap
+0x03a5 mem_lmp_conn_state
+0x03a6 mem_soft_timer
+0x03a8 mem_pincode_state
+0x03a9 mem_sres_tid
+0x03aa mem_accptsco_tid
+0x03ab mem_wait_encryption
+0x03ac mem_sniff_payload
+0x03bc mem_aurand_send_delay_time
+0x03c0 memRemoteRPNBitRate
+0x03c1 memRemotePRNDataBits
+0x03c2 memRemotePRNStopBit
+0x03c3 memRemotePRNParity
+0x03c4 memRemotePRNFlowControl
+0x03c5 memRemotePRNXon
+0x03c6 memRemotePRNXoff
+0x03c7 mem_mod2div_temp
+0x03ca mem_contw_temp
+0x03cc mem_attrib_list
+0x03ce mem_current_adss
+0x03cf mem_current_channel
+0x03d0 mem_current_frame_type
+0x03d1 mem_current_fcs
+0x03d2 mem_current_length
+0x03d4 mem_rfcomm_uih_payload_ptr
+0x03d6 mem_uih_cmd_type
+0x03d7 mem_uih_length
+0x03d9 mem_param_payload_ptr
+0x03db mem_ms_param
+0x03dc mem_pn_credit_flow_type_info
+0x03dd mem_pn_priority
+0x03de mem_pn_acknowledg_timer
+0x03df mem_pn_max_retrans
+0x03e0 mem_rfcomm_send_adss
+0x03e1 mem_rfcomm_send_frame_type
+0x03e2 mem_rfcomm_send_fcs
+0x03e3 mem_rfcomm_send_offset
+0x03e4 mem_sdp_mem_start
+0x03e4 mem_sdp_uuid_search_ptr
+0x03ec mem_sdp_continue_byte
+0x03ee mem_sdp_pduid
+0x03ef mem_sdp_transactionid
+0x03f1 mem_sdp_transactionid_local
+0x03f3 mem_sdp_attribute_maxbyte
+0x03f5 mem_sdp_record_maxcnt
+0x03f7 mem_sdp_record_handle
+0x03fb mem_sdp_LACAP_found
+0x03fc mem_sdp_RFCOMM_found
+0x03fd mem_sdp_handle_list
+0x03fd mem_sdp_attrib_list
+0x041d mem_sdp_error_code
+0x041f mem_sdp_all_length
+0x0421 mem_handle_humber
+0x0422 mem_search_uuid
+0x0424 mem_sdp_mem_end
+0x0424 mem_random_number
+0x0434 mem_round_key
+0x0444 mem_kinit
+0x0454 mem_input_store
+0x0464 mem_x
+0x0474 mem_y
+0x0483 mem_y15
+0x0484 mem_key_store
+0x0495 mem_key_store_end
+0x0496 memp_ar_key
+0x0498 memp_ar_input
+0x049a mem_ar_hround
+0x04a4 mem_ec_infinite
+0x04a5 mem_ec_loopc
+0x04a7 mem_aes_cmac_data_length
+0x04a8 memdat
+0x04a8 mem_ax
+0x04c0 mem_ay
+0x04d8 mem_az
+0x04f0 mem_bx
+0x0508 mem_ax_256//32 bytes
+0x0508 mem_by
+0x0520 mem_bz
+0x0528 mem_ay_256// 32 bytes
+0x0538 mem_cx
+0x0548 mem_az_256// 32 bytes
+0x0550 mem_cy
+0x0567 mem_cy5
+0x0568 mem_bx_256// 32 bytes
+0x0568 mem_cz
+0x0580 mem_k
+0x0588 mem_by_256// 31 bytes
+0x0598 mem_align
+0x05a8 mem_bz_256//32 bytes
+0x05a8 mem_tmp1
+0x05a8 memahbak
+0x05c0 mem_tmp5
+0x05c8 mem_cx_256//32 bytes
+0x05c8 memahsave
+0x05d8 mem_tmp2
+0x05e8 mem_cy_256// 32 bytes
+0x05e8 memahsave_end
+0x05e8 mem_addr_padding
+0x05e9 mem_addr_value
+0x05f0 mem_tmp3
+0x05f0 mem_t1
+0x05f5 mem_addr_value_end
+0x05f8 mem_addr_iocap_end
+0x0607 mem_cy5_256// 1 byte
+0x0608 mem_cz_256// 32 bytes
+0x0608 mem_tmp0
+0x0608 mem_t0
+0x0610 mem_tmp0a
+0x0620 mem_t2
+0x0628 mem_k_256//32 bytes
+0x0638 mem_t3
+0x0648 mem_tmp1_256//32 bytes
+0x0650 mem_t7
+0x0668 mem_tmp5_256
+0x0688 mem_tmp2_256
+0x06a8 mem_tmp3_256
+0x06a8 mem_t1_256
+0x06c8 mem_tmp0_256
+0x06c8 mem_t0_256
+0x06e8 mem_t2_256
+0x0708 mem_t3_256
+0x0728 mem_t7_256
+0x0748 mem_p
+0x0760 mem_a
+0x0778 mem_b
+0x0790 mem_gx
+0x07a8 mem_gy
+0x07c0 memh0
+0x07e0 mem_p_256
+0x0800 mem_a_256
+0x0820 mem_gx_256
+0x0840 mem_gy_256
+0x0860 mem_le_slat
+0x0870 mem_sp_state_start
+0x0870 mem_sp_state
+0x0871 mem_master_sp_state
+0x0872 mem_sp_flag
+0x0873 mem_master_sp_flag
+0x0874 mem_sp_calc
+0x0875 mem_sp_dh_ready
+0x0876 mem_sp_localsm
+0x0877 mem_pairing_auth
+0x0878 mem_sp_local_key_send_count
+0x0879 mem_sp_remote_key_recv_count
+0x087a mem_sp_remote_key_invalid
+0x087b mem_sp_dhkey_invalid
+0x087c mem_gkey
+0x0880 mem_sp_state_end
+0x0880 mem_le_pubkey_remote_x_256
+0x0888 mem_sp_pubkey_remote
+0x0888 mem_sp_pubkey_remote_x
+0x08a0 mem_sp_pubkey_remote_x_end
+0x08a0 mem_le_pubkey_remote_y_256
+0x08a8 mem_sp_pubkey_remote_y
+0x08c0 mem_le_dhkey_256
+0x08c8 mem_sp_dhkey
+0x08e0 mem_sp_dhkey_end
+0x08e0 mem_sp_random_local
+0x08f0 mem_sp_random_local_end
+0x08f0 mem_sp_random_remote
+0x0900 mem_sp_random_remote_end
+0x0900 memresult
+0x0900 mem_sp_calc_result
+0x0900 memh
+0x0904 memg
+0x0908 memf
+0x090c meme
+0x0910 mem_sp_calc_result_high
+0x0910 memd
+0x0914 memc
+0x0918 memb
+0x091c mema
+0x0920 mem_sp_check_result
+0x0930 mem_sp_confirm_remote
+0x0940 mem_sp_prarm_stack
+0x0950 mem_UI_data_txbuff_length
+0x0952 mem_ipc_skip_continue_proc
+0x0953 mem_ui_timer_temp//length 4
+0x0953 mem_ipc_rega_temp
+0x0957 mem_hold_contr
+0x0959 mem_hold_contw
+0x095b mem_fifo_temp
+0x095c mem_pdatatemp
+0x0964 mem_temp//8 bytes
+0x096c mem_timeup// 4 bytes
+0x0970 mem_rega//4 bytes
+0x0974 mem_regb//4 bytes
+0x0978 mem_regc//3 bytes
+0x097b mem_contr//2 bytes
+0x097d mem_contw//2 bytes
+0x097f mem_contus
+0x0981 mem_contue
+0x0983 mem_contu
+0x0985 mem_queue
+0x0987 mem_loopcnt
+0x0989 mem_wakup_from_power_flag
+0x098a mem_saved_gpio_in
+0x098e mem_module_rx_error_data_buffer
+0x098e mem_shutter_random_mac_data_temp
+0x098e mem_shutter_config_data_temp
+0x098e mem_le_adv_channel_map_temp
+0x098e mem_le_data_len_temp//1byte
+0x098e mem_tx_fifo_map_temp
+0x098e mem_rpn_dlci//1byte
+0x098e mem_event_cmd_response_content//2byte
+0x098e mem_le_prand//16byte
+0x098e mem_AES_CMAC_k//16 bytes
+0x098e mem_regext_index//1 bytes
+0x098e mem_temp_block0
+0x098f mem_le_data_temp//15bytes
+0x098f mem_temp_block1
+0x099e mem_le_aes_128//16byte
+0x099e mem_regext//64 bytes
+0x099e mem_AES_CMAC_k1//16 bytes
+0x099e mem_temp_block2
+0x09ae mem_AES_CMAC_k2//16 bytes
+0x09ae mem_temp_block3
+0x09be mem_AES_CMAC_temp// 16 bytes
+0x09be mem_temp_block4
+0x09ce mem_AES_CMAC_M_last// 16 bytes
+0x09ce mem_module_uart_cmd
+0x09cf mem_module_uart_opcode
+0x09d0 mem_module_uart_len
+0x09d1 mem_module_temp_nl_discard_packet
+0x09d2 mem_temp_block5
+0x09de mem_le_mackey//16 bytes
+0x09de mem_app_receive_temp
+0x09de mem_key_value_temp
+0x09e0 mem_key_value
+0x09e2 mem_key_value_temp1
+0x09e3 mem_key_value_temp2
+0x09e4 mem_key_value_temp3
+0x09e5 mem_key_value_temp4
+0x09e6 mem_key_value_temp5
+0x09e7 mem_key_value_temp6
+0x09e8 mem_temp_block6
+0x09ee mem_scale_ratio
+0x09f1 mem_xcnt
+0x09f4 mem_scale_ratio_temp
+0x09f6 mem_mesh_receive_model_message_payload_len
+0x09f7 mem_mesh_receive_model_message_payload_opcode
+0x09f8 mem_mesh_receive_model_message_payload
+0x0a0f mem_mesh_access_layer_payload_len
+0x0a10 mem_mesh_access_layer_payload
+0x0a10 mem_mesh_access_payload
+0x0a42 mem_mesh_access_payload_padding//为了透传模块预留
+0x0a74 mem_mesh_queue_ele_temp
+0x0a74 mem_mesh_queue_ele_duration
+0x0a75 mem_mesh_queue_ele_gatt_msg_id
+0x0a76 mem_mesh_queue_ele_len
+0x0a77 mem_mesh_queue_ele_payload
+0x0a96 mem_mesh_queue_ele_padding
+0x0a97 mem_le_txheader_mesh_temp
+0x0abe mem_mesh_sha256_chunk_start
+0x0abe mem_mesh_sha256_chunk1
+0x0afe mem_mesh_sha256_chunk2
+0x0b3e mem_mesh_sha256_chunk3
+0x0b7e mem_mesh_sha256_chunk4
+0x0bbe mem_mesh_Privacy_Plaintext
+0x0bbe mem_mesh_Privacy_Plaintext_Zero_String
+0x0bc3 mem_mesh_Privacy_Plaintext_IV_Index
+0x0bc7 mem_mesh_Privacy_Plaintext_Privacy_Random
+0x0bc7 mem_mesh_Privacy_Plaintext_Privacy_Random_EncDST
+0x0bc9 mem_mesh_Privacy_Plaintext_Privacy_Random_EncTransportPDU_or_NetMIC
+0x0bce mem_mesh_PECB
+0x0bde mem_nonce_ptr
+0x0be0 mem_ccm_data_len
+0x0be1 mem_ccm_data_ptr
+0x0be3 mem_ccm_mic
+0x0beb mem_ccm_type
+0x0bec mem_mesh_Device_UUID
+0x0bfc mem_mesh_receive_VID
+0x0bfd mem_mesh_mic_cache_ptr
+0x0bff mem_mesh_lower_transport_layer_payload_len
+0x0c00 mem_mesh_loopcnt_tmep
+0x0c02 mem_mesh_rega_temp
+0x0c04 mem_mesh_regb_temp
+0x0c06 mem_mesh_regc_temp
+0x0c08 mem_mesh_alarm_temp
+0x0c0a mem_mesh_message_Transport_NetMIC_length
+0x0c0b mem_mesh_message_NID
+0x0c0c mem_mesh_message_TTL
+0x0c0d mem_mesh_message_SEQ
+0x0c10 mem_mesh_message_SRC
+0x0c12 mem_mesh_message_DST
+0x0c14 mem_mesh_message_Transport_NetMIC
+0x0c14 mem_mesh_message_Transport_Head
+0x0c15 mem_mesh_message_Transport_unsegmented_access_messagePDU
+0x0c15 mem_mesh_message_Transport_segmented_access_messagePDU
+0x0c15 mem_mesh_message_segment_access_SZMIC_SeqZero_SegO_SegN
+0x0c18 mem_mesh_message_Transport_segmented_access_messagePDU_Segment
+0x0c18 mem_mesh_message_Transport_NetMIC_end
+0x0c28 mem_mesh_nonce_struct
+0x0c35 mem_mesh_send_message_DST
+0x0c37 mem_mesh_last_message_SEQ
+0x0c3a mem_mesh_network_packet_type
+0x0c3b mem_mesh_upper_transport_layer_payload_ptr
+0x0c3d mem_mesh_segmented_upper_transport_layer_payload_len
+0x0c3e mem_mesh_segmented_lower_transport_layer_SegZero
+0x0c40 mem_mesh_segmented_lower_transport_layer_SegO
+0x0c41 mem_mesh_segmented_lower_transport_layer_SegN
+0x0c42 mem_mesh_segmented_last_packet_upper_teansport_payload_len
+0x0c43 mem_mesh_upper_tran_layer_queue_temp
+0x0c43 mem_mesh_upper_tran_layer_temp_packet_flag
+0x0c44 mem_mesh_upper_tran_layer_temp_packet_transmit_delay
+0x0c46 mem_mesh_upper_tran_layer_temp_packet_TID
+0x0c47 mem_mesh_upper_tran_layer_temp_packet_header_IVI_NID
+0x0c48 mem_mesh_upper_tran_layer_temp_packet_header_CTL_TTL
+0x0c49 mem_mesh_upper_tran_layer_temp_packet_header_SEQ
+0x0c4c mem_mesh_upper_tran_layer_temp_packet_header_SRC
+0x0c4e mem_mesh_upper_tran_layer_temp_packet_header_DST
+0x0c50 mem_mesh_upper_tran_layer_temp_packet_length
+0x0c51 mem_mesh_upper_tran_layer_temp_packet_payload
+0x09f6 mem_hci_opcode_ocf
+0x09f8 mem_hci_opcode_ogf
+0x09f9 mem_hci_event_head_type
+0x09fa mem_hci_event_head_event_code
+0x09fb mem_hci_event_para_total_length
+0x09fc mem_hci_command_complete_num_hci_command_packet
+0x09fd mem_hci_command_complete_command_opcode
+0x09fd mem_hci_opcode
+0x09ff mem_hci_command_complete_return_parameter
+0x09ff mem_hci_command_complete_return_parameter_status
+0x0a00 mem_hci_command_complete_return_parameter_chip_id
+0x09f6 mem_vdk
+0x09f8 mem_vok
+0x09fc mem_omega
+0x0a02 mem_b1
+0x0a06 mem_b2
+0x0a0a mem_u1
+0x0a1a mem_u2
+0x0a2a mem_q
+0x09f6 mem_module_le_rx_data_len
+0x09f8 mem_module_le_rx_data_address
+0x09fa mem_module_le_rx_data_handle
+0x09f6 mem_init_cnt
+0x09f8 mem_data_pre
+0x09fa mem_data_current
+0x09fc mem_data_sum
+0x09ff mem_data_value
+0x09f6 mem_tst_pktcnt_sync
+0x09f8 mem_tst_pktcnt_hec
+0x09fa mem_tst_pktcnt_crc
+0x09fc mem_tst_pktcnt_dmh
+0x09fe mem_tmp_buffer_head
+0x0a01 mem_tmp_buffer
+0x0a51 mem_tester_emulate
+0x0a52 mem_temp_payload
+0x0a52 test_mode_scenario
+0x0a53 test_mode_hopping_mode
+0x0a54 test_mode_tx_freq
+0x0a55 test_mode_rx_freq
+0x0a56 test_mode_power_mode
+0x0a57 test_mode_poll_period
+0x0a58 test_mode_packet_type
+0x0a59 test_mode_data_length
+0x0a5b mem_test_mode_old_debug_config
+0x0a5c mem_tester_cnt
+0x09f6 mem_usb_status
+0x09f7 mem_usb_fifo_empty
+0x09f8 mem_usb_read_len
+0x09fa mem_usb_txbuf
+0x0a3b mem_usb_txbuf1
+0x0a45 mem_usb_txbuf2
+0x0a4f mem_usb_rxbuf
+0x0a8f mem_usb_rxbuf_end
+0x0a90 mem_bufptr
+0x0a92 mem_remain
+0x0a93 mem_hidreportdesc_kb
+0x0a95 mem_hidreportdesc_m
+0x0a97 mem_devicedesc
+0x0aaa mem_confdesc
+0x0ae6 mem_string0
+0x0aeb mem_string1
+0x0b09 mem_string2
+0x0b27 mem_string3
+0x0b45 mem_cb_usb_config
+0x0b47 mem_usb_tx_interval
+0x0b48 mem_usb_vid_pid
+0x0b51 mem_usb_zero_packet
+0x0b53 mem_usb_ones_packet
+0x0b55 mem_usb_two_packet
+0x0b57 mem_usb0_state
+0x0b58 mem_usb_offline_check_gpio
+0x0b59 mem_usb_clear_mem_start
+0x0b59 mem_usb_setup
+0x0b59 mem_usb_setup_bmRequestType
+0x0b5a mem_usb_setup_bRequest
+0x0b5b mem_usb_setup_bValue
+0x0b5c mem_usb_setup_bValueH
+0x0b5d mem_usb_setup_wIndex
+0x0b5f mem_usb_setup_bLength
+0x0b60 mem_usb_setup_bLengthH
+0x0b61 mem_usb0_set_report_data
+0x0ba1 mem_usb0_get_report_data
+0x0be1 mem_usb_setup_bValue_temp
+0x0be3 mem_usb0_get_set_report
+0x0be4 mem_usb0_data_ready_report
+0x0be5 mem_usb_tx_win_enable
+0x0be6 mem_usb_tx_mac_enable
+0x0be7 mem_usb_idle_flag
+0x0be8 mem_usb_idle_rate
+0x0be9 mem_usb_get_protocol_flag
+0x0bea mem_usb_set_protocol_status
+0x0beb mem_usb_set_protocol_value
+0x0bec mem_usb_state
+0x0bed mem_usb_remote_wakeup
+0x0bee mem_usb_clear_remote_wakeup
+0x0bef mem_sdsystem_wakeup_flag
+0x0bf0 mem_usb_ep0_stall_status
+0x0bf1 mem_usb_ep1_stall_status
+0x0bf2 mem_usb_ep2_stall_status
+0x0bf3 mem_usb_ep3_stall_status
+0x0bf4 mem_dsc_info_data_pointer
+0x0bf6 mem_dsc_info_len
+0x0bf7 mem_usb_ep1_data
+0x0bf8 mem_usb_ep2_data
+0x0bf9 mem_usb_tx_enable
+0x0bfa mem_usb_device_enumeration_endflag
+0x0bfb mem_usb_wakestate_onetime_flag
+0x0bfc mem_usb_mac_wakeup_trig
+0x0bfd mem_usb_set_high_addr_flag
+0x0bfe mem_usb_clear_halt
+0x0bff mem_usb_mouse_data
+0x0c0f mem_usb_kb_data
+0x0c1f mem_usb_kb_multikey
+0x0c2f mem_usb_kb_system
+0x0c3f mem_usb_test_cnt
+0x0c41 mem_usb_test_kb
+0x0c4b mem_usb_clear_mem_end
+0x0c4b mem_dg_rssi_noise_buffer
+0x0d4b mem_dg_rssi_noise_dg_buffer
+0x0e4b mem_dg_rssi_noise_ms_buffer
+0x0f4b mem_dg_rssi_noise_kb_buffer
+0x0c4b mem_usb_mem_temp
+
+0x02be mem_le_new_param
+0x02be mem_le_new_transmitwindowsize
+0x02bf mem_le_new_transmitwindowoffset
+0x02c1 mem_le_new_conninterval
+0x02c3 mem_le_new_connslavelatency
+0x02c5 mem_le_new_connsupervisiontimeout
+0x02be mem_le_new_map
+0x02be mem_le_new_m2s_phy
+0x02bf mem_le_new_s2m_phy
+0x016b mem_le_rxbuf_data_header
+0x016c mem_le_rxbuf_data_length
+0x016d mem_le_rxbuf_data_payload
+0x016b mem_le_rxbuf_data_ll_header
+0x016c mem_le_rxbuf_data_ll_length
+0x016d mem_le_rxbuf_data_ll_opcode
+0x016e mem_le_rxbuf_data_ll_control_data
+0x016b mem_le_rxbuf_adv_header
+0x016c mem_le_rxbuf_adv_length
+0x016d mem_le_rxbuf_adv_payload
+0x016b mem_le_rxbuf_adv_scan_req_header
+0x016c mem_le_rxbuf_adv_scan_req_length
+0x016d mem_le_rxbuf_adv_scan_req_scan_address
+0x0173 mem_le_rxbuf_adv_scan_req_adv_address
+0x016b mem_le_rxbuf_adv_connect_ind_header
+0x016c mem_le_rxbuf_adv_connect_ind_length
+0x016d mem_le_rxbuf_adv_connect_ind_init_address
+0x0173 mem_le_rxbuf_adv_connect_ind_adv_address
+0x0179 mem_le_rxbuf_adv_connect_ind_access_address
+0x017d mem_le_rxbuf_adv_connect_ind_crc_init
+0x0180 mem_le_rxbuf_adv_connect_ind_win_size
+0x0181 mem_le_rxbuf_adv_connect_ind_win_offset
+0x0183 mem_le_rxbuf_adv_connect_ind_interval
+0x0185 mem_le_rxbuf_adv_connect_ind_latency
+0x0187 mem_le_rxbuf_adv_connect_ind_timeout
+0x0189 mem_le_rxbuf_adv_connect_ind_channel_map
+0x018e mem_le_rxbuf_adv_connect_ind_hop_and_sca
+0x099e mem_le_search_handle_start
+0x09a0 mem_le_search_handle_end
+0x09a2 mem_le_att_offset
+0x09a2 mem_le_search_att_type_length
+0x09a3 mem_le_search_att_type
+0x09b3 mem_le_curr_att_len
+0x09b4 mem_le_cur_attlist_start_ptr
+0x09b6 mem_le_cur_handle_start
+0x09b8 mem_le_cur_handle_end
+0x09ba mem_le_cur_uuid_length
+0x09bb mem_le_cur_uuid
+0x016b mem_le_rxbuf_data_att_header
+0x016c mem_le_rxbuf_data_att_length
+0x016d mem_le_rxbuf_data_att_l2cap_length
+0x016f mem_le_rxbuf_data_att_cid
+0x0171 mem_le_rxbuf_data_att_opcode
+0x0172 mem_le_rxbuf_data_att_payload
+0x016b mem_le_rxbuf_data_continue_header
+0x016c mem_le_rxbuf_data_continue_length
+0x016d mem_le_rxbuf_data_continue_payload
+0x016b mem_le_rxbuf_data_att_write_header
+0x016c mem_le_rxbuf_data_att_write_length
+0x016d mem_le_rxbuf_data_att_write_l2cap_length
+0x016f mem_le_rxbuf_data_att_write_cid
+0x0171 mem_le_rxbuf_data_att_write_opcode
+0x0172 mem_le_rxbuf_data_att_write_handle
+0x0174 mem_le_rxbuf_data_att_write_payload
+0x016b mem_le_rxbuf_data_prepare_att_write_header
+0x016c mem_le_rxbuf_data_prepare_att_write_length
+0x016d mem_le_rxbuf_data_prepare_att_write_l2cap_length
+0x016f mem_le_rxbuf_data_prepare_att_write_cid
+0x0171 mem_le_rxbuf_data_prepare_att_write_opcode
+0x0172 mem_le_rxbuf_data_prepare_att_write_handle
+0x0174 mem_le_rxbuf_data_prepare_att_write_offset
+0x0176 mem_le_rxbuf_data_prepare_att_write_payload
+0x09f8 mem_mesh_NETKeyindex_and_APPKeyindex
+0x09fb mem_mesh_receive_application_key
+0x09f8 mem_mesh_vendor_message_cid
+0x09fa mem_mesh_vendor_message_tid
+0x09fb mem_mesh_vendor_message_attr_type
+0x09f8 mem_mesh_vendor_message_header
+0x09fd mem_mesh_vendor_attr_parameter
+0x09f8 mem_mesh_vendor_message_delay_close_time_header
+0x09fd mem_mesh_vendor_delay_close_time
+0x09f8 mem_mesh_vendor_message_night_light_onoff_header
+0x09fd mem_mesh_vendor_night_light_onoff
+0x09f8 mem_mesh_vendor_message_color_header
+0x09fd mem_mesh_vendor_color_lightness
+0x09ff mem_mesh_vendor_color_hue
+0x0a01 mem_mesh_vendor_color_saturation
+0x09f8 mem_mesh_vendor_message_back_light_onoff_header
+0x09fd mem_mesh_vendor_back_light_onoff
+0x09f8 mem_mesh_vendor_message_main_light_onoff_header
+0x09fd mem_mesh_vendor_main_light_onoff
+0x09f8 mem_mesh_vendor_message_standby_brightness_header
+0x09fd mem_mesh_vendor_standby_brightness
+0x09f8 mem_mesh_vendor_message_current_time_header
+0x09fd mem_mesh_vendor_message_current_time
+0x09f8 mem_mesh_vendor_message_timer_header
+0x09fd mem_mesh_vendor_timer_timing_index
+0x09fe mem_mesh_vendor_timer_timing_index1
+0x09fe mem_mesh_vendor_timer_timing_time
+0x0a02 mem_mesh_vendor_timer_timing_attr_type
+0x0a04 mem_mesh_vendor_timer_timing_attr_para
+0x09f8 mem_mesh_vendor_message_timer_cyclic_header
+0x09fd mem_mesh_vendor_timer_timing_index_cyclic
+0x09fe mem_mesh_vendor_timer_timing_time_cyclic
+0x0a00 mem_mesh_vendor_timer_timing_weekdays_cyclic
+0x0a01 mem_mesh_vendor_timer_timing_attr_type_cyclic
+0x0a03 mem_mesh_vendor_timer_timing_attr_para_cyclic
+0x0a04 mem_mesh_vendor_timer_timing_cyclic_flag
+0x0a10 mem_mesh_access_layer_payload_vendor_command
+0x0a11 mem_mesh_access_layer_payload_vendor_CID
+0x0a13 mem_mesh_access_layer_payload_vendor_tid
+0x0a14 mem_mesh_access_layer_payload_vendor_attr_type
+0x0a16 mem_mesh_access_layer_payload_vendor_attr_parameter
+0x098e mem_mesh_subscription_eep_temp
+0x0a74 mem_mesh_gatt_package_receive_msg_buffer_ptr
+0x0a76 mem_mesh_gatt_package_receive_msg_buffer_temp
+0x0a76 mem_mesh_gatt_package_receive_msg_id
+0x0a78 mem_mesh_gatt_package_receive_MAC
+0x0a78 mem_mesh_gatt_package_receive_msg_num
+0x0a79 mem_mesh_gatt_package_receive_msg_total_length
+0x0a7a mem_mesh_gatt_package_receive_msg_payload
+0x0bec mem_mesh_receive_service_uuid_company_id
+0x0bee mem_mesh_receive_service_uuid_vid
+0x0bef mem_mesh_receive_service_uuid_provisioning_type
+0x0bf0 mem_mesh_receive_service_uuid_mac
+0x0bf2 mem_mesh_receive_service_uuid_msg_id
+0x0bf3 mem_mesh_receive_service_uuid_package_num
+0x0bf4 mem_mesh_receive_service_uuid_length
+0x0bf5 mem_mesh_receive_service_uuid_payload_data
+0x0bec mem_mesh_receive_service_uuid_ios_data_company_id
+0x0bee mem_mesh_receive_service_uuid_ios_data_vid
+0x0bef mem_mesh_receive_service_uuid_ios_data_provisioning_type
+0x0bf0 mem_mesh_receive_service_uuid_ios_data_NID
+0x0bf1 mem_mesh_receive_service_uuid_ios_data_msg_id
+0x0bf2 mem_mesh_receive_service_uuid_ios_data_package_num
+0x0bf3 mem_mesh_receive_service_uuid_ios_data_length
+0x0bf4 mem_mesh_receive_service_uuid_ios_data_payload_data
+0x09f8 mem_mesh_configuration_health_message_opcode
+0x09f8 mem_mesh_configuration_health_message_opcode_config_model_subscription
+0x09f9 mem_mesh_subscription_element_address
+0x09fb mem_mesh_subscription_value_address
+0x09fd mem_mesh_subscription_model_identifier
+0x09f8 mem_mesh_module_message_opcode
+0x09f8 mem_mesh_module_message_opcode_onoff_set
+0x09f9 mem_mesh_generic_onoff_set_payload_OnOff
+0x09fa mem_mesh_generic_onoff_set_payload_TID
+0x09fb mem_mesh_generic_onoff_set_payload_Transition_Time
+0x09fc mem_mesh_generic_onoff_set_payload_Delay
+0x09f8 mem_mesh_module_message_opcode_scene_recall
+0x09f9 mem_mesh_scene_recall_payload_scene_number
+0x09fb mem_mesh_scene_recall_payload_TID
+0x09fc mem_mesh_scene_recall_payload_Transition_Time
+0x09fd mem_mesh_scene_recall_payload_Delay
+0x09f8 mem_mesh_module_message_opcode_set_light_lightness
+0x09f9 mem_mesh_light_lightness_set_payload_lightness
+0x09fb mem_mesh_light_lightness_set_payload_TID
+0x09fc mem_mesh_light_lightness_set_payload_Transition_Time
+0x09fd mem_mesh_light_lightness_set_payload_Delay
+0x09fe mem_mesh_light_lightness_calc_lightness
+0x09f8 mem_mesh_module_message_opcode_set_light_ctl
+0x09f9 mem_mesh_CTL_Lightness
+0x09fb mem_mesh_CTL_Temperature
+0x09fd mem_mesh_CTL_Delta_UV
+0x09ff mem_mesh_CTL_lightness_TID
+0x0a00 mem_mesh_CTL_lightness_Transition_Time
+0x0a01 mem_mesh_CTL_lightness_Delay
+0x0a02 mem_mesh_CTL_calc_lightness
+0x0a03 mem_mesh_CTL_calc_temperature
+0x0a97 mem_mesh_network_packet_type_temp
+0x0a98 mem_mesh_message_NID_temp
+0x0c28 mem_mesh_Network_Nonce
+0x0c28 mem_mesh_Network_Nonce_nonce_type
+0x0c29 mem_mesh_Network_Nonce_CTL_and_TTL
+0x0c2a mem_mesh_Network_Nonce_SEQ
+0x0c2d mem_mesh_Network_Nonce_SRC
+0x0c2f mem_mesh_Network_Nonce_Pad//0x0000
+0x0c31 mem_mesh_Network_Nonce_IV_Index
+0x0c28 mem_mesh_Application_Nonce
+0x0c28 mem_mesh_Application_Nonce_Nonce_Type
+0x0c29 mem_mesh_Application_Nonce_ASZMIC_and_Pad//
+0x0c2a mem_mesh_Application_Nonce_SEQ
+0x0c2d mem_mesh_Application_Nonce_SRC
+0x0c2f mem_mesh_Application_Nonce_DST
+0x0c31 mem_mesh_Application_Nonce_IV_Index
+0x0c28 mem_mesh_Device_Nonce
+0x0c28 mem_mesh_Device_Nonce_Nonce_Type
+0x0c29 mem_mesh_Device_Nonce_ASZMIC_and_Pad//
+0x0c2a mem_mesh_Device_Nonce_SEQ
+0x0c2d mem_mesh_Device_Nonce_SRC
+0x0c2f mem_mesh_Device_Nonce_DST
+0x0c31 mem_mesh_Device_Nonce_IV_Index
+0x0a0f mem_mesh_upper_transport_layer_payload_len
+0x0c51 mem_mesh_upper_tran_layer_temp_pakcet_AKF_AID
+0x0c51 mem_mesh_upper_tran_layer_temp_unsegmented_pakcet_AKF_AID
+0x0c52 mem_mesh_upper_tran_layer_temp_unsegmented_packet_fill
+0x0c56 mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu
+0x0c56 mem_mesh_upper_tran_layer_temp_unsegmented_pakcet_upper_tran_access_pdu
+0x0c51 mem_mesh_upper_tran_layer_temp_segmented_pakcet_AKF_AID
+0x0c52 mem_mesh_upper_tran_layer_temp_segmented_pakcet_SeqZero
+0x0c54 mem_mesh_upper_tran_layer_temp_segmented_pakcet_SegO
+0x0c55 mem_mesh_upper_tran_layer_temp_segmented_pakcet_SegN
+0x0c56 mem_mesh_upper_tran_layer_temp_segmented_pakcet_upper_tran_access_pdu
+0x4000 mem_patch00
+0x4001 mem_patch01
+0x4002 mem_patch02
+0x4003 mem_patch03
+0x4004 mem_patch04
+0x4005 mem_patch05
+0x4006 mem_patch06
+0x4007 mem_patch07
+0x4008 mem_patch08
+0x4009 mem_patch09
+0x400a mem_patch0a
+0x400b mem_patch0b
+0x400c mem_patch0c
+0x400d mem_patch0d
+0x400e mem_patch0e
+0x400f mem_patch0f
+0x4010 mem_patch10
+0x4011 mem_patch11
+0x4012 mem_patch12
+0x4013 mem_patch13
+0x4014 mem_patch14
+0x4015 mem_patch15
+0x4016 mem_patch16
+0x4017 mem_patch17
+0x4018 mem_patch18
+0x4019 mem_patch19
+0x401a mem_patch1a
+0x401b mem_patch1b
+0x401c mem_patch1c
+0x401d mem_patch1d
+0x401e mem_patch1e
+0x401f mem_patch1f
+0x4020 mem_patch20
+0x4021 mem_patch21
+0x4022 mem_patch22
+0x4023 mem_patch23
+0x4024 mem_patch24
+0x4025 mem_patch25
+0x4026 mem_patch26
+0x4027 mem_patch27
+0x4028 mem_patch28
+0x4029 mem_patch29
+0x402a mem_patch2a
+0x402b mem_patch2b
+0x402c mem_patch2c
+0x402d mem_patch2d
+0x402e mem_patch2e
+0x402f mem_patch2f
+0x4030 mem_patch30
+0x4031 mem_patch31
+0x4032 mem_patch32
+0x4033 mem_patch33
+0x4034 mem_patch34
+0x4035 mem_patch35
+0x4036 mem_patch36
+0x4037 mem_patch37
+0x4038 mem_patch38
+0x4039 mem_patch39
+0x403a mem_patch3a
+0x403b mem_patch3b
+0x403c mem_patch3c
+0x403d mem_patch3d
+0x403e mem_patch3e
+0x403f mem_patch3f
+0x4040 mem_context
+0x4098 mem_current_amaddr
+0x4099 mem_lpm_mode
+0x409a mem_device_option
+0x409b mem_scan_mode
+0x409c mem_last_clkn
+0x40a0 mem_features
+0x40a8 mem_lap
+0x40ab mem_uap
+0x40ac mem_nap
+0x40ae mem_npage
+0x40af mem_glap
+0x40b2 mem_class
+0x40b5 mem_iscan_window
+0x40b7 mem_iscan_interval
+0x40b9 mem_pscan_window
+0x40bb mem_pscan_interval
+0x40bd mem_page_interval
+0x40bf mem_page_window
+0x40c1 mem_page_to
+0x40c3 mem_inq_window
+0x40c5 mem_fcomp_div
+0x40c6 mem_rx_window_init
+0x40c8 mem_rx_window_sniff
+0x40ca mem_rf_init_ptr
+0x40cc mem_last_type
+0x40cd mem_last_type_esco
+0x40ce mem_last_type_saved
+0x40cf mem_retransmission_cnt
+0x40d1 mem_next_btclk
+0x40d5 mem_rf_rccal
+0x40d6 mem_handle_num
+0x40d7 mem_max_slot
+0x40d8 mem_eir_enable
+0x40d9 mem_afh_instant
+0x40dd mem_afh_error_total
+0x40df mem_afh_cfg
+0x40e0 mem_afh_new_mod
+0x40e1 mem_afh_map_lo
+0x40e6 mem_afh_map_hi
+0x40eb mem_afh_used
+0x40ec mem_afh_index
+0x40ee mem_afh_map_new
+0x40f9 mem_afh_map
+0x4149 mem_afh_timer
+0x414d mem_afh_classify_channel_map
+0x4157 mem_lpm_wake_lock
+0x4159 mem_lpm_interval
+0x415b mem_lpm_overhead
+0x415c mem_lpm_hibernate_switch
+0x415d mem_esco_addr
+0x415e mem_sniff_unint_lost
+0x415f mem_ptt
+0x4160 mem_sleep_counter//should be 0x41fc in REVC
+0x4164 mem_sleep_counter_all
+0x4168 mem_sleep_clkn
+0x416e mem_sniff_rcv
+0x4171 mem_sniff_lost
+0x4174 mem_clks_per_lpo
+0x4177 mem_lpm_mult
+0x4178 mem_lpm_mult_timeout
+0x4179 mem_lpm_mult_cnt
+0x417a mem_lpm_config
+0x417a mem_lpm_xtal_ib
+0x417b mem_lpm_ctrim
+0x417c mem_lpm_padding
+0x417d mem_lpm_xtalcnt
+0x417e mem_lpm_buckcnt
+0x417f mem_lpm_ldocnt
+0x4180 mem_lpm_isogate
+0x4181 mem_lpm_isogate_final
+0x4182 mem_lpm_ctrl3
+0x4186 mem_saved_gpio// should be 0x421e in REVC
+0x419a mem_saved_gsel
+0x419d mem_saved_mark
+0x41a5 mem_saved_spidctrl
+0x41a6 mem_patch_ptr
+0x41a8 mem_patch_len
+0x41aa mem_timers
+0x41ca mem_link_key_exists
+0x41cb mem_link_key
+0x41db mem_hci_cmd
+0x41dc mem_hci_conn_handle
+0x41dd mem_hci_plap
+0x41e0 mem_hci_puap
+0x41e1 mem_hci_pnap
+0x41e3 mem_loadcode_times
+0x41e4 mem_llid
+0x41e5 mem_tx_lch
+0x41e6 mem_tx_len
+0x41e8 mem_tx_power
+0x41e9 mem_modem_rssi
+0x41ea mem_gain_fix
+0x41eb mem_gain_table
+0x41ee mem_gain_second_agc_en
+0x41ef mem_rf_init_data
+0x41f0 mem_system_clk
+0x41f1 mem_le_dsniff
+0x41f3 mem_le_conn_interval
+0x41f5 mem_le_txheader
+0x41f6 mem_le_txlen
+0x41f7 mem_le_txpayload
+0x42f7 mem_le_name_len
+0x42f8 mem_le_name
+0x4316 mem_le_ltk
+0x4326 mem_ltk_exists
+0x4327 mem_le_rconfirm
+0x4337 mem_le_srand
+0x4347 mem_le_iat
+0x4348 mem_le_rat
+0x4349 mem_le_preq
+0x434a mem_le_preq_iocap
+0x434b mem_le_preq_oob
+0x434c mem_le_preq_auth
+0x434d mem_le_preq_max_keysize
+0x434e mem_le_preq_init_key_distribution
+0x434f mem_le_preq_resp_key_distribution
+0x4350 mem_le_pres
+0x4351 mem_le_pres_iocap
+0x4352 mem_le_pres_oob
+0x4353 mem_le_pres_auth
+0x4354 mem_le_pres_max_keysize
+0x4355 mem_le_pres_init_key_distribution
+0x4356 mem_le_pres_resp_key_distribution
+0x4357 mem_le_notify_handle
+0x4359 mem_le_search_uuid_length
+0x435a mem_le_search_uuid
+0x436a mem_le_conn_param
+0x436a mem_le_conn_peer_addr_type
+0x436b mem_le_conn_peer_addr
+0x4371 mem_le_conn_own_addr_type
+0x4372 mem_le_interval_min
+0x4374 mem_le_interval_max
+0x4376 mem_le_latency
+0x4378 mem_le_timeout
+0x437a mem_le_lap
+0x437d mem_le_uap
+0x437e mem_le_nap
+0x4380 mem_le_local_mtu
+0x4382 mem_le_remote_mtu
+0x4384 mem_le_skdm
+0x438c mem_le_skds
+0x4394 mem_le_init_superto
+0x4396 mem_ui_le_uuid_table
+0x4398 mem_le_secure_connect_flag
+0x4399 mem_le_secure_connect_state
+0x439a mem_le_sc_confirm_gkey_flag
+0x439b mem_le_pairing_state
+0x439c mem_le_enc_state
+0x439d mem_le_pairing_mode
+0x439e mem_le_tk
+0x43a2 mem_le_ediv
+0x43a4 mem_le_rand
+0x43ac mem_le_irk
+0x43bc mem_le_transmit_window
+0x43c0 mem_le_configuration
+0x43c1 mem_le_fixed_ltk
+0x43d1 mem_le_pairing_handle
+0x43d3 mem_le_packet_llid
+0x43d4 mem_le_l2cap_size
+0x43d6 mem_le_packet_len_recved
+0x43d8 mem_le_payload_ptr
+0x43da mem_le_signaling_identifier
+0x43db mem_le_l2cap_signaling_conn_param_update_rsp_result
+0x43dd mem_le_md_count
+0x43de mem_ble_l2cap_tx_buff0_ptr
+0x43e0 mem_ble_l2cap_tx_buff_size_ptr
+0x43e2 mem_le_scan_enable
+0x43e3 mem_le_scan_interval
+0x43e5 mem_le_scan_window
+0x43e7 mem_le_adv_data_len
+0x43e8 mem_le_adv_data
+0x4407 mem_le_scan_data_len
+0x4408 mem_le_scan_data
+0x4427 mem_le_adv_enable
+0x4428 mem_le_adv_param
+0x4428 mem_le_adv_interval
+0x442a mem_le_adv_type
+0x442b mem_le_adv_own_addr_type
+0x442c mem_le_adv_direct_addr
+0x4432 mem_le_adv_channel_map
+0x4433 mem_le_scan_params
+0x4433 mem_le_scan_type
+0x4434 mem_le_scan_own_addr_type
+0x4435 mem_le_l2cap_att_states
+0x4436 mem_le_att_opcode
+0x4437 mem_le_att_handle
+0x4439 mem_le_search_res
+0x443a mem_le_local_feature
+0x4442 mem_le_tx_phys
+0x4443 mem_le_rx_phys
+0x4444 mem_remote_rx_max_octets
+0x4446 mem_remote_rx_max_time
+0x4448 mem_remote_tx_max_octets
+0x444a mem_remote_tx_max_time
+0x444c mem_local_rx_max_octets
+0x444e mem_local_rx_max_time
+0x4450 mem_local_tx_max_octets
+0x4452 mem_local_tx_max_time
+0x4454 mem_app_handshake_flag
+0x4455 mem_sniff_param_interval
+0x4457 mem_sniff_param_attempt
+0x4459 mem_sniff_param_timeout
+0x445b mem_cb_check_wakelock
+0x445d mem_cb_before_hibernate
+0x445f mem_cb_before_lpm
+0x4461 mem_cb_le_process
+0x4463 mem_cb_bt_process
+0x4465 mem_cb_idle_process
+0x4467 mem_cb_bb_event_process
+0x4469 mem_cb_discovry_timeout
+0x446b mem_cb_att_write
+0x446d mem_cb_ble_transmit
+0x446f mem_cb_event_timer
+0x4471 mem_cb_bt_set_mult
+0x4473 mem_cb_spi_flash_write_complate
+0x4475 mem_cb_spi2_flash_write_complate
+0x4477 mem_cb_bt_slave_match
+0x4479 mem_cb_before_lpm_sleep
+0x447b mem_eeprom_base
+0x447d mem_unsniff2sniff_timer_count
+0x447e mem_wake_up_delay_timer
+0x447f mem_app_connection_options
+0x4480 mem_app_disconn_reason
+0x4482 mem_app_disconn_reason_flag
+0x4484 mem_xrecord_mode
+0x4485 mem_eeprom_block_size
+0x4486 mem_spi_init_clk
+0x4487 mem_spi_init_delay_time
+0x4488 mem_spi_ncs_gpio
+0x4489 mem_nv_data_ptr
+0x448b mem_nv_data_number
+0x448c mem_queue_ptr
+0x448e mem_ui_led_struct_num
+0x448f mem_ui_led_struct_ptr
+0x4491 mem_adc_wait_count
+0x4492 mem_3v_adc_io_data
+0x4494 mem_2v_adc_hvin_data
+0x4496 mem_2v_adc_vinlpm_data
+0x4498 mem_1v_adc_io_data
+0x449a mem_3v_adc_hvin_data
+0x449c mem_3v_adc_vinlpm_data
+0x449e mem_app_adc_read_count
+0x449f mem_start_adc_clkn
+0x44a0 mem_reference_voltage
+0x44a2 mem_adc_config_flag
+0x44a3 mem_adc_channel
+0x44a4 mem_adc_current_value
+0x44a6 mem_adc_power_flag//bit0:low power falg ; bit1:no power flag
+0x44a7 mem_spi_write_addr
+0x44aa mem_spi_write_ptr
+0x44ac mem_spi_write_len
+0x44ae mem_spi_write_flash_sm
+0x44af mem_spi2_write_addr
+0x44b2 mem_spi2_write_ptr
+0x44b4 mem_spi2_write_len
+0x44b6 mem_spi2_write_flash_sm
+0x44b7 mem_spi_cs_gpio
+0x44b8 mem_spi_si_gpio
+0x44b9 mem_spi_so_gpio
+0x44ba mem_spi_sclk_gpio
+0x44bb mem_spi_wp_gpio
+0x44bc mem_spi_hold_gpio
+0x44bd mem_spi2_cs_gpio
+0x44be mem_spi2_si_gpio
+0x44bf mem_spi2_so_gpio
+0x44c0 mem_spi2_sclk_gpio
+0x44c1 mem_spi2_wp_gpio
+0x44c2 mem_spi2_hold_gpio
+0x44c3 mem_eeprom_wp_gpio
+0x44c4 mem_eeprom_scl_gpio
+0x44c5 mem_eeprom_sda_gpio
+0x44c6 mem_kscan_ptr
+0x44c8 mem_key_num_ptr
+0x44c8 mem_keyscan_ptr
+0x44ca mem_key_value_retention
+0x44cc mem_power_param_ptr
+0x44ce mem_efuse_header
+0x44d1 mem_seqi
+0x44d2 mem_dig_aon_vsel
+0x44d3 mem_syn_afc_cfg1
+0x44d4 mem_rf_ldo_cfg1
+0x44d5 mem_rc_cal
+0x44d6 mem_nec_decode_error_value
+0x44d7 mem_rf_debug_rx_gpio
+0x44d8 mem_rf_debug_tx_gpio
+0x44d9 mem_l2cap_xmem_start
+0x44d9 mem_l2cap_tx_multi_offset//0 means single packet
+0x44db mem_sdp_remote_cid
+0x44dd mem_rfcomm_remote_cid
+0x44df mem_hid_ctrl_remote_cid
+0x44e1 mem_hid_int_remote_cid
+0x44e3 mem_sdp_state
+0x44e4 mem_rfcomm_state
+0x44e5 mem_hid_control_state
+0x44e6 mem_hid_interrupt_state
+0x44e7 mem_spp_state
+0x44e8 mem_ML2CAP_comm_id
+0x44e9 mem_used_map
+0x44ea mem_tx_fifo0
+0x44ea mem_tx_fifo0_map
+0x44eb mem_tx_fifo0_ptr
+0x44ed mem_tx_fifo1
+0x44ed mem_tx_fifo1_map
+0x44ee mem_tx_fifo1_ptr
+0x44f0 mem_tx_fifo2
+0x44f0 mem_tx_fifo2_map
+0x44f1 mem_tx_fifo2_ptr
+0x44f3 mem_tx_fifo3
+0x44f3 mem_tx_fifo3_map
+0x44f4 mem_tx_fifo3_ptr
+0x44f6 mem_tx_fifo_end
+0x44f6 mem_l2cap_lpm_txbuf
+0x45f6 mem_l2cap_flow_ctrl_flag
+0x45f7 mem_l2cap_pending_item
+0x45f8 mem_l2cap_rcv_hidtype
+0x45f9 mem_l2cap_xmem_end
+0x45f9 mem_lmo_header_opcode_x
+0x45fa mem_lmp_version
+0x45fb mem_lmp_compid
+0x45fd mem_lmp_subversion
+0x45ff mem_local_name_length
+0x4600 mem_local_name
+0x4603 mem_local_name2
+0x4643 mem_local_name_end
+0x4644 mem_unsniff2sniff_timer
+0x4645 mem_switch_flag
+0x4646 mem_classic_bt_flag
+0x4647 mem_encapsulated_major_type
+0x4648 mem_encapsulated_minor_type
+0x4649 mem_encapsulated_len
+0x464a mem_remote_br_sc_support
+0x464b mem_pn_dlci
+0x464c mem_pn_max_frame_size
+0x464e memFCStemp1
+0x464f memFCStemp2
+0x4650 memFCStemp3
+0x4651 mem_rfcomm_initiator
+0x4652 mem_remote_spp_channel
+0x4653 mem_HIUfcs_SPP
+0x4654 mem_HIUfcs_SPP_WCredits
+0x4655 mem_rfcomm_send_more_pkt
+0x4656 mem_remote_credits
+0x4657 mem_credit_given
+0x4658 mem_ms_channel
+0x4659 mem_rfcomm_credit_flag
+0x465a mem_rfcomm_max_frame_size
+0x465c mem_rfcomm_credit_init_data
+0x465d mem_cb_receive_spp_data
+0x465f mem_nl_rx_data_src
+0x4661 mem_nl_rx_len_all
+0x4663 mem_ui_uuid_table
+0x4665 mem_all_uuid_16bits
+0x467b mem_all_uuid_128bits
+0x469d mem_sdp_l2capch_ptr
+0x469f mem_ccm_pcnt_tx
+0x46a4 mem_ccm_pcnt_rx
+0x46a9 mem_ccm_last_mic
+0x46ad mem_ccm_iv
+0x46ad mem_ccm_ivm
+0x46b1 mem_ccm_ivs
+0x46b5 mem_ccm_len
+0x46b7 mem_ccm_rx_ptr
+0x46b9 mem_sc_only_mode
+0x46ba mem_sp_debug_mode
+0x46bb mem_secure_connections_enable
+0x46bc mem_sp_local_key_invalid
+0x46bd mem_sc_calc
+0x46be mem_sc_local_key_invalid
+0x46bf mem_sc_private_key_256
+0x46df mem_sc_pubkey_local_x_256
+0x46ff mem_sc_pubkey_local_y_256
+0x471f mem_sp_private_key
+0x4737 mem_sp_pubkey_local
+0x4737 mem_sp_pubkey_local_x
+0x474f mem_sp_pubkey_local_x_end
+0x474f mem_sp_pubkey_local_y
+0x4767 mem_ssp_enable
+0x4768 mem_lmp_io_cap_payload_iocap
+0x4769 mem_lmp_io_cap_payload_oob_auth_data
+0x476a mem_lmp_io_cap_payload_auth_req
+0x476b mem_sp_state_xmem
+0x476b mem_sp_iocap_remote
+0x476e mem_flag_mode_ssp_pin
+0x476f mem_ssp_mode_flag
+0x4770 mem_authentication_passkey_times
+0x4771 mem_passkey_1bit
+0x4772 mem_flag_pairing_state
+0x4773 mem_sp_state_xmem_end
+0x4773 mem_ipc_lock_bt
+0x4774 mem_ipc_lock_c51
+0x4775 mem_ipc_fifo_bt2c51
+0x477d mem_ipc_fifo_c512bt
+0x4785 mem_ui_button_timer
+0x4786 mem_ui_button_last_state
+0x4787 mem_ui_timer_last_btclk
+0x478b mem_discovery_timeout_timer_count
+0x478d mem_hid_handshake_timer_count
+0x478e memui_reconnect_mode
+0x478f mem_ui_state_map
+0x4791 mem_ui_profile_supported
+0x4792 mem_ui_button_timeout
+0x4793 mem_ui_button_gpio
+0x4794 mem_discovery_timeout
+0x4796 mem_pin_length
+0x4797 mem_pin
+0x47a7 mem_dummy
+0x47aa mem_seq
+0x47ab mem_context_cnt
+0x47ac mem_context_map
+0x47ad mem_context_new
+0x4aad mem_att_cmd_len
+0x4aae mem_att_cmd
+0x4abd mem_att_resp_handle
+0x4abe mem_att_resp_len
+0x4abf mem_att_resp
+0x4add mem_meter_att_list
+0x47a7 mem_mesh_vendor_mesh_receive_tid
+0x47a8 mem_mesh_vendor_mesh_send_tid
+0x47a9 mem_mesh_vendor_timer_current_time
+0x47ad mem_system_time
+0x47b1 mem_mesh_adv_data_len
+0x47b2 mem_mesh_adv_data
+0x47d1 mem_mesh_adv_scan_channel
+0x47d2 mem_mesh_advertising_unprovisioned_device_beacon_switch
+0x47d3 mem_mesh_advertising_unprovisioned_device_beacon_timer
+0x47d5 mem_mesh_advertising_unprovisioned_device_beacon_duration
+0x47d6 mem_mesh_advertising_unprovisioned_device_beacon_interval
+0x47d7 mem_mesh_calc_ConfirmationCloud_data
+0x47d7 mem_mesh_ConfirmationCloud_RandomB
+0x47df mem_mesh_ConfirmationCloud_RandomA
+0x47e7 mem_mesh_AuthValueProv
+0x47f7 mem_mesh_ConfirmationCloud
+0x4807 mem_mesh_ConfirmationDevice
+0x4807 mem_mesh_calc_ConfirmationDevice_data
+0x4807 mem_mesh_provisioning_random_A
+0x480f mem_mesh_provisioning_random_B
+0x4817 mem_mesh_AuthValueDevice
+0x4827 mem_mesh_Device_Key
+0x4837 mem_mesh_Confirmationkey
+0x4847 mem_mesh_sha256_ConfirmationKey_ascii
+0x4856 mem_mesh_sha256_SessionKey_ascii
+0x4860 mem_mesh_sha256_DeviceKey_ascii
+0x4869 mem_mesh_sha256_load_first_data_flag
+0x486a mem_mesh_sha256_data_len_byte
+0x4872 mem_mesh_sha256_data_len_bit
+0x487a mem_mesh_sha256_data_end_addr
+0x487c mem_mesh_sha256_data_len_addr
+0x487e mem_mesh_sha256_chunk_count
+0x487f mem_mesh_sha256_chunk_data_ptr
+0x4881 mem_mesh_sha256_chunk_ptr
+0x4883 mem_k2_P_len
+0x4884 mem_k2_P
+0x4894 mem_k2_N
+0x48a4 mem_k2_SALT
+0x48b4 mem_k2_T
+0x48c4 mem_k2_T0
+0x48c4 mem_k2_T1
+0x48d4 mem_k2_NID
+0x48d5 mem_k2_T3
+0x48e5 mem_k2_T2
+0x48f5 mem_k4_SALT
+0x4905 mem_k4_T
+0x4915 mem_k4_id6_01
+0x4925 mem_k4_k4N
+0x4935 mem_mesh_transport_AID
+0x4936 mem_k3_SALT
+0x4946 mem_k3_T
+0x4956 mem_k3_id64_01
+0x495b mem_k3_k4N
+0x4963 mem_mesh_network_id
+0x496b mem_mesh_provisioned_flag
+0x496c mem_mesh_Provisioning_State_Flag
+0x496d mem_mesh_Device_PID
+0x496e mem_mesh_UUID_FeatureFlag
+0x496f mem_mesh_PDU_RFU
+0x4971 mem_mesh_OOB_information
+0x4973 mem_mesh_Encrypt_Provisioning_Data
+0x4973 mem_mesh_provisioning_data_Mac_addr
+0x4975 mem_mesh_KeyFresh_and_Update_flag
+0x4976 mem_mesh_Network_Key
+0x4986 mem_mesh_last_IV_Index_byte
+0x4987 mem_mesh_Unicast_Address
+0x4989 mem_mesh_adv_last_time
+0x498d mem_mesh_send_packet_timeout
+0x498f mem_mesh_gatt_package_send_msg_id
+0x4990 mem_mesh_gatt_receive_msg_timer
+0x4991 mem_mesh_gatt_packet_receive_msg_buffer1
+0x49b2 mem_mesh_gatt_packet_receive_msg_buffer2
+0x49d3 mem_mesh_three_tuple_ProductID
+0x49d7 mem_mesh_three_tuple_MAC
+0x49dd mem_mesh_three_tuple_secret
+0x49ed mem_mesh_cb_receive_advertising
+0x49ef mem_mesh_cb_receive_access_message
+0x49f1 mem_mesh_cb_receive_config_appkey_add
+0x49f3 mem_mesh_cb_pairing_fail
+0x49f5 mem_mesh_cb_recv_vendor
+0x49f7 mem_mesh_scan_selete_next_ch
+0x49f9 mem_mesh_cb_generic_onoff_get
+0x49fb mem_mesh_cb_generic_onoff_set
+0x49fd mem_mesh_cb_scene_recall
+0x49ff mem_mesh_cb_light_lightness_set
+0x4a01 mem_mesh_cb_light_lightness_get
+0x4a03 mem_mesh_cb_light_ctl_set
+0x4a05 mem_mesh_cb_main_light_onoff_set
+0x4a07 mem_mesh_cb_background_onoff_set
+0x4a09 mem_mesh_cb_color_set
+0x4a0b mem_mesh_cb_network_relay
+0x4a0d mem_mesh_cb_receive_node_reset
+0x4a0f mem_mesh_cb_seq_changed
+0x4a11 mem_mesh_cb_subscriptuion_list_changed
+0x4a13 mem_mesh_cb_vendor_timing_changed
+0x4a15 mem_mesh_core_feature
+0x4a17 mem_mesh_element_number
+0x4a18 mem_mesh_element_device_ptr
+0x4a1a mem_mesh_element_device_length
+0x4a1c mem_mesh_segmented_access_message_SZMIC
+0x4a1d mem_mesh_segmented_access_message_SeqZero
+0x4a1f mem_mesh_segmented_access_message_SegO
+0x4a20 mem_mesh_segmented_access_message_SegN
+0x4a21 mem_mesh_segmented_access_message_BlockAck
+0x4a25 mem_mesh_segmented_access_message_receive_finish
+0x4a26 mem_mesh_segmented_access_message_current_length
+0x4a27 mem_mesh_segmented_access_message_SegN_upper_limit
+0x4a28 mem_mesh_segmented_access_message_Segment_ptr
+0x4a2a mem_mesh_last_CTL_Temperature
+0x4a2c mem_mesh_receive_group_address
+0x4a2d mem_mesh_receive_element_number
+0x4a2e mem_mesh_IV_Index
+0x4a32 mem_mesh_TMALL_cache_start
+0x4a32 mem_mesh_TMALL_SRC1
+0x4a34 mem_mesh_TMALL_SEQ1
+0x4a37 mem_mesh_TMALL_cache
+0x4a64 mem_mesh_TMALL_cache_end
+0x4a64 mem_mesh_transport_message_mic_cache
+0x4a64 mem_mesh_transport_message_mic_cache_buff1
+0x4a68 mem_mesh_transport_message_mic_cache_buff2_10
+0x4a8c mem_mesh_network_relay_queue
+0x4a8c mem_mesh_network_relay_queue_each_size
+0x4a8d mem_mesh_network_relay_queue_length
+0x4a8e mem_mesh_network_relay_queue_current_num
+0x4a8f mem_mesh_network_relay_queue_read_ptr
+0x4a90 mem_mesh_network_relay_queue_write_ptr
+0x4a91 mem_mesh_network_relay_queue_ele
+0x4b19 mem_mesh_application_key
+0x4b29 mem_mesh_ASZMIC
+0x4b2a mem_mesh_access_message_mic_cache
+0x4b2a mem_mesh_access_message_mic_cache_buff1
+0x4b2e mem_mesh_access_message_mic_cache_buff2_10
+0x4b52 mem_mesh_send_message_SEQ
+0x4b55 mem_mesh_send_message_SRC
+0x4b57 mem_mesh_send_message_TTL
+0x4b58 mem_mesh_send_upper_layer_IVI_and_NID
+0x4b59 mem_mesh_send_upper_layer_CTL_and_TTL
+0x4b5a mem_mesh_send_upper_layer_SEQ
+0x4b5d mem_mesh_send_upper_layer_SRC
+0x4b5f mem_mesh_send_upper_layer_DST
+0x4b61 mem_mesh_send_access_lower_transport_layer
+0x4b71 mem_mesh_send_network_layer_NetMIC
+0x4b75 mem_mesh_element_device
+0x4b75 mem_mesh_element_device_group_addr
+0x4b77 mem_mesh_element_device_queue_buffer_ptr
+0x4b79 mem_mesh_element_device_timing_ptr
+0x4b7b mem_mesh_element_device_element_subscription_label
+0x4b8b mem_mesh_element_upper_adv_flag
+0x4b8c mem_mesh_element_upper_queue_buffer_ptr
+0x4b8e mem_mesh_element_tran_package_tid
+0x4b8f mem_mesh_element_tran_package_type
+0x4b90 mem_mesh_element_device1
+0x4bab mem_mesh_element_device2
+0x4bc6 mem_mesh_segmented_access_message_Segment
+0x4bea mem_mesh_element_device_queue_each_size
+0x4beb mem_mesh_element_device_queue_length
+0x4bec mem_mesh_element_device_queue_current_num
+0x4bed mem_mesh_element_device_queue_read_ptr
+0x4bee mem_mesh_element_device_queue_write_ptr
+0x4bef mem_mesh_element_device_queue_ele
+0x4c77 mem_mesh_element_device_upper_queue_each_size
+0x4c78 mem_mesh_element_device_upper_queue_length
+0x4c79 mem_mesh_element_device_upper_queue_current_num
+0x4c7a mem_mesh_element_device_upper_queue_read_ptr
+0x4c7b mem_mesh_element_device_upper_queue_write_ptr
+0x4c7c mem_mesh_element_device_upper_queue_ele
+0x4d38 mem_mesh_le_att_list
+0x47a7 mem_antl_lpm_interval
+0x47a9 mem_antl_adv_interval
+0x47ab mem_antl_slow_adv_lpm_interval
+0x47ad mem_antl_slow_adv_adv_interval
+0x47af mem_antl_led_style
+0x47af mem_antl_led_type
+0x47b0 mem_antl_led_blink_count
+0x47b1 mem_antl_led_gpio
+0x47b2 mem_antl_led_on_time
+0x47b4 mem_antl_led_off_time
+0x47b6 mem_antl_led_cb_on
+0x47b8 mem_antl_led_cb_off
+0x47ba mem_antl_buzzer_style
+0x47ba mem_antl_buzzer_type
+0x47bb mem_antl_buzzer_blink_count
+0x47bc mem_antl_buzzer_gpio
+0x47bd mem_antl_buzzer_on_time
+0x47bf mem_antl_buzzer_off_time
+0x47c1 mem_antl_buzzer_cb_on
+0x47c3 mem_antl_buzzer_cb_off
+0x47c5 mem_antl_fast_adv_led_style
+0x47c5 mem_antl_fast_adv_led_type
+0x47c6 mem_antl_fast_adv_led_blink_count
+0x47c7 mem_antl_fast_adv_led_gpio
+0x47c8 mem_antl_fast_adv_led_on_time
+0x47ca mem_antl_fast_adv_led_off_time
+0x47cc mem_antl_slow_adv_led_style
+0x47cc mem_antl_slow_adv_led_type
+0x47cd mem_antl_slow_adv_led_blink_count
+0x47ce mem_antl_slow_adv_led_gpio
+0x47cf mem_antl_slow_adv_led_on_time
+0x47d1 mem_antl_slow_adv_led_off_time
+0x47d3 mem_antl_power_starting_led_style
+0x47d3 mem_antl_power_starting_led_type
+0x47d4 mem_antl_power_starting_led_blink_count
+0x47d5 mem_antl_power_starting_led_gpio
+0x47d6 mem_antl_power_starting_led_on_time
+0x47d8 mem_antl_power_starting_led_off_time
+0x47da mem_antl_power_starting_buzzer_style
+0x47e1 mem_antl_power_off_led_style
+0x47e1 mem_antl_power_off_led_type
+0x47e2 mem_antl_power_off_led_link_count
+0x47e3 mem_antl_power_off_led_gpio
+0x47e4 mem_antl_power_off_led_on_time
+0x47e6 mem_antl_power_off_led_off_time
+0x47e8 mem_antl_power_off_buzzer_style
+0x47e8 mem_antl_power_off_buzzer_type
+0x47e9 mem_antl_power_off_buzzer_link_count
+0x47ea mem_antl_power_off_buzzer_gpio
+0x47eb mem_antl_power_off_buzzer_on_time
+0x47ed mem_antl_power_off_buzzer_off_time
+0x47ef mem_antl_alert_led_stlye
+0x47f6 mem_antl_alert_buzzer_stlye
+0x47f6 mem_antl_alert_buzzer_type
+0x47f7 mem_antl_alert_buzzer_blink_count
+0x47f8 mem_antl_alert_buzzer_gpio
+0x47f9 mem_antl_alert_buzzer_on_time
+0x47fb mem_antl_alert_buzzer_off_time
+0x47fd mem_antl_key_led_style
+0x47fd mem_antl_key_led_type
+0x47fe mem_antl_key_led_blink_count
+0x47ff mem_antl_key_led_gpio
+0x4800 mem_antl_key_led_on_time
+0x4802 mem_antl_key_led_off_time
+0x4804 mem_antl_key_buzzer_style
+0x480b mem_antl_queue_width
+0x480c mem_antl_queue_depth
+0x480d mem_antl_queue_curr_num
+0x480e mem_antl_queue_read_ptr
+0x480f mem_antl_queue_write_ptr
+0x4810 mem_antl_queue_buff
+0x4860 mem_antl_key_scan_enable
+0x4861 mem_antl_led_num
+0x4862 mem_antl_led_gpio_map
+0x4866 mem_antl_power_param
+0x4866 mem_antl_power_state
+0x4867 mem_antl_power_timer
+0x4868 mem_antl_power_off_timeout
+0x4869 mem_antl_power_starting_timeout
+0x486a mem_antl_power_off_cb
+0x486c mem_antl_power_starting_cb
+0x486e mem_antl_power_standby_cb
+0x4870 mem_event_button_up_cb
+0x4872 mem_antl_key_num
+0x4873 mem_cb_antl_key
+0x4875 mem_antl_key_conf0
+0x4879 mem_antl_key0_press
+0x4888 mem_antl_key0_release
+0x4897 mem_antl_conn_updata_procedure_state
+0x4898 mem_client_characteristic_configuration_descriptor
+0x489a mem_adc_timer
+0x489c mem_antl_conn_update_timer
+0x489d mem_antl_send_updata_le_param_timer
+0x489e mem_antl_le_sleep_timer
+0x48a0 mem_antl_fast_adv_timer
+0x48a2 mem_antl_fast_adv_timeout
+0x48a4 mem_antl_le_sleep_timeout
+0x48a6 mem_double_click_timer
+0x48a7 mem_butten_click_cnt
+0x48a8 mem_antl_led_state
+0x48a9 mem_antl_buzzer_state
+0x48aa mem_antl_key_state
+0x48ab mem_antl_lost_mode
+0x48ac mem_alarm_config
+0x48ad mem_alarm_config_notfy_cnt
+0x48ae mem_buzzer_pwm_conf
+0x48b4 mem_adc_timeout
+0x48b6 mem_voltage_remain_percent
+0x48b7 mem_battery_calculate_set
+0x48b7 mem_battery_full_voltage
+0x48b9 mem_battery_empty_voltage
+0x48bb mem_battery_low_voltage
+0x48bd mem_battery_current_voltage
+0x48bf mem_rx_window_sniff_inc
+0x48c1 mem_interval_increment
+0x48c3 mem_antl_le_interval_min
+0x48c5 mem_antl_le_interval_max
+0x48c7 mem_antl_le_latency
+0x48c9 mem_antl_le_timeout
+0x48cb mem_antl_le_unnormal_interval_min
+0x48cd mem_antl_le_unnormal_interval_max
+0x48cf mem_antl_le_unnormal_latency
+0x48d1 mem_antl_le_unnormal_timeout
+0x48d3 mem_AntiLost_le_att_list
+0x4a63 mem_lestate_update_param_flag
+0x4a64 mem_antilost_conn_battery_send_timer
+0x4a65 mem_antl_disconn_buzzer_on_timer
+0x4a67 mem_antl_disconn_buzzer_on_timeout
+0x47a7 mem_24g_rxbuf
+0x47c9 mem_24g_txbuf
+0x47e9 mem_24g_txpayload
+0x480d mem_24g_rxpayload
+0x482d mem_24g_rxdata_length
+0x482e mem_24g_pid
+0x482f mem_24g_no_ack
+0x4830 mem_24g_sta_crc
+0x4833 mem_24g_last_crc
+0x4836 mem_24g_sta_pid
+0x4837 mem_24g_last_pid
+0x4838 mem_24g_datalen
+0x4839 mem_24g_data_type
+0x483a mem_24g_txlen
+0x483b mem_24g_rx_window
+0x483d mem_24g_ch
+0x483e mem_24g_current_ch_number
+0x483f mem_24g_addr
+0x4843 mem_24g_ch_map1
+0x4847 mem_24g_ch_map2
+0x484b mem_24g_ch_map3
+0x484f mem_24g_ch_map4
+0x4853 mem_24g_tx_btclk
+0x4857 mem_24g_interval
+0x4858 mem_24g_interval_min
+0x4859 mem_24g_interval_max
+0x485a mem_24g_syncword
+0x485c mem_24g_syncword_crc8
+0x485d mem_24g_get_syncword_crc8
+0x485e mem_24g_pair_switch
+0x485f mem_24g_enter_hibernate
+0x4867 mem_24g_rx_phy
+0x4868 mem_24g_tx_phy
+0x4869 mem_24g_ch_map_update
+0x486a mem_24g_ch_update_map1
+0x486e mem_24g_ch_update_map2
+0x4872 mem_24g_ch_update_map3
+0x4876 mem_24g_ch_update_map4
+0x487a mem_24g_disable_fec1
+0x487b mem_24g_pair_addr
+0x487f mem_24g_pair_ch
+0x4880 mem_24g_pair_tx_power
+0x4881 mem_rssi_buff_index
+0x4882 mem_24g_device1_bind_step
+0x4883 mem_24g_device2_bind_step
+0x4884 mem_24g_bind_device_status
+0x4885 mem_24g_bind_payload
+0x488d mem_cb_24g_receive_process
+0x488f mem_cb_24g_ackpayload
+0x4891 mem_cb_24g_data_device1
+0x4893 mem_cb_24g_data_device2
+0x4895 mem_24g_rxdata_temp
+0x48b7 mem_24g_abort_packet
+0x48b8 mem_24g_hop_btclk
+0x48bc mem_24g_hop_interval
+0x48bd mem_24g_pair_mode
+0x48be mem_24g_ackpayload_enable
+0x48bf mem_24g_hop_packet
+0x48c0 mem_24g_mode_switch
+0x48c1 mem_24g_nodata_timer_enable
+0x48c2 mem_24g_mode_init
+0x48c3 mem_24g_work_mode
+0x48c4 mem_24g_time_slice
+0x48c5 mem_24g_self_last_ch
+0x48c6 mem_24g_self_ch_number
+0x48c7 mem_24g_self_config_ch_once
+0x48c8 mem_24g_device1_last_ch
+0x48c9 mem_24g_device1_ch_number
+0x48ca mem_24g_device1_config_ch_once
+0x48cb mem_24g_device2_last_ch
+0x48cc mem_24g_device2_ch_number
+0x48cd mem_24g_device2_config_ch_once
+0x48ce mem_24g_led_status
+0x48cf mem_24g_bind_mode_continue
+0x48d0 mem_tx_power_temp
+0x48d1 mem_24g_mode_B_S_switch
+0x48d2 mem_24g_mode_B_S_switch_init
+0x48d3 mem_24g_mode_B_S_switch_cnt
+0x48d5 mem_24g_mode_B_S_switch_exit
+0x48d6 mem_24g_B_S_time_slice
+0x48d7 mem_24g_B_S_mode_switch_disable
+0x48d8 mem_24g_bind_device_living
+0x48d9 mem_24g_transmitter_addr
+0x48dd mem_24g_device1_addr
+0x48e1 mem_24g_device2_addr
+0x48e5 mem_rssi_noise_avg
+0x48e6 mem_rssi_noise_index
+0x48e7 mem_rssi_noise_self_avg
+0x48e8 mem_rssi_noise_device1_avg
+0x48e9 mem_rssi_noise_device2_avg
+0x48ea mem_rssi_noise_self_index
+0x48eb mem_rssi_noise_device1_index
+0x48ec mem_rssi_noise_device2_index
+0x48ed mem_rssi_noise_buffer_ptr
+0x48ef mem_rssi_noise_self_buffer_ptr
+0x48f1 mem_rssi_noise_device1_buffer_ptr
+0x48f3 mem_rssi_noise_device2_buffer_ptr
+0x48f5 mem_car_hard_soft_switch
+0x48f6 mem_car_queue_each_size
+0x48f7 mem_car__queue_length
+0x48f8 mem_car_queue_curr_num
+0x48f9 mem_car_queue_read_ptr
+0x48fa mem_car_queue_write_ptr
+0x48fb mem_car_queue_ele
+0x4973 mem_car_pop_queue_buff
+0x4987 mem_car_led_num
+0x4988 mem_car_led_map
+0x4992 mem_car_style1_led_type
+0x4993 mem_car_style1_blink_count
+0x4994 mem_car_style1_struct_led_gpio
+0x4995 mem_car_style1_on_time
+0x4997 mem_car_style1_off_time
+0x4999 mem_car_style1_cb_ledon
+0x499b mem_car_style1_cb_ledoff
+0x499d mem_car_style2_led_type
+0x499e mem_car_style2_blink_count
+0x499f mem_car_style2_struct_led_gpio
+0x49a0 mem_car_style2_on_time
+0x49a2 mem_car_style2_off_time
+0x49a4 mem_car_style2_cb_ledon
+0x49a6 mem_car_style2_cb_ledoff
+0x49a8 mem_le_receive_data
+0x49a8 mem_le_receive_packet_head
+0x49aa mem_le_receive_cmd
+0x49ab mem_le_receive_length
+0x49ad mem_le_receive_payload
+0x49b7 mem_le_receive_checksum
+0x49b8 mem_motor1_status
+0x49b9 mem_motor1_speed
+0x49ba mem_motor2_status
+0x49bb mem_motor2_speed
+0x49bc mem_motor3_status
+0x49bd mem_motor3_speed
+0x49be mem_motor1_pwm_set
+0x49be mem_motor1_pwm_pin1_set
+0x49bf mem_motor1_pwm_pin2_set
+0x49c0 mem_motor1_pwm_pin_set
+0x49c1 mem_motor1_pwm_channel_set
+0x49c2 mem_motor1_pwm_freq_set
+0x49c5 mem_motor1_pwm_dute_set
+0x49c6 mem_motor2_pwm_set
+0x49c6 mem_motor2_pwm_pin1_set
+0x49c7 mem_motor2_pwm_pin2_set
+0x49c8 mem_motor2_pwm_pin_set
+0x49c9 mem_motor2_pwm_channel_set
+0x49ca mem_motor2_pwm_freq_set
+0x49cd mem_motor2_pwm_dute_set
+0x49ce mem_motor3_pwm_set
+0x49ce mem_motor3_pwm_pin1_set
+0x49cf mem_motor3_pwm_pin2_set
+0x49d0 mem_motor3_pwm_pin_set
+0x49d1 mem_motor3_pwm_channel_set
+0x49d2 mem_motor3_pwm_freq_set
+0x49d5 mem_motor3_pwm_dute_set
+0x49d6 mem_motor_select_p_n
+0x49d7 mem_car_motor_status
+0x49d8 mem_car_motor_speed
+0x49d9 mem_motor_pwm_set
+0x49d9 mem_motor_pwm_pin1_set
+0x49da mem_motor_pwm_pin2_set
+0x49db mem_motor_pwm_pin_set
+0x49dc mem_motor_pwm_channel_set
+0x49dd mem_motor_pwm_freq_set
+0x49e0 mem_motor_pwm_dute_set
+0x49e1 mem_ir_rx_gpio
+0x49e2 mem_ir_data
+0x49e4 mem_ir_rx_buf
+0x49e6 mem_ir_receive_clkn
+0x49ea mem_ir_notify_data
+0x49ed mem_ir_notify_data_head
+0x49f2 mem_ir_notify_data_payload
+0x49f4 mem_ir_notify_data_check_sum
+0x49f5 mem_car_ir_breakdown_check_timer
+0x49f6 mem_car_ir_breakdown_flag
+0x49f7 mem_car_led_control
+0x49f7 mem_car_led1_status
+0x49f8 mem_car_led2_status
+0x49f9 mem_car_led3_status
+0x49fa mem_car_led4_status
+0x49fb mem_car_led5_status
+0x49fc mem_car_led6_status
+0x49fd mem_car_led7_status
+0x49fe mem_car_led8_status
+0x49ff mem_car_led_control_timer
+0x4a00 mem_car_led_blink_status
+0x4a01 mem_car_led_no
+0x4a02 mem_car_info_request
+0x4a05 mem_car_info_request_head
+0x4a0a mem_car_info_request_payload
+0x4a12 mem_car_info_request_checksum
+0x4a13 mem_car_config_param
+0x4a13 mem_car_config_setting_flag
+0x4a14 mem_car_config_device_select
+0x4a15 mem_car_config_motor_layout
+0x4a16 mem_car_config_ir_enable
+0x4a17 mem_car_config_ir_rx_gpio
+0x4a18 mem_car_config_pairing_led_conn_status
+0x4a19 mem_car_config_pairing_led_gpio
+0x4a1a mem_car_config_led_num
+0x4a1b mem_car_config_blood_led_gpio
+0x4a1b mem_car_config_blood_led1_gpio
+0x4a1c mem_car_config_blood_led2_gpio
+0x4a1d mem_car_config_blood_led3_gpio
+0x4a1e mem_car_config_blood_led4_gpio
+0x4a1f mem_car_config_blood_led5_gpio
+0x4a20 mem_car_config_blood_led6_gpio
+0x4a21 mem_car_config_blood_led7_gpio
+0x4a22 mem_car_config_blood_led8_gpio
+0x4a23 mem_car_config_bat_notify_enable
+0x4a24 mem_car_config_low_voltage_led_gpio
+0x4a25 mem_car_config_low_voltage_percent
+0x4a26 mem_car_config_soft_switch_enable
+0x4a27 mem_car_config_soft_switch_gpio
+0x4a28 mem_car_notify_vdd_count
+0x4a29 mem_car_notify_vdd_timer
+0x4a2a mem_car_notify_vdd_value_last
+0x4a2b mem_car_notify_vdd_percent
+0x4a2c mem_car_working_flag
+0x4a2d mem_low_bat_flag
+0x4a2e mem_notify_bat_packet
+0x4a31 mem_notify_bat_head
+0x4a36 mem_notify_bat_payload
+0x4a37 mem_notify_bat_check_sum
+0x4a38 mem_vdd_notify_flag
+0x4a39 mem_car_current_vdd_value_temp
+0x4a3b mem_car_last_vdd_value
+0x4a3d mem_vdd_calculate_set
+0x4a3d mem_vdd_full_vol
+0x4a3f mem_vdd_empty_vol
+0x4a41 mem_vdd_low_vol
+0x4a43 mem_vdd_now_vol
+0x4a45 mem_car_24g_status
+0x4a46 mem_car_24g_no_data_timeout_count
+0x4a48 mem_car_24g_no_data_timeout_timer
+0x4a4a mem_car_24g_ir_receive_attack_count
+0x4a4b mem_car_24g_go_die_flag
+0x4a4c mem_car_attack_shake_timer
+0x4a4d mem_car_attack_shake_flag
+0x4a4e mem_car_soft_power
+0x4a4e mem_car_power_state
+0x4a4f mem_car_power_timer
+0x4a50 mem_car_power_off_timeout
+0x4a51 mem_car_power_starting_timeout
+0x4a52 mem_car_power_off_cb
+0x4a54 mem_car_power_starting_cb
+0x4a56 mem_car_power_standby_cb
+0x4a58 mem_car_ui_button_up_cb
+0x4a5a mem_car_le_att_list
+0x4c4e mem_car_moto1_blank_timer
+0x4c4f mem_car_moto2_blank_timer
+0x4c50 mem_car_moto3_blank_timer
+0x4c51 mem_car_motor_gpio_num
+0x4c52 mem_car_motor_gpio_map
+0x4c52 mem_car_motor_left_gpio
+0x4c53 mem_car_motor_right_gpio
+0x4c54 mem_car_motor_front_gpio
+0x4c55 mem_car_motor_back_gpio
+0x4c56 mem_car_gpio
+0x4c57 mem_car_app_send_speed
+0x4c58 mem_rssi_sum
+0x4c5a mem_check_rssi_high_count
+0x4c5c mem_rssi_data
+0x4c64 mem_car_24g_received_pac
+0x4c65 mem_car_24g_bind_enable_delay_count
+0x4c66 mem_car_keyscan
+0x4c66 mem_car_key_num
+0x4c67 mem_cb_car_keyscan
+0x4c69 mem_car_enter_lpm_timer_count
+0x4c6b mem_car_enter_lpm_timer
+0x4c6d mem_car_enter_lpm_flag
+0x4c6e mem_car_24g_ch_polling
+0x4c6f mem_car_rssi_noise_buffer
+0x4c77 mem_car_rssi_noise_car_buffer
+0x4c7f mem_car_rssi_noise_remote_buffer
+0x48f5 mem_dg_kb_bind_flag
+0x48f6 mem_dg_kb_data_sta_data
+0x48fe mem_dg_kb_data_last_data
+0x4906 mem_dg_kb_multikey_sta_data
+0x4909 mem_dg_kb_multikey_last_data
+0x490c mem_dg_kb_system_sta_data
+0x490f mem_dg_kb_system_last_data
+0x4912 mem_dg_kb_blank_data_enable
+0x4913 mem_dg_kb_mul_blank_data_enable
+0x4914 mem_dg_ms_blank_data_enable
+0x4915 mem_dg_sys_config
+0x4916 mem_dg_usb_vid_pid
+0x491f mem_dg_usb_tx_interval
+0x4920 mem_dg_usb_device_name
+0x493e mem_dg_kb_bind_success
+0x493f mem_dg_pc_sleep_flag
+0x4940 mem_test_blank_data
+0x4882 mem_rssi_hex_received
+0x4883 mem_24g_pair_sm
+0x4884 mem_24g_pair_no_ack
+0x4885 mem_24g_pair_timeout_init
+0x4887 mem_24g_pair_timeout
+0x4889 mem_24g_reconn_timeout_init
+0x488b mem_24g_reconn_timeout
+0x488d mem_24g_reconn_count
+0x488f mem_24g_reconn_type
+0x4890 mem_24g_fast_conn_enable
+0x4891 mem_24g_fast_conn_addr
+0x4895 mem_24g_receiver_addr
+0x4899 mem_24g_fast_conn_temp_ch
+0x489a mem_24g_receiver_temp_ch
+0x489b mem_24g_device_temp_ch
+0x489c mem_rssi_signal_index
+0x489d mem_rssi_signal_buf_ptr
+0x489f mem_cb_24g_transmit_data
+0x48a1 mem_cb_24g_search_receiver
+0x48a3 mem_cb_24g_lpm_before
+0x48a5 mem_24g_conn_sm
+0x48a6 mem_24g_ensure
+0x48a7 mem_24g_txfail_cnt
+0x48a9 mem_24g_attempt_fail_flag
+0x48aa mem_24g_retry
+0x48ab mem_24g_abort_pac
+0x48ac mem_24g_max_retry
+0x48ad mem_24g_device_addr
+0x48b1 mem_24g_short_sleep_set
+0x48b4 mem_24g_long_sleep_set
+0x48bc mem_24g_long_sleep_set1
+0x48c0 mem_24g_pac_index
+0x48c1 mem_24g_transmit_by_interrupt
+0x48c2 mem_24g_transmit_by_interrupt_exit_count
+0x48c4 mem_24g_transmit_by_interrupt_exit_count_init
+0x48c6 mem_24g_long_sleep_param_update_timer_init
+0x48c8 mem_24g_long_sleep_param_update_timer
+0x48ca mem_24g_fast_hop_count
+0x48cb mem_rssi_avg_received
+0x48cc mem_power_ctrl_level
+0x48cd mem_power_ctrl_pac_succ_cnt
+0x48ce mem_power_ctrl_pac_succ_cnt_init
+0x48cf mem_rssi_dis_min_24g
+0x48d0 mem_rssi_dis_max_24g
+0x48d1 mem_rssi_hex_received_max_value
+0x48d2 mem_rssi_dis_min_ble
+0x48d3 mem_rssi_dis_max_ble
+0x48d4 mem_mouse_key
+0x48d5 mem_mouse_x
+0x48d7 mem_mouse_y
+0x48d9 mem_mouse_z
+0x48da mem_mouse_tz
+0x48db mem_mouse_xy_h
+0x48dc mem_mouse_key_last
+0x48dd mem_wheel_tb_old_pinlevel
+0x48de mem_wheel_tb_new_pinlevel
+0x48df mem_wheel_tog
+0x48e0 mem_mouse_tz_data
+0x48e1 mem_mwheel_b_old_pinlevel
+0x48e2 mem_mwheel_b_new_pinlevel
+0x48e3 mem_mwheel_tog
+0x48e4 mem_mouse_z_data
+0x48e5 mem_mouse_wheel_trigger
+0x48e6 mem_mouse_wheel_trigger_timer
+0x48e7 mem_mouse_vdd_calculate_set
+0x48e7 mem_mouse_vdd_full_vol
+0x48e9 mem_mouse_vdd_empty_vol
+0x48eb mem_mouse_vdd_low_vol
+0x48ed mem_mouse_vdd_now_vol
+0x48ef mem_mouse_vdd_button_press_vol
+0x48f1 mem_mouse_vdd_switch_gnd_24g_vol
+0x48f3 mem_mouse_vdd_switch_gnd_full_vol
+0x48f5 mem_mouse_vdd_switch_gnd_shutdown_voltage
+0x48f7 mem_mouse_vdd_switch_gnd_low_voltage
+0x48f9 mem_adc_mux_status
+0x48fa mem_adc_read_timer
+0x48fb mem_adc_read_time_init
+0x48fc mem_adc_low_volatage_led_timer_count
+0x48fd mem_adc_low_volatage_led_blink_enable
+0x48fe mem_mouse_adc_last_low_voltage_flag
+0x48ff mem_mouse_adc_button_press_flag
+0x4900 mem_adc_channel_gpio
+0x4901 mem_adc_config_flag_init
+0x4902 mem_mouse_discovery_timeout
+0x4904 mem_mouse_24g_pair_timeout_init
+0x4906 mem_mouse_direct_timeout
+0x4907 mem_mouse_24g_reconn_timeout_init
+0x4908 mem_mouse_24g_pair_tx_power
+0x4909 mem_rssi_dis_min_24g_init
+0x490a mem_rssi_dis_max_24g_init
+0x490b mem_rssi_hex_received_max_value_init
+0x490c mem_rssi_dis_min_ble_init
+0x490d mem_rssi_dis_max_ble_init
+0x490e mem_mouse_enable_flag
+0x490f mem_mouse_global_setup
+0x4910 mem_mouse_global_setup1
+0x4911 mem_bk_button_gpio
+0x4912 mem_fw_button_gpio
+0x4913 mem_dpi_button_gpio
+0x4914 mem_matrix_public_gpio
+0x4915 mem_sensor_motion_gpio
+0x4916 mem_customer_key_gpio
+0x4917 mem_whee_a_data_gpio
+0x4918 mem_whee_b_data_gpio
+0x4919 mem_config_device_24g_led_gpio
+0x491a mem_select_sensor_angle_gpio
+0x491b mem_mouse_reuse_2ice_gpio
+0x491c mem_lbutton_gpio
+0x491d mem_rbutton_gpio
+0x491e mem_mbutton_gpio
+0x491f mem_config_select_device_button_gpio
+0x4920 mem_whee_ta_data_gpio
+0x4921 mem_whee_tb_data_gpio
+0x4922 mem_device_switch_gpio
+0x4923 mem_mouse_sensor_sclk_gpio
+0x4924 mem_mouse_sensor_sdio_gpio
+0x4925 mem_config_low_voltage_alarm_gpio
+0x4926 mem_config_device_bt1_led_gpio
+0x4927 mem_config_device_bt2_led_gpio
+0x4928 mem_dpi_led_gpio
+0x4929 mem_sensor_angle_default
+0x492a mem_sensor_angle_switch
+0x492b mem_config_sensor_dpi
+0x492c mem_config_sensor_type
+0x492d mem_config_sensor_angle
+0x492e mem_wire_usb_interval
+0x492f mem_usb_addr
+0x4930 mem_mouse_usb_vdd_status
+0x4931 mem_mouse_usb_keyboard_flag
+0x4932 mem_mouse_led_type
+0x4933 mem_mouse_blink_count
+0x4934 mem_mouse_struct_led_gpio
+0x4935 mem_mouse_on_time
+0x4937 mem_mouse_off_time
+0x4939 mem_mouse_cb_ledon
+0x493b mem_mouse_cb_ledoff
+0x493d mem_mouse_information_start
+0x493d mem_device_flag
+0x493e mem_device1_type
+0x493f mem_device1_addr
+0x4945 mem_device1_link_key
+0x4955 mem_device1_locall_addr
+0x495b mem_device2_type
+0x495c mem_device2_addr
+0x4962 mem_device2_link_key
+0x4972 mem_device2_locall_addr
+0x4978 mem_device3_type
+0x4979 mem_mouse_compare_addr_ff
+0x4979 mem_device3_addr
+0x497f mem_device3_link_key
+0x498f mem_device3_locall_addr
+0x4995 mem_store_flag
+0x4997 mem_mouse_dpi
+0x4998 mem_mouse_24g_addr
+0x499c mem_random_addr_increase_count
+0x499e mem_mouse_retention
+0x49bd mem_mouse_information_end
+0x49bd mem_flash_base
+0x49c0 mem_write_flash_head_temp
+0x49c4 mem_store_information_delay_timer
+0x49c5 mem_store_information_delay_timer_init
+0x49c6 mem_sensor_id1
+0x49c7 mem_sensor_id2
+0x49c8 mem_sensor_shutter_hi
+0x49c9 mem_sensor_shutter_lo
+0x49ca mem_sensor_smart_flag
+0x49cb mem_sensor_squal_reg
+0x49cc mem_sensor_iqc
+0x49cd mem_mouse_move_flag
+0x49ce mem_mouse_asm_flag
+0x49cf mem_mouse_x_pre
+0x49d1 mem_mouse_y_pre
+0x49d3 mem_mouse_data_xtemp
+0x49d4 mem_mouse_data_ytemp
+0x49d5 mem_mouse_dpi_seting
+0x49d5 mem_320x_dpi_0
+0x49d6 mem_320x_dpi_1
+0x49d7 mem_320x_dpi_2
+0x49d8 mem_320x_dpi_3
+0x49d9 mem_3212_dpi_0
+0x49da mem_3212_dpi_1
+0x49db mem_3212_dpi_2
+0x49dc mem_3212_dpi_3
+0x49dd mem_ka8g2_dpi_0
+0x49de mem_ka8g2_dpi_1
+0x49df mem_ka8g2_dpi_2
+0x49e0 mem_ka8g2_dpi_3
+0x49e1 mem_mouse_cpi_count
+0x49e2 mem_mouse_dpi_button_state
+0x49e3 mem_mouse_dpi_long_press_flag
+0x49e4 mem_sensor_3212_init
+0x49ee mem_sensor_3204_init
+0x49f8 mem_sensor_3205_init
+0x4a02 mem_sensor_32xx_init
+0x4a1c mem_sensor_32xx_init_1
+0x4a3e mem_sensor_8650_init
+0x4a64 mem_sensor_ka8ul_init
+0x4a82 mem_sensor_8009_init
+0x4a92 mem_sensor_ka8g2_init
+0x4aa8 mem_sensor_p6520_init
+0x4ab4 mem_sensor_poweron_init
+0x4abc mem_sensor_reset_gpio
+0x4abd mem_mouse_clear_sensor_data_flag
+0x4abe mem_bluetooth_125hz_cnt
+0x4abf mem_mouse_long_mult_flag
+0x4ac0 mem_mouse_current_mult_timer
+0x4ac1 mem_reconn_times
+0x4ac2 mem_reconn_times_init
+0x4ac3 mem_mouse_no_data_timer
+0x4ac5 mem_device_flag_temp
+0x4ac6 mem_mouse_rssi_signal_buf
+0x4ace mem_btclk_sensor
+0x4ad2 mem_mouse_bluetooth_fast_conn_flag
+0x4ad3 mem_mouse_discovery_timer
+0x4ad5 mem_mouse_bluetooth_reconnect_timeout
+0x4ad6 mem_mouse_need_soft_reset
+0x4ad7 mem_mouse_le_bb_connected_flag
+0x4ad8 mem_mouse_le_reconnect_flag
+0x4ad9 mem_mouse_send_secutiry_request_timer
+0x4ada mem_mouse_le_lap_temp
+0x4add mem_le_adv_ind
+0x4ae0 mem_le_adv_direct_ind
+0x4ae3 mem_le_adv_swift_pair
+0x4af7 mem_le_data_len
+0x4af8 mem_le_keyboard_handle
+0x4afa mem_le_multimedia_handle
+0x4afc mem_le_systemctrl_handle
+0x4afe mem_le_battery_level_handle
+0x4b00 mem_le_battery_level_percentage
+0x4b01 mem_le_battery_level_updata_timer_init
+0x4b03 mem_le_battery_level_updata_timer
+0x4b05 mem_mouse_le_conn_param_reject
+0x4b06 mem_le_tx_buffer0_omemalloc
+0x4b26 mem_le_tx_buffer1_omemalloc
+0x4b46 mem_le_tx_buffer2_omemalloc
+0x4b66 mem_le_tx_buffer3_omemalloc
+0x4b86 mem_le_connect_status_flag
+0x4b87 mem_le_start_encrypt_timer
+0x4b88 mem_mouse_direct_timer
+0x4b89 mem_device_addr_temp
+0x4b90 mem_mouse_enter_sniff_count
+0x4b91 mem_mouse_bt_boot_mode
+0x4b92 mem_mouse_bt_boot_data
+0x4b97 mem_bt_send_max_slot_req_accept_after_switch
+0x4b98 mem_mouse_bt_send_first_package_timer
+0x4b99 mem_mouse_bt_send_first_package_flag
+0x4b9a mem_lmi_opcode_temp
+0x4b9b mem_lpm_mult_init
+0x4b9c mem_customer_key
+0x4b9d mem_customer_data_trigger
+0x4b9e mem_customer_data_trigger_last
+0x4b9f mem_mouse_lkey_press_status
+0x4ba0 mem_mouse_rkey_press_status
+0x4ba1 mem_mouse_mkey_press_status
+0x4ba2 mem_mouse_bkkey_press_status
+0x4ba3 mem_mouse_fwkey_press_status
+0x4ba4 mem_mouse_dpikey_press_status
+0x4ba5 mem_mouse_pbkey_press_status
+0x4ba6 mem_mouse_customerkey_press_status
+0x4ba7 mem_mouse_key_temp
+0x4ba8 mem_mouse_key_status
+0x4ba9 mem_mouse_matrix_key_cow_count
+0x4baa mem_mouse_matrix_key_row_count
+0x4bab mem_mouse_ghost_flag
+0x4bac mem_bt_discovery_count
+0x4bad mem_select_device_count
+0x4bae mem_mouse_commbination_key
+0x4baf mem_select_device_button_statue
+0x4bb0 mem_commbination_key_statue
+0x4bb1 mem_combination_ui_button_count
+0x4bb2 mem_mouse_search_dongle_interval
+0x4bb3 mem_mouse_search_dongle_ch
+0x4bb4 mem_mouse_search_dongle_count
+0x4bb5 mem_mouse_search_dongle_action
+0x4bb6 mem_24g_enter_lpm_timer
+0x4bb7 mem_mouse_24g_enter_lpm_enable
+0x4bb8 mem_mouse_device_poweron_timer_count
+0x4bb9 mem_mouse_dpi_led_delay_count
+0x4bba mem_mouse_led_off_4_led
+0x4bbb mem_24g_device_led_status
+0x4bbc mem_mouse_flag
+0x4bc4 mem_mouse_bluetooth_type
+0x4bc5 mem_device_number
+0x4bc6 mem_mouse_page_to
+0x4bc8 mem_mouse_fast_direct_timeout
+0x4bc9 mem_mouse_fast_page_to
+0x4bcb mem_mouse_24g_power_on_fast_conn_timer
+0x4bcd mem_mouse_24g_search_dongle_time_init
+0x4bcf mem_mouse_no_data_timeout
+0x4bd1 mem_mouse_device_poweron_timer_count_init
+0x4bd2 mem_mouse_dpi_led_delay_count_init
+0x4bd3 mem_mouse_dpi_led_blink_time
+0x4bd5 mem_mouse_disconvey_led_blink_time
+0x4bd7 mem_mouse_low_v_led_blink_time
+0x4bd9 mem_adc_low_volatage_led_blink_timer
+0x4bdb mem_mouse_commbination_key_bt
+0x4bdc mem_mouse_commbination_key_24g
+0x4bdd mem_customer_key_press
+0x4be6 mem_customer_key_release
+0x4bef mem_mouse_set_high_impedance_bit_set
+0x4bf2 mem_sensor_shutdown_flag
+0x4bf3 mem_24g_long_sleep_set_level
+0x4bf4 mem_power_on_flag
+0x4bf5 mem_ka8g2_sensor_poweron_init
+0x4bfd mem_24g_pair_count
+0x4bff mem_le_name_patch_len
+0x4c00 mem_le_name_patch
+0x4c13 mem_mouse_logo_led_gpio
+0x4c14 mem_mouse_logo_led_on_time_init
+0x4c16 mem_24g_tsniff
+0x4c1a mem_tx_count
+0x4c1b mem_tx_time_last
+0x4c21 mem_tx_time_last_delt
+0x4c25 mem_tx_time_sum
+0x4c2a mem_tx_time_sum_count
+0x4c2b mem_tx_time_offset
+0x4c2c mem_24g_short_sleep_set_init
+0x4c2f mem_retransmit
+0x4c31 mem_sleep_miss
+0x4c32 mem_long_sleep_flag
+0x4c33 mem_sleep_miss_temp
+0x4c37 mem_mouse_end
+0x4c37 mem_mouse_rssi_signal_buf_patch
+0x4c47 mem_mouse_rssi_signal_buf_temp
+0x4c57 mem_g24_fast_conn_enable
+0x4c58 mem_xtal_cache
+0x4c59 mem_device_uart_tx_gpio
+0x4c5a mem_device_uart_rx_gpio
+0x4c5b mem_device_uart_rx_buffer
+0x4c5d mem_device_uart_rx_buffer_end
+0x4c5f mem_device_uart_tx_buffer
+0x4c61 mem_device_uart_tx_buffer_end
+0x4c63 mem_device_uart_baud_rate
+0x4c65 mem_24g_paccnt
+0x4c66 mem_rssi_mouse
+0x4c67 mem_clkn_bt_patch
+0x4c6b mem_txpower_print
+0x4c6d mem_sensor_read_count
+0x4c6e mem_sensor_param_change_count
+0x4c6f mem_mouse_le_send_conn_param_update
+0x4c70 mem_mouse_le_send_conn_param_update_timer
+0x4c71 mem_soft_agc_en
+0x4c72 mem_normal_tx_power
+0x4c73 mem_mouse_24g_clear_sensor_data_flag
+0x4c74 mem_sensor_ka5857_init
+0x4c80 mem_3212_dpi_new
+0x4c80 mem_3212_dpi_0_new
+0x4c81 mem_3212_dpi_1_new
+0x4c82 mem_3212_dpi_2_new
+0x4c83 mem_3212_dpi_3_new
+0x4c84 mem_3212_dpi_4_new
+0x4c85 mem_24g_reconn_pairing_switch
+0x4c86 mem_usb_offline_gpio_retention
+0x4c87 mem_usb_tx_interval_retention
+0x4c88 mem_usb_vid_pid_retention
+0x4c91 mem_usb_device_name_retention
+0x4caf mem_usb_mode_enable
+0x4cb0 mem_mouse_led_new_interface_enable
+0x4cb1 mem_mouse_multi_led_blink_enable
+0x4cb2 mem_mouse_multi_led_type
+0x4cb3 mem_mouse_multi_led_state
+0x4cb4 mem_mouse_le_reconn_led_fuction_enable
+0x4cb5 mem_mouse_led_multi_type
+0x4cb6 mem_mouse_multi_led_powon_timer
+0x4cb7 mem_mouse_multi_led_blink_timer_init
+0x4cb8 mem_mouse_multi_led_blink_timer
+0x4cb9 mem_mouse_1io2led_multi_24gled//io confige
+0x4cba mem_mouse_1io2led_multi_bt1led
+0x4cbb mem_mouse_1io2led_multi_bt2led
+0x4cbc mem_mouse_1io2led_dpi_led
+0x4cbd mem_mouse_1io2led_low_led
+0x4cbe mem_mouse_pair_success
+0x4cbf mem_mouse_dpi_led_blink_enable
+0x4cc0 mem_mouse_dpi_blink_count
+0x4cc1 mem_mouse_dpi_blink_time
+0x4cc2 mem_zcode_temp_param0//zcode num
+0x4cc3 mem_zcode_temp_param1//patch ram func addr
+0x4cc5 mem_zcode_temp_param2//patch ram func addr
+0x4cc7 mem_zcode_current_number
+0x4cc8 mem_xip_flash_offset
+0x4ccb mem_flash_start_addr
+0x4cce mem_flash_address
+0x4cd1 mem_zcode_head
+0x48d4 mem_remote_car_hard_soft_switch
+0x48d5 mem_remote_car_queue_each_size
+0x48d6 mem_remote_car_queue_length
+0x48d7 mem_remote_car_queue_curr_num
+0x48d8 mem_remote_car_queue_read_ptr
+0x48d9 mem_remote_car_queue_write_ptr
+0x48da mem_remote_car_queue_ele
+0x4934 mem_remote_style_led_type
+0x4935 mem_remote_style_blink_count
+0x4936 mem_remote_style_struct_led_gpio
+0x4937 mem_remote_style_on_time
+0x4939 mem_remote_style_off_time
+0x493b mem_remote_style_cb_ledon
+0x493d mem_remote_style_cb_ledoff
+0x493f mem_remote_car_led_num
+0x4940 mem_remote_car_led_map
+0x4948 mem_remote_car_keyscan
+0x4948 mem_remote_car_key_num
+0x4949 mem_cb_remote_car_keyscan
+0x494b mem_remote_car_key_conf0
+0x494b mem_remote_car_key_conf0_pin
+0x494c mem_remote_car_key_conf1
+0x494c mem_remote_car_key_conf1_pin
+0x494d mem_remote_car_key_conf2
+0x494d mem_remote_car_key_conf2_pin
+0x494e mem_remote_car_key_conf3
+0x494e mem_remote_car_key_conf3_pin
+0x494f mem_remote_car_key_conf4
+0x494f mem_remote_car_key_conf4_pin
+0x4950 mem_remote_car_key_conf5
+0x4950 mem_remote_car_key_conf5_pin
+0x4951 mem_remote_car_key_conf6
+0x4951 mem_remote_car_key_conf6_pin
+0x4952 mem_rocker_negative_flag
+0x4953 mem_rocker_work_status
+0x4954 mem_current_vdd_value_default_mid_x
+0x4956 mem_current_vdd_value_default_mid_y
+0x4958 mem_current_vdd_value_default_mid_temp
+0x495a mem_current_vdd_default_range
+0x495c mem_rocker_last_status
+0x495e mem_rocker_status
+0x495e mem_rocker_x_status
+0x495f mem_rocker_y_status
+0x4960 mem_remote_car_config_param
+0x4960 mem_remote_car_config_setting_flag
+0x4961 mem_remote_car_config_key_map
+0x4962 mem_remote_car_config_layout
+0x4963 mem_remote_car_config_connect_led_gpio
+0x4964 mem_remote_car_config_check_way
+0x4965 mem_remote_car_config_soft_switch_enable
+0x4966 mem_remote_car_config_soft_switch_gpio
+0x4967 mem_remote_car_config_timeout_shutdown_enable
+0x4968 mem_remote_car_24g_motor_packet
+0x4968 mem_remote_car_24g_motor_packet_lenght
+0x4969 mem_remote_car_24g_motor_send_packet_head
+0x496b mem_remote_car_24g_motor_send_cmd
+0x496c mem_remote_car_24g_motor_send_length
+0x496e mem_remote_car_24g_motor_send_payload
+0x496e mem_remote_car_24g_motor1_payload
+0x4970 mem_remote_car_24g_motor2_payload
+0x4972 mem_remote_car_24g_motor3_payload
+0x4974 mem_remote_car_24g_motor_send_checksum
+0x4975 mem_remote_car_24g_fire_packet
+0x4975 mem_remote_car_24g_fire_packet_lenght
+0x4976 mem_remote_car_24g_fire_send_packet_head
+0x4978 mem_remote_car_24g_fire_send_cmd
+0x4979 mem_remote_car_24g_fire_send_length
+0x497b mem_remote_car_24g_fire_send_payload
+0x497d mem_remote_car_24g_fire_send_checksum
+0x497e mem_remote_car_24g_tx_temp
+0x498d mem_remote_car_no_data_timeout
+0x498f mem_remote_car_no_data_timer
+0x4991 mem_remote_car_soft_power
+0x4991 mem_remote_car_power_state
+0x4992 mem_remote_car_power_timer
+0x4993 mem_remote_car_power_off_timeout
+0x4994 mem_remote_car_power_starting_timeout
+0x4995 mem_remote_car_power_off_cb
+0x4997 mem_remote_car_power_starting_cb
+0x4999 mem_remote_car_power_standby_cb
+0x499b mem_remote_key_status
+0x499c mem_remote_car_24g_status
+0x499d mem_remote_car_24g_auto_work_step
+0x499e mem_remote_car_24g_pair_success_flag
+0x499f mem_remote_car_empty_packet
+0x49a0 mem_remote_car_motor1_key0_press_state
+0x49a1 mem_remote_car_motor1_key1_press_state
+0x49a2 mem_remote_car_motor2_key2_press_state
+0x49a3 mem_remote_car_motor2_key3_press_state
+0x49a4 mem_remote_car_motor1_rel_state
+0x49a5 mem_remote_car_motor2_rel_state
+0x49a6 mem_remote_car_no_data_check
+0x47a7 mem_hci_uart_tx_gpio
+0x47a8 mem_hci_uart_rx_gpio
+0x47a9 mem_hci_uart_rts_gpio
+0x47aa mem_hci_uart_cts_gpio
+0x47ab mem_hci_pwm_12mhz_gpio
+0x47a7 mem_soft_version_num
+0x47a9 mem_module_wake_up_gpio
+0x47aa mem_module_state_gpio
+0x47ab mem_module_connect_state_gpio
+0x47ac mem_current_packet_length
+0x47ae mem_module_state
+0x47af mem_module_mcu_wake_pin
+0x47b0 mem_module_mcu_wake_delay_us
+0x47b4 mem_module_spp_lpm_mult
+0x47b5 mem_module_le_lpm_mult
+0x47b6 mem_module_bluetooth_stauts_by_command
+0x47b7 mem_module_uart_rx_buffer
+0x47b9 mem_module_uart_rx_buffer_end
+0x47bb mem_module_uart_tx_buffer
+0x47bd mem_module_uart_tx_buffer_end
+0x47bf mem_module_uarta_baud_rate
+0x47c1 mem_module_read_vdd_flag
+0x47c2 mem_module_read_vdd_count
+0x47c3 mem_module_vdd_quotient
+0x47c4 mem_module_vdd_remainder
+0x47c5 mem_module_ble_data_uart_max_length
+0x47c6 mem_module_flag
+0x47c8 mem_module_hci_notify_len
+0x47c9 mem_module_hci_notify_handle
+0x47cb mem_module_hci_nofiy_addr
+0x47cd mem_module_hci_notify_type
+0x47ce mem_last_transmite_clock
+0x47d2 mem_module_uuid_list
+0x48fe mem_module_uuid_list_end
+0x48fe mem_module_le_att_list
+0x4b56 mem_module_le_att_list_end
+0x4b56 mem_module_nv_data
+0x4b56 mem_module_nv_data0
+0x4b78 mem_module_nv_data1
+0x4b9a mem_module_nv_data2
+0x4bbc mem_module_nv_data3
+0x4bde mem_module_nv_data4
+0x4c00 mem_module_nv_data_end
+0x47a7 mem_shutter_bluetooth_type
+0x47a8 mem_shutter_config_eeprom_offset_addr
+0x47aa mem_shutter_config_eeprom_start_flag
+0x47ac mem_shutter_config_user_size
+0x47ad mem_shutter_config_label
+0x47ae mem_shutter_config_otp_addr
+0x47b0 mem_classic_shutter_cable_unplug_conut
+0x47b1 mem_classic_shutter_hid_disconn_count
+0x47b2 mem_classic_shutter_random_mac_offset_addr
+0x47b4 mem_ble_shutter_enable_notify
+0x47b5 mem_ble_shutter_reconn_adv_interval
+0x47b7 mem_ble_shutter_discovery_adv_interval
+0x47b9 mem_ble_shutter_reconn_timeout
+0x47bb mem_ble_shutter_reconn_timer
+0x47bd mem_ble_shutter_reconn_blink_on_time
+0x47bf mem_ble_shutter_reconn_blink_off_time
+0x47c1 mem_ble_shutter_discovery_blink_on_time
+0x47c3 mem_ble_shutter_discovery_blink_off_time
+0x47c5 mem_ble_shutter_interval_min
+0x47c7 mem_ble_shutter_interval_max
+0x47c9 mem_ble_shutter_latency
+0x47cb mem_ble_shutter_timeout
+0x47cd mem_ble_shutter_interval_min_new
+0x47cf mem_ble_shutter_interval_max_new
+0x47d1 mem_ble_shutter_latency_new
+0x47d3 mem_ble_shutter_timeout_new
+0x47d5 mem_classic_shutter_discovery_timeout
+0x47d7 mem_classic_shutter_connect_timeout
+0x47d9 mem_ble_shutter_discovery_timeout
+0x47db mem_ble_shutter_connect_timeout
+0x47dd mem_shutter_sleep_timeout
+0x47df mem_shutter_sleep_timer
+0x47e1 mem_shutter_hard_soft_switch_case
+0x47e2 mem_shutter_soft_switch_button_gpio
+0x47e3 mem_shutter_soft_switch_power_state
+0x47e4 mem_shutter_soft_switch_poweron_time
+0x47e5 mem_shutter_soft_switch_poweroff_time
+0x47e6 mem_shutter_soft_switch_poweron_callback_function
+0x47e8 mem_shutter_soft_switch_poweroff_callback_function
+0x47ea mem_shutter_keyscan
+0x47ea mem_shutter_key_num
+0x47eb mem_cb_shutter_keycan
+0x47ed mem_shutter_key_conf0
+0x47ee mem_shutter_key_conf1
+0x47ef mem_shutter_key_conf2
+0x47f0 mem_shutter_key_conf3
+0x47f1 mem_shutter_key_conf4
+0x47f2 mem_shutter_key_conf5
+0x47f3 mem_shutter_key_conf6
+0x47f4 mem_shutter_key_conf7
+0x47f5 mem_key0_press
+0x47fa mem_key1_press
+0x47ff mem_key2_press
+0x4804 mem_key3_press
+0x4809 mem_key4_press
+0x480e mem_key5_press
+0x4813 mem_key6_press
+0x4818 mem_key7_press
+0x481d mem_key0_release
+0x4822 mem_key1_release
+0x4827 mem_key2_release
+0x482c mem_key3_release
+0x4831 mem_key4_release
+0x4836 mem_key5_release
+0x483b mem_key6_release
+0x4840 mem_key7_release
+0x4845 mem_ble_data_buffer1
+0x484a mem_ble_data_buffer2
+0x484f mem_ble_data_buffer3
+0x4854 mem_ble_data_buffer4
+0x4859 mem_ble_data_buffer5
+0x485e mem_ble_data_buffer6
+0x4863 mem_ble_data_buffer7
+0x4868 mem_ble_data_buffer8
+0x486d mem_ble_data_buffer9_58
+0x489f mem_classic_data_buffer
+0x48a4 mem_classic_data_buffer1
+0x48a9 mem_classic_data_buffer2
+0x48ae mem_classic_data_buffer3
+0x48b3 mem_classic_data_buffer4
+0x48b8 mem_classic_data_buffer5
+0x48bd mem_classic_data_buffer6
+0x48c2 mem_classic_data_buffer7
+0x48c7 mem_classic_data_buffer8
+0x48cc mem_classic_data_buffer9_58
+0x48fe mem_queue_each_size
+0x48ff mem_queue_length
+0x4900 mem_queue_curr_num
+0x4901 mem_queue_read_ptr
+0x4902 mem_queue_write_ptr
+0x4903 mem_queue_ele
+0x4923 mem_shutter_nv_data
+0x49cd mem_shutter_led_struct_app_led
+0x49cd mem_shutter_led_struct_app_led_type
+0x49ce mem_shutter_led_struct_app_led_blink_count
+0x49cf mem_shutter_led_struct_app_led_gpio
+0x49d0 mem_shutter_led_struct_app_led_on_time
+0x49d2 mem_shutter_led_struct_app_led_off_time
+0x49d4 mem_shutter_led_struct_app_led_on_callback
+0x49d6 mem_shutter_led_struct_app_led_off_callback
+0x49d8 mem_shutter_power_off_led_style
+0x49d8 mem_shutter_power_off_led_style_type
+0x49d9 mem_shutter_power_off_led_style_blink_count
+0x49da mem_shutter_power_off_led_style_gpio
+0x49db mem_shutter_power_off_led_style_on_time
+0x49dd mem_shutter_power_off_led_style_off_time
+0x49df mem_shutter_power_off_led_style_on_callback
+0x49e1 mem_shutter_power_off_led_style_off_callback
+0x49e3 mem_shutter_soft_swtich_botton_down
+0x49e4 mem_shutter_soft_swtich_led_struct_temp
+0x49ef mem_shutter_power_off_timeout
+0x49f0 mem_shutter_power_off_timer
+0x49f1 mem_shutter_key_conf0_temp
+0x49f3 mem_shutter_led_struct_app_led_gpio_temp
+0x49f4 mem_shutter_hard_soft_switch_case_temp
+0x49f5 mem_shutter_soft_switch_button_gpio_temp
+0x49f6 mem_shutter_le_name_len
+0x49f7 mem_shutter_le_name
+
+0x4b61 mem_mesh_unsegmented_access_lower_transport_layer_head
+0x4b62 mem_mesh_unsegmented_access_lower_transport_layer_parameters
+0x4b6d mem_mesh_unsegmented_access_lower_transport_layer_mic
+0x4b61 mem_mesh_segmented_access_lower_transport_layer_head
+0x4b62 mem_mesh_segmented_access_lower_transport_layer_SZMIC_SeqZero_SegO_SegN
+0x4b65 mem_mesh_segmented_access_lower_transport_layer_parameters
+0x4b6d mem_mesh_segmented_access_lower_transport_layer_mic
+0x48e5 mem_k2_EncryptionKey
+0x48d5 mem_k2_PrivacyKey
Index: mouse_public_3mode_usb/output/program.lis
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/program.lis	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/program.lis	(working copy)
@@ -0,0 +1,42532 @@
+              include "bt_format "
+              org 0x0000
+
+p_start:
+0000 20200040 branch p_patch_array 
+
+p_zcode:
+0001 20000001 nop 1 
+0002 20000001 nop 1 
+0003 20000001 nop 1 
+0004 20000001 nop 1 
+0005 20000001 nop 1 
+0006 20000001 nop 1 
+0007 20000001 nop 1 
+0008 20000001 nop 1 
+0009 20000001 nop 1 
+000a 20000001 nop 1 
+000b 20000001 nop 1 
+000c 20000001 nop 1 
+000d 20000001 nop 1 
+000e 20000001 nop 1 
+000f 20000001 nop 1 
+0010 20000001 nop 1 
+0011 20000001 nop 1 
+0012 20000001 nop 1 
+0013 20000001 nop 1 
+0014 20000001 nop 1 
+0015 20000001 nop 1 
+0016 20000001 nop 1 
+0017 20000001 nop 1 
+0018 20000001 nop 1 
+0019 20000001 nop 1 
+001a 20000001 nop 1 
+001b 20000001 nop 1 
+001c 20000001 nop 1 
+001d 20000001 nop 1 
+001e 20000001 nop 1 
+001f 20000001 nop 1 
+0020 20000001 nop 1 
+0021 20000001 nop 1 
+0022 20000001 nop 1 
+0023 20000001 nop 1 
+0024 20000001 nop 1 
+0025 20000001 nop 1 
+0026 20000001 nop 1 
+0027 20000001 nop 1 
+0028 20000001 nop 1 
+0029 20000001 nop 1 
+002a 20000001 nop 1 
+002b 20000001 nop 1 
+002c 20000001 nop 1 
+002d 20000001 nop 1 
+002e 20000001 nop 1 
+002f 20000001 nop 1 
+0030 20000001 nop 1 
+0031 20000001 nop 1 
+0032 20000001 nop 1 
+0033 20000001 nop 1 
+0034 20000001 nop 1 
+0035 20000001 nop 1 
+0036 20000001 nop 1 
+0037 20000001 nop 1 
+0038 20000001 nop 1 
+0039 20000001 nop 1 
+003a 20000001 nop 1 
+003b 20000001 nop 1 
+003c 20000001 nop 1 
+003d 20000001 nop 1 
+003e 20000001 nop 1 
+003f 20000001 nop 1 
+
+p_patch_array:
+0040 c284005d bbit1 8 ,pf_patch_ext 
+0041 c0000098 beq patch00_0 ,p_soft_reset 
+0042 c031057c beq patch0c_2 ,p_end_of_packet 
+0043 c04100c2 beq patch10_2 ,p_shutdown_radio 
+0044 c04180c9 beq patch10_3 ,p_set_sync_on 
+0045 c04500dc beq patch11_2 ,p_txon_next 
+0046 c04580d7 beq patch11_3 ,p_initialize_radio_cont 
+0047 c05680e6 beq patch15_5 ,p_app_init 
+0048 c0618276 beq patch18_3 ,p_mouse_start_work 
+0049 c06303f0 beq patch18_6 ,p_mouse_app_enter_hibernate 
+004a c06403fb beq patch19_0 ,p_mouse_setgpio_hibernate 
+004b c064841f beq patch19_1 ,p_mouse_lpm_before_common 
+004c c06582fb beq patch19_3 ,p_mouse_adc_read_start 
+004d c06685b6 beq patch19_5 ,p_mouse_motion 
+004e c0670457 beq patch19_6 ,p_mouse_dpi_process 
+004f c0678460 beq patch19_7 ,p_mouse_seting_dpi 
+0050 c06805e2 beq patch1a_0 ,p_mouse_check_key_gpio 
+0051 c06903ca beq patch1a_2 ,p_mouse_init_sunt 
+0052 c06983df beq patch1a_3 ,p_mouse_sensor_poweron 
+0053 c06a8473 beq patch1a_5 ,p_mouse_priority_bb_event 
+0054 c06c02cc beq patch1b_0 ,p_mouse_bb_event_timer 
+0055 c06e8424 beq patch1b_5 ,p_mouse_idle 
+0056 c06f0088 beq patch1b_6 ,p_mouse_ready_reconnection_by_button 
+0057 c0700070 beq patch1c_0 ,p_mouse_led_off 
+0058 c070806c beq patch1c_1 ,p_mouse_led_on 
+0059 c06c8563 beq patch1b_1 ,p_mouse_start_discovery 
+005a c06d056d beq patch1b_2 ,p_mouse_stop_discovery 
+005b c06e03c3 beq patch1b_4 ,p_mouse_store_device_info 
+005c 2020137e branch loop 
+
+pf_patch_ext:
+005d c00f80ef beq patch23_7 ,p_twspi_reset 
+005e c0428570 beq patch30_5 ,p_ui_timer_check 
+005f c0530574 beq patch34_6 ,p_le_enable_phy_by_pdata 
+0060 c06e8078 beq patch3b_5 ,p_g24_dispatch 
+0061 c06f0211 beq patch3b_6 ,p_g24_receive_packet 
+0062 c07082ac beq patch3c_1 ,p_g24_transmit 
+0063 c07104e7 beq patch3c_2 ,p_g24_pair_dispatch 
+0064 c071850f beq patch3c_3 ,p_g24_pair_sm_common_next 
+0065 c0748519 beq patch3d_1 ,p_g24_reconn_dispatch 
+0066 c0750161 beq patch3d_2 ,p_g24_transmit_no_interrupt 
+0067 c0760558 beq patch3d_4 ,p_g24_lpm_wait 
+0068 c04f8584 beq patch33_7 ,p_le_slave_match 
+0069 c050858e beq patch34_1 ,p_le_slave_unsync 
+006a c05f0590 beq patch37_6 ,p_le_parse_l2cap 
+006b 2020137e branch loop 
+
+p_mouse_led_on:
+006c 18427e00 copy temp ,pdata 
+006d c17f8000 rtneq gpio_disable 
+006e 1fe20400 copy pdata ,temp 
+006f 2020497d branch mouse_led_on + 1 
+
+p_mouse_led_off:
+0070 18427e00 copy temp ,pdata 
+0071 c17f8000 rtneq gpio_disable 
+0072 1fe20400 copy pdata ,temp 
+0073 20204979 branch mouse_led_off + 1 
+
+p_led_num_check:
+0074 6fe0cbc0 fetch 1 ,mem_mouse_flag + 4 
+0075 247a0000 nrtn blank 
+0076 70448e00 jam 0 ,mem_ui_led_struct_num 
+0077 20600000 rtn 
+
+p_g24_dispatch:
+0078 c513a3e1 bmark1 mark_24g_rxmode ,g24_receive_dispatch 
+0079 c6930000 rtnmark0 mark_24g 
+007a 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+007b c280a2f6 bbit1 state_24g_pair ,g24_pair_dispatch 
+007c c2812589 bbit1 state_24g_reconn ,g24_reconn_dispatch 
+007d 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+007e c0008080 beq g24_tx_timer_int_enable ,p_g24_transmit_by_interrupt_check 
+007f 20200161 branch p_g24_transmit_no_interrupt 
+
+p_g24_transmit_by_interrupt_check:
+0080 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0081 c28d0084 bbit1 mouse_enable_24g_1000 ,p_g24_transmit_by_interrupt_high_reoport_set 
+0082 c28c8084 bbit1 mouse_enable_24g_500hz ,p_g24_transmit_by_interrupt_high_reoport_set 
+0083 202026cd branch g24_transmit_by_interrupt 
+
+p_g24_transmit_by_interrupt_high_reoport_set:
+0084 204022a0 call g24_timer_check 
+0085 24740000 nrtn user 
+0086 204026e2 call g24_interval_calibrate 
+0087 20202628 branch g24_transmit_no_interrupt 
+
+p_mouse_ready_reconnection_by_button:
+0088 6fe0cbc5 fetch 1 ,mem_device_number 
+0089 c1008000 rtneq 1 
+008a 2040033c call p_mouse_multi_led_blink_disable 
+008b 20404700 call mouse_select_device_number 
+008c 6048c93d storet 1 ,mem_device_flag 
+
+p_mouse_store_device_number_before_reset:
+008d 7041ca00 jam 0 ,mem_link_key_exists 
+008e 20404718 call mouse_select_device_enable 
+008f 20400092 call p_mouse_stop_bluetooth_mode 
+0090 204031e6 call app_evt_button_long_pressed 
+0091 202046fb branch mouse_store_device_number_before_reset + 3 
+
+p_mouse_stop_bluetooth_mode:
+0092 6fe1478f fetch 2 ,mem_ui_state_map 
+0093 c3838000 rtnbit1 ui_state_bt_reconnect 
+0094 20204358 branch mouse_stop_bluetooth_mode + 2 
+
+p_set_mem_xtal_cache:
+0095 6fe0c17b fetch 1 ,mem_lpm_config + 1 
+0096 67e0cc58 store 1 ,mem_xtal_cache 
+0097 20600000 rtn 
+
+p_soft_reset:
+0098 20800000 clear_stack 
+0099 70808673 jam 0x73 ,core_spid_ctrl 
+009a 24558095 ncall p_set_mem_xtal_cache ,wake 
+009b 20403166 call app_param_init 
+009c 24558074 ncall p_led_num_check ,wake 
+009d 58004c37 setarg mem_mouse_rssi_signal_buf_patch 
+009e 67e1489d store 2 ,mem_rssi_signal_buf_ptr 
+009f 20403cb3 call mouse_xtal_init 
+00a0 20401246 call initialize_radio 
+00a1 70804204 jam clksel_xtal ,core_clksel 
+00a2 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+00a3 c00c00a5 beq xtal_24m ,p_soft_reset_next 
+00a4 70804205 jam clksel_dpll ,core_clksel 
+
+p_soft_reset_next:
+00a5 6fe0cc58 fetch 1 ,mem_xtal_cache 
+00a6 67e0c17b store 1 ,mem_lpm_config + 1 
+00a7 58000f0f setarg 0xf0f 
+00a8 d8a00fff arg 0xfff ,contw 
+00a9 98a10a00 iand contw ,contw 
+00aa 6fe0c17a fetch 1 ,mem_lpm_config 
+00ab 1fe17ef0 and_into 0xf0 ,pdata 
+00ac 1fed7e00 lshift8 pdata ,pdata 
+00ad 98a1fe00 ior contw ,pdata 
+00ae 793ffe02 set0 2 ,pdata 
+00af 67f1004c store 2 ,core_lpm_reg 
+00b0 efe10006 ifetch 2 ,contr 
+00b1 e7e10005 istore 2 ,contw 
+00b2 58000001 setarg lpmreg_sel_ctrl 
+00b3 37d98200 until null ,lpo_edge 
+00b4 67f08005 store 1 ,core_lpm_wr 
+00b5 70417b08 jam 0x08 ,mem_lpm_config + 1 
+00b6 20200805 branch soft_reset + 4 
+
+p_enable_rc_clock:
+00b7 6ff20138 fetch 4 ,core_lpm_ctrl 
+00b8 79207e02 set1 2 ,pdata 
+00b9 67f2004c store 4 ,core_lpm_reg 
+00ba 58000001 setarg lpmreg_sel_ctrl 
+00bb 37d98200 until null ,lpo_edge 
+00bc 67f08005 store 1 ,core_lpm_wr 
+00bd 37d98200 until null ,lpo_edge 
+00be 37d98200 until null ,lpo_edge 
+00bf 37d98200 until null ,lpo_edge 
+00c0 20002710 nop 10000 
+00c1 20600000 rtn 
+
+p_shutdown_radio:
+00c2 6fe0c1ea fetch 1 ,mem_gain_fix 
+00c3 67e08964 store 1 ,mem_temp 
+00c4 2040114c call shutdown_radio + 1 
+00c5 708a0a00 jam 0 ,core_rf_ldo_en0 
+00c6 6fe08964 fetch 1 ,mem_temp 
+00c7 67e0c1ea store 1 ,mem_gain_fix 
+00c8 20600000 rtn 
+
+p_set_sync_on:
+00c9 70890005 jam 0x5 ,modem_en 
+00ca 20000002 nop 2 
+00cb 70890000 jam 0x0 ,modem_en 
+00cc 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+00cd c00c1164 beq xtal_24m ,set_sync_on_24m 
+
+p_set_sync_on_16m:
+00ce 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+00cf 20201179 branch set_sync_on_16m 
+
+p_rf_da_ldo_abb_en_init:
+00d0 6ff08a0a fetch 1 ,core_rf_ldo_en0 
+00d1 79207e03 set1 3 ,pdata 
+00d2 67f08a0a store 1 ,core_rf_ldo_en0 
+00d3 200000f0 nop 240 
+00d4 793ffe03 set0 3 ,pdata 
+00d5 67f08a0a store 1 ,core_rf_ldo_en0 
+00d6 20600000 rtn 
+
+p_initialize_radio_cont:
+00d7 7041eaff jam 0xff ,mem_gain_fix 
+00d8 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
+00d9 70892140 jam 0x40 ,core_rx_ctrl1 
+00da 204000d0 call p_rf_da_ldo_abb_en_init 
+00db 20201252 branch initialize_radio_cont + 1 
+
+p_txon_next:
+00dc 6fe0c1e8 fetch 1 ,mem_tx_power 
+00dd c05500e0 beq tx_power_fast_conn ,p_set_tx_power_f17db 
+00de c04a80e3 beq tx_power_pair ,p_set_tx_power_pair 
+00df 20201237 branch set_tx_power_10db 
+
+p_set_tx_power_f17db:
+00e0 708a390a jam 0x0a ,core_tx_pwr_ctrl0 
+00e1 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
+00e2 20201226 branch set_rf_ldo_cfg89 
+
+p_set_tx_power_pair:
+00e3 708a390a jam 0x0a ,core_tx_pwr_ctrl0 
+00e4 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
+00e5 20201226 branch set_rf_ldo_cfg89 
+
+p_app_init:
+
+p_mouse_init:
+00e6 20406e5e call enable_authrom 
+00e7 20400118 call p_mouse_setting_config 
+00e8 204041e7 call mouse_init_sunt 
+00e9 20758000 rtn wake 
+00ea 20400461 call p_mouse_seting_sensor_type 
+00eb 20404766 call mouse_drawing_optima_init 
+00ec 2040012b call p_mouse_cb_fuction 
+00ed 204003e9 call p_mouse_sensor_powerdown 
+00ee 20203c7f branch mouse_init_wireless 
+
+p_twspi_reset:
+00ef 6fe0c923 fetch 1 ,mem_mouse_sensor_sclk_gpio 
+00f0 20205b56 branch twspi_reset + 1 
+
+p_mouse_le_name_load:
+00f1 6fe0cbff fetch 1 ,mem_le_name_patch_len 
+00f2 207a0000 rtn blank 
+00f3 1fe0f201 add pdata ,1 ,loopcnt 
+00f4 d8c04bff arg mem_le_name_patch_len ,contr 
+00f5 d8a042f7 arg mem_le_name_len ,contw 
+00f6 20207dd4 branch memcpy 
+
+p_mouse_g24_report_setting:
+00f7 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+00f8 c28d00fc bbit1 mouse_enable_24g_1000 ,p_mouse_g24_report_1000hz 
+00f9 c28c8102 bbit1 mouse_enable_24g_500hz ,p_mouse_g24_report_500hz 
+00fa c28c0108 bbit1 mouse_enable_24g_250hz ,p_mouse_g24_report_250hz 
+00fb 2020010d branch p_mouse_g24_report_125hz 
+
+p_mouse_g24_report_1000hz:
+00fc 7048ca05 jam 5 ,mem_24g_fast_hop_count 
+00fd 58010101 setarg 0x010101 
+00fe 67e1c857 store 3 ,mem_24g_interval 
+00ff 58002ee0 setarg 0x2ee0 
+0100 67e1cc16 store 3 ,mem_24g_tsniff 
+0101 202026e8 branch g24_transmit_by_interrupt_enable 
+
+p_mouse_g24_report_500hz:
+0102 7048ca09 jam 9 ,mem_24g_fast_hop_count 
+0103 58080606 setarg 0x080606 
+0104 67e1c857 store 3 ,mem_24g_interval 
+0105 58005c1c setarg 0x5c1c 
+0106 67e1cc16 store 3 ,mem_24g_tsniff 
+0107 202026e8 branch g24_transmit_by_interrupt_enable 
+
+p_mouse_g24_report_250hz:
+0108 5800bb80 setarg 0xbb80 
+0109 67e1cc16 store 3 ,mem_24g_tsniff 
+010a 7048ca0f jam 15 ,mem_24g_fast_hop_count 
+010b 58006000 setarg 0x6000 
+010c 20200111 branch p_mouse_24g_short_sleep_set 
+
+p_mouse_g24_report_125hz:
+010d 58017700 setarg 0x17700 
+010e 67e1cc16 store 3 ,mem_24g_tsniff 
+010f 7048ca1e jam 30 ,mem_24g_fast_hop_count 
+0110 58011760 setarg 0x11760 
+
+p_mouse_24g_short_sleep_set:
+0111 67e1c8b1 store 3 ,mem_24g_short_sleep_set 
+0112 67e1cc2c store 3 ,mem_24g_short_sleep_set_init 
+0113 20600000 rtn 
+
+p_send_time_long_wake:
+0114 58000000 setarg 0 
+0115 67e0cc1a store 1 ,mem_tx_count 
+0116 67e2cc25 store 5 ,mem_tx_time_sum 
+0117 20600000 rtn 
+
+p_mouse_setting_config:
+0118 20758000 rtn wake 
+0119 2040260e call g24_transmit_init 
+011a d8400358 arg 0x358 ,temp 
+011b 6049483b storet 2 ,mem_24g_rx_window 
+011c 204022b5 call g24_chmap_param_init 
+011d 20400114 call p_send_time_long_wake 
+011e 20403f60 call mouse_gpio_init 
+011f 204000f1 call p_mouse_le_name_load 
+0120 20403dd6 call mouse_param_init 
+0121 20400329 call p_mouse_led_multi_parm_init 
+0122 204000f7 call p_mouse_g24_report_setting 
+0123 20400125 call p_mouse_store_normal_tx_power 
+0124 20203cab branch mouse_setting_config + 5 
+
+p_mouse_store_normal_tx_power:
+0125 6fe0c1e8 fetch 1 ,mem_tx_power 
+0126 67e0cc72 store 1 ,mem_normal_tx_power 
+0127 20600000 rtn 
+
+p_mouse_fetch_normal_tx_power:
+0128 6fe0cc72 fetch 1 ,mem_normal_tx_power 
+0129 67e0c1e8 store 1 ,mem_tx_power 
+012a 20600000 rtn 
+
+p_mouse_cb_fuction:
+012b 58004902 setarg mouse_24g_before_lpm_sleep 
+012c 67e14479 store 2 ,mem_cb_before_lpm_sleep 
+012d 58000130 setarg p_mouse_24g_package_data 
+012e 67e1489f store 2 ,mem_cb_24g_transmit_data 
+012f 20203c89 branch mouse_cb_fuction + 6 
+
+p_mouse_24g_package_data:
+0130 c6930000 rtnmark0 mark_24g 
+0131 20403fb0 call mouse_motion 
+0132 24740000 nrtn user 
+0133 6fe0cc32 fetch 1 ,mem_long_sleep_flag 
+0134 704c3200 jam 0 ,mem_long_sleep_flag 
+0135 245a041d ncall p_mouse_short_sleep_clear_wake ,blank 
+0136 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0137 c30a813a bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
+0138 6fe0cb9c fetch 1 ,mem_customer_key 
+0139 243a48c1 nbranch mouse_24g_keyboard_package_data ,blank 
+
+p_mouse_24g_mouse_package_data:
+013a 20400151 call p_mouse_data_xy_release 
+013b 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+013c c28c813f bbit1 mouse_enable_24g_500hz ,p_mouse_24g_mouse_package_data_by_interrupt 
+013d c28d013f bbit1 mouse_enable_24g_1000 ,p_mouse_24g_mouse_package_data_by_interrupt 
+013e 202048ac branch mouse_24g_mouse_package_data 
+
+p_mouse_24g_mouse_package_data_by_interrupt:
+013f 6fe0c839 fetch 1 ,mem_24g_data_type 
+0140 c280814d bbit1 1 ,p_mouse_24g_mouse_package_data_now 
+0141 6848c7ca fetcht 1 ,mem_24g_txbuf + 1 
+0142 6fe0c8d4 fetch 1 ,mem_mouse_key 
+0143 9841fe00 ior temp ,pdata 
+0144 67e0c8d4 store 1 ,mem_mouse_key 
+0145 6848c7cf fetcht 1 ,mem_24g_txbuf + 6 
+0146 6fe0c8d9 fetch 1 ,mem_mouse_z 
+0147 9840fe00 iadd temp ,pdata 
+0148 67e0c8d9 store 1 ,mem_mouse_z 
+0149 6848c7d0 fetcht 1 ,mem_24g_txbuf + 7 
+014a 6fe0c8da fetch 1 ,mem_mouse_tz 
+014b 9840fe00 iadd temp ,pdata 
+014c 67e0c8da store 1 ,mem_mouse_tz 
+
+p_mouse_24g_mouse_package_data_now:
+014d 70483901 jam type_ms ,mem_24g_data_type 
+014e da200007 arg 7 ,rega 
+014f da4048d4 arg mem_mouse_key ,regb 
+0150 202026e8 branch g24_transmit_by_interrupt_enable 
+
+p_mouse_data_xy_release:
+0151 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+0152 c1ff8000 rtnne gpio_disable 
+0153 6fe0cc73 fetch 1 ,mem_mouse_24g_clear_sensor_data_flag 
+0154 243a0156 nbranch p_mouse_data_xy_release_before ,blank 
+0155 2020430d branch mouse_data_xy_release + 2 
+
+p_mouse_data_xy_release_before:
+0156 704c7300 jam 0 ,mem_mouse_24g_clear_sensor_data_flag 
+0157 2020430f branch mouse_data_xy_release + 4 
+
+p_mouse_24g_fast_conn_mode_check:
+0158 6fe24895 fetch 4 ,mem_24g_receiver_addr 
+0159 684a4891 fetcht 4 ,mem_24g_fast_conn_addr 
+015a 98467c00 isub temp ,null 
+015b 2022815e branch p_mouse_soft_agc_enable ,zero 
+
+p_mouse_soft_agc_disable:
+015c 7041eaff jam 0xff ,mem_gain_fix 
+015d 20600000 rtn 
+
+p_mouse_soft_agc_enable:
+015e 7041ea00 jam 0 ,mem_gain_fix 
+015f 7041e8aa jam tx_power_fast_conn ,mem_tx_power 
+0160 20600000 rtn 
+
+p_g24_transmit_no_interrupt:
+0161 20402638 call g24_txdata_prep 
+0162 243404a3 nbranch p_g24_nodata_transmit ,user 
+
+p_g24_transmit_start:
+0163 204001f8 call p_g24_transmit_process 
+0164 20400158 call p_mouse_24g_fast_conn_mode_check 
+0165 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+0166 243a016b nbranch p_g24_short_sleep ,blank 
+0167 6fe448b4 fetch 8 ,mem_24g_long_sleep_set 
+0168 67e4485f store 8 ,mem_24g_enter_hibernate 
+0169 6fe148c6 fetch 2 ,mem_24g_long_sleep_param_update_timer_init 
+016a 67e148c8 store 2 ,mem_24g_long_sleep_param_update_timer 
+
+p_g24_short_sleep:
+016b 204026c2 call g24_lpm_wait 
+016c 24740000 nrtn user 
+016d 6fe0cc31 fetch 1 ,mem_sleep_miss 
+016e 704c3100 jam 0 ,mem_sleep_miss 
+016f 1fe67c00 sub pdata ,0 ,null 
+0170 24228176 nbranch p_g24_short_sleep_last_miss ,zero 
+0171 68494c2f fetcht 2 ,mem_retransmit 
+0172 18467c00 sub temp ,0 ,null 
+0173 202281a2 branch p_g24_short_sleep_default ,zero 
+0174 6fe24c21 fetch 4 ,mem_tx_time_last_delt 
+0175 203a01a2 branch p_g24_short_sleep_default ,blank 
+
+p_g24_short_sleep_last_miss:
+0176 684a4c33 fetcht 4 ,mem_sleep_miss_temp 
+0177 284ffe1f isolate1 31 ,temp 
+0178 2020819d branch p_sub_miss_temp ,true 
+0179 6fe24c21 fetch 4 ,mem_tx_time_last_delt 
+017a 9840fe00 iadd temp ,pdata 
+
+p_g24_short_sleep_notify:
+017b 684a4c16 fetcht 4 ,mem_24g_tsniff 
+017c 98460400 isub temp ,temp 
+017d 604a4c33 storet 4 ,mem_sleep_miss_temp 
+017e 242101a5 nbranch p_g24_short_sleep_long ,positive 
+017f 6fe1c8b1 fetch 3 ,mem_24g_short_sleep_set 
+0180 98467e00 isub temp ,pdata 
+0181 242101ac nbranch p_g24_short_sleep_2 ,positive 
+0182 d8400600 arg 0x600 ,temp 
+0183 98467c00 isub temp ,null 
+0184 242101ac nbranch p_g24_short_sleep_2 ,positive 
+
+p_g24_short_sleep2:
+0185 6fe1c8b1 fetch 3 ,mem_24g_short_sleep_set 
+0186 20407e1f call clk2lpo 
+0187 604a4160 storet 4 ,mem_sleep_counter 
+
+p_lpm_short_sleep:
+0188 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+0189 c004018c beq xtal_16m ,p_lpm_short_sleep_skip_pll_set 
+018a 58000000 setarg 0 
+018b 67f18a00 store 3 ,core_clkpll_ctrl0 
+
+p_lpm_short_sleep_skip_pll_set:
+018c 704c2bfa jam 250 ,mem_tx_time_offset 
+018d 204012d1 call xtal_fast_wake 
+018e 6fe24164 fetch 4 ,mem_sleep_counter_all 
+018f 9840fe00 iadd temp ,pdata 
+0190 67e24164 store 4 ,mem_sleep_counter_all 
+0191 18027e00 deposit mark 
+0192 67e4419d store 8 ,mem_saved_mark 
+0193 d8c08070 arg core_gpio_conf ,contr 
+0194 d8a04186 arg mem_saved_gpio ,contw 
+0195 20407d74 call memcpy20 
+0196 6ff08086 fetch 1 ,core_spid_ctrl 
+0197 67e0c1a5 store 1 ,mem_saved_spidctrl 
+0198 20401410 call lpm_ctrl3_cfg_dig_vsel 
+0199 6ff08042 fetch 1 ,core_clksel 
+019a 1fe1fe14 or_into 0x14 ,pdata 
+019b 67f08042 store 1 ,core_clksel 
+019c 2020146d branch lpm_sleep_next 
+
+p_sub_miss_temp:
+019d dfffffff arg -1 ,pdata 
+019e 98465e00 isub temp ,regext 
+019f 6fe24c21 fetch 4 ,mem_tx_time_last_delt 
+01a0 9de67e00 isub regext ,pdata 
+01a1 2020017b branch p_g24_short_sleep_notify 
+
+p_g24_short_sleep_default:
+01a2 204001a9 call p_g24_miss_temp_clear 
+01a3 6fe1c8b1 fetch 3 ,mem_24g_short_sleep_set 
+01a4 20200185 branch p_g24_short_sleep2 
+
+p_g24_short_sleep_long:
+01a5 18460400 sub temp ,0 ,temp 
+01a6 6fe1c8b1 fetch 3 ,mem_24g_short_sleep_set 
+01a7 9840fe00 iadd temp ,pdata 
+01a8 20200185 branch p_g24_short_sleep2 
+
+p_g24_miss_temp_clear:
+01a9 58000000 setarg 0 
+01aa 67e24c33 store 4 ,mem_sleep_miss_temp 
+01ab 20600000 rtn 
+
+p_g24_short_sleep_2:
+01ac 704c3101 jam 1 ,mem_sleep_miss 
+01ad 20600000 rtn 
+
+p_send_time_check:
+01ae 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+01af c38c8000 rtnbit1 mouse_enable_24g_500hz 
+01b0 c38d0000 rtnbit1 mouse_enable_24g_1000 
+01b1 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+01b2 c00081f4 beq g24_tx_timer_int_enable ,p_send_timer_first 
+01b3 6fe0cc1a fetch 1 ,mem_tx_count 
+01b4 203a01f4 branch p_send_timer_first ,blank 
+01b5 1b227e00 copy clkn ,pdata 
+01b6 684b4c1b fetcht 6 ,mem_tx_time_last 
+01b7 67e34c1b store 6 ,mem_tx_time_last 
+01b8 20407e0a call clk_diff_rt 
+01b9 67e24c21 store 4 ,mem_tx_time_last_delt 
+01ba 6fe0cc31 fetch 1 ,mem_sleep_miss 
+01bb 247a0000 nrtn blank 
+01bc 6fe14c2f fetch 2 ,mem_retransmit 
+01bd 247a0000 nrtn blank 
+01be 6fe24c33 fetch 4 ,mem_sleep_miss_temp 
+01bf 247a0000 nrtn blank 
+01c0 6fe24c21 fetch 4 ,mem_tx_time_last_delt 
+01c1 684a4c16 fetcht 4 ,mem_24g_tsniff 
+01c2 18438400 lshift temp ,temp 
+01c3 98467c00 isub temp ,null 
+01c4 20210114 branch p_send_time_long_wake ,positive 
+01c5 684acc25 fetcht 5 ,mem_tx_time_sum 
+01c6 9840fe00 iadd temp ,pdata 
+01c7 67e2cc25 store 5 ,mem_tx_time_sum 
+01c8 6848cc1a fetcht 1 ,mem_tx_count 
+01c9 6fe0cc2a fetch 1 ,mem_tx_time_sum_count 
+01ca 98467c00 isub temp ,null 
+01cb 202281cf branch p_send_time_check_average ,zero 
+01cc 18408401 increase 1 ,temp 
+01cd 6048cc1a storet 1 ,mem_tx_count 
+01ce 20600000 rtn 
+
+p_send_time_check_average:
+01cf 704c1a01 jam 1 ,mem_tx_count 
+01d0 d8400000 arg 0 ,temp 
+01d1 6fe2cc25 fetch 5 ,mem_tx_time_sum 
+01d2 604acc25 storet 5 ,mem_tx_time_sum 
+01d3 6848cc2a fetcht 1 ,mem_tx_time_sum_count 
+01d4 9846fc00 idiv temp 
+01d5 20407e64 call wait_div_end 
+01d6 1807a200 quotient rega 
+01d7 6fe24c16 fetch 4 ,mem_24g_tsniff 
+01d8 6848cc2b fetcht 1 ,mem_tx_time_offset 
+01d9 98460400 isub temp ,temp 
+01da 1a227e00 copy rega ,pdata 
+01db 98467e00 isub temp ,pdata 
+01dc 202101e8 branch p_send_time_check_average_late ,positive 
+01dd 1fe67e00 sub pdata ,0 ,pdata 
+01de 1feb7e00 rshift2 pdata ,pdata 
+01df 6849c8b1 fetcht 3 ,mem_24g_short_sleep_set 
+01e0 98408400 iadd temp ,temp 
+01e1 6fe1cc2c fetch 3 ,mem_24g_short_sleep_set_init 
+01e2 da201800 arg 0x1800 ,rega 
+01e3 9a20fe00 iadd rega ,pdata 
+01e4 98467c00 isub temp ,null 
+01e5 242101f2 nbranch p_send_time_check_average_min ,positive 
+01e6 6049c8b1 storet 3 ,mem_24g_short_sleep_set 
+01e7 20600000 rtn 
+
+p_send_time_check_average_late:
+01e8 1feb0400 rshift2 pdata ,temp 
+01e9 6fe1c8b1 fetch 3 ,mem_24g_short_sleep_set 
+01ea 98460400 isub temp ,temp 
+01eb 6fe1cc2c fetch 3 ,mem_24g_short_sleep_set_init 
+01ec da201800 arg 0x1800 ,rega 
+01ed 9a267e00 isub rega ,pdata 
+01ee 98467c00 isub temp ,null 
+01ef 202101f2 branch p_send_time_check_average_min ,positive 
+01f0 6049c8b1 storet 3 ,mem_24g_short_sleep_set 
+01f1 20600000 rtn 
+
+p_send_time_check_average_min:
+01f2 67e1c8b1 store 3 ,mem_24g_short_sleep_set 
+01f3 20600000 rtn 
+
+p_send_timer_first:
+01f4 704c1a01 jam 1 ,mem_tx_count 
+01f5 1b227e00 copy clkn ,pdata 
+01f6 67e34c1b store 6 ,mem_tx_time_last 
+01f7 20600000 rtn 
+
+p_g24_transmit_process:
+01f8 58000000 setarg 0 
+01f9 67e0c8aa store 1 ,mem_24g_retry 
+01fa 67e14c2f store 2 ,mem_retransmit 
+
+p_g24_transmit_loop:
+01fb 20400202 call p_g24_transmit_receive_ack 
+01fc 242c022a nbranch p_g24_retransmit ,sync 
+01fd 2437822a nbranch p_g24_retransmit ,user3 
+01fe 204001ae call p_send_time_check 
+01ff 20402679 call g24_ackpayload_parse 
+0200 2040026b call p_mouse_wakeup_24g 
+0201 20202658 branch g24_transmit_no_ack 
+
+p_g24_transmit_receive_ack:
+0202 7857fc00 disable user3 
+0203 204021f8 call g24_transmit 
+0204 6fe0c82f fetch 1 ,mem_24g_no_ack 
+0205 c000a1f1 beq no_ack_24g ,g24_end_of_packet 
+0206 18002a00 force 0 ,radio_ctrl 
+0207 6fe2483f fetch 4 ,mem_24g_addr 
+0208 98001200 iforce access 
+0209 204010ac call calc_mod_value_scale_le 
+020a 68488017 fetcht 1 ,mem_last_freq 
+020b 2040118b call set_freq_rx 
+020c 2000012c nop 300 
+020d 204011a2 call rf_rx_enable 
+020e 20400219 call p_g24_receive_rxon 
+020f 2057a1f1 call g24_end_of_packet ,user3 
+0210 20600000 rtn 
+
+p_g24_receive_packet:
+0211 6fe0c867 fetch 1 ,mem_24g_rx_phy 
+0212 20401637 call le_enable_phy_by_pdata 
+0213 6fe2483f fetch 4 ,mem_24g_addr 
+0214 98001200 iforce access 
+0215 204010ac call calc_mod_value_scale_le 
+0216 2040115d call set_sync_on 
+0217 6848c83d fetcht 1 ,mem_24g_ch 
+0218 20401674 call le_rf_rx_enable 
+
+p_g24_receive_rxon:
+0219 20402181 call g24_prep 
+021a c597821e bmark0 mark_ble_lr ,p_g24_receive_nolr 
+021b 783cfc00 pulse dewhiten_code_calc 
+021c 2000001e nop 30 
+021d 20402181 call g24_prep 
+
+p_g24_receive_nolr:
+021e 7857fc00 disable user3 
+021f 7826fc00 enable decode_fec0 
+0220 7830fc00 enable is_rx 
+0221 78507c00 disable is_tx 
+0222 78287c00 enable swfine 
+0223 6fe1483b fetch 2 ,mem_24g_rx_window 
+0224 98003600 iforce stop_watch 
+0225 37c18400 correlate null ,timeout 
+0226 242c21ef nbranch g24_sync_timeout ,sync 
+0227 20404d0d call rf_debug_rx_sync_line 
+0228 c517a1a4 bmark1 mark_ble_lr ,g24_receive_skip_fec1 
+0229 202021a4 branch g24_receive_skip_fec1 
+
+p_g24_retransmit:
+022a 6fe0cad6 fetch 1 ,mem_mouse_need_soft_reset 
+022b 247a0000 nrtn blank 
+022c 2040025b call p_mouse_select_device_by_pb_button 
+022d 6fe0c8ab fetch 1 ,mem_24g_abort_pac 
+022e 247a0000 nrtn blank 
+022f 6fe148a7 fetch 2 ,mem_24g_txfail_cnt 
+0230 1fe0fe01 increase 1 ,pdata 
+0231 67e148a7 store 2 ,mem_24g_txfail_cnt 
+0232 6fe148a7 fetch 2 ,mem_24g_txfail_cnt 
+0233 c2842680 bbit1 8 ,g24_tx_attempt_fail 
+0234 20400239 call p_g24_transmit_hop_process 
+0235 6fe14c2f fetch 2 ,mem_retransmit 
+0236 1fe0fe01 increase 1 ,pdata 
+0237 67e14c2f store 2 ,mem_retransmit 
+0238 202001fb branch p_g24_transmit_loop 
+
+p_g24_transmit_hop_process:
+0239 6848c8aa fetcht 1 ,mem_24g_retry 
+023a 6fe0c8ca fetch 1 ,mem_24g_fast_hop_count 
+023b 98467c00 isub temp ,null 
+023c 24210253 nbranch p_g24_tx_fast_hop ,positive 
+023d 18408401 increase 1 ,temp 
+023e 6048c8aa storet 1 ,mem_24g_retry 
+023f 6fe0c8ca fetch 1 ,mem_24g_fast_hop_count 
+0240 c002824f beq 5 ,p_g24_transmit_hop_process_1ms 
+0241 c004024b beq 8 ,p_g24_transmit_hop_process_2ms 
+0242 c0078247 beq 15 ,p_g24_transmit_hop_process_4ms 
+0243 6fe0c8aa fetch 1 ,mem_24g_retry 
+0244 c00a269d beq 20 ,g24_hop_ch_disable 
+0245 c00f269d beq 30 ,g24_hop_ch_disable 
+0246 20600000 rtn 
+
+p_g24_transmit_hop_process_4ms:
+0247 6fe0c8aa fetch 1 ,mem_24g_retry 
+0248 c005269d beq 10 ,g24_hop_ch_disable 
+0249 c007a69d beq 15 ,g24_hop_ch_disable 
+024a 20600000 rtn 
+
+p_g24_transmit_hop_process_2ms:
+024b 6fe0c8aa fetch 1 ,mem_24g_retry 
+024c c003269d beq 6 ,g24_hop_ch_disable 
+024d c004a69d beq 9 ,g24_hop_ch_disable 
+024e 20600000 rtn 
+
+p_g24_transmit_hop_process_1ms:
+024f 6fe0c8aa fetch 1 ,mem_24g_retry 
+0250 c001a69d beq 3 ,g24_hop_ch_disable 
+0251 c002a69d beq 5 ,g24_hop_ch_disable 
+0252 20600000 rtn 
+
+p_g24_tx_fast_hop:
+0253 20400255 call p_delay_40ms 
+0254 20202281 branch g24_ch 
+
+p_delay_40ms:
+0255 6fe0c8a7 fetch 1 ,mem_24g_txfail_cnt 
+0256 1fe67c80 sub pdata ,0x80 ,null 
+0257 20610000 rtn positive 
+0258 704c7301 jam 1 ,mem_mouse_24g_clear_sensor_data_flag 
+0259 df200028 arg 40 ,loopcnt 
+025a 20207d86 branch delay_ms_wait 
+
+p_mouse_select_device_by_pb_button:
+025b 6fe0c91f fetch 1 ,mem_config_select_device_button_gpio 
+025c c17f8000 rtneq gpio_disable 
+025d da200000 arg 0 ,rega 
+025e 704ba706 jam mouse_pb_key ,mem_mouse_key_temp 
+025f 6848c91f fetcht 1 ,mem_config_select_device_button_gpio 
+0260 204046a8 call mouse_pb_button_check 
+0261 67e0cba5 store 1 ,mem_mouse_pbkey_press_status 
+0262 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+0263 c07f8268 beq gpio_disable ,p_mouse_3io6key_pb_button_check_end 
+0264 204041a8 call mouse_matrix_public_gpio_reset 
+
+p_mouse_select_device_by_pb_button_exit:
+0265 1a227e00 copy rega ,pdata 
+0266 c28346cb bbit1 mouse_pb_key ,mouse_select_device_button_down + 2 
+0267 202046be branch mouse_select_device_button_up 
+
+p_mouse_3io6key_pb_button_check_end:
+0268 6848c91f fetcht 1 ,mem_config_select_device_button_gpio 
+0269 20403f96 call mouse_gpio_config_input_pu 
+026a 20200265 branch p_mouse_select_device_by_pb_button_exit 
+
+p_mouse_wakeup_24g:
+026b 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+026c 245a026f ncall p_mouse_wakeup_24g_from_long_sleep ,blank 
+026d 704bf200 jam 0 ,mem_sensor_shutdown_flag 
+026e 20600000 rtn 
+
+p_mouse_wakeup_24g_from_long_sleep:
+026f 204003cc call p_mouse_init_sensor_wakeup 
+0270 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0271 c41e0000 rtnbit0 mouse_enable_wheel_wake_up_cancel 
+
+p_mouse_wheel_set_wakeup:
+0272 6fe0c917 fetch 1 ,mem_whee_a_data_gpio 
+0273 20403f96 call mouse_gpio_config_input_pu 
+0274 6fe0c918 fetch 1 ,mem_whee_b_data_gpio 
+0275 20203f96 branch mouse_gpio_config_input_pu 
+
+p_mouse_start_work:
+0276 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0277 c30a0283 bbit0 mouse_enable_adc ,p_mouse_start_work_next 
+0278 20406166 call enable_adc 
+0279 2040618d call vdd_calculate_by_mode 
+027a 67e148ed store 2 ,mem_mouse_vdd_now_vol 
+027b 68494496 fetcht 2 ,mem_2v_adc_vinlpm_data 
+027c 6fe144a4 fetch 2 ,mem_adc_current_value 
+027d 98467c00 isub temp ,null 
+027e 20210276 branch p_mouse_start_work ,positive 
+027f da2048e7 arg mem_mouse_vdd_calculate_set ,rega 
+0280 20403f1a call mouse_adc_bat_percent_lowpower_out 
+0281 6fe0c4a6 fetch 1 ,mem_adc_power_flag 
+0282 c280be5a bbit1 1 ,mouse_app_enter_hibernate 
+
+p_mouse_start_work_next:
+0283 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0284 c2978297 bbit1 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_first_start_auto_pair_mode 
+0285 6fe0c93d fetch 1 ,mem_device_flag 
+0286 c000029e beq mode_24g_device ,p_mouse_24g_start_mode 
+
+p_mouse_le_fast_conn_judge:
+0287 20400371 call p_mouse_device_le_reconn_led_config 
+0288 20404354 call mouse_bluetooth_fast_conn_disable 
+0289 6fe0c93d fetch 1 ,mem_device_flag 
+028a c000828d beq mode_bt_device1 ,p_mouse_le_device1_judge 
+028b c0010292 beq mode_bt_device2 ,p_mouse_le_device2_judge 
+028c 20600000 rtn 
+
+p_mouse_le_device1_judge:
+028d 6fe3493f fetch 6 ,mem_device1_addr 
+028e 684b4979 fetcht 6 ,mem_mouse_compare_addr_ff 
+028f 98467c00 isub temp ,null 
+0290 2022c32b branch mouse_buletooth_fast_conn_init ,zero 
+0291 20203e1c branch mouse_start_reconnect_device 
+
+p_mouse_le_device2_judge:
+0292 6fe3495c fetch 6 ,mem_device2_addr 
+0293 684b4979 fetcht 6 ,mem_mouse_compare_addr_ff 
+0294 98467c00 isub temp ,null 
+0295 2022c32b branch mouse_buletooth_fast_conn_init ,zero 
+0296 20203e1c branch mouse_start_reconnect_device 
+
+p_mouse_24g_first_start_auto_pair_mode:
+0297 20403e28 call mouse_wakeup_from_power_check 
+0298 20344855 branch mouse_24g_first_start_reconn ,user 
+
+p_mouse_24g_reconn_general_dongle:
+0299 70493d00 jam mode_24g_device ,mem_device_flag 
+029a 6fe14bcb fetch 2 ,mem_mouse_24g_power_on_fast_conn_timer 
+029b 67e1488b store 2 ,mem_24g_reconn_timeout 
+029c 70488f01 jam fast_conn_and_receiver ,mem_24g_reconn_type 
+029d 20202562 branch g24_reconn_start 
+
+p_mouse_24g_start_mode:
+029e 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+029f c308c842 bbit0 mouse_enable_24g ,mouse_24g_mode_setup_error 
+02a0 20400365 call p_mouse_device_pair_led_config 
+02a1 20403e28 call mouse_wakeup_from_power_check 
+02a2 20344845 branch mouse_24g_reconn_dongle_start ,user 
+02a3 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+02a4 c2980299 bbit1 mouse_enable_auto_24g_paring ,p_mouse_24g_reconn_general_dongle 
+02a5 c318c84b bbit0 mouse_enable_24g_power_on_pairing ,mouse_24g_reconn_general_dongle 
+02a6 20404150 call mouse_key_check_once 
+02a7 1a217e07 and rega ,0x07 ,pdata 
+02a8 6848cbdc fetcht 1 ,mem_mouse_commbination_key_24g 
+02a9 98467c00 isub temp ,null 
+02aa 202284cd branch p_mouse_24g_start_pair_mode ,zero 
+02ab 2020484b branch mouse_24g_reconn_general_dongle 
+
+p_g24_transmit:
+02ac 6fe0c868 fetch 1 ,mem_24g_tx_phy 
+02ad 20401637 call le_enable_phy_by_pdata 
+02ae 6fe2483f fetch 4 ,mem_24g_addr 
+02af 98001200 iforce access 
+02b0 20402181 call g24_prep 
+02b1 204021f5 call g24_set_freq_tx 
+02b2 79202a00 set1 txgfsk ,radio_ctrl 
+02b3 782efc00 enable encode_fec0 
+02b4 78307c00 enable is_tx 
+02b5 7850fc00 disable is_rx 
+02b6 20404d13 call rf_debug_tx_on_line 
+02b7 785d7c00 disable lr_s2en 
+02b8 c517a229 bmark1 mark_ble_lr ,g24_transmit_lr 
+02b9 c51682c0 bmark1 mark_ble_2m ,p_g24_transmit_2m 
+02ba 19317e00 rshift16 access ,pdata 
+02bb 1fecfe00 rshift8 pdata ,pdata 
+02bc 1ff1fe00 rshift4 pdata ,pdata 
+02bd 08008628 inject mod ,40 
+
+p_g24_transmit_packet:
+02be c517a210 bmark1 mark_ble_lr ,g24_transmit_nolr 
+02bf 20202210 branch g24_transmit_nolr 
+
+p_g24_transmit_2m:
+02c0 6fe0c1f0 fetch 1 ,mem_system_clk 
+02c1 1fe37200 rshift pdata ,loopcnt 
+
+p_g24_transmit_2m_dealy:
+02c2 20000002 nop 2 
+02c3 c20002c2 loop p_g24_transmit_2m_dealy 
+02c4 19317e00 rshift16 access ,pdata 
+02c5 1fecfe00 rshift8 pdata ,pdata 
+02c6 1ff18400 rshift4 pdata ,temp 
+02c7 18427e00 copy temp ,pdata 
+02c8 08008608 inject mod ,8 
+02c9 18427e00 copy temp ,pdata 
+02ca 08008628 inject mod ,40 
+02cb 202002be branch p_g24_transmit_packet 
+
+p_mouse_bb_event_timer:
+02cc 20403edc call mouse_adc_read 
+02cd 20400318 call p_mouse_low_voltage_led_timer 
+02ce 204022e1 call g24_pair_timeout_timer 
+02cf 2040255f call g24_reconn_timeout_timer 
+02d0 204002e0 call p_mouse_24g_long_sleep_param_update_timer 
+02d1 20400331 call p_mouse_led_multi_timer 
+02d2 204002e5 call p_mouse_dpi_led_timer 
+02d3 204040bc call mouse_dpi_key_check_long_press 
+02d4 20400440 call p_mouse_bt_discovery_check 
+02d5 20400377 call p_mouse_commbination_key_process 
+02d6 2040453f call mouse_check_discovery_timeout_timer 
+02d7 2040038e call p_mouse_check_direct_timeout_timer 
+02d8 20404552 call mouse_le_enable_att_list_timer 
+02d9 20400392 call p_mouse_le_battery_updata_timer 
+02da 20404555 call mouse_le_send_smp_security_request_timer 
+02db 20400395 call p_mouse_le_send_conn_param_update_timer 
+02dc 20404575 call mouse_current_mult_update_timer 
+02dd 20404062 call mouse_wheel_trigger_timer 
+02de 204003ad call p_mouse_store_information_delay_timer 
+02df 20200398 branch p_mouse_check_no_data_timeout_timer 
+
+p_mouse_24g_long_sleep_param_update_timer:
+02e0 da6048c8 arg mem_24g_long_sleep_param_update_timer ,regc 
+02e1 da4002e3 arg p_mouse_24g_long_sleep_normal_param ,regb 
+02e2 202031fc branch timer_single_step 
+
+p_mouse_24g_long_sleep_normal_param:
+02e3 204003a9 call p_mouse_24g_hibernate_set_check 
+02e4 2020480e branch mouse_24g_long_sleep_normal_param 
+
+p_mouse_dpi_led_timer:
+02e5 6fe0ccbf fetch 1 ,mem_mouse_dpi_led_blink_enable 
+02e6 207a0000 rtn blank 
+02e7 6fe0ccc1 fetch 1 ,mem_mouse_dpi_blink_time 
+02e8 1fe0fe01 pincrease 1 
+02e9 67e0ccc1 store 1 ,mem_mouse_dpi_blink_time 
+02ea c00182ed beq 3 ,p_mouse_dpi_led_on 
+02eb c00302f1 beq 6 ,p_mouse_dpi_led_off_check 
+02ec 20600000 rtn 
+
+p_mouse_dpi_led_on:
+02ed 6fe0ccb5 fetch 1 ,mem_mouse_led_multi_type 
+02ee c2800344 bbit1 led_multi_dpi ,p_mouse_device_multi_led_on 
+02ef 6848ccbc fetcht 1 ,mem_mouse_1io2led_dpi_led 
+02f0 2020610d branch gpio_out_active 
+
+p_mouse_dpi_led_off_check:
+02f1 704cc100 jam 0 ,mem_mouse_dpi_blink_time 
+02f2 6fe0ccc0 fetch 1 ,mem_mouse_dpi_blink_count 
+02f3 1fe0ffff increase -1 ,pdata 
+02f4 67e0ccc0 store 1 ,mem_mouse_dpi_blink_count 
+02f5 243a02f7 nbranch p_mouse_dpi_led_off ,blank 
+02f6 704cbf00 jam 0 ,mem_mouse_dpi_led_blink_enable 
+
+p_mouse_dpi_led_off:
+02f7 6fe0ccb5 fetch 1 ,mem_mouse_led_multi_type 
+02f8 c280034a bbit1 led_multi_dpi ,p_mouse_device_multi_led_off 
+02f9 6848ccbc fetcht 1 ,mem_mouse_1io2led_dpi_led 
+02fa 20206109 branch gpio_out_inactive 
+
+p_mouse_adc_read_start:
+02fb 7048fa00 jam 0 ,mem_adc_read_timer 
+02fc 20406166 call enable_adc 
+02fd 2040618d call vdd_calculate_by_mode 
+02fe 67e148ed store 2 ,mem_mouse_vdd_now_vol 
+02ff 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+0300 c0810307 bne adc_config_gpio ,p_mouse_adc_data_process 
+0301 684948ed fetcht 2 ,mem_mouse_vdd_now_vol 
+0302 184ffe08 mul32 temp ,8 ,pdata 
+0303 1fe6fc0a div pdata ,10 
+0304 20407e61 call get_div_result 
+0305 9840fe00 iadd temp ,pdata 
+0306 67e148ed store 2 ,mem_mouse_vdd_now_vol 
+
+p_mouse_adc_data_process:
+0307 da2048e7 arg mem_mouse_vdd_calculate_set ,rega 
+0308 20403f1a call mouse_adc_bat_percent_lowpower_out 
+0309 6fe0c4a6 fetch 1 ,mem_adc_power_flag 
+030a c280bf5e bbit1 1 ,mouse_power_down 
+030b c300030e bbit0 0 ,p_mouse_adc_no_low_voltage 
+030c 7048fe01 jam 1 ,mem_mouse_adc_last_low_voltage_flag 
+030d 20203f10 branch mouse_adc_low_voltage 
+
+p_mouse_adc_no_low_voltage:
+030e d8e00004 arg mouse_low_voltage_flag ,queue 
+030f 20404732 call mouse_disable_function_flag 
+0310 7048fc0c jam 12 ,mem_adc_low_volatage_led_timer_count 
+0311 6fe0c8fe fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
+0312 207a0000 rtn blank 
+0313 7048fe00 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
+
+p_mouse_low_voltage_led_off:
+0314 6fe0ccb5 fetch 1 ,mem_mouse_led_multi_type 
+0315 c280834a bbit1 led_multi_low ,p_mouse_device_multi_led_off 
+0316 6848ccbd fetcht 1 ,mem_mouse_1io2led_low_led 
+0317 20206109 branch gpio_out_inactive 
+
+p_mouse_low_voltage_led_timer:
+0318 6fe0ccbe fetch 1 ,mem_mouse_pair_success 
+0319 207a0000 rtn blank 
+031a 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+031b c4020000 rtnbit0 mouse_low_voltage_flag 
+031c 6fe0c8fc fetch 1 ,mem_adc_low_volatage_led_timer_count 
+031d 1fe0fe01 increase 1 ,pdata 
+031e 67e0c8fc store 1 ,mem_adc_low_volatage_led_timer_count 
+031f 1fe67c14 sub pdata ,20 ,null 
+0320 24410327 ncall p_mouse_low_volatage_led_timer_count_clean ,positive 
+0321 1fe67c0a sub pdata ,10 ,null 
+0322 20210314 branch p_mouse_low_voltage_led_off ,positive 
+
+p_mouse_low_voltage_led_on:
+0323 6fe0ccb5 fetch 1 ,mem_mouse_led_multi_type 
+0324 c2808344 bbit1 led_multi_low ,p_mouse_device_multi_led_on 
+0325 6848ccbd fetcht 1 ,mem_mouse_1io2led_low_led 
+0326 2020610d branch gpio_out_active 
+
+p_mouse_low_volatage_led_timer_count_clean:
+0327 7048fc01 jam 1 ,mem_adc_low_volatage_led_timer_count 
+0328 20600000 rtn 
+
+p_mouse_led_multi_parm_init:
+0329 704cb100 jam 0 ,mem_mouse_multi_led_blink_enable 
+032a 704cbf00 jam 0 ,mem_mouse_dpi_led_blink_enable 
+032b 704cc100 jam 0 ,mem_mouse_dpi_blink_time 
+
+p_mouse_device_led_all_off:
+032c 20400356 call p_mouse_device_24g_led_off 
+032d 20400358 call p_mouse_device_bt1_led_off 
+032e 2040035a call p_mouse_device_bt2_led_off 
+032f 204002f7 call p_mouse_dpi_led_off 
+0330 20200314 branch p_mouse_low_voltage_led_off 
+
+p_mouse_led_multi_timer:
+0331 6fe0ccb1 fetch 1 ,mem_mouse_multi_led_blink_enable 
+0332 207a0000 rtn blank 
+0333 6fe0ccb2 fetch 1 ,mem_mouse_multi_led_type 
+0334 c000833e beq multi_led_blink ,p_mouse_multi_led_type_blink 
+
+p_mouse_device_multi_led_type_on:
+0335 6fe0ccb6 fetch 1 ,mem_mouse_multi_led_powon_timer 
+0336 203a033a branch p_mouse_device_poweron_led_off ,blank 
+0337 1fe0ffff increase -1 ,pdata 
+0338 67e0ccb6 store 1 ,mem_mouse_multi_led_powon_timer 
+0339 20200344 branch p_mouse_device_multi_led_on 
+
+p_mouse_device_poweron_led_off:
+033a 704cbe01 jam 1 ,mem_mouse_pair_success 
+033b 704cb600 jam 0 ,mem_mouse_multi_led_powon_timer 
+
+p_mouse_multi_led_blink_disable:
+033c 704cb100 jam 0 ,mem_mouse_multi_led_blink_enable 
+033d 2020034a branch p_mouse_device_multi_led_off 
+
+p_mouse_multi_led_type_blink:
+033e da604cb8 arg mem_mouse_multi_led_blink_timer ,regc 
+033f da400341 arg p_mouse_multi_led_blink_start ,regb 
+0340 202031fc branch timer_single_step 
+
+p_mouse_multi_led_blink_start:
+0341 2040035c call p_mouse_multi_led_blink_timer_init 
+0342 6fe0ccb3 fetch 1 ,mem_mouse_multi_led_state 
+0343 c000834a beq on ,p_mouse_device_multi_led_off 
+
+p_mouse_device_multi_led_on:
+0344 704cb301 jam on ,mem_mouse_multi_led_state 
+0345 6fe0c93d fetch 1 ,mem_device_flag 
+0346 c0000350 beq mode_24g_device ,p_mouse_device_24g_led_on 
+0347 c0008352 beq mode_bt_device1 ,p_mouse_device_bt1_led_on 
+0348 c0010354 beq mode_bt_device2 ,p_mouse_device_bt2_led_on 
+0349 20600000 rtn 
+
+p_mouse_device_multi_led_off:
+034a 704cb300 jam off ,mem_mouse_multi_led_state 
+034b 6fe0c93d fetch 1 ,mem_device_flag 
+034c c0000356 beq mode_24g_device ,p_mouse_device_24g_led_off 
+034d c0008358 beq mode_bt_device1 ,p_mouse_device_bt1_led_off 
+034e c001035a beq mode_bt_device2 ,p_mouse_device_bt2_led_off 
+034f 20600000 rtn 
+
+p_mouse_device_24g_led_on:
+0350 6848ccb9 fetcht 1 ,mem_mouse_1io2led_multi_24gled 
+0351 2020610d branch gpio_out_active 
+
+p_mouse_device_bt1_led_on:
+0352 6848ccba fetcht 1 ,mem_mouse_1io2led_multi_bt1led 
+0353 2020610d branch gpio_out_active 
+
+p_mouse_device_bt2_led_on:
+0354 6848ccbb fetcht 1 ,mem_mouse_1io2led_multi_bt2led 
+0355 2020610d branch gpio_out_active 
+
+p_mouse_device_24g_led_off:
+0356 6848ccb9 fetcht 1 ,mem_mouse_1io2led_multi_24gled 
+0357 20206109 branch gpio_out_inactive 
+
+p_mouse_device_bt1_led_off:
+0358 6848ccba fetcht 1 ,mem_mouse_1io2led_multi_bt1led 
+0359 20206109 branch gpio_out_inactive 
+
+p_mouse_device_bt2_led_off:
+035a 6848ccbb fetcht 1 ,mem_mouse_1io2led_multi_bt2led 
+035b 20206109 branch gpio_out_inactive 
+
+p_mouse_multi_led_blink_timer_init:
+035c 6fe0ccb7 fetch 1 ,mem_mouse_multi_led_blink_timer_init 
+035d 67e0ccb8 store 1 ,mem_mouse_multi_led_blink_timer 
+035e 20600000 rtn 
+
+p_mouse_device_poweron_led_config:
+035f 6fe0ccb0 fetch 1 ,mem_mouse_led_new_interface_enable 
+0360 207a0000 rtn blank 
+0361 704cb614 jam 20 ,mem_mouse_multi_led_powon_timer 
+0362 704cb200 jam multi_led_on ,mem_mouse_multi_led_type 
+0363 704cb101 jam on ,mem_mouse_multi_led_blink_enable 
+0364 20600000 rtn 
+
+p_mouse_device_pair_led_config:
+0365 6fe0ccb0 fetch 1 ,mem_mouse_led_new_interface_enable 
+0366 207a0000 rtn blank 
+0367 704cb702 jam 2 ,mem_mouse_multi_led_blink_timer_init 
+
+p_mouse_multi_led_blink_enable:
+0368 704cb300 jam off ,mem_mouse_multi_led_state 
+0369 704cb803 jam 3 ,mem_mouse_multi_led_blink_timer 
+036a 704cb101 jam on ,mem_mouse_multi_led_blink_enable 
+036b 704cb201 jam multi_led_blink ,mem_mouse_multi_led_type 
+036c 20200344 branch p_mouse_device_multi_led_on 
+
+p_mouse_device_discovery_led_config:
+036d 6fe0ccb0 fetch 1 ,mem_mouse_led_new_interface_enable 
+036e 207a0000 rtn blank 
+036f 704cb702 jam 2 ,mem_mouse_multi_led_blink_timer_init 
+0370 20200368 branch p_mouse_multi_led_blink_enable 
+
+p_mouse_device_le_reconn_led_config:
+0371 6fe0ccb0 fetch 1 ,mem_mouse_led_new_interface_enable 
+0372 207a0000 rtn blank 
+0373 6fe0ccb4 fetch 1 ,mem_mouse_le_reconn_led_fuction_enable 
+0374 207a0000 rtn blank 
+0375 704cb705 jam 5 ,mem_mouse_multi_led_blink_timer_init 
+0376 20200368 branch p_mouse_multi_led_blink_enable 
+
+p_mouse_commbination_key_process:
+0377 6fe0c93d fetch 1 ,mem_device_flag 
+0378 c000037d beq mode_24g_device ,p_mouse_24g_commbination_key_process 
+0379 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+037a c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
+037b 6848cbdb fetcht 1 ,mem_mouse_commbination_key_bt 
+037c 20200380 branch p_mouse_commbination_key_start 
+
+p_mouse_24g_commbination_key_process:
+037d 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+037e c4190000 rtnbit0 mouse_enable_commbination_key_by_24g_pairing 
+037f 6848cbdc fetcht 1 ,mem_mouse_commbination_key_24g 
+
+p_mouse_commbination_key_start:
+0380 6048cbae storet 1 ,mem_mouse_commbination_key 
+0381 20404155 call mouse_check_key_gpio 
+0382 1fe17e07 and pdata ,0x07 ,pdata 
+0383 6848cbae fetcht 1 ,mem_mouse_commbination_key 
+0384 98467c00 isub temp ,null 
+0385 20228387 branch p_mouse_commbination_key_down ,zero 
+0386 2020452b branch mouse_commbination_key_up 
+
+p_mouse_commbination_key_down:
+0387 2040038c call p_mouse_combination_ui_timer 
+0388 6fe0cbb0 fetch 1 ,mem_commbination_key_statue 
+0389 c1008000 rtneq commbination_key_state_down 
+038a 704bb001 jam commbination_key_state_down ,mem_commbination_key_statue 
+038b 20600000 rtn 
+
+p_mouse_combination_ui_timer:
+038c da4004cd arg p_mouse_24g_start_pair_mode ,regb 
+038d 20204537 branch mouse_combination_ui_timer + 1 
+
+p_mouse_check_direct_timeout_timer:
+038e da604b88 arg mem_mouse_direct_timer ,regc 
+038f da40454a arg mouse_check_direct_timeout ,regb 
+0390 204031fc call timer_single_step 
+0391 20204547 branch mouse_check_direct_timeout_timer + 3 
+
+p_mouse_le_battery_updata_timer:
+0392 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0393 c39d8000 rtnbit1 mouse_enable_le_battery_service_cancel 
+0394 2020455f branch mouse_le_battery_updata_timer 
+
+p_mouse_le_send_conn_param_update_timer:
+0395 da604c70 arg mem_mouse_le_send_conn_param_update_timer ,regc 
+0396 da4043ac arg mouse_updata_le_param ,regb 
+0397 202031fc branch timer_single_step 
+
+p_mouse_check_no_data_timeout_timer:
+0398 da604ac3 arg mem_mouse_no_data_timer ,regc 
+0399 da40039b arg p_mouse_check_no_data_timeout ,regb 
+039a 20203203 branch timer_single_step_2b 
+
+p_mouse_check_no_data_timeout:
+039b 6fe0c92f fetch 1 ,mem_usb_addr 
+039c c3838000 rtnbit1 7 
+039d 6fe0c93d fetch 1 ,mem_device_flag 
+039e c080435b bne mode_24g_device ,mouse_disconnect 
+
+p_mouse_24g_hibernate_set:
+039f 7048a900 jam 0 ,mem_24g_attempt_fail_flag 
+03a0 20402659 call g24_transmit_next_packet 
+03a1 5fffffff setarg -1 
+03a2 67e2485f store 4 ,mem_24g_enter_hibernate 
+03a3 58000000 setarg 0 
+03a4 67e3c8d4 store 7 ,mem_mouse_key 
+03a5 704bf201 jam 1 ,mem_sensor_shutdown_flag 
+03a6 204003e9 call p_mouse_sensor_powerdown 
+03a7 204003a9 call p_mouse_24g_hibernate_set_check 
+03a8 202004a8 branch p_g24_long_sleep 
+
+p_mouse_24g_hibernate_set_check:
+03a9 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+03aa c28ca6d7 bbit1 mouse_enable_24g_500hz ,g24_transmit_by_interrupt_exit 
+03ab c28d26d7 bbit1 mouse_enable_24g_1000 ,g24_transmit_by_interrupt_exit 
+03ac 20600000 rtn 
+
+p_mouse_store_information_delay_timer:
+03ad da6049c4 arg mem_store_information_delay_timer ,regc 
+03ae da4003b0 arg p_mouse_store_device_info_check ,regb 
+03af 202031fc branch timer_single_step 
+
+p_mouse_store_device_info_check:
+03b0 204003b7 call p_mouse_sensor_spi_clr 
+03b1 20404631 call mouse_store_device_info 
+03b2 204003bb call p_mouse_flash_spi_clr 
+03b3 6fe0cad6 fetch 1 ,mem_mouse_need_soft_reset 
+03b4 207a0000 rtn blank 
+
+p_mouse_soft_reset:
+03b5 204000b7 call p_enable_rc_clock 
+03b6 202046fe branch mouse_soft_reset 
+
+p_mouse_sensor_spi_clr:
+03b7 6848c923 fetcht 1 ,mem_mouse_sensor_sclk_gpio 
+03b8 20403f96 call mouse_gpio_config_input_pu 
+03b9 6848c924 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+03ba 20203f96 branch mouse_gpio_config_input_pu 
+
+p_mouse_flash_spi_clr:
+03bb 6848c4b7 fetcht 1 ,mem_spi_cs_gpio 
+03bc 20403f96 call mouse_gpio_config_input_pu 
+03bd 6848c4ba fetcht 1 ,mem_spi_sclk_gpio 
+03be 20403f96 call mouse_gpio_config_input_pu 
+03bf 6848c4b8 fetcht 1 ,mem_spi_si_gpio 
+03c0 20403f96 call mouse_gpio_config_input_pu 
+03c1 6848c4b9 fetcht 1 ,mem_spi_so_gpio 
+03c2 20203f96 branch mouse_gpio_config_input_pu 
+
+p_mouse_store_device_info:
+03c3 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+03c4 c289c67f bbit1 mouse_enable_eeprom ,mouse_store_eeprom_device_info 
+03c5 20405daf call spid_init_flash 
+03c6 2040464a call mouse_spid_flash_release_form_powerdown 
+03c7 2040465f call mouse_flash_erase_sector 
+03c8 20405db4 call spid_unlock_flash 
+03c9 20204646 branch mouse_store_flash_device_info + 3 
+
+p_mouse_init_sunt:
+03ca 20403fa5 call mouse_sensor_spi_init 
+03cb 20758000 rtn wake 
+
+p_mouse_init_sensor_wakeup:
+03cc 20404276 call mouse_sensor_poweron 
+
+p_mouse_init_sensor:
+03cd 204041f5 call mouse_read_sensor_id 
+03ce c01803d4 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
+03cf c018c257 beq p3065_id1 ,mouse_init_p3065 
+03d0 c02c03d8 beq pka8g2_id1 ,p_mouse_ka8g2_id2_judge 
+03d1 204041f2 call mouse_twspi_reset 
+03d2 20001af4 nop 6900 
+03d3 202003cd branch p_mouse_init_sensor 
+
+p_mouse_init_p32xx_id2_judge:
+03d4 6fe0c9c7 fetch 1 ,mem_sensor_id2 
+03d5 1fe17ef0 and_into 0xf0 ,pdata 
+03d6 c060425e beq p3204_tjdm_id2 ,mouse_p3065xy_init_param 
+03d7 202041fc branch mouse_init_p32xx_id2_judge 
+
+p_mouse_ka8g2_id2_judge:
+03d8 6fe0c9c7 fetch 1 ,mem_sensor_id2 
+03d9 c02b83dc beq ka5857_id2 ,p_mouse_ka5857_init_param 
+03da c02cc264 beq pka8g2_id2 ,mouse_ka8g2_init_param 
+03db 202003cd branch p_mouse_init_sensor 
+
+p_mouse_ka5857_init_param:
+03dc 70492c0c jam ka5857 ,mem_config_sensor_type 
+03dd da604c74 arg mem_sensor_ka5857_init ,regc 
+03de 202003e4 branch p_mouse_sensor_poweron_end 
+
+p_mouse_sensor_poweron:
+03df 20403fa5 call mouse_sensor_spi_init 
+03e0 6fe0c92c fetch 1 ,mem_config_sensor_type 
+03e1 c00583e6 beq ka8g2 ,p_mouse_ka8g2_sensor_init 
+
+p_mouse_sensor_poweron_next:
+03e2 20404272 call mouse_sensor_reset 
+03e3 da604ab4 arg mem_sensor_poweron_init ,regc 
+
+p_mouse_sensor_poweron_end:
+03e4 2040426b call mouse_sensor_wr_seq 
+03e5 20200461 branch p_mouse_seting_sensor_type 
+
+p_mouse_ka8g2_sensor_init:
+03e6 204003f9 call p_mouse_ka8g2_sensor_reset 
+03e7 da604bf5 arg mem_ka8g2_sensor_poweron_init ,regc 
+03e8 202003e4 branch p_mouse_sensor_poweron_end 
+
+p_mouse_sensor_powerdown:
+03e9 204041e7 call mouse_init_sunt 
+03ea 20403fa5 call mouse_sensor_spi_init 
+03eb 6fe0c92c fetch 1 ,mem_config_sensor_type 
+03ec c00583ee beq ka8g2 ,p_mouse_ka8g2_sensor_powerdown 
+03ed 2020427e branch mouse_sensor_powerdown_end 
+
+p_mouse_ka8g2_sensor_powerdown:
+03ee 58001f06 setarg 0x1f06 
+03ef 20205d5e branch twspi_write 
+
+p_mouse_app_enter_hibernate:
+03f0 58000006 setarg pan_reg_config 
+03f1 20405d65 call twspi_read 
+03f2 c281be5d bbit1 3 ,mouse_app_enter_hibernate + 3 
+03f3 204003f6 call p_mouse_sensor_reset 
+03f4 204003e9 call p_mouse_sensor_powerdown 
+03f5 20203e5d branch mouse_app_enter_hibernate + 3 
+
+p_mouse_sensor_reset:
+03f6 6fe0c92c fetch 1 ,mem_config_sensor_type 
+03f7 c00583f9 beq ka8g2 ,p_mouse_ka8g2_sensor_reset 
+03f8 20204272 branch mouse_sensor_reset 
+
+p_mouse_ka8g2_sensor_reset:
+03f9 58009706 setarg 0x9706 
+03fa 20204273 branch mouse_sensor_reset_end 
+
+p_mouse_setgpio_hibernate:
+03fb 20404329 call mouse_set_sdio_high 
+03fc 20407f52 call clear_wake 
+03fd 20404055 call mouse_before_hibernate_wheel_gpio_set 
+03fe 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+03ff 2040610d call gpio_out_active 
+0400 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+0401 204060e6 call gpio_clr_wake 
+0402 6fe0c924 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+0403 20400612 call p_mouse_gpio_config_output_high 
+0404 20403e80 call mouse_lpm_before_common 
+0405 20403e72 call mouse_gpio_pu_idle 
+0406 d8400001 arg 0x01 ,temp 
+0407 2040610d call gpio_config_output 
+0408 d8400013 arg 19 ,temp 
+0409 20403f96 call mouse_gpio_config_input_pu 
+040a 2040032c call p_mouse_device_led_all_off 
+040b 2040040f call p_mouse_device_switch_gpio_high_impedance 
+040c 20400413 call p_mouse_wheel_gpio_set_before_hibernate 
+040d d8400000 arg 0x00 ,temp 
+040e 202060e6 branch gpio_clr_wake 
+
+p_mouse_device_switch_gpio_high_impedance:
+040f 6fe0c922 fetch 1 ,mem_device_switch_gpio 
+0410 c17f8000 rtneq gpio_disable 
+0411 6848c922 fetcht 1 ,mem_device_switch_gpio 
+0412 20206121 branch gpio_set_high_impedance 
+
+p_mouse_wheel_gpio_set_before_hibernate:
+0413 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0414 c41e0000 rtnbit0 mouse_enable_wheel_wake_up_cancel 
+
+p_mouse_wheel_clr_wakeup:
+0415 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+0416 204060e6 call gpio_clr_wake 
+0417 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+0418 204060e6 call gpio_clr_wake 
+0419 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+041a 20403f94 call mouse_gpio_config_input_pd 
+041b 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+041c 20203f94 branch mouse_gpio_config_input_pd 
+
+p_mouse_short_sleep_clear_wake:
+041d 20407f52 call clear_wake 
+041e 2020155d branch lpm_write_gpio_wakeup 
+
+p_mouse_lpm_before_common:
+041f 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+0420 204060f4 call gpio_config_input 
+0421 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+0422 204060f4 call gpio_config_input 
+0423 20203e81 branch mouse_lpm_before_common + 1 
+
+p_mouse_idle:
+0424 204049dd call mouse_low_voltage_led_no_enter_lpm 
+0425 204079a1 call ui_check_paring_button 
+0426 20400443 call p_mouse_dpi_check 
+0427 2040042c call p_mouse_select_device_check 
+0428 2040042f call p_mouse_check_select_device_by_switch 
+0429 20404714 call mouse_bt_button_check 
+042a 20403fc8 call mouse_wheel_check 
+042b 20600000 rtn 
+
+p_mouse_select_device_check:
+042c 6fe0ccaf fetch 1 ,mem_usb_mode_enable 
+042d 247a0000 nrtn blank 
+042e 20204693 branch mouse_select_device_check 
+
+p_mouse_check_select_device_by_switch:
+042f 6fe0ccaf fetch 1 ,mem_usb_mode_enable 
+0430 247a0000 nrtn blank 
+0431 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0432 c4150000 rtnbit0 mouse_enable_select_device_by_switch_gpio 
+0433 6848c922 fetcht 1 ,mem_device_switch_gpio 
+0434 20403f96 call mouse_gpio_config_input_pu 
+0435 6848c922 fetcht 1 ,mem_device_switch_gpio 
+0436 204060fd call gpio_get_bit 
+0437 2020c6ef branch mouse_check_select_24g_device ,true 
+
+p_mouse_select_btdevice:
+0438 6fe0c93d fetch 1 ,mem_device_flag 
+0439 c1008000 rtneq mode_bt_device1 
+043a 70493d01 jam mode_bt_device1 ,mem_device_flag 
+043b 202046fe branch mouse_soft_reset 
+
+p_mouse_check_select_24g_device:
+043c 6fe0c93d fetch 1 ,mem_device_flag 
+043d c1000000 rtneq mode_24g_device 
+043e 70493d00 jam mode_24g_device ,mem_device_flag 
+043f 202046fe branch mouse_soft_reset 
+
+p_mouse_bt_discovery_check:
+0440 6fe0ccaf fetch 1 ,mem_usb_mode_enable 
+0441 247a0000 nrtn blank 
+0442 2020450c branch mouse_bt_discovery_check 
+
+p_mouse_dpi_check:
+0443 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0444 c2974076 bbit1 mouse_enable_dpi_key_connect_adc ,mouse_dpi_check_connect_adc 
+0445 6fe0c913 fetch 1 ,mem_dpi_button_gpio 
+0446 c17f8000 rtneq gpio_disable 
+0447 da200000 arg 0 ,rega 
+0448 704ba705 jam mouse_dpi_key ,mem_mouse_key_temp 
+0449 6848c913 fetcht 1 ,mem_dpi_button_gpio 
+044a 2040044c call p_mouse_dpi_key_check 
+044b 2020406f branch mouse_dpi_check_next 
+
+p_mouse_dpi_key_check:
+044c 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+044d c2964088 bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
+044e 6fe0cba4 fetch 1 ,mem_mouse_dpikey_press_status 
+044f 1fe22600 copy pdata ,regc 
+0450 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+0451 c07f8453 beq gpio_disable ,p_mouse_3io6key_dpi_check 
+0452 2020407f branch mouse_dpi_key_check_next 
+
+p_mouse_3io6key_dpi_check:
+0453 6fe0c913 fetch 1 ,mem_dpi_button_gpio 
+0454 20400615 call p_mouse_gpio_config_output_low 
+0455 6848c913 fetcht 1 ,mem_dpi_button_gpio 
+0456 202041d5 branch mouse_3io6key_check 
+
+p_mouse_dpi_process:
+0457 204040b2 call mouse_dpi_ghost_check 
+0458 20740000 rtn user 
+0459 6fe0c997 fetch 1 ,mem_mouse_dpi 
+045a 1fe0fe01 increase 1 ,pdata 
+045b 1fe17e03 and pdata ,0x03 ,pdata 
+045c 67e0c997 store 1 ,mem_mouse_dpi 
+045d 20400460 call p_mouse_seting_dpi 
+045e 20400464 call p_mouse_dpi_led_blink_init 
+045f 2020462e branch mouse_store_device_info_delay 
+
+p_mouse_seting_dpi:
+0460 204040cf call mouse_setting_dpi_4_level 
+
+p_mouse_seting_sensor_type:
+0461 6fe0c92c fetch 1 ,mem_config_sensor_type 
+0462 c00640fb beq ka5857 ,mouse_seting_3212_dpi 
+0463 202040d8 branch mouse_seting_sensor_type 
+
+p_mouse_dpi_led_blink_init:
+0464 6fe0ccbe fetch 1 ,mem_mouse_pair_success 
+0465 207a0000 rtn blank 
+0466 6fe0c997 fetch 1 ,mem_mouse_dpi 
+0467 c000046d beq mouse_dpi_level1 ,p_mouse_dpi_level_2 
+0468 c000846f beq mouse_dpi_level2 ,p_mouse_dpi_level_3 
+0469 c001046b beq mouse_dpi_level3 ,p_mouse_dpi_level_1 
+046a 20600000 rtn 
+
+p_mouse_dpi_level_1:
+046b 58000001 setarg 1 
+046c 20200470 branch p_mouse_dpi_blink_count_init 
+
+p_mouse_dpi_level_2:
+046d 58000002 setarg 2 
+046e 20200470 branch p_mouse_dpi_blink_count_init 
+
+p_mouse_dpi_level_3:
+046f 58000003 setarg 3 
+
+p_mouse_dpi_blink_count_init:
+0470 67e0ccc0 store 1 ,mem_mouse_dpi_blink_count 
+0471 704cbf01 jam 1 ,mem_mouse_dpi_led_blink_enable 
+0472 20600000 rtn 
+
+p_mouse_priority_bb_event:
+0473 1a627e00 copy regc ,pdata 
+0474 c01e048a beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
+0475 c01c8486 beq bt_evt_24g_pairing_complete ,p_mouse_24g_pairing_complete 
+0476 c01d049a beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
+0477 c01904d0 beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
+0478 c00a84dc beq bt_evt_le_disconnected ,p_mouse_le_bb_disconnected 
+0479 c00a04e5 beq bt_evt_le_connected ,p_mouse_le_bb_event_connected 
+047a c02004d7 beq bt_evt_le_parse_conn_papa_update_rsp ,p_mouse_le_conn_param_update_rsp_recieved 
+047b c001047d beq bt_evt_bb_disconnected ,p_mouse_bb_disconnected 
+047c 20204376 branch mouse_priority_bb_event + 2 
+
+p_mouse_bb_disconnected:
+047d 704b9000 jam 0 ,mem_mouse_enter_sniff_count 
+047e 704b9900 jam 0 ,mem_mouse_bt_send_first_package_flag 
+047f 20404433 call mouse_bt_sniff_param_interval_setup 
+0480 20404449 call mouse_bb_discon_clear_stack 
+0481 6fe0ccaf fetch 1 ,mem_usb_mode_enable 
+0482 247a0000 nrtn blank 
+0483 20204442 branch mouse_bb_disconnected + 4 
+
+p_mouse_agc_disable_nomal_power:
+0484 2040015c call p_mouse_soft_agc_disable 
+0485 20200128 branch p_mouse_fetch_normal_tx_power 
+
+p_mouse_24g_pairing_complete:
+0486 20400484 call p_mouse_agc_disable_nomal_power 
+0487 20404584 call mouse_no_data_timer_init 
+0488 2040035f call p_mouse_device_poweron_led_config 
+0489 20204896 branch mouse_24g_pairing_complete 
+
+p_mouse_24g_attempt_success:
+048a 6fe2483f fetch 4 ,mem_24g_addr 
+048b 67e24895 store 4 ,mem_24g_receiver_addr 
+048c 67e24998 store 4 ,mem_mouse_24g_addr 
+048d 20402587 call g24_ch_syncword_crc8_init 
+048e 20404584 call mouse_no_data_timer_init 
+048f 2040430a call mouse_init_sensor_reset 
+0490 704abf00 jam 0 ,mem_mouse_long_mult_flag 
+0491 7048a500 jam 0 ,mem_24g_conn_sm 
+0492 70488f00 jam 0 ,mem_24g_reconn_type 
+0493 6fe24895 fetch 4 ,mem_24g_receiver_addr 
+0494 684a4891 fetcht 4 ,mem_24g_fast_conn_addr 
+0495 98467c00 isub temp ,null 
+0496 20628000 rtn zero 
+0497 2040035f call p_mouse_device_poweron_led_config 
+0498 20400484 call p_mouse_agc_disable_nomal_power 
+0499 20204861 branch mouse_24g_first_store_reconn_info 
+
+p_mouse_24g_attempt_fail:
+049a 704cbe00 jam 0 ,mem_mouse_pair_success 
+049b 20400484 call p_mouse_agc_disable_nomal_power 
+049c 6fe0c8a9 fetch 1 ,mem_24g_attempt_fail_flag 
+049d 243a039f nbranch p_mouse_24g_hibernate_set ,blank 
+049e 6fe0c88f fetch 1 ,mem_24g_reconn_type 
+049f c00104c0 beq fast_conn_and_3_0_addr ,p_mouse_24g_fast_conn_attempt_fail 
+04a0 c00084c0 beq fast_conn_and_receiver ,p_mouse_24g_fast_conn_attempt_fail 
+04a1 c002c883 beq pair_and_receiver ,mouse_24g_auto_pair_attempt_fail 
+04a2 20204876 branch mouse_24g_attempt_fail + 4 
+
+p_g24_nodata_transmit:
+04a3 6fe0c8ab fetch 1 ,mem_24g_abort_pac 
+04a4 205a04b2 call p_g24_send_abort_packet ,blank 
+04a5 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+04a6 c1008000 rtneq g24_tx_timer_int_enable 
+04a7 204026a6 call g24_search_receiver 
+
+p_g24_long_sleep:
+04a8 204026c2 call g24_lpm_wait 
+04a9 24740000 nrtn user 
+04aa 204026cb call g24_setgpio_lpm_before 
+04ab 704c3100 jam 0 ,mem_sleep_miss 
+04ac 704c3201 jam 1 ,mem_long_sleep_flag 
+04ad 20400114 call p_send_time_long_wake 
+04ae 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+04af 245a3e6a ncall mouse_setgpio_hibernate ,blank 
+04b0 6fe2485f fetch 4 ,mem_24g_enter_hibernate 
+04b1 202026bf branch g24_long_seep2 
+
+p_g24_send_abort_packet:
+04b2 70483901 jam type_ms ,mem_24g_data_type 
+04b3 7048ab01 jam 1 ,mem_24g_abort_pac 
+04b4 20402649 call g24_transmit_rf_ctrl_clear 
+04b5 67e0c7c9 store 1 ,mem_24g_txbuf 
+04b6 58000000 setarg 0 
+04b7 67e3c7ca store 7 ,mem_24g_txbuf + 1 
+04b8 6fe248ad fetch 4 ,mem_24g_device_addr 
+04b9 67e247d1 store 4 ,mem_24g_txbuf + 8 
+04ba 7048380c jam 12 ,mem_24g_datalen 
+04bb 6fe0c839 fetch 1 ,mem_24g_data_type 
+04bc 79207e03 set1 bit_abort ,pdata 
+04bd 67e0c839 store 1 ,mem_24g_data_type 
+04be 20402247 call g24_transmit_prep 
+04bf 20200163 branch p_g24_transmit_start 
+
+p_mouse_24g_fast_conn_attempt_fail:
+04c0 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+04c1 c29784c9 bbit1 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_start_auto_pair 
+04c2 c29804c9 bbit1 mouse_enable_auto_24g_paring ,p_mouse_24g_start_auto_pair 
+04c3 c31d4845 bbit0 mouse_enable_24g_auto_pair_nerver_been_paired ,mouse_24g_reconn_dongle_start 
+04c4 6fe24998 fetch 4 ,mem_mouse_24g_addr 
+04c5 684a4979 fetcht 4 ,mem_mouse_compare_addr_ff 
+04c6 98467c00 isub temp ,null 
+04c7 202284cd branch p_mouse_24g_start_pair_mode ,zero 
+04c8 20204845 branch mouse_24g_reconn_dongle_start 
+
+p_mouse_24g_start_auto_pair:
+04c9 6fe14885 fetch 2 ,mem_24g_pair_timeout_init 
+04ca 67e1488b store 2 ,mem_24g_reconn_timeout 
+04cb 70488f05 jam pair_and_receiver ,mem_24g_reconn_type 
+04cc 20202562 branch g24_reconn_start 
+
+p_mouse_24g_start_pair_mode:
+04cd 70488f00 jam 0 ,mem_24g_reconn_type 
+04ce 20400365 call p_mouse_device_pair_led_config 
+04cf 20204866 branch mouse_24g_start_pair_mode 
+
+p_mouse_le_ll_start_encryt:
+04d0 6fe0cad8 fetch 1 ,mem_mouse_le_reconnect_flag 
+04d1 c00084d4 beq 1 ,p_mouse_le_ll_reconn_start_encryt 
+04d2 704b8714 jam 20 ,mem_le_start_encrypt_timer 
+04d3 202043b3 branch mouse_le_ll_enable_start_enc_flag 
+
+p_mouse_le_ll_reconn_start_encryt:
+04d4 204043ac call mouse_updata_le_param 
+04d5 704b870a jam 10 ,mem_le_start_encrypt_timer 
+04d6 202043b3 branch mouse_le_ll_enable_start_enc_flag 
+
+p_mouse_le_conn_param_update_rsp_recieved:
+04d7 6fe0cc6f fetch 1 ,mem_mouse_le_send_conn_param_update 
+04d8 247a0000 nrtn blank 
+04d9 704c6f01 jam 1 ,mem_mouse_le_send_conn_param_update 
+04da 704c701e jam 30 ,mem_mouse_le_send_conn_param_update_timer 
+04db 20600000 rtn 
+
+p_mouse_le_bb_disconnected:
+04dc 58000000 setarg 0 
+04dd 67e14b03 store 2 ,mem_le_battery_level_updata_timer 
+04de 67e0cc6f store 1 ,mem_mouse_le_send_conn_param_update 
+04df 67e0cc70 store 1 ,mem_mouse_le_send_conn_param_update_timer 
+04e0 67e0cad7 store 1 ,mem_mouse_le_bb_connected_flag 
+04e1 704b0500 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+04e2 704abd00 jam 0 ,mem_mouse_clear_sensor_data_flag 
+04e3 20401ac8 call le_clr_config_more_data 
+04e4 2020047d branch p_mouse_bb_disconnected 
+
+p_mouse_le_bb_event_connected:
+04e5 2040035f call p_mouse_device_poweron_led_config 
+04e6 20204390 branch mouse_le_bb_event_connected 
+
+p_g24_pair_dispatch:
+04e7 70488f00 jam default_24g_device ,mem_24g_reconn_type 
+04e8 6fe14bfd fetch 2 ,mem_24g_pair_count 
+04e9 1fe0fe01 increase 1 ,pdata 
+04ea 67e14bfd store 2 ,mem_24g_pair_count 
+04eb 6fe0cbfd fetch 1 ,mem_24g_pair_count 
+04ec 1fe17eff and pdata ,0xff ,pdata 
+04ed c00004ef beq 0 ,p_g24_pair_dispatch2 
+04ee 20600000 rtn 
+
+p_g24_pair_dispatch2:
+04ef 6fe0c883 fetch 1 ,mem_24g_pair_sm 
+04f0 c07fa344 beq state_24g_pairing_success ,g24_pair_exit 
+04f1 c00084f6 beq state_24g_pairing_1 ,p_g24_pair_sm_1 
+04f2 c00104f8 beq state_24g_pairing_2 ,p_g24_pair_sm_2 
+04f3 c00184fe beq state_24g_pairing_3 ,p_g24_pair_sm_3 
+04f4 c0020504 beq state_24g_pairing_4 ,p_g24_pair_sm_4 
+04f5 20600000 rtn 
+
+p_g24_pair_sm_1:
+04f6 7047c9ff jam datatype_attemp ,mem_24g_txbuf 
+04f7 20200505 branch p_g24_pair_sm_prep 
+
+p_g24_pair_sm_2:
+04f8 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+04f9 203a04fc branch p_g24_pair_sm_2_skip ,blank 
+04fa 6fe248ad fetch 4 ,mem_24g_device_addr 
+04fb 20402292 call g24_update_addr_and_synccrc8 
+
+p_g24_pair_sm_2_skip:
+04fc 7047c9aa jam datatype_bind ,mem_24g_txbuf 
+04fd 20200505 branch p_g24_pair_sm_prep 
+
+p_g24_pair_sm_3:
+04fe 7047c955 jam datatype_config ,mem_24g_txbuf 
+04ff 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+0500 203a0505 branch p_g24_pair_sm_prep ,blank 
+0501 6fe24895 fetch 4 ,mem_24g_receiver_addr 
+0502 67e247cb store 4 ,mem_24g_txbuf + 2 
+0503 20200507 branch p_g24_pair_sm_common 
+
+p_g24_pair_sm_4:
+0504 7047c922 jam datatype_ok ,mem_24g_txbuf 
+
+p_g24_pair_sm_prep:
+0505 6fe248ad fetch 4 ,mem_24g_device_addr 
+0506 67e247cb store 4 ,mem_24g_txbuf + 2 
+
+p_g24_pair_sm_common:
+0507 6fe0c839 fetch 1 ,mem_24g_data_type 
+0508 1fe17e07 and_into bits_data ,pdata 
+0509 67e0c7ca store 1 ,mem_24g_txbuf + 1 
+050a 7047cf00 jam 0 ,mem_24g_txbuf + 6 
+050b 70483807 jam 7 ,mem_24g_datalen 
+050c 20402247 call g24_transmit_prep 
+050d 20400202 call p_g24_transmit_receive_ack 
+050e 20202316 branch g24_pair_sm_common + 7 
+
+p_g24_pair_sm_common_next:
+050f 6fe0c883 fetch 1 ,mem_24g_pair_sm 
+0510 c17f8000 rtneq state_24g_pairing_success 
+0511 c0010513 beq state_24g_pairing_2 ,p_g24_pair_sm_2_waiting_ack 
+0512 2020231d branch g24_pair_sm_common_next + 2 
+
+p_g24_pair_sm_2_waiting_ack:
+0513 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+0514 203a232d branch g24_pair_sm_2_waiting_ack_skip ,blank 
+0515 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+0516 207a0000 rtn blank 
+0517 67e24895 store 4 ,mem_24g_receiver_addr 
+0518 2020232d branch g24_pair_sm_2_waiting_ack_skip 
+
+p_g24_reconn_dispatch:
+0519 6fe1488d fetch 2 ,mem_24g_reconn_count 
+051a d84001f8 arg 0x01f8 ,temp 
+051b 98417e00 iand temp ,pdata 
+051c 203a0524 branch p_g24_reconn_dispatch_next ,blank 
+051d 6fe1488d fetch 2 ,mem_24g_reconn_count 
+051e 1fe0fe01 increase 1 ,pdata 
+051f 67e1488d store 2 ,mem_24g_reconn_count 
+0520 20600000 rtn 
+
+p_g24_reconn_mode_judge:
+0521 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0522 c29822e4 bbit1 mouse_enable_auto_24g_paring ,g24_pair_start 
+0523 20202577 branch g24_reconn_receiver_addr 
+
+p_g24_reconn_dispatch_next:
+0524 204025a3 call g24_reconn_data_prep 
+0525 20400202 call p_g24_transmit_receive_ack 
+0526 242c0542 nbranch p_g24_reconn_device_fail ,sync 
+0527 24378542 nbranch p_g24_reconn_device_fail ,user3 
+0528 20402679 call g24_ackpayload_parse 
+0529 6fe0c82d fetch 1 ,mem_24g_rxdata_length 
+052a 203a053b branch p_receiver_addr_zero_handle ,blank 
+
+p_g24_reconn_receiver_addr_handle:
+052b 6fe2487b fetch 4 ,mem_24g_pair_addr 
+052c 684a483f fetcht 4 ,mem_24g_addr 
+052d 98467c00 isub temp ,null 
+052e 20228521 branch p_g24_reconn_mode_judge ,zero 
+052f 6fe248ad fetch 4 ,mem_24g_device_addr 
+0530 684a483f fetcht 4 ,mem_24g_addr 
+0531 98467c00 isub temp ,null 
+0532 2042853e call p_g24_store_receiver_addr ,zero 
+0533 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+0534 793ffe02 set0 state_24g_reconn ,pdata 
+0535 67e0c8a5 store 1 ,mem_24g_conn_sm 
+0536 58000000 setarg 0 
+0537 67e14887 store 2 ,mem_24g_pair_timeout 
+0538 67e1488d store 2 ,mem_24g_reconn_count 
+0539 67e1488b store 2 ,mem_24g_reconn_timeout 
+053a 2020259e branch g24_reconn_attempt_success 
+
+p_receiver_addr_zero_handle:
+053b 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+053c 207a0000 rtn blank 
+053d 2020052b branch p_g24_reconn_receiver_addr_handle 
+
+p_g24_store_receiver_addr:
+053e 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+053f 207a0000 rtn blank 
+0540 67e24895 store 4 ,mem_24g_receiver_addr 
+0541 20202587 branch g24_ch_syncword_crc8_init 
+
+p_g24_reconn_device_fail:
+0542 6fe0c890 fetch 1 ,mem_24g_fast_conn_enable 
+0543 203a2281 branch g24_ch ,blank 
+0544 6fe1488d fetch 2 ,mem_24g_reconn_count 
+0545 1fe0fe01 increase 1 ,pdata 
+0546 67e1488d store 2 ,mem_24g_reconn_count 
+0547 2feffe09 isolate1 9 ,pdata 
+0548 6fe0c88f fetch 1 ,mem_24g_reconn_type 
+0549 c002854d beq pair_and_receiver ,p_g24_reconn_pair_receiver 
+054a c0020556 beq pair_and_3_0_addr ,p_g24_reconn_pair_and_3_0 
+054b c0010553 beq fast_conn_and_3_0_addr ,p_g24_reconn_fast_conn_and_3_0 
+054c 202025b1 branch g24_reconn_device_fail + 7 
+
+p_g24_reconn_pair_receiver:
+054d 2020a577 branch g24_reconn_receiver_addr ,true 
+054e 202022ef branch g24_pair_init_param 
+
+p_g24_reconn_fast_conn_and_receiver:
+054f 2020a577 branch g24_reconn_receiver_addr ,true 
+0550 2020256f branch g24_reconn_fast_conn 
+
+p_g24_reconn_pair_and_receiver:
+0551 2020a577 branch g24_reconn_receiver_addr ,true 
+0552 202022ef branch g24_pair_init_param 
+
+p_g24_reconn_fast_conn_and_3_0:
+0553 2020a57e branch g24_reconn_device_3_0_addr ,true 
+0554 7041e8aa jam tx_power_fast_conn ,mem_tx_power 
+0555 20202571 branch g24_reconn_fast_conn + 2 
+
+p_g24_reconn_pair_and_3_0:
+0556 2020a57e branch g24_reconn_device_3_0_addr ,true 
+0557 202022ef branch g24_pair_init_param 
+
+p_g24_lpm_wait:
+0558 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
+0559 243a7ec7 nbranch disable_user ,blank 
+055a 78347c00 enable user 
+055b 20401436 call lpo_calibration 
+055c 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+055d 203a7ec7 branch disable_user ,blank 
+055e 6fe0c099 fetch 1 ,mem_lpm_mode 
+055f 203a7ec7 branch disable_user ,blank 
+0560 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+0561 c000fec7 beq g24_tx_timer_int_enable ,disable_user 
+0562 20600000 rtn 
+
+p_mouse_start_discovery:
+0563 2040036d call p_mouse_device_discovery_led_config 
+0564 6fe1478f fetch 2 ,mem_ui_state_map 
+0565 2feffe0b isolate1 ui_state_ble_adv ,pdata 
+0566 2040c5c1 call mouse_stop_le_adv ,true 
+0567 6fe1478f fetch 2 ,mem_ui_state_map 
+0568 2feffe07 isolate1 ui_state_bt_reconnect ,pdata 
+0569 2040c362 call mouse_cancel_reconnect ,true 
+056a 58000000 setarg 0 
+056b 67e14b03 store 2 ,mem_le_battery_level_updata_timer 
+056c 20204594 branch mouse_start_discovery + 1 
+
+p_mouse_stop_discovery:
+056d 58000000 setarg 0 
+056e 67e14ad3 store 2 ,mem_mouse_discovery_timer 
+056f 202045b7 branch mouse_stop_discovery + 1 
+
+p_ui_timer_check:
+0570 6fe0cbf4 fetch 1 ,mem_power_on_flag 
+0571 245a78cc ncall ui_timer_init ,blank 
+0572 704bf400 jam 0 ,mem_power_on_flag 
+0573 202078bc branch ui_timer_check + 1 
+
+p_le_enable_phy_by_pdata:
+0574 18427e00 copy temp ,pdata 
+0575 c2801651 bbit1 bit_le_1m_phy ,le_enable 
+0576 c2808578 bbit1 bit_le_2m_phy ,p_le_enable_2m 
+0577 2020163c branch le_enable_phy_by_pdata + 5 
+
+p_le_enable_2m:
+0578 20401640 call le_enable_2m 
+0579 2040057e call p_mouse_le_config_check_set 
+057a 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+057b 20600000 rtn 
+
+p_end_of_packet:
+057c 2040057e call p_mouse_le_config_check_set 
+057d 20200e7d branch end_of_packet + 1 
+
+p_mouse_le_config_check_set:
+057e 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+057f c28c8582 bbit1 mouse_enable_24g_500hz ,p_mouse_le_register_set 
+0580 c28d0582 bbit1 mouse_enable_24g_1000 ,p_mouse_le_register_set 
+0581 20600000 rtn 
+
+p_mouse_le_register_set:
+0582 70893002 jam 0x02 ,0x8930 
+0583 20600000 rtn 
+
+p_le_slave_match:
+0584 6fe0c3dd fetch 1 ,mem_le_md_count 
+0585 1fe0fe01 pincrease 1 
+0586 67e0c3dd store 1 ,mem_le_md_count 
+0587 c0061606 beq le_md_max_count ,le_slave_cont 
+0588 204018c7 call le_acknowledge 
+0589 20401916 call le_prepare_tx 
+058a 6fe082bd fetch 1 ,mem_le_tx_phy 
+058b 20401637 call le_enable_phy_by_pdata 
+058c 204017e4 call le_transmit 
+058d 20201601 branch le_slave_match + 10 
+
+p_le_slave_unsync:
+058e 20400e7c call end_of_packet 
+058f 2020160d branch le_slave_unsync + 1 
+
+p_le_parse_l2cap:
+0590 efe10006 ifetch 2 ,contr 
+0591 c0020593 beq le_l2cap_cid_att ,p_le_parse_att 
+0592 20201990 branch le_parse_l2cap + 10 
+
+p_le_parse_att:
+0593 efe18006 ifetch 3 ,contr 
+0594 67e1c436 store 3 ,mem_le_att_opcode 
+0595 c0050598 beq attop_read_request ,p_le_parse_att_read_request 
+0596 c00905a7 beq attop_write_request ,p_le_parse_att_write_request 
+0597 20201c7f branch le_parse_att + 2 
+
+p_le_parse_att_read_request:
+0598 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+0599 c31d9d93 bbit0 mouse_enable_le_battery_service_cancel ,le_parse_att_read_request 
+059a 20401e39 call le_check_encrypt_state 
+059b 68494437 fetcht 2 ,mem_le_att_handle 
+059c 6fe0c3c0 fetch 1 ,mem_le_configuration 
+059d c28185a2 bbit1 bit_ble_read_auth ,p_le_send_att_read_response_check_auth 
+
+p_le_send_att_read_response:
+059e 6fe14437 fetch 2 ,mem_le_att_handle 
+059f c0181e74 beq 0x30 ,le_send_att_error_response_notfound 
+05a0 68494437 fetcht 2 ,mem_le_att_handle 
+05a1 20201d97 branch le_send_att_read_response 
+
+p_le_send_att_read_response_check_auth:
+05a2 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+05a3 98467c00 isub temp ,null 
+05a4 2422859e nbranch p_le_send_att_read_response ,zero 
+05a5 2434059e nbranch p_le_send_att_read_response ,user 
+05a6 20201dbc branch le_send_att_read_response_error_insufficient_auth 
+
+p_le_parse_att_write_request:
+05a7 18c22200 copy contr ,rega 
+05a8 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+05a9 1fe0a5fd add pdata ,-3 ,regb 
+05aa 204019d1 call le_writeatt_cb 
+05ab 6fe0cad2 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+05ac c07f9e1f beq 0xff ,le_send_att_write_response_check_auth 
+05ad 6fe0cad8 fetch 1 ,mem_mouse_le_reconnect_flag 
+05ae 203a1e1f branch le_send_att_write_response_check_auth ,blank 
+05af 6fe0cb86 fetch 1 ,mem_le_connect_status_flag 
+05b0 c2809e1f bbit1 ll_start_enc_flag ,le_send_att_write_response_check_auth 
+05b1 5800001a setarg 0x001a 
+05b2 68494437 fetcht 2 ,mem_le_att_handle 
+05b3 98467c00 isub temp ,null 
+05b4 24229e1f nbranch le_send_att_write_response_check_auth ,zero 
+05b5 20201dbc branch le_send_att_read_response_error_insufficient_auth 
+
+p_mouse_motion:
+05b6 78547c00 disable user 
+05b7 58000000 setarg 0 
+05b8 67e348d5 store 6 ,mem_mouse_x 
+05b9 204005c6 call p_mouse_check_sensor_data 
+05ba 58000089 setarg 0x0089 
+05bb 20405d5e call twspi_write 
+05bc 20400461 call p_mouse_seting_sensor_type 
+05bd 20403fbe call mouse_zwheel 
+05be 20403fc3 call mouse_t_zwheel 
+05bf 204005df call p_mouse_key 
+05c0 6fe0c8d4 fetch 1 ,mem_mouse_key 
+05c1 1fe17e1f and_into 0x1f ,pdata 
+05c2 67e0c8d4 store 1 ,mem_mouse_key 
+05c3 24344766 nbranch mouse_drawing_optima_init ,user 
+05c4 204005d6 call p_mouse_drawing_optima 
+05c5 20204584 branch mouse_no_data_timer_init 
+
+p_mouse_check_sensor_data:
+05c6 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
+05c7 c1800000 rtnne flash_sm_no_buys 
+05c8 6fe0c92c fetch 1 ,mem_config_sensor_type 
+05c9 c00605cc beq ka5857 ,p_mouse_ka5857_sensor_motion 
+05ca c00585cc beq ka8g2 ,p_mouse_ka5857_sensor_motion 
+05cb 20204283 branch mouse_check_sensor_data + 3 
+
+p_mouse_ka5857_sensor_motion:
+05cc 20404304 call mouse_clear_sensor_data 
+05cd 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+05ce c07f85d2 beq gpio_disable ,p_mouse_ka5857_sensor_motion_1 
+05cf 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+05d0 204060fd call gpio_get_bit 
+05d1 24608000 nrtn true 
+
+p_mouse_ka5857_sensor_motion_1:
+05d2 58000000 setarg pan_reg_pid_l 
+05d3 20405d65 call twspi_read 
+05d4 c0ac41f2 bne pka8g2_id1 ,mouse_twspi_reset 
+05d5 202042b9 branch mouse_p3212_sensor_motion_2 
+
+p_mouse_drawing_optima:
+05d6 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+05d7 c38c8000 rtnbit1 mouse_enable_24g_500hz 
+05d8 c38d0000 rtnbit1 mouse_enable_24g_1000 
+05d9 c38f8000 rtnbit1 mouse_enable_usb_1000 
+05da 6fe0c92c fetch 1 ,mem_config_sensor_type 
+05db c1018000 rtneq p3212 
+05dc c1058000 rtneq ka8g2 
+05dd 20404758 call mouse_drawing_optima 
+05de 20600000 rtn 
+
+p_mouse_key:
+05df 204005e2 call p_mouse_check_key_gpio 
+05e0 2040412d call mouse_ghost_key_check 
+05e1 2020411e branch mouse_key + 2 
+
+p_mouse_check_key_gpio:
+05e2 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+05e3 245a4161 ncall mouse_check_key_gpio_once ,blank 
+05e4 da200000 arg 0 ,rega 
+05e5 204005e9 call p_mouse_check_lkey_gpio 
+05e6 204005f8 call p_mouse_check_bkkey_gpio 
+05e7 20400605 call p_mouse_check_fwkey_gpio 
+05e8 2020415e branch mouse_check_key_gpio_next 
+
+p_mouse_check_lkey_gpio:
+05e9 6fe0c91c fetch 1 ,mem_lbutton_gpio 
+05ea 20400612 call p_mouse_gpio_config_output_high 
+05eb 20404164 call mouse_check_lkey_gpio 
+05ec 6848c91c fetcht 1 ,mem_lbutton_gpio 
+05ed 20403f96 call mouse_gpio_config_input_pu 
+
+p_mouse_check_rkey_gpio:
+05ee 6fe0c91d fetch 1 ,mem_rbutton_gpio 
+05ef 20400612 call p_mouse_gpio_config_output_high 
+05f0 2040416a call mouse_check_rkey_gpio 
+05f1 6848c91d fetcht 1 ,mem_rbutton_gpio 
+05f2 20403f96 call mouse_gpio_config_input_pu 
+
+p_mouse_check_mkey_gpio:
+05f3 6fe0c91e fetch 1 ,mem_mbutton_gpio 
+05f4 20400612 call p_mouse_gpio_config_output_high 
+05f5 20404170 call mouse_check_mkey_gpio 
+05f6 6848c91e fetcht 1 ,mem_mbutton_gpio 
+05f7 20203f96 branch mouse_gpio_config_input_pu 
+
+p_mouse_check_bkkey_gpio:
+05f8 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+05f9 c17f8000 rtneq gpio_disable 
+05fa 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
+05fb 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
+05fc 1fe22600 copy pdata ,regc 
+05fd 6848c911 fetcht 1 ,mem_bk_button_gpio 
+05fe 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+05ff c07f8601 beq gpio_disable ,p_mouse_3io6key_bk_check 
+0600 2020417e branch mouse_check_bkkey_gpio_next 
+
+p_mouse_3io6key_bk_check:
+0601 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+0602 20400615 call p_mouse_gpio_config_output_low 
+0603 6848c911 fetcht 1 ,mem_bk_button_gpio 
+0604 2020418b branch mouse_3io6key_bk_check 
+
+p_mouse_check_fwkey_gpio:
+0605 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+0606 c17f8000 rtneq gpio_disable 
+0607 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
+0608 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
+0609 1fe22600 copy pdata ,regc 
+060a 6848c912 fetcht 1 ,mem_fw_button_gpio 
+060b 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+060c c07f860e beq gpio_disable ,p_mouse_3io6key_fw_check 
+060d 20204197 branch mouse_check_fwkey_gpio_next 
+
+p_mouse_3io6key_fw_check:
+060e 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+060f 20400615 call p_mouse_gpio_config_output_low 
+0610 6848c912 fetcht 1 ,mem_fw_button_gpio 
+0611 202041a4 branch mouse_3io6key_fw_check 
+
+p_mouse_gpio_config_output_high:
+0612 c17f8000 rtneq gpio_disable 
+0613 d840003f arg gpcfg_output_high ,temp 
+0614 2020612c branch gpio_config_function_int 
+
+p_mouse_gpio_config_output_low:
+0615 c17f8000 rtneq gpio_disable 
+0616 d840003e arg gpcfg_output_low ,temp 
+0617 2020612c branch gpio_config_function_int 
+
+p_zcode_entrance:
+0618 6848ccc2 fetcht 1 ,mem_zcode_temp_param0 
+0619 18518400 rshift4 temp ,temp 
+061a 6fe0ccc7 fetch 1 ,mem_zcode_current_number 
+061b 98467c00 isub temp ,null 
+061c 2022863a branch p_zcode_run ,zero 
+061d 6048ccc7 storet 1 ,mem_zcode_current_number 
+061e 18408401 increase 1 ,temp 
+061f 58000100 setarg zcode_buff_size 
+0620 984f8400 imul32 temp ,temp 
+0621 6fe1ccc8 fetch 3 ,mem_xip_flash_offset 
+0622 98467e00 isub temp ,pdata 
+0623 6849cccb fetcht 3 ,mem_flash_start_addr 
+0624 9840fe00 iadd temp ,pdata 
+0625 67e1ccce store 3 ,mem_flash_address 
+
+p_zcode_read_loop:
+0626 2040063c call p_zcode_buff_clear 
+0627 204003b7 call p_mouse_sensor_spi_clr 
+0628 20405e18 call spi_pin_set 
+0629 6fe1ccce fetch 3 ,mem_flash_address 
+062a d8400100 arg zcode_buff_size ,temp 
+062b da201f00 arg mem_zcode_buff ,rega 
+062c 20405dd2 call spid_read_flash 
+062d 2040063f call p_zcode_data_check 
+062e 24228626 nbranch p_zcode_read_loop ,zero 
+062f 204003bb call p_mouse_flash_spi_clr 
+0630 6fe21f00 fetch 4 ,mem_zcode_buff 
+0631 684a4cd1 fetcht 4 ,mem_zcode_head 
+0632 98467c00 isub temp ,null 
+0633 24228626 nbranch p_zcode_read_loop ,zero 
+0634 58001f00 setarg mem_zcode_buff 
+0635 67e141a6 store 2 ,mem_patch_ptr 
+0636 7041a840 jam zcode_code_size ,mem_patch_len 
+0637 20405ca3 call load_ucode 
+0638 58000000 setarg 0 
+0639 67e241a6 store 4 ,mem_patch_ptr 
+
+p_zcode_run:
+063a 6fe0ccc2 fetch 1 ,mem_zcode_temp_param0 
+063b 20200001 branch p_zcode 
+
+p_zcode_buff_clear:
+063c d8a01f00 arg mem_zcode_buff ,contw 
+063d df200100 arg 256 ,loopcnt 
+063e 20207d9b branch clear_mem 
+
+p_zcode_data_check:
+063f d8c01f00 arg mem_zcode_buff ,contr 
+0640 da200000 arg 0 ,rega 
+0641 df20003f arg 63 ,loopcnt 
+
+p_zcode_data_loop:
+0642 efe20006 ifetch 4 ,contr 
+0643 9a20a200 iadd rega ,rega 
+0644 c2000642 loop p_zcode_data_loop 
+0645 efe20006 ifetch 4 ,contr 
+0646 9a267c00 isub rega ,null 
+0647 20600000 rtn 
+              org 0x800
+
+start:
+0800 204013e1 call lpmstate 
+
+soft_reset:
+0801 44804000 bpatch patch00_0 ,mem_patch00 
+0802 20800000 clear_stack 
+0803 20403166 call app_param_init 
+0804 20401246 call initialize_radio 
+0805 20405e33 call iic_init_360khz 
+0806 20401386 call init_param 
+0807 20404e25 call l2cap_init 
+0808 4480c000 bpatch patch00_1 ,mem_patch00 
+0809 20406323 call rfcomm_init 
+080a 204053df call init_lmp 
+080b 2040781f call ui_init 
+080c 20403150 call app_init 
+080d 44814000 bpatch patch00_2 ,mem_patch00 
+080e 2055b15d call app_lpm_init ,wake 
+080f 20406f0f call publickey_init 
+0810 20406f31 call sp_wait_pubkey_calc_done 
+0811 20559484 call lpm_recover_clk ,wake 
+
+main_loop:
+0812 4481c000 bpatch patch00_3 ,mem_patch00 
+0813 204070d7 call sp_calc_sequence 
+0814 20407602 call sp_calc_sequence_256 
+0815 20406f12 call sp_calc_sequence_256_check 
+0816 20401b3f call le_advertising_dispatch 
+0817 20400838 call idle_dispatch 
+0818 2040317b call app_process_idle 
+0819 44824000 bpatch patch00_4 ,mem_patch00 
+081a 20400890 call inquiry_dispatch 
+081b 20400b05 call inquiry_scan_dispatch 
+081c 20400b77 call page_scan_dispatch 
+081d 20400821 call connection_dispatch 
+081e 2040217e call g24_dispatch 
+081f 204014ac call lpm_dispatch 
+0820 20200812 branch main_loop 
+
+connection_dispatch:
+0821 20400826 call connection_incontext 
+0822 c6848000 rtnmark0 mark_context 
+0823 793f8009 set0 mark_context ,mark 
+0824 20400a30 call context_save 
+0825 2020165e branch le_disable 
+
+connection_incontext:
+0826 4482c000 bpatch patch00_5 ,mem_patch00 
+0827 20400a6b call context_search_insniff 
+0828 2422882f nbranch connection_nosniff ,zero 
+0829 20400a17 call context_load 
+082a 1a208c01 add rega ,coffset_mode ,contr 
+082b efe08006 ifetch 1 ,contr 
+082c c28015cb bbit1 mode_le ,le_conn_dispatch 
+082d c2808969 bbit1 mode_master ,master_dispatch 
+082e 20200bdc branch slave_dispatch 
+
+connection_nosniff:
+082f 20400a38 call context_get_next 
+0830 1f227c00 copy loopcnt ,null 
+0831 20628000 rtn zero 
+0832 20400a17 call context_load 
+0833 6fe08030 fetch 1 ,mem_state 
+0834 c28188d3 bbit1 state_inpage ,master_page 
+0835 6fe08031 fetch 1 ,mem_mode 
+0836 c2808969 bbit1 mode_master ,master_dispatch 
+0837 20200bdc branch slave_dispatch 
+
+idle_dispatch:
+0838 6fe0c1db fetch 1 ,mem_hci_cmd 
+0839 207a0000 rtn blank 
+083a c0008848 beq hci_cmd_inquiry ,idle_inquiry 
+083b c001084d beq hci_cmd_inquiry_cancel ,idle_inquiry_cancel 
+083c c0018850 beq hci_cmd_remote_name_req ,idle_remote_name_req 
+083d c0028855 beq hci_cmd_create_conn ,idle_create_conn 
+083e c00d8845 beq hci_cmd_le_create_conn ,idle_le_create_conn 
+083f 20400a64 call context_search_conn_handle 
+0840 20628000 rtn zero 
+0841 20400a67 call context_search_plap 
+0842 20628000 rtn zero 
+
+idle_exit:
+0843 7041db00 jam 0 ,mem_hci_cmd 
+0844 20600000 rtn 
+
+idle_le_create_conn:
+0845 7002e01b jam hci_cmd_le_create_conn ,mem_cmd_le_create_conn 
+0846 7041db00 jam 0 ,mem_hci_cmd 
+0847 20600000 rtn 
+
+idle_inquiry:
+0848 7920001c set1 mark_inquiry_on ,mark 
+0849 793f801e set0 mark_inquiry_trainb ,mark 
+084a 70008cff jam param_ninquiry ,mem_ninqy_index 
+084b 70008a1f jam 31 ,mem_nfreq_index_inq 
+084c 20200843 branch idle_exit 
+
+idle_inquiry_cancel:
+084d 793f801c set0 mark_inquiry_on ,mark 
+084e 18003600 force 0 ,stop_watch 
+084f 20200843 branch idle_exit 
+
+idle_remote_name_req:
+0850 20400a67 call context_search_plap 
+0851 20628000 rtn zero 
+0852 18000401 force lmp_name_req ,temp 
+0853 7000bd05 jam 5 ,mem_nameres_cnt 
+0854 2020085c branch idle_start_page 
+
+idle_create_conn:
+0855 44834000 bpatch patch00_6 ,mem_patch00 
+
+idle_create_conn_device:
+0856 6fe341dd fetch 6 ,mem_hci_plap 
+0857 20000001 nop 1 
+0858 70478e01 jam reconnect_hid ,memui_reconnect_mode 
+0859 70005503 jam conn_sm_wait_features_res ,mem_conn_sm 
+085a 2020085b branch idle_create_conn_cont 
+
+idle_create_conn_cont:
+085b 18000425 force lmp_version_req ,temp 
+
+idle_start_page:
+085c 4483c000 bpatch patch00_7 ,mem_patch00 
+085d 6fe080a7 fetch 1 ,mem_page_mode 
+085e 203a0862 branch idle_page_mode_r0 ,blank 
+085f 1fe9fe00 lshift3 pdata ,pdata 
+0860 1ff27e00 lshift4 pdata ,pdata 
+0861 1fe0ffff increase -1 ,pdata 
+
+idle_page_mode_r0:
+0862 67e0c0ae store 1 ,mem_npage 
+0863 67e080a6 store 1 ,mem_npage_index 
+0864 70008b1f jam 31 ,mem_nfreq_index_page 
+0865 793f800c set0 mark_page_trainb ,mark 
+0866 20400a48 call context_new 
+0867 24228884 nbranch idle_page_fail ,zero 
+0868 2040135f call get_free_amaddr 
+0869 67e08077 store 1 ,mem_amaddr 
+086a 6048807c storet 1 ,mem_lmo_opcode2 
+086b 6fe341dd fetch 6 ,mem_hci_plap 
+086c 67e30040 store 6 ,mem_plap 
+086d 44844001 bpatch patch01_0 ,mem_patch01 
+086e 20407de8 call timer_reinit 
+086f 6848807c fetcht 1 ,mem_lmo_opcode2 
+0870 18007e00 force 0 ,pdata 
+0871 2841fe01 compare lmp_name_req ,temp ,0xff 
+0872 7d20fe05 nsetflag true ,state_init_seq ,pdata 
+0873 79207e03 set1 state_inpage ,pdata 
+0874 67e08030 store 1 ,mem_state 
+0875 70095b03 jam bt_evt_reconn_started ,mem_fifo_temp 
+0876 204078dc call ui_ipc_send_event 
+0877 18007e00 force 0 ,pdata 
+0878 7920fe04 setflag true ,smap_name_req ,pdata 
+0879 67e0804c store 1 ,mem_state_map 
+087a 58000000 setarg 0 
+087b 79207e01 set1 mode_master ,pdata 
+087c 67e08031 store 1 ,mem_mode 
+087d 7834fc00 enable master 
+087e 20400a30 call context_save 
+087f 7854fc00 disable master 
+0880 18000e03 force page_length_timer ,queue 
+0881 6fe140c1 fetch 2 ,mem_page_to 
+0882 20407ddb call timer_init 
+0883 20200843 branch idle_exit 
+
+idle_page_fail:
+0884 4484c001 bpatch patch01_1 ,mem_patch01 
+0885 6fe341dd fetch 6 ,mem_hci_plap 
+0886 67e30040 store 6 ,mem_plap 
+0887 2841fe01 compare lmp_name_req ,temp ,0xff 
+0888 2020888a branch idle_name_fail ,true 
+0889 20200843 branch idle_exit 
+
+idle_name_fail:
+088a d8a00a01 arg mem_tmp_buffer ,contw 
+088b df200008 arg 8 ,loopcnt 
+088c 20407d8c call memset0 
+088d 70095b04 jam bt_evt_reconn_failed ,mem_fifo_temp 
+088e 204078dc call ui_ipc_send_event 
+088f 20200843 branch idle_exit 
+
+inquiry_dispatch:
+0890 c68e0000 rtnmark0 mark_inquiry_on 
+0891 18000e01 force inquiry_length_timer ,queue 
+0892 20407de9 call timer_check 
+0893 7d3a001c nsetflag blank ,mark_inquiry_on ,mark 
+0894 243a0896 nbranch inquiry_start ,blank 
+0895 20600000 rtn 
+
+inquiry_start:
+0896 44854001 bpatch patch01_2 ,mem_patch01 
+0897 684940c3 fetcht 2 ,mem_inq_window 
+0898 18000e04 force 4 ,queue 
+0899 20400f40 call sniff_check_window 
+089a 20740000 rtn user 
+089b 204010f6 call afh_clear 
+089c 18004800 force 0 ,freq_mode 
+
+inquiry_restart:
+089d 20618000 rtn timeout 
+089e 793f800b set0 mark_fhs_already_good ,mark 
+089f 793f8000 set0 mark_fhs_eir ,mark 
+
+inquiry_rx_restart:
+08a0 1c40c201 add clkn_bt ,1 ,bt_clk 
+08a1 280ffe1e isolate1 mark_inquiry_trainb ,mark 
+08a2 7920c802 setflag true ,2 ,freq_mode 
+08a3 2c200400 compare 0x00 ,bt_clk ,0x02 
+08a4 242088bf nbranch inquiry_receive ,true 
+
+inquiry_transmit:
+08a5 4485c001 bpatch patch01_3 ,mem_patch01 
+08a6 6fe08012 fetch 1 ,mem_inquiry_transmit 
+08a7 1fe0fe01 increase 1 ,pdata 
+08a8 67e08012 store 1 ,mem_inquiry_transmit 
+08a9 2040112a call fetch_giac 
+08aa 20401124 call tx_radio_freq 
+08ab 20401144 call fetch_diac 
+08ac 20401340 call start_transmitter 
+08ad 20401345 call start_tx_native 
+08ae 20401353 call send_access_word 
+08af 20400e7c call end_of_packet 
+08b0 204008b2 call inquiry_check_train 
+08b1 2020089d branch inquiry_restart 
+
+inquiry_check_train:
+08b2 44864001 bpatch patch01_4 ,mem_patch01 
+08b3 6fe0808a fetch 1 ,mem_nfreq_index_inq 
+08b4 1fe0ffff increase -1 ,pdata 
+08b5 67e0808a store 1 ,mem_nfreq_index_inq 
+08b6 20610000 rtn positive 
+08b7 70008a1f jam 31 ,mem_nfreq_index_inq 
+08b8 6fe0808c fetch 1 ,mem_ninqy_index 
+08b9 1fe0ffff increase -1 ,pdata 
+08ba 67e0808c store 1 ,mem_ninqy_index 
+08bb 20610000 rtn positive 
+08bc 7940001e setflip mark_inquiry_trainb ,mark 
+08bd 70008cff jam param_ninquiry ,mem_ninqy_index 
+08be 20600000 rtn 
+
+inquiry_receive:
+08bf 4486c001 bpatch patch01_5 ,mem_patch01 
+08c0 2040112a call fetch_giac 
+08c1 2040111e call rx_radio_freq 
+08c2 20401144 call fetch_diac 
+08c3 2040134a call start_rx_native 
+08c4 204012d5 call start_receiver 
+08c5 204012fb call wait_access_clkn_rt 
+08c6 202c08c9 branch inquiry_sync ,sync 
+08c7 204008b2 call inquiry_check_train 
+08c8 202008a0 branch inquiry_rx_restart 
+
+inquiry_sync:
+08c9 44874001 bpatch patch01_6 ,mem_patch01 
+08ca 2040127f call save_rssi 
+08cb 2040135b call scan_mode_whiten 
+08cc 20400d43 call receive_packet_whitened 
+08cd 793f8001 set0 mark_rxbuf_inuse ,mark 
+08ce c6858000 rtnmark0 mark_fhs_already_good 
+
+inquiry_receive_rtn:
+
+inquiry_receive_eir_rtn:
+08cf 6fe08013 fetch 1 ,mem_inquiry_rcv 
+08d0 1fe0fe01 increase 1 ,pdata 
+08d1 67e08013 store 1 ,mem_inquiry_rcv 
+08d2 20600000 rtn 
+
+master_page:
+08d3 4487c001 bpatch patch01_7 ,mem_patch01 
+08d4 7834fc00 enable master 
+08d5 78387c00 enable clknt 
+08d6 6fe140bd fetch 2 ,mem_page_interval 
+08d7 203a08db branch master_page_no_interval ,blank 
+08d8 18000e08 force page_interval_timer ,queue 
+08d9 20407de9 call timer_check 
+08da 247a0000 nrtn blank 
+
+master_page_no_interval:
+08db 44884002 bpatch patch02_0 ,mem_patch02 
+08dc 684940bf fetcht 2 ,mem_page_window 
+08dd 18000e28 force 40 ,queue 
+08de 20400f40 call sniff_check_window 
+08df 20340914 branch page_exit ,user 
+08e0 18000e03 force page_length_timer ,queue 
+08e1 20407de9 call timer_check 
+08e2 243a08f0 nbranch page_start ,blank 
+08e3 6fe0804c fetch 1 ,mem_state_map 
+08e4 c28208e6 bbit1 smap_name_req ,master_npage_timeout 
+08e5 202008e9 branch master_page_timeout 
+
+master_npage_timeout:
+08e6 d8a00a01 arg mem_tmp_buffer ,contw 
+08e7 df200008 arg 8 ,loopcnt 
+08e8 20407d8c call memset0 
+
+master_page_timeout:
+08e9 4488c002 bpatch patch02_1 ,mem_patch02 
+08ea 70003000 jam 0 ,mem_state 
+08eb 204053e0 call init_lmp_work 
+08ec 70478e00 jam 0 ,memui_reconnect_mode 
+08ed 70095b13 jam bt_evt_reconn_page_timeout ,mem_fifo_temp 
+08ee 204078dc call ui_ipc_send_event 
+08ef 20200914 branch page_exit 
+
+page_start:
+08f0 44894002 bpatch patch02_2 ,mem_patch02 
+08f1 18001600 force 0 ,timeup 
+08f2 34730200 until clkn_rt ,meet 
+08f3 6fe080a8 fetch 1 ,mem_page_clk 
+08f4 1fe0ffff increase -1 ,pdata 
+08f5 9c42fe00 ixor clkn_bt ,pdata 
+08f6 2fe00600 compare 0 ,pdata ,3 
+08f7 242088f0 nbranch page_start ,true 
+08f8 18827e00 deposit am_addr 
+08f9 67e080e5 store 1 ,mem_fhs_am_addr 
+08fa 18004c00 force 0 ,n_tx_slot 
+08fb 18004800 force 0 ,freq_mode 
+
+page_restart:
+08fc 4489c002 bpatch patch02_3 ,mem_patch02 
+08fd 20218914 branch page_exit ,timeout 
+08fe 2040112e call fetch_page_bt_adr 
+08ff 69610157 fetchr timeup ,2 ,mem_param_rf_setup 
+0900 34730200 until clkn_rt ,meet 
+
+page_rx_restart:
+0901 448a4002 bpatch patch02_4 ,mem_patch02 
+0902 6fe200a8 fetch 4 ,mem_page_clk 
+0903 98004200 iforce bt_clk 
+0904 1fe0fe01 increase 1 ,pdata 
+0905 67e200a8 store 4 ,mem_page_clk 
+0906 280ffe0c isolate1 mark_page_trainb ,mark 
+0907 7920c802 setflag true ,2 ,freq_mode 
+0908 2c200400 compare 0x00 ,bt_clk ,0x02 
+0909 24208928 nbranch page_receive ,true 
+090a 6fe0800c fetch 1 ,mem_page_transmit 
+090b 1fe0fe01 increase 1 ,pdata 
+090c 67e0800c store 1 ,mem_page_transmit 
+090d 20401124 call tx_radio_freq 
+090e 20401340 call start_transmitter 
+090f 20401345 call start_tx_native 
+0910 20401353 call send_access_word 
+0911 20400e7c call end_of_packet 
+0912 2040091a call page_check_train 
+0913 202008fc branch page_restart 
+
+page_exit:
+0914 448ac002 bpatch patch02_5 ,mem_patch02 
+0915 7854fc00 disable master 
+0916 6fe140bd fetch 2 ,mem_page_interval 
+0917 207a0000 rtn blank 
+0918 18000e08 force page_interval_timer ,queue 
+0919 20207ddb branch timer_init 
+
+page_check_train:
+091a 448b4002 bpatch patch02_6 ,mem_patch02 
+091b 6fe0808b fetch 1 ,mem_nfreq_index_page 
+091c 1fe0ffff increase -1 ,pdata 
+091d 67e0808b store 1 ,mem_nfreq_index_page 
+091e 20610000 rtn positive 
+091f 70008b1f jam 31 ,mem_nfreq_index_page 
+0920 6fe080a6 fetch 1 ,mem_npage_index 
+0921 1fe0ffff increase -1 ,pdata 
+0922 67e080a6 store 1 ,mem_npage_index 
+0923 20610000 rtn positive 
+0924 7940000c setflip mark_page_trainb ,mark 
+0925 6fe0c0ae fetch 1 ,mem_npage 
+0926 67e080a6 store 1 ,mem_npage_index 
+0927 20600000 rtn 
+
+page_receive:
+0928 448bc002 bpatch patch02_7 ,mem_patch02 
+0929 2040111e call rx_radio_freq 
+092a 2040134a call start_rx_native 
+092b 204012d5 call start_receiver 
+092c 204012fb call wait_access_clkn_rt 
+092d 202c0930 branch page_sync ,sync 
+092e 2040091a call page_check_train 
+092f 20200901 branch page_rx_restart 
+
+page_sync:
+0930 20400e7c call end_of_packet 
+0931 6fe0800d fetch 1 ,mem_page_rcv 
+0932 1fe0fe01 increase 1 ,pdata 
+0933 67e0800d store 1 ,mem_page_rcv 
+0934 18003600 force 0 ,stop_watch 
+0935 6fe200a8 fetch 4 ,mem_page_clk 
+
+page_send_fhs:
+0936 448c4003 bpatch patch03_0 ,mem_patch03 
+0937 2040133e call rf_setup_time_master_slot 
+0938 2040112e call fetch_page_bt_adr 
+0939 1cc0cc01 increase 1 ,n_tx_slot 
+
+page_send_fhs_continue:
+093a 1c2143fd and_into 0x1fd ,bt_clk 
+093b 1c8149fc and_into 0x1fc ,freq_mode 
+093c 20401124 call tx_radio_freq 
+093d 20401340 call start_transmitter 
+093e 20401345 call start_tx_native 
+093f 20401353 call send_access_word 
+0940 1c427e00 deposit clkn_bt 
+0941 67e200b0 store 4 ,mem_clkn_bt 
+0942 18000800 force 0 ,am_addr 
+0943 18000202 force type_fhs ,type 
+0944 2040135b call scan_mode_whiten 
+0945 20400f8a call transmit_packet_whitened 
+
+page_wait_fhs_reply:
+0946 448cc003 bpatch patch03_1 ,mem_patch03 
+0947 2040133c call rf_setup_time_slave_slot 
+0948 1c21c202 or_into 0x02 ,bt_clk 
+0949 1c8149fc and_into 0x1fc ,freq_mode 
+094a 2040111e call rx_radio_freq 
+094b 2040134a call start_rx_native 
+094c 204012d5 call start_receiver 
+094d 204012fb call wait_access_clkn_rt 
+094e 204c0e7c call end_of_packet ,sync 
+094f 202c0955 branch page_wait_fhs_reply_ok ,sync 
+0950 6fe08010 fetch 1 ,mem_fhs_wait_counter 
+0951 203a08fc branch page_restart ,blank 
+0952 1fe0ffff increase -1 ,pdata 
+0953 67e08010 store 1 ,mem_fhs_wait_counter 
+0954 20200936 branch page_send_fhs 
+
+page_wait_fhs_reply_ok:
+0955 448d4003 bpatch patch03_2 ,mem_patch03 
+0956 6fe0800e fetch 1 ,mem_page_rcv_fhs 
+0957 1fe0fe01 increase 1 ,pdata 
+0958 67e0800e store 1 ,mem_page_rcv_fhs 
+0959 20400c42 call prepare_newconn 
+
+master_newconn_loop:
+095a 79200033 set1 mark_first_packet ,mark 
+095b 20400aff call master_newconn_once 
+095c 202c0961 branch newconn_poll_responded ,sync 
+095d 793f8033 set0 mark_first_packet ,mark 
+095e 20400c62 call new_conn_timeout 
+095f 243a095a nbranch master_newconn_loop ,blank 
+0960 202008fc branch page_restart 
+
+newconn_poll_responded:
+0961 448dc003 bpatch patch03_3 ,mem_patch03 
+0962 793f8033 set0 mark_first_packet ,mark 
+0963 6fe08030 fetch 1 ,mem_state 
+0964 793ffe03 set0 state_inpage ,pdata 
+0965 67e08030 store 1 ,mem_state 
+0966 20400c4d call newconn_init 
+0967 7854fc00 disable master 
+0968 20600000 rtn 
+
+master_dispatch:
+0969 448e4003 bpatch patch03_4 ,mem_patch03 
+096a 7834fc00 enable master 
+096b 78387c00 enable clknt 
+096c 204009e3 call role_switch_master 
+096d 20740000 rtn user 
+096e 2040133e call rf_setup_time_master_slot 
+096f 1c40c201 add clkn_bt ,1 ,bt_clk 
+0970 20401134 call fetch_self_bt_adr 
+0971 18004803 force 0x03 ,freq_mode 
+0972 204065e1 call scheduler_tx_l2cap_pkt 
+0973 20400c96 call prepare_tx 
+0974 20401124 call tx_radio_freq 
+0975 20401340 call start_transmitter 
+0976 20401345 call start_tx_native 
+0977 20401353 call send_access_word 
+0978 20400f86 call transmit_packet 
+
+master_loop:
+0979 448ec003 bpatch patch03_5 ,mem_patch03 
+097a 204053f2 call parse_lmp 
+097b 20400af1 call master_conn_recv_packet 
+097c 24368982 nbranch master_notmatch ,match 
+097d 20401378 call supervision_flush 
+097e 20400f4c call parse_l2cap 
+097f 6fe0800f fetch 1 ,mem_master_rcvcnt 
+0980 1fe0fe01 increase 1 ,pdata 
+0981 67e0800f store 1 ,mem_master_rcvcnt 
+
+master_notmatch:
+0982 448f4003 bpatch patch03_6 ,mem_patch03 
+0983 204065c9 call scheduler_process 
+0984 2040098d call check_master_disconnect 
+0985 24748000 nrtn master 
+0986 20400f1c call check_attempt 
+0987 243a098a nbranch master_attempt ,blank 
+
+master_exit:
+0988 7854fc00 disable master 
+0989 20600000 rtn 
+
+master_attempt:
+098a 20400c96 call prepare_tx 
+098b 20400ae7 call master_conn_send_packet 
+098c 20200979 branch master_loop 
+
+check_master_disconnect:
+098d 20368990 branch check_master_match ,match 
+098e 2040136f call supervision_update 
+098f 2021099e branch master_disconnect ,positive 
+
+check_master_match:
+0990 204009a9 call check_disconnect_timeout 
+0991 2434099e nbranch master_disconnect ,user 
+0992 6fe0804c fetch 1 ,mem_state_map 
+0993 c4020000 rtnbit0 smap_name_req 
+0994 c3818000 rtnbit1 smap_name_res 
+0995 6fe0804b fetch 1 ,mem_op 
+0996 c3818000 rtnbit1 op_disconn 
+0997 204009b0 call conn_timer_expired 
+0998 247a0000 nrtn blank 
+0999 6fe080bd fetch 1 ,mem_nameres_cnt 
+099a 1fe0ffff increase -1 ,pdata 
+099b 67e080bd store 1 ,mem_nameres_cnt 
+099c 247a0000 nrtn blank 
+099d 20205755 branch lmp_disconnect 
+
+master_disconnect:
+099e 448fc003 bpatch patch03_7 ,mem_patch03 
+099f 20400c6a call quit_connection 
+09a0 7854fc00 disable master 
+09a1 6fe0804c fetch 1 ,mem_state_map 
+09a2 c28209a4 bbit1 smap_name_req ,master_name_disconnect 
+09a3 20600000 rtn 
+
+master_name_disconnect:
+09a4 6fe0804c fetch 1 ,mem_state_map 
+09a5 c3818000 rtnbit1 smap_name_res 
+
+master_name_error:
+09a6 d8a00a01 arg mem_tmp_buffer ,contw 
+09a7 df200008 arg 8 ,loopcnt 
+09a8 20207d8c branch memset0 
+
+check_disconnect_timeout:
+09a9 44904004 bpatch patch04_0 ,mem_patch04 
+09aa 78347c00 enable user 
+09ab 6fe0804b fetch 1 ,mem_op 
+09ac c4018000 rtnbit0 op_disconn 
+09ad 204009b0 call conn_timer_expired 
+09ae 247a0000 nrtn blank 
+09af 20207ec7 branch disable_user 
+
+conn_timer_expired:
+09b0 6fe08072 fetch 1 ,mem_conn_timer 
+09b1 1fe0ffff increase -1 ,pdata 
+09b2 67e08072 store 1 ,mem_conn_timer 
+09b3 20600000 rtn 
+
+linkkey_ready:
+09b4 4490c004 bpatch patch04_1 ,mem_patch04 
+09b5 6fe08030 fetch 1 ,mem_state 
+09b6 c28389bd bbit1 state_linkkey ,linkkey_set 
+09b7 6fe08877 fetch 1 ,mem_pairing_auth 
+09b8 203a09bd branch linkkey_set ,blank 
+09b9 70087700 jam defalt_pairing_auth ,mem_pairing_auth 
+09ba 70095b18 jam bt_evt_linkkey_generate ,mem_fifo_temp 
+09bb 204078dc call ui_ipc_send_event 
+09bc 202009bd branch linkkey_set 
+
+linkkey_set:
+09bd 44914004 bpatch patch04_2 ,mem_patch04 
+09be 20400a61 call context_traverse_linkkey 
+09bf 6fe08030 fetch 1 ,mem_state 
+09c0 79207e07 set1 state_linkkey ,pdata 
+09c1 67e08030 store 1 ,mem_state 
+09c2 7041ca01 jam 1 ,mem_link_key_exists 
+09c3 6fe08055 fetch 1 ,mem_conn_sm 
+09c4 c08b09c5 bne conn_sm_pairing ,linkkey_set_continue 
+
+linkkey_set_continue:
+09c5 20600000 rtn 
+
+generate_linkkey_continue:
+09c6 70087701 jam pairing_auth ,mem_pairing_auth 
+
+clear_linkstate:
+09c7 6fe08030 fetch 1 ,mem_state 
+09c8 793ffe07 set0 state_linkkey ,pdata 
+09c9 67e08030 store 1 ,mem_state 
+09ca 20600000 rtn 
+
+role_switch_check:
+09cb 4491c004 bpatch patch04_3 ,mem_patch04 
+09cc 78547c00 disable user 
+09cd 6fe10032 fetch 2 ,mem_tsniff 
+09ce d840ffff arg 0xffff ,temp 
+09cf 98467c00 isub temp ,null 
+09d0 24628000 nrtn zero 
+09d1 6fe20034 fetch 4 ,mem_sniff_anchor 
+09d2 203809d5 branch role_switch_clkn ,clknt 
+09d3 9d067e00 isub clke_bt ,pdata 
+09d4 202009d6 branch role_switch_clke 
+
+role_switch_clkn:
+09d5 9c467e00 isub clkn_bt ,pdata 
+
+role_switch_clke:
+09d6 1fe67c04 sub pdata ,4 ,null 
+09d7 24610000 nrtn positive 
+09d8 18007e00 force 0 ,pdata 
+09d9 67e10032 store 2 ,mem_tsniff 
+09da 20207ec5 branch enable_user 
+
+role_switch_prepare:
+09db 1fe20400 copy pdata ,temp 
+09dc 604a0034 storet 4 ,mem_sniff_anchor 
+
+role_switch_prepare0:
+09dd 44924004 bpatch patch04_4 ,mem_patch04 
+09de 70464501 jam switch_flag_accept ,mem_switch_flag 
+09df 5800ffff setarg 0xffff 
+09e0 67e10032 store 2 ,mem_tsniff 
+09e1 70007301 jam 1 ,mem_sniff_attempt 
+09e2 20600000 rtn 
+
+role_switch_master:
+09e3 4492c004 bpatch patch04_5 ,mem_patch04 
+09e4 204009cb call role_switch_check 
+09e5 24740000 nrtn user 
+09e6 78547c00 disable user 
+09e7 70001120 jam param_newconnto ,mem_newconnto_counter 
+09e8 793f800b set0 mark_fhs_already_good ,mark 
+09e9 793f8031 set0 mark_role_switch_receive_fhs ,mark 
+
+roles_waitfhs_loop:
+09ea 2040133e call rf_setup_time_master_slot 
+09eb 20400af3 call master_recv_packet 
+09ec c50589f8 bmark1 mark_fhs_already_good ,roles_replyto_fhs 
+09ed 20400c62 call new_conn_timeout 
+09ee 243a09ea nbranch roles_waitfhs_loop ,blank 
+09ef c5188a02 bmark1 mark_role_switch_receive_fhs ,roles_replyto_fhs_rcvd 
+
+role_switch_fail_master:
+09f0 44934004 bpatch patch04_6 ,mem_patch04 
+09f1 78547c00 disable user 
+09f2 1c427e00 deposit clkn_bt 
+09f3 67e240d1 store 4 ,mem_next_btclk 
+09f4 78387c00 enable clknt 
+09f5 7834fc00 enable master 
+09f6 70095b2a jam bt_evt_switch_fail_master ,mem_fifo_temp 
+09f7 202078dc branch ui_ipc_send_event 
+
+roles_replyto_fhs:
+09f8 4493c004 bpatch patch04_7 ,mem_patch04 
+09f9 2040133c call rf_setup_time_slave_slot 
+09fa d8200010 arg type_id ,type 
+09fb 20400ae9 call master_send_packet 
+09fc 79200031 set1 mark_role_switch_receive_fhs ,mark 
+09fd 793f800b set0 mark_fhs_already_good ,mark 
+09fe 6fe08077 fetch 1 ,mem_amaddr 
+09ff 98000800 iforce am_addr 
+0a00 70001102 jam 2 ,mem_newconnto_counter 
+0a01 202009ea branch roles_waitfhs_loop 
+
+roles_replyto_fhs_rcvd:
+0a02 6fe200b4 fetch 4 ,mem_clke_bt 
+0a03 1fe0fe08 pincrease 8 
+0a04 67e200b4 store 4 ,mem_clke_bt 
+0a05 78587c00 disable clknt 
+0a06 7854fc00 disable master 
+0a07 20401035 call apply_switch_clke 
+0a08 20400c42 call prepare_newconn 
+
+roles_newconns_loop:
+0a09 44944005 bpatch patch05_0 ,mem_patch05 
+0a0a 20400c89 call slave_newconn_once 
+0a0b 20368a0f branch roles_newconns_responded ,match 
+0a0c 20400c62 call new_conn_timeout 
+0a0d 243a0a09 nbranch roles_newconns_loop ,blank 
+0a0e 202009f0 branch role_switch_fail_master 
+
+roles_newconns_responded:
+0a0f 6fe08031 fetch 1 ,mem_mode 
+0a10 793ffe01 set0 mode_master ,pdata 
+0a11 67e08031 store 1 ,mem_mode 
+0a12 20401378 call supervision_flush 
+0a13 2040105d call calc_clke_offset 
+0a14 78347c00 enable user 
+0a15 70095b2b jam bt_evt_switch_success_master ,mem_fifo_temp 
+0a16 202078dc branch ui_ipc_send_event 
+
+context_load:
+0a17 4494c005 bpatch patch05_1 ,mem_patch05 
+0a18 79200009 set1 mark_context ,mark 
+0a19 1a227e00 deposit rega 
+0a1a 67e1001e store 2 ,mem_context_ptr 
+0a1b 18007258 force context_size ,loopcnt 
+0a1c d8a00287 arg mem_le_state ,contw 
+0a1d 1a208c01 add rega ,coffset_mode ,contr 
+0a1e efe08006 ifetch 1 ,contr 
+0a1f 1a220c00 copy rega ,contr 
+0a20 c2807dd4 bbit1 mode_le ,memcpy 
+0a21 d8a00030 arg mem_state ,contw 
+0a22 20407dd4 call memcpy 
+0a23 78577c00 disable attempt 
+0a24 6fe08077 fetch 1 ,mem_amaddr 
+0a25 98000800 iforce am_addr 
+0a26 70008801 jam 1 ,mem_current_sniff_attempt 
+0a27 20348a29 branch context_load_master ,master 
+0a28 70008801 jam 1 ,mem_current_sniff_attempt 
+
+context_load_master:
+0a29 6fe08030 fetch 1 ,mem_state 
+0a2a c4008000 rtnbit0 state_insniff 
+0a2b 6fe08073 fetch 1 ,mem_sniff_attempt 
+0a2c 67e08088 store 1 ,mem_current_sniff_attempt 
+0a2d 6fe08074 fetch 1 ,mem_sniff_timeout 
+0a2e 67e08089 store 1 ,mem_current_sniff_timeout 
+0a2f 20600000 rtn 
+
+context_save:
+0a30 44954005 bpatch patch05_2 ,mem_patch05 
+0a31 6fe1001e fetch 2 ,mem_context_ptr 
+0a32 98000a00 iforce contw 
+0a33 18007258 force context_size ,loopcnt 
+0a34 d8c00287 arg mem_le_state ,contr 
+0a35 203b7dd4 branch memcpy ,le 
+0a36 d8c00030 arg mem_state ,contr 
+0a37 20207dd4 branch memcpy 
+
+context_get_next:
+0a38 df200001 arg context_num ,loopcnt 
+0a39 68488015 fetcht 1 ,mem_current_context 
+
+context_get_next_loop:
+0a3a 18408401 increase 1 ,temp 
+0a3b 2841fe01 compare context_num ,temp ,0xff 
+0a3c 24208a3e nbranch context_get_next_cont ,true 
+0a3d d8400000 arg 0 ,temp 
+
+context_get_next_cont:
+0a3e 60488015 storet 1 ,mem_current_context 
+0a3f 184ffe58 mul32 temp ,context_size ,pdata 
+0a40 da204040 arg mem_context ,rega 
+0a41 9a20a200 iadd rega ,rega 
+0a42 efe08011 ifetch 1 ,rega 
+0a43 c2808a46 bbit1 state_insniff ,context_get_next_sniff 
+0a44 c3800000 rtnbit1 state_inconn 
+0a45 c3818000 rtnbit1 state_inpage 
+
+context_get_next_sniff:
+0a46 c2000a3a loop context_get_next_loop 
+0a47 20600000 rtn 
+
+context_new:
+0a48 4495c005 bpatch patch05_3 ,mem_patch05 
+0a49 da600a77 arg context_search_empty ,regc 
+0a4a 20400a6e call context_search 
+0a4b 24628000 nrtn zero 
+0a4c 1a227e00 deposit rega 
+0a4d 67e1001e store 2 ,mem_context_ptr 
+0a4e 18007c00 force 0 ,null 
+0a4f 20600000 rtn 
+
+context_check_all_wack:
+0a50 20400f49 call check_esco_amaddr 
+0a51 20208a58 branch context_check_esco_wack ,true 
+0a52 6fe1001e fetch 2 ,mem_context_ptr 
+0a53 1fe08a17 add pdata ,coffset_arq ,contw 
+0a54 6fe08047 fetch 1 ,mem_arq 
+0a55 e7e08005 istore 1 ,contw 
+0a56 da600ab7 arg context_check_a_wack ,regc 
+0a57 20200a6e branch context_search 
+
+context_check_esco_wack:
+0a58 6fe08047 fetch 1 ,mem_arq 
+0a59 2feffe03 isolate1 wack ,pdata 
+0a5a 20208a5d branch context_esco_wack ,true 
+0a5b 18007c01 force 1 ,null 
+0a5c 20600000 rtn 
+
+context_esco_wack:
+0a5d 18007c00 force 0 ,null 
+0a5e 20600000 rtn 
+
+context_check_idle:
+0a5f da600ab4 arg context_check_inconn ,regc 
+0a60 20200a6e branch context_search 
+
+context_traverse_linkkey:
+0a61 6849001e fetcht 2 ,mem_context_ptr 
+0a62 da600adc arg context_traverse_clearkey ,regc 
+0a63 20200a6e branch context_search 
+
+context_search_conn_handle:
+0a64 6848c1dc fetcht 1 ,mem_hci_conn_handle 
+
+context_search_conn_handle2:
+0a65 da600a82 arg context_search_handle ,regc 
+0a66 20200a6e branch context_search 
+
+context_search_plap:
+0a67 44964005 bpatch patch05_4 ,mem_patch05 
+0a68 684b41dd fetcht 6 ,mem_hci_plap 
+
+context_search_plap2:
+0a69 da600a7b arg context_search_lap ,regc 
+0a6a 20200a6e branch context_search 
+
+context_search_insniff:
+0a6b da600a88 arg context_search_sniff ,regc 
+0a6c 20200a6e branch context_search 
+
+context_search_sniff_window:
+0a6d da600ad3 arg context_search_window ,regc 
+
+context_search:
+0a6e 4496c005 bpatch patch05_5 ,mem_patch05 
+0a6f da204040 arg mem_context ,rega 
+0a70 df200001 arg context_num ,loopcnt 
+
+context_search_loop:
+0a71 efe08011 ifetch 1 ,rega 
+0a72 1a627a00 copy regc ,pc 
+
+context_search_next:
+0a73 1a20a258 increase context_size ,rega 
+0a74 c2000a71 loop context_search_loop 
+0a75 18007c01 force 1 ,null 
+0a76 20600000 rtn 
+
+context_search_empty:
+0a77 c2800a73 bbit1 state_inconn ,context_search_next 
+0a78 c2818a73 bbit1 state_inpage ,context_search_next 
+0a79 18007c00 force 0 ,null 
+0a7a 20600000 rtn 
+
+context_search_lap:
+0a7b c2818a7d bbit1 state_inpage ,context_search_lap_cont 
+0a7c c3000a73 bbit0 state_inconn ,context_search_next 
+
+context_search_lap_cont:
+0a7d 1a208c10 add rega ,coffset_plap ,contr 
+0a7e efe30006 ifetch 6 ,contr 
+0a7f 98467c00 isub temp ,null 
+0a80 20628000 rtn zero 
+0a81 20200a73 branch context_search_next 
+
+context_search_handle:
+0a82 c3000a73 bbit0 state_inconn ,context_search_next 
+0a83 1a208c16 add rega ,coffset_conn_handle ,contr 
+0a84 efe08006 ifetch 1 ,contr 
+0a85 98467c00 isub temp ,null 
+0a86 20628000 rtn zero 
+0a87 20200a73 branch context_search_next 
+
+context_search_sniff:
+0a88 c3008a73 bbit0 state_insniff ,context_search_next 
+
+context_search_sniff_loop:
+0a89 20400ac0 call context_get_anchor 
+0a8a 20400aa4 call sign_pdata_temp 
+0a8b 98467e00 isub temp ,pdata 
+0a8c 1fe0fe01 increase 1 ,pdata 
+0a8d 20210a9e branch context_search_sniff_miss ,positive 
+0a8e 18c22400 copy contr ,regb 
+0a8f 67e48964 store 9 ,mem_temp 
+0a90 6fe0c6bd fetch 1 ,mem_sc_calc 
+0a91 243a0a96 nbranch context_search_sniff_sc ,blank 
+0a92 6fe48964 fetch 9 ,mem_temp 
+0a93 1a420c00 copy regb ,contr 
+0a94 1fe0fe05 increase 5 ,pdata 
+0a95 20200a99 branch context_search_meet1 
+
+context_search_sniff_sc:
+0a96 6fe48964 fetch 9 ,mem_temp 
+0a97 1a420c00 copy regb ,contr 
+0a98 1fe0fe14 increase 20 ,pdata 
+
+context_search_meet1:
+0a99 24210a73 nbranch context_search_next ,positive 
+
+context_search_meet:
+0a9a 18424200 copy temp ,bt_clk 
+0a9b 20400acc call context_next_anchor 
+0a9c 18007c00 force 0 ,null 
+0a9d 20600000 rtn 
+
+context_search_sniff_miss:
+0a9e 98002400 iforce regb 
+0a9f 1a208c02 add rega ,coffset_tsniff ,contr 
+0aa0 efe10006 ifetch 2 ,contr 
+0aa1 203a0a9a branch context_search_meet ,blank 
+0aa2 20400acc call context_next_anchor 
+0aa3 20200a89 branch context_search_sniff_loop 
+
+sign_pdata_temp:
+0aa4 1ff11600 rshift16 pdata ,timeup 
+0aa5 196c9600 rshift8 timeup ,timeup 
+0aa6 20228aae branch sign_pdata_temp_p0 ,zero 
+0aa7 29601e0f compare 0xf ,timeup ,0xf 
+0aa8 24608000 nrtn true 
+0aa9 18511600 rshift16 temp ,timeup 
+0aaa 196c9600 rshift8 timeup ,timeup 
+0aab 24628000 nrtn zero 
+0aac 7920041c set1 28 ,temp 
+0aad 20600000 rtn 
+
+sign_pdata_temp_p0:
+0aae 18511600 rshift16 temp ,timeup 
+0aaf 196c9600 rshift8 timeup ,timeup 
+0ab0 29601e0f compare 0xf ,timeup ,0xf 
+0ab1 24608000 nrtn true 
+0ab2 79207e1c set1 28 ,pdata 
+0ab3 20600000 rtn 
+
+context_check_inconn:
+0ab4 c3000a73 bbit0 state_inconn ,context_search_next 
+0ab5 18007c00 force 0 ,null 
+0ab6 20600000 rtn 
+
+context_check_a_wack:
+0ab7 c3000a73 bbit0 state_inconn ,context_search_next 
+0ab8 1a208c01 add rega ,coffset_mode ,contr 
+0ab9 efe08006 ifetch 1 ,contr 
+0aba c2800a73 bbit1 mode_le ,context_search_next 
+0abb 1a208c17 add rega ,coffset_arq ,contr 
+0abc efe08006 ifetch 1 ,contr 
+0abd c3018a73 bbit0 wack ,context_search_next 
+0abe 18007c00 force 0 ,null 
+0abf 20600000 rtn 
+
+context_get_anchor:
+0ac0 1a208c01 add rega ,coffset_mode ,contr 
+0ac1 e8408006 ifetcht 1 ,contr 
+0ac2 1c427e00 deposit clkn_bt 
+0ac3 284ffe01 isolate1 mode_master ,temp 
+0ac4 1a208c04 add rega ,coffset_sniff_anchor ,contr 
+0ac5 e8420006 ifetcht 4 ,contr 
+0ac6 20608000 rtn true 
+0ac7 1a208c08 add rega ,coffset_clk_offset ,contr 
+0ac8 efe30006 ifetch 6 ,contr 
+0ac9 20401073 call calc_clke2 
+0aca 1d027e00 deposit clke_bt 
+0acb 20600000 rtn 
+
+context_next_anchor:
+0acc 1a208c02 add rega ,coffset_tsniff ,contr 
+0acd 1a208a04 add rega ,coffset_sniff_anchor ,contw 
+0ace efe10006 ifetch 2 ,contr 
+0acf 98409600 iadd temp ,timeup 
+0ad0 19627e00 deposit timeup 
+0ad1 e7e20005 istore 4 ,contw 
+0ad2 202016b1 branch le_context_nextevent 
+
+context_search_window:
+0ad3 c3008a73 bbit0 state_insniff ,context_search_next 
+0ad4 20400ac0 call context_get_anchor 
+0ad5 9b60fe00 iadd stop_watch ,pdata 
+0ad6 9b60fe00 iadd stop_watch ,pdata 
+0ad7 98e0fe00 iadd queue ,pdata 
+0ad8 98467c00 isub temp ,null 
+0ad9 24210a73 nbranch context_search_next ,positive 
+0ada 18007c00 force 0 ,null 
+0adb 20600000 rtn 
+
+context_traverse_clearkey:
+0adc c3000a73 bbit0 state_inconn ,context_search_next 
+0add 18427e00 deposit temp 
+0ade 9a267c00 isub rega ,null 
+0adf 203f0a73 branch context_search_next ,null 
+0ae0 1a208c01 add rega ,coffset_mode ,contr 
+0ae1 efe08006 ifetch 1 ,contr 
+0ae2 c2800a73 bbit1 mode_le ,context_search_next 
+0ae3 efe08011 ifetch 1 ,rega 
+0ae4 793ffe07 set0 state_linkkey ,pdata 
+0ae5 e7e08011 istore 1 ,rega 
+0ae6 20200a73 branch context_search_next 
+
+master_conn_send_packet:
+0ae7 44974005 bpatch patch05_6 ,mem_patch05 
+0ae8 2040133e call rf_setup_time_master_slot 
+
+master_send_packet:
+0ae9 1c40c201 add clkn_bt ,1 ,bt_clk 
+0aea 20401134 call fetch_self_bt_adr 
+0aeb 18004803 force 0x03 ,freq_mode 
+0aec 20401124 call tx_radio_freq 
+0aed 20401340 call start_transmitter 
+0aee 20401345 call start_tx_native 
+0aef 20401353 call send_access_word 
+0af0 20200f86 branch transmit_packet 
+
+master_conn_recv_packet:
+0af1 4497c005 bpatch patch05_7 ,mem_patch05 
+0af2 2040133c call rf_setup_time_slave_slot 
+
+master_recv_packet:
+0af3 1c40c201 add clkn_bt ,1 ,bt_clk 
+0af4 20401134 call fetch_self_bt_adr 
+0af5 18004803 force 0x03 ,freq_mode 
+0af6 2040111e call rx_radio_freq 
+0af7 20400c37 call init_rx_packet_flags 
+0af8 204012da call prep_crypt 
+0af9 2040134a call start_rx_native 
+0afa 204012d5 call start_receiver 
+
+master_rx_conn_finish_packet:
+0afb 204012fb call wait_access_clkn_rt 
+0afc 246c0000 nrtn sync 
+0afd 2040127f call save_rssi 
+0afe 20200d40 branch receive_packet 
+
+master_newconn_once:
+0aff 44984006 bpatch patch06_0 ,mem_patch06 
+0b00 6fe080e5 fetch 1 ,mem_fhs_am_addr 
+0b01 98000800 iforce am_addr 
+0b02 18000201 force type_poll ,type 
+0b03 20400ae7 call master_conn_send_packet 
+0b04 20200af1 branch master_conn_recv_packet 
+
+inquiry_scan_dispatch:
+0b05 6fe0c09b fetch 1 ,mem_scan_mode 
+0b06 c4000000 rtnbit0 inq_scan_mode 
+0b07 18000e04 force iscan_interval_timer ,queue 
+0b08 20407de9 call timer_check 
+0b09 247a0000 nrtn blank 
+0b0a 684940b5 fetcht 2 ,mem_iscan_window 
+0b0b 18000e04 force 4 ,queue 
+0b0c 20400f40 call sniff_check_window 
+0b0d 20740000 rtn user 
+0b0e 20400b15 call inquiry_scan_start 
+0b0f 18000e04 force iscan_interval_timer ,queue 
+0b10 6fe140b7 fetch 2 ,mem_iscan_interval 
+0b11 242c7ddb nbranch timer_init ,sync 
+0b12 180a7e00 random pdata 
+0b13 9ea17e00 iand mask3ff ,pdata 
+0b14 20207ddb branch timer_init 
+
+inquiry_scan_start:
+0b15 4498c006 bpatch patch06_1 ,mem_patch06 
+0b16 7000e500 jam 0 ,mem_fhs_am_addr 
+0b17 78587c00 disable clknt 
+0b18 78577c00 disable attempt 
+0b19 204010f6 call afh_clear 
+0b1a 1c4143fc and clkn_bt ,0x1fc ,bt_clk 
+0b1b 18004801 force 0x01 ,freq_mode 
+0b1c 2040112a call fetch_giac 
+0b1d 2040111e call rx_radio_freq 
+0b1e 7940001d setflip mark_inquiry_state ,mark 
+0b1f 6fe08006 fetch 1 ,mem_inquiryscan_waitcnt 
+0b20 1fe0fe01 increase 1 ,pdata 
+0b21 67e08006 store 1 ,mem_inquiryscan_waitcnt 
+0b22 20401144 call fetch_diac 
+0b23 204012d5 call start_receiver 
+0b24 20401302 call wait_access_forever 
+0b25 246c0000 nrtn sync 
+0b26 44994006 bpatch patch06_2 ,mem_patch06 
+0b27 18003600 force 0 ,stop_watch 
+0b28 2040114b call shutdown_radio 
+0b29 6fe08007 fetch 1 ,mem_inquiryscan_rcvcnt 
+0b2a 1fe0fe01 increase 1 ,pdata 
+0b2b 67e08007 store 1 ,mem_inquiryscan_rcvcnt 
+0b2c 2040112a call fetch_giac 
+0b2d 2040133c call rf_setup_time_slave_slot 
+0b2e 1c21c202 or_into 0x002 ,bt_clk 
+0b2f 18004801 force 0x01 ,freq_mode 
+0b30 20401124 call tx_radio_freq 
+0b31 20401144 call fetch_diac 
+0b32 20401340 call start_transmitter 
+0b33 2040134e call start_tx_external 
+0b34 1c427e00 deposit clkn_bt 
+0b35 67e200b0 store 4 ,mem_clkn_bt 
+0b36 20401353 call send_access_word 
+0b37 18000202 force type_fhs ,type 
+0b38 18000800 force 0 ,am_addr 
+0b39 2040135b call scan_mode_whiten 
+0b3a 20400f8a call transmit_packet_whitened 
+0b3b 20400b3f call send_eir 
+0b3c 1c2143fd and_into 0x1fd ,bt_clk 
+0b3d 1cc0cc01 increase 1 ,n_tx_slot 
+0b3e 20600000 rtn 
+
+send_eir:
+0b3f 4499c006 bpatch patch06_3 ,mem_patch06 
+0b40 6fe0c0d8 fetch 1 ,mem_eir_enable 
+0b41 207a0000 rtn blank 
+0b42 d8a000f0 arg mem_eir ,contw 
+0b43 6fe0c5ff fetch 1 ,mem_local_name_length 
+0b44 1fe27200 copy pdata ,loopcnt 
+0b45 1fe0fe01 increase 1 ,pdata 
+0b46 e7e08005 istore 1 ,contw 
+0b47 18a20400 copy contw ,temp 
+0b48 1fe0fe01 increase 1 ,pdata 
+0b49 67e141e6 store 2 ,mem_tx_len 
+0b4a 18420a00 copy temp ,contw 
+0b4b 58000009 setarg 0x09 
+0b4c e7e08005 istore 1 ,contw 
+0b4d d8c04600 arg mem_local_name ,contr 
+0b4e 20407dd4 call memcpy 
+0b4f da60467b arg mem_all_uuid_128bits ,regc 
+0b50 df200004 arg 4 ,loopcnt 
+0b51 20400b61 call get_all_uuid 
+0b52 da604665 arg mem_all_uuid_16bits ,regc 
+0b53 df200001 arg 1 ,loopcnt 
+0b54 20400b61 call get_all_uuid 
+0b55 1800020a force type_dm3 ,type 
+0b56 7041e502 jam 2 ,mem_tx_lch 
+0b57 580000f0 setarg mem_eir 
+0b58 67e100be store 2 ,mem_txptr 
+0b59 2040133c call rf_setup_time_slave_slot 
+0b5a 20401124 call tx_radio_freq 
+0b5b 20401340 call start_transmitter 
+0b5c 2040134e call start_tx_external 
+0b5d 20401353 call send_access_word 
+0b5e 2040135b call scan_mode_whiten 
+0b5f 20400f8a call transmit_packet_whitened 
+0b60 20600000 rtn 
+
+get_all_uuid:
+0b61 18a20400 copy contw ,temp 
+0b62 1a620c00 copy regc ,contr 
+0b63 efe08006 ifetch 1 ,contr 
+0b64 207a0000 rtn blank 
+
+lshift_loop:
+0b65 1fe3fe00 lshift pdata ,pdata 
+0b66 c2000b65 loop lshift_loop 
+0b67 1fe22200 copy pdata ,rega 
+0b68 1fe0fe02 increase 2 ,pdata 
+0b69 1fe20e00 copy pdata ,queue 
+0b6a 6fe141e6 fetch 2 ,mem_tx_len 
+0b6b 98e0fe00 iadd queue ,pdata 
+0b6c 67e141e6 store 2 ,mem_tx_len 
+0b6d 18420a00 copy temp ,contw 
+0b6e 1a227e00 copy rega ,pdata 
+0b6f 1fe0fe01 increase 1 ,pdata 
+0b70 e7e08005 istore 1 ,contw 
+0b71 1a620c00 copy regc ,contr 
+0b72 efe08006 ifetch 1 ,contr 
+0b73 efe08006 ifetch 1 ,contr 
+0b74 e7e08005 istore 1 ,contw 
+0b75 1a227200 copy rega ,loopcnt 
+0b76 20207dd4 branch memcpy 
+
+page_scan_dispatch:
+0b77 6fe0c09b fetch 1 ,mem_scan_mode 
+0b78 c4008000 rtnbit0 page_scan_mode 
+0b79 18000e05 force pscan_interval_timer ,queue 
+0b7a 20407de9 call timer_check 
+0b7b 247a0000 nrtn blank 
+0b7c 684940b9 fetcht 2 ,mem_pscan_window 
+0b7d 18000e28 force 40 ,queue 
+0b7e 20400f40 call sniff_check_window 
+0b7f 20740000 rtn user 
+0b80 18000800 force 0 ,am_addr 
+0b81 70001008 jam param_pagerespto ,mem_fhs_wait_counter 
+0b82 793f800b set0 mark_fhs_already_good ,mark 
+0b83 20400b87 call page_scan_start 
+0b84 18000e05 force pscan_interval_timer ,queue 
+0b85 6fe140bb fetch 2 ,mem_pscan_interval 
+0b86 20207ddb branch timer_init 
+
+page_scan_start:
+0b87 449a4006 bpatch patch06_4 ,mem_patch06 
+0b88 78587c00 disable clknt 
+0b89 204010f6 call afh_clear 
+0b8a 6fe08008 fetch 1 ,mem_pagescan_waitcnt 
+0b8b 1fe0fe01 increase 1 ,pdata 
+0b8c 67e08008 store 1 ,mem_pagescan_waitcnt 
+0b8d 18004c00 force 0 ,n_tx_slot 
+0b8e 20401134 call fetch_self_bt_adr 
+0b8f 1c40c201 add clkn_bt ,1 ,bt_clk 
+0b90 18004802 force 0x02 ,freq_mode 
+0b91 449ac006 bpatch patch06_5 ,mem_patch06 
+0b92 2040111e call rx_radio_freq 
+0b93 204012d5 call start_receiver 
+0b94 20401302 call wait_access_forever 
+0b95 246c0000 nrtn sync 
+0b96 2040114b call shutdown_radio 
+0b97 6fe08009 fetch 1 ,mem_pagescan_rcvcnt 
+0b98 1fe0fe01 increase 1 ,pdata 
+0b99 67e08009 store 1 ,mem_pagescan_rcvcnt 
+0b9a 18003600 force 0 ,stop_watch 
+0b9b 2040133c call rf_setup_time_slave_slot 
+0b9c 1c21c202 or_into 0x002 ,bt_clk 
+0b9d 18004801 force 0x01 ,freq_mode 
+0b9e 20401124 call tx_radio_freq 
+0b9f 20401340 call start_transmitter 
+0ba0 2040134e call start_tx_external 
+0ba1 20401353 call send_access_word 
+0ba2 20400e7c call end_of_packet 
+0ba3 18000800 force 0 ,am_addr 
+0ba4 69610157 fetchr timeup ,2 ,mem_param_rf_setup 
+0ba5 35330200 until clke_rt ,meet 
+0ba6 1d01d003 or_into 0x03 ,clke_bt 
+0ba7 1c2143fd and_into 0x1fd ,bt_clk 
+
+page_scan_wait_fhs_restart:
+0ba8 449b4006 bpatch patch06_6 ,mem_patch06 
+0ba9 1cc0cc01 increase 1 ,n_tx_slot 
+0baa 2040111e call rx_radio_freq 
+0bab 204012d5 call start_receiver 
+0bac 204012f5 call wait_access_mhalfbnd 
+0bad 242c0bb1 nbranch page_scan_wait_fhs_again ,sync 
+0bae 2040135b call scan_mode_whiten 
+0baf 20400d43 call receive_packet_whitened 
+0bb0 c5058bb8 bmark1 mark_fhs_already_good ,page_scan_reply_to_fhs 
+
+page_scan_wait_fhs_again:
+0bb1 449bc006 bpatch patch06_7 ,mem_patch06 
+0bb2 6fe08010 fetch 1 ,mem_fhs_wait_counter 
+0bb3 207a0000 rtn blank 
+0bb4 1fe0ffff increase -1 ,pdata 
+0bb5 67e08010 store 1 ,mem_fhs_wait_counter 
+0bb6 2040133e call rf_setup_time_master_slot 
+0bb7 20200ba8 branch page_scan_wait_fhs_restart 
+
+page_scan_reply_to_fhs:
+0bb8 449c4007 bpatch patch07_0 ,mem_patch07 
+0bb9 793fd001 set0 1 ,clke_bt 
+0bba 79205000 set1 0 ,clke_bt 
+0bbb 6fe0800a fetch 1 ,mem_pagescan_rcvfhscnt 
+0bbc 1fe0fe01 increase 1 ,pdata 
+0bbd 67e0800a store 1 ,mem_pagescan_rcvfhscnt 
+0bbe 2040133c call rf_setup_time_slave_slot 
+0bbf 1c21c202 or_into 0x02 ,bt_clk 
+0bc0 20401124 call tx_radio_freq 
+0bc1 20401340 call start_transmitter 
+0bc2 2040134e call start_tx_external 
+0bc3 20401353 call send_access_word 
+0bc4 20400e7c call end_of_packet 
+
+slave_apply_clke_bt:
+0bc5 2d000603 compare 0x03 ,clke_bt ,0x03 
+0bc6 20208bc9 branch slave_apply_clke_bt_now ,true 
+0bc7 37cb8200 until null ,mhalfbnd 
+0bc8 20200bc5 branch slave_apply_clke_bt 
+
+slave_apply_clke_bt_now:
+0bc9 6fe200b4 fetch 4 ,mem_clke_bt 
+0bca 1fe1fe03 or_into 0x03 ,pdata 
+0bcb 1fe25000 icopy clke_bt 
+
+start_slave_connection:
+0bcc 449cc007 bpatch patch07_1 ,mem_patch07 
+0bcd 6fe300c7 fetch 6 ,extm_lap 
+0bce 67e30040 store 6 ,mem_plap 
+0bcf 20400c42 call prepare_newconn 
+
+slave_newconn_loop:
+0bd0 20400c89 call slave_newconn_once 
+0bd1 20368bd5 branch sconn_successful ,match 
+0bd2 20400c62 call new_conn_timeout 
+0bd3 243a0bd0 nbranch slave_newconn_loop ,blank 
+0bd4 20600000 rtn 
+
+sconn_successful:
+0bd5 449d4007 bpatch patch07_2 ,mem_patch07 
+0bd6 20400c4d call newconn_init 
+0bd7 20400a48 call context_new 
+0bd8 24628000 nrtn zero 
+0bd9 70003100 jam 0 ,mem_mode 
+0bda 2040105d call calc_clke_offset 
+0bdb 20200a30 branch context_save 
+
+slave_dispatch:
+0bdc 449dc007 bpatch patch07_3 ,mem_patch07 
+0bdd 2040106f call calc_clke 
+0bde 20400c01 call role_switch_slave 
+0bdf 20740000 rtn user 
+
+slave_loop:
+0be0 449e4007 bpatch patch07_4 ,mem_patch07 
+0be1 204065c9 call scheduler_process 
+0be2 20400d38 call slave_conn_recv_packet 
+0be3 24368bf0 nbranch slave_notmatch ,match 
+0be4 6fe14477 fetch 2 ,mem_cb_bt_slave_match 
+0be5 20407e7a call callback_func 
+0be6 20401378 call supervision_flush 
+0be7 204065e1 call scheduler_tx_l2cap_pkt 
+0be8 20400c96 call prepare_tx 
+0be9 20400f7b call slave_conn_send_packet 
+0bea 20400f4c call parse_l2cap 
+0beb 204053f2 call parse_lmp 
+0bec 6fe0800b fetch 1 ,mem_slave_rcvcnt 
+0bed 1fe0fe01 increase 1 ,pdata 
+0bee 67e0800b store 1 ,mem_slave_rcvcnt 
+0bef 2040105d call calc_clke_offset 
+
+slave_notmatch:
+0bf0 449ec007 bpatch patch07_5 ,mem_patch07 
+0bf1 204014f5 call lpm_set_mult 
+0bf2 2040136f call supervision_update 
+0bf3 20210bf9 branch slave_disconnect ,positive 
+0bf4 204009a9 call check_disconnect_timeout 
+0bf5 24340bf9 nbranch slave_disconnect ,user 
+0bf6 20400f1c call check_attempt 
+0bf7 243a0be0 nbranch slave_loop ,blank 
+0bf8 20600000 rtn 
+
+slave_disconnect:
+0bf9 449f4007 bpatch patch07_6 ,mem_patch07 
+0bfa 700a5100 jam 0 ,mem_tester_emulate 
+0bfb 7000e300 jam 0 ,mem_debug_config 
+0bfc 20400c6a call quit_connection 
+0bfd 793f8011 set0 mark_testmode ,mark 
+0bfe 20407e8e call test_enable_white 
+0bff 6fe08030 fetch 1 ,mem_state 
+0c00 20600000 rtn 
+
+role_switch_slave:
+0c01 204009cb call role_switch_check 
+0c02 24740000 nrtn user 
+0c03 18820400 copy am_addr ,temp 
+0c04 2040135f call get_free_amaddr 
+0c05 67e080e5 store 1 ,mem_fhs_am_addr 
+0c06 18420800 copy temp ,am_addr 
+0c07 70001120 jam param_newconnto ,mem_newconnto_counter 
+
+roles_sendfhs_loop:
+0c08 449fc007 bpatch patch07_7 ,mem_patch07 
+0c09 2040133e call rf_setup_time_master_slot 
+0c0a 18000202 force type_fhs ,type 
+0c0b 20400f73 call slave_send_access 
+0c0c 1c427e00 deposit clkn_bt 
+0c0d 67e200b0 store 4 ,mem_clkn_bt 
+0c0e 20400f86 call transmit_packet 
+0c0f 2040133c call rf_setup_time_slave_slot 
+0c10 7837fc00 enable user3 
+0c11 20400d19 call slave_receive_access 
+0c12 202c0c1a branch roles_got_fhs_reply ,sync 
+0c13 2040114b call shutdown_radio 
+0c14 20400c62 call new_conn_timeout 
+0c15 243a0c08 nbranch roles_sendfhs_loop ,blank 
+0c16 c6820000 rtnmark0 mark_accept_switch 
+0c17 70007c34 jam lmp_slot_offset ,mem_lmo_opcode2 
+0c18 79200003 set1 mark_switch_initiated ,mark 
+0c19 20600000 rtn 
+
+roles_got_fhs_reply:
+0c1a 78387c00 enable clknt 
+0c1b 20400c42 call prepare_newconn 
+0c1c 204010f6 call afh_clear 
+
+roles_newconn_loop:
+0c1d 44a04008 bpatch patch08_0 ,mem_patch08 
+0c1e 20400aff call master_newconn_once 
+0c1f 202c0c26 branch roles_newconn_responded ,sync 
+0c20 20400c62 call new_conn_timeout 
+0c21 243a0c1d nbranch roles_newconn_loop ,blank 
+0c22 78587c00 disable clknt 
+0c23 1d027e00 deposit clke_bt 
+0c24 67e240d1 store 4 ,mem_next_btclk 
+0c25 20600000 rtn 
+
+roles_newconn_responded:
+0c26 7834fc00 enable master 
+0c27 c5820c2c bmark0 mark_accept_switch ,roles_newconn_nolmp 
+0c28 793f8004 set0 mark_accept_switch ,mark 
+0c29 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+0c2a 70007d33 jam lmp_host_connection_req ,mem_lmi_opcode2 
+0c2b 20405a7b call tid_set_reply 
+
+roles_newconn_nolmp:
+0c2c 18827e00 deposit am_addr 
+0c2d 67e08077 store 1 ,mem_amaddr 
+0c2e 18007e00 force 0 ,pdata 
+0c2f 67e30038 store 6 ,mem_clk_offset 
+0c30 6fe08031 fetch 1 ,mem_mode 
+0c31 79207e01 set1 mode_master ,pdata 
+0c32 67e08031 store 1 ,mem_mode 
+0c33 20401378 call supervision_flush 
+0c34 7854fc00 disable master 
+0c35 78347c00 enable user 
+0c36 20600000 rtn 
+
+init_rx_packet_flags:
+0c37 44a0c008 bpatch patch08_1 ,mem_patch08 
+0c38 7856fc00 disable match 
+0c39 793f8005 set0 mark_loopback ,mark 
+0c3a 793f800a set0 mark_am_addr_broadcast ,mark 
+0c3b 793f8010 set0 mark_longpacket ,mark 
+0c3c 793f800f set0 mark_old_packet ,mark 
+0c3d 6fe08047 fetch 1 ,mem_arq 
+0c3e 793ffe05 set0 arqnx ,pdata 
+0c3f 79207e04 set1 flowx ,pdata 
+0c40 67e08047 store 1 ,mem_arq 
+0c41 20600000 rtn 
+
+prepare_newconn:
+0c42 44a14008 bpatch patch08_2 ,mem_patch08 
+0c43 70001120 jam param_newconnto ,mem_newconnto_counter 
+0c44 70004750 jam param_newconn_arq ,mem_arq 
+0c45 6fe140c6 fetch 2 ,mem_rx_window_init 
+0c46 67e1003e store 2 ,mem_rx_window 
+0c47 1c427e00 deposit clkn_bt 
+0c48 67e240d1 store 4 ,mem_next_btclk 
+0c49 20780000 rtn clknt 
+0c4a 1d027e00 deposit clke_bt 
+0c4b 67e240d1 store 4 ,mem_next_btclk 
+0c4c 20600000 rtn 
+
+newconn_init:
+0c4d 44a1c008 bpatch patch08_3 ,mem_patch08 
+0c4e 204053ee call init_lmp_reinit 
+0c4f 20400c66 call new_conn_handle 
+0c50 67e08046 store 1 ,mem_conn_handle 
+0c51 58000000 setarg 0 
+0c52 67e1030e store 2 ,mem_l2cap_rxbuff1_len 
+0c53 58001c80 setarg param_supervision_to 
+0c54 67e10051 store 2 ,mem_supervision_to 
+0c55 6fe08030 fetch 1 ,mem_state 
+0c56 79207e00 set1 state_inconn ,pdata 
+0c57 67e08030 store 1 ,mem_state 
+0c58 70004b00 jam 0 ,mem_op 
+0c59 70004c00 jam 0 ,mem_state_map 
+0c5a 70009d00 jam 0 ,mem_lpm_current_mult 
+0c5b 20201378 branch supervision_flush 
+
+clear_linkkey:
+0c5c 44a24008 bpatch patch08_4 ,mem_patch08 
+0c5d 18007e00 force 0 ,pdata 
+0c5e 67e441cb store 8 ,mem_link_key 
+0c5f e7e40005 istore 8 ,contw 
+0c60 204009c7 call clear_linkstate 
+0c61 20200a61 branch context_traverse_linkkey 
+
+new_conn_timeout:
+0c62 6fe08011 fetch 1 ,mem_newconnto_counter 
+0c63 1fe0ffff increase -1 ,pdata 
+0c64 67e08011 store 1 ,mem_newconnto_counter 
+0c65 20600000 rtn 
+
+new_conn_handle:
+0c66 6fe0c0d6 fetch 1 ,mem_handle_num 
+0c67 1fe0fe01 increase 1 ,pdata 
+0c68 67e0c0d6 store 1 ,mem_handle_num 
+0c69 20600000 rtn 
+
+quit_connection:
+0c6a 44a2c008 bpatch patch08_5 ,mem_patch08 
+0c6b 6fe0c1db fetch 1 ,mem_hci_cmd 
+0c6c c0018c6f beq hci_cmd_remote_name_req ,quit_connection_name 
+0c6d 6fe08048 fetch 1 ,mem_lmp_to_send 
+0c6e c0808c73 bne lmp_name_req ,quit_connection_cont 
+
+quit_connection_name:
+0c6f 20404de6 call cmd_check_plap 
+0c70 24228c73 nbranch quit_connection_cont ,zero 
+0c71 204009a6 call master_name_error 
+0c72 7041db00 jam 0 ,mem_hci_cmd 
+
+quit_connection_cont:
+0c73 44a34008 bpatch patch08_6 ,mem_patch08 
+0c74 2040323e call app_disconn_reason_collect_bt 
+0c75 20400f12 call sniff_exit 
+0c76 70095b02 jam bt_evt_bb_disconnected ,mem_fifo_temp 
+0c77 204078dc call ui_ipc_send_event 
+0c78 204053e0 call init_lmp_work 
+0c79 20404e26 call l2cap_init_work 
+0c7a 20406f37 call sp_clear_flags 
+0c7b 6fe08030 fetch 1 ,mem_state 
+0c7c 793ffe00 set0 state_inconn ,pdata 
+0c7d 67e08030 store 1 ,mem_state 
+0c7e 70478e00 jam 0 ,memui_reconnect_mode 
+0c7f 6fe0804c fetch 1 ,mem_state_map 
+0c80 2fe18000 compare 0x0 ,pdata ,0xc0 
+0c81 20208c83 branch quit_connection_not_clear_mark ,true 
+0c82 793f8001 set0 mark_rxbuf_inuse ,mark 
+
+quit_connection_not_clear_mark:
+0c83 6fe08047 fetch 1 ,mem_arq 
+0c84 c3018c85 bbit0 wack ,quit_connection_not_clear_tx 
+
+quit_connection_not_clear_tx:
+0c85 6fe0804b fetch 1 ,mem_op 
+0c86 c4030000 rtnbit0 op_txl2cap 
+0c87 793f8002 set0 mark_tx_l2cap ,mark 
+0c88 20600000 rtn 
+
+slave_newconn_once:
+0c89 44a3c008 bpatch patch08_7 ,mem_patch08 
+0c8a 6fe080c3 fetch 1 ,extm_newconn_am_addr 
+0c8b 207a0000 rtn blank 
+0c8c 1fe20800 icopy am_addr 
+0c8d 20400d38 call slave_conn_recv_packet 
+0c8e 24768000 nrtn match 
+0c8f 18000200 force type_null ,type 
+0c90 20400f7b call slave_conn_send_packet 
+0c91 18827e00 deposit am_addr 
+0c92 67e08077 store 1 ,mem_amaddr 
+0c93 18007e00 force 0 ,pdata 
+0c94 67e080c3 store 1 ,extm_newconn_am_addr 
+0c95 20600000 rtn 
+
+prepare_tx:
+0c96 44a44009 bpatch patch09_0 ,mem_patch09 
+0c97 6fe08030 fetch 1 ,mem_state 
+0c98 c3010ca3 bbit0 state_insco ,prepare_tx_not_sco 
+0c99 18000207 force type_hv3 ,type 
+0c9a c5838ca2 bmark0 mark_esco ,prepare_tx_not_esco 
+0c9b 20400f49 call check_esco_amaddr 
+0c9c 24208ca3 nbranch prepare_tx_not_sco ,true 
+0c9d 20370ca3 branch prepare_tx_not_sco ,attempt 
+0c9e 20400ce4 call set_wait_ack 
+0c9f 58000002 setarg 2 
+0ca0 67e140cf store 2 ,mem_retransmission_cnt 
+0ca1 20600000 rtn 
+
+prepare_tx_not_esco:
+0ca2 24770000 nrtn attempt 
+
+prepare_tx_not_sco:
+0ca3 44a4c009 bpatch patch09_1 ,mem_patch09 
+0ca4 20400a50 call context_check_all_wack 
+0ca5 24228cb4 nbranch prepare_tx_no_retransmit ,zero 
+0ca6 6fe08047 fetch 1 ,mem_arq 
+0ca7 c3018cbd bbit0 wack ,prepare_tx_pollnull 
+
+prepare_tx_retransmit:
+0ca8 c5028cc1 bmark1 mark_loopback ,prepare_tx_loopback 
+0ca9 6fe080e3 fetch 1 ,mem_debug_config 
+0caa c2830cc7 bbit1 debug_tx_pattern ,prepare_tx_txpat 
+0cab 6fe140cf fetch 2 ,mem_retransmission_cnt 
+0cac 1fe0ffff increase -1 ,pdata 
+0cad 67e140cf store 2 ,mem_retransmission_cnt 
+0cae 203a0cb2 branch prepare_tx_nomore_retransmit ,blank 
+0caf 6fe0c0cc fetch 1 ,mem_last_type 
+0cb0 98000200 iforce type 
+0cb1 20600000 rtn 
+
+prepare_tx_nomore_retransmit:
+0cb2 44a54009 bpatch patch09_2 ,mem_patch09 
+0cb3 20400eb7 call clear_got_tx 
+
+prepare_tx_no_retransmit:
+0cb4 20400f49 call check_esco_amaddr 
+0cb5 20208cbd branch prepare_tx_pollnull ,true 
+0cb6 20405759 call send_lmp 
+0cb7 20340ccb branch prepare_tx_sendlmp ,user 
+0cb8 6fe0804b fetch 1 ,mem_op 
+0cb9 c2830cd7 bbit1 op_txl2cap ,prepare_tx_sendl2cap 
+0cba c5028cc1 bmark1 mark_loopback ,prepare_tx_loopback 
+0cbb 6fe080e3 fetch 1 ,mem_debug_config 
+0cbc c2830cc7 bbit1 debug_tx_pattern ,prepare_tx_txpat 
+
+prepare_tx_pollnull:
+0cbd 18000201 force type_poll ,type 
+0cbe 20748000 rtn master 
+0cbf 18000200 force type_null ,type 
+0cc0 20600000 rtn 
+
+prepare_tx_loopback:
+0cc1 44a5c009 bpatch patch09_3 ,mem_patch09 
+0cc2 6fe08019 fetch 1 ,mem_rx_type 
+0cc3 98000200 iforce type 
+0cc4 c1808000 rtnne 1 
+0cc5 18000200 force type_null ,type 
+0cc6 20600000 rtn 
+
+prepare_tx_txpat:
+0cc7 6fe08a58 fetch 1 ,test_mode_packet_type 
+0cc8 1fe1020f and pdata ,0xf ,type 
+0cc9 79200005 set1 mark_loopback ,mark 
+0cca 20600000 rtn 
+
+prepare_tx_sendlmp:
+0ccb 18000213 force type_lmp ,type 
+0ccc 20400ce4 call set_wait_ack 
+
+prepare_tx_ccm_edr_lmp:
+0ccd 20400ddd call check_enc_ccm 
+0cce 207a0000 rtn blank 
+0ccf 7041e403 jam 3 ,mem_llid 
+0cd0 6fe0838a fetch 1 ,mem_lmo_header_length 
+0cd1 1fe17ff8 and pdata ,0x1f8 ,pdata 
+0cd2 1fe97e00 rshift3 pdata ,pdata 
+0cd3 67e146b5 store 2 ,mem_ccm_len 
+0cd4 1fe22200 copy pdata ,rega 
+0cd5 da60038b arg mem_lmo_header_opcode ,regc 
+0cd6 20206d03 branch ccm_br_enc_new 
+
+prepare_tx_sendl2cap:
+0cd7 20400ced call tx_l2cap_type 
+0cd8 20400ce4 call set_wait_ack 
+
+prepare_tx_ccm_edr:
+0cd9 20400ddd call check_enc_ccm 
+0cda 207a0000 rtn blank 
+0cdb 6fe0c1e5 fetch 1 ,mem_tx_lch 
+0cdc 1fe17e03 and_into 3 ,pdata 
+0cdd 67e0c1e4 store 1 ,mem_llid 
+0cde 6fe141e6 fetch 2 ,mem_tx_len 
+0cdf 1fe22200 copy pdata ,rega 
+0ce0 67e146b5 store 2 ,mem_ccm_len 
+0ce1 6fe100be fetch 2 ,mem_txptr 
+0ce2 1fe22600 copy pdata ,regc 
+0ce3 20206d03 branch ccm_br_enc_new 
+
+set_wait_ack:
+0ce4 44a64009 bpatch patch09_4 ,mem_patch09 
+0ce5 68488047 fetcht 1 ,mem_arq 
+0ce6 79200403 set1 wack ,temp 
+0ce7 60488047 storet 1 ,mem_arq 
+0ce8 18227e00 deposit type 
+0ce9 67e0c0cc store 1 ,mem_last_type 
+0cea 5800ffff setarg 0xffff 
+0ceb 67e140cf store 2 ,mem_retransmission_cnt 
+0cec 20600000 rtn 
+
+tx_l2cap_type:
+0ced 44a6c009 bpatch patch09_5 ,mem_patch09 
+0cee 6fe0804c fetch 1 ,mem_state_map 
+0cef 2feffe05 isolate1 smap_edr ,pdata 
+0cf0 6fe141e6 fetch 2 ,mem_tx_len 
+0cf1 20208d03 branch tx_l2cap_type_edr ,true 
+0cf2 18000203 force type_dm1 ,type 
+0cf3 1fe67c11 sub pdata ,17 ,null 
+0cf4 20610000 rtn positive 
+0cf5 18000204 force type_dh1 ,type 
+0cf6 1fe67c1b sub pdata ,27 ,null 
+0cf7 20610000 rtn positive 
+0cf8 1800020a force type_dm3 ,type 
+0cf9 1fe67c79 sub pdata ,121 ,null 
+0cfa 20610000 rtn positive 
+0cfb 1800020b force type_dh3 ,type 
+0cfc 1fe67cb7 sub pdata ,183 ,null 
+0cfd 20610000 rtn positive 
+0cfe 1800020e force type_dm5 ,type 
+0cff 1fe67ce0 sub pdata ,224 ,null 
+0d00 20610000 rtn positive 
+0d01 1800020f force type_dh5 ,type 
+0d02 20600000 rtn 
+
+tx_l2cap_type_edr:
+0d03 18000203 force type_dm1 ,type 
+0d04 1fe67c11 sub pdata ,17 ,null 
+0d05 20610000 rtn positive 
+0d06 18000204 force type_dh1 ,type 
+0d07 1fe67c36 sub pdata ,54 ,null 
+0d08 20610000 rtn positive 
+0d09 1800020a force type_dm3 ,type 
+0d0a d840016f arg 367 ,temp 
+0d0b 98467c00 isub temp ,null 
+0d0c 24610000 nrtn positive 
+0d0d 1800020e force type_dm5 ,type 
+0d0e d84002a7 arg 679 ,temp 
+0d0f 98467c00 isub temp ,null 
+0d10 24610000 nrtn positive 
+0d11 1800020f force type_dh5 ,type 
+0d12 20600000 rtn 
+
+slave_receive_master_slot:
+0d13 6fe08030 fetch 1 ,mem_state 
+0d14 c3008d18 bbit0 state_insniff ,slave_receive_notsniff 
+0d15 6fe10032 fetch 2 ,mem_tsniff 
+0d16 203a0d18 branch slave_receive_notsniff ,blank 
+0d17 24370d1a nbranch slave_receive_sniff ,attempt 
+
+slave_receive_notsniff:
+0d18 2040133e call rf_setup_time_master_slot 
+
+slave_receive_access:
+0d19 1d00c201 add clke_bt ,1 ,bt_clk 
+
+slave_receive_sniff:
+0d1a 78287c00 enable swfine 
+0d1b 6fe1003e fetch 2 ,mem_rx_window 
+0d1c 1fe37e00 rshift pdata ,pdata 
+0d1d 6849015d fetcht 2 ,mem_param_pll_setup 
+0d1e 9840fe00 iadd temp ,pdata 
+0d1f 20401313 call ahead_window 
+0d20 2040113c call fetch_extm_bt_adr 
+0d21 18004803 force 0x03 ,freq_mode 
+0d22 2040111e call rx_radio_freq 
+0d23 20400c37 call init_rx_packet_flags 
+0d24 204012da call prep_crypt 
+0d25 44a74009 bpatch patch09_6 ,mem_patch09 
+0d26 6fe1003e fetch 2 ,mem_rx_window 
+0d27 1fe37e00 rshift pdata ,pdata 
+0d28 20401313 call ahead_window 
+0d29 204012d5 call start_receiver 
+0d2a 7826fc00 enable decode_fec0 
+0d2b 6fe1003e fetch 2 ,mem_rx_window 
+0d2c 6849015b fetcht 2 ,mem_param_clke_cal 
+0d2d 9840b600 iadd temp ,stop_watch 
+0d2e 37c18400 correlate null ,timeout 
+0d2f 1b420400 copy clke ,temp 
+0d30 604b0097 storet 6 ,mem_sync_clke 
+0d31 7846fc00 disable decode_fec0 
+0d32 246c0000 nrtn sync 
+0d33 6fe1015b fetch 2 ,mem_param_clke_cal 
+0d34 1fe25200 copy pdata ,clke_rt 
+0d35 1c225000 copy bt_clk ,clke_bt 
+0d36 20359444 branch lpm_adjust_clk ,wake 
+0d37 20600000 rtn 
+
+slave_conn_recv_packet:
+0d38 44a7c009 bpatch patch09_7 ,mem_patch09 
+0d39 20400d13 call slave_receive_master_slot 
+0d3a 242c114b nbranch shutdown_radio ,sync 
+0d3b 2040127f call save_rssi 
+0d3c c5888d40 bmark0 mark_testmode ,receive_packet 
+0d3d 6fe109f6 fetch 2 ,mem_tst_pktcnt_sync 
+0d3e 1fe0fe01 increase 1 ,pdata 
+0d3f 67e109f6 store 2 ,mem_tst_pktcnt_sync 
+
+receive_packet:
+0d40 20404d0d call rf_debug_rx_sync_line 
+0d41 1c230400 rshift bt_clk ,temp 
+0d42 18419c40 or temp ,0x40 ,white_init 
+
+receive_packet_whitened:
+0d43 44a8400a bpatch patch0a_0 ,mem_patch0a 
+0d44 7823fc00 enable enable_white 
+0d45 78257c00 enable enable_hec 
+0d46 7825fc00 enable decode_fec1 
+0d47 09800003 parse demod ,bucket ,3 
+0d48 198cfe00 rshift8 pwindow ,pdata 
+0d49 67e080ac store 1 ,mem_temp_am_addr 
+0d4a 09800004 parse demod ,bucket ,4 
+0d4b 08008007 inject bucket ,7 
+0d4c 19827e00 copy pwindow ,pdata 
+0d4d 67e08019 store 1 ,mem_rx_type 
+0d4e 09800003 parse demod ,bucket ,3 
+0d4f 198cfe00 rshift8 pwindow ,pdata 
+0d50 67e080ad store 1 ,mem_temp_arq 
+0d51 6fe08019 fetch 1 ,mem_rx_type 
+0d52 1fe67c03 sub pdata ,3 ,null 
+0d53 20210d58 branch receive_packet_noedr ,positive 
+0d54 c0038d58 beq 7 ,receive_packet_noedr 
+0d55 6fe0804c fetch 1 ,mem_state_map 
+0d56 2feffe05 isolate1 smap_edr ,pdata 
+0d57 7920aa01 setflag true ,psk ,radio_ctrl 
+
+receive_packet_noedr:
+0d58 44a8c00a bpatch patch0a_1 ,mem_patch0a 
+0d59 09800008 parse demod ,bucket ,8 
+0d5a 7845fc00 disable decode_fec1 
+0d5b 78457c00 disable enable_hec 
+0d5c 20230e5f branch error_header ,crc_failed 
+0d5d c5888d61 bmark0 mark_testmode ,receive_packet_amchk 
+0d5e 6fe109f8 fetch 2 ,mem_tst_pktcnt_hec 
+0d5f 1fe0fe01 increase 1 ,pdata 
+0d60 67e109f8 store 2 ,mem_tst_pktcnt_hec 
+
+receive_packet_amchk:
+0d61 44a9400a bpatch patch0a_2 ,mem_patch0a 
+0d62 6fe080ac fetch 1 ,mem_temp_am_addr 
+0d63 2fe00e00 compare 0 ,pdata ,0x07 
+0d64 7920800a setflag true ,mark_am_addr_broadcast ,mark 
+0d65 20208d6f branch am_addr_ok ,true 
+0d66 a8800e00 icompare 0x07 ,am_addr 
+0d67 20208d6d branch am_addr_match ,true 
+0d68 c5838e7c bmark0 mark_esco ,end_of_packet 
+0d69 6fe08047 fetch 1 ,mem_arq 
+0d6a 793ffe05 set0 arqnx ,pdata 
+0d6b 79207e04 set1 flowx ,pdata 
+0d6c 67e08047 store 1 ,mem_arq 
+
+am_addr_match:
+0d6d 20404d10 call rf_debug_rx_match_line 
+0d6e 7836fc00 enable match 
+
+am_addr_ok:
+0d6f 44a9c00a bpatch patch0a_3 ,mem_patch0a 
+0d70 6fe08019 fetch 1 ,mem_rx_type 
+0d71 1fe20200 icopy type 
+0d72 c5050d7e bmark1 mark_am_addr_broadcast ,arqn_bypass 
+0d73 684880ad fetcht 1 ,mem_temp_arq 
+0d74 6fe08047 fetch 1 ,mem_arq 
+0d75 793ffe00 set0 flow ,pdata 
+0d76 284ffe00 isolate1 flow ,temp 
+0d77 7920fe00 setflag true ,flow ,pdata 
+0d78 284ffe01 isolate1 arqn ,temp 
+0d79 7920fe01 setflag true ,arqn ,pdata 
+0d7a 67e08047 store 1 ,mem_arq 
+0d7b 284c0001 isolate0 arqn ,temp 
+0d7c 20208d7e branch arqn_bypass ,true 
+0d7d 20400eb7 call clear_got_tx 
+
+arqn_bypass:
+0d7e 44aa400a bpatch patch0a_4 ,mem_patch0a 
+0d7f d8400000 arg 0 ,temp 
+0d80 2040130b call reserve_slot 
+0d81 18217e0f and type ,0xf ,pdata 
+0d82 c0008d9a beq type_poll ,process_poll 
+0d83 c0000e7c beq type_null ,end_of_packet 
+0d84 c0010e88 beq type_fhs ,process_fhs 
+0d85 684880ad fetcht 1 ,mem_temp_arq 
+0d86 6fe08047 fetch 1 ,mem_arq 
+0d87 a8400800 icompare 0x04 ,temp 
+0d88 24208d8c nbranch rx_type_dispatch ,true 
+0d89 c5850d8b bmark0 mark_am_addr_broadcast ,failed_seqn 
+0d8a c3038d8c bbit0 bcast1 ,rx_type_dispatch 
+
+failed_seqn:
+0d8b 7920000f set1 mark_old_packet ,mark 
+
+rx_type_dispatch:
+0d8c 44aac00a bpatch patch0a_5 ,mem_patch0a 
+0d8d 18227e00 deposit type 
+0d8e c0018d9c beq type_dm1 ,process_dm1 
+0d8f c0020da0 beq type_dh1 ,process_dh1 
+0d90 c0040d9f beq type_3dh1 ,process_3dh1 
+0d91 d8400004 arg 4 ,temp 
+0d92 2040130b call reserve_slot 
+0d93 c0050d9b beq type_dm3 ,process_dm3 
+0d94 c0058d9e beq type_dh3 ,process_dh3 
+0d95 d8400008 arg 8 ,temp 
+0d96 2040130b call reserve_slot 
+0d97 c0070d9b beq type_dm5 ,process_dm5 
+0d98 c0078d9e beq type_dh5 ,process_dh5 
+0d99 20600000 rtn 
+
+process_poll:
+0d9a 20200e7c branch end_of_packet 
+
+process_dm3:
+
+process_dm5:
+0d9b 79200010 set1 mark_longpacket ,mark 
+
+process_dm1:
+0d9c 78267c00 enable decode_fec2 
+0d9d 20200da1 branch process_dmh 
+
+process_dh3:
+
+process_dh5:
+0d9e 79200010 set1 mark_longpacket ,mark 
+
+process_3dh1:
+0d9f 79202a02 set1 psk3m ,radio_ctrl 
+
+process_dh1:
+0da0 7826fc00 enable decode_fec0 
+
+process_dmh:
+0da1 44ab400a bpatch patch0a_6 ,mem_patch0a 
+0da2 c5198e7c bmark1 mark_first_packet ,end_of_packet 
+0da3 c5008e7c bmark1 mark_rxbuf_inuse ,end_of_packet 
+0da4 2aac0001 isolate0 psk ,radio_ctrl 
+0da5 20208dae branch process_dmh_noedr ,true 
+0da6 7843fc00 disable enable_white 
+0da7 7826fc00 enable decode_fec0 
+0da8 78467c00 disable decode_fec2 
+0da9 1c409602 add clkn_bt ,2 ,timeup 
+0daa 34530400 correlate clkn_bt ,meet 
+0dab 242c0e6b nbranch error_payload ,sync 
+0dac 79200010 set1 mark_longpacket ,mark 
+0dad 7823fc00 enable enable_white 
+
+process_dmh_noedr:
+0dae 44abc00a bpatch patch0a_7 ,mem_patch0a 
+0daf 78277c00 enable encrypt 
+0db0 7824fc00 enable enable_crc 
+0db1 09800003 parse demod ,bucket ,3 
+0db2 198cfe00 rshift8 pwindow ,pdata 
+0db3 67e080e4 store 1 ,mem_lch_code 
+0db4 09800005 parse demod ,bucket ,5 
+0db5 c5080db9 bmark1 mark_longpacket ,process_dmh_long 
+0db6 19897200 rshift3 pwindow ,loopcnt 
+0db7 1f297200 rshift3 loopcnt ,loopcnt 
+0db8 20200dbc branch process_dmh_common 
+
+process_dmh_long:
+0db9 09800005 parse demod ,bucket ,5 
+0dba 19837200 rshift pwindow ,loopcnt 
+0dbb 09800003 parse demod ,bucket ,3 
+
+process_dmh_common:
+0dbc 44ac400b bpatch patch0b_0 ,mem_patch0b 
+0dbd 1f227e00 deposit loopcnt 
+0dbe 67e100ae store 2 ,mem_len 
+0dbf 203a0dd4 branch process_dmh_data_0 ,blank 
+0dc0 20400ddd call check_enc_ccm 
+0dc1 203a0dc4 branch process_dmh_common2 ,blank 
+
+process_dmh_common2_ccm:
+0dc2 1f20f204 increase 4 ,loopcnt 
+0dc3 1f227e00 deposit loopcnt 
+
+process_dmh_common2:
+0dc4 9ea67c00 isub mask3ff ,null 
+0dc5 20210e6b branch error_payload ,positive 
+0dc6 44acc00b bpatch patch0b_1 ,mem_patch0b 
+0dc7 793f8000 set0 mark_fhs_eir ,mark 
+0dc8 6fe080e4 fetch 1 ,mem_lch_code 
+0dc9 1fe17e03 and_into 0x03 ,pdata 
+0dca d8a000ce arg mem_rxbuf ,contw 
+0dcb c0018de2 beq llid_lmp ,process_lmp 
+0dcc c5088dd2 bmark1 mark_testmode ,process_dmh_common2_testmode 
+0dcd 6fe080e4 fetch 1 ,mem_lch_code 
+0dce 1fe17e03 and_into 0x03 ,pdata 
+0dcf c0010de7 beq llid_l2cap_start ,process_dmh_data_l2cap_start_pkt 
+0dd0 c0008dfb beq llid_l2cap_cont ,process_dmh_data_l2cap_continue_pkt 
+0dd1 20200e6b branch error_payload 
+
+process_dmh_common2_testmode:
+0dd2 d8a01000 arg mem_l2cap_rxbuff1 ,contw 
+0dd3 20200e0c branch process_dmh_data 
+
+process_dmh_data_0:
+0dd4 20400ddd call check_enc_ccm 
+0dd5 203a0e10 branch process_dmh_data_end ,blank 
+0dd6 58000000 setarg 0 
+0dd7 67e146b5 store 2 ,mem_ccm_len 
+0dd8 09800020 parse demod ,bucket ,32 
+0dd9 1fef7e00 rshift32 pdata ,pdata 
+0dda 1fecfe00 rshift8 pdata ,pdata 
+0ddb 67e20273 store 4 ,mem_le_peer_mic 
+0ddc 20200e10 branch process_dmh_data_end 
+
+check_enc_ccm:
+0ddd 6fe0804c fetch 1 ,mem_state_map 
+0dde c3017ed1 bbit0 smap_encryption ,enable_blank 
+0ddf 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+0de0 c0817ed1 bne encapsulated_minor_type_p256 ,enable_blank 
+0de1 20207ecf branch disable_blank 
+
+process_lmp:
+0de2 6fe100ae fetch 2 ,mem_len 
+0de3 1fe67c11 sub pdata ,17 ,null 
+0de4 24210e6b nbranch error_payload ,positive 
+0de5 c5078e4c bmark1 mark_old_packet ,ack_payload 
+0de6 20200e0c branch process_dmh_data 
+
+process_dmh_data_l2cap_start_pkt:
+0de7 44ad400b bpatch patch0b_2 ,mem_patch0b 
+0de8 c5078e4c bmark1 mark_old_packet ,ack_payload 
+0de9 6fe100ae fetch 2 ,mem_len 
+0dea d84002e0 arg 0x2e0 ,temp 
+0deb 98467c00 isub temp ,null 
+0dec 20210e6b branch error_payload ,positive 
+0ded 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0dee c3000df1 bbit0 l2cap_inuse_buff1 ,process_dmh_data_into_buff1 
+0def c3008df6 bbit0 l2cap_inuse_buff2 ,process_dmh_data_into_buff2 
+0df0 20200e7c branch end_of_packet 
+
+process_dmh_data_into_buff1:
+0df1 70031201 jam 1 ,mem_l2cap_rxbuff_new 
+0df2 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+0df3 c0800e7c bne 0 ,end_of_packet 
+0df4 d8a01000 arg mem_l2cap_rxbuff1 ,contw 
+0df5 20200e0c branch process_dmh_data 
+
+process_dmh_data_into_buff2:
+0df6 70031202 jam 2 ,mem_l2cap_rxbuff_new 
+0df7 6fe10310 fetch 2 ,mem_l2cap_rxbuff2_len 
+0df8 c0800e7c bne 0 ,end_of_packet 
+0df9 d8a01400 arg mem_l2cap_rxbuff2 ,contw 
+0dfa 20200e0c branch process_dmh_data 
+
+process_dmh_data_l2cap_continue_pkt:
+0dfb 44adc00b bpatch patch0b_3 ,mem_patch0b 
+0dfc c5078e4c bmark1 mark_old_packet ,ack_payload 
+0dfd 6fe100ae fetch 2 ,mem_len 
+0dfe d84002e0 arg 0x2e0 ,temp 
+0dff 98467c00 isub temp ,null 
+0e00 20210e6b branch error_payload ,positive 
+0e01 6fe08312 fetch 1 ,mem_l2cap_rxbuff_new 
+0e02 c0008e05 beq 1 ,process_dmh_data_l2cap_continue_pkt1 
+0e03 c0010e09 beq 2 ,process_dmh_data_l2cap_continue_pkt2 
+0e04 20200e7c branch end_of_packet 
+
+process_dmh_data_l2cap_continue_pkt1:
+0e05 d8a01000 arg mem_l2cap_rxbuff1 ,contw 
+0e06 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+0e07 98a08a00 iadd contw ,contw 
+0e08 20200e0c branch process_dmh_data 
+
+process_dmh_data_l2cap_continue_pkt2:
+0e09 d8a01400 arg mem_l2cap_rxbuff2 ,contw 
+0e0a 6fe10310 fetch 2 ,mem_l2cap_rxbuff2_len 
+0e0b 98a08a00 iadd contw ,contw 
+
+process_dmh_data:
+0e0c 09800008 parse demod ,bucket ,8 
+0e0d 19897e00 rshift3 pwindow ,pdata 
+0e0e e7e08005 istore 1 ,contw 
+0e0f c2000e0c loop process_dmh_data 
+
+process_dmh_data_end:
+0e10 44ae400b bpatch patch0b_4 ,mem_patch0b 
+0e11 09800010 parse demod ,bucket ,16 
+0e12 20230e65 branch error_payload_crc ,crc_failed 
+0e13 20400ddd call check_enc_ccm 
+0e14 20407ec9 call enable_user2 
+0e15 245a6d34 ncall ccm_br_decrypt_new ,blank 
+0e16 24360e6c nbranch error_mic_error ,user2 
+0e17 20404d0c call rf_debug_rx_crc_line 
+0e18 6fe0c5f6 fetch 1 ,mem_l2cap_flow_ctrl_flag 
+0e19 c0008e6c beq l2cap_flow_ctrl_enable ,flow_ctrl 
+0e1a c5088e39 bmark1 mark_testmode ,process_dmh_cont 
+0e1b c5078e79 bmark1 mark_old_packet ,redundant_payload 
+0e1c 6fe080e4 fetch 1 ,mem_lch_code 
+0e1d 2fe00603 compare 3 ,pdata ,3 
+0e1e 20208e39 branch process_dmh_cont ,true 
+0e1f 6fe100ae fetch 2 ,mem_len 
+0e20 203a0e39 branch process_dmh_cont ,blank 
+0e21 44aec00b bpatch patch0b_5 ,mem_patch0b 
+0e22 6fe08312 fetch 1 ,mem_l2cap_rxbuff_new 
+0e23 c0008e26 beq 1 ,process_l2cap_pass_crc_buff1 
+0e24 c0010e30 beq 2 ,process_l2cap_pass_crc_buff2 
+0e25 2020137c branch assert 
+
+process_l2cap_pass_crc_buff1:
+0e26 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+0e27 684900ae fetcht 2 ,mem_len 
+0e28 9840fe00 iadd temp ,pdata 
+0e29 67e1030e store 2 ,mem_l2cap_rxbuff1_len 
+0e2a 207a0000 rtn blank 
+0e2b 68491000 fetcht 2 ,mem_l2cap_rxbuff1 
+0e2c 18408404 increase 4 ,temp 
+0e2d 98467c00 isub temp ,null 
+0e2e 20428f6b call l2cap_buff1_inuse ,zero 
+0e2f 20200e39 branch process_dmh_cont 
+
+process_l2cap_pass_crc_buff2:
+0e30 6fe10310 fetch 2 ,mem_l2cap_rxbuff2_len 
+0e31 684900ae fetcht 2 ,mem_len 
+0e32 9840fe00 iadd temp ,pdata 
+0e33 67e10310 store 2 ,mem_l2cap_rxbuff2_len 
+0e34 207a0000 rtn blank 
+0e35 68491400 fetcht 2 ,mem_l2cap_rxbuff2 
+0e36 18408404 add temp ,4 ,temp 
+0e37 98467c00 isub temp ,null 
+0e38 20428f6f call l2cap_buff2_inuse ,zero 
+
+process_dmh_cont:
+0e39 44af400b bpatch patch0b_6 ,mem_patch0b 
+0e3a 6848804c fetcht 1 ,mem_state_map 
+0e3b 6fe080e4 fetch 1 ,mem_lch_code 
+0e3c 2fe00603 compare 3 ,pdata ,0x03 
+0e3d 79208406 setflag true ,smap_rxlmp ,temp 
+0e3e 7d208407 nsetflag true ,smap_rxl2cap ,temp 
+0e3f 6048804c storet 1 ,mem_state_map 
+0e40 24208e42 nbranch process_dmh_cont_rxbuf_not_use ,true 
+0e41 79200001 set1 mark_rxbuf_inuse ,mark 
+
+process_dmh_cont_rxbuf_not_use:
+0e42 c5888e4c bmark0 mark_testmode ,ack_payload 
+0e43 284ffe06 isolate1 smap_rxlmp ,temp 
+0e44 20208e4c branch ack_payload ,true 
+0e45 6fe109fa fetch 2 ,mem_tst_pktcnt_crc 
+0e46 1fe0fe01 increase 1 ,pdata 
+0e47 67e109fa store 2 ,mem_tst_pktcnt_crc 
+0e48 79200005 set1 mark_loopback ,mark 
+0e49 793f8407 set0 smap_rxl2cap ,temp 
+0e4a 793f8001 set0 mark_rxbuf_inuse ,mark 
+0e4b 6048804c storet 1 ,mem_state_map 
+
+ack_payload:
+0e4c 44afc00b bpatch patch0b_7 ,mem_patch0b 
+0e4d 20400ddd call check_enc_ccm 
+0e4e 245a6d5b ncall ccm_br_pcnt_rx_add ,blank 
+0e4f 684880ad fetcht 1 ,mem_temp_arq 
+0e50 6fe08047 fetch 1 ,mem_arq 
+0e51 79207e05 set1 arqnx ,pdata 
+0e52 284ffe02 isolate1 seqn ,temp 
+0e53 7920fe02 setflag true ,seqn ,pdata 
+0e54 280ffe0a isolate1 mark_am_addr_broadcast ,mark 
+0e55 7920fe07 setflag true ,bcast1 ,pdata 
+0e56 67e08047 store 1 ,mem_arq 
+0e57 6fe100ae fetch 2 ,mem_len 
+0e58 243a0e7c nbranch end_of_packet ,blank 
+0e59 6fe0804c fetch 1 ,mem_state_map 
+0e5a 793ffe07 set0 smap_rxl2cap ,pdata 
+0e5b 67e0804c store 1 ,mem_state_map 
+0e5c 6fe080e4 fetch 1 ,mem_lch_code 
+0e5d 2fe00e01 compare 0x01 ,pdata ,0x07 
+0e5e 20200e7c branch end_of_packet 
+
+error_header:
+0e5f 44b0400c bpatch patch0c_0 ,mem_patch0c 
+0e60 7856fc00 disable match 
+0e61 6fe1001a fetch 2 ,mem_rx_hec_err 
+0e62 1fe0fe01 increase 1 ,pdata 
+0e63 67e1001a store 2 ,mem_rx_hec_err 
+0e64 20200e7c branch end_of_packet 
+
+error_payload_crc:
+0e65 6fe1001c fetch 2 ,mem_rx_crc_err 
+0e66 1fe0fe01 increase 1 ,pdata 
+0e67 67e1001c store 2 ,mem_rx_crc_err 
+0e68 20400e6d call discard_pkt 
+0e69 c5888e6b bmark0 mark_testmode ,error_payload 
+0e6a 79200005 set1 mark_loopback ,mark 
+
+error_payload:
+0e6b 20200e7c branch end_of_packet 
+
+flow_ctrl:
+
+error_mic_error:
+0e6c 20200e65 branch error_payload_crc 
+
+discard_pkt:
+0e6d 44b0c00c bpatch patch0c_1 ,mem_patch0c 
+0e6e 6fe080e4 fetch 1 ,mem_lch_code 
+0e6f 2fe00603 compare 3 ,pdata ,0x03 
+0e70 24208e75 nbranch discard_pkt_l2cap ,true 
+
+discard_pkt_lmp:
+0e71 6848804c fetcht 1 ,mem_state_map 
+0e72 793f8406 set0 smap_rxlmp ,temp 
+0e73 6048804c storet 1 ,mem_state_map 
+0e74 20600000 rtn 
+
+discard_pkt_l2cap:
+0e75 6848804c fetcht 1 ,mem_state_map 
+0e76 793f8407 set0 smap_rxl2cap ,temp 
+0e77 6048804c storet 1 ,mem_state_map 
+0e78 20600000 rtn 
+
+redundant_payload:
+0e79 6fe08047 fetch 1 ,mem_arq 
+0e7a 79207e05 set1 arqnx ,pdata 
+0e7b 67e08047 store 1 ,mem_arq 
+
+end_of_packet:
+0e7c 44b1400c bpatch patch0c_2 ,mem_patch0c 
+0e7d 784efc00 disable encode_fec0 
+0e7e 784e7c00 disable encode_fec2 
+0e7f 7846fc00 disable decode_fec0 
+0e80 78467c00 disable decode_fec2 
+0e81 7844fc00 disable enable_crc 
+0e82 78477c00 disable encrypt 
+0e83 7843fc00 disable enable_white 
+0e84 2030914b branch shutdown_radio ,is_rx 
+0e85 37d38200 until null ,tx_clear 
+0e86 20000064 nop 100 
+0e87 2020114b branch shutdown_radio 
+
+process_fhs:
+0e88 44b1c00c bpatch patch0c_3 ,mem_patch0c 
+0e89 7824fc00 enable enable_crc 
+0e8a 78267c00 enable decode_fec2 
+0e8b 09800048 parse demod ,bucket ,72 
+0e8c 2feffe3a isolate1 58 ,pdata 
+0e8d 79208000 setflag true ,mark_fhs_eir ,mark 
+0e8e 1c020400 copy bt_adr ,temp 
+0e8f 57e04000 ialigned bt_adr 
+0e90 57e03c00 ialigned fhs0 
+0e91 782afc00 pulse recalc 
+0e92 380bffff setsect 2 ,0xfffff 
+0e93 380cffff setsect 3 ,0x0ffff 
+0e94 20000020 nop 32 
+0e95 29a80000 iverify fhs_parity 
+0e96 1d827e00 deposit lap 
+0e97 67e180c7 store 3 ,extm_lap 
+0e98 1da27e00 deposit uap 
+0e99 67e080ca store 1 ,extm_uap 
+0e9a 18424000 copy temp ,bt_adr 
+0e9b 20208e9d branch fhs_parity_ok ,true 
+0e9c 20200e6b branch error_payload 
+
+fhs_parity_ok:
+0e9d 44b2400c bpatch patch0c_4 ,mem_patch0c 
+0e9e 09800048 parse demod ,bucket ,72 
+0e9f 57e03e00 ialigned fhs1 
+0ea0 57e00800 ialigned am_addr 
+0ea1 57e05c00 ialigned nap 
+0ea2 57e02400 ialigned regb 
+0ea3 18007e00 force 0 ,pdata 
+0ea4 09800010 parse demod ,bucket ,16 
+0ea5 20230e6b branch error_payload ,crc_failed 
+0ea6 20404d0c call rf_debug_rx_crc_line 
+0ea7 5ffffffc setarg 0x0ffffffc 
+0ea8 9a417e00 iand regb ,pdata 
+0ea9 67e200b4 store 4 ,mem_clke_bt 
+0eaa 1ba27e00 deposit fhs_class 
+0eab 67e180c4 store 3 ,extm_class 
+0eac 1b827e00 deposit fhs_misc 
+0ead 67e080c2 store 1 ,extm_fhs_misc 
+0eae 18827e00 deposit am_addr 
+0eaf 67e080c3 store 1 ,extm_newconn_am_addr 
+0eb0 1dc27e00 deposit nap 
+0eb1 67e100cb store 2 ,extm_nap 
+0eb2 1c227e00 deposit bt_clk 
+0eb3 08008220 inject rxf ,32 
+0eb4 28201e02 compare type_fhs ,type ,0x0f 
+0eb5 7920800b setflag true ,mark_fhs_already_good ,mark 
+0eb6 20200e7c branch end_of_packet 
+
+clear_got_tx:
+0eb7 44b2c00c bpatch patch0c_5 ,mem_patch0c 
+0eb8 6fe08047 fetch 1 ,mem_arq 
+0eb9 c4018000 rtnbit0 wack 
+0eba 793ffe03 set0 wack ,pdata 
+0ebb 79407e06 setflip seqnx ,pdata 
+0ebc 67e08047 store 1 ,mem_arq 
+0ebd 20400ddd call check_enc_ccm 
+0ebe 245a6d21 ncall ccm_br_pcnt_tx_add ,blank 
+0ebf 6fe0c0cc fetch 1 ,mem_last_type 
+0ec0 c0098ece beq type_lmp ,clear_got_txlmp 
+0ec1 c1038000 rtneq type_hv3 
+0ec2 6fe0804b fetch 1 ,mem_op 
+0ec3 c4030000 rtnbit0 op_txl2cap ,pdata 
+0ec4 793ffe06 set0 op_txl2cap ,pdata 
+0ec5 79207e07 set1 op_pkt_comp ,pdata 
+0ec6 67e0804b store 1 ,mem_op 
+0ec7 793f8002 set0 mark_tx_l2cap ,mark 
+0ec8 6fe144d9 fetch 2 ,mem_l2cap_tx_multi_offset 
+0ec9 247a0000 nrtn blank 
+0eca 6fe0804b fetch 1 ,mem_op 
+0ecb 793ffe07 set0 op_pkt_comp ,pdata 
+0ecc 67e0804b store 1 ,mem_op 
+0ecd 2020533e branch l2cap_malloc_free 
+
+clear_got_txlmp:
+0ece 44b3400c bpatch patch0c_6 ,mem_patch0c 
+0ecf 6fe0c5f9 fetch 1 ,mem_lmo_header_opcode_x 
+0ed0 1fe37e00 rshift pdata ,pdata 
+0ed1 c0088ee1 beq lmp_start_encryption_req ,start_encryption 
+0ed2 c0090eeb beq lmp_stop_encryption_req ,stop_encryption 
+0ed3 c00c0f12 beq lmp_unsniff_req ,sniff_exit 
+0ed4 c03f8ed9 beq lmp_escape ,clear_lmp_escape 
+0ed5 c1818000 rtnne lmp_accepted 
+0ed6 6fe0838c fetch 1 ,mem_lmo_payload 
+0ed7 c0088edc beq lmp_start_encryption_req ,clear_send_setup_complete 
+0ed8 20600000 rtn 
+
+clear_lmp_escape:
+0ed9 6fe0838c fetch 1 ,mem_lmo_payload 
+0eda 79207e07 set1 7 ,pdata 
+0edb 20600000 rtn 
+
+clear_send_setup_complete:
+0edc 20748000 rtn master 
+0edd 6fe08030 fetch 1 ,mem_state 
+0ede c3820000 rtnbit1 state_conn_comp 
+0edf 70007c31 jam lmp_setup_complete ,mem_lmo_opcode2 
+0ee0 20600000 rtn 
+
+start_encryption:
+0ee1 44b3c00c bpatch patch0c_7 ,mem_patch0c 
+0ee2 6fe0804c fetch 1 ,mem_state_map 
+0ee3 79207e02 set1 smap_encryption ,pdata 
+0ee4 67e0804c store 1 ,mem_state_map 
+0ee5 70801101 jam 1 ,core_encrypt 
+0ee6 18007e00 force 0 ,pdata 
+0ee7 67e2c6a4 store 5 ,mem_ccm_pcnt_rx 
+0ee8 79207e25 set1 br_ccm_directionbit ,pdata 
+0ee9 67e2c69f store 5 ,mem_ccm_pcnt_tx 
+0eea 20600000 rtn 
+
+stop_encryption:
+0eeb 44b4400d bpatch patch0d_0 ,mem_patch0d 
+0eec 6fe0804c fetch 1 ,mem_state_map 
+0eed 793ffe02 set0 smap_encryption ,pdata 
+0eee 67e0804c store 1 ,mem_state_map 
+0eef 70801100 jam 0 ,core_encrypt 
+0ef0 20600000 rtn 
+
+sniff_init:
+0ef1 44b4c00d bpatch patch0d_1 ,mem_patch0d 
+0ef2 1c40a203 add clkn_bt ,3 ,rega 
+0ef3 20348ef5 branch sniff_init_master ,master 
+0ef4 1d00a203 add clke_bt ,3 ,rega 
+
+sniff_init_master:
+0ef5 68490032 fetcht 2 ,mem_tsniff 
+0ef6 1a227e00 deposit rega 
+0ef7 793ffe1b set0 27 ,pdata 
+0ef8 9846fc00 idiv temp 
+0ef9 6fe10075 fetch 2 ,mem_dsniff 
+0efa 20407e64 call wait_div_end 
+0efb 18072600 remainder regc 
+0efc 9a667e00 isub regc ,pdata 
+0efd 20210eff branch sniff_init_nowrap ,positive 
+0efe 9840fe00 iadd temp ,pdata 
+
+sniff_init_nowrap:
+0eff 9a20fe00 iadd rega ,pdata 
+0f00 67e20034 store 4 ,mem_sniff_anchor 
+0f01 70464500 jam switch_flag_init ,mem_switch_flag 
+0f02 6fe08030 fetch 1 ,mem_state 
+0f03 79207e01 set1 state_insniff ,pdata 
+0f04 67e08030 store 1 ,mem_state 
+0f05 6fe08073 fetch 1 ,mem_sniff_attempt 
+0f06 67e08088 store 1 ,mem_current_sniff_attempt 
+0f07 58000000 setarg 0 
+0f08 67e1c16e store 3 ,mem_sniff_rcv 
+0f09 67e1c171 store 3 ,mem_sniff_lost 
+0f0a 67e0c15e store 1 ,mem_sniff_unint_lost 
+0f0b 70095b0b jam bt_evt_enter_sniff ,mem_fifo_temp 
+0f0c 204078dc call ui_ipc_send_event 
+0f0d 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+0f0e 67e1003e store 2 ,mem_rx_window 
+0f0f 24748000 nrtn master 
+0f10 18808fff add am_addr ,-1 ,queue 
+0f11 20600000 rtn 
+
+sniff_exit:
+0f12 44b5400d bpatch patch0d_2 ,mem_patch0d 
+0f13 6fe08030 fetch 1 ,mem_state 
+0f14 c4008000 rtnbit0 state_insniff 
+0f15 793ffe01 set0 state_insniff ,pdata 
+0f16 67e08030 store 1 ,mem_state 
+0f17 6fe140c6 fetch 2 ,mem_rx_window_init 
+0f18 67e1003e store 2 ,mem_rx_window 
+0f19 7855fc00 disable wake 
+0f1a 70095b0c jam bt_evt_exit_sniff ,mem_fifo_temp 
+0f1b 202078dc branch ui_ipc_send_event 
+
+check_attempt:
+0f1c 44b5c00d bpatch patch0d_3 ,mem_patch0d 
+0f1d 78377c00 enable attempt 
+0f1e 6fe08030 fetch 1 ,mem_state 
+0f1f c2808f29 bbit1 state_insniff ,check_attempt_sniff 
+0f20 c6088000 rtnmark1 mark_testmode 
+0f21 6fe08047 fetch 1 ,mem_arq 
+0f22 c3818000 rtnbit1 wack 
+0f23 6fe08048 fetch 1 ,mem_lmp_to_send 
+0f24 247a0000 nrtn blank 
+0f25 6fe0804b fetch 1 ,mem_op 
+0f26 c3830000 rtnbit1 op_txl2cap 
+
+check_attempt_nomore:
+0f27 18007e00 force 0 ,pdata 
+0f28 20600000 rtn 
+
+check_attempt_sniff:
+0f29 c3010f33 bbit0 state_insco ,check_attempt_not_sco 
+0f2a 6fe08088 fetch 1 ,mem_current_sniff_attempt 
+0f2b c0010f2f beq 2 ,check_attempt_sniff_restore_sco 
+0f2c 6fe08047 fetch 1 ,mem_arq 
+0f2d c2818f3c bbit1 wack ,check_attempt_notimeout 
+0f2e c5840f3c bmark0 mark_esco_rxok ,check_attempt_notimeout 
+
+check_attempt_sniff_restore_sco:
+0f2f 24348f3c nbranch check_attempt_notimeout ,master 
+0f30 6fe08048 fetch 1 ,mem_lmp_to_send 
+0f31 243a0f3c nbranch check_attempt_notimeout ,blank 
+
+check_attempt_sco_master:
+0f32 20200f27 branch check_attempt_nomore 
+
+check_attempt_not_sco:
+0f33 6fe08088 fetch 1 ,mem_current_sniff_attempt 
+0f34 c0808f3c bne 1 ,check_attempt_notimeout 
+0f35 6fe08089 fetch 1 ,mem_current_sniff_timeout 
+0f36 203a0f3c branch check_attempt_notimeout ,blank 
+0f37 1fe0ffff increase -1 ,pdata 
+0f38 67e08089 store 1 ,mem_current_sniff_timeout 
+0f39 6fe08047 fetch 1 ,mem_arq 
+0f3a c3818000 rtnbit1 wack 
+0f3b 24768000 nrtn match 
+
+check_attempt_notimeout:
+0f3c 6fe08088 fetch 1 ,mem_current_sniff_attempt 
+0f3d 1fe0ffff increase -1 ,pdata 
+0f3e 67e08088 store 1 ,mem_current_sniff_attempt 
+0f3f 20600000 rtn 
+
+sniff_check_window:
+0f40 44b6400d bpatch patch0d_4 ,mem_patch0d 
+0f41 78487c00 disable swfine 
+0f42 18423600 copy temp ,stop_watch 
+0f43 20400a6d call context_search_sniff_window 
+0f44 78547c00 disable user 
+0f45 24628000 nrtn zero 
+0f46 18003600 force 0 ,stop_watch 
+0f47 78347c00 enable user 
+0f48 20600000 rtn 
+
+check_esco_amaddr:
+0f49 6fe0c15d fetch 1 ,mem_esco_addr 
+0f4a a881fe00 icompare 0xff ,am_addr 
+0f4b 20600000 rtn 
+
+parse_l2cap:
+0f4c 44b6c00d bpatch patch0d_5 ,mem_patch0d 
+0f4d 793f8001 set0 mark_rxbuf_inuse ,mark 
+
+parse_l2cap_cont:
+0f4e 70031b00 jam l2cap_rx_clear ,mem_l2cap_rx_done 
+0f4f 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f50 207a0000 rtn blank 
+0f51 2feffe00 isolate1 l2cap_inuse_buff1 ,pdata 
+0f52 d8c01000 arg mem_l2cap_rxbuff1 ,contr 
+0f53 2040ce34 call process_rx_l2cap_pkt ,true 
+0f54 44b7400d bpatch patch0d_6 ,mem_patch0d 
+0f55 6fe0831b fetch 1 ,mem_l2cap_rx_done 
+0f56 c0008f5f beq l2cap_rx_done ,parse_l2cap_release_buff1 
+0f57 70031b00 jam l2cap_rx_clear ,mem_l2cap_rx_done 
+0f58 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f59 c4008000 rtnbit0 l2cap_inuse_buff2 
+0f5a d8c01400 arg mem_l2cap_rxbuff2 ,contr 
+0f5b 20404e34 call process_rx_l2cap_pkt 
+0f5c 6fe0831b fetch 1 ,mem_l2cap_rx_done 
+0f5d c0008f65 beq l2cap_rx_done ,parse_l2cap_release_buff2 
+0f5e 20600000 rtn 
+
+parse_l2cap_release_buff1:
+0f5f 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f60 793ffe00 set0 l2cap_inuse_buff1 ,pdata 
+0f61 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f62 58000000 setarg 0 
+0f63 67e1030e store 2 ,mem_l2cap_rxbuff1_len 
+0f64 20600000 rtn 
+
+parse_l2cap_release_buff2:
+0f65 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f66 793ffe01 set0 l2cap_inuse_buff2 ,pdata 
+0f67 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f68 58000000 setarg 0 
+0f69 67e10310 store 2 ,mem_l2cap_rxbuff2_len 
+0f6a 20600000 rtn 
+
+l2cap_buff1_inuse:
+0f6b 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f6c 79207e00 set1 l2cap_inuse_buff1 ,pdata 
+0f6d 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f6e 20600000 rtn 
+
+l2cap_buff2_inuse:
+0f6f 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f70 79207e01 set1 l2cap_inuse_buff2 ,pdata 
+0f71 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f72 20600000 rtn 
+
+slave_send_access:
+0f73 44b7c00d bpatch patch0d_7 ,mem_patch0d 
+0f74 1d00c201 add clke_bt ,1 ,bt_clk 
+0f75 2040113c call fetch_extm_bt_adr 
+0f76 18004803 force 0x03 ,freq_mode 
+0f77 20401124 call tx_radio_freq 
+0f78 20401340 call start_transmitter 
+0f79 2040134e call start_tx_external 
+0f7a 20201353 branch send_access_word 
+
+slave_conn_send_packet:
+0f7b 44b8400e bpatch patch0e_0 ,mem_patch0e 
+0f7c 2040133c call rf_setup_time_slave_slot 
+0f7d 1d027e00 deposit clke_bt 
+0f7e 684a40d1 fetcht 4 ,mem_next_btclk 
+0f7f 98467e00 isub temp ,pdata 
+0f80 c1808000 rtnne 1 
+0f81 28203e00 compare type_null ,type ,0x1f 
+0f82 24208f85 nbranch slave_conn_send_access ,true 
+0f83 6fe08019 fetch 1 ,mem_rx_type 
+0f84 207a0000 rtn blank 
+
+slave_conn_send_access:
+0f85 20400f73 call slave_send_access 
+
+transmit_packet:
+0f86 28203e10 compare type_id ,type ,0x1f 
+0f87 20208e7c branch end_of_packet ,true 
+0f88 1c230400 rshift bt_clk ,temp 
+0f89 18419c40 or temp ,0x40 ,white_init 
+
+transmit_packet_whitened:
+0f8a 44b8c00e bpatch patch0e_1 ,mem_patch0e 
+0f8b 7823fc00 enable enable_white 
+0f8c 78257c00 enable enable_hec 
+0f8d 782dfc00 enable encode_fec1 
+0f8e 793f8010 set0 mark_longpacket ,mark 
+0f8f 18827e00 deposit am_addr 
+0f90 08008603 inject mod ,3 
+0f91 18227e00 deposit type 
+0f92 08008604 inject mod ,4 
+0f93 6fe08047 fetch 1 ,mem_arq 
+0f94 08008004 inject bucket ,4 
+0f95 08008603 inject mod ,3 
+0f96 78247c00 enable enable_parity 
+0f97 08008608 inject mod ,8 
+0f98 784dfc00 disable encode_fec1 
+0f99 78447c00 disable enable_parity 
+0f9a 78457c00 disable enable_hec 
+0f9b 793faa02 set0 psk3m ,radio_ctrl 
+0f9c d8400000 arg 0 ,temp 
+0f9d 2040130b call reserve_slot 
+0f9e 44b9400e bpatch patch0e_2 ,mem_patch0e 
+0f9f 18217e1f and type ,0x1f ,pdata 
+0fa0 c0098fce beq type_lmp ,transmit_lmp 
+0fa1 c0000e7c beq type_null ,end_of_packet 
+0fa2 c0008e7c beq type_poll ,end_of_packet 
+0fa3 c0010faf beq type_fhs ,transmit_fhs 
+0fa4 c0018fdd beq type_dm1 ,transmit_dm1 
+0fa5 c0020fe3 beq type_dh1 ,transmit_dh1 
+0fa6 c0040fe2 beq type_3dh1 ,transmit_3dh1 
+0fa7 d8400004 arg 4 ,temp 
+0fa8 2040130b call reserve_slot 
+0fa9 c0050fdf beq type_dm3 ,transmit_dm3 
+0faa c0058fe5 beq type_dh3 ,transmit_dh3 
+0fab d8400008 arg 8 ,temp 
+0fac 2040130b call reserve_slot 
+0fad c0078fe5 beq type_dh5 ,transmit_dh5 
+0fae 20200fdf branch transmit_dm5 
+
+transmit_fhs:
+0faf 44b9c00e bpatch patch0e_3 ,mem_patch0e 
+0fb0 6fe080e5 fetch 1 ,mem_fhs_am_addr 
+0fb1 1fe20800 icopy am_addr 
+0fb2 6fe0808d fetch 1 ,mem_fhs_misc 
+0fb3 1fe23800 icopy fhs_misc 
+0fb4 6fe1c0b2 fetch 3 ,mem_class 
+0fb5 1fe23a00 icopy fhs_class 
+0fb6 6fe140ac fetch 2 ,mem_nap 
+0fb7 1fe25c00 icopy nap 
+0fb8 7824fc00 enable enable_crc 
+0fb9 782e7c00 enable encode_fec2 
+0fba 1c022200 copy bt_adr ,rega 
+0fbb 20401134 call fetch_self_bt_adr 
+0fbc 782afc00 pulse recalc 
+0fbd 20000020 nop 32 
+0fbe 1c221600 copy bt_clk ,timeup 
+0fbf 6fe200b0 fetch 4 ,mem_clkn_bt 
+0fc0 1fe24200 icopy bt_clk 
+0fc1 53c07e00 preload fhs0 
+0fc2 79207e3a set1 58 ,pdata 
+0fc3 08008648 inject mod ,72 
+0fc4 53e07e00 preload fhs1 
+0fc5 08008648 inject mod ,72 
+0fc6 19624200 copy timeup ,bt_clk 
+0fc7 1a224000 copy rega ,bt_adr 
+0fc8 78247c00 enable enable_parity 
+0fc9 08008610 inject mod ,16 
+0fca 78447c00 disable enable_parity 
+0fcb 20200e7c branch end_of_packet 
+
+transmit_lmp_ccm:
+0fcc 78477c00 disable encrypt 
+0fcd 20200fd2 branch transmit_lmp_common 
+
+transmit_lmp:
+0fce 44ba400e bpatch patch0e_4 ,mem_patch0e 
+0fcf 20400ddd call check_enc_ccm 
+0fd0 243a0fcc nbranch transmit_lmp_ccm ,blank 
+0fd1 78277c00 enable encrypt 
+
+transmit_lmp_common:
+0fd2 7824fc00 enable enable_crc 
+0fd3 782e7c00 enable encode_fec2 
+0fd4 6fe0838a fetch 1 ,mem_lmo_header_length 
+0fd5 1fe105f8 and pdata ,0x1f8 ,temp 
+0fd6 d8c0038a arg mem_lmo_header_length ,contr 
+0fd7 18408408 increase 8 ,temp 
+0fd8 18497200 rshift3 temp ,loopcnt 
+
+transmit_lmp_loop:
+0fd9 efe08006 ifetch 1 ,contr 
+0fda 08008608 inject mod ,8 
+0fdb c2000fd9 loop transmit_lmp_loop 
+0fdc 2020100f branch transmit_end 
+
+transmit_dm1:
+0fdd 782e7c00 enable encode_fec2 
+0fde 20200fe8 branch transmit_dmh 
+
+transmit_dm3:
+
+transmit_dm5:
+0fdf 782e7c00 enable encode_fec2 
+0fe0 79200010 set1 mark_longpacket ,mark 
+0fe1 20200fe8 branch transmit_dmh 
+
+transmit_3dh1:
+0fe2 79202a02 set1 psk3m ,radio_ctrl 
+
+transmit_dh1:
+0fe3 782efc00 enable encode_fec0 
+0fe4 20200fe8 branch transmit_dmh 
+
+transmit_dh3:
+
+transmit_dh5:
+0fe5 79202a02 set1 psk3m ,radio_ctrl 
+0fe6 782efc00 enable encode_fec0 
+0fe7 79200010 set1 mark_longpacket ,mark 
+
+transmit_dmh:
+0fe8 44bac00e bpatch patch0e_5 ,mem_patch0e 
+0fe9 6fe0804c fetch 1 ,mem_state_map 
+0fea c3028ffd bbit0 smap_edr ,transmit_noedr 
+0feb 18267c03 sub type ,3 ,null 
+0fec 20210ffd branch transmit_noedr ,positive 
+0fed 78477c00 disable encrypt 
+0fee 784e7c00 disable encode_fec2 
+0fef 782efc00 enable encode_fec0 
+0ff0 7843fc00 disable enable_white 
+0ff1 79202a01 set1 psk ,radio_ctrl 
+0ff2 2aaffe02 isolate1 psk3m ,radio_ctrl 
+0ff3 20208ff7 branch transmit_edr3m ,true 
+0ff4 580abeee setarg 0xabeee 
+0ff5 08008614 inject mod ,20 
+0ff6 20200ffb branch transmit_edr_sync_end 
+
+transmit_edr3m:
+0ff7 585faeba setarg 0x5faeba 
+0ff8 08008618 inject mod ,24 
+0ff9 58000012 setarg 0x12 
+0ffa 08008606 inject mod ,6 
+
+transmit_edr_sync_end:
+0ffb 7823fc00 enable enable_white 
+0ffc 79200010 set1 mark_longpacket ,mark 
+
+transmit_noedr:
+0ffd 78277c00 enable encrypt 
+0ffe 7824fc00 enable enable_crc 
+0fff c502901d bmark1 mark_loopback ,transmit_loopback 
+1000 6fe0c1e5 fetch 1 ,mem_tx_lch 
+1001 08008603 inject mod ,3 
+1002 6fe141e6 fetch 2 ,mem_tx_len 
+1003 98007200 iforce loopcnt 
+1004 c5081007 bmark1 mark_longpacket ,transmit_long 
+1005 08008605 inject mod ,5 
+1006 20201008 branch transmit_stuff 
+
+transmit_long:
+1007 0800860d inject mod ,13 
+
+transmit_stuff:
+1008 1f227e00 deposit loopcnt 
+1009 203a100f branch transmit_end ,blank 
+100a 6fe100be fetch 2 ,mem_txptr 
+100b 98000c00 iforce contr 
+
+transmit_stuff_loop:
+100c efe08006 ifetch 1 ,contr 
+100d 08008608 inject mod ,8 
+100e c200100c loop transmit_stuff_loop 
+
+transmit_end:
+100f 44bb400e bpatch patch0e_6 ,mem_patch0e 
+1010 20400ddd call check_enc_ccm 
+1011 203a1014 branch transmit_end2 ,blank 
+1012 6fe2026f fetch 4 ,mem_le_mic 
+1013 08008620 inject mod ,32 
+
+transmit_end2:
+1014 78247c00 enable enable_parity 
+1015 08008610 inject mod ,16 
+1016 78447c00 disable enable_parity 
+1017 20400ce4 call set_wait_ack 
+1018 6fe0804c fetch 1 ,mem_state_map 
+1019 c3028e7c bbit0 smap_edr ,end_of_packet 
+101a 18007e00 force 0 ,pdata 
+101b 08008606 inject mod ,6 
+101c 20200e7c branch end_of_packet 
+
+transmit_loopback:
+101d 44bbc00e bpatch patch0e_7 ,mem_patch0e 
+101e c5081025 bmark1 mark_longpacket ,transmit_loopback_long 
+
+transmit_loopback_short:
+101f 6fe080e4 fetch 1 ,mem_lch_code 
+1020 08008603 inject mod ,3 
+1021 6fe080ae fetch 1 ,mem_len 
+1022 98002600 iforce regc 
+1023 08008605 inject mod ,5 
+1024 2020102a branch transmit_loopback_cont 
+
+transmit_loopback_long:
+1025 6fe080e4 fetch 1 ,mem_lch_code 
+1026 08008603 inject mod ,3 
+1027 6fe100ae fetch 2 ,mem_len 
+1028 98002600 iforce regc 
+1029 0800860d inject mod ,13 
+
+transmit_loopback_cont:
+102a d8c01000 arg mem_l2cap_rxbuff1 ,contr 
+
+transmit_loopback_loop:
+102b 1a627c00 copy regc ,null 
+102c 20229031 branch transmit_loopback_end ,zero 
+102d efe08006 ifetch 1 ,contr 
+102e 08008608 inject mod ,8 
+102f 1a60a7ff increase -1 ,regc 
+1030 2020102b branch transmit_loopback_loop 
+
+transmit_loopback_end:
+1031 6fe109fc fetch 2 ,mem_tst_pktcnt_dmh 
+1032 1fe0fe01 increase 1 ,pdata 
+1033 67e109fc store 2 ,mem_tst_pktcnt_dmh 
+1034 2020100f branch transmit_end 
+
+apply_switch_clke:
+1035 6fe200b4 fetch 4 ,mem_clke_bt 
+1036 1fe0a207 add pdata ,7 ,rega 
+1037 6fe100c0 fetch 2 ,mem_slot_offset 
+1038 243a103b nbranch apply_switch_nozero ,blank 
+1039 1a20a3fd increase -3 ,rega 
+103a 20201043 branch apply_switch_wait_loop 
+
+apply_switch_nozero:
+103b 1feffe0c mul32 pdata ,12 ,pdata 
+103c 68590040 fetcht 2 ,core_halfslot 
+103d 18408401 increase 1 ,temp 
+
+apply_switch_loop:
+103e 98467e00 isub temp ,pdata 
+103f 24211042 nbranch apply_switch_bt ,positive 
+1040 1a20a3ff increase -1 ,rega 
+1041 2020103e branch apply_switch_loop 
+
+apply_switch_bt:
+1042 1fe67e00 sub pdata ,0 ,pdata 
+
+apply_switch_wait_loop:
+1043 37d18200 until null ,oneslot 
+1044 2c400600 compare 0 ,clkn_bt ,3 
+1045 24209043 nbranch apply_switch_wait_loop ,true 
+1046 98005200 iforce clke_rt 
+1047 1a225000 copy rega ,clke_bt 
+1048 98005200 iforce clke_rt 
+1049 20600000 rtn 
+
+calc_slot_offset:
+104a 44bc400f bpatch patch0f_0 ,mem_patch0f 
+104b 37d10200 until null ,halfslot 
+104c 1b427e00 deposit clke 
+104d 98000c00 iforce contr 
+104e 1ff17e00 rshift16 ,pdata ,pdata 
+104f 9c467200 isub clkn_bt ,loopcnt 
+1050 1f217203 and_into 3 ,loopcnt 
+1051 24229054 nbranch calc_bt_portion ,zero 
+1052 18007e00 force 0 ,pdata 
+1053 20201058 branch calc_skip_bt 
+
+calc_bt_portion:
+1054 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+1055 18007e00 force 0 ,pdata 
+
+calc_slot_offset_loop:
+1056 9840fe00 iadd temp ,pdata 
+1057 c2001056 loop calc_slot_offset_loop 
+
+calc_skip_bt:
+1058 98c0fe00 iadd contr ,pdata 
+1059 1fe6fc0c div pdata ,12 
+105a 20407e61 call get_div_result 
+105b 67e100c0 store 2 ,mem_slot_offset 
+105c 20600000 rtn 
+
+calc_clke_offset:
+105d 44bcc00f bpatch patch0f_1 ,mem_patch0f 
+105e 1b427e00 deposit clke 
+105f 1b220400 copy clkn ,temp 
+1060 98467c00 isub temp ,null 
+1061 7d217e2c nsetflag positive ,44 ,pdata 
+1062 98460400 isub temp ,temp 
+1063 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+1064 284c000f isolate0 15 ,temp 
+1065 2020906b branch calc_clke_pos ,true 
+1066 18426000 copy temp ,alarm 
+1067 d8410000 arg 0x10000 ,temp 
+1068 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+1069 98467e00 isub temp ,pdata 
+106a 9e008400 iadd alarm ,temp 
+
+calc_clke_pos:
+106b 604b028f storet 6 ,mem_le_clk_offset 
+106c 207b0000 rtn le 
+106d 604b0038 storet 6 ,mem_clk_offset 
+106e 20600000 rtn 
+
+calc_clke:
+106f 78587c00 disable clknt 
+1070 6fe3028f fetch 6 ,mem_le_clk_offset 
+1071 203b1073 branch calc_clke2 ,le 
+1072 6fe30038 fetch 6 ,mem_clk_offset 
+
+calc_clke2:
+1073 9b20e000 iadd clkn ,alarm 
+1074 1e00e00a increase 10 ,alarm 
+1075 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+1076 9e067e00 isub alarm ,pdata 
+1077 2fec000f isolate0 15 ,pdata 
+1078 2020907f branch calc_clke_pos_adj ,true 
+1079 58010000 setarg 0x10000 
+107a 6b010163 fetchr regd ,2 ,mem_param_rt_rthalfslot 
+107b 9b067e00 isub regd ,pdata 
+107c 9e00e000 iadd alarm ,alarm 
+
+calc_clke_pos2:
+107d 1e023400 copy alarm ,clke 
+107e 20600000 rtn 
+
+calc_clke_pos_adj:
+107f 18007c00 force 0 ,null 
+1080 2020107d branch calc_clke_pos2 
+
+calc_mod_value_scale:
+1081 203b10a9 branch calc_mod_value_scale_le2 ,le 
+1082 58402c17 setarg 0x402c17 
+1083 67e189ee store 3 ,mem_scale_ratio 
+1084 19317e00 rshift16 access ,pdata 
+1085 1fe90400 rshift3 pdata ,temp 
+1086 df200030 arg 48 ,loopcnt 
+
+calc_mod_value_scale_do:
+1087 58000000 setarg 0 
+1088 67e189f1 store 3 ,mem_xcnt 
+
+calc_mod_vs_loop:
+1089 18437e00 rshift temp ,pdata 
+108a 9842fe00 ixor temp ,pdata 
+108b 1fe17e03 and_into 3 ,pdata 
+108c c300908e bbit0 1 ,calc_mod_vs01 
+108d 1fe0ffff pincrease -1 
+
+calc_mod_vs01:
+108e d8a009f1 arg mem_xcnt ,contw 
+108f 98a08a00 iadd contw ,contw 
+1090 efe08005 ifetch 1 ,contw 
+1091 1fe0fe01 pincrease 1 
+1092 e7e08005 istore 1 ,contw 
+1093 18430400 rshift temp ,temp 
+1094 c2001089 loop calc_mod_vs_loop 
+1095 da2009f3 arg mem_xcnt + 2 ,rega 
+1096 da4009ee arg mem_scale_ratio ,regb 
+1097 da600000 arg 0 ,regc 
+1098 df200003 arg 3 ,loopcnt 
+
+calc_mod_vs_loop2:
+1099 efe08011 ifetch 1 ,rega 
+109a e8408012 ifetcht 1 ,regb 
+109b 984ffe00 imul32 temp ,pdata 
+109c 9a60a600 iadd regc ,regc 
+109d 1a20a3ff increase -1 ,rega 
+109e 1a40a401 increase 1 ,regb 
+109f c2001099 loop calc_mod_vs_loop2 
+10a0 6fe089ef fetch 1 ,mem_scale_ratio + 1 
+10a1 1fed7e00 lshift8 pdata ,pdata 
+10a2 1ff27e00 lshift4 pdata ,pdata 
+10a3 9a66fc00 idiv regc 
+10a4 20407e64 call wait_div_end 
+10a5 1807fe00 quotient pdata 
+10a6 67f10938 store 2 ,mod_value_scale1 
+10a7 67e109f4 store 2 ,mem_scale_ratio_temp 
+10a8 20600000 rtn 
+
+calc_mod_value_scale_le2:
+10a9 6fe109f4 fetch 2 ,mem_scale_ratio_temp 
+10aa 67f10938 store 2 ,mod_value_scale1 
+10ab 20600000 rtn 
+
+calc_mod_value_scale_le:
+10ac 58402d19 setarg 0x402d19 
+10ad 67e189ee store 3 ,mem_scale_ratio 
+10ae 192f7e00 rshift32 access ,pdata 
+10af 1fe90400 rshift3 pdata ,temp 
+10b0 df200020 arg 32 ,loopcnt 
+10b1 20201087 branch calc_mod_value_scale_do 
+
+calc_radio_freq:
+10b2 44bd400f bpatch patch0f_2 ,mem_patch0f 
+10b3 2040115d call set_sync_on 
+10b4 1c227e00 copy bt_clk ,pdata 
+10b5 1fe17f80 and_into 0x180 ,pdata 
+10b6 2c800e03 compare 3 ,freq_mode ,0x07 
+10b7 242090bb nbranch freq_not_connection ,true 
+10b8 1fe97e00 rshift3 pdata ,pdata 
+10b9 9ae0fe00 iadd freq_index ,pdata 
+10ba 202010bc branch do_hop_mod_now 
+
+freq_not_connection:
+10bb 1ae27e00 copy freq_index ,pdata 
+
+do_hop_mod_now:
+10bc 1fe6fc4f div pdata ,79 
+10bd 782afc00 pulse recalc 
+10be 20407e64 call wait_div_end 
+10bf 18072200 remainder rega 
+10c0 1a2085d8 add rega ,-40 ,temp 
+10c1 202110c4 branch odd_half ,positive 
+10c2 1a238400 lshift rega ,temp 
+10c3 202010c6 branch freq_result 
+
+odd_half:
+10c4 18438400 lshift temp ,temp 
+10c5 18408401 increase 1 ,temp 
+
+freq_result:
+10c6 44bdc00f bpatch patch0f_3 ,mem_patch0f 
+10c7 6fe08031 fetch 1 ,mem_mode 
+10c8 c30190d7 bbit0 afh_change ,afh_process_con 
+
+afh_process_0:
+10c9 6fe240d9 fetch 4 ,mem_afh_instant 
+10ca 9c267c00 isub bt_clk ,null 
+10cb 202110d7 branch afh_process_con ,positive 
+10cc 204010f6 call afh_clear 
+10cd 6fe0c0e0 fetch 1 ,mem_afh_new_mod 
+10ce 207a0000 rtn blank 
+10cf 6fe08031 fetch 1 ,mem_mode 
+10d0 79207e02 set1 afh_enable ,pdata 
+10d1 67e08031 store 1 ,mem_mode 
+10d2 6fe2c0ee fetch 5 ,mem_afh_map_new 
+10d3 67e2c0e1 store 5 ,mem_afh_map_lo 
+10d4 efe28006 ifetch 5 ,contr 
+10d5 67e2c0e6 store 5 ,mem_afh_map_hi 
+10d6 204010fb call afh_process_freq_map 
+
+afh_process_con:
+10d7 6fe08031 fetch 1 ,mem_mode 
+10d8 c4010000 rtnbit0 afh_enable 
+10d9 2c2ffe01 isolate1 1 ,bt_clk 
+10da 202090f3 branch afh_same_channel ,true 
+10db 18492200 rshift3 temp ,rega 
+10dc 18410e07 and temp ,7 ,queue 
+10dd 580040e1 setarg mem_afh_map_lo 
+10de 9a20a200 iadd rega ,rega 
+10df efe08011 ifetch 1 ,rega 
+10e0 afec0000 qisolate0 pdata 
+10e1 202090e4 branch afh_process_1 ,true 
+10e2 18427e00 deposit temp 
+10e3 202010f0 branch afh_process_end 
+
+afh_process_1:
+10e4 6fe0c0eb fetch 1 ,mem_afh_used 
+10e5 98002400 iforce regb 
+10e6 1c227e00 deposit bt_clk 
+10e7 1fe17f80 and_into 0x180 ,pdata 
+10e8 1fe97e00 rshift3 pdata ,pdata 
+10e9 9ae0fe00 iadd freq_index ,pdata 
+10ea 9a46fc00 idiv regb 
+10eb 580040f9 setarg mem_afh_map 
+10ec 20407e64 call wait_div_end 
+10ed 18072200 remainder rega 
+10ee 9a208c00 iadd rega ,contr 
+10ef efe08006 ifetch 1 ,contr 
+
+afh_process_end:
+10f0 67e0c0ec store 1 ,mem_afh_index 
+10f1 98000400 iforce temp 
+10f2 20600000 rtn 
+
+afh_same_channel:
+10f3 6fe0c0ec fetch 1 ,mem_afh_index 
+10f4 98000400 iforce temp 
+10f5 20600000 rtn 
+
+afh_clear:
+10f6 6fe08031 fetch 1 ,mem_mode 
+10f7 793ffe02 set0 afh_enable ,pdata 
+10f8 793ffe03 set0 afh_change ,pdata 
+10f9 67e08031 store 1 ,mem_mode 
+10fa 20600000 rtn 
+
+afh_process_freq_map:
+10fb 44be400f bpatch patch0f_4 ,mem_patch0f 
+10fc d8a040f9 arg mem_afh_map ,contw 
+10fd 1800720a force 10 ,loopcnt 
+10fe 20407d8c call memset0 
+10ff d8a040f9 arg mem_afh_map ,contw 
+1100 18002600 force 0 ,regc 
+1101 18000e02 force 2 ,queue 
+
+process_freq_3:
+1102 6fe2c0e1 fetch 5 ,mem_afh_map_lo 
+1103 98000400 iforce temp 
+1104 28e1fe02 compare 2 ,queue ,0xff 
+1105 20209107 branch process_freq_1 ,true 
+1106 18430400 rshift temp ,temp 
+
+process_freq_1:
+1107 284c0000 isolate0 0 ,temp 
+1108 2020910b branch process_freq_0 ,true 
+1109 1a627e00 deposit regc 
+110a e7e08005 istore 1 ,contw 
+
+process_freq_0:
+110b 184b0400 rshift2 temp ,temp 
+110c 1a60a602 increase 2 ,regc 
+110d 2a61fc28 compare 40 ,regc ,0xfe 
+110e 24209114 nbranch process_freq_2 ,true 
+110f 6fe2c0e6 fetch 5 ,mem_afh_map_hi 
+1110 98000400 iforce temp 
+1111 28e1fe02 compare 2 ,queue ,0xff 
+1112 20209114 branch process_freq_2 ,true 
+1113 18430400 rshift temp ,temp 
+
+process_freq_2:
+1114 1a667c4e sub regc ,78 ,null 
+1115 20211107 branch process_freq_1 ,positive 
+1116 18002601 force 1 ,regc 
+1117 18e08fff increase -1 ,queue 
+1118 24229102 nbranch process_freq_3 ,zero 
+1119 da2040f9 arg mem_afh_map ,rega 
+111a 18a27e00 deposit contw 
+111b 9a267e00 isub rega ,pdata 
+111c 67e0c0eb store 1 ,mem_afh_used 
+111d 20600000 rtn 
+
+rx_radio_freq:
+111e 44bec00f bpatch patch0f_5 ,mem_patch0f 
+111f 204010b2 call calc_radio_freq 
+1120 6fe080e3 fetch 1 ,mem_debug_config 
+1121 c3029123 bbit0 debug_rx_fixed_freq ,rx_radio_freq_now 
+1122 684883a0 fetcht 1 ,mem_rx_fixed_freq 
+
+rx_radio_freq_now:
+1123 2020118b branch set_freq_rx 
+
+tx_radio_freq:
+1124 44bf400f bpatch patch0f_6 ,mem_patch0f 
+1125 204010b2 call calc_radio_freq 
+1126 6fe080e3 fetch 1 ,mem_debug_config 
+1127 c3021129 bbit0 debug_tx_fixed_freq ,tx_radio_freq_now 
+1128 6848839f fetcht 1 ,mem_tx_fixed_freq 
+
+tx_radio_freq_now:
+1129 20201201 branch set_freq_tx 
+
+fetch_giac:
+112a 18005a00 force 0 ,uap 
+112b 6fe1c0af fetch 3 ,mem_glap 
+112c 98005800 iforce lap 
+112d 20600000 rtn 
+
+fetch_page_bt_adr:
+112e 44bfc00f bpatch patch0f_7 ,mem_patch0f 
+112f 6fe0c1e0 fetch 1 ,mem_hci_puap 
+1130 1fe25a00 icopy uap 
+1131 6fe1c1dd fetch 3 ,mem_hci_plap 
+1132 1fe25800 icopy lap 
+1133 20600000 rtn 
+
+fetch_self_bt_adr:
+1134 44c04010 bpatch patch10_0 ,mem_patch10 
+1135 6fe140ac fetch 2 ,mem_nap 
+1136 1fe25c00 icopy nap 
+1137 6fe0c0ab fetch 1 ,mem_uap 
+1138 1fe25a00 icopy uap 
+1139 6fe1c0a8 fetch 3 ,mem_lap 
+113a 1fe25800 icopy lap 
+113b 20600000 rtn 
+
+fetch_extm_bt_adr:
+113c 44c0c010 bpatch patch10_1 ,mem_patch10 
+113d 6fe10044 fetch 2 ,mem_pnap 
+113e 1fe25c00 icopy nap 
+113f 6fe08043 fetch 1 ,mem_puap 
+1140 1fe25a00 icopy uap 
+1141 6fe18040 fetch 3 ,mem_plap 
+1142 1fe25800 icopy lap 
+1143 20600000 rtn 
+
+fetch_diac:
+1144 c5101147 bmark1 mark_all_diac ,fetch_diac_do 
+1145 c68e8000 rtnmark0 mark_inquiry_state 
+1146 c68f8000 rtnmark0 mark_periodical_diac 
+
+fetch_diac_do:
+1147 1d815900 and_into -256 ,lap 
+1148 782afc00 pulse recalc 
+1149 20000020 nop 32 
+114a 20600000 rtn 
+
+shutdown_radio:
+114b 44c14010 bpatch patch10_2 ,mem_patch10 
+114c 20404d0b call rf_debug_shutdown_radio_line 
+114d 18002a08 force 0x08 ,radio_ctrl 
+114e 18002a00 force 0 ,radio_ctrl 
+114f 7850fc00 disable is_rx 
+1150 78507c00 disable is_tx 
+1151 782f7c00 pulse packet_end 
+1152 70890005 jam 0x5 ,modem_en 
+1153 20000002 nop 2 
+1154 70890000 jam 0x0 ,modem_en 
+1155 2040115d call set_sync_on 
+1156 708a1600 jam 0 ,core_syn_en 
+1157 708a0a10 jam 0x10 ,core_rf_ldo_en0 
+1158 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+1159 793ffe07 set0 7 ,pdata 
+115a 67f08a09 store 1 ,core_clkpll_cfg6 
+115b 708a0b00 jam 0 ,core_rf_ldo_en1 
+115c 2020129e branch gain_control 
+
+set_sync_on:
+115d 44c1c010 bpatch patch10_3 ,mem_patch10 
+115e 70890005 jam 0x5 ,modem_en 
+115f 20000002 nop 2 
+1160 70890000 jam 0x0 ,modem_en 
+1161 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+1162 c00c1164 beq xtal_24m ,set_sync_on_24m 
+1163 c0041179 beq xtal_16m ,set_sync_on_16m 
+
+set_sync_on_24m:
+1164 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+1165 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+1166 708a1215 jam 0x15 ,core_rf_ldo_cfg6 
+1167 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+1168 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+1169 79207e07 set1 7 ,pdata 
+116a 67f08a09 store 1 ,core_clkpll_cfg6 
+116b 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+116c 2000003c nop 60 
+116d 708a167a jam 0x7a ,core_syn_en 
+116e 708a1700 jam 0 ,core_rx_en0 
+116f 708a1800 jam 0 ,core_rx_en1 
+1170 708a1900 jam 0 ,core_tx_en0 
+1171 708a1a00 jam 0 ,core_tx_en1 
+1172 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+1173 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+
+set_sync_on_next:
+1174 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+1175 793ffe07 set0 7 ,pdata 
+1176 67f08a09 store 1 ,core_clkpll_cfg6 
+1177 708a4300 jam 0 ,core_syn_cal_ctrl 
+1178 20600000 rtn 
+
+set_sync_on_16m:
+1179 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+117a 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+117b 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+117c 708a1215 jam 0x15 ,core_rf_ldo_cfg6 
+117d 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+117e 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+117f 79207e07 set1 7 ,pdata 
+1180 67f08a09 store 1 ,core_clkpll_cfg6 
+1181 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+1182 2000003c nop 60 
+1183 708a163a jam 0x3a ,core_syn_en 
+1184 708a1700 jam 0 ,core_rx_en0 
+1185 708a1800 jam 0 ,core_rx_en1 
+1186 708a1900 jam 0 ,core_tx_en0 
+1187 708a1a00 jam 0 ,core_tx_en1 
+1188 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+1189 708a0a38 jam 0x38 ,core_rf_ldo_en0 
+118a 20201174 branch set_sync_on_next 
+
+set_freq_rx:
+118b 44c24010 bpatch patch10_4 ,mem_patch10 
+118c 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+118d 1fe67c18 sub pdata ,xtal_24m ,null 
+118e 20429196 call rf_rx_write_freq_24m ,zero 
+118f 2442919c ncall rf_rx_write_freq_16m ,zero 
+1190 60488017 storet 1 ,mem_last_freq 
+1191 1840fe00 add temp ,0 ,pdata 
+1192 c5169194 bmark1 mark_ble_2m ,set_rxfreq_2m_offset 
+1193 1840fe01 add temp ,1 ,pdata 
+
+set_rxfreq_2m_offset:
+1194 204011c1 call rf_rx_write_freq 
+1195 20201081 branch calc_mod_value_scale 
+
+rf_rx_write_freq_24m:
+1196 708a4300 jam 0 ,core_syn_cal_ctrl 
+1197 708a3d04 jam 0x04 ,core_syn_top_ctrl 
+1198 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+1199 708a8403 jam 0x03 ,core_syn_cp_lpf_cfg 
+119a 708a8940 jam 0x40 ,core_syn_afc_cfg3 
+119b 20600000 rtn 
+
+rf_rx_write_freq_16m:
+119c 708a4330 jam 0x30 ,core_syn_cal_ctrl 
+119d 708a3d06 jam 0x06 ,core_syn_top_ctrl 
+119e 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+119f 708a8420 jam 0x20 ,core_syn_cp_lpf_cfg 
+11a0 708a8915 jam 0x15 ,core_syn_afc_cfg3 
+11a1 20600000 rtn 
+
+rf_rx_enable:
+11a2 44c2c010 bpatch patch10_5 ,mem_patch10 
+11a3 20404d05 call rf_debug_rx_gpio_high 
+11a4 6fe0c1ea fetch 1 ,mem_gain_fix 
+11a5 c07f91ab beq 0xff ,rf_rx_enable_no_soft_agc 
+11a6 d8c041eb arg mem_gain_table ,contr 
+11a7 98c08c00 iadd contr ,contr 
+11a8 efe08006 ifetch 1 ,contr 
+11a9 67f08961 store 1 ,core_rf_rx_gain_fix 
+11aa 70896027 jam 0x27 ,core_rf_rx_agc_ctrl 
+
+rf_rx_enable_no_soft_agc:
+11ab 6848c1ee fetcht 1 ,mem_gain_second_agc_en 
+11ac 6ff08960 fetch 1 ,core_rf_rx_agc_ctrl 
+11ad 9841fe00 ior temp ,pdata 
+11ae 67f08960 store 1 ,core_rf_rx_agc_ctrl 
+
+rf_rx_enable_no_soft_agc_next:
+11af 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+11b0 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+11b1 708a1213 jam 0x13 ,core_rf_ldo_cfg6 
+11b2 708a0a7f jam 0x7f ,core_rf_ldo_en0 
+11b3 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+11b4 793ffe07 set0 7 ,pdata 
+11b5 67f08a09 store 1 ,core_clkpll_cfg6 
+11b6 2000003c nop 60 
+11b7 708a171f jam 0x1f ,core_rx_en0 
+11b8 708a18f8 jam 0xf8 ,core_rx_en1 
+11b9 708a1918 jam 0x18 ,core_tx_en0 
+11ba 708a1000 jam 0x00 ,core_rf_ldo_cfg4 
+11bb 708a1120 jam 0x20 ,core_rf_ldo_cfg5 
+11bc 2000000a nop 10 
+11bd 70890004 jam 0x04 ,modem_en 
+11be 20000002 nop 2 
+11bf 7089000c jam 0x0c ,modem_en 
+11c0 20600000 rtn 
+
+rf_rx_write_freq:
+11c1 44c34010 bpatch patch10_6 ,mem_patch10 
+11c2 d8c00960 arg 2400 ,contr 
+11c3 98c0fe00 iadd contr ,pdata 
+11c4 6848c0c5 fetcht 1 ,mem_fcomp_div 
+11c5 202011d0 branch rf_write_freq_calc 
+
+rf_tx_write_freq:
+11c6 44c3c010 bpatch patch10_7 ,mem_patch10 
+11c7 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+11c8 1fe67c18 sub pdata ,xtal_24m ,null 
+11c9 204291f3 call rf_tx_write_freq_24m ,zero 
+11ca 244291fa ncall rf_tx_write_freq_16m ,zero 
+11cb 58000960 setarg 2400 
+11cc 9a20fe00 iadd rega ,pdata 
+11cd 1fe3fe00 lshift pdata ,pdata 
+11ce 6848c0c5 fetcht 1 ,mem_fcomp_div 
+11cf 184f8403 mul32 temp ,0x03 ,temp 
+
+rf_write_freq_calc:
+11d0 18438400 lshift temp ,temp 
+11d1 9846fc00 idiv temp 
+11d2 20407e64 call wait_div_end 
+11d3 1807fe00 quotient pdata 
+11d4 67f08a3f store 1 ,core_syn_divr_int 
+11d5 18077e00 remainder pdata 
+11d6 1ff07e00 lshift16 pdata ,pdata 
+11d7 1fed7e00 lshift8 pdata ,pdata 
+11d8 9846fc00 idiv temp 
+11d9 20407e64 call wait_div_end 
+11da 1807fe00 quotient pdata 
+11db 67f08a42 store 1 ,core_syn_divr_int + 3 
+11dc 1fecfe00 rshift8 pdata ,pdata 
+11dd 67f08a41 store 1 ,core_syn_divr_int + 2 
+11de 1fecfe00 rshift8 pdata ,pdata 
+11df 67f08a40 store 1 ,core_syn_divr_int + 1 
+11e0 68588a43 fetcht 1 ,core_syn_cal_ctrl 
+11e1 184104f0 and_into 0xf0 ,temp 
+11e2 60588a43 storet 1 ,core_syn_cal_ctrl 
+11e3 2000000c nop 12 
+11e4 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+11e5 c00c11e7 beq xtal_24m ,rf_write_freq_calc_24m 
+11e6 c00411ed beq xtal_16m ,rf_write_freq_calc_16m 
+
+rf_write_freq_calc_24m:
+11e7 1841840c or_into 0x0c ,temp 
+11e8 60588a43 storet 1 ,core_syn_cal_ctrl 
+11e9 2000000c nop 12 
+11ea 18418403 or_into 0x03 ,temp 
+11eb 60588a43 storet 1 ,core_syn_cal_ctrl 
+11ec 20600000 rtn 
+
+rf_write_freq_calc_16m:
+11ed 1841843c or_into 0x3c ,temp 
+11ee 60588a43 storet 1 ,core_syn_cal_ctrl 
+11ef 2000000c nop 12 
+11f0 18418433 or_into 0x33 ,temp 
+11f1 60588a43 storet 1 ,core_syn_cal_ctrl 
+11f2 20600000 rtn 
+
+rf_tx_write_freq_24m:
+11f3 708a4300 jam 0 ,core_syn_cal_ctrl 
+11f4 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+11f5 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+11f6 708a8403 jam 0x03 ,core_syn_cp_lpf_cfg 
+11f7 708a8ba6 jam 0xa6 ,core_syn_aac_cfg1 
+11f8 708a8940 jam 0x40 ,core_syn_afc_cfg3 
+11f9 20600000 rtn 
+
+rf_tx_write_freq_16m:
+11fa 708a4330 jam 0x30 ,core_syn_cal_ctrl 
+11fb 708a3d15 jam 0x15 ,core_syn_top_ctrl 
+11fc 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+11fd 708a8420 jam 0x20 ,core_syn_cp_lpf_cfg 
+11fe 708a8ba6 jam 0xa6 ,core_syn_aac_cfg1 
+11ff 708a8915 jam 0x15 ,core_syn_afc_cfg3 
+1200 20600000 rtn 
+
+set_freq_tx:
+1201 44c44011 bpatch patch11_0 ,mem_patch11 
+1202 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+1203 60488017 storet 1 ,mem_last_freq 
+1204 1840a202 add temp ,2 ,rega 
+1205 204011c6 call rf_tx_write_freq 
+1206 200003c0 nop 0x3c0 
+
+txon:
+1207 44c4c011 bpatch patch11_1 ,mem_patch11 
+1208 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+1209 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+120a 708a1210 jam 0x10 ,core_rf_ldo_cfg6 
+120b 708a0a7f jam 0x7f ,core_rf_ldo_en0 
+120c 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+120d 793ffe07 set0 7 ,pdata 
+120e 67f08a09 store 1 ,core_clkpll_cfg6 
+120f 708a0b07 jam 0x07 ,core_rf_ldo_en1 
+1210 2000003c nop 60 
+1211 708a190d jam 0x0d ,core_tx_en0 
+1212 708a1af9 jam 0xf9 ,core_tx_en1 
+1213 708a1000 jam 0x00 ,core_rf_ldo_cfg4 
+1214 708a1120 jam 0x20 ,core_rf_ldo_cfg5 
+1215 2000000a nop 10 
+1216 70890001 jam 0x01 ,modem_en 
+1217 20000002 nop 2 
+1218 70890003 jam 0x03 ,modem_en 
+
+txon_next:
+1219 44c54011 bpatch patch11_2 ,mem_patch11 
+121a 6fe0c1e8 fetch 1 ,mem_tx_power 
+121b c0019229 beq tx_power_3db ,set_tx_power_3db 
+121c c002922e beq tx_power_5db ,set_tx_power_5db 
+121d c0031231 beq tx_power_6db ,set_tx_power_6db 
+121e c0039234 beq tx_power_7db ,set_tx_power_7db 
+121f c0051237 beq tx_power_10db ,set_tx_power_10db 
+1220 c041923a beq tx_power_f3db ,set_tx_power_f3db 
+1221 c042923d beq tx_power_f5db ,set_tx_power_f5db 
+1222 c04a1240 beq tx_power_f20db ,set_tx_power_f20db 
+1223 c04f1243 beq tx_power_f30db ,set_tx_power_f30db 
+
+set_tx_power_0db:
+1224 708a396a jam 0x6a ,core_tx_pwr_ctrl0 
+1225 708a3a07 jam 0x07 ,core_tx_pwr_ctrl1 
+
+set_rf_ldo_cfg89:
+1226 708a14a3 jam 0xa3 ,core_rf_ldo_cfg8 
+1227 708a1507 jam 0x07 ,core_rf_ldo_cfg9 
+1228 20600000 rtn 
+
+set_tx_power_3db:
+1229 708a3966 jam 0x66 ,core_tx_pwr_ctrl0 
+122a 708a3a0b jam 0x0b ,core_tx_pwr_ctrl1 
+
+set_rf_ldo_cfg89_2:
+122b 708a14aa jam 0xaa ,core_rf_ldo_cfg8 
+122c 708a150a jam 0x0a ,core_rf_ldo_cfg9 
+122d 20600000 rtn 
+
+set_tx_power_5db:
+122e 708a396c jam 0x6c ,core_tx_pwr_ctrl0 
+122f 708a3a0d jam 0x0d ,core_tx_pwr_ctrl1 
+1230 2020122b branch set_rf_ldo_cfg89_2 
+
+set_tx_power_6db:
+1231 708a396b jam 0x6b ,core_tx_pwr_ctrl0 
+1232 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+1233 2020122b branch set_rf_ldo_cfg89_2 
+
+set_tx_power_7db:
+1234 708a39a7 jam 0xa7 ,core_tx_pwr_ctrl0 
+1235 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+1236 2020122b branch set_rf_ldo_cfg89_2 
+
+set_tx_power_10db:
+1237 708a39b6 jam 0xb6 ,core_tx_pwr_ctrl0 
+1238 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+1239 2020122b branch set_rf_ldo_cfg89_2 
+
+set_tx_power_f3db:
+123a 708a3968 jam 0x68 ,core_tx_pwr_ctrl0 
+123b 708a3a05 jam 0x05 ,core_tx_pwr_ctrl1 
+123c 20201226 branch set_rf_ldo_cfg89 
+
+set_tx_power_f5db:
+123d 708a3960 jam 0x60 ,core_tx_pwr_ctrl0 
+123e 708a3a05 jam 0x05 ,core_tx_pwr_ctrl1 
+123f 20201226 branch set_rf_ldo_cfg89 
+
+set_tx_power_f20db:
+1240 708a3953 jam 0x53 ,core_tx_pwr_ctrl0 
+1241 708a3a01 jam 0x01 ,core_tx_pwr_ctrl1 
+1242 20201226 branch set_rf_ldo_cfg89 
+
+set_tx_power_f30db:
+1243 708a394c jam 0x4c ,core_tx_pwr_ctrl0 
+1244 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
+1245 20201226 branch set_rf_ldo_cfg89 
+
+initialize_radio:
+1246 70804206 jam clksel_rc ,core_clksel 
+
+initialize_radio_wait:
+1247 6fe140ca fetch 2 ,mem_rf_init_ptr 
+1248 c3071247 bbit0 14 ,initialize_radio_wait 
+1249 98000c00 iforce contr 
+124a d8408a00 arg 0x8a00 ,temp 
+
+initialize_radio_loop:
+124b efe08006 ifetch 1 ,contr 
+124c c07f9251 beq 0xff ,initialize_radio_cont 
+124d 98418a00 ior temp ,contw 
+124e efe08006 ifetch 1 ,contr 
+124f e7e08005 istore 1 ,contw 
+1250 2020124b branch initialize_radio_loop 
+
+initialize_radio_cont:
+1251 44c5c011 bpatch patch11_3 ,mem_patch11 
+1252 708a0305 jam 0x05 ,core_clkpll_cfg0 
+1253 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+1254 20401279 call initialize_rc_cal 
+1255 20401273 call initialize_rf_ldo_cfg1 
+1256 2040126c call initialize_syn_afc_cfg1 
+1257 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+1258 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+1259 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+125a 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+125b 70896876 jam 0x76 ,core_agc_wb_sat_th 
+125c 70896976 jam 0x76 ,core_agc_nb_sat_th 
+125d 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+125e c0841260 bne xtal_16m ,initialize_radio_cont_next 
+125f 708a0834 jam 0x34 ,core_clkpll_cfg5 
+
+initialize_radio_cont_next:
+1260 708a01ff jam 0xff ,core_clkpll_ctrl1 
+1261 20000064 nop 100 
+1262 708a020e jam 0x0e ,core_clkpll_ctrl2 
+1263 708a0003 jam 0x03 ,core_clkpll_ctrl0 
+1264 20401224 call set_tx_power_0db 
+1265 708a9a2b jam 0x2b ,core_tx_mixer_cfg1 
+1266 708a9b13 jam 0x13 ,core_tx_mixer_cfg2 
+1267 204012d3 call init_lpm_ctrl 
+1268 2000000a nop 10 
+1269 70804205 jam clksel_dpll ,core_clksel 
+126a 7041f00c jam system_clk_12m ,mem_system_clk 
+126b 2020165e branch le_disable 
+
+initialize_syn_afc_cfg1:
+126c 6fe0c4d3 fetch 1 ,mem_syn_afc_cfg1 
+126d 203a1271 branch initialize_syn_afc_cfg1_default ,blank 
+126e 1fe1fe20 or_into 0x20 ,pdata 
+126f 67f08a87 store 1 ,core_syn_afc_cfg1 
+1270 20600000 rtn 
+
+initialize_syn_afc_cfg1_default:
+1271 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+1272 20600000 rtn 
+
+initialize_rf_ldo_cfg1:
+1273 6fe0c4d4 fetch 1 ,mem_rf_ldo_cfg1 
+1274 203a1277 branch initialize_rf_ldo_cfg1_default ,blank 
+1275 67f08a0d store 1 ,core_rf_ldo_cfg1 
+1276 20600000 rtn 
+
+initialize_rf_ldo_cfg1_default:
+1277 708a0d00 jam 0x00 ,core_rf_ldo_cfg1 
+1278 20600000 rtn 
+
+initialize_rc_cal:
+1279 6fe0c4d5 fetch 1 ,mem_rc_cal 
+127a 203a127d branch initialize_rc_cal_default ,blank 
+127b 67f08a6c store 1 ,core_rx_bq_bw_cal 
+127c 20600000 rtn 
+
+initialize_rc_cal_default:
+127d 708a6cd3 jam 0xd3 ,core_rx_bq_bw_cal 
+127e 20600000 rtn 
+
+save_rssi:
+127f 44c64011 bpatch patch11_4 ,mem_patch11 
+1280 70015420 jam 0x20 ,mem_rssi_hex 
+1281 6ff089a0 fetch 1 ,modem_rssi 
+1282 67e0c1e9 store 1 ,mem_modem_rssi 
+1283 1fe67cfc sub pdata ,0xfc ,null 
+1284 24610000 nrtn positive 
+1285 1fe67c7f sub pdata ,0x7f ,null 
+1286 20610000 rtn positive 
+1287 6ff089a3 fetch 1 ,modem_gain 
+1288 1fe1040f and pdata ,0x0f ,temp 
+1289 18438400 lshift temp ,temp 
+128a 1ff1fe00 rshift4 pdata ,pdata 
+128b 98408400 iadd temp ,temp 
+128c 184f8403 mul32 temp ,3 ,temp 
+128d 6fe0c1e9 fetch 1 ,mem_modem_rssi 
+128e 1fe67eff sub pdata ,0xff ,pdata 
+128f 9840fe00 iadd temp ,pdata 
+1290 1fe0fffb increase -5 ,pdata 
+1291 67e08154 store 1 ,mem_rssi_hex 
+1292 20600000 rtn 
+
+rssi_hex2dec:
+1293 6fe08154 fetch 1 ,mem_rssi_hex 
+1294 20401297 call bcd 
+1295 67e08018 store 1 ,mem_rssi 
+1296 20600000 rtn 
+
+bcd:
+1297 1fe17eff and_into 0xff ,pdata 
+1298 1fe6fc0a div pdata ,10 
+1299 20407e61 call get_div_result 
+129a 1ff27e00 lshift4 pdata ,pdata 
+129b 18070400 remainder temp 
+129c 9841fe00 ior temp ,pdata 
+129d 20600000 rtn 
+
+gain_control:
+129e 6fe0c1ea fetch 1 ,mem_gain_fix 
+129f c17f8000 rtneq 0xff 
+12a0 242c12c4 nbranch gain_increase ,sync 
+12a1 6fe0c1e9 fetch 1 ,mem_modem_rssi 
+12a2 1fe67cf0 sub pdata ,0xf0 ,null 
+12a3 242112c8 nbranch gain_descend ,positive 
+12a4 1fe67c7f sub pdata ,0x7f ,null 
+12a5 202112c8 branch gain_descend ,positive 
+12a6 6a308961 fetchr rega ,1 ,core_rf_rx_gain_fix 
+12a7 6fe0c1ea fetch 1 ,mem_gain_fix 
+12a8 c1000000 rtneq 0 
+12a9 d8c041eb arg mem_gain_table ,contr 
+12aa 98c08c00 iadd contr ,contr 
+12ab efe08006 ifetch 1 ,contr 
+12ac 9a267c00 isub rega ,null 
+12ad 24628000 nrtn zero 
+12ae 18c08dfe increase -2 ,contr 
+12af e8408006 ifetcht 1 ,contr 
+12b0 1851fe00 rshift4 temp ,pdata 
+12b1 1a31a400 rshift4 rega ,regb 
+12b2 9a462400 isub regb ,regb 
+12b3 18417e0f and temp ,0xf ,pdata 
+12b4 1a21220f and rega ,0xf ,rega 
+12b5 9a262200 isub rega ,rega 
+12b6 1a23fe00 lshift rega ,pdata 
+12b7 9a40a400 iadd regb ,regb 
+12b8 1a4fa403 mul32 regb ,3 ,regb 
+12b9 6848c1e9 fetcht 1 ,mem_modem_rssi 
+12ba 18417e80 and temp ,0x80 ,pdata 
+12bb 207a0000 rtn blank 
+
+add_negative:
+12bc 58000100 setarg 0x100 
+12bd 98460400 isub temp ,temp 
+12be 1a427e00 copy regb ,pdata 
+12bf 98467e00 isub temp ,pdata 
+12c0 20610000 rtn positive 
+12c1 1fe17eff and pdata ,0xff ,pdata 
+12c2 c17f8000 rtneq 0xff 
+12c3 c17f0000 rtneq 0xfe 
+
+gain_increase:
+12c4 6fe0c1ea fetch 1 ,mem_gain_fix 
+12c5 c00092cd beq 1 ,set_rx_gain0 
+12c6 c00112cf beq 2 ,set_rx_gain1 
+12c7 202012cd branch set_rx_gain0 
+
+gain_descend:
+12c8 6fe0c1ea fetch 1 ,mem_gain_fix 
+12c9 c00012cf beq 0 ,set_rx_gain1 
+12ca c00092cb beq 1 ,set_rx_gain2 
+
+set_rx_gain2:
+12cb 7041ea02 jam 2 ,mem_gain_fix 
+12cc 20600000 rtn 
+
+set_rx_gain0:
+12cd 7041ea00 jam 0 ,mem_gain_fix 
+12ce 20600000 rtn 
+
+set_rx_gain1:
+12cf 7041ea01 jam 1 ,mem_gain_fix 
+12d0 20600000 rtn 
+
+xtal_fast_wake:
+12d1 58000f0f setarg 0xf0f 
+12d2 20201543 branch lpm_write_config 
+
+init_lpm_ctrl:
+12d3 5800080f setarg 0x80f 
+12d4 20201543 branch lpm_write_config 
+
+start_receiver:
+12d5 44c6c011 bpatch patch11_5 ,mem_patch11 
+12d6 78507c00 disable is_tx 
+12d7 7830fc00 enable is_rx 
+12d8 782b7c00 pulse init_encrypt 
+12d9 202011a2 branch rf_rx_enable 
+
+prep_crypt:
+12da 44c74011 bpatch patch11_6 ,mem_patch11 
+12db 20400ddd call check_enc_ccm 
+12dc 243a12ea nbranch prep_crypt_ccm ,blank 
+12dd 6fe0804c fetch 1 ,mem_state_map 
+12de 2feffe02 isolate1 smap_encryption ,pdata 
+12df 7920fe00 setflag true ,0 ,pdata 
+12e0 67f08011 store 1 ,core_encrypt 
+12e1 d8c00062 arg mem_kc ,contr 
+12e2 efe48006 ifetch 9 ,contr 
+12e3 98006400 iforce kc_ls 
+12e4 efe38006 ifetch 7 ,contr 
+12e5 98006600 iforce kc_ms 
+12e6 6fe08054 fetch 1 ,mem_key_size 
+12e7 1fe0e9ff add pdata ,-1 ,g1l 
+12e8 782d7c00 pulse kc_p_activate 
+12e9 20600000 rtn 
+
+prep_crypt_ccm:
+12ea 70801100 jam 0 ,core_encrypt 
+12eb 20600000 rtn 
+
+wait_access_end:
+12ec 1b427e00 deposit clke 
+12ed 67e30097 store 6 ,mem_sync_clke 
+12ee 7846fc00 disable decode_fec0 
+12ef 242c114b nbranch shutdown_radio ,sync 
+12f0 6fe1015b fetch 2 ,mem_param_clke_cal 
+12f1 1fe25200 copy pdata ,clke_rt 
+12f2 1d00d001 increase 1 ,clke_bt 
+12f3 1d0151fc and_into 0x1fc ,clke_bt 
+12f4 20600000 rtn 
+
+wait_access_mhalfbnd:
+12f5 7826fc00 enable decode_fec0 
+
+wait_access_mhalfbnd_correlate:
+12f6 37cb8400 correlate null ,mhalfbnd 
+12f7 202c12ec branch wait_access_end ,sync 
+12f8 2d000402 compare 0x02 ,clke_bt ,0x02 
+12f9 242092f6 nbranch wait_access_mhalfbnd_correlate ,true 
+12fa 202012ec branch wait_access_end 
+
+wait_access_clkn_rt:
+12fb 44c7c011 bpatch patch11_7 ,mem_patch11 
+12fc 69610159 fetchr timeup ,2 ,mem_param_conn_access 
+12fd 7826fc00 enable decode_fec0 
+12fe 34730400 correlate clkn_rt ,meet 
+12ff 7846fc00 disable decode_fec0 
+1300 242c114b nbranch shutdown_radio ,sync 
+1301 20600000 rtn 
+
+wait_access_forever:
+1302 44c84012 bpatch patch12_0 ,mem_patch12 
+1303 7826fc00 enable decode_fec0 
+1304 37c18400 correlate null ,timeout 
+1305 7846fc00 disable decode_fec0 
+1306 242c114b nbranch shutdown_radio ,sync 
+1307 6fe1015b fetch 2 ,mem_param_clke_cal 
+1308 1fe25200 copy pdata ,clke_rt 
+1309 1d0151fc and_into 0x1fc ,clke_bt 
+130a 20600000 rtn 
+
+reserve_slot:
+130b 44c8c012 bpatch patch12_1 ,mem_patch12 
+130c 98002200 iforce rega 
+130d 1c227e00 deposit bt_clk 
+130e 98409600 iadd temp ,timeup 
+130f 19627e00 copy timeup ,pdata 
+1310 67e240d1 store 4 ,mem_next_btclk 
+1311 1a227e00 deposit rega 
+1312 20600000 rtn 
+
+ahead_window:
+1313 1fe20400 copy pdata ,temp 
+1314 44c94012 bpatch patch12_2 ,mem_patch12 
+1315 18427e00 copy temp ,pdata 
+1316 20407e26 call clk2bt 
+1317 1c307e00 lshift16 bt_clk ,pdata 
+1318 79207e2c set1 44 ,pdata 
+1319 20407e0c call clk_diff 
+131a 793ffe2c set0 44 ,pdata 
+131b 20401367 call get_clk 
+131c 20407e0c call clk_diff 
+131d 20740000 rtn user 
+131e 20407e19 call clk2rt 
+131f 98003600 iforce stop_watch 
+1320 37c18200 until null ,timeout 
+1321 20600000 rtn 
+
+setup_clk:
+1322 44c9c012 bpatch patch12_3 ,mem_patch12 
+1323 20381327 branch setup_clkn ,clknt 
+1324 35330200 until clke_rt ,meet 
+
+skip_setup_clke:
+1325 1d020400 copy clke_bt ,temp 
+1326 2020132a branch setup_clknbt 
+
+setup_clkn:
+1327 20371329 branch skip_setup_clkn ,attempt 
+1328 34730200 until clkn_rt ,meet 
+
+skip_setup_clkn:
+1329 1c420400 copy clkn_bt ,temp 
+
+setup_clknbt:
+132a 20341336 branch setup_clk11 ,user 
+132b 28400601 compare 1 ,temp ,3 
+132c 24209322 nbranch setup_clk ,true 
+
+setup_complete:
+132d 44ca4012 bpatch patch12_4 ,mem_patch12 
+132e 6fe08030 fetch 1 ,mem_state 
+132f c4000000 rtnbit0 state_inconn 
+1330 6fe240d1 fetch 4 ,mem_next_btclk 
+1331 98467e00 isub temp ,pdata 
+1332 24610000 nrtn positive 
+1333 1fe67cff sub pdata ,0xff ,null 
+1334 20211322 branch setup_clk ,positive 
+1335 20600000 rtn 
+
+setup_clk11:
+1336 28400603 compare 3 ,temp ,3 
+1337 24209322 nbranch setup_clk ,true 
+1338 2020132d branch setup_complete 
+
+rf_setup_time:
+1339 44cac012 bpatch patch12_5 ,mem_patch12 
+133a 69610157 fetchr timeup ,2 ,mem_param_rf_setup 
+133b 20201322 branch setup_clk 
+
+rf_setup_time_slave_slot:
+133c 78547c00 disable user 
+133d 20201339 branch rf_setup_time 
+
+rf_setup_time_master_slot:
+133e 78347c00 enable user 
+133f 20201339 branch rf_setup_time 
+
+start_transmitter:
+1340 44cb4012 bpatch patch12_6 ,mem_patch12 
+1341 204012da call prep_crypt 
+1342 7850fc00 disable is_rx 
+1343 78307c00 enable is_tx 
+1344 20600000 rtn 
+
+start_tx_native:
+1345 44cbc012 bpatch patch12_7 ,mem_patch12 
+1346 69610155 fetchr timeup ,2 ,mem_param_tx_setup 
+1347 34730200 until clkn_rt ,meet 
+1348 782b7c00 pulse init_encrypt 
+1349 20600000 rtn 
+
+start_rx_native:
+134a 44cc4013 bpatch patch13_0 ,mem_patch13 
+134b 6961015f fetchr timeup ,2 ,mem_param_rx_setup 
+134c 34730200 until clkn_rt ,meet 
+134d 20600000 rtn 
+
+start_tx_external:
+134e 44ccc013 bpatch patch13_1 ,mem_patch13 
+134f 69610155 fetchr timeup ,2 ,mem_param_tx_setup 
+1350 35330200 until clke_rt ,meet 
+1351 782b7c00 pulse init_encrypt 
+1352 20600000 rtn 
+
+send_access_word:
+1353 44cd4013 bpatch patch13_2 ,mem_patch13 
+1354 20404d13 call rf_debug_tx_on_line 
+1355 51207e00 preload access 
+1356 782efc00 enable encode_fec0 
+1357 79202a00 set1 txgfsk ,radio_ctrl 
+1358 08008648 inject mod ,72 
+1359 784efc00 disable encode_fec0 
+135a 20600000 rtn 
+
+scan_mode_whiten:
+135b 1ca20400 copy xin ,temp 
+135c 18418460 or_into 0x60 ,temp 
+135d 18421c00 copy temp ,white_init 
+135e 20600000 rtn 
+
+get_free_amaddr:
+135f 44cdc013 bpatch patch13_3 ,mem_patch13 
+1360 6fe0c098 fetch 1 ,mem_current_amaddr 
+1361 1fe0fe01 increase 1 ,pdata 
+1362 c0839364 bne param_esco_addr ,get_free_amaddr_cont 
+1363 18007e01 force 1 ,pdata 
+
+get_free_amaddr_cont:
+1364 67e0c098 store 1 ,mem_current_amaddr 
+1365 98000800 iforce am_addr 
+1366 20600000 rtn 
+
+get_clk:
+1367 1b220400 copy clkn ,temp 
+1368 20748000 rtn master 
+1369 1b420400 copy clke ,temp 
+136a 20600000 rtn 
+
+get_clkbt:
+136b 1c427e00 deposit clkn_bt 
+136c 20748000 rtn master 
+136d 1d027e00 deposit clke_bt 
+136e 20600000 rtn 
+
+supervision_update:
+136f 44ce4013 bpatch patch13_4 ,mem_patch13 
+1370 684a004d fetcht 4 ,mem_supervision_timer 
+1371 2040136b call get_clkbt 
+1372 98461600 isub temp ,timeup 
+1373 19627e00 deposit timeup 
+1374 68490051 fetcht 2 ,mem_supervision_to 
+1375 18438400 lshift temp ,temp 
+1376 98467e00 isub temp ,pdata 
+1377 20600000 rtn 
+
+supervision_flush:
+1378 44cec013 bpatch patch13_5 ,mem_patch13 
+1379 2040136b call get_clkbt 
+137a 67e2004d store 4 ,mem_supervision_timer 
+137b 20600000 rtn 
+
+assert:
+137c 44cf4013 bpatch patch13_6 ,mem_patch13 
+137d 2020137c branch assert 
+
+loop:
+137e 2020137e branch loop 
+
+sleep:
+137f 207a0000 rtn blank 
+1380 1fe37e00 rshift pdata ,pdata 
+1381 1fe0fffd increase -3 ,pdata 
+
+sleep_loop:
+1382 1fe0ffff increase -1 ,pdata 
+1383 24229382 nbranch sleep_loop ,zero 
+1384 18007e00 force 0 ,pdata 
+1385 20600000 rtn 
+
+init_param:
+1386 df200010 arg 0x10 ,loopcnt 
+1387 d8a00000 arg 0 ,contw 
+1388 20407d8c call memset0 
+1389 d8a00287 arg mem_le_state ,contw 
+138a df20000a arg 10 ,loopcnt 
+138b 20407d8c call memset0 
+138c 70087400 jam 0 ,mem_sp_calc 
+138d 70095b00 jam 0 ,mem_fifo_temp 
+138e 7002df00 jam 0 ,mem_le_testtype 
+138f 7000e300 jam 0 ,mem_debug_config 
+1390 7003a500 jam 0 ,mem_lmp_conn_state 
+1391 7000bc00 jam 0 ,mem_connection_options 
+1392 700a5100 jam 0 ,mem_tester_emulate 
+1393 700a5c00 jam 0 ,mem_tester_cnt 
+1394 589e8b33 setarg param_glap 
+1395 67e1c0af store 3 ,mem_glap 
+1396 70008d60 jam 0x60 ,mem_fhs_misc 
+1397 7040d705 jam param_max_slot ,mem_max_slot 
+1398 70001402 jam 0x02 ,mem_fw_ver 
+1399 58000e43 setarg param_tx_setup 
+139a 67e10155 store 2 ,mem_param_tx_setup 
+139b 58000600 setarg param_rf_setup 
+139c 67e10157 store 2 ,mem_param_rf_setup 
+139d 58000600 setarg param_conn_access 
+139e 67e10159 store 2 ,mem_param_conn_access 
+139f 58000d00 setarg param_rx_setup 
+13a0 67e1015f store 2 ,mem_param_rx_setup 
+13a1 580003bb setarg param_clke_cal 
+13a2 67e1015b store 2 ,mem_param_clke_cal 
+13a3 58000500 setarg param_pll_setup 
+13a4 67e1015d store 2 ,mem_param_pll_setup 
+13a5 580007d0 setarg param_dpll_start_delay 
+13a6 67e10161 store 2 ,mem_param_dpll_start_delay 
+13a7 58000ea6 setarg param_rt_rthalfslot 
+13a8 67e10163 store 2 ,mem_param_rt_rthalfslot 
+13a9 580001e0 setarg param_clke_cal_le_1m 
+13aa 67e10165 store 2 ,mem_param_clke_cal_le_1m 
+13ab 58000120 setarg param_clke_cal_le_2m 
+13ac 67e10167 store 2 ,mem_param_clke_cal_le_2m 
+13ad 5800011a setarg param_clke_cal_le_coded 
+13ae 67e10169 store 2 ,mem_param_clke_cal_le_coded 
+13af 58001400 setarg mem_ble_tx_buff0 
+13b0 67e143de store 2 ,mem_ble_l2cap_tx_buff0_ptr 
+13b1 58000100 setarg mem_ble_l2cap_tx_buff_size 
+13b2 67e143e0 store 2 ,mem_ble_l2cap_tx_buff_size_ptr 
+13b3 20406e66 call init_memp 
+13b4 58000880 setarg mem_sp_state_end 
+13b5 d8a00870 arg mem_sp_state_start ,contw 
+13b6 98a67200 isub contw ,loopcnt 
+13b7 20407d9b call clear_mem 
+
+init_param_next:
+13b8 44cfc013 bpatch patch13_7 ,mem_patch13 
+13b9 20758000 rtn wake 
+13ba 7045fa09 jam bluetooth_core_specification_5_0 ,mem_lmp_version 
+13bb 5800050e setarg company_id_yichip 
+13bc 67e145fb store 2 ,mem_lmp_compid 
+13bd 58000008 setarg 0x08 
+13be 67e145fd store 2 ,mem_lmp_subversion 
+13bf 7044d17f jam 0x7f ,mem_seqi 
+13c0 58000024 setarg 0x24 
+13c1 67e140b5 store 2 ,mem_iscan_window 
+13c2 67e140b9 store 2 ,mem_pscan_window 
+13c3 58000200 setarg 0x200 
+13c4 67e140b7 store 2 ,mem_iscan_interval 
+13c5 67e140bb store 2 ,mem_pscan_interval 
+13c6 58000020 setarg 0x20 
+13c7 67e140c3 store 2 ,mem_inq_window 
+13c8 67e140bf store 2 ,mem_page_window 
+13c9 58002000 setarg 0x2000 
+13ca 67e140c1 store 2 ,mem_page_to 
+13cb 58000480 setarg 0x480 
+13cc 67e140c6 store 2 ,mem_rx_window_init 
+13cd 58000c00 setarg 0xc00 
+13ce 67e140c8 store 2 ,mem_rx_window_sniff 
+13cf 58000c3f setarg 0xc3f 
+13d0 67e1417e store 2 ,mem_lpm_xtalcnt + 1 
+13d1 58000333 setarg 0x333 
+13d2 e7e10005 istore 2 ,contw 
+13d3 5824109d setarg 0x24109d 
+13d4 67e1c183 store 3 ,mem_lpm_ctrl3 + 1 
+13d5 20407f52 call clear_wake 
+13d6 58000000 setarg 0 
+13d7 67e141e6 store 2 ,mem_tx_len 
+13d8 1c437e00 rshift clkn_bt ,pdata 
+13d9 67e2409c store 4 ,mem_last_clkn 
+13da 20600000 rtn 
+
+clk24m_init:
+13db 70804206 jam 6 ,core_clksel 
+13dc 70804201 jam 1 ,core_clksel 
+13dd 2000000a nop 10 
+13de 58001d4a setarg 7498 
+13df 67f10040 store 2 ,core_halfslot 
+13e0 20600000 rtn 
+
+lpmstate:
+13e1 5800ee21 setarg 0xee21 
+13e2 67f10050 store 2 ,core_clkoff 
+13e3 6ff2011c fetch 4 ,core_gpio_in 
+13e4 67e2098a store 4 ,mem_saved_gpio_in 
+13e5 6ff0813b fetch 1 ,core_lpm_ctrl + 3 
+13e6 67e08989 store 1 ,mem_wakup_from_power_flag 
+13e7 6ff0813e fetch 1 ,core_lpm_ldocnt 
+13e8 c301dbf5 bbit0 gpio_latch ,loadcode 
+13e9 7835fc00 enable wake 
+13ea c30393f2 bbit0 cold_wake ,lpmwake 
+13eb 7855fc00 disable wake 
+13ec 1ce27e00 deposit auxcnt 
+13ed 243a13f2 nbranch lpmwake ,blank 
+13ee 6ff0813b fetch 1 ,core_lpm_ctrl + 3 
+13ef c28113f2 bbit1 reload_code ,lpmwake 
+13f0 d85fffff arg param_hibernate_clks ,temp 
+13f1 2020147f branch lpm_enter_sleep 
+
+lpmwake:
+13f2 6ff20134 fetch 4 ,core_lpm_ctrl2 
+13f3 67f2004c store 4 ,core_lpm_reg 
+13f4 6ff08135 fetch 1 ,core_lpm_ctrl2 + 1 
+13f5 1fe17ee0 and_into 0xe0 ,pdata 
+13f6 67f0804d store 1 ,core_lpm_reg + 1 
+13f7 2040155b call lpm_write_ctrl3 
+13f8 6ff1813c fetch 3 ,core_lpm_xtalcnt 
+13f9 67f1804c store 3 ,core_lpm_reg 
+13fa efe08006 ifetch 1 ,contr 
+13fb 1fe1feef or_into isogate_mask ,pdata 
+13fc e7e08005 istore 1 ,contw 
+13fd 2040154e call lpm_write_ctrl2 
+13fe 6ff0804f fetch 1 ,core_lpm_isogate 
+13ff 79207e04 set1 enable_retmem ,pdata 
+1400 67f0804f store 1 ,core_lpm_isogate 
+1401 2040154e call lpm_write_ctrl2 
+1402 20559424 call lpm_load_context ,wake 
+1403 6ff0804e fetch 1 ,core_lpm_reg + 2 
+1404 793ffe03 set0 gpio_latch ,pdata 
+1405 67f0804e store 1 ,core_lpm_reg + 2 
+1406 2040154e call lpm_write_ctrl2 
+1407 2435dbf5 nbranch loadcode ,wake 
+1408 2040140c call lpm_save_mpu_lock 
+1409 c6958000 rtnmark0 mark_otp_encrypt 
+140a 70800608 jam lock_otp ,core_misc_ctrl 
+140b 20600000 rtn 
+
+lpm_save_mpu_lock:
+140c 6fe1c4ce fetch 3 ,mem_efuse_header 
+140d 207a0000 rtn blank 
+140e 67e18a01 store 3 ,mem_tmp_buffer 
+140f 20205ceb branch app_lpm_peripheral_lock_check 
+
+lpm_ctrl3_cfg_dig_vsel:
+1410 6fe0c4d2 fetch 1 ,mem_dig_aon_vsel 
+1411 c0009418 beq 1 ,lpm_ctrl3_cfg_vsel_108 
+1412 c001141c beq 2 ,lpm_ctrl3_cfg_vsel_096 
+1413 c0019420 beq 3 ,lpm_ctrl3_cfg_vsel_084 
+
+lpm_ctrl3_cfg_vsel_120:
+1414 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+1415 1fe17ee0 and_into 0xe0 ,pdata 
+
+lpm_ctrl3_cfg_vsel_store:
+1416 67e0c183 store 1 ,mem_lpm_ctrl3 + 1 
+1417 20600000 rtn 
+
+lpm_ctrl3_cfg_vsel_108:
+1418 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+1419 1fe17ee0 and_into 0xe0 ,pdata 
+141a 1fe1fe1d or_into 0x1d ,pdata 
+141b 20201416 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_ctrl3_cfg_vsel_096:
+141c 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+141d 1fe17ee0 and_into 0xe0 ,pdata 
+141e 1fe1fe1b or_into 0x1b ,pdata 
+141f 20201416 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_ctrl3_cfg_vsel_084:
+1420 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+1421 1fe17ee0 and_into 0xe0 ,pdata 
+1422 1fe1fe17 or_into 0x17 ,pdata 
+1423 20201416 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_load_context:
+1424 6fe0c1a5 fetch 1 ,mem_saved_spidctrl 
+1425 67f08086 store 1 ,core_spid_ctrl 
+1426 d8c04186 arg mem_saved_gpio ,contr 
+1427 d8a08070 arg core_gpio_conf ,contw 
+1428 20407d74 call memcpy20 
+1429 6fe4419d fetch 8 ,mem_saved_mark 
+142a 98000000 iforce mark 
+142b 6ff40140 fetch 8 ,core_gpio_wakeup_low 
+142c 67e4009e store 8 ,mem_gpio_wakeup_low 
+142d 20205ca3 branch load_ucode 
+
+lpm_save_context:
+142e 18027e00 deposit mark 
+142f 67e4419d store 8 ,mem_saved_mark 
+1430 d8c08070 arg core_gpio_conf ,contr 
+1431 d8a04186 arg mem_saved_gpio ,contw 
+1432 20407d74 call memcpy20 
+1433 6ff08086 fetch 1 ,core_spid_ctrl 
+1434 67e0c1a5 store 1 ,mem_saved_spidctrl 
+1435 2020155d branch lpm_write_gpio_wakeup 
+
+lpo_calibration:
+1436 6ff08085 fetch 1 ,core_aes_en 
+1437 1ff1fe00 rshift4 pdata ,pdata 
+1438 243a143f nbranch lpo_cal_inited ,blank 
+1439 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+143a 247a0000 nrtn blank 
+143b 6ff08085 fetch 1 ,core_aes_en 
+143c 1fe1fec0 or_into 0xc0 ,pdata 
+143d 67f08085 store 1 ,core_aes_en 
+143e 70800680 jam ccnt_start ,core_misc_ctrl 
+
+lpo_cal_inited:
+143f 6ff0812d fetch 1 ,core_perf_status 
+1440 c4008000 rtnbit0 1 
+1441 6ff18149 fetch 3 ,core_clk_counter 
+1442 67e1c174 store 3 ,mem_clks_per_lpo 
+1443 20600000 rtn 
+
+lpm_adjust_clk:
+1444 44d04014 bpatch patch14_0 ,mem_patch14 
+1445 1b427e00 deposit clke 
+1446 20407e0a call clk_diff_rt 
+1447 684a4164 fetcht 4 ,mem_sleep_counter_all 
+1448 18467cff sub temp ,0xff ,null 
+1449 20610000 rtn positive 
+144a 1fed7e00 lshift8 pdata ,pdata 
+144b 1ff27e00 lshift4 pdata ,pdata 
+144c 9846fc00 idiv temp 
+144d 20407e61 call get_div_result 
+144e d84000c8 arg param_lpm_adjmax ,temp 
+144f 20407e6f call ceiling 
+1450 67e08096 store 1 ,mem_lpm_adjust 
+1451 24341453 nbranch lpm_adjust_positive ,user 
+1452 1fe67e00 sub pdata ,0 ,pdata 
+
+lpm_adjust_positive:
+1453 6849c174 fetcht 3 ,mem_clks_per_lpo 
+1454 9840fe00 iadd temp ,pdata 
+1455 67e1c174 store 3 ,mem_clks_per_lpo 
+
+lpm_clear_counter:
+1456 58000000 setarg 0 
+1457 67e24164 store 4 ,mem_sleep_counter_all 
+1458 20600000 rtn 
+
+lpm_hibernate:
+1459 d85fffff arg param_hibernate_clks ,temp 
+145a 6fe0c17b fetch 1 ,mem_lpm_config + 1 
+145b 793ffe07 set0 7 ,pdata 
+145c 67e0c17b store 1 ,mem_lpm_config + 1 
+
+lpm_hibernate_normal:
+145d 44d0c014 bpatch patch14_1 ,mem_patch14 
+145e 2040155d call lpm_write_gpio_wakeup 
+145f 6fe0c15c fetch 1 ,mem_lpm_hibernate_switch 
+1460 67e0c181 store 1 ,mem_lpm_xtalcnt + 4 
+1461 6fe0c17f fetch 1 ,mem_lpm_xtalcnt + 2 
+1462 79207e07 set1 cold_wake ,pdata 
+1463 67e0c17f store 1 ,mem_lpm_xtalcnt + 2 
+
+lpm_sleep:
+1464 44d14014 bpatch patch14_2 ,mem_patch14 
+1465 204012d1 call xtal_fast_wake 
+1466 6fe14479 fetch 2 ,mem_cb_before_lpm_sleep 
+1467 20407e7a call callback_func 
+
+lpm_sleep_skip_cb_function:
+1468 6fe24164 fetch 4 ,mem_sleep_counter_all 
+1469 9840fe00 iadd temp ,pdata 
+146a 67e24164 store 4 ,mem_sleep_counter_all 
+146b 2040142e call lpm_save_context 
+146c 20401410 call lpm_ctrl3_cfg_dig_vsel 
+
+lpm_sleep_next:
+146d 6fe24182 fetch 4 ,mem_lpm_ctrl3 
+146e 1fe22400 copy pdata ,regb 
+146f 6fe2c17d fetch 5 ,mem_lpm_xtalcnt 
+1470 67f2004c store 4 ,core_lpm_reg 
+1471 1fef2200 rshift32 pdata ,rega 
+1472 37d98200 until null ,lpo_edge 
+1473 1b227e00 deposit clkn 
+1474 67e34168 store 6 ,mem_sleep_clkn 
+1475 70800502 jam lpmreg_sel_ctrl2 ,core_lpm_wr 
+1476 37d98200 until null ,lpo_edge 
+1477 37d98200 until null ,lpo_edge 
+1478 1a227e00 deposit rega 
+1479 67f0804f store 1 ,core_lpm_isogate 
+147a 70800502 jam lpmreg_sel_ctrl2 ,core_lpm_wr 
+147b 37d98200 until null ,lpo_edge 
+147c 37d98200 until null ,lpo_edge 
+147d 6252004c storer regb ,4 ,core_lpm_reg 
+147e 70800520 jam lpmreg_sel_ctrl3 ,core_lpm_wr 
+
+lpm_enter_sleep:
+147f 37d98200 until null ,lpo_edge 
+1480 37d98200 until null ,lpo_edge 
+1481 605a004c storet 4 ,core_lpm_reg 
+1482 70800510 jam lpmreg_sel_counter ,core_lpm_wr 
+1483 37df8200 until null ,never 
+
+lpm_recover_clk:
+1484 44d1c014 bpatch patch14_3 ,mem_patch14 
+1485 58000000 setarg 0 
+1486 1ce27c00 copy auxcnt ,null 
+1487 2022948f branch lpm_recover_timeout ,zero 
+1488 6ff0813c fetch 1 ,core_lpm_xtalcnt 
+1489 6858813d fetcht 1 ,core_lpm_buckcnt 
+148a 98467c00 isub temp ,null 
+148b 2021148d branch lpm_recover_xtal ,positive 
+148c 18427e00 deposit temp 
+
+lpm_recover_xtal:
+148d 9ce67e00 isub auxcnt ,pdata 
+148e 1fe0fe01 increase 1 ,pdata 
+
+lpm_recover_timeout:
+148f 1fe0fe0a increase 10 ,pdata 
+1490 37d98200 until null ,lpo_edge 
+1491 9e20fe00 iadd lpo_time ,pdata 
+1492 684a4160 fetcht 4 ,mem_sleep_counter 
+1493 9840fe00 iadd temp ,pdata 
+1494 6849c174 fetcht 3 ,mem_clks_per_lpo 
+1495 984ffe00 imul32 temp ,pdata 
+1496 1fecfe00 rshift8 pdata ,pdata 
+1497 1ff1fe00 rshift4 pdata ,pdata 
+1498 1fe0fe6e increase param_lpm_fix ,pdata 
+1499 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+149a 9846fc00 idiv temp 
+149b 20407e61 call get_div_result 
+149c 1ff07e00 lshift16 pdata ,pdata 
+149d 18070400 remainder temp 
+149e 9841fe00 ior temp ,pdata 
+149f 684b4168 fetcht 6 ,mem_sleep_clkn 
+14a0 20407dff call clk_add 
+14a1 18423200 copy temp ,clkn 
+14a2 6fe34048 fetch 6 ,mem_context + coffset_clk_offset 
+14a3 20401073 call calc_clke2 
+14a4 1b427e00 deposit clke 
+14a5 67e3095c store 6 ,mem_pdatatemp 
+14a6 1ce27e00 deposit auxcnt 
+14a7 e7e08005 istore 1 ,contw 
+14a8 6ff0811d fetch 1 ,core_gpio_in1 
+14a9 1fe1fef0 or_into 0xf0 ,pdata 
+14aa e7e08005 istore 1 ,contw 
+14ab 20600000 rtn 
+
+lpm_dispatch:
+14ac 44d24014 bpatch patch14_4 ,mem_patch14 
+14ad 20401436 call lpo_calibration 
+14ae 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+14af 207a0000 rtn blank 
+14b0 6fe0c099 fetch 1 ,mem_lpm_mode 
+14b1 207a0000 rtn blank 
+14b2 6fe0c767 fetch 1 ,mem_ssp_enable 
+14b3 203a14b6 branch lpm_dispatch_next ,blank 
+14b4 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+14b5 207a0000 rtn blank 
+
+lpm_dispatch_next:
+14b6 6fe0c6bd fetch 1 ,mem_sc_calc 
+14b7 247a0000 nrtn blank 
+14b8 da600ab7 arg context_check_a_wack ,regc 
+14b9 20400a6e call context_search 
+14ba 20628000 rtn zero 
+14bb 2040156e call lpm_check_wake_lock 
+14bc 247a0000 nrtn blank 
+14bd 6fe0c040 fetch 1 ,mem_context 
+14be 2fe00e03 compare 3 ,pdata ,0x7 
+14bf 242094e2 nbranch lpm_dispatch_unconn ,true 
+14c0 6fe14042 fetch 2 ,mem_context + coffset_tsniff 
+14c1 207a0000 rtn blank 
+14c2 20758000 rtn wake 
+14c3 44d2c014 bpatch patch14_5 ,mem_patch14 
+
+lpm_dispatch_next2:
+14c4 6848809d fetcht 1 ,mem_lpm_current_mult 
+14c5 6fe14042 fetch 2 ,mem_context + coffset_tsniff 
+14c6 984ffe00 imul32 temp ,pdata 
+14c7 18518400 rshift4 temp ,temp 
+14c8 184b0400 rshift2 temp ,temp 
+14c9 98467e00 isub temp ,pdata 
+14ca 684a4044 fetcht 4 ,mem_context + coffset_sniff_anchor 
+14cb 9840fe00 iadd temp ,pdata 
+14cc 6848c15b fetcht 1 ,mem_lpm_overhead 
+14cd 98467e00 isub temp ,pdata 
+14ce 1ff06000 lshift16 pdata ,alarm 
+14cf 44d34014 bpatch patch14_6 ,mem_patch14 
+14d0 6fe1404e fetch 2 ,mem_context + coffset_rx_window 
+14d1 1fe37e00 rshift pdata ,pdata 
+14d2 20407e26 call clk2bt 
+14d3 1e027e00 deposit alarm 
+14d4 20407e0c call clk_diff 
+14d5 1b420400 copy clke ,temp 
+14d6 20407e0a call clk_diff_rt 
+14d7 20740000 rtn user 
+
+lpm_dispatch_sleep:
+14d8 20407e1f call clk2lpo 
+
+lpm_dispatch_lpo:
+14d9 44d3c014 bpatch patch14_7 ,mem_patch14 
+14da 6fe0c17d fetch 1 ,mem_lpm_xtalcnt 
+14db 98467c00 isub temp ,null 
+14dc 20211456 branch lpm_clear_counter ,positive 
+14dd 604a4160 storet 4 ,mem_sleep_counter 
+14de 204031b6 call app_will_enter_lpm 
+14df 204053ac call l2cap_lpm_save_txbuf 
+14e0 684a4160 fetcht 4 ,mem_sleep_counter 
+14e1 20201464 branch lpm_sleep 
+
+lpm_dispatch_unconn:
+14e2 44d44015 bpatch patch15_0 ,mem_patch15 
+14e3 6fe0c040 fetch 1 ,mem_context 
+14e4 c3800000 rtnbit1 state_inconn 
+14e5 c3818000 rtnbit1 state_inpage 
+14e6 6fe0c767 fetch 1 ,mem_ssp_enable 
+14e7 203a14ea branch lpm_unconn_nossp ,blank 
+14e8 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+14e9 207a0000 rtn blank 
+
+lpm_unconn_nossp:
+14ea 6fe0c427 fetch 1 ,mem_le_adv_enable 
+14eb 243a14ee nbranch lpm_unconn_cont ,blank 
+14ec 6fe0c09b fetch 1 ,mem_scan_mode 
+14ed 207a0000 rtn blank 
+
+lpm_unconn_cont:
+14ee 6fe14159 fetch 2 ,mem_lpm_interval 
+14ef 207a0000 rtn blank 
+
+lpm_sleep_btclk:
+14f0 6848c15b fetcht 1 ,mem_lpm_overhead 
+14f1 98467e00 isub temp ,pdata 
+14f2 d8401d4c arg 7500 ,temp 
+14f3 984ffe00 imul32 temp ,pdata 
+14f4 202014d8 branch lpm_dispatch_sleep 
+
+lpm_set_mult:
+14f5 44d4c015 bpatch patch15_1 ,mem_patch15 
+14f6 7855fc00 disable wake 
+14f7 6fe08030 fetch 1 ,mem_state 
+14f8 c4008000 rtnbit0 state_insniff 
+14f9 24369517 nbranch lpm_not_match ,match 
+14fa 20401512 call lpm_match 
+14fb 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+14fc 67e1003e store 2 ,mem_rx_window 
+14fd 6fe08047 fetch 1 ,mem_arq 
+14fe c2819525 bbit1 wack ,lpm_mult_short 
+14ff c5869525 bmark0 mark_lpm_mult_enable ,lpm_mult_short 
+1500 20405355 call l2cap_malloc_is_fifo_empty 
+1501 243a1525 nbranch lpm_mult_short ,blank 
+1502 6fe0c646 fetch 1 ,mem_classic_bt_flag 
+1503 c2809525 bbit1 short_mult_flag ,lpm_mult_short 
+
+lpm_mult_wait_timeout:
+1504 6fe14471 fetch 2 ,mem_cb_bt_set_mult 
+1505 20407e7a call callback_func 
+1506 243a1525 nbranch lpm_mult_short ,blank 
+1507 70009d00 jam 0 ,mem_lpm_current_mult 
+1508 c5869525 bmark0 mark_lpm_mult_enable ,lpm_mult_short 
+1509 6fe0c179 fetch 1 ,mem_lpm_mult_cnt 
+150a 203a1529 branch lpm_mult_long ,blank 
+150b 1fe0ffff increase -1 ,pdata 
+150c 67e0c179 store 1 ,mem_lpm_mult_cnt 
+150d 20600000 rtn 
+
+classic_bt_set_mult_short_flag:
+150e d8e00001 arg short_mult_flag ,queue 
+150f 20205842 branch classic_bluetooth_set_flag 
+
+classic_bt_clr_mult_short_flag:
+1510 d8e00001 arg short_mult_flag ,queue 
+1511 20205846 branch classic_bluetooth_clr_flag 
+
+lpm_match:
+1512 70415e00 jam 0 ,mem_sniff_unint_lost 
+1513 6fe1c16e fetch 3 ,mem_sniff_rcv 
+1514 1fe0fe01 increase 1 ,pdata 
+1515 67e1c16e store 3 ,mem_sniff_rcv 
+1516 20600000 rtn 
+
+lpm_not_match:
+1517 44d54015 bpatch patch15_2 ,mem_patch15 
+1518 684940c8 fetcht 2 ,mem_rx_window_sniff 
+1519 18430400 rshift temp ,temp 
+151a 6fe1003e fetch 2 ,mem_rx_window 
+151b 9840fe00 iadd temp ,pdata 
+151c 67e1003e store 2 ,mem_rx_window 
+
+lpm_lost:
+151d 70009d00 jam 0 ,mem_lpm_current_mult 
+151e 6fe1c171 fetch 3 ,mem_sniff_lost 
+151f 1fe0fe01 increase 1 ,pdata 
+1520 67e1c171 store 3 ,mem_sniff_lost 
+1521 6fe0c15e fetch 1 ,mem_sniff_unint_lost 
+1522 1fe0fe01 increase 1 ,pdata 
+1523 67e0c15e store 1 ,mem_sniff_unint_lost 
+1524 20600000 rtn 
+
+lpm_mult_short:
+1525 70009d00 jam 0 ,mem_lpm_current_mult 
+1526 6fe0c178 fetch 1 ,mem_lpm_mult_timeout 
+1527 67e0c179 store 1 ,mem_lpm_mult_cnt 
+1528 20600000 rtn 
+
+lpm_mult_long:
+1529 6848c177 fetcht 1 ,mem_lpm_mult 
+152a 6048809d storet 1 ,mem_lpm_current_mult 
+152b 20600000 rtn 
+
+lpm_cal_xtal_startup:
+152c 6fe0c17d fetch 1 ,mem_lpm_xtalcnt 
+152d 247a0000 nrtn blank 
+152e 70804206 jam clksel_rc ,core_clksel 
+152f 58000f0c setarg 0xf0c 
+1530 20401543 call lpm_write_config 
+1531 58030d40 setarg 200000 
+1532 2040137f call sleep 
+1533 37d98200 until null ,lpo_edge 
+1534 1e226000 copy lpo_time ,alarm 
+1535 204012d1 call xtal_fast_wake 
+1536 70804204 jam clksel_xtal ,core_clksel 
+1537 2000000a nop 10 
+1538 37d98200 until null ,lpo_edge 
+1539 1e227e00 deposit lpo_time 
+153a 9e067e00 isub alarm ,pdata 
+153b 1fe0fe30 increase 0x30 ,pdata 
+153c d84000ff arg 0xff ,temp 
+153d 20407e6f call ceiling 
+153e 67e0c17d store 1 ,mem_lpm_xtalcnt 
+153f 20007530 nop 30000 
+1540 20007530 nop 30000 
+1541 20007530 nop 30000 
+1542 20600000 rtn 
+
+lpm_write_config:
+1543 d8a00fff arg 0xfff ,contw 
+1544 98a10a00 iand contw ,contw 
+1545 6fe0c17a fetch 1 ,mem_lpm_config 
+1546 1fe17ef0 and_into 0xf0 ,pdata 
+1547 1fed7e00 lshift8 pdata ,pdata 
+1548 98a1fe00 ior contw ,pdata 
+1549 67f1004c store 2 ,core_lpm_reg 
+154a efe10006 ifetch 2 ,contr 
+154b e7e10005 istore 2 ,contw 
+
+lpm_write_ctrl:
+154c 58000001 setarg lpmreg_sel_ctrl 
+154d 2020154f branch lpm_write 
+
+lpm_write_ctrl2:
+154e 58000002 setarg lpmreg_sel_ctrl2 
+
+lpm_write:
+154f 37d98200 until null ,lpo_edge 
+1550 67f08005 store 1 ,core_lpm_wr 
+1551 37d98200 until null ,lpo_edge 
+1552 37d98200 until null ,lpo_edge 
+1553 20600000 rtn 
+
+lpm_write_sel_vdd:
+1554 6ff20134 fetch 4 ,core_lpm_ctrl2 
+1555 67f2004c store 4 ,core_lpm_reg 
+1556 6ff08134 fetch 1 ,core_lpm_ctrl2 
+1557 1fe17e41 and_into 0x41 ,pdata 
+1558 6848c182 fetcht 1 ,mem_lpm_ctrl3 
+1559 9841fe00 ior temp ,pdata 
+155a 67f0804c store 1 ,core_lpm_reg 
+
+lpm_write_ctrl3:
+155b 58000020 setarg lpmreg_sel_ctrl3 
+155c 2020154f branch lpm_write 
+
+lpm_write_gpio_wakeup:
+155d 44d5c015 bpatch patch15_3 ,mem_patch15 
+155e 6fe2009e fetch 4 ,mem_gpio_wakeup_low 
+155f 67f2004c store 4 ,core_lpm_reg 
+1560 58000004 setarg lpmreg_sel_gpiolow 
+1561 2040154f call lpm_write 
+1562 6fe200a2 fetch 4 ,mem_gpio_wakeup_high 
+1563 67f2004c store 4 ,core_lpm_reg 
+1564 58000008 setarg lpmreg_sel_gpiohigh 
+1565 2020154f branch lpm_write 
+
+lpm_get_wake_lock:
+1566 6fe14157 fetch 2 ,mem_lpm_wake_lock 
+1567 f9207e00 qset1 pdata 
+1568 67e14157 store 2 ,mem_lpm_wake_lock 
+1569 20600000 rtn 
+
+lpm_put_wake_lock:
+156a 6fe14157 fetch 2 ,mem_lpm_wake_lock 
+156b f93ffe00 qset0 pdata 
+156c 67e14157 store 2 ,mem_lpm_wake_lock 
+156d 20600000 rtn 
+
+lpm_check_wake_lock:
+156e 44d64015 bpatch patch15_4 ,mem_patch15 
+156f 204031b4 call app_check_wake_lock 
+1570 6fe14157 fetch 2 ,mem_lpm_wake_lock 
+1571 1fe22200 copy pdata ,rega 
+1572 6fe0804c fetch 1 ,mem_state_map 
+1573 2feffe06 isolate1 smap_rxlmp ,pdata 
+1574 7920a20b setflag true ,wake_lock_lmp_rx ,rega 
+1575 6fe08078 fetch 1 ,mem_lmo_opcode1 
+1576 6848807c fetcht 1 ,mem_lmo_opcode2 
+1577 9840fe00 iadd temp ,pdata 
+1578 68488048 fetcht 1 ,mem_lmp_to_send 
+1579 9840fe00 iadd temp ,pdata 
+157a 7d3a220a nsetflag blank ,wake_lock_lmp_tx ,rega 
+157b 6fe1c4f3 fetch 3 ,mem_tx_fifo3 
+157c 7d3a2201 nsetflag blank ,wake_lock_ble_tx ,rega 
+157d 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+157e 68490310 fetcht 2 ,mem_l2cap_rxbuff2_len 
+157f 9840fe00 iadd temp ,pdata 
+1580 7d3a220d nsetflag blank ,wake_lock_l2cap_rx ,rega 
+1581 6fe44775 fetch util_fifo_len ,mem_ipc_fifo_bt2c51 
+1582 7d3a220f nsetflag blank ,wake_lock_ipc_bt2c51 ,rega 
+1583 6fe4477d fetch util_fifo_len ,mem_ipc_fifo_c512bt 
+1584 7d3a220e nsetflag blank ,wake_lock_ipc_c512bt ,rega 
+1585 6fe0c1db fetch 1 ,mem_hci_cmd 
+1586 7d3a2208 nsetflag blank ,wake_lock_cmd ,rega 
+1587 6fe0c09a fetch 1 ,mem_device_option 
+1588 2fe1fe0a compare dvc_op_module ,pdata ,0xff 
+1589 2040958d call lpm_uart_wake_lock ,true 
+158a 1a227e00 copy rega ,pdata 
+158b 67e14157 store 2 ,mem_lpm_wake_lock 
+158c 20600000 rtn 
+
+lpm_uart_wake_lock:
+158d 6ff10112 fetch 2 ,core_uart_rxitems 
+158e 7d3a2206 nsetflag blank ,wake_lock_uart_rx ,rega 
+158f 6ff1010e fetch 2 ,core_uart_txitems 
+1590 7d3a2205 nsetflag blank ,wake_lock_uart_tx ,rega 
+1591 20600000 rtn 
+
+lpm_shut_down:
+1592 6ff20138 fetch 4 ,core_lpm_ctrl 
+1593 793ffe1b set0 27 ,pdata 
+1594 67f2004c store 4 ,core_lpm_reg 
+1595 2040154c call lpm_write_ctrl 
+1596 2020137c branch assert 
+
+lpm_disable_exen_output:
+1597 6ff2013c fetch 4 ,core_lpm_xtalcnt 
+1598 793ffe14 set0 20 ,pdata 
+1599 67f2004c store 4 ,core_lpm_reg 
+159a 2020154e branch lpm_write_ctrl2 
+
+le_init_conn:
+159b 474cc033 bpatchx patch33_1 ,mem_patch33 
+159c 7855fc00 disable wake 
+159d 70029d01 jam 1 ,mem_le_conn_handle 
+159e 70028703 jam 3 ,mem_le_state 
+159f 70029e01 jam 1 ,mem_le_arq 
+15a0 5fffffff setarg -1 
+15a1 67e102a1 store 2 ,mem_le_event_count 
+15a2 18007e00 force 0 ,pdata 
+15a3 67e0829f store 1 ,mem_le_ch 
+15a4 67e082aa store 1 ,mem_le_op 
+15a5 67e1c16e store 3 ,mem_sniff_rcv 
+15a6 67e1c171 store 3 ,mem_sniff_lost 
+15a7 20401901 call le_clear_enc 
+15a8 7041f501 jam 1 ,mem_le_txheader 
+15a9 7041f600 jam 0 ,mem_le_txlen 
+15aa 7002bc01 jam fun_rx_ll_1m_phy ,mem_le_rx_phy 
+15ab 7002bd01 jam fun_tx_ll_1m_phy ,mem_le_tx_phy 
+15ac 70443500 jam 0 ,mem_le_l2cap_att_states 
+15ad 202019dc branch le_supervision_flush 
+
+le_init_master:
+15ae 474d4033 bpatchx patch33_2 ,mem_patch33 
+15af 7834fc00 enable master 
+15b0 70028803 jam lemode_master ,mem_le_mode 
+15b1 70443701 jam 1 ,mem_le_att_handle 
+15b2 70099e01 jam 1 ,mem_le_search_handle_start 
+15b3 5800ffff setarg 0xffff 
+15b4 67e109a0 store 2 ,mem_le_search_handle_end 
+15b5 18007e00 force 0 ,pdata 
+15b6 67e2c6a4 store 5 ,mem_ccm_pcnt_rx 
+15b7 79207e27 set1 le_ccm_directionbit ,pdata 
+15b8 67e2c69f store 5 ,mem_ccm_pcnt_tx 
+15b9 2020159b branch le_init_conn 
+
+le_init_slave:
+15ba 474dc033 bpatchx patch33_3 ,mem_patch33 
+15bb 7854fc00 disable master 
+15bc 58000017 setarg 0x17 
+15bd 67e14382 store 2 ,mem_le_remote_mtu 
+15be 1fe0fe04 increase 4 ,pdata 
+15bf 67e14444 store 2 ,mem_remote_rx_max_octets 
+15c0 70028801 jam lemode_slave ,mem_le_mode 
+15c1 70442700 jam 0 ,mem_le_adv_enable 
+15c2 70009d00 jam 0 ,mem_lpm_current_mult 
+15c3 20401626 call le_clear_pairing_state 
+15c4 6fe102b5 fetch 2 ,mem_le_superto 
+15c5 67e14394 store 2 ,mem_le_init_superto 
+15c6 6fe10289 fetch 2 ,mem_le_tsniff 
+15c7 1feffe05 mul32 pdata ,5 ,pdata 
+15c8 1ff1fe00 rshift4 pdata ,pdata 
+15c9 67e102b5 store 2 ,mem_le_superto 
+15ca 2020159b branch le_init_conn 
+
+le_conn_dispatch:
+15cb 474e4033 bpatchx patch33_4 ,mem_patch33 
+15cc 20401651 call le_enable 
+15cd 6fe08287 fetch 1 ,mem_le_state 
+15ce 2feffe04 isolate1 lestate_encryption ,pdata 
+15cf 79208032 setflag true ,mark_ble_encryption ,mark 
+15d0 20403182 call app_process_ble 
+15d1 6fe08288 fetch 1 ,mem_le_mode 
+15d2 c28095d4 bbit1 mode_master ,le_master_dispatch 
+15d3 202015e6 branch le_slave_dispatch 
+
+le_master_dispatch:
+15d4 474ec033 bpatchx patch33_5 ,mem_patch33 
+15d5 7834fc00 enable master 
+15d6 204019d3 call le_supervision_update 
+15d7 202115e3 branch le_master_disconn ,positive 
+15d8 204016a2 call le_setup 
+15d9 20401916 call le_prepare_tx 
+15da 7856fc00 disable match 
+15db 204017d4 call le_transmit_receive_sifs 
+15dc 24768000 nrtn match 
+15dd 6fe08005 fetch 1 ,mem_le_conn_rcv 
+15de 1fe0fe01 increase 1 ,pdata 
+15df 67e08005 store 1 ,mem_le_conn_rcv 
+15e0 204018c7 call le_acknowledge 
+15e1 7854fc00 disable master 
+15e2 20600000 rtn 
+
+le_master_disconn:
+15e3 2040161a call le_disconnect 
+15e4 7854fc00 disable master 
+15e5 20600000 rtn 
+
+le_slave_dispatch:
+15e6 474f4033 bpatchx patch33_6 ,mem_patch33 
+15e7 7043dd00 jam 0 ,mem_le_md_count 
+15e8 793f8030 set0 mark_ble_crc_fail ,mark 
+15e9 20407602 call sp_calc_sequence_256 
+15ea 20402064 call le_secure_connect_sm 
+15eb 78577c00 disable attempt 
+15ec 204019d3 call le_supervision_update 
+15ed 2021161a branch le_slave_disconn ,positive 
+15ee 6fe082bc fetch 1 ,mem_le_rx_phy 
+15ef 20401637 call le_enable_phy_by_pdata 
+15f0 204016a2 call le_setup 
+15f1 204016fa call le_receive_slave 
+15f2 242c160c nbranch le_slave_unsync ,sync 
+15f3 2040162a call le_got_first_packet 
+15f4 203695f7 branch le_slave_match ,match 
+15f5 c51815f7 bmark1 mark_ble_crc_fail ,le_slave_crc_fail 
+15f6 20201606 branch le_slave_cont 
+
+le_slave_crc_fail:
+
+le_slave_match:
+15f7 474fc033 bpatchx patch33_7 ,mem_patch33 
+15f8 6fe0c3dd fetch 1 ,mem_le_md_count 
+15f9 1fe0fe01 pincrease 1 
+15fa 67e0c3dd store 1 ,mem_le_md_count 
+15fb c0061606 beq le_md_max_count ,le_slave_cont 
+15fc 204018c7 call le_acknowledge 
+15fd 20401916 call le_prepare_tx 
+15fe 6fe082bd fetch 1 ,mem_le_tx_phy 
+15ff 20401637 call le_enable_phy_by_pdata 
+1600 204017e2 call le_transmit_norx 
+1601 20401979 call le_parse 
+1602 6fe1446d fetch 2 ,mem_cb_ble_transmit 
+1603 20407e7a call callback_func 
+1604 2040160f call le_check_md 
+1605 20341614 branch le_slave_more_data ,user 
+
+le_slave_cont:
+1606 47504034 bpatchx patch34_0 ,mem_patch34 
+1607 2040202a call le_pairing_sm 
+1608 20402021 call le_check_paring_time 
+1609 204078f2 call check_51cmd 
+160a 6fe082aa fetch 1 ,mem_le_op 
+160b c281961a bbit1 op_disconn ,le_slave_disconn 
+
+le_slave_unsync:
+160c 4750c034 bpatchx patch34_1 ,mem_patch34 
+160d 20401aa6 call le_lpm_set_mult 
+160e 2020105d branch calc_clke_offset 
+
+le_check_md:
+160f 78547c00 disable user 
+1610 c5157ec5 bmark1 mark_ble_rx_md ,enable_user 
+1611 c514fec5 bmark1 mark_ble_tx_md ,enable_user 
+1612 c5187ec5 bmark1 mark_ble_crc_fail ,enable_user 
+1613 20600000 rtn 
+
+le_slave_more_data:
+1614 47514034 bpatchx patch34_2 ,mem_patch34 
+1615 78377c00 enable attempt 
+1616 204017d8 call le_transmit_receive_sifs_notx 
+1617 203695f7 branch le_slave_match ,match 
+1618 c51815f7 bmark1 mark_ble_crc_fail ,le_slave_crc_fail 
+1619 20201606 branch le_slave_cont 
+
+le_slave_disconn:
+
+le_disconnect:
+161a 4751c034 bpatchx patch34_3 ,mem_patch34 
+161b 20401621 call le_clear_connection_info 
+161c 20403243 call app_disconn_reason_collect_ble 
+161d 20401626 call le_clear_pairing_state 
+161e 20402072 call le_sc_state_clear 
+161f 70095b15 jam bt_evt_le_disconnected ,mem_fifo_temp 
+1620 202078dc branch ui_ipc_send_event 
+
+le_clear_connection_info:
+1621 d8a044e9 arg mem_used_map ,contw 
+1622 20407d90 call memset0_16 
+1623 70029d00 jam 0 ,mem_le_conn_handle 
+1624 70028800 jam lemode_idle ,mem_le_mode 
+1625 70028700 jam 0 ,mem_le_state 
+
+le_clear_pairing_state:
+1626 47524034 bpatchx patch34_4 ,mem_patch34 
+1627 70439c00 jam flag_le_enc_null ,mem_le_enc_state 
+1628 70439b00 jam flag_le_pairing_null ,mem_le_pairing_state 
+1629 20206f37 branch sp_clear_flags 
+
+le_got_first_packet:
+162a 4752c034 bpatchx patch34_5 ,mem_patch34 
+162b 6fe08005 fetch 1 ,mem_le_conn_rcv 
+162c 1fe0fe01 increase 1 ,pdata 
+162d 67e08005 store 1 ,mem_le_conn_rcv 
+162e 6fe08287 fetch 1 ,mem_le_state 
+162f c3818000 rtnbit1 lestate_got_first_packet 
+1630 79207e03 set1 lestate_got_first_packet ,pdata 
+1631 67e08287 store 1 ,mem_le_state 
+1632 6fe14394 fetch 2 ,mem_le_init_superto 
+1633 67e102b5 store 2 ,mem_le_superto 
+1634 58000000 setarg 0 
+1635 67e243bc store 4 ,mem_le_transmit_window 
+1636 20600000 rtn 
+
+le_enable_phy_by_pdata:
+1637 1fe20400 copy pdata ,temp 
+1638 47534034 bpatchx patch34_6 ,mem_patch34 
+1639 18427e00 copy temp ,pdata 
+163a c2801651 bbit1 bit_le_1m_phy ,le_enable 
+163b c2809640 bbit1 bit_le_2m_phy ,le_enable_2m 
+163c c3011651 bbit0 bit_le_coded_phy ,le_enable 
+163d c283964e bbit1 bit_le_coded_phy_s8 ,le_enable_coded_s8 
+163e c2811646 bbit1 bit_le_coded_phy_s2 ,le_enable_coded_s2 
+163f 20201651 branch le_enable 
+
+le_enable_2m:
+1640 20401651 call le_enable 
+1641 7920002d set1 mark_ble_2m ,mark 
+1642 793f802f set0 mark_ble_lr ,mark 
+1643 70890103 jam 0x03 ,0x8901 
+1644 70892084 jam 0x84 ,0x8920 
+1645 20600000 rtn 
+
+le_enable_coded_s2:
+
+le_enable_coded:
+1646 20401651 call le_enable 
+1647 7920002f set1 mark_ble_lr ,mark 
+1648 793f802e set0 mark_ble_lr_s8 ,mark 
+1649 70890105 jam 0x05 ,0x8901 
+164a 70892080 jam 0x80 ,0x8920 
+164b 70893020 jam 0x20 ,0x8930 
+164c 7089340a jam 0x0a ,0x8934 
+164d 20600000 rtn 
+
+le_enable_coded_s8:
+164e 20401646 call le_enable_coded 
+164f 7920002e set1 mark_ble_lr_s8 ,mark 
+1650 20600000 rtn 
+
+le_enable:
+1651 4753c034 bpatchx patch34_7 ,mem_patch34 
+1652 783b7c00 enable le 
+1653 793f802d set0 mark_ble_2m ,mark 
+1654 793f802f set0 mark_ble_lr ,mark 
+1655 70890101 jam 0x01 ,0x8901 
+1656 70892080 jam 0x80 ,0x8920 
+1657 708925a7 jam 0xa7 ,0x8925 
+1658 70893003 jam 0x03 ,0x8930 
+1659 70893358 jam 0x58 ,0x8933 
+165a 7089340a jam 0x0a ,0x8934 
+165b 70893740 jam 0x40 ,0x8937 
+165c 708a6d09 jam 9 ,core_rx_bq_cfg0 
+165d 20600000 rtn 
+
+le_disable:
+165e 47544035 bpatchx patch35_0 ,mem_patch35 
+165f 785b7c00 disable le 
+1660 793f8032 set0 mark_ble_encryption ,mark 
+1661 70890100 jam 0x00 ,0x8901 
+1662 70892080 jam 0x80 ,0x8920 
+1663 708925a3 jam 0xa3 ,0x8925 
+1664 70893003 jam 0x03 ,0x8930 
+1665 70893368 jam 0x68 ,0x8933 
+1666 70893409 jam 0x09 ,0x8934 
+1667 70893728 jam 0x28 ,0x8937 
+1668 708a6d09 jam 9 ,core_rx_bq_cfg0 
+1669 20600000 rtn 
+
+le_prep:
+166a 7844fc00 disable enable_crc 
+166b 7843fc00 disable enable_white 
+166c 6fe182af fetch 3 ,mem_le_crcinit 
+166d 98001e00 iforce crc24_init 
+166e 6fe08016 fetch 1 ,mem_le_ch_mapped 
+166f 1fed8400 reverse pdata ,temp 
+1670 79200401 set1 1 ,temp 
+1671 18431c00 rshift temp ,white_init 
+1672 20600000 rtn 
+
+le_rx_setfreq:
+1673 2040167c call le_setfreq 
+
+le_rf_rx_enable:
+1674 2040118b call set_freq_rx 
+1675 6fe1015d fetch 2 ,mem_param_pll_setup 
+1676 2040137f call sleep 
+1677 202011a2 branch rf_rx_enable 
+
+le_tx_setfreq:
+1678 20369207 branch txon ,match 
+1679 c5181207 bmark1 mark_ble_crc_fail ,txon 
+
+le_tx_setfreq0:
+167a 2040167c call le_setfreq 
+167b 20201201 branch set_freq_tx 
+
+le_setfreq:
+167c 4754c035 bpatchx patch35_1 ,mem_patch35 
+167d 2040115d call set_sync_on 
+167e 6fe082df fetch 1 ,mem_le_testtype 
+167f 243a168f nbranch le_ctf_test ,blank 
+1680 6fe08016 fetch 1 ,mem_le_ch_mapped 
+1681 1fe67c24 sub pdata ,36 ,null 
+1682 20211689 branch le_ctf_normal ,positive 
+1683 18000400 force 0 ,temp 
+1684 c1128000 rtneq 37 
+1685 18000418 force 24 ,temp 
+1686 c1130000 rtneq 38 
+1687 1800044e force 78 ,temp 
+1688 20600000 rtn 
+
+le_ctf_normal:
+1689 1fe67c0a sub pdata ,10 ,null 
+168a 2021168c branch le_ctf_low ,positive 
+168b 1fe0fe01 increase 1 ,pdata 
+
+le_ctf_low:
+168c 1fe3fe00 lshift pdata ,pdata 
+168d 1fe08402 add pdata ,2 ,temp 
+168e 20600000 rtn 
+
+le_ctf_test:
+168f 6fe08016 fetch 1 ,mem_le_ch_mapped 
+1690 1fe38400 lshift pdata ,temp 
+1691 20600000 rtn 
+
+le_sca_map:
+1692 d84001f4 arg 500 ,temp 
+1693 207a0000 rtn blank 
+1694 d84000fa arg 250 ,temp 
+1695 c1008000 rtneq 1 
+1696 d8400096 arg 150 ,temp 
+1697 c1010000 rtneq 2 
+1698 d8400064 arg 100 ,temp 
+1699 c1018000 rtneq 3 
+169a d840004b arg 75 ,temp 
+169b c1020000 rtneq 4 
+169c d8400032 arg 50 ,temp 
+169d c1028000 rtneq 5 
+169e d8400028 arg 40 ,temp 
+169f c1030000 rtneq 6 
+16a0 d8400014 arg 20 ,temp 
+16a1 20600000 rtn 
+
+le_setup:
+16a2 47554035 bpatchx patch35_2 ,mem_patch35 
+16a3 78287c00 enable swfine 
+16a4 6fe202ab fetch 4 ,mem_le_access 
+16a5 98001200 iforce access 
+16a6 204010ac call calc_mod_value_scale_le 
+16a7 204016d8 call le_map_channel 
+16a8 58000200 setarg 0x200 
+16a9 203496ac branch le_setup_master ,master 
+16aa 6fe10295 fetch 2 ,mem_le_receive_window 
+16ab 1fe37e00 rshift pdata ,pdata 
+
+le_setup_master:
+16ac 6849015d fetcht 2 ,mem_param_pll_setup 
+16ad 9840fe00 iadd temp ,pdata 
+16ae 20401313 call ahead_window 
+16af 1b427e00 deposit clke 
+16b0 20600000 rtn 
+
+le_context_nextevent:
+16b1 4755c035 bpatchx patch35_3 ,mem_patch35 
+16b2 20407d43 call push_stack_rega_b_c 
+16b3 67210987 storer loopcnt ,2 ,mem_loopcnt 
+16b4 1a208c01 add rega ,coffset_mode ,contr 
+16b5 efe08006 ifetch 1 ,contr 
+16b6 c4000000 rtnbit0 mode_le 
+16b7 1a208a1a add rega ,coffset_le_event_cnt ,contw 
+16b8 efe10005 ifetch 2 ,contw 
+16b9 1fe0fe01 increase 1 ,pdata 
+16ba e7e10005 istore 2 ,contw 
+16bb 20401844 call le_update_param 
+16bc 20401869 call le_update_channel_map 
+16bd 20401872 call le_update_phy 
+16be 204016c2 call le_context_nexthop 
+16bf 20407d51 call pop_stack_rega_b_c 
+16c0 6f210987 fetchr loopcnt ,2 ,mem_loopcnt 
+16c1 20600000 rtn 
+
+le_context_nexthop:
+16c2 1a208c19 add rega ,coffset_le_hop ,contr 
+16c3 efe08006 ifetch 1 ,contr 
+16c4 1a208a18 add rega ,coffset_le_ch ,contw 
+16c5 e8408005 ifetcht 1 ,contw 
+16c6 9840fe00 iadd temp ,pdata 
+16c7 1fe67c24 sub pdata ,36 ,null 
+16c8 202116ca branch le_nexthop_nowrap ,positive 
+16c9 1fe0ffdb increase -37 ,pdata 
+
+le_nexthop_nowrap:
+16ca e7e08005 istore 1 ,contw 
+16cb 20600000 rtn 
+
+le_calc_channel_map:
+16cc 1a208c30 add rega ,coffset_le_channel_map ,contr 
+16cd efe28006 ifetch 5 ,contr 
+16ce 18000400 force 0 ,temp 
+16cf 18007225 force 37 ,loopcnt 
+
+le_count_channels_loop:
+16d0 c30016d2 bbit0 0 ,le_count_channels_notused 
+16d1 18408401 increase 1 ,temp 
+
+le_count_channels_notused:
+16d2 1fe37e00 rshift pdata ,pdata 
+16d3 c20016d0 loop le_count_channels_loop 
+16d4 1840ffff add temp ,-1 ,pdata 
+16d5 1a208a22 add rega ,coffset_le_channels ,contw 
+16d6 e7e08005 istore 1 ,contw 
+16d7 20600000 rtn 
+
+le_map_channel:
+16d8 47564035 bpatchx patch35_4 ,mem_patch35 
+16d9 6fe0829f fetch 1 ,mem_le_ch 
+16da 98000e00 iforce queue 
+16db 684a82b7 fetcht 5 ,mem_le_channel_map 
+16dc a84fffff qisolate1 temp 
+16dd 202096ed branch le_map_channel_end ,true 
+
+le_map_channel_next:
+16de 6fe082a9 fetch 1 ,mem_le_channels 
+16df 98e67e00 isub queue ,pdata 
+16e0 202116e3 branch le_map_channel_cont ,positive 
+16e1 1fe60fff sub pdata ,-1 ,queue 
+16e2 202016de branch le_map_channel_next 
+
+le_map_channel_cont:
+16e3 18e27200 copy queue ,loopcnt 
+16e4 18000e00 force 0 ,queue 
+
+le_map_channel_loop:
+16e5 a84fffff qisolate1 temp 
+16e6 202096e8 branch le_map_channel_skip ,true 
+16e7 1f20f201 increase 1 ,loopcnt 
+
+le_map_channel_skip:
+16e8 1f227e00 deposit loopcnt 
+16e9 203a16ed branch le_map_channel_end ,blank 
+16ea 18e08e01 increase 1 ,queue 
+16eb 1f20f3ff increase -1 ,loopcnt 
+16ec 202016e5 branch le_map_channel_loop 
+
+le_map_channel_end:
+16ed 18e27e00 deposit queue 
+16ee 67e08016 store 1 ,mem_le_ch_mapped 
+16ef 20600000 rtn 
+
+le_wait_tx:
+16f0 203496f3 branch le_wait_master ,master 
+16f1 37c18200 until null ,timeout 
+16f2 20600000 rtn 
+
+le_wait_master:
+16f3 d9600ea0 arg 0xea0 ,timeup 
+16f4 34730200 until clkn_rt ,meet 
+16f5 20600000 rtn 
+
+le_receive_adv:
+16f6 78487c00 disable swfine 
+16f7 6fe143e5 fetch 2 ,mem_le_scan_window 
+16f8 1fe21600 copy pdata ,timeup 
+16f9 20201700 branch le_receive_packet 
+
+le_receive_slave:
+16fa 4756c035 bpatchx patch35_5 ,mem_patch35 
+16fb 20401764 call le_dec_init 
+16fc 78287c00 enable swfine 
+16fd 6fe10295 fetch 2 ,mem_le_receive_window 
+16fe 684a43bc fetcht 4 ,mem_le_transmit_window 
+16ff 98409600 iadd temp ,timeup 
+
+le_receive_packet:
+1700 20401673 call le_rx_setfreq 
+
+le_receive_rxon:
+1701 47574035 bpatchx patch35_6 ,mem_patch35 
+1702 2040166a call le_prep 
+1703 c5979708 bmark0 mark_ble_lr ,le_receive_nolr 
+1704 783cfc00 pulse dewhiten_code_calc 
+1705 2000001e nop 30 
+1706 2040166a call le_prep 
+1707 19699600 lshift3 timeup ,timeup 
+
+le_receive_nolr:
+1708 7856fc00 disable match 
+1709 7826fc00 enable decode_fec0 
+170a 7830fc00 enable is_rx 
+170b 78507c00 disable is_tx 
+170c 19623600 copy timeup ,stop_watch 
+170d 37c18400 correlate null ,timeout 
+170e 20371711 branch le_receive_on_attempt ,attempt 
+170f 1b420400 copy clke ,temp 
+1710 604b0097 storet 6 ,mem_sync_clke 
+
+le_receive_on_attempt:
+1711 242c179f nbranch le_unsync_end ,sync 
+1712 4757c035 bpatchx patch35_7 ,mem_patch35 
+1713 78287c00 enable swfine 
+1714 d8404ea9 arg param_t_ifs_150us + param_20ms_init + param_sync_time_difference ,temp 
+1715 6fe0c1f0 fetch 1 ,mem_system_clk 
+1716 984fb600 imul32 temp ,stop_watch 
+1717 20404d0d call rf_debug_rx_sync_line 
+1718 2037171e branch le_receive_skip ,attempt 
+1719 204017a3 call calc_clke_all_modem 
+171a 6fe08287 fetch 1 ,mem_le_state 
+171b c301971e bbit0 lestate_got_first_packet ,le_receive_skip 
+171c 684b0097 fetcht 6 ,mem_sync_clke 
+171d 20559444 call lpm_adjust_clk ,wake 
+
+le_receive_skip:
+171e 2040127f call save_rssi 
+171f 7823fc00 enable enable_white 
+1720 7824fc00 enable enable_crc 
+1721 09800008 parse demod ,bucket ,8 
+1722 19897e00 rshift3 pwindow ,pdata 
+1723 67e0816b store 1 ,mem_le_rxbuf_data_header 
+1724 09800008 parse demod ,bucket ,8 
+1725 19897e00 rshift3 pwindow ,pdata 
+1726 67e0816c store 1 ,mem_le_rxbuf_data_length 
+1727 1fe27200 copy pdata ,loopcnt 
+1728 20229743 branch le_rx_nopayload ,zero 
+1729 c519172f bmark1 mark_ble_encryption ,le_rx_dec 
+
+le_rx_loop:
+172a 09800008 parse demod ,bucket ,8 
+172b 19897e00 rshift3 pwindow ,pdata 
+172c e7e08005 istore 1 ,contw 
+172d c200172a loop le_rx_loop 
+172e 20201743 branch le_rx_nopayload 
+
+le_rx_dec:
+172f 18a22400 copy contw ,regb 
+1730 204018c0 call le_check_retransmit 
+1731 6a20816c fetchr rega ,1 ,mem_le_rxbuf_data_length 
+1732 1a20a3fc increase -4 ,rega 
+1733 24211797 nbranch le_mic_error ,positive 
+1734 20401769 call le_dec_start 
+1735 1a420a00 copy regb ,contw 
+1736 d8400000 arg 0 ,temp 
+1737 6f20816c fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+1738 1f20f3fc increase -4 ,loopcnt 
+1739 20229741 branch le_rx_dec_loop_end ,zero 
+
+le_rx_dec_loop:
+173a 09800008 parse demod ,bucket ,8 
+173b 19897e00 rshift3 pwindow ,pdata 
+173c e7e08005 istore 1 ,contw 
+173d 18408401 increase 1 ,temp 
+173e 18417c0f and temp ,0xf ,null 
+173f 20429786 call le_dec ,zero 
+1740 c200173a loop le_rx_dec_loop 
+
+le_rx_dec_loop_end:
+1741 2040178e call le_dec_end 
+1742 1a420a00 copy regb ,contw 
+
+le_rx_nopayload:
+1743 47584036 bpatchx patch36_0 ,mem_patch36 
+1744 09800018 parse demod ,bucket ,24 
+1745 1fef7e00 rshift32 pdata ,pdata 
+1746 1ff17e00 rshift16 pdata ,pdata 
+1747 e7e18005 istore 3 ,contw 
+1748 78287c00 enable swfine 
+1749 204017b1 call le_set_until_tx_timer 
+174a 2023179b branch le_crc_fail ,crc_failed 
+174b c5991755 bmark0 mark_ble_encryption ,le_rx_match 
+174c 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+174d 203a1755 branch le_rx_match ,blank 
+174e 1fe0fffc increase -4 ,pdata 
+174f 67e0816c store 1 ,mem_le_rxbuf_data_length 
+1750 20406dbb call wait_ccm_done 
+1751 6ff08108 fetch 1 ,core_misc_status 
+1752 c3039797 bbit0 7 ,le_mic_error 
+1753 1800700c force regidx_result ,regext_index 
+1754 65e20273 storer regext ,4 ,mem_le_peer_mic 
+
+le_rx_match:
+1755 20404d0c call rf_debug_rx_crc_line 
+1756 7836fc00 enable match 
+1757 793f8030 set0 mark_ble_crc_fail ,mark 
+
+le_crc_fail_tx:
+1758 20406dbd call ccm_ctrl_clr 
+1759 6fe082bc fetch 1 ,mem_le_rx_phy 
+175a 7d3e7e07 nsetflag ble_coded_info ,bit_le_coded_phy_s8 ,pdata 
+175b 67e082bc store 1 ,mem_le_rx_phy 
+
+le_match_set_txfreq:
+175c 4758c036 bpatchx patch36_1 ,mem_patch36 
+175d 68488017 fetcht 1 ,mem_last_freq 
+175e 1840a202 add temp ,2 ,rega 
+175f c5169761 bmark1 mark_ble_2m ,le_match_set_txfreq_offset 
+1760 1840a202 add temp ,2 ,rega 
+
+le_match_set_txfreq_offset:
+1761 7846fc00 disable decode_fec0 
+1762 2040115d call set_sync_on 
+1763 202011c6 branch rf_tx_write_freq 
+
+le_dec_init:
+1764 c6990000 rtnmark0 mark_ble_encryption 
+1765 20406e2f call load_sk 
+1766 1800700c force regidx_result ,regext_index 
+1767 20406e37 call aes_clear 
+1768 20206e36 branch aes_clear_data 
+
+le_dec_start:
+1769 7080d500 jam 0 ,core_ccm_aad0 
+176a 7080d601 jam 1 ,core_ccm_aad1 
+176b 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+176c 1fe17e03 and_into 0x3 ,pdata 
+176d 67f080d7 store 1 ,core_ccm_aad2 
+176e 5800016d setarg mem_le_rxbuf_data_payload 
+176f 67f100d1 store 2 ,core_ccm_input_playload_addr 
+1770 67f100d3 store 2 ,core_ccm_output_playload_addr 
+1771 6a20816c fetchr rega ,1 ,mem_le_rxbuf_data_length 
+1772 1a20a3fc increase -4 ,rega 
+1773 684ac6a4 fetcht 5 ,mem_ccm_pcnt_rx 
+1774 280ffe0f isolate1 mark_old_packet ,mark 
+1775 2040977c call le_pcnt_rx_sub1 ,true 
+1776 20406cc9 call ccm_b0 
+1777 58000000 setarg 0 
+1778 67f100da store 2 ,core_ccm_inptr 
+1779 70800a06 jam 6 ,core_ccm_ctrl 
+177a 70800a07 jam 7 ,core_ccm_ctrl 
+177b 20600000 rtn 
+
+le_pcnt_rx_sub1:
+177c 18467c00 sub temp ,0 ,null 
+177d 20229781 branch le_pcnt_rx_sub1_0 ,zero 
+177e 184085ff increase -1 ,temp 
+177f 79200427 set1 le_ccm_directionbit ,temp 
+1780 20600000 rtn 
+
+le_pcnt_rx_sub1_0:
+1781 58ffffff setarg 0xffffff 
+1782 1ff07e00 lshift16 pdata ,pdata 
+1783 d840ffff arg 0xffff ,temp 
+1784 98418400 ior temp ,temp 
+1785 20600000 rtn 
+
+le_dec:
+1786 18a22400 copy contw ,regb 
+1787 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+1788 1fe0fffc increase -4 ,pdata 
+1789 98467c00 isub temp ,null 
+178a 20628000 rtn zero 
+178b 605900da storet 2 ,core_ccm_inptr 
+178c 1a420a00 copy regb ,contw 
+178d 20600000 rtn 
+
+le_dec_end:
+178e 09800020 parse demod ,bucket ,32 
+178f 1fef7e00 rshift32 pdata ,pdata 
+1790 1fecfe00 rshift8 pdata ,pdata 
+1791 e7e20005 istore 4 ,contw 
+1792 18a22400 copy contw ,regb 
+1793 18007000 force regidx_data ,regext_index 
+1794 1fe25e00 copy pdata ,regext 
+1795 605900da storet 2 ,core_ccm_inptr 
+1796 20600000 rtn 
+
+le_mic_error:
+1797 202017a1 branch le_end_of_packet 
+
+le_retransmit_end_of_packet:
+1798 204017b1 call le_set_until_tx_timer 
+1799 20400e7c call end_of_packet 
+179a 20201755 branch le_rx_match 
+
+le_crc_fail:
+179b 20404d0e call rf_debug_rx_crc_fail_line 
+179c c518179f bmark1 mark_ble_crc_fail ,le_crc_fail_consecutive 
+179d 79200030 set1 mark_ble_crc_fail ,mark 
+179e 20201758 branch le_crc_fail_tx 
+
+le_unsync_end:
+
+le_crc_fail_consecutive:
+179f 793f8030 set0 mark_ble_crc_fail ,mark 
+17a0 202017a1 branch le_end_of_packet 
+
+le_end_of_packet:
+17a1 20406dbd call ccm_ctrl_clr 
+17a2 20200e7c branch end_of_packet 
+
+calc_clke_all_modem:
+17a3 c51797a9 bmark1 mark_ble_lr ,calc_clke_modem_coded 
+17a4 c51697ad bmark1 mark_ble_2m ,calc_clke_modem_2m 
+17a5 6fe10165 fetch 2 ,mem_param_clke_cal_le_1m 
+17a6 1fe25200 copy pdata ,clke_rt 
+17a7 1c225000 copy bt_clk ,clke_bt 
+17a8 20600000 rtn 
+
+calc_clke_modem_coded:
+17a9 6fe10169 fetch 2 ,mem_param_clke_cal_le_coded 
+17aa 1fe25200 copy pdata ,clke_rt 
+17ab 1c20d001 add bt_clk ,1 ,clke_bt 
+17ac 20600000 rtn 
+
+calc_clke_modem_2m:
+17ad 6fe10167 fetch 2 ,mem_param_clke_cal_le_2m 
+17ae 1fe25200 copy pdata ,clke_rt 
+17af 1c225000 copy bt_clk ,clke_bt 
+17b0 20600000 rtn 
+
+le_set_until_tx_timer:
+17b1 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+17b2 1fe08405 add pdata ,5 ,temp 
+17b3 18498400 lshift3 temp ,temp 
+17b4 6fe082bc fetch 1 ,mem_le_rx_phy 
+17b5 c51797b8 bmark1 mark_ble_lr ,le_set_until_tx_timer_rx_lr 
+17b6 c28017ba bbit1 bit_le_1m_phy ,le_set_until_tx_timer_rx_1m 
+17b7 c28097bb bbit1 bit_le_2m_phy ,le_set_until_tx_timer_rx_2m 
+
+le_set_until_tx_timer_rx_lr:
+17b8 203e17bd branch le_set_until_tx_timer_rx_coded_s2 ,ble_coded_info 
+17b9 202017c0 branch le_set_until_tx_timer_rx_coded_s8 
+
+le_set_until_tx_timer_rx_1m:
+17ba 202017c5 branch le_calc_stop_watch 
+
+le_set_until_tx_timer_rx_2m:
+17bb 18430400 rshift temp ,temp 
+17bc 202017c5 branch le_calc_stop_watch 
+
+le_set_until_tx_timer_rx_coded_s2:
+17bd 18408403 add temp ,3 ,temp 
+17be 18438400 lshift temp ,temp 
+17bf 202017c2 branch le_set_until_tx_timer_rx_coded 
+
+le_set_until_tx_timer_rx_coded_s8:
+17c0 18408403 add temp ,3 ,temp 
+17c1 18498400 lshift3 temp ,temp 
+
+le_set_until_tx_timer_rx_coded:
+17c2 58000028 setarg param_coded_c1_term1_time_40us 
+17c3 98408400 iadd temp ,temp 
+17c4 202017c5 branch le_calc_stop_watch 
+
+le_calc_stop_watch:
+17c5 6fe0c1f0 fetch 1 ,mem_system_clk 
+17c6 984f8400 imul32 temp ,temp 
+17c7 da204e20 arg param_20ms_init ,rega 
+17c8 9a2ffe00 imul32 rega ,pdata 
+17c9 98460400 isub temp ,temp 
+17ca 1b627e00 copy stop_watch ,pdata 
+17cb 98463600 isub temp ,stop_watch 
+17cc 20600000 rtn 
+
+le_transmit_receive_sifs_without_change_mode:
+17cd 204017e4 call le_transmit 
+17ce 68488017 fetcht 1 ,mem_last_freq 
+17cf 2040118b call set_freq_rx 
+17d0 204011a2 call rf_rx_enable 
+17d1 78287c00 enable swfine 
+17d2 d960157c arg 5500 ,timeup 
+17d3 20201701 branch le_receive_rxon 
+
+le_transmit_receive_sifs:
+17d4 47594036 bpatchx patch36_2 ,mem_patch36 
+17d5 6fe082bd fetch 1 ,mem_le_tx_phy 
+17d6 20401637 call le_enable_phy_by_pdata 
+17d7 204017e4 call le_transmit 
+
+le_transmit_receive_sifs_notx:
+17d8 6fe082bc fetch 1 ,mem_le_rx_phy 
+17d9 20401637 call le_enable_phy_by_pdata 
+17da 68488017 fetcht 1 ,mem_last_freq 
+17db 2040118b call set_freq_rx 
+17dc 204011a2 call rf_rx_enable 
+17dd 78287c00 enable swfine 
+17de d960157c arg 5500 ,timeup 
+17df c5979701 bmark0 mark_ble_lr ,le_receive_rxon 
+17e0 d9602134 arg 8500 ,timeup 
+17e1 20201701 branch le_receive_rxon 
+
+le_transmit_norx:
+17e2 204017e4 call le_transmit 
+17e3 20200e7c branch end_of_packet 
+
+le_transmit:
+17e4 4759c036 bpatchx patch36_3 ,mem_patch36 
+17e5 2040166a call le_prep 
+17e6 20401678 call le_tx_setfreq 
+17e7 20404d13 call rf_debug_tx_on_line 
+17e8 79202a00 set1 txgfsk ,radio_ctrl 
+17e9 782efc00 enable encode_fec0 
+17ea 78307c00 enable is_tx 
+17eb 7850fc00 disable is_rx 
+17ec 204016f0 call le_wait_tx 
+17ed 785d7c00 disable lr_s2en 
+17ee c5179826 bmark1 mark_ble_lr ,le_transmit_lr 
+17ef c5169838 bmark1 mark_ble_2m ,le_transmit_2m 
+17f0 19317e00 rshift16 access ,pdata 
+17f1 1fecfe00 rshift8 pdata ,pdata 
+17f2 1ff1fe00 rshift4 pdata ,pdata 
+17f3 08008628 inject mod ,40 
+
+le_transmit_packet:
+17f4 7823fc00 enable enable_white 
+17f5 7824fc00 enable enable_crc 
+17f6 475a4036 bpatchx patch36_4 ,mem_patch36 
+17f7 6fe0c1f5 fetch 1 ,mem_le_txheader 
+17f8 08008608 inject mod ,8 
+17f9 efe08006 ifetch 1 ,contr 
+17fa 1fe27200 copy pdata ,loopcnt 
+17fb 08008608 inject mod ,8 
+17fc 1f267c00 sub loopcnt ,0 ,null 
+17fd 20229805 branch le_tr_nopayload ,zero 
+17fe 6ff0800a fetch 1 ,core_ccm_ctrl 
+17ff 203a1801 branch le_transmit_packet_not_enc ,blank 
+1800 c519181b bmark1 mark_ble_encryption ,le_transmit_packet_enc 
+
+le_transmit_packet_not_enc:
+1801 d8c041f7 arg mem_le_txpayload ,contr 
+
+le_tr_loop:
+1802 efe08006 ifetch 1 ,contr 
+1803 08008608 inject mod ,8 
+1804 c2001802 loop le_tr_loop 
+
+le_tr_nopayload:
+1805 78247c00 enable enable_parity 
+1806 08008618 inject mod ,24 
+1807 78447c00 disable enable_parity 
+1808 c597980c bmark0 mark_ble_lr ,le_transmit_skip 
+1809 7843fc00 disable enable_white 
+180a 58000000 setarg 0 
+180b 08008603 inject mod ,3 
+
+le_transmit_skip:
+180c 37d38200 until null ,tx_clear 
+180d 20000064 nop 100 
+180e 784efc00 disable encode_fec0 
+180f 785c7c00 disable encode_fec3 
+1810 2040115d call set_sync_on 
+1811 20404d11 call rf_debug_tx_off_line 
+
+le_check_start_pause_enc:
+1812 6fe0c1f5 fetch 1 ,mem_le_txheader 
+1813 1fe17e03 and pdata ,llid_le_ll ,pdata 
+1814 c1818000 rtnne llid_le_ll 
+1815 6fe0c39c fetch 1 ,mem_le_enc_state 
+1816 c0011901 beq flag_le_enc_pause ,le_clear_enc 
+1817 c1828000 rtnne flag_le_send_start_enc_req 
+1818 6fe0c1f7 fetch 1 ,mem_le_txpayload 
+1819 c00298fc beq ll_start_enc_req ,le_set_enc 
+181a 20600000 rtn 
+
+le_transmit_packet_enc:
+181b 1f20f3fc increase -4 ,loopcnt 
+181c 1f220400 copy loopcnt ,temp 
+181d 20406da8 call ccm_wait_enc 
+181e d8c041f7 arg mem_le_txpayload ,contr 
+
+le_transmit_packet_enc_loop:
+181f efe08006 ifetch 1 ,contr 
+1820 08008608 inject mod ,8 
+1821 c200181f loop le_transmit_packet_enc_loop 
+1822 20406dad call ccm_check_enc_done 
+1823 1de27e00 copy regext ,pdata 
+1824 08008620 inject mod ,32 
+1825 20201805 branch le_tr_nopayload 
+
+le_transmit_lr:
+1826 df20000a arg 10 ,loopcnt 
+
+le_transmit_lr_preamble_loop:
+1827 5800003c setarg 0x3c 
+1828 08008608 inject mod ,8 
+1829 c2001827 loop le_transmit_lr_preamble_loop 
+182a 784efc00 disable encode_fec0 
+182b 783c7c00 enable encode_fec3 
+182c 19317e00 rshift16 access ,pdata 
+182d 1ff17e00 rshift16 pdata ,pdata 
+182e 1ff1fe00 rshift4 pdata ,pdata 
+182f 08008620 inject mod ,32 
+1830 c5171835 bmark1 mark_ble_lr_s8 ,le_transmit_lr_s8 
+
+le_transmit_lr_s2:
+1831 58000001 setarg 1 
+1832 08008605 inject mod ,5 
+1833 783d7c00 enable lr_s2en 
+1834 202017f4 branch le_transmit_packet 
+
+le_transmit_lr_s8:
+1835 58000000 setarg 0 
+1836 08008605 inject mod ,5 
+1837 202017f4 branch le_transmit_packet 
+
+le_transmit_2m:
+1838 6fe0c1f0 fetch 1 ,mem_system_clk 
+1839 1fe37200 rshift pdata ,loopcnt 
+
+le_transmit_2m_dealy:
+183a 20000002 nop 2 
+183b c200183a loop le_transmit_2m_dealy 
+183c 19317e00 rshift16 access ,pdata 
+183d 1fecfe00 rshift8 pdata ,pdata 
+183e 1ff18400 rshift4 pdata ,temp 
+183f 18427e00 copy temp ,pdata 
+1840 08008608 inject mod ,8 
+1841 18427e00 copy temp ,pdata 
+1842 08008628 inject mod ,40 
+1843 202017f4 branch le_transmit_packet 
+
+le_update_param:
+1844 da601848 arg le_update_param_ahead1_cb ,regc 
+1845 da40185c arg le_update_param_cb ,regb 
+1846 d8e00005 arg lestate_update_param ,queue 
+1847 202018a0 branch le_check_update_flag 
+
+le_update_param_ahead1_cb:
+1848 1a208c04 add rega ,coffset_sniff_anchor ,contr 
+1849 e8420006 ifetcht 4 ,contr 
+184a 1a208c37 add rega ,coffest_le_new_transmitwindowsize ,contr 
+184b efe08006 ifetch 1 ,contr 
+184c 1a208a2b add rega ,coffset_le_window_size ,contw 
+184d e7e08005 istore 1 ,contw 
+184e efe10006 ifetch 2 ,contr 
+184f 1febfe00 lshift2 pdata ,pdata 
+1850 98409600 iadd temp ,timeup 
+1851 1a208a04 add rega ,coffset_sniff_anchor ,contw 
+1852 19627e00 deposit timeup 
+1853 e7e20005 istore 4 ,contw 
+1854 efe10006 ifetch 2 ,contr 
+1855 1febfe00 lshift2 pdata ,pdata 
+1856 1a208a02 add rega ,coffset_tsniff ,contw 
+1857 e7e10005 istore 2 ,contw 
+1858 efe20006 ifetch 4 ,contr 
+1859 1a208a2c add rega ,coffset_le_slave_latency ,contw 
+185a e7e20005 istore 4 ,contw 
+185b 202019df branch le_receive_window_size 
+
+le_update_param_cb:
+185c efe08011 ifetch 1 ,rega 
+185d 793ffe03 set0 lestate_got_first_packet ,pdata 
+185e e7e08011 istore 1 ,rega 
+185f 6fe102b5 fetch 2 ,mem_le_superto 
+1860 67e14394 store 2 ,mem_le_init_superto 
+1861 62210970 storer rega ,2 ,mem_rega 
+1862 70095b44 jam bt_evt_le_parse_conn_param_accepted ,mem_fifo_temp 
+1863 204078dc call ui_ipc_send_event 
+1864 6a210970 fetchr rega ,2 ,mem_rega 
+1865 1a208c2e add rega ,coffset_le_slave_superto ,contr 
+1866 efe10006 ifetch 2 ,contr 
+1867 67e14394 store 2 ,mem_le_init_superto 
+1868 20600000 rtn 
+
+le_update_channel_map:
+1869 da600000 arg 0 ,regc 
+186a da40186d arg le_update_channel_map_cb ,regb 
+186b d8e00006 arg lestate_update_map ,queue 
+186c 202018a0 branch le_check_update_flag 
+
+le_update_channel_map_cb:
+186d 1a208c37 add rega ,coffset_le_new_map ,contr 
+186e efe28006 ifetch 5 ,contr 
+186f 1a208a30 add rega ,coffset_le_channel_map ,contw 
+1870 e7e28005 istore 5 ,contw 
+1871 202016cc branch le_calc_channel_map 
+
+le_update_phy:
+1872 da600000 arg 0 ,regc 
+1873 da401876 arg le_update_phy_cb ,regb 
+1874 d8e00007 arg lestate_update_phy ,queue 
+1875 202018a0 branch le_check_update_flag 
+
+le_update_phy_cb:
+1876 1a208c37 add rega ,coffset_le_new_m2s_phy ,contr 
+1877 efe08006 ifetch 1 ,contr 
+1878 20401883 call le_update_phy_cb_m2s 
+1879 e7e08005 istore 1 ,contw 
+187a 1a208c38 add rega ,coffset_le_new_s2m_phy ,contr 
+187b efe08006 ifetch 1 ,contr 
+187c 20401891 call le_update_phy_cb_s2m 
+187d e7e08005 istore 1 ,contw 
+187e 62210970 storer rega ,2 ,mem_rega 
+187f 70095b42 jam bt_evt_le_update_phy ,mem_fifo_temp 
+1880 204078dc call ui_ipc_send_event 
+1881 6a210970 fetchr rega ,2 ,mem_rega 
+1882 20600000 rtn 
+
+le_update_phy_cb_m2s:
+1883 205a188b call le_update_phy_cb_m2s_no_change ,blank 
+1884 1a208a35 add rega ,coffset_le_rx_phy ,contw 
+1885 24748000 nrtn master 
+1886 6848c442 fetcht 1 ,mem_le_tx_phys 
+1887 284ffe07 isolate1 bit_le_coded_phy_s8 ,temp 
+1888 7920fe07 setflag true ,bit_le_coded_phy_s8 ,pdata 
+1889 1a208a36 add rega ,coffset_le_tx_phy ,contw 
+188a 20600000 rtn 
+
+le_update_phy_cb_m2s_no_change:
+188b 1a208c35 add rega ,coffset_le_rx_phy ,contr 
+188c efe08006 ifetch 1 ,contr 
+188d 24748000 nrtn master 
+188e 1a208c36 add rega ,coffset_le_tx_phy ,contr 
+188f efe08006 ifetch 1 ,contr 
+1890 20600000 rtn 
+
+le_update_phy_cb_s2m:
+1891 205a189a call le_update_phy_cb_s2m_no_change ,blank 
+1892 6848c442 fetcht 1 ,mem_le_tx_phys 
+1893 284ffe07 isolate1 bit_le_coded_phy_s8 ,temp 
+1894 7920fe07 setflag true ,bit_le_coded_phy_s8 ,pdata 
+1895 1a208a36 add rega ,coffset_le_tx_phy ,contw 
+1896 24748000 nrtn master 
+1897 793ffe07 set0 bit_le_coded_phy_s8 ,pdata 
+1898 1a208a35 add rega ,coffset_le_rx_phy ,contw 
+1899 20600000 rtn 
+
+le_update_phy_cb_s2m_no_change:
+189a 1a208c36 add rega ,coffset_le_tx_phy ,contr 
+189b efe08006 ifetch 1 ,contr 
+189c 24748000 nrtn master 
+189d 1a208c35 add rega ,coffset_le_rx_phy ,contr 
+189e efe08006 ifetch 1 ,contr 
+189f 20600000 rtn 
+
+le_check_update_flag:
+18a0 efe08011 ifetch 1 ,rega 
+18a1 afec0000 qisolate0 pdata 
+18a2 20608000 rtn true 
+18a3 1a208c1a add rega ,coffset_le_event_cnt ,contr 
+18a4 e8410006 ifetcht 2 ,contr 
+18a5 1a208c20 add rega ,coffset_le_instant ,contr 
+18a6 efe10006 ifetch 2 ,contr 
+18a7 98467e00 isub temp ,pdata 
+18a8 202298af branch le_update ,zero 
+18a9 242118b4 nbranch le_check_update_small ,positive 
+18aa 1fe67c01 sub pdata ,1 ,null 
+18ab 202298ad branch le_update_ahead1 ,zero 
+18ac 20600000 rtn 
+
+le_update_ahead1:
+18ad 1a627e00 copy regc ,pdata 
+18ae 20207e7a branch callback_func 
+
+le_update:
+18af efe08011 ifetch 1 ,rega 
+18b0 f93ffe00 qset0 pdata 
+18b1 e7e08011 istore 1 ,rega 
+18b2 1a427e00 copy regb ,pdata 
+18b3 20207e7a branch callback_func 
+
+le_check_update_small:
+18b4 1a208c1a add rega ,coffset_le_event_cnt ,contr 
+18b5 efe10006 ifetch 2 ,contr 
+18b6 1a208c20 add rega ,coffset_le_instant ,contr 
+18b7 efe10006 ifetch 2 ,contr 
+18b8 98467e00 isub temp ,pdata 
+18b9 d840ffff arg 0xffff ,temp 
+18ba 98467c00 isub temp ,null 
+18bb 202298af branch le_update ,zero 
+18bc d840f000 arg 0xf000 ,temp 
+18bd 98467c00 isub temp ,null 
+18be 242118af nbranch le_update ,positive 
+18bf 20600000 rtn 
+
+le_check_retransmit:
+18c0 6848829e fetcht 1 ,mem_le_arq 
+18c1 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+18c2 1fe37e00 rshift pdata ,pdata 
+18c3 9842fe00 ixor temp ,pdata 
+18c4 2feffe02 isolate1 nesn ,pdata 
+18c5 7920800f setflag true ,mark_old_packet ,mark 
+18c6 20600000 rtn 
+
+le_acknowledge:
+18c7 475ac036 bpatchx patch36_5 ,mem_patch36 
+18c8 204019dc call le_supervision_flush 
+18c9 c6180000 rtnmark1 mark_ble_crc_fail 
+18ca 204018ee call le_check_wak 
+18cb 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+18cc 2feffe04 isolate1 md ,pdata 
+18cd 7920802a setflag true ,mark_ble_rx_md ,mark 
+18ce 1fe37e00 rshift pdata ,pdata 
+18cf 9842fe00 ixor temp ,pdata 
+18d0 2feffe02 isolate1 nesn ,pdata 
+18d1 7920800f setflag true ,mark_old_packet ,mark 
+18d2 c6078000 rtnmark1 mark_old_packet 
+18d3 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+18d4 203a18e0 branch le_ack_unenc ,blank 
+18d5 6fe08287 fetch 1 ,mem_le_state 
+18d6 c30218e0 bbit0 lestate_encryption ,le_ack_unenc 
+18d7 684a0273 fetcht 4 ,mem_le_peer_mic 
+18d8 6fe246a9 fetch 4 ,mem_ccm_last_mic 
+18d9 98467c00 isub temp ,null 
+18da 2022937c branch assert ,zero 
+18db 604a46a9 storet 4 ,mem_ccm_last_mic 
+18dc 6fe2c6a4 fetch 5 ,mem_ccm_pcnt_rx 
+18dd 1fe0fe01 increase 1 ,pdata 
+18de 79207e27 set1 le_ccm_directionbit ,pdata 
+18df 67e2c6a4 store 5 ,mem_ccm_pcnt_rx 
+
+le_ack_unenc:
+18e0 6848829e fetcht 1 ,mem_le_arq 
+18e1 79400402 setflip nesn ,temp 
+18e2 6048829e storet 1 ,mem_le_arq 
+18e3 6fe0c3c0 fetch 1 ,mem_le_configuration 
+18e4 c4030000 rtnbit0 bit_ble_deal_bb_packet 
+18e5 475b4036 bpatchx patch36_6 ,mem_patch36 
+18e6 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+18e7 207a0000 rtn blank 
+18e8 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+18e9 2fe00601 compare llid_continue ,pdata ,3 
+18ea 20209ed7 branch le_parse_writing_attribute_continue ,true 
+18eb 2fe00602 compare llid_start ,pdata ,3 
+18ec 20209ec5 branch le_parse_writing_attribute_start ,true 
+18ed 20600000 rtn 
+
+le_check_wak:
+18ee 475bc036 bpatchx patch36_7 ,mem_patch36 
+18ef 6848829e fetcht 1 ,mem_le_arq 
+18f0 284c0005 isolate0 wak ,temp 
+18f1 20608000 rtn true 
+18f2 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+18f3 1fe3fe00 lshift pdata ,pdata 
+18f4 9842fe00 ixor temp ,pdata 
+18f5 c4018000 rtnbit0 sn 
+18f6 793f8405 set0 wak ,temp 
+18f7 79400403 setflip sn ,temp 
+18f8 6048829e storet 1 ,mem_le_arq 
+18f9 28400603 compare 3 ,temp ,3 
+18fa 24608000 nrtn true 
+18fb 20600000 rtn 
+
+le_set_enc:
+18fc 6fe08287 fetch 1 ,mem_le_state 
+18fd 79207e04 set1 lestate_encryption ,pdata 
+18fe 67e08287 store 1 ,mem_le_state 
+18ff 79200032 set1 mark_ble_encryption ,mark 
+1900 20600000 rtn 
+
+le_clear_enc:
+1901 475c4037 bpatchx patch37_0 ,mem_patch37 
+1902 70439c00 jam flag_le_enc_null ,mem_le_enc_state 
+1903 dfe00000 arg 0 ,pdata 
+1904 67e246a9 store 4 ,mem_ccm_last_mic 
+1905 67e2c69f store 5 ,mem_ccm_pcnt_tx 
+1906 79207e27 set1 le_ccm_directionbit ,pdata 
+1907 67e2c6a4 store 5 ,mem_ccm_pcnt_rx 
+1908 6fe08287 fetch 1 ,mem_le_state 
+1909 793ffe04 set0 lestate_encryption ,pdata 
+190a 67e08287 store 1 ,mem_le_state 
+190b 793f8032 set0 mark_ble_encryption ,mark 
+190c 20600000 rtn 
+
+le_scan_check_sender_addr_type:
+190d da200001 arg 1 ,rega 
+190e 6fe0816b fetch 1 ,mem_le_rxbuf_adv_connect_ind_header 
+190f c3830000 rtnbit1 le_sender_addr_bit 
+1910 da200000 arg 0 ,rega 
+1911 20600000 rtn 
+
+le_get_master_rx_max:
+1912 18c20a00 copy contr ,contw 
+1913 68494444 fetcht 2 ,mem_remote_rx_max_octets 
+1914 18a20c00 copy contw ,contr 
+1915 20600000 rtn 
+
+le_prepare_tx:
+1916 475cc037 bpatchx patch37_1 ,mem_patch37 
+1917 6fe0829e fetch 1 ,mem_le_arq 
+1918 c3828000 rtnbit1 wak 
+1919 20401937 call le_check_tx_md 
+191a 20401b0d call le_fifo_get_first_tx_ptr 
+191b 203a195b branch le_send_empty ,blank 
+191c efe10006 ifetch 2 ,contr 
+191d e8410006 ifetcht 2 ,contr 
+191e 18422200 copy temp ,rega 
+191f 9a267e00 isub rega ,pdata 
+1920 20401912 call le_get_master_rx_max 
+1921 20407ebb call not_greater_than 
+1922 1fe20400 copy pdata ,temp 
+1923 e8208006 ifetchr type ,1 ,contr 
+1924 1a227e00 copy rega ,pdata 
+1925 98c0fe00 iadd contr ,pdata 
+1926 67e1097b store 2 ,mem_contr 
+1927 2040194b call le_update_tx_type 
+1928 2040195d call le_send_packet 
+1929 20401b0d call le_fifo_get_first_tx_ptr 
+192a efe10006 ifetch 2 ,contr 
+192b 1fe22200 copy pdata ,rega 
+192c 18c22600 copy contr ,regc 
+192d e8410006 ifetcht 2 ,contr 
+192e 18422400 copy temp ,regb 
+192f 9a467e00 isub regb ,pdata 
+1930 20401912 call le_get_master_rx_max 
+1931 20407ebb call not_greater_than 
+1932 9a40fe00 iadd regb ,pdata 
+1933 e7e10013 istore 2 ,regc 
+1934 9a267c00 isub rega ,null 
+1935 24628000 nrtn zero 
+1936 20201b26 branch le_fifo_release_first_node 
+
+le_check_tx_md:
+1937 2040193e call le_check_continue 
+1938 c6148000 rtnmark1 mark_ble_tx_md 
+1939 6fe0c3c0 fetch 1 ,mem_le_configuration 
+193a c3011949 bbit0 bit_ble_transmit_packet_by_md ,le_clear_md 
+193b 20401b10 call le_fifo_get_second_tx_ptr 
+193c 203a1949 branch le_clear_md ,blank 
+193d 20201947 branch le_set_md 
+
+le_check_continue:
+193e 20401b0d call le_fifo_get_first_tx_ptr 
+193f 203a1949 branch le_clear_md ,blank 
+1940 efe10006 ifetch 2 ,contr 
+1941 e8410006 ifetcht 2 ,contr 
+1942 98462200 isub temp ,rega 
+1943 20401912 call le_get_master_rx_max 
+1944 18427e00 copy temp ,pdata 
+1945 9a267c00 isub rega ,null 
+1946 20211949 branch le_clear_md ,positive 
+
+le_set_md:
+1947 79200029 set1 mark_ble_tx_md ,mark 
+1948 20600000 rtn 
+
+le_clear_md:
+1949 793f8029 set0 mark_ble_tx_md ,mark 
+194a 20600000 rtn 
+
+le_update_tx_type:
+194b 1a227e00 copy rega ,pdata 
+194c 207a0000 rtn blank 
+194d d8200001 arg llid_continue ,type 
+194e 20600000 rtn 
+
+le_att_check_notification_enable:
+194f 475d4037 bpatchx patch37_2 ,mem_patch37 
+1950 18408401 increase 1 ,temp 
+1951 20401a0e call le_att_get_handle_ptr 
+1952 18c08dfe increase -2 ,contr 
+1953 efe10006 ifetch 2 ,contr 
+1954 d8402902 arg client_charactertic_configuration ,temp 
+1955 98467c00 isub temp ,null 
+1956 24628000 nrtn zero 
+1957 18c08c01 increase 1 ,contr 
+1958 18c22200 copy contr ,rega 
+1959 efe08006 ifetch 1 ,contr 
+195a 20600000 rtn 
+
+le_send_empty:
+195b 18000400 force 0 ,temp 
+195c 18000201 force 1 ,type 
+
+le_send_packet:
+195d 475dc037 bpatchx patch37_3 ,mem_patch37 
+195e 6048c1f6 storet 1 ,mem_le_txlen 
+195f 6848829e fetcht 1 ,mem_le_arq 
+1960 79200405 set1 wak ,temp 
+1961 18417efc and temp ,0xfc ,pdata 
+1962 9821fe00 ior type ,pdata 
+1963 67e0829e store 1 ,mem_le_arq 
+1964 1fe17e1f and_into 0x1f ,pdata 
+1965 280ffe29 isolate1 mark_ble_tx_md ,mark 
+1966 7920fe04 setflag true ,md ,pdata 
+1967 67e0c1f5 store 1 ,mem_le_txheader 
+1968 6fe0c1f5 fetch 1 ,mem_le_txheader 
+1969 28200601 compare 1 ,type ,3 
+196a 2420996d nbranch le_send_no_txlen ,true 
+196b 6fe0c1f6 fetch 1 ,mem_le_txlen 
+196c 207a0000 rtn blank 
+
+le_send_no_txlen:
+196d c5191973 bmark1 mark_ble_encryption ,le_send_packet_enc 
+196e 6f20c1f6 fetchr loopcnt ,1 ,mem_le_txlen 
+196f 6fe1097b fetch 2 ,mem_contr 
+1970 1fe20c00 copy pdata ,contr 
+1971 d8a041f7 arg mem_le_txpayload ,contw 
+1972 20207dc7 branch memcpy_fast 
+
+le_send_packet_enc:
+1973 20406e2f call load_sk 
+1974 20206d8f branch le_encrypt_new_start 
+
+get_lpm_wake_ble_rx_lock:
+1975 d8e00000 arg wake_lock_ble_rx ,queue 
+1976 20201566 branch lpm_get_wake_lock 
+
+put_lpm_wake_ble_rx_lock:
+1977 d8e00000 arg wake_lock_ble_rx ,queue 
+1978 2020156a branch lpm_put_wake_lock 
+
+le_parse:
+1979 475e4037 bpatchx patch37_4 ,mem_patch37 
+197a c6078000 rtnmark1 mark_old_packet 
+197b c6180000 rtnmark1 mark_ble_crc_fail 
+197c 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+197d 1fe17e03 and pdata ,0x3 ,pdata 
+197e 67e0c3d3 store 1 ,mem_le_packet_llid 
+197f 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+1980 207a0000 rtn blank 
+1981 5800016d setarg mem_le_rxbuf_data_payload 
+1982 67e143d8 store 2 ,mem_le_payload_ptr 
+1983 475ec037 bpatchx patch37_5 ,mem_patch37 
+1984 6fe0c3d3 fetch 1 ,mem_le_packet_llid 
+1985 c001a0b8 beq llid_le_ll ,le_parse_ll 
+
+le_parse_l2cap:
+1986 20401993 call le_check_l2cap_complete 
+1987 24341975 nbranch get_lpm_wake_ble_rx_lock ,user 
+1988 20401977 call put_lpm_wake_ble_rx_lock 
+1989 58000000 setarg 0 
+198a 67e143d6 store 2 ,mem_le_packet_len_recved 
+198b 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+198c 1fe08c02 add pdata ,2 ,contr 
+198d 475f4037 bpatchx patch37_6 ,mem_patch37 
+198e efe10006 ifetch 2 ,contr 
+198f c0021c7d beq le_l2cap_cid_att ,le_parse_att 
+1990 c0031f39 beq le_l2cap_cid_smp ,le_parse_smp 
+1991 c0029efb beq le_l2cap_cid_signal ,le_parse_signaling 
+1992 20600000 rtn 
+
+le_check_l2cap_complete:
+1993 6fe0c3d3 fetch 1 ,mem_le_packet_llid 
+1994 c00119a2 beq llid_start ,le_check_l2cap_llid_start 
+1995 c00099b9 beq llid_continue ,le_check_l2cap_llid_continue 
+1996 20600000 rtn 
+
+le_check_l2cap_cid_legal:
+1997 20407ec5 call enable_user 
+1998 d8400004 arg le_l2cap_cid_att ,temp 
+1999 9fe67c00 isub pdata ,null 
+199a 20628000 rtn zero 
+199b d8400005 arg le_l2cap_cid_signal ,temp 
+199c 9fe67c00 isub pdata ,null 
+199d 20628000 rtn zero 
+199e d8400006 arg le_l2cap_cid_smp ,temp 
+199f 9fe67c00 isub pdata ,null 
+19a0 20628000 rtn zero 
+19a1 20207ec7 branch disable_user 
+
+le_check_l2cap_llid_start:
+19a2 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+19a3 1fe20c00 copy pdata ,contr 
+19a4 efe10006 ifetch 2 ,contr 
+19a5 67e143d4 store 2 ,mem_le_l2cap_size 
+19a6 efe10006 ifetch 2 ,contr 
+19a7 20401997 call le_check_l2cap_cid_legal 
+19a8 24740000 nrtn user 
+19a9 6848816c fetcht 1 ,mem_le_rxbuf_data_length 
+19aa 604943d6 storet 2 ,mem_le_packet_len_recved 
+19ab 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+19ac 1fe0fe04 increase 4 ,pdata 
+19ad 98467c00 isub temp ,null 
+19ae 2022fec5 branch enable_user ,zero 
+19af 6f20816c fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+19b0 d8a01000 arg mem_le_l2cap_buf ,contw 
+19b1 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+19b2 1fe20c00 copy pdata ,contr 
+19b3 20407dc7 call memcpy_fast 
+19b4 20207ec7 branch disable_user 
+
+le_check_l2cap_continue_legal:
+19b5 20407ec5 call enable_user 
+19b6 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+19b7 247a0000 nrtn blank 
+19b8 20207ec7 branch disable_user 
+
+le_check_l2cap_llid_continue:
+19b9 204019b5 call le_check_l2cap_continue_legal 
+19ba 24740000 nrtn user 
+19bb 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+19bc d8a01000 arg mem_le_l2cap_buf ,contw 
+19bd 98a0a200 iadd contw ,rega 
+19be 6848816c fetcht 1 ,mem_le_rxbuf_data_length 
+19bf 9840fe00 iadd temp ,pdata 
+19c0 67e143d6 store 2 ,mem_le_packet_len_recved 
+19c1 6f20816c fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+19c2 1a220a00 copy rega ,contw 
+19c3 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+19c4 1fe20c00 copy pdata ,contr 
+19c5 20407dc7 call memcpy_fast 
+19c6 58001000 setarg mem_le_l2cap_buf 
+19c7 67e143d8 store 2 ,mem_le_payload_ptr 
+19c8 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+19c9 1fe0fe04 increase 4 ,pdata 
+19ca 684943d6 fetcht 2 ,mem_le_packet_len_recved 
+19cb 98467c00 isub temp ,null 
+19cc 2022fec5 branch enable_user ,zero 
+19cd 20207ec7 branch disable_user 
+
+le_get_search_att_uuid:
+19ce 20407d5e call store_contr 
+19cf d8a04359 arg mem_le_search_uuid_length ,contw 
+19d0 20201ebf branch le_get_search_common 
+
+le_writeatt_cb:
+19d1 6fe1446b fetch 2 ,mem_cb_att_write 
+19d2 20207e7a branch callback_func 
+
+le_supervision_update:
+19d3 684a02a3 fetcht 4 ,mem_le_supervision_timer 
+19d4 2040136b call get_clkbt 
+19d5 98461600 isub temp ,timeup 
+19d6 19627e00 deposit timeup 
+19d7 684902b5 fetcht 2 ,mem_le_superto 
+19d8 18520400 lshift4 temp ,temp 
+19d9 18438400 lshift temp ,temp 
+19da 98467e00 isub temp ,pdata 
+19db 20600000 rtn 
+
+le_supervision_flush:
+19dc 2040136b call get_clkbt 
+19dd 67e202a3 store 4 ,mem_le_supervision_timer 
+19de 20600000 rtn 
+
+le_receive_window_size:
+19df 475fc037 bpatchx patch37_7 ,mem_patch37 
+19e0 1a208c50 add rega ,coffset_le_peer_sca ,contr 
+19e1 efe08006 ifetch 1 ,contr 
+19e2 20401692 call le_sca_map 
+19e3 1a208c02 add rega ,coffset_tsniff ,contr 
+19e4 efe10006 ifetch 2 ,contr 
+19e5 984ffe00 imul32 temp ,pdata 
+19e6 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+19e7 984ffe00 imul32 temp ,pdata 
+19e8 d84f4240 arg 1000000 ,temp 
+19e9 9846fc00 idiv temp 
+19ea d8400682 arg param_windown_size ,temp 
+19eb 6fe0c1f0 fetch 1 ,mem_system_clk 
+19ec 984f8400 imul32 temp ,temp 
+19ed 1a208c2b add rega ,coffset_le_window_size ,contr 
+19ee efe08006 ifetch 1 ,contr 
+19ef 984ffe00 imul32 temp ,pdata 
+19f0 9840fe00 iadd temp ,pdata 
+19f1 67e243bc store 4 ,mem_le_transmit_window 
+19f2 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+19f3 20407e64 call wait_div_end 
+19f4 18078400 quotient temp 
+19f5 9840fe00 iadd temp ,pdata 
+19f6 1a208a0e add rega ,coffset_rx_window ,contw 
+19f7 e7e10005 istore 2 ,contw 
+19f8 20600000 rtn 
+
+le_init_attlist_search:
+19f9 47604038 bpatchx patch38_0 ,mem_patch38 
+19fa 6fe1099e fetch 2 ,mem_le_search_handle_start 
+19fb 98002400 iforce regb 
+19fc 6fe109a0 fetch 2 ,mem_le_search_handle_end 
+19fd 98002600 iforce regc 
+19fe 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+19ff 98000c00 iforce contr 
+1a00 78347c00 enable user 
+1a01 20600000 rtn 
+
+le_att_handle_inrange:
+1a02 efe10006 ifetch 2 ,contr 
+1a03 1fe17eff and_into 0xff ,pdata 
+1a04 207a0000 rtn blank 
+1a05 9a467c00 isub regb ,null 
+1a06 24610000 nrtn positive 
+1a07 9a667c00 isub regc ,null 
+1a08 20628000 rtn zero 
+1a09 20211a0c branch le_att_handle_blank ,positive 
+1a0a 18007c01 force 1 ,null 
+1a0b 20600000 rtn 
+
+le_att_handle_blank:
+1a0c 18007e00 force 0 ,pdata 
+1a0d 20600000 rtn 
+
+le_att_get_handle_ptr:
+1a0e 20401a11 call le_att_get_handle_ptr2 
+1a0f 20229a1e branch le_att_get_handle_ptr_found ,zero 
+1a10 20600000 rtn 
+
+le_att_get_handle_ptr2:
+1a11 4760c038 bpatchx patch38_1 ,mem_patch38 
+1a12 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+1a13 98000c00 iforce contr 
+
+le_att_get_handle_loop1:
+1a14 efe10006 ifetch 2 ,contr 
+1a15 1fe17eff and_into 0xff ,pdata 
+1a16 207a0000 rtn blank 
+1a17 98467c00 isub temp ,null 
+1a18 20628000 rtn zero 
+1a19 efe08006 ifetch 1 ,contr 
+1a1a 98c08c00 iadd contr ,contr 
+1a1b efe08006 ifetch 1 ,contr 
+1a1c 98c08c00 iadd contr ,contr 
+1a1d 20201a14 branch le_att_get_handle_loop1 
+
+le_att_get_handle_ptr_found:
+1a1e efe08006 ifetch 1 ,contr 
+1a1f 98c08c00 iadd contr ,contr 
+1a20 20600000 rtn 
+
+le_att_get_short_uuid_ptr:
+1a21 47614038 bpatchx patch38_2 ,mem_patch38 
+1a22 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+1a23 98000c00 iforce contr 
+
+le_att_get_short_uuid_loop:
+1a24 efe10006 ifetch 2 ,contr 
+1a25 1fe17eff and_into 0xff ,pdata 
+1a26 207a0000 rtn blank 
+1a27 efe08006 ifetch 1 ,contr 
+1a28 98c08c00 iadd contr ,contr 
+1a29 18c08dfe increase -2 ,contr 
+1a2a efe10006 ifetch 2 ,contr 
+1a2b 98467c00 isub temp ,null 
+1a2c 20628000 rtn zero 
+1a2d efe08006 ifetch 1 ,contr 
+1a2e 98c08c00 iadd contr ,contr 
+1a2f 20201a24 branch le_att_get_short_uuid_loop 
+
+le_att_get_last_handle:
+1a30 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+1a31 98000c00 iforce contr 
+
+le_att_get_last_handle_loop:
+1a32 efe10006 ifetch 2 ,contr 
+1a33 1fe17eff and_into 0xff ,pdata 
+1a34 207a0000 rtn blank 
+1a35 1fe08401 add pdata ,1 ,temp 
+1a36 efe08006 ifetch 1 ,contr 
+1a37 98c08c00 iadd contr ,contr 
+1a38 efe08006 ifetch 1 ,contr 
+1a39 98c08c00 iadd contr ,contr 
+1a3a 18c20a00 copy contr ,contw 
+1a3b 20201a32 branch le_att_get_last_handle_loop 
+
+le_att_get_handle_info_from_ptr:
+1a3c 6fe109b4 fetch 2 ,mem_le_cur_attlist_start_ptr 
+1a3d 20201a40 branch le_att_get_handle_info_fast 
+
+le_att_get_handle_info:
+1a3e 4761c038 bpatchx patch38_3 ,mem_patch38 
+1a3f 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+
+le_att_get_handle_info_fast:
+1a40 98000c00 iforce contr 
+
+le_att_get_handle_loop:
+1a41 efe10006 ifetch 2 ,contr 
+1a42 1fe17eff and_into 0xff ,pdata 
+1a43 203a1a4b branch le_att_unfind_handle ,blank 
+1a44 98467c00 isub temp ,null 
+1a45 20229a4c branch le_att_finded_handle ,zero 
+1a46 efe08006 ifetch 1 ,contr 
+1a47 98c08c00 iadd contr ,contr 
+1a48 efe08006 ifetch 1 ,contr 
+1a49 98c08c00 iadd contr ,contr 
+1a4a 20201a41 branch le_att_get_handle_loop 
+
+le_att_unfind_handle:
+1a4b 20207ecf branch disable_blank 
+
+le_att_finded_handle:
+1a4c efe08006 ifetch 1 ,contr 
+1a4d 67e089ba store 1 ,mem_le_cur_uuid_length 
+1a4e 1fe27200 copy pdata ,loopcnt 
+1a4f d8a009bb arg mem_le_cur_uuid ,contw 
+1a50 20407dc7 call memcpy_fast 
+1a51 efe08006 ifetch 1 ,contr 
+1a52 67e089b3 store 1 ,mem_le_curr_att_len 
+1a53 20407d5e call store_contr 
+1a54 20207ed1 branch enable_blank 
+
+le_modified_name:
+1a55 47624038 bpatchx patch38_4 ,mem_patch38 
+1a56 20401a58 call le_modified_name_att_list 
+1a57 20201a6a branch le_modified_name_adv 
+
+le_modified_name_att_list:
+1a58 d8402a00 arg uuid_chrctr_device_name ,temp 
+1a59 20401a21 call le_att_get_short_uuid_ptr 
+1a5a 207a0000 rtn blank 
+1a5b efe08006 ifetch 1 ,contr 
+1a5c 18c20a00 copy contr ,contw 
+1a5d 6848c2f7 fetcht 1 ,mem_le_name_len 
+1a5e 18427200 copy temp ,loopcnt 
+1a5f 98467c00 isub temp ,null 
+1a60 24211a67 nbranch le_name_length_longer_than_att ,positive 
+1a61 98460400 isub temp ,temp 
+1a62 d8c042f8 arg mem_le_name ,contr 
+1a63 20407dc7 call memcpy_fast 
+1a64 18427200 copy temp ,loopcnt 
+1a65 24429aa2 ncall memcpy_empty ,zero 
+1a66 20600000 rtn 
+
+le_name_length_longer_than_att:
+1a67 1fe27200 copy pdata ,loopcnt 
+1a68 d8c042f8 arg mem_le_name ,contr 
+1a69 20207dc7 branch memcpy_fast 
+
+le_modified_name_adv:
+1a6a da604407 arg mem_le_adv_data_len + 32 ,regc 
+1a6b da2043e8 arg mem_le_adv_data ,rega 
+1a6c 20401a77 call le_modified_name_adv_and_scan 
+1a6d 58000000 setarg 0 
+1a6e 79347e00 setflag user ,0 ,pdata 
+1a6f 67e0895c store 1 ,mem_pdatatemp 
+1a70 da604427 arg mem_le_scan_data_len + 32 ,regc 
+1a71 da204408 arg mem_le_scan_data ,rega 
+1a72 20401a77 call le_modified_name_adv_and_scan 
+1a73 20740000 rtn user 
+1a74 6fe0895c fetch 1 ,mem_pdatatemp 
+1a75 203a137c branch assert ,blank 
+1a76 20600000 rtn 
+
+le_modified_name_adv_and_scan:
+1a77 4762c038 bpatchx patch38_5 ,mem_patch38 
+1a78 20407ec5 call enable_user 
+1a79 20407da1 call clear_temp_block 
+1a7a da400000 arg 0 ,regb 
+1a7b d8a0098f arg mem_le_data_temp ,contw 
+1a7c 20401a91 call le_modified_name_adv_loop 
+1a7d 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1a7e 1fe08401 add pdata ,1 ,temp 
+1a7f 9a40a200 iadd regb ,rega 
+1a80 1a20a202 increase 2 ,rega 
+1a81 1a267c1f sub rega ,0x1f ,null 
+1a82 24211a8f nbranch le_modified_name_adv_and_scan_name_overflow ,positive 
+1a83 e0408005 istoret 1 ,contw 
+1a84 d8400009 arg gap_adtype_local_name_complete ,temp 
+1a85 e0408005 istoret 1 ,contw 
+1a86 98007200 iforce loopcnt 
+1a87 20407dc7 call memcpy_fast 
+1a88 1a222400 copy rega ,regb 
+
+le_modified_name_adv_and_scan_store_data:
+1a89 1a427e00 deposit regb 
+1a8a 67e0898e store 1 ,mem_le_data_len_temp 
+1a8b d8c0098e arg mem_le_data_len_temp ,contr 
+1a8c 5fffffe0 setarg -32 
+1a8d 9a608a00 iadd regc ,contw 
+1a8e 20207d7d branch memcpy32 
+
+le_modified_name_adv_and_scan_name_overflow:
+1a8f 20407ec7 call disable_user 
+1a90 20201a89 branch le_modified_name_adv_and_scan_store_data 
+
+le_modified_name_adv_loop:
+1a91 efe08011 ifetch 1 ,rega 
+1a92 207a0000 rtn blank 
+1a93 1fe0fe01 pincrease 1 
+1a94 e8408006 ifetcht 1 ,contr 
+1a95 18467c09 sub temp ,gap_adtype_local_name_complete ,null 
+1a96 20229aa0 branch le_modified_name_adv_found_name ,zero 
+1a97 9a40a400 iadd regb ,regb 
+1a98 1a220c00 copy rega ,contr 
+1a99 98007200 iforce loopcnt 
+1a9a 20407dc7 call memcpy_fast 
+1a9b 18c22200 copy contr ,rega 
+
+le_modified_name_adv_loop2:
+1a9c 1a227e00 deposit rega 
+1a9d 9a667c00 isub regc ,null 
+1a9e 20610000 rtn positive 
+1a9f 20201a91 branch le_modified_name_adv_loop 
+
+le_modified_name_adv_found_name:
+1aa0 9a20a200 iadd rega ,rega 
+1aa1 20201a9c branch le_modified_name_adv_loop2 
+
+memcpy_empty:
+1aa2 58000020 setarg space 
+1aa3 e7e08005 istore 1 ,contw 
+1aa4 c2001aa2 loop memcpy_empty 
+1aa5 20600000 rtn 
+
+le_lpm_set_mult:
+1aa6 47634038 bpatchx patch38_6 ,mem_patch38 
+1aa7 7855fc00 disable wake 
+1aa8 20371aaa branch le_lpm_set_mult_attempt ,attempt 
+1aa9 24369ab8 nbranch le_lpm_lost ,match 
+
+le_lpm_set_mult_attempt:
+1aaa 20401512 call lpm_match 
+1aab 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+1aac 67e10295 store 2 ,mem_le_receive_window 
+
+le_lpm_set_mult_attempt_match:
+1aad 24369525 nbranch lpm_mult_short ,match 
+1aae c5079525 bmark1 mark_old_packet ,lpm_mult_short 
+1aaf 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+1ab0 243a1525 nbranch lpm_mult_short ,blank 
+1ab1 6fe0c1f6 fetch 1 ,mem_le_txlen 
+1ab2 243a1525 nbranch lpm_mult_short ,blank 
+1ab3 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1ab4 c2829525 bbit1 bit_ble_short_mult ,lpm_mult_short 
+1ab5 6fe08287 fetch 1 ,mem_le_state 
+1ab6 c2829525 bbit1 lestate_update_param ,lpm_mult_short 
+1ab7 20201504 branch lpm_mult_wait_timeout 
+
+le_lpm_lost:
+1ab8 684940c8 fetcht 2 ,mem_rx_window_sniff 
+1ab9 18430400 rshift temp ,temp 
+1aba 6fe10295 fetch 2 ,mem_le_receive_window 
+1abb 9840fe00 iadd temp ,pdata 
+1abc 67e10295 store 2 ,mem_le_receive_window 
+1abd 2020151d branch lpm_lost 
+
+le_set_config_fixed_tk:
+1abe d8e00000 arg bit_ble_passkey_fixed_key ,queue 
+1abf 20201ad6 branch le_set_config 
+
+le_clr_config_fixed_tk:
+1ac0 d8e00000 arg bit_ble_passkey_fixed_key ,queue 
+1ac1 20201ada branch le_clr_config 
+
+le_set_config_fixed_ltk:
+1ac2 d8e00001 arg bit_ble_pairing_fixed_ltk ,queue 
+1ac3 20201ad6 branch le_set_config 
+
+le_clr_config_fixed_ltk:
+1ac4 d8e00001 arg bit_ble_pairing_fixed_ltk ,queue 
+1ac5 20201ada branch le_clr_config 
+
+le_set_config_more_data:
+1ac6 d8e00002 arg bit_ble_transmit_packet_by_md ,queue 
+1ac7 20201ad6 branch le_set_config 
+
+le_clr_config_more_data:
+1ac8 d8e00002 arg bit_ble_transmit_packet_by_md ,queue 
+1ac9 20201ada branch le_clr_config 
+
+le_set_config_read_authentication:
+1aca d8e00003 arg bit_ble_read_auth ,queue 
+1acb 20201ad6 branch le_set_config 
+
+le_clr_config_read_authentication:
+1acc d8e00003 arg bit_ble_read_auth ,queue 
+1acd 20201ada branch le_clr_config 
+
+le_set_config_write_authentication:
+1ace d8e00004 arg bit_ble_write_auth ,queue 
+1acf 20201ad6 branch le_set_config 
+
+le_clr_config_write_authentication:
+1ad0 d8e00004 arg bit_ble_write_auth ,queue 
+1ad1 20201ada branch le_clr_config 
+
+le_set_config_short_mult:
+1ad2 d8e00005 arg bit_ble_short_mult ,queue 
+1ad3 20201ad6 branch le_set_config 
+
+le_clr_config_short_mult:
+1ad4 d8e00005 arg bit_ble_short_mult ,queue 
+1ad5 20201ada branch le_clr_config 
+
+le_set_config:
+1ad6 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1ad7 f9207e00 qset1 pdata 
+1ad8 67e0c3c0 store 1 ,mem_le_configuration 
+1ad9 20600000 rtn 
+
+le_clr_config:
+1ada 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1adb f93ffe00 qset0 pdata 
+1adc 67e0c3c0 store 1 ,mem_le_configuration 
+1add 20600000 rtn 
+
+le_set_fixed_ltk:
+1ade 58112233 setarg 0x112233 
+1adf 67e1c3c1 store 3 ,mem_le_fixed_ltk 
+1ae0 58445566 setarg 0x445566 
+1ae1 e7e18005 istore 3 ,contw 
+1ae2 58778899 setarg 0x778899 
+1ae3 e7e18005 istore 3 ,contw 
+1ae4 58001122 setarg 0x001122 
+1ae5 e7e18005 istore 3 ,contw 
+1ae6 58334455 setarg 0x334455 
+1ae7 e7e18005 istore 3 ,contw 
+1ae8 58000066 setarg 0x66 
+1ae9 e7e08005 istore 1 ,contw 
+1aea 20600000 rtn 
+
+le_set_justwork:
+1aeb 59000302 setarg 0x01000302 
+1aec 67e24350 store 4 ,mem_le_pres 
+1aed 58010010 setarg 0x010010 
+1aee 67e1c354 store 3 ,mem_le_pres_max_keysize 
+1aef 70439d01 jam 1 ,mem_le_pairing_mode 
+1af0 20600000 rtn 
+
+le_fifo_malloc_tx_empty:
+1af1 da200000 arg 0 ,rega 
+1af2 d8200001 arg llid_empty ,type 
+1af3 20201b02 branch le_fifo_malloc_tx 
+
+le_fifo_malloc_tx_ll:
+1af4 d8200003 arg llid_le_ll ,type 
+1af5 20401b02 call le_fifo_malloc_tx 
+1af6 1a427e00 copy regb ,pdata 
+1af7 e7e08005 istore 1 ,contw 
+1af8 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap:
+1af9 18000202 force llid_start ,type 
+1afa 1a20a204 increase 4 ,rega 
+1afb 20401b02 call le_fifo_malloc_tx 
+1afc 1a20a3fc increase -4 ,rega 
+1afd 1a227e00 copy rega ,pdata 
+1afe e7e10005 istore 2 ,contw 
+1aff 1a427e00 copy regb ,pdata 
+1b00 e7e10005 istore 2 ,contw 
+1b01 20600000 rtn 
+
+le_fifo_malloc_tx:
+1b02 4763c038 bpatchx patch38_7 ,mem_patch38 
+1b03 1a20a205 increase 5 ,rega 
+1b04 204052ff call ble_l2cap_malloc 
+1b05 1a20a3fb increase -5 ,rega 
+1b06 1a227e00 copy rega ,pdata 
+1b07 e7e10005 istore 2 ,contw 
+1b08 58000000 setarg 0 
+1b09 e7e10005 istore 2 ,contw 
+1b0a 18227e00 copy type ,pdata 
+1b0b e7e08005 istore 1 ,contw 
+1b0c 20600000 rtn 
+
+le_fifo_get_first_tx_ptr:
+1b0d 20405339 call l2cap_malloc_fifo_out 
+1b0e 1fe20c00 copy pdata ,contr 
+1b0f 20600000 rtn 
+
+le_fifo_get_second_tx_ptr:
+1b10 6fe144f1 fetch 2 ,mem_tx_fifo2_ptr 
+1b11 20600000 rtn 
+
+le_fifo_get_last_tx_ptr:
+1b12 20401b15 call le_fifo_get_last_tx_ptr0 
+1b13 1fe20c00 copy pdata ,contr 
+1b14 20600000 rtn 
+
+le_fifo_get_last_tx_ptr0:
+1b15 6fe144f4 fetch 2 ,mem_tx_fifo3_ptr 
+1b16 20600000 rtn 
+
+le_fifo_get_first_l2cap_ptr:
+1b17 20401b0d call le_fifo_get_first_tx_ptr 
+1b18 18c08c05 increase 5 ,contr 
+1b19 20600000 rtn 
+
+le_fifo_get_first_att_ptr:
+1b1a 20401b0d call le_fifo_get_first_tx_ptr 
+1b1b 18c08c09 increase 9 ,contr 
+1b1c 20600000 rtn 
+
+le_fifo_get_last_att_ptr:
+1b1d 20401b12 call le_fifo_get_last_tx_ptr 
+1b1e 18c08c09 increase 9 ,contr 
+1b1f 20600000 rtn 
+
+le_fifo_get_last_l2cap_ptr:
+1b20 20401b12 call le_fifo_get_last_tx_ptr 
+1b21 18c08c05 increase 5 ,contr 
+1b22 20600000 rtn 
+
+le_fifo_check_full:
+1b23 2020534f branch l2cap_malloc_is_fifo_full 
+
+le_fifo_check_nearly_full:
+1b24 20205352 branch l2cap_malloc_is_fifo_nearly_full 
+
+le_fifo_check_empty:
+1b25 20205355 branch l2cap_malloc_is_fifo_empty 
+
+le_fifo_release_first_node:
+1b26 2020533e branch l2cap_malloc_free 
+
+le_set_dle:
+1b27 67e4444c store 8 ,mem_local_rx_max_octets 
+1b28 20201b39 branch le_set_feature_data_packet_length_extension 
+
+le_set_phys:
+1b29 184122ff and temp ,0xff ,rega 
+1b2a 20401b2d call le_set_tx_phy 
+1b2b 184ca200 rshift8 temp ,rega 
+1b2c 20201b33 branch le_set_rx_phy 
+
+le_set_tx_phy:
+1b2d 6220c442 storer rega ,1 ,mem_le_tx_phys 
+1b2e 2a2ffe01 isolate1 bit_le_2m_phy ,rega 
+1b2f 20409b35 call le_set_feature_2m_phy ,true 
+1b30 2a2ffe02 isolate1 bit_le_coded_phy ,rega 
+1b31 20409b37 call le_set_feature_coded_phy ,true 
+1b32 20600000 rtn 
+
+le_set_rx_phy:
+1b33 6220c443 storer rega ,1 ,mem_le_rx_phys 
+1b34 20201b2e branch le_set_tx_phy + 1 
+
+le_set_feature_2m_phy:
+1b35 d8e00008 arg bit_ll_feature_le_2m_phy ,queue 
+1b36 20201b3b branch le_set_feature 
+
+le_set_feature_coded_phy:
+1b37 d8e0000b arg bit_ll_feature_le_coded_phy ,queue 
+1b38 20201b3b branch le_set_feature 
+
+le_set_feature_data_packet_length_extension:
+1b39 d8e00005 arg bit_ll_feature_le_data_packet_length_extension ,queue 
+1b3a 20201b3b branch le_set_feature 
+
+le_set_feature:
+1b3b 6fe4443a fetch 8 ,mem_le_local_feature 
+1b3c f9207e00 qset1 pdata 
+1b3d 67e4443a store 8 ,mem_le_local_feature 
+1b3e 20600000 rtn 
+
+le_advertising_dispatch:
+1b3f 7002bc01 jam fun_rx_ll_1m_phy ,mem_le_rx_phy 
+1b40 7002bd01 jam fun_tx_ll_1m_phy ,mem_le_tx_phy 
+1b41 20401651 call le_enable 
+1b42 20401b45 call le_scan 
+1b43 20401bc3 call le_adv 
+1b44 2020165e branch le_disable 
+
+le_scan:
+1b45 47644039 bpatchx patch39_0 ,mem_patch39 
+1b46 6fe0c3e2 fetch 1 ,mem_le_scan_enable 
+1b47 c1808000 rtnne le_scan_enable 
+1b48 d8e00002 arg le_scan_interval_timer ,queue 
+1b49 20407de9 call timer_check 
+1b4a 247a0000 nrtn blank 
+1b4b 6fe143e3 fetch 2 ,mem_le_scan_interval 
+1b4c 684943e5 fetcht 2 ,mem_le_scan_window 
+1b4d 98467e00 isub temp ,pdata 
+1b4e d8e00002 arg le_scan_interval_timer ,queue 
+1b4f 20407ddb call timer_init 
+1b50 7854fc00 disable master 
+1b51 20401be4 call le_init_adv 
+1b52 20401b64 call le_wait_adv 
+1b53 24768000 nrtn match 
+1b54 4764c039 bpatchx patch39_1 ,mem_patch39 
+1b55 6fe3016d fetch 6 ,mem_le_rxbuf + 2 
+1b56 67e30297 store 6 ,mem_le_plap 
+1b57 6fe08002 fetch 1 ,mem_le_adv_rcv 
+1b58 1fe0fe01 increase 1 ,pdata 
+1b59 67e08002 store 1 ,mem_le_adv_rcv 
+1b5a 20401b6b call le_create_conn 
+1b5b 20748000 rtn master 
+1b5c 20401c0b call le_send_scan_request 
+1b5d 24768000 nrtn match 
+1b5e 6fe08004 fetch 1 ,mem_le_scanrsp_rcv 
+1b5f 1fe0fe01 increase 1 ,pdata 
+1b60 67e08004 store 1 ,mem_le_scanrsp_rcv 
+1b61 6fe48173 fetch 9 ,mem_le_rxbuf + 8 
+1b62 67e48a01 store 9 ,mem_tmp_buffer 
+1b63 20600000 rtn 
+
+le_wait_adv:
+1b64 47654039 bpatchx patch39_2 ,mem_patch39 
+1b65 20401c56 call le_next_adv_channel 
+1b66 204016f6 call le_receive_adv 
+1b67 6fe08001 fetch 1 ,mem_le_adv_waitcnt 
+1b68 1fe0fe01 increase 1 ,pdata 
+1b69 67e08001 store 1 ,mem_le_adv_waitcnt 
+1b6a 20600000 rtn 
+
+le_create_conn:
+1b6b 4765c039 bpatchx patch39_3 ,mem_patch39 
+1b6c 6fe082e0 fetch 1 ,mem_cmd_le_create_conn 
+1b6d c18d8000 rtnne hci_cmd_le_create_conn 
+1b6e 6fe30297 fetch 6 ,mem_le_plap 
+1b6f 684b436b fetcht 6 ,mem_le_conn_peer_addr 
+1b70 98467c00 isub temp ,null 
+1b71 24628000 nrtn zero 
+1b72 20400a48 call context_new 
+1b73 24628000 nrtn zero 
+1b74 20401b7b call le_connect_request 
+1b75 204015ae call le_init_master 
+1b76 7041db00 jam 0 ,mem_hci_cmd 
+1b77 7002d700 jam 0 ,mem_le_peer_sca 
+1b78 7043e200 jam 0 ,mem_le_scan_enable 
+1b79 7002e000 jam 0 ,mem_cmd_le_create_conn 
+1b7a 20200a30 branch context_save 
+
+le_connect_request:
+1b7b 47664039 bpatchx patch39_4 ,mem_patch39 
+1b7c 18007fff force -1 ,pdata 
+1b7d 38080001 setsect 2 ,1 
+1b7e 67e282b7 store 5 ,mem_le_channel_map 
+1b7f da200287 arg mem_le_state ,rega 
+1b80 204016cc call le_calc_channel_map 
+1b81 18007204 force 4 ,loopcnt 
+1b82 d8a002ab arg mem_le_access ,contw 
+1b83 20405a90 call generate_random_loop 
+1b84 6fe14378 fetch 2 ,mem_le_timeout 
+1b85 67e102b5 store 2 ,mem_le_superto 
+
+le_con_req_hop_retry:
+1b86 180a7e00 random pdata 
+1b87 1fe17e0f and_into 0xf ,pdata 
+1b88 1fe67c04 sub pdata ,4 ,null 
+1b89 20211b86 branch le_con_req_hop_retry ,positive 
+1b8a 67e082a0 store 1 ,mem_le_hop 
+1b8b 67e085a8 store 1 ,mem_tmp1 
+1b8c 4766c039 bpatchx patch39_5 ,mem_patch39 
+1b8d 684941f3 fetcht 2 ,mem_le_conn_interval 
+1b8e 60490289 storet 2 ,mem_le_tsniff 
+1b8f 18422600 copy temp ,regc 
+1b90 1c40fe07 add clkn_bt ,7 ,pdata 
+1b91 9a66fc00 idiv regc 
+1b92 20407e64 call wait_div_end 
+1b93 18072200 remainder rega 
+1b94 9a267e00 isub rega ,pdata 
+1b95 9a60fe00 iadd regc ,pdata 
+1b96 684941f1 fetcht 2 ,mem_le_dsniff 
+1b97 9840fe00 iadd temp ,pdata 
+1b98 67e2028b store 4 ,mem_le_anchor 
+1b99 9c462200 isub clkn_bt ,rega 
+1b9a 1a20a3fa increase -6 ,rega 
+1b9b da402205 arg 0x2205 ,regb 
+1b9c 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+1b9d 7d3a2406 nsetflag blank ,le_sender_addr_bit ,regb 
+1b9e 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+1b9f 7d3a2407 nsetflag blank ,le_receiver_addr_bit ,regb 
+1ba0 1a427e00 copy regb ,pdata 
+1ba1 67e141f5 store 2 ,mem_le_txheader 
+1ba2 6fe3437a fetch 6 ,mem_le_lap 
+1ba3 e7e30005 istore 6 ,contw 
+1ba4 6fe30297 fetch 6 ,mem_le_plap 
+1ba5 e7e30005 istore 6 ,contw 
+1ba6 6fe202ab fetch 4 ,mem_le_access 
+1ba7 e7e20005 istore 4 ,contw 
+1ba8 180a7e00 random pdata 
+1ba9 e7e10005 istore 2 ,contw 
+1baa 180a7e00 random pdata 
+1bab e7e08005 istore 1 ,contw 
+1bac 18007e02 force 2 ,pdata 
+1bad e7e08005 istore 1 ,contw 
+1bae 1a2b7e00 rshift2 rega ,pdata 
+1baf e7e10005 istore 2 ,contw 
+1bb0 1a6b7e00 rshift2 regc ,pdata 
+1bb1 e7e10005 istore 2 ,contw 
+1bb2 47674039 bpatchx patch39_6 ,mem_patch39 
+1bb3 58000000 setarg 0 
+1bb4 e7e10005 istore 2 ,contw 
+1bb5 6fe14378 fetch 2 ,mem_le_timeout 
+1bb6 e7e10005 istore 2 ,contw 
+1bb7 6fe282b7 fetch 5 ,mem_le_channel_map 
+1bb8 e7e28005 istore 5 ,contw 
+1bb9 6fe082a0 fetch 1 ,mem_le_hop 
+1bba d84000a0 arg param_le_sca ,temp 
+1bbb 9841fe00 ior temp ,pdata 
+1bbc e7e08005 istore 1 ,contw 
+1bbd 204017e2 call le_transmit_norx 
+1bbe 580041f5 setarg mem_le_txheader 
+1bbf 1fe08c12 add pdata ,18 ,contr 
+1bc0 efe18006 ifetch 3 ,contr 
+1bc1 67e182af store 3 ,mem_le_crcinit 
+1bc2 20600000 rtn 
+
+le_adv:
+1bc3 70001624 jam 36 ,mem_le_ch_mapped 
+1bc4 70098e00 jam 0 ,mem_le_adv_channel_map_temp 
+
+le_adv_loop:
+1bc5 6fe0c427 fetch 1 ,mem_le_adv_enable 
+1bc6 207a0000 rtn blank 
+1bc7 d8e00000 arg le_adv_interval_timer ,queue 
+1bc8 20407de9 call timer_check 
+1bc9 247a0000 nrtn blank 
+1bca 4767c039 bpatchx patch39_7 ,mem_patch39 
+
+le_adv_loop_tx:
+1bcb 78287c00 enable swfine 
+1bcc 20401be4 call le_init_adv 
+1bcd 20401c56 call le_next_adv_channel 
+1bce 20401bed call le_send_adv_ind 
+1bcf 24369bd7 nbranch le_adv_not_match ,match 
+1bd0 6fe08003 fetch 1 ,mem_le_req_rcv 
+1bd1 1fe0fe01 increase 1 ,pdata 
+1bd2 67e08003 store 1 ,mem_le_req_rcv 
+1bd3 6fe0816b fetch 1 ,mem_le_rxbuf_adv_header 
+1bd4 1fe17e0f and pdata ,0x0f ,pdata 
+1bd5 c0019c1c beq scan_req ,le_send_scan_response 
+1bd6 c0029c2e beq connect_req ,le_parse_connect_req 
+
+le_adv_not_match:
+1bd7 4768403a bpatchx patch3a_0 ,mem_patch3a 
+1bd8 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1bd9 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1bda 98467c00 isub temp ,null 
+1bdb 24229bc5 nbranch le_adv_loop ,zero 
+1bdc 180a7e00 random pdata 
+1bdd d84001ff arg 0x1ff ,temp 
+1bde 98417e00 iand temp ,pdata 
+1bdf 1fe0fefa add pdata ,250 ,pdata 
+1be0 20407d81 call delay 
+1be1 d8e00000 arg le_adv_interval_timer ,queue 
+1be2 6fe14428 fetch 2 ,mem_le_adv_interval 
+1be3 20207ddb branch timer_init 
+
+le_init_adv:
+1be4 4768c03a bpatchx patch3a_1 ,mem_patch3a 
+1be5 7854fc00 disable master 
+
+le_adv_access:
+1be6 588e89be setarg 0x8e89be 
+1be7 1fed7e00 lshift8 pdata ,pdata 
+1be8 1fe1fed6 or_into 0xd6 ,pdata 
+1be9 98001200 iforce access 
+1bea 58555555 setarg 0x555555 
+1beb 67e182af store 3 ,mem_le_crcinit 
+1bec 202010ac branch calc_mod_value_scale_le 
+
+le_send_adv_ind:
+1bed 4769403a bpatchx patch3a_2 ,mem_patch3a 
+1bee 6fe0c42a fetch 1 ,mem_le_adv_type 
+1bef 6848c42b fetcht 1 ,mem_le_adv_own_addr_type 
+1bf0 18520400 lshift4 temp ,temp 
+1bf1 184b8400 lshift2 temp ,temp 
+1bf2 98408400 iadd temp ,temp 
+1bf3 6048c1f5 storet 1 ,mem_le_txheader 
+1bf4 c0009bfe beq adv_direct_ind ,le_send_adv_direct_ind 
+1bf5 6848c3e7 fetcht 1 ,mem_le_adv_data_len 
+1bf6 1840fe06 add temp ,6 ,pdata 
+1bf7 67e0c1f6 store 1 ,mem_le_txlen 
+1bf8 6fe3437a fetch 6 ,mem_le_lap 
+1bf9 67e341f7 store 6 ,mem_le_txpayload 
+1bfa 18427200 copy temp ,loopcnt 
+1bfb d8c043e8 arg mem_le_adv_data ,contr 
+1bfc 20407dc7 call memcpy_fast 
+1bfd 20201c04 branch le_send_adv_transmit 
+
+le_send_adv_direct_ind:
+1bfe 5800000c setarg 12 
+1bff 67e0c1f6 store 1 ,mem_le_txlen 
+1c00 6fe3437a fetch 6 ,mem_le_lap 
+1c01 67e341f7 store 6 ,mem_le_txpayload 
+1c02 6fe341dd fetch 6 ,mem_hci_plap 
+1c03 e7e30005 istore 6 ,contw 
+
+le_send_adv_transmit:
+1c04 4769c03a bpatchx patch3a_3 ,mem_patch3a 
+1c05 6fe08000 fetch 1 ,mem_le_adv_transmit 
+1c06 1fe0fe01 increase 1 ,pdata 
+1c07 67e08000 store 1 ,mem_le_adv_transmit 
+1c08 db600708 arg 1800 ,stop_watch 
+1c09 7856fc00 disable match 
+1c0a 202017cd branch le_transmit_receive_sifs_without_change_mode 
+
+le_send_scan_request:
+1c0b 476a403a bpatchx patch3a_4 ,mem_patch3a 
+1c0c 6fe0c433 fetch 1 ,mem_le_scan_type 
+1c0d c1808000 rtnne le_scan_type_active 
+1c0e 6fe08000 fetch 1 ,mem_le_adv_transmit 
+1c0f 1fe0fe01 increase 1 ,pdata 
+1c10 67e08000 store 1 ,mem_le_adv_transmit 
+1c11 d8400c03 arg 0x0c03 ,temp 
+1c12 6fe0c434 fetch 1 ,mem_le_scan_own_addr_type 
+1c13 7d3a0406 nsetflag blank ,le_sender_addr_bit ,temp 
+1c14 1a227e00 copy rega ,pdata 
+1c15 7d3a0407 nsetflag blank ,le_receiver_addr_bit ,temp 
+1c16 604941f5 storet 2 ,mem_le_txheader 
+1c17 6fe3437a fetch 6 ,mem_le_lap 
+1c18 e7e30005 istore 6 ,contw 
+1c19 6fe30297 fetch 6 ,mem_le_plap 
+1c1a e7e30005 istore 6 ,contw 
+1c1b 202017cd branch le_transmit_receive_sifs_without_change_mode 
+
+le_send_scan_response:
+1c1c 6fe30173 fetch 6 ,mem_le_rxbuf_adv_scan_req_adv_address 
+1c1d 684b437a fetcht 6 ,mem_le_lap 
+1c1e 98467c00 isub temp ,null 
+1c1f 24628000 nrtn zero 
+1c20 d8400004 arg scan_rsp ,temp 
+1c21 6fe0c42b fetch 1 ,mem_le_adv_own_addr_type 
+1c22 7d3a0406 nsetflag blank ,le_sender_addr_bit ,temp 
+1c23 6048c1f5 storet 1 ,mem_le_txheader 
+1c24 6848c407 fetcht 1 ,mem_le_scan_data_len 
+1c25 1840fe06 add temp ,6 ,pdata 
+1c26 67e0c1f6 store 1 ,mem_le_txlen 
+1c27 6fe3437a fetch 6 ,mem_le_lap 
+1c28 67e341f7 store 6 ,mem_le_txpayload 
+1c29 d8c04408 arg mem_le_scan_data ,contr 
+1c2a 18427200 copy temp ,loopcnt 
+1c2b 20407dc7 call memcpy_fast 
+1c2c 204017e2 call le_transmit_norx 
+1c2d 20201bd7 branch le_adv_not_match 
+
+le_parse_connect_req:
+1c2e 6fe30173 fetch 6 ,mem_le_rxbuf_adv_connect_ind_adv_address 
+1c2f 684b437a fetcht 6 ,mem_le_lap 
+1c30 98467c00 isub temp ,null 
+1c31 24628000 nrtn zero 
+1c32 2040190d call le_scan_check_sender_addr_type 
+1c33 6220c36a storer rega ,1 ,mem_le_conn_peer_addr_type 
+1c34 6fe3016d fetch 6 ,mem_le_rxbuf_adv_connect_ind_init_address 
+1c35 67e30297 store 6 ,mem_le_plap 
+1c36 6fe40179 fetch 8 ,mem_le_rxbuf_adv_connect_ind_access_address 
+1c37 67e402ab store 8 ,mem_le_access 
+1c38 68490181 fetcht 2 ,mem_le_rxbuf_adv_connect_ind_win_offset 
+1c39 476ac03a bpatchx patch3a_5 ,mem_patch3a 
+1c3a 184b8400 lshift2 temp ,temp 
+1c3b 6fe10183 fetch 2 ,mem_le_rxbuf_adv_connect_ind_interval 
+1c3c 1febfe00 lshift2 pdata ,pdata 
+1c3d 67e10289 store 2 ,mem_le_tsniff 
+1c3e 67e2028b store 4 ,mem_le_anchor 
+1c3f 98467e00 isub temp ,pdata 
+1c40 1fe0d1fe add pdata ,-2 ,clke_bt 
+1c41 6fe48185 fetch 9 ,mem_le_rxbuf_adv_connect_ind_latency 
+1c42 67e482b3 store 9 ,mem_le_slave_latency 
+1c43 6fe0818e fetch 1 ,mem_le_rxbuf_adv_connect_ind_hop_and_sca 
+1c44 1fe1041f and pdata ,0x1f ,temp 
+1c45 604882a0 storet 1 ,mem_le_hop 
+1c46 1ff18400 rshift4 pdata ,temp 
+1c47 18430400 rshift temp ,temp 
+1c48 604882d7 storet 1 ,mem_le_peer_sca 
+1c49 da200287 arg mem_le_state ,rega 
+1c4a 204019df call le_receive_window_size 
+1c4b da200287 arg mem_le_state ,rega 
+1c4c 204016cc call le_calc_channel_map 
+1c4d 204015ba call le_init_slave 
+1c4e 20400a48 call context_new 
+1c4f 24628000 nrtn zero 
+1c50 476b403a bpatchx patch3a_6 ,mem_patch3a 
+1c51 2040105d call calc_clke_offset 
+1c52 20401f18 call le_l2cap_reset_signaling_identifier 
+1c53 70095b14 jam bt_evt_le_connected ,mem_fifo_temp 
+1c54 204078dc call ui_ipc_send_event 
+1c55 20200a30 branch context_save 
+
+le_next_adv_channel:
+1c56 476bc03a bpatchx patch3a_7 ,mem_patch3a 
+1c57 6fe08016 fetch 1 ,mem_le_ch_mapped 
+1c58 c0129c5c beq 37 ,le_next_adv_channel_curr_channel_37 
+1c59 c0131c62 beq 38 ,le_next_adv_channel_curr_channel_38 
+1c5a c0139c68 beq 39 ,le_next_adv_channel_curr_channel_39 
+1c5b 20201c68 branch le_next_adv_channel_curr_channel_39 
+
+le_next_adv_channel_curr_channel_37:
+1c5c 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1c5d 284ffe01 isolate1 bit_adv_channel_map_38 ,temp 
+1c5e 20209c73 branch set_le_next_adv_channel_38 ,true 
+1c5f 284ffe02 isolate1 bit_adv_channel_map_39 ,temp 
+1c60 20209c78 branch set_le_next_adv_channel_39 ,true 
+1c61 20201c6e branch set_le_next_adv_channel_37 
+
+le_next_adv_channel_curr_channel_38:
+1c62 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1c63 284ffe02 isolate1 bit_adv_channel_map_39 ,temp 
+1c64 20209c78 branch set_le_next_adv_channel_39 ,true 
+1c65 284ffe00 isolate1 bit_adv_channel_map_37 ,temp 
+1c66 20209c6e branch set_le_next_adv_channel_37 ,true 
+1c67 20201c73 branch set_le_next_adv_channel_38 
+
+le_next_adv_channel_curr_channel_39:
+1c68 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1c69 284ffe00 isolate1 bit_adv_channel_map_37 ,temp 
+1c6a 20209c6e branch set_le_next_adv_channel_37 ,true 
+1c6b 284ffe01 isolate1 bit_adv_channel_map_38 ,temp 
+1c6c 20209c73 branch set_le_next_adv_channel_38 ,true 
+1c6d 20201c78 branch set_le_next_adv_channel_39 
+
+set_le_next_adv_channel_37:
+1c6e 70001625 jam 37 ,mem_le_ch_mapped 
+1c6f 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1c70 79207e00 set1 bit_adv_channel_map_37 ,pdata 
+1c71 67e0898e store 1 ,mem_le_adv_channel_map_temp 
+1c72 20600000 rtn 
+
+set_le_next_adv_channel_38:
+1c73 70001626 jam 38 ,mem_le_ch_mapped 
+1c74 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1c75 79207e01 set1 bit_adv_channel_map_38 ,pdata 
+1c76 67e0898e store 1 ,mem_le_adv_channel_map_temp 
+1c77 20600000 rtn 
+
+set_le_next_adv_channel_39:
+1c78 70001627 jam 39 ,mem_le_ch_mapped 
+1c79 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1c7a 79207e02 set1 bit_adv_channel_map_39 ,pdata 
+1c7b 67e0898e store 1 ,mem_le_adv_channel_map_temp 
+1c7c 20600000 rtn 
+
+le_parse_att:
+1c7d efe18006 ifetch 3 ,contr 
+1c7e 67e1c436 store 3 ,mem_le_att_opcode 
+1c7f c0011c94 beq attop_exchange_mtu_request ,le_parse_att_exchange_mtu_request 
+1c80 c0019c9c beq attop_exchange_mtu_response ,le_parse_att_exchange_mtu_response 
+1c81 c0021c9f beq attop_find_information_request ,le_parse_att_find_information_request 
+1c82 c0031cc8 beq attop_find_by_type_value_request ,le_parse_att_find_by_type_value_request 
+1c83 c0041d15 beq attop_read_by_type_request ,le_parse_att_read_by_type_request 
+1c84 c0051d93 beq attop_read_request ,le_parse_att_read_request 
+1c85 c0061dc2 beq attop_read_blob_request ,le_parse_att_read_blob_request 
+1c86 c0081dd8 beq attop_read_by_group_type_request ,le_parse_att_read_by_group_type_request 
+1c87 c0091e1b beq attop_write_request ,le_parse_att_write_request 
+1c88 c00b1e3f beq attop_prepare_write_request ,le_parse_att_prepare_write_request 
+1c89 c00c1e52 beq attop_execute_write_request ,le_parse_att_execute_write_request 
+1c8a c00f1e57 beq attop_handle_value_confirmation ,le_parse_handle_value_confirmation 
+1c8b c0291e5b beq attop_write_command ,le_parse_att_write_command 
+1c8c 20600000 rtn 
+
+le_send_att_exchange_mtu_requset:
+1c8d 18002203 force 3 ,rega 
+1c8e 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1c8f 58000002 setarg attop_exchange_mtu_request 
+1c90 e7e08005 istore 1 ,contw 
+1c91 6fe14380 fetch 2 ,mem_le_local_mtu 
+1c92 e7e10005 istore 2 ,contw 
+1c93 20600000 rtn 
+
+le_parse_att_exchange_mtu_request:
+1c94 20401c9c call le_parse_att_exchange_mtu_response 
+
+le_send_att_exchange_mtu_response:
+1c95 18002203 force 3 ,rega 
+1c96 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1c97 58000003 setarg attop_exchange_mtu_response 
+1c98 e7e08005 istore 1 ,contw 
+1c99 6fe14380 fetch 2 ,mem_le_local_mtu 
+1c9a e7e10005 istore 2 ,contw 
+1c9b 20600000 rtn 
+
+le_parse_att_exchange_mtu_response:
+1c9c 1fecfe00 rshift8 pdata ,pdata 
+1c9d 67e14382 store 2 ,mem_le_remote_mtu 
+1c9e 20600000 rtn 
+
+le_parse_att_find_information_request:
+1c9f 20401eb0 call le_get_search_handle_start_end_common 
+1ca0 20407ec5 call enable_user 
+1ca1 20201ca2 branch le_send_att_find_information_response 
+
+le_send_att_find_information_response:
+1ca2 d9600003 arg 3 ,timeup 
+1ca3 204019f9 call le_init_attlist_search 
+
+le_send_att_find_information_res_loop:
+1ca4 20401a02 call le_att_handle_inrange 
+1ca5 203a1cc6 branch le_send_att_find_information_res_end ,blank 
+1ca6 24211cc3 nbranch le_send_att_find_information_res_next ,positive 
+1ca7 18c08dfe increase -2 ,contr 
+1ca8 20407d5e call store_contr 
+1ca9 20407d55 call get_contw 
+1caa 24341cb6 nbranch le_send_att_find_information_res_store_info ,user 
+1cab 20407d43 call push_stack_rega_b_c 
+1cac 20407ec7 call disable_user 
+1cad 6162096c storer timeup ,4 ,mem_timeup 
+1cae 18002214 force 20 ,rega 
+1caf 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1cb0 6962096c fetchr timeup ,4 ,mem_timeup 
+1cb1 20407d51 call pop_stack_rega_b_c 
+1cb2 58000005 setarg attop_find_information_response 
+1cb3 e7e08005 istore 1 ,contw 
+1cb4 58000001 setarg uuid_size_16bit 
+1cb5 e7e08005 istore 1 ,contw 
+
+le_send_att_find_information_res_store_info:
+1cb6 20407d58 call get_contr 
+1cb7 efe10006 ifetch 2 ,contr 
+1cb8 1fe17eff and_into 0xff ,pdata 
+1cb9 e7e10005 istore 2 ,contw 
+1cba efe08006 ifetch 1 ,contr 
+1cbb 1fe27200 copy pdata ,loopcnt 
+1cbc 20407dd4 call memcpy 
+1cbd 20407d5b call store_contw 
+1cbe 196097ff increase -1 ,timeup 
+1cbf 20229cc6 branch le_send_att_find_information_res_end ,zero 
+
+le_send_att_find_information_res_cont:
+1cc0 efe08006 ifetch 1 ,contr 
+1cc1 98c08c00 iadd contr ,contr 
+1cc2 20201ca4 branch le_send_att_find_information_res_loop 
+
+le_send_att_find_information_res_next:
+1cc3 efe08006 ifetch 1 ,contr 
+1cc4 98c08c00 iadd contr ,contr 
+1cc5 20201cc0 branch le_send_att_find_information_res_cont 
+
+le_send_att_find_information_res_end:
+1cc6 20341e74 branch le_send_att_error_response_notfound ,user 
+1cc7 20201ea3 branch le_send_auto_len_by_mem 
+
+le_parse_att_find_by_type_value_request:
+1cc8 20401eb0 call le_get_search_handle_start_end_common 
+1cc9 efe10006 ifetch 2 ,contr 
+1cca 67e1435a store 2 ,mem_le_search_uuid 
+1ccb 20407d5e call store_contr 
+1ccc d8a009a2 arg mem_le_search_att_type_length ,contw 
+1ccd 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1cce 1fe0fff9 increase -7 ,pdata 
+1ccf 20401ec1 call le_get_search_common2 
+1cd0 20201cdb branch le_send_att_find_by_type_value_response 
+
+le_start_end_handle_check_1:
+1cd1 78547c00 disable user 
+1cd2 6849099e fetcht 2 ,mem_le_search_handle_start 
+1cd3 6fe109a0 fetch 2 ,mem_le_search_handle_end 
+1cd4 98467c00 isub temp ,null 
+1cd5 24211cd8 nbranch le_start_end_handle_check_1_fail ,positive 
+1cd6 18427e00 deposit temp 
+1cd7 c1800000 rtnne 0 
+
+le_start_end_handle_check_1_fail:
+1cd8 78347c00 enable user 
+1cd9 7002d801 jam att_err_invalid_handle ,mem_le_err_code 
+1cda 20201e75 branch le_send_att_error_response 
+
+le_send_att_find_by_type_value_response:
+1cdb 20401cd1 call le_start_end_handle_check_1 
+1cdc 20740000 rtn user 
+1cdd 6849435a fetcht 2 ,mem_le_search_uuid 
+1cde 58002800 setarg uuid_gatt_primary_service 
+1cdf 98467c00 isub temp ,null 
+1ce0 20229ce2 branch le_send_att_find_by_type_value_res_primary ,zero 
+1ce1 20201e74 branch le_send_att_error_response_notfound 
+
+le_send_att_find_by_type_value_res_primary:
+1ce2 70443900 jam le_find_by_type_val_res_not_found ,mem_le_search_res 
+1ce3 6849099e fetcht 2 ,mem_le_search_handle_start 
+1ce4 60490964 storet 2 ,mem_temp 
+1ce5 20401a3e call le_att_get_handle_info 
+1ce6 243a1e74 nbranch le_send_att_error_response_notfound ,blank 
+
+le_send_att_find_primary_search_loop:
+1ce7 68490964 fetcht 2 ,mem_temp 
+1ce8 20401a3e call le_att_get_handle_info 
+1ce9 243a1cfb nbranch le_send_att_error_response_notfound2 ,blank 
+1cea 18c22200 copy contr ,rega 
+1ceb 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1cec 1fe27200 copy pdata ,loopcnt 
+1ced 684889a2 fetcht 1 ,mem_le_search_att_type_length 
+1cee 98467c00 isub temp ,null 
+1cef 24229cf7 nbranch le_send_att_find_primary_search_loop1 ,zero 
+1cf0 da4009a3 arg mem_le_search_att_type ,regb 
+1cf1 20407e66 call string_compare 
+1cf2 20229cfe branch le_send_att_find_primary_search_end_start_handle_found ,zero 
+1cf3 6fe109bb fetch 2 ,mem_le_cur_uuid 
+1cf4 6849435a fetcht 2 ,mem_le_search_uuid 
+1cf5 98467c00 isub temp ,null 
+1cf6 20229d06 branch le_send_att_find_primary_search_end_ending_handle_found ,zero 
+
+le_send_att_find_primary_search_loop1:
+1cf7 6fe10964 fetch 2 ,mem_temp 
+1cf8 1fe0fe01 increase 1 ,pdata 
+1cf9 67e10964 store 2 ,mem_temp 
+1cfa 20201ce7 branch le_send_att_find_primary_search_loop 
+
+le_send_att_error_response_notfound2:
+1cfb 6fe0c439 fetch 1 ,mem_le_search_res 
+1cfc c0009d06 beq le_find_by_type_val_res_found_starting_handle ,le_send_att_find_primary_search_end_ending_handle_found 
+1cfd 20201e74 branch le_send_att_error_response_notfound 
+
+le_send_att_find_primary_search_end_start_handle_found:
+1cfe 6fe109bb fetch 2 ,mem_le_cur_uuid 
+1cff 6849435a fetcht 2 ,mem_le_search_uuid 
+1d00 98467c00 isub temp ,null 
+1d01 24229cf7 nbranch le_send_att_find_primary_search_loop1 ,zero 
+1d02 70443901 jam le_find_by_type_val_res_found_starting_handle ,mem_le_search_res 
+1d03 68490964 fetcht 2 ,mem_temp 
+1d04 604909b6 storet 2 ,mem_le_cur_handle_start 
+1d05 20201cf7 branch le_send_att_find_primary_search_loop1 
+
+le_send_att_find_primary_search_end_ending_handle_found:
+1d06 6fe0c439 fetch 1 ,mem_le_search_res 
+1d07 c0001cf7 beq le_find_by_type_val_res_not_found ,le_send_att_find_primary_search_loop1 
+1d08 70443902 jam le_find_by_type_val_res_found_ending_handle ,mem_le_search_res 
+1d09 68490964 fetcht 2 ,mem_temp 
+1d0a 184085ff increase -1 ,temp 
+1d0b 604909b8 storet 2 ,mem_le_cur_handle_end 
+
+le_send_att_find_primary_search_end:
+1d0c da200005 arg 5 ,rega 
+1d0d 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1d0e 58000007 setarg attop_find_by_type_value_response 
+1d0f e7e08005 istore 1 ,contw 
+1d10 6fe109b6 fetch 2 ,mem_le_cur_handle_start 
+1d11 e7e10005 istore 2 ,contw 
+1d12 6fe109b8 fetch 2 ,mem_le_cur_handle_end 
+1d13 e7e10005 istore 2 ,contw 
+1d14 20600000 rtn 
+
+le_parse_att_read_by_type_request:
+1d15 20401eb0 call le_get_search_handle_start_end_common 
+1d16 20401ebd call le_get_search_att_type 
+1d17 20201d18 branch le_send_att_read_by_type_response 
+
+le_send_att_read_by_type_response:
+1d18 6849099e fetcht 2 ,mem_le_search_handle_start 
+1d19 60490964 storet 2 ,mem_temp 
+1d1a 204019f9 call le_init_attlist_search 
+1d1b 20401a11 call le_att_get_handle_ptr2 
+1d1c 18c08dfe increase -2 ,contr 
+1d1d 18c27e00 copy contr ,pdata 
+1d1e 67e109b4 store 2 ,mem_le_cur_attlist_start_ptr 
+1d1f 684909a3 fetcht 2 ,mem_le_search_att_type 
+1d20 58002a00 setarg uuid_chrctr_device_name 
+1d21 98467c00 isub temp ,null 
+1d22 20229d7f branch le_send_att_read_by_type_res_device_name ,zero 
+1d23 58002803 setarg uuid_gatt_characteristic 
+1d24 98467c00 isub temp ,null 
+1d25 24229d6b nbranch le_send_att_read_by_type_res_not_characteristic ,zero 
+1d26 d9600002 arg 2 ,timeup 
+
+le_send_att_read_by_type_response_loop:
+1d27 20401e86 call le_att_check_handle_end 
+1d28 24211d48 nbranch le_send_att_read_by_type_response_end ,positive 
+1d29 68490964 fetcht 2 ,mem_temp 
+1d2a 20401a3c call le_att_get_handle_info_from_ptr 
+1d2b 243a1d48 nbranch le_send_att_read_by_type_response_end ,blank 
+1d2c 20401e8a call le_att_same_type 
+1d2d 24229d46 nbranch le_send_att_read_by_type_response_next_handle ,zero 
+1d2e 24341d4a nbranch le_send_att_read_by_type_res_found_next ,user 
+1d2f 78547c00 disable user 
+1d30 da200014 arg 20 ,rega 
+1d31 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1d32 58000009 setarg attop_read_by_type_response 
+1d33 e7e08005 istore 1 ,contw 
+1d34 18a26000 copy contw ,alarm 
+1d35 18a08a01 increase 1 ,contw 
+1d36 20401d58 call le_send_att_read_by_type_write_properties 
+1d37 20401e82 call le_att_next_handle 
+1d38 20401a3c call le_att_get_handle_info_from_ptr 
+1d39 20401d5f call le_send_att_read_by_type_write_uuid 
+1d3a 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1d3b 1fe0a205 add pdata ,5 ,rega 
+1d3c e2208030 istorer rega ,1 ,alarm 
+1d3d 1a267c07 sub rega ,7 ,null 
+1d3e 2442fec9 ncall enable_user2 ,zero 
+1d3f 2042fecb call disable_user2 ,zero 
+1d40 20401eb5 call le_get_search_max_mtu_data 
+1d41 9a26fc00 idiv rega 
+1d42 20407e64 call wait_div_end 
+1d43 18079600 quotient timeup 
+1d44 196097ff increase -1 ,timeup 
+1d45 20229d48 branch le_send_att_read_by_type_response_end ,zero 
+
+le_send_att_read_by_type_response_next_handle:
+1d46 20401e82 call le_att_next_handle 
+1d47 20201d27 branch le_send_att_read_by_type_response_loop 
+
+le_send_att_read_by_type_response_end:
+1d48 20341e74 branch le_send_att_error_response_notfound ,user 
+1d49 20201ea3 branch le_send_auto_len_by_mem 
+
+le_send_att_read_by_type_res_found_next:
+1d4a 20401e95 call le_store_att_record 
+1d4b 20401e82 call le_att_next_handle 
+1d4c 20401a3c call le_att_get_handle_info_from_ptr 
+1d4d 20401e09 call le_send_att_read_by_type_res_check_pair_length_type 
+1d4e 243a1d48 nbranch le_send_att_read_by_type_response_end ,blank 
+1d4f 20407d55 call get_contw 
+1d50 6fe10964 fetch 2 ,mem_temp 
+1d51 1fe0ffff increase -1 ,pdata 
+1d52 e7e10005 istore 2 ,contw 
+1d53 20401e9f call le_write_att_record_common 
+1d54 20401d5f call le_send_att_read_by_type_write_uuid 
+1d55 196097ff increase -1 ,timeup 
+1d56 20229d48 branch le_send_att_read_by_type_response_end ,zero 
+1d57 20201d46 branch le_send_att_read_by_type_response_next_handle 
+
+le_send_att_read_by_type_write_properties:
+1d58 6fe10964 fetch 2 ,mem_temp 
+1d59 e7e10005 istore 2 ,contw 
+1d5a 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1d5b 1fe27200 copy pdata ,loopcnt 
+1d5c 20407d58 call get_contr 
+1d5d 20407dc7 call memcpy_fast 
+1d5e 20207d5b branch store_contw 
+
+le_send_att_read_by_type_write_uuid:
+1d5f 20407d55 call get_contw 
+1d60 6fe10964 fetch 2 ,mem_temp 
+1d61 e7e10005 istore 2 ,contw 
+1d62 20407d5b call store_contw 
+1d63 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1d64 1fe27200 copy pdata ,loopcnt 
+1d65 20407d55 call get_contw 
+1d66 20407d58 call get_contr 
+1d67 9f260c00 isub loopcnt ,contr 
+1d68 18c08dff increase -1 ,contr 
+1d69 20407dc7 call memcpy_fast 
+1d6a 20207d5b branch store_contw 
+
+le_send_att_read_by_type_res_not_characteristic:
+1d6b 20401a21 call le_att_get_short_uuid_ptr 
+1d6c 203a1e74 branch le_send_att_error_response_notfound ,blank 
+1d6d 18c22600 copy contr ,regc 
+1d6e 18c08dfb increase -5 ,contr 
+1d6f efe10006 ifetch 2 ,contr 
+1d70 67e10964 store 2 ,mem_temp 
+1d71 da200014 arg 20 ,rega 
+1d72 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1d73 58000009 setarg attop_read_by_type_response 
+1d74 e7e08005 istore 1 ,contw 
+1d75 efe08013 ifetch 1 ,regc 
+1d76 1fe27200 copy pdata ,loopcnt 
+1d77 1fe0fe02 increase 2 ,pdata 
+1d78 e7e08005 istore 1 ,contw 
+1d79 6fe10964 fetch 2 ,mem_temp 
+1d7a e7e10005 istore 2 ,contw 
+1d7b 1a608c01 add regc ,1 ,contr 
+1d7c 20407dc7 call memcpy_fast 
+1d7d 20407d5b call store_contw 
+1d7e 20201ea3 branch le_send_auto_len_by_mem 
+
+le_send_att_read_by_type_res_device_name:
+1d7f d8402a00 arg uuid_chrctr_device_name ,temp 
+1d80 20401a21 call le_att_get_short_uuid_ptr 
+1d81 207a0000 rtn blank 
+1d82 18c08dfb increase -5 ,contr 
+1d83 efe10006 ifetch 2 ,contr 
+1d84 67e10964 store 2 ,mem_temp 
+1d85 da200014 arg 20 ,rega 
+1d86 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1d87 58000009 setarg attop_read_by_type_response 
+1d88 e7e08005 istore 1 ,contw 
+1d89 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1d8a 1fe27200 copy pdata ,loopcnt 
+1d8b 1fe0fe02 increase 2 ,pdata 
+1d8c e7e08005 istore 1 ,contw 
+1d8d 6fe10964 fetch 2 ,mem_temp 
+1d8e e7e10005 istore 2 ,contw 
+1d8f d8c042f8 arg mem_le_name ,contr 
+1d90 20407dc7 call memcpy_fast 
+1d91 20407d5b call store_contw 
+1d92 20201ea3 branch le_send_auto_len_by_mem 
+
+le_parse_att_read_request:
+1d93 20401e39 call le_check_encrypt_state 
+1d94 68494437 fetcht 2 ,mem_le_att_handle 
+1d95 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1d96 c2819db8 bbit1 bit_ble_read_auth ,le_send_att_read_response_check_auth 
+
+le_send_att_read_response:
+1d97 20401a11 call le_att_get_handle_ptr2 
+1d98 24229e74 nbranch le_send_att_error_response_notfound ,zero 
+1d99 20541dbe call le_send_att_read_response_check_handle ,user 
+1d9a 20740000 rtn user 
+1d9b 20401a1e call le_att_get_handle_ptr_found 
+1d9c 18c08dfe increase -2 ,contr 
+1d9d efe10006 ifetch 2 ,contr 
+1d9e d8402a00 arg uuid_chrctr_device_name ,temp 
+1d9f 98467c00 isub temp ,null 
+1da0 20229dae branch le_send_device_name ,zero 
+1da1 efe08006 ifetch 1 ,contr 
+1da2 1fe67c16 sub pdata ,22 ,null 
+1da3 20211da5 branch le_send_att_read_response_less ,positive 
+1da4 18007e16 force 22 ,pdata 
+
+le_send_att_read_response_less:
+1da5 1fe22600 copy pdata ,regc 
+1da6 20407d5e call store_contr 
+1da7 1a60a201 add regc ,1 ,rega 
+1da8 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1da9 5800000b setarg attop_read_response 
+1daa e7e08005 istore 1 ,contw 
+1dab 1a627200 copy regc ,loopcnt 
+1dac 20407d58 call get_contr 
+1dad 20207dd4 branch memcpy 
+
+le_send_device_name:
+1dae 20407d5e call store_contr 
+1daf 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1db0 1fe0a201 add pdata ,1 ,rega 
+1db1 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1db2 5800000b setarg attop_read_response 
+1db3 e7e08005 istore 1 ,contw 
+1db4 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1db5 1fe27200 copy pdata ,loopcnt 
+1db6 d8c042f8 arg mem_le_name ,contr 
+1db7 20207dd4 branch memcpy 
+
+le_send_att_read_response_check_auth:
+1db8 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+1db9 98467c00 isub temp ,null 
+1dba 24229d97 nbranch le_send_att_read_response ,zero 
+1dbb 24341d97 nbranch le_send_att_read_response ,user 
+
+le_send_att_read_response_error_insufficient_auth:
+1dbc 7002d805 jam att_err_insufficient_authentication ,mem_le_err_code 
+1dbd 20201e75 branch le_send_att_error_response 
+
+le_send_att_read_response_check_handle:
+1dbe 18c08dfe increase -2 ,contr 
+1dbf efe10006 ifetch 2 ,contr 
+1dc0 c2871dbc bbit1 bit_of_att_handle_read_authenticated ,le_send_att_read_response_error_insufficient_auth 
+1dc1 20207ec7 branch disable_user 
+
+le_parse_att_read_blob_request:
+1dc2 efe10006 ifetch 2 ,contr 
+1dc3 67e109a2 store 2 ,mem_le_att_offset 
+
+le_send_att_read_blob_response:
+1dc4 da200014 arg 20 ,rega 
+1dc5 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1dc6 5800000d setarg attop_read_blob_response 
+1dc7 e7e08005 istore 1 ,contw 
+1dc8 6fe109a2 fetch 2 ,mem_le_att_offset 
+1dc9 98002200 iforce rega 
+1dca 68494437 fetcht 2 ,mem_le_att_handle 
+1dcb 20401a0e call le_att_get_handle_ptr 
+1dcc 203a1e74 branch le_send_att_error_response_notfound ,blank 
+1dcd efe08006 ifetch 1 ,contr 
+1dce 9a267200 isub rega ,loopcnt 
+1dcf 24211e74 nbranch le_send_att_error_response_notfound ,positive 
+1dd0 1f267c16 sub loopcnt ,22 ,null 
+1dd1 20211dd3 branch le_send_att_read_blob_response_less ,positive 
+1dd2 18007216 force 22 ,loopcnt 
+
+le_send_att_read_blob_response_less:
+1dd3 1a227e00 deposit rega 
+1dd4 98c08c00 iadd contr ,contr 
+1dd5 20407dc7 call memcpy_fast 
+1dd6 20407d5b call store_contw 
+1dd7 20201ea3 branch le_send_auto_len_by_mem 
+
+le_parse_att_read_by_group_type_request:
+1dd8 20401eb0 call le_get_search_handle_start_end_common 
+1dd9 20401ebd call le_get_search_att_type 
+1dda 20201ddb branch le_send_att_read_by_group_type_response 
+
+le_send_att_read_by_group_type_response:
+1ddb d9600002 arg 2 ,timeup 
+1ddc 6849099e fetcht 2 ,mem_le_search_handle_start 
+1ddd 60490964 storet 2 ,mem_temp 
+1dde 20401a11 call le_att_get_handle_ptr2 
+1ddf 18c08dfe increase -2 ,contr 
+1de0 18c27e00 copy contr ,pdata 
+1de1 67e109b4 store 2 ,mem_le_cur_attlist_start_ptr 
+
+le_send_att_read_by_group_type_response_loop:
+1de2 20401e86 call le_att_check_handle_end 
+1de3 24211e11 nbranch le_send_att_read_by_group_type_end0 ,positive 
+1de4 68490964 fetcht 2 ,mem_temp 
+1de5 20401a3c call le_att_get_handle_info_from_ptr 
+1de6 243a1e14 nbranch le_send_att_read_by_group_type_end1 ,blank 
+1de7 20401e8a call le_att_same_type 
+1de8 24229e07 nbranch le_send_att_read_by_group_type_next_handle ,zero 
+1de9 19627e00 copy timeup ,pdata 
+1dea c0001e14 beq 0 ,le_send_att_read_by_group_type_end1 
+1deb 24341dfd nbranch le_send_att_read_by_group_type_store_write_record ,user 
+1dec 78547c00 disable user 
+1ded da200014 arg 20 ,rega 
+1dee 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1def 58000011 setarg attop_read_by_group_type_response 
+1df0 e7e08005 istore 1 ,contw 
+1df1 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1df2 1fe0a204 add pdata ,4 ,rega 
+1df3 e2208005 istorer rega ,1 ,contw 
+1df4 20407d5b call store_contw 
+1df5 1a267c06 sub rega ,6 ,null 
+1df6 2442fec9 ncall enable_user2 ,zero 
+1df7 2042fecb call disable_user2 ,zero 
+1df8 20401eb5 call le_get_search_max_mtu_data 
+1df9 9a26fc00 idiv rega 
+1dfa 20407e64 call wait_div_end 
+1dfb 18079600 quotient timeup 
+1dfc 20201e03 branch le_send_att_read_by_group_type_store_record 
+
+le_send_att_read_by_group_type_store_write_record:
+1dfd 20401e0b call le_send_att_read_by_group_type_check_pair_length_type 
+1dfe 243a1e14 nbranch le_send_att_read_by_group_type_end1 ,blank 
+1dff 6fe10964 fetch 2 ,mem_temp 
+1e00 1fe0ffff increase -1 ,pdata 
+1e01 67e109b8 store 2 ,mem_le_cur_handle_end 
+1e02 20401e9a call le_write_att_record 
+
+le_send_att_read_by_group_type_store_record:
+1e03 6fe10964 fetch 2 ,mem_temp 
+1e04 67e109b6 store 2 ,mem_le_cur_handle_start 
+1e05 20401e95 call le_store_att_record 
+1e06 196097ff increase -1 ,timeup 
+
+le_send_att_read_by_group_type_next_handle:
+1e07 20401e82 call le_att_next_handle 
+1e08 20201de2 branch le_send_att_read_by_group_type_response_loop 
+
+le_send_att_read_by_type_res_check_pair_length_type:
+1e09 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1e0a 20201e0c branch le_send_att_read_by_group_type_check_pair_length_type + 1 
+
+le_send_att_read_by_group_type_check_pair_length_type:
+1e0b 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1e0c 20361e0f branch le_send_att_read_by_group_type_check_pair_length_type_16byte ,user2 
+1e0d 1fe0fffe increase -2 ,pdata 
+1e0e 20600000 rtn 
+
+le_send_att_read_by_group_type_check_pair_length_type_16byte:
+1e0f 1fe0fff0 increase -16 ,pdata 
+1e10 20600000 rtn 
+
+le_send_att_read_by_group_type_end0:
+1e11 6fe10964 fetch 2 ,mem_temp 
+1e12 67e109b8 store 2 ,mem_le_cur_handle_end 
+1e13 20201e18 branch le_send_att_read_by_group_type_end_common 
+
+le_send_att_read_by_group_type_end1:
+1e14 6fe10964 fetch 2 ,mem_temp 
+1e15 1fe0ffff increase -1 ,pdata 
+1e16 67e109b8 store 2 ,mem_le_cur_handle_end 
+1e17 20201e18 branch le_send_att_read_by_group_type_end_common 
+
+le_send_att_read_by_group_type_end_common:
+1e18 20341e74 branch le_send_att_error_response_notfound ,user 
+1e19 20401e9a call le_write_att_record 
+1e1a 20201ea3 branch le_send_auto_len_by_mem 
+
+le_parse_att_write_request:
+1e1b 18c22200 copy contr ,rega 
+1e1c 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e1d 1fe0a5fd add pdata ,-3 ,regb 
+1e1e 204019d1 call le_writeatt_cb 
+
+le_send_att_write_response_check_auth:
+1e1f 20401e39 call le_check_encrypt_state 
+1e20 68494437 fetcht 2 ,mem_le_att_handle 
+1e21 20401a11 call le_att_get_handle_ptr2 
+1e22 24229e37 nbranch le_send_att_write_response_error_invalid_handle ,zero 
+1e23 20541e33 call le_send_att_write_response_check_handle ,user 
+1e24 20740000 rtn user 
+1e25 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1e26 c3021e2e bbit0 bit_ble_write_auth ,le_send_att_write_response 
+1e27 68494437 fetcht 2 ,mem_le_att_handle 
+1e28 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+1e29 98467c00 isub temp ,null 
+1e2a 24229e2e nbranch le_send_att_write_response ,zero 
+1e2b 20401e39 call le_check_encrypt_state 
+1e2c 24341e2e nbranch le_send_att_write_response ,user 
+1e2d 20201dbc branch le_send_att_read_response_error_insufficient_auth 
+
+le_send_att_write_response:
+1e2e 18002201 force 1 ,rega 
+1e2f 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1e30 58000013 setarg attop_write_response 
+1e31 e7e08005 istore 1 ,contw 
+1e32 20600000 rtn 
+
+le_send_att_write_response_check_handle:
+1e33 18c08dfe increase -2 ,contr 
+1e34 efe10006 ifetch 2 ,contr 
+1e35 c2879dbc bbit1 bit_of_att_handle_write_authenticated ,le_send_att_read_response_error_insufficient_auth 
+1e36 20207ec7 branch disable_user 
+
+le_send_att_write_response_error_invalid_handle:
+1e37 7002d801 jam att_err_invalid_handle ,mem_le_err_code 
+1e38 20201e75 branch le_send_att_error_response 
+
+le_check_encrypt_state:
+1e39 20407ec7 call disable_user 
+1e3a 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1e3b c1000000 rtneq le_pairing_mode_none 
+1e3c 6fe0c040 fetch 1 ,mem_context 
+1e3d c3820000 rtnbit1 lestate_encryption 
+1e3e 20207ec5 branch enable_user 
+
+le_parse_att_prepare_write_request:
+1e3f 18c0a202 add contr ,2 ,rega 
+1e40 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e41 1fe0a5fb add pdata ,-5 ,regb 
+1e42 204019d1 call le_writeatt_cb 
+1e43 20201e44 branch le_send_att_prepare_write_response 
+
+le_send_att_prepare_write_response:
+1e44 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e45 1fe22200 copy pdata ,rega 
+1e46 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1e47 58000017 setarg attop_prepare_write_response 
+1e48 e7e08005 istore 1 ,contw 
+1e49 6fe14437 fetch 2 ,mem_le_att_handle 
+1e4a e7e10005 istore 2 ,contw 
+1e4b 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e4c 1fe0f3fb add pdata ,-5 ,loopcnt 
+1e4d 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+1e4e 1fe08c07 add pdata ,7 ,contr 
+1e4f efe10006 ifetch 2 ,contr 
+1e50 e7e10005 istore 2 ,contw 
+1e51 20207dc7 branch memcpy_fast 
+
+le_parse_att_execute_write_request:
+
+le_send_att_execute_write_response:
+1e52 18002201 force 1 ,rega 
+1e53 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1e54 58000019 setarg attop_execute_write_response 
+1e55 e7e08005 istore 1 ,contw 
+1e56 20600000 rtn 
+
+le_parse_handle_value_confirmation:
+1e57 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1e58 793ffe00 set0 ble_l2cap_recv_confirmation_packet ,pdata 
+1e59 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1e5a 20600000 rtn 
+
+le_parse_att_write_command:
+1e5b 18c22200 copy contr ,rega 
+1e5c 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e5d 1fe0a5fd add pdata ,-3 ,regb 
+1e5e 202019d1 branch le_writeatt_cb 
+
+le_att_malloc_tx_notify:
+1e5f 18422600 copy temp ,regc 
+1e60 1a20a203 increase 3 ,rega 
+1e61 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1e62 1a20a3fd increase -3 ,rega 
+1e63 5800001b setarg attop_handle_value_notification 
+1e64 e7e08005 istore 1 ,contw 
+1e65 1a620400 copy regc ,temp 
+1e66 e0410005 istoret 2 ,contw 
+1e67 20600000 rtn 
+
+le_att_malloc_tx_indication:
+1e68 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1e69 79207e00 set1 ble_l2cap_send_indication_packet ,pdata 
+1e6a 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1e6b 18422600 copy temp ,regc 
+1e6c 1a20a203 increase 3 ,rega 
+1e6d 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1e6e 1a20a3fd increase -3 ,rega 
+1e6f 5800001d setarg attop_handle_value_indication 
+1e70 e7e08005 istore 1 ,contw 
+1e71 1a620400 copy regc ,temp 
+1e72 e0410005 istoret 2 ,contw 
+1e73 20600000 rtn 
+
+le_send_att_error_response_notfound:
+1e74 7002d80a jam att_err_attribute_not_found ,mem_le_err_code 
+
+le_send_att_error_response:
+1e75 18002205 force 5 ,rega 
+1e76 20401e80 call le_fifo_malloc_tx_l2cap_gatt 
+1e77 58000001 setarg attop_error_response 
+1e78 e7e08005 istore 1 ,contw 
+1e79 6fe0c436 fetch 1 ,mem_le_att_opcode 
+1e7a e7e08005 istore 1 ,contw 
+1e7b 6fe14437 fetch 2 ,mem_le_att_handle 
+1e7c e7e10005 istore 2 ,contw 
+1e7d 6fe082d8 fetch 1 ,mem_le_err_code 
+1e7e e7e08005 istore 1 ,contw 
+1e7f 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap_gatt:
+1e80 18002404 force le_l2cap_cid_att ,regb 
+1e81 20201af9 branch le_fifo_malloc_tx_l2cap 
+
+le_att_next_handle:
+1e82 68490964 fetcht 2 ,mem_temp 
+1e83 18408401 increase 1 ,temp 
+1e84 60490964 storet 2 ,mem_temp 
+1e85 20600000 rtn 
+
+le_att_check_handle_end:
+1e86 68490964 fetcht 2 ,mem_temp 
+1e87 6fe109a0 fetch 2 ,mem_le_search_handle_end 
+1e88 98467c00 isub temp ,null 
+1e89 20600000 rtn 
+
+le_att_same_type:
+1e8a 684889a2 fetcht 1 ,mem_le_search_att_type_length 
+1e8b da2009a3 arg mem_le_search_att_type ,rega 
+
+le_att_check_same_common:
+1e8c 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1e8d 1fe27200 copy pdata ,loopcnt 
+1e8e 98467c00 isub temp ,null 
+1e8f 24628000 nrtn zero 
+1e90 da4009bb arg mem_le_cur_uuid ,regb 
+1e91 20207e66 branch string_compare 
+
+le_att_same_uuid:
+1e92 6848c359 fetcht 1 ,mem_le_search_uuid_length 
+1e93 da20435a arg mem_le_search_uuid ,rega 
+1e94 20201e8c branch le_att_check_same_common 
+
+le_store_att_record:
+1e95 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1e96 67e08a01 store 1 ,mem_tmp_buffer 
+1e97 1fe27200 copy pdata ,loopcnt 
+1e98 20407d58 call get_contr 
+1e99 20207dc7 branch memcpy_fast 
+
+le_write_att_record:
+1e9a 20407d55 call get_contw 
+1e9b 6fe109b6 fetch 2 ,mem_le_cur_handle_start 
+1e9c e7e10005 istore 2 ,contw 
+1e9d 6fe109b8 fetch 2 ,mem_le_cur_handle_end 
+1e9e e7e10005 istore 2 ,contw 
+
+le_write_att_record_common:
+1e9f 6fe08a01 fetch 1 ,mem_tmp_buffer 
+1ea0 1fe27200 copy pdata ,loopcnt 
+1ea1 20407dc7 call memcpy_fast 
+1ea2 20207d5b branch store_contw 
+
+le_send_auto_len_by_mem:
+1ea3 476c403b bpatchx patch3b_0 ,mem_patch3b 
+1ea4 20407d55 call get_contw 
+1ea5 20401b1d call le_fifo_get_last_att_ptr 
+1ea6 18a27e00 copy contw ,pdata 
+1ea7 98c62200 isub contr ,rega 
+1ea8 20401b20 call le_fifo_get_last_l2cap_ptr 
+1ea9 1a227e00 copy rega ,pdata 
+1eaa e7e10006 istore 2 ,contr 
+1eab 1a20a204 increase 4 ,rega 
+1eac 20401b12 call le_fifo_get_last_tx_ptr 
+1ead 1a227e00 copy rega ,pdata 
+1eae e7e08006 istore 1 ,contr 
+1eaf 20600000 rtn 
+
+le_get_search_handle_start_end_common:
+1eb0 1fecfe00 rshift8 pdata ,pdata 
+1eb1 67e1099e store 2 ,mem_le_search_handle_start 
+1eb2 efe10006 ifetch 2 ,contr 
+1eb3 67e109a0 store 2 ,mem_le_search_handle_end 
+1eb4 20600000 rtn 
+
+le_get_search_max_mtu_data:
+1eb5 6fe14382 fetch 2 ,mem_le_remote_mtu 
+1eb6 1fe0fffe increase -2 ,pdata 
+1eb7 68494380 fetcht 2 ,mem_le_local_mtu 
+1eb8 184085fe increase -2 ,temp 
+1eb9 20407ebb call not_greater_than 
+1eba d84000f0 arg 240 ,temp 
+1ebb 20407ebb call not_greater_than 
+1ebc 20600000 rtn 
+
+le_get_search_att_type:
+1ebd 20407d5e call store_contr 
+1ebe d8a009a2 arg mem_le_search_att_type_length ,contw 
+
+le_get_search_common:
+1ebf 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1ec0 1fe0fffb increase -5 ,pdata 
+
+le_get_search_common2:
+1ec1 e7e08005 istore 1 ,contw 
+1ec2 1fe27200 copy pdata ,loopcnt 
+1ec3 20407d58 call get_contr 
+1ec4 20207dc7 branch memcpy_fast 
+
+le_parse_writing_attribute_start:
+1ec5 6fe1016f fetch 2 ,mem_le_rxbuf_data_att_cid 
+1ec6 c1820000 rtnne le_l2cap_cid_att 
+1ec7 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1ec8 79207e01 set1 ble_l2cap_deal_with_continue_packet ,pdata 
+1ec9 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1eca 6fe18171 fetch 3 ,mem_le_rxbuf_data_att_opcode 
+1ecb 67e1c436 store 3 ,mem_le_att_opcode 
+1ecc 7920000f set1 mark_old_packet ,mark 
+1ecd c0091ee0 beq attop_write_request ,le_parse_attribute_write_request 
+1ece c0291ee5 beq attop_write_command ,le_parse_attribute_write_command 
+1ecf c00c1e52 beq attop_execute_write_request ,le_parse_att_execute_write_request 
+1ed0 c0011c94 beq attop_exchange_mtu_request ,le_parse_att_exchange_mtu_request 
+1ed1 c00f1e57 beq attop_handle_value_confirmation ,le_parse_handle_value_confirmation 
+1ed2 793f800f set0 mark_old_packet ,mark 
+
+le_clear_l2cap_att_states_deal_with_contiune_packet:
+1ed3 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1ed4 793ffe01 set0 ble_l2cap_deal_with_continue_packet ,pdata 
+1ed5 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1ed6 20600000 rtn 
+
+le_parse_writing_attribute_continue:
+1ed7 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1ed8 c4008000 rtnbit0 ble_l2cap_deal_with_continue_packet 
+1ed9 7920000f set1 mark_old_packet ,mark 
+1eda 20401eef call le_parse_l2cap_continue_common 
+1edb 20401ef5 call le_parse_attribute_check_complete_packet 
+1edc 20541ed3 call le_clear_l2cap_att_states_deal_with_contiune_packet ,user 
+1edd 6fe0c436 fetch 1 ,mem_le_att_opcode 
+1ede c0091e1f beq attop_write_request ,le_send_att_write_response_check_auth 
+1edf 20600000 rtn 
+
+le_parse_attribute_write_request:
+1ee0 20401ee5 call le_parse_attribute_write_command 
+1ee1 20201ee2 branch le_send_attribute_write_response_check_auth 
+
+le_send_attribute_write_response_check_auth:
+1ee2 20401ef5 call le_parse_attribute_check_complete_packet 
+1ee3 24740000 nrtn user 
+1ee4 20201e1f branch le_send_att_write_response_check_auth 
+
+le_parse_attribute_write_command:
+1ee5 20401ee8 call le_parse_attribute_check_complete_packet_init 
+1ee6 da200174 arg mem_le_rxbuf_data_att_write_payload ,rega 
+1ee7 202019d1 branch le_writeatt_cb 
+
+le_parse_attribute_check_complete_packet_init:
+1ee8 6fe0816c fetch 1 ,mem_le_rxbuf_data_att_write_length 
+1ee9 1fe0a5f9 add pdata ,-7 ,regb 
+1eea 1fe0fffc increase -4 ,pdata 
+1eeb 67e143d6 store 2 ,mem_le_packet_len_recved 
+1eec 6849016d fetcht 2 ,mem_le_rxbuf_data_att_write_l2cap_length 
+1eed 604943d4 storet 2 ,mem_le_l2cap_size 
+1eee 20600000 rtn 
+
+le_parse_l2cap_continue_common:
+1eef 6a40816c fetchr regb ,1 ,mem_le_rxbuf_data_continue_length 
+1ef0 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+1ef1 9a408400 iadd regb ,temp 
+1ef2 604943d6 storet 2 ,mem_le_packet_len_recved 
+1ef3 da20016d arg mem_le_rxbuf_data_continue_payload ,rega 
+1ef4 202019d1 branch le_writeatt_cb 
+
+le_parse_attribute_check_complete_packet:
+1ef5 20407ec7 call disable_user 
+1ef6 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+1ef7 684943d4 fetcht 2 ,mem_le_l2cap_size 
+1ef8 98467c00 isub temp ,null 
+1ef9 24628000 nrtn zero 
+1efa 20207ec5 branch enable_user 
+
+le_parse_signaling:
+1efb efe08006 ifetch 1 ,contr 
+1efc e8408006 ifetcht 1 ,contr 
+1efd e8410006 ifetcht 2 ,contr 
+1efe c0099f00 beq l2cap_connection_parameter_update_response ,le_l2cap_parse_conn_parameter_update_rsp 
+1eff 20600000 rtn 
+
+le_l2cap_parse_conn_parameter_update_rsp:
+1f00 efe10006 ifetch 2 ,contr 
+1f01 67e143db store 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+1f02 70095b40 jam bt_evt_le_parse_conn_papa_update_rsp ,mem_fifo_temp 
+1f03 202078dc branch ui_ipc_send_event 
+
+le_l2cap_tx_update_req:
+1f04 da20000c arg 0x0c ,rega 
+1f05 da600012 arg l2cap_connection_parameter_update_request ,regc 
+1f06 20401f0c call le_fifo_malloc_tx_l2cap_signaling 
+1f07 58000008 setarg 0x08 
+1f08 e7e10005 istore 2 ,contw 
+1f09 6fe44372 fetch 8 ,mem_le_interval_min 
+1f0a e7e40005 istore 8 ,contw 
+1f0b 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap_signaling:
+1f0c 20401f14 call le_l2cap_update_signaling_identifier 
+1f0d da400005 arg le_l2cap_cid_signal ,regb 
+1f0e 20401af9 call le_fifo_malloc_tx_l2cap 
+1f0f 1a627e00 copy regc ,pdata 
+1f10 e7e08005 istore 1 ,contw 
+1f11 6fe0c3da fetch 1 ,mem_le_signaling_identifier 
+1f12 e7e08005 istore 1 ,contw 
+1f13 20600000 rtn 
+
+le_l2cap_update_signaling_identifier:
+1f14 6fe0c3da fetch 1 ,mem_le_signaling_identifier 
+1f15 1fe0fe01 pincrease 1 
+1f16 67e0c3da store 1 ,mem_le_signaling_identifier 
+1f17 c1800000 rtnne 0 
+
+le_l2cap_reset_signaling_identifier:
+1f18 7043da01 jam 1 ,mem_le_signaling_identifier 
+1f19 20600000 rtn 
+
+le_pairing_mode_init:
+1f1a 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f1b c0001f29 beq le_pairing_mode_none ,le_set_no_pairing 
+1f1c c0009f2c beq le_pairing_mode_lagacy_justwork ,le_set_pairing_mode_lagacy_just_work 
+1f1d c0011f2e beq le_pairing_mode_lagacy_passkey ,le_set_pairing_mode_lagacy_passkey 
+1f1e c0409f22 beq le_pairing_mode_secure_connect_justwork ,le_set_pairing_mode_secure_justwork 
+1f1f c0411f24 beq le_pairing_mode_secure_connect_numeric ,le_set_pairing_mode_secure_numeric 
+1f20 c0419f27 beq le_pairing_mode_secure_connect_passkey ,le_set_pairing_mode_secure_passkey 
+1f21 20600000 rtn 
+
+le_set_pairing_mode_secure_justwork:
+1f22 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+1f23 20201f2a branch le_set_noinputnooutput 
+
+le_set_pairing_mode_secure_numeric:
+1f24 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+1f25 70435101 jam flag_iocap_displayyesno ,mem_le_pres_iocap 
+1f26 20600000 rtn 
+
+le_set_pairing_mode_secure_passkey:
+1f27 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+1f28 20201f2f branch le_set_displayonly 
+
+le_set_no_pairing:
+1f29 70435300 jam flag_le_no_bonding_no_mitm ,mem_le_pres_auth 
+
+le_set_noinputnooutput:
+1f2a 70435103 jam flag_iocap_noinputnooutput ,mem_le_pres_iocap 
+1f2b 20600000 rtn 
+
+le_set_pairing_mode_lagacy_just_work:
+1f2c 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+1f2d 20201f2a branch le_set_noinputnooutput 
+
+le_set_pairing_mode_lagacy_passkey:
+1f2e 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+
+le_set_displayonly:
+1f2f 70435100 jam flag_iocap_displayonly ,mem_le_pres_iocap 
+1f30 20600000 rtn 
+
+le_secure_connection_enable:
+1f31 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+1f32 79207e00 set1 secure_connections_le_bit ,pdata 
+1f33 67e0c6bb store 1 ,mem_secure_connections_enable 
+1f34 20600000 rtn 
+
+le_secure_connection_disable:
+1f35 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+1f36 793ffe00 set0 secure_connections_le_bit ,pdata 
+1f37 67e0c6bb store 1 ,mem_secure_connections_enable 
+1f38 20600000 rtn 
+
+le_parse_smp:
+1f39 efe08006 ifetch 1 ,contr 
+1f3a c0009f4d beq smp_pairing_request ,le_parse_smp_pairing_request 
+1f3b c0019f74 beq smp_pairing_confirm ,le_parse_smp_pairing_confirm 
+1f3c c0021f95 beq smp_pairing_random ,le_parse_smp_pairing_random 
+1f3d c0029fa2 beq smp_pairing_failed ,le_parse_smp_pairing_failed 
+1f3e c003a00a beq smp_master_identification ,le_parse_smp_master_identification 
+1f3f c0041ff6 beq smp_identity_information ,le_parse_smp_identity_information 
+1f40 c004a006 beq smp_identity_address_information ,le_parse_smp_identity_address_information 
+1f41 c005200a beq smp_signing_information ,le_parse_smp_signing_information 
+1f42 c005a00a beq smp_security_request ,le_parse_smp_security_request 
+1f43 c006200b beq smp_pairing_public_key ,le_parse_smp_public_key 
+1f44 c006a010 beq smp_pairing_dhkey_check ,le_parse_smp_dhkey_check 
+1f45 20600000 rtn 
+
+le_send_smp_security_request:
+1f46 18002202 force 2 ,rega 
+1f47 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1f48 5800000b setarg smp_security_request 
+1f49 e7e08005 istore 1 ,contw 
+1f4a 6fe0c353 fetch 1 ,mem_le_pres_auth 
+1f4b e7e08005 istore 1 ,contw 
+1f4c 20600000 rtn 
+
+le_parse_smp_pairing_request:
+1f4d 67e0c349 store 1 ,mem_le_preq 
+1f4e efe30006 ifetch 6 ,contr 
+1f4f e7e30005 istore 6 ,contw 
+1f50 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f51 c0001fa7 beq le_pairing_mode_none ,le_smp_pairing_fail_reason_not_support_pairing 
+1f52 20401f6f call le_send_smp_pairing_response 
+1f53 6fe0c6b9 fetch 1 ,mem_sc_only_mode 
+1f54 203a1f59 branch le_parse_smp_pairing_request2 ,blank 
+1f55 6fe0c34c fetch 1 ,mem_le_preq_auth 
+1f56 c301b281 bbit0 le_auth_secure_connection_pairing_bit ,app_ble_disconnect 
+1f57 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f58 c303b281 bbit0 le_pairing_mode_secure_connect_bit ,app_ble_disconnect 
+
+le_parse_smp_pairing_request2:
+1f59 70439b03 jam flag_le_pairing_rcv_pairing_req ,mem_le_pairing_state 
+1f5a 6fe0c34a fetch 1 ,mem_le_preq_iocap 
+1f5b c0001f61 beq flag_iocap_displayonly ,le_set_tk_0 
+1f5c c0009f61 beq flag_iocap_displayyesno ,le_set_tk_0 
+1f5d c0019f61 beq flag_iocap_noinputnooutput ,le_set_tk_0 
+1f5e 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f5f c0011f64 beq le_pairing_mode_lagacy_passkey ,le_parse_smp_pairing_req_passkey 
+1f60 c1418000 rtneq le_pairing_mode_secure_connect_passkey 
+
+le_set_tk_0:
+1f61 dfe00000 arg 0 ,pdata 
+1f62 67e2439e store 4 ,mem_le_tk 
+1f63 20600000 rtn 
+
+le_parse_smp_pairing_req_passkey:
+1f64 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1f65 c2801f6d bbit1 bit_ble_passkey_fixed_key ,le_parse_smp_pairing_req_fixed_passkey 
+
+le_genernate_tk:
+1f66 da20439e arg mem_le_tk ,rega 
+1f67 1a220a00 copy rega ,contw 
+1f68 df200003 arg 3 ,loopcnt 
+1f69 20405a90 call generate_random_loop 
+1f6a 6fe143a0 fetch 2 ,mem_le_tk + 2 
+1f6b 1fe17e07 and_into 0x7 ,pdata 
+1f6c 67e143a0 store 2 ,mem_le_tk + 2 
+
+le_parse_smp_pairing_req_fixed_passkey:
+1f6d 70095b34 jam bt_evt_le_tk_generate ,mem_fifo_temp 
+1f6e 202078dc branch ui_ipc_send_event 
+
+le_send_smp_pairing_response:
+1f6f 18002207 force 7 ,rega 
+1f70 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1f71 6fe3c350 fetch 7 ,mem_le_pres 
+1f72 e7e38005 istore 7 ,contw 
+1f73 20600000 rtn 
+
+le_parse_smp_pairing_confirm:
+1f74 70439b05 jam flag_le_pairing_receive_pairing_confirm ,mem_le_pairing_state 
+1f75 d8a04327 arg mem_le_rconfirm ,contw 
+1f76 20407d7f call memcpy16 
+1f77 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f78 c0419f7c beq le_pairing_mode_secure_connect_passkey ,le_parse_smp_pairing_confirm_secure_passkey 
+1f79 c0021f7f beq le_pairing_mode_lagacy_passkey_res_input ,le_parse_smp_pairing_confirm_passkey_res_input 
+1f7a c0421f81 beq le_pairing_mode_secure_connect_passkey_res_input ,le_parse_smp_pairing_confirm_sc_passkey_res_input 
+1f7b 20201f84 branch le_send_smp_pairing_confirm 
+
+le_parse_smp_pairing_confirm_secure_passkey:
+1f7c 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+1f7d 70439908 jam le_sc_stat_passkey_wait_confirm ,mem_le_secure_connect_state 
+1f7e 20600000 rtn 
+
+le_parse_smp_pairing_confirm_passkey_res_input:
+1f7f 70095b43 jam bt_evt_le_get_passkey ,mem_fifo_temp 
+1f80 202078dc branch ui_ipc_send_event 
+
+le_parse_smp_pairing_confirm_sc_passkey_res_input:
+1f81 6fe2439e fetch 4 ,mem_le_tk 
+1f82 203a1f7f branch le_parse_smp_pairing_confirm_passkey_res_input ,blank 
+1f83 20201f7c branch le_parse_smp_pairing_confirm_secure_passkey 
+
+le_send_smp_pairing_confirm:
+1f84 70439b06 jam flag_le_pairing_send_pairing_confirm ,mem_le_pairing_state 
+1f85 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f86 c2839f8d bbit1 le_pairing_mode_secure_connect_bit ,le_send_smp_pairing_confirm_sc 
+1f87 20406cba call generate_confirm 
+1f88 18002211 force 17 ,rega 
+1f89 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1f8a 58000003 setarg smp_pairing_confirm 
+1f8b e7e08005 istore 1 ,contw 
+1f8c 20206e3c branch store_aes_result 
+
+le_send_smp_pairing_confirm_sc:
+1f8d d8a04337 arg mem_le_srand ,contw 
+1f8e 20405a8f call generate_random 
+1f8f 20406ae3 call function_f4_cb 
+1f90 18002211 force 17 ,rega 
+1f91 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1f92 58000003 setarg smp_pairing_confirm 
+1f93 e7e08005 istore 1 ,contw 
+1f94 20206b1f branch load_inverse_result 
+
+le_parse_smp_pairing_random:
+1f95 18c22200 copy contr ,rega 
+1f96 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f97 c2839fa9 bbit1 le_pairing_mode_secure_connect_bit ,le_parse_smp_pairing_random_sc 
+1f98 1a220c00 copy rega ,contr 
+1f99 20406cb2 call authenticate_rconfirm 
+1f9a 20229fbe branch le_parse_smp_pairing_random_success ,zero 
+
+le_send_pairing_confirm_value_failed:
+1f9b 7002d904 jam pairing_failed_confirm_value_failed ,mem_le_ll_pairing_fail_reason 
+
+le_send_pairing_failed:
+1f9c 18002202 force 2 ,rega 
+1f9d 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1f9e 58000005 setarg smp_pairing_failed 
+1f9f e7e08005 istore 1 ,contw 
+1fa0 6fe082d9 fetch 1 ,mem_le_ll_pairing_fail_reason 
+1fa1 e7e08005 istore 1 ,contw 
+
+le_parse_smp_pairing_failed:
+1fa2 18000e0a force smp_pairing_timer ,queue 
+1fa3 20407dda call timer_stop 
+1fa4 70439b00 jam flag_le_pairing_null ,mem_le_pairing_state 
+1fa5 70095b30 jam bt_evt_le_pairing_fail ,mem_fifo_temp 
+1fa6 202078dc branch ui_ipc_send_event 
+
+le_smp_pairing_fail_reason_not_support_pairing:
+1fa7 7002d905 jam pairing_failed_pairing_not_supported ,mem_le_ll_pairing_fail_reason 
+1fa8 20201f9c branch le_send_pairing_failed 
+
+le_parse_smp_pairing_random_sc:
+1fa9 d8a00277 arg mem_le_mrand ,contw 
+1faa 1a220c00 copy rega ,contr 
+1fab 20407d7f call memcpy16 
+1fac 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fad c0419fb5 beq le_pairing_mode_secure_connect_passkey ,le_parse_smp_pairing_random_sc_passkey 
+1fae c0421fb5 beq le_pairing_mode_secure_connect_passkey_res_input ,le_parse_smp_pairing_random_sc_passkey 
+1faf 20406a6d call function_g2 
+1fb0 20401fc3 call le_send_smp_pairing_random 
+1fb1 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fb2 c1c10000 rtnne le_pairing_mode_secure_connect_numeric 
+1fb3 70095b3b jam bt_evt_le_gkey_generate ,mem_fifo_temp 
+1fb4 202078dc branch ui_ipc_send_event 
+
+le_parse_smp_pairing_random_sc_passkey:
+1fb5 20406ad8 call function_f4_ca 
+1fb6 d8a009be arg mem_aes_cmac_temp ,contw 
+1fb7 20406b1f call load_inverse_result 
+1fb8 da2009be arg mem_aes_cmac_temp ,rega 
+1fb9 da404327 arg mem_le_rconfirm ,regb 
+1fba df200010 arg 16 ,loopcnt 
+1fbb 20407e66 call string_compare 
+1fbc 24229f9b nbranch le_send_pairing_confirm_value_failed ,zero 
+1fbd 20201fc3 branch le_send_smp_pairing_random 
+
+le_parse_smp_pairing_random_success:
+1fbe 20406cae call generate_stk 
+1fbf 70095b31 jam bt_evt_le_pairing_success ,mem_fifo_temp 
+1fc0 204078dc call ui_ipc_send_event 
+1fc1 70432601 jam 1 ,mem_ltk_exists 
+1fc2 70439b09 jam flag_le_pairing_after_auth ,mem_le_pairing_state 
+
+le_send_smp_pairing_random:
+1fc3 18002211 force 17 ,rega 
+1fc4 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1fc5 58000004 setarg smp_pairing_random 
+1fc6 e7e08005 istore 1 ,contw 
+1fc7 d8c04337 arg mem_le_srand ,contr 
+1fc8 20207d7f branch memcpy16 
+
+le_send_smp_encryption_information:
+1fc9 18002211 force 17 ,rega 
+1fca 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1fcb 58000006 setarg smp_encryption_information 
+1fcc e7e08005 istore 1 ,contw 
+1fcd 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1fce c2809fd1 bbit1 bit_ble_pairing_fixed_ltk ,le_send_fixed_ltk 
+1fcf d8c04316 arg mem_le_ltk ,contr 
+1fd0 20207d7f branch memcpy16 
+
+le_send_fixed_ltk:
+1fd1 d8c043c1 arg mem_le_fixed_ltk ,contr 
+1fd2 20207d7f branch memcpy16 
+
+le_send_smp_master_identification:
+1fd3 d8a043a2 arg mem_le_ediv ,contw 
+1fd4 1800720a force 10 ,loopcnt 
+1fd5 20405a90 call generate_random_loop 
+1fd6 1800220b force 11 ,rega 
+1fd7 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1fd8 58000007 setarg smp_master_identification 
+1fd9 e7e08005 istore 1 ,contw 
+1fda 6fe143a2 fetch 2 ,mem_le_ediv 
+1fdb e7e10005 istore 2 ,contw 
+1fdc 6fe443a4 fetch 8 ,mem_le_rand 
+1fdd e7e40005 istore 8 ,contw 
+1fde 20600000 rtn 
+
+le_send_smp_identity_information:
+1fdf 18002211 force 17 ,rega 
+1fe0 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1fe1 58000008 setarg smp_identity_information 
+1fe2 e7e08005 istore 1 ,contw 
+1fe3 58000000 setarg 0 
+1fe4 e7e40005 istore 8 ,contw 
+1fe5 e7e40005 istore 8 ,contw 
+1fe6 20600000 rtn 
+
+le_send_smp_identity_address_information:
+1fe7 18002208 force 8 ,rega 
+1fe8 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+1fe9 58000009 setarg smp_identity_address_information 
+1fea e7e08005 istore 1 ,contw 
+1feb 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+1fec e7e08005 istore 1 ,contw 
+1fed 6fe3437a fetch 6 ,mem_le_lap 
+1fee e7e30005 istore 6 ,contw 
+1fef 20600000 rtn 
+
+le_send_pairing_fail_unspecified_reason:
+1ff0 7002d908 jam pairing_failed_unspecified_reason ,mem_le_ll_pairing_fail_reason 
+1ff1 20201f9c branch le_send_pairing_failed 
+
+le_check_init_key_distribution:
+1ff2 6fe0c355 fetch 1 ,mem_le_pres_init_key_distribution 
+1ff3 6848c355 fetcht 1 ,mem_le_pres_init_key_distribution 
+1ff4 98417e00 iand temp ,pdata 
+1ff5 20600000 rtn 
+
+le_parse_smp_identity_information:
+1ff6 d8a043ac arg mem_le_irk ,contw 
+1ff7 20407d7f call memcpy16 
+1ff8 20401ff2 call le_check_init_key_distribution 
+1ff9 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+1ffa 20209ff0 branch le_send_pairing_fail_unspecified_reason ,true 
+1ffb 6fe0c09a fetch 1 ,mem_device_option 
+1ffc c1850000 rtnne dvc_op_module 
+1ffd 20402000 call le_check_master_addr_type 
+1ffe 24740000 nrtn user 
+1fff 2020328f branch app_ble_store_reconn_info 
+
+le_check_master_addr_type:
+2000 20407ec7 call disable_user 
+2001 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+2002 c1000000 rtneq master_public_addr 
+2003 6fe0c34e fetch 1 ,mem_le_preq_init_key_distribution 
+2004 c4008000 rtnbit0 le_initator_irk_bit 
+2005 20207ec5 branch enable_user 
+
+le_parse_smp_identity_address_information:
+2006 20401ff2 call le_check_init_key_distribution 
+2007 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+2008 20209ff0 branch le_send_pairing_fail_unspecified_reason ,true 
+2009 20600000 rtn 
+
+le_parse_smp_master_identification:
+
+le_parse_smp_signing_information:
+
+le_parse_smp_security_request:
+200a 20600000 rtn 
+
+le_parse_smp_public_key:
+200b d8a00880 arg mem_le_pubkey_remote_x_256 ,contw 
+200c 20407d72 call memcpy64 
+200d 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+200e 70439901 jam le_sc_stat_receive_public_key ,mem_le_secure_connect_state 
+200f 20600000 rtn 
+
+le_parse_smp_dhkey_check:
+2010 d8a00930 arg mem_sp_confirm_remote ,contw 
+2011 20407d7f call memcpy16 
+2012 70439906 jam le_sc_stat_receive_dhkey ,mem_le_secure_connect_state 
+2013 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+2014 20600000 rtn 
+
+le_send_smp_pairing_public_key:
+2015 18002241 force 65 ,rega 
+2016 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+2017 5800000c setarg smp_pairing_public_key 
+2018 e7e08005 istore 1 ,contw 
+2019 d8c046df arg mem_sc_pubkey_local_x_256 ,contr 
+201a 20207d72 branch memcpy64 
+
+le_send_smp_pairing_dhkey_check:
+201b 20406a84 call function_f6_eb 
+201c 18002211 force 17 ,rega 
+201d 204020b6 call le_fifo_malloc_tx_l2cap_smp 
+201e 5800000d setarg smp_pairing_dhkey_check 
+201f e7e08005 istore 1 ,contw 
+2020 20206b1f branch load_inverse_result 
+
+le_check_paring_time:
+2021 6fe0c39b fetch 1 ,mem_le_pairing_state 
+2022 c17f8000 rtneq flag_le_pairing_end 
+2023 d8400003 arg flag_le_pairing_rcv_pairing_req ,temp 
+2024 98467c00 isub temp ,null 
+2025 24610000 nrtn positive 
+2026 d8e0000a arg smp_pairing_timer ,queue 
+2027 20407de9 call timer_check 
+2028 247a0000 nrtn blank 
+2029 20201ff0 branch le_send_pairing_fail_unspecified_reason 
+
+le_pairing_sm:
+202a 476cc03b bpatchx patch3b_1 ,mem_patch3b 
+202b 20401b24 call le_fifo_check_nearly_full 
+202c 247a0000 nrtn blank 
+202d 6fe0c39b fetch 1 ,mem_le_pairing_state 
+202e c0002037 beq flag_le_pairing_null ,le_pairing_sm_null 
+202f c000a03d beq flag_le_pairing_start ,le_pairing_sm_start 
+2030 c0012037 beq flag_le_pairing_send_recurity_req ,le_pairing_sm_send_sec_req 
+2031 c001a03f beq flag_le_pairing_rcv_pairing_req ,le_pairing_sm_rcv_pairing_req 
+2032 c004a043 beq flag_le_pairing_after_auth ,le_pairing_sm_after_auth 
+2033 c005a053 beq flag_le_paring_send_enc_information ,le_pairng_sm_send_enc_information 
+2034 c0062055 beq flag_le_paring_send_master_identification ,le_pairng_sm_send_master_indentification 
+2035 c006a05c beq flag_le_paring_send_indentity_information ,le_pairng_sm_send_indentity_information 
+2036 20600000 rtn 
+
+le_pairing_sm_null:
+
+le_pairing_sm_send_sec_req:
+2037 6fe0c39c fetch 1 ,mem_le_enc_state 
+2038 c1820000 rtnne flag_le_send_start_enc_rsp 
+2039 70439cff jam flag_le_enc_end ,mem_le_enc_state 
+203a 70439bff jam flag_le_pairing_end ,mem_le_pairing_state 
+203b 70095b3f jam bt_evt_le_reconnect_complete ,mem_fifo_temp 
+203c 202078dc branch ui_ipc_send_event 
+
+le_pairing_sm_start:
+203d 70439b02 jam flag_le_pairing_send_recurity_req ,mem_le_pairing_state 
+203e 20201f46 branch le_send_smp_security_request 
+
+le_pairing_sm_rcv_pairing_req:
+203f 70439b04 jam flag_le_pairing_wait_stk_generation ,mem_le_pairing_state 
+2040 58017700 setarg timer_smp_pairing_timeout 
+2041 d8e0000a arg smp_pairing_timer ,queue 
+2042 20207ddb branch timer_init 
+
+le_pairing_sm_after_auth:
+2043 6fe0c39c fetch 1 ,mem_le_enc_state 
+2044 c0022046 beq flag_le_send_start_enc_rsp ,le_pairing_sm_after_auth_start_enc 
+2045 20600000 rtn 
+
+le_pairing_sm_after_auth_start_enc:
+2046 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+2047 c283a051 bbit1 le_pairing_mode_secure_connect_bit ,le_pairing_sm_after_auth_start_enc_sc 
+2048 70439b0b jam flag_le_paring_send_enc_information ,mem_le_pairing_state 
+2049 20401fc9 call le_send_smp_encryption_information 
+
+le_pairing_sm_after_auth_start_enc_common:
+204a 70095b29 jam bt_evt_le_enc_info ,mem_fifo_temp 
+204b 204078dc call ui_ipc_send_event 
+204c 6fe0c09a fetch 1 ,mem_device_option 
+204d c1850000 rtnne dvc_op_module 
+204e 20402000 call le_check_master_addr_type 
+204f 20740000 rtn user 
+2050 2020328f branch app_ble_store_reconn_info 
+
+le_pairing_sm_after_auth_start_enc_sc:
+2051 70439b0c jam flag_le_paring_send_master_identification ,mem_le_pairing_state 
+2052 2020204a branch le_pairing_sm_after_auth_start_enc_common 
+
+le_pairng_sm_send_enc_information:
+2053 70439b0c jam flag_le_paring_send_master_identification ,mem_le_pairing_state 
+2054 20201fd3 branch le_send_smp_master_identification 
+
+le_pairng_sm_send_master_indentification:
+2055 6fe0c34f fetch 1 ,mem_le_preq_resp_key_distribution 
+2056 6848c356 fetcht 1 ,mem_le_pres_resp_key_distribution 
+2057 98417e00 iand temp ,pdata 
+2058 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+2059 2020a05e branch le_parse_start_enc_rsp_after_auth_end ,true 
+205a 70439b0d jam flag_le_paring_send_indentity_information ,mem_le_pairing_state 
+205b 20201fdf branch le_send_smp_identity_information 
+
+le_pairng_sm_send_indentity_information:
+205c 20401fe7 call le_send_smp_identity_address_information 
+205d 2020205e branch le_parse_start_enc_rsp_after_auth_end 
+
+le_parse_start_enc_rsp_after_auth_end:
+205e 18000e0a force smp_pairing_timer ,queue 
+205f 20407dda call timer_stop 
+2060 70439cff jam flag_le_enc_end ,mem_le_enc_state 
+2061 70439bff jam flag_le_pairing_end ,mem_le_pairing_state 
+2062 70095b3e jam bt_evt_le_pairing_complete ,mem_fifo_temp 
+2063 202078dc branch ui_ipc_send_event 
+
+le_secure_connect_sm:
+2064 476d403b bpatchx patch3b_2 ,mem_patch3b 
+2065 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+2066 c4038000 rtnbit0 le_pairing_mode_secure_connect_bit 
+2067 6fe0c398 fetch 1 ,mem_le_secure_connect_flag 
+2068 c1810000 rtnne le_sp_flag_commit_256 
+2069 70439800 jam sp_flag_standby ,mem_le_secure_connect_flag 
+206a 6fe0c399 fetch 1 ,mem_le_secure_connect_state 
+206b c000a0ac beq le_sc_stat_receive_public_key ,le_sc_sm_receive_public_key 
+206c c00120b3 beq le_sc_stat_wait_send_public_key ,le_sc_sm_wait_send_public_key 
+206d c001a0a4 beq le_sc_stat_send_public_key ,le_sc_sm_send_public_key 
+206e c0032089 beq le_sc_stat_receive_dhkey ,le_sc_sm_receive_dhkey 
+206f c003a080 beq le_sc_stat_wait_confirm_gkey ,le_sc_sm_wait_confirm_gkey 
+2070 c0042076 beq le_sc_stat_passkey_wait_confirm ,le_sc_sm_passkey_wait_confirm 
+2071 20600000 rtn 
+
+le_sc_state_clear:
+2072 70439800 jam sp_flag_standby ,mem_le_secure_connect_flag 
+2073 70439900 jam le_sc_stat_null ,mem_le_secure_connect_state 
+2074 70439a00 jam flag_le_sc_confrim_null ,mem_le_sc_confirm_gkey_flag 
+2075 20600000 rtn 
+
+le_sc_sm_passkey_wait_confirm:
+2076 6fe0c770 fetch 1 ,mem_authentication_passkey_times 
+2077 1fe20e00 copy pdata ,queue 
+2078 1fe0fe01 increase 1 ,pdata 
+2079 67e0c770 store 1 ,mem_authentication_passkey_times 
+207a 6fe2439e fetch 4 ,mem_le_tk 
+207b afefffff qisolate1 pdata 
+207c 58000080 setarg 0x80 
+207d 7920fe00 setflag true ,0 ,pdata 
+207e 67e0c771 store 1 ,mem_passkey_1bit 
+207f 202020a8 branch le_sc_sm_ready_send_pairing_confirm 
+
+le_sc_sm_wait_confirm_gkey:
+2080 6fe0c39a fetch 1 ,mem_le_sc_confirm_gkey_flag 
+2081 70439a00 jam flag_le_sc_confrim_null ,mem_le_sc_confirm_gkey_flag 
+2082 c000a085 beq flag_le_sc_confrim_gkey_ok ,le_sc_confirm_gkey_ok 
+2083 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+2084 20600000 rtn 
+
+le_sc_confirm_gkey_ok:
+2085 70095b31 jam bt_evt_le_pairing_success ,mem_fifo_temp 
+2086 204078dc call ui_ipc_send_event 
+2087 70439b09 jam flag_le_pairing_after_auth ,mem_le_pairing_state 
+2088 2020201b branch le_send_smp_pairing_dhkey_check 
+
+le_sc_sm_receive_dhkey:
+2089 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+208a c001a08d beq sp_key_valid_256 ,le_dhkey_ready 
+208b 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+208c 20600000 rtn 
+
+le_dhkey_ready:
+208d 20406aab call function_f5 
+208e 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+208f c041a092 beq le_pairing_mode_secure_connect_passkey ,le_dhkey_ready_common 
+2090 c0422092 beq le_pairing_mode_secure_connect_passkey_res_input ,le_dhkey_ready_common 
+2091 20401f61 call le_set_tk_0 
+
+le_dhkey_ready_common:
+2092 20406a98 call function_f6_ea 
+2093 da2009be arg mem_aes_cmac_temp ,rega 
+2094 da400930 arg mem_sp_confirm_remote ,regb 
+2095 df200010 arg 16 ,loopcnt 
+2096 20407e66 call string_compare 
+2097 2022a09a branch le_dhkey_check_ok ,zero 
+
+le_dhkey_check_fail:
+2098 7002d90b jam pairing_failed_dhkey_check_failed ,mem_le_ll_pairing_fail_reason 
+2099 20201f9c branch le_send_pairing_failed 
+
+le_dhkey_check_ok:
+209a 20406f58 call sp_calc_check_publickey_256 
+209b 2422a098 nbranch le_dhkey_check_fail ,zero 
+209c 70432601 jam 1 ,mem_ltk_exists 
+209d 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+209e c040a085 beq le_pairing_mode_secure_connect_justwork ,le_sc_confirm_gkey_ok 
+209f c041a085 beq le_pairing_mode_secure_connect_passkey ,le_sc_confirm_gkey_ok 
+20a0 c0422085 beq le_pairing_mode_secure_connect_passkey_res_input ,le_sc_confirm_gkey_ok 
+20a1 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+20a2 70439907 jam le_sc_stat_wait_confirm_gkey ,mem_le_secure_connect_state 
+20a3 20600000 rtn 
+
+le_sc_sm_send_public_key:
+20a4 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+20a5 c041a0a9 beq le_pairing_mode_secure_connect_passkey ,le_sc_sm_send_public_key_passkey 
+20a6 c04220a9 beq le_pairing_mode_secure_connect_passkey_res_input ,le_sc_sm_send_public_key_passkey 
+20a7 70477100 jam 0 ,mem_passkey_1bit 
+
+le_sc_sm_ready_send_pairing_confirm:
+20a8 20201f84 branch le_send_smp_pairing_confirm 
+
+le_sc_sm_send_public_key_passkey:
+20a9 70477000 jam 0 ,mem_authentication_passkey_times 
+20aa c1420000 rtneq le_pairing_mode_secure_connect_passkey_res_input 
+20ab 20201f64 branch le_parse_smp_pairing_req_passkey 
+
+le_sc_sm_receive_public_key:
+20ac 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+20ad 6fe0c6be fetch 1 ,mem_sc_local_key_invalid 
+20ae c001a0b0 beq sp_key_valid_256 ,le_public_key_ready 
+20af 20600000 rtn 
+
+le_public_key_ready:
+20b0 70439902 jam le_sc_stat_wait_send_public_key ,mem_le_secure_connect_state 
+20b1 70087b00 jam sp_key_invalid ,mem_sp_dhkey_invalid 
+20b2 202075ec branch sp_dhkey_calc_256 
+
+le_sc_sm_wait_send_public_key:
+20b3 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+20b4 70439903 jam le_sc_stat_send_public_key ,mem_le_secure_connect_state 
+20b5 20202015 branch le_send_smp_pairing_public_key 
+
+le_fifo_malloc_tx_l2cap_smp:
+20b6 18002406 force le_l2cap_cid_smp ,regb 
+20b7 20201af9 branch le_fifo_malloc_tx_l2cap 
+
+le_parse_ll:
+20b8 6fe0816d fetch 1 ,mem_le_rxbuf_data_ll_opcode 
+20b9 c00020cf beq ll_connection_update_ind ,le_parse_connection_update_ind 
+20ba c000a0d7 beq ll_channel_map_ind ,le_parse_channel_map_ind 
+20bb c00120df beq ll_terminate_ind ,le_parse_terminate_ind 
+20bc c001a0e3 beq ll_enc_req ,le_parse_enc_req 
+20bd c0022102 beq ll_enc_rsp ,le_parse_enc_rsp 
+20be c002a107 beq ll_start_enc_req ,le_parse_start_enc_req 
+20bf c003210b beq ll_start_enc_rsp ,le_parse_start_enc_rsp 
+20c0 c003a110 beq ll_unknown_rsp ,le_parse_unknown_rsp 
+20c1 c0042111 beq ll_feature_req ,le_parse_feature_req 
+20c2 c004a112 beq ll_feature_rsp ,le_parse_feature_rsp 
+20c3 c0052113 beq ll_pause_enc_req ,le_parse_pause_enc_req 
+20c4 c005a117 beq ll_pause_enc_rsp ,le_parse_pause_enc_rsp 
+20c5 c0062118 beq ll_version_ind ,le_parse_version_ind 
+20c6 c006a11a beq ll_reject_ind ,le_parse_reject_ind 
+20c7 c009211b beq ll_ping_req ,le_parse_ping_req 
+20c8 c009a11c beq ll_ping_rsp ,le_parse_ping_rsp 
+20c9 c00a211d beq ll_length_req ,le_parse_length_req 
+20ca c00aa11f beq ll_length_rsp ,le_parse_length_rsp 
+20cb c00b212a beq ll_phy_req ,le_parse_phy_req 
+20cc c00c212b beq ll_phy_update_ind ,le_parse_phy_update_ind 
+20cd 6a60816d fetchr regc ,1 ,mem_le_rxbuf_data_ll_opcode 
+20ce 2020214e branch le_send_unknown_rsp 
+
+le_parse_connection_update_ind:
+20cf efe48006 ifetch 9 ,contr 
+20d0 67e482be store 9 ,mem_le_new_param 
+20d1 efe10006 ifetch 2 ,contr 
+20d2 67e102a7 store 2 ,mem_le_instant 
+20d3 6fe08287 fetch 1 ,mem_le_state 
+20d4 79207e05 set1 lestate_update_param ,pdata 
+20d5 67e08287 store 1 ,mem_le_state 
+20d6 20600000 rtn 
+
+le_parse_channel_map_ind:
+20d7 efe28006 ifetch 5 ,contr 
+20d8 67e282be store 5 ,mem_le_new_map 
+20d9 efe10006 ifetch 2 ,contr 
+20da 67e102a7 store 2 ,mem_le_instant 
+
+le_update_map_enable:
+20db 6fe08287 fetch 1 ,mem_le_state 
+20dc 79207e06 set1 lestate_update_map ,pdata 
+20dd 67e08287 store 1 ,mem_le_state 
+20de 20600000 rtn 
+
+le_parse_terminate_ind:
+20df 58000014 setarg 20 
+20e0 67e102b5 store 2 ,mem_le_superto 
+20e1 67e14394 store 2 ,mem_le_init_superto 
+20e2 20600000 rtn 
+
+le_parse_enc_req:
+20e3 efe40006 ifetch 8 ,contr 
+20e4 67e443a4 store 8 ,mem_le_rand 
+20e5 efe10006 ifetch 2 ,contr 
+20e6 67e143a2 store 2 ,mem_le_ediv 
+20e7 efe40006 ifetch 8 ,contr 
+20e8 67e44384 store 8 ,mem_le_skdm 
+20e9 efe20006 ifetch 4 ,contr 
+20ea 67e246ad store 4 ,mem_ccm_ivm 
+20eb 2040213b call le_send_enc_rsp 
+20ec 476dc03b bpatchx patch3b_3 ,mem_patch3b 
+20ed 6fe0c39b fetch 1 ,mem_le_pairing_state 
+20ee c004a0f5 beq flag_le_pairing_after_auth ,le_parse_enc_req_after_auth 
+20ef 6fe0c3c0 fetch 1 ,mem_le_configuration 
+20f0 c280a0f8 bbit1 bit_ble_pairing_fixed_ltk ,le_parse_enc_req_fixed_ltk 
+20f1 6fe0c48b fetch 1 ,mem_nv_data_number 
+20f2 245a60bc ncall load_device_list_mode_4 ,blank 
+20f3 6fe0c326 fetch 1 ,mem_ltk_exists 
+20f4 c00020fd beq 0 ,le_ltk_lost 
+
+le_parse_enc_req_after_auth:
+20f5 70439c01 jam flag_le_rcv_enc_start ,mem_le_enc_state 
+20f6 20402149 call le_send_start_enc_req 
+20f7 20206cc0 branch generate_sk 
+
+le_parse_enc_req_fixed_ltk:
+20f8 70432601 jam 1 ,mem_ltk_exists 
+20f9 d8c043c1 arg mem_le_fixed_ltk ,contr 
+20fa d8a04316 arg mem_le_ltk ,contw 
+20fb 20407d7f call memcpy16 
+20fc 202020f5 branch le_parse_enc_req_after_auth 
+
+le_ltk_lost:
+20fd 476e403b bpatchx patch3b_4 ,mem_patch3b 
+20fe 70439c00 jam flag_le_enc_null ,mem_le_enc_state 
+20ff 70439b00 jam flag_le_enc_null ,mem_le_pairing_state 
+2100 70095b41 jam bt_evt_le_ltk_lost ,mem_fifo_temp 
+2101 202078dc branch ui_ipc_send_event 
+
+le_parse_enc_rsp:
+2102 efe40006 ifetch 8 ,contr 
+2103 67e4438c store 8 ,mem_le_skds 
+2104 efe20006 ifetch 4 ,contr 
+2105 67e246b1 store 4 ,mem_ccm_ivs 
+2106 20206cc0 branch generate_sk 
+
+le_parse_start_enc_req:
+2107 6fe08287 fetch 1 ,mem_le_state 
+2108 79207e04 set1 lestate_encryption ,pdata 
+2109 67e08287 store 1 ,mem_le_state 
+210a 20600000 rtn 
+
+le_parse_start_enc_rsp:
+210b 20748000 rtn master 
+210c 70095b32 jam bt_evt_le_start_enc ,mem_fifo_temp 
+210d 204078dc call ui_ipc_send_event 
+210e 70439c04 jam flag_le_send_start_enc_rsp ,mem_le_enc_state 
+210f 2020214c branch le_send_start_enc_rsp 
+
+le_parse_unknown_rsp:
+2110 20600000 rtn 
+
+le_parse_feature_req:
+2111 20202153 branch le_send_feature_rsp 
+
+le_parse_feature_rsp:
+2112 20600000 rtn 
+
+le_parse_pause_enc_req:
+2113 70439c02 jam flag_le_enc_pause ,mem_le_enc_state 
+2114 2040215a call le_send_pause_enc_rsp 
+2115 70095b33 jam bt_evt_le_pause_enc ,mem_fifo_temp 
+2116 202078dc branch ui_ipc_send_event 
+
+le_parse_pause_enc_rsp:
+2117 20600000 rtn 
+
+le_parse_version_ind:
+2118 20748000 rtn master 
+2119 2020215c branch le_send_version_ind 
+
+le_parse_reject_ind:
+211a 20600000 rtn 
+
+le_parse_ping_req:
+211b 20202168 branch le_send_ping_rsp 
+
+le_parse_ping_rsp:
+211c 20600000 rtn 
+
+le_parse_length_req:
+211d 2040211f call le_parse_length_rsp 
+211e 2020216c branch le_send_data_length_res 
+
+le_parse_length_rsp:
+211f efe40006 ifetch 8 ,contr 
+2120 67e44444 store 8 ,mem_remote_rx_max_octets 
+2121 6fe14444 fetch 2 ,mem_remote_rx_max_octets 
+2122 68494450 fetcht 2 ,mem_local_tx_max_octets 
+2123 20407ebb call not_greater_than 
+2124 67e14444 store 2 ,mem_remote_rx_max_octets 
+2125 6fe14448 fetch 2 ,mem_remote_tx_max_octets 
+2126 6849444c fetcht 2 ,mem_local_rx_max_octets 
+2127 20407ebb call not_greater_than 
+2128 67e14448 store 2 ,mem_remote_tx_max_octets 
+2129 20600000 rtn 
+
+le_parse_phy_req:
+212a 20202172 branch le_send_phy_rsp 
+
+le_parse_phy_update_ind:
+212b efe10006 ifetch 2 ,contr 
+212c 67e102be store 2 ,mem_le_new_m2s_phy 
+212d efe10006 ifetch 2 ,contr 
+212e 67e102a7 store 2 ,mem_le_instant 
+212f 207a0000 rtn blank 
+2130 6fe08287 fetch 1 ,mem_le_state 
+2131 79207e07 set1 lestate_update_phy ,pdata 
+2132 67e08287 store 1 ,mem_le_state 
+2133 20600000 rtn 
+
+le_send_terminate_ind_user_terminated:
+2134 da600013 arg error_remote_user_terminated_connection ,regc 
+
+le_send_terminate_ind:
+2135 da200002 arg 2 ,rega 
+2136 da400002 arg ll_terminate_ind ,regb 
+2137 20401af4 call le_fifo_malloc_tx_ll 
+2138 1a627e00 copy regc ,pdata 
+2139 e7e08005 istore 1 ,contw 
+213a 20600000 rtn 
+
+le_send_enc_rsp:
+213b d8a0438c arg mem_le_skds ,contw 
+213c 18007208 force 8 ,loopcnt 
+213d 20405a90 call generate_random_loop 
+213e d8a046b1 arg mem_ccm_ivs ,contw 
+213f 18007204 force 4 ,loopcnt 
+2140 20405a90 call generate_random_loop 
+2141 da20000d arg 13 ,rega 
+2142 da400004 arg ll_enc_rsp ,regb 
+2143 20401af4 call le_fifo_malloc_tx_ll 
+2144 6fe4438c fetch 8 ,mem_le_skds 
+2145 e7e40005 istore 8 ,contw 
+2146 6fe246b1 fetch 4 ,mem_ccm_ivs 
+2147 e7e20005 istore 4 ,contw 
+2148 20600000 rtn 
+
+le_send_start_enc_req:
+2149 70439c05 jam flag_le_send_start_enc_req ,mem_le_enc_state 
+214a da400005 arg ll_start_enc_req ,regb 
+214b 2020217c branch le_send_ll_one_lenth 
+
+le_send_start_enc_rsp:
+214c da400006 arg ll_start_enc_rsp ,regb 
+214d 2020217c branch le_send_ll_one_lenth 
+
+le_send_unknown_rsp:
+214e da200002 arg 2 ,rega 
+214f da400007 arg ll_unknown_rsp ,regb 
+2150 20401af4 call le_fifo_malloc_tx_ll 
+2151 e2608005 istorer regc ,1 ,contw 
+2152 20600000 rtn 
+
+le_send_feature_rsp:
+2153 da200009 arg 9 ,rega 
+2154 da400009 arg ll_feature_rsp ,regb 
+2155 20401af4 call le_fifo_malloc_tx_ll 
+2156 6fe4443a fetch 8 ,mem_le_local_feature 
+2157 1fe1fe01 or pdata ,fun_ll_feature_le_encryption ,pdata 
+2158 e7e40005 istore 8 ,contw 
+2159 20600000 rtn 
+
+le_send_pause_enc_rsp:
+215a da40000b arg ll_pause_enc_rsp ,regb 
+215b 2020217c branch le_send_ll_one_lenth 
+
+le_send_version_ind:
+215c da200006 arg 6 ,rega 
+215d da40000c arg ll_version_ind ,regb 
+215e 20401af4 call le_fifo_malloc_tx_ll 
+215f 6fe2c5fa fetch 5 ,mem_lmp_version 
+2160 e7e28005 istore 5 ,contw 
+2161 20600000 rtn 
+
+le_send_reject_ind:
+2162 da200002 arg 2 ,rega 
+2163 da40000d arg ll_reject_ind ,regb 
+2164 20401af4 call le_fifo_malloc_tx_ll 
+2165 58000006 setarg le_err_pin_or_key_missing 
+2166 e7e08005 istore 1 ,contw 
+2167 20600000 rtn 
+
+le_send_ping_rsp:
+2168 da400013 arg ll_ping_rsp ,regb 
+2169 2020217c branch le_send_ll_one_lenth 
+
+le_send_data_length_req:
+216a da400014 arg ll_length_req ,regb 
+216b 2020216d branch le_send_data_length 
+
+le_send_data_length_res:
+216c da400015 arg ll_length_rsp ,regb 
+
+le_send_data_length:
+216d da200009 arg 9 ,rega 
+216e 20401af4 call le_fifo_malloc_tx_ll 
+216f 6fe4444c fetch 8 ,mem_local_rx_max_octets 
+2170 e7e40005 istore 8 ,contw 
+2171 20600000 rtn 
+
+le_send_phy_rsp:
+2172 da200003 arg 3 ,rega 
+2173 da400017 arg ll_phy_rsp ,regb 
+2174 20401af4 call le_fifo_malloc_tx_ll 
+2175 6fe0c442 fetch 1 ,mem_le_tx_phys 
+2176 1fe17e07 and pdata ,0x07 ,pdata 
+2177 e7e08005 istore 1 ,contw 
+2178 6fe0c443 fetch 1 ,mem_le_rx_phys 
+2179 1fe17e07 and pdata ,0x07 ,pdata 
+217a e7e08005 istore 1 ,contw 
+217b 20600000 rtn 
+
+le_send_ll_one_lenth:
+217c da200001 arg 1 ,rega 
+217d 20201af4 branch le_fifo_malloc_tx_ll 
+
+g24_dispatch:
+217e 476ec03b bpatchx patch3b_5 ,mem_patch3b 
+217f c513a3e1 bmark1 mark_24g_rxmode ,g24_receive_dispatch 
+2180 20202622 branch g24_transmit_dispatch 
+
+g24_prep:
+2181 7844fc00 disable enable_crc 
+2182 7843fc00 disable enable_white 
+2183 58555555 setarg 0x555555 
+2184 98001e00 iforce crc24_init 
+2185 6fe0c83d fetch 1 ,mem_24g_ch 
+2186 2020166f branch le_prep + 5 
+
+g24_receive_packet:
+2187 476f403b bpatchx patch3b_6 ,mem_patch3b 
+2188 6fe0c867 fetch 1 ,mem_24g_rx_phy 
+2189 20401637 call le_enable_phy_by_pdata 
+218a 6fe2483f fetch 4 ,mem_24g_addr 
+218b 98001200 iforce access 
+218c 204010ac call calc_mod_value_scale_le 
+218d 2040115d call set_sync_on 
+218e 6848c83d fetcht 1 ,mem_24g_ch 
+218f 20401674 call le_rf_rx_enable 
+
+g24_receive_rxon:
+2190 20402181 call g24_prep 
+2191 c597a195 bmark0 mark_ble_lr ,g24_receive_nolr 
+2192 783cfc00 pulse dewhiten_code_calc 
+2193 2000001e nop 30 
+2194 20402181 call g24_prep 
+
+g24_receive_nolr:
+2195 7857fc00 disable user3 
+2196 7826fc00 enable decode_fec0 
+2197 7830fc00 enable is_rx 
+2198 78507c00 disable is_tx 
+2199 78287c00 enable swfine 
+219a 6fe1483b fetch 2 ,mem_24g_rx_window 
+219b 98003600 iforce stop_watch 
+219c 37c18400 correlate null ,timeout 
+219d 242c21ef nbranch g24_sync_timeout ,sync 
+219e 20404d0d call rf_debug_rx_sync_line 
+219f c517a1a4 bmark1 mark_ble_lr ,g24_receive_skip_fec1 
+21a0 6fe0c87a fetch 1 ,mem_24g_disable_fec1 
+21a1 243a21a4 nbranch g24_receive_skip_fec1 ,blank 
+21a2 7846fc00 disable decode_fec0 
+21a3 7825fc00 enable decode_fec1 
+
+g24_receive_skip_fec1:
+21a4 7823fc00 enable enable_white 
+21a5 7824fc00 enable enable_crc 
+21a6 204021ec call g24_receive_byte 
+21a7 67e0c85d store 1 ,mem_24g_get_syncword_crc8 
+21a8 6848c85c fetcht 1 ,mem_24g_syncword_crc8 
+21a9 98467c00 isub temp ,null 
+21aa 2422a1f1 nbranch g24_end_of_packet ,zero 
+21ab 476fc03b bpatchx patch3b_7 ,mem_patch3b 
+21ac 7858fc00 disable user7 
+21ad 280ffe2f isolate1 mark_ble_lr ,mark 
+21ae 2040a1de call g24_lr_receive_pdu_len ,true 
+21af 2038a1f1 branch g24_end_of_packet ,user7 
+21b0 204021ec call g24_receive_byte 
+21b1 67e0c7a7 store 1 ,mem_24g_rxbuf 
+21b2 c513a1b7 bmark1 mark_24g_rxmode ,g24_receive_skip 
+21b3 6fe0c7a7 fetch 1 ,mem_24g_rxbuf 
+21b4 6848c839 fetcht 1 ,mem_24g_data_type 
+21b5 a8400e00 icompare bits_data ,temp 
+21b6 2420a1f1 nbranch g24_end_of_packet ,true 
+
+g24_receive_skip:
+21b7 204021ec call g24_receive_byte 
+21b8 280ffe2f isolate1 mark_ble_lr ,mark 
+21b9 2040a1e7 call g24_lr_receive_payload_len ,true 
+21ba e7e08005 istore 1 ,contw 
+21bb 1fe97e00 rshift3 pdata ,pdata 
+21bc 1fe67c1f sub pdata ,0x1f ,null 
+21bd 242121f1 nbranch g24_end_of_packet ,positive 
+21be 1fe27200 copy pdata ,loopcnt 
+21bf 2022a1c3 branch g24rx_nopayload ,zero 
+
+g24rx_loop:
+21c0 204021ec call g24_receive_byte 
+21c1 e7e08005 istore 1 ,contw 
+21c2 c20021c0 loop g24rx_loop 
+
+g24rx_nopayload:
+21c3 c513a1c8 bmark1 mark_24g_rxmode ,g24_receive_skip_rssi 
+21c4 18a22200 copy contw ,rega 
+21c5 204021ec call g24_receive_byte 
+21c6 67e0c882 store 1 ,mem_rssi_hex_received 
+21c7 1a220a00 copy rega ,contw 
+
+g24_receive_skip_rssi:
+21c8 09800018 parse demod ,bucket ,24 
+21c9 1fef7e00 rshift32 pdata ,pdata 
+21ca 1ff17e00 rshift16 pdata ,pdata 
+21cb e7e18005 istore 3 ,contw 
+21cc 6fe0c87a fetch 1 ,mem_24g_disable_fec1 
+21cd 243a21dc nbranch g24_receive_skip_disable_fec1 ,blank 
+21ce 7845fc00 disable decode_fec1 
+
+g24_receive_skip_next:
+21cf 280ffe27 isolate1 mark_24g_rxmode ,mark 
+21d0 2040a5e5 call save_rssi_dec ,true 
+21d1 202321f1 branch g24_end_of_packet ,crc_failed 
+21d2 20404d0c call rf_debug_rx_crc_line 
+21d3 7837fc00 enable user3 
+21d4 2040175c call le_match_set_txfreq 
+21d5 4770403c bpatchx patch3c_0 ,mem_patch3c 
+21d6 c6138000 rtnmark1 mark_24g_rxmode 
+21d7 6fe0c882 fetch 1 ,mem_rssi_hex_received 
+21d8 6848c8d1 fetcht 1 ,mem_rssi_hex_received_max_value 
+21d9 98467c00 isub temp ,null 
+21da 20417ebd call copy_temp2pdata ,positive 
+21db 202025e9 branch rssi_signal 
+
+g24_receive_skip_disable_fec1:
+21dc 7846fc00 disable decode_fec0 
+21dd 202021cf branch g24_receive_skip_next 
+
+g24_lr_receive_pdu_len:
+21de 204021ec call g24_receive_byte 
+21df 1fe67c01 sub pdata ,1 ,null 
+21e0 20217ecd branch enable_user7 ,positive 
+21e1 1fe0fffe increase -2 ,pdata 
+21e2 c513a1e5 bmark1 mark_24g_rxmode ,g24_lr_receive_pdu_norssi 
+21e3 203a7ecd branch enable_user7 ,blank 
+21e4 1fe0ffff increase -1 ,pdata 
+
+g24_lr_receive_pdu_norssi:
+21e5 67e08964 store 1 ,mem_temp 
+21e6 20600000 rtn 
+
+g24_lr_receive_payload_len:
+21e7 1fe17e07 and_into 0x07 ,pdata 
+21e8 68488964 fetcht 1 ,mem_temp 
+21e9 18498400 lshift3 temp ,temp 
+21ea 9841fe00 ior temp ,pdata 
+21eb 20600000 rtn 
+
+g24_receive_byte:
+21ec 09800008 parse demod ,bucket ,8 
+21ed 19897e00 rshift3 pwindow ,pdata 
+21ee 20600000 rtn 
+
+g24_sync_timeout:
+21ef 280ffe27 isolate1 mark_24g_rxmode ,mark 
+21f0 2040a601 call rssi_noise ,true 
+
+g24_end_of_packet:
+21f1 2040165e call le_disable 
+21f2 784dfc00 disable encode_fec1 
+21f3 7845fc00 disable decode_fec1 
+21f4 20200e7c branch end_of_packet 
+
+g24_set_freq_tx:
+21f5 2040115d call set_sync_on 
+21f6 6848c83d fetcht 1 ,mem_24g_ch 
+21f7 20201201 branch set_freq_tx 
+
+g24_transmit:
+21f8 4770c03c bpatchx patch3c_1 ,mem_patch3c 
+21f9 6fe0c868 fetch 1 ,mem_24g_tx_phy 
+21fa 20401637 call le_enable_phy_by_pdata 
+21fb 6fe2483f fetch 4 ,mem_24g_addr 
+21fc 98001200 iforce access 
+21fd 20402181 call g24_prep 
+21fe 204021f5 call g24_set_freq_tx 
+21ff 79202a00 set1 txgfsk ,radio_ctrl 
+2200 782efc00 enable encode_fec0 
+2201 78307c00 enable is_tx 
+2202 7850fc00 disable is_rx 
+2203 20404d13 call rf_debug_tx_on_line 
+2204 785d7c00 disable lr_s2en 
+2205 c517a229 bmark1 mark_ble_lr ,g24_transmit_lr 
+2206 c516a23b bmark1 mark_ble_2m ,g24_transmit_2m 
+2207 19317e00 rshift16 access ,pdata 
+2208 1fecfe00 rshift8 pdata ,pdata 
+2209 1ff1fe00 rshift4 pdata ,pdata 
+220a 08008628 inject mod ,40 
+
+g24_transmit_packet:
+220b c517a210 bmark1 mark_ble_lr ,g24_transmit_nolr 
+220c 6fe0c87a fetch 1 ,mem_24g_disable_fec1 
+220d 243a2210 nbranch g24_transmit_nolr ,blank 
+220e 784efc00 disable encode_fec0 
+220f 782dfc00 enable encode_fec1 
+
+g24_transmit_nolr:
+2210 7823fc00 enable enable_white 
+2211 7824fc00 enable enable_crc 
+2212 6fe0c83a fetch 1 ,mem_24g_txlen 
+2213 98007200 iforce loopcnt 
+2214 d8c047e9 arg mem_24g_txpayload ,contr 
+
+g24tr_loop:
+2215 efe08006 ifetch 1 ,contr 
+2216 08008608 inject mod ,8 
+2217 c2002215 loop g24tr_loop 
+2218 78247c00 enable enable_parity 
+2219 08008618 inject mod ,24 
+221a 78447c00 disable enable_parity 
+221b c597a21f bmark0 mark_ble_lr ,g24_transmit_skip 
+221c 7843fc00 disable enable_white 
+221d 58000000 setarg 0 
+221e 08008603 inject mod ,3 
+
+g24_transmit_skip:
+221f 37d38200 until null ,tx_clear 
+2220 20000064 nop 100 
+2221 785d7c00 disable lr_s2en 
+2222 784efc00 disable encode_fec0 
+2223 6fe0c87a fetch 1 ,mem_24g_disable_fec1 
+2224 243a2226 nbranch g24_transmit_skip_disable_fec1 ,blank 
+2225 784dfc00 disable encode_fec1 
+
+g24_transmit_skip_disable_fec1:
+2226 785c7c00 disable encode_fec3 
+2227 2040115d call set_sync_on 
+2228 20204d11 branch rf_debug_tx_off_line 
+
+g24_transmit_lr:
+2229 df20000a arg 10 ,loopcnt 
+
+g24_transmit_lr_preamble_loop:
+222a 5800003c setarg 0x3c 
+222b 08008608 inject mod ,8 
+222c c200222a loop g24_transmit_lr_preamble_loop 
+222d 784efc00 disable encode_fec0 
+222e 783c7c00 enable encode_fec3 
+222f 19317e00 rshift16 access ,pdata 
+2230 1ff17e00 rshift16 pdata ,pdata 
+2231 1ff1fe00 rshift4 pdata ,pdata 
+2232 08008620 inject mod ,32 
+2233 c5172238 bmark1 mark_ble_lr_s8 ,g24_transmit_lr_s8 
+
+g24_transmit_lr_s2:
+2234 58000001 setarg 1 
+2235 08008605 inject mod ,5 
+2236 783d7c00 enable lr_s2en 
+2237 2020220b branch g24_transmit_packet 
+
+g24_transmit_lr_s8:
+2238 58000000 setarg 0 
+2239 08008605 inject mod ,5 
+223a 2020220b branch g24_transmit_packet 
+
+g24_transmit_2m:
+223b 6fe0c1f0 fetch 1 ,mem_system_clk 
+223c 1fe37200 rshift pdata ,loopcnt 
+
+g24_transmit_2m_dealy:
+223d 20000002 nop 2 
+223e c200223d loop g24_transmit_2m_dealy 
+223f 19317e00 rshift16 access ,pdata 
+2240 1fecfe00 rshift8 pdata ,pdata 
+2241 1ff18400 rshift4 pdata ,temp 
+2242 18427e00 copy temp ,pdata 
+2243 08008608 inject mod ,8 
+2244 18427e00 copy temp ,pdata 
+2245 08008628 inject mod ,40 
+2246 2020220b branch g24_transmit_packet 
+
+g24_transmit_prep:
+2247 6fe0c868 fetch 1 ,mem_24g_tx_phy 
+2248 c2812266 bbit1 bit_le_coded_phy ,g24_lr_transmit_prep 
+2249 6fe0c838 fetch 1 ,mem_24g_datalen 
+224a 1fe0fe03 increase 3 ,pdata 
+224b 67e0c83a store 1 ,mem_24g_txlen 
+224c 6fe0c85c fetch 1 ,mem_24g_syncword_crc8 
+224d 67e0c7e9 store 1 ,mem_24g_txpayload 
+224e 6fe0c839 fetch 1 ,mem_24g_data_type 
+224f e7e08005 istore 1 ,contw 
+2250 6fe0c838 fetch 1 ,mem_24g_datalen 
+
+g24_transmit_prep_pdu:
+2251 1fe9fe00 lshift3 pdata ,pdata 
+2252 6848c82e fetcht 1 ,mem_24g_pid 
+2253 18410403 and temp ,0x03 ,temp 
+2254 18438400 lshift temp ,temp 
+2255 9841fe00 ior temp ,pdata 
+2256 6848c82f fetcht 1 ,mem_24g_no_ack 
+2257 9840fe00 iadd temp ,pdata 
+2258 e7e08005 istore 1 ,contw 
+2259 6fe0c838 fetch 1 ,mem_24g_datalen 
+225a 98007200 iforce loopcnt 
+225b d8c047c9 arg mem_24g_txbuf ,contr 
+225c 20407dd4 call memcpy 
+225d c6938000 rtnmark0 mark_24g_rxmode 
+225e 6fe08154 fetch 1 ,mem_rssi_hex 
+225f e7e08005 istore 1 ,contw 
+2260 6fe0c868 fetch 1 ,mem_24g_tx_phy 
+2261 c3810000 rtnbit1 bit_le_coded_phy 
+2262 6fe0c83a fetch 1 ,mem_24g_txlen 
+2263 1fe0fe01 increase 1 ,pdata 
+2264 67e0c83a store 1 ,mem_24g_txlen 
+2265 20600000 rtn 
+
+g24_lr_transmit_prep:
+2266 6fe0c838 fetch 1 ,mem_24g_datalen 
+2267 1fe0fe04 increase 4 ,pdata 
+2268 c593a26a bmark0 mark_24g_rxmode ,g24_lr_transmit_prep_skip 
+2269 1fe0fe01 increase 1 ,pdata 
+
+g24_lr_transmit_prep_skip:
+226a 67e0c83a store 1 ,mem_24g_txlen 
+226b 6fe0c85c fetch 1 ,mem_24g_syncword_crc8 
+226c 67e0c7e9 store 1 ,mem_24g_txpayload 
+226d 6fe0c83a fetch 1 ,mem_24g_txlen 
+226e 1fe0fffe increase -2 ,pdata 
+226f e7e08005 istore 1 ,contw 
+2270 6fe0c839 fetch 1 ,mem_24g_data_type 
+2271 e7e08005 istore 1 ,contw 
+2272 58000000 setarg 0 
+2273 20202251 branch g24_transmit_prep_pdu 
+
+g24_read_len_pid_crc:
+2274 6fe0c7a8 fetch 1 ,mem_24g_rxbuf + 1 
+2275 1fe97e00 rshift3 pdata ,pdata 
+2276 67e0c82d store 1 ,mem_24g_rxdata_length 
+2277 1fe0fe01 increase 1 ,pdata 
+2278 d8c047a8 arg mem_24g_rxbuf + 1 ,contr 
+2279 98c08c00 iadd contr ,contr 
+227a efe18006 ifetch 3 ,contr 
+227b 67e1c830 store 3 ,mem_24g_sta_crc 
+227c 6fe0c7a8 fetch 1 ,mem_24g_rxbuf + 1 
+227d 1fe37e00 rshift pdata ,pdata 
+227e 1fe17e03 and pdata ,0x03 ,pdata 
+227f 67e0c836 store 1 ,mem_24g_sta_pid 
+2280 20600000 rtn 
+
+g24_ch:
+2281 6848c83e fetcht 1 ,mem_24g_current_ch_number 
+2282 20402285 call g24_ch_map_size 
+2283 6048c83e storet 1 ,mem_24g_current_ch_number 
+2284 20600000 rtn 
+
+g24_ch_map_size:
+2285 20402289 call g24_ch_calc 
+2286 18408401 increase 1 ,temp 
+2287 18410403 and_into 3 ,temp 
+2288 20600000 rtn 
+
+g24_ch_calc:
+2289 6fe0c83f fetch 1 ,mem_24g_addr 
+228a 1fe17e03 and_into 0x03 ,pdata 
+228b 1fefa204 mul32 pdata ,4 ,rega 
+228c 58004843 setarg mem_24g_ch_map1 
+228d 9a20fe00 iadd rega ,pdata 
+228e 98408c00 iadd temp ,contr 
+228f efe08006 ifetch 1 ,contr 
+2290 67e0c83d store 1 ,mem_24g_ch 
+2291 20600000 rtn 
+
+g24_update_addr_and_synccrc8:
+2292 67e2483f store 4 ,mem_24g_addr 
+
+g24_syncword_crc8:
+2293 da200000 arg 0 ,rega 
+2294 df200004 arg 4 ,loopcnt 
+2295 d8c0483f arg mem_24g_addr ,contr 
+
+g24_syncword_crc8_loop:
+2296 efe08006 ifetch 1 ,contr 
+2297 9a20a200 iadd rega ,rega 
+2298 c2002296 loop g24_syncword_crc8_loop 
+2299 1a227e00 copy rega ,pdata 
+229a 67e1485a store 2 ,mem_24g_syncword 
+229b 6fe0c85a fetch 1 ,mem_24g_syncword 
+229c 6848c85b fetcht 1 ,mem_24g_syncword + 1 
+229d 9840fe00 iadd temp ,pdata 
+229e 67e0c85c store 1 ,mem_24g_syncword_crc8 
+229f 20600000 rtn 
+
+g24_timer_check:
+22a0 20407ec7 call disable_user 
+22a1 684a4853 fetcht 4 ,mem_24g_tx_btclk 
+22a2 1c427e00 copy clkn_bt ,pdata 
+22a3 98467c00 isub temp ,null 
+22a4 244122af ncall g24_timer_timeout ,positive 
+22a5 1fe22400 copy pdata ,regb 
+22a6 6fe24853 fetch 4 ,mem_24g_tx_btclk 
+22a7 6848c857 fetcht 1 ,mem_24g_interval 
+22a8 98408400 iadd temp ,temp 
+22a9 1a427e00 copy regb ,pdata 
+22aa 98467c00 isub temp ,null 
+22ab 24610000 nrtn positive 
+22ac 793ffe1c set0 28 ,pdata 
+22ad 67e24853 store 4 ,mem_24g_tx_btclk 
+22ae 20207ec5 branch enable_user 
+
+g24_timer_timeout:
+22af 20628000 rtn zero 
+22b0 79207e1c set1 28 ,pdata 
+22b1 20600000 rtn 
+
+g24_timer_init:
+22b2 58000000 setarg 0 
+22b3 67e24853 store 4 ,mem_24g_tx_btclk 
+22b4 20600000 rtn 
+
+g24_chmap_param_init:
+22b5 38001300 setsect 0 ,0x1300 
+22b6 3805908b setsect 1 ,0x1908b 
+22b7 380b6150 setsect 2 ,0x36150 
+22b8 380c3d20 setsect 3 ,0x3d20 
+22b9 67e4c843 store 9 ,mem_24g_ch_map1 
+22ba 38003a1a setsect 0 ,0x3a1a 
+22bb 3804c453 setsect 1 ,0xc453 
+22bc 3808d312 setsect 2 ,0xd312 
+22bd 380c0001 setsect 3 ,0x1 
+22be e7e38005 istore 7 ,contw 
+22bf 6fe0c869 fetch 1 ,mem_24g_ch_map_update 
+22c0 207a0000 rtn blank 
+22c1 d8c0486a arg mem_24g_ch_update_map1 ,contr 
+22c2 d8a04843 arg mem_24g_ch_map1 ,contw 
+22c3 20207d7f branch memcpy16 
+
+g24_chamap_param_update:
+22c4 584e001e setarg 0x4e001e 
+22c5 67e1c86b store 3 ,mem_24g_ch_update_map1 + 1 
+22c6 58032303 setarg 0x032303 
+22c7 e7e18005 istore 3 ,contw 
+22c8 58250642 setarg 0x250642 
+22c9 e7e18005 istore 3 ,contw 
+22ca 58094c06 setarg 0x094c06 
+22cb e7e18005 istore 3 ,contw 
+22cc 583c0927 setarg 0x3c0927 
+22cd e7e18005 istore 3 ,contw 
+22ce 70486901 jam 1 ,mem_24g_ch_map_update 
+22cf 20600000 rtn 
+
+g24_rx_window_init:
+22d0 d8406978 arg 0x6978 ,temp 
+22d1 c513a2d6 bmark1 mark_24g_rxmode ,g24_rx_window_store 
+22d2 d84012c0 arg 0x12c0 ,temp 
+22d3 6fe0c867 fetch 1 ,mem_24g_rx_phy 
+22d4 c30122d6 bbit0 2 ,g24_rx_window_store 
+22d5 d8402ee0 arg 0x2ee0 ,temp 
+
+g24_rx_window_store:
+22d6 6049483b storet 2 ,mem_24g_rx_window 
+22d7 20600000 rtn 
+
+g24_enable_1m:
+22d8 70486701 jam 0x01 ,mem_24g_rx_phy 
+22d9 70486801 jam 0x01 ,mem_24g_tx_phy 
+22da 20600000 rtn 
+
+g24_pair_param_init:
+22db 70487f4e jam 0x4e ,mem_24g_pair_ch 
+22dc 58101520 setarg 0x101520 
+22dd 67e1c87b store 3 ,mem_24g_pair_addr 
+22de 58000005 setarg 0x05 
+22df e7e08005 istore 1 ,contw 
+22e0 20600000 rtn 
+
+g24_pair_timeout_timer:
+22e1 da604887 arg mem_24g_pair_timeout ,regc 
+22e2 da402683 arg g24_stop_24g_mode ,regb 
+22e3 20203203 branch timer_single_step_2b 
+
+g24_pair_start:
+22e4 79200026 set1 mark_24g ,mark 
+22e5 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+22e6 793ffe02 set0 state_24g_reconn ,pdata 
+22e7 79207e01 set1 state_24g_pair ,pdata 
+22e8 67e0c8a5 store 1 ,mem_24g_conn_sm 
+22e9 58000000 setarg 0 
+22ea 67e1488b store 2 ,mem_24g_reconn_timeout 
+22eb 6fe14885 fetch 2 ,mem_24g_pair_timeout_init 
+22ec 67e14887 store 2 ,mem_24g_pair_timeout 
+22ed 70488400 jam 0 ,mem_24g_pair_no_ack 
+22ee 20402322 call g24_pair_sm_reinit 
+
+g24_pair_init_param:
+22ef 70482e00 jam 0 ,mem_24g_pid 
+22f0 6fe0c87f fetch 1 ,mem_24g_pair_ch 
+22f1 67e0c83d store 1 ,mem_24g_ch 
+22f2 6fe0c880 fetch 1 ,mem_24g_pair_tx_power 
+22f3 67e0c1e8 store 1 ,mem_tx_power 
+22f4 6fe2487b fetch 4 ,mem_24g_pair_addr 
+22f5 20202292 branch g24_update_addr_and_synccrc8 
+
+g24_pair_dispatch:
+22f6 4771403c bpatchx patch3c_2 ,mem_patch3c 
+22f7 6fe0c883 fetch 1 ,mem_24g_pair_sm 
+22f8 c07fa344 beq state_24g_pairing_success ,g24_pair_exit 
+22f9 c000a2fe beq state_24g_pairing_1 ,g24_pair_sm_1 
+22fa c0012300 beq state_24g_pairing_2 ,g24_pair_sm_2 
+22fb c001a306 beq state_24g_pairing_3 ,g24_pair_sm_3 
+22fc c002230c beq state_24g_pairing_4 ,g24_pair_sm_4 
+22fd 20600000 rtn 
+
+g24_pair_sm_1:
+22fe 7047c9ff jam datatype_attemp ,mem_24g_txbuf 
+22ff 2020230d branch g24_pair_sm_prep 
+
+g24_pair_sm_2:
+2300 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2301 203a2304 branch g24_pair_sm_2_skip ,blank 
+2302 6fe248ad fetch 4 ,mem_24g_device_addr 
+2303 20402292 call g24_update_addr_and_synccrc8 
+
+g24_pair_sm_2_skip:
+2304 7047c9aa jam datatype_bind ,mem_24g_txbuf 
+2305 2020230d branch g24_pair_sm_prep 
+
+g24_pair_sm_3:
+2306 7047c955 jam datatype_config ,mem_24g_txbuf 
+2307 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2308 203a230d branch g24_pair_sm_prep ,blank 
+2309 6fe24895 fetch 4 ,mem_24g_receiver_addr 
+230a 67e247cb store 4 ,mem_24g_txbuf + 2 
+230b 2020230f branch g24_pair_sm_common 
+
+g24_pair_sm_4:
+230c 7047c922 jam datatype_ok ,mem_24g_txbuf 
+
+g24_pair_sm_prep:
+230d 6fe248ad fetch 4 ,mem_24g_device_addr 
+230e 67e247cb store 4 ,mem_24g_txbuf + 2 
+
+g24_pair_sm_common:
+230f 6fe0c839 fetch 1 ,mem_24g_data_type 
+2310 1fe17e07 and_into bits_data ,pdata 
+2311 67e0c7ca store 1 ,mem_24g_txbuf + 1 
+2312 7047cf00 jam 0 ,mem_24g_txbuf + 6 
+2313 70483807 jam 7 ,mem_24g_datalen 
+2314 20402247 call g24_transmit_prep 
+2315 20402662 call g24_transmit_receive_ack 
+2316 246c0000 nrtn sync 
+2317 24778000 nrtn user3 
+2318 204025a0 call g24_txbuf_clear 
+2319 20402679 call g24_ackpayload_parse 
+231a 4771c03c bpatchx patch3c_3 ,mem_patch3c 
+
+g24_pair_sm_common_next:
+231b 6fe0c883 fetch 1 ,mem_24g_pair_sm 
+231c c17f8000 rtneq state_24g_pairing_success 
+231d c000a327 beq state_24g_pairing_1 ,g24_pair_sm_1_waiting_ack 
+231e c0012329 beq state_24g_pairing_2 ,g24_pair_sm_2_waiting_ack 
+231f c001a32f beq state_24g_pairing_3 ,g24_pair_sm_3_waiting_ack 
+2320 c0022337 beq state_24g_pairing_4 ,g24_pair_sm_4_waiting_ack 
+2321 20600000 rtn 
+
+g24_pair_sm_reinit:
+2322 70488302 jam state_24g_pairing_2 ,mem_24g_pair_sm 
+2323 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2324 207a0000 rtn blank 
+2325 70488301 jam state_24g_pairing_1 ,mem_24g_pair_sm 
+2326 20600000 rtn 
+
+g24_pair_sm_1_waiting_ack:
+2327 70488302 jam state_24g_pairing_2 ,mem_24g_pair_sm 
+2328 2020265e branch g24_transmit_abandon 
+
+g24_pair_sm_2_waiting_ack:
+2329 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+232a 203a232d branch g24_pair_sm_2_waiting_ack_skip ,blank 
+232b 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+232c 67e24895 store 4 ,mem_24g_receiver_addr 
+
+g24_pair_sm_2_waiting_ack_skip:
+232d 70488303 jam state_24g_pairing_3 ,mem_24g_pair_sm 
+232e 2020265e branch g24_transmit_abandon 
+
+g24_pair_sm_3_waiting_ack:
+232f 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2330 203a2335 branch g24_pair_sm_3_waiting_ack_skip ,blank 
+2331 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+2332 684a48ad fetcht 4 ,mem_24g_device_addr 
+2333 98467c00 isub temp ,null 
+2334 24628000 nrtn zero 
+
+g24_pair_sm_3_waiting_ack_skip:
+2335 70488304 jam state_24g_pairing_4 ,mem_24g_pair_sm 
+2336 2020265e branch g24_transmit_abandon 
+
+g24_pair_sm_4_waiting_ack:
+2337 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2338 203a233d branch g24_pair_sm_4_waiting_ack_skip ,blank 
+2339 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+233a 684a4895 fetcht 4 ,mem_24g_receiver_addr 
+233b 98467c00 isub temp ,null 
+233c 24628000 nrtn zero 
+
+g24_pair_sm_4_waiting_ack_skip:
+233d 704883ff jam state_24g_pairing_success ,mem_24g_pair_sm 
+233e 70095b39 jam bt_evt_24g_pairing_complete ,mem_fifo_temp 
+233f 204078dc call ui_ipc_send_event 
+2340 58000000 setarg 0 
+2341 67e14887 store 2 ,mem_24g_pair_timeout 
+2342 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+2343 20402292 call g24_update_addr_and_synccrc8 
+
+g24_pair_exit:
+2344 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+2345 793ffe01 set0 state_24g_pair ,pdata 
+2346 67e0c8a5 store 1 ,mem_24g_conn_sm 
+2347 2020265e branch g24_transmit_abandon 
+
+g24_bind_mode_enable:
+2348 7048c301 jam dongle_bind ,mem_24g_work_mode 
+2349 7048c200 jam clear_init ,mem_24g_mode_init 
+234a 20600000 rtn 
+
+g24_bind_init:
+234b 6fe0c8c2 fetch 1 ,mem_24g_mode_init 
+234c c3808000 rtnbit1 dongle_bind 
+234d 79207e01 set1 dongle_bind ,pdata 
+234e 67e0c8c2 store 1 ,mem_24g_mode_init 
+234f 58000000 setarg 0 
+2350 67e1c882 store 3 ,mem_24g_device1_bind_step 
+2351 67e248d9 store 4 ,mem_24g_transmitter_addr 
+2352 7048be01 jam 1 ,mem_24g_ackpayload_enable 
+2353 202022ef branch g24_pair_init_param 
+
+g24_bind_ackpayload_prep:
+2354 7048be01 jam 1 ,mem_24g_ackpayload_enable 
+2355 70483808 jam 0x08 ,mem_24g_datalen 
+2356 d8c04885 arg mem_24g_bind_payload ,contr 
+2357 d8a047c9 arg mem_24g_txbuf ,contw 
+2358 20207d79 branch memcpy8 
+
+g24_bind_data_process:
+2359 204023fa call g24_rx_interrupt_clear 
+235a 20402187 call g24_receive_packet 
+235b 2437a3fa nbranch g24_rx_interrupt_clear ,user3 
+235c 20402367 call g24_bind_data_parse 
+235d 2040242c call g24_transmit_ack 
+235e 204023d6 call g24_bind_device_status_check 
+235f 20403805 call dongle_kb_bind_soft_reset 
+2360 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2361 207a0000 rtn blank 
+2362 6fe248d9 fetch 4 ,mem_24g_transmitter_addr 
+2363 207a0000 rtn blank 
+2364 20202292 branch g24_update_addr_and_synccrc8 
+
+g24_bind_data_error:
+2365 204023fa call g24_rx_interrupt_clear 
+2366 202021f1 branch g24_end_of_packet 
+
+g24_bind_data_parse:
+2367 7048cf05 jam bind_mode_continue ,mem_24g_bind_mode_continue 
+2368 d8c047a7 arg mem_24g_rxbuf ,contr 
+2369 d8a04895 arg mem_24g_rxdata_temp ,contw 
+236a 20407d79 call memcpy8 
+236b 4772403c bpatchx patch3c_4 ,mem_patch3c 
+236c 6fe0c897 fetch 1 ,mem_24g_rxdata_temp + 2 
+236d c0552372 beq datatype_bind ,g24_bind_first_step 
+236e c02aa37f beq datatype_config ,g24_bind_second_step 
+236f c011239c beq datatype_ok ,g24_bind_third_step 
+2370 c07fa5be beq datatype_attemp ,g24_data_attemp 
+2371 20600000 rtn 
+
+g24_bind_first_step:
+2372 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+2373 c000a376 beq datatype_device1 ,g24_bind_first_step_device1 
+2374 c001237c beq datatype_device2 ,g24_bind_first_step_device2 
+2375 20600000 rtn 
+
+g24_bind_first_step_device1:
+2376 70488201 jam 1 ,mem_24g_device1_bind_step 
+
+g24_bind_dvc1_payload_cfg:
+2377 70488501 jam datatype_device1 ,mem_24g_bind_payload 
+
+g24_bind_payload_cfg:
+2378 70488680 jam 0x80 ,mem_24g_bind_payload + 1 
+2379 6fe340a8 fetch 6 ,mem_lap 
+237a 67e34887 store 6 ,mem_24g_bind_payload + 2 
+237b 20600000 rtn 
+
+g24_bind_first_step_device2:
+237c 70488301 jam 1 ,mem_24g_device2_bind_step 
+
+g24_bind_dvc2_payload_cfg:
+237d 70488502 jam datatype_device2 ,mem_24g_bind_payload 
+237e 20202378 branch g24_bind_payload_cfg 
+
+g24_bind_second_step:
+237f 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2380 203a2385 branch g24_bind_second_step_skip ,blank 
+2381 6fe24899 fetch 4 ,mem_24g_rxdata_temp + 4 
+2382 684a40a8 fetcht 4 ,mem_lap 
+2383 98467c00 isub temp ,null 
+2384 24628000 nrtn zero 
+
+g24_bind_second_step_skip:
+2385 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+2386 c000a389 beq datatype_device1 ,g24_bind_second_step_device1 
+2387 c0012394 beq datatype_device2 ,g24_bind_second_step_device2 
+2388 20600000 rtn 
+
+g24_bind_second_step_device1:
+2389 6fe0c882 fetch 1 ,mem_24g_device1_bind_step 
+238a c000a38c beq 1 ,g24_bind_dvc1_step_set2 
+238b 20600000 rtn 
+
+g24_bind_dvc1_step_set2:
+238c 70488202 jam 2 ,mem_24g_device1_bind_step 
+238d 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+238e 203a2377 branch g24_bind_dvc1_payload_cfg ,blank 
+
+g24_bind_dvc1_payload_cfg_transmitter_addr:
+238f 70488501 jam datatype_device1 ,mem_24g_bind_payload 
+
+g24_bind_payload_cfg_transmitter_addr:
+2390 70488680 jam 0x80 ,mem_24g_bind_payload + 1 
+2391 6fe248d9 fetch 4 ,mem_24g_transmitter_addr 
+2392 67e24887 store 4 ,mem_24g_bind_payload + 2 
+2393 20207ec5 branch enable_user 
+
+g24_bind_second_step_device2:
+2394 6fe0c883 fetch 1 ,mem_24g_device2_bind_step 
+2395 c000a397 beq 1 ,g24_bind_dvc2_step_set2 
+2396 20600000 rtn 
+
+g24_bind_dvc2_step_set2:
+2397 70488302 jam 2 ,mem_24g_device2_bind_step 
+2398 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+2399 203a237d branch g24_bind_dvc2_payload_cfg ,blank 
+239a 70488502 jam datatype_device2 ,mem_24g_bind_payload 
+239b 20202390 branch g24_bind_payload_cfg_transmitter_addr 
+
+g24_bind_third_step:
+239c 6fe0c85e fetch 1 ,mem_24g_pair_switch 
+239d 203a23a2 branch g24_bind_third_step_skip ,blank 
+239e 6fe24899 fetch 4 ,mem_24g_rxdata_temp + 4 
+239f 684a48d9 fetcht 4 ,mem_24g_transmitter_addr 
+23a0 98467c00 isub temp ,null 
+23a1 24628000 nrtn zero 
+
+g24_bind_third_step_skip:
+23a2 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+23a3 c000a3a6 beq datatype_device1 ,g24_bind_third_step_device1 
+23a4 c00123b1 beq datatype_device2 ,g24_bind_third_step_device2 
+23a5 20600000 rtn 
+
+g24_bind_third_step_device1:
+23a6 6fe0c882 fetch 1 ,mem_24g_device1_bind_step 
+23a7 c00123a9 beq 2 ,g24_bind_dvc1_step_success 
+23a8 20600000 rtn 
+
+g24_bind_dvc1_step_success:
+23a9 204023ca call g24_binding_dvc1_living 
+23aa 20402377 call g24_bind_dvc1_payload_cfg 
+23ab 6fe0c884 fetch 1 ,mem_24g_bind_device_status 
+23ac 1fe1fe01 or_into 0x01 ,pdata 
+23ad 67e0c884 store 1 ,mem_24g_bind_device_status 
+
+g24_bind_exit:
+23ae 58000000 setarg 0 
+23af 67e14882 store 2 ,mem_24g_device1_bind_step 
+23b0 20600000 rtn 
+
+g24_bind_third_step_device2:
+23b1 6fe0c883 fetch 1 ,mem_24g_device2_bind_step 
+23b2 c08023b4 bne 0 ,g24_bind_dvc2_step_success 
+23b3 20600000 rtn 
+
+g24_bind_dvc2_step_success:
+23b4 204023d0 call g24_binding_dvc2_living 
+23b5 2040237d call g24_bind_dvc2_payload_cfg 
+23b6 6fe0c884 fetch 1 ,mem_24g_bind_device_status 
+23b7 1fe1fe02 or_into 0x02 ,pdata 
+23b8 67e0c884 store 1 ,mem_24g_bind_device_status 
+23b9 204023ae call g24_bind_exit 
+23ba 202037ff branch dongle_g24_store_dvc2_bind_flag 
+
+g24_binding_device_check:
+23bb 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+23bc c1808000 rtnne dongle_bind 
+23bd 6fe0c8bd fetch 1 ,mem_24g_pair_mode 
+23be 247a0000 nrtn blank 
+23bf 6fe0c7aa fetch 1 ,mem_24g_rxbuf + 3 
+23c0 c000a3c3 beq datatype_device1 ,g24_binding_dvc1_status 
+23c1 c00123c7 beq datatype_device2 ,g24_binding_dvc2_status 
+23c2 20600000 rtn 
+
+g24_binding_dvc1_status:
+23c3 6fe0c8d8 fetch 1 ,mem_24g_bind_device_living 
+23c4 c4000000 rtnbit0 0 
+
+disable_user3:
+23c5 7857fc00 disable user3 
+23c6 20600000 rtn 
+
+g24_binding_dvc2_status:
+23c7 6fe0c8d8 fetch 1 ,mem_24g_bind_device_living 
+23c8 c4008000 rtnbit0 1 
+23c9 202023c5 branch disable_user3 
+
+g24_binding_dvc1_living:
+23ca 6fe0c8bd fetch 1 ,mem_24g_pair_mode 
+23cb 247a0000 nrtn blank 
+23cc 6fe0c8d8 fetch 1 ,mem_24g_bind_device_living 
+23cd 1fe1fe01 or_into 0x01 ,pdata 
+23ce 67e0c8d8 store 1 ,mem_24g_bind_device_living 
+23cf 20600000 rtn 
+
+g24_binding_dvc2_living:
+23d0 6fe0c8bd fetch 1 ,mem_24g_pair_mode 
+23d1 247a0000 nrtn blank 
+23d2 6fe0c8d8 fetch 1 ,mem_24g_bind_device_living 
+23d3 1fe1fe02 or_into 0x02 ,pdata 
+23d4 67e0c8d8 store 1 ,mem_24g_bind_device_living 
+23d5 20600000 rtn 
+
+g24_bind_device_status_check:
+23d6 6fe0c884 fetch 1 ,mem_24g_bind_device_status 
+23d7 207a0000 rtn blank 
+
+g24_bind_device_status:
+23d8 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+23d9 c000a3ca beq datatype_device1 ,g24_binding_dvc1_living 
+23da c00123d0 beq datatype_device2 ,g24_binding_dvc2_living 
+23db 20600000 rtn 
+
+g24_receive_init:
+23dc 79200027 set1 mark_24g_rxmode ,mark 
+23dd 6fe0c1e8 fetch 1 ,mem_tx_power 
+23de 67e0c8d0 store 1 ,mem_tx_power_temp 
+23df 204022d0 call g24_rx_window_init 
+23e0 202025f4 branch rssi_receiver_buff_init 
+
+g24_receive_dispatch:
+23e1 6fe1488d fetch 2 ,mem_cb_24g_receive_process 
+23e2 20207e7a branch callback_func 
+
+g24_ackpayload_prep:
+23e3 70483800 jam 0 ,mem_24g_datalen 
+23e4 6fe0c8be fetch 1 ,mem_24g_ackpayload_enable 
+23e5 207a0000 rtn blank 
+23e6 6fe1488f fetch 2 ,mem_cb_24g_ackpayload 
+23e7 20207e7a branch callback_func 
+
+g24_receive_packet_start:
+23e8 20402429 call g24_receive_transmit_ack 
+23e9 2437a3fa nbranch g24_rx_interrupt_clear ,user3 
+
+g24_receive_packet_parse:
+23ea 2040241b call g24_receive_packet_parse_pid_crc 
+23eb 243423fa nbranch g24_rx_interrupt_clear ,user 
+23ec 6fe0c82d fetch 1 ,mem_24g_rxdata_length 
+23ed 203a23fa branch g24_rx_interrupt_clear ,blank 
+23ee 1fe0fe02 increase 2 ,pdata 
+23ef 98007200 iforce loopcnt 
+23f0 d8c047a7 arg mem_24g_rxbuf ,contr 
+23f1 d8a04895 arg mem_24g_rxdata_temp ,contw 
+23f2 20407dd4 call memcpy 
+23f3 7048c000 jam 0 ,mem_24g_mode_switch 
+23f4 6fe0c8bd fetch 1 ,mem_24g_pair_mode 
+23f5 205a2436 call g24_enable_nodata_timer ,blank 
+23f6 6fe0c897 fetch 1 ,mem_24g_rxdata_temp + 2 
+23f7 c000a3ff beq datatype_device1 ,g24_data_device1 
+23f8 c001240e beq datatype_device2 ,g24_data_device2 
+23f9 c07fa3fd beq datatype_attemp ,g24_data_receive_attemp 
+
+g24_rx_interrupt_clear:
+23fa d8a047a7 arg mem_24g_rxbuf ,contw 
+23fb df200042 arg 66 ,loopcnt 
+23fc 20207d9b branch clear_mem 
+
+g24_data_receive_attemp:
+23fd 204023d8 call g24_bind_device_status 
+23fe 202025be branch g24_data_attemp 
+
+g24_data_device1:
+23ff 204023ca call g24_binding_dvc1_living 
+2400 2040255c call g24_ch_timer_reinit 
+2401 6fe0c8b7 fetch 1 ,mem_24g_abort_packet 
+2402 6848c895 fetcht 1 ,mem_24g_rxdata_temp 
+2403 284ffe03 isolate1 bit_abort ,temp 
+2404 7920fe00 setflag true ,0 ,pdata 
+2405 67e0c8b7 store 1 ,mem_24g_abort_packet 
+2406 c000a414 beq 1 ,g24_data_attemp_device1_abort 
+2407 6fe0c8bf fetch 1 ,mem_24g_hop_packet 
+2408 6848c895 fetcht 1 ,mem_24g_rxdata_temp 
+2409 284ffe04 isolate1 bit_hop ,temp 
+240a 7920fe00 setflag true ,0 ,pdata 
+240b 67e0c8bf store 1 ,mem_24g_hop_packet 
+240c 6fe14891 fetch 2 ,mem_cb_24g_data_device1 
+240d 20207e7a branch callback_func 
+
+g24_data_device2:
+240e 204023d0 call g24_binding_dvc2_living 
+240f 6848c895 fetcht 1 ,mem_24g_rxdata_temp 
+2410 284ffe03 isolate1 bit_abort ,temp 
+2411 2020a419 branch g24_data_attemp_device2_abort ,true 
+2412 6fe14893 fetch 2 ,mem_cb_24g_data_device2 
+2413 20207e7a branch callback_func 
+
+g24_data_attemp_device1_abort:
+2414 6fe0c09a fetch 1 ,mem_device_option 
+2415 1fe67c0e sub pdata ,dvc_op_car ,null 
+2416 2042b4f0 call car_stop_blink ,zero 
+2417 6fe2489f fetch 4 ,mem_24g_rxdata_temp + 10 
+2418 202025c4 branch g24_store_device1_addr 
+
+g24_data_attemp_device2_abort:
+2419 6fe2489f fetch 4 ,mem_24g_rxdata_temp + 10 
+241a 202025c8 branch g24_store_device2_addr 
+
+g24_receive_packet_parse_pid_crc:
+241b 20407ec7 call disable_user 
+241c 6fe0c836 fetch 1 ,mem_24g_sta_pid 
+241d 6848c837 fetcht 1 ,mem_24g_last_pid 
+241e 98467c00 isub temp ,null 
+241f 2442fec5 ncall enable_user ,zero 
+2420 6fe0c836 fetch 1 ,mem_24g_sta_pid 
+2421 67e0c837 store 1 ,mem_24g_last_pid 
+2422 6fe1c830 fetch 3 ,mem_24g_sta_crc 
+2423 6849c833 fetcht 3 ,mem_24g_last_crc 
+2424 98467c00 isub temp ,null 
+2425 2442fec5 ncall enable_user ,zero 
+2426 6fe1c830 fetch 3 ,mem_24g_sta_crc 
+2427 67e1c833 store 3 ,mem_24g_last_crc 
+2428 20600000 rtn 
+
+g24_receive_transmit_ack:
+2429 204023fa call g24_rx_interrupt_clear 
+242a 20402187 call g24_receive_packet 
+242b 24778000 nrtn user3 
+
+g24_transmit_ack:
+242c 6fe0c7a7 fetch 1 ,mem_24g_rxbuf 
+242d 67e0c839 store 1 ,mem_24g_data_type 
+242e 20402274 call g24_read_len_pid_crc 
+242f 6fe0c7a8 fetch 1 ,mem_24g_rxbuf + 1 
+2430 2feffe00 isolate1 bit_ack_24g ,pdata 
+2431 2020a435 branch g24tx_no_ack ,true 
+
+g24tx_with_ack:
+2432 204023e3 call g24_ackpayload_prep 
+2433 20402247 call g24_transmit_prep 
+2434 204021f8 call g24_transmit 
+
+g24tx_no_ack:
+2435 202021f1 branch g24_end_of_packet 
+
+g24_enable_nodata_timer:
+2436 7048c101 jam 1 ,mem_24g_nodata_timer_enable 
+
+g24_enable_nodata_timer_init:
+2437 58000280 setarg timer_nodata_delay 
+2438 d8e00008 arg timer_nodata ,queue 
+2439 20207ddb branch timer_init 
+
+g24_mode_switch_init:
+243a 7048c001 jam 1 ,mem_24g_mode_switch 
+243b 7048c400 jam 0 ,mem_24g_time_slice 
+243c 704857ff jam 0xff ,mem_24g_interval 
+243d 202022b2 branch g24_timer_init 
+
+g24_mode_switch_bind_work:
+243e 4772c03c bpatchx patch3c_5 ,mem_patch3c 
+243f 6fe0c8c0 fetch 1 ,mem_24g_mode_switch 
+2440 207a0000 rtn blank 
+2441 204022a0 call g24_timer_check 
+2442 24740000 nrtn user 
+2443 2040244b call g24_bind_mode_continue 
+2444 6fe0c8c4 fetch 1 ,mem_24g_time_slice 
+2445 1fe0fe01 increase 1 ,pdata 
+2446 1fe17e01 and_into 1 ,pdata 
+2447 67e0c8c4 store 1 ,mem_24g_time_slice 
+2448 c0002450 beq 0 ,g24_work_mode_switch 
+2449 c000a453 beq 1 ,g24_bind_mode_switch 
+244a 20600000 rtn 
+
+g24_bind_mode_continue:
+244b 6fe0c8cf fetch 1 ,mem_24g_bind_mode_continue 
+244c 207a0000 rtn blank 
+244d 1fe0ffff increase -1 ,pdata 
+244e 67e0c8cf store 1 ,mem_24g_bind_mode_continue 
+244f 20600000 rtn 
+
+g24_work_mode_switch:
+2450 6fe0c8cf fetch 1 ,mem_24g_bind_mode_continue 
+2451 247a0000 nrtn blank 
+2452 20202493 branch g24_switch_work_mode 
+
+g24_bind_mode_switch:
+2453 6fe0c8cf fetch 1 ,mem_24g_bind_mode_continue 
+2454 247a0000 nrtn blank 
+2455 20202348 branch g24_bind_mode_enable 
+
+g24_mode_b_s_switch_init:
+2456 6fe0c8d7 fetch 1 ,mem_24g_b_s_mode_switch_disable 
+2457 247a0000 nrtn blank 
+2458 6fe0c8d5 fetch 1 ,mem_24g_mode_b_s_switch_exit 
+2459 205a2483 call g24_mode_b_s_switch_start ,blank 
+245a 6fe0c8d2 fetch 1 ,mem_24g_mode_b_s_switch_init 
+245b c3800000 rtnbit1 0 
+245c 79207e00 set1 0 ,pdata 
+245d 67e0c8d2 store 1 ,mem_24g_mode_b_s_switch_init 
+245e 7048d101 jam 1 ,mem_24g_mode_b_s_switch 
+245f 7048d600 jam 0 ,mem_24g_b_s_time_slice 
+2460 58000000 setarg 0 
+2461 67e148d3 store 2 ,mem_24g_mode_b_s_switch_cnt 
+2462 70485760 jam 0x60 ,mem_24g_interval 
+2463 202022b2 branch g24_timer_init 
+
+g24_mode_switch_bind_search:
+2464 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+2465 c1000000 rtneq dongle_work 
+2466 6fe0c8d7 fetch 1 ,mem_24g_b_s_mode_switch_disable 
+2467 247a0000 nrtn blank 
+2468 6fe0c8d5 fetch 1 ,mem_24g_mode_b_s_switch_exit 
+2469 247a0000 nrtn blank 
+246a 6fe0c8d1 fetch 1 ,mem_24g_mode_b_s_switch 
+246b 207a0000 rtn blank 
+246c 204022a0 call g24_timer_check 
+246d 24740000 nrtn user 
+246e 6fe148d3 fetch 2 ,mem_24g_mode_b_s_switch_cnt 
+246f 1fe0fe01 increase 1 ,pdata 
+2470 67e148d3 store 2 ,mem_24g_mode_b_s_switch_cnt 
+2471 d84007d0 arg 0x7d0 ,temp 
+2472 98467c00 isub temp ,null 
+2473 2021247f branch g24_mode_b_s_switch_exit ,positive 
+2474 2040244b call g24_bind_mode_continue 
+2475 6fe0c8d6 fetch 1 ,mem_24g_b_s_time_slice 
+2476 1fe0fe01 increase 1 ,pdata 
+2477 1fe17e01 and_into 1 ,pdata 
+2478 67e0c8d6 store 1 ,mem_24g_b_s_time_slice 
+2479 c000247c beq 0 ,g24_mode_switch_search 
+247a c000a348 beq 1 ,g24_bind_mode_enable 
+247b 20600000 rtn 
+
+g24_mode_switch_search:
+247c 6fe0c8cf fetch 1 ,mem_24g_bind_mode_continue 
+247d 243a2348 nbranch g24_bind_mode_enable ,blank 
+247e 20202544 branch g24_search_mode_enable 
+
+g24_mode_b_s_switch_exit:
+247f 7048d501 jam 1 ,mem_24g_mode_b_s_switch_exit 
+2480 20202544 branch g24_search_mode_enable 
+
+g24_mode_b_s_switch_stop:
+2481 7048d100 jam 0 ,mem_24g_mode_b_s_switch 
+2482 20600000 rtn 
+
+g24_mode_b_s_switch_start:
+2483 7048d101 jam 1 ,mem_24g_mode_b_s_switch 
+2484 20600000 rtn 
+
+g24_work_init:
+2485 6fe0c8c2 fetch 1 ,mem_24g_mode_init 
+2486 c3800000 rtnbit1 dongle_work 
+2487 79207e00 set1 dongle_work ,pdata 
+2488 67e0c8c2 store 1 ,mem_24g_mode_init 
+2489 6fe0c8d0 fetch 1 ,mem_tx_power_temp 
+248a 67e0c1e8 store 1 ,mem_tx_power 
+248b 7048be00 jam 0 ,mem_24g_ackpayload_enable 
+248c 700bf900 jam 0 ,mem_usb_tx_enable 
+248d 7048b701 jam 1 ,mem_24g_abort_packet 
+248e 70482e00 jam 0 ,mem_24g_pid 
+248f 6fe240a8 fetch 4 ,mem_lap 
+2490 20402292 call g24_update_addr_and_synccrc8 
+2491 20402281 call g24_ch 
+2492 202023fa branch g24_rx_interrupt_clear 
+
+g24_switch_work_mode:
+2493 7048be00 jam 0 ,mem_24g_ackpayload_enable 
+
+g24_work_mode_enable:
+2494 7048c300 jam dongle_work ,mem_24g_work_mode 
+2495 7048c200 jam clear_init ,mem_24g_mode_init 
+2496 20600000 rtn 
+
+g24_work_mode_start:
+2497 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+2498 c1800000 rtnne dongle_work 
+2499 20402485 call g24_work_init 
+249a 20402547 call g24_ch_process 
+249b 202023e8 branch g24_receive_packet_start 
+
+g24_bind_mode_auto:
+249c 4773403c bpatchx patch3c_6 ,mem_patch3c 
+249d 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+249e c1808000 rtnne dongle_bind 
+249f 2040234b call g24_bind_init 
+24a0 20402359 call g24_bind_data_process 
+24a1 6fe0c8bd fetch 1 ,mem_24g_pair_mode 
+24a2 247a0000 nrtn blank 
+24a3 6fe0c884 fetch 1 ,mem_24g_bind_device_status 
+24a4 207a0000 rtn blank 
+24a5 7048c000 jam 0 ,mem_24g_mode_switch 
+24a6 20402493 call g24_switch_work_mode 
+24a7 20402436 call g24_enable_nodata_timer 
+24a8 202022b2 branch g24_timer_init 
+
+g24_search_mode_init:
+24a9 6fe0c8c2 fetch 1 ,mem_24g_mode_init 
+24aa c3838000 rtnbit1 dongle_search 
+24ab 79207e07 set1 dongle_search ,pdata 
+24ac 67e0c8c2 store 1 ,mem_24g_mode_init 
+24ad 7048c400 jam 0 ,mem_24g_time_slice 
+24ae 7048be01 jam 1 ,mem_24g_ackpayload_enable 
+24af 58000000 setarg 0 
+24b0 67e1c8ea store 3 ,mem_rssi_noise_self_index 
+24b1 67e3c8c7 store 7 ,mem_24g_self_config_ch_once 
+24b2 20402536 call g24_receiver_addr_check 
+24b3 24628000 nrtn zero 
+24b4 6fe0c83e fetch 1 ,mem_24g_current_ch_number 
+24b5 67e0c8c6 store 1 ,mem_24g_self_ch_number 
+24b6 6fe0c83d fetch 1 ,mem_24g_ch 
+24b7 67e0c8c5 store 1 ,mem_24g_self_last_ch 
+24b8 20600000 rtn 
+
+g24_search_mode_auto:
+24b9 4773c03c bpatchx patch3c_7 ,mem_patch3c 
+24ba 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+24bb c1838000 rtnne dongle_search 
+24bc 204024a9 call g24_search_mode_init 
+24bd 204024df call g24_auto_addr_ch_search 
+24be 20402429 call g24_receive_transmit_ack 
+24bf 2437a3fa nbranch g24_rx_interrupt_clear ,user3 
+24c0 20402536 call g24_receiver_addr_check 
+24c1 2042a3ea call g24_receive_packet_parse ,zero 
+24c2 6fe0c8b7 fetch 1 ,mem_24g_abort_packet 
+24c3 205a2481 call g24_mode_b_s_switch_stop ,blank 
+24c4 7048c300 jam dongle_work ,mem_24g_work_mode 
+24c5 6fe0c8c2 fetch 1 ,mem_24g_mode_init 
+24c6 79207e00 set1 dongle_work ,pdata 
+24c7 67e0c8c2 store 1 ,mem_24g_mode_init 
+24c8 6fe0c8be fetch 1 ,mem_24g_ackpayload_enable 
+24c9 1fe67c02 sub pdata ,2 ,null 
+24ca 2442a534 ncall g24_ackpayload_disable ,zero 
+24cb 204023fa call g24_rx_interrupt_clear 
+24cc 20402436 call g24_enable_nodata_timer 
+24cd 20402536 call g24_receiver_addr_check 
+24ce 2022a4d8 branch g24_self_ch_num_reinit ,zero 
+24cf 6fe2483f fetch 4 ,mem_24g_addr 
+24d0 684a48e1 fetcht 4 ,mem_24g_device2_addr 
+24d1 98467c00 isub temp ,null 
+24d2 2022a4db branch g24_device2_ch_num_reinit ,zero 
+24d3 6fe2483f fetch 4 ,mem_24g_addr 
+24d4 684a48dd fetcht 4 ,mem_24g_device1_addr 
+24d5 98467c00 isub temp ,null 
+24d6 2022a4dd branch g24_device1_ch_num_reinit ,zero 
+24d7 20600000 rtn 
+
+g24_self_ch_num_reinit:
+24d8 6fe0c8c6 fetch 1 ,mem_24g_self_ch_number 
+
+g24_current_ch_num_reinit:
+24d9 67e0c83e store 1 ,mem_24g_current_ch_number 
+24da 20600000 rtn 
+
+g24_device2_ch_num_reinit:
+24db 6fe0c8cc fetch 1 ,mem_24g_device2_ch_number 
+24dc 202024d9 branch g24_current_ch_num_reinit 
+
+g24_device1_ch_num_reinit:
+24dd 6fe0c8c9 fetch 1 ,mem_24g_device1_ch_number 
+24de 202024d9 branch g24_current_ch_num_reinit 
+
+g24_auto_addr_ch_search:
+24df 6fe0c8c4 fetch 1 ,mem_24g_time_slice 
+24e0 1fe0fe01 increase 1 ,pdata 
+24e1 1fe17e03 and_into 3 ,pdata 
+24e2 67e0c8c4 store 1 ,mem_24g_time_slice 
+24e3 c0002502 beq 0 ,g24_auto_bind_config_device2 
+24e4 c000a51c beq 1 ,g24_auto_bind_config_self 
+24e5 c00124e8 beq 2 ,g24_auto_bind_config_device1 
+24e6 c001a51c beq 3 ,g24_auto_bind_config_self 
+24e7 20600000 rtn 
+
+g24_auto_bind_config_device1:
+24e8 20402377 call g24_bind_dvc1_payload_cfg 
+24e9 6fe248dd fetch 4 ,mem_24g_device1_addr 
+24ea 203a24df branch g24_auto_addr_ch_search ,blank 
+24eb 20402292 call g24_update_addr_and_synccrc8 
+24ec 6fe0c8ca fetch 1 ,mem_24g_device1_config_ch_once 
+24ed 205a24fd call g24_device1_config_ch_once ,blank 
+24ee 6fe0c8c8 fetch 1 ,mem_24g_device1_last_ch 
+24ef 67e0c83d store 1 ,mem_24g_ch 
+24f0 6848c8eb fetcht 1 ,mem_rssi_noise_device1_index 
+24f1 6a2148f1 fetchr rega ,2 ,mem_rssi_noise_device1_buffer_ptr 
+24f2 204025ca call rssi_store 
+24f3 6048c8eb storet 1 ,mem_rssi_noise_device1_index 
+24f4 204025d2 call rssi_average 
+24f5 6048c8e8 storet 1 ,mem_rssi_noise_device1_avg 
+24f6 18467c50 sub temp ,rssi_thresh_noise ,null 
+24f7 24610000 nrtn positive 
+24f8 6848c8c9 fetcht 1 ,mem_24g_device1_ch_number 
+24f9 20402285 call g24_ch_map_size 
+24fa 6048c8c9 storet 1 ,mem_24g_device1_ch_number 
+24fb 67e0c8c8 store 1 ,mem_24g_device1_last_ch 
+24fc 20600000 rtn 
+
+g24_device1_config_ch_once:
+24fd 7048ca01 jam 1 ,mem_24g_device1_config_ch_once 
+24fe d8400000 arg 0 ,temp 
+24ff 20402289 call g24_ch_calc 
+2500 67e0c8c8 store 1 ,mem_24g_device1_last_ch 
+2501 20600000 rtn 
+
+g24_auto_bind_config_device2:
+2502 2040237d call g24_bind_dvc2_payload_cfg 
+2503 6fe248e1 fetch 4 ,mem_24g_device2_addr 
+2504 203a24df branch g24_auto_addr_ch_search ,blank 
+2505 20402292 call g24_update_addr_and_synccrc8 
+2506 6fe0c8cd fetch 1 ,mem_24g_device2_config_ch_once 
+2507 205a2517 call g24_device2_config_ch_once ,blank 
+2508 6fe0c8cb fetch 1 ,mem_24g_device2_last_ch 
+2509 67e0c83d store 1 ,mem_24g_ch 
+250a 6848c8ec fetcht 1 ,mem_rssi_noise_device2_index 
+250b 6a2148f3 fetchr rega ,2 ,mem_rssi_noise_device2_buffer_ptr 
+250c 204025ca call rssi_store 
+250d 6048c8ec storet 1 ,mem_rssi_noise_device2_index 
+250e 204025d2 call rssi_average 
+250f 6048c8e9 storet 1 ,mem_rssi_noise_device2_avg 
+2510 18467c50 sub temp ,rssi_thresh_noise ,null 
+2511 24610000 nrtn positive 
+2512 6848c8cc fetcht 1 ,mem_24g_device2_ch_number 
+2513 20402285 call g24_ch_map_size 
+2514 6048c8cc storet 1 ,mem_24g_device2_ch_number 
+2515 67e0c8cb store 1 ,mem_24g_device2_last_ch 
+2516 20600000 rtn 
+
+g24_device2_config_ch_once:
+2517 7048cd01 jam 1 ,mem_24g_device2_config_ch_once 
+2518 d8400000 arg 0 ,temp 
+2519 20402289 call g24_ch_calc 
+251a 67e0c8cb store 1 ,mem_24g_device2_last_ch 
+251b 20600000 rtn 
+
+g24_auto_bind_config_self:
+251c 20402377 call g24_bind_dvc1_payload_cfg 
+251d 6fe240a8 fetch 4 ,mem_lap 
+251e 20402292 call g24_update_addr_and_synccrc8 
+251f 6fe0c8c7 fetch 1 ,mem_24g_self_config_ch_once 
+2520 205a2530 call g24_self_config_ch_once ,blank 
+2521 6fe0c8c5 fetch 1 ,mem_24g_self_last_ch 
+2522 67e0c83d store 1 ,mem_24g_ch 
+2523 6848c8ea fetcht 1 ,mem_rssi_noise_self_index 
+2524 6a2148ef fetchr rega ,2 ,mem_rssi_noise_self_buffer_ptr 
+2525 204025ca call rssi_store 
+2526 6048c8ea storet 1 ,mem_rssi_noise_self_index 
+2527 204025d2 call rssi_average 
+2528 6048c8e7 storet 1 ,mem_rssi_noise_self_avg 
+2529 18467c50 sub temp ,rssi_thresh_noise ,null 
+252a 24610000 nrtn positive 
+252b 6848c8c6 fetcht 1 ,mem_24g_self_ch_number 
+252c 20402285 call g24_ch_map_size 
+252d 6048c8c6 storet 1 ,mem_24g_self_ch_number 
+252e 67e0c8c5 store 1 ,mem_24g_self_last_ch 
+252f 20600000 rtn 
+
+g24_self_config_ch_once:
+2530 7048c701 jam 1 ,mem_24g_self_config_ch_once 
+2531 6fe0c8c5 fetch 1 ,mem_24g_self_last_ch 
+2532 67e0c83d store 1 ,mem_24g_ch 
+2533 20600000 rtn 
+
+g24_ackpayload_disable:
+2534 7048be00 jam 0 ,mem_24g_ackpayload_enable 
+2535 20600000 rtn 
+
+g24_receiver_addr_check:
+2536 6fe2483f fetch 4 ,mem_24g_addr 
+2537 684a40a8 fetcht 4 ,mem_lap 
+2538 98467c00 isub temp ,null 
+2539 20600000 rtn 
+
+g24_nodata_process:
+253a 6fe0c8be fetch 1 ,mem_24g_ackpayload_enable 
+253b c1010000 rtneq 2 
+253c 6fe0c8c1 fetch 1 ,mem_24g_nodata_timer_enable 
+253d 207a0000 rtn blank 
+253e d8e00008 arg timer_nodata ,queue 
+253f 20407de9 call timer_check 
+2540 247a0000 nrtn blank 
+2541 7048c100 jam 0 ,mem_24g_nodata_timer_enable 
+2542 7048cf00 jam 0 ,mem_24g_bind_mode_continue 
+2543 20402456 call g24_mode_b_s_switch_init 
+
+g24_search_mode_enable:
+2544 7048c307 jam dongle_search ,mem_24g_work_mode 
+2545 7048c200 jam clear_init ,mem_24g_mode_init 
+2546 202023fa branch g24_rx_interrupt_clear 
+
+g24_ch_process:
+2547 6fe0c8b7 fetch 1 ,mem_24g_abort_packet 
+2548 c000a608 beq 1 ,rssi_noise_monitor 
+2549 6fe0c8bf fetch 1 ,mem_24g_hop_packet 
+254a c000a55a beq 1 ,g24_ch_receive_hop_pac 
+254b 684a48b8 fetcht 4 ,mem_24g_hop_btclk 
+254c 1c427e00 copy clkn_bt ,pdata 
+254d 98467c00 isub temp ,null 
+254e 244122af ncall g24_timer_timeout ,positive 
+254f 1fe22400 copy pdata ,regb 
+2550 6fe248b8 fetch 4 ,mem_24g_hop_btclk 
+2551 6848c8bc fetcht 1 ,mem_24g_hop_interval 
+2552 98408400 iadd temp ,temp 
+2553 1a427e00 copy regb ,pdata 
+2554 98467c00 isub temp ,null 
+2555 24610000 nrtn positive 
+2556 793ffe1c set0 28 ,pdata 
+2557 67e248b8 store 4 ,mem_24g_hop_btclk 
+2558 7048b701 jam 1 ,mem_24g_abort_packet 
+2559 20202281 branch g24_ch 
+
+g24_ch_receive_hop_pac:
+255a 7048bf00 jam 0 ,mem_24g_hop_packet 
+255b 20202281 branch g24_ch 
+
+g24_ch_timer_reinit:
+255c 1c427e00 copy clkn_bt ,pdata 
+255d 67e248b8 store 4 ,mem_24g_hop_btclk 
+255e 20600000 rtn 
+
+g24_reconn_timeout_timer:
+255f da60488b arg mem_24g_reconn_timeout ,regc 
+2560 da402683 arg g24_stop_24g_mode ,regb 
+2561 20203203 branch timer_single_step_2b 
+
+g24_reconn_start:
+2562 4774403d bpatchx patch3d_0 ,mem_patch3d 
+2563 79200026 set1 mark_24g ,mark 
+2564 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+2565 793ffe01 set0 state_24g_pair ,pdata 
+2566 79207e02 set1 state_24g_reconn ,pdata 
+2567 67e0c8a5 store 1 ,mem_24g_conn_sm 
+2568 6fe0c890 fetch 1 ,mem_24g_fast_conn_enable 
+2569 203a2577 branch g24_reconn_receiver_addr ,blank 
+256a 6fe0c88f fetch 1 ,mem_24g_reconn_type 
+256b c000a56f beq fast_conn_and_receiver ,g24_reconn_fast_conn 
+256c c001256f beq fast_conn_and_3_0_addr ,g24_reconn_fast_conn 
+256d c001a57e beq receiver_and_3_0_addr ,g24_reconn_device_3_0_addr 
+256e c002257e beq pair_and_3_0_addr ,g24_reconn_device_3_0_addr 
+
+g24_reconn_fast_conn:
+256f 6fe0c880 fetch 1 ,mem_24g_pair_tx_power 
+2570 67e0c1e8 store 1 ,mem_tx_power 
+2571 6848c899 fetcht 1 ,mem_24g_fast_conn_temp_ch 
+2572 6048c83e storet 1 ,mem_24g_current_ch_number 
+2573 6fe24891 fetch 4 ,mem_24g_fast_conn_addr 
+2574 20402587 call g24_ch_syncword_crc8_init 
+2575 6048c899 storet 1 ,mem_24g_fast_conn_temp_ch 
+2576 20600000 rtn 
+
+g24_reconn_receiver_addr:
+2577 7041e803 jam tx_power_3db ,mem_tx_power 
+2578 6848c89a fetcht 1 ,mem_24g_receiver_temp_ch 
+2579 6048c83e storet 1 ,mem_24g_current_ch_number 
+257a 6fe24895 fetch 4 ,mem_24g_receiver_addr 
+257b 20402587 call g24_ch_syncword_crc8_init 
+257c 6048c89a storet 1 ,mem_24g_receiver_temp_ch 
+257d 20600000 rtn 
+
+g24_reconn_device_3_0_addr:
+257e 7041e803 jam tx_power_3db ,mem_tx_power 
+257f 6848c89b fetcht 1 ,mem_24g_device_temp_ch 
+2580 6048c83e storet 1 ,mem_24g_current_ch_number 
+2581 6fe248ad fetch 4 ,mem_24g_device_addr 
+2582 20402587 call g24_ch_syncword_crc8_init 
+2583 6048c89b storet 1 ,mem_24g_device_temp_ch 
+2584 20600000 rtn 
+
+g24_store_receiver_addr:
+2585 6fe2480f fetch 4 ,mem_24g_rxpayload + 2 
+2586 67e24895 store 4 ,mem_24g_receiver_addr 
+
+g24_ch_syncword_crc8_init:
+2587 20402292 call g24_update_addr_and_synccrc8 
+2588 20202281 branch g24_ch 
+
+g24_reconn_dispatch:
+2589 4774c03d bpatchx patch3d_1 ,mem_patch3d 
+258a 204025a3 call g24_reconn_data_prep 
+258b 20402662 call g24_transmit_receive_ack 
+258c 242c25aa nbranch g24_reconn_device_fail ,sync 
+258d 2437a5aa nbranch g24_reconn_device_fail ,user3 
+258e 20402679 call g24_ackpayload_parse 
+
+g24_reconn_receiver_succ:
+258f 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+2590 793ffe02 set0 state_24g_reconn ,pdata 
+2591 67e0c8a5 store 1 ,mem_24g_conn_sm 
+2592 58000000 setarg 0 
+2593 67e14887 store 2 ,mem_24g_pair_timeout 
+2594 67e1488d store 2 ,mem_24g_reconn_count 
+2595 67e1488b store 2 ,mem_24g_reconn_timeout 
+2596 6fe2487b fetch 4 ,mem_24g_pair_addr 
+2597 684a483f fetcht 4 ,mem_24g_addr 
+2598 98467c00 isub temp ,null 
+2599 2022a2e4 branch g24_pair_start ,zero 
+259a 6fe248ad fetch 4 ,mem_24g_device_addr 
+259b 684a483f fetcht 4 ,mem_24g_addr 
+259c 98467c00 isub temp ,null 
+259d 2042a585 call g24_store_receiver_addr ,zero 
+
+g24_reconn_attempt_success:
+259e 70095b3c jam bt_evt_24g_attempt_success ,mem_fifo_temp 
+259f 204078dc call ui_ipc_send_event 
+
+g24_txbuf_clear:
+25a0 df200004 arg 4 ,loopcnt 
+25a1 d8a047c9 arg mem_24g_txbuf ,contw 
+25a2 20207d8c branch memset0 
+
+g24_reconn_data_prep:
+25a3 7047c9ff jam datatype_attemp ,mem_24g_txbuf 
+25a4 6fe0c839 fetch 1 ,mem_24g_data_type 
+25a5 67e0c7ca store 1 ,mem_24g_txbuf + 1 
+25a6 6fe248ad fetch 4 ,mem_24g_device_addr 
+25a7 67e247cb store 4 ,mem_24g_txbuf + 2 
+25a8 70483806 jam 6 ,mem_24g_datalen 
+25a9 20202247 branch g24_transmit_prep 
+
+g24_reconn_device_fail:
+25aa 6fe0c890 fetch 1 ,mem_24g_fast_conn_enable 
+25ab 203a2281 branch g24_ch ,blank 
+25ac 6fe1488d fetch 2 ,mem_24g_reconn_count 
+25ad 1fe0fe01 increase 1 ,pdata 
+25ae 67e1488d store 2 ,mem_24g_reconn_count 
+25af 2feffe03 isolate1 3 ,pdata 
+25b0 6fe0c88f fetch 1 ,mem_24g_reconn_type 
+25b1 c000a5b6 beq fast_conn_and_receiver ,g24_reconn_fast_conn_and_receiver 
+25b2 c00125b8 beq fast_conn_and_3_0_addr ,g24_reconn_fast_conn_and_3_0 
+25b3 c001a5ba beq receiver_and_3_0_addr ,g24_reconn_receiver_and_3_0 
+25b4 c00225bc beq pair_and_3_0_addr ,g24_reconn_pair_and_3_0 
+25b5 20202577 branch g24_reconn_receiver_addr 
+
+g24_reconn_fast_conn_and_receiver:
+25b6 2020a577 branch g24_reconn_receiver_addr ,true 
+25b7 2020256f branch g24_reconn_fast_conn 
+
+g24_reconn_fast_conn_and_3_0:
+25b8 2020a57e branch g24_reconn_device_3_0_addr ,true 
+25b9 2020256f branch g24_reconn_fast_conn 
+
+g24_reconn_receiver_and_3_0:
+25ba 2020a57e branch g24_reconn_device_3_0_addr ,true 
+25bb 20202577 branch g24_reconn_receiver_addr 
+
+g24_reconn_pair_and_3_0:
+25bc 2020a2ef branch g24_pair_init_param ,true 
+25bd 2020257e branch g24_reconn_device_3_0_addr 
+
+g24_data_attemp:
+25be 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+25bf c000a5c2 beq datatype_device1 ,g24_data_attemp_device1 
+25c0 c00125c6 beq datatype_device2 ,g24_data_attemp_device2 
+25c1 20600000 rtn 
+
+g24_data_attemp_device1:
+25c2 6fe24899 fetch 4 ,mem_24g_rxdata_temp + 4 
+25c3 67e248d9 store 4 ,mem_24g_transmitter_addr 
+
+g24_store_device1_addr:
+25c4 67e248dd store 4 ,mem_24g_device1_addr 
+25c5 20600000 rtn 
+
+g24_data_attemp_device2:
+25c6 6fe24899 fetch 4 ,mem_24g_rxdata_temp + 4 
+25c7 67e248d9 store 4 ,mem_24g_transmitter_addr 
+
+g24_store_device2_addr:
+25c8 67e248e1 store 4 ,mem_24g_device2_addr 
+25c9 20600000 rtn 
+
+rssi_store:
+25ca 1a227e00 copy rega ,pdata 
+25cb 98408a00 iadd temp ,contw 
+25cc 6fe08018 fetch 1 ,mem_rssi 
+25cd e7e08005 istore 1 ,contw 
+25ce 18408401 increase 1 ,temp 
+25cf 6fe0c881 fetch 1 ,mem_rssi_buff_index 
+25d0 98410400 iand temp ,temp 
+25d1 20600000 rtn 
+
+rssi_average:
+25d2 6fe0c881 fetch 1 ,mem_rssi_buff_index 
+25d3 1fe0fe01 increase 1 ,pdata 
+25d4 67e10987 store 2 ,mem_loopcnt 
+25d5 1fe27200 copy pdata ,loopcnt 
+25d6 1a220c00 copy rega ,contr 
+25d7 dfe00000 arg 0 ,pdata 
+
+rssi_average_loop:
+25d8 e8408006 ifetcht 1 ,contr 
+25d9 9840fe00 iadd temp ,pdata 
+25da c20025d8 loop rssi_average_loop 
+25db 68490987 fetcht 2 ,mem_loopcnt 
+25dc 9846fc00 idiv temp 
+25dd 20407e64 call wait_div_end 
+25de 18078400 quotient temp 
+25df c6138000 rtnmark1 mark_24g_rxmode 
+25e0 18427e00 copy temp ,pdata 
+25e1 c6930000 rtnmark0 mark_24g 
+25e2 20401297 call bcd 
+25e3 1fe20400 copy pdata ,temp 
+25e4 20600000 rtn 
+
+save_rssi_dec:
+25e5 2040127f call save_rssi 
+25e6 20201293 branch rssi_hex2dec 
+
+rssi_transmitter_buff_init:
+25e7 6fe1489d fetch 2 ,mem_rssi_signal_buf_ptr 
+25e8 202025fb branch rssi_buff_clear 
+
+rssi_signal:
+25e9 1fe22200 copy pdata ,rega 
+25ea 6848c89c fetcht 1 ,mem_rssi_signal_index 
+25eb 6fe1489d fetch 2 ,mem_rssi_signal_buf_ptr 
+25ec 98408a00 iadd temp ,contw 
+25ed 1a227e00 copy rega ,pdata 
+25ee e7e08005 istore 1 ,contw 
+25ef 18408401 increase 1 ,temp 
+25f0 6fe0c881 fetch 1 ,mem_rssi_buff_index 
+25f1 98410400 iand temp ,temp 
+25f2 6048c89c storet 1 ,mem_rssi_signal_index 
+25f3 20600000 rtn 
+
+rssi_receiver_buff_init:
+25f4 6fe148ed fetch 2 ,mem_rssi_noise_buffer_ptr 
+25f5 204025fb call rssi_buff_clear 
+25f6 6fe148ef fetch 2 ,mem_rssi_noise_self_buffer_ptr 
+25f7 204025fb call rssi_buff_clear 
+25f8 6fe148f1 fetch 2 ,mem_rssi_noise_device1_buffer_ptr 
+25f9 204025fb call rssi_buff_clear 
+25fa 6fe148f3 fetch 2 ,mem_rssi_noise_device2_buffer_ptr 
+
+rssi_buff_clear:
+25fb 207a0000 rtn blank 
+25fc 1fe20a00 copy pdata ,contw 
+25fd 6fe0c881 fetch 1 ,mem_rssi_buff_index 
+25fe 1fe0fe01 increase 1 ,pdata 
+25ff 1fe27200 copy pdata ,loopcnt 
+2600 20207d9b branch clear_mem 
+
+rssi_noise:
+2601 204025e5 call save_rssi_dec 
+2602 207a0000 rtn blank 
+2603 6848c8e6 fetcht 1 ,mem_rssi_noise_index 
+2604 6a2148ed fetchr rega ,2 ,mem_rssi_noise_buffer_ptr 
+2605 204025ca call rssi_store 
+2606 6048c8e6 storet 1 ,mem_rssi_noise_index 
+2607 20600000 rtn 
+
+rssi_noise_monitor:
+2608 6a2148ed fetchr rega ,2 ,mem_rssi_noise_buffer_ptr 
+2609 204025d2 call rssi_average 
+260a 6048c8e5 storet 1 ,mem_rssi_noise_avg 
+260b 18467c50 sub temp ,rssi_thresh_noise ,null 
+260c 24610000 nrtn positive 
+260d 20202281 branch g24_ch 
+
+g24_transmit_init:
+260e 6fe240a8 fetch 4 ,mem_lap 
+260f 67e248ad store 4 ,mem_24g_device_addr 
+2610 204022d0 call g24_rx_window_init 
+2611 202025e7 branch rssi_transmitter_buff_init 
+
+g24_interval_param_4ms:
+2612 58002fb2 setarg g24_4ms_interval_param 
+2613 67e1c8b1 store 3 ,mem_24g_short_sleep_set 
+2614 58100c0c setarg 0x100c0c 
+2615 67e1c857 store 3 ,mem_24g_interval 
+2616 5800bb80 setarg 0x00bb80 
+2617 67e1c8b4 store 3 ,mem_24g_long_sleep_set 
+2618 7048ca05 jam 5 ,mem_24g_fast_hop_count 
+2619 20600000 rtn 
+
+g24_interval_param_8ms:
+261a 5800f80c setarg g24_8ms_interval_param 
+261b 67e1c8b1 store 3 ,mem_24g_short_sleep_set 
+261c 581c1919 setarg 0x1c1919 
+261d 67e1c857 store 3 ,mem_24g_interval 
+261e 58017700 setarg 0x017700 
+261f 67e1c8b4 store 3 ,mem_24g_long_sleep_set 
+2620 7048ca0b jam 11 ,mem_24g_fast_hop_count 
+2621 20600000 rtn 
+
+g24_transmit_dispatch:
+2622 c6930000 rtnmark0 mark_24g 
+2623 6fe0c8a5 fetch 1 ,mem_24g_conn_sm 
+2624 c280a2f6 bbit1 state_24g_pair ,g24_pair_dispatch 
+2625 c2812589 bbit1 state_24g_reconn ,g24_reconn_dispatch 
+2626 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+2627 c000a6cd beq g24_tx_timer_int_enable ,g24_transmit_by_interrupt 
+
+g24_transmit_no_interrupt:
+2628 4775403d bpatchx patch3d_2 ,mem_patch3d 
+2629 20402638 call g24_txdata_prep 
+262a 243426a8 nbranch g24_nodata_transmit ,user 
+
+g24_transmit_start:
+262b 2040264d call g24_transmit_process 
+262c 204026f5 call power_ctrl_start 
+262d 6fe0c09a fetch 1 ,mem_device_option 
+262e c004482e beq dvc_op_mouse ,mouse_24g_transmit_start 
+
+g24_transmit_start_next:
+262f 6fe448b4 fetch 8 ,mem_24g_long_sleep_set 
+2630 67e4485f store 8 ,mem_24g_enter_hibernate 
+2631 6fe148c6 fetch 2 ,mem_24g_long_sleep_param_update_timer_init 
+2632 67e148c8 store 2 ,mem_24g_long_sleep_param_update_timer 
+
+g24_short_sleep:
+2633 204026c2 call g24_lpm_wait 
+2634 24740000 nrtn user 
+2635 20407f52 call clear_wake 
+2636 6fe1c8b1 fetch 3 ,mem_24g_short_sleep_set 
+2637 202026bf branch g24_long_seep2 
+
+g24_txdata_prep:
+2638 2040263b call g24_package_data 
+2639 24740000 nrtn user 
+263a 20202247 branch g24_transmit_prep 
+
+g24_package_data:
+263b 6fe1489f fetch 2 ,mem_cb_24g_transmit_data 
+263c 20407e7a call callback_func 
+263d 20342641 branch g24_accumulate_data ,user 
+263e 6fe3c7ca fetch 7 ,mem_24g_txbuf + 1 
+263f 207a0000 rtn blank 
+2640 20207ec5 branch enable_user 
+
+g24_accumulate_data:
+2641 7048ab00 jam 0 ,mem_24g_abort_pac 
+2642 1a20fe01 add rega ,1 ,pdata 
+2643 67e0c838 store 1 ,mem_24g_datalen 
+2644 20402649 call g24_transmit_rf_ctrl_clear 
+2645 67e0c7c9 store 1 ,mem_24g_txbuf 
+2646 1a420c00 copy regb ,contr 
+2647 1a227200 copy rega ,loopcnt 
+2648 20207dd4 branch memcpy 
+
+g24_transmit_rf_ctrl_clear:
+2649 6fe0c839 fetch 1 ,mem_24g_data_type 
+264a 1fe17e07 and_into bits_data ,pdata 
+264b 67e0c839 store 1 ,mem_24g_data_type 
+264c 20600000 rtn 
+
+g24_transmit_process:
+264d 7048aa00 jam 0 ,mem_24g_retry 
+
+g24_transmit_loop:
+264e 6961015f fetchr timeup ,2 ,mem_param_rx_setup 
+264f 34730200 until clkn_rt ,meet 
+2650 20402662 call g24_transmit_receive_ack 
+2651 6fe0c82f fetch 1 ,mem_24g_no_ack 
+2652 c000a658 beq no_ack_24g ,g24_transmit_no_ack 
+2653 242c2670 nbranch g24_retransmit ,sync 
+2654 2437a670 nbranch g24_retransmit ,user3 
+2655 20402679 call g24_ackpayload_parse 
+2656 6fe0c09a fetch 1 ,mem_device_option 
+2657 c004482a beq dvc_op_mouse ,mouse_wakeup_24g 
+
+g24_transmit_no_ack:
+2658 20402727 call power_ctrl_pac_succ_incrs 
+
+g24_transmit_next_packet:
+2659 204025a0 call g24_txbuf_clear 
+265a 6fe0c82e fetch 1 ,mem_24g_pid 
+265b 1fe0fe01 increase 1 ,pdata 
+265c 67e0c82e store 1 ,mem_24g_pid 
+265d 2040269b call g24_hop_enable_packet 
+
+g24_transmit_abandon:
+265e 58000000 setarg 0 
+265f 67e0c8a6 store 1 ,mem_24g_ensure 
+2660 67e148a7 store 2 ,mem_24g_txfail_cnt 
+2661 20600000 rtn 
+
+g24_transmit_receive_ack:
+2662 7857fc00 disable user3 
+2663 204021f8 call g24_transmit 
+2664 6fe0c82f fetch 1 ,mem_24g_no_ack 
+2665 c000a1f1 beq no_ack_24g ,g24_end_of_packet 
+2666 18002a00 force 0 ,radio_ctrl 
+2667 6fe2483f fetch 4 ,mem_24g_addr 
+2668 98001200 iforce access 
+2669 204010ac call calc_mod_value_scale_le 
+266a 68488017 fetcht 1 ,mem_last_freq 
+266b 2040118b call set_freq_rx 
+266c 204011a2 call rf_rx_enable 
+266d 20402190 call g24_receive_rxon 
+266e 2057a1f1 call g24_end_of_packet ,user3 
+266f 20600000 rtn 
+
+g24_retransmit:
+2670 6fe0c8ab fetch 1 ,mem_24g_abort_pac 
+2671 247a0000 nrtn blank 
+2672 6fe148a7 fetch 2 ,mem_24g_txfail_cnt 
+2673 1fe0fe01 increase 1 ,pdata 
+2674 67e148a7 store 2 ,mem_24g_txfail_cnt 
+2675 6fe0c8a8 fetch 1 ,mem_24g_txfail_cnt + 1 
+2676 c2822680 bbit1 4 ,g24_tx_attempt_fail 
+2677 20402685 call g24_transmit_hop_process 
+2678 2020264e branch g24_transmit_loop 
+
+g24_ackpayload_parse:
+2679 20402274 call g24_read_len_pid_crc 
+267a 6fe0c82d fetch 1 ,mem_24g_rxdata_length 
+267b 207a0000 rtn blank 
+267c 98007200 iforce loopcnt 
+267d d8c047a9 arg mem_24g_rxbuf + 2 ,contr 
+267e d8a0480d arg mem_24g_rxpayload ,contw 
+267f 20207dd4 branch memcpy 
+
+g24_tx_attempt_fail:
+2680 58000000 setarg 0 
+2681 67e148a7 store 2 ,mem_24g_txfail_cnt 
+2682 7048a901 jam 1 ,mem_24g_attempt_fail_flag 
+
+g24_stop_24g_mode:
+2683 70095b3a jam bt_evt_24g_attempt_fail ,mem_fifo_temp 
+2684 202078dc branch ui_ipc_send_event 
+
+g24_transmit_hop_process:
+2685 4775c03d bpatchx patch3d_3 ,mem_patch3d 
+2686 6848c8aa fetcht 1 ,mem_24g_retry 
+2687 6fe0c8ca fetch 1 ,mem_24g_fast_hop_count 
+2688 98467c00 isub temp ,null 
+2689 242126a3 nbranch g24_tx_fast_hop ,positive 
+268a 18408401 increase 1 ,temp 
+268b 6048c8aa storet 1 ,mem_24g_retry 
+268c 6fe0c8ca fetch 1 ,mem_24g_fast_hop_count 
+268d c002a692 beq 5 ,g24_transmit_hop_process_4ms 
+268e 6fe0c8aa fetch 1 ,mem_24g_retry 
+268f c003269d beq 6 ,g24_hop_ch_disable 
+2690 c006269d beq 12 ,g24_hop_ch_disable 
+2691 20600000 rtn 
+
+g24_transmit_hop_process_4ms:
+2692 6fe0c8aa fetch 1 ,mem_24g_retry 
+2693 c001a69d beq 3 ,g24_hop_ch_disable 
+2694 c003269d beq 6 ,g24_hop_ch_disable 
+2695 20600000 rtn 
+
+g24_hop_ch_enable:
+
+g24_txpayload_type_update:
+2696 c517a699 bmark1 mark_ble_lr ,g24_lr_type_update 
+2697 67e0c7ea store 1 ,mem_24g_txpayload + offset_data_type 
+2698 20600000 rtn 
+
+g24_lr_type_update:
+2699 67e0c7eb store 1 ,mem_24g_txpayload + offset_lr_data_type 
+269a 20600000 rtn 
+
+g24_hop_enable_packet:
+269b 6fe0c839 fetch 1 ,mem_24g_data_type 
+269c c4020000 rtnbit0 bit_hop 
+
+g24_hop_ch_disable:
+269d 6fe0c839 fetch 1 ,mem_24g_data_type 
+269e 793ffe04 set0 bit_hop ,pdata 
+269f 67e0c839 store 1 ,mem_24g_data_type 
+26a0 20402696 call g24_txpayload_type_update 
+26a1 2040272b call power_ctrl_pac_succ_decrs 
+26a2 20202281 branch g24_ch 
+
+g24_tx_fast_hop:
+26a3 2040271b call power_ctrl_txpower_incrs 
+26a4 2040272b call power_ctrl_pac_succ_decrs 
+26a5 20202281 branch g24_ch 
+
+g24_search_receiver:
+26a6 6fe148a1 fetch 2 ,mem_cb_24g_search_receiver 
+26a7 20207e7a branch callback_func 
+
+g24_nodata_transmit:
+26a8 6fe0c8ab fetch 1 ,mem_24g_abort_pac 
+26a9 205a26ae call g24_send_abort_packet ,blank 
+26aa 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+26ab c1008000 rtneq g24_tx_timer_int_enable 
+26ac 204026a6 call g24_search_receiver 
+26ad 202026bc branch g24_long_sleep 
+
+g24_send_abort_packet:
+26ae 70483901 jam type_ms ,mem_24g_data_type 
+26af 7048ab01 jam 1 ,mem_24g_abort_pac 
+26b0 20402649 call g24_transmit_rf_ctrl_clear 
+26b1 67e0c7c9 store 1 ,mem_24g_txbuf 
+26b2 58000000 setarg 0 
+26b3 67e3c7ca store 7 ,mem_24g_txbuf + 1 
+26b4 6fe248ad fetch 4 ,mem_24g_device_addr 
+26b5 67e247d1 store 4 ,mem_24g_txbuf + 8 
+26b6 7048380c jam 12 ,mem_24g_datalen 
+26b7 6fe0c839 fetch 1 ,mem_24g_data_type 
+26b8 79207e03 set1 bit_abort ,pdata 
+26b9 67e0c839 store 1 ,mem_24g_data_type 
+26ba 20402247 call g24_transmit_prep 
+26bb 2020262b branch g24_transmit_start 
+
+g24_long_sleep:
+26bc 204026c2 call g24_lpm_wait 
+26bd 24740000 nrtn user 
+26be 6fe4485f fetch 8 ,mem_24g_enter_hibernate 
+
+g24_long_seep2:
+26bf 20407e1f call clk2lpo 
+26c0 604a4160 storet 4 ,mem_sleep_counter 
+26c1 20201464 branch lpm_sleep 
+
+g24_lpm_wait:
+26c2 4776403d bpatchx patch3d_4 ,mem_patch3d 
+26c3 78347c00 enable user 
+26c4 20401436 call lpo_calibration 
+26c5 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+26c6 203a7ec7 branch disable_user ,blank 
+26c7 6fe0c099 fetch 1 ,mem_lpm_mode 
+26c8 203a7ec7 branch disable_user ,blank 
+26c9 6fe0c8c1 fetch 1 ,mem_24g_transmit_by_interrupt 
+26ca c000fec7 beq g24_tx_timer_int_enable ,disable_user 
+
+g24_setgpio_lpm_before:
+26cb 6fe148a3 fetch 2 ,mem_cb_24g_lpm_before 
+26cc 20207e7a branch callback_func 
+
+g24_transmit_by_interrupt:
+26cd 204022a0 call g24_timer_check 
+26ce 24740000 nrtn user 
+26cf 204026e2 call g24_interval_calibrate 
+26d0 6fe148c2 fetch 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26d1 1fe0fe01 increase 1 ,pdata 
+26d2 67e148c2 store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26d3 684948c4 fetcht 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+26d4 98467c00 isub temp ,null 
+26d5 2042a6d7 call g24_transmit_by_interrupt_exit ,zero 
+26d6 20202628 branch g24_transmit_no_interrupt 
+
+g24_transmit_by_interrupt_exit:
+26d7 7048c100 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
+26d8 58000000 setarg 0 
+26d9 67e148c2 store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26da 58000064 setarg 100 
+26db 67e148c4 store 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+
+g24_interval_min:
+26dc 7048c000 jam 0 ,mem_24g_pac_index 
+26dd 6fe0c858 fetch 1 ,mem_24g_interval_min 
+
+g24_interval_store:
+26de 67e0c857 store 1 ,mem_24g_interval 
+26df 20600000 rtn 
+
+g24_interval_max:
+26e0 6fe0c859 fetch 1 ,mem_24g_interval_max 
+26e1 202026de branch g24_interval_store 
+
+g24_interval_calibrate:
+26e2 6fe0c8c0 fetch 1 ,mem_24g_pac_index 
+26e3 1fe0fe01 increase 1 ,pdata 
+26e4 67e0c8c0 store 1 ,mem_24g_pac_index 
+26e5 c00226e0 beq 4 ,g24_interval_max 
+26e6 c002a6dc beq 5 ,g24_interval_min 
+26e7 20600000 rtn 
+
+g24_transmit_by_interrupt_enable:
+26e8 7048c101 jam g24_tx_timer_int_enable ,mem_24g_transmit_by_interrupt 
+26e9 58000000 setarg 0 
+26ea 67e148c2 store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26eb 20600000 rtn 
+
+g24_factory_check:
+26ec df200002 arg 2 ,loopcnt 
+26ed d8c0483f arg mem_24g_addr ,contr 
+
+pdata_0xff_check:
+26ee 20407ec5 call enable_user 
+26ef 5800ffff setarg 0xffff 
+
+pdata_0xff_check_loop:
+26f0 e8410006 ifetcht 2 ,contr 
+26f1 98467c00 isub temp ,null 
+26f2 2442fec7 ncall disable_user ,zero 
+26f3 c20026f0 loop pdata_0xff_check_loop 
+26f4 20600000 rtn 
+
+power_ctrl_start:
+26f5 4776c03d bpatchx patch3d_5 ,mem_patch3d 
+26f6 6fe1478f fetch 2 ,mem_ui_state_map 
+26f7 c3858000 rtnbit1 ui_state_ble_adv 
+26f8 c3838000 rtnbit1 ui_state_bt_reconnect 
+26f9 c3830000 rtnbit1 ui_state_bt_discovery 
+26fa 6a21489d fetchr rega ,2 ,mem_rssi_signal_buf_ptr 
+26fb 204025d2 call rssi_average 
+26fc 6048c8cb storet 1 ,mem_rssi_avg_received 
+
+power_ctrl_rssi_avg_compare:
+26fd 6fe0c8d0 fetch 1 ,mem_rssi_dis_max_24g 
+26fe c5132700 bmark1 mark_24g ,power_ctrl_start_next 
+26ff 6fe0c8d3 fetch 1 ,mem_rssi_dis_max_ble 
+
+power_ctrl_start_next:
+2700 98467c00 isub temp ,null 
+2701 2421271a nbranch power_ctrl_txpower_incrs_force ,positive 
+2702 6fe0c8cd fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2703 1fe67c02 sub pdata ,2 ,null 
+2704 24212708 nbranch power_ctrl_txpower_decrs_check ,positive 
+2705 6fe0c8cd fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2706 c000271b beq 0 ,power_ctrl_txpower_incrs 
+2707 20600000 rtn 
+
+power_ctrl_txpower_decrs_check:
+2708 6fe0c8cd fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2709 6848c8ce fetcht 1 ,mem_power_ctrl_pac_succ_cnt_init 
+270a 98467c00 isub temp ,null 
+270b 24628000 nrtn zero 
+270c 7048cd00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+
+power_ctrl_txpower_decrs:
+270d 6848c8cb fetcht 1 ,mem_rssi_avg_received 
+270e 6fe0c8cf fetch 1 ,mem_rssi_dis_min_24g 
+270f c5132711 bmark1 mark_24g ,power_ctrl_txpower_decrs_next 
+2710 6fe0c8d2 fetch 1 ,mem_rssi_dis_min_ble 
+
+power_ctrl_txpower_decrs_next:
+2711 98467c00 isub temp ,null 
+2712 24610000 nrtn positive 
+2713 6fe0c8cc fetch 1 ,mem_power_ctrl_level 
+2714 c0002722 beq 0 ,power_ctrl_decrs_level0 
+2715 1fe0ffff increase -1 ,pdata 
+2716 67e0c8cc store 1 ,mem_power_ctrl_level 
+2717 c0002722 beq 0 ,power_ctrl_decrs_level0 
+
+power_ctrl_decrs_level1:
+
+power_ctrl_incrs_level1:
+2718 7041e800 jam tx_power_0db ,mem_tx_power 
+2719 20600000 rtn 
+
+power_ctrl_txpower_incrs_force:
+271a 7048cd00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+
+power_ctrl_txpower_incrs:
+271b 6fe0c8cc fetch 1 ,mem_power_ctrl_level 
+271c c0012720 beq 2 ,power_ctrl_incrs_level2 
+271d 1fe0fe01 increase 1 ,pdata 
+271e 67e0c8cc store 1 ,mem_power_ctrl_level 
+271f c000a718 beq 1 ,power_ctrl_incrs_level1 
+
+power_ctrl_incrs_level2:
+2720 7041e806 jam tx_power_6db ,mem_tx_power 
+2721 20600000 rtn 
+
+power_ctrl_decrs_level0:
+2722 7041e885 jam tx_power_f5db ,mem_tx_power 
+2723 20600000 rtn 
+
+power_ctrl_pac_succ_cnt_init:
+2724 7048cc01 jam 1 ,mem_power_ctrl_level 
+2725 7048cd00 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+2726 20600000 rtn 
+
+power_ctrl_pac_succ_incrs:
+2727 6fe0c8cd fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2728 1fe0fe01 increase 1 ,pdata 
+2729 67e0c8cd store 1 ,mem_power_ctrl_pac_succ_cnt 
+272a 20600000 rtn 
+
+power_ctrl_pac_succ_decrs:
+272b 6fe0c8cd fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+272c 1fe67c02 sub pdata ,2 ,null 
+272d 24412733 ncall power_ctrl_pac_succ_cnt_reinit ,positive 
+272e 6fe0c8cd fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+272f c1000000 rtneq 0 
+2730 1fe0ffff increase -1 ,pdata 
+2731 67e0c8cd store 1 ,mem_power_ctrl_pac_succ_cnt 
+2732 20600000 rtn 
+
+power_ctrl_pac_succ_cnt_reinit:
+2733 7048cd03 jam 3 ,mem_power_ctrl_pac_succ_cnt 
+2734 20600000 rtn 
+
+ali_mesh_access_layer_resolve_message:
+2735 6fe08be0 fetch 1 ,mem_ccm_data_len 
+2736 67e089f6 store 1 ,mem_mesh_receive_model_message_payload_len 
+2737 1e020c00 copy alarm ,contr 
+2738 20407d7e call memcpy24 
+2739 2040278d call logging_tx_info_receive_access_message 
+273a 6fe149ef fetch 2 ,mem_mesh_cb_receive_access_message 
+273b 20207e7a branch callback_func 
+
+ali_mesh_access_layer_check_access_message_opcode:
+273c 6fe089f7 fetch 1 ,mem_mesh_receive_model_message_payload_opcode 
+273d c0002744 beq mesh_message_opcode_config_appkey_add ,ali_mesh_access_layer_message_opcode_config_appkey_add 
+273e c0402d95 beq mesh_configuration_and_health_message_opcode_header ,ali_mesh_access_layer_config_or_health_message_opcode 
+273f c0412e95 beq mesh_module_message_opcode_header ,ali_mesh_model_layer_check_model_message_opcode 
+2740 c068a791 beq vendor_message_attr_set ,ali_mesh_ali_vendor_message_attribute_set 
+2741 c06827ab beq vendor_message_attr_get ,ali_mesh_ali_vendor_message_opcode_attr_get 
+2742 c06aa7ab beq vendor_message_attr_confirmation ,ali_mesh_ali_vendor_message_opcode_attr_confrimation 
+2743 20600000 rtn 
+
+ali_mesh_access_layer_message_opcode_config_appkey_add:
+2744 d8c009fb arg mem_mesh_receive_application_key ,contr 
+2745 d8a04b19 arg mem_mesh_application_key ,contw 
+2746 20407d7f call memcpy16 
+2747 70496b00 jam paired_status ,mem_mesh_provisioned_flag 
+2748 20402b0e call ali_mesh_encrypt_base_function_k3 
+2749 20402b00 call ali_mesh_encrypt_base_function_k4 
+274a 2040275f call ali_mesh_access_layer_finish_pairing_init_subscription_list 
+274b 20402750 call ali_mesh_accesss_layer_check_message_type 
+274c 20402755 call ali_mesh_access_layer_send_config_appkey_status 
+274d 70496b00 jam paired_status ,mem_mesh_provisioned_flag 
+274e 6fe149f1 fetch 2 ,mem_mesh_cb_receive_config_appkey_add 
+274f 20207e7a branch callback_func 
+
+ali_mesh_accesss_layer_check_message_type:
+2750 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+2751 70496b04 jam received_config_appkey_add ,mem_mesh_provisioned_flag 
+2752 c1008000 rtneq mesh_message_app 
+2753 70496b00 jam paired_status ,mem_mesh_provisioned_flag 
+2754 20600000 rtn 
+
+ali_mesh_access_layer_send_config_appkey_status:
+2755 58000080 setarg mesh_configuration_and_health_message_opcode_header 
+2756 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2757 58000003 setarg mesh_message_opcode_config_config_model_publication_set 
+2758 e7e08005 istore 1 ,contw 
+2759 58000000 setarg status_code_success 
+275a e7e08005 istore 1 ,contw 
+275b 6fe189f8 fetch 3 ,mem_mesh_netkeyindex_and_appkeyindex 
+275c e7e18005 istore 3 ,contw 
+275d 700a0f06 jam 6 ,mem_mesh_access_layer_payload_len 
+275e 2020305d branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_finish_pairing_init_subscription_list:
+275f 6fe14a15 fetch 2 ,mem_mesh_core_feature 
+2760 c3810000 rtnbit1 mesh_feature_disable_subscription 
+2761 20402e14 call mesh_get_element_info_config 
+
+ali_mesh_access_layer_finish_pairing_init_subscription_list_loop:
+2762 1a20a606 add rega ,element_device_subscription_label ,regc 
+2763 5fffffff setarg -1 
+2764 e7e40013 istore subscription_max_count ,regc 
+2765 e7e40005 istore subscription_max_count ,contw 
+2766 efe10011 ifetch 2 ,rega 
+2767 e7e10013 istore 2 ,regc 
+2768 1a427e00 copy regb ,pdata 
+2769 9a20a200 iadd rega ,rega 
+276a c2002762 loop ali_mesh_access_layer_finish_pairing_init_subscription_list_loop 
+276b 6fe14a11 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+276c 20207e7a branch callback_func 
+
+ali_mesh_access_layer_send_generic_onoff_status:
+276d 58000082 setarg mesh_module_message_opcode_header 
+276e 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+276f 58000004 setarg mesh_module_message_opcode_generic_onoff_status_no_head 
+2770 e7e08005 istore 1 ,contw 
+2771 6fe089f9 fetch 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+2772 e7e08005 istore 1 ,contw 
+2773 700a0f03 jam 3 ,mem_mesh_access_layer_payload_len 
+2774 2020305d branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_send_light_lightness_status:
+2775 58000082 setarg mesh_module_message_opcode_header 
+2776 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2777 5800004e setarg mesh_module_message_opcode_light_lightness_status_no_head 
+2778 e7e08005 istore 1 ,contw 
+2779 6fe109f9 fetch 2 ,mem_mesh_light_lightness_set_payload_lightness 
+277a e7e10005 istore 2 ,contw 
+277b 700a0f04 jam 4 ,mem_mesh_access_layer_payload_len 
+277c 2020305d branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_send_light_ctl_stauts:
+277d 58000082 setarg mesh_module_message_opcode_header 
+277e 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+277f 58000060 setarg mesh_module_message_opcode_light_ctl_status_no_head 
+2780 e7e08005 istore 1 ,contw 
+2781 6fe209f9 fetch 4 ,mem_mesh_ctl_lightness 
+2782 e7e20005 istore 4 ,contw 
+2783 700a0f06 jam 6 ,mem_mesh_access_layer_payload_len 
+2784 2020305d branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_send_scene_status:
+2785 5800005e setarg mesh_module_message_opcode_scene_status 
+2786 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2787 58000000 setarg mesh_success 
+2788 e7e08005 istore 1 ,contw 
+2789 6fe109f9 fetch 2 ,mem_mesh_scene_recall_payload_scene_number 
+278a e7e10005 istore 2 ,contw 
+278b 700a0f04 jam 4 ,mem_mesh_access_layer_payload_len 
+278c 2020305d branch ali_mesh_upper_transport_layer_send_access_message 
+
+logging_tx_info_receive_access_message:
+278d 6f208be0 fetchr loopcnt ,1 ,mem_ccm_data_len 
+278e 1e022200 copy alarm ,rega 
+278f da400050 arg mesh_access_receive_message ,regb 
+2790 202029e6 branch logging_tx_info 
+
+ali_mesh_ali_vendor_message_attribute_set:
+2791 204027ac call ali_mesh_ali_vendor_message_attrbute_check_company_id_and_tid 
+2792 24740000 nrtn user 
+2793 6fe109fb fetch 2 ,mem_mesh_vendor_message_attr_type 
+2794 d840f01f arg vendor_message_attr_type_time ,temp 
+2795 98467c00 isub temp ,null 
+2796 2022a7c0 branch ali_mesh_ali_vendor_message_opcode_timer_set_curr_time ,zero 
+2797 d840f010 arg vendor_message_attr_type_timing ,temp 
+2798 98467c00 isub temp ,null 
+2799 2022a7c4 branch ali_mesh_ali_vendor_message_opcode_timer_set_timing ,zero 
+279a d840f011 arg vendor_message_attr_type_cycle_timing ,temp 
+279b 98467c00 isub temp ,null 
+279c 2022a7cd branch ali_mesh_ali_vendor_message_opcode_timer_set_timing_cyclically ,zero 
+279d d840f012 arg vendor_message_attr_type_delete_timing ,temp 
+279e 98467c00 isub temp ,null 
+279f 2022a7d6 branch ali_mesh_ali_vendor_message_opcode_timer_delete_timing ,zero 
+27a0 d8400534 arg vendor_message_attr_type_main_light ,temp 
+27a1 98467c00 isub temp ,null 
+27a2 2022a7b7 branch ali_mesh_ali_vendor_message_attribute_set_main_light ,zero 
+27a3 d8400533 arg vendor_message_attr_type_background_light ,temp 
+27a4 98467c00 isub temp ,null 
+27a5 2022a7ba branch ali_mesh_ali_vendor_message_attribute_set_background_light ,zero 
+27a6 d8400123 arg vendor_message_attr_type_color ,temp 
+27a7 98467c00 isub temp ,null 
+27a8 2022a7bd branch ali_mesh_ali_vendor_message_attribute_set_color ,zero 
+27a9 6fe149f5 fetch 2 ,mem_mesh_cb_recv_vendor 
+27aa 20207e7a branch callback_func 
+
+ali_mesh_ali_vendor_message_opcode_attr_get:
+
+ali_mesh_ali_vendor_message_opcode_attr_confrimation:
+27ab 20600000 rtn 
+
+ali_mesh_ali_vendor_message_attrbute_check_company_id_and_tid:
+27ac 20407ec7 call disable_user 
+27ad 6fe109f8 fetch 2 ,mem_mesh_vendor_message_cid 
+27ae d84001a8 arg vendor_message_opcode_company_id ,temp 
+27af 98467c00 isub temp ,null 
+27b0 24628000 nrtn zero 
+27b1 6848c7a7 fetcht 1 ,mem_mesh_vendor_mesh_receive_tid 
+27b2 6fe089fa fetch 1 ,mem_mesh_vendor_message_tid 
+27b3 98467c00 isub temp ,null 
+27b4 20628000 rtn zero 
+27b5 67e0c7a7 store 1 ,mem_mesh_vendor_mesh_receive_tid 
+27b6 20207ec5 branch enable_user 
+
+ali_mesh_ali_vendor_message_attribute_set_main_light:
+27b7 20402828 call ali_mesh_ali_vendor_message_ack_attr_status_uint8 
+27b8 6fe14a05 fetch 2 ,mem_mesh_cb_main_light_onoff_set 
+27b9 20207e7a branch callback_func 
+
+ali_mesh_ali_vendor_message_attribute_set_background_light:
+27ba 20402828 call ali_mesh_ali_vendor_message_ack_attr_status_uint8 
+27bb 6fe14a07 fetch 2 ,mem_mesh_cb_background_onoff_set 
+27bc 20207e7a branch callback_func 
+
+ali_mesh_ali_vendor_message_attribute_set_color:
+27bd 20402822 call ali_mesh_ali_vendor_message_ack_attr_status_uint48 
+27be 6fe14a09 fetch 2 ,mem_mesh_cb_color_set 
+27bf 20207e7a branch callback_func 
+
+ali_mesh_ali_vendor_message_opcode_timer_set_curr_time:
+27c0 20402824 call ali_mesh_ali_vendor_message_ack_attr_status_uint32 
+27c1 6fe209fd fetch 4 ,mem_mesh_vendor_message_current_time 
+27c2 67e247a9 store 4 ,mem_mesh_vendor_timer_current_time 
+27c3 20202859 branch ali_mesh_time_init_system_time 
+
+ali_mesh_ali_vendor_message_opcode_timer_set_timing:
+27c4 2040281e call ali_mesh_ali_vendor_message_ack_attr_status_uint64 
+27c5 204027ef call ali_mesh_ali_vendor_message_calc_timing_address 
+27c6 207a0000 rtn blank 
+27c7 6fe089fd fetch 1 ,mem_mesh_vendor_timer_timing_index 
+27c8 204027eb call ali_mesh_vendor_timer_buffer_offset_cal 
+27c9 684c09fd fetcht 8 ,mem_mesh_vendor_timer_timing_index 
+27ca e0440005 istoret 8 ,contw 
+
+ali_mesh_ali_vendor_message_cb_timing_changed:
+27cb 6fe14a13 fetch 2 ,mem_mesh_cb_vendor_timing_changed 
+27cc 20207e7a branch callback_func 
+
+ali_mesh_ali_vendor_message_opcode_timer_set_timing_cyclically:
+27cd 20402820 call ali_mesh_ali_vendor_message_ack_attr_status_uint56 
+27ce 204027ef call ali_mesh_ali_vendor_message_calc_timing_address 
+27cf 207a0000 rtn blank 
+27d0 700a0459 jam timer_cyclical_falg ,mem_mesh_vendor_timer_timing_cyclic_flag 
+27d1 6fe089fd fetch 1 ,mem_mesh_vendor_timer_timing_index_cyclic 
+27d2 204027eb call ali_mesh_vendor_timer_buffer_offset_cal 
+27d3 6fe409fd fetch 8 ,mem_mesh_vendor_timer_timing_index_cyclic 
+27d4 e7e40005 istore 8 ,contw 
+27d5 202027cb branch ali_mesh_ali_vendor_message_cb_timing_changed 
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing:
+27d6 204027e8 call ali_mesh_ali_vendor_message_opcode_timer_delete_timing_ack 
+27d7 204027ef call ali_mesh_ali_vendor_message_calc_timing_address 
+27d8 207a0000 rtn blank 
+27d9 6fe089fd fetch 1 ,mem_mesh_vendor_timer_timing_index 
+27da 207a0000 rtn blank 
+27db 204027eb call ali_mesh_vendor_timer_buffer_offset_cal 
+27dc d8400000 arg 0 ,temp 
+27dd e0408005 istoret 1 ,contw 
+27de 6fe089f6 fetch 1 ,mem_mesh_receive_model_message_payload_len 
+27df 1fe67c08 sub pdata ,8 ,null 
+27e0 2042a7e2 call ali_mesh_ali_vendor_message_opcode_timer_delete_timing_delete_second ,zero 
+27e1 202027cb branch ali_mesh_ali_vendor_message_cb_timing_changed 
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing_delete_second:
+27e2 204027ef call ali_mesh_ali_vendor_message_calc_timing_address 
+27e3 6fe089fe fetch 1 ,mem_mesh_vendor_timer_timing_index1 
+27e4 204027eb call ali_mesh_vendor_timer_buffer_offset_cal 
+27e5 d8400000 arg 0 ,temp 
+27e6 e0408005 istoret 1 ,contw 
+27e7 20600000 rtn 
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing_ack:
+27e8 6fe089f6 fetch 1 ,mem_mesh_receive_model_message_payload_len 
+27e9 c003a828 beq 7 ,ali_mesh_ali_vendor_message_ack_attr_status_uint8 
+27ea 20202826 branch ali_mesh_ali_vendor_message_ack_attr_status_uint16 
+
+ali_mesh_vendor_timer_buffer_offset_cal:
+27eb 1fe0ffff pincrease -1 
+27ec 1fe9fe00 lshift3 pdata ,pdata 
+27ed 98a08a00 iadd contw ,contw 
+27ee 20600000 rtn 
+
+ali_mesh_ali_vendor_message_calc_timing_address:
+27ef 20402e14 call mesh_get_element_info_config 
+27f0 1a20a204 add rega ,element_device_vendor_time_ptr ,rega 
+27f1 6fe0ca2d fetch 1 ,mem_mesh_receive_element_number 
+27f2 9a4ffe00 imul32 regb ,pdata 
+27f3 9a20a200 iadd rega ,rega 
+27f4 efe10011 ifetch 2 ,rega 
+27f5 1fe20a00 copy pdata ,contw 
+27f6 20600000 rtn 
+
+ali_mesh_ali_vendor_message_status_add_head:
+27f7 580000d3 setarg vendor_message_attr_status 
+27f8 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+27f9 580001a8 setarg vendor_message_opcode_company_id 
+27fa e7e10005 istore 2 ,contw 
+27fb 6fe0c7a7 fetch 1 ,mem_mesh_vendor_mesh_receive_tid 
+27fc e7e08005 istore 1 ,contw 
+27fd e0410005 istoret 2 ,contw 
+27fe 20600000 rtn 
+
+ali_mesh_ali_vendor_message_opcode_device_power_on:
+27ff d8e00000 arg 0 ,queue 
+2800 d8400003 arg vendor_message_event_device_power_on ,temp 
+2801 da20f009 arg vendor_attr_type_event_trigger ,rega 
+2802 20202830 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_generic_onoff:
+2803 da200100 arg vendor_attr_generic_onoff_server ,rega 
+2804 20202830 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_scene_server_first_element:
+2805 d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_scene_server:
+2806 da20f004 arg vendor_attr_scene_server ,rega 
+2807 20202835 branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_opcode_main_light_onoff_first_element:
+2808 d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_main_light_onoff:
+2809 da200534 arg vendor_attr_main_light_server ,rega 
+280a 20202830 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_background_light_onoff_first_element:
+280b d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_background_light_onoff:
+280c da200533 arg vendor_attr_background_light_onoff_server ,rega 
+280d 20202830 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_brightness_first_element:
+280e d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_brightness:
+280f 20402ecb call ali_mesh_model_layer_message_calc_actual_lightness 
+2810 da200121 arg vendor_attr_lightness_level_server ,rega 
+2811 20202835 branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_opcode_color_temperature_first_element:
+2812 d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_color_temperature:
+2813 20402ed9 call ali_mesh_model_layer_message_calc_actual_temperature 
+2814 da200122 arg vendor_attr_color_temperature_server ,rega 
+2815 20202835 branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_opcode_timing_finish:
+2816 18438400 lshift temp ,temp 
+2817 18418411 or temp ,vendor_message_event_finish_timing ,temp 
+2818 da20f009 arg vendor_attr_type_event_trigger ,rega 
+2819 20202835 branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_indication_info_add_head_event_trigger:
+281a 2040283c call ali_mesh_ali_vendor_message_indication_info_add_head 
+281b 5800f009 setarg vendor_attr_type_event_trigger 
+281c e7e10005 istore 2 ,contw 
+281d 20600000 rtn 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint64:
+281e df200008 arg 8 ,loopcnt 
+281f 2020282a branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint56:
+2820 df200008 arg 8 ,loopcnt 
+2821 2020282a branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint48:
+2822 df200006 arg 6 ,loopcnt 
+2823 2020282a branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint32:
+2824 df200004 arg 4 ,loopcnt 
+2825 2020282a branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint16:
+2826 df200002 arg 2 ,loopcnt 
+2827 2020282a branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint8:
+2828 df200001 arg 1 ,loopcnt 
+2829 2020282a branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status:
+282a 1f20fe06 add loopcnt ,6 ,pdata 
+282b 67e08a0f store 1 ,mem_mesh_access_layer_payload_len 
+282c 204027f7 call ali_mesh_ali_vendor_message_status_add_head 
+282d d8c009fd arg mem_mesh_vendor_attr_parameter ,contr 
+282e 20407dd4 call memcpy 
+282f 2020305d branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_ali_vendor_message_opcode_para_uint8:
+2830 2040283c call ali_mesh_ali_vendor_message_indication_info_add_head 
+2831 e2210005 istorer rega ,2 ,contw 
+2832 e0408005 istoret 1 ,contw 
+2833 700a0f07 jam 7 ,mem_mesh_access_layer_payload_len 
+2834 2020283a branch ali_mesh_ali_vendor_message_send_message 
+
+ali_mesh_ali_vendor_message_opcode_para_uint16:
+2835 2040283c call ali_mesh_ali_vendor_message_indication_info_add_head 
+2836 e2210005 istorer rega ,2 ,contw 
+2837 e0410005 istoret 2 ,contw 
+2838 700a0f08 jam 8 ,mem_mesh_access_layer_payload_len 
+2839 2020283a branch ali_mesh_ali_vendor_message_send_message 
+
+ali_mesh_ali_vendor_message_send_message:
+283a 20402f2f call ali_mesh_more_element_calc_queue_address 
+283b 2020305d branch ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer 
+
+ali_mesh_ali_vendor_message_indication_info_add_head:
+283c 6fe0c935 fetch 1 ,mem_mesh_transport_aid 
+283d 67e08c14 store 1 ,mem_mesh_message_transport_head 
+283e 580000f0 setarg vendor_message_tmall_dst 
+283f 67e10c35 store 2 ,mem_mesh_send_message_dst 
+2840 6fe0c7a8 fetch 1 ,mem_mesh_vendor_mesh_send_tid 
+2841 1fe0fe01 pincrease 1 
+2842 67e0c7a8 store 1 ,mem_mesh_vendor_mesh_send_tid 
+2843 c060284b beq vendor_message_send_tid_max ,ali_mesh_ali_vendor_message_indication_info_reset_tid 
+2844 580000d4 setarg vendor_message_attr_indication 
+2845 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2846 580001a8 setarg vendor_message_opcode_company_id 
+2847 e7e10005 istore 2 ,contw 
+2848 6fe0c7a8 fetch 1 ,mem_mesh_vendor_mesh_send_tid 
+2849 e7e08005 istore 1 ,contw 
+284a 20600000 rtn 
+
+ali_mesh_ali_vendor_message_indication_info_reset_tid:
+284b 7047a880 jam vendor_message_send_tid_min ,mem_mesh_vendor_mesh_send_tid 
+284c 20600000 rtn 
+
+ali_mesh_time_function:
+284d 1c420400 copy clkn_bt ,temp 
+284e 6fe247ad fetch 4 ,mem_system_time 
+284f 98467c00 isub temp ,null 
+2850 2041285f call ali_mesh_timer_timeout ,positive 
+2851 20402866 call ali_mesh_clkn_bt_add_1s 
+2852 98467c00 isub temp ,null 
+2853 20610000 rtn positive 
+2854 2040285a call ali_mesh_time_init_system_time_without_clk 
+2855 6fe247a9 fetch 4 ,mem_mesh_vendor_timer_current_time 
+2856 1fe0fe01 pincrease 1 
+2857 67e247a9 store 4 ,mem_mesh_vendor_timer_current_time 
+2858 2020286a branch ali_mesh_ali_vendor_check_time 
+
+ali_mesh_time_init_system_time:
+2859 1c427e00 copy clkn_bt ,pdata 
+
+ali_mesh_time_init_system_time_without_clk:
+285a 67e247ad store 4 ,mem_system_time 
+285b 6fe0c7b0 fetch 1 ,mem_system_time + 3 
+285c 1fe17e0f and_into 0x0f ,pdata 
+285d 67e0c7b0 store 1 ,mem_system_time + 3 
+285e 20600000 rtn 
+
+ali_mesh_timer_timeout:
+285f 20628000 rtn zero 
+2860 1fe22400 copy pdata ,regb 
+2861 58100000 setarg 0x100000 
+2862 1fed7e00 lshift8 pdata ,pdata 
+2863 98408400 iadd temp ,temp 
+2864 1a427e00 copy regb ,pdata 
+2865 20600000 rtn 
+
+ali_mesh_clkn_bt_add_1s:
+2866 df200014 arg 20 ,loopcnt 
+
+ali_mesh_time_loop:
+2867 1fe0fea0 pincrease 160 
+2868 c2002867 loop ali_mesh_time_loop 
+2869 20600000 rtn 
+
+ali_mesh_ali_vendor_check_time:
+286a 20402e14 call mesh_get_element_info_config 
+286b 1a20a204 add rega ,element_device_vendor_time_ptr ,rega 
+286c 704a2d00 jam 0 ,mem_mesh_receive_element_number 
+
+ali_mesh_ali_vendor_check_time_loop:
+286d 20402f25 call ali_mesh_more_element_push_stack 
+286e efe10011 ifetch 2 ,rega 
+286f 203a2872 branch ali_mesh_ali_vendor_check_time_next_element ,blank 
+2870 1fe26000 copy pdata ,alarm 
+2871 2040287c call ali_mesh_ali_vendor_check_time_one_element 
+
+ali_mesh_ali_vendor_check_time_next_element:
+2872 20402f2a call ali_mesh_more_element_pop_stack 
+2873 6fe0ca2d fetch 1 ,mem_mesh_receive_element_number 
+2874 1fe0fe01 pincrease 1 
+2875 67e0ca2d store 1 ,mem_mesh_receive_element_number 
+2876 6848ca17 fetcht 1 ,mem_mesh_element_number 
+2877 98467e00 isub temp ,pdata 
+2878 20628000 rtn zero 
+2879 1a427e00 copy regb ,pdata 
+287a 9a20a200 iadd rega ,rega 
+287b 2020286d branch ali_mesh_ali_vendor_check_time_loop 
+
+ali_mesh_ali_vendor_check_time_one_element:
+287c df200028 arg 40 ,loopcnt 
+
+ali_mesh_ali_vendor_check_time_one_element_loop:
+287d 1f227e00 copy loopcnt ,pdata 
+287e 67e08c00 store 1 ,mem_mesh_loopcnt_tmep 
+287f efe08030 ifetch 1 ,alarm 
+2880 245a2886 ncall ali_mesh_ali_vendor_had_timing ,blank 
+2881 1e00e008 increase 8 ,alarm 
+2882 6fe08c00 fetch 1 ,mem_mesh_loopcnt_tmep 
+2883 1fe27200 copy pdata ,loopcnt 
+2884 c200287d loop ali_mesh_ali_vendor_check_time_one_element_loop 
+2885 20600000 rtn 
+
+ali_mesh_ali_vendor_had_timing:
+2886 e8440030 ifetcht 8 ,alarm 
+2887 604c09fd storet 8 ,mem_mesh_vendor_timer_timing_index_cyclic 
+2888 6fe08a04 fetch 1 ,mem_mesh_vendor_timer_timing_attr_para 
+2889 c02ca8a0 beq timer_cyclical_falg ,ali_mesh_ali_vendor_had_timing_cyclically 
+288a 684a47a9 fetcht 4 ,mem_mesh_vendor_timer_current_time 
+288b 6fe209fe fetch 4 ,mem_mesh_vendor_timer_timing_time 
+288c 98467c00 isub temp ,null 
+288d 6fe08a04 fetch 1 ,mem_mesh_vendor_timer_timing_attr_para 
+288e 2022a890 branch ali_mesh_ali_vendor_time_timeout ,zero 
+288f 20600000 rtn 
+
+ali_mesh_ali_vendor_time_timeout:
+2890 67e089f9 store 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+2891 6fe149fb fetch 2 ,mem_mesh_cb_generic_onoff_set 
+2892 20407e7a call callback_func 
+2893 1e027e00 copy alarm ,pdata 
+2894 67e10c08 store 2 ,mem_mesh_alarm_temp 
+2895 68e0ca2d fetchr queue ,1 ,mem_mesh_receive_element_number 
+2896 e8408030 ifetcht 1 ,alarm 
+2897 20402816 call ali_mesh_ali_vendor_message_opcode_timing_finish 
+2898 684889f9 fetcht 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+2899 68e0ca2d fetchr queue ,1 ,mem_mesh_receive_element_number 
+289a 20402803 call ali_mesh_ali_vendor_message_opcode_generic_onoff 
+289b 6fe10c08 fetch 2 ,mem_mesh_alarm_temp 
+289c 1fe26000 copy pdata ,alarm 
+289d 58000000 setarg 0 
+289e e7e08030 istore 1 ,alarm 
+289f 202027cb branch ali_mesh_ali_vendor_message_cb_timing_changed 
+
+ali_mesh_ali_vendor_had_timing_cyclically:
+28a0 6fe247a9 fetch 4 ,mem_mesh_vendor_timer_current_time 
+28a1 d840003c arg seconds_of_min ,temp 
+28a2 9846fc00 idiv temp 
+28a3 20407e64 call wait_div_end 
+28a4 18077e00 remainder pdata 
+28a5 247a0000 nrtn blank 
+28a6 6fe247a9 fetch 4 ,mem_mesh_vendor_timer_current_time 
+28a7 d8454600 arg seconds_of_four_days ,temp 
+28a8 98467e00 isub temp ,pdata 
+28a9 d8493a80 arg seconds_of_week ,temp 
+28aa 9846fc00 idiv temp 
+28ab 20407e64 call wait_div_end 
+28ac 18077e00 remainder pdata 
+28ad d8415180 arg seconds_of_day ,temp 
+28ae 9846fc00 idiv temp 
+28af 20407e64 call wait_div_end 
+28b0 18072200 remainder rega 
+28b1 18078e00 quotient queue 
+28b2 58000000 setarg 0 
+28b3 f9207e00 qset1 pdata 
+28b4 68488a00 fetcht 1 ,mem_mesh_vendor_timer_timing_weekdays_cyclic 
+28b5 98417e00 iand temp ,pdata 
+28b6 207a0000 rtn blank 
+28b7 1a227e00 deposit rega 
+28b8 d840003c arg seconds_of_min ,temp 
+28b9 9846fc00 idiv temp 
+28ba 20407e64 call wait_div_end 
+28bb 18078400 quotient temp 
+28bc 580001e0 setarg eight_hours_time_zone_offset 
+28bd 98408400 iadd temp ,temp 
+28be 6fe109fe fetch 2 ,mem_mesh_vendor_timer_timing_time_cyclic 
+28bf 98467c00 isub temp ,null 
+28c0 24628000 nrtn zero 
+28c1 6fe08a03 fetch 1 ,mem_mesh_vendor_timer_timing_attr_para_cyclic 
+28c2 20202890 branch ali_mesh_ali_vendor_time_timeout 
+
+ali_mesh_bearer_layer_send_packet_by_network_layer:
+28c3 4777403d bpatchx patch3d_6 ,mem_patch3d 
+28c4 700a7414 jam adv_pairing_mesh_message_duration ,mem_mesh_queue_ele_duration 
+28c5 6fe0c98f fetch 1 ,mem_mesh_gatt_package_send_msg_id 
+28c6 67e08a75 store 1 ,mem_mesh_queue_ele_gatt_msg_id 
+28c7 6fe08bff fetch 1 ,mem_mesh_lower_transport_layer_payload_len 
+28c8 1fe0fe0b pincrease 11 
+28c9 1fe0f3fe add pdata ,-2 ,loopcnt 
+28ca 67e08a76 store 1 ,mem_mesh_queue_ele_len 
+28cb 1fe0ffff pincrease -1 
+28cc e7e08005 istore 1 ,contw 
+28cd 5800002a setarg gap_adtype_mesh_message 
+28ce e7e08005 istore 1 ,contw 
+28cf d8c04b58 arg mem_mesh_send_upper_layer_ivi_and_nid ,contr 
+28d0 20407dc7 call memcpy_fast 
+28d1 6fe1478f fetch 2 ,mem_ui_state_map 
+28d2 2feffe09 isolate1 ui_state_ble_connected ,pdata 
+28d3 2040b017 call ali_mesh_send_ble_data ,true 
+28d4 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+28d5 204028d7 call ali_mesh_advertising_bearer_layer_init_queue_param 
+28d6 202079aa branch queue_push 
+
+ali_mesh_advertising_bearer_layer_init_queue_param:
+28d7 1a208c02 add rega ,element_device_queue_buffer_ptr ,contr 
+28d8 efe10006 ifetch 2 ,contr 
+28d9 67e1448c store 2 ,mem_queue_ptr 
+28da da200a74 arg mem_mesh_queue_ele_temp ,rega 
+28db 20600000 rtn 
+
+ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue:
+28dc da6028de arg ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue_deal ,regc 
+28dd 20202e1f branch ali_mesh_check_all_element_info 
+
+ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue_deal:
+28de 1a208c16 add rega ,element_device_upper_adv_flag ,contr 
+28df efe08006 ifetch 1 ,contr 
+28e0 c1808000 rtnne packet_in_bearer 
+28e1 58000002 setarg packet_in_adverting 
+28e2 1a208a16 add rega ,element_device_upper_adv_flag ,contw 
+28e3 e7e08005 istore 1 ,contw 
+28e4 20202a1a branch ali_mesh_control_ble_advertising_on_advertising 
+
+ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer:
+28e5 204028f3 call ali_mesh_advertising_bearer_layer_generate_header 
+28e6 1840fe0d add temp ,13 ,pdata 
+28e7 67e0c7b1 store 1 ,mem_mesh_adv_data_len 
+28e8 2040290a call ali_mesh_advertising_add_adtype_flags 
+28e9 1840fe09 add temp ,9 ,pdata 
+28ea e7e08005 istore 1 ,contw 
+28eb 580000ff setarg gap_adtype_manufacturer_specific 
+28ec e7e08005 istore 1 ,contw 
+28ed 6fe40bec fetch 8 ,mem_mesh_receive_service_uuid_ios_data_company_id 
+28ee e7e40005 istore 8 ,contw 
+28ef 1a220c00 copy rega ,contr 
+28f0 18427200 copy temp ,loopcnt 
+28f1 20407dd4 call memcpy 
+28f2 20202951 branch mesh_le_send_adv 
+
+ali_mesh_advertising_bearer_layer_generate_header:
+28f3 580ea801 setarg company_id_alibaba_and_vid_gatt 
+28f4 67e18bec store 3 ,mem_mesh_receive_service_uuid_ios_data_company_id 
+28f5 58000007 setarg provisioning_send_ios_data 
+28f6 67e08bef store 1 ,mem_mesh_receive_service_uuid_ios_data_provisioning_type 
+28f7 6fe0c8d4 fetch 1 ,mem_k2_nid 
+28f8 67e08bf0 store 1 ,mem_mesh_receive_service_uuid_ios_data_nid 
+28f9 6fe08a75 fetch 1 ,mem_mesh_queue_ele_gatt_msg_id 
+28fa 67e08bf1 store 1 ,mem_mesh_receive_service_uuid_ios_data_msg_id 
+28fb 6fe08a74 fetch 1 ,mem_mesh_queue_ele_duration 
+28fc 2feffe07 isolate1 bit_of_app_package_num ,pdata 
+28fd 20402901 call ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer_calc_param 
+28fe 67e08bf2 store 1 ,mem_mesh_receive_service_uuid_ios_data_package_num 
+28ff 60488bf3 storet 1 ,mem_mesh_receive_service_uuid_ios_data_length 
+2900 20600000 rtn 
+
+ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer_calc_param:
+2901 da200a79 arg mem_mesh_queue_ele_payload + 2 ,rega 
+2902 d8400012 arg max_app_mssage_payload_length ,temp 
+2903 58000021 setarg 0x21 
+2904 24608000 nrtn true 
+2905 da200a8b arg mem_mesh_queue_ele_payload + 20 ,rega 
+2906 68488a76 fetcht 1 ,mem_mesh_queue_ele_len 
+2907 184085ee increase -18 ,temp 
+2908 58000022 setarg 0x22 
+2909 20600000 rtn 
+
+ali_mesh_advertising_add_adtype_flags:
+290a d8a047b2 arg mem_mesh_adv_data ,contw 
+290b 58000002 setarg 0x02 
+290c e7e08005 istore 1 ,contw 
+290d 58000001 setarg gap_adtype_flags 
+290e e7e08005 istore 1 ,contw 
+290f 58000002 setarg 0x02 
+2910 e7e08005 istore 1 ,contw 
+2911 20600000 rtn 
+
+ali_mesh_advertising_add_adtype_16bit_complete:
+2912 d8401827 arg mesh_provisioning_uuid ,temp 
+2913 58000003 setarg 0x03 
+2914 e7e08005 istore 1 ,contw 
+2915 58000003 setarg gap_adtype_16bit_complete 
+2916 e7e08005 istore 1 ,contw 
+2917 e0410005 istoret 2 ,contw 
+2918 20600000 rtn 
+
+mesh_receive_advertising:
+2919 2020291a branch mesh_le_scan_adv 
+
+mesh_le_scan_adv:
+291a 20401651 call le_enable 
+291b 20401be4 call le_init_adv 
+291c 20402924 call mesh_le_wait_adv 
+291d 24768000 nrtn match 
+291e 6fe08002 fetch 1 ,mem_le_adv_rcv 
+291f 1fe0fe01 pincrease 1 
+2920 67e08002 store 1 ,mem_le_adv_rcv 
+2921 6fe149ed fetch 2 ,mem_mesh_cb_receive_advertising 
+2922 20407e7a call callback_func 
+2923 2020165e branch le_disable 
+
+mesh_le_wait_adv:
+2924 6fe149f7 fetch 2 ,mem_mesh_scan_selete_next_ch 
+2925 20207e7a branch callback_func 
+
+mesh_le_wait_adv_cb:
+2926 20402928 call mesh_le_calc_next_scan_channel 
+2927 202016f6 branch le_receive_adv 
+
+mesh_le_calc_next_scan_channel:
+2928 6fe0c7d1 fetch 1 ,mem_mesh_adv_scan_channel 
+2929 1fe0fe01 pincrease 1 
+292a 67e0c7d1 store 1 ,mem_mesh_adv_scan_channel 
+292b 67e08016 store 1 ,mem_le_ch_mapped 
+292c c1940000 rtnne 40 
+292d 7047d125 jam 37 ,mem_mesh_adv_scan_channel 
+292e 70001625 jam 37 ,mem_le_ch_mapped 
+292f 20600000 rtn 
+
+mesh_check_ble_rx_packet:
+2930 6fe0816b fetch 1 ,mem_le_rxbuf 
+2931 1fe17e0f and pdata ,0x0f ,pdata 
+2932 c0002935 beq adv_ind ,ali_mesh_match_advertising_packet 
+2933 c0012935 beq adv_nonconn_ind ,ali_mesh_match_advertising_packet 
+2934 20600000 rtn 
+
+ali_mesh_match_advertising_packet:
+2935 e8408006 ifetcht 1 ,contr 
+2936 18467c06 sub temp ,adv_packet_min_length ,null 
+2937 20610000 rtn positive 
+2938 18467c25 sub temp ,adv_packet_max_length ,null 
+2939 24610000 nrtn positive 
+293a 1840a3fa add temp ,-6 ,rega 
+293b 18c0a406 add contr ,6 ,regb 
+
+ali_mesh_find_adv_ind_packet:
+293c e8408012 ifetcht 1 ,regb 
+293d 18467c01 sub temp ,ad_type_min_length ,null 
+293e 20610000 rtn positive 
+293f 18467c1e sub temp ,ad_type_max_length ,null 
+2940 24610000 nrtn positive 
+2941 18427e00 copy temp ,pdata 
+2942 207a0000 rtn blank 
+2943 4777c03d bpatchx patch3d_7 ,mem_patch3d 
+2944 efe08006 ifetch 1 ,contr 
+2945 c07fac6a beq gap_adtype_manufacturer_specific ,ali_mesh_receive_adtype_manufacturer_specific 
+2946 c0152f3d beq gap_adtype_mesh_message ,ali_mesh_receive_adtype_mesh_message 
+2947 c003ace2 beq gap_adtype_128bit_complete ,ali_mesh_receive_adtype_128bit_uuid_complete 
+2948 1840fe01 add temp ,1 ,pdata 
+2949 9a267c00 isub rega ,null 
+294a 20610000 rtn positive 
+294b 9a40a400 iadd regb ,regb 
+294c 18467fff sub temp ,-1 ,pdata 
+294d 9a20a200 iadd rega ,rega 
+294e 1a227e00 copy rega ,pdata 
+294f 207a0000 rtn blank 
+2950 2020293c branch ali_mesh_find_adv_ind_packet 
+
+mesh_le_send_adv:
+2951 6fe08000 fetch 1 ,mem_le_adv_transmit 
+2952 1fe0fe01 pincrease 1 
+2953 67e08000 store 1 ,mem_le_adv_transmit 
+2954 4778403e bpatchx patch3e_0 ,mem_patch3e 
+2955 20401651 call le_enable 
+2956 df200027 arg 39 ,loopcnt 
+2957 d8c041f5 arg mem_le_txheader ,contr 
+2958 d8a00a97 arg mem_le_txheader_mesh_temp ,contw 
+2959 20407dc7 call memcpy_fast 
+295a 70001625 jam 37 ,mem_le_ch_mapped 
+295b db600708 arg 1800 ,stop_watch 
+295c 7856fc00 disable match 
+
+mesh_le_send_adv_loop:
+295d 20401be4 call le_init_adv 
+295e 2040296d call mesh_le_send_adv_nonconn_ind 
+295f 180a7e00 random pdata 
+2960 d84001ff arg 0x1ff ,temp 
+2961 98417e00 iand temp ,pdata 
+2962 1fe0fe64 add pdata ,100 ,pdata 
+2963 20407d81 call delay 
+2964 6fe08016 fetch 1 ,mem_le_ch_mapped 
+2965 1fe0fe01 pincrease 1 
+2966 67e08016 store 1 ,mem_le_ch_mapped 
+2967 c094295d bne 40 ,mesh_le_send_adv_loop 
+2968 df200027 arg 39 ,loopcnt 
+2969 d8a041f5 arg mem_le_txheader ,contw 
+296a d8c00a97 arg mem_le_txheader_mesh_temp ,contr 
+296b 20407dc7 call memcpy_fast 
+296c 2020165e branch le_disable 
+
+mesh_le_send_adv_nonconn_ind:
+296d d8400002 arg adv_nonconn_ind ,temp 
+296e 6048c1f5 storet 1 ,mem_le_txheader 
+296f 6848c7b1 fetcht 1 ,mem_mesh_adv_data_len 
+2970 1840fe06 add temp ,6 ,pdata 
+2971 67e0c1f6 store 1 ,mem_le_txlen 
+2972 6fe3437a fetch 6 ,mem_le_lap 
+2973 67e341f7 store 6 ,mem_le_txpayload 
+2974 18427200 copy temp ,loopcnt 
+2975 d8c047b2 arg mem_mesh_adv_data ,contr 
+2976 20407dc7 call memcpy_fast 
+2977 202017e2 branch le_transmit_norx 
+
+ali_mesh_base_adt_cache:
+2978 4778c03e bpatchx patch3e_1 ,mem_patch3e 
+2979 68490be1 fetcht 2 ,mem_ccm_data_ptr 
+297a 6fe08be0 fetch 1 ,mem_ccm_data_len 
+297b 18420c00 copy temp ,contr 
+297c da2048f5 arg mem_k4_salt ,rega 
+297d de004905 arg mem_k4_t ,alarm 
+297e 20402bb1 call ali_mesh_encrypt_base_function_aes_cmac 
+297f 20407ec7 call disable_user 
+2980 1a627e00 copy regc ,pdata 
+2981 9e008c00 iadd alarm ,contr 
+2982 684a4905 fetcht 4 ,mem_k4_t 
+2983 6fe10bfd fetch 2 ,mem_mesh_mic_cache_ptr 
+2984 1fe22200 copy pdata ,rega 
+2985 df20000a arg transport_mic_cache_space_num ,loopcnt 
+
+ali_mesh_base_adt_cache_loop:
+2986 efe20011 ifetch 4 ,rega 
+2987 203a2993 branch ali_mesh_base_adt_cache_empty_space ,blank 
+2988 98467c00 isub temp ,null 
+2989 20628000 rtn zero 
+298a 1a20a204 increase transport_mic_cache_space_size ,rega 
+298b c2002986 loop ali_mesh_base_adt_cache_loop 
+298c 6fe10bfd fetch 2 ,mem_mesh_mic_cache_ptr 
+298d 1fe20a00 copy pdata ,contw 
+298e 1fe08c04 add pdata ,transport_mic_cache_space_size ,contr 
+298f df200024 arg transport_mic_cache_total_size ,loopcnt 
+2990 20407dc7 call memcpy_fast 
+2991 e0420005 istoret 4 ,contw 
+2992 20207ec5 branch enable_user 
+
+ali_mesh_base_adt_cache_empty_space:
+2993 e0420011 istoret 4 ,rega 
+2994 20207ec5 branch enable_user 
+
+ali_mesh_chip_peripherals_load_data_from_eep:
+2995 2040299c call ali_mesh_chip_peripherals_load_three_tuple_from_eep 
+2996 204029a0 call ali_mesh_chip_peripherals_load_network_key_from_eep 
+2997 204029a7 call ali_mesh_chip_peripherals_load_application_key_from_eep 
+2998 204029ab call ali_mesh_chip_peripherals_load_device_key_from_eep 
+2999 204029af call ali_mesh_chip_peripherals_load_reset_count_from_eep 
+299a 204029b0 call ali_mesh_chip_peripherals_load_seq_from_eep 
+299b 202029b4 branch ali_mesh_chip_peripherals_load_subscription_from_eep 
+
+ali_mesh_chip_peripherals_load_three_tuple_from_eep:
+299c d840001a arg mesh_eep_three_tuple_length ,temp 
+299d da2049d3 arg mem_mesh_three_tuple_productid ,rega 
+299e da400000 arg mesh_eep_three_tuple_offset ,regb 
+299f 20205e79 branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_network_key_from_eep:
+29a0 d8400013 arg mesh_eep_network_key_length ,temp 
+29a1 da204976 arg mem_mesh_network_key ,rega 
+29a2 da40001a arg mesh_eep_network_key_offset ,regb 
+29a3 20405e79 call iicd_read_eep_data 
+29a4 6fe0c986 fetch 1 ,mem_mesh_last_iv_index_byte 
+29a5 67e0ca31 store 1 ,mem_mesh_iv_index + 3 
+29a6 20600000 rtn 
+
+ali_mesh_chip_peripherals_load_application_key_from_eep:
+29a7 d8400010 arg mesh_eep_application_key_length ,temp 
+29a8 da204b19 arg mem_mesh_application_key ,rega 
+29a9 da40002d arg mesh_eep_application_key_offset ,regb 
+29aa 20205e79 branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_device_key_from_eep:
+29ab d8400010 arg mesh_eep_device_key_length ,temp 
+29ac da204827 arg mem_mesh_device_key ,rega 
+29ad da40003d arg mesh_eep_device_key_offset ,regb 
+29ae 20205e79 branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_reset_count_from_eep:
+29af 20600000 rtn 
+
+ali_mesh_chip_peripherals_load_seq_from_eep:
+29b0 d8400003 arg mesh_eep_seq_length ,temp 
+29b1 da204b52 arg mem_mesh_send_message_seq ,rega 
+29b2 da40004e arg mesh_eep_seq_offset ,regb 
+29b3 20205e79 branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_subscription_from_eep:
+29b4 6fe14a15 fetch 2 ,mem_mesh_core_feature 
+29b5 c3810000 rtnbit1 mesh_feature_disable_subscription 
+29b6 d8400040 arg mesh_eep_subscription_total_length ,temp 
+29b7 da20098e arg mem_mesh_subscription_eep_temp ,rega 
+29b8 da400051 arg mesh_eep_subscription_offset ,regb 
+29b9 20405e79 call iicd_read_eep_data 
+29ba 20402e14 call mesh_get_element_info_config 
+29bb d8c0098e arg mem_mesh_subscription_eep_temp ,contr 
+29bc 1a20a206 add rega ,element_device_subscription_label ,rega 
+
+ali_mesh_chip_peripherals_load_subscription_from_eep_loop:
+29bd 1a220a00 copy rega ,contw 
+29be 20407d7f call memcpy16 
+29bf 1a427e00 copy regb ,pdata 
+29c0 9a20a200 iadd rega ,rega 
+29c1 c20029bd loop ali_mesh_chip_peripherals_load_subscription_from_eep_loop 
+29c2 20600000 rtn 
+
+mesh_receive_config_appkey_add_cb:
+29c3 204029c6 call ali_mesh_chip_peripherals_save_network_key_from_eep 
+29c4 204029ca call ali_mesh_chip_peripherals_save_application_key_from_eep 
+29c5 202029ce branch ali_mesh_chip_peripherals_save_device_key_from_eep 
+
+ali_mesh_chip_peripherals_save_network_key_from_eep:
+29c6 d8400013 arg mesh_eep_network_key_length ,temp 
+29c7 da204976 arg mem_mesh_network_key ,rega 
+29c8 da40001a arg mesh_eep_network_key_offset ,regb 
+29c9 20205e6b branch iicd_write_protect_eep_data 
+
+ali_mesh_chip_peripherals_save_application_key_from_eep:
+29ca d8400010 arg mesh_eep_application_key_length ,temp 
+29cb da204b19 arg mem_mesh_application_key ,rega 
+29cc da40002d arg mesh_eep_application_key_offset ,regb 
+29cd 20205e6b branch iicd_write_protect_eep_data 
+
+ali_mesh_chip_peripherals_save_device_key_from_eep:
+29ce d8400010 arg mesh_eep_device_key_length ,temp 
+29cf da204827 arg mem_mesh_device_key ,rega 
+29d0 da40003d arg mesh_eep_device_key_offset ,regb 
+29d1 20205e6b branch iicd_write_protect_eep_data 
+
+mesh_store_new_seq_data:
+
+ali_mesh_chip_peripherals_save_seq_from_eep:
+29d2 d8400003 arg mesh_eep_seq_length ,temp 
+29d3 da204b52 arg mem_mesh_send_message_seq ,rega 
+29d4 da40004e arg mesh_eep_seq_offset ,regb 
+29d5 20205e6b branch iicd_write_protect_eep_data 
+
+mesh_store_new_subscriptuion_list_data:
+29d6 204029db call ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep 
+29d7 d8400040 arg mesh_eep_subscription_total_length ,temp 
+29d8 da20098e arg mem_mesh_subscription_eep_temp ,rega 
+29d9 da400051 arg mesh_eep_subscription_offset ,regb 
+29da 20205e6b branch iicd_write_protect_eep_data 
+
+ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep:
+29db 20402e14 call mesh_get_element_info_config 
+29dc d8a0098e arg mem_mesh_subscription_eep_temp ,contw 
+29dd 1a20a206 add rega ,element_device_subscription_label ,rega 
+
+ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep_loop:
+29de 1a220c00 copy rega ,contr 
+29df 20407d7f call memcpy16 
+29e0 1a427e00 copy regb ,pdata 
+29e1 9a20a200 iadd rega ,rega 
+29e2 c20029de loop ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep_loop 
+29e3 20600000 rtn 
+
+logging_tx_debug:
+29e4 d8400000 arg logging_debug ,temp 
+29e5 202029ee branch logging_tx_common 
+
+logging_tx_info:
+29e6 d8400001 arg logging_info ,temp 
+29e7 202029ee branch logging_tx_common 
+
+logging_tx_warning:
+29e8 d8400002 arg logging_warning ,temp 
+29e9 202029ee branch logging_tx_common 
+
+logging_tx_error:
+29ea d8400003 arg logging_error ,temp 
+29eb 202029ee branch logging_tx_common 
+
+logging_tx_critical:
+29ec d8400004 arg logging_critical ,temp 
+29ed 202029ee branch logging_tx_common 
+
+logging_tx_common:
+29ee 4779403e bpatchx patch3e_2 ,mem_patch3e 
+29ef 20407d3b call push_stack 
+29f0 6fe0ca15 fetch 1 ,mem_mesh_core_feature 
+29f1 c2807d47 bbit1 mesh_feature_disable_log ,pop_stack 
+29f2 20405fb7 call uartb_prepare_tx_register_push 
+29f3 580000aa setarg lua_log_packet_header 
+29f4 e7e08003 istore 1 ,contwu 
+29f5 58000003 setarg lua_log_pakcet_type 
+29f6 e7e08003 istore 1 ,contwu 
+29f7 1f20fe04 add loopcnt ,4 ,pdata 
+29f8 e7e08003 istore 1 ,contwu 
+29f9 e0410003 istorer temp ,2 ,contwu 
+29fa e2410003 istorer regb ,2 ,contwu 
+29fb 1a220c00 copy rega ,contr 
+29fc 20405fc5 call uart_copy_tx_bytes_fast 
+29fd 580000bb setarg lua_log_packet_trail 
+29fe e7e08003 istore 1 ,contwu 
+29ff 20405fbb call uartb_send_register_pop 
+2a00 20207d47 branch pop_stack 
+
+mesh_uart_init:
+2a01 6fe0ca15 fetch 1 ,mem_mesh_core_feature 
+2a02 c3800000 rtnbit1 mesh_feature_disable_log 
+2a03 70807b0c jam gpcfg_uartb_txd ,core_gpio_conf + 11 
+2a04 70807c4d jam gpcfg_uartb_rxd | gpcfg_pullup ,core_gpio_conf + 12 
+2a05 20402a0c call mesh_uart_init_buffer 
+2a06 d84e1000 arg 921600 ,temp 
+2a07 20405f70 call uartb_calc_baud_rate_config 
+2a08 20405f7d call uart_clock_select_main_freq_crystal 
+2a09 d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+2a0a 60588061 storet 1 ,core_uartb_ctrl 
+2a0b 20600000 rtn 
+
+mesh_uart_init_buffer:
+2a0c 58001c00 setarg mem_mesh_uart_log_rx_buff 
+2a0d 67e1095c store 2 ,mem_pdatatemp 
+2a0e 58001c01 setarg mem_mesh_uart_log_rx_buff_end 
+2a0f e7e10005 istore 2 ,contw 
+2a10 58001c02 setarg mem_mesh_uart_log_tx_buff 
+2a11 e7e10005 istore 2 ,contw 
+2a12 58001fff setarg mem_mesh_uart_log_tx_buff_end 
+2a13 e7e10005 istore 2 ,contw 
+2a14 6fe4095c fetch 8 ,mem_pdatatemp 
+2a15 20205f58 branch uartb_init_dma_mem 
+
+ali_mesh_control_ble_adv_process:
+2a16 20402a26 call ali_mesh_control_ble_adv_tmall_packet 
+2a17 20202a1e branch ali_mesh_control_ble_adv_app_packet 
+
+ali_mesh_control_ble_adv_timer_process:
+2a18 20402a8d call ali_mesh_advertising_unprovisioned_timer_interval_timer 
+2a19 20202a83 branch ali_mesh_advertising_unprovisioned_timer 
+
+ali_mesh_control_ble_advertising_on_advertising:
+2a1a 7047d201 jam device_beacon_on ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2a1b 20600000 rtn 
+
+ali_mesh_control_ble_advertising_off_advertising:
+2a1c 7047d200 jam device_beacon_off ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2a1d 20600000 rtn 
+
+ali_mesh_control_ble_adv_app_packet:
+2a1e da402a22 arg ali_mesh_control_ble_adv_app_packet_paired ,regb 
+2a1f da200015 arg mesh_adv_app_message_interval ,rega 
+2a20 d8e0000d arg mesh_ble_adv_app ,queue 
+2a21 20202a78 branch ali_mesh_chip_timer_check_with_random_timer 
+
+ali_mesh_control_ble_adv_app_packet_paired:
+2a22 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2a23 c1800000 rtnne paired_status 
+2a24 da602a2a arg ali_mesh_control_ble_adv_app_packet_paired_deal ,regc 
+2a25 20202e1f branch ali_mesh_check_all_element_info 
+
+ali_mesh_control_ble_adv_tmall_packet:
+2a26 da402a37 arg ali_mesh_control_ble_adv_tmall_packet_send_package ,regb 
+2a27 da20001d arg mesh_adv_tmall_message_interval ,rega 
+2a28 d8e0000e arg mesh_ble_adv_tmall ,queue 
+2a29 20202a78 branch ali_mesh_chip_timer_check_with_random_timer 
+
+ali_mesh_control_ble_adv_app_packet_paired_deal:
+2a2a 1a208c1a add rega ,element_device_tran_package_type ,contr 
+2a2b efe08006 ifetch 1 ,contr 
+2a2c c4008000 rtnbit0 bit_upper_tran_app_message 
+2a2d 204028d7 call ali_mesh_advertising_bearer_layer_init_queue_param 
+2a2e 204079d2 call queue_get_new_ele 
+2a2f 24740000 nrtn user 
+2a30 6fe08a76 fetch 1 ,mem_mesh_queue_ele_len 
+2a31 1fe0fffe pincrease -2 
+2a32 67e08a76 store 1 ,mem_mesh_queue_ele_len 
+2a33 6fe08a74 fetch 1 ,mem_mesh_queue_ele_duration 
+2a34 79407e07 setflip bit_of_app_package_num ,pdata 
+2a35 e7e08012 istore 1 ,regb 
+2a36 202028e5 branch ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer 
+
+ali_mesh_control_ble_adv_tmall_packet_send_package:
+2a37 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2a38 c0002a3b beq paired_status ,ali_mesh_control_ble_advertising_send_paired_packet 
+2a39 c0012a76 beq pairing_status ,ali_mesh_control_ble_advertising_send_pairing_packet 
+2a3a 20202a65 branch ali_mesh_control_ble_advertising_send_device_beacon_packet 
+
+ali_mesh_control_ble_advertising_send_paired_packet:
+2a3b da602a3d arg ali_mesh_control_ble_advertising_send_paired_packet_deal ,regc 
+2a3c 20202e1f branch ali_mesh_check_all_element_info 
+
+ali_mesh_control_ble_advertising_send_paired_packet_deal:
+2a3d 204028d7 call ali_mesh_advertising_bearer_layer_init_queue_param 
+2a3e 204079d2 call queue_get_new_ele 
+2a3f 24740000 nrtn user 
+2a40 6fe08a74 fetch 1 ,mem_mesh_queue_ele_duration 
+2a41 1fe0ffff pincrease -1 
+2a42 e7e08012 istore 1 ,regb 
+2a43 c2832a58 bbit1 bit_of_adv_in_off ,ali_mesh_control_ble_advertising_send_paired_packet_adv_in_off 
+2a44 1fe17e3f and pdata ,0x3f ,pdata 
+2a45 205a2a5f call ali_mesh_control_ble_advertising_send_paired_packet_end_duration ,blank 
+2a46 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+2a47 1a208c1a add rega ,element_device_tran_package_type ,contr 
+2a48 efe08006 ifetch 1 ,contr 
+2a49 c2812a4f bbit1 bit_uuper_tran_proxy_message ,ali_mesh_control_ble_advertising_send_paired_packet_end_duration_proxy 
+2a4a c4000000 rtnbit0 bit_upper_tran_tmall_message 
+2a4b d8a047b1 arg mem_mesh_adv_data_len ,contw 
+2a4c d8c00a76 arg mem_mesh_queue_ele_len ,contr 
+2a4d 20407d7d call memcpy32 
+2a4e 20202951 branch mesh_le_send_adv 
+
+ali_mesh_control_ble_advertising_send_paired_packet_end_duration_proxy:
+2a4f da200a74 arg mem_mesh_queue_ele_duration ,rega 
+2a50 204079c1 call queue_pop 
+2a51 204079f0 call queue_empty 
+2a52 247a0000 nrtn blank 
+2a53 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+2a54 1a208a16 add rega ,element_device_upper_adv_flag ,contw 
+2a55 58000000 setarg null_packet_advertising 
+2a56 e7e08005 istore 1 ,contw 
+2a57 20202a1c branch ali_mesh_control_ble_advertising_off_advertising 
+
+ali_mesh_control_ble_advertising_send_paired_packet_adv_in_off:
+2a58 1fe17e3f and pdata ,0x3f ,pdata 
+2a59 247a0000 nrtn blank 
+2a5a 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+2a5b 1a208a16 add rega ,element_device_upper_adv_flag ,contw 
+2a5c 58000000 setarg null_packet_advertising 
+2a5d e7e08005 istore 1 ,contw 
+2a5e 202079a5 branch queue_init 
+
+ali_mesh_control_ble_advertising_send_paired_packet_end_duration:
+2a5f da200a74 arg mem_mesh_queue_ele_duration ,rega 
+2a60 204079c1 call queue_pop 
+2a61 204079f0 call queue_empty 
+2a62 247a0000 nrtn blank 
+2a63 700a7454 jam adv_pairing_mesh_message_interval ,mem_mesh_queue_ele_duration 
+2a64 202079aa branch queue_push 
+
+ali_mesh_control_ble_advertising_send_device_beacon_packet:
+2a65 20402c41 call ali_mesh_config_device_uuid_by_three_tuple 
+2a66 20402c4d call ali_mesh_send_unprovisioned_beacons_tmall 
+2a67 20402c5b call ali_mesh_advertising_send_unprovisioned_beacons_gatt 
+2a68 20402a6e call ali_mesh_control_ble_advertising_device_beacon_check_duration 
+2a69 24628000 nrtn zero 
+2a6a 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2a6b c001aa72 beq silence_beacon_status ,ali_mesh_end_advertising_silence_device_beacon_packet 
+2a6c c000aa74 beq unprovisioned_beacon_status ,ali_mesh_end_advertising_unprovisioned_device_beacon_packet 
+2a6d 20600000 rtn 
+
+ali_mesh_control_ble_advertising_device_beacon_check_duration:
+2a6e 6fe0c7d5 fetch 1 ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a6f 1fe0ffff add pdata ,-1 ,pdata 
+2a70 67e0c7d5 store 1 ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a71 20600000 rtn 
+
+ali_mesh_end_advertising_silence_device_beacon_packet:
+2a72 7047d658 jam adv_silence_device_beacon_interval ,mem_mesh_advertising_unprovisioned_device_beacon_interval 
+2a73 20202a1c branch ali_mesh_control_ble_advertising_off_advertising 
+
+ali_mesh_end_advertising_unprovisioned_device_beacon_packet:
+2a74 7047d606 jam adv_unprovisioned_device_beacon_duration ,mem_mesh_advertising_unprovisioned_device_beacon_interval 
+2a75 20202a1c branch ali_mesh_control_ble_advertising_off_advertising 
+
+ali_mesh_control_ble_advertising_send_pairing_packet:
+2a76 20402cc0 call ali_mesh_advertising_timer 
+2a77 20202951 branch mesh_le_send_adv 
+
+ali_mesh_chip_timer_check_with_random_timer:
+2a78 180a7e00 random pdata 
+2a79 1fe17e07 and pdata ,0x07 ,pdata 
+2a7a 9a20a200 iadd rega ,rega 
+
+ali_mesh_chip_timer_check:
+2a7b 6fe0c7d2 fetch 1 ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2a7c c1808000 rtnne device_beacon_on 
+2a7d 20407de9 call timer_check 
+2a7e 247a0000 nrtn blank 
+2a7f 1a227e00 copy rega ,pdata 
+2a80 20407ddb call timer_init 
+2a81 1a427e00 copy regb ,pdata 
+2a82 20207e7a branch callback_func 
+
+ali_mesh_advertising_unprovisioned_timer:
+2a83 da6047d3 arg mem_mesh_advertising_unprovisioned_device_beacon_timer ,regc 
+2a84 da402a86 arg ali_mesh_advertising_unprovisioned_timeout ,regb 
+2a85 20203203 branch timer_single_step_2b 
+
+ali_mesh_advertising_unprovisioned_timeout:
+2a86 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2a87 c1808000 rtnne unprovisioned_beacon_status 
+2a88 6fe0c96e fetch 1 ,mem_mesh_uuid_featureflag 
+2a89 79207e00 set1 bit_silence_adv_flag ,pdata 
+2a8a 67e0c96e store 1 ,mem_mesh_uuid_featureflag 
+2a8b 70496b03 jam silence_beacon_status ,mem_mesh_provisioned_flag 
+2a8c 20202a96 branch ali_mesh_send_silence_device_beacon_init_advertising 
+
+ali_mesh_advertising_unprovisioned_timer_interval_timer:
+2a8d da6047d6 arg mem_mesh_advertising_unprovisioned_device_beacon_interval ,regc 
+2a8e da402a90 arg ali_mesh_advertising_unprovisioned_timer_interval_timeout ,regb 
+2a8f 202031fc branch timer_single_step 
+
+ali_mesh_advertising_unprovisioned_timer_interval_timeout:
+2a90 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2a91 c001aa96 beq silence_beacon_status ,ali_mesh_send_silence_device_beacon_init_advertising 
+2a92 c000aa94 beq unprovisioned_beacon_status ,ali_mesh_send_unprovisioned_device_beacon_init_advertising 
+2a93 20600000 rtn 
+
+ali_mesh_send_unprovisioned_device_beacon_init_advertising:
+2a94 7047d506 jam adv_unprovisioned_device_beacon_duration ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a95 20202a1a branch ali_mesh_control_ble_advertising_on_advertising 
+
+ali_mesh_send_silence_device_beacon_init_advertising:
+2a96 7047d506 jam adv_silence_device_beacon_duration ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a97 20202a1a branch ali_mesh_control_ble_advertising_on_advertising 
+
+ali_mesh_encrypt_calc_random_data:
+2a98 20402a9e call ali_mesh_encrypt_calc_random_data_calc_confirmationkey 
+2a99 20402aa6 call ali_mesh_encrypt_calc_random_data_calc_authvalueprov 
+2a9a 20402aab call ali_mesh_encrypt_calc_random_data_calc_authvaluedevice 
+2a9b 20402ab0 call ali_mesh_encrypt_calc_random_data_calc_confirmationcloud 
+2a9c 20402ab8 call ali_mesh_encrypt_calc_random_data_calc_confirmationdevice 
+2a9d 20202abc branch ali_mesh_encrypt_calc_random_data_calc_devicekey 
+
+ali_mesh_encrypt_calc_random_data_calc_confirmationkey:
+2a9e 20402ac9 call ali_mesh_encrypt_load_randomab_to_sha256 
+2a9f d8c04847 arg mem_mesh_sha256_confirmationkey_ascii ,contr 
+2aa0 df20000f arg 0xf ,loopcnt 
+2aa1 20402b37 call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii 
+2aa2 20402b51 call ali_mesh_encrypt_base_function_sha256_calc 
+2aa3 d8c00900 arg memresult ,contr 
+2aa4 d8a04837 arg mem_mesh_confirmationkey ,contw 
+2aa5 20207d7f branch memcpy16 
+
+ali_mesh_encrypt_calc_random_data_calc_authvalueprov:
+2aa6 20402acc call ali_mesh_encrypt_load_three_tuple_to_sha256 
+2aa7 20402b51 call ali_mesh_encrypt_base_function_sha256_calc 
+2aa8 d8c00900 arg memresult ,contr 
+2aa9 d8a047e7 arg mem_mesh_authvalueprov ,contw 
+2aaa 20207d7f branch memcpy16 
+
+ali_mesh_encrypt_calc_random_data_calc_authvaluedevice:
+2aab 20402acc call ali_mesh_encrypt_load_three_tuple_to_sha256 
+2aac 20402b51 call ali_mesh_encrypt_base_function_sha256_calc 
+2aad d8c00900 arg memresult ,contr 
+2aae d8a04817 arg mem_mesh_authvaluedevice ,contw 
+2aaf 20207d7f branch memcpy16 
+
+ali_mesh_encrypt_calc_random_data_calc_confirmationcloud:
+2ab0 6fe44807 fetch 8 ,mem_mesh_provisioning_random_a 
+2ab1 67e447df store 8 ,mem_mesh_confirmationcloud_randoma 
+2ab2 6fe4480f fetch 8 ,mem_mesh_provisioning_random_b 
+2ab3 67e447d7 store 8 ,mem_mesh_confirmationcloud_randomb 
+2ab4 d8c047d7 arg mem_mesh_calc_confirmationcloud_data ,contr 
+2ab5 da204837 arg mem_mesh_confirmationkey ,rega 
+2ab6 de0047f7 arg mem_mesh_confirmationcloud ,alarm 
+2ab7 20202b9f branch ali_mesh_encrypt_base_function_aes_cmac_32byte 
+
+ali_mesh_encrypt_calc_random_data_calc_confirmationdevice:
+2ab8 d8c04807 arg mem_mesh_calc_confirmationdevice_data ,contr 
+2ab9 da204837 arg mem_mesh_confirmationkey ,rega 
+2aba de004807 arg mem_mesh_confirmationdevice ,alarm 
+2abb 20202b9f branch ali_mesh_encrypt_base_function_aes_cmac_32byte 
+
+ali_mesh_encrypt_calc_random_data_calc_devicekey:
+2abc d8c047f7 arg mem_mesh_confirmationcloud ,contr 
+2abd df200010 arg 0x10 ,loopcnt 
+2abe 20402b34 call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii 
+2abf d8c04860 arg mem_mesh_sha256_devicekey_ascii ,contr 
+2ac0 df200009 arg 9 ,loopcnt 
+2ac1 20402b37 call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii 
+2ac2 20402b51 call ali_mesh_encrypt_base_function_sha256_calc 
+2ac3 d8c00900 arg memresult ,contr 
+2ac4 d8a04827 arg mem_mesh_device_key ,contw 
+2ac5 20207d7f branch memcpy16 
+
+ali_mesh_encrypt_load_randomba_to_sha256:
+2ac6 20402aca call ali_mesh_encrypt_load_randomb_to_sha256 
+
+ali_mesh_encrypt_load_randoma_to_sha256:
+2ac7 d8c04807 arg mem_mesh_provisioning_random_a ,contr 
+2ac8 20202b33 branch ali_mesh_encrypt_base_function_sha256_load_data_64bit 
+
+ali_mesh_encrypt_load_randomab_to_sha256:
+2ac9 20402ac7 call ali_mesh_encrypt_load_randoma_to_sha256 
+
+ali_mesh_encrypt_load_randomb_to_sha256:
+2aca d8c0480f arg mem_mesh_provisioning_random_b ,contr 
+2acb 20202b33 branch ali_mesh_encrypt_base_function_sha256_load_data_64bit 
+
+ali_mesh_encrypt_load_three_tuple_to_sha256:
+2acc d8c049d3 arg mem_mesh_three_tuple_productid ,contr 
+2acd df200004 arg 4 ,loopcnt 
+2ace 20402b3a call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma 
+2acf d8c049d7 arg mem_mesh_three_tuple_mac ,contr 
+2ad0 df200006 arg 6 ,loopcnt 
+2ad1 20402b3a call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma 
+2ad2 d8c049dd arg mem_mesh_three_tuple_secret ,contr 
+2ad3 df200010 arg 0x10 ,loopcnt 
+2ad4 20202b34 branch ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii 
+
+ali_mesh_encrypt_calc_provisioning_data:
+2ad5 20402ae1 call ali_mesh_encrypt_calc_provisioning_data_calc_sessionkey 
+
+ali_mesh_encrypt_calc_provisioning_data_xor_prov_data:
+2ad6 da204973 arg mem_mesh_encrypt_provisioning_data ,rega 
+2ad7 da400900 arg memresult ,regb 
+2ad8 df20000b arg 0xb ,loopcnt 
+
+ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop:
+2ad9 efe10011 ifetch 2 ,rega 
+2ada e8410012 ifetcht 2 ,regb 
+2adb 9842fe00 ixor temp ,pdata 
+2adc e7e10011 istore 2 ,rega 
+2add 1a20a202 increase 2 ,rega 
+2ade 1a40a402 increase 2 ,regb 
+2adf c2002ad9 loop ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop 
+2ae0 20600000 rtn 
+
+ali_mesh_encrypt_calc_provisioning_data_calc_sessionkey:
+2ae1 d8c047f7 arg mem_mesh_confirmationcloud ,contr 
+2ae2 df200010 arg 0x10 ,loopcnt 
+2ae3 20402b34 call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii 
+2ae4 d8c04856 arg mem_mesh_sha256_sessionkey_ascii ,contr 
+2ae5 df20000a arg 0xa ,loopcnt 
+2ae6 20402b37 call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii 
+2ae7 20202b51 branch ali_mesh_encrypt_base_function_sha256_calc 
+
+ali_mesh_encrypt_calc_network_key_by_k2:
+2ae8 d8c04976 arg mem_mesh_network_key ,contr 
+2ae9 d8a04894 arg mem_k2_n ,contw 
+2aea 20407d7f call memcpy16 
+
+ali_mesh_encrypt_base_function_k2:
+2aeb d8c04894 arg mem_k2_n ,contr 
+2aec da2048a4 arg mem_k2_salt ,rega 
+2aed de0048b4 arg mem_k2_t ,alarm 
+2aee 20402ba1 call ali_mesh_encrypt_base_function_aes_cmac_16byte 
+2aef de0048c4 arg mem_k2_t1 ,alarm 
+2af0 da400001 arg 0x01 ,regb 
+2af1 58000000 setarg 0 
+2af2 20402ba3 call ali_mesh_encrypt_base_function_k2_aes_cmac_t 
+2af3 6fe0c8d3 fetch 1 ,mem_k2_t1 + 15 
+2af4 1fe17e7f and pdata ,0x7f ,pdata 
+2af5 67e0c8d4 store 1 ,mem_k2_nid 
+2af6 de0048e5 arg mem_k2_t2 ,alarm 
+2af7 da400002 arg 0x02 ,regb 
+2af8 58000010 setarg 0x10 
+2af9 da2048c4 arg mem_k2_t1 ,rega 
+2afa 20402ba3 call ali_mesh_encrypt_base_function_k2_aes_cmac_t 
+2afb de0048d5 arg mem_k2_t3 ,alarm 
+2afc da400003 arg 0x03 ,regb 
+2afd 58000010 setarg 0x10 
+2afe da2048e5 arg mem_k2_t2 ,rega 
+2aff 20202ba3 branch ali_mesh_encrypt_base_function_k2_aes_cmac_t 
+
+ali_mesh_encrypt_base_function_k4:
+2b00 d8c04b19 arg mem_mesh_application_key ,contr 
+2b01 da2048f5 arg mem_k4_salt ,rega 
+2b02 de004905 arg mem_k4_t ,alarm 
+2b03 20402ba1 call ali_mesh_encrypt_base_function_aes_cmac_16byte 
+2b04 d8c04915 arg mem_k4_id6_01 ,contr 
+2b05 da204905 arg mem_k4_t ,rega 
+2b06 de004925 arg mem_k4_k4n ,alarm 
+2b07 58000004 setarg 4 
+2b08 20402bb1 call ali_mesh_encrypt_base_function_aes_cmac 
+2b09 6fe0c934 fetch 1 ,mem_k4_k4n + 15 
+2b0a 1fe17e3f and pdata ,0x3f ,pdata 
+2b0b 79207e06 set1 transport_head_bit_akf ,pdata 
+2b0c 67e0c935 store 1 ,mem_mesh_transport_aid 
+2b0d 20600000 rtn 
+
+ali_mesh_encrypt_base_function_k3:
+2b0e d8c04976 arg mem_mesh_network_key ,contr 
+2b0f da204936 arg mem_k3_salt ,rega 
+2b10 de004946 arg mem_k3_t ,alarm 
+2b11 20402ba1 call ali_mesh_encrypt_base_function_aes_cmac_16byte 
+2b12 d8c04956 arg mem_k3_id64_01 ,contr 
+2b13 da204946 arg mem_k3_t ,rega 
+2b14 de00495b arg mem_k3_k4n ,alarm 
+2b15 58000005 setarg 5 
+2b16 20402bb1 call ali_mesh_encrypt_base_function_aes_cmac 
+2b17 20402ff3 call ali_mesh_proxy_init_adv 
+2b18 6fe1478f fetch 2 ,mem_ui_state_map 
+2b19 c3848000 rtnbit1 ui_state_ble_connected 
+2b1a 70442701 jam 1 ,mem_le_adv_enable 
+2b1b 20600000 rtn 
+
+ali_mesh_encrypt_obfuscation_deceypt_send_message:
+2b1c da204b59 arg mem_mesh_send_upper_layer_ctl_and_ttl ,rega 
+2b1d 6fe3cb5f fetch 7 ,mem_mesh_send_upper_layer_dst 
+2b1e 20202b21 branch ali_mesh_encrypt_obfuscation_deceypt 
+
+ali_mesh_encrypt_obfuscation_deceypt_recevie_message:
+2b1f da200c0c arg mem_mesh_message_ttl ,rega 
+2b20 6fe38c12 fetch 7 ,mem_mesh_message_dst 
+
+ali_mesh_encrypt_obfuscation_deceypt:
+2b21 67e38bc7 store 7 ,mem_mesh_privacy_plaintext_privacy_random 
+2b22 58000000 setarg 0 
+2b23 67e28bbe store 5 ,mem_mesh_privacy_plaintext_zero_string 
+2b24 20402b2a call ali_mesh_encrypt_generate_pecb 
+2b25 6fe30bce fetch 6 ,mem_mesh_pecb 
+2b26 e8430011 ifetcht 6 ,rega 
+2b27 9842fe00 ixor temp ,pdata 
+2b28 e7e30011 istore 6 ,rega 
+2b29 20600000 rtn 
+
+ali_mesh_encrypt_generate_pecb:
+
+ali_mesh_encrypt_generate_privacy_random:
+2b2a 6fe24a2e fetch 4 ,mem_mesh_iv_index 
+2b2b 67e20bc3 store 4 ,mem_mesh_privacy_plaintext_iv_index 
+
+ali_mesh_encrypt_base_function_generate_pecb:
+2b2c d8c048d5 arg mem_k2_privacykey ,contr 
+2b2d 20406e26 call load_key 
+2b2e d8c00bbe arg mem_mesh_privacy_plaintext ,contr 
+2b2f 20406e28 call load_data128 
+2b30 20406dc1 call do_aes_ocb 
+2b31 d8a00bce arg mem_mesh_pecb ,contw 
+2b32 20206e3c branch store_aes_result 
+
+ali_mesh_encrypt_base_function_sha256_load_data_64bit:
+2b33 df200008 arg 8 ,loopcnt 
+
+ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii:
+2b34 20402b41 call ali_mesh_encrypt_base_function_sha256_check_first_load_data 
+2b35 20402b90 call ali_mesh_encrypt_base_function_hex2ascii 
+2b36 20202b3e branch ali_mesh_encrypt_base_function_sha256_store_dataptr 
+
+ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii:
+2b37 20402b41 call ali_mesh_encrypt_base_function_sha256_check_first_load_data 
+2b38 20407dd4 call memcpy 
+2b39 20202b3e branch ali_mesh_encrypt_base_function_sha256_store_dataptr 
+
+ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma:
+2b3a 20402b41 call ali_mesh_encrypt_base_function_sha256_check_first_load_data 
+2b3b 20402b90 call ali_mesh_encrypt_base_function_hex2ascii 
+2b3c 5800002c setarg comma 
+2b3d e7e08005 istore 1 ,contw 
+
+ali_mesh_encrypt_base_function_sha256_store_dataptr:
+2b3e 18a27e00 copy contw ,pdata 
+2b3f 67e1487a store 2 ,mem_mesh_sha256_data_end_addr 
+2b40 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_check_first_load_data:
+2b41 18c20400 copy contr ,temp 
+2b42 1f222200 copy loopcnt ,rega 
+2b43 6fe1487a fetch 2 ,mem_mesh_sha256_data_end_addr 
+2b44 1fe20a00 copy pdata ,contw 
+2b45 6fe0c869 fetch 1 ,mem_mesh_sha256_load_first_data_flag 
+2b46 205a2b4a call ali_mesh_encrypt_base_function_sha256_first_load_data ,blank 
+2b47 18420c00 copy temp ,contr 
+2b48 1a227200 copy rega ,loopcnt 
+2b49 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_first_load_data:
+2b4a 70486901 jam 1 ,mem_mesh_sha256_load_first_data_flag 
+2b4b 20402b4e call ali_mesh_encrypt_base_function_sha256_clear_data_chunk 
+2b4c d8a00abe arg mem_mesh_sha256_chunk_start ,contw 
+2b4d 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_clear_data_chunk:
+2b4e df200020 arg 0x20 ,loopcnt 
+2b4f d8a00abe arg mem_mesh_sha256_chunk_start ,contw 
+2b50 20207d8c branch memset0 
+
+ali_mesh_encrypt_base_function_sha256_calc:
+2b51 20402b6e call ali_mesh_encrypt_base_function_sha256_load_data_end 
+2b52 da400010 arg mesh_encrypt_sha256_function_input ,regb 
+2b53 da200abe arg mem_mesh_sha256_chunk_start ,rega 
+2b54 6f24486a fetchr loopcnt ,8 ,mem_mesh_sha256_data_len_byte 
+2b55 204029e4 call logging_tx_debug 
+2b56 20402b89 call ali_mesh_encrypt_base_function_sha256_input_data_init_inverse 
+2b57 58000abe setarg mem_mesh_sha256_chunk_start 
+2b58 67e14881 store 2 ,mem_mesh_sha256_chunk_ptr 
+2b59 20407306 call sha_init 
+
+ali_mesh_encrypt_base_function_sha256_calc_loop:
+2b5a 6fe14881 fetch 2 ,mem_mesh_sha256_chunk_ptr 
+2b5b 1fe20c00 copy pdata ,contr 
+2b5c d8a004a8 arg memdat ,contw 
+2b5d 20407d72 call memcpy64 
+2b5e 2040730d call sha 
+2b5f 6fe14881 fetch 2 ,mem_mesh_sha256_chunk_ptr 
+2b60 1fe0fe40 pincrease 64 
+2b61 67e14881 store 2 ,mem_mesh_sha256_chunk_ptr 
+2b62 6fe0c87e fetch 1 ,mem_mesh_sha256_chunk_count 
+2b63 1fe0ffff pincrease -1 
+2b64 67e0c87e store 1 ,mem_mesh_sha256_chunk_count 
+2b65 243a2b5a nbranch ali_mesh_encrypt_base_function_sha256_calc_loop ,blank 
+2b66 20407349 call sha_result 
+2b67 da200900 arg memresult ,rega 
+2b68 df200020 arg 0x20 ,loopcnt 
+2b69 20407dac call inverse_data 
+2b6a da400011 arg mesh_encrypt_sha256_function_result ,regb 
+2b6b da200900 arg memresult ,rega 
+2b6c df200020 arg 0x20 ,loopcnt 
+2b6d 202029e4 branch logging_tx_debug 
+
+ali_mesh_encrypt_base_function_sha256_load_data_end:
+2b6e 70486900 jam 0 ,mem_mesh_sha256_load_first_data_flag 
+2b6f 6fe1487a fetch 2 ,mem_mesh_sha256_data_end_addr 
+2b70 1fe20a00 copy pdata ,contw 
+2b71 d8400080 arg 0x80 ,temp 
+2b72 e0408005 istoret 1 ,contw 
+2b73 d8400abe arg mem_mesh_sha256_chunk_start ,temp 
+2b74 98467e00 isub temp ,pdata 
+2b75 67e4486a store 8 ,mem_mesh_sha256_data_len_byte 
+2b76 1fe98400 lshift3 pdata ,temp 
+2b77 604c4872 storet 8 ,mem_mesh_sha256_data_len_bit 
+2b78 1ff1a600 rshift4 pdata ,regc 
+2b79 1a6b2600 rshift2 regc ,regc 
+2b7a 1fe17e3f and pdata ,0x3f ,pdata 
+2b7b 1fe67c37 sub pdata ,55 ,null 
+2b7c 24412b87 ncall ali_mesh_encrypt_base_function_sha256_add_chunk ,positive 
+2b7d 1a60fe01 add regc ,1 ,pdata 
+2b7e 67e0c87e store 1 ,mem_mesh_sha256_chunk_count 
+2b7f 1fefa240 mul32 pdata ,64 ,rega 
+2b80 1ff22600 lshift4 pdata ,regc 
+2b81 1a60a7ff increase -1 ,regc 
+2b82 58000aba setarg mem_mesh_sha256_chunk_start + decreased_four 
+2b83 9a20a200 iadd rega ,rega 
+2b84 6fe24872 fetch 4 ,mem_mesh_sha256_data_len_bit 
+2b85 e7e20011 istore 4 ,rega 
+2b86 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_add_chunk:
+2b87 1a60a601 increase 1 ,regc 
+2b88 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_input_data_init_inverse:
+2b89 da200abe arg mem_mesh_sha256_chunk_start ,rega 
+
+ali_mesh_encrypt_base_function_sha256_data_inverse_4byte:
+2b8a df200004 arg 4 ,loopcnt 
+2b8b 20407dac call inverse_data 
+2b8c 1a20a202 increase 2 ,rega 
+2b8d 1a60a7ff add regc ,-1 ,regc 
+2b8e 2422ab8a nbranch ali_mesh_encrypt_base_function_sha256_data_inverse_4byte ,zero 
+2b8f 20600000 rtn 
+
+ali_mesh_encrypt_base_function_hex2ascii:
+2b90 efe08006 ifetch 1 ,contr 
+2b91 1ff18400 rshift4 pdata ,temp 
+2b92 20402b99 call ali_mesh_encrypt_base_function_dialog2uchar 
+2b93 e0408005 istoret 1 ,contw 
+2b94 1fe1040f and pdata ,0x0f ,temp 
+2b95 20402b99 call ali_mesh_encrypt_base_function_dialog2uchar 
+2b96 e0408005 istoret 1 ,contw 
+2b97 c2002b90 loop ali_mesh_encrypt_base_function_hex2ascii 
+2b98 20600000 rtn 
+
+ali_mesh_encrypt_base_function_dialog2uchar:
+2b99 18467c09 sub temp ,9 ,null 
+2b9a 20212b9d branch ali_mesh_encrypt_base_function_dialog2uchar_num ,positive 
+2b9b 18408457 add temp ,87 ,temp 
+2b9c 20600000 rtn 
+
+ali_mesh_encrypt_base_function_dialog2uchar_num:
+2b9d 18408430 add temp ,48 ,temp 
+2b9e 20600000 rtn 
+
+ali_mesh_encrypt_base_function_aes_cmac_32byte:
+2b9f 58000020 setarg 0x20 
+2ba0 20202bb1 branch ali_mesh_encrypt_base_function_aes_cmac 
+
+ali_mesh_encrypt_base_function_aes_cmac_16byte:
+2ba1 58000010 setarg 0x10 
+2ba2 20202bb1 branch ali_mesh_encrypt_base_function_aes_cmac 
+
+ali_mesh_encrypt_base_function_k2_aes_cmac_t:
+2ba3 6848c883 fetcht 1 ,mem_k2_p_len 
+2ba4 18408401 increase 1 ,temp 
+2ba5 98408400 iadd temp ,temp 
+2ba6 604884a7 storet 1 ,mem_aes_cmac_data_length 
+2ba7 1a220c00 copy rega ,contr 
+2ba8 1fe27200 copy pdata ,loopcnt 
+2ba9 20407dc7 call memcpy_fast 
+2baa 6848c883 fetcht 1 ,mem_k2_p_len 
+2bab 18427200 copy temp ,loopcnt 
+2bac 20407dd4 call memcpy 
+2bad 1a427e00 copy regb ,pdata 
+2bae e7e08005 istore 1 ,contw 
+2baf da2048b4 arg mem_k2_t ,rega 
+2bb0 20202bb4 branch ali_mesh_encrypt_base_function_aes_cmac + 3 
+
+ali_mesh_encrypt_base_function_aes_cmac:
+2bb1 67e084a7 store 1 ,mem_aes_cmac_data_length 
+2bb2 1fe27200 copy pdata ,loopcnt 
+2bb3 20407dc7 call memcpy_fast 
+2bb4 1a220c00 copy rega ,contr 
+2bb5 d8a0098e arg mem_aes_cmac_k ,contw 
+2bb6 20407d7f call memcpy16 
+2bb7 da400012 arg mesh_encrypt_aes_cmac_function_input_m ,regb 
+2bb8 da2004a8 arg memdat ,rega 
+2bb9 6f2084a7 fetchr loopcnt ,1 ,mem_aes_cmac_data_length 
+2bba 204029e4 call logging_tx_debug 
+2bbb da400013 arg mesh_encrypt_aes_cmac_function_input_k ,regb 
+2bbc da20098e arg mem_aes_cmac_k ,rega 
+2bbd df200010 arg 16 ,loopcnt 
+2bbe 204029e4 call logging_tx_debug 
+2bbf 20406aee call function_aes_cmac 
+2bc0 1e020a00 copy alarm ,contw 
+2bc1 20406e3c call store_aes_result 
+2bc2 da400014 arg mesh_encrypt_aes_cmac_function_result ,regb 
+2bc3 1e022200 copy alarm ,rega 
+2bc4 df200010 arg 16 ,loopcnt 
+2bc5 202029e4 branch logging_tx_debug 
+
+ali_b0_block_generate:
+2bc6 68488beb fetcht 1 ,mem_ccm_type 
+2bc7 20202bc9 branch ali_block_generate 
+
+ali_a_block_generate:
+2bc8 18000401 force 0x01 ,temp 
+
+ali_block_generate:
+2bc9 18007000 force regidx_data ,regext_index 
+2bca 6fe10bde fetch 2 ,mem_nonce_ptr 
+2bcb 1fe20c00 copy pdata ,contr 
+2bcc efe18006 ifetch 3 ,contr 
+2bcd 1fed7e00 lshift8 pdata ,pdata 
+2bce 9841de00 ior temp ,regext 
+2bcf 1f00f001 increase 1 ,regext_index 
+2bd0 efe20006 ifetch 4 ,contr 
+2bd1 1fe25e00 copy pdata ,regext 
+2bd2 1f00f001 increase 1 ,regext_index 
+2bd3 efe20006 ifetch 4 ,contr 
+2bd4 1fe25e00 copy pdata ,regext 
+2bd5 1f00f001 increase 1 ,regext_index 
+2bd6 1a30de00 byteswap rega ,regext 
+2bd7 1df05e00 lshift16 regext ,regext 
+2bd8 efe10006 ifetch 2 ,contr 
+2bd9 9de1de00 ior regext ,regext 
+2bda 20600000 rtn 
+
+ali_generate_mic:
+2bdb 6fe08be0 fetch 1 ,mem_ccm_data_len 
+2bdc 1fe22200 copy pdata ,rega 
+2bdd 20402bc6 call ali_b0_block_generate 
+2bde 20406dc1 call do_aes_ocb 
+2bdf 1800700c force regidx_result ,regext_index 
+2be0 1de27e00 deposit regext 
+2be1 1a227200 copy rega ,loopcnt 
+2be2 68490be1 fetcht 2 ,mem_ccm_data_ptr 
+2be3 18420c00 copy temp ,contr 
+2be4 20406e10 call padding_data 
+2be5 20206cf0 branch generate_mic_loop 
+
+ali_ccm_encrypt_64bit:
+2be6 700beb19 jam mic_size_64bit ,mem_ccm_type 
+2be7 20202bea branch ali_ccm_encrypt_function 
+
+ali_ccm_encrypt:
+2be8 700beb09 jam mic_size_32bit ,mem_ccm_type 
+2be9 20202bea branch ali_ccm_encrypt_function 
+
+ali_ccm_encrypt_function:
+2bea 67e08be0 store 1 ,mem_ccm_data_len 
+2beb 60490be1 storet 2 ,mem_ccm_data_ptr 
+2bec 4779c03e bpatchx patch3e_3 ,mem_patch3e 
+2bed 20402bdb call ali_generate_mic 
+2bee 18007008 force regidx_xor ,regext_index 
+2bef 98005e00 iforce regext 
+2bf0 1800700d force regidx_result + 1 ,regext_index 
+2bf1 1de27e00 copy regext ,pdata 
+2bf2 18007009 force regidx_xor + 1 ,regext_index 
+2bf3 98005e00 iforce regext 
+2bf4 18002200 force 0 ,rega 
+2bf5 18422600 copy temp ,regc 
+2bf6 20402bc8 call ali_a_block_generate 
+2bf7 20406dc7 call do_aes_ctr 
+2bf8 20402c29 call ali_fetcht_ccm_mic 
+2bf9 604c0be3 storet 8 ,mem_ccm_mic 
+2bfa 6fe08be0 fetch 1 ,mem_ccm_data_len 
+2bfb 1fe22400 copy pdata ,regb 
+2bfc 20402c31 call ali_aes_crypt_data 
+2bfd 68488be0 fetcht 1 ,mem_ccm_data_len 
+2bfe 6fe10be1 fetch 2 ,mem_ccm_data_ptr 
+2bff 9840a200 iadd temp ,rega 
+2c00 684c0be3 fetcht 8 ,mem_ccm_mic 
+2c01 e0420011 istoret 4 ,rega 
+2c02 6fe08beb fetch 1 ,mem_ccm_type 
+2c03 1fe67e09 sub pdata ,mic_size_32bit ,pdata 
+2c04 207a0000 rtn blank 
+2c05 e0440011 istoret 8 ,rega 
+2c06 20600000 rtn 
+
+ali_ccm_decrypt_64bit:
+2c07 700beb19 jam mic_size_64bit ,mem_ccm_type 
+2c08 20202c0b branch ali_ccm_decrypt_function 
+
+ali_ccm_decrypt:
+2c09 700beb09 jam mic_size_32bit ,mem_ccm_type 
+2c0a 20202c0b branch ali_ccm_decrypt_function 
+
+ali_ccm_decrypt_function:
+2c0b 67e08be0 store 1 ,mem_ccm_data_len 
+2c0c 60490be1 storet 2 ,mem_ccm_data_ptr 
+2c0d 18422600 copy temp ,regc 
+2c0e 1fe22400 copy pdata ,regb 
+2c0f 9a608c00 iadd regc ,contr 
+2c10 477a403e bpatchx patch3e_4 ,mem_patch3e 
+2c11 efe40006 ifetch 8 ,contr 
+2c12 18007008 force regidx_xor ,regext_index 
+2c13 98005e00 iforce regext 
+2c14 18007009 force regidx_xor + 1 ,regext_index 
+2c15 1fef7e00 rshift32 pdata ,pdata 
+2c16 98005e00 iforce regext 
+2c17 18002200 force 0 ,rega 
+2c18 20402bc8 call ali_a_block_generate 
+2c19 20406dc7 call do_aes_ctr 
+2c1a 20402c29 call ali_fetcht_ccm_mic 
+2c1b 604c0be3 storet 8 ,mem_ccm_mic 
+2c1c 20402c31 call ali_aes_crypt_data 
+2c1d 20402bdb call ali_generate_mic 
+2c1e 20402c29 call ali_fetcht_ccm_mic 
+2c1f 6fe08beb fetch 1 ,mem_ccm_type 
+2c20 c00cac26 beq mic_size_64bit ,ali_ccm_decrypt_function_check_mic64 
+2c21 604a0be7 storet 4 ,mem_ccm_mic + 4 
+2c22 6fe20be3 fetch 4 ,mem_ccm_mic 
+2c23 684a0be7 fetcht 4 ,mem_ccm_mic + 4 
+2c24 98467e00 isub temp ,pdata 
+2c25 20600000 rtn 
+
+ali_ccm_decrypt_function_check_mic64:
+2c26 6fe40be3 fetch 8 ,mem_ccm_mic 
+2c27 98467e00 isub temp ,pdata 
+2c28 20600000 rtn 
+
+ali_fetcht_ccm_mic:
+2c29 1800700c force regidx_result ,regext_index 
+2c2a 1de27e00 deposit regext 
+2c2b 1800700d force regidx_result + 1 ,regext_index 
+2c2c 1de20400 copy regext ,temp 
+2c2d 18500400 lshift16 temp ,temp 
+2c2e 18500400 lshift16 temp ,temp 
+2c2f 98418400 ior temp ,temp 
+2c30 20600000 rtn 
+
+ali_aes_crypt_data:
+2c31 1a20a201 increase 1 ,rega 
+2c32 20402bc8 call ali_a_block_generate 
+2c33 1a620c00 copy regc ,contr 
+2c34 20406e24 call aes_load_xor 
+2c35 20406dc7 call do_aes_ctr 
+2c36 20406e43 call store_enc_data 
+2c37 1a60a610 increase 16 ,regc 
+2c38 1a40a5f0 increase -16 ,regb 
+2c39 20212c31 branch ali_aes_crypt_data ,positive 
+2c3a 20600000 rtn 
+
+mesh_send_unprovisioned_beacons:
+2c3b 70496b01 jam unprovisioned_beacon_status ,mem_mesh_provisioned_flag 
+2c3c 70496c00 jam 0x00 ,mem_mesh_provisioning_state_flag 
+2c3d 7047d201 jam 1 ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2c3e 58001770 setarg adv_unprovisioned_device_beacon_timeout 
+2c3f 67e147d3 store 2 ,mem_mesh_advertising_unprovisioned_device_beacon_timer 
+2c40 20600000 rtn 
+
+ali_mesh_config_device_uuid_by_three_tuple:
+2c41 580001a8 setarg company_identifiers_alibaba 
+2c42 67e10bec store 2 ,mem_mesh_device_uuid 
+2c43 6fe0c96d fetch 1 ,mem_mesh_device_pid 
+2c44 e7e08005 istore 1 ,contw 
+2c45 6fe249d3 fetch 4 ,mem_mesh_three_tuple_productid 
+2c46 20407dc1 call inverse_data_4byte 
+2c47 e7e20005 istore 4 ,contw 
+2c48 6fe3437a fetch 6 ,mem_le_lap 
+2c49 e7e30005 istore 6 ,contw 
+2c4a 6fe1c96e fetch 3 ,mem_mesh_uuid_featureflag 
+2c4b e7e18005 istore 3 ,contw 
+2c4c 20600000 rtn 
+
+ali_mesh_send_unprovisioned_beacons_tmall:
+2c4d 20402c4f call ali_mesh_init_adv_data_tmall_unprovisioned_beacons_package 
+2c4e 20202951 branch mesh_le_send_adv 
+
+ali_mesh_init_adv_data_tmall_unprovisioned_beacons_package:
+2c4f 7047b115 jam 0x15 ,mem_mesh_adv_data_len 
+2c50 58000014 setarg 0x14 
+2c51 67e0c7b2 store 1 ,mem_mesh_adv_data 
+2c52 5800002b setarg gap_adtype_mesh_beacon 
+2c53 e7e08005 istore 1 ,contw 
+2c54 58000000 setarg unprovisioned_device_beacon 
+2c55 e7e08005 istore 1 ,contw 
+
+ali_mesh_advertising_send_unprovisioned_beacons_store_device_uuid:
+2c56 d8c00bec arg mem_mesh_device_uuid ,contr 
+2c57 20407d7f call memcpy16 
+2c58 6fe14971 fetch 2 ,mem_mesh_oob_information 
+2c59 e7e10005 istore 2 ,contw 
+2c5a 20600000 rtn 
+
+ali_mesh_advertising_send_unprovisioned_beacons_gatt:
+2c5b 6fe0ca15 fetch 1 ,mem_mesh_core_feature 
+2c5c c3818000 rtnbit1 mesh_feature_disable_app_pairing 
+2c5d 20402c5f call ali_mesh_init_adv_data_gatt_unprovisioned_beacons_package 
+2c5e 20202951 branch mesh_le_send_adv 
+
+ali_mesh_init_adv_data_gatt_unprovisioned_beacons_package:
+2c5f 7047b11d jam 0x1d ,mem_mesh_adv_data_len 
+2c60 2040290a call ali_mesh_advertising_add_adtype_flags 
+2c61 20402912 call ali_mesh_advertising_add_adtype_16bit_complete 
+2c62 20402c64 call ali_mesh_advertising_add_adtype_service_data 
+2c63 20202c56 branch ali_mesh_advertising_send_unprovisioned_beacons_store_device_uuid 
+
+ali_mesh_advertising_add_adtype_service_data:
+2c64 58000015 setarg 0x15 
+2c65 e7e08005 istore 1 ,contw 
+2c66 58000016 setarg gap_adtype_service_data 
+2c67 e7e08005 istore 1 ,contw 
+2c68 e0410005 istoret 2 ,contw 
+2c69 20600000 rtn 
+
+ali_mesh_receive_adtype_manufacturer_specific:
+2c6a 1840f3ff add temp ,-1 ,loopcnt 
+2c6b 20402d2e call ali_mesh_receive_provisioning_package_check_header 
+2c6c 24740000 nrtn user 
+2c6d efe08006 ifetch 1 ,contr 
+2c6e c0002c72 beq provisioning_random ,ali_mesh_advertising_receive_privisioning_random 
+2c6f c0012c8d beq provisioning_data ,ali_mesh_advertising_receive_privisioning_data 
+2c70 c0032cac beq provisioning_ios_data ,ali_mesh_advertising_receive_privisioning_ios_data 
+2c71 20600000 rtn 
+
+ali_mesh_advertising_receive_privisioning_random:
+2c72 20402c7f call ali_mesh_advertising_receive_privisioning_random_check_states 
+2c73 24740000 nrtn user 
+
+ali_mesh_advertising_calc_encrypt_random_data:
+2c74 20402a98 call ali_mesh_encrypt_calc_random_data 
+2c75 20402c77 call ali_mesh_advertising_send_provisioning_confirmation 
+2c76 20202cd6 branch loggint_tx_info_send_confirmation_packet 
+
+ali_mesh_advertising_send_provisioning_confirmation:
+2c77 d8400012 arg provisioning_packet_confirmation_mac + provisioning_packet_confirmation_device ,temp 
+2c78 20402cae call ali_mesh_advertising_send_packet_common 
+2c79 58000001 setarg provisioning_confirmation 
+2c7a e7e08005 istore 1 ,contw 
+2c7b 6fe149db fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2c7c e7e10005 istore 2 ,contw 
+2c7d d8c04807 arg mem_mesh_confirmationdevice ,contr 
+2c7e 20207d7f branch memcpy16 
+
+ali_mesh_advertising_receive_privisioning_random_check_states:
+2c7f 20407ec7 call disable_user 
+2c80 e8410006 ifetcht 2 ,contr 
+2c81 d8a04807 arg mem_mesh_provisioning_random_a ,contw 
+2c82 20407d7f call memcpy16 
+2c83 6fe149db fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2c84 98467c00 isub temp ,null 
+2c85 24628000 nrtn zero 
+2c86 6fe0c96c fetch 1 ,mem_mesh_provisioning_state_flag 
+2c87 c3808000 rtnbit1 receive_provisioning_random 
+2c88 79207e01 set1 receive_provisioning_random ,pdata 
+2c89 67e0c96c store 1 ,mem_mesh_provisioning_state_flag 
+2c8a 70496b02 jam pairing_status ,mem_mesh_provisioned_flag 
+2c8b 20402cd2 call loggint_tx_info_receive_random_packet 
+2c8c 20207ec5 branch enable_user 
+
+ali_mesh_advertising_receive_privisioning_data:
+2c8d 18c22200 copy contr ,rega 
+2c8e 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2c8f c1000000 rtneq paired_status 
+2c90 6fe0c96c fetch 1 ,mem_mesh_provisioning_state_flag 
+2c91 c4008000 rtnbit0 receive_provisioning_random 
+2c92 c3810000 rtnbit1 receive_provisioning_data 
+2c93 1a220c00 copy rega ,contr 
+2c94 df200016 arg 0x16 ,loopcnt 
+2c95 d8a04973 arg mem_mesh_encrypt_provisioning_data ,contw 
+2c96 20407dd4 call memcpy 
+2c97 20402ad5 call ali_mesh_encrypt_calc_provisioning_data 
+2c98 68494973 fetcht 2 ,mem_mesh_provisioning_data_mac_addr 
+2c99 6fe149db fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2c9a 98467c00 isub temp ,null 
+2c9b 24628000 nrtn zero 
+
+ali_mesh_resolve_privisioning_data_package:
+2c9c 20402cda call loggint_tx_info_receive_data_packet 
+2c9d 6fe0c96c fetch 1 ,mem_mesh_provisioning_state_flag 
+2c9e 79207e02 set1 receive_provisioning_data ,pdata 
+2c9f 67e0c96c store 1 ,mem_mesh_provisioning_state_flag 
+2ca0 20402ae8 call ali_mesh_encrypt_calc_network_key_by_k2 
+2ca1 6fe0c986 fetch 1 ,mem_mesh_last_iv_index_byte 
+2ca2 67e0ca31 store 1 ,mem_mesh_iv_index + 3 
+2ca3 20402ca5 call ali_mesh_advertising_send_provisioning_complete 
+2ca4 20202cde branch loggint_tx_info_send_complete_packet 
+
+ali_mesh_advertising_send_provisioning_complete:
+2ca5 d8400006 arg provisioning_packet_complete_mac ,temp 
+2ca6 20402cae call ali_mesh_advertising_send_packet_common 
+2ca7 58000003 setarg provisioning_complete 
+2ca8 e7e08005 istore 1 ,contw 
+2ca9 6fe349d7 fetch 6 ,mem_mesh_three_tuple_mac 
+2caa e7e30005 istore 6 ,contw 
+2cab 20600000 rtn 
+
+ali_mesh_advertising_receive_privisioning_ios_data:
+2cac da400012 arg max_length_privisioning_control_msg_android ,regb 
+2cad 20202d18 branch ali_mesh_resolve_app_control_msg_package 
+
+ali_mesh_advertising_send_packet_common:
+2cae 477ac03e bpatchx patch3e_5 ,mem_patch3e 
+2caf 20402ccc call ali_mesh_advertising_reset_adv_timer 
+2cb0 58008fff setarg 0x8fff 
+2cb1 67e1498d store 2 ,mem_mesh_send_packet_timeout 
+2cb2 20402a1a call ali_mesh_control_ble_advertising_on_advertising 
+2cb3 1840fe09 add temp ,provisioning_packet_length_ad_type_company_id_vid_provisioning_type + provisioning_packet_length_flags ,pdata 
+2cb4 67e0c7b1 store 1 ,mem_mesh_adv_data_len 
+2cb5 2040290a call ali_mesh_advertising_add_adtype_flags 
+2cb6 1840fe05 add temp ,provisioning_packet_ad_type_company_id_vid_provisioning_type ,pdata 
+2cb7 e7e08005 istore 1 ,contw 
+2cb8 580000ff setarg gap_adtype_manufacturer_specific 
+2cb9 e7e08005 istore 1 ,contw 
+2cba 580001a8 setarg company_identifiers_alibaba 
+2cbb 1ff0fe00 byteswap pdata ,pdata 
+2cbc e7e10005 istore 2 ,contw 
+2cbd 6fe08bfc fetch 1 ,mem_mesh_receive_vid 
+2cbe e7e08005 istore 1 ,contw 
+2cbf 20600000 rtn 
+
+ali_mesh_advertising_timer:
+2cc0 6fe24989 fetch 4 ,mem_mesh_adv_last_time 
+2cc1 243a2cc3 nbranch ali_mesh_advertising_check_adv_timer ,blank 
+2cc2 20202ccc branch ali_mesh_advertising_reset_adv_timer 
+
+ali_mesh_advertising_check_adv_timer:
+2cc3 1c427e00 deposit clkn_bt 
+2cc4 684a4989 fetcht 4 ,mem_mesh_adv_last_time 
+2cc5 98460400 isub temp ,temp 
+2cc6 6fe1498d fetch 2 ,mem_mesh_send_packet_timeout 
+2cc7 98467c00 isub temp ,null 
+2cc8 20610000 rtn positive 
+
+ali_mesh_advertising_adv_timer_timeout:
+2cc9 20402a1c call ali_mesh_control_ble_advertising_off_advertising 
+2cca 6fe149f3 fetch 2 ,mem_mesh_cb_pairing_fail 
+2ccb 20207e7a branch callback_func 
+
+ali_mesh_advertising_reset_adv_timer:
+2ccc 1c427e00 deposit clkn_bt 
+2ccd 67e24989 store 4 ,mem_mesh_adv_last_time 
+2cce 20600000 rtn 
+
+logging_tx_debug_receive_provisioning_packet:
+2ccf 18c0a3fd add contr ,-3 ,rega 
+2cd0 da400001 arg mesh_receive_provisioning_packet ,regb 
+2cd1 202029e4 branch logging_tx_debug 
+
+loggint_tx_info_receive_random_packet:
+2cd2 df200001 arg 1 ,loopcnt 
+2cd3 da400002 arg mesh_receive_provisioning_random_packet ,regb 
+2cd4 da20496c arg mem_mesh_provisioning_state_flag ,rega 
+2cd5 202029e6 branch logging_tx_info 
+
+loggint_tx_info_send_confirmation_packet:
+2cd6 6f20c7b1 fetchr loopcnt ,1 ,mem_mesh_adv_data_len 
+2cd7 da400003 arg mesh_send_provisioning_confirmation_packet ,regb 
+2cd8 da2047b2 arg mem_mesh_adv_data ,rega 
+2cd9 202029e6 branch logging_tx_info 
+
+loggint_tx_info_receive_data_packet:
+2cda df200001 arg 1 ,loopcnt 
+2cdb da400004 arg mesh_receive_provisioning_data_packet ,regb 
+2cdc da20496c arg mem_mesh_provisioning_state_flag ,rega 
+2cdd 202029e6 branch logging_tx_info 
+
+loggint_tx_info_send_complete_packet:
+2cde 6f20c7b1 fetchr loopcnt ,1 ,mem_mesh_adv_data_len 
+2cdf da400005 arg mesh_send_provisioning_complete_packet ,regb 
+2ce0 da2047b2 arg mem_mesh_adv_data ,rega 
+2ce1 202029e6 branch logging_tx_info 
+
+ali_mesh_receive_adtype_128bit_uuid_complete:
+2ce2 20402d26 call ali_mesh_receive_adtype_128bit_uuid_complete_store_uuid 
+2ce3 24740000 nrtn user 
+2ce4 6fe08bef fetch 1 ,mem_mesh_receive_service_uuid_ios_data_provisioning_type 
+2ce5 c0032d16 beq provisioning_ios_data ,ali_mesh_ios_gatt_packet_parse_provisioning_app_control 
+
+ali_mesh_ios_gatt_packet_pairing_type:
+2ce6 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2ce7 c1000000 rtneq paired_status 
+2ce8 c1018000 rtneq silence_beacon_status 
+2ce9 6fe10bf0 fetch 2 ,mem_mesh_receive_service_uuid_mac 
+2cea 684949db fetcht 2 ,mem_mesh_three_tuple_mac + 4 
+2ceb 98467c00 isub temp ,null 
+2cec 24628000 nrtn zero 
+2ced da200bf2 arg mem_mesh_receive_service_uuid_msg_id ,rega 
+2cee da400007 arg max_length_privisioning_pairing_msg_ios ,regb 
+2cef 20402d38 call ali_mesh_app_control_package_check_integrity 
+2cf0 20740000 rtn user 
+2cf1 477b403e bpatchx patch3e_6 ,mem_patch3e 
+2cf2 6fe08bef fetch 1 ,mem_mesh_receive_service_uuid_provisioning_type 
+2cf3 c0002cf7 beq provisioning_random ,ali_mesh_ios_gatt_packet_parse_provisioning_random 
+2cf4 c0012cfb beq provisioning_data ,ali_mesh_ios_gatt_packet_parse_provisioning_data 
+2cf5 c0022d0a beq provisioning_config ,ali_mesh_ios_gatt_packet_parse_provisioning_config 
+2cf6 20600000 rtn 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_random:
+2cf7 6fe149db fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2cf8 67e10a78 store 2 ,mem_mesh_gatt_package_receive_mac 
+2cf9 d8c00a78 arg mem_mesh_gatt_package_receive_mac ,contr 
+2cfa 20202c72 branch ali_mesh_advertising_receive_privisioning_random 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_data:
+2cfb 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2cfc c1000000 rtneq paired_status 
+2cfd 6fe0c96c fetch 1 ,mem_mesh_provisioning_state_flag 
+2cfe c4008000 rtnbit0 receive_provisioning_random 
+2cff c3810000 rtnbit1 receive_provisioning_data 
+2d00 d8c00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contr 
+2d01 df200014 arg 0x14 ,loopcnt 
+2d02 d8a04975 arg mem_mesh_keyfresh_and_update_flag ,contw 
+2d03 20407dd4 call memcpy 
+2d04 20402ae1 call ali_mesh_encrypt_calc_provisioning_data_calc_sessionkey 
+2d05 da204975 arg mem_mesh_keyfresh_and_update_flag ,rega 
+2d06 da400900 arg memresult ,regb 
+2d07 df20000a arg 0x0a ,loopcnt 
+2d08 20402ad9 call ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop 
+2d09 20202c9c branch ali_mesh_resolve_privisioning_data_package 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_config:
+2d0a 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2d0b c1808000 rtnne unprovisioned_beacon_status 
+2d0c 70496b02 jam pairing_status ,mem_mesh_provisioned_flag 
+
+ali_mesh_ios_gatt_packet_send_provisioning_config_ack:
+2d0d d8400003 arg provisioning_config_ack_mac + provisioning_config_ack_field ,temp 
+2d0e 20402cae call ali_mesh_advertising_send_packet_common 
+2d0f 58000005 setarg provisioning_config_ack 
+2d10 e7e08005 istore 1 ,contw 
+2d11 6fe149db fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2d12 e7e10005 istore 2 ,contw 
+2d13 58000001 setarg provisioning_config_ack_note 
+2d14 e7e08005 istore 1 ,contw 
+2d15 20600000 rtn 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_app_control:
+2d16 d8c00bf0 arg mem_mesh_receive_service_uuid_ios_data_nid ,contr 
+2d17 da400008 arg max_length_privisioning_control_msg_ios ,regb 
+
+ali_mesh_resolve_app_control_msg_package:
+2d18 477bc03e bpatchx patch3e_7 ,mem_patch3e 
+2d19 efe08006 ifetch 1 ,contr 
+2d1a 18c22200 copy contr ,rega 
+2d1b 6848c8d4 fetcht 1 ,mem_k2_nid 
+2d1c 98467c00 isub temp ,null 
+2d1d 24628000 nrtn zero 
+2d1e 20402ccc call ali_mesh_advertising_reset_adv_timer 
+2d1f 20402d38 call ali_mesh_app_control_package_check_integrity 
+2d20 20740000 rtn user 
+2d21 700c3a01 jam mesh_message_app ,mem_mesh_network_packet_type 
+2d22 68488a79 fetcht 1 ,mem_mesh_gatt_package_receive_msg_total_length 
+2d23 18408401 increase 1 ,temp 
+2d24 d8c00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contr 
+2d25 20202f3e branch ali_mesh_network_layer_recevice_network_pdu 
+
+ali_mesh_receive_adtype_128bit_uuid_complete_store_uuid:
+2d26 d8a00bec arg mem_mesh_receive_service_uuid_company_id ,contw 
+2d27 20407d7f call memcpy16 
+2d28 da200bec arg mem_mesh_receive_service_uuid_company_id ,rega 
+2d29 df200010 arg 16 ,loopcnt 
+2d2a 20407dac call inverse_data 
+2d2b df200010 arg 16 ,loopcnt 
+2d2c d8c00bec arg mem_mesh_receive_service_uuid_company_id ,contr 
+2d2d 20202d2e branch ali_mesh_receive_provisioning_package_check_header 
+
+ali_mesh_receive_provisioning_package_check_header:
+2d2e 20407ec7 call disable_user 
+2d2f e8410006 ifetcht 2 ,contr 
+2d30 580001a8 setarg company_identifiers_alibaba 
+2d31 1ff0fe00 byteswap pdata ,pdata 
+2d32 98467c00 isub temp ,null 
+2d33 24628000 nrtn zero 
+2d34 efe08006 ifetch 1 ,contr 
+2d35 67e08bfc store 1 ,mem_mesh_receive_vid 
+2d36 20407ec5 call enable_user 
+2d37 20202ccf branch logging_tx_debug_receive_provisioning_packet 
+
+ali_mesh_app_control_package_check_integrity:
+2d38 477c403f bpatchx patch3f_0 ,mem_patch3f 
+2d39 20402d71 call ali_mesh_app_control_package_check_msgid_legal 
+2d3a 20202d3b branch ali_mesh_app_control_package_check_rev_complete 
+
+ali_mesh_app_control_package_check_rev_complete:
+2d3b 1a208c01 add rega ,gatt_package_package_num ,contr 
+2d3c e8408006 ifetcht 1 ,contr 
+2d3d 1851fe00 rshift4 temp ,pdata 
+2d3e c000ad6b beq 1 ,ali_mesh_gatt_package_check_integrity_unsegment 
+
+ali_mesh_gatt_package_check_integrity_segment:
+2d3f 1fe67c04 sub pdata ,max_gatt_package_num ,null 
+2d40 24217ec5 nbranch enable_user ,positive 
+2d41 1fe27200 copy pdata ,loopcnt 
+2d42 20402d61 call ali_mesh_gatt_package_check_integrity_segment_expect_package_num 
+2d43 18410e0f and temp ,0x0f ,queue 
+2d44 98e67c00 isub queue ,null 
+2d45 2042ad5a call ali_mesh_gatt_package_check_integrity_segment_calc_total_length ,zero 
+2d46 18e08fff increase -1 ,queue 
+2d47 6fe08a78 fetch 1 ,mem_mesh_gatt_package_receive_msg_num 
+2d48 afefffff qisolate1 pdata 
+2d49 2020fec5 branch enable_user ,true 
+2d4a f9207e00 qset1 pdata 
+2d4b 67e08a78 store 1 ,mem_mesh_gatt_package_receive_msg_num 
+2d4c 1a208c02 add rega ,gatt_package_length ,contr 
+2d4d efe08006 ifetch 1 ,contr 
+2d4e 1fe27200 copy pdata ,loopcnt 
+2d4f 1a427e00 copy regb ,pdata 
+2d50 98effe00 imul32 queue ,pdata 
+2d51 d8a00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contw 
+2d52 98a08a00 iadd contw ,contw 
+2d53 20407dc7 call memcpy_fast 
+2d54 6fe08a78 fetch 1 ,mem_mesh_gatt_package_receive_msg_num 
+2d55 9a667c00 isub regc ,null 
+2d56 2442fec5 ncall enable_user ,zero 
+2d57 2422ad66 nbranch ali_mesh_gatt_package_store_receive_msg_buffer ,zero 
+
+ali_mesh_gatt_package_check_integrity_segment_complete:
+2d58 20402d92 call ali_mesh_gatt_package_clear_receive_msg_buffer 
+2d59 20207ec7 branch disable_user 
+
+ali_mesh_gatt_package_check_integrity_segment_calc_total_length:
+2d5a 1fe0ffff pincrease -1 
+2d5b 9a4ffe00 imul32 regb ,pdata 
+2d5c 1a208c02 add rega ,gatt_package_length ,contr 
+2d5d e8408006 ifetcht 1 ,contr 
+2d5e 9840fe00 iadd temp ,pdata 
+2d5f 67e08a79 store 1 ,mem_mesh_gatt_package_receive_msg_total_length 
+2d60 20600000 rtn 
+
+ali_mesh_gatt_package_check_integrity_segment_expect_package_num:
+2d61 da600000 arg 0 ,regc 
+
+ali_mesh_gatt_package_check_integrity_segment_expect_package_num_loop:
+2d62 1f208fff add loopcnt ,-1 ,queue 
+2d63 f9202600 qset1 regc 
+2d64 c2002d62 loop ali_mesh_gatt_package_check_integrity_segment_expect_package_num_loop 
+2d65 20600000 rtn 
+
+ali_mesh_gatt_package_store_receive_msg_buffer:
+2d66 6fe10a74 fetch 2 ,mem_mesh_gatt_package_receive_msg_buffer_ptr 
+2d67 1fe20a00 copy pdata ,contw 
+2d68 d8c00a76 arg mem_mesh_gatt_package_receive_msg_buffer_temp ,contr 
+2d69 df200021 arg 33 ,loopcnt 
+2d6a 20207dc7 branch memcpy_fast 
+
+ali_mesh_gatt_package_check_integrity_unsegment:
+2d6b efe08006 ifetch 1 ,contr 
+2d6c 1fe27200 copy pdata ,loopcnt 
+2d6d 67e08a79 store 1 ,mem_mesh_gatt_package_receive_msg_total_length 
+2d6e d8a00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contw 
+2d6f 20407dd4 call memcpy 
+2d70 20207ec7 branch disable_user 
+
+ali_mesh_app_control_package_check_msgid_legal:
+2d71 70499032 jam gatt_receive_timeout ,mem_mesh_gatt_receive_msg_timer 
+2d72 20402d80 call ali_mesh_gatt_package_get_msgid 
+2d73 68494991 fetcht 2 ,mem_mesh_gatt_packet_receive_msg_buffer1 
+2d74 98467c00 isub temp ,null 
+2d75 2022ad84 branch ali_mesh_gatt_package_load_receive_msg_buffer1 ,zero 
+2d76 18467c00 sub temp ,0 ,null 
+2d77 2022ad84 branch ali_mesh_gatt_package_load_receive_msg_buffer1 ,zero 
+2d78 684949b2 fetcht 2 ,mem_mesh_gatt_packet_receive_msg_buffer2 
+2d79 98467c00 isub temp ,null 
+2d7a 2022ad87 branch ali_mesh_gatt_package_load_receive_msg_buffer2 ,zero 
+2d7b 18467c00 sub temp ,0 ,null 
+2d7c 2022ad87 branch ali_mesh_gatt_package_load_receive_msg_buffer2 ,zero 
+2d7d 20402d92 call ali_mesh_gatt_package_clear_receive_msg_buffer 
+2d7e 20402d80 call ali_mesh_gatt_package_get_msgid 
+2d7f 20202d84 branch ali_mesh_gatt_package_load_receive_msg_buffer1 
+
+ali_mesh_gatt_package_get_msgid:
+2d80 efe08011 ifetch 1 ,rega 
+2d81 207a0000 rtn blank 
+2d82 79207e08 set1 8 ,pdata 
+2d83 20600000 rtn 
+
+ali_mesh_gatt_package_load_receive_msg_buffer1:
+2d84 67e14991 store 2 ,mem_mesh_gatt_packet_receive_msg_buffer1 
+2d85 58004991 setarg mem_mesh_gatt_packet_receive_msg_buffer1 
+2d86 20202d8a branch ali_mesh_gatt_package_load_receive_msg_buffer 
+
+ali_mesh_gatt_package_load_receive_msg_buffer2:
+2d87 67e149b2 store 2 ,mem_mesh_gatt_packet_receive_msg_buffer2 
+2d88 580049b2 setarg mem_mesh_gatt_packet_receive_msg_buffer2 
+2d89 20202d8a branch ali_mesh_gatt_package_load_receive_msg_buffer 
+
+ali_mesh_gatt_package_load_receive_msg_buffer:
+2d8a 67e10a74 store 2 ,mem_mesh_gatt_package_receive_msg_buffer_ptr 
+2d8b 1fe20c00 copy pdata ,contr 
+2d8c d8a00a76 arg mem_mesh_gatt_package_receive_msg_buffer_temp ,contw 
+2d8d df200021 arg gatt_receive_msg_buffer_size ,loopcnt 
+2d8e 20207dc7 branch memcpy_fast 
+
+ali_mesh_gatt_package_receive_timer:
+2d8f da604990 arg mem_mesh_gatt_receive_msg_timer ,regc 
+2d90 da402d92 arg ali_mesh_gatt_package_clear_receive_msg_buffer ,regb 
+2d91 202031fc branch timer_single_step 
+
+ali_mesh_gatt_package_clear_receive_msg_buffer:
+2d92 d8a04991 arg mem_mesh_gatt_packet_receive_msg_buffer1 ,contw 
+2d93 df200042 arg gatt_receive_msg_buffer_size + gatt_receive_msg_buffer_size ,loopcnt 
+2d94 20207d9b branch clear_mem 
+
+ali_mesh_access_layer_config_or_health_message_opcode:
+2d95 6fe089f8 fetch 1 ,mem_mesh_configuration_health_message_opcode 
+2d96 c024ad9a beq mesh_message_opcode_config_node_reset_no_head ,ali_mesh_access_layer_config_or_health_message_opcode_node_reset 
+2d97 c00dada3 beq mesh_message_opcode_config_model_subscription_add_no_head ,ali_mesh_message_config_modle_subscription_add 
+2d98 c00e2daa beq mesh_message_opcode_config_model_subscription_delete_no_head ,ali_mesh_message_config_modle_subscription_delete 
+2d99 20600000 rtn 
+
+ali_mesh_access_layer_config_or_health_message_opcode_node_reset:
+2d9a 20402d9d call ali_mesh_access_layer_send_config_node_reset_status 
+2d9b 6fe14a0d fetch 2 ,mem_mesh_cb_receive_node_reset 
+2d9c 20207e7a branch callback_func 
+
+ali_mesh_access_layer_send_config_node_reset_status:
+2d9d 58000080 setarg mesh_configuration_and_health_message_opcode_header 
+2d9e 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2d9f 5800004a setarg mesh_message_opcode_config_node_reset_status_no_head 
+2da0 e7e08005 istore 1 ,contw 
+2da1 700a0f02 jam 2 ,mem_mesh_access_layer_payload_len 
+2da2 2020305d branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_message_config_modle_subscription_add:
+2da3 20402dc8 call ali_mesh_message_config_modle_subscription_status 
+2da4 6fe14a15 fetch 2 ,mem_mesh_core_feature 
+2da5 c3810000 rtnbit1 mesh_feature_disable_subscription 
+2da6 20402dd2 call ali_mesh_message_config_modle_subscription_check_element 
+2da7 20402ddb call ali_mesh_message_config_modle_subscription_add_value_address 
+2da8 6fe14a11 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2da9 20207e7a branch callback_func 
+
+ali_mesh_message_config_modle_subscription_delete:
+2daa 20402dc8 call ali_mesh_message_config_modle_subscription_status 
+2dab 6fe14a15 fetch 2 ,mem_mesh_core_feature 
+2dac c3810000 rtnbit1 mesh_feature_disable_subscription 
+2dad 20402dd2 call ali_mesh_message_config_modle_subscription_check_element 
+2dae 684909fb fetcht 2 ,mem_mesh_subscription_value_address 
+2daf 184cfe00 rshift8 temp ,pdata 
+2db0 1ff1fe00 rshift4 pdata ,pdata 
+2db1 c0062db8 beq 0x0c ,ali_mesh_message_config_modle_subscription_delete_group_addr 
+2db2 20402dbd call ali_mesh_message_config_modle_subscription_check_value_address 
+2db3 24740000 nrtn user 
+2db4 58000000 setarg 0 
+2db5 e7e10011 istore 2 ,rega 
+2db6 6fe14a11 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2db7 20207e7a branch callback_func 
+
+ali_mesh_message_config_modle_subscription_delete_group_addr:
+2db8 5fffffff setarg -1 
+2db9 e7e40011 istore subscription_max_count ,rega 
+2dba e7e40005 istore subscription_max_count ,contw 
+2dbb 6fe14a11 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2dbc 20207e7a branch callback_func 
+
+ali_mesh_message_config_modle_subscription_check_value_address:
+2dbd df200008 arg subscription_max_count ,loopcnt 
+
+ali_mesh_message_config_modle_subscription_check_value_address_loop:
+2dbe efe10011 ifetch 2 ,rega 
+2dbf da40ffff arg 0xffff ,regb 
+2dc0 9a467c00 isub regb ,null 
+2dc1 2022fec5 branch enable_user ,zero 
+2dc2 98467c00 isub temp ,null 
+2dc3 2022fec5 branch enable_user ,zero 
+
+ali_mesh_message_config_modle_subscription_check_value_address_loop_empty:
+2dc4 1a20a202 increase 2 ,rega 
+2dc5 c2002dbe loop ali_mesh_message_config_modle_subscription_check_value_address_loop 
+2dc6 20407ec7 call disable_user 
+2dc7 20600000 rtn 
+
+ali_mesh_message_config_modle_subscription_status:
+2dc8 58000080 setarg mesh_configuration_and_health_message_opcode_header 
+2dc9 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2dca 5800001f setarg mesh_message_opcode_config_model_subscription_status_no_head 
+2dcb e7e08005 istore 1 ,contw 
+2dcc 58000000 setarg mesh_success 
+2dcd e7e08005 istore 1 ,contw 
+2dce 6fe309f9 fetch 6 ,mem_mesh_subscription_element_address 
+2dcf e7e30005 istore 6 ,contw 
+2dd0 700a0f09 jam 9 ,mem_mesh_access_layer_payload_len 
+2dd1 2020305d branch ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer 
+
+ali_mesh_message_config_modle_subscription_check_element:
+2dd2 20402e14 call mesh_get_element_info_config 
+2dd3 1a20a206 add rega ,element_device_subscription_label ,rega 
+2dd4 6fe109f9 fetch 2 ,mem_mesh_subscription_element_address 
+2dd5 68494987 fetcht 2 ,mem_mesh_unicast_address 
+2dd6 18508400 byteswap temp ,temp 
+2dd7 98467e00 isub temp ,pdata 
+2dd8 9a4ffe00 imul32 regb ,pdata 
+2dd9 9a20a200 iadd rega ,rega 
+2dda 20600000 rtn 
+
+ali_mesh_message_config_modle_subscription_add_value_address:
+2ddb 684909fb fetcht 2 ,mem_mesh_subscription_value_address 
+2ddc df200008 arg subscription_max_count ,loopcnt 
+
+ali_mesh_message_config_modle_subscription_add_value_address_loop:
+2ddd efe10011 ifetch 2 ,rega 
+2dde 203a2de5 branch ali_mesh_message_config_modle_subscription_add_value_address_in ,blank 
+2ddf da40ffff arg 0xffff ,regb 
+2de0 9a467c00 isub regb ,null 
+2de1 2022ade5 branch ali_mesh_message_config_modle_subscription_add_value_address_in ,zero 
+2de2 1a20a202 increase 2 ,rega 
+2de3 c2002ddd loop ali_mesh_message_config_modle_subscription_add_value_address_loop 
+2de4 20600000 rtn 
+
+ali_mesh_message_config_modle_subscription_add_value_address_in:
+2de5 18508400 byteswap temp ,temp 
+2de6 e0410011 istoret 2 ,rega 
+2de7 20600000 rtn 
+
+ali_mesh_init:
+2de8 20406e66 call init_memp 
+2de9 58002930 setarg mesh_check_ble_rx_packet 
+2dea 67e149ed store 2 ,mem_mesh_cb_receive_advertising 
+2deb 58002e18 setarg mesh_idle_process 
+2dec 67e14465 store 2 ,mem_cb_idle_process 
+2ded 58002f9f setarg ali_mesh_network_layer_relay_access_message 
+2dee 67e14a0b store 2 ,mem_mesh_cb_network_relay 
+2def 580029c3 setarg mesh_receive_config_appkey_add_cb 
+2df0 67e149f1 store 2 ,mem_mesh_cb_receive_config_appkey_add 
+2df1 580029d6 setarg mesh_store_new_subscriptuion_list_data 
+2df2 67e14a11 store 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2df3 580029d2 setarg mesh_store_new_seq_data 
+2df4 67e14a0f store 2 ,mem_mesh_cb_seq_changed 
+2df5 58002e1d setarg mesh_cb_event_timer 
+2df6 67e1446f store 2 ,mem_cb_event_timer 
+2df7 5800273c setarg ali_mesh_access_layer_check_access_message_opcode 
+2df8 67e149ef store 2 ,mem_mesh_cb_receive_access_message 
+2df9 58002926 setarg mesh_le_wait_adv_cb 
+2dfa 67e149f7 store 2 ,mem_mesh_scan_selete_next_ch 
+2dfb 5800300b setarg mesh_le_receive_data 
+2dfc 67e1446b store 2 ,mem_cb_att_write 
+2dfd 58003014 setarg ali_mesh_proxy_process_bb_event 
+2dfe 67e14467 store 2 ,mem_cb_bb_event_process 
+2dff 7047d124 jam 36 ,mem_mesh_adv_scan_channel 
+2e00 2040284b call ali_mesh_ali_vendor_message_indication_info_reset_tid 
+2e01 477cc03f bpatchx patch3f_1 ,mem_patch3f 
+2e02 20402a01 call mesh_uart_init 
+2e03 20402e28 call mesh_iic_init 
+2e04 da204976 arg mem_mesh_network_key ,rega 
+2e05 da400000 arg mesh_code_init ,regb 
+2e06 df200001 arg 1 ,loopcnt 
+2e07 204029e6 call logging_tx_info 
+2e08 20402995 call ali_mesh_chip_peripherals_load_data_from_eep 
+2e09 20402e10 call mesh_inverse_three_tuple_mac 
+2e0a 6fe0c976 fetch 1 ,mem_mesh_network_key 
+2e0b c07fac3b beq 0xff ,mesh_send_unprovisioned_beacons 
+2e0c 20402b0e call ali_mesh_encrypt_base_function_k3 
+2e0d 20402b00 call ali_mesh_encrypt_base_function_k4 
+2e0e 20402ae8 call ali_mesh_encrypt_calc_network_key_by_k2 
+2e0f 202027ff branch ali_mesh_ali_vendor_message_opcode_device_power_on 
+
+mesh_inverse_three_tuple_mac:
+2e10 6fe349d7 fetch 6 ,mem_mesh_three_tuple_mac 
+2e11 20407dbb call inverse_data_6byte 
+2e12 67e3437a store 6 ,mem_le_lap 
+2e13 20600000 rtn 
+
+mesh_get_element_info_config:
+2e14 6f20ca17 fetchr loopcnt ,1 ,mem_mesh_element_number 
+2e15 6a214a18 fetchr rega ,2 ,mem_mesh_element_device_ptr 
+2e16 6a414a1a fetchr regb ,2 ,mem_mesh_element_device_length 
+2e17 20600000 rtn 
+
+mesh_idle_process:
+2e18 2040284d call ali_mesh_time_function 
+2e19 20402a16 call ali_mesh_control_ble_adv_process 
+2e1a 20403086 call ali_mesh_upper_transport_layer_control_packet 
+2e1b 204028dc call ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue 
+2e1c 20202919 branch mesh_receive_advertising 
+
+mesh_cb_event_timer:
+2e1d 20402a18 call ali_mesh_control_ble_adv_timer_process 
+2e1e 20202d8f branch ali_mesh_gatt_package_receive_timer 
+
+ali_mesh_check_all_element_info:
+2e1f 20402e14 call mesh_get_element_info_config 
+
+ali_mesh_check_all_element_info_loop:
+2e20 20402f25 call ali_mesh_more_element_push_stack 
+2e21 1a627e00 copy regc ,pdata 
+2e22 20407e7a call callback_func 
+2e23 20402f2a call ali_mesh_more_element_pop_stack 
+2e24 1a427e00 copy regb ,pdata 
+2e25 9a20a200 iadd rega ,rega 
+2e26 c2002e20 loop ali_mesh_check_all_element_info_loop 
+2e27 20600000 rtn 
+
+mesh_iic_init:
+2e28 7080723f jam gpcfg_output_high ,core_gpio_conf + 2 
+2e29 7080716c jam gpcfg_iic_scl | gpcfg_pullup ,core_gpio_conf + 1 
+2e2a 7080706d jam gpcfg_iic_sda | gpcfg_pullup ,core_gpio_conf + 0 
+2e2b 20205e5c branch clear_eeprom_size_2k 
+
+ali_mesh_lower_transport_layer_receive_lower_transport_pdu:
+2e2c 477d403f bpatchx patch3f_2 ,mem_patch3f 
+2e2d 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+2e2e c283ae31 bbit1 transport_head_bit_seg ,ali_mesh_lower_transport_layer_receive_lower_transport_pdu_segmented_message 
+2e2f 704b2900 jam 0 ,mem_mesh_aszmic 
+2e30 20203021 branch ali_mesh_upper_transport_layer_receive_unsegmented_access_message 
+
+ali_mesh_lower_transport_layer_receive_lower_transport_pdu_segmented_message:
+2e31 20402e37 call ali_mesh_lower_transport_layer_receive_segaccmess_resolve_szmic_seqzero_segon 
+2e32 20740000 rtn user 
+2e33 20402e58 call ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack 
+2e34 20740000 rtn user 
+2e35 20402e68 call ali_mesh_lower_transport_layer_receive_segmented_access_message_store_segment 
+2e36 20202e75 branch ali_mesh_lower_transport_layer_receive_segmented_access_message_decrypt_segment 
+
+ali_mesh_lower_transport_layer_receive_segaccmess_resolve_szmic_seqzero_segon:
+2e37 20407ec7 call disable_user 
+2e38 df200003 arg 3 ,loopcnt 
+2e39 da200c15 arg mem_mesh_message_segment_access_szmic_seqzero_sego_segn ,rega 
+2e3a 20407dac call inverse_data 
+2e3b 6a218c15 fetchr rega ,3 ,mem_mesh_message_segment_access_szmic_seqzero_sego_segn 
+2e3c 1a21041f and rega ,0x1f ,temp 
+2e3d 6048ca20 storet 1 ,mem_mesh_segmented_access_message_segn 
+2e3e 6fe0ca27 fetch 1 ,mem_mesh_segmented_access_message_segn_upper_limit 
+2e3f 98467c00 isub temp ,null 
+2e40 24217ec5 nbranch enable_user ,positive 
+2e41 1a31fe00 rshift4 rega ,pdata 
+2e42 1fe37e00 rshift pdata ,pdata 
+2e43 1fe1041f and pdata ,0x1f ,temp 
+2e44 6048ca1f storet 1 ,mem_mesh_segmented_access_message_sego 
+2e45 1ff1fe00 rshift4 pdata ,pdata 
+2e46 1fe37e00 rshift pdata ,pdata 
+2e47 da201fff arg 0x1fff ,rega 
+2e48 9a210400 iand rega ,temp 
+2e49 1fe22400 copy pdata ,regb 
+2e4a 6fe14a1d fetch 2 ,mem_mesh_segmented_access_message_seqzero 
+2e4b 98467c00 isub temp ,null 
+2e4c 2442ae54 ncall ali_mesh_lower_transport_layer_receive_segmented_access_message_recover_seqzero ,zero 
+2e4d 60494a1d storet 2 ,mem_mesh_segmented_access_message_seqzero 
+2e4e 1a4cfe00 rshift8 regb ,pdata 
+2e4f 1ff1fe00 rshift4 pdata ,pdata 
+2e50 1fe37e00 rshift pdata ,pdata 
+2e51 67e0ca1c store 1 ,mem_mesh_segmented_access_message_szmic 
+2e52 67e0cb29 store 1 ,mem_mesh_aszmic 
+2e53 20600000 rtn 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_recover_seqzero:
+2e54 58000000 setarg 0 
+2e55 67e24a21 store 4 ,mem_mesh_segmented_access_message_blockack 
+2e56 704a2600 jam 0 ,mem_mesh_segmented_access_message_current_length 
+2e57 20600000 rtn 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack:
+2e58 20407ec7 call disable_user 
+2e59 6fe0ca1f fetch 1 ,mem_mesh_segmented_access_message_sego 
+2e5a 1fe20e00 copy pdata ,queue 
+2e5b 6fe24a21 fetch 4 ,mem_mesh_segmented_access_message_blockack 
+2e5c afefffff qisolate1 pdata 
+2e5d 2020fec5 branch enable_user ,true 
+2e5e f9207e00 qset1 pdata 
+2e5f 67e24a21 store 4 ,mem_mesh_segmented_access_message_blockack 
+2e60 6848ca20 fetcht 1 ,mem_mesh_segmented_access_message_segn 
+2e61 1840f201 add temp ,1 ,loopcnt 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack_loop:
+2e62 1f208fff add loopcnt ,-1 ,queue 
+2e63 afefffff qisolate1 pdata 
+2e64 24608000 nrtn true 
+2e65 c2002e62 loop ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack_loop 
+2e66 704a2501 jam 1 ,mem_mesh_segmented_access_message_receive_finish 
+2e67 20600000 rtn 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_store_segment:
+2e68 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2e69 1fe0fffa pincrease -6 
+2e6a 1fe27200 copy pdata ,loopcnt 
+2e6b 6848ca26 fetcht 1 ,mem_mesh_segmented_access_message_current_length 
+2e6c 98408400 iadd temp ,temp 
+2e6d 6048ca26 storet 1 ,mem_mesh_segmented_access_message_current_length 
+2e6e 6fe14a28 fetch 2 ,mem_mesh_segmented_access_message_segment_ptr 
+2e6f 98000a00 iforce contw 
+2e70 6fe0ca1f fetch 1 ,mem_mesh_segmented_access_message_sego 
+2e71 1feffe0c mul32 pdata ,12 ,pdata 
+2e72 98a08a00 iadd contw ,contw 
+2e73 d8c00c18 arg mem_mesh_message_transport_segmented_access_messagepdu_segment ,contr 
+2e74 20207dd4 branch memcpy 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_decrypt_segment:
+2e75 6fe0ca25 fetch 1 ,mem_mesh_segmented_access_message_receive_finish 
+2e76 c1000000 rtneq 0 
+2e77 58000000 setarg 0 
+2e78 67e2ca21 store 5 ,mem_mesh_segmented_access_message_blockack 
+2e79 68490c0e fetcht 2 ,mem_mesh_message_seq + 1 
+2e7a 18508400 byteswap temp ,temp 
+2e7b 5800e000 setarg 0xe000 
+2e7c 98410400 iand temp ,temp 
+2e7d 6fe14a1d fetch 2 ,mem_mesh_segmented_access_message_seqzero 
+2e7e 9841fe00 ior temp ,pdata 
+2e7f 1ff0fe00 byteswap pdata ,pdata 
+2e80 67e10c0e store 2 ,mem_mesh_message_seq + 1 
+2e81 2020302b branch ali_mesh_upper_transport_layer_receive_segmented_access_message 
+
+ali_mesh_lower_transport_layer_send_unsegmented_access_message:
+2e82 6fe08a0f fetch 1 ,mem_mesh_upper_transport_layer_payload_len 
+2e83 1fe08401 add pdata ,1 ,temp 
+2e84 1fe27200 copy pdata ,loopcnt 
+2e85 60488bff storet 1 ,mem_mesh_lower_transport_layer_payload_len 
+2e86 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+2e87 793ffe07 set0 transport_head_bit_seg ,pdata 
+2e88 67e0cb61 store 1 ,mem_mesh_unsegmented_access_lower_transport_layer_head 
+2e89 d8c00a10 arg mem_mesh_access_layer_payload ,contr 
+2e8a 20407dc7 call memcpy_fast 
+2e8b 20202fdb branch ali_mesh_network_layer_send_access_message 
+
+ali_mesh_lower_transport_layer_send_segmented_access_message:
+2e8c 1a208404 add rega ,4 ,temp 
+2e8d 1a227200 copy rega ,loopcnt 
+2e8e 60488bff storet 1 ,mem_mesh_lower_transport_layer_payload_len 
+2e8f d8a04b65 arg mem_mesh_segmented_access_lower_transport_layer_parameters ,contw 
+2e90 20407dc7 call memcpy_fast 
+2e91 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+2e92 79207e07 set1 transport_head_bit_seg ,pdata 
+2e93 67e0cb61 store 1 ,mem_mesh_segmented_access_lower_transport_layer_head 
+2e94 20202fdb branch ali_mesh_network_layer_send_access_message 
+
+ali_mesh_model_layer_check_model_message_opcode:
+2e95 6fe089f8 fetch 1 ,mem_mesh_module_message_opcode 
+
+ali_mesh_model_layer_check_generic_onoff_message_opcde:
+2e96 c000ae9c beq mesh_module_message_opcode_generic_onoff_get_no_head ,ali_mesh_model_layer_message_opcode_generic_onoff_get 
+2e97 c0012ea2 beq mesh_module_message_opcode_generic_onoff_set_no_head ,ali_mesh_model_layer_message_opcde_generic_onoff_set 
+2e98 c0212ea7 beq mesh_module_message_opcode_scene_recall_no_head ,ali_mesh_model_layer_message_opcde_scene_recall 
+2e99 c0262eaa beq mesh_module_message_opcode_light_lightness_set_no_head ,ali_mesh_model_layer_message_opcde_light_lightness_set 
+2e9a c02f2eb0 beq mesh_module_message_opcode_light_ctl_set_no_head ,ali_mesh_model_layer_message_opcde_light_ctl_set 
+2e9b 20600000 rtn 
+
+ali_mesh_model_layer_message_opcode_generic_onoff_get:
+2e9c da602e9e arg ali_mesh_model_layer_message_opcode_generic_onoff_get_cb ,regc 
+2e9d 20202f14 branch ali_mesh_more_element_check_element_address 
+
+ali_mesh_model_layer_message_opcode_generic_onoff_get_cb:
+2e9e 6fe149f9 fetch 2 ,mem_mesh_cb_generic_onoff_get 
+2e9f 20407e7a call callback_func 
+2ea0 67e089f9 store 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+2ea1 2020276d branch ali_mesh_access_layer_send_generic_onoff_status 
+
+ali_mesh_model_layer_message_opcde_generic_onoff_set:
+2ea2 da602ea4 arg ali_mesh_model_layer_message_opcde_generic_onoff_set_cb ,regc 
+2ea3 20202f14 branch ali_mesh_more_element_check_element_address 
+
+ali_mesh_model_layer_message_opcde_generic_onoff_set_cb:
+2ea4 2040276d call ali_mesh_access_layer_send_generic_onoff_status 
+2ea5 6fe149fb fetch 2 ,mem_mesh_cb_generic_onoff_set 
+2ea6 20207e7a branch callback_func 
+
+ali_mesh_model_layer_message_opcde_scene_recall:
+2ea7 20402785 call ali_mesh_access_layer_send_scene_status 
+2ea8 6fe149fd fetch 2 ,mem_mesh_cb_scene_recall 
+2ea9 20207e7a branch callback_func 
+
+ali_mesh_model_layer_message_opcde_light_lightness_set:
+2eaa 6fe109f9 fetch 2 ,mem_mesh_light_lightness_set_payload_lightness 
+2eab 20402ebf call ali_mesh_model_layer_message_calc_lightness 
+2eac 67e089fe store 1 ,mem_mesh_light_lightness_calc_lightness 
+2ead 20402775 call ali_mesh_access_layer_send_light_lightness_status 
+2eae 6fe149ff fetch 2 ,mem_mesh_cb_light_lightness_set 
+2eaf 20207e7a branch callback_func 
+
+ali_mesh_model_layer_message_opcde_light_ctl_set:
+2eb0 6fe14a2a fetch 2 ,mem_mesh_last_ctl_temperature 
+2eb1 684909fb fetcht 2 ,mem_mesh_ctl_temperature 
+2eb2 98467c00 isub temp ,null 
+2eb3 20628000 rtn zero 
+2eb4 6fe109fb fetch 2 ,mem_mesh_ctl_temperature 
+2eb5 20402ed1 call ali_mesh_model_layer_message_calc_temperature 
+2eb6 67e08a03 store 1 ,mem_mesh_ctl_calc_temperature 
+2eb7 6fe109fb fetch 2 ,mem_mesh_ctl_temperature 
+2eb8 67e14a2a store 2 ,mem_mesh_last_ctl_temperature 
+2eb9 6fe14a01 fetch 2 ,mem_mesh_cb_light_lightness_get 
+2eba 20407e7a call callback_func 
+2ebb 604909f9 storet 2 ,mem_mesh_ctl_lightness 
+2ebc 2040277d call ali_mesh_access_layer_send_light_ctl_stauts 
+2ebd 6fe14a03 fetch 2 ,mem_mesh_cb_light_ctl_set 
+2ebe 20207e7a branch callback_func 
+
+ali_mesh_model_layer_message_calc_lightness:
+2ebf 207a0000 rtn blank 
+2ec0 1feffe64 mul32 pdata ,ali_mesh_lightness_level ,pdata 
+2ec1 d840ffff arg ali_mesh_lightness_max ,temp 
+2ec2 9846fc00 idiv temp 
+2ec3 20407e64 call wait_div_end 
+2ec4 18070400 remainder temp 
+2ec5 184c8400 rshift8 temp ,temp 
+2ec6 1807fe00 quotient pdata 
+2ec7 18467cff sub temp ,0xff ,null 
+2ec8 24628000 nrtn zero 
+2ec9 1fe0fe01 pincrease 1 
+2eca 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_actual_lightness:
+2ecb dfe0ffff arg ali_mesh_lightness_max ,pdata 
+2ecc 984ffe00 imul32 temp ,pdata 
+2ecd 1fe6fc64 div pdata ,ali_mesh_lightness_level 
+2ece 20407e64 call wait_div_end 
+2ecf 18078400 quotient temp 
+2ed0 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_temperature:
+2ed1 d8400320 arg ali_mesh_temperature_min ,temp 
+2ed2 98462200 isub temp ,rega 
+2ed3 20402ee0 call ali_mesh_model_layer_message_calc_temperature_k 
+2ed4 1a227e00 copy rega ,pdata 
+2ed5 9846fc00 idiv temp 
+2ed6 20407e64 call wait_div_end 
+2ed7 1807fe00 quotient pdata 
+2ed8 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_actual_temperature:
+2ed9 18422200 copy temp ,rega 
+2eda 20402ee0 call ali_mesh_model_layer_message_calc_temperature_k 
+2edb 1a227e00 copy rega ,pdata 
+2edc 984ffe00 imul32 temp ,pdata 
+2edd d8400320 arg ali_mesh_temperature_min ,temp 
+2ede 98408400 iadd temp ,temp 
+2edf 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_temperature_k:
+2ee0 58004e20 setarg ali_mesh_temperature_max 
+2ee1 d8400320 arg ali_mesh_temperature_min ,temp 
+2ee2 98467e00 isub temp ,pdata 
+2ee3 1fe6fc64 div pdata ,ali_mesh_temperature_level 
+2ee4 20407e64 call wait_div_end 
+2ee5 18078400 quotient temp 
+2ee6 20600000 rtn 
+
+ali_mesh_more_element_check_unicast_address:
+2ee7 d8e00000 arg 0 ,queue 
+2ee8 6f20ca17 fetchr loopcnt ,1 ,mem_mesh_element_number 
+2ee9 20407ec7 call disable_user 
+2eea 6fe14987 fetch 2 ,mem_mesh_unicast_address 
+
+ali_mesh_more_element_check_unicast_address_loop:
+2eeb 98467c00 isub temp ,null 
+2eec 2022aef3 branch ali_mesh_more_element_found_unicast_address_element ,zero 
+2eed 1ff0fe00 byteswap pdata ,pdata 
+2eee 1fe0fe01 pincrease 1 
+2eef 1ff0fe00 byteswap pdata ,pdata 
+2ef0 18e08e01 increase 1 ,queue 
+2ef1 c2002eeb loop ali_mesh_more_element_check_unicast_address_loop 
+2ef2 20600000 rtn 
+
+ali_mesh_more_element_found_unicast_address_element:
+2ef3 704a2c00 jam 0 ,mem_mesh_receive_group_address 
+2ef4 60e0ca2d storer queue ,1 ,mem_mesh_receive_element_number 
+2ef5 20402f2f call ali_mesh_more_element_calc_queue_address 
+2ef6 20207ec5 branch enable_user 
+
+ali_mesh_more_element_check_group_address:
+2ef7 d8e00000 arg 0 ,queue 
+2ef8 da600000 arg 0 ,regc 
+2ef9 20402e14 call mesh_get_element_info_config 
+2efa 20407ec7 call disable_user 
+
+ali_mesh_more_element_check_group_address_loop:
+2efb 6fe14a15 fetch 2 ,mem_mesh_core_feature 
+2efc c3012f0a bbit0 mesh_feature_disable_subscription ,ali_mesh_more_element_check_subscription_address 
+2efd efe10011 ifetch 2 ,rega 
+2efe 98467c00 isub temp ,null 
+2eff 2042af08 call ali_mesh_more_element_found_group_address_element ,zero 
+
+ali_mesh_more_element_check_address_common:
+2f00 1a427e00 copy regb ,pdata 
+2f01 9a20a200 iadd rega ,rega 
+2f02 18e08e01 increase 1 ,queue 
+2f03 c2002efb loop ali_mesh_more_element_check_group_address_loop 
+2f04 1a627e00 copy regc ,pdata 
+2f05 207a0000 rtn blank 
+2f06 67e0ca2c store 1 ,mem_mesh_receive_group_address 
+2f07 20207ec5 branch enable_user 
+
+ali_mesh_more_element_found_group_address_element:
+2f08 f9202600 qset1 regc 
+2f09 20600000 rtn 
+
+ali_mesh_more_element_check_subscription_address:
+2f0a 1a208c06 add rega ,element_device_subscription_label ,contr 
+2f0b de000008 arg subscription_max_count ,alarm 
+
+ali_mesh_more_element_check_subscription_address_loop:
+2f0c efe10006 ifetch 2 ,contr 
+2f0d 98467c00 isub temp ,null 
+2f0e 2022af12 branch ali_mesh_more_element_found_subscription_address_element ,zero 
+2f0f 1e00e1ff increase -1 ,alarm 
+2f10 2022af00 branch ali_mesh_more_element_check_address_common ,zero 
+2f11 20202f0c branch ali_mesh_more_element_check_subscription_address_loop 
+
+ali_mesh_more_element_found_subscription_address_element:
+2f12 20402f08 call ali_mesh_more_element_found_group_address_element 
+2f13 20202f00 branch ali_mesh_more_element_check_address_common 
+
+ali_mesh_more_element_check_element_address:
+2f14 d8e00000 arg 0 ,queue 
+2f15 6fe0ca2c fetch 1 ,mem_mesh_receive_group_address 
+2f16 203a2f20 branch ali_mesh_more_element_check_element_address_no_group_address ,blank 
+2f17 1fe22400 copy pdata ,regb 
+2f18 6f20ca17 fetchr loopcnt ,1 ,mem_mesh_element_number 
+
+ali_mesh_more_element_check_element_address_loop:
+2f19 60e0ca2d storer queue ,1 ,mem_mesh_receive_element_number 
+2f1a aa4fffff qisolate1 regb 
+2f1b 2040af20 call ali_mesh_more_element_check_element_address_no_group_address ,true 
+2f1c 68e0ca2d fetchr queue ,1 ,mem_mesh_receive_element_number 
+2f1d 18e08e01 increase 1 ,queue 
+2f1e c2002f19 loop ali_mesh_more_element_check_element_address_loop 
+2f1f 20600000 rtn 
+
+ali_mesh_more_element_check_element_address_no_group_address:
+2f20 20402f25 call ali_mesh_more_element_push_stack 
+2f21 20402f2f call ali_mesh_more_element_calc_queue_address 
+2f22 1a627e00 copy regc ,pdata 
+2f23 20407e7a call callback_func 
+2f24 20202f2a branch ali_mesh_more_element_pop_stack 
+
+ali_mesh_more_element_push_stack:
+2f25 67210c00 storer loopcnt ,2 ,mem_mesh_loopcnt_tmep 
+2f26 62210c02 storer rega ,2 ,mem_mesh_rega_temp 
+2f27 62410c04 storer regb ,2 ,mem_mesh_regb_temp 
+2f28 62610c06 storer regc ,2 ,mem_mesh_regc_temp 
+2f29 20600000 rtn 
+
+ali_mesh_more_element_pop_stack:
+2f2a 6f210c00 fetchr loopcnt ,2 ,mem_mesh_loopcnt_tmep 
+2f2b 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+2f2c 6a410c04 fetchr regb ,2 ,mem_mesh_regb_temp 
+2f2d 6a610c06 fetchr regc ,2 ,mem_mesh_regc_temp 
+2f2e 20600000 rtn 
+
+ali_mesh_more_element_calc_queue_address:
+2f2f 477dc03f bpatchx patch3f_3 ,mem_patch3f 
+2f30 6fe14987 fetch 2 ,mem_mesh_unicast_address 
+2f31 1ff0fe00 byteswap pdata ,pdata 
+2f32 98e0fe00 iadd queue ,pdata 
+2f33 1ff0fe00 byteswap pdata ,pdata 
+2f34 67e14b55 store 2 ,mem_mesh_send_message_src 
+2f35 20402e14 call mesh_get_element_info_config 
+2f36 18e27e00 copy queue ,pdata 
+2f37 9a4ffe00 imul32 regb ,pdata 
+2f38 9a20a200 iadd rega ,rega 
+2f39 1a208c17 add rega ,element_device_upper_queue_ptr ,contr 
+2f3a efe10006 ifetch 2 ,contr 
+2f3b 67e1448c store ,2 ,mem_queue_ptr 
+2f3c 20600000 rtn 
+
+ali_mesh_receive_adtype_mesh_message:
+2f3d 700c3a00 jam mesh_message_tmall ,mem_mesh_network_packet_type 
+
+ali_mesh_network_layer_recevice_network_pdu:
+2f3e 18467c0c sub temp ,mesh_network_packet_min_length ,null 
+2f3f 20610000 rtn positive 
+2f40 18467c1e sub temp ,mesh_network_packet_max_length ,null 
+2f41 24610000 nrtn positive 
+2f42 477e403f bpatchx patch3f_4 ,mem_patch3f 
+2f43 20402f97 call ali_mesh_network_store_in_mem 
+
+ali_mesh_network_layer_recevice_network_pdu_check_nid:
+2f44 20402f65 call ali_mesh_network_layer_check_nid_ivi 
+2f45 24740000 nrtn user 
+
+ali_mesh_network_layer_recevice_network_pdu_deceypt_obfuscation:
+2f46 20402b1f call ali_mesh_encrypt_obfuscation_deceypt_recevie_message 
+
+ali_mesh_network_layer_recevice_network_pdu_decrypt_netmic32:
+2f47 20402f8e call ali_mesh_network_load_network_nonce_and_encryptionkey 
+2f48 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2f49 d8400c12 arg mem_mesh_message_dst ,temp 
+2f4a 20402c09 call ali_ccm_decrypt 
+2f4b 24628000 nrtn zero 
+
+ali_mesh_network_layer_recevice_network_pdu_check_dst:
+2f4c 477ec03f bpatchx patch3f_5 ,mem_patch3f 
+2f4d 68490c12 fetcht 2 ,mem_mesh_message_dst 
+2f4e 20402ee7 call ali_mesh_more_element_check_unicast_address 
+2f4f 20342f72 branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,user 
+2f50 df20001d arg 29 ,loopcnt 
+2f51 d8a00a98 arg mem_mesh_message_nid_temp ,contw 
+2f52 d8c00c0b arg mem_mesh_message_nid ,contr 
+2f53 20407dd4 call memcpy 
+2f54 20402f5b call ali_mesh_network_layer_recevice_network_pdu_check_dst_group_address 
+2f55 df20001d arg 29 ,loopcnt 
+2f56 d8c00a98 arg mem_mesh_message_nid_temp ,contr 
+2f57 d8a00c0b arg mem_mesh_message_nid ,contw 
+2f58 20407dd4 call memcpy 
+2f59 6fe14a0b fetch 2 ,mem_mesh_cb_network_relay 
+2f5a 20207e7a branch callback_func 
+
+ali_mesh_network_layer_recevice_network_pdu_check_dst_group_address:
+2f5b 20402ef7 call ali_mesh_more_element_check_group_address 
+2f5c 20342f72 branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,user 
+2f5d 704a2cff jam 0xff ,mem_mesh_receive_group_address 
+2f5e 5800ffcf setarg group_address_0xcfff_little_endian 
+2f5f 98467c00 isub temp ,null 
+2f60 2022af72 branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,zero 
+2f61 5800ffff setarg group_address_0xffff_little_endian 
+2f62 98467c00 isub temp ,null 
+2f63 2022af72 branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,zero 
+2f64 20600000 rtn 
+
+ali_mesh_network_layer_check_nid_ivi:
+2f65 20407ec7 call disable_user 
+2f66 68488c0b fetcht 1 ,mem_mesh_message_nid 
+2f67 1851fe00 rshift4 temp ,pdata 
+2f68 1fe97e00 rshift3 pdata ,pdata 
+2f69 6a20ca31 fetchr rega ,1 ,mem_mesh_iv_index + 3 
+2f6a 1a212201 and rega ,0x01 ,rega 
+2f6b 9a267c00 isub rega ,null 
+2f6c 24628000 nrtn zero 
+2f6d 1841047f and temp ,0x7f ,temp 
+2f6e 6fe0c8d4 fetch 1 ,mem_k2_nid 
+2f6f 98467c00 isub temp ,null 
+2f70 24628000 nrtn zero 
+2f71 20207ec5 branch enable_user 
+
+ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq:
+2f72 da204a32 arg mem_mesh_tmall_cache_start ,rega 
+2f73 df20000a arg cache_space_num ,loopcnt 
+
+ali_mesh_network_layer_raverse_src_seq_cache:
+2f74 68490c10 fetcht 2 ,mem_mesh_message_src 
+2f75 efe10011 ifetch 2 ,rega 
+2f76 203a2f7c branch ali_mesh_network_layer_find_empty_space ,blank 
+2f77 98467c00 isub temp ,null 
+2f78 2022af7d branch ali_mesh_network_layer_find_src_space ,zero 
+2f79 1a20a205 increase cache_space_size ,rega 
+2f7a c2002f74 loop ali_mesh_network_layer_raverse_src_seq_cache 
+2f7b da204a32 arg mem_mesh_tmall_cache_start ,rega 
+
+ali_mesh_network_layer_find_empty_space:
+2f7c e0410011 istoret 2 ,rega 
+
+ali_mesh_network_layer_find_src_space:
+2f7d 60490c35 storet 2 ,mem_mesh_send_message_dst 
+2f7e 1a20a602 add rega ,2 ,regc 
+2f7f efe18013 ifetch 3 ,regc 
+2f80 67e18c37 store 3 ,mem_mesh_last_message_seq 
+2f81 20202f82 branch ali_mesh_network_layer_recevice_network_pdu_check_seq_legal 
+
+ali_mesh_network_layer_recevice_network_pdu_check_seq_legal:
+2f82 20402f8b call ali_mesh_inverse_seq 
+2f83 6fe18c37 fetch 3 ,mem_mesh_last_message_seq 
+2f84 68498c0d fetcht 3 ,mem_mesh_message_seq 
+2f85 98467c00 isub temp ,null 
+2f86 20610000 rtn positive 
+2f87 e0418013 istoret 3 ,regc 
+2f88 20402f8b call ali_mesh_inverse_seq 
+2f89 20402fee call logging_tx_debug_network_receive_packet 
+2f8a 20202e2c branch ali_mesh_lower_transport_layer_receive_lower_transport_pdu 
+
+ali_mesh_inverse_seq:
+2f8b da200c0d arg mem_mesh_message_seq ,rega 
+2f8c df200003 arg 3 ,loopcnt 
+2f8d 20207dac branch inverse_data 
+
+ali_mesh_network_load_network_nonce_and_encryptionkey:
+2f8e 20402f91 call ali_mesh_network_layer_load_network_nonce 
+
+ali_mesh_upper_transport_layer_load_encryptionkey:
+2f8f d8c048e5 arg mem_k2_encryptionkey ,contr 
+2f90 20206e26 branch load_key 
+
+ali_mesh_network_layer_load_network_nonce:
+2f91 d8a00c28 arg mem_mesh_network_nonce ,contw 
+2f92 58000000 setarg network_nonce 
+2f93 e7e08005 istore 1 ,contw 
+2f94 6fe30c0c fetch 6 ,mem_mesh_message_ttl 
+2f95 e7e40005 istore 8 ,contw 
+2f96 20202fe9 branch mesh_generate_nonce 
+
+ali_mesh_network_store_in_mem:
+2f97 1840fff4 add temp ,-12 ,pdata 
+2f98 67e08c0a store 1 ,mem_mesh_message_transport_netmic_length 
+2f99 df20001d arg 29 ,loopcnt 
+2f9a d8a00c0b arg mem_mesh_message_nid ,contw 
+2f9b 20407d9b call clear_mem 
+2f9c 1840f3ff add temp ,-1 ,loopcnt 
+2f9d d8a00c0b arg mem_mesh_message_nid ,contw 
+2f9e 20207dc7 branch memcpy_fast 
+
+ali_mesh_network_layer_relay_access_message:
+2f9f 20402fb6 call ali_mesh_network_layer_check_relay_states 
+2fa0 24740000 nrtn user 
+2fa1 20402fcb call ali_mesh_network_layer_encrypt_relay_package 
+2fa2 700a740a jam adv_relay_mesh_message_duration ,mem_mesh_queue_ele_duration 
+2fa3 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2fa4 1fe0840d add pdata ,13 ,temp 
+2fa5 60488a76 storet 1 ,mem_mesh_queue_ele_len 
+2fa6 184085ff increase -1 ,temp 
+2fa7 e0408005 istoret 1 ,contw 
+2fa8 5800002a setarg gap_adtype_mesh_message 
+2fa9 e7e08005 istore 1 ,contw 
+2faa 1840f3ff add temp ,-1 ,loopcnt 
+2fab 6fe38c0b fetch 7 ,mem_mesh_message_nid 
+2fac d8c00c0b arg mem_mesh_message_nid ,contr 
+2fad 20407dd4 call memcpy 
+2fae 6fe1478f fetch 2 ,mem_ui_state_map 
+2faf 2feffe09 isolate1 ui_state_ble_connected ,pdata 
+2fb0 2040afb3 call ali_mesh_send_ble_data_relay_package ,true 
+2fb1 da200a74 arg mem_mesh_queue_ele_temp ,rega 
+2fb2 202079aa branch queue_push 
+
+ali_mesh_send_ble_data_relay_package:
+2fb3 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+2fb4 c1010000 rtneq mesh_message_proxy 
+2fb5 20203017 branch ali_mesh_send_ble_data 
+
+ali_mesh_network_layer_check_relay_states:
+2fb6 20407ec7 call disable_user 
+2fb7 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+2fb8 c1008000 rtneq mesh_message_app 
+2fb9 6fe14a15 fetch 2 ,mem_mesh_core_feature 
+2fba c3808000 rtnbit1 mesh_feature_disable_relay 
+2fbb 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+2fbc c1800000 rtnne paired_status 
+2fbd 68490c10 fetcht 2 ,mem_mesh_message_src 
+2fbe 20402ee7 call ali_mesh_more_element_check_unicast_address 
+2fbf 24740000 nrtn user 
+2fc0 20402fd0 call ali_mesh_network_layer_check_network_mic_cache 
+2fc1 24740000 nrtn user 
+2fc2 20402fd3 call ali_mesh_network_layer_logging_tx_relay_info 
+2fc3 6fe08c0c fetch 1 ,mem_mesh_message_ttl 
+2fc4 207a0000 rtn blank 
+2fc5 1fe0ffff pincrease -1 
+2fc6 207a0000 rtn blank 
+2fc7 67e08c0c store 1 ,mem_mesh_message_ttl 
+2fc8 58004a8c setarg mem_mesh_network_relay_queue 
+2fc9 67e1448c store 2 ,mem_queue_ptr 
+2fca 20207ec5 branch enable_user 
+
+ali_mesh_network_layer_encrypt_relay_package:
+2fcb 20402f8e call ali_mesh_network_load_network_nonce_and_encryptionkey 
+2fcc 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2fcd d8400c12 arg mem_mesh_message_dst ,temp 
+2fce 20402be8 call ali_ccm_encrypt 
+2fcf 20202b1f branch ali_mesh_encrypt_obfuscation_deceypt_recevie_message 
+
+ali_mesh_network_layer_check_network_mic_cache:
+2fd0 58004a64 setarg mem_mesh_transport_message_mic_cache 
+2fd1 67e10bfd store 2 ,mem_mesh_mic_cache_ptr 
+2fd2 20202978 branch ali_mesh_base_adt_cache 
+
+ali_mesh_network_layer_logging_tx_relay_info:
+2fd3 df200002 arg 2 ,loopcnt 
+2fd4 da200c12 arg mem_mesh_message_dst ,rega 
+2fd5 da400021 arg mesh_network_relay_packet ,regb 
+2fd6 204029e6 call logging_tx_info 
+2fd7 6f208be0 fetchr loopcnt ,1 ,mem_ccm_data_len 
+2fd8 6a210be1 fetchr rega ,2 ,mem_ccm_data_ptr 
+2fd9 da400021 arg mesh_network_relay_packet ,regb 
+2fda 202029e4 branch logging_tx_debug 
+
+ali_mesh_network_layer_send_access_message:
+2fdb 477f403f bpatchx patch3f_6 ,mem_patch3f 
+2fdc 20402fdf call ali_mesh_network_layer_send_access_message_encrypt_netmic 
+2fdd 20402fe8 call ali_mesh_network_layer_send_access_message_encrypt_obfuscation 
+2fde 202028c3 branch ali_mesh_bearer_layer_send_packet_by_network_layer 
+
+ali_mesh_network_layer_send_access_message_encrypt_netmic:
+2fdf 6fe08bff fetch 1 ,mem_mesh_lower_transport_layer_payload_len 
+2fe0 1fe0a202 add pdata ,2 ,rega 
+2fe1 1fe0fe04 pincrease 4 
+2fe2 67e08bff store 1 ,mem_mesh_lower_transport_layer_payload_len 
+2fe3 d8404b5f arg mem_mesh_send_upper_layer_dst ,temp 
+2fe4 20202fe5 branch ali_mesh_network_layer_encrypt_by_network_nonce 
+
+ali_mesh_network_layer_encrypt_by_network_nonce:
+2fe5 20402f8e call ali_mesh_network_load_network_nonce_and_encryptionkey 
+2fe6 1a227e00 copy rega ,pdata 
+2fe7 20202be8 branch ali_ccm_encrypt 
+
+ali_mesh_network_layer_send_access_message_encrypt_obfuscation:
+2fe8 20202b1c branch ali_mesh_encrypt_obfuscation_deceypt_send_message 
+
+mesh_generate_nonce:
+2fe9 6fe24a2e fetch 4 ,mem_mesh_iv_index 
+2fea e7e20005 istore 4 ,contw 
+2feb 18a0fff3 add contw ,-13 ,pdata 
+2fec 67e10bde store 2 ,mem_nonce_ptr 
+2fed 20600000 rtn 
+
+logging_tx_debug_network_receive_packet:
+2fee 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2fef 1fe0f20b add pdata ,11 ,loopcnt 
+2ff0 da200c0b arg mem_mesh_message_nid ,rega 
+2ff1 da400020 arg mesh_network_receive_packet ,regb 
+2ff2 202029e4 branch logging_tx_debug 
+
+ali_mesh_proxy_init_adv:
+2ff3 7043e714 jam 0x14 ,mem_le_adv_data_len 
+2ff4 58000002 setarg 0x02 
+2ff5 67e0c3e8 store 1 ,mem_le_adv_data 
+2ff6 58000001 setarg gap_adtype_flags 
+2ff7 e7e08005 istore 1 ,contw 
+2ff8 58000006 setarg 0x06 
+2ff9 e7e08005 istore 1 ,contw 
+2ffa 58000003 setarg 0x03 
+2ffb e7e08005 istore 1 ,contw 
+2ffc 58000003 setarg gap_adtype_16bit_complete 
+2ffd e7e08005 istore 1 ,contw 
+2ffe 58001828 setarg mesh_proxy_service 
+2fff e7e10005 istore 2 ,contw 
+3000 5800000c setarg 0x0c 
+3001 e7e08005 istore 1 ,contw 
+3002 58000016 setarg gap_adtype_service_data 
+3003 e7e08005 istore 1 ,contw 
+3004 58001828 setarg mesh_proxy_service 
+3005 e7e10005 istore 2 ,contw 
+3006 58000000 setarg mesh_proxy_service_data_id_type_network_id 
+3007 e7e08005 istore 1 ,contw 
+3008 6fe44963 fetch 8 ,mem_mesh_network_id 
+3009 e7e40005 istore 8 ,contw 
+300a 20600000 rtn 
+
+mesh_le_receive_data:
+300b 6fe14437 fetch 2 ,mem_le_att_handle 
+300c c007300e beq mesh_proxy_data_in_handle ,ali_mesh_receive_ble_data_proxy_data_in 
+300d 20600000 rtn 
+
+ali_mesh_receive_ble_data_proxy_data_in:
+300e 1a420400 copy regb ,temp 
+300f efe08011 ifetch 1 ,rega 
+3010 c0003012 beq mesh_proxy_message_type_network_pdu ,ali_mesh_network_layer_recevice_network_pdu_proxy_control 
+3011 20600000 rtn 
+
+ali_mesh_network_layer_recevice_network_pdu_proxy_control:
+3012 700a9702 jam mesh_message_proxy ,mem_mesh_network_packet_type_temp 
+3013 20202f3e branch ali_mesh_network_layer_recevice_network_pdu 
+
+ali_mesh_proxy_process_bb_event:
+3014 1a627e00 copy regc ,pdata 
+3015 c00ab279 beq bt_evt_le_disconnected ,app_ble_start_adv 
+3016 20600000 rtn 
+
+ali_mesh_send_ble_data:
+3017 20401b24 call le_fifo_check_nearly_full 
+3018 247a0000 nrtn blank 
+3019 6fe08a76 fetch 1 ,mem_mesh_queue_ele_len 
+301a 1fe0a3ff add pdata ,-1 ,rega 
+301b d8400010 arg mesh_proxy_data_out_handle ,temp 
+301c 20401e5f call le_att_malloc_tx_notify 
+301d 58000000 setarg mesh_proxy_message_type_network_pdu 
+301e e7e08005 istore 1 ,contw 
+301f d8c00a79 arg mem_mesh_queue_ele_payload + 2 ,contr 
+3020 20207d7d branch memcpy32 
+
+ali_mesh_upper_transport_layer_receive_unsegmented_access_message:
+3021 c3033024 bbit0 transport_head_bit_akf ,ali_mesh_uuper_transport_layer_decrypt_unsegment_access_by_device_key 
+
+ali_mesh_uuper_transport_layer_decrypt_unsegment_access_by_application_key:
+3022 2040304a call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key 
+3023 20203026 branch ali_mesh_upper_transport_layer_decrypt_unsegmented_message 
+
+ali_mesh_uuper_transport_layer_decrypt_unsegment_access_by_device_key:
+3024 20403057 call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key 
+3025 20203026 branch ali_mesh_upper_transport_layer_decrypt_unsegmented_message 
+
+ali_mesh_upper_transport_layer_decrypt_unsegmented_message:
+3026 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+3027 1fe0fff9 pincrease -7 
+3028 de000c15 arg mem_mesh_message_transport_unsegmented_access_messagepdu ,alarm 
+3029 20407ec7 call disable_user 
+302a 20203038 branch ali_mesh_upper_transport_layer_decrypt_message 
+
+ali_mesh_upper_transport_layer_receive_segmented_access_message:
+302b 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+302c c303302f bbit0 transport_head_bit_akf ,ali_mesh_uuper_transport_layer_decrypt_segment_access_by_device_key 
+
+ali_mesh_uuper_transport_layer_decrypt_segment_access_by_application_key:
+302d 2040304a call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key 
+302e 20203031 branch ali_mesh_upper_transport_layer_decrypt_segmented_message 
+
+ali_mesh_uuper_transport_layer_decrypt_segment_access_by_device_key:
+302f 20403057 call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key 
+3030 20203031 branch ali_mesh_upper_transport_layer_decrypt_segmented_message 
+
+ali_mesh_upper_transport_layer_decrypt_segmented_message:
+3031 6fe0cb29 fetch 1 ,mem_mesh_aszmic 
+3032 245a7ec5 ncall enable_user ,blank 
+3033 205a7ec7 call disable_user ,blank 
+3034 6fe0ca26 fetch 1 ,mem_mesh_segmented_access_message_current_length 
+3035 1fe0fffc pincrease -4 
+3036 704a2600 jam 0 ,mem_mesh_segmented_access_message_current_length 
+3037 de004bc6 arg mem_mesh_segmented_access_message_segment ,alarm 
+
+ali_mesh_upper_transport_layer_decrypt_message:
+3038 1e020400 copy alarm ,temp 
+3039 20403044 call ali_mesh_upper_transport_layer_decrypt_message_decrypt_transmic 
+303a 24628000 nrtn zero 
+303b df200001 arg 1 ,loopcnt 
+303c da200be0 arg mem_ccm_data_len ,rega 
+303d da400040 arg mesh_upper_receive_packet ,regb 
+303e 204029e6 call logging_tx_info 
+303f 20403047 call ali_mesh_upper_transport_layer_check_transport_mic_cache 
+3040 24740000 nrtn user 
+3041 6fe10be1 fetch 2 ,mem_ccm_data_ptr 
+3042 1fe26000 copy pdata ,alarm 
+3043 20202735 branch ali_mesh_access_layer_resolve_message 
+
+ali_mesh_upper_transport_layer_decrypt_message_decrypt_transmic:
+3044 24342c09 nbranch ali_ccm_decrypt ,user 
+3045 1fe0fffc pincrease -4 
+3046 20202c07 branch ali_ccm_decrypt_64bit 
+
+ali_mesh_upper_transport_layer_check_transport_mic_cache:
+3047 58004b2a setarg mem_mesh_access_message_mic_cache 
+3048 67e10bfd store 2 ,mem_mesh_mic_cache_ptr 
+3049 20202978 branch ali_mesh_base_adt_cache 
+
+ali_mesh_upper_transport_layer_load_application_nonce_and_application_key:
+304a 2040304d call ali_mesh_upper_transport_layer_load_application_nonce 
+
+ali_mesh_upper_transport_layer_load_application_key:
+304b d8c04b19 arg mem_mesh_application_key ,contr 
+304c 20206e26 branch load_key 
+
+ali_mesh_upper_transport_layer_load_application_nonce:
+304d d8a00c28 arg mem_mesh_application_nonce ,contw 
+304e 58000001 setarg application_nonce 
+304f e7e08005 istore 1 ,contw 
+3050 6fe0cb29 fetch 1 ,mem_mesh_aszmic 
+3051 d8400000 arg 0 ,temp 
+3052 7d3a0407 nsetflag blank ,7 ,temp 
+3053 e0408005 istoret 1 ,contw 
+3054 6fe38c0d fetch 7 ,mem_mesh_message_seq 
+3055 e7e38005 istore 7 ,contw 
+3056 20202fe9 branch mesh_generate_nonce 
+
+ali_mesh_upper_transport_layer_load_device_nonce_and_device_key:
+3057 2040305a call ali_mesh_upper_transport_layer_load_device_nonce 
+
+ali_mesh_upper_transport_layer_load_device_key:
+3058 d8c04827 arg mem_mesh_device_key ,contr 
+3059 20206e26 branch load_key 
+
+ali_mesh_upper_transport_layer_load_device_nonce:
+305a d8a00c28 arg mem_mesh_device_nonce ,contw 
+305b 58000002 setarg device_nonce 
+305c 2020304f branch ali_mesh_upper_transport_layer_load_application_nonce + 2 
+
+ali_mesh_upper_transport_layer_send_access_message:
+
+ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer:
+305d 477fc03f bpatchx patch3f_7 ,mem_patch3f 
+305e 2040314b call ali_mesh_upper_transport_layer_clear_tx_buffer 
+305f 2040314c call ali_mesh_loggint_tx_info_upper_send_packet 
+3060 2040311b call ali_mesh_upper_transport_layer_send_access_message_add_nid_src_ttl_seq_dst 
+3061 20403066 call ali_mesh_upper_transport_layer_store_packet_header 
+3062 20740000 rtn user 
+3063 2040307e call ali_mesh_upper_transport_layer_store_unsegment_msg_original_access_pdu 
+3064 da200c43 arg mem_mesh_upper_tran_layer_queue_temp ,rega 
+3065 202079aa branch queue_push 
+
+ali_mesh_upper_transport_layer_store_packet_header:
+3066 20407ec7 call disable_user 
+3067 d8400002 arg upper_retry_count_status ,temp 
+3068 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+3069 98408400 iadd temp ,temp 
+306a 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+306b 1fe67c02 sub pdata ,mesh_message_proxy ,null 
+306c 79228407 setflag zero ,bit_upper_flag_proxy_control ,temp 
+306d 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+306e 1fe67c01 sub pdata ,mesh_message_app ,null 
+306f 79228406 setflag zero ,bit_upper_flag_app_control ,temp 
+3070 60488c43 storet 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+3071 6fe4cb58 fetch 9 ,mem_mesh_send_upper_layer_ivi_and_nid 
+3072 67e48c47 store 9 ,mem_mesh_upper_tran_layer_temp_packet_header_ivi_nid 
+3073 6fe08a10 fetch 1 ,mem_mesh_access_layer_payload_vendor_command 
+3074 c1ea0000 rtnne vendor_message_attr_indication 
+3075 6fe0c96b fetch 1 ,mem_mesh_provisioned_flag 
+3076 c0807ec5 bne paired_status ,enable_user 
+3077 6fe08a13 fetch 1 ,mem_mesh_access_layer_payload_vendor_tid 
+3078 67e08c46 store 1 ,mem_mesh_upper_tran_layer_temp_packet_tid 
+3079 6fe08c43 fetch 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+307a 1fe0fe01 pincrease upper_retry_count_indication 
+307b 79207e05 set1 bit_upper_flag_vendor_indication ,pdata 
+307c 67e08c43 store 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+307d 20600000 rtn 
+
+ali_mesh_upper_transport_layer_store_unsegment_msg_original_access_pdu:
+307e 6fe08a0f fetch 1 ,mem_mesh_access_layer_payload_len 
+307f 1fe27200 copy pdata ,loopcnt 
+3080 67e08c50 store 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+3081 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+3082 67e08c51 store 1 ,mem_mesh_upper_tran_layer_temp_pakcet_akf_aid 
+3083 d8a00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contw 
+3084 d8c00a10 arg mem_mesh_access_layer_payload ,contr 
+3085 20207dd4 branch memcpy 
+
+ali_mesh_upper_transport_layer_control_packet:
+3086 da603088 arg ali_mesh_upper_transport_layer_control_packet_deal ,regc 
+3087 20202e1f branch ali_mesh_check_all_element_info 
+
+ali_mesh_upper_transport_layer_control_packet_deal:
+3088 1a208c16 add rega ,element_device_upper_adv_flag ,contr 
+3089 efe08006 ifetch 1 ,contr 
+308a 247a0000 nrtn blank 
+308b efe10006 ifetch 2 ,contr 
+308c 67e1448c store 2 ,mem_queue_ptr 
+308d da200c43 arg mem_mesh_upper_tran_layer_queue_temp ,rega 
+308e 204079d2 call queue_get_new_ele 
+308f 24740000 nrtn user 
+3090 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+3091 68488c43 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+3092 18417e0f and temp ,data_upper_flag_max_retry_count ,pdata 
+3093 203a30ca branch ali_mesh_upper_transport_layer_queue_pop ,blank 
+3094 1a208a16 add rega ,element_device_upper_adv_flag ,contw 
+3095 58000001 setarg packet_in_bearer 
+3096 e7e08005 istore 1 ,contw 
+3097 204030b4 call ali_mesh_upper_transport_layer_control_packet_load_header 
+3098 68488c43 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+3099 204030ba call ali_mesh_upper_transport_layer_control_packet_load_app_control 
+309a 1a208a19 add rega ,element_device_tran_package_tid ,contw 
+309b e7e08005 istore 1 ,contw 
+309c 1a208c1a add rega ,element_device_tran_package_type ,contr 
+309d efe08006 ifetch 1 ,contr 
+309e 284ffe07 isolate1 bit_upper_flag_proxy_control ,temp 
+309f 7920fe02 setflag true ,bit_uuper_tran_proxy_message ,pdata 
+30a0 1a208a1a add rega ,element_device_tran_package_type ,contw 
+30a1 e7e08005 istore 1 ,contw 
+30a2 79200404 set1 bit_upper_flag_retransmit ,temp 
+30a3 184085ff increase -1 ,temp 
+30a4 e0408012 istoret 1 ,regb 
+30a5 68488c43 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+30a6 284ffe04 isolate1 bit_upper_flag_retransmit ,temp 
+30a7 2420b0cf nbranch ali_mesh_upper_transport_layer_control_packet_encrypt_access ,true 
+30a8 68488c50 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+30a9 60488a0f storet 1 ,mem_mesh_upper_transport_layer_payload_len 
+30aa 18427200 copy temp ,loopcnt 
+30ab d8a00a10 arg mem_mesh_access_layer_payload ,contw 
+30ac d8c00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contr 
+30ad 20407dd4 call memcpy 
+30ae 18467c0f sub temp ,unsegmented_access_message_max_upper_transport_access_pdu_len ,null 
+30af 242130b1 nbranch ali_mesh_upper_transport_layer_control_packet_segment_msg ,positive 
+
+ali_mesh_upper_transport_layer_control_packet_unsegment_msg:
+30b0 20202e82 branch ali_mesh_lower_transport_layer_send_unsegmented_access_message 
+
+ali_mesh_upper_transport_layer_control_packet_segment_msg:
+30b1 6fe20c52 fetch 4 ,mem_mesh_upper_tran_layer_temp_segmented_pakcet_seqzero 
+30b2 67e20c3e store 4 ,mem_mesh_segmented_lower_transport_layer_segzero 
+30b3 202030f0 branch ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer 
+
+ali_mesh_upper_transport_layer_control_packet_load_header:
+30b4 6fe08c51 fetch 1 ,mem_mesh_upper_tran_layer_temp_pakcet_akf_aid 
+30b5 67e08c14 store 1 ,mem_mesh_message_transport_head 
+30b6 6fe48c47 fetch 9 ,mem_mesh_upper_tran_layer_temp_packet_header_ivi_nid 
+30b7 67e4cb58 store 9 ,mem_mesh_send_upper_layer_ivi_and_nid 
+30b8 67e48c0b store 9 ,mem_mesh_message_nid 
+30b9 20600000 rtn 
+
+ali_mesh_upper_transport_layer_control_packet_load_app_control:
+30ba 58000003 setarg upper_tran_tmall_and_app 
+30bb 204030c7 call ali_mesh_store_tran_package_type 
+30bc 6fe08c46 fetch 1 ,mem_mesh_upper_tran_layer_temp_packet_tid 
+30bd 284ffe05 isolate1 bit_upper_flag_vendor_indication ,temp 
+30be 20608000 rtn true 
+30bf 58000001 setarg upper_tran_tmall_message 
+30c0 204030c7 call ali_mesh_store_tran_package_type 
+30c1 58000000 setarg 0 
+30c2 284ffe06 isolate1 bit_upper_flag_app_control ,temp 
+30c3 24608000 nrtn true 
+30c4 58000002 setarg upper_tran_app_message 
+30c5 204030c7 call ali_mesh_store_tran_package_type 
+30c6 20207ed1 branch enable_blank 
+
+ali_mesh_store_tran_package_type:
+30c7 1a208a1a add rega ,element_device_tran_package_type ,contw 
+30c8 e7e08005 istore 1 ,contw 
+30c9 20600000 rtn 
+
+ali_mesh_upper_transport_layer_queue_pop:
+30ca 58000000 setarg 0 
+30cb 1a208a19 add rega ,element_device_tran_package_tid ,contw 
+30cc e7e08005 istore 1 ,contw 
+30cd da200c43 arg mem_mesh_upper_tran_layer_queue_temp ,rega 
+30ce 202079c1 branch queue_pop 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access:
+30cf 20403113 call ali_mesh_upper_transport_layer_send_access_message_calc_seq 
+30d0 20403127 call ali_mesh_upper_transport_layer_send_access_message_add_seq 
+30d1 6fe4cb58 fetch 9 ,mem_mesh_send_upper_layer_ivi_and_nid 
+30d2 67e48c47 store 9 ,mem_mesh_upper_tran_layer_temp_packet_header_ivi_nid 
+30d3 204030e8 call ali_mesh_upper_transport_layer_control_packet_encrypt_access_load_payload 
+30d4 58000000 setarg 0 
+30d5 67e0cb29 store 1 ,mem_mesh_aszmic 
+30d6 20403109 call ali_mesh_upper_transport_layer_calc_transport_mic 
+30d7 68488a0f fetcht 1 ,mem_mesh_upper_transport_layer_payload_len 
+30d8 60488c50 storet 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+30d9 18427200 copy temp ,loopcnt 
+30da d8c00a10 arg mem_mesh_access_layer_payload ,contr 
+30db d8a00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contw 
+30dc 20407dd4 call memcpy 
+30dd 18467c0f sub temp ,unsegmented_access_message_max_upper_transport_access_pdu_len ,null 
+30de 242130e2 nbranch ali_mesh_upper_transport_layer_control_packet_encrypt_access_segment_msg ,positive 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_unsegment_msg:
+30df da200c44 arg mem_mesh_upper_tran_layer_temp_packet_transmit_delay ,rega 
+30e0 204079e1 call queue_store_new_ele 
+30e1 20202e82 branch ali_mesh_lower_transport_layer_send_unsegmented_access_message 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_segment_msg:
+30e2 2040312f call ali_mesh_upper_transport_layer_send_segmented_access_message_get_seqzero_segon 
+30e3 6fe20c3e fetch 4 ,mem_mesh_segmented_lower_transport_layer_segzero 
+30e4 67e20c52 store 4 ,mem_mesh_upper_tran_layer_temp_segmented_pakcet_seqzero 
+30e5 da200c44 arg mem_mesh_upper_tran_layer_temp_packet_transmit_delay ,rega 
+30e6 204079e1 call queue_store_new_ele 
+30e7 202030f0 branch ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_load_payload:
+30e8 6fe08c50 fetch 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+30e9 1fe27200 copy pdata ,loopcnt 
+30ea 67e08a0f store 1 ,mem_mesh_access_layer_payload_len 
+30eb 6fe08c51 fetch 1 ,mem_mesh_upper_tran_layer_temp_pakcet_akf_aid 
+30ec 67e08c14 store 1 ,mem_mesh_message_transport_head 
+30ed d8c00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contr 
+30ee d8a00a10 arg mem_mesh_access_layer_payload ,contw 
+30ef 20207dd4 branch memcpy 
+
+ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer:
+30f0 2040313c call ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header 
+30f1 58000a10 setarg mem_mesh_access_payload 
+30f2 67e10c3b store 2 ,mem_mesh_upper_transport_layer_payload_ptr 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_loop:
+30f3 204030b4 call ali_mesh_upper_transport_layer_control_packet_load_header 
+30f4 20403113 call ali_mesh_upper_transport_layer_send_access_message_calc_seq 
+30f5 20403127 call ali_mesh_upper_transport_layer_send_access_message_add_seq 
+30f6 68488a0f fetcht 1 ,mem_mesh_access_layer_payload_len 
+30f7 5800000c setarg segmented_access_message_unint_pdu_len 
+30f8 20407ebb call not_greater_than 
+30f9 1fe22200 copy pdata ,rega 
+30fa 18427e00 copy temp ,pdata 
+30fb 9a267e00 isub rega ,pdata 
+30fc 67e08a0f store 1 ,mem_mesh_access_layer_payload_len 
+30fd 6fe10c3b fetch 2 ,mem_mesh_upper_transport_layer_payload_ptr 
+30fe 1fe20c00 copy pdata ,contr 
+30ff 9a208400 iadd rega ,temp 
+3100 60490c3b storet 2 ,mem_mesh_upper_transport_layer_payload_ptr 
+3101 20402e8c call ali_mesh_lower_transport_layer_send_segmented_access_message 
+3102 6fe08a0f fetch 1 ,mem_mesh_access_layer_payload_len 
+3103 207a0000 rtn blank 
+3104 6fe08c40 fetch 1 ,mem_mesh_segmented_lower_transport_layer_sego 
+3105 1fe0fe01 pincrease 1 
+3106 67e08c40 store 1 ,mem_mesh_segmented_lower_transport_layer_sego 
+3107 2040313c call ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header 
+3108 202030f3 branch ali_mesh_upper_transport_layer_send_segmented_access_message_loop 
+
+ali_mesh_upper_transport_layer_calc_transport_mic:
+3109 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+310a c303310d bbit0 transport_head_bit_akf ,ali_mesh_upper_transport_layer_calc_transport_mic_by_devicekey 
+
+ali_mesh_upper_transport_layer_calc_transport_mic_by_appkey:
+310b 2040304a call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key 
+310c 2020310e branch ali_mesh_upper_transport_layer_calc_transport_mic_encrypt_aesccm 
+
+ali_mesh_upper_transport_layer_calc_transport_mic_by_devicekey:
+310d 20403057 call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key 
+
+ali_mesh_upper_transport_layer_calc_transport_mic_encrypt_aesccm:
+310e 6fe08a0f fetch 1 ,mem_mesh_access_layer_payload_len 
+310f 1fe08404 add pdata ,4 ,temp 
+3110 60488a0f storet 1 ,mem_mesh_upper_transport_layer_payload_len 
+3111 d8400a10 arg mem_mesh_access_layer_payload ,temp 
+3112 20202be8 branch ali_ccm_encrypt 
+
+ali_mesh_upper_transport_layer_send_access_message_calc_seq:
+3113 6fe1cb52 fetch 3 ,mem_mesh_send_message_seq 
+3114 1fe0fe01 pincrease 1 
+3115 67e1cb52 store 3 ,mem_mesh_send_message_seq 
+3116 6fe0c98f fetch 1 ,mem_mesh_gatt_package_send_msg_id 
+3117 1fe0fe01 pincrease 1 
+3118 67e0c98f store 1 ,mem_mesh_gatt_package_send_msg_id 
+3119 6fe14a0f fetch 2 ,mem_mesh_cb_seq_changed 
+311a 20207e7a branch callback_func 
+
+ali_mesh_upper_transport_layer_send_access_message_add_nid_src_ttl_seq_dst:
+311b 6fe0ca31 fetch 1 ,mem_mesh_iv_index + 3 
+311c 1ff27e00 lshift4 pdata ,pdata 
+311d 1fe9fe00 lshift3 pdata ,pdata 
+311e 6848c8d4 fetcht 1 ,mem_k2_nid 
+311f 9841fe00 ior temp ,pdata 
+3120 67e0cb58 store 1 ,mem_mesh_send_upper_layer_ivi_and_nid 
+3121 6fe0cb57 fetch 1 ,mem_mesh_send_message_ttl 
+3122 67e0cb59 store 1 ,mem_mesh_send_upper_layer_ctl_and_ttl 
+3123 6fe14b55 fetch 2 ,mem_mesh_send_message_src 
+3124 67e14b5d store 2 ,mem_mesh_send_upper_layer_src 
+3125 6fe10c35 fetch 2 ,mem_mesh_send_message_dst 
+3126 67e14b5f store 2 ,mem_mesh_send_upper_layer_dst 
+
+ali_mesh_upper_transport_layer_send_access_message_add_seq:
+3127 6fe1cb52 fetch 3 ,mem_mesh_send_message_seq 
+3128 67e1cb5a store 3 ,mem_mesh_send_upper_layer_seq 
+3129 da204b5a arg mem_mesh_send_upper_layer_seq ,rega 
+312a df200003 arg 3 ,loopcnt 
+312b 20407dac call inverse_data 
+312c 6fe44b59 fetch 8 ,mem_mesh_send_upper_layer_ctl_and_ttl 
+312d 67e40c0c store 8 ,mem_mesh_message_ttl 
+312e 20600000 rtn 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_get_seqzero_segon:
+312f 6fe08a0f fetch 1 ,mem_mesh_upper_transport_layer_payload_len 
+3130 1fe6fc0c div pdata ,segmented_access_message_unint_pdu_len 
+3131 20407e64 call wait_div_end 
+3132 18078400 quotient temp 
+3133 18077e00 remainder pdata 
+3134 205a3149 call ali_mesh_upper_transport_layer_send_segmented_access_message_sub_segn_one ,blank 
+3135 60488c41 storet 1 ,mem_mesh_segmented_lower_transport_layer_segn 
+3136 700c4000 jam 0 ,mem_mesh_segmented_lower_transport_layer_sego 
+3137 6fe1cb52 fetch 3 ,mem_mesh_send_message_seq 
+3138 d8401fff arg 0x1fff ,temp 
+3139 98417e00 iand temp ,pdata 
+313a 67e10c3e store 2 ,mem_mesh_segmented_lower_transport_layer_segzero 
+313b 20600000 rtn 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header:
+313c 6fe10c3e fetch 2 ,mem_mesh_segmented_lower_transport_layer_segzero 
+313d 1ff27e00 lshift4 pdata ,pdata 
+313e 1fe3fe00 lshift pdata ,pdata 
+313f 68488c40 fetcht 1 ,mem_mesh_segmented_lower_transport_layer_sego 
+3140 9841fe00 ior temp ,pdata 
+3141 1ff27e00 lshift4 pdata ,pdata 
+3142 1fe3fe00 lshift pdata ,pdata 
+3143 68488c41 fetcht 1 ,mem_mesh_segmented_lower_transport_layer_segn 
+3144 9841fe00 ior temp ,pdata 
+3145 67e1cb62 store 3 ,mem_mesh_segmented_access_lower_transport_layer_szmic_seqzero_sego_segn 
+3146 df200003 arg 3 ,loopcnt 
+3147 da204b62 arg mem_mesh_segmented_access_lower_transport_layer_szmic_seqzero_sego_segn ,rega 
+3148 20207dac branch inverse_data 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_sub_segn_one:
+3149 184085ff increase -1 ,temp 
+314a 20600000 rtn 
+
+ali_mesh_upper_transport_layer_clear_tx_buffer:
+314b 20600000 rtn 
+
+ali_mesh_loggint_tx_info_upper_send_packet:
+314c da200a10 arg mem_mesh_access_layer_payload ,rega 
+314d 6f208a0f fetchr loopcnt ,1 ,mem_mesh_access_layer_payload_len 
+314e da400041 arg mesh_upper_send_packet ,regb 
+314f 202029e6 branch logging_tx_info 
+
+app_init:
+3150 44d6c015 bpatch patch15_5 ,mem_patch15 
+3151 6fe0c09a fetch 1 ,mem_device_option 
+3152 203a3150 branch app_init ,blank 
+3153 c002369a beq dvc_op_dongle ,dongle_init 
+3154 c007b2b9 beq dvc_op_antilost ,antilost_init 
+3155 c004cb23 beq dvc_op_shutter ,shutter_init 
+3156 c0053814 beq dvc_op_module ,module_init 
+3157 c007345e beq dvc_op_car ,car_init 
+3158 c006ca0d beq dvc_op_remote_car ,remote_car_init 
+3159 c0064d18 beq dvc_op_hci_boot ,hci_init 
+315a c005ade8 beq dvc_op_ali_mesh ,ali_mesh_init 
+315b c0043c75 beq dvc_op_mouse ,mouse_init 
+315c 20600000 rtn 
+
+app_lpm_init:
+315d 700a5100 jam 0 ,mem_tester_emulate 
+315e 7000e300 jam 0 ,mem_debug_config 
+315f 7000e400 jam 0 ,mem_lch_code 
+3160 58000000 setarg 0 
+3161 67e28870 store 5 ,mem_sp_state_start 
+3162 6fe0c09a fetch 1 ,mem_device_option 
+3163 203a315d branch app_lpm_init ,blank 
+3164 c005383d beq dvc_op_module ,module_lpm_init 
+
+app_lpm_init0:
+3165 20600000 rtn 
+
+app_param_init:
+3166 20758000 rtn wake 
+3167 20405cb7 call app_read_efuse_sys_config 
+3168 20405cc0 call app_read_efuse_dig_aon_vsel 
+3169 20405cc6 call app_read_efuse_syn_afc_cfg1 
+316a 20405ccb call app_read_efuse_rf_ldo_cfg1 
+316b 20405cd1 call app_read_efuse_rc_cal 
+316c 20405cd5 call app_read_efuse_agc 
+316d 20406150 call adc_init_data 
+316e 6fe0c09a fetch 1 ,mem_device_option 
+316f c004cc62 beq dvc_op_shutter ,shutter_default_init 
+3170 c00236a5 beq dvc_op_dongle ,dongle_default_init 
+3171 c0043cb8 beq dvc_op_mouse ,mouse_default_init 
+3172 c006cadd beq dvc_op_remote_car ,remote_car_default_init 
+3173 20600000 rtn 
+
+app_sys_param_init:
+3174 7041efff jam 0xff ,mem_rf_init_data 
+3175 580041ef setarg mem_rf_init_data 
+3176 67e140ca store 2 ,mem_rf_init_ptr 
+3177 704793ff jam 0xff ,mem_ui_button_gpio 
+3178 70417a88 jam 0x88 ,mem_lpm_xtal_ib 
+3179 70417cce jam 0xce ,mem_lpm_padding 
+317a 20600000 rtn 
+
+app_process_idle:
+317b 20407824 call ui_dispatch 
+317c 204078f2 call check_51cmd 
+317d 20403184 call app_process_bb_event 
+317e 6fe14465 fetch 2 ,mem_cb_idle_process 
+317f 20207e7a branch callback_func 
+
+app_process_bt:
+3180 6fe14463 fetch 2 ,mem_cb_bt_process 
+3181 20207e7a branch callback_func 
+
+app_process_ble:
+3182 6fe14461 fetch 2 ,mem_cb_le_process 
+3183 20207e7a branch callback_func 
+
+app_process_bb_event:
+3184 44d74015 bpatch patch15_6 ,mem_patch15 
+3185 da204775 arg mem_ipc_fifo_bt2c51 ,rega 
+3186 20407ea2 call fifo_out 
+3187 207a0000 rtn blank 
+3188 1fe22600 copy pdata ,regc 
+3189 2040318d call app_event_normal_process 
+318a 202031b2 branch app_process_bb_event_priority 
+
+app_discard_event:
+318b da600000 arg 0 ,regc 
+318c 20600000 rtn 
+
+app_event_normal_process:
+318d c000b19f beq bt_evt_bb_connected ,app_evt_bt_conn 
+318e c00831e6 beq bt_evt_button_long_pressed ,app_evt_button_long_pressed 
+318f c002b1c3 beq bt_evt_setup_complete ,app_evt_setup_complete 
+3190 c00931ca beq bt_evt_hid_handshake ,app_evt_hid_handshake 
+3191 c00331e2 beq bt_evt_hid_connected ,app_bb_event_hid_connected 
+3192 c0023223 beq bt_evt_reconn_failed ,app_bb_event_reconn_failed 
+3193 c0013228 beq bt_evt_bb_disconnected ,app_bb_event_bb_disconn 
+3194 c009b223 beq bt_evt_reconn_page_timeout ,app_bb_event_reconn_failed 
+3195 c00a31d9 beq bt_evt_le_connected ,app_le_event_bb_connected 
+3196 c00ab1dd beq bt_evt_le_disconnected ,app_le_event_bb_disconn 
+3197 c001b1bc beq bt_evt_reconn_started ,app_event_reconn_start 
+3198 c005b1ce beq bt_evt_enter_sniff ,app_event_enter_sniff 
+3199 c00631d5 beq bt_evt_exit_sniff ,app_event_exit_sniff 
+319a c00b31ea beq bt_evt_ml2cap_conn_refused ,app_event_ml2cap_conn_refused 
+319b c00c31b8 beq bt_evt_linkkey_generate ,app_event_linkkey_generate 
+319c c01531a8 beq bt_evt_switch_fail_master ,app_event_switch_fail_master 
+319d c015b1a6 beq bt_evt_switch_success_master ,app_event_switch_success 
+319e 20600000 rtn 
+
+app_evt_bt_conn:
+319f 6fe1478f fetch 2 ,mem_ui_state_map 
+31a0 79207e00 set1 ui_state_bt_connected ,pdata 
+31a1 67e1478f store 2 ,mem_ui_state_map 
+31a2 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31a3 793ffe00 set0 app_disc_by_button ,pdata 
+31a4 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31a5 20207934 branch check_51cmd_stop_discovery 
+
+app_event_switch_success:
+31a6 70030c00 jam 0 ,mem_switch_fail_master_count 
+31a7 20600000 rtn 
+
+app_event_switch_fail_master:
+31a8 6fe0830c fetch 1 ,mem_switch_fail_master_count 
+31a9 1fe0fe01 increase 1 ,pdata 
+31aa 67e0830c store 1 ,mem_switch_fail_master_count 
+31ab 1fe67c01 sub pdata ,1 ,null 
+31ac 2021325e branch app_bt_role_switch ,positive 
+31ad 70030c00 jam 0 ,mem_switch_fail_master_count 
+31ae 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31af 79207e09 set1 app_disc_switch_fail ,pdata 
+31b0 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31b1 20203268 branch app_bt_disconnect 
+
+app_process_bb_event_priority:
+31b2 6fe14467 fetch 2 ,mem_cb_bb_event_process 
+31b3 20207e7a branch callback_func 
+
+app_check_wake_lock:
+31b4 6fe1445b fetch 2 ,mem_cb_check_wakelock 
+31b5 20207e7a branch callback_func 
+
+app_will_enter_lpm:
+31b6 6fe1445f fetch 2 ,mem_cb_before_lpm 
+31b7 20207e7a branch callback_func 
+
+app_event_linkkey_generate:
+31b8 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31b9 79207e01 set1 app_disc_after_pairing ,pdata 
+31ba 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31bb 20203291 branch app_bt_store_reconn_info 
+
+app_event_reconn_start:
+31bc 6fe1478f fetch 2 ,mem_ui_state_map 
+31bd 79207e07 set1 ui_state_bt_reconnect ,pdata 
+31be 67e1478f store 2 ,mem_ui_state_map 
+31bf 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31c0 79207e02 set1 app_disc_after_reconn ,pdata 
+31c1 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31c2 20600000 rtn 
+
+app_evt_setup_complete:
+31c3 6fe1478f fetch 2 ,mem_ui_state_map 
+31c4 79207e01 set1 ui_state_bt_setup_complete ,pdata 
+31c5 67e1478f store 2 ,mem_ui_state_map 
+31c6 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31c7 79207e04 set1 app_disc_after_setup_done ,pdata 
+31c8 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31c9 20600000 rtn 
+
+app_evt_hid_handshake:
+31ca 6fe1478f fetch 2 ,mem_ui_state_map 
+31cb 79207e03 set1 ui_state_bt_hid_handshake ,pdata 
+31cc 67e1478f store 2 ,mem_ui_state_map 
+31cd 20600000 rtn 
+
+app_event_enter_sniff:
+31ce 6fe1478f fetch 2 ,mem_ui_state_map 
+31cf 79207e05 set1 ui_state_bt_sniff ,pdata 
+31d0 67e1478f store 2 ,mem_ui_state_map 
+31d1 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31d2 79207e03 set1 app_disc_after_sniff ,pdata 
+31d3 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31d4 20600000 rtn 
+
+app_event_exit_sniff:
+31d5 6fe1478f fetch 2 ,mem_ui_state_map 
+31d6 793ffe05 set0 ui_state_bt_sniff ,pdata 
+31d7 67e1478f store 2 ,mem_ui_state_map 
+31d8 20600000 rtn 
+
+app_le_event_bb_connected:
+31d9 6fe1478f fetch 2 ,mem_ui_state_map 
+31da 79207e09 set1 ui_state_ble_connected ,pdata 
+31db 67e1478f store 2 ,mem_ui_state_map 
+31dc 20600000 rtn 
+
+app_le_event_bb_disconn:
+31dd 70443500 jam 0 ,mem_le_l2cap_att_states 
+31de 6fe1478f fetch 2 ,mem_ui_state_map 
+31df 793ffe09 set0 ui_state_ble_connected ,pdata 
+31e0 67e1478f store 2 ,mem_ui_state_map 
+31e1 20203297 branch app_lpm_mult_disable 
+
+app_bb_event_hid_connected:
+31e2 6fe1478f fetch 2 ,mem_ui_state_map 
+31e3 79207e02 set1 ui_state_bt_hid_conn ,pdata 
+31e4 67e1478f store 2 ,mem_ui_state_map 
+31e5 20600000 rtn 
+
+app_evt_button_long_pressed:
+31e6 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31e7 79207e00 set1 app_disc_by_button ,pdata 
+31e8 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31e9 20600000 rtn 
+
+app_event_ml2cap_conn_refused:
+31ea 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31eb 79207e08 set1 app_disc_l2cap_refused ,pdata 
+31ec 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31ed 20203268 branch app_bt_disconnect 
+
+app_evt_timer:
+31ee 67e0830d store 1 ,mem_app_evt_timer_count 
+
+app_evt_100ms_loop:
+31ef 44d7c015 bpatch patch15_7 ,mem_patch15 
+31f0 6fe0830d fetch 1 ,mem_app_evt_timer_count 
+31f1 207a0000 rtn blank 
+31f2 1fe0ffff increase -1 ,pdata 
+31f3 67e0830d store 1 ,mem_app_evt_timer_count 
+31f4 20407830 call ui_button_polling 
+31f5 20403255 call app_lpm_wake_auto_lock_timer 
+31f6 20403216 call app_unsniff_delay_timer 
+31f7 2040321c call app_discovery_timer 
+31f8 20405d7b call flash_write_spi_sm_timer 
+31f9 6fe1446f fetch 2 ,mem_cb_event_timer 
+31fa 20407e7a call callback_func 
+31fb 202031ef branch app_evt_100ms_loop 
+
+timer_single_step:
+31fc efe08013 ifetch 1 ,regc 
+31fd 207a0000 rtn blank 
+31fe 1fe0ffff pincrease -1 
+31ff e7e08013 istore 1 ,regc 
+3200 247a0000 nrtn blank 
+3201 1a427e00 copy regb ,pdata 
+3202 20207e7a branch callback_func 
+
+timer_single_step_2b:
+3203 efe10013 ifetch 2 ,regc 
+3204 207a0000 rtn blank 
+3205 1fe0ffff pincrease -1 
+3206 e7e10013 istore 2 ,regc 
+3207 247a0000 nrtn blank 
+3208 1a427e00 copy regb ,pdata 
+3209 20207e7a branch callback_func 
+
+app_power_timer:
+320a 684944cc fetcht 2 ,mem_power_param_ptr 
+320b 1840a601 add temp ,power_timer_offset ,regc 
+320c da40320e arg app_power_timer_timeout ,regb 
+320d 202031fc branch timer_single_step 
+
+app_power_timer_timeout:
+320e 204032ad call app_got_power_state_common 
+320f c000b211 beq power_starting ,app_enter_power_stanby_state 
+
+app_enter_power_off_state:
+3210 20203289 branch app_enter_hibernate 
+
+app_enter_power_stanby_state:
+3211 58000002 setarg power_standby 
+3212 e7e08013 istore 1 ,regc 
+3213 1840a408 add temp ,power_standby_cb_offset ,regb 
+
+app_power_cb_common:
+3214 efe10012 ifetch 2 ,regb 
+3215 20207e7a branch callback_func 
+
+app_unsniff_delay_timer:
+3216 da60447d arg mem_unsniff2sniff_timer_count ,regc 
+3217 da403219 arg app_unsniff_delay_timeout ,regb 
+3218 202031fc branch timer_single_step 
+
+app_unsniff_delay_timeout:
+3219 20400a5f call context_check_idle 
+321a 2022b28d branch app_bt_enter_sniff ,zero 
+321b 20600000 rtn 
+
+app_discovery_timer:
+321c da60478b arg mem_discovery_timeout_timer_count ,regc 
+321d da40321f arg app_discovery_timeout ,regb 
+321e 20203203 branch timer_single_step_2b 
+
+app_discovery_timeout:
+321f 2040326f call app_bt_stop_discovery 
+3220 20403287 call app_led_off 
+3221 6fe14469 fetch 2 ,mem_cb_discovry_timeout 
+3222 20207e7a branch callback_func 
+
+app_bb_event_reconn_failed:
+3223 2040323b call app_disconn_reason_flag_clear 
+
+app_clear_reconnect_flag:
+3224 6fe1478f fetch 2 ,mem_ui_state_map 
+3225 793ffe07 set0 ui_state_bt_reconnect ,pdata 
+3226 67e1478f store 2 ,mem_ui_state_map 
+3227 20600000 rtn 
+
+app_bb_event_bb_disconn:
+3228 70447d00 jam 0 ,mem_unsniff2sniff_timer_count 
+3229 6fe1478f fetch 2 ,mem_ui_state_map 
+322a c283b22d bbit1 ui_state_bt_reconnect ,app_bb_event_bb_reconn_disconn 
+322b 2fec0001 isolate0 ui_state_bt_setup_complete ,pdata 
+322c 2040b18b call app_discard_event ,true 
+
+app_bb_event_bb_reconn_disconn:
+322d 44d84016 bpatch patch16_0 ,mem_patch16 
+322e 6fe1478f fetch 2 ,mem_ui_state_map 
+322f 793ffe00 set0 ui_state_bt_connected ,pdata 
+3230 793ffe01 set0 ui_state_bt_setup_complete ,pdata 
+3231 793ffe02 set0 ui_state_bt_hid_conn ,pdata 
+3232 793ffe03 set0 ui_state_bt_hid_handshake ,pdata 
+3233 793ffe07 set0 ui_state_bt_reconnect ,pdata 
+3234 67e1478f store 2 ,mem_ui_state_map 
+3235 20203297 branch app_lpm_mult_disable 
+
+app_bb_hibernate:
+3236 20403238 call app_disconn_reason_clear 
+3237 20203289 branch app_enter_hibernate 
+
+app_disconn_reason_clear:
+3238 58000000 setarg 0 
+3239 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason 
+323a 20600000 rtn 
+
+app_disconn_reason_flag_clear:
+323b 58000000 setarg 0 
+323c 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+323d 20600000 rtn 
+
+app_disconn_reason_collect_bt:
+323e 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+323f 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason 
+3240 58000000 setarg 0 
+3241 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3242 20600000 rtn 
+
+app_disconn_reason_collect_ble:
+3243 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3244 79207e07 set1 app_disc_ble ,pdata 
+3245 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason 
+3246 58000000 setarg 0 
+3247 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3248 20600000 rtn 
+
+app_check_sniff:
+3249 6fe0c78f fetch 1 ,mem_ui_state_map 
+324a 2feffe05 isolate1 ui_state_bt_sniff ,pdata 
+324b 20600000 rtn 
+
+app_start_auto_sniff:
+324c 6fe0c644 fetch 1 ,mem_unsniff2sniff_timer 
+324d 67e0c47d store 1 ,mem_unsniff2sniff_timer_count 
+324e 20600000 rtn 
+
+app_get_lpm_wake_lock:
+324f d8e00009 arg wake_lock_app ,queue 
+3250 20201566 branch lpm_get_wake_lock 
+
+app_put_lpm_wake_lock:
+3251 d8e00009 arg wake_lock_app ,queue 
+3252 2020156a branch lpm_put_wake_lock 
+
+app_lpm_wake_auto_lock:
+3253 70447e05 jam lpm_wake_up_delay_timer ,mem_wake_up_delay_timer 
+3254 2020324f branch app_get_lpm_wake_lock 
+
+app_lpm_wake_auto_lock_timer:
+3255 da60447e arg mem_wake_up_delay_timer ,regc 
+3256 da403251 arg app_put_lpm_wake_lock ,regb 
+3257 202031fc branch timer_single_step 
+
+app_l2cap_flow_control_enable:
+3258 7045f601 jam l2cap_flow_ctrl_enable ,mem_l2cap_flow_ctrl_flag 
+3259 20600000 rtn 
+
+app_l2cap_flow_control_disable:
+325a 7045f600 jam l2cap_flow_ctrl_disable ,mem_l2cap_flow_ctrl_flag 
+325b 20600000 rtn 
+
+app_bt_set_pincode:
+325c 70095b0a jam bt_cmd_set_pin_code ,mem_fifo_temp 
+325d 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_role_switch:
+325e 70095b1d jam bt_cmd_role_switch ,mem_fifo_temp 
+325f 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_start_reconnect:
+3260 44d8c016 bpatch patch16_1 ,mem_patch16 
+3261 6fe0c47f fetch 1 ,mem_app_connection_options 
+3262 67e080bc store 1 ,mem_connection_options 
+3263 70030b01 jam app_flag_reconnect ,mem_reconnect_flag 
+3264 70095b03 jam bt_cmd_reconnect ,mem_fifo_temp 
+3265 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_reconnect_cancel:
+3266 70095b1e jam bt_cmd_bb_reconn_cancel ,mem_fifo_temp 
+3267 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_disconnect:
+3268 70095b04 jam bt_cmd_disconnect ,mem_fifo_temp 
+3269 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_start_discovery_short:
+326a 6fe14794 fetch 2 ,mem_discovery_timeout 
+326b 67e1478b store 2 ,mem_discovery_timeout_timer_count 
+
+app_bt_start_discovery_led_blink:
+326c 20403283 call app_led_start_blink 
+
+app_bt_start_discovery:
+326d 70095b01 jam bt_cmd_start_discovery ,mem_fifo_temp 
+326e 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_stop_discovery:
+326f 58000000 setarg 0 
+3270 67e1478b store 2 ,mem_discovery_timeout_timer_count 
+3271 70095b02 jam bt_cmd_stop_discovery ,mem_fifo_temp 
+3272 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_start_direct_adv:
+3273 70095b0f jam bt_cmd_start_direct_adv ,mem_fifo_temp 
+3274 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_stop_direct_adv:
+3275 70095b10 jam bt_cmd_stop_direct_adv ,mem_fifo_temp 
+3276 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_stop_adv:
+3277 70095b0e jam bt_cmd_stop_adv ,mem_fifo_temp 
+3278 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_start_adv:
+3279 70095b0d jam bt_cmd_start_adv ,mem_fifo_temp 
+327a 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_start_scan:
+327b 70095b17 jam bt_cmd_le_start_scan ,mem_fifo_temp 
+327c 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_stop_scan:
+327d 70095b18 jam bt_cmd_le_stop_scan ,mem_fifo_temp 
+327e 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_start_conn:
+327f 70095b16 jam bt_cmd_le_start_conn ,mem_fifo_temp 
+3280 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_disconnect:
+3281 70095b11 jam bt_cmd_le_disconnect ,mem_fifo_temp 
+3282 202078e5 branch ui_ipc_send_cmd 
+
+app_led_start_blink:
+3283 70095b15 jam bt_cmd_led_blink ,mem_fifo_temp 
+3284 202078e5 branch ui_ipc_send_cmd 
+
+app_led_on:
+3285 70095b14 jam bt_cmd_led_on ,mem_fifo_temp 
+3286 202078e5 branch ui_ipc_send_cmd 
+
+app_led_stop_blink:
+
+app_led_off:
+3287 70095b13 jam bt_cmd_led_off ,mem_fifo_temp 
+3288 202078e5 branch ui_ipc_send_cmd 
+
+app_enter_hibernate:
+3289 70095b19 jam bt_cmd_enter_hibernate ,mem_fifo_temp 
+328a 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_sniff_exit:
+328b 70095b06 jam bt_cmd_exit_sniff ,mem_fifo_temp 
+328c 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_enter_sniff:
+328d 70095b05 jam bt_cmd_enter_sniff ,mem_fifo_temp 
+328e 202078e5 branch ui_ipc_send_cmd 
+
+app_ble_store_reconn_info:
+328f 70095b1f jam bt_cmd_store_reconn_info_le ,mem_fifo_temp 
+3290 202078e5 branch ui_ipc_send_cmd 
+
+app_bt_store_reconn_info:
+3291 70095b20 jam bt_cmd_store_reconn_info_bt ,mem_fifo_temp 
+3292 202078e5 branch ui_ipc_send_cmd 
+
+app_store_reconn_info:
+3293 70095b25 jam bt_cmd_store_reconn_info ,mem_fifo_temp 
+3294 202078e5 branch ui_ipc_send_cmd 
+
+app_lpm_mult_enable:
+3295 7920000d set1 mark_lpm_mult_enable ,mark 
+3296 20600000 rtn 
+
+app_lpm_mult_disable:
+3297 793f800d set0 mark_lpm_mult_enable ,mark 
+3298 20600000 rtn 
+
+app_button_long_pressed:
+3299 204032ad call app_got_power_state_common 
+329a c00132a3 beq power_standby ,app_power_shutting_down 
+
+app_power_starting:
+329b 58000001 setarg power_starting 
+329c e7e08013 istore 1 ,regc 
+329d 1840a203 add temp ,power_starting_timeout_offset ,rega 
+329e 1840a406 add temp ,power_starting_cb_offset ,regb 
+
+app_power_common:
+329f e8408011 ifetcht 1 ,rega 
+32a0 1a60a601 increase 1 ,regc 
+32a1 e0408013 istoret 1 ,regc 
+32a2 20203214 branch app_power_cb_common 
+
+app_power_shutting_down:
+32a3 58000000 setarg power_off 
+32a4 e7e08013 istore 1 ,regc 
+32a5 6fe1478f fetch 2 ,mem_ui_state_map 
+32a6 c304b2a9 bbit0 ui_state_ble_connected ,app_power_off_end 
+32a7 20402134 call le_send_terminate_ind_user_terminated 
+32a8 20403281 call app_ble_disconnect 
+
+app_power_off_end:
+32a9 684944cc fetcht 2 ,mem_power_param_ptr 
+32aa 1840a202 add temp ,power_off_timeout_offset ,rega 
+32ab 1840a404 add temp ,power_off_cb_offset ,regb 
+32ac 2020329f branch app_power_common 
+
+app_got_power_state_common:
+32ad 684944cc fetcht 2 ,mem_power_param_ptr 
+32ae 1840a600 add temp ,power_state_offset ,regc 
+32af efe08013 ifetch 1 ,regc 
+32b0 20600000 rtn 
+
+app_event_button_up:
+32b1 204032ad call app_got_power_state_common 
+32b2 c08032b4 bne power_off ,app_power_release 
+32b3 20203289 branch app_enter_hibernate 
+
+app_power_release:
+32b4 1840a40a add temp ,ui_butten_up_cb_offset ,regb 
+32b5 20203214 branch app_power_cb_common 
+
+app_hid_connected:
+32b6 58000002 setarg hid_handshake_timeout 
+32b7 67e0c78d store 1 ,mem_hid_handshake_timer_count 
+32b8 20600000 rtn 
+
+antilost_init:
+32b9 20758000 rtn wake 
+32ba 580032e8 setarg antilost_le_before_hibernate 
+32bb 67e1445d store 2 ,mem_cb_before_hibernate 
+32bc 580061ff setarg keyscan_process_lpm_before 
+32bd 67e1445f store 2 ,mem_cb_before_lpm 
+32be 58003395 setarg antilost_idle_process 
+32bf 67e14465 store 2 ,mem_cb_idle_process 
+32c0 58003394 setarg antilost_le_conn_process 
+32c1 67e14461 store 2 ,mem_cb_le_process 
+32c2 58003303 setarg antilost_bb_event_process 
+32c3 67e14467 store 2 ,mem_cb_bb_event_process 
+32c4 58003340 setarg antilost_le_bb_event_timer 
+32c5 67e1446f store 2 ,mem_cb_event_timer 
+32c6 580032ea setarg antilost_le_notification 
+32c7 67e1446d store 2 ,mem_cb_ble_transmit 
+32c8 580032f5 setarg antilost_lpm_lock_process 
+32c9 67e1445b store 2 ,mem_cb_check_wakelock 
+32ca 580033a1 setarg antilost_le_receive_data_process 
+32cb 67e1446b store 2 ,mem_cb_att_write 
+32cc 44d94016 bpatch patch16_2 ,mem_patch16 
+32cd 2040343a call antilost_buzzer_pwm_init 
+32ce 204032e6 call antilost_set_ble_version 
+32cf 204061da call keyscan_key_init 
+32d0 2040344c call antilost_adc_init 
+32d1 2040785b call ui_led_init_global 
+32d2 20407826 call ui_button_init 
+32d3 580033ab setarg antilost_key_up_down 
+32d4 67e14873 store 2 ,mem_cb_antl_key 
+32d5 5800339c setarg antilost_power_off_cb 
+32d6 67e1486a store 2 ,mem_antl_power_off_cb 
+32d7 58003398 setarg antilost_power_starting_cb 
+32d8 67e1486c store 2 ,mem_antl_power_starting_cb 
+32d9 580032f1 setarg antilost_power_standby_cb 
+32da 67e1486e store 2 ,mem_antl_power_standby_cb 
+32db 58003441 setarg antilost_led_on_cb 
+32dc 67e147b6 store 2 ,mem_antl_led_cb_on 
+32dd 58003443 setarg antilost_led_off_cb 
+32de 67e147b8 store 2 ,mem_antl_led_cb_off 
+32df 58003448 setarg antilost_buzzer_on 
+32e0 67e147c1 store 2 ,mem_antl_buzzer_cb_on 
+32e1 58003445 setarg antilost_buzzer_off 
+32e2 67e147c3 store 2 ,mem_antl_buzzer_cb_off 
+32e3 6fe1478f fetch 2 ,mem_ui_state_map 
+32e4 c3860000 rtnbit1 ui_state_btn_down 
+32e5 20203289 branch app_enter_hibernate 
+
+antilost_set_ble_version:
+32e6 7045fa07 jam 7 ,mem_lmp_version 
+32e7 20600000 rtn 
+
+antilost_le_before_hibernate:
+32e8 20403425 call antilost_led_buzzer_stop_blink 
+32e9 20203289 branch app_enter_hibernate 
+
+antilost_le_notification:
+32ea 20401b24 call le_fifo_check_nearly_full 
+32eb 247a0000 nrtn blank 
+32ec da2009d2 arg mem_temp_block5 ,rega 
+32ed 204079c1 call queue_pop 
+32ee 24740000 nrtn user 
+32ef d8c009d2 arg mem_temp_block5 ,contr 
+32f0 20204c5a branch le_send_notify_from_list 
+
+antilost_power_standby_cb:
+32f1 6fe148a4 fetch 2 ,mem_antl_le_sleep_timeout 
+32f2 67e1489e store 2 ,mem_antl_le_sleep_timer 
+32f3 70486001 jam 1 ,mem_antl_key_scan_enable 
+32f4 2020342e branch antilost_fast_adv_start 
+
+antilost_lpm_lock_process:
+32f5 6fe0c8aa fetch 1 ,mem_antl_key_state 
+32f6 c000b2fe beq 1 ,antilost_lpm_ctrl_for_led_buzzer 
+32f7 6fe1478f fetch 2 ,mem_ui_state_map 
+32f8 c304b2fe bbit0 ui_state_ble_connected ,antilost_lpm_ctrl_for_led_buzzer 
+32f9 6fe0c8ab fetch 1 ,mem_antl_lost_mode 
+32fa c000b24f beq 1 ,app_get_lpm_wake_lock 
+32fb 6fe0c80d fetch 1 ,mem_antl_queue_curr_num 
+32fc 243a324f nbranch app_get_lpm_wake_lock ,blank 
+32fd 20203251 branch app_put_lpm_wake_lock 
+
+antilost_lpm_ctrl_for_led_buzzer:
+32fe 6fe0c8a8 fetch 1 ,mem_antl_led_state 
+32ff 6848c8a9 fetcht 1 ,mem_antl_buzzer_state 
+3300 9841fe00 ior temp ,pdata 
+3301 c000b24f beq 1 ,app_get_lpm_wake_lock 
+3302 20203251 branch app_put_lpm_wake_lock 
+
+antilost_bb_event_process:
+3303 1a627e00 copy regc ,pdata 
+3304 c016b2b1 beq bt_evt_button_up ,app_event_button_up 
+3305 c0083299 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+3306 c00a337d beq bt_evt_le_connected ,antilost_le_process_conn 
+3307 c00ab386 beq bt_evt_le_disconnected ,antilost_le_process_discon 
+3308 c020330b beq bt_evt_le_parse_conn_papa_update_rsp ,antilost_le_conn_param_update_rsp_recieved 
+3309 c0223315 beq bt_evt_le_parse_conn_param_accepted ,antilost_le_conn_param_accepted 
+330a 20600000 rtn 
+
+antilost_le_conn_param_update_rsp_recieved:
+330b 20403311 call antilost_le_conn_param_updata_judge 
+330c 6fe143db fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+330d c000b31b beq ble_signaling_connect_parameter_update_rejected ,antilost_le_conn_param_rejected 
+
+antilost_le_conn_param_updata_procedure_sucsess:
+330e 70489702 jam conn_param_updata_procedure_complete ,mem_antl_conn_updata_procedure_state 
+330f 70489c3c jam 60 ,mem_antl_conn_update_timer 
+3310 20600000 rtn 
+
+antilost_le_conn_param_updata_judge:
+3311 6fe08287 fetch 1 ,mem_le_state 
+3312 c3828000 rtnbit1 lestate_update_param 
+3313 704a6301 jam 1 ,mem_lestate_update_param_flag 
+3314 20600000 rtn 
+
+antilost_le_conn_param_accepted:
+3315 6fe0ca63 fetch 1 ,mem_lestate_update_param_flag 
+3316 207a0000 rtn blank 
+3317 704a6300 jam 0 ,mem_lestate_update_param_flag 
+3318 6fe102c3 fetch 2 ,mem_le_new_connslavelatency 
+3319 203a3330 branch antilost_master_nonsupport_latency ,blank 
+331a 20600000 rtn 
+
+antilost_le_conn_param_rejected:
+331b 6fe14376 fetch 2 ,mem_le_latency 
+331c 203a332e branch antilost_conn_param_updata_procedure_faild ,blank 
+
+antilost_conn_param_retransimiting:
+331d 70489701 jam conn_param_updata_procedure_starting ,mem_antl_conn_updata_procedure_state 
+331e 684948c1 fetcht 2 ,mem_interval_increment 
+331f 6fe14372 fetch 2 ,mem_le_interval_min 
+3320 9840fe00 iadd temp ,pdata 
+3321 67e14372 store 2 ,mem_le_interval_min 
+3322 1fe22200 copy pdata ,rega 
+3323 6fe14374 fetch 2 ,mem_le_interval_max 
+3324 9840fe00 iadd temp ,pdata 
+3325 67e14374 store 2 ,mem_le_interval_max 
+3326 9a20fe00 iadd rega ,pdata 
+3327 1fe30400 rshift pdata ,temp 
+3328 6fe148cd fetch 2 ,mem_antl_le_unnormal_interval_max 
+3329 9846fc00 idiv temp 
+332a 20407e61 call get_div_result 
+332b 67e14376 store 2 ,mem_le_latency 
+332c 70489d01 jam 1 ,mem_antl_send_updata_le_param_timer 
+332d 20600000 rtn 
+
+antilost_conn_param_updata_procedure_faild:
+332e 70489703 jam conn_param_updata_procedure_faild ,mem_antl_conn_updata_procedure_state 
+332f 20600000 rtn 
+
+antilost_master_nonsupport_latency:
+3330 70417700 jam 0 ,mem_lpm_mult 
+3331 70489d00 jam 0 ,mem_antl_send_updata_le_param_timer 
+3332 6fe102c1 fetch 2 ,mem_le_new_conninterval 
+3333 684948cb fetcht 2 ,mem_antl_le_unnormal_interval_min 
+3334 98467c00 isub temp ,null 
+3335 79212200 setflag positive ,0 ,rega 
+3336 6fe148cd fetch 2 ,mem_antl_le_unnormal_interval_max 
+3337 684902c1 fetcht 2 ,mem_le_new_conninterval 
+3338 98467e00 isub temp ,pdata 
+3339 79212201 setflag positive ,1 ,rega 
+333a 2a200603 compare 0x03 ,rega ,0x03 
+333b 20608000 rtn true 
+333c 6fe448cb fetch 8 ,mem_antl_le_unnormal_interval_min 
+333d 67e44372 store 8 ,mem_le_interval_min 
+333e 70489d01 jam 1 ,mem_antl_send_updata_le_param_timer 
+333f 20600000 rtn 
+
+antilost_le_bb_event_timer:
+3340 2040320a call app_power_timer 
+3341 20403357 call antilost_double_click_timer 
+3342 2040335c call antilost_le_fast_adv_timer 
+3343 20403373 call antilost_le_sleep_timer 
+3344 20403368 call antilost_app_updata_le_param_timer 
+3345 20403362 call antilost_conn_update_timer 
+3346 20403350 call antilost_conn_battery_send_timer 
+3347 20403349 call antilost_disconn_buzzer_on_timer 
+3348 20203377 branch antilost_adc_check_timer 
+
+antilost_disconn_buzzer_on_timer:
+3349 da604a65 arg mem_antl_disconn_buzzer_on_timer ,regc 
+334a da40334c arg antilost_disconn_buzzer_off ,regb 
+334b 20203203 branch timer_single_step_2b 
+
+antilost_disconn_buzzer_off:
+334c da200001 arg 1 ,rega 
+334d 2040786c call ui_led_blink_stop_global 
+334e 6fe148ae fetch 2 ,mem_buzzer_pwm_conf 
+334f 2020627e branch pwm_disable 
+
+antilost_conn_battery_send_timer:
+3350 da604a64 arg mem_antilost_conn_battery_send_timer ,regc 
+3351 da403353 arg antilost_conn_battery_send ,regb 
+3352 202031fc branch timer_single_step 
+
+antilost_conn_battery_send:
+3353 2040344e call antilost_battery_process 
+3354 2040344e call antilost_battery_process 
+3355 2040344e call antilost_battery_process 
+3356 20203458 branch antilost_battery_calculate_end 
+
+antilost_double_click_timer:
+3357 da6048a6 arg mem_double_click_timer ,regc 
+3358 da40335a arg antilost_double_click_timeout ,regb 
+3359 202031fc branch timer_single_step 
+
+antilost_double_click_timeout:
+335a 7048a700 jam 0 ,mem_butten_click_cnt 
+335b 20600000 rtn 
+
+antilost_le_fast_adv_timer:
+335c da6048a0 arg mem_antl_fast_adv_timer ,regc 
+335d da40335f arg antilost_le_fast_adv_timeout ,regb 
+335e 20203203 branch timer_single_step_2b 
+
+antilost_le_fast_adv_timeout:
+335f da6047cc arg mem_antl_slow_adv_led_style ,regc 
+3360 da4047ab arg mem_antl_slow_adv_lpm_interval ,regb 
+3361 20203430 branch antilost_adv_start_common 
+
+antilost_conn_update_timer:
+3362 da60489c arg mem_antl_conn_update_timer ,regc 
+3363 da403365 arg antilost_conn_update_timer_time_out ,regb 
+3364 202031fc branch timer_single_step 
+
+antilost_conn_update_timer_time_out:
+3365 6fe14376 fetch 2 ,mem_le_latency 
+3366 67e0c177 store 1 ,mem_lpm_mult 
+3367 20600000 rtn 
+
+antilost_app_updata_le_param_timer:
+3368 da60489d arg mem_antl_send_updata_le_param_timer ,regc 
+3369 da40336b arg antilost_app_updata_le_param_timeout ,regb 
+336a 202031fc branch timer_single_step 
+
+antilost_app_updata_le_param_timeout:
+336b 6fe08287 fetch 1 ,mem_le_state 
+336c 2fe0c000 compare 0 ,pdata ,0x60 
+336d 2420b371 nbranch antilost_wait_for_updata_param_instant_expire ,true 
+336e 70489701 jam conn_param_updata_procedure_starting ,mem_antl_conn_updata_procedure_state 
+336f 20403295 call app_lpm_mult_enable 
+3370 20201f04 branch le_l2cap_tx_update_req 
+
+antilost_wait_for_updata_param_instant_expire:
+3371 70489d01 jam 1 ,mem_antl_send_updata_le_param_timer 
+3372 20600000 rtn 
+
+antilost_le_sleep_timer:
+3373 da60489e arg mem_antl_le_sleep_timer ,regc 
+3374 da403376 arg antilost_le_sleep_timer_timeout ,regb 
+3375 20203203 branch timer_single_step_2b 
+
+antilost_le_sleep_timer_timeout:
+3376 20203299 branch app_button_long_pressed 
+
+antilost_adc_check_timer:
+3377 da60489a arg mem_adc_timer ,regc 
+3378 da40337a arg antilost_adc_check_timer_timeout ,regb 
+3379 20203203 branch timer_single_step_2b 
+
+antilost_adc_check_timer_timeout:
+337a 6fe148b4 fetch 2 ,mem_adc_timeout 
+337b 67e1489a store 2 ,mem_adc_timer 
+337c 2020344e branch antilost_battery_process 
+
+antilost_le_process_conn:
+337d 6fe148b4 fetch 2 ,mem_adc_timeout 
+337e 67e1489a store 2 ,mem_adc_timer 
+337f 58000000 setarg 0 
+3380 67e148a0 store 2 ,mem_antl_fast_adv_timer 
+3381 67e1489e store 2 ,mem_antl_le_sleep_timer 
+3382 204033fc call antilost_alert_off 
+3383 20403425 call antilost_led_buzzer_stop_blink 
+3384 70417700 jam 0 ,mem_lpm_mult 
+3385 20203277 branch app_ble_stop_adv 
+
+antilost_le_process_discon:
+3386 58000000 setarg 0 
+3387 67e2489a store 4 ,mem_adc_timer 
+3388 67e1c897 store 3 ,mem_antl_conn_updata_procedure_state 
+3389 67e143db store 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+338a 7048ad01 jam 1 ,mem_alarm_config_notfy_cnt 
+338b 6fe148a4 fetch 2 ,mem_antl_le_sleep_timeout 
+338c 67e1489e store 2 ,mem_antl_le_sleep_timer 
+338d 6fe14a67 fetch 2 ,mem_antl_disconn_buzzer_on_timeout 
+338e 67e14a65 store 2 ,mem_antl_disconn_buzzer_on_timer 
+338f 204079a5 call queue_init 
+3390 6fe0c866 fetch 1 ,mem_antl_power_state 
+3391 c1000000 rtneq power_off 
+3392 2040342e call antilost_fast_adv_start 
+3393 2020340e branch antilost_on_off_alarm_after_disconn 
+
+antilost_le_conn_process:
+3394 202033a8 branch antilost_key_process 
+
+antilost_idle_process:
+3395 6fe0c866 fetch 1 ,mem_antl_power_state 
+3396 c1810000 rtnne power_standby 
+3397 202033a8 branch antilost_key_process 
+
+antilost_power_starting_cb:
+3398 da6047da arg mem_antl_power_starting_buzzer_style ,regc 
+3399 20403421 call antilost_buzzer_configuration 
+339a da6047d3 arg mem_antl_power_starting_led_style ,regc 
+
+antilost_power_common:
+339b 20203423 branch antilost_led_configuration 
+
+antilost_power_off_cb:
+339c 70442700 jam off ,mem_le_adv_enable 
+339d da6047e8 arg mem_antl_power_off_buzzer_style ,regc 
+339e 20403421 call antilost_buzzer_configuration 
+339f da6047e1 arg mem_antl_power_off_led_style ,regc 
+33a0 2020339b branch antilost_power_common 
+
+antilost_le_receive_data_process:
+33a1 6fe0c436 fetch 1 ,mem_le_att_opcode 
+33a2 c00933a4 beq attop_write_request ,antilost_le_parse_att_write_request 
+33a3 20600000 rtn 
+
+antilost_le_parse_att_write_request:
+33a4 6fe14437 fetch 2 ,mem_le_att_handle 
+33a5 c006b3d6 beq new_spec_write_handle ,antilost_cmd_parse_for_application 
+33a6 c005b411 beq new_spec_notification_enable_handle ,antilost_notify_alarm_config_first_time 
+33a7 20600000 rtn 
+
+antilost_key_process:
+33a8 6fe0c860 fetch 1 ,mem_antl_key_scan_enable 
+33a9 207a0000 rtn blank 
+33aa 2020620b branch keyscan_key_process 
+
+antilost_key_up_down:
+33ab 1a227e00 copy rega ,pdata 
+33ac 203a33b0 branch antilost_key_is_up ,blank 
+
+antilost_key_is_down:
+33ad 18e27e00 copy queue ,pdata 
+33ae c00033b3 beq 0 ,antilost_key0_down 
+33af 20600000 rtn 
+
+antilost_key_is_up:
+33b0 18e27e00 copy queue ,pdata 
+33b1 c00033bb beq 0 ,antilost_key0_up 
+33b2 20600000 rtn 
+
+antilost_key0_down:
+33b3 7048aa01 jam 1 ,mem_antl_key_state 
+33b4 da604804 arg mem_antl_key_buzzer_style ,regc 
+33b5 20403421 call antilost_buzzer_configuration 
+33b6 da6047fd arg mem_antl_key_led_style ,regc 
+33b7 20403423 call antilost_led_configuration 
+33b8 6fe1478f fetch 2 ,mem_ui_state_map 
+33b9 c304b3d2 bbit0 ui_state_ble_connected ,antilost_butten_down_while_disconn 
+33ba 202033c1 branch antilost_butten_down_after_conn 
+
+antilost_key0_up:
+33bb 7048aa00 jam 0 ,mem_antl_key_state 
+33bc 202033bd branch antilost_double_click_timer_init 
+
+antilost_double_click_timer_init:
+33bd 6fe0c8a7 fetch 1 ,mem_butten_click_cnt 
+33be c1808000 rtnne 1 
+33bf 7048a605 jam 5 ,mem_double_click_timer 
+33c0 20600000 rtn 
+
+antilost_butten_down_after_conn:
+33c1 6fe0c8a7 fetch 1 ,mem_butten_click_cnt 
+33c2 1fe0fe01 pincrease 1 
+33c3 67e0c8a7 store 1 ,mem_butten_click_cnt 
+33c4 c000b3c7 beq 1 ,antilost_click_once 
+33c5 c00133cb beq 2 ,antilost_click_twice 
+33c6 20600000 rtn 
+
+antilost_click_once:
+33c7 204033fc call antilost_alert_off 
+33c8 70487e01 jam opcode1_butten_click_once ,mem_antl_key0_press + 5 
+33c9 da604879 arg mem_antl_key0_press ,regc 
+33ca 202033e4 branch antilost_prepare_data_and_send 
+
+antilost_click_twice:
+33cb 7048a700 jam 0 ,mem_butten_click_cnt 
+33cc 70487e02 jam opcode2_butten_double_click ,mem_antl_key0_press + 5 
+33cd da604879 arg mem_antl_key0_press ,regc 
+33ce 204033e4 call antilost_prepare_data_and_send 
+33cf 6fe0c8ab fetch 1 ,mem_antl_lost_mode 
+33d0 c000b3f1 beq 1 ,antilost_alert_on 
+33d1 20600000 rtn 
+
+antilost_butten_down_while_disconn:
+33d2 6fe148a4 fetch 2 ,mem_antl_le_sleep_timeout 
+33d3 67e1489e store 2 ,mem_antl_le_sleep_timer 
+33d4 204033fc call antilost_alert_off 
+33d5 2020342e branch antilost_fast_adv_start 
+
+antilost_cmd_parse_for_application:
+33d6 44d9c016 bpatch patch16_3 ,mem_patch16 
+33d7 2040356d call le_app_receive_data 
+33d8 efe08011 ifetch 1 ,rega 
+33d9 c001b3dc beq opcode3_antl_start_alram ,antilost_on_of_alram 
+33da c003b3e0 beq opcode7_antl_config_alram ,antilost_configuration_for_alram 
+33db 20600000 rtn 
+
+antilost_on_of_alram:
+33dc 6fe0c8ab fetch 1 ,mem_antl_lost_mode 
+33dd c00033f1 beq anti_le_alarm_off ,antilost_alert_on 
+33de c000b3fc beq anti_le_alarm_on ,antilost_alert_off 
+33df 20600000 rtn 
+
+antilost_configuration_for_alram:
+33e0 efe08012 ifetch 1 ,regb 
+33e1 c000b404 beq 1 ,antilost_set_start_alarm_after_disconn 
+33e2 c0003409 beq 0 ,antilost_set_no_alarm_after_disconn 
+33e3 20600000 rtn 
+
+antilost_prepare_data_and_send:
+33e4 44da4016 bpatch patch16_4 ,mem_patch16 
+33e5 6fe0c898 fetch 1 ,mem_client_characteristic_configuration_descriptor 
+33e6 2feffe00 isolate1 notification_enable_bit ,pdata 
+33e7 24608000 nrtn true 
+33e8 1a608c06 add regc ,6 ,contr 
+33e9 efe10006 ifetch 2 ,contr 
+33ea 1ff0fe00 byteswap pdata ,pdata 
+33eb 1fe0f205 add pdata ,5 ,loopcnt 
+33ec 1a608c03 add regc ,3 ,contr 
+33ed 20403561 call calc_check_sum_start 
+33ee e7e08006 istore 1 ,contr 
+33ef 1a622200 copy regc ,rega 
+33f0 202079aa branch queue_push 
+
+antilost_alert_on:
+33f1 6fe0c866 fetch 1 ,mem_antl_power_state 
+33f2 207a0000 rtn blank 
+33f3 7048ab01 jam 1 ,mem_antl_lost_mode 
+33f4 da6047f6 arg mem_antl_alert_buzzer_stlye ,regc 
+33f5 20403421 call antilost_buzzer_configuration 
+33f6 da6047ef arg mem_antl_alert_led_stlye ,regc 
+33f7 20403423 call antilost_led_configuration 
+33f8 70488d04 jam opcode4_current_alarm_state ,mem_antl_key0_release + 5 
+33f9 70489001 jam 1 ,mem_antl_key0_release + 8 
+33fa da604888 arg mem_antl_key0_release ,regc 
+33fb 202033e4 branch antilost_prepare_data_and_send 
+
+antilost_alert_off:
+33fc 6fe0c8ab fetch 1 ,mem_antl_lost_mode 
+33fd 207a0000 rtn blank 
+33fe 7048ab00 jam 0 ,mem_antl_lost_mode 
+33ff 20403425 call antilost_led_buzzer_stop_blink 
+3400 70488d04 jam opcode4_current_alarm_state ,mem_antl_key0_release + 5 
+3401 70489000 jam 0 ,mem_antl_key0_release + 8 
+3402 da604888 arg mem_antl_key0_release ,regc 
+3403 202033e4 branch antilost_prepare_data_and_send 
+
+antilost_set_start_alarm_after_disconn:
+3404 7048ac01 jam 1 ,mem_alarm_config 
+3405 70488d07 jam opcode7_antl_config_alram ,mem_antl_key0_release + 5 
+3406 70489001 jam 1 ,mem_antl_key0_release + 8 
+3407 da604888 arg mem_antl_key0_release ,regc 
+3408 202033e4 branch antilost_prepare_data_and_send 
+
+antilost_set_no_alarm_after_disconn:
+3409 7048ac00 jam 0 ,mem_alarm_config 
+340a 70488d07 jam opcode7_antl_config_alram ,mem_antl_key0_release + 5 
+340b 70489000 jam 0 ,mem_antl_key0_release + 8 
+340c da604888 arg mem_antl_key0_release ,regc 
+340d 202033e4 branch antilost_prepare_data_and_send 
+
+antilost_on_off_alarm_after_disconn:
+340e 6fe0c8ac fetch 1 ,mem_alarm_config 
+340f 207a0000 rtn blank 
+3410 202033f1 branch antilost_alert_on 
+
+antilost_notify_alarm_config_first_time:
+3411 efe10011 ifetch 2 ,rega 
+3412 67e14898 store 2 ,mem_client_characteristic_configuration_descriptor 
+3413 2feffe00 isolate1 notification_enable_bit ,pdata 
+3414 24608000 nrtn true 
+3415 6fe0c8ad fetch 1 ,mem_alarm_config_notfy_cnt 
+3416 207a0000 rtn blank 
+3417 7048ad00 jam 0 ,mem_alarm_config_notfy_cnt 
+3418 6fe448c3 fetch 8 ,mem_antl_le_interval_min 
+3419 67e44372 store 8 ,mem_le_interval_min 
+341a 704a6403 jam 3 ,mem_antilost_conn_battery_send_timer 
+341b 70488d07 jam opcode7_antl_config_alram ,mem_antl_key0_release + 5 
+341c 70489d1e jam 30 ,mem_antl_send_updata_le_param_timer 
+341d 6fe0c8ac fetch 1 ,mem_alarm_config 
+341e 67e0c890 store 1 ,mem_antl_key0_release + 8 
+341f da604888 arg mem_antl_key0_release ,regc 
+3420 202033e4 branch antilost_prepare_data_and_send 
+
+antilost_buzzer_configuration:
+3421 da200001 arg 1 ,rega 
+3422 20203424 branch antilost_configuration_common 
+
+antilost_led_configuration:
+3423 da200000 arg 0 ,rega 
+
+antilost_configuration_common:
+3424 2020342b branch antilost_led_buzzer_style_configuration 
+
+antilost_led_buzzer_stop_blink:
+3425 da200000 arg 0 ,rega 
+3426 2040786c call ui_led_blink_stop_global 
+3427 da200001 arg 1 ,rega 
+3428 2040786c call ui_led_blink_stop_global 
+3429 6fe148ae fetch 2 ,mem_buzzer_pwm_conf 
+342a 2020627e branch pwm_disable 
+
+antilost_led_buzzer_style_configuration:
+342b 20407857 call calc_curr_struct_prt 
+342c df200007 arg 7 ,loopcnt 
+342d 20207879 branch ui_led_set_style_global + 2 
+
+antilost_fast_adv_start:
+342e da6047c5 arg mem_antl_fast_adv_led_style ,regc 
+342f da4047a7 arg mem_antl_lpm_interval ,regb 
+
+antilost_adv_start_common:
+3430 20403435 call antilost_adv_interval_lpm_interval_set 
+3431 20403423 call antilost_led_configuration 
+3432 6fe148a2 fetch 2 ,mem_antl_fast_adv_timeout 
+3433 67e148a0 store 2 ,mem_antl_fast_adv_timer 
+3434 20203279 branch app_ble_start_adv 
+
+antilost_adv_interval_lpm_interval_set:
+3435 efe10012 ifetch 2 ,regb 
+3436 67e14159 store 2 ,mem_lpm_interval 
+3437 efe10006 ifetch 2 ,contr 
+3438 67e14428 store 2 ,mem_le_adv_interval 
+3439 20600000 rtn 
+
+antilost_buzzer_pwm_init:
+343a da200000 arg 0 ,rega 
+343b 20406239 call pwm_init 
+343c 6fe348ae fetch 6 ,mem_buzzer_pwm_conf 
+343d 67e3095c store 6 ,mem_pdatatemp 
+343e 20406260 call pwm_out_set 
+343f 6fe148ae fetch 2 ,mem_buzzer_pwm_conf 
+3440 2020627e branch pwm_disable 
+
+antilost_led_on_cb:
+3441 7048a801 jam 1 ,mem_antl_led_state 
+3442 20600000 rtn 
+
+antilost_led_off_cb:
+3443 7048a800 jam 0 ,mem_antl_led_state 
+3444 20600000 rtn 
+
+antilost_buzzer_off:
+3445 7048a900 jam 0 ,mem_antl_buzzer_state 
+3446 6fe148ae fetch 2 ,mem_buzzer_pwm_conf 
+3447 2020627e branch pwm_disable 
+
+antilost_buzzer_on:
+3448 7048a901 jam 1 ,mem_antl_buzzer_state 
+3449 6fe348ae fetch 6 ,mem_buzzer_pwm_conf 
+344a 67e3095c store 6 ,mem_pdatatemp 
+344b 20206260 branch pwm_out_set 
+
+antilost_adc_init:
+344c 7044a200 jam 0 ,mem_adc_config_flag 
+344d 20600000 rtn 
+
+antilost_battery_process:
+344e 2040618d call vdd_calculate_by_mode 
+344f 67e148bd store 2 ,mem_battery_current_voltage 
+3450 da2048b7 arg mem_battery_calculate_set ,rega 
+3451 204061ba call adc_bat_percent_lowpower_out 
+3452 67e0c8b6 store 1 ,mem_voltage_remain_percent 
+3453 58000065 setarg 0x65 
+3454 c000345d beq 0 ,antilost_low_battery 
+3455 1fe67c64 sub pdata ,0x64 ,null 
+3456 2421345b nbranch antilost_full_battery ,positive 
+3457 67e0c890 store 1 ,mem_antl_key0_release + 8 
+
+antilost_battery_calculate_end:
+3458 70488d05 jam opcode5_batter_information ,mem_antl_key0_release + 5 
+3459 da604888 arg mem_antl_key0_release ,regc 
+345a 202033e4 branch antilost_prepare_data_and_send 
+
+antilost_full_battery:
+345b 70489064 jam 100 ,mem_antl_key0_release + 8 
+345c 20203458 branch antilost_battery_calculate_end 
+
+antilost_low_battery:
+345d 20203299 branch app_button_long_pressed 
+
+car_init:
+345e 20406e5e call enable_authrom 
+345f 20758000 rtn wake 
+3460 58003654 setarg car_g24_receive_process 
+3461 67e1488d store 2 ,mem_cb_24g_receive_process 
+3462 58002354 setarg g24_bind_ackpayload_prep 
+3463 67e1488f store 2 ,mem_cb_24g_ackpayload 
+3464 58003686 setarg car_g24_cb_data_device1 
+3465 67e14891 store 2 ,mem_cb_24g_data_device1 
+3466 580034da setarg car_le_before_hibernate 
+3467 67e1445d store 2 ,mem_cb_before_hibernate 
+3468 580034da setarg car_le_process_lpm_before 
+3469 67e1445f store 2 ,mem_cb_before_lpm 
+346a 58003289 setarg app_enter_hibernate 
+346b 67e14469 store 2 ,mem_cb_discovry_timeout 
+346c 580034dc setarg car_scale_process_idle 
+346d 67e14465 store 2 ,mem_cb_idle_process 
+346e 580034fd setarg car_scale_process_bb_event 
+346f 67e14467 store 2 ,mem_cb_bb_event_process 
+3470 5800324f setarg app_get_lpm_wake_lock 
+3471 67e1445b store 2 ,mem_cb_check_wakelock 
+3472 58003567 setarg car_le_receive_data 
+3473 67e1446b store 2 ,mem_cb_att_write 
+3474 58003527 setarg car_le_bb_event_timer 
+3475 67e1446f store 2 ,mem_cb_event_timer 
+3476 44dac016 bpatch patch16_5 ,mem_patch16 
+3477 204034c0 call car_init_environment 
+3478 204034ea call car_lpm_timer_enable 
+3479 204079a5 call queue_init 
+347a 70417702 jam 2 ,mem_lpm_mult 
+347b 704c6400 jam power_on ,mem_car_24g_received_pac 
+347c 6fe0ca26 fetch 1 ,mem_car_config_soft_switch_enable 
+347d 67e0c8f5 store 1 ,mem_car_hard_soft_switch 
+347e c0003489 beq hard_switch ,car_hard_switch_power_on_signal 
+347f 6fe0ca27 fetch 1 ,mem_car_config_soft_switch_gpio 
+3480 67e0c793 store 1 ,mem_ui_button_gpio 
+3481 70442700 jam off ,mem_le_adv_enable 
+
+car_soft_switch_power_on_init:
+3482 20407826 call ui_button_init 
+3483 20407830 call ui_button_polling 
+3484 704a4e01 jam power_starting ,mem_car_power_state 
+3485 6fe1478f fetch 2 ,mem_ui_state_map 
+3486 c3860000 rtnbit1 ui_state_btn_down 
+3487 20203289 branch app_enter_hibernate 
+
+car_power_off_signal:
+3488 202034a7 branch car_ui_led_init 
+
+car_hard_switch_power_on_signal:
+3489 704a4e02 jam power_standby ,mem_car_power_state 
+
+car_soft_switch_power_on_signal:
+348a 70442701 jam on ,mem_le_adv_enable 
+348b 58000020 setarg fast_adv_interval_value_car 
+348c 20404c56 call shutter_ble_adv_interval_set 
+
+car_le_modified_name_adv:
+348d d8a042ff arg mem_le_name + 7 ,contw 
+348e 6fe0c37a fetch 1 ,mem_le_lap 
+
+car_name_loop:
+348f 1fe104f0 and pdata ,0xF0 ,temp 
+3490 18518400 rshift4 temp ,temp 
+3491 204034a1 call car_hex_to_ascii 
+3492 e0408005 istoret 1 ,contw 
+3493 1fe1040f and pdata ,0x0F ,temp 
+3494 204034a1 call car_hex_to_ascii 
+3495 e0408005 istoret 1 ,contw 
+3496 20401a58 call le_modified_name_att_list 
+3497 6848c2f7 fetcht 1 ,mem_le_name_len 
+3498 18427200 copy temp ,loopcnt 
+3499 d8a043ea arg mem_le_adv_data + 2 ,contw 
+349a d8c042f8 arg mem_le_name ,contr 
+349b 20407dd4 call memcpy 
+
+car_le_modified_name_scan:
+349c 6848c2f7 fetcht 1 ,mem_le_name_len 
+349d 18427200 copy temp ,loopcnt 
+349e d8a0440a arg mem_le_scan_data + 2 ,contw 
+349f d8c042f8 arg mem_le_name ,contr 
+34a0 20207dd4 branch memcpy 
+
+car_hex_to_ascii:
+34a1 18467c09 sub temp ,9 ,null 
+34a2 202134a5 branch car_hex_num ,positive 
+34a3 18408437 add temp ,55 ,temp 
+34a4 20600000 rtn 
+
+car_hex_num:
+34a5 18408430 add temp ,48 ,temp 
+34a6 20600000 rtn 
+
+car_ui_led_init:
+34a7 6fe0ca1b fetch 1 ,mem_car_config_blood_led1_gpio 
+34a8 c0ffb4b9 bne invalid_pin_num ,car_blood_led_gpio_set 
+
+car_ui_led_init_1:
+34a9 6fe0ca19 fetch 1 ,mem_car_config_pairing_led_gpio 
+34aa c0ffb4bc bne invalid_pin_num ,car_pairing_led_gpio_set 
+
+car_ui_led_init_2:
+34ab 6fe0ca24 fetch 1 ,mem_car_config_low_voltage_led_gpio 
+34ac c0ffb4be bne invalid_pin_num ,car_low_voltage_led_gpio_set 
+
+car_ui_led_init_3:
+34ad 6fe0c987 fetch 1 ,mem_car_led_num 
+34ae 1fe27200 copy pdata ,loopcnt 
+34af 58004988 setarg mem_car_led_map 
+34b0 1fe22200 copy pdata ,rega 
+
+car_in_lp1:
+34b1 1a220c00 copy rega ,contr 
+34b2 efe08006 ifetch 1 ,contr 
+34b3 18c22200 copy contr ,rega 
+34b4 c07fb4b7 beq invalid_pin_num ,car_in_lp1_end 
+34b5 1fe20400 copy pdata ,temp 
+34b6 2040610d call gpio_config_output 
+
+car_in_lp1_end:
+34b7 c20034b1 loop car_in_lp1 
+
+car_ui_led_init_end:
+34b8 20600000 rtn 
+
+car_blood_led_gpio_set:
+34b9 6fe44a1b fetch 8 ,mem_car_config_blood_led1_gpio 
+34ba 67e4498a store 8 ,mem_car_led_map + 2 
+34bb 202034a9 branch car_ui_led_init_1 
+
+car_pairing_led_gpio_set:
+34bc 67e0c988 store 1 ,mem_car_led_map 
+34bd 202034ab branch car_ui_led_init_2 
+
+car_low_voltage_led_gpio_set:
+34be 67e0c989 store 1 ,mem_car_led_map + 1 
+34bf 202034ad branch car_ui_led_init_3 
+
+car_init_environment:
+34c0 20403650 call car_g24_init 
+34c1 da200000 arg 0 ,rega 
+34c2 20406239 call pwm_init 
+34c3 204034a7 call car_ui_led_init 
+34c4 204034f2 call car_start_blink 
+34c5 204034d8 call car_init_adc_hvin 
+34c6 202034c7 branch car_motor_init 
+
+car_motor_init:
+34c7 6fe0cc51 fetch 1 ,mem_car_motor_gpio_num 
+34c8 1fe27200 copy pdata ,loopcnt 
+34c9 58004c52 setarg mem_car_motor_gpio_map 
+34ca 1fe22200 copy pdata ,rega 
+
+p_in_lp1:
+34cb 1a220c00 copy rega ,contr 
+34cc efe08006 ifetch 1 ,contr 
+34cd 18c22200 copy contr ,rega 
+34ce c07fb4d2 beq invalid_pin_num ,p_in_lp1_end 
+34cf 1fe20400 copy pdata ,temp 
+34d0 67e0cc56 store 1 ,mem_car_gpio 
+34d1 204034d4 call car_ui_gpio_init 
+
+p_in_lp1_end:
+34d2 c20034cb loop p_in_lp1 
+
+p_car_ui_led_init_end:
+34d3 20600000 rtn 
+
+car_ui_gpio_init:
+34d4 6fe0cc56 fetch 1 ,mem_car_gpio 
+34d5 c17f8000 rtneq ui_button_gpio_disable 
+34d6 98000400 iforce temp 
+34d7 2020610d branch gpio_config_output 
+
+car_init_adc_hvin:
+34d8 704a2a64 jam 100 ,mem_car_notify_vdd_value_last 
+34d9 20600000 rtn 
+
+car_le_before_hibernate:
+
+car_le_process_lpm_before:
+34da 202061ff branch keyscan_process_lpm_before 
+
+car_key_scan_process:
+34db 2020620b branch keyscan_key_process 
+
+car_scale_process_idle:
+34dc 204034f4 call car_le_send_packet 
+34dd 204034df call car_g24_status_process 
+34de 202034db branch car_key_scan_process 
+
+car_g24_status_process:
+34df 6fe1478f fetch 2 ,mem_ui_state_map 
+34e0 c3848000 rtnbit1 ui_state_ble_connected 
+34e1 6fe0cc64 fetch 1 ,mem_car_24g_received_pac 
+34e2 c000b4e4 beq work_paired ,car_g24_connected_event 
+34e3 20600000 rtn 
+
+car_g24_connected_event:
+34e4 6fe0ca45 fetch 1 ,mem_car_24g_status 
+34e5 c1008000 rtneq work_paired 
+34e6 704a4501 jam work_paired ,mem_car_24g_status 
+34e7 204034ee call car_lpm_timer_disable 
+34e8 204034f0 call car_stop_blink 
+34e9 20203507 branch car_g24_connected 
+
+car_lpm_timer_enable:
+34ea 6fe14c69 fetch 2 ,mem_car_enter_lpm_timer_count 
+34eb 67e14c6b store 2 ,mem_car_enter_lpm_timer 
+34ec 704c6d00 jam 0 ,mem_car_enter_lpm_flag 
+34ed 20600000 rtn 
+
+car_lpm_timer_disable:
+34ee 58000000 setarg 0 
+34ef 202034eb branch car_lpm_timer_enable + 1 
+
+car_stop_blink:
+34f0 da200000 arg 0 ,rega 
+34f1 2020786c branch ui_led_blink_stop_global 
+
+car_start_blink:
+34f2 da200000 arg 0 ,rega 
+34f3 20207871 branch ui_led_blink_start_global 
+
+car_le_send_packet:
+34f4 6fe1478f fetch 2 ,mem_ui_state_map 
+34f5 c4048000 rtnbit0 ui_state_ble_connected 
+34f6 20401b24 call le_fifo_check_nearly_full 
+34f7 247a0000 nrtn blank 
+34f8 da204973 arg mem_car_pop_queue_buff ,rega 
+34f9 204079c1 call queue_pop 
+34fa 24740000 nrtn user 
+34fb d8c04973 arg mem_car_pop_queue_buff ,contr 
+34fc 20204c5a branch le_send_notify_from_list 
+
+car_scale_process_bb_event:
+34fd 1a627e00 copy regc ,pdata 
+34fe c016b2b1 beq bt_evt_button_up ,app_event_button_up 
+34ff c0083299 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+3500 c00a3503 beq bt_evt_le_connected ,car_scale_event_le_conn 
+3501 c00ab50d beq bt_evt_le_disconnected ,car_scale_event_le_discon 
+3502 20600000 rtn 
+
+car_scale_event_le_conn:
+3503 204034ee call car_lpm_timer_disable 
+3504 204034f0 call car_stop_blink 
+3505 793f8027 set0 mark_24g_rxmode ,mark 
+3506 20203509 branch car_scale_process_conn 
+
+car_g24_connected:
+3507 6fe14a46 fetch 2 ,mem_car_24g_no_data_timeout_count 
+3508 67e14a48 store 2 ,mem_car_24g_no_data_timeout_timer 
+
+car_scale_process_conn:
+3509 704a2914 jam 0x14 ,mem_car_notify_vdd_timer 
+350a 70409900 jam 0 ,mem_lpm_mode 
+350b 20403277 call app_ble_stop_adv 
+350c 20203295 branch app_lpm_mult_enable 
+
+car_scale_event_le_discon:
+350d 79200027 set1 mark_24g_rxmode ,mark 
+350e 204034ea call car_lpm_timer_enable 
+350f 20403604 call car_fb_motor_stop 
+3510 204035f8 call car_lr_motor_stop 
+
+car_g24_disconnect:
+3511 58000000 setarg 0 
+3512 67e2c9f7 store 5 ,mem_car_led_control 
+3513 58000004 setarg 4 
+3514 2040627e call pwm_disable 
+3515 58000005 setarg 5 
+3516 2040627e call pwm_disable 
+3517 58000014 setarg 20 
+3518 2040627e call pwm_disable 
+3519 58000015 setarg 21 
+351a 2040627e call pwm_disable 
+351b 58000016 setarg 22 
+351c 2040627e call pwm_disable 
+351d 58000007 setarg 7 
+351e 2040627e call pwm_disable 
+351f 204079a5 call queue_init 
+3520 7049b90a jam 10 ,mem_motor1_speed 
+3521 7049bb0a jam 10 ,mem_motor2_speed 
+3522 7049bd0a jam 10 ,mem_motor3_speed 
+3523 70417702 jam 2 ,mem_lpm_mult 
+3524 58000020 setarg fast_adv_interval_value_car 
+3525 20404c56 call shutter_ble_adv_interval_set 
+3526 20203279 branch app_ble_start_adv 
+
+car_le_bb_event_timer:
+3527 204035a5 call car_moto1_blank_data_timer 
+3528 204035a8 call car_moto2_blank_data_timer 
+3529 204035ab call car_moto3_blank_data_timer 
+352a 2040320a call app_power_timer 
+352b 2040353d call car_notify_vdd_timer 
+352c 20403537 call car_24g_no_data_timeout_timer 
+352d 2040352f call car_24g_bind_enable_timer 
+352e 20203532 branch car_enter_lpm_timer 
+
+car_24g_bind_enable_timer:
+352f da604c65 arg mem_car_24g_bind_enable_delay_count ,regc 
+3530 da400000 arg 0 ,regb 
+3531 202031fc branch timer_single_step 
+
+car_enter_lpm_timer:
+3532 da604c6b arg mem_car_enter_lpm_timer ,regc 
+3533 da403535 arg car_enter_lpm_enable ,regb 
+3534 20203203 branch timer_single_step_2b 
+
+car_enter_lpm_enable:
+3535 704c6d01 jam 1 ,mem_car_enter_lpm_flag 
+3536 20600000 rtn 
+
+car_24g_no_data_timeout_timer:
+3537 da604a48 arg mem_car_24g_no_data_timeout_timer ,regc 
+3538 da40353a arg car_24g_no_data_timer_timeout ,regb 
+3539 20203203 branch timer_single_step_2b 
+
+car_24g_no_data_timer_timeout:
+353a 704a4502 jam work_search ,mem_car_24g_status 
+353b 704c6400 jam power_on ,mem_car_24g_received_pac 
+353c 20203511 branch car_g24_disconnect 
+
+car_notify_vdd_timer:
+353d 6fe0ca23 fetch 1 ,mem_car_config_bat_notify_enable 
+353e 207a0000 rtn blank 
+353f da604a29 arg mem_car_notify_vdd_timer ,regc 
+3540 da403542 arg car_notify_vdd ,regb 
+3541 202031fc branch timer_single_step 
+
+car_notify_vdd:
+3542 6fe0ca28 fetch 1 ,mem_car_notify_vdd_count 
+3543 67e0ca29 store 1 ,mem_car_notify_vdd_timer 
+3544 6fe0ca2c fetch 1 ,mem_car_working_flag 
+3545 247a0000 nrtn blank 
+
+car_read_hvin:
+3546 2040618d call vdd_calculate_by_mode 
+3547 67e14a43 store 2 ,mem_vdd_now_vol 
+3548 da204a3d arg mem_vdd_calculate_set ,rega 
+3549 204061ba call adc_bat_percent_lowpower_out 
+354a 6848ca2a fetcht 1 ,mem_car_notify_vdd_value_last 
+354b 98467c00 isub temp ,null 
+354c 2021354f branch car_notify_vdd_next2 ,positive 
+354d 67e0ca2a store 1 ,mem_car_notify_vdd_value_last 
+354e 1fe20400 copy pdata ,temp 
+
+car_notify_vdd_next2:
+354f 6048ca2b storet 1 ,mem_car_notify_vdd_percent 
+3550 6fe0ca25 fetch 1 ,mem_car_config_low_voltage_percent 
+3551 98467c00 isub temp ,null 
+3552 2041355a call car_enter_low_bat ,positive 
+3553 6048ca36 storet 1 ,mem_notify_bat_payload 
+3554 df200006 arg 6 ,loopcnt 
+3555 d8c04a31 arg mem_notify_bat_head ,contr 
+3556 20403561 call calc_check_sum_start 
+3557 67e0ca37 store 1 ,mem_notify_bat_check_sum 
+3558 da204a2e arg mem_notify_bat_packet ,rega 
+3559 202079aa branch queue_push 
+
+car_enter_low_bat:
+355a 6fe0ca2d fetch 1 ,mem_low_bat_flag 
+355b 247a0000 nrtn blank 
+355c 704a2d01 jam 1 ,mem_low_bat_flag 
+355d da200001 arg 1 ,rega 
+355e 20207871 branch ui_led_blink_start_global 
+
+car_low_bat_led_off:
+355f da200001 arg 1 ,rega 
+3560 2020786c branch ui_led_blink_stop_global 
+
+calc_check_sum_start:
+3561 da200000 arg 0 ,rega 
+
+calc_check_sum_loop:
+3562 efe08006 ifetch 1 ,contr 
+3563 9a20a200 iadd rega ,rega 
+3564 c2003562 loop calc_check_sum_loop 
+
+calc_check_sum_and:
+3565 1a217eff and rega ,0xff ,pdata 
+3566 20600000 rtn 
+
+car_le_receive_data:
+3567 6fe0c436 fetch 1 ,mem_le_att_opcode 
+3568 c009356a beq attop_write_request ,car_le_parse_att_write_request 
+3569 20600000 rtn 
+
+car_le_parse_att_write_request:
+356a 6fe14437 fetch 2 ,mem_le_att_handle 
+356b c00a3581 beq att_car_control_handle ,car_control_le_receive 
+356c 20600000 rtn 
+
+le_app_receive_data:
+356d 44db4016 bpatch patch16_6 ,mem_patch16 
+356e efe28011 ifetch 5 ,rega 
+356f 67e289de store 5 ,mem_app_receive_temp 
+3570 6fe109de fetch 2 ,mem_app_receive_temp 
+3571 d8406b5a arg le_receive_packet_head ,temp 
+3572 98467c00 isub temp ,null 
+3573 24628000 nrtn zero 
+3574 6fe109e1 fetch 2 ,mem_app_receive_temp + 3 
+3575 1ff0fe00 byteswap pdata ,pdata 
+3576 67e109e1 store 2 ,mem_app_receive_temp + 3 
+3577 1fe27200 copy pdata ,loopcnt 
+3578 1a20a205 increase 5 ,rega 
+3579 1a220c00 copy rega ,contr 
+357a d8a009e3 arg mem_app_receive_temp + 5 ,contw 
+357b 20407dd4 call memcpy 
+357c efe08006 ifetch 1 ,contr 
+357d 67e089ed store 1 ,mem_app_receive_temp + 15 
+357e da2009e0 arg mem_app_receive_temp + 2 ,rega 
+357f da4009e3 arg mem_app_receive_temp + 5 ,regb 
+3580 20600000 rtn 
+
+car_control_le_receive:
+3581 58000000 setarg 0 
+3582 67e2c9ad store 5 ,mem_le_receive_payload 
+3583 67e2c9b2 store 5 ,mem_le_receive_payload + 5 
+3584 2040356d call le_app_receive_data 
+3585 1a420c00 copy regb ,contr 
+3586 d8a049ad arg mem_le_receive_payload ,contw 
+3587 df20000a arg 10 ,loopcnt 
+3588 20407dd4 call memcpy 
+
+car_receive_cmd_select:
+3589 44dbc016 bpatch patch16_7 ,mem_patch16 
+358a efe08011 ifetch 1 ,rega 
+358b c00135b4 beq car_cmd_old_car_control ,car_drive_old 
+358c c001b5c9 beq car_cmd_old_speed_control ,car_speed_set_old 
+358d c00235d0 beq car_cmd_l_r_motor_control ,car_motor_control 
+358e c002b5d0 beq car_cmd_f_b_motor_control ,car_motor_control 
+358f c0033640 beq car_cmd_ir_control ,car_ir_data_rx_from_app 
+3590 c003b641 beq car_cmd_led_control ,car_led_control_receive 
+3591 c0043644 beq car_cmd_device_info ,car_info_request 
+3592 20600000 rtn 
+
+car_24g_receive_data:
+3593 20403581 call car_control_le_receive 
+3594 6fe089e0 fetch 1 ,mem_app_receive_temp + 2 
+3595 c0023598 beq car_cmd_l_r_motor_control ,car_24g_receive_data_next 
+3596 c002b598 beq car_cmd_f_b_motor_control ,car_24g_receive_data_next 
+3597 20600000 rtn 
+
+car_24g_receive_data_next:
+3598 6fe0c9ad fetch 1 ,mem_le_receive_payload 
+3599 245a359f ncall car_moto1_enable_blank_data_timer ,blank 
+359a 6fe0c9af fetch 1 ,mem_le_receive_payload + 2 
+359b 245a35a1 ncall car_moto2_enable_blank_data_timer ,blank 
+359c 6fe0c9b1 fetch 1 ,mem_le_receive_payload + 4 
+359d 245a35a3 ncall car_moto3_enable_blank_data_timer ,blank 
+359e 20600000 rtn 
+
+car_moto1_enable_blank_data_timer:
+359f 704c4e05 jam 5 ,mem_car_moto1_blank_timer 
+35a0 20600000 rtn 
+
+car_moto2_enable_blank_data_timer:
+35a1 704c4f05 jam 5 ,mem_car_moto2_blank_timer 
+35a2 20600000 rtn 
+
+car_moto3_enable_blank_data_timer:
+35a3 704c5005 jam 5 ,mem_car_moto3_blank_timer 
+35a4 20600000 rtn 
+
+car_moto1_blank_data_timer:
+35a5 da604c4e arg mem_car_moto1_blank_timer ,regc 
+35a6 da4035ae arg car_moto1_blank_data ,regb 
+35a7 202031fc branch timer_single_step 
+
+car_moto2_blank_data_timer:
+35a8 da604c4f arg mem_car_moto2_blank_timer ,regc 
+35a9 da4035b0 arg car_moto2_blank_data ,regb 
+35aa 202031fc branch timer_single_step 
+
+car_moto3_blank_data_timer:
+35ab da604c50 arg mem_car_moto3_blank_timer ,regc 
+35ac da4035b2 arg car_moto3_blank_data ,regb 
+35ad 202031fc branch timer_single_step 
+
+car_moto1_blank_data:
+35ae 7049ad00 jam 0 ,mem_le_receive_payload 
+35af 202035d0 branch car_motor_control 
+
+car_moto2_blank_data:
+35b0 7049af00 jam 0 ,mem_le_receive_payload + 2 
+35b1 202035d0 branch car_motor_control 
+
+car_moto3_blank_data:
+35b2 7049b100 jam 0 ,mem_le_receive_payload + 4 
+35b3 202035d0 branch car_motor_control 
+
+car_drive_old:
+35b4 6fe0c9ad fetch 1 ,mem_le_receive_payload 
+35b5 67e0c9b8 store 1 ,mem_motor1_status 
+35b6 6fe0c9ae fetch 1 ,mem_le_receive_payload + 1 
+35b7 67e0c9ba store 1 ,mem_motor2_status 
+35b8 202035da branch car_motor_control_common 
+
+car_left_right_control_old:
+35b9 6fe0c9ad fetch 1 ,mem_le_receive_payload 
+35ba 67e0c9ba store 1 ,mem_motor2_status 
+35bb 202035e8 branch car_motor2_control 
+
+car_front_back_control_old:
+35bc 6fe0c9b9 fetch 1 ,mem_motor1_speed 
+35bd 204035c1 call car_reset_old_speed 
+35be 6fe0c9ae fetch 1 ,mem_le_receive_payload + 1 
+35bf 67e0c9b8 store 1 ,mem_motor1_status 
+35c0 202035e6 branch car_motor1_control 
+
+car_reset_old_speed:
+35c1 c00135c5 beq speed_level_2 ,car_reset_old_speed2 
+35c2 c001b5c7 beq speed_level_3 ,car_reset_old_speed3 
+35c3 67e0c9b9 store 1 ,mem_motor1_speed 
+35c4 20600000 rtn 
+
+car_reset_old_speed2:
+35c5 7049b905 jam speed_level_5 ,mem_motor1_speed 
+35c6 20600000 rtn 
+
+car_reset_old_speed3:
+35c7 7049b90a jam speed_level_10 ,mem_motor1_speed 
+35c8 20600000 rtn 
+
+car_speed_set_old:
+35c9 6fe0c9ad fetch 1 ,mem_le_receive_payload 
+35ca 204035c1 call car_reset_old_speed 
+35cb 6fe0c9b9 fetch 1 ,mem_motor1_speed 
+35cc 20403634 call car_motor_speed_duty_setting 
+35cd 20403637 call car_motor_speed_duty_transform 
+35ce 70095d00 jam 0x00 ,mem_pdatatemp + 1 
+35cf 20206272 branch pwm_duty_cycle_set 
+
+car_motor_control:
+35d0 6fe0ca4b fetch 1 ,mem_car_24g_go_die_flag 
+35d1 247a0000 nrtn blank 
+35d2 6fe349ad fetch 6 ,mem_le_receive_payload 
+35d3 67e349b8 store 6 ,mem_motor1_status 
+35d4 6fe0c9b9 fetch 1 ,mem_motor1_speed 
+35d5 6848c9bb fetcht 1 ,mem_motor2_speed 
+35d6 98417e00 iand temp ,pdata 
+35d7 6848c9bd fetcht 1 ,mem_motor3_speed 
+35d8 98417e00 iand temp ,pdata 
+35d9 205a35ec call car_motor_working_flag ,blank 
+
+car_motor_control_common:
+35da 44dc4017 bpatch patch17_0 ,mem_patch17 
+35db 6fe1478f fetch 2 ,mem_ui_state_map 
+35dc 2feffe09 isolate1 ui_state_ble_connected ,pdata 
+35dd 2440b4ea ncall car_lpm_timer_enable ,true 
+35de 204035e6 call car_motor1_control 
+35df 204035e8 call car_motor2_control 
+35e0 202035e1 branch car_conn_led_state 
+
+car_conn_led_state:
+35e1 6fe0c9b8 fetch 1 ,mem_motor1_status 
+35e2 6848c9ba fetcht 1 ,mem_motor2_status 
+35e3 9840fe00 iadd temp ,pdata 
+35e4 243a7976 nbranch check_51cmd_led_on ,blank 
+35e5 20207974 branch check_51cmd_led_off 
+
+car_motor1_control:
+35e6 d8c049b8 arg mem_motor1_status ,contr 
+35e7 202035ee branch car_motor1_status_select 
+
+car_motor2_control:
+35e8 d8c049ba arg mem_motor2_status ,contr 
+35e9 202035f3 branch car_motor2_status_select 
+
+car_motor3_control:
+35ea d8c049bc arg mem_motor3_status ,contr 
+35eb 20203610 branch car_motor_status_select 
+
+car_motor_working_flag:
+35ec 704a2c00 jam 0 ,mem_car_working_flag 
+35ed 20600000 rtn 
+
+car_motor1_status_select:
+35ee efe08006 ifetch 1 ,contr 
+35ef c00035f8 beq turn_front ,car_lr_motor_stop 
+35f0 c000b5fc beq turn_left ,car_lr_motor_left 
+35f1 c0013600 beq turn_right ,car_lr_motor_right 
+35f2 20600000 rtn 
+
+car_motor2_status_select:
+35f3 efe08006 ifetch 1 ,contr 
+35f4 c0003604 beq motor_stop ,car_fb_motor_stop 
+35f5 c0013608 beq go_back ,car_fb_motor_front 
+35f6 c000b60c beq go_front ,car_fb_motor_back 
+35f7 20600000 rtn 
+
+car_lr_motor_stop:
+35f8 6848cc52 fetcht 1 ,mem_car_motor_left_gpio 
+35f9 20406109 call gpio_out_inactive 
+35fa 6848cc53 fetcht 1 ,mem_car_motor_right_gpio 
+35fb 20206109 branch gpio_out_inactive 
+
+car_lr_motor_left:
+35fc 6848cc52 fetcht 1 ,mem_car_motor_left_gpio 
+35fd 2040610d call gpio_out_active 
+35fe 6848cc53 fetcht 1 ,mem_car_motor_right_gpio 
+35ff 20206109 branch gpio_out_inactive 
+
+car_lr_motor_right:
+3600 6848cc52 fetcht 1 ,mem_car_motor_left_gpio 
+3601 20406109 call gpio_out_inactive 
+3602 6848cc53 fetcht 1 ,mem_car_motor_right_gpio 
+3603 2020610d branch gpio_out_active 
+
+car_fb_motor_stop:
+3604 6848cc54 fetcht 1 ,mem_car_motor_front_gpio 
+3605 20406109 call gpio_out_inactive 
+3606 6848cc55 fetcht 1 ,mem_car_motor_back_gpio 
+3607 20206109 branch gpio_out_inactive 
+
+car_fb_motor_front:
+3608 6848cc54 fetcht 1 ,mem_car_motor_front_gpio 
+3609 2040610d call gpio_out_active 
+360a 6848cc55 fetcht 1 ,mem_car_motor_back_gpio 
+360b 20206109 branch gpio_out_inactive 
+
+car_fb_motor_back:
+360c 6848cc54 fetcht 1 ,mem_car_motor_front_gpio 
+360d 20406109 call gpio_out_inactive 
+360e 6848cc55 fetcht 1 ,mem_car_motor_back_gpio 
+360f 2020610d branch gpio_out_active 
+
+car_motor_status_select:
+3610 44dcc017 bpatch patch17_1 ,mem_patch17 
+3611 efe08006 ifetch 1 ,contr 
+3612 c000361d beq motor_stop ,car_motor_stop 
+3613 c000b616 beq go_front ,car_motor_positive 
+3614 c0013618 beq go_back ,car_motor_negative 
+3615 20600000 rtn 
+
+car_motor_positive:
+3616 7049d600 jam 0 ,mem_motor_select_p_n 
+3617 20203619 branch car_motor_negative + 1 
+
+car_motor_negative:
+3618 7049d601 jam 1 ,mem_motor_select_p_n 
+3619 efe08006 ifetch 1 ,contr 
+361a 67e0c9d8 store 1 ,mem_car_motor_speed 
+361b efe40012 ifetch 8 ,regb 
+361c 20203622 branch car_motor_work 
+
+car_motor_stop:
+361d efe08012 ifetch 1 ,regb 
+361e 2040627e call pwm_disable 
+361f 1a40a401 increase 1 ,regb 
+3620 efe08012 ifetch 1 ,regb 
+3621 2020627e branch pwm_disable 
+
+car_motor_work:
+3622 67e449d9 store 8 ,mem_motor_pwm_pin1_set 
+3623 704a2c01 jam 1 ,mem_car_working_flag 
+3624 6fe0c9d6 fetch 1 ,mem_motor_select_p_n 
+3625 c0003630 beq 0 ,car_motor_select_positive 
+
+car_motor_select_negative:
+3626 6fe0c9da fetch 1 ,mem_motor_pwm_pin2_set 
+3627 67e0c9db store 1 ,mem_motor_pwm_pin_set 
+3628 6fe0c9d9 fetch 1 ,mem_motor_pwm_pin1_set 
+
+car_motor_work_next:
+3629 2040627e call pwm_disable 
+362a 6fe0c9d8 fetch 1 ,mem_car_motor_speed 
+362b 20403634 call car_motor_speed_duty_setting 
+362c 67e0c9e0 store 1 ,mem_motor_pwm_dute_set 
+362d 6fe349db fetch 6 ,mem_motor_pwm_pin_set 
+362e 67e3095c store 6 ,mem_pdatatemp 
+362f 20206260 branch pwm_out_set 
+
+car_motor_select_positive:
+3630 6fe0c9d9 fetch 1 ,mem_motor_pwm_pin1_set 
+3631 67e0c9db store 1 ,mem_motor_pwm_pin_set 
+3632 6fe0c9da fetch 1 ,mem_motor_pwm_pin2_set 
+3633 20203629 branch car_motor_work_next 
+
+car_motor_speed_duty_setting:
+3634 1feffe05 mul32 pdata ,5 ,pdata 
+3635 1fe0fe32 add pdata ,50 ,pdata 
+3636 20600000 rtn 
+
+car_motor_speed_duty_transform:
+3637 d8402ee0 arg 12000 ,temp 
+3638 984ffe00 imul32 temp ,pdata 
+3639 1fe6fc64 div pdata ,100 
+363a 20407e64 call wait_div_end 
+363b 18078400 quotient temp 
+363c 18422200 copy temp ,rega 
+363d 58002ee0 setarg 12000 
+363e 98462400 isub temp ,regb 
+363f 20600000 rtn 
+
+car_ir_data_rx_from_app:
+3640 20600000 rtn 
+
+car_led_control_receive:
+3641 6fe449ad fetch 8 ,mem_le_receive_payload 
+3642 67e449f7 store 8 ,mem_car_led_control 
+3643 20600000 rtn 
+
+car_info_request:
+3644 6fe0ca14 fetch 1 ,mem_car_config_device_select 
+3645 67e0ca0a store 1 ,mem_car_info_request_payload 
+3646 6fe0ca15 fetch 1 ,mem_car_config_motor_layout 
+3647 67e0ca0b store 1 ,mem_car_info_request_payload + 1 
+3648 6fe0ca16 fetch 1 ,mem_car_config_ir_enable 
+3649 67e0ca0c store 1 ,mem_car_info_request_payload + 2 
+364a df20000d arg 13 ,loopcnt 
+364b d8c04a05 arg mem_car_info_request_head ,contr 
+364c 20403561 call calc_check_sum_start 
+364d 67e0ca12 store 1 ,mem_car_info_request_checksum 
+364e da204a02 arg mem_car_info_request ,rega 
+364f 202079aa branch queue_push 
+
+car_g24_init:
+3650 58000000 setarg 0 
+3651 67e44885 store 8 ,mem_24g_bind_payload 
+3652 204023dc call g24_receive_init 
+3653 2020243a branch g24_mode_switch_init 
+
+car_g24_receive_process:
+3654 20403658 call car_g24_mode_switch 
+3655 20403660 call car_g24_work_mode 
+3656 2040366f call car_g24_bind_mode 
+3657 2020368d branch car_g24_lpm_dipatch 
+
+car_g24_mode_switch:
+3658 2040243e call g24_mode_switch_bind_work 
+
+car_g24_bind_mode_enable:
+3659 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+365a c1808000 rtnne dongle_bind 
+365b 6fe0cc65 fetch 1 ,mem_car_24g_bind_enable_delay_count 
+365c 243a2493 nbranch g24_switch_work_mode ,blank 
+365d 6fe0ca45 fetch 1 ,mem_car_24g_status 
+365e c0012493 beq work_search ,g24_switch_work_mode 
+365f 20600000 rtn 
+
+car_g24_work_mode:
+3660 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+3661 c1800000 rtnne dongle_work 
+3662 20402497 call g24_work_mode_start 
+3663 2037b66d branch car_g24_ch_polling_clear ,user3 
+
+car_g24_receive_ch_polling:
+3664 6fe0cc6d fetch 1 ,mem_car_enter_lpm_flag 
+3665 207a0000 rtn blank 
+3666 6fe0cc6e fetch 1 ,mem_car_24g_ch_polling 
+3667 1fe0fe01 increase 1 ,pdata 
+3668 67e0cc6e store 1 ,mem_car_24g_ch_polling 
+3669 c002366d beq 4 ,car_g24_ch_polling_clear 
+366a 20402281 call g24_ch 
+366b 204023e8 call g24_receive_packet_start 
+366c 2437b664 nbranch car_g24_receive_ch_polling ,user3 
+
+car_g24_ch_polling_clear:
+366d 704c6e00 jam 0 ,mem_car_24g_ch_polling 
+366e 20600000 rtn 
+
+car_g24_bind_mode:
+366f 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+3670 c1808000 rtnne dongle_bind 
+3671 2040234b call g24_bind_init 
+3672 20403683 call car_g24_bind_device_addr 
+3673 20402359 call g24_bind_data_process 
+3674 6fe0c884 fetch 1 ,mem_24g_bind_device_status 
+3675 243a367c nbranch car_g24_bind_mode_exit ,blank 
+3676 2040253a call g24_nodata_process 
+3677 6fe0c8c1 fetch 1 ,mem_24g_nodata_timer_enable 
+3678 207a0000 rtn blank 
+3679 58000000 setarg 0 
+367a 67e248dd store 4 ,mem_24g_device1_addr 
+367b 20600000 rtn 
+
+car_g24_bind_mode_exit:
+367c 7048c000 jam 0 ,mem_24g_mode_switch 
+367d da200000 arg 0 ,rega 
+367e 2040786c call ui_led_off_global 
+367f 20402493 call g24_switch_work_mode 
+3680 204022b2 call g24_timer_init 
+3681 6fe240a8 fetch 4 ,mem_lap 
+3682 20202292 branch g24_update_addr_and_synccrc8 
+
+car_g24_bind_device_addr:
+3683 6fe248dd fetch 4 ,mem_24g_device1_addr 
+3684 207a0000 rtn blank 
+3685 20202292 branch g24_update_addr_and_synccrc8 
+
+car_g24_cb_data_device1:
+3686 6fe1478f fetch 2 ,mem_ui_state_map 
+3687 c3848000 rtnbit1 ui_state_ble_connected 
+3688 6fe14a46 fetch 2 ,mem_car_24g_no_data_timeout_count 
+3689 67e14a48 store 2 ,mem_car_24g_no_data_timeout_timer 
+368a 704c6401 jam work_paired ,mem_car_24g_received_pac 
+368b da204898 arg mem_24g_rxdata_temp + 3 ,rega 
+368c 20203593 branch car_24g_receive_data 
+
+car_g24_lpm_dipatch:
+368d 6fe0cc6d fetch 1 ,mem_car_enter_lpm_flag 
+368e 207a0000 rtn blank 
+368f 20403695 call car_g24_lpm_wait 
+3690 24740000 nrtn user 
+3691 6fe1c85f fetch 3 ,mem_24g_enter_hibernate 
+3692 20407e1f call clk2lpo 
+3693 604a4160 storet 4 ,mem_sleep_counter 
+3694 20201464 branch lpm_sleep 
+
+car_g24_lpm_wait:
+3695 78347c00 enable user 
+3696 20401436 call lpo_calibration 
+3697 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+3698 203a7ec7 branch disable_user ,blank 
+3699 202034da branch car_le_process_lpm_before 
+
+dongle_init:
+369a 580036cc setarg dongle_dispatch 
+369b 67e1488d store 2 ,mem_cb_24g_receive_process 
+369c 5800379c setarg dongle_g24_mouse 
+369d 67e14891 store 2 ,mem_cb_24g_data_device1 
+369e 580037ad setarg dongle_g24_kb 
+369f 67e14893 store 2 ,mem_cb_24g_data_device2 
+36a0 58003773 setarg dongle_ackpayload_prep 
+36a1 67e1488f store 2 ,mem_cb_24g_ackpayload 
+36a2 580036d8 setarg dongle_usb_config 
+36a3 67e10b45 store 2 ,mem_cb_usb_config 
+36a4 20207a08 branch usb_init 
+
+dongle_default_init:
+36a5 6fe08a2b fetch 1 ,mem_tmp_buffer + dongle_kb_bind_efuse_offect 
+36a6 67e0c8f5 store 1 ,mem_dg_kb_bind_flag 
+36a7 204036c7 call dongle_xtal_select 
+36a8 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36a9 2feffe05 isolate1 dg_enable_eeprom ,pdata 
+36aa 2020b6ae branch dongle_default_no_eeprom ,true 
+36ab 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36ac 2feffe06 isolate1 dg_enable_new_chmap ,pdata 
+36ad 2040a2c4 call g24_chamap_param_update ,true 
+
+dongle_default_no_eeprom:
+36ae 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36af 1fe17e0f and_into 0x0f ,pdata 
+36b0 67e0c1e8 store 1 ,mem_tx_power 
+36b1 20403174 call app_sys_param_init 
+36b2 704881ff jam 0xff ,mem_rssi_buff_index 
+36b3 58000c4b setarg mem_dg_rssi_noise_buffer 
+36b4 67e148ed store 2 ,mem_rssi_noise_buffer_ptr 
+36b5 58000d4b setarg mem_dg_rssi_noise_dg_buffer 
+36b6 67e148ef store 2 ,mem_rssi_noise_self_buffer_ptr 
+36b7 58000e4b setarg mem_dg_rssi_noise_ms_buffer 
+36b8 67e148f1 store 2 ,mem_rssi_noise_device1_buffer_ptr 
+36b9 58000f4b setarg mem_dg_rssi_noise_kb_buffer 
+36ba 67e148f3 store 2 ,mem_rssi_noise_device2_buffer_ptr 
+36bb 70488085 jam tx_power_f5db ,mem_24g_pair_tx_power 
+36bc 70493e00 jam 0 ,mem_dg_kb_bind_success 
+36bd 7048d800 jam 0 ,mem_24g_bind_device_living 
+36be 204022d8 call g24_enable_1m 
+36bf 204023dc call g24_receive_init 
+36c0 204022db call g24_pair_param_init 
+36c1 204022b5 call g24_chmap_param_init 
+36c2 6fe0c91f fetch 1 ,mem_dg_usb_tx_interval 
+36c3 67e08b47 store 1 ,mem_usb_tx_interval 
+36c4 6fe4c916 fetch 9 ,mem_dg_usb_vid_pid 
+36c5 67e48b48 store 9 ,mem_usb_vid_pid 
+36c6 20600000 rtn 
+
+dongle_xtal_select:
+36c7 7040c518 jam xtal_24m ,mem_fcomp_div 
+36c8 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36c9 c4038000 rtnbit0 dg_enable_xtal_24m 
+36ca 7040c508 jam xtal_16m ,mem_fcomp_div 
+36cb 20600000 rtn 
+
+dongle_dispatch:
+36cc 6fe0c8bd fetch 1 ,mem_24g_pair_mode 
+36cd c0003763 beq 0x00 ,dongle_auto_bind 
+36ce c000b6fd beq 0x01 ,dongle_pc_bind 
+36cf 20600000 rtn 
+
+dongle_read_kb_bind_status:
+36d0 d8400001 arg 1 ,temp 
+36d1 da2048f5 arg mem_dg_kb_bind_flag ,rega 
+36d2 5800002a setarg dongle_kb_bind_efuse_offect 
+36d3 20205f00 branch efuse_read_data 
+
+dongle_write_kb_bind_status:
+36d4 df200001 arg 1 ,loopcnt 
+36d5 da2048f5 arg mem_dg_kb_bind_flag ,rega 
+36d6 d840002a arg dongle_kb_bind_efuse_offect ,temp 
+36d7 20205f12 branch efuse_program 
+
+dongle_usb_config:
+36d8 6fe0c915 fetch 1 ,mem_dg_sys_config 
+36d9 c28236dc bbit1 dg_enable_kb_icon ,dongle_usb_config_kb 
+36da 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
+36db c0ad36e0 bne dongle_kb_bind_success ,dongle_usb_config_param 
+
+dongle_usb_config_kb:
+36dc 7048f55a jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+36dd 6ff21aac fetch 4 ,usb_devicedata_addr + 9 
+36de 79207e1d set1 29 ,pdata 
+36df 67e20aa0 store 4 ,mem_devicedesc + 9 
+
+dongle_usb_config_param:
+36e0 204036f7 call dongle_usb_device_name 
+36e1 20407a5b call usb_tx_interval_config 
+36e2 204036e4 call dongle_usb_vid_pid_config 
+36e3 202036ed branch dongle_usb_hid_icon_config 
+
+dongle_usb_vid_pid_config:
+36e4 6fe08b48 fetch 1 ,mem_usb_vid_pid 
+36e5 207a0000 rtn blank 
+36e6 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
+36e7 c02d36eb beq dongle_kb_bind_success ,dongle_usb_vid_pid_for_suit 
+
+dongle_usb_vid_pid_for_mouse_only_auto_pair:
+36e8 6fe20b49 fetch 4 ,mem_usb_vid_pid + 1 
+
+dongle_usb_vid_pid_store:
+36e9 67e20aa0 store 4 ,mem_devicedesc + 9 
+36ea 20600000 rtn 
+
+dongle_usb_vid_pid_for_suit:
+36eb 6fe20b4d fetch 4 ,mem_usb_vid_pid + 5 
+36ec 202036e9 branch dongle_usb_vid_pid_store 
+
+dongle_usb_hid_icon_config:
+36ed 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
+36ee c02d36f3 beq dongle_kb_bind_success ,dongle_usb_kb_hidreportdesc 
+36ef 580099a4 setarg usb_kbdata_vendor_define_addr 
+36f0 67e10a93 store 2 ,mem_hidreportdesc_kb 
+36f1 700ac41a jam 0x1a ,mem_confdesc + 26 
+36f2 20600000 rtn 
+
+dongle_usb_kb_hidreportdesc:
+36f3 580099bf setarg usb_kbdata_addr 
+36f4 67e10a93 store 2 ,mem_hidreportdesc_kb 
+36f5 700ac43f jam 0x3f ,mem_confdesc + 26 
+36f6 20600000 rtn 
+
+dongle_usb_device_name:
+36f7 6fe0c920 fetch 1 ,mem_dg_usb_device_name 
+36f8 207a0000 rtn blank 
+36f9 d8c04920 arg mem_dg_usb_device_name ,contr 
+36fa d8a00b09 arg mem_string2 ,contw 
+36fb df20001e arg 30 ,loopcnt 
+36fc 20207dd4 branch memcpy 
+
+dongle_pc_bind:
+36fd 20402493 call g24_switch_work_mode 
+
+dongle_pc_bind_loop:
+36fe 2040376b call dongle_work_mode_auto 
+36ff 2040249c call g24_bind_mode_auto 
+3700 2040372f call dongle_usb_dispatch 
+3701 202036fe branch dongle_pc_bind_loop 
+
+dongle_g24_blank_data_process:
+3702 20403705 call dongle_g24_ms_blank_data 
+3703 20403714 call dongle_g24_kb_blank_data 
+3704 20203723 branch dongle_g24_kb_mul_blank_data 
+
+dongle_g24_ms_blank_data:
+3705 6fe0c914 fetch 1 ,mem_dg_ms_blank_data_enable 
+3706 207a0000 rtn blank 
+3707 d8e0000b arg timer_ms_blank ,queue 
+3708 20407de9 call timer_check 
+3709 247a0000 nrtn blank 
+370a 70491400 jam 0 ,mem_dg_ms_blank_data_enable 
+370b 58000001 setarg ms_report_id 
+370c 67e08bff store 1 ,mem_usb_mouse_data 
+370d 58000000 setarg 0 
+370e e7e38005 istore 7 ,contw 
+
+dongle_usb_tx_ms_data:
+370f 700bf820 jam usb_ep2_ms ,mem_usb_ep2_data 
+
+dongle_usb_tx_enable_ep2:
+3710 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+3711 79207e02 set1 2 ,pdata 
+3712 67e08bf9 store 1 ,mem_usb_tx_enable 
+3713 20600000 rtn 
+
+dongle_g24_kb_blank_data:
+3714 6fe0c912 fetch 1 ,mem_dg_kb_blank_data_enable 
+3715 207a0000 rtn blank 
+3716 d8e0000e arg timer_kb_blank ,queue 
+3717 20407de9 call timer_check 
+3718 247a0000 nrtn blank 
+3719 70491200 jam 0 ,mem_dg_kb_blank_data_enable 
+371a d8a00c0f arg mem_usb_kb_data ,contw 
+371b df200002 arg 2 ,loopcnt 
+371c 20407d8c call memset0 
+
+dongle_usb_tx_kb_data:
+371d 700c0f00 jam kb_normal_report_id ,mem_usb_kb_data 
+
+dongle_usb_tx_enable_ep1:
+371e 700bf710 jam usb_ep1_kb ,mem_usb_ep1_data 
+371f 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+3720 79207e01 set1 1 ,pdata 
+3721 67e08bf9 store 1 ,mem_usb_tx_enable 
+3722 20600000 rtn 
+
+dongle_g24_kb_mul_blank_data:
+3723 6fe0c913 fetch 1 ,mem_dg_kb_mul_blank_data_enable 
+3724 207a0000 rtn blank 
+3725 d8e0000c arg timer_kb_mul_blank ,queue 
+3726 20407de9 call timer_check 
+3727 247a0000 nrtn blank 
+3728 70491300 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+3729 d8a00c1f arg mem_usb_kb_multikey ,contw 
+372a df200002 arg 2 ,loopcnt 
+372b 20407d8c call memset0 
+372c 700c1f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
+
+dongle_usb_tx_multikey_data:
+372d 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
+372e 20203710 branch dongle_usb_tx_enable_ep2 
+
+dongle_usb_dispatch:
+372f 44dd4017 bpatch patch17_2 ,mem_patch17 
+3730 6fe08bed fetch 1 ,mem_usb_remote_wakeup 
+3731 205a377d call dongle_clear_pc_sleep_flag ,blank 
+3732 204079fc call usb_isr 
+3733 6fe08be3 fetch 1 ,mem_usb0_get_set_report 
+3734 207a0000 rtn blank 
+3735 700be300 jam 0 ,mem_usb0_get_set_report 
+3736 6fe10be1 fetch 2 ,mem_usb_setup_bvalue_temp 
+3737 d84002ba arg pc_set_report ,temp 
+3738 98467c00 isub temp ,null 
+3739 24628000 nrtn zero 
+373a 6fe08b61 fetch 1 ,mem_usb0_set_report_data 
+373b c1dd0000 rtnne pc_report_id 
+373c 6fe08b62 fetch 1 ,mem_usb0_set_report_data + 1 
+373d c0503744 beq command_mode ,dongle_dispose_cmd_mode 
+373e c050b74a beq command_bind ,dongle_dispose_cmd_bind 
+373f c0533756 beq command_current_project ,dongle_dispose_cmd_current_project 
+3740 c053b758 beq command_current_mode ,dongle_dispose_cmd_current_mode 
+3741 c054b75e beq command_current_fw_version ,dongle_dispose_cmd_current_fw_version 
+
+dongle_usb0_data_ready_report_set0:
+3742 700be400 jam 0 ,mem_usb0_data_ready_report 
+3743 20600000 rtn 
+
+dongle_dispose_cmd_mode:
+3744 6fe08b63 fetch 1 ,mem_usb0_set_report_data + 2 
+3745 c040b747 beq com_mode_bind ,dongle_enter_bind_mode 
+3746 20203742 branch dongle_usb0_data_ready_report_set0 
+
+dongle_enter_bind_mode:
+3747 20402348 call g24_bind_mode_enable 
+
+dongle_usb0_data_ready_report_set1:
+3748 700be401 jam 1 ,mem_usb0_data_ready_report 
+3749 20600000 rtn 
+
+dongle_dispose_cmd_bind:
+374a 6fe08b63 fetch 1 ,mem_usb0_set_report_data + 2 
+374b c000b74f beq com_bind_get ,dongle_dispose_cmd_get_bind 
+374c c0423752 beq com_bind_exit ,dongle_dispose_cmd_exit_bind 
+374d c053b754 beq com_read_mode ,dongle_dispose_cmd_read_mode 
+374e 20203742 branch dongle_usb0_data_ready_report_set0 
+
+dongle_dispose_cmd_get_bind:
+374f 6fe0c884 fetch 1 ,mem_24g_bind_device_status 
+3750 67e08ba2 store 1 ,mem_usb0_get_report_data + 1 
+3751 20203748 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_exit_bind:
+3752 20402494 call g24_work_mode_enable 
+3753 2020374f branch dongle_dispose_cmd_get_bind 
+
+dongle_dispose_cmd_read_mode:
+
+dongle_dispose_in_bind_mode:
+3754 700ba2a1 jam command_bind ,mem_usb0_get_report_data + 1 
+3755 20203748 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_project:
+3756 700ba215 jam product_id ,mem_usb0_get_report_data + 1 
+3757 20203748 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_mode:
+3758 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+3759 c000375c beq dongle_work ,dongle_dispose_in_work_mode 
+375a c000b754 beq dongle_bind ,dongle_dispose_in_bind_mode 
+375b 20600000 rtn 
+
+dongle_dispose_in_work_mode:
+375c 700ba2a0 jam command_mode ,mem_usb0_get_report_data + 1 
+375d 20203748 branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_fw_version:
+375e 700ba200 jam fw_version0 ,mem_usb0_get_report_data + 1 
+375f 700ba300 jam fw_version1 ,mem_usb0_get_report_data + 2 
+3760 700ba401 jam fw_version2 ,mem_usb0_get_report_data + 3 
+3761 700ba507 jam fw_version3 ,mem_usb0_get_report_data + 4 
+3762 20203748 branch dongle_usb0_data_ready_report_set1 
+
+dongle_auto_bind:
+3763 2040243a call g24_mode_switch_init 
+
+dongle_auto_bind_loop:
+3764 2040243e call g24_mode_switch_bind_work 
+3765 20402464 call g24_mode_switch_bind_search 
+3766 2040376b call dongle_work_mode_auto 
+3767 2040249c call g24_bind_mode_auto 
+3768 204024b9 call g24_search_mode_auto 
+3769 2040372f call dongle_usb_dispatch 
+376a 20203764 branch dongle_auto_bind_loop 
+
+dongle_work_mode_auto:
+376b 44ddc017 bpatch patch17_3 ,mem_patch17 
+376c 6fe0c8c3 fetch 1 ,mem_24g_work_mode 
+376d c1800000 rtnne dongle_work 
+376e 20402497 call g24_work_mode_start 
+376f 20403702 call dongle_g24_blank_data_process 
+3770 6fe0c8bd fetch 1 ,mem_24g_pair_mode 
+3771 247a0000 nrtn blank 
+3772 2020253a branch g24_nodata_process 
+
+dongle_ackpayload_prep:
+3773 6fe0c839 fetch 1 ,mem_24g_data_type 
+3774 c000b776 beq datatype_device1 ,dongle_ackpayload_prep_mouse 
+3775 c001377f beq datatype_device2 ,dongle_ackpayload_prep_keyboard 
+
+dongle_ackpayload_prep_mouse:
+3776 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+3777 c2803785 bbit1 0 ,dongle_pc_sleep_ackpayload_prep_mouse 
+3778 20203781 branch dongle_ackpayload_prep_end 
+
+dongle_set_pc_sleep_flag:
+3779 6fe0c09a fetch 1 ,mem_device_option 
+377a c1820000 rtnne dvc_op_dongle 
+377b 70493f03 jam 3 ,mem_dg_pc_sleep_flag 
+377c 20600000 rtn 
+
+dongle_clear_pc_sleep_flag:
+377d 70493f00 jam 0 ,mem_dg_pc_sleep_flag 
+377e 20600000 rtn 
+
+dongle_ackpayload_prep_keyboard:
+377f 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+3780 c280b789 bbit1 1 ,dongle_pc_sleep_ackpayload_prep_keyboard 
+
+dongle_ackpayload_prep_end:
+3781 6fe0c8be fetch 1 ,mem_24g_ackpayload_enable 
+3782 c000b790 beq bind_ackpayload ,dongle_g24_bind_ackpayload_prep 
+3783 c001b794 beq kb_led_ackpayload ,dongle_g24_kb_led_ackpayload_prep 
+3784 20600000 rtn 
+
+dongle_pc_sleep_ackpayload_prep_mouse:
+3785 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+3786 793ffe00 set0 0 ,pdata 
+3787 67e0c93f store 1 ,mem_dg_pc_sleep_flag 
+3788 2020378c branch dongle_pc_sleep_ackpayload_prep 
+
+dongle_pc_sleep_ackpayload_prep_keyboard:
+3789 6fe0c93f fetch 1 ,mem_dg_pc_sleep_flag 
+378a 793ffe01 set0 1 ,pdata 
+378b 67e0c93f store 1 ,mem_dg_pc_sleep_flag 
+
+dongle_pc_sleep_ackpayload_prep:
+378c 70483801 jam 0x01 ,mem_24g_datalen 
+378d 580000ff setarg 0xff 
+378e 67e0c7c9 store 1 ,mem_24g_txbuf 
+378f 20600000 rtn 
+
+dongle_g24_bind_ackpayload_prep:
+3790 7048be01 jam 1 ,mem_24g_ackpayload_enable 
+3791 204023bb call g24_binding_device_check 
+3792 24778000 nrtn user3 
+3793 20202354 branch g24_bind_ackpayload_prep 
+
+dongle_g24_kb_led_ackpayload_prep:
+3794 6fe0c7a9 fetch 1 ,mem_24g_rxbuf + 2 
+3795 c000b790 beq datatype_device1 ,dongle_g24_bind_ackpayload_prep 
+3796 c07fb790 beq datatype_attemp ,dongle_g24_bind_ackpayload_prep 
+3797 700be500 jam 0 ,mem_usb_tx_win_enable 
+3798 70483801 jam 0x01 ,mem_24g_datalen 
+3799 6fe0c8ce fetch 1 ,mem_24g_led_status 
+379a 67e0c7c9 store 1 ,mem_24g_txbuf 
+379b 20600000 rtn 
+
+dongle_g24_mouse:
+379c 58000001 setarg ms_report_id 
+379d 67e08bff store 1 ,mem_usb_mouse_data 
+379e 6fe3c898 fetch 7 ,mem_24g_rxdata_temp + 3 
+379f e7e38005 istore 7 ,contw 
+37a0 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+37a1 245a37a5 ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
+37a2 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+37a3 205a37a9 call dongle_g24_ms_disable_blank_data_forcibly ,blank 
+37a4 2020370f branch dongle_usb_tx_ms_data 
+
+dongle_g24_ms_enable_blank_data_forcibly:
+37a5 70491401 jam 1 ,mem_dg_ms_blank_data_enable 
+37a6 58000180 setarg timer_ms_blank_delay 
+37a7 d8e0000b arg timer_ms_blank ,queue 
+37a8 20207ddb branch timer_init 
+
+dongle_g24_ms_disable_blank_data_forcibly:
+37a9 70491400 jam 0 ,mem_dg_ms_blank_data_enable 
+37aa 58000000 setarg 0 
+37ab d8e0000b arg timer_ms_blank ,queue 
+37ac 20207ddb branch timer_init 
+
+dongle_g24_kb:
+37ad 6fe0c898 fetch 1 ,mem_24g_rxdata_temp + 3 
+37ae c00037b2 beq 0 ,dongle_g24_kb_type0 
+37af c00137e5 beq 2 ,dongle_g24_kb_type2 
+37b0 c001b7cd beq 3 ,dongle_g24_kb_type3 
+37b1 202023fa branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_type0:
+37b2 6fe0c89a fetch 1 ,mem_24g_rxdata_temp + 5 
+37b3 67e0c8be store 1 ,mem_24g_ackpayload_enable 
+37b4 70489a00 jam 0 ,mem_24g_rxdata_temp + 5 
+37b5 d8a00c0f arg mem_usb_kb_data ,contw 
+37b6 d8c04899 arg mem_24g_rxdata_temp + 4 ,contr 
+37b7 df200008 arg 8 ,loopcnt 
+37b8 20407dd4 call memcpy 
+37b9 6fe40c0f fetch 8 ,mem_usb_kb_data 
+37ba 245a37c5 ncall dongle_g24_kb_enable_blank_data_forcibly ,blank 
+37bb 6fe40c0f fetch 8 ,mem_usb_kb_data 
+37bc 205a37c9 call dongle_g24_kb_disable_blank_data_forcibly ,blank 
+37bd 6fe40c0f fetch 8 ,mem_usb_kb_data 
+37be 67e448f6 store 8 ,mem_dg_kb_data_sta_data 
+37bf 684c48fe fetcht 8 ,mem_dg_kb_data_last_data 
+37c0 98467c00 isub temp ,null 
+37c1 2442b71e ncall dongle_usb_tx_enable_ep1 ,zero 
+37c2 6fe448f6 fetch 8 ,mem_dg_kb_data_sta_data 
+37c3 67e448fe store 8 ,mem_dg_kb_data_last_data 
+37c4 202023fa branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_enable_blank_data_forcibly:
+37c5 70491201 jam 1 ,mem_dg_kb_blank_data_enable 
+37c6 58000180 setarg timer_kb_blank_delay 
+37c7 d8e0000e arg timer_kb_blank ,queue 
+37c8 20207ddb branch timer_init 
+
+dongle_g24_kb_disable_blank_data_forcibly:
+37c9 70491200 jam 0 ,mem_dg_kb_blank_data_enable 
+37ca 58000000 setarg 0 
+37cb d8e0000e arg timer_kb_blank ,queue 
+37cc 20207ddb branch timer_init 
+
+dongle_g24_kb_type3:
+37cd d8a00c1f arg mem_usb_kb_multikey ,contw 
+37ce d8c04898 arg mem_24g_rxdata_temp + 3 ,contr 
+37cf df200003 arg 3 ,loopcnt 
+37d0 20407dd4 call memcpy 
+37d1 6fe10c20 fetch 2 ,mem_usb_kb_multikey + 1 
+37d2 245a37dd ncall dongle_g24_kb_mul_enable_blank_data_forcibly ,blank 
+37d3 6fe10c20 fetch 2 ,mem_usb_kb_multikey + 1 
+37d4 205a37e1 call dongle_g24_kb_mul_disable_blank_data_forcibly ,blank 
+37d5 6fe18c1f fetch 3 ,mem_usb_kb_multikey 
+37d6 67e1c906 store 3 ,mem_dg_kb_multikey_sta_data 
+37d7 6849c909 fetcht 3 ,mem_dg_kb_multikey_last_data 
+37d8 98467c00 isub temp ,null 
+37d9 2442b72d ncall dongle_usb_tx_multikey_data ,zero 
+37da 6fe1c906 fetch 3 ,mem_dg_kb_multikey_sta_data 
+37db 67e1c909 store 3 ,mem_dg_kb_multikey_last_data 
+37dc 202023fa branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_mul_enable_blank_data_forcibly:
+37dd 70491301 jam 1 ,mem_dg_kb_mul_blank_data_enable 
+37de 58000180 setarg timer_kb_mul_blank_delay 
+37df d8e0000c arg timer_kb_mul_blank ,queue 
+37e0 20207ddb branch timer_init 
+
+dongle_g24_kb_mul_disable_blank_data_forcibly:
+37e1 70491300 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+37e2 58000000 setarg 0 
+37e3 d8e0000c arg timer_kb_mul_blank ,queue 
+37e4 20207ddb branch timer_init 
+
+dongle_g24_kb_type2:
+37e5 d8a00c2f arg mem_usb_kb_system ,contw 
+37e6 d8c04898 arg mem_24g_rxdata_temp + 3 ,contr 
+37e7 df200002 arg 2 ,loopcnt 
+37e8 20407dd4 call memcpy 
+37e9 6fe10c2f fetch 2 ,mem_usb_kb_system 
+37ea 245a37f5 ncall dongle_g24_kb_sys_enable_blank_data_forcibly ,blank 
+37eb 6fe10c2f fetch 2 ,mem_usb_kb_system 
+37ec 205a37f9 call dongle_g24_kb_sys_disable_blank_data_forcibly ,blank 
+37ed 6fe10c2f fetch 2 ,mem_usb_kb_system 
+37ee 67e1490c store 2 ,mem_dg_kb_system_sta_data 
+37ef 6849490f fetcht 2 ,mem_dg_kb_system_last_data 
+37f0 98467c00 isub temp ,null 
+37f1 2442b7fd ncall dongle_usb_tx_sys_data ,zero 
+37f2 6fe1490c fetch 2 ,mem_dg_kb_system_sta_data 
+37f3 67e1490f store 2 ,mem_dg_kb_system_last_data 
+37f4 202023fa branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_sys_enable_blank_data_forcibly:
+37f5 70491301 jam 1 ,mem_dg_kb_mul_blank_data_enable 
+37f6 58000180 setarg timer_kb_mul_blank_delay 
+37f7 d8e0000c arg timer_kb_mul_blank ,queue 
+37f8 20207ddb branch timer_init 
+
+dongle_g24_kb_sys_disable_blank_data_forcibly:
+37f9 70491300 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+37fa 58000000 setarg 0 
+37fb d8e0000c arg timer_kb_mul_blank ,queue 
+37fc 20207ddb branch timer_init 
+
+dongle_usb_tx_sys_data:
+37fd 700bf822 jam usb_ep2_systemkey ,mem_usb_ep2_data 
+37fe 20203710 branch dongle_usb_tx_enable_ep2 
+
+dongle_g24_store_dvc2_bind_flag:
+37ff 6fe0c09a fetch 1 ,mem_device_option 
+3800 c1820000 rtnne dvc_op_dongle 
+3801 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
+3802 c12d0000 rtneq dongle_kb_bind_success 
+
+dongle_prep_soft_reset:
+3803 70493e01 jam 1 ,mem_dg_kb_bind_success 
+3804 20600000 rtn 
+
+dongle_kb_bind_soft_reset:
+3805 6fe0c09a fetch 1 ,mem_device_option 
+3806 c1820000 rtnne dvc_op_dongle 
+3807 6fe0c93e fetch 1 ,mem_dg_kb_bind_success 
+3808 207a0000 rtn blank 
+3809 70096400 jam 0 ,mem_temp 
+
+dongle_wirte_efuse_bind_status:
+380a 7048f55a jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+380b 204036d4 call dongle_write_kb_bind_status 
+380c 204036d0 call dongle_read_kb_bind_status 
+380d 6fe08964 fetch 1 ,mem_temp 
+380e 1fe0fe01 increase 1 ,pdata 
+380f 67e08964 store 1 ,mem_temp 
+3810 c07fde29 beq 0xff ,soft_reset_chip 
+3811 6fe0c8f5 fetch 1 ,mem_dg_kb_bind_flag 
+3812 c0ad380a bne dongle_kb_bind_success ,dongle_wirte_efuse_bind_status 
+3813 20205e29 branch soft_reset_chip 
+
+module_init:
+3814 20758000 rtn wake 
+3815 20401a55 call le_modified_name 
+3816 5800385b setarg module_process_idle 
+3817 67e14465 store 2 ,mem_cb_idle_process 
+3818 58003848 setarg module_bt_conn_process 
+3819 67e14463 store 2 ,mem_cb_bt_process 
+381a 5800385f setarg module_process_bb_event 
+381b 67e14467 store 2 ,mem_cb_bb_event_process 
+381c 58003844 setarg module_lpm_lock 
+381d 67e1445b store 2 ,mem_cb_check_wakelock 
+381e 58003998 setarg module_hci_cmd_transmit_le_notify 
+381f 67e1446d store 2 ,mem_cb_ble_transmit 
+3820 58003b94 setarg module_hci_event_receive_spp_data 
+3821 67e1465d store 2 ,mem_cb_receive_spp_data 
+3822 58003c37 setarg module_le_receive_data 
+3823 67e1446b store 2 ,mem_cb_att_write 
+3824 58003c4e setarg module_bb_event_timer 
+3825 67e1446f store 2 ,mem_cb_event_timer 
+3826 20403858 call module_spp_clear_last_transmite_clock 
+3827 44de4017 bpatch patch17_4 ,mem_patch17 
+3828 2040382b call module_lpm_uart_init 
+3829 2040383f call module_gpio_init 
+382a 20203baa branch module_hci_event_enter_standby_mode 
+
+module_lpm_uart_init:
+382b 6ff08060 fetch 1 ,core_uart_ctrl 
+382c 793ffe00 set0 bit_uart_control_enable ,pdata 
+382d 67f08060 store 1 ,core_uart_ctrl 
+382e 6fe447b7 fetch 8 ,mem_module_uart_rx_buffer 
+382f 20405f56 call uarta_init_dma_mem 
+3830 6fe147bf fetch uart_baud_len ,mem_module_uarta_baud_rate 
+3831 20405f6a call uarta_init_baud_rate 
+3832 20405f7d call uart_clock_select_main_freq_crystal 
+3833 70807d08 jam gpcfg_uart_txd ,core_gpio_conf + hci_uart_tx_gpio_num 
+3834 70807e49 jam gpcfg_uart_rxd | gpcfg_pullup ,core_gpio_conf + hci_uart_rx_gpio_num 
+3835 7080790a jam gpcfg_uart_rts ,core_gpio_conf + hci_uart_rts_gpio_num 
+3836 70807a0b jam gpcfg_uart_cts ,core_gpio_conf + hci_uart_cts_gpio_num 
+3837 d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+3838 6fe147c6 fetch 2 ,mem_module_flag 
+3839 2feffe00 isolate1 module_flag_uart_flow_control ,pdata 
+383a 79208404 setflag true ,bit_uart_control_flow_control ,temp 
+383b 60588060 storet 1 ,core_uart_ctrl 
+383c 20600000 rtn 
+
+module_lpm_init:
+383d 20403858 call module_spp_clear_last_transmite_clock 
+383e 2020382b branch module_lpm_uart_init 
+
+module_gpio_init:
+383f 6848c7ab fetcht 1 ,mem_module_connect_state_gpio 
+3840 2040610d call gpio_config_output 
+3841 204038c2 call module_set_conn_pin_low 
+3842 6848c7a9 fetcht 1 ,mem_module_wake_up_gpio 
+3843 202060f4 branch gpio_config_input 
+
+module_lpm_lock:
+3844 6848c7a9 fetcht 1 ,mem_module_wake_up_gpio 
+3845 204060fd call gpio_get_bit 
+3846 2420b251 nbranch app_put_lpm_wake_lock ,true 
+3847 2020324f branch app_get_lpm_wake_lock 
+
+module_bt_conn_process:
+3848 2040384a call module_spp_enter_sniff 
+3849 20203c5e branch module_control_air_flow 
+
+module_spp_enter_sniff:
+384a 6fe0c78f fetch 1 ,mem_ui_state_map 
+384b c3023858 bbit0 ui_state_bt_spp_conn ,module_spp_clear_last_transmite_clock 
+384c 58003eff setarg 0x3eff 
+384d 684a47ce fetcht 4 ,mem_last_transmite_clock 
+384e 98408400 iadd temp ,temp 
+384f 1c427e00 copy clkn_bt ,pdata 
+3850 98467c00 isub temp ,null 
+3851 24610000 nrtn positive 
+3852 6fe1478f fetch 2 ,mem_ui_state_map 
+3853 c282b858 bbit1 ui_state_bt_sniff ,module_spp_clear_last_transmite_clock 
+3854 6fe147c6 fetch 2 ,mem_module_flag 
+3855 c3850000 rtnbit1 moudle_task_sniff 
+3856 20403c61 call module_set_sniff_task_flag 
+3857 2040328d call app_bt_enter_sniff 
+
+module_spp_clear_last_transmite_clock:
+3858 1c427e00 copy clkn_bt ,pdata 
+3859 67e247ce store 4 ,mem_last_transmite_clock 
+385a 20600000 rtn 
+
+module_process_idle:
+385b 20403c5e call module_control_air_flow 
+385c 2040534f call l2cap_malloc_is_fifo_full 
+385d 247a0000 nrtn blank 
+385e 202038c7 branch module_process_check_hci_command_complete 
+
+module_process_bb_event:
+385f 1a627e00 copy regc ,pdata 
+3860 c000b8af beq bt_evt_bb_connected ,module_process_bb_conn 
+3861 c001387e beq bt_evt_bb_disconnected ,module_process_bb_event_disconned 
+3862 c00238b2 beq bt_evt_reconn_failed ,module_process_reconn_fail 
+3863 c002b89f beq bt_evt_setup_complete ,module_process_setup_complete 
+3864 c0043885 beq bt_evt_spp_connected ,module_process_spp_connected 
+3865 c004b88c beq bt_evt_spp_disconnected ,module_process_spp_disconnected 
+3866 c00538a5 beq bt_evt_pincode_req ,module_process_evt_pincode_req 
+3867 c005b891 beq bt_evt_enter_sniff ,module_process_enter_sniff 
+3868 c006389d beq bt_evt_exit_sniff ,module_process_exit_sniff 
+3869 c009b8b2 beq bt_evt_reconn_page_timeout ,module_process_page_time_out 
+386a c00a38ab beq bt_evt_le_connected ,module_process_le_conn 
+386b c00ab8a1 beq bt_evt_le_disconnected ,module_process_bb_even_le_disconn 
+386c c010b8a6 beq bt_evt_sniff_not_accept ,module_process_sniff_not_accept 
+386d c011b8a7 beq bt_evt_unsniff_accept ,module_process_unsniff_accept 
+386e c01238aa beq bt_evt_unsniff_not_accept ,module_process_unsniff_not_accept 
+386f c0183bf2 beq bt_evt_le_pairing_fail ,module_hci_event_le_pairing_fail 
+3870 c018bbf4 beq bt_evt_le_pairing_success ,module_hci_event_le_pairing_success 
+3871 c0193c02 beq bt_evt_le_start_enc ,module_hci_event_start_enc 
+3872 c019bc00 beq bt_evt_le_pause_enc ,module_hci_event_pause_enc 
+3873 c01a3bec beq bt_evt_le_tk_generate ,module_hci_event_le_tk 
+3874 c01abbd5 beq bt_evt_bt_gkey_generate ,module_hci_event_gkey_generate 
+3875 c01b3bea beq bt_evt_bt_get_passkey ,module_hci_event_passkey_entry_mode 
+3876 c01bbbf6 beq bt_evt_bt_pairing_fail ,module_hci_event_bt_pairing_fail 
+3877 c01c3bf8 beq bt_evt_bt_pairing_success ,module_hci_event_bt_pairing_success 
+3878 c01dbbd5 beq bt_evt_le_gkey_generate ,module_hci_event_gkey_generate 
+3879 c01ebbcc beq bt_evt_store_nvram ,module_hci_event_store_device 
+387a c020b8b4 beq bt_evt_le_ltk_lost ,module_process_ble_ltk_lost 
+387b c02138b6 beq bt_evt_le_update_phy ,module_process_ble_update_phy 
+387c c021bbea beq bt_evt_le_get_passkey ,module_hci_event_passkey_entry_mode 
+387d 20600000 rtn 
+
+module_process_bb_event_disconned:
+387e 20403858 call module_spp_clear_last_transmite_clock 
+387f 6fe0c772 fetch 1 ,mem_flag_pairing_state 
+3880 245a3bf6 ncall module_hci_event_bt_pairing_fail ,blank 
+3881 204038b2 call module_disconn_start 
+3882 6fe1478f fetch 2 ,mem_ui_state_map 
+3883 c4020000 rtnbit0 ui_state_bt_spp_conn 
+3884 2020388c branch module_spp_disconnected 
+
+module_process_spp_connected:
+3885 6fe1478f fetch 2 ,mem_ui_state_map 
+3886 79207e04 set1 ui_state_bt_spp_conn ,pdata 
+3887 67e1478f store 2 ,mem_ui_state_map 
+3888 6fe0c7b4 fetch 1 ,mem_module_spp_lpm_mult 
+3889 67e0c177 store 1 ,mem_lpm_mult 
+388a 204038c2 call module_set_conn_pin_low 
+388b 20203b7f branch module_hci_event_spp_connect 
+
+module_process_spp_disconnected:
+
+module_spp_disconnected:
+388c 6fe1478f fetch 2 ,mem_ui_state_map 
+388d c4020000 rtnbit0 ui_state_bt_spp_conn 
+388e 793ffe04 set0 ui_state_bt_spp_conn ,pdata 
+388f 67e1478f store 2 ,mem_ui_state_map 
+3890 20203b83 branch module_hci_event_spp_disconnect 
+
+module_process_enter_sniff:
+
+module_sniff_param_check:
+3891 20403858 call module_spp_clear_last_transmite_clock 
+3892 6fe14042 fetch 2 ,mem_context + coffset_tsniff 
+3893 1fe37e00 rshift pdata ,pdata 
+3894 68494455 fetcht 2 ,mem_sniff_param_interval 
+3895 98467c00 isub temp ,null 
+3896 2422b898 nbranch module_sniff_param_check_unsniff ,zero 
+3897 20203295 branch app_lpm_mult_enable 
+
+module_sniff_param_check_unsniff:
+3898 6fe147c6 fetch 2 ,mem_module_flag 
+3899 c3848000 rtnbit1 moudle_task_unsniff 
+389a 6ff10112 fetch 2 ,core_uart_rxitems 
+389b 245a3c65 ncall module_set_unsniff_task_flag ,blank 
+389c 2020328b branch app_bt_sniff_exit 
+
+module_process_exit_sniff:
+389d 20403c63 call module_clear_sniff_task_flag 
+389e 20203297 branch app_lpm_mult_disable 
+
+module_process_setup_complete:
+389f 20403858 call module_spp_clear_last_transmite_clock 
+38a0 202038b9 branch module_conn_start 
+
+module_process_bb_even_le_disconn:
+38a1 20401ac8 call le_clr_config_more_data 
+38a2 7047c800 jam 0 ,mem_module_hci_notify_len 
+38a3 204038b2 call module_disconn_start 
+38a4 20203b85 branch module_hci_event_le_disconnect 
+
+module_process_evt_pincode_req:
+38a5 2020325c branch app_bt_set_pincode 
+
+module_process_sniff_not_accept:
+38a6 20203c63 branch module_clear_sniff_task_flag 
+
+module_process_unsniff_accept:
+38a7 6fe147c6 fetch 2 ,mem_module_flag 
+38a8 c304b28d bbit0 moudle_task_unsniff ,app_bt_enter_sniff 
+38a9 20203c67 branch module_clear_unsniff_task_flag 
+
+module_process_unsniff_not_accept:
+38aa 20203c67 branch module_clear_unsniff_task_flag 
+
+module_process_le_conn:
+38ab 204038b9 call module_conn_start 
+38ac 6fe0c7b5 fetch 1 ,mem_module_le_lpm_mult 
+38ad 67e0c177 store 1 ,mem_lpm_mult 
+38ae 20203b81 branch module_hci_event_le_connect 
+
+module_process_bb_conn:
+38af 70476e00 jam 0 ,mem_flag_mode_ssp_pin 
+38b0 20403c63 call module_clear_sniff_task_flag 
+38b1 20203c67 branch module_clear_unsniff_task_flag 
+
+module_process_page_time_out:
+
+module_process_reconn_fail:
+
+module_disconn_start:
+38b2 2040392f call module_start_adv_discovery_by_command 
+38b3 202038b7 branch module_set_conn_pin_high 
+
+module_process_ble_ltk_lost:
+38b4 20402162 call le_send_reject_ind 
+38b5 20201f46 branch le_send_smp_security_request 
+
+module_process_ble_update_phy:
+38b6 20203c18 branch module_hci_event_le_update_phy 
+
+module_set_conn_pin_high:
+38b7 6848c7ab fetcht 1 ,mem_module_connect_state_gpio 
+38b8 2020610d branch gpio_out_active 
+
+module_conn_start:
+38b9 204038bb call module_stop_adv_discovery 
+38ba 202038c2 branch module_set_conn_pin_low 
+
+module_stop_adv_discovery:
+38bb 6fe0c7ae fetch 1 ,mem_module_state 
+38bc 2feffe00 isolate1 moudle_state_bt_bit ,pdata 
+38bd 2040b26f call app_bt_stop_discovery ,true 
+38be 6fe0c7ae fetch 1 ,mem_module_state 
+38bf 2feffe01 isolate1 moudle_state_ble_bit ,pdata 
+38c0 2040b277 call app_ble_stop_adv ,true 
+38c1 20600000 rtn 
+
+module_set_conn_pin_low:
+38c2 6848c7ab fetcht 1 ,mem_module_connect_state_gpio 
+38c3 20206109 branch gpio_out_inactive 
+
+module_process_with_credit:
+38c4 6fe0c659 fetch 1 ,mem_rfcomm_credit_flag 
+38c5 c1000000 rtneq credit_disable 
+38c6 20206547 branch rfcomm_send_uih_without_payload 
+
+module_process_check_hci_command_complete:
+38c7 6ff0810b fetch 1 ,core_uart_status 
+38c8 c28138c4 bbit1 uart_status_rx_fifo_empty ,module_process_with_credit 
+38c9 20405f9d call uarta_prepare_rx 
+38ca efe08003 ifetch 1 ,contru 
+38cb c080b8dd bne 0x01 ,module_hci_in_excp 
+38cc 6ff10112 fetch 2 ,core_uart_rxitems 
+38cd 1fe67c02 sub pdata ,2 ,null 
+38ce 20610000 rtn positive 
+38cf efe08003 ifetch 1 ,contru 
+38d0 67e089cf store 1 ,mem_module_uart_opcode 
+38d1 e8408003 ifetcht 1 ,contru 
+38d2 18622200 copy contru ,rega 
+38d3 604889d0 storet 1 ,mem_module_uart_len 
+38d4 18408403 add temp ,3 ,temp 
+38d5 6ff10112 fetch 2 ,core_uart_rxitems 
+38d6 98460400 isub temp ,temp 
+38d7 24610000 nrtn positive 
+38d8 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+38d9 204038eb call module_hci_cmd_control 
+38da 6fe089d1 fetch 1 ,mem_module_temp_nl_discard_packet 
+38db c1000000 rtneq hci_not_discard_packet 
+38dc 202038e6 branch module_hci_dicard_packet 
+
+module_hci_in_excp:
+38dd 20407d85 call delay_10ms 
+38de 20403bdb call module_hci_event_invalid_packet 
+38df 202038e0 branch module_hci_release_except 
+
+module_hci_release_except:
+38e0 44dec017 bpatch patch17_5 ,mem_patch17 
+38e1 20405f9d call uarta_prepare_rx 
+38e2 6ff10112 fetch 2 ,core_uart_rxitems 
+38e3 207a0000 rtn blank 
+38e4 98608600 iadd contru ,contru 
+38e5 202038ea branch module_hci_dicard_bytes 
+
+module_hci_dicard_packet:
+38e6 20405f9d call uarta_prepare_rx 
+38e7 18608602 increase 2 ,contu 
+38e8 efe08003 ifetch 1 ,contu 
+38e9 98608600 iadd contu ,contu 
+
+module_hci_dicard_bytes:
+38ea 20205fa9 branch uarta_rxdone 
+
+module_hci_cmd_control:
+38eb 44df4017 bpatch patch17_6 ,mem_patch17 
+38ec 6fe089cf fetch 1 ,mem_module_uart_opcode 
+38ed c000391d beq hci_cmd_set_bt_addr_req ,module_hci_cmd_set_bt_addr 
+38ee c000b922 beq hci_cmd_set_le_addr_req ,module_hci_cmd_set_le_addr 
+38ef c0013927 beq hci_cmd_set_visibility_req ,module_hci_cmd_set_visibility 
+38f0 c001b93c beq hci_cmd_set_bt_name_req ,module_hci_cmd_set_bt_name 
+38f1 c0023946 beq hci_cmd_set_le_name_req ,module_hci_cmd_set_le_name 
+38f2 c002b94a beq hci_cmd_spp_data_req ,module_hci_cmd_receive_spp_data 
+38f3 c004b96c beq hci_cmd_le_data_req ,module_hci_cmd_receive_le_data 
+38f4 c005b9c3 beq hci_cmd_status_irq ,module_hci_cmd_inquire_status 
+38f5 c00639c4 beq hci_cmd_set_pairing_req ,module_hci_cmd_set_pairing_mode 
+38f6 c006b9e8 beq hci_cmd_set_pincode_req ,module_hci_cmd_set_pincode 
+38f7 c00739eb beq hci_cmd_set_uartcontrol_req ,module_hci_cmd_set_uart_control_mode 
+38f8 c007b9f3 beq hci_cmd_set_uart_baud_req ,module_hci_cmd_set_uart_baud 
+38f9 c00839fb beq hci_cmd_version_req ,module_hci_cmd_version_request 
+38fa c008b9ff beq hci_cmd_bt_disconnect ,module_hci_cmd_bt_disconnect 
+38fb c0093a03 beq hci_cmd_ble_disconnect ,module_hci_cmd_ble_disconnect 
+38fc c00aba07 beq hci_cmd_set_cod ,module_hci_cmd_set_cod 
+38fd c0133a0c beq hci_cmd_set_nvram_req ,module_hci_cmd_set_nvram 
+38fe c0143a11 beq hci_cmd_confirm_gkey ,module_hci_cmd_confirm_gkey 
+38ff c014ba21 beq hci_cmd_set_credit_given ,module_hci_cmd_set_credit_given 
+3900 c0153a2a beq hci_cmd_auto_adv_scan ,module_hci_cmd_auto_adv 
+3901 c015ba5d beq hci_cmd_power_req ,module_hci_cmd_power_request 
+3902 c0163a63 beq hci_cmd_power_set ,module_hci_cmd_power_set 
+3903 c0183a6a beq hci_cmd_passkey_entry ,module_hci_cmd_passkey_entry 
+3904 c018ba74 beq hci_cmd_set_gpio ,module_hci_cmd_set_gpio 
+3905 c0193a85 beq hci_cmd_read_gpio ,module_hci_cmd_read_gpio 
+3906 c019ba90 beq hci_cmd_le_set_pairing ,module_hci_cmd_le_set_pairing_mode 
+3907 c01a3abd beq hci_cmd_le_set_adv_data ,module_hci_cmd_le_set_adv_data 
+3908 c01abac0 beq hci_cmd_le_set_scan_data ,module_hci_cmd_le_set_scan_data 
+3909 c01b3ac9 beq hci_cmd_le_send_conn_update_req ,module_hci_cmd_le_send_conn_update_req 
+390a c01bbad2 beq hci_cmd_le_set_adv_parm ,module_hci_cmd_set_le_adv_parameter 
+390b c01c3ad5 beq hci_cmd_le_start_pairing ,module_hci_cmd_le_start_pairing 
+390c c0203add beq hci_cmd_set_wake_gpio ,module_hci_cmd_set_wake_gpio 
+390d c0213ae7 beq hci_cmd_set_tx_power ,module_hci_cmd_set_tx_power 
+390e c0243aec beq hci_cmd_le_confirm_gkey ,module_hci_cmd_le_confirm_gkey 
+390f c024baf7 beq hci_cmd_reject_justwork ,module_hci_cmd_set_reject_justwork_flag 
+3910 c028bafd beq hci_cmd_reset_chip_req ,module_hci_cmd_reset_chip 
+3911 c030bb01 beq hci_cmd_le_set_fixed_passkey ,module_hci_cmd_le_set_fixed_passkey 
+3912 c03b3b10 beq hci_cmd_delete_customize_service ,module_hci_cmd_delete_customize_service 
+3913 c03bbb16 beq hci_cmd_add_service_uuid ,module_hci_cmd_add_service_uuid 
+3914 c03c3b1b beq hci_cmd_add_characteristic_uuid ,module_hci_cmd_add_characteristic_uuid 
+3915 c03d3b51 beq hci_cmd_passkey_entry_input ,module_hci_cmd_le_passkey_entry_input 
+3916 c0483b5f beq hci_cmd_ble_set_phy ,module_hci_cmd_ble_set_phy 
+3917 c048bb64 beq hci_cmd_ble_read_current_phy ,module_hci_cmd_ble_read_current_phy 
+3918 c0493b68 beq hci_cmd_ble_set_dle ,module_hci_cmd_ble_set_dle 
+3919 c049bb6d beq hci_cmd_read_chip_data ,module_hci_cmd_read_chip_data 
+391a c04a3b71 beq hci_cmd_write_chip_data ,module_hci_cmd_write_chip_data 
+391b c07fbb77 beq hci_cmd_close_lpm ,module_hci_cmd_close_lpm 
+391c 20203b79 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_set_bt_addr:
+391d 6fe089d0 fetch 1 ,mem_module_uart_len 
+391e c0833b79 bne 6 ,module_hci_event_receive_invalid_cmd 
+391f efe30003 ifetch 6 ,contru 
+3920 67e340a8 store 6 ,mem_lap 
+3921 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_le_addr:
+3922 6fe089d0 fetch 1 ,mem_module_uart_len 
+3923 c0833b79 bne 6 ,module_hci_event_receive_invalid_cmd 
+3924 efe30003 ifetch 6 ,contru 
+3925 67e3437a store 6 ,mem_le_lap 
+3926 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_visibility:
+3927 6fe089d0 fetch 1 ,mem_module_uart_len 
+3928 c080bb79 bne 1 ,module_hci_event_receive_invalid_cmd 
+3929 e8408003 ifetcht 1 ,contru 
+392a 6048c7b6 storet 1 ,mem_module_bluetooth_stauts_by_command 
+392b 20403b7c call module_hci_event_receive_valid_cmd 
+392c 6fe1478f fetch 2 ,mem_ui_state_map 
+392d c3848000 rtnbit1 ui_state_ble_connected 
+392e c3800000 rtnbit1 ui_state_bt_connected 
+
+module_start_adv_discovery_by_command:
+392f 6fe0c7ae fetch 1 ,mem_module_state 
+3930 2feffe00 isolate1 moudle_state_bt_bit ,pdata 
+3931 2420b935 nbranch moudle_start_adv_by_command ,true 
+3932 6848c7b6 fetcht 1 ,mem_module_bluetooth_stauts_by_command 
+3933 18417e03 and temp ,0x03 ,pdata 
+3934 67e0c09b store 1 ,mem_scan_mode 
+
+moudle_start_adv_by_command:
+3935 6fe0c7ae fetch 1 ,mem_module_state 
+3936 2feffe01 isolate1 moudle_state_ble_bit ,pdata 
+3937 24608000 nrtn true 
+3938 6848c7b6 fetcht 1 ,mem_module_bluetooth_stauts_by_command 
+3939 284ffe02 isolate1 2 ,temp 
+393a 2020b279 branch app_ble_start_adv ,true 
+393b 20203277 branch app_ble_stop_adv 
+
+module_hci_cmd_set_bt_name:
+393c 6fe089d0 fetch 1 ,mem_module_uart_len 
+393d 1fe67c43 sub pdata ,67 ,null 
+393e 24213b79 nbranch module_hci_event_receive_invalid_cmd ,positive 
+393f 67e0c5ff store 1 ,mem_local_name_length 
+3940 df200008 arg 8 ,loopcnt 
+3941 20407d8c call memset0 
+3942 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3943 d8a04600 arg mem_local_name ,contw 
+3944 20405fdf call uart_copy_rx_bytes_fast 
+3945 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_le_name:
+3946 dfe0001d arg 29 ,pdata 
+3947 d8a042f7 arg mem_le_name_len ,contw 
+3948 20403ac3 call module_hci_cmd_receive_store_mem 
+3949 20201a55 branch le_modified_name 
+
+module_hci_cmd_receive_spp_data:
+394a 6fe0c78f fetch 1 ,mem_ui_state_map 
+394b c3023b79 bbit0 ui_state_bt_spp_conn ,module_hci_event_receive_invalid_cmd 
+394c 20403249 call app_check_sniff 
+394d 2020b95a branch module_hci_cmd_spp_exit_sniff ,true 
+394e 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+394f 20403858 call module_spp_clear_last_transmite_clock 
+3950 6fe0c656 fetch 1 ,mem_remote_credits 
+3951 207a0000 rtn blank 
+3952 6fe14661 fetch 2 ,mem_nl_rx_len_all 
+3953 243a3958 nbranch module_hci_cmd_pass_init_ng_rx_len_all ,blank 
+3954 6fe089d0 fetch 1 ,mem_module_uart_len 
+3955 67e14661 store 2 ,mem_nl_rx_len_all 
+3956 67e1465f store 2 ,mem_nl_rx_data_src 
+3957 6061465f storer contru ,2 ,mem_nl_rx_data_src 
+
+module_hci_cmd_pass_init_ng_rx_len_all:
+3958 2040395c call module_hci_cmd_get_current_packet_len_and_remain_len 
+3959 2020656c branch spp_tx_rfcomm_packet 
+
+module_hci_cmd_spp_exit_sniff:
+395a 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+395b 20203c48 branch module_exit_sniff 
+
+module_hci_cmd_get_current_packet_len_and_remain_len:
+395c 20403962 call module_hci_cmd_get_current_patcket_len 
+395d 6fe14661 fetch 2 ,mem_nl_rx_len_all 
+395e 684947ac fetcht 2 ,mem_current_packet_length 
+395f 98467e00 isub temp ,pdata 
+3960 67e14661 store 2 ,mem_nl_rx_len_all 
+3961 20600000 rtn 
+
+module_hci_cmd_get_current_patcket_len:
+3962 6fe14661 fetch 2 ,mem_nl_rx_len_all 
+3963 6849465a fetcht 2 ,mem_rfcomm_max_frame_size 
+3964 20407ebb call not_greater_than 
+3965 6849464c fetcht 2 ,mem_pn_max_frame_size 
+3966 20407ebb call not_greater_than 
+3967 67e147ac store 2 ,mem_current_packet_length 
+3968 20600000 rtn 
+
+module_hci_command_tx_spp_tx_complete:
+3969 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+396a 7009cf05 jam hci_cmd_spp_data_req ,mem_module_uart_opcode 
+396b 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_receive_le_data:
+396c 6fe1478f fetch 2 ,mem_ui_state_map 
+396d c304bb79 bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+396e 204039c0 call module_check_ble_encrypt_state 
+396f 20343b79 branch module_hci_event_receive_invalid_cmd ,user 
+3970 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+3971 6fe147c6 fetch 2 ,mem_module_flag 
+3972 c2843991 bbit1 module_flag_ble_data_finish ,module_hci_cmd_receive_le_data_finish 
+3973 6fe0c7c8 fetch 1 ,mem_module_hci_notify_len 
+3974 247a0000 nrtn blank 
+3975 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+3976 efe10003 ifetch 2 ,contru 
+3977 67e147c9 store 2 ,mem_module_hci_notify_handle 
+3978 606147cb storer contru ,2 ,mem_module_hci_nofiy_addr 
+3979 6fe089d0 fetch 1 ,mem_module_uart_len 
+397a 1fe0fffe pincrease -2 
+397b 24213b79 nbranch module_hci_event_receive_invalid_cmd ,positive 
+397c 2022bb79 branch module_hci_event_receive_invalid_cmd ,zero 
+397d 67e0c7c8 store 1 ,mem_module_hci_notify_len 
+397e 684947c9 fetcht 2 ,mem_module_hci_notify_handle 
+397f 184085ff increase -1 ,temp 
+3980 20401a11 call le_att_get_handle_ptr2 
+3981 203a3994 branch module_hci_cmd_transmit_handle_error ,blank 
+3982 e8420006 ifetcht 4 ,contr 
+3983 59280302 setarg 0x01280302 
+3984 98467c00 isub temp ,null 
+3985 2422b994 nbranch module_hci_cmd_transmit_handle_error ,zero 
+3986 efe08006 ifetch 1 ,contr 
+3987 67e0c7cd store 1 ,mem_module_hci_notify_type 
+3988 1fe17e30 and_into 0x30 ,pdata 
+3989 203a3994 branch module_hci_cmd_transmit_handle_error ,blank 
+398a 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+398b 20401ac6 call le_set_config_more_data 
+398c 20403998 call module_hci_cmd_transmit_le_notify 
+398d 20403998 call module_hci_cmd_transmit_le_notify 
+398e 20403998 call module_hci_cmd_transmit_le_notify 
+398f 6fe147c6 fetch 2 ,mem_module_flag 
+3990 c4040000 rtnbit0 module_flag_ble_data_finish 
+
+module_hci_cmd_receive_le_data_finish:
+3991 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+3992 20403c6b call module_clear_le_tx_data_flag 
+3993 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_transmit_handle_error:
+3994 7047c800 jam 0 ,mem_module_hci_notify_len 
+3995 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+3996 20403c6b call module_clear_le_tx_data_flag 
+3997 20203b79 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_transmit_le_notify:
+3998 6fe0c7c8 fetch 1 ,mem_module_hci_notify_len 
+3999 207a0000 rtn blank 
+399a 20401b24 call le_fifo_check_nearly_full 
+399b 247a0000 nrtn blank 
+399c 204039bb call module_get_le_remote_mtu 
+399d 44dfc017 bpatch patch17_7 ,mem_patch17 
+399e 6fe14380 fetch 2 ,mem_le_local_mtu 
+399f 20407ebb call not_greater_than 
+39a0 1fe20400 copy pdata ,temp 
+39a1 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+39a2 c3800000 rtnbit1 ble_l2cap_recv_confirmation_packet 
+39a3 1840fffd add temp ,-3 ,pdata 
+39a4 d84000fb arg 251 ,temp 
+39a5 20407ebb call not_greater_than 
+39a6 6848c7c8 fetcht 1 ,mem_module_hci_notify_len 
+39a7 20407ebb call not_greater_than 
+39a8 1fe22200 copy pdata ,rega 
+39a9 18427e00 copy temp ,pdata 
+39aa 9a267e00 isub rega ,pdata 
+39ab 67e0c7c8 store 1 ,mem_module_hci_notify_len 
+39ac 204039b6 call module_hci_cmd_transmit_le_notify_malloc_l2cap 
+39ad 6fe147cb fetch 2 ,mem_module_hci_nofiy_addr 
+39ae 1fe20600 copy pdata ,contru 
+39af 1a227200 copy rega ,loopcnt 
+39b0 20405fdf call uart_copy_rx_bytes_fast 
+39b1 18627e00 copy contru ,pdata 
+39b2 67e147cb store 2 ,mem_module_hci_nofiy_addr 
+39b3 6fe0c7c8 fetch 1 ,mem_module_hci_notify_len 
+39b4 247a0000 nrtn blank 
+39b5 20203c69 branch module_set_le_tx_data_flag 
+
+module_hci_cmd_transmit_le_notify_malloc_l2cap:
+39b6 684947c9 fetcht 2 ,mem_module_hci_notify_handle 
+39b7 6fe0c7cd fetch 1 ,mem_module_hci_notify_type 
+39b8 c2829e68 bbit1 bit_characteristic_indicate ,le_att_malloc_tx_indication 
+39b9 c2821e5f bbit1 bit_characteristic_notify ,le_att_malloc_tx_notify 
+39ba 20600000 rtn 
+
+module_get_le_remote_mtu:
+39bb d8400017 arg 0x17 ,temp 
+39bc 6fe147c6 fetch 2 ,mem_module_flag 
+39bd c3808000 rtnbit1 module_flag_ble_send_mtu23 
+39be 68494382 fetcht 2 ,mem_le_remote_mtu 
+39bf 20600000 rtn 
+
+module_check_ble_encrypt_state:
+39c0 6fe147c6 fetch 2 ,mem_module_flag 
+39c1 c2811e39 bbit1 module_flag_ble_data_encrypt ,le_check_encrypt_state 
+39c2 20207ec7 branch disable_user 
+
+module_hci_cmd_inquire_status:
+39c3 20203bae branch module_hci_event_status_res 
+
+module_hci_cmd_set_pairing_mode:
+39c4 efe08003 ifetch 1 ,contru 
+39c5 c040b9d1 beq br_pairing_mode_secure_connect_justwork ,module_hci_pairing_just_work_sc 
+39c6 c04139d3 beq br_pairing_mode_secure_connect_passkey ,module_hci_pairing_passkey_sc 
+39c7 c041b9d5 beq br_pairing_mode_secure_connect_numeric ,module_hci_pairing_numeric_comparison_sc 
+39c8 1fe22200 copy pdata ,rega 
+39c9 20406f26 call sp_br_secure_connection_disable 
+39ca 204075af call sc_reset 
+39cb 1a227e00 copy rega ,pdata 
+39cc c00039d7 beq br_pairing_mode_pincode ,module_hci_pairing_pincode_mode 
+39cd c000b9da beq br_pairing_mode_justwork ,module_hci_pairing_just_work_mode 
+39ce c00139e4 beq br_pairing_mode_passkey ,module_hci_pairing_passkey 
+39cf c001b9e6 beq br_pairing_mode_numeric ,module_hci_pairing_numeric_comparison 
+39d0 20203b79 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_pairing_just_work_sc:
+39d1 20406f22 call sp_br_secure_connection_enable 
+39d2 202039da branch module_hci_pairing_just_work_mode 
+
+module_hci_pairing_passkey_sc:
+39d3 20406f22 call sp_br_secure_connection_enable 
+39d4 202039e4 branch module_hci_pairing_passkey 
+
+module_hci_pairing_numeric_comparison_sc:
+39d5 20406f22 call sp_br_secure_connection_enable 
+39d6 202039e6 branch module_hci_pairing_numeric_comparison 
+
+module_hci_pairing_pincode_mode:
+39d7 20406f2d call sp_reset 
+39d8 70476700 jam 0 ,mem_ssp_enable 
+39d9 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_pairing_just_work_mode:
+39da 58000003 setarg io_capability_no_input_no_output 
+
+module_hci_sspairing_mode:
+39db 67e0c76f store 1 ,mem_ssp_mode_flag 
+39dc 67e0c768 store 1 ,mem_lmp_io_cap_payload_iocap 
+39dd 58000000 setarg oob_data_present_not_present 
+39de 67e0c769 store 1 ,mem_lmp_io_cap_payload_oob_auth_data 
+39df 58000004 setarg auth_req_mitm_protection_not_required_general_bonding 
+39e0 67e0c76a store 1 ,mem_lmp_io_cap_payload_auth_req 
+39e1 2040580c call ssp_enable 
+39e2 70476701 jam 1 ,mem_ssp_enable 
+39e3 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_pairing_passkey:
+39e4 58000002 setarg io_capability_keyboard_only 
+39e5 202039db branch module_hci_sspairing_mode 
+
+module_hci_pairing_numeric_comparison:
+39e6 58000001 setarg io_capability_display_yesno 
+39e7 202039db branch module_hci_sspairing_mode 
+
+module_hci_cmd_set_pincode:
+39e8 dfe00010 arg 16 ,pdata 
+39e9 d8a04796 arg mem_pin_length ,contw 
+39ea 20203ac3 branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_set_uart_control_mode:
+39eb efe08003 ifetch 1 ,contru 
+39ec 6848c7c6 fetcht 1 ,mem_module_flag 
+39ed 7d3a0400 nsetflag blank ,module_flag_uart_flow_control ,temp 
+39ee 6048c7c6 storet 1 ,mem_module_flag 
+39ef 68588060 fetcht 1 ,core_uart_ctrl 
+39f0 7d3a0404 nsetflag blank ,bit_uart_control_flow_control ,temp 
+39f1 60588060 storet 1 ,core_uart_ctrl 
+39f2 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_uart_baud:
+39f3 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+39f4 20407e2d call string2dec_from_uart 
+39f5 20405f72 call uart_calc_baud_rate_config 
+39f6 67e147bf store uart_baud_len ,mem_module_uarta_baud_rate 
+39f7 20403b7c call module_hci_event_receive_valid_cmd 
+39f8 20407e7c call wait_uarttx 
+39f9 6fe147bf fetch uart_baud_len ,mem_module_uarta_baud_rate 
+39fa 20205f6a branch uarta_init_baud_rate 
+
+module_hci_cmd_version_request:
+39fb da200002 arg 2 ,rega 
+39fc da4047a7 arg mem_soft_version_num ,regb 
+39fd d8400000 arg 0 ,temp 
+39fe 20203b87 branch module_hci_event_set_cmd 
+
+module_hci_cmd_bt_disconnect:
+39ff 6fe1478f fetch 2 ,mem_ui_state_map 
+3a00 c3003b79 bbit0 ui_state_bt_connected ,module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_bt_disconnect_doing:
+3a01 20403b7c call module_hci_event_receive_valid_cmd 
+3a02 20203268 branch app_bt_disconnect 
+
+module_hci_cmd_ble_disconnect:
+3a03 6fe1478f fetch 2 ,mem_ui_state_map 
+3a04 c304bb79 bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_ble_disconnect_doing:
+3a05 20403b7c call module_hci_event_receive_valid_cmd 
+3a06 20203281 branch app_ble_disconnect 
+
+module_hci_cmd_set_cod:
+3a07 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a08 c081bb79 bne 3 ,module_hci_event_receive_invalid_cmd 
+3a09 efe18003 ifetch 3 ,contru 
+3a0a 67e1c0b2 store 3 ,mem_class 
+3a0b 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_nvram:
+3a0c 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3a0d 6fe14489 fetch 2 ,mem_nv_data_ptr 
+3a0e 1fe20a00 icopy contw 
+3a0f 20405fdf call uart_copy_rx_bytes_fast 
+3a10 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_confirm_gkey:
+3a11 6fe1478f fetch 2 ,mem_ui_state_map 
+3a12 c284baec bbit1 ui_state_ble_connected ,module_hci_cmd_le_confirm_gkey 
+3a13 c3003b79 bbit0 ui_state_bt_connected ,module_hci_event_receive_invalid_cmd 
+3a14 efe08003 ifetch 1 ,contru 
+3a15 6848c76e fetcht 1 ,mem_flag_mode_ssp_pin 
+3a16 793a0400 setflag blank ,flag_mode_ssp_pin_comparison_result_bit ,temp 
+3a17 79200407 set1 flag_mode_ssp_pin_reviceve_comparison_bit ,temp 
+3a18 6048c76e storet 1 ,mem_flag_mode_ssp_pin 
+3a19 20403b7c call module_hci_event_receive_valid_cmd 
+3a1a 6fe0c76e fetch 1 ,mem_flag_mode_ssp_pin 
+3a1b c2833a1d bbit1 flag_mode_ssp_pin_recieve_dhkey_bit ,module_hci_cmd_spp_number_comparison_result_is1 
+3a1c 20600000 rtn 
+
+module_hci_cmd_spp_number_comparison_result_is1:
+3a1d c28056e4 bbit1 flag_mode_ssp_pin_comparison_result_bit ,number_comparison_successed 
+3a1e 70476e00 jam 0 ,mem_flag_mode_ssp_pin 
+3a1f 70095b21 jam bt_cmd_dhkey_not_accept ,mem_fifo_temp 
+3a20 202078e5 branch ui_ipc_send_cmd 
+
+module_hci_cmd_set_credit_given:
+3a21 6fe0c78f fetch 1 ,mem_ui_state_map 
+3a22 c4020000 rtnbit0 ui_state_bt_spp_conn 
+3a23 6fe0c659 fetch 1 ,mem_rfcomm_credit_flag 
+3a24 c1000000 rtneq credit_disable 
+3a25 efe08003 ifetch 1 ,contru 
+3a26 6848c657 fetcht 1 ,mem_credit_given 
+3a27 98408400 iadd temp ,temp 
+3a28 6048c657 storet 1 ,mem_credit_given 
+3a29 20600000 rtn 
+
+module_hci_cmd_auto_adv:
+3a2a df200040 arg 0x40 ,loopcnt 
+3a2b d8a043e7 arg mem_le_adv_data_len ,contw 
+3a2c 20407d9b call clear_mem 
+3a2d 58000000 setarg 0 
+3a2e 67e08974 store 1 ,mem_regb 
+3a2f 1a220600 copy rega ,contru 
+
+module_hci_cmd_auto_adv_loop:
+3a30 18627e00 copy contru ,pdata 
+3a31 67e10978 store 2 ,mem_regc 
+3a32 20403a58 call module_hci_cmd_auto_adv_adv_analys 
+3a33 6fe08974 fetch 1 ,mem_regb 
+3a34 68488964 fetcht 1 ,mem_temp 
+3a35 18408401 increase 1 ,temp 
+3a36 9840fe00 iadd temp ,pdata 
+3a37 67e08974 store 1 ,mem_regb 
+3a38 1fe67c1f sub pdata ,31 ,null 
+3a39 24213a44 nbranch module_hci_cmd_auto_adv_store_scan ,positive 
+
+module_hci_cmd_auto_adv_store_adv:
+3a3a 6848c3e7 fetcht 1 ,mem_le_adv_data_len 
+3a3b 580043e8 setarg mem_le_adv_data 
+3a3c 9840fe00 iadd temp ,pdata 
+3a3d 67e1097d store 2 ,mem_contw 
+3a3e 68488964 fetcht 1 ,mem_temp 
+3a3f 18408401 increase 1 ,temp 
+3a40 6fe0c3e7 fetch 1 ,mem_le_adv_data_len 
+3a41 9840fe00 iadd temp ,pdata 
+3a42 67e0c3e7 store 1 ,mem_le_adv_data_len 
+3a43 20203a4d branch module_hci_cmd_auto_adv_store_common 
+
+module_hci_cmd_auto_adv_store_scan:
+3a44 6848c407 fetcht 1 ,mem_le_scan_data_len 
+3a45 58004408 setarg mem_le_scan_data 
+3a46 9840fe00 iadd temp ,pdata 
+3a47 67e1097d store 2 ,mem_contw 
+3a48 68488964 fetcht 1 ,mem_temp 
+3a49 18408401 increase 1 ,temp 
+3a4a 6fe0c407 fetch 1 ,mem_le_scan_data_len 
+3a4b 9840fe00 iadd temp ,pdata 
+3a4c 67e0c407 store 1 ,mem_le_scan_data_len 
+
+module_hci_cmd_auto_adv_store_common:
+3a4d 6fe1097d fetch 2 ,mem_contw 
+3a4e 1fe20a00 copy pdata ,contw 
+3a4f 6fe10978 fetch 2 ,mem_regc 
+3a50 1fe20600 copy pdata ,contru 
+3a51 18427200 copy temp ,loopcnt 
+3a52 20405fdf call uart_copy_rx_bytes_fast 
+3a53 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a54 68488974 fetcht 1 ,mem_regb 
+3a55 98467c00 isub temp ,null 
+3a56 2422ba30 nbranch module_hci_cmd_auto_adv_loop ,zero 
+3a57 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_auto_adv_adv_analys:
+3a58 efe08003 ifetch 1 ,contru 
+3a59 67e08964 store 1 ,mem_temp 
+3a5a efe08003 ifetch 1 ,contru 
+3a5b 67e08970 store 1 ,mem_rega 
+3a5c 20600000 rtn 
+
+module_hci_cmd_power_request:
+3a5d d8400000 arg 0 ,temp 
+3a5e da200002 arg 2 ,rega 
+3a5f 6fe147c3 fetch 2 ,mem_module_vdd_quotient 
+3a60 67e1098e store 2 ,mem_event_cmd_response_content 
+3a61 da40098e arg mem_event_cmd_response_content ,regb 
+3a62 20203b87 branch module_hci_event_set_cmd 
+
+module_hci_cmd_power_set:
+3a63 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a64 c080bb79 bne 1 ,module_hci_event_receive_invalid_cmd 
+3a65 efe08003 ifetch 1 ,contru 
+3a66 67e0c7c1 store 1 ,mem_module_read_vdd_flag 
+3a67 58000000 setarg 0x00 
+3a68 67e147c3 store 2 ,mem_module_vdd_quotient 
+3a69 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_passkey_entry:
+3a6a 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a6b c0823b79 bne 4 ,module_hci_event_receive_invalid_cmd 
+3a6c 6fe1478f fetch 2 ,mem_ui_state_map 
+3a6d c284bb51 bbit1 ui_state_ble_connected ,module_hci_cmd_le_passkey_entry_input 
+3a6e efe20003 ifetch 4 ,contru 
+3a6f 67e24797 store 4 ,mem_pin 
+3a70 70479604 jam 4 ,mem_pin_length 
+3a71 70477000 jam 0 ,mem_authentication_passkey_times 
+3a72 20403b7c call module_hci_event_receive_valid_cmd 
+3a73 20205664 branch authentication_passkey 
+
+module_hci_cmd_set_gpio:
+3a74 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a75 c081bb79 bne 3 ,module_hci_event_receive_invalid_cmd 
+3a76 efe08003 ifetch 1 ,contru 
+3a77 c0003a7a beq hci_cmd_config_gpio_input ,module_set_gpio_input 
+3a78 c000ba80 beq hci_cmd_config_gpio_output ,module_set_gpio_output 
+3a79 20203b79 branch module_hci_event_receive_invalid_cmd 
+
+module_set_gpio_input:
+3a7a 20403b7c call module_hci_event_receive_valid_cmd 
+3a7b e8408003 ifetcht 1 ,contru 
+3a7c efe08003 ifetch 1 ,contru 
+3a7d c0016121 beq gpio_input_high_impedance ,gpio_set_high_impedance 
+3a7e 7d3a0407 nsetflag blank ,7 ,temp 
+3a7f 202060f4 branch gpio_config_input 
+
+module_set_gpio_output:
+3a80 20403b7c call module_hci_event_receive_valid_cmd 
+3a81 e8408003 ifetcht 1 ,contru 
+3a82 efe08003 ifetch 1 ,contru 
+3a83 203a610d branch gpio_out_active ,blank 
+3a84 20206109 branch gpio_out_inactive 
+
+module_hci_cmd_read_gpio:
+3a85 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a86 c080bb79 bne 1 ,module_hci_event_receive_invalid_cmd 
+3a87 e8408003 ifetcht 1 ,contru 
+3a88 204060fd call gpio_get_bit 
+3a89 58000000 setarg 0x0 
+3a8a 7d20fe00 nsetflag true ,0 ,pdata 
+3a8b da200001 arg 1 ,rega 
+3a8c 67e1098e store 2 ,mem_event_cmd_response_content 
+3a8d da40098e arg mem_event_cmd_response_content ,regb 
+3a8e d8400000 arg 0 ,temp 
+3a8f 20203b87 branch module_hci_event_set_cmd 
+
+module_hci_cmd_le_set_pairing_mode:
+3a90 efe08003 ifetch 1 ,contru 
+3a91 1fe20400 copy pdata ,temp 
+3a92 c040ba9f beq le_pairing_mode_secure_connect_justwork ,module_le_set_pairing_mode_secure_justwork 
+3a93 c0413aa3 beq le_pairing_mode_secure_connect_numeric ,module_le_set_pairing_mode_secure_numeric 
+3a94 c041baa8 beq le_pairing_mode_secure_connect_passkey ,module_le_set_pairing_mode_secure_passkey 
+3a95 c0423aac beq le_pairing_mode_secure_connect_passkey_res_input ,module_le_set_pairing_mode_secure_passkey_res_input 
+3a96 67e0c39d store 1 ,mem_le_pairing_mode 
+3a97 204075af call sc_reset 
+3a98 20401f35 call le_secure_connection_disable 
+3a99 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+3a9a c0003ab0 beq le_pairing_mode_none ,module_le_set_no_pairing 
+3a9b c000bab3 beq le_pairing_mode_lagacy_justwork ,module_le_set_pairing_mode_lagacy_just_work 
+3a9c c0013ab5 beq le_pairing_mode_lagacy_passkey ,module_le_set_pairing_mode_lagacy_passkey 
+3a9d c0023ab7 beq le_pairing_mode_lagacy_passkey_res_input ,module_le_set_pairing_mode_lagacy_passkey_res_input 
+3a9e 20203b79 branch module_hci_event_receive_invalid_cmd 
+
+module_le_set_pairing_mode_secure_justwork:
+3a9f 6048c39d storet 1 ,mem_le_pairing_mode 
+3aa0 20401f31 call le_secure_connection_enable 
+3aa1 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+3aa2 20203ab1 branch module_le_set_noinputnooutput 
+
+module_le_set_pairing_mode_secure_numeric:
+3aa3 6048c39d storet 1 ,mem_le_pairing_mode 
+3aa4 20401f31 call le_secure_connection_enable 
+3aa5 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+3aa6 70435101 jam flag_iocap_displayyesno ,mem_le_pres_iocap 
+3aa7 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_le_set_pairing_mode_secure_passkey:
+3aa8 6048c39d storet 1 ,mem_le_pairing_mode 
+3aa9 20401f31 call le_secure_connection_enable 
+3aaa 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+3aab 20203abb branch module_le_set_displayonly 
+
+module_le_set_pairing_mode_secure_passkey_res_input:
+3aac 6048c39d storet 1 ,mem_le_pairing_mode 
+3aad 20401f31 call le_secure_connection_enable 
+3aae 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+3aaf 20203ab9 branch module_le_set_keboadonly 
+
+module_le_set_no_pairing:
+3ab0 70435300 jam flag_le_no_bonding_no_mitm ,mem_le_pres_auth 
+
+module_le_set_noinputnooutput:
+3ab1 70435103 jam flag_iocap_noinputnooutput ,mem_le_pres_iocap 
+3ab2 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_le_set_pairing_mode_lagacy_just_work:
+3ab3 70435301 jam flag_le_bonding_no_mitm ,mem_le_pres_auth 
+3ab4 20203ab1 branch module_le_set_noinputnooutput 
+
+module_le_set_pairing_mode_lagacy_passkey:
+3ab5 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+3ab6 20203abb branch module_le_set_displayonly 
+
+module_le_set_pairing_mode_lagacy_passkey_res_input:
+3ab7 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+3ab8 20203ab9 branch module_le_set_keboadonly 
+
+module_le_set_keboadonly:
+3ab9 70435102 jam flag_iocap_keyboardonly ,mem_le_pres_iocap 
+3aba 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_le_set_displayonly:
+3abb 70435100 jam flag_iocap_displayonly ,mem_le_pres_iocap 
+3abc 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_set_adv_data:
+3abd dfe0001f arg 31 ,pdata 
+3abe d8a043e7 arg mem_le_adv_data_len ,contw 
+3abf 20203ac3 branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_le_set_scan_data:
+3ac0 dfe0001f arg 31 ,pdata 
+3ac1 d8a04407 arg mem_le_scan_data_len ,contw 
+3ac2 20203ac3 branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_receive_store_mem:
+3ac3 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3ac4 9f267c00 isub loopcnt ,null 
+3ac5 24213b79 nbranch module_hci_event_receive_invalid_cmd ,positive 
+3ac6 e7208005 istorer loopcnt ,1 ,contw 
+3ac7 20405fdf call uart_copy_rx_bytes_fast 
+3ac8 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_send_conn_update_req:
+3ac9 6fe1478f fetch 2 ,mem_ui_state_map 
+3aca c304bb79 bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+3acb 6fe089d0 fetch 1 ,mem_module_uart_len 
+3acc c0843b79 bne 0x08 ,module_hci_event_receive_invalid_cmd 
+3acd efe40003 ifetch 8 ,contru 
+3ace 67e44372 store 8 ,mem_le_interval_min 
+3acf 70095b12 jam bt_cmd_le_update_conn ,mem_fifo_temp 
+3ad0 204078e5 call ui_ipc_send_cmd 
+3ad1 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_le_adv_parameter:
+3ad2 efe10003 ifetch 2 ,contru 
+3ad3 67e14428 store 2 ,mem_le_adv_interval 
+3ad4 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_start_pairing:
+3ad5 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+3ad6 203a3b79 branch module_hci_event_receive_invalid_cmd ,blank 
+3ad7 6fe0c39b fetch 1 ,mem_le_pairing_state 
+3ad8 c0803b79 bne flag_le_pairing_null ,module_hci_event_receive_invalid_cmd 
+3ad9 6fe0c39c fetch 1 ,mem_le_enc_state 
+3ada c0803b79 bne flag_le_enc_null ,module_hci_event_receive_invalid_cmd 
+3adb 20407992 call check_51cmd_le_smp_sec_req 
+3adc 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_wake_gpio:
+3add 6fe089d0 fetch 1 ,mem_module_uart_len 
+3ade c082bb79 bne 5 ,module_hci_event_receive_invalid_cmd 
+3adf efe08003 ifetch 1 ,contru 
+3ae0 67e0c7af store 1 ,mem_module_mcu_wake_pin 
+3ae1 efe20003 ifetch 4 ,contru 
+3ae2 67e247b0 store 4 ,mem_module_mcu_wake_delay_us 
+3ae3 6848c7af fetcht 1 ,mem_module_mcu_wake_pin 
+3ae4 2040610d call gpio_config_output 
+3ae5 20403c35 call module_set_mcu_wake_pin_low 
+3ae6 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_tx_power:
+3ae7 6fe089d0 fetch 1 ,mem_module_uart_len 
+3ae8 c080bb79 bne 0x01 ,module_hci_event_receive_invalid_cmd 
+3ae9 efe08003 ifetch 1 ,contru 
+3aea 67e0c1e8 store 1 ,mem_tx_power 
+3aeb 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_confirm_gkey:
+3aec efe08003 ifetch 1 ,contru 
+3aed c000baf5 beq 0x01 ,module_hci_cmd_le_confirm_gkey_fail 
+3aee 6fe0c399 fetch 1 ,mem_le_secure_connect_state 
+3aef c001baf3 beq le_sc_stat_send_public_key ,module_hci_cmd_le_confirm_gkey_ok 
+3af0 c0033af3 beq le_sc_stat_receive_dhkey ,module_hci_cmd_le_confirm_gkey_ok 
+3af1 c003baf3 beq le_sc_stat_wait_confirm_gkey ,module_hci_cmd_le_confirm_gkey_ok 
+3af2 20203b79 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_le_confirm_gkey_ok:
+3af3 70439a01 jam flag_le_sc_confrim_gkey_ok ,mem_le_sc_confirm_gkey_flag 
+3af4 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_confirm_gkey_fail:
+3af5 20401f9b call le_send_pairing_confirm_value_failed 
+3af6 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_reject_justwork_flag:
+3af7 6fe089d0 fetch 1 ,mem_module_uart_len 
+3af8 c080bb79 bne 0x01 ,module_hci_event_receive_invalid_cmd 
+3af9 20403b7c call module_hci_event_receive_valid_cmd 
+3afa efe08003 ifetch 1 ,contru 
+3afb 203a5840 branch classic_bt_clr_reject_justwork_flag ,blank 
+3afc 2020583e branch classic_bt_set_reject_justwork_flag 
+
+module_hci_cmd_reset_chip:
+3afd 20403b7c call module_hci_event_receive_valid_cmd 
+3afe 20407e7c call wait_uarttx 
+3aff 70801001 jam 0x01 ,core_reset 
+3b00 2020137e branch loop 
+
+module_hci_cmd_le_set_fixed_passkey:
+3b01 6fe089d0 fetch 1 ,mem_module_uart_len 
+3b02 c0003b79 beq 0 ,module_hci_event_receive_invalid_cmd 
+3b03 efe08003 ifetch 1 ,contru 
+3b04 203a3b0e branch module_hci_cmd_le_set_random_passkey ,blank 
+3b05 6fe089d0 fetch 1 ,mem_module_uart_len 
+3b06 c082bb79 bne 5 ,module_hci_event_receive_invalid_cmd 
+3b07 efe20003 ifetch 4 ,contru 
+3b08 d84f4240 arg 1000000 ,temp 
+3b09 98467c00 isub temp ,null 
+3b0a 20213b79 branch module_hci_event_receive_invalid_cmd ,positive 
+3b0b 67e2439e store 4 ,mem_le_tk 
+3b0c 20401abe call le_set_config_fixed_tk 
+3b0d 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_set_random_passkey:
+3b0e 20401ac0 call le_clr_config_fixed_tk 
+3b0f 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_delete_customize_service:
+3b10 e8410003 ifetcht 2 ,contru 
+3b11 20401a11 call le_att_get_handle_ptr2 
+3b12 18c08bfe add contr ,-2 ,contw 
+3b13 58000000 setarg 0x0000 
+3b14 e7e10005 istore 2 ,contw 
+3b15 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_add_service_uuid:
+3b16 20403b1f call module_hci_cmd_add_service_uuid_set_uuid 
+3b17 20403b4d call uart_copy_rx_bytes_len_data 
+3b18 58000000 setarg 0x0000 
+3b19 e7e10005 istore 2 ,contw 
+3b1a 20203c0f branch module_hci_event_uuid_handle 
+
+module_hci_cmd_add_characteristic_uuid:
+3b1b efe08003 ifetch 1 ,contru 
+3b1c 20403b23 call module_hci_cmd_add_characteristic_uuid_set_handle 
+3b1d 20403b2a call module_hci_cmd_add_characteristic_uuid_set_uuid 
+3b1e 20203c0f branch module_hci_event_uuid_handle 
+
+module_hci_cmd_add_service_uuid_set_uuid:
+3b1f 20403b4a call le_att_creat_new_handle 
+3b20 58280002 setarg 0x280002 
+3b21 e7e18005 istore 3 ,contw 
+3b22 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_handle:
+3b23 67e0895c store 1 ,mem_pdatatemp 
+3b24 20403b4a call le_att_creat_new_handle 
+3b25 59280302 setarg 0x01280302 
+3b26 e7e20005 istore 4 ,contw 
+3b27 6fe0895c fetch 1 ,mem_pdatatemp 
+3b28 e7e18005 istore 3 ,contw 
+3b29 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_uuid:
+3b2a 20401a30 call le_att_get_last_handle 
+3b2b efe08003 ifetch 1 ,contru 
+3b2c 1fe1721f and pdata ,0x1f ,loopcnt 
+3b2d 1fe22200 copy pdata ,rega 
+3b2e 2a2ffe07 isolate1 bit_of_write_authenticated ,rega 
+3b2f 7920840f setflag true ,bit_of_att_handle_write_authenticated ,temp 
+3b30 2a2ffe06 isolate1 bit_of_read_authenticated ,rega 
+3b31 7920840e setflag true ,bit_of_att_handle_read_authenticated ,temp 
+3b32 e0410005 istoret 2 ,contw 
+3b33 1f227e00 copy loopcnt ,pdata 
+3b34 e7e08005 istore 1 ,contw 
+3b35 20405ff3 call uart_copy_rx_bytes 
+3b36 20403b4d call uart_copy_rx_bytes_len_data 
+3b37 58000000 setarg 0 
+3b38 e7e10005 istore 2 ,contw 
+3b39 184104ff and temp ,0xff ,temp 
+3b3a 184085ff increase -1 ,temp 
+3b3b 20401a11 call le_att_get_handle_ptr2 
+3b3c 18c08c04 add contr ,4 ,contr 
+3b3d efe08006 ifetch 1 ,contr 
+3b3e c2823b42 bbit1 bit_characteristic_notify ,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid 
+3b3f c282bb42 bbit1 bit_characteristic_indicate ,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid 
+3b40 18408401 increase 1 ,temp 
+3b41 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_ccc_uuid:
+3b42 20401a30 call le_att_get_last_handle 
+3b43 2a2ffe05 isolate1 bit_of_notify_authenticated ,rega 
+3b44 7920840f setflag true ,bit_of_att_handle_write_authenticated ,temp 
+3b45 e0410005 istoret 2 ,contw 
+3b46 5a290202 setarg 0x02290202 
+3b47 e7e40005 istore 8 ,contw 
+3b48 184085ff increase -1 ,temp 
+3b49 20600000 rtn 
+
+le_att_creat_new_handle:
+3b4a 20401a30 call le_att_get_last_handle 
+3b4b e0410005 istoret 2 ,contw 
+3b4c 20600000 rtn 
+
+uart_copy_rx_bytes_len_data:
+3b4d efe08003 ifetch 1 ,contru 
+3b4e 1fe27200 copy pdata ,loopcnt 
+3b4f e7e08005 istore 1 ,contw 
+3b50 20205ff3 branch uart_copy_rx_bytes 
+
+module_hci_cmd_le_passkey_entry_input:
+3b51 6fe0c39b fetch 1 ,mem_le_pairing_state 
+3b52 c082bb79 bne flag_le_pairing_receive_pairing_confirm ,module_hci_event_receive_invalid_cmd 
+3b53 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+3b54 c0023b5d beq le_pairing_mode_lagacy_passkey_res_input ,module_hci_cmd_passkey_entry_res_input 
+3b55 c0423b57 beq le_pairing_mode_secure_connect_passkey_res_input ,module_hci_cmd_passkey_entry_sc_res_input 
+3b56 20203b79 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_passkey_entry_sc_res_input:
+3b57 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+3b58 70439908 jam le_sc_stat_passkey_wait_confirm ,mem_le_secure_connect_state 
+3b59 20203b5a branch module_hci_cmd_receive_ble_passkey 
+
+module_hci_cmd_receive_ble_passkey:
+3b5a efe20003 ifetch 4 ,contru 
+3b5b 67e2439e store 4 ,mem_le_tk 
+3b5c 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_passkey_entry_res_input:
+3b5d 20403b5a call module_hci_cmd_receive_ble_passkey 
+3b5e 20201f84 branch le_send_smp_pairing_confirm 
+
+module_hci_cmd_ble_set_phy:
+3b5f 6fe089d0 fetch 1 ,mem_module_uart_len 
+3b60 c0813b79 bne 2 ,module_hci_event_receive_invalid_cmd 
+3b61 e8410003 ifetcht 2 ,contru 
+3b62 20401b29 call le_set_phys 
+3b63 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_ble_read_current_phy:
+3b64 d8400000 arg 0 ,temp 
+3b65 da200002 arg 2 ,rega 
+3b66 da404075 arg mem_context + coffset_le_rx_phy ,regb 
+3b67 20203b87 branch module_hci_event_set_cmd 
+
+module_hci_cmd_ble_set_dle:
+3b68 6fe089d0 fetch 1 ,mem_module_uart_len 
+3b69 c0843b79 bne 8 ,module_hci_event_receive_invalid_cmd 
+3b6a efe40003 ifetch 8 ,contru 
+3b6b 20401b27 call le_set_dle 
+3b6c 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_read_chip_data:
+3b6d ea208003 ifetchr rega ,1 ,contru 
+3b6e ea410003 ifetchr regb ,2 ,contru 
+3b6f d8400000 arg 0 ,temp 
+3b70 20203b87 branch module_hci_event_set_cmd 
+
+module_hci_cmd_write_chip_data:
+3b71 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3b72 1f20f3fe increase -2 ,loopcnt 
+3b73 efe10003 ifetch 2 ,contru 
+3b74 1fe20a00 copy pdata ,contw 
+3b75 20405fdf call uart_copy_rx_bytes_fast 
+3b76 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_close_lpm:
+3b77 70409900 jam 0 ,mem_lpm_mode 
+3b78 20203b7c branch module_hci_event_receive_valid_cmd 
+
+module_hci_event_receive_invalid_cmd:
+3b79 d8400001 arg 1 ,temp 
+3b7a da200000 arg 0 ,rega 
+3b7b 20203b87 branch module_hci_event_set_cmd 
+
+module_hci_event_receive_valid_cmd:
+3b7c d8400000 arg 0 ,temp 
+3b7d da200000 arg 0 ,rega 
+3b7e 20203b87 branch module_hci_event_set_cmd 
+
+module_hci_event_spp_connect:
+3b7f 7009cf00 jam hci_event_spp_conn_rep ,mem_module_uart_opcode 
+3b80 20203bab branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_connect:
+3b81 7009cf02 jam hci_event_le_conn_rep ,mem_module_uart_opcode 
+3b82 20203bab branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_spp_disconnect:
+3b83 7009cf03 jam hci_event_spp_dis_rep ,mem_module_uart_opcode 
+3b84 20203bab branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_disconnect:
+3b85 7009cf05 jam hci_event_le_dis_rep ,mem_module_uart_opcode 
+3b86 20203bab branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_set_cmd:
+3b87 6fe089cf fetch 1 ,mem_module_uart_opcode 
+3b88 1fe22600 copy pdata ,regc 
+3b89 7009cf06 jam hci_event_cmd_res ,mem_module_uart_opcode 
+3b8a 58000002 setarg 2 
+3b8b 9a20fe00 iadd rega ,pdata 
+3b8c 20403c1e call module_hci_prepare_tx 
+3b8d 1a627e00 copy regc ,pdata 
+3b8e e7e08003 istore 1 ,contwu 
+3b8f e0408003 istoret 1 ,contwu 
+3b90 1a227200 copy rega ,loopcnt 
+3b91 1a420c00 copy regb ,contr 
+3b92 20405fd9 call uart_copy_tx_bytes 
+3b93 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_receive_spp_data:
+3b94 20403858 call module_spp_clear_last_transmite_clock 
+3b95 7009cf07 jam hci_event_spp_data_rep ,mem_module_uart_opcode 
+3b96 6fe083d2 fetch 1 ,mem_current_length 
+3b97 207a0000 rtn blank 
+3b98 20403c1e call module_hci_prepare_tx 
+3b99 6fe083d2 fetch 1 ,mem_current_length 
+3b9a 1fe27200 copy pdata ,loopcnt 
+3b9b 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+3b9c 1fe20c00 copy pdata ,contr 
+3b9d 20405fc5 call uart_copy_tx_bytes_fast 
+3b9e 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_receive_le_data:
+3b9f 7009cf08 jam hci_event_le_data_rep ,mem_module_uart_opcode 
+3ba0 1f20fe02 add loopcnt ,2 ,pdata 
+3ba1 20403c1e call module_hci_prepare_tx 
+3ba2 6fe109fa fetch 2 ,mem_module_le_rx_data_handle 
+3ba3 e7e10003 istore 2 ,contwu 
+3ba4 6fe109f8 fetch 2 ,mem_module_le_rx_data_address 
+3ba5 1fe20c00 icopy contr 
+3ba6 20405fc5 call uart_copy_tx_bytes_fast 
+3ba7 18c27e00 copy contr ,pdata 
+3ba8 67e109f8 store 2 ,mem_module_le_rx_data_address 
+3ba9 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_enter_standby_mode:
+3baa 7009cf09 jam hci_event_standby_rep ,mem_module_uart_opcode 
+
+module_hci_event_enter_standby_mode_len0:
+3bab 58000000 setarg 0 
+3bac 20403c1e call module_hci_prepare_tx 
+3bad 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_status_res:
+3bae 7009cf0a jam hci_event_status_res ,mem_module_uart_opcode 
+3baf 58000001 setarg 1 
+3bb0 20403c1e call module_hci_prepare_tx 
+3bb1 20403bbf call module_hci_read_bt_status 
+3bb2 6fe1478f fetch 2 ,mem_ui_state_map 
+3bb3 d8e00002 arg ui_state_bt_hid_conn ,queue 
+3bb4 afefffff qisolate1 pdata 
+3bb5 79208403 setflag true ,3 ,temp 
+3bb6 d8e00009 arg ui_state_ble_connected ,queue 
+3bb7 afefffff qisolate1 pdata 
+3bb8 79208405 setflag true ,5 ,temp 
+3bb9 6fe0c78f fetch 1 ,mem_ui_state_map 
+3bba d8e00004 arg ui_state_bt_spp_conn ,queue 
+3bbb afefffff qisolate1 pdata 
+3bbc 79208404 setflag true ,4 ,temp 
+3bbd e0408003 istoret 1 ,contwu 
+3bbe 20203c28 branch module_hci_transmit_tx 
+
+module_hci_read_bt_status:
+3bbf d8400000 arg 0 ,temp 
+3bc0 6fe0c09b fetch 1 ,mem_scan_mode 
+3bc1 d8e00000 arg inq_scan_mode ,queue 
+3bc2 afefffff qisolate1 pdata 
+3bc3 79208400 setflag true ,0 ,temp 
+3bc4 d8e00001 arg page_scan_mode ,queue 
+3bc5 afefffff qisolate1 pdata 
+3bc6 79208401 setflag true ,1 ,temp 
+3bc7 6fe0c427 fetch 1 ,mem_le_adv_enable 
+3bc8 d8e00000 arg 0 ,queue 
+3bc9 afefffff qisolate1 pdata 
+3bca 79208402 setflag true ,2 ,temp 
+3bcb 20600000 rtn 
+
+module_hci_event_store_device:
+3bcc 7009cf0d jam hci_event_nvram_rep ,mem_module_uart_opcode 
+3bcd 6fe0c48b fetch 1 ,mem_nv_data_number 
+3bce 1feffe22 mul32 pdata ,34 ,pdata 
+3bcf 1fe27200 icopy loopcnt 
+3bd0 20403c1e call module_hci_prepare_tx 
+3bd1 6fe14489 fetch 2 ,mem_nv_data_ptr 
+3bd2 1fe20c00 icopy contr 
+3bd3 20405fc5 call uart_copy_tx_bytes_fast 
+3bd4 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_gkey_generate:
+3bd5 7009cf0e jam hci_event_gkey ,mem_module_uart_opcode 
+3bd6 58000004 setarg 4 
+3bd7 20403c1e call module_hci_prepare_tx 
+3bd8 6fe2087c fetch 4 ,mem_gkey 
+3bd9 e7e20003 istore 4 ,contwu 
+3bda 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_invalid_packet:
+3bdb 7009cf0f jam hci_event_invalid_packet ,mem_module_uart_opcode 
+3bdc 6ff10112 fetch 2 ,core_uart_rxitems 
+3bdd d8400040 arg 0x40 ,temp 
+3bde 20407ebb call not_greater_than 
+3bdf 1fe22200 copy pdata ,rega 
+3be0 1fe27200 copy pdata ,loopcnt 
+3be1 20405f9d call uarta_prepare_rx 
+3be2 d8a0098e arg mem_module_rx_error_data_buffer ,contw 
+3be3 20405fdf call uart_copy_rx_bytes_fast 
+3be4 1a227e00 copy rega ,pdata 
+3be5 1a227200 copy rega ,loopcnt 
+3be6 20403c1e call module_hci_prepare_tx 
+3be7 d8c0098e arg mem_module_rx_error_data_buffer ,contr 
+3be8 20405fc5 call uart_copy_tx_bytes_fast 
+3be9 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_passkey_entry_mode:
+3bea 7009cf10 jam hci_event_get_passkey ,mem_module_uart_opcode 
+3beb 20203bab branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_tk:
+3bec 7009cf11 jam hci_event_le_tk ,mem_module_uart_opcode 
+3bed 58000004 setarg 4 
+3bee 20403c1e call module_hci_prepare_tx 
+3bef 6fe2439e fetch 4 ,mem_le_tk 
+3bf0 e7e20003 istore 4 ,contwu 
+3bf1 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_le_pairing_fail:
+3bf2 da200180 arg flag_ble_pairing_fail ,rega 
+3bf3 20203bf9 branch module_hci_event_pairing_completed 
+
+module_hci_event_le_pairing_success:
+3bf4 da200080 arg flag_ble_pairing_success ,rega 
+3bf5 20203bf9 branch module_hci_event_pairing_completed 
+
+module_hci_event_bt_pairing_fail:
+3bf6 da200101 arg flag_bt_pairing_fail ,rega 
+3bf7 20203bf9 branch module_hci_event_pairing_completed 
+
+module_hci_event_bt_pairing_success:
+3bf8 da200001 arg flag_bt_pairing_success ,rega 
+
+module_hci_event_pairing_completed:
+3bf9 70476e00 jam 0 ,mem_flag_mode_ssp_pin 
+3bfa 7009cf14 jam hci_event_le_pairing_state ,mem_module_uart_opcode 
+3bfb 58000002 setarg 2 
+3bfc 20403c1e call module_hci_prepare_tx 
+3bfd 1a227e00 copy rega ,pdata 
+3bfe e7e10003 istore 2 ,contwu 
+3bff 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_pause_enc:
+3c00 da600000 arg flag_event_pause_enc ,regc 
+3c01 20203c03 branch module_hci_event_enc 
+
+module_hci_event_start_enc:
+3c02 da600001 arg flag_event_start_enc ,regc 
+
+module_hci_event_enc:
+3c03 7009cf15 jam hci_event_le_encryption_state ,mem_module_uart_opcode 
+3c04 58000001 setarg 1 
+3c05 20403c1e call module_hci_prepare_tx 
+3c06 1a627e00 copy regc ,pdata 
+3c07 e7e08003 istore 1 ,contwu 
+3c08 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_le_gkey:
+3c09 7009cf1d jam hci_event_le_gkey ,mem_module_uart_opcode 
+3c0a 58000004 setarg 4 
+3c0b 20403c1e call module_hci_prepare_tx 
+3c0c 6fe2087c fetch 4 ,mem_gkey 
+3c0d e7e20003 istore 4 ,contwu 
+3c0e 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_uuid_handle:
+3c0f 60490964 storet 2 ,mem_temp 
+3c10 7009cf29 jam hci_event_uuid_handle ,mem_module_uart_opcode 
+3c11 58000002 setarg 2 
+3c12 20403c1e call module_hci_prepare_tx 
+3c13 68490964 fetcht 2 ,mem_temp 
+3c14 e0410003 istoret 2 ,contwu 
+3c15 20203c28 branch module_hci_transmit_tx 
+
+module_hci_event_le_input_passkey:
+3c16 7009cf2b jam hci_event_le_input_gkey ,mem_module_uart_opcode 
+3c17 20203bab branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_update_phy:
+3c18 7009cf40 jam hci_ble_update_phy_event ,mem_module_uart_opcode 
+3c19 58000002 setarg 2 
+3c1a 20403c1e call module_hci_prepare_tx 
+3c1b 6fe14075 fetch 2 ,mem_context + coffset_le_rx_phy 
+3c1c e7e10003 istore 2 ,contwu 
+3c1d 20203c28 branch module_hci_transmit_tx 
+
+module_hci_prepare_tx:
+3c1e 7009ce02 jam 0x02 ,mem_module_uart_cmd 
+3c1f 67e089d0 store 1 ,mem_module_uart_len 
+3c20 604c0964 storet 8 ,mem_temp 
+3c21 44e04018 bpatch patch18_0 ,mem_patch18 
+3c22 20403c2a call module_set_mcu_wake_pin_high_delay 
+3c23 684c0964 fetcht 8 ,mem_temp 
+3c24 20405fb5 call uarta_prepare_tx_register_push 
+3c25 6fe189ce fetch 3 ,mem_module_uart_cmd 
+3c26 e7e18003 istore 3 ,contwu 
+3c27 20600000 rtn 
+
+module_hci_transmit_tx:
+3c28 44e0c018 bpatch patch18_1 ,mem_patch18 
+3c29 20205fb9 branch uarta_send_register_pop 
+
+module_set_mcu_wake_pin_high_delay:
+3c2a 20403c33 call module_check_mcu_wake_pin_high 
+3c2b 20608000 rtn true 
+
+module_set_mcu_wake_pin_h_delay:
+3c2c 20403c31 call module_set_mcu_wake_pin_high 
+3c2d 6fe247b0 fetch 4 ,mem_module_mcu_wake_delay_us 
+3c2e 1feb7e00 rshift2 pdata ,pdata 
+3c2f 207a0000 rtn blank 
+3c30 20207d81 branch delay 
+
+module_set_mcu_wake_pin_high:
+3c31 6848c7af fetcht 1 ,mem_module_mcu_wake_pin 
+3c32 2020610d branch gpio_out_active 
+
+module_check_mcu_wake_pin_high:
+3c33 6848c7af fetcht 1 ,mem_module_mcu_wake_pin 
+3c34 20206118 branch gpio_check_active 
+
+module_set_mcu_wake_pin_low:
+3c35 6848c7af fetcht 1 ,mem_module_mcu_wake_pin 
+3c36 20206109 branch gpio_out_inactive 
+
+module_le_receive_data:
+3c37 622109f8 storer rega ,2 ,mem_module_le_rx_data_address 
+3c38 624109f6 storer regb ,2 ,mem_module_le_rx_data_len 
+3c39 6fe14437 fetch 2 ,mem_le_att_handle 
+3c3a 67e109fa store 2 ,mem_module_le_rx_data_handle 
+3c3b 204039c0 call module_check_ble_encrypt_state 
+3c3c 20740000 rtn user 
+
+module_le_receive_data_ok:
+3c3d 684909f6 fetcht 2 ,mem_module_le_rx_data_len 
+3c3e 6fe0c7c5 fetch 1 ,mem_module_ble_data_uart_max_length 
+3c3f 20407ebb call not_greater_than 
+3c40 1fe27200 copy pdata ,loopcnt 
+3c41 18427e00 copy temp ,pdata 
+3c42 9f267e00 isub loopcnt ,pdata 
+3c43 67e109f6 store 2 ,mem_module_le_rx_data_len 
+3c44 20403b9f call module_hci_event_receive_le_data 
+3c45 6fe109f6 fetch 2 ,mem_module_le_rx_data_len 
+3c46 207a0000 rtn blank 
+3c47 20203c3d branch module_le_receive_data_ok 
+
+module_exit_sniff:
+3c48 6fe147c6 fetch 2 ,mem_module_flag 
+3c49 c3848000 rtnbit1 moudle_task_unsniff 
+3c4a 20403c65 call module_set_unsniff_task_flag 
+3c4b 2020328b branch app_bt_sniff_exit 
+
+module_set_lpm_mult_2:
+3c4c 70417702 jam 2 ,mem_lpm_mult 
+3c4d 20600000 rtn 
+
+module_bb_event_timer:
+
+module_read_vdd_timer:
+3c4e 6fe0c7c1 fetch 1 ,mem_module_read_vdd_flag 
+3c4f 207a0000 rtn blank 
+3c50 6fe0c7c2 fetch 1 ,mem_module_read_vdd_count 
+3c51 207a0000 rtn blank 
+3c52 1fe0ffff increase -1 ,pdata 
+3c53 67e0c7c2 store 1 ,mem_module_read_vdd_count 
+3c54 247a0000 nrtn blank 
+3c55 7047c205 jam flag_module_read_vdd_count ,mem_module_read_vdd_count 
+3c56 20406166 call enable_adc 
+3c57 2040618d call vdd_calculate_by_mode 
+3c58 1fe6fc64 div pdata ,0x64 
+3c59 20407e61 call get_div_result 
+3c5a 18070400 remainder temp 
+3c5b 67e0c7c3 store 1 ,mem_module_vdd_quotient 
+3c5c 6048c7c4 storet 1 ,mem_module_vdd_remainder 
+3c5d 20600000 rtn 
+
+module_control_air_flow:
+3c5e 20407e92 call check_uart_tx_buff 
+3c5f 20213258 branch app_l2cap_flow_control_enable ,positive 
+3c60 2020325a branch app_l2cap_flow_control_disable 
+
+module_set_sniff_task_flag:
+3c61 d8e0000a arg moudle_task_sniff ,queue 
+3c62 20203c71 branch module_set_state 
+
+module_clear_sniff_task_flag:
+3c63 d8e0000a arg moudle_task_sniff ,queue 
+3c64 20203c6d branch module_clr_state 
+
+module_set_unsniff_task_flag:
+3c65 d8e00009 arg moudle_task_unsniff ,queue 
+3c66 20203c71 branch module_set_state 
+
+module_clear_unsniff_task_flag:
+3c67 d8e00009 arg moudle_task_unsniff ,queue 
+3c68 20203c6d branch module_clr_state 
+
+module_set_le_tx_data_flag:
+3c69 d8e00008 arg module_flag_ble_data_finish ,queue 
+3c6a 20203c71 branch module_set_state 
+
+module_clear_le_tx_data_flag:
+3c6b d8e00008 arg module_flag_ble_data_finish ,queue 
+3c6c 20203c6d branch module_clr_state 
+
+module_clr_state:
+3c6d 6fe147c6 fetch 2 ,mem_module_flag 
+3c6e f93ffe00 qset0 pdata 
+3c6f 67e147c6 store 2 ,mem_module_flag 
+3c70 20600000 rtn 
+
+module_set_state:
+3c71 6fe147c6 fetch 2 ,mem_module_flag 
+3c72 f9207e00 qset1 pdata 
+3c73 67e147c6 store 2 ,mem_module_flag 
+3c74 20600000 rtn 
+
+mouse_init:
+3c75 20406e5e call enable_authrom 
+3c76 20403ca6 call mouse_setting_config 
+3c77 204041e7 call mouse_init_sunt 
+3c78 204040ce call mouse_dpi_config 
+3c79 20758000 rtn wake 
+3c7a 20404766 call mouse_drawing_optima_init 
+3c7b 20403c83 call mouse_cb_fuction 
+3c7c 2040427c call mouse_sensor_powerdown 
+3c7d 6fe0c92f fetch 1 ,mem_usb_addr 
+3c7e c3838000 rtnbit1 7 
+
+mouse_init_wireless:
+3c7f 6fe1478f fetch 2 ,mem_ui_state_map 
+3c80 c2864593 bbit1 ui_state_btn_down ,mouse_start_discovery 
+3c81 204046de call mouse_check_select_device_by_switch 
+3c82 20203e15 branch mouse_start_work 
+
+mouse_cb_fuction:
+3c83 58004902 setarg mouse_24g_before_lpm_sleep 
+3c84 67e14479 store 2 ,mem_cb_before_lpm_sleep 
+3c85 580048a5 setarg mouse_24g_package_data 
+3c86 67e1489f store 2 ,mem_cb_24g_transmit_data 
+3c87 580048cc setarg mouse_24g_search_dongle 
+3c88 67e148a1 store 2 ,mem_cb_24g_search_receiver 
+3c89 58003e80 setarg mouse_lpm_before_common 
+3c8a 67e148a3 store 2 ,mem_cb_24g_lpm_before 
+3c8b 580043df setarg mouse_le 
+3c8c 67e14461 store 2 ,mem_cb_le_process 
+3c8d 58004497 setarg mouse_bt 
+3c8e 67e14463 store 2 ,mem_cb_bt_process 
+3c8f 58003e7b setarg mouse_process_lpm_before 
+3c90 67e1445f store 2 ,mem_cb_before_lpm 
+3c91 58004374 setarg mouse_priority_bb_event 
+3c92 67e14467 store 2 ,mem_cb_bb_event_process 
+3c93 5800468b setarg mouse_idle 
+3c94 67e14465 store 2 ,mem_cb_idle_process 
+3c95 58003e5e setarg mouse_before_hibernate 
+3c96 67e1445d store 2 ,mem_cb_before_hibernate 
+3c97 580043c8 setarg mouse_le_bb_event_connect_complete 
+3c98 67e1446b store 2 ,mem_cb_att_write 
+3c99 580044f5 setarg mouse_bb_event_timer 
+3c9a 67e1446f store 2 ,mem_cb_event_timer 
+3c9b 58003fa9 setarg mouse_spi_write_flash_cb 
+3c9c 67e14473 store 2 ,mem_cb_spi_flash_write_complate 
+3c9d 58003e4d setarg mouse_lpm_check_wake_lock 
+3c9e 67e1445b store 2 ,mem_cb_check_wakelock 
+3c9f 580049f5 setarg mouse_le_transmit 
+3ca0 67e1446d store 2 ,mem_cb_ble_transmit 
+3ca1 580049f7 setarg mouse_bt_slave_match 
+3ca2 67e14477 store 2 ,mem_cb_bt_slave_match 
+3ca3 58004a0a setarg mouse_set_lpm_mult 
+3ca4 67e14471 store 2 ,mem_cb_bt_set_mult 
+3ca5 20600000 rtn 
+
+mouse_setting_config:
+3ca6 20758000 rtn wake 
+3ca7 2040260e call g24_transmit_init 
+3ca8 204022b5 call g24_chmap_param_init 
+3ca9 20403f60 call mouse_gpio_init 
+3caa 20403dd6 call mouse_param_init 
+3cab 20401ac2 call le_set_config_fixed_ltk 
+3cac 20401aeb call le_set_justwork 
+3cad 20401ade call le_set_fixed_ltk 
+3cae 20401aca call le_set_config_read_authentication 
+3caf 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3cb0 c289c675 bbit1 mouse_enable_eeprom ,mouse_load_eeprom_info_check 
+3cb1 c2894636 bbit1 mouse_enable_flash ,mouse_load_flash_info_check 
+3cb2 20600000 rtn 
+
+mouse_xtal_init:
+3cb3 7040c508 jam 0x08 ,mem_fcomp_div 
+3cb4 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3cb5 c3860000 rtnbit1 mouse_enable_16m 
+3cb6 7040c518 jam 0x18 ,mem_fcomp_div 
+3cb7 20600000 rtn 
+
+mouse_default_init:
+3cb8 700b58ff jam 0xff ,mem_usb_offline_check_gpio 
+3cb9 704793ff jam 0xff ,mem_ui_button_gpio 
+3cba 7047921e jam 0x1e ,mem_ui_button_timeout 
+3cbb 7049c505 jam 5 ,mem_store_information_delay_timer_init 
+3cbc 58004932 setarg mem_mouse_led_type 
+3cbd 67e1448f store 2 ,mem_ui_led_struct_ptr 
+3cbe 70448e01 jam 1 ,mem_ui_led_struct_num 
+3cbf 58004ac6 setarg mem_mouse_rssi_signal_buf 
+3cc0 67e1489d store 2 ,mem_rssi_signal_buf_ptr 
+3cc1 70483901 jam 1 ,mem_24g_data_type 
+3cc2 6fe14902 fetch 2 ,mem_mouse_discovery_timeout 
+3cc3 67e14794 store 2 ,mem_discovery_timeout 
+3cc4 6fe14904 fetch 2 ,mem_mouse_24g_pair_timeout_init 
+3cc5 67e14885 store 2 ,mem_24g_pair_timeout_init 
+3cc6 6fe0c907 fetch 1 ,mem_mouse_24g_reconn_timeout_init 
+3cc7 67e14889 store 2 ,mem_24g_reconn_timeout_init 
+3cc8 6fe2c909 fetch 5 ,mem_rssi_dis_min_24g_init 
+3cc9 67e2c8cf store 5 ,mem_rssi_dis_min_24g 
+3cca 6fe0c908 fetch 1 ,mem_mouse_24g_pair_tx_power 
+3ccb 67e0c880 store 1 ,mem_24g_pair_tx_power 
+3ccc 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3ccd 247a0000 nrtn blank 
+3cce 58020800 setarg 0x020800 
+3ccf 67e1cbbc store 3 ,mem_mouse_flag 
+3cd0 58800700 setarg 0x800700 
+3cd1 e7e18005 istore 3 ,contw 
+3cd2 58000300 setarg 0x0300 
+3cd3 e7e10005 istore 2 ,contw 
+3cd4 70409901 jam 1 ,mem_lpm_mode 
+3cd5 6fe0c90e fetch 1 ,mem_mouse_enable_flag 
+3cd6 2feffe00 isolate1 mouse_adc_enable ,pdata 
+3cd7 2040c724 call mouse_adc_read_enable ,true 
+3cd8 6fe0c90e fetch 1 ,mem_mouse_enable_flag 
+3cd9 2feffe02 isolate1 mouse_24g_250hz_enable ,pdata 
+3cda 2040c726 call mouse_24g_set_250hz ,true 
+3cdb 6fe0c90e fetch 1 ,mem_mouse_enable_flag 
+3cdc 2feffe01 isolate1 mouse_search_dongle_enable ,pdata 
+3cdd 2040c728 call mouse_24g_search_dongle_enable ,true 
+3cde 6fe0c90e fetch 1 ,mem_mouse_enable_flag 
+3cdf 2feffe03 isolate1 mouse_clk_16m_enable ,pdata 
+3ce0 2040c72a call mouse_16m_enable ,true 
+3ce1 6fe0c90e fetch 1 ,mem_mouse_enable_flag 
+3ce2 2feffe04 isolate1 mouse_dpi_4_level_enable ,pdata 
+3ce3 2040c72c call mouse_dpi_4level_enable ,true 
+3ce4 6fe0c90e fetch 1 ,mem_mouse_enable_flag 
+3ce5 2feffe05 isolate1 mouse_keyboard_enable ,pdata 
+3ce6 2040c736 call mouse_customer_key_enable ,true 
+3ce7 6fe0c869 fetch 1 ,mem_24g_ch_map_update 
+3ce8 245a22c4 ncall g24_chamap_param_update ,blank 
+3ce9 20403cb3 call mouse_xtal_init 
+3cea 6fe0c90f fetch 1 ,mem_mouse_global_setup 
+3ceb 1fe10407 and pdata ,0x07 ,temp 
+3cec 6048c4a3 storet 1 ,mem_adc_channel 
+3ced 1fe97e00 rshift3 pdata ,pdata 
+3cee 1fe10401 and pdata ,0x01 ,temp 
+3cef 6048c869 storet 1 ,mem_24g_ch_map_update 
+3cf0 1fe37e00 rshift pdata ,pdata 
+3cf1 1fe10403 and pdata ,0x03 ,temp 
+3cf2 6048c901 storet 1 ,mem_adc_config_flag_init 
+3cf3 1feb7e00 rshift2 pdata ,pdata 
+3cf4 1fe17e03 and pdata ,0x03 ,pdata 
+3cf5 20404812 call mouse_24g_long_sleep_set 
+3cf6 6fe0c910 fetch 1 ,mem_mouse_global_setup1 
+3cf7 1fe10403 and pdata ,0x03 ,temp 
+3cf8 6048c929 storet 1 ,mem_sensor_angle_default 
+3cf9 1feb7e00 rshift2 pdata ,pdata 
+3cfa 1fe10403 and pdata ,0x03 ,temp 
+3cfb 6048c92a storet 1 ,mem_sensor_angle_switch 
+3cfc 1feb7e00 rshift2 pdata ,pdata 
+3cfd 1fe10401 and pdata ,0x01 ,temp 
+3cfe 6048c92b storet 1 ,mem_config_sensor_dpi 
+3cff 6048c997 storet 1 ,mem_mouse_dpi 
+3d00 1fe37e00 rshift pdata ,pdata 
+3d01 1fe10401 and pdata ,0x01 ,temp 
+3d02 6048c87a storet 1 ,mem_24g_disable_fec1 
+3d03 1fe37e00 rshift pdata ,pdata 
+3d04 1fe17e03 and pdata ,0x03 ,pdata 
+3d05 67e0cbc5 store 1 ,mem_device_number 
+3d06 44e14018 bpatch patch18_2 ,mem_patch18 
+3d07 580b0c0a setarg 0x0b0c0a 
+3d08 67e1c91c store 3 ,mem_lbutton_gpio 
+3d09 58ffffff setarg 0xffffff 
+3d0a e7e18005 istore 3 ,contw 
+3d0b 580607ff setarg 0x0607ff 
+3d0c e7e18005 istore 3 ,contw 
+3d0d 58ffffff setarg 0xffffff 
+3d0e e7e18005 istore 3 ,contw 
+3d0f 7048fb0a jam 0x0a ,mem_adc_read_time_init 
+3d10 58000064 setarg 0x0064 
+3d11 67e14bd9 store 2 ,mem_adc_low_volatage_led_blink_timer 
+3d12 20403ebc call mouse_adc_vol_init 
+3d13 58001770 setarg 0x1770 
+3d14 67e14bcf store 2 ,mem_mouse_no_data_timeout 
+3d15 704bd114 jam 0x14 ,mem_mouse_device_poweron_timer_count_init 
+3d16 58000190 setarg 0x0190 
+3d17 67e14bd7 store 2 ,mem_mouse_low_v_led_blink_time 
+3d18 67e14bd3 store 2 ,mem_mouse_dpi_led_blink_time 
+3d19 580003e8 setarg 0x03e8 
+3d1a 67e14bd5 store 2 ,mem_mouse_disconvey_led_blink_time 
+3d1b 70488107 jam 0x07 ,mem_rssi_buff_index 
+3d1c 7048ce7d jam 125 ,mem_power_ctrl_pac_succ_cnt_init 
+3d1d 7041e800 jam tx_power_0db ,mem_tx_power 
+3d1e 70489001 jam 0x01 ,mem_24g_fast_conn_enable 
+3d1f 58000f0f setarg 0x0f0f 
+3d20 67e14891 store 2 ,mem_24g_fast_conn_addr 
+3d21 67e14893 store 2 ,mem_24g_fast_conn_addr + 2 
+3d22 6fe140a8 fetch 2 ,mem_lap 
+3d23 67e140ac store 2 ,mem_lap + 4 
+3d24 d8a0437a arg mem_le_lap ,contw 
+3d25 d8c040a8 arg mem_lap ,contr 
+3d26 df200006 arg 0x06 ,loopcnt 
+3d27 20407ed9 call reverse_byte 
+3d28 704b9b20 jam 0x20 ,mem_lpm_mult_init 
+3d29 70493e34 jam 0x34 ,mem_device1_type 
+3d2a 6fe3437a fetch 6 ,mem_le_lap 
+3d2b 67e34955 store 6 ,mem_device1_locall_addr 
+3d2c 704bc402 jam 0x02 ,mem_mouse_bluetooth_type 
+3d2d 7043e71f jam 0x1f ,mem_le_adv_data_len 
+3d2e 58050102 setarg 0x050102 
+3d2f 67e1c3e8 store 3 ,mem_le_adv_data 
+3d30 58120303 setarg 0x120303 
+3d31 e7e18005 istore 3 ,contw 
+3d32 58190318 setarg 0x190318 
+3d33 e7e18005 istore 3 ,contw 
+3d34 580003c2 setarg 0x03c2 
+3d35 e7e10005 istore 2 ,contw 
+3d36 5806ff06 setarg 0x06ff06 
+3d37 67e1cae3 store 3 ,mem_le_adv_swift_pair 
+3d38 58000300 setarg 0x000300 
+3d39 e7e18005 istore 3 ,contw 
+3d3a 58090c80 setarg 0x090c80 
+3d3b e7e18005 istore 3 ,contw 
+3d3c 58355442 setarg 0x355442 
+3d3d e7e18005 istore 3 ,contw 
+3d3e 5820322e setarg 0x20322e 
+3d3f e7e18005 istore 3 ,contw 
+3d40 58756f4d setarg 0x756f4d 
+3d41 e7e18005 istore 3 ,contw 
+3d42 58006573 setarg 0x6573 
+3d43 e7e10005 istore 2 ,contw 
+3d44 7044071f jam 0x1f ,mem_le_scan_data_len 
+3d45 d8c04aea arg mem_le_adv_swift_pair + 7 ,contr 
+3d46 d8a04408 arg mem_le_scan_data ,contw 
+3d47 df20000d arg 13 ,loopcnt 
+3d48 20407dd4 call memcpy 
+3d49 6fe0c408 fetch 1 ,mem_le_scan_data 
+3d4a 1fe0ffff increase -1 ,pdata 
+3d4b 67e0c2f7 store 1 ,mem_le_name_len 
+3d4c d8c0440a arg mem_le_scan_data + 2 ,contr 
+3d4d d8a042f8 arg mem_le_name_len + 1 ,contw 
+3d4e df20000b arg 11 ,loopcnt 
+3d4f 20407dd4 call memcpy 
+3d50 58070007 setarg 0x070007 
+3d51 67e1c372 store 3 ,mem_le_interval_min 
+3d52 58002000 setarg 0x002000 
+3d53 e7e18005 istore 3 ,contw 
+3d54 5800012c setarg 0x012c 
+3d55 e7e10005 istore 2 ,contw 
+3d56 58181203 setarg 0x181203 
+3d57 67e1cadd store 3 ,mem_le_adv_ind 
+3d58 580000ff setarg 0x0000ff 
+3d59 67e1cae0 store 3 ,mem_le_adv_direct_ind 
+3d5a 380000fb setsect 0 ,0xfb 
+3d5b 3806c212 setsect 1 ,0x2c212 
+3d5c 3808800f setsect 2 ,0x800f 
+3d5d 380c0021 setsect 3 ,0x21 
+3d5e 67e4444c store 8 ,mem_local_rx_max_octets 
+3d5f 70443207 jam 0x07 ,mem_le_adv_channel_map 
+3d60 58000015 setarg 0x0015 
+3d61 67e14af8 store 2 ,mem_le_keyboard_handle 
+3d62 58000019 setarg 0x0019 
+3d63 67e14357 store 2 ,mem_le_notify_handle 
+3d64 5800001d setarg 0x001d 
+3d65 67e14afa store 2 ,mem_le_multimedia_handle 
+3d66 58000021 setarg 0x0021 
+3d67 67e14afc store 2 ,mem_le_systemctrl_handle 
+3d68 58000030 setarg 0x0030 
+3d69 67e14afe store 2 ,mem_le_battery_level_handle 
+3d6a 58000022 setarg 0x0022 
+3d6b 67e143d1 store 2 ,mem_le_pairing_handle 
+3d6c 704b0196 jam 0x96 ,mem_le_battery_level_updata_timer_init 
+3d6d 70493d00 jam mode_24g_device ,mem_device_flag 
+3d6e 204022d8 call g24_enable_1m 
+3d6f 204022db call g24_pair_param_init 
+3d70 58604800 setarg 0x604800 
+3d71 67e1c85f store 3 ,mem_24g_enter_hibernate 
+3d72 5800012c setarg 0x012c 
+3d73 67e148c6 store 2 ,mem_24g_long_sleep_param_update_timer_init 
+3d74 58000050 setarg 0x0050 
+3d75 67e148c4 store 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+3d76 58000005 setarg 0x05 
+3d77 67e14bcb store 2 ,mem_mouse_24g_power_on_fast_conn_timer 
+3d78 58000708 setarg 0x0708 
+3d79 67e14bcd store 2 ,mem_mouse_24g_search_dongle_time_init 
+3d7a 58010403 setarg 0x010403 
+3d7b 67e1c9d5 store 3 ,mem_mouse_dpi_seting 
+3d7c 582a2002 setarg 0x2a2002 
+3d7d e7e18005 istore 3 ,contw 
+3d7e 5822153f setarg 0x22153f 
+3d7f e7e18005 istore 3 ,contw 
+3d80 58114433 setarg 0x114433 
+3d81 e7e18005 istore 3 ,contw 
+3d82 58265a09 setarg 0x265a09 
+3d83 67e1c9e4 store 3 ,mem_sensor_3212_init 
+3d84 58041934 setarg 0x041934 
+3d85 e7e18005 istore 3 ,contw 
+3d86 58000009 setarg 0x0009 
+3d87 e7e10005 istore 2 ,contw 
+3d88 5800ffff setarg 0xffff 
+3d89 e7e10005 istore 2 ,contw 
+3d8a 580d5a09 setarg 0x0d5a09 
+3d8b 67e1c9f8 store 3 ,mem_sensor_3205_init 
+3d8c 58ed1d10 setarg 0xed1d10 
+3d8d e7e18005 istore 3 ,contw 
+3d8e 5800807d setarg 0x807d 
+3d8f e7e10005 istore 2 ,contw 
+3d90 5800ffff setarg 0xffff 
+3d91 e7e10005 istore 2 ,contw 
+3d92 58ff5a09 setarg 0xff5a09 
+3d93 67e1ca3e store 3 ,mem_sensor_8650_init 
+3d94 5840ab27 setarg 0x40ab27 
+3d95 e7e18005 istore 3 ,contw 
+3d96 589b56b3 setarg 0x9b56b3 
+3d97 e7e18005 istore 3 ,contw 
+3d98 5812a8e6 setarg 0x12a8e6 
+3d99 e7e18005 istore 3 ,contw 
+3d9a 58bec0a9 setarg 0xbec0a9 
+3d9b e7e18005 istore 3 ,contw 
+3d9c 58afa5e6 setarg 0xafa5e6 
+3d9d e7e18005 istore 3 ,contw 
+3d9e 58a121a0 setarg 0xa121a0 
+3d9f e7e18005 istore 3 ,contw 
+3da0 5810b802 setarg 0x10b802 
+3da1 e7e18005 istore 3 ,contw 
+3da2 58a70bb9 setarg 0xa70bb9 
+3da3 e7e18005 istore 3 ,contw 
+3da4 58d0b5ff setarg 0xd0b5ff 
+3da5 e7e18005 istore 3 ,contw 
+3da6 58ff00b6 setarg 0xff00b6 
+3da7 e7e18005 istore 3 ,contw 
+3da8 58000900 setarg 0x000900 
+3da9 e7e18005 istore 3 ,contw 
+3daa 5800ffff setarg 0xffff 
+3dab e7e10005 istore 2 ,contw 
+3dac 580d5a09 setarg 0x0d5a09 
+3dad 67e1ca64 store 3 ,mem_sensor_ka8ul_init 
+3dae 58c50e10 setarg 0xc50e10 
+3daf e7e18005 istore 3 ,contw 
+3db0 58109a5b setarg 0x109a5b 
+3db1 e7e18005 istore 3 ,contw 
+3db2 58421138 setarg 0x421138 
+3db3 e7e18005 istore 3 ,contw 
+3db4 58412828 setarg 0x412828 
+3db5 e7e18005 istore 3 ,contw 
+3db6 58394923 setarg 0x394923 
+3db7 e7e18005 istore 3 ,contw 
+3db8 584bb04a setarg 0x4bb04a 
+3db9 e7e18005 istore 3 ,contw 
+3dba 58904ca0 setarg 0x904ca0 
+3dbb e7e18005 istore 3 ,contw 
+3dbc 5809704d setarg 0x09704d 
+3dbd e7e18005 istore 3 ,contw 
+3dbe 58ffff00 setarg 0xffff00 
+3dbf e7e18005 istore 3 ,contw 
+3dc0 5846a509 setarg 0x46a509 
+3dc1 67e1ca92 store 3 ,mem_sensor_ka8g2_init 
+3dc2 58101934 setarg 0x101934 
+3dc3 e7e18005 istore 3 ,contw 
+3dc4 58690760 setarg 0x690760 
+3dc5 e7e18005 istore 3 ,contw 
+3dc6 58207d04 setarg 0x207d04 
+3dc7 e7e18005 istore 3 ,contw 
+3dc8 5809007e setarg 0x09007e 
+3dc9 e7e18005 istore 3 ,contw 
+3dca 58220d00 setarg 0x220d00 
+3dcb e7e18005 istore 3 ,contw 
+3dcc 58ff220e setarg 0xff220e 
+3dcd e7e18005 istore 3 ,contw 
+3dce 704aa7ff jam 0xff ,mem_sensor_ka8g2_init + 21 
+3dcf 580b5a09 setarg 0x0b5a09 
+3dd0 67e1cab4 store 3 ,mem_sensor_poweron_init 
+3dd1 580009f3 setarg 0x0009f3 
+3dd2 e7e18005 istore 3 ,contw 
+3dd3 5800ffff setarg 0xffff 
+3dd4 e7e10005 istore 2 ,contw 
+3dd5 20203174 branch app_sys_param_init 
+
+mouse_param_init:
+3dd6 58009468 setarg mouse_bt_sdp_addr 
+3dd7 67e14663 store 2 ,mem_ui_uuid_table 
+3dd8 58009732 setarg mouse_ble_att_list_addr 
+3dd9 67e14396 store 2 ,mem_ui_le_uuid_table 
+3dda 58002580 setarg 0x2580 
+3ddb 67e1c0b2 store 3 ,mem_class 
+3ddc 70417803 jam 3 ,mem_lpm_mult_timeout 
+3ddd 70415b08 jam 8 ,mem_lpm_overhead 
+3dde 704baf00 jam dpi_button_state_up ,mem_select_device_button_statue 
+3ddf 704baf00 jam pb_button_state_up ,mem_select_device_button_statue 
+3de0 704bb000 jam commbination_key_state_up ,mem_commbination_key_statue 
+3de1 58000200 setarg 0x0200 
+3de2 67e14159 store 2 ,mem_lpm_interval 
+3de3 70438017 jam 0x17 ,mem_le_local_mtu 
+3de4 70438217 jam 0x17 ,mem_le_remote_mtu 
+3de5 58000a77 setarg 0x0a77 
+3de6 67e14486 store 2 ,mem_spi_init_clk 
+3de7 38000306 setsect 0 ,0x306 
+3de8 38044440 setsect 1 ,0x4440 
+3de9 38090000 setsect 2 ,0x10000 
+3dea 380c4408 setsect 3 ,0x4408 
+3deb 67e4c665 store 9 ,mem_all_uuid_16bits 
+3dec 38001224 setsect 0 ,0x1224 
+3ded 38044000 setsect 1 ,0x4000 
+3dee 38080000 setsect 2 ,0x0 
+3def e7e28005 istore 5 ,contw 
+3df0 3803ffff setsect 0 ,0x3ffff 
+3df1 3806fe23 setsect 1 ,0x2fe23 
+3df2 380999d9 setsect 2 ,0x199d9 
+3df3 380c020d setsect 3 ,0x20d 
+3df4 67e440a0 store 8 ,mem_features 
+3df5 58004b06 setarg mem_le_tx_buffer0_omemalloc 
+3df6 67e143de store 2 ,mem_ble_l2cap_tx_buff0_ptr 
+3df7 58000010 setarg mouse_ble_l2cap_txbuff_size 
+3df8 67e143e0 store 2 ,mem_ble_l2cap_tx_buff_size_ptr 
+3df9 2040495b call mouse_device_led_all_off 
+3dfa 20404913 call mouse_device_poweron_timer_init 
+3dfb 20403ecf call mouse_adc_gpio_mux_init 
+3dfc 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3dfd c30dbe02 bbit0 mouse_enable_bt_125hz ,mouse_param_init_intervl_end 
+3dfe 7044550c jam classic_interval_7_5ms ,mem_sniff_param_interval 
+3dff 58000006 setarg le_interval_7_5ms 
+3e00 67e14372 store 2 ,mem_le_interval_min 
+3e01 67e14374 store 2 ,mem_le_interval_min + 2 
+
+mouse_param_init_intervl_end:
+3e02 2040261a call g24_interval_param_8ms 
+3e03 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3e04 c30c3e06 bbit0 mouse_enable_24g_250hz ,mouse_24g_short_sleep_set_end 
+3e05 20402612 call g24_interval_param_4ms 
+
+mouse_24g_short_sleep_set_end:
+3e06 6fe0c93d fetch 1 ,mem_device_flag 
+3e07 67e0cac5 store 1 ,mem_device_flag_temp 
+3e08 6fe1c37d fetch 3 ,mem_le_lap + 3 
+3e09 67e1cada store 3 ,mem_mouse_le_lap_temp 
+3e0a 6fe0c901 fetch 1 ,mem_adc_config_flag_init 
+3e0b 1fe17efe and pdata ,0xfe ,pdata 
+3e0c 67e0c901 store 1 ,mem_adc_config_flag_init 
+3e0d 67e0c4a2 store 1 ,mem_adc_config_flag 
+3e0e 58000000 setarg 0 
+3e0f 67e3c8d4 store 7 ,mem_mouse_key 
+3e10 6fe0c792 fetch 1 ,mem_ui_button_timeout 
+3e11 67e0cbac store 1 ,mem_bt_discovery_count 
+3e12 67e0cbad store 1 ,mem_select_device_count 
+3e13 20401a55 call le_modified_name 
+3e14 202042e0 branch mouse_sensor_set_angle 
+
+mouse_start_work:
+3e15 44e1c018 bpatch patch18_3 ,mem_patch18 
+3e16 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3e17 c297c849 bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_start_auto_pair_mode 
+3e18 6fe0c93d fetch 1 ,mem_device_flag 
+3e19 c0004835 beq mode_24g_device ,mouse_24g_start_mode 
+3e1a 20403e28 call mouse_wakeup_from_power_check 
+3e1b 2434432b nbranch mouse_buletooth_fast_conn_init ,user 
+
+mouse_start_reconnect_device:
+3e1c 44e24018 bpatch patch18_4 ,mem_patch18 
+3e1d da20493e arg mem_device1_type ,rega 
+3e1e 6fe0c93d fetch 1 ,mem_device_flag 
+3e1f 1fe0ffff increase -1 ,pdata 
+3e20 1feffe1d mul32 pdata ,29 ,pdata 
+3e21 9a20a200 iadd rega ,rega 
+3e22 efe08011 ifetch 1 ,rega 
+3e23 67e0c484 store 1 ,mem_xrecord_mode 
+
+mouse_start_reconnect:
+3e24 6fe0c484 fetch 1 ,mem_xrecord_mode 
+3e25 c019be32 beq rec_3_mode ,mouse3_0_check_reconn_target 
+3e26 c01a3e3e beq rec_4_mode ,mouse4_0_check_reconn_target 
+3e27 20204593 branch mouse_start_discovery 
+
+mouse_wakeup_from_power_check:
+3e28 44e2c018 bpatch patch18_5 ,mem_patch18 
+3e29 78547c00 disable user 
+3e2a 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3e2b c305be2f bbit0 mouse_enable_wakeup_from_power ,mouse_wakeup_from_power 
+3e2c 6fe08989 fetch 1 ,mem_wakup_from_power_flag 
+3e2d c3013e2f bbit0 bit_power_on ,mouse_wakeup_from_power 
+3e2e 78347c00 enable user 
+
+mouse_wakeup_from_power:
+3e2f 6fe0cac2 fetch 1 ,mem_reconn_times_init 
+3e30 67e0cac1 store 1 ,mem_reconn_times 
+3e31 20600000 rtn 
+
+mouse3_0_check_reconn_target:
+3e32 68494bc9 fetcht 2 ,mem_mouse_fast_page_to 
+3e33 6fe0cad2 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+3e34 c07fbe36 beq 0xff ,mouse3_0_check_reconn_target_next 
+3e35 68494bc6 fetcht 2 ,mem_mouse_page_to 
+
+mouse3_0_check_reconn_target_next:
+3e36 604940c1 storet 2 ,mem_page_to 
+3e37 6fe341dd fetch 6 ,mem_hci_plap 
+3e38 203a326a branch app_bt_start_discovery_short ,blank 
+3e39 70447f17 jam 0x17 ,mem_app_connection_options 
+3e3a 6fe0c767 fetch 1 ,mem_ssp_enable 
+3e3b 243a3260 nbranch app_bt_start_reconnect ,blank 
+3e3c 70447f04 jam 0x04 ,mem_app_connection_options 
+3e3d 20203260 branch app_bt_start_reconnect 
+
+mouse4_0_check_reconn_target:
+3e3e 704ad801 jam 1 ,mem_mouse_le_reconnect_flag 
+3e3f 6848cbc8 fetcht 1 ,mem_mouse_fast_direct_timeout 
+3e40 6fe0cad2 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+3e41 c07fbe43 beq 0xff ,mouse4_0_check_reconn_target_next 
+3e42 6848c906 fetcht 1 ,mem_mouse_direct_timeout 
+
+mouse4_0_check_reconn_target_next:
+3e43 6048cb88 storet 1 ,mem_mouse_direct_timer 
+3e44 20403297 call app_lpm_mult_disable 
+3e45 6fe1cae0 fetch 3 ,mem_le_adv_direct_ind 
+3e46 67e1c3ec store 3 ,mem_le_adv_data + 4 
+3e47 20404428 call mouse_le_check_adv_flag 
+3e48 58000004 setarg adv_flag_bredr_not_supported 
+3e49 e7e08006 istore 1 ,contr 
+3e4a d8c04408 arg mem_le_scan_data ,contr 
+3e4b 2040442f call mouse_le_adv_data_update 
+3e4c 20207959 branch check_51cmd_adv 
+
+mouse_lpm_check_wake_lock:
+3e4d c513324f bmark1 mark_24g ,app_get_lpm_wake_lock 
+3e4e 6fe0cabd fetch 1 ,mem_mouse_clear_sensor_data_flag 
+3e4f 203a324f branch app_get_lpm_wake_lock ,blank 
+3e50 6fe0cb05 fetch 1 ,mem_mouse_le_conn_param_reject 
+3e51 c000b24f beq le_lpm_disable ,app_get_lpm_wake_lock 
+3e52 6fe144db fetch 2 ,mem_sdp_remote_cid 
+3e53 243a324f nbranch app_get_lpm_wake_lock ,blank 
+3e54 6fe0c8e5 fetch 1 ,mem_mouse_wheel_trigger 
+3e55 243a324f nbranch app_get_lpm_wake_lock ,blank 
+3e56 20203251 branch app_put_lpm_wake_lock 
+
+mouse_delay_enter_hibernata:
+3e57 6fe0c906 fetch 1 ,mem_mouse_direct_timeout 
+3e58 67e0cad5 store 1 ,mem_mouse_bluetooth_reconnect_timeout 
+3e59 20600000 rtn 
+
+mouse_app_enter_hibernate:
+3e5a 44e34018 bpatch patch18_6 ,mem_patch18 
+3e5b 20404272 call mouse_sensor_reset 
+3e5c 2040427c call mouse_sensor_powerdown 
+3e5d 20203289 branch app_enter_hibernate 
+
+mouse_before_hibernate:
+3e5e 44e3c018 bpatch patch18_7 ,mem_patch18 
+3e5f 6ff20138 fetch 4 ,core_lpm_ctrl 
+3e60 79207e1a set1 26 ,pdata 
+3e61 67f2004c store 4 ,core_lpm_reg 
+3e62 2040154c call lpm_write_ctrl 
+3e63 20406e62 call disable_authrom 
+3e64 2040495b call mouse_device_led_all_off 
+3e65 20404055 call mouse_before_hibernate_wheel_gpio_set 
+3e66 20403e6a call mouse_setgpio_hibernate 
+3e67 2040466d call mouse_flash_power_down 
+3e68 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+3e69 202060e6 branch gpio_clr_wake 
+
+mouse_setgpio_hibernate:
+3e6a 44e44019 bpatch patch19_0 ,mem_patch19 
+3e6b 20404329 call mouse_set_sdio_high 
+3e6c 20407f52 call clear_wake 
+3e6d 20403e80 call mouse_lpm_before_common 
+3e6e 20403e72 call mouse_gpio_pu_idle 
+3e6f 6848c91b fetcht 1 ,mem_mouse_reuse_2ice_gpio 
+3e70 20403f96 call mouse_gpio_config_input_pu 
+3e71 20203f98 branch mouse_gpio_set_high_impedance 
+
+mouse_gpio_pu_idle:
+3e72 d8c08070 arg core_gpio_conf ,contr 
+3e73 df200013 arg 19 ,loopcnt 
+
+mouse_gpio_pu_idle_loop:
+3e74 efe08006 ifetch 1 ,contr 
+3e75 243a3e79 nbranch mouse_gpio_pu_idle_configured ,blank 
+3e76 58000040 setarg 0x40 
+3e77 18c08bff add contr ,-1 ,contw 
+3e78 e7e08005 istore 1 ,contw 
+
+mouse_gpio_pu_idle_configured:
+3e79 c2003e74 loop mouse_gpio_pu_idle_loop 
+3e7a 20600000 rtn 
+
+mouse_process_lpm_before:
+3e7b c6130000 rtnmark1 mark_24g 
+3e7c 20403e80 call mouse_lpm_before_common 
+3e7d 6fe0809d fetch 1 ,mem_lpm_current_mult 
+3e7e 247a0000 nrtn blank 
+3e7f 202060e6 branch gpio_clr_wake 
+
+mouse_lpm_before_common:
+3e80 44e4c019 bpatch patch19_1 ,mem_patch19 
+3e81 20403fc8 call mouse_wheel_check 
+3e82 6fe0c923 fetch 1 ,mem_mouse_sensor_sclk_gpio 
+3e83 d840003f arg gpcfg_output_high ,temp 
+3e84 2040612c call gpio_config_function_int 
+3e85 20405b62 call twspi_disable 
+3e86 6848c91c fetcht 1 ,mem_lbutton_gpio 
+3e87 204060da call gpio_set_wake 
+3e88 6848c91d fetcht 1 ,mem_rbutton_gpio 
+3e89 204060da call gpio_set_wake 
+3e8a 6848c91e fetcht 1 ,mem_mbutton_gpio 
+3e8b 204060da call gpio_set_wake 
+3e8c 6848c911 fetcht 1 ,mem_bk_button_gpio 
+3e8d 204060da call gpio_set_wake 
+3e8e 6848c912 fetcht 1 ,mem_fw_button_gpio 
+3e8f 204060da call gpio_set_wake 
+3e90 6848c913 fetcht 1 ,mem_dpi_button_gpio 
+3e91 204060da call gpio_set_wake 
+3e92 6848c91f fetcht 1 ,mem_config_select_device_button_gpio 
+3e93 204060da call gpio_set_wake 
+3e94 6848c916 fetcht 1 ,mem_customer_key_gpio 
+3e95 204060da call gpio_set_wake 
+3e96 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+3e97 204060d6 call gpio_set_wake_by_current_state 
+3e98 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+3e99 204060d6 call gpio_set_wake_by_current_state 
+3e9a 6848c920 fetcht 1 ,mem_whee_ta_data_gpio 
+3e9b 204060d6 call gpio_set_wake_by_current_state 
+3e9c 6848c921 fetcht 1 ,mem_whee_tb_data_gpio 
+3e9d 204060d6 call gpio_set_wake_by_current_state 
+3e9e 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+3e9f 202060da branch gpio_set_wake 
+
+mouse_set_mult:
+3ea0 6fe1478f fetch 2 ,mem_ui_state_map 
+3ea1 c284bea5 bbit1 ui_state_ble_connected ,mouse_set_ble_mult 
+3ea2 6fe1478f fetch 2 ,mem_ui_state_map 
+3ea3 c2803ea8 bbit1 ui_state_bt_connected ,mouse_set_bt_mult 
+3ea4 20600000 rtn 
+
+mouse_set_ble_mult:
+3ea5 1a227e00 copy rega ,pdata 
+3ea6 243a1ad2 nbranch le_set_config_short_mult ,blank 
+3ea7 20201ad4 branch le_clr_config_short_mult 
+
+mouse_set_bt_mult:
+3ea8 1a227e00 copy rega ,pdata 
+3ea9 243a150e nbranch classic_bt_set_mult_short_flag ,blank 
+3eaa 20201510 branch classic_bt_clr_mult_short_flag 
+
+mouse_adc_gpio_set:
+3eab 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+3eac c1810000 rtnne adc_config_gpio 
+
+mouse_adc_gpio_check_output:
+3ead 44e54019 bpatch patch19_2 ,mem_patch19 
+3eae 6848c4a3 fetcht 1 ,mem_adc_channel 
+3eaf 18467c03 sub temp ,3 ,null 
+3eb0 20213eb9 branch mouse_adc_gpio_4_7_set ,positive 
+3eb1 18408405 increase 5 ,temp 
+3eb2 6048c900 storet 1 ,mem_adc_channel_gpio 
+
+mouse_adc_gpio_set_next:
+3eb3 18422200 copy temp ,rega 
+3eb4 20406131 call gpio_get_config 
+3eb5 c01fc9a1 beq gpcfg_output_high ,mouse_set_24g_led_statue 
+3eb6 2040499f call mouse_clear_24g_led_statue 
+3eb7 1a220400 copy rega ,temp 
+3eb8 20206121 branch gpio_set_high_impedance 
+
+mouse_adc_gpio_4_7_set:
+3eb9 18408404 increase 4 ,temp 
+3eba 6048c900 storet 1 ,mem_adc_channel_gpio 
+3ebb 20203eb3 branch mouse_adc_gpio_set_next 
+
+mouse_adc_vol_init:
+3ebc 6fe0c901 fetch 1 ,mem_adc_config_flag_init 
+3ebd c0013ec5 beq adc_config_gpio ,mouse_adc_gpio_vol_init 
+3ebe c0003eca beq adc_config_vinlpm ,mouse_adc_gpio_vinlpm_init 
+3ebf 70490100 jam adc_config_vinlpm ,mem_adc_config_flag_init 
+3ec0 582c0172 setarg 0x2c0172 
+3ec1 67e1c8e7 store 3 ,mem_mouse_vdd_full_vol 
+3ec2 58014001 setarg 0x014001 
+3ec3 e7e18005 istore 3 ,contw 
+3ec4 20600000 rtn 
+
+mouse_adc_gpio_vol_init:
+3ec5 585d0099 setarg 0x5d0099 
+3ec6 67e1c8e7 store 3 ,mem_mouse_vdd_full_vol 
+3ec7 58007100 setarg 0x007100 
+3ec8 e7e18005 istore 3 ,contw 
+3ec9 20600000 rtn 
+
+mouse_adc_gpio_vinlpm_init:
+3eca 58c8012c setarg 0xc8012c 
+3ecb 67e1c8e7 store 3 ,mem_mouse_vdd_full_vol 
+3ecc 5800dc00 setarg 0x00dc00 
+3ecd e7e18005 istore 3 ,contw 
+3ece 20600000 rtn 
+
+mouse_adc_gpio_mux_init:
+3ecf 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3ed0 c40a0000 rtnbit0 mouse_enable_adc 
+3ed1 7048f901 jam mouse_adc_check_multiple ,mem_adc_mux_status 
+3ed2 c3970000 rtnbit1 mouse_enable_dpi_key_connect_adc 
+3ed3 c3958000 rtnbit1 mouse_enable_select_device_by_switch_adc 
+3ed4 7048f900 jam mouse_adc_check_battery_only ,mem_adc_mux_status 
+3ed5 20600000 rtn 
+
+mouse_adc_read_interval:
+3ed6 6fe0c8fa fetch 1 ,mem_adc_read_timer 
+3ed7 1fe0fe01 increase 1 ,pdata 
+3ed8 67e0c8fa store 1 ,mem_adc_read_timer 
+3ed9 6848c8fb fetcht 1 ,mem_adc_read_time_init 
+3eda 98467c00 isub temp ,null 
+3edb 20600000 rtn 
+
+mouse_adc_read:
+3edc 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3edd c40a0000 rtnbit0 mouse_enable_adc 
+3ede 20403eab call mouse_adc_gpio_set 
+3edf 6fe0c8f9 fetch 1 ,mem_adc_mux_status 
+3ee0 203a3ef3 branch mouse_adc_read_battery ,blank 
+3ee1 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+3ee2 c0013ee8 beq adc_config_gpio ,mouse_adc_read_gpio_mux_start 
+3ee3 7048f903 jam mouse_adc_check_vinlpm_multiple ,mem_adc_mux_status 
+3ee4 20403ed6 call mouse_adc_read_interval 
+3ee5 20213eea branch mouse_adc_read_gpio ,positive 
+3ee6 20403eef call mouse_adc_read_vinlpm 
+3ee7 20203ef9 branch mouse_adc_read_start 
+
+mouse_adc_read_gpio_mux_start:
+3ee8 7048f902 jam mouse_adc_check_gpio_multiple ,mem_adc_mux_status 
+3ee9 20203ef9 branch mouse_adc_read_start 
+
+mouse_adc_read_gpio:
+3eea 20403ead call mouse_adc_gpio_check_output 
+3eeb 7044a202 jam adc_config_gpio ,mem_adc_config_flag 
+3eec 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
+3eed 245a3eef ncall mouse_adc_read_vinlpm ,blank 
+3eee 20203ef9 branch mouse_adc_read_start 
+
+mouse_adc_read_vinlpm:
+3eef 7048fa00 jam 0 ,mem_adc_read_timer 
+3ef0 6fe0c901 fetch 1 ,mem_adc_config_flag_init 
+3ef1 67e0c4a2 store 1 ,mem_adc_config_flag 
+3ef2 20600000 rtn 
+
+mouse_adc_read_battery:
+3ef3 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+3ef4 c0813ef7 bne adc_config_gpio ,mouse_adc_read_battery_start 
+3ef5 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
+3ef6 247a0000 nrtn blank 
+
+mouse_adc_read_battery_start:
+3ef7 20403ed6 call mouse_adc_read_interval 
+3ef8 24610000 nrtn positive 
+
+mouse_adc_read_start:
+3ef9 44e5c019 bpatch patch19_3 ,mem_patch19 
+3efa 6fe0cbbb fetch 1 ,mem_24g_device_led_status 
+3efb 247a0000 nrtn blank 
+3efc 7048fa00 jam 0 ,mem_adc_read_timer 
+3efd 20406166 call enable_adc 
+3efe 2040618d call vdd_calculate_by_mode 
+3eff 67e148ed store 2 ,mem_mouse_vdd_now_vol 
+3f00 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+3f01 c0813f08 bne adc_config_gpio ,mouse_adc_data_process 
+3f02 684948ed fetcht 2 ,mem_mouse_vdd_now_vol 
+3f03 184ffe08 mul32 temp ,8 ,pdata 
+3f04 1fe6fc0a div pdata ,10 
+3f05 20407e61 call get_div_result 
+3f06 9840fe00 iadd temp ,pdata 
+3f07 67e148ed store 2 ,mem_mouse_vdd_now_vol 
+
+mouse_adc_data_process:
+3f08 da2048e7 arg mem_mouse_vdd_calculate_set ,rega 
+3f09 20403f1a call mouse_adc_bat_percent_lowpower_out 
+3f0a 6fe0c4a6 fetch 1 ,mem_adc_power_flag 
+3f0b c2813f5c bbit1 2 ,mouse_adc_button_press 
+3f0c c280bf5e bbit1 1 ,mouse_power_down 
+3f0d c3003f12 bbit0 0 ,mouse_adc_no_low_voltage 
+3f0e 7048fe01 jam 1 ,mem_mouse_adc_last_low_voltage_flag 
+3f0f 20203f10 branch mouse_adc_low_voltage 
+
+mouse_adc_low_voltage:
+3f10 d8e00004 arg mouse_low_voltage_flag ,queue 
+3f11 2020472e branch mouse_enable_function_flag 
+
+mouse_adc_no_low_voltage:
+3f12 d8e00004 arg mouse_low_voltage_flag ,queue 
+3f13 20404732 call mouse_disable_function_flag 
+3f14 7048fc0c jam 12 ,mem_adc_low_volatage_led_timer_count 
+3f15 6fe0c8fe fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
+3f16 207a0000 rtn blank 
+3f17 7048fe00 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
+3f18 6848c925 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+3f19 20204978 branch mouse_led_off 
+
+mouse_adc_bat_percent_lowpower_out:
+3f1a 44e64019 bpatch patch19_4 ,mem_patch19 
+3f1b efe40011 ifetch 8 ,rega 
+3f1c 67e4095c store 8 ,mem_pdatatemp 
+3f1d 6fe0c8f9 fetch 1 ,mem_adc_mux_status 
+3f1e c0003f32 beq mouse_adc_check_battery_only ,mouse_adc_bat_percent_lowpower_out_battery 
+3f1f c0013f21 beq mouse_adc_check_gpio_multiple ,mouse_adc_bat_percent_lowpower_out_gpio_multiple 
+3f20 c001bf51 beq mouse_adc_check_vinlpm_multiple ,mouse_adc_bat_percent_lowpower_out_vinlpm_multiple 
+
+mouse_adc_bat_percent_lowpower_out_gpio_multiple:
+3f21 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3f22 c3173f27 bbit0 mouse_enable_dpi_key_connect_adc ,mouse_adc_bat_percent_lowpower_out_gpio_switch 
+3f23 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3f24 684948ef fetcht 2 ,mem_mouse_vdd_button_press_vol 
+3f25 98467c00 isub temp ,null 
+3f26 24213f54 nbranch mouse_adc_set_button_press_flag ,positive 
+
+mouse_adc_bat_percent_lowpower_out_gpio_switch:
+3f27 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+3f28 c315bf32 bbit0 mouse_enable_select_device_by_switch_adc ,mouse_adc_bat_percent_lowpower_out_battery 
+3f29 7048ff00 jam 0 ,mem_mouse_adc_button_press_flag 
+3f2a 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3f2b 684948f1 fetcht 2 ,mem_mouse_vdd_switch_gnd_24g_vol 
+3f2c 98467c00 isub temp ,null 
+3f2d 24213f30 nbranch mouse_select_24gdevice ,positive 
+3f2e 204046e7 call mouse_select_btdevice 
+3f2f 20203f32 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_select_24gdevice:
+3f30 204046eb call mouse_check_select_24gdevice 
+3f31 20203f32 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_adc_bat_percent_lowpower_out_battery:
+3f32 20403f58 call mouse_adc_clear_button_press_flag 
+3f33 204061d6 call adc_clear_no_power_flag 
+3f34 204061ce call adc_clear_low_power_flag 
+3f35 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3f36 6849095e fetcht 2 ,mem_pdatatemp + 2 
+3f37 98467c00 isub temp ,null 
+3f38 244161d2 ncall adc_set_no_power_flag ,positive 
+3f39 68490960 fetcht 2 ,mem_pdatatemp + 4 
+3f3a 98467c00 isub temp ,null 
+3f3b 244161ca ncall adc_set_low_power_flag ,positive 
+
+mouse_adc_bat_level_set:
+3f3c 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3f3d 6849095c fetcht 2 ,mem_pdatatemp 
+3f3e 98467c00 isub temp ,null 
+3f3f 20213f4d branch mouse_adc_bat_level_100_percent ,positive 
+3f40 6849095e fetcht 2 ,mem_pdatatemp + 2 
+3f41 98467e00 isub temp ,pdata 
+3f42 24213f4f nbranch mouse_adc_bat_level_0_percent ,positive 
+3f43 203a3f4f branch mouse_adc_bat_level_0_percent ,blank 
+3f44 1fefa264 mul32 pdata ,100 ,rega 
+3f45 6fe1095c fetch 2 ,mem_pdatatemp 
+3f46 6849095e fetcht 2 ,mem_pdatatemp + 2 
+3f47 98460400 isub temp ,temp 
+3f48 1a227e00 copy rega ,pdata 
+3f49 9846fc00 idiv temp 
+3f4a 20407e61 call get_div_result 
+3f4b 67e0cb00 store 1 ,mem_le_battery_level_percentage 
+3f4c 20600000 rtn 
+
+mouse_adc_bat_level_100_percent:
+3f4d 704b0064 jam 100 ,mem_le_battery_level_percentage 
+3f4e 20600000 rtn 
+
+mouse_adc_bat_level_0_percent:
+3f4f 704b0000 jam 0 ,mem_le_battery_level_percentage 
+3f50 20600000 rtn 
+
+mouse_adc_bat_percent_lowpower_out_vinlpm_multiple:
+3f51 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+3f52 c0013f21 beq adc_config_gpio ,mouse_adc_bat_percent_lowpower_out_gpio_multiple 
+3f53 20203f32 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_adc_set_button_press_flag:
+3f54 6848c4a6 fetcht 1 ,mem_adc_power_flag 
+3f55 79200402 set1 2 ,temp 
+3f56 6048c4a6 storet 1 ,mem_adc_power_flag 
+3f57 20600000 rtn 
+
+mouse_adc_clear_button_press_flag:
+3f58 6848c4a6 fetcht 1 ,mem_adc_power_flag 
+3f59 793f8402 set0 2 ,temp 
+3f5a 6048c4a6 storet 1 ,mem_adc_power_flag 
+3f5b 20600000 rtn 
+
+mouse_adc_button_press:
+3f5c 7048ff01 jam 1 ,mem_mouse_adc_button_press_flag 
+3f5d 20600000 rtn 
+
+mouse_power_down:
+3f5e 2040495b call mouse_device_led_all_off 
+3f5f 20203e5a branch mouse_app_enter_hibernate 
+
+mouse_gpio_init:
+3f60 6848c4c3 fetcht 1 ,mem_eeprom_wp_gpio 
+3f61 2040610d call gpio_config_output 
+3f62 20407a1f call usb_offline_check_init 
+3f63 6848c91c fetcht 1 ,mem_lbutton_gpio 
+3f64 20403f96 call mouse_gpio_config_input_pu 
+3f65 6848c91d fetcht 1 ,mem_rbutton_gpio 
+3f66 20403f96 call mouse_gpio_config_input_pu 
+3f67 6848c91e fetcht 1 ,mem_mbutton_gpio 
+3f68 20403f96 call mouse_gpio_config_input_pu 
+3f69 6848c911 fetcht 1 ,mem_bk_button_gpio 
+3f6a 20403f96 call mouse_gpio_config_input_pu 
+3f6b 6848c912 fetcht 1 ,mem_fw_button_gpio 
+3f6c 20403f96 call mouse_gpio_config_input_pu 
+3f6d 6848c913 fetcht 1 ,mem_dpi_button_gpio 
+3f6e 20403f96 call mouse_gpio_config_input_pu 
+3f6f 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+3f70 20403f96 call mouse_gpio_config_input_pu 
+3f71 6848c91f fetcht 1 ,mem_config_select_device_button_gpio 
+3f72 20403f96 call mouse_gpio_config_input_pu 
+3f73 6848c916 fetcht 1 ,mem_customer_key_gpio 
+3f74 20403f96 call mouse_gpio_config_input_pu 
+3f75 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+3f76 20403f96 call mouse_gpio_config_input_pu 
+3f77 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+3f78 20403f96 call mouse_gpio_config_input_pu 
+3f79 6848c920 fetcht 1 ,mem_whee_ta_data_gpio 
+3f7a 20403f96 call mouse_gpio_config_input_pu 
+3f7b 6848c921 fetcht 1 ,mem_whee_tb_data_gpio 
+3f7c 20403f96 call mouse_gpio_config_input_pu 
+3f7d 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+3f7e 20403f96 call mouse_gpio_config_input_pu 
+3f7f 6848c922 fetcht 1 ,mem_device_switch_gpio 
+3f80 20403f96 call mouse_gpio_config_input_pu 
+3f81 6848c925 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+3f82 2040610d call gpio_config_output 
+3f83 6848c919 fetcht 1 ,mem_config_device_24g_led_gpio 
+3f84 2040610d call gpio_config_output 
+3f85 6848c926 fetcht 1 ,mem_config_device_bt1_led_gpio 
+3f86 2040610d call gpio_config_output 
+3f87 6848c927 fetcht 1 ,mem_config_device_bt2_led_gpio 
+3f88 2040610d call gpio_config_output 
+3f89 6848c928 fetcht 1 ,mem_dpi_led_gpio 
+3f8a 2040610d call gpio_config_output 
+3f8b 6848c91a fetcht 1 ,mem_select_sensor_angle_gpio 
+3f8c 20203f96 branch mouse_gpio_config_input_pu 
+
+mouse_gpio_set_pupd_by_input:
+3f8d 18467cff sub temp ,ui_button_gpio_disable ,null 
+3f8e 20628000 rtn zero 
+3f8f 18410e7f and temp ,0x7f ,queue 
+3f90 6ff2011c fetch 4 ,core_gpio_in 
+3f91 afefffff qisolate1 pdata 
+3f92 2020bf96 branch mouse_gpio_config_input_pu ,true 
+3f93 20203f94 branch mouse_gpio_config_input_pd 
+
+mouse_gpio_config_input_pd:
+3f94 79200407 set1 gpio_active_bit ,temp 
+3f95 202060f4 branch gpio_config_input 
+
+mouse_gpio_config_input_pu:
+3f96 793f8407 set0 gpio_active_bit ,temp 
+3f97 202060f4 branch gpio_config_input 
+
+mouse_gpio_set_high_impedance:
+3f98 6fe1cbef fetch 3 ,mem_mouse_set_high_impedance_bit_set 
+3f99 67e1895c store 3 ,mem_pdatatemp 
+3f9a df200014 arg 20 ,loopcnt 
+3f9b d8400000 arg 0 ,temp 
+
+mouse_gpio_set_high_impedance_bit_loop:
+3f9c 6fe1895c fetch 3 ,mem_pdatatemp 
+3f9d 2feffe00 isolate1 0 ,pdata 
+3f9e 2040e121 call gpio_set_high_impedance ,true 
+3f9f 6fe1895c fetch 3 ,mem_pdatatemp 
+3fa0 1fe3fe00 lshift pdata ,pdata 
+3fa1 67e1895c store 3 ,mem_pdatatemp 
+3fa2 18408401 increase 1 ,temp 
+3fa3 c2003f9c loop mouse_gpio_set_high_impedance_bit_loop 
+3fa4 20600000 rtn 
+
+mouse_sensor_spi_init:
+3fa5 20403faa call mouse_spid_init_pin 
+3fa6 70448673 jam 0x73 ,mem_spi_init_clk 
+3fa7 20403fa9 call mouse_spi_init 
+3fa8 20205b66 branch twspi_enable 
+
+mouse_spi_write_flash_cb:
+
+mouse_spi_init:
+3fa9 20205d54 branch spid_init 
+
+mouse_spid_init_pin:
+3faa 6fe0c923 fetch 1 ,mem_mouse_sensor_sclk_gpio 
+3fab d8400021 arg gpcfg_spid_sck ,temp 
+3fac 2040612c call gpio_config_function_int 
+3fad 6fe0c924 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+3fae d8400023 arg gpcfg_spid_sdio ,temp 
+3faf 2020612c branch gpio_config_function_int 
+
+mouse_motion:
+3fb0 44e6c019 bpatch patch19_5 ,mem_patch19 
+3fb1 78547c00 disable user 
+3fb2 58000000 setarg 0 
+3fb3 67e348d5 store 6 ,mem_mouse_x 
+3fb4 20404280 call mouse_check_sensor_data 
+3fb5 20403fbe call mouse_zwheel 
+3fb6 20403fc3 call mouse_t_zwheel 
+3fb7 2040411c call mouse_key 
+3fb8 6fe0c8d4 fetch 1 ,mem_mouse_key 
+3fb9 1fe17e1f and_into 0x1f ,pdata 
+3fba 67e0c8d4 store 1 ,mem_mouse_key 
+3fbb 24344766 nbranch mouse_drawing_optima_init ,user 
+3fbc 20404758 call mouse_drawing_optima 
+3fbd 20204584 branch mouse_no_data_timer_init 
+
+mouse_zwheel:
+3fbe 6fe0c8e4 fetch 1 ,mem_mouse_z_data 
+3fbf 207a0000 rtn blank 
+3fc0 67e0c8d9 store 1 ,mem_mouse_z 
+3fc1 7048e400 jam 0 ,mem_mouse_z_data 
+3fc2 20207ec5 branch enable_user 
+
+mouse_t_zwheel:
+3fc3 6fe0c8e0 fetch 1 ,mem_mouse_tz_data 
+3fc4 207a0000 rtn blank 
+3fc5 67e0c8da store 1 ,mem_mouse_tz 
+3fc6 7048e000 jam 0 ,mem_mouse_tz_data 
+3fc7 20207ec5 branch enable_user 
+
+mouse_wheel_check:
+3fc8 20403fd5 call mouse_t_wheel_scan 
+3fc9 20404011 call mouse_wheel_scan 
+3fca 6fe0c8de fetch 1 ,mem_wheel_tb_new_pinlevel 
+3fcb 6848c8dd fetcht 1 ,mem_wheel_tb_old_pinlevel 
+3fcc 67e0c8dd store 1 ,mem_wheel_tb_old_pinlevel 
+3fcd 98467c00 isub temp ,null 
+3fce 2422b253 nbranch app_lpm_wake_auto_lock ,zero 
+3fcf 6fe0c8e2 fetch 1 ,mem_mwheel_b_new_pinlevel 
+3fd0 6848c8e1 fetcht 1 ,mem_mwheel_b_old_pinlevel 
+3fd1 67e0c8e1 store 1 ,mem_mwheel_b_old_pinlevel 
+3fd2 98467c00 isub temp ,null 
+3fd3 2422b253 nbranch app_lpm_wake_auto_lock ,zero 
+3fd4 20600000 rtn 
+
+mouse_t_wheel_scan:
+3fd5 6fe0c920 fetch 1 ,mem_whee_ta_data_gpio 
+3fd6 c17f8000 rtneq gpio_disable 
+3fd7 da200000 arg 0 ,rega 
+3fd8 6848c920 fetcht 1 ,mem_whee_ta_data_gpio 
+3fd9 204060fd call gpio_get_bit 
+3fda 7920a200 setflag true ,0 ,rega 
+3fdb 6848c921 fetcht 1 ,mem_whee_tb_data_gpio 
+3fdc 204060fd call gpio_get_bit 
+3fdd 7920a201 setflag true ,1 ,rega 
+3fde 1a227e00 copy rega ,pdata 
+3fdf 67e0c8de store 1 ,mem_wheel_tb_new_pinlevel 
+3fe0 c000bfe5 beq 0x01 ,mouse_t_wheel_scan_judge1 
+3fe1 c0013fe9 beq 0x02 ,mouse_t_wheel_scan_judge2 
+3fe2 6fe0c8df fetch 1 ,mem_wheel_tog 
+3fe3 c283bff5 bbit1 7 ,mouse_t_wheel_scan_judge3 
+3fe4 20600000 rtn 
+
+mouse_t_wheel_scan_judge1:
+3fe5 6fe0c8dd fetch 1 ,mem_wheel_tb_old_pinlevel 
+3fe6 c0003fed beq 0 ,mouse_t_wheel_scan_judge11 
+3fe7 c001bfef beq 3 ,mouse_t_wheel_scan_judge12 
+3fe8 20600000 rtn 
+
+mouse_t_wheel_scan_judge2:
+3fe9 6fe0c8dd fetch 1 ,mem_wheel_tb_old_pinlevel 
+3fea c0003ff1 beq 0 ,mouse_t_wheel_scan_judge21 
+3feb c001bff3 beq 3 ,mouse_t_wheel_scan_judge22 
+3fec 20600000 rtn 
+
+mouse_t_wheel_scan_judge11:
+3fed 7048df82 jam 0x82 ,mem_wheel_tog 
+3fee 20600000 rtn 
+
+mouse_t_wheel_scan_judge12:
+3fef 7048df81 jam 0x81 ,mem_wheel_tog 
+3ff0 20600000 rtn 
+
+mouse_t_wheel_scan_judge21:
+3ff1 7048df80 jam 0x80 ,mem_wheel_tog 
+3ff2 20600000 rtn 
+
+mouse_t_wheel_scan_judge22:
+3ff3 7048df83 jam 0x83 ,mem_wheel_tog 
+3ff4 20600000 rtn 
+
+mouse_t_wheel_scan_judge3:
+3ff5 6fe0c8df fetch 1 ,mem_wheel_tog 
+3ff6 793ffe07 set0 7 ,pdata 
+3ff7 67e0c8df store 1 ,mem_wheel_tog 
+3ff8 c0003ffd beq 0 ,mouse_t_wheel_scan_judge30 
+3ff9 c000c000 beq 1 ,mouse_t_wheel_scan_judge31 
+3ffa c0014003 beq 2 ,mouse_t_wheel_scan_judge32 
+3ffb c001c006 beq 3 ,mouse_t_wheel_scan_judge33 
+3ffc 20600000 rtn 
+
+mouse_t_wheel_scan_judge30:
+3ffd 6fe0c8de fetch 1 ,mem_wheel_tb_new_pinlevel 
+3ffe c001c009 beq 3 ,mouse_wheel_t_forward 
+3fff 20600000 rtn 
+
+mouse_t_wheel_scan_judge31:
+4000 6fe0c8de fetch 1 ,mem_wheel_tb_new_pinlevel 
+4001 c0004009 beq 0 ,mouse_wheel_t_forward 
+4002 20600000 rtn 
+
+mouse_t_wheel_scan_judge32:
+4003 6fe0c8de fetch 1 ,mem_wheel_tb_new_pinlevel 
+4004 c001c00d beq 3 ,mouse_wheel_t_back 
+4005 20600000 rtn 
+
+mouse_t_wheel_scan_judge33:
+4006 6fe0c8de fetch 1 ,mem_wheel_tb_new_pinlevel 
+4007 c000400d beq 0 ,mouse_wheel_t_back 
+4008 20600000 rtn 
+
+mouse_wheel_t_forward:
+4009 6fe0c8e0 fetch 1 ,mem_mouse_tz_data 
+400a 1fe0fe01 increase 1 ,pdata 
+400b 67e0c8e0 store 1 ,mem_mouse_tz_data 
+400c 20600000 rtn 
+
+mouse_wheel_t_back:
+400d 6fe0c8e0 fetch 1 ,mem_mouse_tz_data 
+400e 1fe0ffff increase -1 ,pdata 
+400f 67e0c8e0 store 1 ,mem_mouse_tz_data 
+4010 20600000 rtn 
+
+mouse_wheel_scan:
+4011 6fe0c917 fetch 1 ,mem_whee_a_data_gpio 
+4012 c17f8000 rtneq gpio_disable 
+4013 da200000 arg 0 ,rega 
+4014 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+4015 204060fd call gpio_get_bit 
+4016 7920a200 setflag true ,0 ,rega 
+4017 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+4018 204060fd call gpio_get_bit 
+4019 7920a201 setflag true ,1 ,rega 
+401a 1a227e00 copy rega ,pdata 
+401b 67e0c8e2 store 1 ,mem_mwheel_b_new_pinlevel 
+401c c000c021 beq 0x01 ,mouse_wheel_scan_judge1 
+401d c0014025 beq 0x02 ,mouse_wheel_scan_judge2 
+401e 6fe0c8e3 fetch 1 ,mem_mwheel_tog 
+401f c283c031 bbit1 7 ,mouse_wheel_scan_judge3 
+4020 20600000 rtn 
+
+mouse_wheel_scan_judge1:
+4021 6fe0c8e1 fetch 1 ,mem_mwheel_b_old_pinlevel 
+4022 c0004029 beq 0 ,mouse_wheel_scan_judge11 
+4023 c001c02b beq 3 ,mouse_wheel_scan_judge12 
+4024 20600000 rtn 
+
+mouse_wheel_scan_judge2:
+4025 6fe0c8e1 fetch 1 ,mem_mwheel_b_old_pinlevel 
+4026 c000402d beq 0 ,mouse_wheel_scan_judge21 
+4027 c001c02f beq 3 ,mouse_wheel_scan_judge22 
+4028 20600000 rtn 
+
+mouse_wheel_scan_judge11:
+4029 7048e382 jam 0x82 ,mem_mwheel_tog 
+402a 20600000 rtn 
+
+mouse_wheel_scan_judge12:
+402b 7048e381 jam 0x81 ,mem_mwheel_tog 
+402c 20600000 rtn 
+
+mouse_wheel_scan_judge21:
+402d 7048e380 jam 0x80 ,mem_mwheel_tog 
+402e 20600000 rtn 
+
+mouse_wheel_scan_judge22:
+402f 7048e383 jam 0x83 ,mem_mwheel_tog 
+4030 20600000 rtn 
+
+mouse_wheel_scan_judge3:
+4031 6fe0c8e3 fetch 1 ,mem_mwheel_tog 
+4032 793ffe07 set0 7 ,pdata 
+4033 67e0c8e3 store 1 ,mem_mwheel_tog 
+4034 c0004039 beq 0 ,mouse_wheel_scan_judge30 
+4035 c000c03c beq 1 ,mouse_wheel_scan_judge31 
+4036 c001403f beq 2 ,mouse_wheel_scan_judge32 
+4037 c001c042 beq 3 ,mouse_wheel_scan_judge33 
+4038 20600000 rtn 
+
+mouse_wheel_scan_judge30:
+4039 6fe0c8e2 fetch 1 ,mem_mwheel_b_new_pinlevel 
+403a c001c045 beq 3 ,mouse_wheel_forward 
+403b 20600000 rtn 
+
+mouse_wheel_scan_judge31:
+403c 6fe0c8e2 fetch 1 ,mem_mwheel_b_new_pinlevel 
+403d c0004045 beq 0 ,mouse_wheel_forward 
+403e 20600000 rtn 
+
+mouse_wheel_scan_judge32:
+403f 6fe0c8e2 fetch 1 ,mem_mwheel_b_new_pinlevel 
+4040 c001c049 beq 3 ,mouse_wheel_back 
+4041 20600000 rtn 
+
+mouse_wheel_scan_judge33:
+4042 6fe0c8e2 fetch 1 ,mem_mwheel_b_new_pinlevel 
+4043 c0004049 beq 0 ,mouse_wheel_back 
+4044 20600000 rtn 
+
+mouse_wheel_forward:
+4045 6fe0c8e4 fetch 1 ,mem_mouse_z_data 
+4046 1fe0fe01 increase 1 ,pdata 
+4047 67e0c8e4 store 1 ,mem_mouse_z_data 
+4048 20600000 rtn 
+
+mouse_wheel_back:
+4049 6fe0c8e4 fetch 1 ,mem_mouse_z_data 
+404a 1fe0ffff increase -1 ,pdata 
+404b 67e0c8e4 store 1 ,mem_mouse_z_data 
+404c 20600000 rtn 
+
+mouse_wheel_gpio_set_wake:
+404d 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+404e 204060d6 call gpio_set_wake_by_current_state 
+404f 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+4050 204060d6 call gpio_set_wake_by_current_state 
+4051 6848c920 fetcht 1 ,mem_whee_ta_data_gpio 
+4052 204060d6 call gpio_set_wake_by_current_state 
+4053 6848c921 fetcht 1 ,mem_whee_tb_data_gpio 
+4054 202060d6 branch gpio_set_wake_by_current_state 
+
+mouse_before_hibernate_wheel_gpio_set:
+4055 6848c917 fetcht 1 ,mem_whee_a_data_gpio 
+4056 20403f8d call mouse_gpio_set_pupd_by_input 
+4057 6848c918 fetcht 1 ,mem_whee_b_data_gpio 
+4058 20403f8d call mouse_gpio_set_pupd_by_input 
+4059 6848c920 fetcht 1 ,mem_whee_ta_data_gpio 
+405a 20403f8d call mouse_gpio_set_pupd_by_input 
+405b 6848c921 fetcht 1 ,mem_whee_tb_data_gpio 
+405c 20203f8d branch mouse_gpio_set_pupd_by_input 
+
+mouse_wheel_trigger:
+405d 6fe148d9 fetch 2 ,mem_mouse_z 
+405e 207a0000 rtn blank 
+405f 7048e501 jam 1 ,mem_mouse_wheel_trigger 
+4060 7048e60a jam 10 ,mem_mouse_wheel_trigger_timer 
+4061 20600000 rtn 
+
+mouse_wheel_trigger_timer:
+4062 da6048e6 arg mem_mouse_wheel_trigger_timer ,regc 
+4063 da404065 arg mouse_wheel_trigger_disable ,regb 
+4064 202031fc branch timer_single_step 
+
+mouse_wheel_trigger_disable:
+4065 7048e500 jam 0 ,mem_mouse_wheel_trigger 
+4066 20600000 rtn 
+
+mouse_dpi_check:
+4067 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4068 c2974076 bbit1 mouse_enable_dpi_key_connect_adc ,mouse_dpi_check_connect_adc 
+4069 6fe0c913 fetch 1 ,mem_dpi_button_gpio 
+406a c17f8000 rtneq gpio_disable 
+406b da200000 arg 0 ,rega 
+406c 704ba705 jam mouse_dpi_key ,mem_mouse_key_temp 
+406d 6848c913 fetcht 1 ,mem_dpi_button_gpio 
+406e 20404079 call mouse_dpi_key_check 
+
+mouse_dpi_check_next:
+406f 67e0cba4 store 1 ,mem_mouse_dpikey_press_status 
+4070 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+4071 c07fc082 beq gpio_disable ,mouse_3io6key_dpi_check_end 
+4072 204041a8 call mouse_matrix_public_gpio_reset 
+
+mouse_dpi_check_exit:
+4073 1a227e00 copy rega ,pdata 
+4074 c282c092 bbit1 mouse_dpi_key ,mouse_dpi_down 
+4075 20204099 branch mouse_dpi_up 
+
+mouse_dpi_check_connect_adc:
+4076 6fe0c8ff fetch 1 ,mem_mouse_adc_button_press_flag 
+4077 203a4099 branch mouse_dpi_up ,blank 
+4078 20204092 branch mouse_dpi_down 
+
+mouse_dpi_key_check:
+4079 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+407a c2964088 bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
+407b 6fe0cba4 fetch 1 ,mem_mouse_dpikey_press_status 
+407c 1fe22600 copy pdata ,regc 
+407d 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+407e c07fc1d5 beq gpio_disable ,mouse_3io6key_check 
+
+mouse_dpi_key_check_next:
+407f 6fe0cbab fetch 1 ,mem_mouse_ghost_flag 
+4080 243a4085 nbranch mouse_dpi_check_end ,blank 
+4081 2020408a branch mouse_dpi_key_connect_matrix 
+
+mouse_3io6key_dpi_check_end:
+4082 6848c913 fetcht 1 ,mem_dpi_button_gpio 
+4083 20403f96 call mouse_gpio_config_input_pu 
+4084 20204073 branch mouse_dpi_check_exit 
+
+mouse_dpi_check_end:
+4085 7049e200 jam dpi_button_state_up ,mem_mouse_dpi_button_state 
+4086 704ba400 jam 0 ,mem_mouse_dpikey_press_status 
+4087 20600000 rtn 
+
+mouse_dpi_key_connect_gnd:
+4088 6fe0cba4 fetch 1 ,mem_mouse_dpikey_press_status 
+4089 202041c7 branch mouse_check_key_connect_gnd 
+
+mouse_dpi_key_connect_matrix:
+408a 204060fd call gpio_get_bit 
+408b 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+408c 2020c088 branch mouse_dpi_key_connect_gnd ,true 
+408d 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+408e 2040610d call gpio_out_active 
+408f 6848c913 fetcht 1 ,mem_dpi_button_gpio 
+4090 6fe0cba4 fetch 1 ,mem_mouse_dpikey_press_status 
+4091 202041c7 branch mouse_check_key_connect_gnd 
+
+mouse_dpi_down:
+4092 6fe0c9e2 fetch 1 ,mem_mouse_dpi_button_state 
+4093 c1008000 rtneq dpi_button_state_down 
+4094 7049e201 jam dpi_button_state_down ,mem_mouse_dpi_button_state 
+4095 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4096 c3940000 rtnbit1 mouse_enable_select_device_by_dpi_button 
+4097 c39b0000 rtnbit1 mouse_enable_dpi_key_long_press_disconvery 
+4098 202040a9 branch mouse_dpi_process 
+
+mouse_dpi_up:
+4099 6fe0c9e2 fetch 1 ,mem_mouse_dpi_button_state 
+409a c1000000 rtneq dpi_button_state_up 
+409b 7049e200 jam dpi_button_state_up ,mem_mouse_dpi_button_state 
+409c 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+409d c29440a0 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_dpi_up_next 
+409e c29b40a0 bbit1 mouse_enable_dpi_key_long_press_disconvery ,mouse_dpi_up_next 
+409f 20600000 rtn 
+
+mouse_dpi_up_next:
+40a0 6fe0c9e3 fetch 1 ,mem_mouse_dpi_long_press_flag 
+40a1 243a40a4 nbranch mouse_dpi_up_after_long_press ,blank 
+40a2 6fe0cbad fetch 1 ,mem_select_device_count 
+40a3 245a40a9 ncall mouse_dpi_process ,blank 
+
+mouse_dpi_up_after_long_press:
+40a4 7049e300 jam 0 ,mem_mouse_dpi_long_press_flag 
+40a5 6fe0c792 fetch 1 ,mem_ui_button_timeout 
+40a6 67e0cbad store 1 ,mem_select_device_count 
+40a7 67e0cbac store 1 ,mem_bt_discovery_count 
+40a8 20600000 rtn 
+
+mouse_dpi_process:
+40a9 44e74019 bpatch patch19_6 ,mem_patch19 
+40aa 204040b2 call mouse_dpi_ghost_check 
+40ab 20740000 rtn user 
+40ac 6fe0c997 fetch 1 ,mem_mouse_dpi 
+40ad 1fe0fe01 increase 1 ,pdata 
+40ae 1fe17e03 and pdata ,0x03 ,pdata 
+40af 67e0c997 store 1 ,mem_mouse_dpi 
+40b0 204040d5 call mouse_seting_dpi 
+40b1 2020462e branch mouse_store_device_info_delay 
+
+mouse_dpi_ghost_check:
+40b2 78547c00 disable user 
+40b3 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+40b4 c3960000 rtnbit1 mouse_enable_dpi_key_connect_gnd 
+40b5 c3970000 rtnbit1 mouse_enable_dpi_key_connect_adc 
+40b6 6fe0cb9f fetch 1 ,mem_mouse_lkey_press_status 
+40b7 207a0000 rtn blank 
+40b8 6fe0cba0 fetch 1 ,mem_mouse_rkey_press_status 
+40b9 207a0000 rtn blank 
+40ba 78347c00 enable user 
+40bb 20600000 rtn 
+
+mouse_dpi_key_check_long_press:
+40bc 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+40bd c29440c0 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_select_device_by_dpi_button 
+40be c29b40c7 bbit1 mouse_enable_dpi_key_long_press_disconvery ,mouse_discovery_by_dpi_button 
+40bf 20600000 rtn 
+
+mouse_select_device_by_dpi_button:
+40c0 6fe0c9e2 fetch 1 ,mem_mouse_dpi_button_state 
+40c1 c1808000 rtnne dpi_button_state_down 
+40c2 da604bad arg mem_select_device_count ,regc 
+40c3 da4040c5 arg mouse_ready_reconnection_by_dpi_button ,regb 
+40c4 202031fc branch timer_single_step 
+
+mouse_ready_reconnection_by_dpi_button:
+40c5 7049e301 jam 1 ,mem_mouse_dpi_long_press_flag 
+40c6 202046f3 branch mouse_ready_reconnection_by_button 
+
+mouse_discovery_by_dpi_button:
+40c7 6fe0c9e2 fetch 1 ,mem_mouse_dpi_button_state 
+40c8 c1808000 rtnne dpi_button_state_down 
+40c9 da604bac arg mem_bt_discovery_count ,regc 
+40ca da4040cc arg mouse_long_dpi_button_bt_discovery ,regb 
+40cb 202031fc branch timer_single_step 
+
+mouse_long_dpi_button_bt_discovery:
+40cc 7049e301 jam 1 ,mem_mouse_dpi_long_press_flag 
+40cd 20204514 branch mouse_long_button_bt_discovery 
+
+mouse_dpi_config:
+40ce 202040d8 branch mouse_seting_sensor_type 
+
+mouse_setting_dpi_4_level:
+40cf 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+40d0 c38e0000 rtnbit1 mouse_enable_dpi_level_4 
+40d1 6fe0c997 fetch 1 ,mem_mouse_dpi 
+40d2 c1818000 rtnne mouse_dpi_level4 
+40d3 70499700 jam mouse_dpi_level1 ,mem_mouse_dpi 
+40d4 20600000 rtn 
+
+mouse_seting_dpi:
+40d5 44e7c019 bpatch patch19_7 ,mem_patch19 
+40d6 204040cf call mouse_setting_dpi_4_level 
+40d7 2040492e call mouse_dpi_led_blink_delay 
+
+mouse_seting_sensor_type:
+40d8 6fe0c92c fetch 1 ,mem_config_sensor_type 
+40d9 c001c0fb beq p3212 ,mouse_seting_3212_dpi 
+40da c005c10f beq ka8g2 ,mouse_seting_ka8g2_dpi 
+40db 6fe0c997 fetch 1 ,mem_mouse_dpi 
+40dc c00040e2 beq mouse_dpi_level1 ,mouse_set_cpi0 
+40dd c000c0e0 beq mouse_dpi_level2 ,mouse_set_cpi1 
+40de c00140e4 beq mouse_dpi_level3 ,mouse_set_cpi2 
+40df c001c0e6 beq mouse_dpi_level4 ,mouse_set_cpi3 
+
+mouse_set_cpi1:
+40e0 6848c9d6 fetcht 1 ,mem_320x_dpi_1 
+40e1 202040e8 branch mouse_dpi_store 
+
+mouse_set_cpi0:
+40e2 6848c9d5 fetcht 1 ,mem_320x_dpi_0 
+40e3 202040e8 branch mouse_dpi_store 
+
+mouse_set_cpi2:
+40e4 6848c9d7 fetcht 1 ,mem_320x_dpi_2 
+40e5 202040e8 branch mouse_dpi_store 
+
+mouse_set_cpi3:
+40e6 6848c9d8 fetcht 1 ,mem_320x_dpi_3 
+40e7 202040e8 branch mouse_dpi_store 
+
+mouse_dpi_store:
+40e8 6fe0c92c fetch 1 ,mem_config_sensor_type 
+40e9 c00240f7 beq p3065_xy ,mouse_3065xy_set_dpi 
+40ea c002c0f7 beq mx8650 ,mouse_3065xy_set_dpi 
+40eb c00440f9 beq ka8 ,mouse_ka8_set_dpi 
+40ec c003c0f9 beq p6520 ,mouse_ka8_set_dpi 
+40ed c00340f7 beq p8009 ,mouse_3065xy_set_dpi 
+
+mouse_dpi_write:
+40ee 6048c9e1 storet 1 ,mem_mouse_cpi_count 
+40ef 58000006 setarg mouse_dpi_address 
+40f0 20405d65 call twspi_read 
+40f1 1fe104f8 and pdata ,0xf8 ,temp 
+40f2 6fe0c9e1 fetch 1 ,mem_mouse_cpi_count 
+40f3 9840fe00 iadd temp ,pdata 
+40f4 1fed7e00 lshift8 pdata ,pdata 
+40f5 1fe0fe06 add pdata ,mouse_dpi_address ,pdata 
+40f6 20205d5e branch twspi_write 
+
+mouse_3065xy_set_dpi:
+40f7 184085ff increase -1 ,temp 
+40f8 202040ee branch mouse_dpi_write 
+
+mouse_ka8_set_dpi:
+40f9 18408402 increase 2 ,temp 
+40fa 202040ee branch mouse_dpi_write 
+
+mouse_seting_3212_dpi:
+40fb 6fe0c997 fetch 1 ,mem_mouse_dpi 
+40fc c0004102 beq mouse_dpi_level1 ,mouse_set_p3212_cpi0 
+40fd c000c100 beq mouse_dpi_level2 ,mouse_set_p3212_cpi1 
+40fe c0014104 beq mouse_dpi_level3 ,mouse_set_p3212_cpi2 
+40ff c001c106 beq mouse_dpi_level4 ,mouse_set_p3212_cpi3 
+
+mouse_set_p3212_cpi1:
+4100 6fe0c9da fetch 1 ,mem_3212_dpi_1 
+4101 20204107 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi0:
+4102 6fe0c9d9 fetch 1 ,mem_3212_dpi_0 
+4103 20204107 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi2:
+4104 6fe0c9db fetch 1 ,mem_3212_dpi_2 
+4105 20204107 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi3:
+4106 6fe0c9dc fetch 1 ,mem_3212_dpi_3 
+
+mouse_p3212_dpi:
+4107 67e0c9e1 store 1 ,mem_mouse_cpi_count 
+4108 1fed7e00 lshift8 pdata ,pdata 
+4109 1fe22200 copy pdata ,rega 
+410a 1fe0fe0d add pdata ,mouse_p3212_dpi_xaddress ,pdata 
+410b 20405d5e call twspi_write 
+410c 1a227e00 copy rega ,pdata 
+410d 1fe0fe0e add pdata ,mouse_p3212_dpi_yaddress ,pdata 
+410e 20205d5e branch twspi_write 
+
+mouse_seting_ka8g2_dpi:
+410f 6fe0c997 fetch 1 ,mem_mouse_dpi 
+4110 c0004116 beq mouse_dpi_level1 ,mouse_set_pka8g2_cpi0 
+4111 c000c114 beq mouse_dpi_level2 ,mouse_set_pka8g2_cpi1 
+4112 c0014118 beq mouse_dpi_level3 ,mouse_set_pka8g2_cpi2 
+4113 c001c11a beq mouse_dpi_level4 ,mouse_set_pka8g2_cpi3 
+
+mouse_set_pka8g2_cpi1:
+4114 6fe0c9de fetch 1 ,mem_ka8g2_dpi_1 
+4115 20204107 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi0:
+4116 6fe0c9dd fetch 1 ,mem_ka8g2_dpi_0 
+4117 20204107 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi2:
+4118 6fe0c9df fetch 1 ,mem_ka8g2_dpi_2 
+4119 20204107 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi3:
+411a 6fe0c9e0 fetch 1 ,mem_ka8g2_dpi_3 
+411b 20204107 branch mouse_p3212_dpi 
+
+mouse_key:
+411c 20404155 call mouse_check_key_gpio 
+411d 2040412d call mouse_ghost_key_check 
+411e 20403ea0 call mouse_set_mult 
+411f 20404128 call mouse_24g_key 
+4120 1a227e00 copy rega ,pdata 
+4121 6848c8dc fetcht 1 ,mem_mouse_key_last 
+4122 67e0c8dc store 1 ,mem_mouse_key_last 
+4123 67e0c8d4 store 1 ,mem_mouse_key 
+4124 9842fe00 ixor temp ,pdata 
+4125 1fe67c00 sub pdata ,0 ,null 
+4126 20628000 rtn zero 
+4127 20207ec5 branch enable_user 
+
+mouse_24g_key:
+4128 c6930000 rtnmark0 mark_24g 
+4129 1a227e00 copy rega ,pdata 
+412a 207a0000 rtn blank 
+412b 67e0c8d4 store 1 ,mem_mouse_key 
+412c 20207ec5 branch enable_user 
+
+mouse_ghost_key_check:
+412d 704ba900 jam 0 ,mem_mouse_matrix_key_cow_count 
+412e 704baa00 jam 0 ,mem_mouse_matrix_key_row_count 
+412f 704bab00 jam 0 ,mem_mouse_ghost_flag 
+4130 1fe20400 copy pdata ,temp 
+4131 2040413d call mouse_ghost_key_check_l_bk 
+4132 20404140 call mouse_ghost_key_check_m_fw 
+4133 20404143 call mouse_ghost_key_check_bk_fw 
+4134 20404146 call mouse_ghost_key_check_lmr 
+4135 6fe0cbaa fetch 1 ,mem_mouse_matrix_key_row_count 
+4136 207a0000 rtn blank 
+4137 6fe0cba9 fetch 1 ,mem_mouse_matrix_key_cow_count 
+4138 207a0000 rtn blank 
+4139 704bab01 jam 1 ,mem_mouse_ghost_flag 
+413a 6fe0c8dc fetch 1 ,mem_mouse_key_last 
+413b 1fe22200 copy pdata ,rega 
+413c 20600000 rtn 
+
+mouse_ghost_key_check_l_bk:
+413d 18417e09 and temp ,mouse_l_bk_button ,pdata 
+413e c004c14e beq mouse_l_bk_button ,mouse_matrix_cow_more_than_one_key 
+413f 20600000 rtn 
+
+mouse_ghost_key_check_m_fw:
+4140 18417e14 and temp ,mouse_m_fw_button ,pdata 
+4141 c00a414e beq mouse_m_fw_button ,mouse_matrix_cow_more_than_one_key 
+4142 20600000 rtn 
+
+mouse_ghost_key_check_bk_fw:
+4143 18417e18 and temp ,mouse_bk_fw_button ,pdata 
+4144 c00c414c beq mouse_bk_fw_button ,mouse_matrix_row_more_than_one_key 
+4145 20600000 rtn 
+
+mouse_ghost_key_check_lmr:
+4146 18417e07 and temp ,mouse_lmr_button ,pdata 
+4147 c001c14c beq mouse_lr_button ,mouse_matrix_row_more_than_one_key 
+4148 c002c14c beq mouse_lm_button ,mouse_matrix_row_more_than_one_key 
+4149 c003414c beq mouse_rm_button ,mouse_matrix_row_more_than_one_key 
+414a c003c14c beq mouse_lmr_button ,mouse_matrix_row_more_than_one_key 
+414b 20600000 rtn 
+
+mouse_matrix_row_more_than_one_key:
+414c 704baa01 jam 1 ,mem_mouse_matrix_key_row_count 
+414d 20600000 rtn 
+
+mouse_matrix_cow_more_than_one_key:
+414e 704ba901 jam 1 ,mem_mouse_matrix_key_cow_count 
+414f 20600000 rtn 
+
+mouse_key_check_once:
+4150 20404161 call mouse_check_key_gpio_once 
+4151 20404155 call mouse_check_key_gpio 
+4152 58000000 setarg 0x00 
+4153 67e1cb9f store 3 ,mem_mouse_lkey_press_status 
+4154 20600000 rtn 
+
+mouse_check_key_gpio:
+4155 44e8401a bpatch patch1a_0 ,mem_patch1a 
+4156 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+4157 245a4161 ncall mouse_check_key_gpio_once ,blank 
+4158 da200000 arg 0 ,rega 
+4159 20404164 call mouse_check_lkey_gpio 
+415a 2040416a call mouse_check_rkey_gpio 
+415b 20404170 call mouse_check_mkey_gpio 
+415c 20404176 call mouse_check_bkkey_gpio 
+415d 2040418f call mouse_check_fwkey_gpio 
+
+mouse_check_key_gpio_next:
+415e 204041aa call mouse_check_customerkey_gpio 
+415f 1a227e00 copy rega ,pdata 
+4160 20600000 rtn 
+
+mouse_check_key_gpio_once:
+4161 58030303 setarg 0x030303 
+4162 67e1cb9f store 3 ,mem_mouse_lkey_press_status 
+4163 20600000 rtn 
+
+mouse_check_lkey_gpio:
+4164 704ba700 jam mouse_l_key ,mem_mouse_key_temp 
+4165 6848c91c fetcht 1 ,mem_lbutton_gpio 
+4166 6fe0cb9f fetch 1 ,mem_mouse_lkey_press_status 
+4167 204041c7 call mouse_check_key_connect_gnd 
+4168 67e0cb9f store 1 ,mem_mouse_lkey_press_status 
+4169 20600000 rtn 
+
+mouse_check_rkey_gpio:
+416a 704ba701 jam mouse_r_key ,mem_mouse_key_temp 
+416b 6848c91d fetcht 1 ,mem_rbutton_gpio 
+416c 6fe0cba0 fetch 1 ,mem_mouse_rkey_press_status 
+416d 204041c7 call mouse_check_key_connect_gnd 
+416e 67e0cba0 store 1 ,mem_mouse_rkey_press_status 
+416f 20600000 rtn 
+
+mouse_check_mkey_gpio:
+4170 704ba702 jam mouse_m_key ,mem_mouse_key_temp 
+4171 6848c91e fetcht 1 ,mem_mbutton_gpio 
+4172 6fe0cba1 fetch 1 ,mem_mouse_mkey_press_status 
+4173 204041c7 call mouse_check_key_connect_gnd 
+4174 67e0cba1 store 1 ,mem_mouse_mkey_press_status 
+4175 20600000 rtn 
+
+mouse_check_bkkey_gpio:
+4176 6fe0c911 fetch 1 ,mem_bk_button_gpio 
+4177 c17f8000 rtneq gpio_disable 
+4178 704ba703 jam mouse_bk_key ,mem_mouse_key_temp 
+4179 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
+417a 1fe22600 copy pdata ,regc 
+417b 6848c911 fetcht 1 ,mem_bk_button_gpio 
+417c 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+417d c07fc18b beq gpio_disable ,mouse_3io6key_bk_check 
+
+mouse_check_bkkey_gpio_next:
+417e 204060fd call gpio_get_bit 
+417f 2020c187 branch mouse_check_bk_button_connect_gnd ,true 
+4180 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+4181 2040610d call gpio_out_active 
+4182 6848c911 fetcht 1 ,mem_bk_button_gpio 
+4183 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
+4184 204041c7 call mouse_check_key_connect_gnd 
+
+mouse_check_bkkey_gpio_end:
+4185 67e0cba2 store 1 ,mem_mouse_bkkey_press_status 
+4186 202041a8 branch mouse_matrix_public_gpio_reset 
+
+mouse_check_bk_button_connect_gnd:
+4187 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+4188 6fe0cba2 fetch 1 ,mem_mouse_bkkey_press_status 
+4189 204041c7 call mouse_check_key_connect_gnd 
+418a 20204185 branch mouse_check_bkkey_gpio_end 
+
+mouse_3io6key_bk_check:
+418b 204041d5 call mouse_3io6key_check 
+418c 67e0cba2 store 1 ,mem_mouse_bkkey_press_status 
+418d 6848c911 fetcht 1 ,mem_bk_button_gpio 
+418e 20203f96 branch mouse_gpio_config_input_pu 
+
+mouse_check_fwkey_gpio:
+418f 6fe0c912 fetch 1 ,mem_fw_button_gpio 
+4190 c17f8000 rtneq gpio_disable 
+4191 704ba704 jam mouse_fw_key ,mem_mouse_key_temp 
+4192 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
+4193 1fe22600 copy pdata ,regc 
+4194 6848c912 fetcht 1 ,mem_fw_button_gpio 
+4195 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+4196 c07fc1a4 beq gpio_disable ,mouse_3io6key_fw_check 
+
+mouse_check_fwkey_gpio_next:
+4197 204060fd call gpio_get_bit 
+4198 2020c1a0 branch mouse_check_fw_button_connect_gnd ,true 
+4199 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+419a 2040610d call gpio_out_active 
+419b 6848c912 fetcht 1 ,mem_fw_button_gpio 
+419c 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
+419d 204041c7 call mouse_check_key_connect_gnd 
+
+mouse_check_fwkey_gpio_end:
+419e 67e0cba3 store 1 ,mem_mouse_fwkey_press_status 
+419f 202041a8 branch mouse_matrix_public_gpio_reset 
+
+mouse_check_fw_button_connect_gnd:
+41a0 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+41a1 6fe0cba3 fetch 1 ,mem_mouse_fwkey_press_status 
+41a2 204041c7 call mouse_check_key_connect_gnd 
+41a3 2020419e branch mouse_check_fwkey_gpio_end 
+
+mouse_3io6key_fw_check:
+41a4 204041d5 call mouse_3io6key_check 
+41a5 67e0cba3 store 1 ,mem_mouse_fwkey_press_status 
+41a6 6848c912 fetcht 1 ,mem_fw_button_gpio 
+41a7 20203f96 branch mouse_gpio_config_input_pu 
+
+mouse_matrix_public_gpio_reset:
+41a8 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+41a9 20203f96 branch mouse_gpio_config_input_pu 
+
+mouse_check_customerkey_gpio:
+41aa 704b9c00 jam 0 ,mem_customer_key 
+41ab 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+41ac c40a8000 rtnbit0 mouse_enable_keyboard 
+41ad 6fe0c916 fetch 1 ,mem_customer_key_gpio 
+41ae c17f8000 rtneq gpio_disable 
+41af 704ba707 jam mouse_customer_key ,mem_mouse_key_temp 
+41b0 6848c916 fetcht 1 ,mem_customer_key_gpio 
+41b1 6fe0cba6 fetch 1 ,mem_mouse_customerkey_press_status 
+41b2 204041c7 call mouse_check_key_connect_gnd 
+41b3 67e0cba6 store 1 ,mem_mouse_customerkey_press_status 
+41b4 1a227e00 copy rega ,pdata 
+41b5 c283c1ba bbit1 mouse_customer_key ,mouse_customerkey_press 
+41b6 204041bd call mouse_customerkey_release 
+
+mouse_check_customerkey_gpio_exit:
+41b7 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
+41b8 67e0cb9e store 1 ,mem_customer_data_trigger_last 
+41b9 20600000 rtn 
+
+mouse_customerkey_press:
+41ba 704b9d01 jam 1 ,mem_customer_data_trigger 
+41bb 204041c0 call mouse_customer_key_need_send 
+41bc 202041b7 branch mouse_check_customerkey_gpio_exit 
+
+mouse_customerkey_release:
+41bd 704b9d00 jam 0 ,mem_customer_data_trigger 
+41be 6fe0cb9e fetch 1 ,mem_customer_data_trigger_last 
+41bf 207a0000 rtn blank 
+
+mouse_customer_key_need_send:
+41c0 704b9c01 jam 1 ,mem_customer_key 
+41c1 20600000 rtn 
+
+mouse_check_matrix_button_connect_gnd:
+41c2 204060fd call gpio_get_bit 
+41c3 6848cba7 fetcht 1 ,mem_mouse_key_temp 
+41c4 18420e00 copy temp ,queue 
+41c5 2020c1d3 branch mouse_key_press ,true 
+41c6 202041d1 branch mouse_key_release 
+
+mouse_check_key_connect_gnd:
+41c7 1fe3fe00 lshift pdata ,pdata 
+41c8 1fe22400 copy pdata ,regb 
+41c9 204060fd call gpio_get_bit 
+41ca 7920a400 setflag true ,0 ,regb 
+41cb 1a417e07 and regb ,0x07 ,pdata 
+41cc 6848cba7 fetcht 1 ,mem_mouse_key_temp 
+41cd 18420e00 copy temp ,queue 
+41ce c003c1d3 beq 0x07 ,mouse_key_press 
+41cf c00041d1 beq 0x00 ,mouse_key_release 
+41d0 20600000 rtn 
+
+mouse_key_release:
+41d1 f93fa200 qset0 rega 
+41d2 20600000 rtn 
+
+mouse_key_press:
+41d3 f9202200 qset1 rega 
+41d4 20600000 rtn 
+
+mouse_3io6key_check:
+41d5 44e8c01a bpatch patch1a_1 ,mem_patch1a 
+41d6 1a627e00 copy regc ,pdata 
+41d7 67e0cba8 store 1 ,mem_mouse_key_status 
+41d8 1fe3fe00 lshift pdata ,pdata 
+41d9 1fe22400 copy pdata ,regb 
+41da 18422600 copy temp ,regc 
+41db 20403f94 call mouse_gpio_config_input_pd 
+41dc 1a620400 copy regc ,temp 
+41dd 204060fd call gpio_get_bit 
+41de 7d20a400 nsetflag true ,0 ,regb 
+41df 204041e1 call mouse_check_press 
+41e0 202041cb branch mouse_check_key_connect_gnd + 4 
+
+mouse_check_press:
+41e1 6848cba8 fetcht 1 ,mem_mouse_key_status 
+41e2 18410401 and_into 0x01 ,temp 
+41e3 1a417e01 and regb ,0x01 ,pdata 
+41e4 98467c00 isub temp ,null 
+41e5 2422c36f nbranch mouse_current_mult_update ,zero 
+41e6 20600000 rtn 
+
+mouse_init_sunt:
+41e7 44e9401a bpatch patch1a_2 ,mem_patch1a 
+41e8 20403fa5 call mouse_sensor_spi_init 
+41e9 20758000 rtn wake 
+
+mouse_init_sensor_wakeup:
+41ea 20404276 call mouse_sensor_poweron 
+
+mouse_init_sensor:
+41eb 204041f5 call mouse_read_sensor_id 
+41ec c01841fc beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
+41ed c018c257 beq p3065_id1 ,mouse_init_p3065 
+41ee c02c4260 beq pka8g2_id1 ,mouse_ka8g2_id2_judge 
+41ef 204041f2 call mouse_twspi_reset 
+41f0 20001af4 nop 6900 
+41f1 202041eb branch mouse_init_sensor 
+
+mouse_twspi_reset:
+41f2 6fe0c923 fetch 1 ,mem_mouse_sensor_sclk_gpio 
+41f3 20405b55 call twspi_reset 
+41f4 20203faa branch mouse_spid_init_pin 
+
+mouse_read_sensor_id:
+41f5 58000001 setarg pan_reg_pid_h 
+41f6 20405d65 call twspi_read 
+41f7 67e0c9c7 store 1 ,mem_sensor_id2 
+41f8 58000000 setarg pan_reg_pid_l 
+41f9 20405d65 call twspi_read 
+41fa 67e0c9c6 store 1 ,mem_sensor_id1 
+41fb 20600000 rtn 
+
+mouse_init_p32xx_id2_judge:
+41fc 6fe0c9c7 fetch 1 ,mem_sensor_id2 
+41fd c02d4205 beq p_mx8650 ,mouse_mx8650_init_param 
+41fe c06c420b beq p8009_id2 ,mouse_8009_init_param 
+41ff c068c21a beq p3205_tj3t_id2 ,mouse_3205_3t_init_param 
+4200 c0694223 beq p3204_tj3l_id2 ,mouse_3204_3l_init_param 
+4201 c001422a beq p3212_id2 ,mouse_3212_init_param 
+4202 c02a422d beq pka8_id2 ,mouse_ka8_init_param_check 
+4203 c0284254 beq p6520a_id2 ,mouse_p6520_init_param 
+4204 202041eb branch mouse_init_sensor 
+
+mouse_mx8650_init_param:
+4205 70492c05 jam mx8650 ,mem_config_sensor_type 
+4206 20404272 call mouse_sensor_reset 
+4207 20407d85 call delay_10ms 
+4208 da604a3e arg mem_sensor_8650_init ,regc 
+4209 2040426b call mouse_sensor_wr_seq 
+420a 202040ce branch mouse_dpi_config 
+
+mouse_8009_init_param:
+420b 58000016 setarg 0x16 
+420c 20405d65 call twspi_read 
+420d 1fe67cbd sub pdata ,0xbd ,null 
+420e 2422c1e7 nbranch mouse_init_sunt ,zero 
+420f 58000019 setarg 0x19 
+4210 20405d65 call twspi_read 
+4211 1fe67c55 sub pdata ,0x55 ,null 
+4212 2422c1e7 nbranch mouse_init_sunt ,zero 
+4213 5800001b setarg 0x1b 
+4214 20405d65 call twspi_read 
+4215 1fe67c1d sub pdata ,0x1d ,null 
+4216 2422c1e7 nbranch mouse_init_sunt ,zero 
+4217 70492c06 jam p8009 ,mem_config_sensor_type 
+4218 da604a82 arg mem_sensor_8009_init ,regc 
+4219 2020426b branch mouse_sensor_wr_seq 
+
+mouse_3205_3t_init_param:
+421a 70492c00 jam p3205 ,mem_config_sensor_type 
+421b da6049f8 arg mem_sensor_3205_init ,regc 
+421c 2040426b call mouse_sensor_wr_seq 
+421d da604a02 arg mem_sensor_32xx_init ,regc 
+421e 2040426b call mouse_sensor_wr_seq 
+421f 58000943 setarg 0x0943 
+4220 20405d5e call twspi_write 
+4221 da604a1c arg mem_sensor_32xx_init_1 ,regc 
+4222 2020426b branch mouse_sensor_wr_seq 
+
+mouse_3204_3l_init_param:
+4223 70492c02 jam p3204 ,mem_config_sensor_type 
+4224 da6049ee arg mem_sensor_3204_init ,regc 
+4225 2040426b call mouse_sensor_wr_seq 
+4226 da604a02 arg mem_sensor_32xx_init ,regc 
+4227 2040426b call mouse_sensor_wr_seq 
+4228 da604a1c arg mem_sensor_32xx_init_1 ,regc 
+4229 2020426b branch mouse_sensor_wr_seq 
+
+mouse_3212_init_param:
+422a 70492c03 jam p3212 ,mem_config_sensor_type 
+422b da6049e4 arg mem_sensor_3212_init ,regc 
+422c 2020426b branch mouse_sensor_wr_seq 
+
+mouse_ka8_init_param_check:
+422d 20404269 call mouse_sensor_disable_wp 
+422e 58009a5b setarg 0x9a5b 
+422f 20405d5e call twspi_write 
+4230 5800000d setarg 0x0d 
+4231 20405d65 call twspi_read 
+4232 1fe67c12 sub pdata ,0x12 ,null 
+4233 2022c241 branch mouse_ka8ul_init_param ,zero 
+4234 1fe67c0a sub pdata ,0x0a ,null 
+4235 2422c244 nbranch mouse_ka8hd_sensor_judge ,zero 
+4236 5800000e setarg 0x0e 
+4237 20405d65 call twspi_read 
+4238 1fe67ce5 sub pdata ,0xe5 ,null 
+4239 2422c1eb nbranch mouse_init_sensor ,zero 
+423a 58000010 setarg 0x10 
+423b 20405d65 call twspi_read 
+423c 1fe67ca5 sub pdata ,0xa5 ,null 
+423d 2022c241 branch mouse_ka8ul_init_param ,zero 
+423e 20404251 call mouse_enable_ka8_sensor_wp 
+
+mouse_ka8_init_param:
+423f 70492c08 jam ka8 ,mem_config_sensor_type 
+4240 20600000 rtn 
+
+mouse_ka8ul_init_param:
+4241 70492c09 jam ka8_ul ,mem_config_sensor_type 
+4242 da604a64 arg mem_sensor_ka8ul_init ,regc 
+4243 2020426b branch mouse_sensor_wr_seq 
+
+mouse_ka8hd_sensor_judge:
+4244 1fe67c10 sub pdata ,0x10 ,null 
+4245 2422c1eb nbranch mouse_init_sensor ,zero 
+4246 5800000e setarg 0x0e 
+4247 20405d65 call twspi_read 
+4248 1fe67cc5 sub pdata ,0xc5 ,null 
+4249 2422c1eb nbranch mouse_init_sensor ,zero 
+424a 58000010 setarg 0x10 
+424b 20405d65 call twspi_read 
+424c 1fe67c38 sub pdata ,0x38 ,null 
+424d 2422c1eb nbranch mouse_init_sensor ,zero 
+
+mouse_ka8hd_init_param:
+424e 20404251 call mouse_enable_ka8_sensor_wp 
+424f 70492c0a jam ka8_hd ,mem_config_sensor_type 
+4250 20600000 rtn 
+
+mouse_enable_ka8_sensor_wp:
+4251 5800005b setarg 0x005b 
+4252 20405d5e call twspi_write 
+4253 20204267 branch mouse_sensor_enable_wp 
+
+mouse_p6520_init_param:
+4254 70492c07 jam p6520 ,mem_config_sensor_type 
+4255 da604aa8 arg mem_sensor_p6520_init ,regc 
+4256 2020426b branch mouse_sensor_wr_seq 
+
+mouse_init_p3065:
+4257 20404276 call mouse_sensor_poweron 
+4258 6fe0c9c7 fetch 1 ,mem_sensor_id2 
+4259 c038425e beq p3065_xy_id2 ,mouse_p3065xy_init_param 
+425a c000425c beq p3065_id2 ,mouse_p3065_init_param 
+425b 202041eb branch mouse_init_sensor 
+
+mouse_p3065_init_param:
+425c 70492c01 jam p3065 ,mem_config_sensor_type 
+425d 20600000 rtn 
+
+mouse_p3065xy_init_param:
+425e 70492c04 jam p3065_xy ,mem_config_sensor_type 
+425f 20600000 rtn 
+
+mouse_ka8g2_id2_judge:
+4260 20404276 call mouse_sensor_poweron 
+4261 6fe0c9c7 fetch 1 ,mem_sensor_id2 
+4262 c02cc264 beq pka8g2_id2 ,mouse_ka8g2_init_param 
+4263 202041fc branch mouse_init_p32xx_id2_judge 
+
+mouse_ka8g2_init_param:
+4264 70492c0b jam ka8g2 ,mem_config_sensor_type 
+4265 da604a92 arg mem_sensor_ka8g2_init ,regc 
+4266 2020426b branch mouse_sensor_wr_seq 
+
+mouse_sensor_enable_wp:
+4267 58000009 setarg 0x0009 
+4268 20205d5e branch twspi_write 
+
+mouse_sensor_disable_wp:
+4269 58005a09 setarg 0x5a09 
+426a 20205d5e branch twspi_write 
+
+mouse_sensor_wr_seq:
+426b efe10013 ifetch 2 ,regc 
+426c d840ffff arg 0xffff ,temp 
+426d 98467c00 isub temp ,null 
+426e 20628000 rtn zero 
+426f 20405d5e call twspi_write 
+4270 1a60a602 increase 2 ,regc 
+4271 2020426b branch mouse_sensor_wr_seq 
+
+mouse_sensor_reset:
+4272 58008006 setarg 0x8006 
+
+mouse_sensor_reset_end:
+4273 20405d5e call twspi_write 
+4274 20002ee0 nop 12000 
+4275 20600000 rtn 
+
+mouse_sensor_poweron:
+4276 44e9c01a bpatch patch1a_3 ,mem_patch1a 
+4277 20403fa5 call mouse_sensor_spi_init 
+
+mouse_sensor_poweron_next:
+4278 20404272 call mouse_sensor_reset 
+4279 da604ab4 arg mem_sensor_poweron_init ,regc 
+
+mouse_sensor_poweron_end:
+427a 2040426b call mouse_sensor_wr_seq 
+427b 202040ce branch mouse_dpi_config 
+
+mouse_sensor_powerdown:
+427c 204041e7 call mouse_init_sunt 
+427d 20403fa5 call mouse_sensor_spi_init 
+
+mouse_sensor_powerdown_end:
+427e 58000806 setarg 0x0806 
+427f 20205d5e branch twspi_write 
+
+mouse_check_sensor_data:
+4280 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
+4281 c1800000 rtnne flash_sm_no_buys 
+4282 6fe0c92c fetch 1 ,mem_config_sensor_type 
+4283 c000428c beq p3205 ,mouse_p32xx_sensor_motion 
+4284 c000c28c beq p3065 ,mouse_p32xx_sensor_motion 
+4285 c004428c beq ka8 ,mouse_p32xx_sensor_motion 
+4286 c001428c beq p3204 ,mouse_p32xx_sensor_motion 
+4287 c001c2b0 beq p3212 ,mouse_p3212_sensor_motion 
+4288 c002428c beq p3065_xy ,mouse_p32xx_sensor_motion 
+4289 c00342d5 beq p8009 ,mouse_p8009_sensor_motion 
+428a c005c2ce beq ka8g2 ,mouse_pka8g2_sensor_motion 
+428b 2020428c branch mouse_p32xx_sensor_motion 
+
+mouse_p32xx_sensor_motion:
+428c 20404304 call mouse_clear_sensor_data 
+428d 78547c00 disable user 
+428e 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+428f c07fc293 beq gpio_disable ,mouse_p32xx_sensor_motion_2 
+4290 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+4291 204060fd call gpio_get_bit 
+4292 24608000 nrtn true 
+
+mouse_p32xx_sensor_motion_2:
+4293 58000000 setarg pan_reg_pid_l 
+4294 20405d65 call twspi_read 
+4295 c09842a6 bne p32xx_id1 ,mouse_p3065_judge 
+
+mouse_p32xx_sensor_motion_1:
+4296 58000002 setarg pan_reg_motion_staus 
+4297 20405d65 call twspi_read 
+4298 c4038000 rtnbit0 7 
+4299 2040431b call mouse_read_sensor_common 
+429a 6fe0c8d5 fetch 1 ,mem_mouse_x 
+429b 20404313 call mouse_data_extsign 
+429c 67e148d5 store 2 ,mem_mouse_x 
+429d 6fe0c8d7 fetch 1 ,mem_mouse_y 
+429e 20404313 call mouse_data_extsign 
+429f 67e148d7 store 2 ,mem_mouse_y 
+
+mouse_set_sensor_angle:
+42a0 6fe0c92d fetch 1 ,mem_config_sensor_angle 
+42a1 c00042a8 beq mouse_6clk_angle ,mouse_motion32xx_6clk_direction_selection 
+42a2 c000c2aa beq mouse_9clk_angle ,mouse_motion32xx_9clk_direction_selection 
+42a3 c00142ac beq mouse_12clk_angle ,mouse_motion32xx_12clk_direction_selection 
+42a4 c001c2ae beq mouse_3clk_angle ,mouse_motion32xx_3clk_direction_selection 
+42a5 20600000 rtn 
+
+mouse_p3065_judge:
+42a6 c018c296 beq p3065_id1 ,mouse_p32xx_sensor_motion_1 
+42a7 202041f2 branch mouse_twspi_reset 
+
+mouse_motion32xx_6clk_direction_selection:
+42a8 204042ed call mouse_motion_6clk_direction_dispose 
+42a9 20204322 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_9clk_direction_selection:
+42aa 204042f5 call mouse_motion_9clk_direction_dispose 
+42ab 20204322 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_12clk_direction_selection:
+42ac 204042f1 call mouse_motion_12clk_direction_dispose 
+42ad 20204322 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_3clk_direction_selection:
+42ae 204042fd call mouse_motion_3clk_direction_dispose 
+42af 20204322 branch mouse_sensor_sdio_low 
+
+mouse_p3212_sensor_motion:
+42b0 20404304 call mouse_clear_sensor_data 
+42b1 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+42b2 c07fc2b6 beq gpio_disable ,mouse_p3212_sensor_motion_1 
+42b3 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+42b4 204060fd call gpio_get_bit 
+42b5 24608000 nrtn true 
+
+mouse_p3212_sensor_motion_1:
+42b6 58000000 setarg pan_reg_pid_l 
+42b7 20405d65 call twspi_read 
+42b8 c09841f2 bne p32xx_id1 ,mouse_twspi_reset 
+
+mouse_p3212_sensor_motion_2:
+42b9 58000002 setarg pan_reg_motion_staus 
+42ba 20405d65 call twspi_read 
+42bb c4038000 rtnbit0 7 
+42bc 2040431b call mouse_read_sensor_common 
+42bd 204042cc call mouse_read_3212sensor_xy_high 
+42be 67e0c8db store 1 ,mem_mouse_xy_h 
+42bf 1ff1fe00 rshift4 pdata ,pdata 
+42c0 20404317 call mouse_data_extsign_bit3 
+42c1 67e0c8d6 store 1 ,mem_mouse_x + 1 
+42c2 6fe0c8db fetch 1 ,mem_mouse_xy_h 
+42c3 1fe17e0f and pdata ,0x0f ,pdata 
+42c4 20404317 call mouse_data_extsign_bit3 
+42c5 67e0c8d8 store 1 ,mem_mouse_y + 1 
+42c6 6fe0c92d fetch 1 ,mem_config_sensor_angle 
+42c7 c00042ed beq mouse_6clk_angle ,mouse_motion_6clk_direction_dispose 
+42c8 c000c2f5 beq mouse_9clk_angle ,mouse_motion_9clk_direction_dispose 
+42c9 c00142f1 beq mouse_12clk_angle ,mouse_motion_12clk_direction_dispose 
+42ca c001c2fd beq mouse_3clk_angle ,mouse_motion_3clk_direction_dispose 
+42cb 20600000 rtn 
+
+mouse_read_3212sensor_xy_high:
+42cc 58000012 setarg 0x12 
+42cd 20205d65 branch twspi_read 
+
+mouse_pka8g2_sensor_motion:
+42ce 20404304 call mouse_clear_sensor_data 
+42cf 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+42d0 c07fc2d4 beq gpio_disable ,mouse_pka8g2_sensor_motion_1 
+42d1 6848c915 fetcht 1 ,mem_sensor_motion_gpio 
+42d2 204060fd call gpio_get_bit 
+42d3 24608000 nrtn true 
+
+mouse_pka8g2_sensor_motion_1:
+42d4 202042b9 branch mouse_p3212_sensor_motion_2 
+
+mouse_p8009_sensor_motion:
+42d5 20404304 call mouse_clear_sensor_data 
+42d6 78547c00 disable user 
+42d7 58000002 setarg pan_reg_motion_staus 
+42d8 20405d65 call twspi_read 
+42d9 c4038000 rtnbit0 7 
+42da 58000008 setarg pan_reg_opration_state 
+42db 20405d65 call twspi_read 
+42dc 203a4299 branch mouse_p32xx_sensor_motion_1 + 3 ,blank 
+42dd 58000000 setarg 0 
+42de 67e348d5 store 6 ,mem_mouse_x 
+42df 20600000 rtn 
+
+mouse_sensor_set_angle:
+42e0 6fe0c929 fetch 1 ,mem_sensor_angle_default 
+42e1 67e0c92d store 1 ,mem_config_sensor_angle 
+42e2 6fe0c91a fetch 1 ,mem_select_sensor_angle_gpio 
+42e3 c17f8000 rtneq gpio_disable 
+42e4 6848c91a fetcht 1 ,mem_select_sensor_angle_gpio 
+42e5 20403f96 call mouse_gpio_config_input_pu 
+42e6 6848c91a fetcht 1 ,mem_select_sensor_angle_gpio 
+42e7 204060fd call gpio_get_bit 
+42e8 2040c2ea call mouse_sensor_switch_angle ,true 
+42e9 20203f94 branch mouse_gpio_config_input_pd 
+
+mouse_sensor_switch_angle:
+42ea 6fe0c92a fetch 1 ,mem_sensor_angle_switch 
+42eb 67e0c92d store 1 ,mem_config_sensor_angle 
+42ec 20600000 rtn 
+
+mouse_motion_6clk_direction_dispose:
+42ed 6fe148d5 fetch 2 ,mem_mouse_x 
+42ee 1fe67e00 sub pdata ,0 ,pdata 
+42ef 67e148d5 store 2 ,mem_mouse_x 
+42f0 20207ec5 branch enable_user 
+
+mouse_motion_12clk_direction_dispose:
+42f1 6fe148d7 fetch 2 ,mem_mouse_y 
+42f2 1fe67e00 sub pdata ,0 ,pdata 
+42f3 67e148d7 store 2 ,mem_mouse_y 
+42f4 20207ec5 branch enable_user 
+
+mouse_motion_9clk_direction_dispose:
+42f5 6fe148d7 fetch 2 ,mem_mouse_y 
+42f6 1fe67e00 sub pdata ,0 ,pdata 
+42f7 67e148d7 store 2 ,mem_mouse_y 
+42f8 6fe148d5 fetch 2 ,mem_mouse_x 
+42f9 1fe67e00 sub pdata ,0 ,pdata 
+42fa 67e148d5 store 2 ,mem_mouse_x 
+42fb 204042ff call mouse_sensor_data_swap_places 
+42fc 20207ec5 branch enable_user 
+
+mouse_motion_3clk_direction_dispose:
+42fd 204042ff call mouse_sensor_data_swap_places 
+42fe 20207ec5 branch enable_user 
+
+mouse_sensor_data_swap_places:
+42ff 6fe148d7 fetch 2 ,mem_mouse_y 
+4300 684948d5 fetcht 2 ,mem_mouse_x 
+4301 67e148d5 store 2 ,mem_mouse_x 
+4302 604948d7 storet 2 ,mem_mouse_y 
+4303 20600000 rtn 
+
+mouse_clear_sensor_data:
+4304 6fe0c9cd fetch 1 ,mem_mouse_move_flag 
+4305 205a431b call mouse_read_sensor_common ,blank 
+4306 7049cd01 jam 1 ,mem_mouse_move_flag 
+4307 20600000 rtn 
+
+mouse_clear_sensor_data_by_reset:
+4308 704abd01 jam 1 ,mem_mouse_clear_sensor_data_flag 
+4309 20401ac6 call le_set_config_more_data 
+
+mouse_init_sensor_reset:
+430a 202041e7 branch mouse_init_sunt 
+
+mouse_data_xy_release:
+430b 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+430c c1ff8000 rtnne gpio_disable 
+430d 6fe0cabf fetch 1 ,mem_mouse_long_mult_flag 
+430e c1808000 rtnne 1 
+430f 58000000 setarg 0 
+4310 67e0cabf store 1 ,mem_mouse_long_mult_flag 
+4311 67e248d5 store 4 ,mem_mouse_x 
+4312 2020430a branch mouse_init_sensor_reset 
+
+mouse_data_extsign:
+4313 c4038000 rtnbit0 7 
+4314 d840ff00 arg 0xff00 ,temp 
+4315 9841fe00 ior temp ,pdata 
+4316 20600000 rtn 
+
+mouse_data_extsign_bit3:
+4317 c4018000 rtnbit0 3 
+4318 d84000f0 arg 0xf0 ,temp 
+4319 9841fe00 ior temp ,pdata 
+431a 20600000 rtn 
+
+mouse_read_sensor_common:
+431b dfe00003 arg pan_reg_delta_x ,pdata 
+431c 20405d65 call twspi_read 
+431d 67e148d5 store 2 ,mem_mouse_x 
+431e dfe00004 arg pan_reg_delta_y ,pdata 
+431f 20405d65 call twspi_read 
+4320 67e148d7 store 2 ,mem_mouse_y 
+4321 20600000 rtn 
+
+mouse_sensor_sdio_low:
+4322 6848c924 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+4323 204060fd call gpio_get_bit 
+4324 20608000 rtn true 
+4325 5800000a setarg 0x0a 
+4326 20405d65 call twspi_read 
+4327 200003e8 nop 1000 
+4328 20204322 branch mouse_sensor_sdio_low 
+
+mouse_set_sdio_high:
+4329 58008100 setarg 0x8100 
+432a 20205d5e branch twspi_write 
+
+mouse_buletooth_fast_conn_init:
+432b 704ad2ff jam 0xff ,mem_mouse_bluetooth_fast_conn_flag 
+432c 6fe0cbc4 fetch 1 ,mem_mouse_bluetooth_type 
+432d c280c32f bbit1 mode_4_mouse ,mouse_ble_fast_conn_init 
+432e c2804334 bbit1 mode_3_mouse ,mouse_bt_fast_conn_init 
+
+mouse_ble_fast_conn_init:
+432f 70448434 jam 0x34 ,mem_xrecord_mode 
+4330 580f0f0f setarg 0x0f0f0f 
+4331 67e1c37a store 3 ,mem_le_lap 
+4332 67e1c37d store 3 ,mem_le_lap + 3 
+4333 20203e24 branch mouse_start_reconnect 
+
+mouse_bt_fast_conn_init:
+4334 70448433 jam 0x33 ,mem_xrecord_mode 
+4335 d8c04979 arg mem_mouse_compare_addr_ff ,contr 
+4336 20404608 call mouse_load_bt_device 
+4337 20203e24 branch mouse_start_reconnect 
+
+mouse_buletooth_fast_conn_end:
+4338 44ea401a bpatch patch1a_4 ,mem_patch1a 
+4339 204045fd call mouse_select_reconn_device 
+433a 20404354 call mouse_bluetooth_fast_conn_disable 
+433b 6fe0c93d fetch 1 ,mem_device_flag 
+433c c000c33f beq mode_bt_device1 ,mouse_device1_check_auto_discover 
+433d c0014341 beq mode_bt_device2 ,mouse_device2_check_auto_discover 
+433e 20600000 rtn 
+
+mouse_device1_check_auto_discover:
+433f 6fe3493f fetch 6 ,mem_device1_addr 
+4340 20204342 branch mouse_device_check_auto_discover 
+
+mouse_device2_check_auto_discover:
+4341 6fe3495c fetch 6 ,mem_device2_addr 
+
+mouse_device_check_auto_discover:
+4342 684b4979 fetcht 6 ,mem_mouse_compare_addr_ff 
+4343 98467c00 isub temp ,null 
+4344 2022c593 branch mouse_start_discovery ,zero 
+4345 20203e1c branch mouse_start_reconnect_device 
+
+mouse_bt_fast_conn_send_device_name:
+4346 20404354 call mouse_bluetooth_fast_conn_disable 
+4347 6fe0c5ff fetch 1 ,mem_local_name_length 
+4348 1fe0fe03 increase 3 ,pdata 
+4349 1fe22200 copy pdata ,rega 
+434a 20404e1e call hid_malloc_tx_buff 
+434b 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+434c e7e10005 istore 2 ,contw 
+434d 580004a1 setarg 0x04a1 
+434e e7e10005 istore 2 ,contw 
+434f 6fe0c5ff fetch 1 ,mem_local_name_length 
+4350 1fe0fe01 increase 1 ,pdata 
+4351 1fe27200 copy pdata ,loopcnt 
+4352 d8c045ff arg mem_local_name_length ,contr 
+4353 20207dd4 branch memcpy 
+
+mouse_bluetooth_fast_conn_disable:
+4354 704ad25a jam 0x5a ,mem_mouse_bluetooth_fast_conn_flag 
+4355 20600000 rtn 
+
+mouse_stop_bluetooth_mode:
+4356 6fe1478f fetch 2 ,mem_ui_state_map 
+4357 c283c362 bbit1 ui_state_bt_reconnect ,mouse_cancel_reconnect 
+4358 c284b281 bbit1 ui_state_ble_connected ,app_ble_disconnect 
+4359 c2803268 bbit1 ui_state_bt_connected ,app_bt_disconnect 
+435a 202045b6 branch mouse_stop_discovery 
+
+mouse_disconnect:
+435b 58000000 setarg 0 
+435c 67e14ac3 store 2 ,mem_mouse_no_data_timer 
+435d 6fe1478f fetch 2 ,mem_ui_state_map 
+435e c284b281 bbit1 ui_state_ble_connected ,app_ble_disconnect 
+435f 6fe1478f fetch 2 ,mem_ui_state_map 
+4360 c2803268 bbit1 ui_state_bt_connected ,app_bt_disconnect 
+4361 20600000 rtn 
+
+mouse_cancel_reconnect:
+4362 2040471c call mouse_bt_cannel_reconn_enable 
+4363 2020799c branch check_51cmd_bb_reconn_cancel 
+
+mouse_check_125hz:
+4364 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4365 c40d8000 rtnbit0 mouse_enable_bt_125hz 
+
+mouse_bluetooth_125hz:
+4366 2434436c nbranch mouse_bluetooth_125hz_clear ,user 
+4367 6fe0cabe fetch 1 ,mem_bluetooth_125hz_cnt 
+4368 1fe0fe01 increase 1 ,pdata 
+4369 1fe17e0f and_into 0x0f ,pdata 
+436a 67e0cabe store 1 ,mem_bluetooth_125hz_cnt 
+436b 247a0000 nrtn blank 
+
+mouse_bluetooth_125hz_clear:
+436c 704abe00 jam 0 ,mem_bluetooth_125hz_cnt 
+436d 78547c00 disable user 
+436e 20600000 rtn 
+
+mouse_current_mult_update:
+436f 6fe0c915 fetch 1 ,mem_sensor_motion_gpio 
+4370 c1ff8000 rtnne gpio_disable 
+4371 70417700 jam 0 ,mem_lpm_mult 
+4372 704ac01e jam 30 ,mem_mouse_current_mult_timer 
+4373 20600000 rtn 
+
+mouse_priority_bb_event:
+4374 44eac01a bpatch patch1a_5 ,mem_patch1a 
+4375 1a627e00 copy regc ,pdata 
+4376 c00a4390 beq bt_evt_le_connected ,mouse_le_bb_event_connected 
+4377 c000c43a beq bt_evt_bb_connected ,mouse_bb_event_connected 
+4378 c00ac39f beq bt_evt_le_disconnected ,mouse_le_bb_disconnected 
+4379 c001443e beq bt_evt_bb_disconnected ,mouse_bb_disconnected 
+437a c002c461 beq bt_evt_setup_complete ,mouse_bt_event_setup_complete 
+437b c008458e beq bt_evt_button_long_pressed ,mouse_bb_event_discovery_btn 
+437c c0094464 beq bt_evt_hid_handshake ,mouse_bt_hid_handshake 
+437d c00332b6 beq bt_evt_hid_connected ,app_hid_connected 
+437e c0024472 beq bt_evt_reconn_failed ,mouse_bb_event_reconn_failed 
+437f c009c472 beq bt_evt_reconn_page_timeout ,mouse_bb_event_reconn_timeout 
+4380 c00cb25e beq bt_evt_switch_not_accept ,app_bt_role_switch 
+4381 c015c47d beq bt_evt_switch_success_master ,mouse_enter_sniff_check 
+4382 c010c483 beq bt_evt_sniff_not_accept ,mouse_sniff_not_accept 
+4383 c005448a beq bt_evt_pincode_req ,mouse_bb_event_pincode 
+4384 c017324c beq bt_evt_remote_unsniff ,app_start_auto_sniff 
+4385 c018c3aa beq bt_evt_le_pairing_success ,mouse_le_pairing_success 
+4386 c014c3ac beq bt_evt_le_enc_info ,mouse_le_enc_info 
+4387 c01943ae beq bt_evt_le_start_enc ,mouse_le_ll_start_encryt 
+4388 c01f43b9 beq bt_evt_le_pairing_complete ,mouse_le_pairing_complete 
+4389 c02043ba beq bt_evt_le_parse_conn_papa_update_rsp ,mouse_le_conn_param_update_rsp_recieved 
+438a c013c48c beq bt_evt_virtual_cable_unplug ,mouse_irtual_cable_unplug 
+438b c01cc896 beq bt_evt_24g_pairing_complete ,mouse_24g_pairing_complete 
+438c c01d4872 beq bt_evt_24g_attempt_fail ,mouse_24g_attempt_fail 
+438d c01e488d beq bt_evt_24g_attempt_success ,mouse_24g_attempt_success 
+438e c02243d0 beq bt_evt_le_parse_conn_param_accepted ,mouse_le_parse_conn_param_accepted 
+438f 20600000 rtn 
+
+mouse_le_bb_event_connected:
+4390 704abf00 jam 0 ,mem_mouse_long_mult_flag 
+4391 2040430a call mouse_init_sensor_reset 
+4392 704ad701 jam 1 ,mem_mouse_le_bb_connected_flag 
+4393 20404861 call mouse_24g_first_store_reconn_info 
+4394 6fe0cad8 fetch 1 ,mem_mouse_le_reconnect_flag 
+4395 243a4397 nbranch mouse_le_bb_event_connected_next ,blank 
+4396 704ad914 jam 0x14 ,mem_mouse_send_secutiry_request_timer 
+
+mouse_le_bb_event_connected_next:
+4397 6fe14482 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+4398 793ffe00 set0 app_disc_by_button ,pdata 
+4399 67e14482 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+439a 704b8800 jam 0 ,mem_mouse_direct_timer 
+439b 6fe14b01 fetch 2 ,mem_le_battery_level_updata_timer_init 
+439c 67e14b03 store 2 ,mem_le_battery_level_updata_timer 
+439d 20404584 call mouse_no_data_timer_init 
+439e 202045b6 branch mouse_stop_discovery 
+
+mouse_le_bb_disconnected:
+439f 704ad700 jam 0 ,mem_mouse_le_bb_connected_flag 
+43a0 58000006 setarg le_interval_7_5ms 
+43a1 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+43a2 c28dc3a4 bbit1 mouse_enable_bt_125hz ,mouse_le_bb_disconnected_next 
+43a3 58000007 setarg le_interval_8_75ms 
+
+mouse_le_bb_disconnected_next:
+43a4 67e14372 store 2 ,mem_le_interval_min 
+43a5 67e14374 store 2 ,mem_le_interval_min + 2 
+43a6 704b0500 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+43a7 704abd00 jam 0 ,mem_mouse_clear_sensor_data_flag 
+43a8 20401ac8 call le_clr_config_more_data 
+43a9 2020443e branch mouse_bb_disconnected 
+
+mouse_le_pairing_success:
+43aa d8e00002 arg ll_pairing_success_flag ,queue 
+43ab 202043b5 branch mouse_le_enable_connect_flag 
+
+mouse_le_enc_info:
+
+mouse_updata_le_param:
+43ac 70095b12 jam bt_cmd_le_update_conn ,mem_fifo_temp 
+43ad 202078e5 branch ui_ipc_send_cmd 
+
+mouse_le_ll_start_encryt:
+43ae 6fe0cad8 fetch 1 ,mem_mouse_le_reconnect_flag 
+43af c000c3b1 beq 1 ,mouse_le_ll_reconn_start_encryt 
+43b0 202043b3 branch mouse_le_ll_enable_start_enc_flag 
+
+mouse_le_ll_reconn_start_encryt:
+43b1 204043ac call mouse_updata_le_param 
+43b2 704b8714 jam 20 ,mem_le_start_encrypt_timer 
+
+mouse_le_ll_enable_start_enc_flag:
+43b3 d8e00001 arg ll_start_enc_flag ,queue 
+43b4 202043b5 branch mouse_le_enable_connect_flag 
+
+mouse_le_enable_connect_flag:
+43b5 6fe0cb86 fetch 1 ,mem_le_connect_status_flag 
+43b6 f9207e00 qset1 pdata 
+43b7 67e0cb86 store 1 ,mem_le_connect_status_flag 
+43b8 20600000 rtn 
+
+mouse_le_pairing_complete:
+43b9 2020328f branch app_ble_store_reconn_info 
+
+mouse_le_conn_param_update_rsp_recieved:
+43ba 6fe143db fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+43bb c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
+43bc 6fe08289 fetch 1 ,mem_le_tsniff 
+43bd 1feb7e00 rshift2 pdata ,pdata 
+43be 1fe67c0c sub pdata ,le_interval_15ms ,null 
+43bf 20610000 rtn positive 
+43c0 58000009 setarg le_interval_11_25ms 
+43c1 67e14372 store 2 ,mem_le_interval_min 
+43c2 67e14374 store 2 ,mem_le_interval_min + 2 
+43c3 204043ac call mouse_updata_le_param 
+
+mouse_le_conn_param_lpm_disable:
+43c4 704b0501 jam le_lpm_disable ,mem_mouse_le_conn_param_reject 
+43c5 20600000 rtn 
+
+mouse_le_conn_param_lpm_enable:
+43c6 704b0500 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+43c7 20600000 rtn 
+
+mouse_le_bb_event_connect_complete:
+43c8 6fe0cad8 fetch 1 ,mem_mouse_le_reconnect_flag 
+43c9 247a0000 nrtn blank 
+43ca 6fe0c437 fetch 1 ,mem_le_att_handle 
+43cb 1fe67e22 sub pdata ,34 ,pdata 
+43cc 24628000 nrtn zero 
+43cd 704b8700 jam 0 ,mem_le_start_encrypt_timer 
+
+mouse_le_write_enable:
+43ce d8e00000 arg write_req_enable_flag ,queue 
+43cf 202043b5 branch mouse_le_enable_connect_flag 
+
+mouse_le_parse_conn_param_accepted:
+43d0 6fe082c1 fetch 1 ,mem_le_new_conninterval 
+43d1 1fe67c0c sub pdata ,le_interval_15ms ,null 
+43d2 242143c4 nbranch mouse_le_conn_param_lpm_disable ,positive 
+43d3 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+43d4 6848cb9b fetcht 1 ,mem_lpm_mult_init 
+43d5 98467c00 isub temp ,null 
+43d6 202143da branch mouse_le_lpm_mult_reinit ,positive 
+43d7 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+43d8 67e0c177 store 1 ,mem_lpm_mult 
+43d9 202043c6 branch mouse_le_conn_param_lpm_enable 
+
+mouse_le_lpm_mult_reinit:
+43da 6fe0cb9b fetch 1 ,mem_lpm_mult_init 
+43db 67e0c177 store 1 ,mem_lpm_mult 
+43dc 202043c6 branch mouse_le_conn_param_lpm_enable 
+
+mouse_le_clean_connect_flag:
+43dd 704b8600 jam 0 ,mem_le_connect_status_flag 
+43de 20600000 rtn 
+
+mouse_le:
+43df 44eb401a bpatch patch1a_6 ,mem_patch1a 
+43e0 20401b24 call le_fifo_check_nearly_full 
+43e1 247a0000 nrtn blank 
+43e2 6fe0cad2 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+43e3 c07fc3e7 beq 0xff ,mouse_le_next 
+43e4 6fe0cb86 fetch 1 ,mem_le_connect_status_flag 
+43e5 1fe17e03 and pdata ,0x03 ,pdata 
+43e6 c1818000 rtnne 0x03 
+
+mouse_le_next:
+43e7 6fe0cabd fetch 1 ,mem_mouse_clear_sensor_data_flag 
+43e8 205a4308 call mouse_clear_sensor_data_by_reset ,blank 
+43e9 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+43ea c280c411 bbit1 mouse_24g_pairing_flag ,mouse_le_send_empty_packet 
+43eb c2804411 bbit1 mouse_select_device_flag ,mouse_le_send_empty_packet 
+43ec c282c411 bbit1 mouse_bt_discovery_button_down_flag ,mouse_le_send_empty_packet 
+43ed c2834411 bbit1 mouse_bt_discovery_button_long_down_flag ,mouse_le_send_empty_packet 
+43ee 20403fb0 call mouse_motion 
+43ef 20404364 call mouse_check_125hz 
+43f0 24740000 nrtn user 
+43f1 2040436f call mouse_current_mult_update 
+43f2 2040430b call mouse_data_xy_release 
+43f3 2040405d call mouse_wheel_trigger 
+43f4 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+43f5 c30ac3f8 bbit0 mouse_enable_keyboard ,mouse_le_send_mouse_data 
+43f6 6fe0cb9c fetch 1 ,mem_customer_key 
+43f7 c000c3f9 beq 1 ,mouse_le_send_keyboard_package_data 
+
+mouse_le_send_mouse_data:
+43f8 20204413 branch mouse_fill_mouse_data_le 
+
+mouse_le_send_keyboard_package_data:
+43f9 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
+43fa 203a4403 branch mouse_le_release_keyboard_data ,blank 
+43fb 6fe44bde fetch 8 ,mem_customer_key_press + 1 
+
+mouse_fill_keyboard_package_data_le:
+43fc 67e4095c store 8 ,mem_pdatatemp 
+43fd 6fe0cbdd fetch 1 ,mem_customer_key_press 
+43fe c001c405 beq kb_multikey_report_id ,mouse_fill_multimedia_key_data_le 
+43ff c0014408 beq kb_system_conctrl_report_id ,mouse_fill_systemctrl_key_data_le 
+4400 704af708 jam 8 ,mem_le_data_len 
+4401 68494af8 fetcht 2 ,mem_le_keyboard_handle 
+4402 20204418 branch mouse_fill_data_le 
+
+mouse_le_release_keyboard_data:
+4403 6fe44be7 fetch 8 ,mem_customer_key_release + 1 
+4404 202043fc branch mouse_fill_keyboard_package_data_le 
+
+mouse_fill_multimedia_key_data_le:
+4405 704af703 jam 3 ,mem_le_data_len 
+4406 68494afa fetcht 2 ,mem_le_multimedia_handle 
+4407 20204418 branch mouse_fill_data_le 
+
+mouse_fill_systemctrl_key_data_le:
+4408 704af702 jam 2 ,mem_le_data_len 
+4409 68494afc fetcht 2 ,mem_le_systemctrl_handle 
+440a 20204418 branch mouse_fill_data_le 
+
+mouse_fill_battery_level_le:
+440b da200001 arg 1 ,rega 
+440c 68494afe fetcht 2 ,mem_le_battery_level_handle 
+440d 20401e5f call le_att_malloc_tx_notify 
+440e 6fe0cb00 fetch 1 ,mem_le_battery_level_percentage 
+440f e7e08005 istore 1 ,contw 
+4410 20600000 rtn 
+
+mouse_le_send_empty_packet:
+4411 58000000 setarg 0 
+4412 67e3c8d4 store 7 ,mem_mouse_key 
+
+mouse_fill_mouse_data_le:
+4413 704af707 jam 7 ,mem_le_data_len 
+4414 6fe3c8d4 fetch 7 ,mem_mouse_key 
+4415 67e3895c store 7 ,mem_pdatatemp 
+4416 68494357 fetcht 2 ,mem_le_notify_handle 
+4417 20204418 branch mouse_fill_data_le 
+
+mouse_fill_data_le:
+4418 6fe0caf7 fetch 1 ,mem_le_data_len 
+4419 1fe22200 copy pdata ,rega 
+441a 20401e5f call le_att_malloc_tx_notify 
+441b 6848caf7 fetcht 1 ,mem_le_data_len 
+441c 18427200 copy temp ,loopcnt 
+441d d8c0095c arg mem_pdatatemp ,contr 
+441e 20207dd4 branch memcpy 
+
+mouse_check_51cmd_adv:
+441f 704ad800 jam 0 ,mem_mouse_le_reconnect_flag 
+4420 6fe1cadd fetch 3 ,mem_le_adv_ind 
+4421 67e1c3ec store 3 ,mem_le_adv_data + 4 
+4422 20404428 call mouse_le_check_adv_flag 
+4423 58000005 setarg adv_flag_bredr_not_supported | adv_flag_limited_discoverable 
+4424 e7e08006 istore 1 ,contr 
+4425 d8c04ae3 arg mem_le_adv_swift_pair ,contr 
+4426 2040442f call mouse_le_adv_data_update 
+4427 20207959 branch check_51cmd_adv 
+
+mouse_le_check_adv_flag:
+4428 da2043e8 arg mem_le_adv_data ,rega 
+
+mouse_le_check_adv_flag_loop:
+4429 efe08011 ifetch 1 ,rega 
+442a 207a0000 rtn blank 
+442b 98c0a200 iadd contr ,rega 
+442c efe08006 ifetch 1 ,contr 
+442d c1008000 rtneq 0x01 
+442e 20204429 branch mouse_le_check_adv_flag_loop 
+
+mouse_le_adv_data_update:
+442f d8a043f3 arg mem_le_adv_data + 11 ,contw 
+4430 df200013 arg 19 ,loopcnt 
+4431 20407dd4 call memcpy 
+4432 20201a6a branch le_modified_name_adv 
+
+mouse_bt_sniff_param_interval_setup:
+4433 5800000c setarg classic_interval_7_5ms 
+4434 67e14455 store 2 ,mem_sniff_param_interval 
+4435 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4436 c38d8000 rtnbit1 mouse_enable_bt_125hz 
+4437 5800000e setarg classic_interval_8_75ms 
+4438 67e14455 store 2 ,mem_sniff_param_interval 
+4439 20600000 rtn 
+
+mouse_bb_event_connected:
+443a 704abf00 jam 0 ,mem_mouse_long_mult_flag 
+443b 2040430a call mouse_init_sensor_reset 
+443c 20404861 call mouse_24g_first_store_reconn_info 
+443d 202045b6 branch mouse_stop_discovery 
+
+mouse_bb_disconnected:
+443e 704b9000 jam 0 ,mem_mouse_enter_sniff_count 
+443f 704b9900 jam 0 ,mem_mouse_bt_send_first_package_flag 
+4440 20404433 call mouse_bt_sniff_param_interval_setup 
+4441 20404449 call mouse_bb_discon_clear_stack 
+4442 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason 
+4443 c283c450 bbit1 app_disc_ble ,mouse4_0_event_bb_disconn 
+4444 c2803238 bbit1 app_disc_by_button ,app_disconn_reason_clear 
+4445 c280c454 bbit1 app_disc_after_pairing ,mouse_event_light_state_pairing 
+4446 c2814457 bbit1 app_disc_after_reconn ,mouse_event_light_state_hibernate 
+4447 c281c457 bbit1 app_disc_after_sniff ,mouse_event_light_state_hibernate 
+4448 20204593 branch mouse_start_discovery 
+
+mouse_bb_discon_clear_stack:
+4449 58000000 setarg 0 
+444a 67e448dd store 8 ,mem_wheel_tb_old_pinlevel 
+444b e7e20005 istore 4 ,contw 
+444c 7049cd00 jam 0 ,mem_mouse_move_flag 
+444d 70445400 jam app_handshake_null ,mem_app_handshake_flag 
+444e 70432600 jam 0 ,mem_ltk_exists 
+444f 20600000 rtn 
+
+mouse4_0_event_bb_disconn:
+4450 204043dd call mouse_le_clean_connect_flag 
+4451 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason 
+4452 c2803238 bbit1 app_disc_by_button ,app_disconn_reason_clear 
+4453 20203e5a branch mouse_app_enter_hibernate 
+
+mouse_event_light_state_pairing:
+4454 c282c457 bbit1 app_disc_after_handshake ,mouse_event_light_state_hibernate 
+4455 c281c457 bbit1 app_disc_after_sniff ,mouse_event_light_state_hibernate 
+4456 20204593 branch mouse_start_discovery 
+
+mouse_event_light_state_hibernate:
+4457 6fe1478f fetch 2 ,mem_ui_state_map 
+4458 c2864593 bbit1 ui_state_btn_down ,mouse_start_discovery 
+4459 20403238 call app_disconn_reason_clear 
+445a 20404150 call mouse_key_check_once 
+445b 2040451c call mouse_commbination_key_process 
+445c 6fe0cbb0 fetch 1 ,mem_commbination_key_statue 
+445d c000be57 beq commbination_key_state_down ,mouse_delay_enter_hibernata 
+445e 6fe0cad5 fetch 1 ,mem_mouse_bluetooth_reconnect_timeout 
+445f 247a0000 nrtn blank 
+4460 20203e5a branch mouse_app_enter_hibernate 
+
+mouse_bt_event_setup_complete:
+4461 20600000 rtn 
+
+mouse_bt_send_first_package_timer_init:
+4462 704b9804 jam 4 ,mem_mouse_bt_send_first_package_timer 
+4463 20600000 rtn 
+
+mouse_bt_hid_handshake:
+4464 70445401 jam app_handshake_done ,mem_app_handshake_flag 
+4465 20403295 call app_lpm_mult_enable 
+4466 20403291 call app_bt_store_reconn_info 
+4467 58000000 setarg 0 
+4468 67e1478b store 2 ,mem_discovery_timeout_timer_count 
+4469 67e0c78d store 1 ,mem_hid_handshake_timer_count 
+446a 20404462 call mouse_bt_send_first_package_timer_init 
+446b 2020328d branch app_bt_enter_sniff 
+
+mouse_bt_hid_handshake_boot_check:
+446c 704b9100 jam 0 ,mem_mouse_bt_boot_mode 
+446d 6fe0c5f8 fetch 1 ,mem_l2cap_rcv_hidtype 
+446e 2feffe00 isolate1 0 ,pdata 
+446f 20608000 rtn true 
+4470 704b9101 jam 1 ,mem_mouse_bt_boot_mode 
+4471 20600000 rtn 
+
+mouse_bb_event_reconn_timeout:
+
+mouse_bb_event_reconn_failed:
+4472 6fe0cad2 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+4473 c07fc338 beq 0xff ,mouse_buletooth_fast_conn_end 
+4474 6fe1478f fetch 2 ,mem_ui_state_map 
+4475 c3860000 rtnbit1 ui_state_btn_down 
+4476 c3830000 rtnbit1 ui_state_bt_discovery 
+4477 c3858000 rtnbit1 ui_state_ble_adv 
+4478 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4479 c3828000 rtnbit1 mouse_bt_discovery_button_down_flag 
+447a c299c593 bbit1 mouse_enable_bt_reconnect_timeout_enter_discovery ,mouse_start_discovery 
+447b c297c85e bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_bb_event_reconn_timeout 
+447c 20203e5a branch mouse_app_enter_hibernate 
+
+mouse_enter_sniff_check:
+447d 6fe0cb90 fetch 1 ,mem_mouse_enter_sniff_count 
+447e c1810000 rtnne 2 
+447f 704b9000 jam 0 ,mem_mouse_enter_sniff_count 
+4480 20404433 call mouse_bt_sniff_param_interval_setup 
+4481 20404462 call mouse_bt_send_first_package_timer_init 
+4482 2020328d branch app_bt_enter_sniff 
+
+mouse_sniff_not_accept:
+4483 6fe0cb90 fetch 1 ,mem_mouse_enter_sniff_count 
+4484 c1010000 rtneq 2 
+4485 1fe0fe01 increase 1 ,pdata 
+4486 67e0cb90 store 1 ,mem_mouse_enter_sniff_count 
+4487 70445512 jam 0x12 ,mem_sniff_param_interval 
+4488 20404462 call mouse_bt_send_first_package_timer_init 
+4489 2020328d branch app_bt_enter_sniff 
+
+mouse_bb_event_pincode:
+448a 20405b4f call pincode_reinit 
+448b 2020325c branch app_bt_set_pincode 
+
+mouse_irtual_cable_unplug:
+448c 58000001 setarg 0x01 
+448d 67e30040 store 6 ,mem_plap 
+448e 7000e733 jam rec_3_mode ,mem_record_bt_mode 
+448f 202045cd branch mouse_unplug_clean_bdaddr 
+
+mouse_irtual_cable_unplug1:
+4490 5fffffff setarg -1 
+4491 67e30040 store 6 ,mem_plap 
+4492 7000e733 jam rec_3_mode ,mem_record_bt_mode 
+4493 704ad2ff jam 0xff ,mem_mouse_bluetooth_fast_conn_flag 
+4494 204045e2 call mouse_before_store_reconn_info 
+4495 70493eff jam 0xff ,mem_device1_type 
+4496 2020462e branch mouse_store_device_info_delay 
+
+mouse_bt:
+4497 44ebc01a bpatch patch1a_7 ,mem_patch1a 
+4498 20770000 rtn attempt 
+4499 6fe0c454 fetch 1 ,mem_app_handshake_flag 
+449a 207a0000 rtn blank 
+449b 20405352 call l2cap_malloc_is_fifo_nearly_full 
+449c 247a0000 nrtn blank 
+449d 6fe0cad2 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+449e c07fc346 beq 0xff ,mouse_bt_fast_conn_send_device_name 
+449f 6fe0cabd fetch 1 ,mem_mouse_clear_sensor_data_flag 
+44a0 205a4308 call mouse_clear_sensor_data_by_reset ,blank 
+44a1 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+44a2 c280c4ce bbit1 mouse_24g_pairing_flag ,mouse_send_empty_data 
+44a3 c28044ce bbit1 mouse_select_device_flag ,mouse_send_empty_data 
+44a4 c282c4ce bbit1 mouse_bt_discovery_button_down_flag ,mouse_send_empty_data 
+44a5 c28344ce bbit1 mouse_bt_discovery_button_long_down_flag ,mouse_send_empty_data 
+44a6 20403fb0 call mouse_motion 
+44a7 20404364 call mouse_check_125hz 
+44a8 24740000 nrtn user 
+44a9 2040436f call mouse_current_mult_update 
+44aa 2040430b call mouse_data_xy_release 
+44ab 2040405d call mouse_wheel_trigger 
+44ac 6fe0cb91 fetch 1 ,mem_mouse_bt_boot_mode 
+44ad c000c4bd beq 1 ,mouse_send_data_boot_mode 
+44ae 6fe0cb99 fetch 1 ,mem_mouse_bt_send_first_package_flag 
+44af 207a0000 rtn blank 
+44b0 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+44b1 c30ac4b4 bbit0 mouse_enable_keyboard ,mouse_send_data 
+44b2 6fe0cb9c fetch 1 ,mem_customer_key 
+44b3 c000c4d1 beq 1 ,mouse_bt_send_keyboard_packet 
+
+mouse_send_data:
+44b4 da200009 arg 9 ,rega 
+44b5 20404e1e call hid_malloc_tx_buff 
+44b6 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+44b7 e7e10005 istore 2 ,contw 
+44b8 580002a1 setarg 0x02a1 
+44b9 e7e10005 istore 2 ,contw 
+44ba 6fe3c8d4 fetch 7 ,mem_mouse_key 
+44bb e7e38005 istore 7 ,contw 
+44bc 20600000 rtn 
+
+mouse_send_data_boot_mode:
+44bd 6fe0c8d4 fetch 1 ,mem_mouse_key 
+44be 67e0cb92 store 1 ,mem_mouse_bt_boot_data 
+44bf 6fe0c8d5 fetch 1 ,mem_mouse_x 
+44c0 e7e08005 istore 1 ,contw 
+44c1 6fe0c8d7 fetch 1 ,mem_mouse_y 
+44c2 e7e08005 istore 1 ,contw 
+44c3 6fe148d9 fetch 2 ,mem_mouse_z 
+44c4 e7e10005 istore 2 ,contw 
+44c5 da200007 arg 7 ,rega 
+44c6 20404e1e call hid_malloc_tx_buff 
+44c7 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+44c8 e7e10005 istore 2 ,contw 
+44c9 580002a1 setarg 0x02a1 
+44ca e7e10005 istore 2 ,contw 
+44cb 6fe2cb92 fetch 5 ,mem_mouse_bt_boot_data 
+44cc e7e28005 istore 5 ,contw 
+44cd 20600000 rtn 
+
+mouse_send_empty_data:
+44ce 58000000 setarg 0 
+44cf 67e3c8d4 store 7 ,mem_mouse_key 
+44d0 202044b4 branch mouse_send_data 
+
+mouse_bt_send_keyboard_packet:
+44d1 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
+44d2 203a44f3 branch mouse_bt_release_keyboard_data ,blank 
+44d3 6fe44bde fetch 8 ,mem_customer_key_press + 1 
+
+mouse_bt_send_keyboard_data:
+44d4 67e4095c store 8 ,mem_pdatatemp 
+44d5 6fe0cbdd fetch 1 ,mem_customer_key_press 
+44d6 c001c4e1 beq kb_multikey_report_id ,mouse_bt_send_multimedia_key_data 
+44d7 c00144ea beq kb_system_conctrl_report_id ,mouse_bt_send_systemctrl_key_data 
+44d8 da20000a arg 10 ,rega 
+44d9 20404e1e call hid_malloc_tx_buff 
+44da 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+44db e7e10005 istore 2 ,contw 
+44dc 580001a1 setarg 0x01a1 
+44dd e7e10005 istore 2 ,contw 
+44de 6fe4095c fetch 8 ,mem_pdatatemp 
+44df e7e40005 istore 8 ,contw 
+44e0 20600000 rtn 
+
+mouse_bt_send_multimedia_key_data:
+44e1 da200004 arg 4 ,rega 
+44e2 20404e1e call hid_malloc_tx_buff 
+44e3 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+44e4 e7e10005 istore 2 ,contw 
+44e5 580003a1 setarg 0x03a1 
+44e6 e7e10005 istore 2 ,contw 
+44e7 6fe1095c fetch 2 ,mem_pdatatemp 
+44e8 e7e10005 istore 2 ,contw 
+44e9 20600000 rtn 
+
+mouse_bt_send_systemctrl_key_data:
+44ea da200003 arg 3 ,rega 
+44eb 20404e1e call hid_malloc_tx_buff 
+44ec 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+44ed e7e10005 istore 2 ,contw 
+44ee 580004a1 setarg 0x04a1 
+44ef e7e10005 istore 2 ,contw 
+44f0 6fe0895c fetch 1 ,mem_pdatatemp 
+44f1 e7e08005 istore 1 ,contw 
+44f2 20600000 rtn 
+
+mouse_bt_release_keyboard_data:
+44f3 6fe44be7 fetch 8 ,mem_customer_key_release + 1 
+44f4 202044d4 branch mouse_bt_send_keyboard_data 
+
+mouse_bb_event_timer:
+44f5 44ec401b bpatch patch1b_0 ,mem_patch1b 
+44f6 20403edc call mouse_adc_read 
+44f7 204049a3 call mouse_low_voltage_led_timer 
+44f8 204022e1 call g24_pair_timeout_timer 
+44f9 2040255f call g24_reconn_timeout_timer 
+44fa 2040480b call mouse_24g_long_sleep_param_update_timer 
+44fb 2040490b call mouse_device_poweron_timer 
+44fc 2040493c call mouse_dpi_led_blink_delay_timer 
+44fd 204040bc call mouse_dpi_key_check_long_press 
+44fe 2040450c call mouse_bt_discovery_check 
+44ff 2040451c call mouse_commbination_key_process 
+4500 2040453f call mouse_check_discovery_timeout_timer 
+4501 20404544 call mouse_check_direct_timeout_timer 
+4502 20404552 call mouse_le_enable_att_list_timer 
+4503 2040455f call mouse_le_battery_updata_timer 
+4504 20404555 call mouse_le_send_smp_security_request_timer 
+4505 2040456a call mouse_check_hid_handshake_timer 
+4506 2040456d call mouse_bt_check_sniff_req_timeout_timer 
+4507 20404572 call mouse_check_reconnect_delay_long_sleep 
+4508 20404575 call mouse_current_mult_update_timer 
+4509 20404062 call mouse_wheel_trigger_timer 
+450a 20404587 call mouse_store_information_delay_timer 
+450b 2020457c branch mouse_check_no_data_timeout_timer 
+
+mouse_bt_discovery_check:
+450c 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+450d c29bc50f bbit1 mouse_enable_pb_button_long_press_disconvery ,mouse_bt_discovery_by_pb_button 
+450e 20600000 rtn 
+
+mouse_bt_discovery_by_pb_button:
+450f 6fe0cbaf fetch 1 ,mem_select_device_button_statue 
+4510 c1808000 rtnne pb_button_state_down 
+4511 da604bac arg mem_bt_discovery_count ,regc 
+4512 da404514 arg mouse_long_button_bt_discovery ,regb 
+4513 202031fc branch timer_single_step 
+
+mouse_long_button_bt_discovery:
+4514 6fe0c93d fetch 1 ,mem_device_flag 
+4515 c1000000 rtneq mode_24g_device 
+4516 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4517 c3830000 rtnbit1 mouse_bt_discovery_button_long_down_flag 
+4518 d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
+4519 2040472e call mouse_enable_function_flag 
+451a 204031e6 call app_evt_button_long_pressed 
+451b 2020458e branch mouse_bb_event_discovery_btn 
+
+mouse_commbination_key_process:
+451c 6fe0c93d fetch 1 ,mem_device_flag 
+451d c0004522 beq mode_24g_device ,mouse_24g_commbination_key_process 
+451e 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+451f c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
+4520 6848cbdb fetcht 1 ,mem_mouse_commbination_key_bt 
+4521 20204525 branch mouse_commbination_key_start 
+
+mouse_24g_commbination_key_process:
+4522 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4523 c4190000 rtnbit0 mouse_enable_commbination_key_by_24g_pairing 
+4524 6848cbdc fetcht 1 ,mem_mouse_commbination_key_24g 
+
+mouse_commbination_key_start:
+4525 6048cbae storet 1 ,mem_mouse_commbination_key 
+4526 20404155 call mouse_check_key_gpio 
+4527 1fe17e07 and pdata ,0x07 ,pdata 
+4528 6848cbae fetcht 1 ,mem_mouse_commbination_key 
+4529 98467c00 isub temp ,null 
+452a 2022c531 branch mouse_commbination_key_down ,zero 
+
+mouse_commbination_key_up:
+452b 6fe0c792 fetch 1 ,mem_ui_button_timeout 
+452c 67e0cbb1 store 1 ,mem_combination_ui_button_count 
+452d 6fe0cbb0 fetch 1 ,mem_commbination_key_statue 
+452e c1000000 rtneq commbination_key_state_up 
+452f 704bb000 jam commbination_key_state_up ,mem_commbination_key_statue 
+4530 20600000 rtn 
+
+mouse_commbination_key_down:
+4531 20404536 call mouse_combination_ui_timer 
+4532 6fe0cbb0 fetch 1 ,mem_commbination_key_statue 
+4533 c1008000 rtneq commbination_key_state_down 
+4534 704bb001 jam commbination_key_state_down ,mem_commbination_key_statue 
+4535 2020799c branch check_51cmd_bb_reconn_cancel 
+
+mouse_combination_ui_timer:
+4536 da404866 arg mouse_24g_start_pair_mode ,regb 
+4537 da604bb1 arg mem_combination_ui_button_count ,regc 
+4538 6fe0c93d fetch 1 ,mem_device_flag 
+4539 c00031fc beq mode_24g_device ,timer_single_step 
+453a da404514 arg mouse_long_button_bt_discovery ,regb 
+453b 204031fc call timer_single_step 
+453c 6fe0cbb1 fetch 1 ,mem_combination_ui_button_count 
+453d c000c720 beq 1 ,mouse_bt_discovery_button_down_enable 
+453e 20600000 rtn 
+
+mouse_check_discovery_timeout_timer:
+453f da604ad3 arg mem_mouse_discovery_timer ,regc 
+4540 da404542 arg mouse_check_discovery_timeout ,regb 
+4541 20203203 branch timer_single_step_2b 
+
+mouse_check_discovery_timeout:
+4542 204045b6 call mouse_stop_discovery 
+4543 20203e5a branch mouse_app_enter_hibernate 
+
+mouse_check_direct_timeout_timer:
+4544 da604b88 arg mem_mouse_direct_timer ,regc 
+4545 da40454a arg mouse_check_direct_timeout ,regb 
+4546 20403203 call timer_single_step_2b 
+4547 6fe0cb88 fetch 1 ,mem_mouse_direct_timer 
+4548 c000b275 beq 1 ,app_ble_stop_direct_adv 
+4549 20600000 rtn 
+
+mouse_check_direct_timeout:
+454a 6fe0cad2 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+454b c07fc338 beq 0xff ,mouse_buletooth_fast_conn_end 
+454c 6fe0cac1 fetch 1 ,mem_reconn_times 
+454d 243a474c nbranch mouse_polling_device ,blank 
+454e 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+454f c299c593 bbit1 mouse_enable_bt_reconnect_timeout_enter_discovery ,mouse_start_discovery 
+4550 c297c85e bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_bb_event_reconn_timeout 
+4551 20203e5a branch mouse_app_enter_hibernate 
+
+mouse_le_enable_att_list_timer:
+4552 da604b87 arg mem_le_start_encrypt_timer ,regc 
+4553 da4043ce arg mouse_le_write_enable ,regb 
+4554 202031fc branch timer_single_step 
+
+mouse_le_send_smp_security_request_timer:
+4555 6fe0cad7 fetch 1 ,mem_mouse_le_bb_connected_flag 
+4556 207a0000 rtn blank 
+4557 da604ad9 arg mem_mouse_send_secutiry_request_timer ,regc 
+4558 da40455a arg mouse_le_pairing_sm_start_check ,regb 
+4559 202031fc branch timer_single_step 
+
+mouse_le_pairing_sm_start_check:
+455a 6fe0cad8 fetch 1 ,mem_mouse_le_reconnect_flag 
+455b 247a0000 nrtn blank 
+455c 6fe0c39b fetch 1 ,mem_le_pairing_state 
+455d c1800000 rtnne flag_le_pairing_null 
+455e 2020203d branch le_pairing_sm_start 
+
+mouse_le_battery_updata_timer:
+455f da604b03 arg mem_le_battery_level_updata_timer ,regc 
+4560 da404562 arg mouse_le_battery_level_updata ,regb 
+4561 202031fc branch timer_single_step 
+
+mouse_le_battery_level_updata:
+4562 6fe14b01 fetch 2 ,mem_le_battery_level_updata_timer_init 
+4563 67e14b03 store 2 ,mem_le_battery_level_updata_timer 
+4564 2020440b branch mouse_fill_battery_level_le 
+
+mouse_le_enable_att_list:
+4565 6fe0cb86 fetch 1 ,mem_le_connect_status_flag 
+4566 c3810000 rtnbit1 ll_pairing_success_flag 
+4567 204043ac call mouse_updata_le_param 
+4568 d8e00000 arg write_req_enable_flag ,queue 
+4569 202043b5 branch mouse_le_enable_connect_flag 
+
+mouse_check_hid_handshake_timer:
+456a da60478d arg mem_hid_handshake_timer_count ,regc 
+456b da404464 arg mouse_bt_hid_handshake ,regb 
+456c 202031fc branch timer_single_step 
+
+mouse_bt_check_sniff_req_timeout_timer:
+456d da604b98 arg mem_mouse_bt_send_first_package_timer ,regc 
+456e da404570 arg mouse_bt_send_first_package ,regb 
+456f 202031fc branch timer_single_step 
+
+mouse_bt_send_first_package:
+4570 704b9901 jam 1 ,mem_mouse_bt_send_first_package_flag 
+4571 20600000 rtn 
+
+mouse_check_reconnect_delay_long_sleep:
+4572 da604ad5 arg mem_mouse_bluetooth_reconnect_timeout ,regc 
+4573 da403e5a arg mouse_app_enter_hibernate ,regb 
+4574 202031fc branch timer_single_step 
+
+mouse_current_mult_update_timer:
+4575 da604ac0 arg mem_mouse_current_mult_timer ,regc 
+4576 da404578 arg mouse_current_mult_reinit ,regb 
+4577 202031fc branch timer_single_step 
+
+mouse_current_mult_reinit:
+4578 6fe0cb9b fetch 1 ,mem_lpm_mult_init 
+4579 67e0c177 store 1 ,mem_lpm_mult 
+457a 704abf01 jam 1 ,mem_mouse_long_mult_flag 
+457b 20600000 rtn 
+
+mouse_check_no_data_timeout_timer:
+457c 6fe0c92f fetch 1 ,mem_usb_addr 
+457d c3838000 rtnbit1 7 
+457e da604ac3 arg mem_mouse_no_data_timer ,regc 
+457f da404581 arg mouse_check_no_data_timeout ,regb 
+4580 20203203 branch timer_single_step_2b 
+
+mouse_check_no_data_timeout:
+4581 6fe0c93d fetch 1 ,mem_device_flag 
+4582 c0004820 beq mode_24g_device ,mouse_24g_hibernate_set 
+4583 2020435b branch mouse_disconnect 
+
+mouse_no_data_timer_init:
+4584 6fe14bcf fetch 2 ,mem_mouse_no_data_timeout 
+4585 67e14ac3 store 2 ,mem_mouse_no_data_timer 
+4586 20600000 rtn 
+
+mouse_store_information_delay_timer:
+4587 da6049c4 arg mem_store_information_delay_timer ,regc 
+4588 da40458a arg mouse_store_device_info_check ,regb 
+4589 202031fc branch timer_single_step 
+
+mouse_store_device_info_check:
+458a 20404631 call mouse_store_device_info 
+458b 6fe0cad6 fetch 1 ,mem_mouse_need_soft_reset 
+458c 243a46fe nbranch mouse_soft_reset ,blank 
+458d 20600000 rtn 
+
+mouse_bb_event_discovery_btn:
+458e 280ffe26 isolate1 mark_24g ,mark 
+458f 2040c831 call mouse_24g_stop ,true 
+4590 2040435b call mouse_disconnect 
+4591 204043dd call mouse_le_clean_connect_flag 
+4592 20204593 branch mouse_start_discovery 
+
+mouse_start_discovery:
+4593 44ecc01b bpatch patch1b_1 ,mem_patch1b 
+4594 20404354 call mouse_bluetooth_fast_conn_disable 
+4595 6fe1478f fetch 2 ,mem_ui_state_map 
+4596 c285c59f bbit1 ui_state_ble_adv ,mouse_start_discovery_norandom 
+4597 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4598 c304459f bbit0 mouse_enable_ble_random_addre ,mouse_start_discovery_norandom 
+4599 6849499c fetcht 2 ,mem_random_addr_increase_count 
+459a 18408401 increase 1 ,temp 
+459b 6049499c storet 2 ,mem_random_addr_increase_count 
+459c 6049437b storet 2 ,mem_le_lap + 1 
+459d 180a7e00 random pdata 
+459e 67e0c37a store 1 ,mem_le_lap 
+
+mouse_start_discovery_norandom:
+459f 6fe1cada fetch 3 ,mem_mouse_le_lap_temp 
+45a0 67e1c37d store 3 ,mem_le_lap + 3 
+45a1 20403297 call app_lpm_mult_disable 
+45a2 6fe14794 fetch 2 ,mem_discovery_timeout 
+45a3 67e14ad3 store 2 ,mem_mouse_discovery_timer 
+45a4 7000bc06 jam 6 ,mem_connection_options 
+45a5 58000000 setarg 0 
+45a6 67e14ac3 store 2 ,mem_mouse_no_data_timer 
+45a7 67e0cb88 store 1 ,mem_mouse_direct_timer 
+45a8 67e0cad5 store 1 ,mem_mouse_bluetooth_reconnect_timeout 
+45a9 67e0cbb8 store 1 ,mem_mouse_device_poweron_timer_count 
+45aa 67e0cabd store 1 ,mem_mouse_clear_sensor_data_flag 
+45ab d8e00002 arg mouse_store_eeprom_flag ,queue 
+45ac 2040472e call mouse_enable_function_flag 
+45ad 20404722 call mouse_bt_discovery_button_down_disable 
+45ae 6fe0cbc4 fetch 1 ,mem_mouse_bluetooth_type 
+45af 2feffe01 isolate1 mode_4_mouse ,pdata 
+45b0 2040c41f call mouse_check_51cmd_adv ,true 
+45b1 6fe0cbc4 fetch 1 ,mem_mouse_bluetooth_type 
+45b2 2feffe00 isolate1 mode_3_mouse ,pdata 
+45b3 2040f92f call check_51cmd_start_discovery ,true 
+45b4 204049db call mouse_low_voltage_led_blink_disable 
+45b5 20204919 branch mouse_discover_setting_led_gpio 
+
+mouse_stop_discovery:
+45b6 44ed401b bpatch patch1b_2 ,mem_patch1b 
+45b7 d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
+45b8 20404732 call mouse_disable_function_flag 
+45b9 704ad500 jam 0 ,mem_mouse_bluetooth_reconnect_timeout 
+45ba 6fe0cbc4 fetch 1 ,mem_mouse_bluetooth_type 
+45bb 2feffe01 isolate1 mode_4_mouse ,pdata 
+45bc 2040c5c1 call mouse_stop_le_adv ,true 
+45bd 6fe0cbc4 fetch 1 ,mem_mouse_bluetooth_type 
+45be 2feffe00 isolate1 mode_3_mouse ,pdata 
+45bf 2040c5c3 call mouse_stop_bt3_discovery ,true 
+45c0 2020495f branch mouse_device_led_off 
+
+mouse_stop_le_adv:
+45c1 704b8800 jam 0 ,mem_mouse_direct_timer 
+45c2 2020795f branch check_51cmd_stop_adv 
+
+mouse_stop_bt3_discovery:
+45c3 58000000 setarg 0 
+45c4 67e14ad3 store 2 ,mem_mouse_discovery_timer 
+45c5 20207934 branch check_51cmd_stop_discovery 
+
+mouse_store_remote_bdaddr:
+45c6 44edc01b bpatch patch1b_3 ,mem_patch1b 
+45c7 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+45c8 c4010000 rtnbit0 mouse_store_eeprom_flag 
+45c9 20404913 call mouse_device_poweron_timer_init 
+45ca d8e00002 arg mouse_store_eeprom_flag ,queue 
+45cb 20404732 call mouse_disable_function_flag 
+45cc 204045cf call mouse_check_device_addr 
+
+mouse_unplug_clean_bdaddr:
+45cd 204045e2 call mouse_before_store_reconn_info 
+45ce 2020462e branch mouse_store_device_info_delay 
+
+mouse_check_device_addr:
+45cf 6fe080e7 fetch 1 ,mem_record_bt_mode 
+45d0 c01a45d3 beq rec_4_mode ,mouse_check_le_device_addr 
+45d1 c019c5d6 beq rec_3_mode ,mouse_check_bt_device_addr 
+45d2 20600000 rtn 
+
+mouse_check_le_device_addr:
+45d3 67e0cb89 store 1 ,mem_device_addr_temp 
+45d4 6fe30297 fetch 6 ,mem_le_plap 
+45d5 202045d8 branch mouse_check_bt_device_addr_common 
+
+mouse_check_bt_device_addr:
+45d6 67e0cb89 store 1 ,mem_device_addr_temp 
+45d7 6fe30040 fetch 6 ,mem_plap 
+
+mouse_check_bt_device_addr_common:
+45d8 67e34b8a store 6 ,mem_device_addr_temp + 1 
+45d9 6fe3cb89 fetch 7 ,mem_device_addr_temp 
+45da d8c0493e arg mem_device1_type ,contr 
+45db df200003 arg 3 ,loopcnt 
+
+mouse_check_device_addr_end:
+45dc e8438006 ifetcht 7 ,contr 
+45dd 98467c00 isub temp ,null 
+45de 2022c5f7 branch mouse_clean_addr ,zero 
+45df 18c08c16 increase 22 ,contr 
+45e0 c20045dc loop mouse_check_device_addr_end 
+45e1 20600000 rtn 
+
+mouse_before_store_reconn_info:
+45e2 da20493e arg mem_device1_type ,rega 
+45e3 6fe0c93d fetch 1 ,mem_device_flag 
+45e4 1fe0ffff increase -1 ,pdata 
+45e5 1feffe1d mul32 pdata ,29 ,pdata 
+45e6 9a20a200 iadd rega ,rega 
+45e7 6fe080e7 fetch 1 ,mem_record_bt_mode 
+45e8 e7e08011 istore 1 ,rega 
+45e9 c01a45ec beq rec_4_mode ,mouse_store_le_device 
+45ea c019c5f3 beq rec_3_mode ,mouse_store_bt_device 
+45eb 20600000 rtn 
+
+mouse_store_le_device:
+45ec 6fe30297 fetch 6 ,mem_le_plap 
+45ed e7e30005 istore 6 ,contw 
+45ee d8c04316 arg mem_le_ltk ,contr 
+45ef 20407d7f call memcpy16 
+45f0 6fe3437a fetch 6 ,mem_le_lap 
+45f1 e7e30005 istore 6 ,contw 
+45f2 20600000 rtn 
+
+mouse_store_bt_device:
+45f3 6fe30040 fetch 6 ,mem_plap 
+45f4 e7e30005 istore 6 ,contw 
+45f5 d8c041cb arg mem_link_key ,contr 
+45f6 20207d7f branch memcpy16 
+
+mouse_clean_addr:
+45f7 18c08dfa increase -6 ,contr 
+45f8 18c20a00 copy contr ,contw 
+45f9 684b4b8a fetcht 6 ,mem_device_addr_temp + 1 
+45fa 18408403 increase 3 ,temp 
+45fb e0430005 istoret 6 ,contw 
+45fc 20600000 rtn 
+
+mouse_select_reconn_device:
+45fd da20493e arg mem_device1_type ,rega 
+45fe 6fe0c93d fetch 1 ,mem_device_flag 
+45ff c1000000 rtneq mode_24g_device 
+4600 1fe0ffff increase -1 ,pdata 
+4601 1feffe1d mul32 pdata ,29 ,pdata 
+4602 9a20a200 iadd rega ,rega 
+4603 efe08011 ifetch 1 ,rega 
+4604 67e0c484 store 1 ,mem_xrecord_mode 
+4605 c019c608 beq rec_3_mode ,mouse_load_bt_device 
+4606 c01a460d beq rec_4_mode ,mouse_load_le_device 
+4607 20600000 rtn 
+
+mouse_load_bt_device:
+4608 efe30006 ifetch 6 ,contr 
+
+mouse_load_bt_device_end:
+4609 67e341dd store 6 ,mem_hci_plap 
+460a d8a041cb arg mem_link_key ,contw 
+460b 20407d7f call memcpy16 
+460c 202060d0 branch check_link_key_load 
+
+mouse_load_le_device:
+460d efe30006 ifetch 6 ,contr 
+
+mouse_load_le_device_end:
+460e 67e341dd store 6 ,mem_hci_plap 
+460f d8a04316 arg mem_le_ltk ,contw 
+4610 20407d7f call memcpy16 
+4611 efe30006 ifetch 6 ,contr 
+4612 67e3437a store 6 ,mem_le_lap 
+4613 20600000 rtn 
+
+mouse_app_initflag_check:
+4614 6fe14995 fetch 2 ,mem_store_flag 
+4615 d840aa55 arg eeprom_init_flag ,temp 
+4616 98467c00 isub temp ,null 
+4617 2022c622 branch mouse_load_device_info ,zero 
+4618 60494995 storet 2 ,mem_store_flag 
+4619 20404627 call mouse_ble_init_address 
+461a 6fe0cac5 fetch 1 ,mem_device_flag_temp 
+461b 67e0c93d store 1 ,mem_device_flag 
+461c 6fe0c92b fetch 1 ,mem_config_sensor_dpi 
+461d 67e0c997 store 1 ,mem_mouse_dpi 
+461e 6fe24891 fetch 4 ,mem_24g_fast_conn_addr 
+461f 67e24895 store 4 ,mem_24g_receiver_addr 
+4620 67e2483f store 4 ,mem_24g_addr 
+4621 20600000 rtn 
+
+mouse_load_device_info:
+4622 204045fd call mouse_select_reconn_device 
+4623 6fe24998 fetch 4 ,mem_mouse_24g_addr 
+4624 67e24895 store 4 ,mem_24g_receiver_addr 
+4625 67e2483f store 4 ,mem_24g_addr 
+4626 20600000 rtn 
+
+mouse_ble_init_address:
+4627 6fe3437a fetch 6 ,mem_le_lap 
+4628 67e34955 store 6 ,mem_device1_locall_addr 
+4629 1fe0ff00 add pdata ,0x0100 ,pdata 
+462a 67e34972 store 6 ,mem_device2_locall_addr 
+462b 1fe0ff00 add pdata ,0x0100 ,pdata 
+462c 67e3498f store 6 ,mem_device3_locall_addr 
+462d 20600000 rtn 
+
+mouse_store_device_info_delay:
+462e 6fe0c9c5 fetch 1 ,mem_store_information_delay_timer_init 
+462f 67e0c9c4 store 1 ,mem_store_information_delay_timer 
+4630 20600000 rtn 
+
+mouse_store_device_info:
+4631 44ee401b bpatch patch1b_4 ,mem_patch1b 
+4632 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4633 c289c67f bbit1 mouse_enable_eeprom ,mouse_store_eeprom_device_info 
+4634 c2894643 bbit1 mouse_enable_flash ,mouse_store_flash_device_info 
+4635 20600000 rtn 
+
+mouse_load_flash_info_check:
+4636 20405daf call spid_init_flash 
+4637 2040464a call mouse_spid_flash_release_form_powerdown 
+4638 2040463d call mouse_information_flash_parameters 
+4639 20405dd2 call spid_read_flash 
+463a 20404651 call mouse_spid_flash_powerdown 
+463b 20404614 call mouse_app_initflag_check 
+463c 20203fa5 branch mouse_sensor_spi_init 
+
+mouse_information_flash_parameters:
+463d 580049bd setarg mem_mouse_information_end 
+463e d840493d arg mem_mouse_information_start ,temp 
+463f 98460400 isub temp ,temp 
+4640 6fe1c9bd fetch 3 ,mem_flash_base 
+4641 da20493d arg mem_mouse_information_start ,rega 
+4642 20600000 rtn 
+
+mouse_store_flash_device_info:
+4643 20405daf call spid_init_flash 
+4644 2040464a call mouse_spid_flash_release_form_powerdown 
+4645 2040465f call mouse_flash_erase_sector 
+4646 2040463d call mouse_information_flash_parameters 
+4647 20404662 call mouse_spid_write_flash 
+4648 20404651 call mouse_spid_flash_powerdown 
+4649 20203fa5 branch mouse_sensor_spi_init 
+
+mouse_spid_flash_release_form_powerdown:
+464a 700964ab jam flash_command_release_from_powerdown ,mem_temp 
+
+mouse_spid_write_flash_cmd:
+464b 2040623f call delay_nop100 
+464c 20405db4 call spid_unlock_flash 
+464d da2049c0 arg mem_write_flash_head_temp ,rega 
+464e 68488964 fetcht 1 ,mem_temp 
+464f 20404653 call mouse_spid_write_flash_cmd_common 
+4650 2020623f branch delay_nop100 
+
+mouse_spid_flash_powerdown:
+4651 700964b9 jam flash_command_powerdown ,mem_temp 
+4652 2020464b branch mouse_spid_write_flash_cmd 
+
+mouse_spid_write_flash_cmd_common:
+4653 e0408011 istoret 1 ,rega 
+4654 1ff10400 rshift16 pdata ,temp 
+4655 e0408005 istoret 1 ,contw 
+4656 1fec8400 rshift8 pdata ,temp 
+4657 e0408005 istoret 1 ,contw 
+4658 e7e08005 istore 1 ,contw 
+4659 1a227e00 deposit rega 
+465a 67f1008a store 2 ,core_spid_txaddr 
+465b 58000000 setarg 0 
+465c 67f1008e store 2 ,core_spid_rxlen 
+465d 70800602 jam spid_start ,core_misc_ctrl 
+465e 20205d6e branch wait_spid_done 
+
+mouse_flash_erase_sector:
+465f 6fe1c9bd fetch 3 ,mem_flash_base 
+4660 67e1c4a7 store 3 ,mem_spi_write_addr 
+4661 20205d8a branch spid_flash_erase_sector + 2 
+
+mouse_spid_write_flash:
+4662 1fe22600 copy pdata ,regc 
+4663 1a227e00 copy rega ,pdata 
+4664 1fe0fffc increase -4 ,pdata 
+4665 1fe22400 copy pdata ,regb 
+4666 efe20012 ifetch 4 ,regb 
+4667 67e249c0 store 4 ,mem_write_flash_head_temp 
+4668 1a627e00 copy regc ,pdata 
+4669 20405dc1 call spid_write_flash 
+466a 6fe249c0 fetch 4 ,mem_write_flash_head_temp 
+466b e7e20012 istore 4 ,regb 
+466c 20600000 rtn 
+
+mouse_flash_power_down:
+466d 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+466e c4090000 rtnbit0 mouse_enable_flash 
+466f 20404651 call mouse_spid_flash_powerdown 
+4670 20405b66 call twspi_enable 
+4671 6848c4b7 fetcht 1 ,mem_spi_cs_gpio 
+4672 20406109 call gpio_out_inactive 
+4673 6848c4bc fetcht 1 ,mem_spi_hold_gpio 
+4674 20203f94 branch mouse_gpio_config_input_pd 
+
+mouse_load_eeprom_info_check:
+4675 20405e42 call iicd_read_init_pin 
+4676 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4677 2feffe09 isolate1 mouse_enable_2k_eeprom ,pdata 
+4678 2440de5c ncall clear_eeprom_size_2k ,true 
+4679 2040467b call mouse_eeprom_load_recon_info 
+467a 20204614 branch mouse_app_initflag_check 
+
+mouse_eeprom_load_recon_info:
+467b d8400080 arg 128 ,temp 
+467c da20493d arg mem_device_flag ,rega 
+467d da400000 arg mouse_info_eeprom_offect ,regb 
+467e 20205e79 branch iicd_read_eep_data 
+
+mouse_store_eeprom_device_info:
+467f d8400080 arg 128 ,temp 
+4680 da20493d arg mem_device_flag ,rega 
+4681 da400000 arg mouse_info_eeprom_offect ,regb 
+4682 20205e6b branch iicd_write_protect_eep_data 
+
+mouse_store_eerpom_dpi:
+4683 d8400001 arg 1 ,temp 
+4684 da204997 arg mem_mouse_dpi ,rega 
+4685 da40005a arg mouse_dpi_eeprom_offect ,regb 
+4686 20205e6b branch iicd_write_protect_eep_data 
+
+mouse_load_eeprom_dpi:
+4687 d8400001 arg 1 ,temp 
+4688 da204997 arg mem_mouse_dpi ,rega 
+4689 da40005a arg mouse_dpi_eeprom_offect ,regb 
+468a 20205e79 branch iicd_read_eep_data 
+
+mouse_idle:
+468b 44eec01b bpatch patch1b_5 ,mem_patch1b 
+468c 204049dd call mouse_low_voltage_led_no_enter_lpm 
+468d 204079a1 call ui_check_paring_button 
+468e 20404067 call mouse_dpi_check 
+468f 20404693 call mouse_select_device_check 
+4690 204046de call mouse_check_select_device_by_switch 
+4691 20404714 call mouse_bt_button_check 
+4692 20203fc8 branch mouse_wheel_check 
+
+mouse_select_device_check:
+4693 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4694 c294c698 bbit1 mouse_enable_select_device_by_pb_button ,mouse_select_device_by_pb_button 
+4695 c29bc698 bbit1 mouse_enable_pb_button_long_press_disconvery ,mouse_select_device_by_pb_button 
+4696 20600000 rtn 
+
+mouse_select_device_by_pb_button_check_once:
+4697 704ba503 jam 0x03 ,mem_mouse_pbkey_press_status 
+
+mouse_select_device_by_pb_button:
+4698 6fe0c91f fetch 1 ,mem_config_select_device_button_gpio 
+4699 c17f8000 rtneq gpio_disable 
+469a da200000 arg 0 ,rega 
+469b 704ba706 jam mouse_pb_key ,mem_mouse_key_temp 
+469c 6848c91f fetcht 1 ,mem_config_select_device_button_gpio 
+469d 204046a8 call mouse_pb_button_check 
+469e 67e0cba5 store 1 ,mem_mouse_pbkey_press_status 
+469f 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+46a0 c07fc6a5 beq gpio_disable ,mouse_3io6key_pb_button_check_end 
+46a1 204041a8 call mouse_matrix_public_gpio_reset 
+
+mouse_select_device_by_pb_button_exit:
+46a2 1a227e00 copy rega ,pdata 
+46a3 c28346c9 bbit1 mouse_pb_key ,mouse_select_device_button_down 
+46a4 202046be branch mouse_select_device_button_up 
+
+mouse_3io6key_pb_button_check_end:
+46a5 6848c91f fetcht 1 ,mem_config_select_device_button_gpio 
+46a6 20403f96 call mouse_gpio_config_input_pu 
+46a7 202046a2 branch mouse_select_device_by_pb_button_exit 
+
+mouse_pb_button_check:
+46a8 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+46a9 c296c6b4 bbit1 mouse_enable_pb_button_connect_gnd ,mouse_pb_button_connect_gnd 
+46aa 6fe0cba5 fetch 1 ,mem_mouse_pbkey_press_status 
+46ab 1fe22600 copy pdata ,regc 
+46ac 6fe0c914 fetch 1 ,mem_matrix_public_gpio 
+46ad c07fc1d5 beq gpio_disable ,mouse_3io6key_check 
+46ae 6fe0cbab fetch 1 ,mem_mouse_ghost_flag 
+46af 243a46b1 nbranch mouse_select_device_by_pb_button_end ,blank 
+46b0 202046b6 branch mouse_pb_button_connect_matrix 
+
+mouse_select_device_by_pb_button_end:
+46b1 704baf00 jam pb_button_state_up ,mem_select_device_button_statue 
+46b2 704ba500 jam 0 ,mem_mouse_pbkey_press_status 
+46b3 20600000 rtn 
+
+mouse_pb_button_connect_gnd:
+46b4 6fe0cba5 fetch 1 ,mem_mouse_pbkey_press_status 
+46b5 202041c7 branch mouse_check_key_connect_gnd 
+
+mouse_pb_button_connect_matrix:
+46b6 204060fd call gpio_get_bit 
+46b7 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+46b8 2020c6b4 branch mouse_pb_button_connect_gnd ,true 
+46b9 6848c914 fetcht 1 ,mem_matrix_public_gpio 
+46ba 2040610d call gpio_out_active 
+46bb 6848c91f fetcht 1 ,mem_config_select_device_button_gpio 
+46bc 6fe0cba5 fetch 1 ,mem_mouse_pbkey_press_status 
+46bd 202041c7 branch mouse_check_key_connect_gnd 
+
+mouse_select_device_button_up:
+46be 6fe0cbaf fetch 1 ,mem_select_device_button_statue 
+46bf c1000000 rtneq pb_button_state_up 
+46c0 704baf00 jam pb_button_state_up ,mem_select_device_button_statue 
+46c1 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+46c2 c39a0000 rtnbit1 mouse_enable_pb_button_short_press_enter_discovery 
+46c3 6fe0cbac fetch 1 ,mem_bt_discovery_count 
+46c4 1fe67c14 sub pdata ,20 ,null 
+46c5 244146f3 ncall mouse_ready_reconnection_by_button ,positive 
+46c6 6fe0c792 fetch 1 ,mem_ui_button_timeout 
+46c7 67e0cbac store 1 ,mem_bt_discovery_count 
+46c8 20600000 rtn 
+
+mouse_select_device_button_down:
+46c9 204046d5 call mouse_select_device_ghost_check 
+46ca 20740000 rtn user 
+46cb 6fe0cbaf fetch 1 ,mem_select_device_button_statue 
+46cc c1008000 rtneq pb_button_state_down 
+46cd 704baf01 jam pb_button_state_down ,mem_select_device_button_statue 
+46ce 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+46cf c29a4514 bbit1 mouse_enable_pb_button_short_press_enter_discovery ,mouse_long_button_bt_discovery 
+46d0 6fe0cb88 fetch 1 ,mem_mouse_direct_timer 
+46d1 207a0000 rtn blank 
+46d2 6fe0c906 fetch 1 ,mem_mouse_direct_timeout 
+46d3 67e0cb88 store 1 ,mem_mouse_direct_timer 
+46d4 20600000 rtn 
+
+mouse_select_device_ghost_check:
+46d5 78547c00 disable user 
+46d6 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+46d7 c3968000 rtnbit1 mouse_enable_pb_button_connect_gnd 
+46d8 6fe0cb9f fetch 1 ,mem_mouse_lkey_press_status 
+46d9 207a0000 rtn blank 
+46da 6fe0cba0 fetch 1 ,mem_mouse_rkey_press_status 
+46db 207a0000 rtn blank 
+46dc 78347c00 enable user 
+46dd 20600000 rtn 
+
+mouse_check_select_device_by_switch:
+46de 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+46df c29546e2 bbit1 mouse_enable_select_device_by_switch_gpio ,mouse_check_select_device_by_switch_gpio 
+46e0 c295bedc bbit1 mouse_enable_select_device_by_switch_adc ,mouse_adc_read 
+46e1 20600000 rtn 
+
+mouse_check_select_device_by_switch_gpio:
+46e2 6848c922 fetcht 1 ,mem_device_switch_gpio 
+46e3 20403f96 call mouse_gpio_config_input_pu 
+46e4 6848c922 fetcht 1 ,mem_device_switch_gpio 
+46e5 204060fd call gpio_get_bit 
+46e6 2020c6eb branch mouse_check_select_24gdevice ,true 
+
+mouse_select_btdevice:
+46e7 6fe0c93d fetch 1 ,mem_device_flag 
+46e8 c1008000 rtneq mode_bt_device1 
+46e9 70493d01 jam mode_bt_device1 ,mem_device_flag 
+46ea 20204356 branch mouse_stop_bluetooth_mode 
+
+mouse_check_select_24gdevice:
+46eb 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+46ec c315c6ef bbit0 mouse_enable_select_device_by_switch_adc ,mouse_check_select_24g_device 
+46ed 6fe348f3 fetch 6 ,mem_mouse_vdd_switch_gnd_full_vol 
+46ee 67e348e7 store 6 ,mem_mouse_vdd_calculate_set 
+
+mouse_check_select_24g_device:
+46ef 6fe0c93d fetch 1 ,mem_device_flag 
+46f0 c1000000 rtneq mode_24g_device 
+46f1 70493d00 jam mode_24g_device ,mem_device_flag 
+46f2 20204831 branch mouse_24g_stop 
+
+mouse_ready_reconnection_by_button:
+46f3 44ef401b bpatch patch1b_6 ,mem_patch1b 
+46f4 6fe0cbc5 fetch 1 ,mem_device_number 
+46f5 c1008000 rtneq 1 
+46f6 20404700 call mouse_select_device_number 
+46f7 6048c93d storet 1 ,mem_device_flag 
+
+mouse_store_device_number_before_reset:
+46f8 7041ca00 jam 0 ,mem_link_key_exists 
+46f9 20404718 call mouse_select_device_enable 
+46fa 20404356 call mouse_stop_bluetooth_mode 
+46fb 2040471a call mouse_select_device_disable 
+46fc 704ad601 jam 1 ,mem_mouse_need_soft_reset 
+46fd 2020462e branch mouse_store_device_info_delay 
+
+mouse_soft_reset:
+46fe 20404718 call mouse_select_device_enable 
+46ff 20205e29 branch soft_reset_chip 
+
+mouse_select_device_number:
+4700 6848c93d fetcht 1 ,mem_device_flag 
+4701 18408401 increase 1 ,temp 
+4702 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4703 c288c707 bbit1 mouse_enable_24g ,mouse_select_device_number_24g 
+4704 18467c02 sub temp ,2 ,null 
+4705 2441470e ncall mouse_select_device_count_clean_bt ,positive 
+4706 20600000 rtn 
+
+mouse_select_device_number_24g:
+4707 6fe0cbc5 fetch 1 ,mem_device_number 
+4708 1fe0ffff increase -1 ,pdata 
+4709 98467c00 isub temp ,null 
+470a 2441470c ncall mouse_select_device_count_clean_24g ,positive 
+470b 20600000 rtn 
+
+mouse_select_device_count_clean_24g:
+470c d8400000 arg 0 ,temp 
+470d 20600000 rtn 
+
+mouse_select_device_count_clean_bt:
+470e d8400001 arg 1 ,temp 
+470f 20600000 rtn 
+
+mouse_store_device_number2eeprom:
+4710 d8400001 arg 1 ,temp 
+4711 da20493d arg mem_device_flag ,rega 
+4712 da400000 arg 0 ,regb 
+4713 20205e6b branch iicd_write_protect_eep_data 
+
+mouse_bt_button_check:
+4714 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4715 c41a0000 rtnbit0 mouse_enable_pb_button_short_press_enter_discovery 
+4716 20404698 call mouse_select_device_by_pb_button 
+4717 20600000 rtn 
+
+mouse_select_device_enable:
+4718 d8e00000 arg mouse_select_device_flag ,queue 
+4719 2020472e branch mouse_enable_function_flag 
+
+mouse_select_device_disable:
+471a d8e00000 arg mouse_select_device_flag ,queue 
+471b 20204732 branch mouse_disable_function_flag 
+
+mouse_bt_cannel_reconn_enable:
+471c d8e00003 arg mouse_bt_cannel_reconn_flag ,queue 
+471d 2020472e branch mouse_enable_function_flag 
+
+mouse_bt_cannel_reconn_disable:
+471e d8e00003 arg mouse_bt_cannel_reconn_flag ,queue 
+471f 20204732 branch mouse_disable_function_flag 
+
+mouse_bt_discovery_button_down_enable:
+4720 d8e00005 arg mouse_bt_discovery_button_down_flag ,queue 
+4721 2020472e branch mouse_enable_function_flag 
+
+mouse_bt_discovery_button_down_disable:
+4722 d8e00005 arg mouse_bt_discovery_button_down_flag ,queue 
+4723 20204732 branch mouse_disable_function_flag 
+
+mouse_adc_read_enable:
+4724 d8e00014 arg mouse_enable_adc ,queue 
+4725 2020472e branch mouse_enable_function_flag 
+
+mouse_24g_set_250hz:
+4726 d8e00018 arg mouse_enable_24g_250hz ,queue 
+4727 2020472e branch mouse_enable_function_flag 
+
+mouse_24g_search_dongle_enable:
+4728 d8e00016 arg mouse_enable_24g_search_dongle ,queue 
+4729 2020472e branch mouse_enable_function_flag 
+
+mouse_16m_enable:
+472a d8e0000c arg mouse_enable_16m ,queue 
+472b 2020472e branch mouse_enable_function_flag 
+
+mouse_dpi_4level_enable:
+472c d8e0001c arg mouse_enable_dpi_level_4 ,queue 
+472d 2020472e branch mouse_enable_function_flag 
+
+mouse_enable_function_flag:
+472e 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+472f f9207e00 qset1 pdata 
+4730 67e44bbc store mouse_flag_len ,mem_mouse_flag 
+4731 20600000 rtn 
+
+mouse_disable_function_flag:
+4732 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4733 f93ffe00 qset0 pdata 
+4734 67e44bbc store mouse_flag_len ,mem_mouse_flag 
+4735 20600000 rtn 
+
+mouse_customer_key_enable:
+4736 d8e00015 arg mouse_enable_keyboard ,queue 
+4737 2040472e call mouse_enable_function_flag 
+4738 58000000 setarg 0 
+4739 67e44bdd store 8 ,mem_customer_key_press 
+473a 67e44be6 store 8 ,mem_customer_key_release 
+473b 6fe0c90e fetch 1 ,mem_mouse_enable_flag 
+473c 1fe17ec0 and pdata ,0xc0 ,pdata 
+473d c0204743 beq 0x40 ,mouse_customer_key_ctrl_alt_a 
+473e c0404745 beq 0x80 ,mouse_customer_ac_home 
+473f c060474a beq 0xc0 ,mouse_customer_key_play 
+4740 58070008 setarg 0x070008 
+
+mouse_customer_standrad_key_set:
+4741 67e44bde store 8 ,mem_customer_key_press + 1 
+4742 20600000 rtn 
+
+mouse_customer_key_ctrl_alt_a:
+4743 58040005 setarg 0x040005 
+4744 20204741 branch mouse_customer_standrad_key_set 
+
+mouse_customer_ac_home:
+4745 58022303 setarg 0x022303 
+
+mouse_customer_media_key_set:
+4746 67e44bdd store 8 ,mem_customer_key_press 
+4747 58000003 setarg 0x03 
+4748 67e44be6 store 8 ,mem_customer_key_release 
+4749 20600000 rtn 
+
+mouse_customer_key_play:
+474a 5800cd03 setarg 0x00cd03 
+474b 20204746 branch mouse_customer_media_key_set 
+
+mouse_polling_device:
+474c 44efc01b bpatch patch1b_7 ,mem_patch1b 
+474d 6fe0cac1 fetch 1 ,mem_reconn_times 
+474e 1fe0ffff increase -1 ,pdata 
+474f 67e0cac1 store 1 ,mem_reconn_times 
+4750 6848c93d fetcht 1 ,mem_device_flag 
+4751 18467c01 sub temp ,1 ,null 
+4752 2442c700 ncall mouse_select_device_number ,zero 
+4753 6048c93d storet 1 ,mem_device_flag 
+4754 7041ca00 jam 0 ,mem_link_key_exists 
+4755 20404710 call mouse_store_device_number2eeprom 
+4756 204045e2 call mouse_before_store_reconn_info 
+4757 20203e1c branch mouse_start_reconnect_device 
+
+mouse_drawing_optima:
+4758 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4759 c41c0000 rtnbit0 mouse_enable_smoother 
+475a 6fe248d5 fetch 4 ,mem_mouse_x 
+475b 207a0000 rtn blank 
+475c 204047fb call mouse_data_abs_check 
+475d 58000003 setarg 0x03 
+475e 204047f1 call mouse_pdata_greater_than_check 
+475f 205a47ed call mouse_disable_asm ,blank 
+4760 245a47ef ncall mouse_enable_asm ,blank 
+4761 58000002 setarg 0x02 
+4762 204047f6 call mouse_data_less_than_check 
+4763 205a47ed call mouse_disable_asm ,blank 
+4764 6fe0c9ce fetch 1 ,mem_mouse_asm_flag 
+4765 c000c76b beq 1 ,mouse_drawing_optima_modify 
+
+mouse_drawing_optima_init:
+4766 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4767 c41c0000 rtnbit0 mouse_enable_smoother 
+4768 df200005 arg 5 ,loopcnt 
+4769 d8a049ce arg mem_mouse_asm_flag ,contw 
+476a 20207d9b branch clear_mem 
+
+mouse_drawing_optima_modify:
+476b 2040477f call mouse_drawing_optima_xy_offset_modify 
+476c 6fe149cf fetch 2 ,mem_mouse_x_pre 
+476d 67e109f8 store 2 ,mem_data_pre 
+476e 6fe148d5 fetch 2 ,mem_mouse_x 
+476f 67e109fa store 2 ,mem_data_current 
+4770 204047b7 call mouse_drawing_optima_data_x 
+4771 6fe109f8 fetch 2 ,mem_data_pre 
+4772 67e149cf store 2 ,mem_mouse_x_pre 
+4773 6fe109fa fetch 2 ,mem_data_current 
+4774 67e148d5 store 2 ,mem_mouse_x 
+4775 6fe149d1 fetch 2 ,mem_mouse_y_pre 
+4776 67e109f8 store 2 ,mem_data_pre 
+4777 6fe148d7 fetch 2 ,mem_mouse_y 
+4778 67e109fa store 2 ,mem_data_current 
+4779 204047bf call mouse_drawing_optima_data_y 
+477a 6fe109f8 fetch 2 ,mem_data_pre 
+477b 67e149d1 store 2 ,mem_mouse_y_pre 
+477c 6fe109fa fetch 2 ,mem_data_current 
+477d 67e148d7 store 2 ,mem_mouse_y 
+477e 20600000 rtn 
+
+mouse_drawing_optima_xy_offset_modify:
+477f 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4780 c41c8000 rtnbit0 mouse_enable_xy_offset 
+4781 6fe149cf fetch 2 ,mem_mouse_x_pre 
+4782 67e109ff store 2 ,mem_data_value 
+4783 20404792 call mouse_pre_xy_data_judge 
+4784 67e149cf store 2 ,mem_mouse_x_pre 
+4785 6fe148d5 fetch 2 ,mem_mouse_x 
+4786 67e109ff store 2 ,mem_data_value 
+4787 204047a0 call mouse_current_xy_data_judge 
+4788 67e148d5 store 2 ,mem_mouse_x 
+4789 6fe149d1 fetch 2 ,mem_mouse_y_pre 
+478a 67e109ff store 2 ,mem_data_value 
+478b 20404792 call mouse_pre_xy_data_judge 
+478c 67e149d1 store 2 ,mem_mouse_y_pre 
+478d 6fe148d7 fetch 2 ,mem_mouse_y 
+478e 67e109ff store 2 ,mem_data_value 
+478f 204047a0 call mouse_current_xy_data_judge 
+4790 67e148d7 store 2 ,mem_mouse_y 
+4791 20600000 rtn 
+
+mouse_pre_xy_data_judge:
+4792 6fe08a00 fetch 1 ,mem_data_value + 1 
+4793 203a4795 branch mouse_pre_xy_pdata_offset ,blank 
+4794 2020479a branch mouse_pre_xy_ndata_offset 
+
+mouse_pre_xy_pdata_offset:
+4795 6fe089ff fetch 1 ,mem_data_value 
+4796 204047ad call mouse_pre_xy_get_0_4_times 
+4797 67e089ff store 1 ,mem_data_value 
+
+mouse_xy_data_offset_new:
+4798 6fe109ff fetch 2 ,mem_data_value 
+4799 20600000 rtn 
+
+mouse_pre_xy_ndata_offset:
+479a 6fe089ff fetch 1 ,mem_data_value 
+479b 204047e9 call mouse_pdata_invert 
+479c 204047ad call mouse_pre_xy_get_0_4_times 
+479d 205a7ecf call disable_blank ,blank 
+479e 204047e5 call mouse_pdata_get_new_value 
+479f 20204798 branch mouse_xy_data_offset_new 
+
+mouse_current_xy_data_judge:
+47a0 6fe08a00 fetch 1 ,mem_data_value + 1 
+47a1 203a47a3 branch mouse_current_xy_pdata_offset ,blank 
+47a2 202047a7 branch mouse_current_xy_ndata_offset 
+
+mouse_current_xy_pdata_offset:
+47a3 6fe089ff fetch 1 ,mem_data_value 
+47a4 204047b2 call mouse_current_xy_get_0_6_times 
+47a5 67e089ff store 1 ,mem_data_value 
+47a6 20204798 branch mouse_xy_data_offset_new 
+
+mouse_current_xy_ndata_offset:
+47a7 6fe089ff fetch 1 ,mem_data_value 
+47a8 204047e9 call mouse_pdata_invert 
+47a9 204047b2 call mouse_current_xy_get_0_6_times 
+47aa 205a7ecf call disable_blank ,blank 
+47ab 204047e5 call mouse_pdata_get_new_value 
+47ac 20204798 branch mouse_xy_data_offset_new 
+
+mouse_pre_xy_get_0_4_times:
+47ad 1feffe04 mul32 pdata ,4 ,pdata 
+47ae 1fe6fc05 div pdata ,5 
+47af 20407e64 call wait_div_end 
+47b0 1807fe00 quotient pdata 
+47b1 20600000 rtn 
+
+mouse_current_xy_get_0_6_times:
+47b2 1feffe0c mul32 pdata ,12 ,pdata 
+47b3 1fe6fc0a div pdata ,10 
+47b4 20407e64 call wait_div_end 
+47b5 1807fe00 quotient pdata 
+47b6 20600000 rtn 
+
+mouse_drawing_optima_data_x:
+47b7 6fe109f8 fetch 2 ,mem_data_pre 
+47b8 684909fa fetcht 2 ,mem_data_current 
+47b9 9840fe00 iadd temp ,pdata 
+47ba 6848c9d3 fetcht 1 ,mem_mouse_data_xtemp 
+47bb 9840fe00 iadd temp ,pdata 
+47bc 1fe10401 and pdata ,0x01 ,temp 
+47bd 6048c9d3 storet 1 ,mem_mouse_data_xtemp 
+47be 202047c7 branch mouse_drawing_optima_data 
+
+mouse_drawing_optima_data_y:
+47bf 6fe109f8 fetch 2 ,mem_data_pre 
+47c0 684909fa fetcht 2 ,mem_data_current 
+47c1 9840fe00 iadd temp ,pdata 
+47c2 6848c9d4 fetcht 1 ,mem_mouse_data_ytemp 
+47c3 9840fe00 iadd temp ,pdata 
+47c4 1fe10401 and pdata ,0x01 ,temp 
+47c5 6048c9d4 storet 1 ,mem_mouse_data_ytemp 
+47c6 202047c7 branch mouse_drawing_optima_data 
+
+mouse_drawing_optima_data:
+47c7 67e189fc store 3 ,mem_data_sum 
+47c8 2feffe10 isolate1 16 ,pdata 
+47c9 2020c7d1 branch mouse_data_sum_overflow ,true 
+47ca 6fe089fd fetch 1 ,mem_data_sum + 1 
+47cb c07fc7d8 beq 0xff ,mouse_data_sum_n 
+47cc 6fe089fc fetch 1 ,mem_data_sum 
+
+mouse_data_store_pre:
+47cd 1fe37e00 rshift pdata ,pdata 
+47ce 67e109f8 store 2 ,mem_data_pre 
+47cf 67e109fa store 2 ,mem_data_current 
+47d0 20600000 rtn 
+
+mouse_data_sum_overflow:
+47d1 6fe089fd fetch 1 ,mem_data_sum + 1 
+47d2 c00047d5 beq 0 ,mouse_data_sum_overflow_p 
+47d3 6fe189fc fetch 3 ,mem_data_sum 
+47d4 202047cd branch mouse_data_store_pre 
+
+mouse_data_sum_overflow_p:
+47d5 7009fe00 jam 0 ,mem_data_sum + 2 
+47d6 6fe089fc fetch 1 ,mem_data_sum 
+47d7 202047cd branch mouse_data_store_pre 
+
+mouse_data_sum_n:
+47d8 6fe089fc fetch 1 ,mem_data_sum 
+47d9 204047e3 call mouse_pdata_get_half 
+47da 67e089f8 store 1 ,mem_data_pre 
+47db 67e089fa store 1 ,mem_data_current 
+47dc 203a47e1 branch mouse_data_zero ,blank 
+47dd 580000ff setarg 0xff 
+
+mouse_data_set_direction:
+47de 67e089f9 store 1 ,mem_data_pre + 1 
+47df 67e089fb store 1 ,mem_data_current + 1 
+47e0 20600000 rtn 
+
+mouse_data_zero:
+47e1 58000000 setarg 0 
+47e2 202047de branch mouse_data_set_direction 
+
+mouse_pdata_get_half:
+47e3 204047e9 call mouse_pdata_invert 
+47e4 1fe37e00 rshift pdata ,pdata 
+
+mouse_pdata_get_new_value:
+47e5 204047ea call mouse_rega_in_out 
+47e6 1fe67e00 sub pdata ,0 ,pdata 
+47e7 67e089ff store 1 ,mem_data_value 
+47e8 20600000 rtn 
+
+mouse_pdata_invert:
+47e9 1fe67e00 sub pdata ,0 ,pdata 
+
+mouse_rega_in_out:
+47ea 67e08970 store 1 ,mem_rega 
+47eb 6fe08970 fetch 1 ,mem_rega 
+47ec 20600000 rtn 
+
+mouse_disable_asm:
+47ed 7049ce00 jam 0 ,mem_mouse_asm_flag 
+47ee 20600000 rtn 
+
+mouse_enable_asm:
+47ef 7049ce01 jam 1 ,mem_mouse_asm_flag 
+47f0 20600000 rtn 
+
+mouse_pdata_greater_than_check:
+47f1 9a267c00 isub rega ,null 
+47f2 24217ecf nbranch disable_blank ,positive 
+47f3 9a467c00 isub regb ,null 
+47f4 24217ecf nbranch disable_blank ,positive 
+47f5 20207ed1 branch enable_blank 
+
+mouse_data_less_than_check:
+47f6 9a267c00 isub rega ,null 
+47f7 24610000 nrtn positive 
+47f8 9a467c00 isub regb ,null 
+47f9 24610000 nrtn positive 
+47fa 20207ed1 branch enable_blank 
+
+mouse_data_abs_check:
+47fb 6fe148d5 fetch 2 ,mem_mouse_x 
+47fc 20404802 call mouse_data_abs 
+47fd 1fe22200 copy pdata ,rega 
+47fe 6fe148d7 fetch 2 ,mem_mouse_y 
+47ff 20404802 call mouse_data_abs 
+4800 1fe22400 copy pdata ,regb 
+4801 20600000 rtn 
+
+mouse_data_abs:
+4802 67e109fa store 2 ,mem_data_current 
+4803 6fe089fb fetch 1 ,mem_data_current + 1 
+4804 c07fc808 beq 0xff ,mouse_data_reversal 
+4805 6fe089fa fetch 1 ,mem_data_current 
+
+mouse_data_abs_store:
+4806 1fe17eff and_into 0xff ,pdata 
+4807 20600000 rtn 
+
+mouse_data_reversal:
+4808 6fe109fa fetch 2 ,mem_data_current 
+4809 1fe67e00 sub pdata ,0 ,pdata 
+480a 20204806 branch mouse_data_abs_store 
+
+mouse_24g_long_sleep_param_update_timer:
+480b da6048c8 arg mem_24g_long_sleep_param_update_timer ,regc 
+480c da40480e arg mouse_24g_long_sleep_normal_param ,regb 
+480d 202031fc branch timer_single_step 
+
+mouse_24g_long_sleep_normal_param:
+480e 6fe248bc fetch 4 ,mem_24g_long_sleep_set1 
+480f 67e2485f store 4 ,mem_24g_enter_hibernate 
+4810 704abf01 jam 1 ,mem_mouse_long_mult_flag 
+4811 20600000 rtn 
+
+mouse_24g_long_sleep_set:
+4812 6fe0cbf3 fetch 1 ,mem_24g_long_sleep_set_level 
+4813 c000481a beq 0x00 ,mouse_24g_long_sleep_set_30ms 
+4814 c000c81c beq 0x01 ,mouse_24g_long_sleep_set_50ms 
+4815 c0014817 beq 0x02 ,mouse_24g_long_sleep_set_80ms 
+4816 c001c81e beq 0x03 ,mouse_24g_long_sleep_set_100ms 
+
+mouse_24g_long_sleep_set_80ms:
+4817 580ea600 setarg 0x0ea600 
+
+mouse_24g_long_sleep_set_end:
+4818 67e248bc store 4 ,mem_24g_long_sleep_set1 
+4819 20600000 rtn 
+
+mouse_24g_long_sleep_set_30ms:
+481a 5805e740 setarg 0x05e740 
+481b 20204818 branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_long_sleep_set_50ms:
+481c 580927c0 setarg 0x0927c0 
+481d 20204818 branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_long_sleep_set_100ms:
+481e 58124f80 setarg 0x124f80 
+481f 20204818 branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_hibernate_set:
+4820 7048a900 jam 0 ,mem_24g_attempt_fail_flag 
+4821 20402659 call g24_transmit_next_packet 
+4822 5fffffff setarg -1 
+4823 67e2485f store 4 ,mem_24g_enter_hibernate 
+4824 58000000 setarg 0 
+4825 67e3c8d4 store 7 ,mem_mouse_key 
+4826 704bf201 jam 1 ,mem_sensor_shutdown_flag 
+4827 2040427c call mouse_sensor_powerdown 
+4828 20403e6a call mouse_setgpio_hibernate 
+4829 202026bc branch g24_long_sleep 
+
+mouse_wakeup_24g:
+482a 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+482b 245a41ea ncall mouse_init_sensor_wakeup ,blank 
+482c 704bf200 jam 0 ,mem_sensor_shutdown_flag 
+482d 20202658 branch g24_transmit_no_ack 
+
+mouse_24g_transmit_start:
+482e 6fe0cbf2 fetch 1 ,mem_sensor_shutdown_flag 
+482f 243a2633 nbranch g24_short_sleep ,blank 
+4830 2020262f branch g24_transmit_start_next 
+
+mouse_24g_stop:
+4831 793f8026 set0 mark_24g ,mark 
+4832 7048a500 jam state_24g_stop ,mem_24g_conn_sm 
+4833 d8e00001 arg mouse_24g_pairing_flag ,queue 
+4834 20204732 branch mouse_disable_function_flag 
+
+mouse_24g_start_mode:
+4835 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4836 c308c842 bbit0 mouse_enable_24g ,mouse_24g_mode_setup_error 
+4837 20403e28 call mouse_wakeup_from_power_check 
+4838 20344845 branch mouse_24g_reconn_dongle_start ,user 
+4839 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+483a c298484b bbit1 mouse_enable_auto_24g_paring ,mouse_24g_reconn_general_dongle 
+483b c318c84b bbit0 mouse_enable_24g_power_on_pairing ,mouse_24g_reconn_general_dongle 
+483c 20404150 call mouse_key_check_once 
+483d 1fe17e07 and pdata ,0x07 ,pdata 
+483e 6848cbdc fetcht 1 ,mem_mouse_commbination_key_24g 
+483f 98467c00 isub temp ,null 
+4840 2022c866 branch mouse_24g_start_pair_mode ,zero 
+4841 2020484b branch mouse_24g_reconn_general_dongle 
+
+mouse_24g_mode_setup_error:
+4842 6fe0cac1 fetch 1 ,mem_reconn_times 
+4843 243a474c nbranch mouse_polling_device ,blank 
+4844 20600000 rtn 
+
+mouse_24g_reconn_dongle_start:
+4845 6fe14889 fetch 2 ,mem_24g_reconn_timeout_init 
+4846 67e1488b store 2 ,mem_24g_reconn_timeout 
+4847 70488f03 jam receiver_and_3_0_addr ,mem_24g_reconn_type 
+4848 20202562 branch g24_reconn_start 
+
+mouse_24g_first_start_auto_pair_mode:
+4849 20403e28 call mouse_wakeup_from_power_check 
+484a 20344855 branch mouse_24g_first_start_reconn ,user 
+
+mouse_24g_reconn_general_dongle:
+484b 70493d00 jam mode_24g_device ,mem_device_flag 
+484c 6fe14bcb fetch 2 ,mem_mouse_24g_power_on_fast_conn_timer 
+484d 67e1488b store 2 ,mem_24g_reconn_timeout 
+484e 70488f02 jam fast_conn_and_3_0_addr ,mem_24g_reconn_type 
+484f 20202562 branch g24_reconn_start 
+
+mouse_24g_start_auto_pair:
+4850 20404919 call mouse_discover_setting_led_gpio 
+4851 6fe14885 fetch 2 ,mem_24g_pair_timeout_init 
+4852 67e1488b store 2 ,mem_24g_reconn_timeout 
+4853 70488f04 jam pair_and_3_0_addr ,mem_24g_reconn_type 
+4854 20202562 branch g24_reconn_start 
+
+mouse_24g_first_start_reconn:
+4855 6fe0c93d fetch 1 ,mem_device_flag 
+4856 c0004845 beq mode_24g_device ,mouse_24g_reconn_dongle_start 
+4857 20404354 call mouse_bluetooth_fast_conn_disable 
+4858 20204859 branch mouse_24g_first_bluetooth_reconnect 
+
+mouse_24g_first_bluetooth_reconnect:
+4859 20404831 call mouse_24g_stop 
+485a 2040495b call mouse_device_led_all_off 
+485b 70493d01 jam mode_bt_device1 ,mem_device_flag 
+485c 204045fd call mouse_select_reconn_device 
+485d 20203e1c branch mouse_start_reconnect_device 
+
+mouse_24g_first_bb_event_reconn_timeout:
+485e 20403e28 call mouse_wakeup_from_power_check 
+485f 20343e5a branch mouse_app_enter_hibernate ,user 
+4860 20204593 branch mouse_start_discovery 
+
+mouse_24g_first_store_reconn_info:
+4861 20403e28 call mouse_wakeup_from_power_check 
+4862 20740000 rtn user 
+4863 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4864 c297c62e bbit1 mouse_enable_24g_first_auto_pairing ,mouse_store_device_info_delay 
+4865 20600000 rtn 
+
+mouse_24g_start_pair_mode:
+4866 d8e00001 arg mouse_24g_pairing_flag ,queue 
+4867 2040472e call mouse_enable_function_flag 
+4868 58000000 setarg 0 
+4869 67e1488b store 2 ,mem_24g_reconn_timeout 
+486a 204045b6 call mouse_stop_discovery 
+486b 204049db call mouse_low_voltage_led_blink_disable 
+486c 20404919 call mouse_discover_setting_led_gpio 
+486d 70483901 jam type_ms ,mem_24g_data_type 
+486e 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+486f c30aa2e4 bbit0 mouse_enable_keyboard ,g24_pair_start 
+4870 70483902 jam type_kb ,mem_24g_data_type 
+4871 202022e4 branch g24_pair_start 
+
+mouse_24g_attempt_fail:
+4872 6fe0c8a9 fetch 1 ,mem_24g_attempt_fail_flag 
+4873 243a4820 nbranch mouse_24g_hibernate_set ,blank 
+4874 6fe0c88f fetch 1 ,mem_24g_reconn_type 
+4875 c001487f beq fast_conn_and_3_0_addr ,mouse_24g_fast_conn_attempt_fail 
+4876 c0024883 beq pair_and_3_0_addr ,mouse_24g_auto_pair_attempt_fail 
+4877 c001c888 beq receiver_and_3_0_addr ,mouse_reconn_dongle_attempt_fail 
+
+mouse_24g_attempt_fail_enter_hibernate:
+4878 2040495f call mouse_device_led_off 
+4879 20404831 call mouse_24g_stop 
+487a 6fe0cac1 fetch 1 ,mem_reconn_times 
+487b 243a474c nbranch mouse_polling_device ,blank 
+487c 6fe0c93d fetch 1 ,mem_device_flag 
+487d c0003e5a beq mode_24g_device ,mouse_app_enter_hibernate 
+487e 20600000 rtn 
+
+mouse_24g_fast_conn_attempt_fail:
+487f 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4880 c297c850 bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_start_auto_pair 
+4881 c2984850 bbit1 mouse_enable_auto_24g_paring ,mouse_24g_start_auto_pair 
+4882 20204845 branch mouse_24g_reconn_dongle_start 
+
+mouse_24g_auto_pair_attempt_fail:
+4883 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4884 c317c878 bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate 
+4885 6fe0cbc5 fetch 1 ,mem_device_number 
+4886 c000c878 beq 1 ,mouse_24g_attempt_fail_enter_hibernate 
+4887 20204859 branch mouse_24g_first_bluetooth_reconnect 
+
+mouse_reconn_dongle_attempt_fail:
+4888 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4889 c317c878 bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate 
+488a c289c878 bbit1 mouse_enable_eeprom ,mouse_24g_attempt_fail_enter_hibernate 
+488b c2894878 bbit1 mouse_enable_flash ,mouse_24g_attempt_fail_enter_hibernate 
+488c 20204851 branch mouse_24g_start_auto_pair + 1 
+
+mouse_24g_attempt_success:
+488d 2040430a call mouse_init_sensor_reset 
+488e 704abf00 jam 0 ,mem_mouse_long_mult_flag 
+488f 7048a500 jam 0 ,mem_24g_conn_sm 
+4890 70488f00 jam 0 ,mem_24g_reconn_type 
+4891 6fe24895 fetch 4 ,mem_24g_receiver_addr 
+4892 6fe24891 fetch 4 ,mem_24g_fast_conn_addr 
+4893 98467c00 isub temp ,null 
+4894 20628000 rtn zero 
+4895 20204861 branch mouse_24g_first_store_reconn_info 
+
+mouse_24g_pairing_complete:
+4896 d8e00001 arg mouse_24g_pairing_flag ,queue 
+4897 20404732 call mouse_disable_function_flag 
+4898 20404913 call mouse_device_poweron_timer_init 
+4899 58000000 setarg 0 
+489a 67e14887 store 2 ,mem_24g_pair_timeout 
+489b 67e1488b store 2 ,mem_24g_reconn_timeout 
+489c 67e0c8a5 store 1 ,mem_24g_conn_sm 
+489d 67e0c9cd store 1 ,mem_mouse_move_flag 
+489e 67e0c88f store 1 ,mem_24g_reconn_type 
+489f 2040430a call mouse_init_sensor_reset 
+48a0 2040431b call mouse_read_sensor_common 
+48a1 6fe2483f fetch 4 ,mem_24g_addr 
+48a2 67e24895 store 4 ,mem_24g_receiver_addr 
+48a3 67e24998 store 4 ,mem_mouse_24g_addr 
+48a4 2020462e branch mouse_store_device_info_delay 
+
+mouse_24g_package_data:
+48a5 c6930000 rtnmark0 mark_24g 
+48a6 20403fb0 call mouse_motion 
+48a7 24740000 nrtn user 
+48a8 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+48a9 c30ac8ac bbit0 mouse_enable_keyboard ,mouse_24g_mouse_package_data 
+48aa 6fe0cb9c fetch 1 ,mem_customer_key 
+48ab 243a48c1 nbranch mouse_24g_keyboard_package_data ,blank 
+
+mouse_24g_mouse_package_data:
+48ac 2040430b call mouse_data_xy_release 
+48ad 6fe0c839 fetch 1 ,mem_24g_data_type 
+48ae c280c8bb bbit1 1 ,mouse_24g_mouse_package_data_now 
+48af 6848c7ca fetcht 1 ,mem_24g_txbuf + 1 
+48b0 6fe0c8d4 fetch 1 ,mem_mouse_key 
+48b1 9841fe00 ior temp ,pdata 
+48b2 67e0c8d4 store 1 ,mem_mouse_key 
+48b3 6848c7cf fetcht 1 ,mem_24g_txbuf + 6 
+48b4 6fe0c8d9 fetch 1 ,mem_mouse_z 
+48b5 9840fe00 iadd temp ,pdata 
+48b6 67e0c8d9 store 1 ,mem_mouse_z 
+48b7 6848c7d0 fetcht 1 ,mem_24g_txbuf + 7 
+48b8 6fe0c8da fetch 1 ,mem_mouse_tz 
+48b9 9840fe00 iadd temp ,pdata 
+48ba 67e0c8da store 1 ,mem_mouse_tz 
+
+mouse_24g_mouse_package_data_now:
+48bb 70483901 jam type_ms ,mem_24g_data_type 
+48bc da200007 arg 7 ,rega 
+48bd da4048d4 arg mem_mouse_key ,regb 
+48be 6fe148d9 fetch 2 ,mem_mouse_z 
+48bf 207a0000 rtn blank 
+48c0 202026e8 branch g24_transmit_by_interrupt_enable 
+
+mouse_24g_keyboard_package_data:
+48c1 70483902 jam type_kb ,mem_24g_data_type 
+48c2 da200009 arg 9 ,rega 
+48c3 6fe0cb9d fetch 1 ,mem_customer_data_trigger 
+48c4 243a48c7 nbranch mouse_customer_key_press ,blank 
+48c5 da404be6 arg mem_customer_key_release ,regb 
+48c6 20600000 rtn 
+
+mouse_customer_key_press:
+48c7 da404bdd arg mem_customer_key_press ,regb 
+48c8 20600000 rtn 
+
+mouse_24g_search_dongle_init:
+48c9 58000000 setarg 0 
+48ca 67e1cbb5 store 3 ,mem_mouse_search_dongle_action 
+48cb 20600000 rtn 
+
+mouse_24g_search_dongle:
+48cc 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+48cd c40b0000 rtnbit0 mouse_enable_24g_search_dongle 
+48ce 6fe0cabf fetch 1 ,mem_mouse_long_mult_flag 
+48cf 207a0000 rtn blank 
+48d0 6fe0c8ab fetch 1 ,mem_24g_abort_pac 
+48d1 207a0000 rtn blank 
+48d2 6fe0cbb2 fetch 1 ,mem_mouse_search_dongle_interval 
+48d3 1fe0fe01 increase 1 ,pdata 
+48d4 1fe17e03 and_into 3 ,pdata 
+48d5 67e0cbb2 store 1 ,mem_mouse_search_dongle_interval 
+48d6 247a0000 nrtn blank 
+48d7 704bb300 jam 0 ,mem_mouse_search_dongle_ch 
+
+mouse_24g_search_dongle_loop:
+48d8 6fe0cbb3 fetch 1 ,mem_mouse_search_dongle_ch 
+48d9 1fe0fe01 increase 1 ,pdata 
+48da 67e0cbb3 store 1 ,mem_mouse_search_dongle_ch 
+48db 1fe67c08 sub pdata ,g24_ch_number ,null 
+48dc 242148e3 nbranch mouse_24g_search_dongle_loop_end ,positive 
+48dd 204025a3 call g24_reconn_data_prep 
+48de 20402662 call g24_transmit_receive_ack 
+48df 242c48e9 nbranch mouse_24g_search_dongle_loop_retry ,sync 
+48e0 2437c8e9 nbranch mouse_24g_search_dongle_loop_retry ,user3 
+48e1 204048fb call mouse_g24_ackpayload_parse 
+48e2 204048f2 call mouse_24g_search_dongle_success 
+
+mouse_24g_search_dongle_loop_end:
+48e3 204025a0 call g24_txbuf_clear 
+48e4 6fe0cbb4 fetch 1 ,mem_mouse_search_dongle_count 
+48e5 1fe0fe01 increase 1 ,pdata 
+48e6 67e0cbb4 store 1 ,mem_mouse_search_dongle_count 
+48e7 c00848eb beq g24_ch_poll_count ,mouse_24g_search_dongle_check 
+48e8 20600000 rtn 
+
+mouse_24g_search_dongle_loop_retry:
+48e9 20402281 call g24_ch 
+48ea 202048d8 branch mouse_24g_search_dongle_loop 
+
+mouse_24g_search_dongle_check:
+48eb 704bb400 jam 0 ,mem_mouse_search_dongle_count 
+48ec 6fe0cbb5 fetch 1 ,mem_mouse_search_dongle_action 
+48ed c3800000 rtnbit1 g24_disconn_state 
+48ee 79207e00 set1 g24_disconn_state ,pdata 
+48ef 67e0cbb5 store 1 ,mem_mouse_search_dongle_action 
+48f0 6fe14bcd fetch 2 ,mem_mouse_24g_search_dongle_time_init 
+48f1 20204820 branch mouse_24g_hibernate_set 
+
+mouse_24g_search_dongle_success:
+48f2 6fe0c8ab fetch 1 ,mem_24g_abort_pac 
+48f3 203a48c9 branch mouse_24g_search_dongle_init ,blank 
+48f4 704bb400 jam 0 ,mem_mouse_search_dongle_count 
+48f5 6fe0cbb5 fetch 1 ,mem_mouse_search_dongle_action 
+48f6 c4000000 rtnbit0 g24_disconn_state 
+48f7 793ffe00 set0 g24_disconn_state ,pdata 
+48f8 67e0cbb5 store 1 ,mem_mouse_search_dongle_action 
+48f9 20404584 call mouse_no_data_timer_init 
+48fa 202041ea branch mouse_init_sensor_wakeup 
+
+mouse_g24_ackpayload_parse:
+48fb 20402679 call g24_ackpayload_parse 
+48fc 6fe0c7a8 fetch 1 ,mem_24g_rxbuf + 1 
+48fd 2fe1f008 compare 0x08 ,pdata ,0xf8 
+48fe 24608000 nrtn true 
+48ff 6fe0c7a9 fetch 1 ,mem_24g_rxbuf + 2 
+4900 c07fc820 beq 0xff ,mouse_24g_hibernate_set 
+4901 20600000 rtn 
+
+mouse_24g_before_lpm_sleep:
+4902 6fe0c93d fetch 1 ,mem_device_flag 
+4903 c0801468 bne mode_24g_device ,lpm_sleep_skip_cb_function 
+4904 6fe0c87a fetch 1 ,mem_24g_disable_fec1 
+4905 207a0000 rtn blank 
+
+mouse_peripheral_clock_off:
+4906 70804202 jam 2 ,core_clksel 
+4907 6ff08138 fetch 1 ,core_lpm_ctrl 
+4908 1fe17efc and pdata ,0xfc ,pdata 
+4909 67f0804c store 1 ,core_lpm_reg 
+490a 2020154c branch lpm_write_ctrl 
+
+mouse_device_poweron_timer:
+490b 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+490c c4100000 rtnbit0 mouse_enable_power_on_led 
+490d 6fe0cbb8 fetch 1 ,mem_mouse_device_poweron_timer_count 
+490e 207a0000 rtn blank 
+490f 1fe0ffff increase -1 ,pdata 
+4910 67e0cbb8 store 1 ,mem_mouse_device_poweron_timer_count 
+4911 203a495f branch mouse_device_led_off ,blank 
+4912 2020496d branch mouse_device_led_on 
+
+mouse_device_poweron_timer_init:
+4913 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4914 c4100000 rtnbit0 mouse_enable_power_on_led 
+4915 204049db call mouse_low_voltage_led_blink_disable 
+4916 6fe0cbd1 fetch 1 ,mem_mouse_device_poweron_timer_count_init 
+4917 67e0cbb8 store 1 ,mem_mouse_device_poweron_timer_count 
+4918 20600000 rtn 
+
+mouse_discover_setting_led_gpio:
+4919 704bb800 jam 0 ,mem_mouse_device_poweron_timer_count 
+491a 6fe14bd5 fetch 2 ,mem_mouse_disconvey_led_blink_time 
+491b 67e14935 store 2 ,mem_mouse_on_time 
+491c 67e14937 store 2 ,mem_mouse_off_time 
+
+mouse_setting_led_gpio_comman:
+491d 6fe0c93d fetch 1 ,mem_device_flag 
+491e c0004922 beq mode_24g_device ,mouse_device_led_24g 
+491f c000c924 beq mode_bt_device1 ,mouse_device_led_bt1 
+4920 c0014926 beq mode_bt_device2 ,mouse_device_led_bt2 
+4921 20600000 rtn 
+
+mouse_device_led_24g:
+4922 6fe0c919 fetch 1 ,mem_config_device_24g_led_gpio 
+4923 20204927 branch mouse_led_blink 
+
+mouse_device_led_bt1:
+4924 6fe0c926 fetch 1 ,mem_config_device_bt1_led_gpio 
+4925 20204927 branch mouse_led_blink 
+
+mouse_device_led_bt2:
+4926 6fe0c927 fetch 1 ,mem_config_device_bt2_led_gpio 
+
+mouse_led_blink:
+4927 67e08964 store 1 ,mem_temp 
+4928 2040495f call mouse_device_led_off 
+4929 6fe08964 fetch 1 ,mem_temp 
+492a 67e0c934 store 1 ,mem_mouse_struct_led_gpio 
+492b da200000 arg 0 ,rega 
+492c 70493201 jam ui_led_state_blink_start ,mem_mouse_led_type 
+492d 20207871 branch ui_led_blink_start_global 
+
+mouse_dpi_led_blink_delay:
+492e 6fe0c928 fetch 1 ,mem_dpi_led_gpio 
+492f c17f8000 rtneq gpio_disable 
+4930 6fe14ad3 fetch 2 ,mem_mouse_discovery_timer 
+4931 247a0000 nrtn blank 
+4932 6fe14887 fetch 2 ,mem_24g_pair_timeout 
+4933 247a0000 nrtn blank 
+4934 6fe1488b fetch 2 ,mem_24g_reconn_timeout 
+4935 247a0000 nrtn blank 
+4936 6fe0cbb8 fetch 1 ,mem_mouse_device_poweron_timer_count 
+4937 247a0000 nrtn blank 
+4938 6fe0cbd2 fetch 1 ,mem_mouse_dpi_led_delay_count_init 
+4939 203a493f branch mouse_dpi_led_blink_init ,blank 
+493a 67e0cbb9 store 1 ,mem_mouse_dpi_led_delay_count 
+493b 20600000 rtn 
+
+mouse_dpi_led_blink_delay_timer:
+493c da604bb9 arg mem_mouse_dpi_led_delay_count ,regc 
+493d da40493f arg mouse_dpi_led_blink_init ,regb 
+493e 202031fc branch timer_single_step 
+
+mouse_dpi_led_blink_init:
+493f 6fe0c928 fetch 1 ,mem_dpi_led_gpio 
+4940 67e0c934 store 1 ,mem_mouse_struct_led_gpio 
+4941 6fe14bd3 fetch 2 ,mem_mouse_dpi_led_blink_time 
+4942 67e14935 store 2 ,mem_mouse_on_time 
+4943 67e14937 store 2 ,mem_mouse_off_time 
+4944 da200000 arg 0 ,rega 
+4945 6848c997 fetcht 1 ,mem_mouse_dpi 
+4946 18408401 increase 1 ,temp 
+4947 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4948 c30e494c bbit0 mouse_enable_dpi_level_4 ,mouse_dpi_led_blink_init_end 
+4949 18408401 increase 1 ,temp 
+494a 18467c04 sub temp ,4 ,null 
+494b 2441494f ncall mouse_dpi_led_blink_count_clean ,positive 
+
+mouse_dpi_led_blink_init_end:
+494c 6048c933 storet 1 ,mem_mouse_blink_count 
+494d 70493201 jam ui_led_state_blink_start ,mem_mouse_led_type 
+494e 20600000 rtn 
+
+mouse_dpi_led_blink_count_clean:
+494f d8400001 arg 1 ,temp 
+4950 20600000 rtn 
+
+mouse_check_dpi_blink:
+4951 78547c00 disable user 
+4952 6fe0c928 fetch 1 ,mem_dpi_led_gpio 
+4953 6848c934 fetcht 1 ,mem_mouse_struct_led_gpio 
+4954 98467c00 isub temp ,null 
+4955 24628000 nrtn zero 
+4956 6fe0c933 fetch 1 ,mem_mouse_blink_count 
+4957 207a0000 rtn blank 
+4958 7048fd00 jam 0 ,mem_adc_low_volatage_led_blink_enable 
+4959 78347c00 enable user 
+495a 20600000 rtn 
+
+mouse_device_led_all_off:
+495b 2040496b call mouse_dpi_led_off 
+495c 20404964 call mouse_device_24g_led_off 
+495d 20404967 call mouse_device_bt1_led_off 
+495e 20204969 branch mouse_device_bt2_led_off 
+
+mouse_device_led_off:
+495f 6fe0c93d fetch 1 ,mem_device_flag 
+4960 c0004964 beq mode_24g_device ,mouse_device_24g_led_off 
+4961 c000c967 beq mode_bt_device1 ,mouse_device_bt1_led_off 
+4962 c0014969 beq mode_bt_device2 ,mouse_device_bt2_led_off 
+4963 20600000 rtn 
+
+mouse_device_24g_led_off:
+4964 704bbb00 jam 0 ,mem_24g_device_led_status 
+4965 6848c919 fetcht 1 ,mem_config_device_24g_led_gpio 
+4966 20204978 branch mouse_led_off 
+
+mouse_device_bt1_led_off:
+4967 6848c926 fetcht 1 ,mem_config_device_bt1_led_gpio 
+4968 20204978 branch mouse_led_off 
+
+mouse_device_bt2_led_off:
+4969 6848c927 fetcht 1 ,mem_config_device_bt2_led_gpio 
+496a 20204978 branch mouse_led_off 
+
+mouse_dpi_led_off:
+496b 6848c928 fetcht 1 ,mem_dpi_led_gpio 
+496c 20204978 branch mouse_led_off 
+
+mouse_device_led_on:
+496d 6fe0c93d fetch 1 ,mem_device_flag 
+496e c0004972 beq mode_24g_device ,mouse_device_24g_led_on 
+496f c000c974 beq mode_bt_device1 ,mouse_device_bt1_led_on 
+4970 c0014976 beq mode_bt_device2 ,mouse_device_bt2_led_on 
+4971 20600000 rtn 
+
+mouse_device_24g_led_on:
+4972 6848c919 fetcht 1 ,mem_config_device_24g_led_gpio 
+4973 2020497c branch mouse_led_on 
+
+mouse_device_bt1_led_on:
+4974 6848c926 fetcht 1 ,mem_config_device_bt1_led_gpio 
+4975 2020497c branch mouse_led_on 
+
+mouse_device_bt2_led_on:
+4976 6848c927 fetcht 1 ,mem_config_device_bt2_led_gpio 
+4977 2020497c branch mouse_led_on 
+
+mouse_led_off:
+4978 44f0401c bpatch patch1c_0 ,mem_patch1c 
+4979 6048c934 storet 1 ,mem_mouse_struct_led_gpio 
+497a da200000 arg 0 ,rega 
+497b 2020786c branch ui_led_off_global 
+
+mouse_led_on:
+497c 44f0c01c bpatch patch1c_1 ,mem_patch1c 
+497d 6048c934 storet 1 ,mem_mouse_struct_led_gpio 
+497e da200000 arg 0 ,rega 
+497f 20207867 branch ui_led_on_global 
+
+mouse_ui_led_off_static:
+4980 6fe0c919 fetch 1 ,mem_config_device_24g_led_gpio 
+4981 98467c00 isub temp ,null 
+4982 2042c99f call mouse_clear_24g_led_statue ,zero 
+4983 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4984 c3126109 bbit0 mouse_enable_4_led ,gpio_out_inactive 
+4985 20404990 call mouse_check_bt2_led_off 
+4986 20404994 call mouse_check_dpi_led_off 
+4987 20404998 call mouse_check_low_v_led_off 
+4988 6fe0cbba fetch 1 ,mem_mouse_led_off_4_led 
+4989 203a6109 branch gpio_out_inactive ,blank 
+498a 704bba00 jam 0 ,mem_mouse_led_off_4_led 
+498b 20206121 branch gpio_set_high_impedance 
+
+mouse_ui_led_on_static:
+498c 6fe0c919 fetch 1 ,mem_config_device_24g_led_gpio 
+498d 98467c00 isub temp ,null 
+498e 2042c9a1 call mouse_set_24g_led_statue ,zero 
+498f 2020610d branch gpio_out_active 
+
+mouse_check_bt2_led_off:
+4990 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4991 c4130000 rtnbit0 mouse_enable_bt2_for_4_led 
+4992 6fe0c927 fetch 1 ,mem_config_device_bt2_led_gpio 
+4993 2020499b branch mouse_check_1gpio_2led_off 
+
+mouse_check_dpi_led_off:
+4994 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4995 c4128000 rtnbit0 mouse_enable_dpi_for_4_led 
+4996 6fe0c928 fetch 1 ,mem_dpi_led_gpio 
+4997 2020499b branch mouse_check_1gpio_2led_off 
+
+mouse_check_low_v_led_off:
+4998 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+4999 c4138000 rtnbit0 mouse_enable_low_v_for_4_led 
+499a 6fe0c925 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+
+mouse_check_1gpio_2led_off:
+499b 98467c00 isub temp ,null 
+499c 24628000 nrtn zero 
+499d 704bba01 jam 1 ,mem_mouse_led_off_4_led 
+499e 20600000 rtn 
+
+mouse_clear_24g_led_statue:
+499f 704bbb00 jam 0 ,mem_24g_device_led_status 
+49a0 20600000 rtn 
+
+mouse_set_24g_led_statue:
+49a1 704bbb01 jam 1 ,mem_24g_device_led_status 
+49a2 20600000 rtn 
+
+mouse_low_voltage_led_timer:
+49a3 6fe14ad3 fetch 2 ,mem_mouse_discovery_timer 
+49a4 247a0000 nrtn blank 
+49a5 6fe14887 fetch 2 ,mem_24g_pair_timeout 
+49a6 247a0000 nrtn blank 
+49a7 6fe1488b fetch 2 ,mem_24g_reconn_timeout 
+49a8 247a0000 nrtn blank 
+49a9 6fe0cbb8 fetch 1 ,mem_mouse_device_poweron_timer_count 
+49aa 247a0000 nrtn blank 
+49ab 20404951 call mouse_check_dpi_blink 
+49ac 20740000 rtn user 
+49ad 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+49ae c4108000 rtnbit0 mouse_enable_low_voltage_led 
+49af c4020000 rtnbit0 mouse_low_voltage_flag 
+49b0 c291c9c9 bbit1 mouse_enable_low_voltage_led_blink_n_second ,mouse_low_voltage_led_blink_new_data 
+49b1 6fe0c8fc fetch 1 ,mem_adc_low_volatage_led_timer_count 
+49b2 1fe0fe01 increase 1 ,pdata 
+49b3 67e0c8fc store 1 ,mem_adc_low_volatage_led_timer_count 
+49b4 1fe67c14 sub pdata ,20 ,null 
+49b5 244149bb ncall mouse_adc_low_volatage_led_timer_count_clean ,positive 
+49b6 c00149bd beq 2 ,mouse_low_voltage_led_on 
+49b7 c00249c3 beq 4 ,mouse_low_voltage_led_off 
+49b8 c00349bd beq 6 ,mouse_low_voltage_led_on 
+49b9 c00449c3 beq 8 ,mouse_low_voltage_led_off 
+49ba 20600000 rtn 
+
+mouse_adc_low_volatage_led_timer_count_clean:
+49bb 7048fc01 jam 1 ,mem_adc_low_volatage_led_timer_count 
+49bc 202049c3 branch mouse_low_voltage_led_off 
+
+mouse_low_voltage_led_on:
+49bd 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+49be c291496d bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_device_led_on 
+49bf 6fe0c925 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+49c0 c17f8000 rtneq gpio_disable 
+49c1 6848c925 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+49c2 2020497c branch mouse_led_on 
+
+mouse_low_voltage_led_off:
+49c3 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+49c4 c291495f bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_device_led_off 
+49c5 6fe0c925 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+49c6 c17f8000 rtneq gpio_disable 
+49c7 6848c925 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+49c8 20204978 branch mouse_led_off 
+
+mouse_low_voltage_led_blink_new_data:
+49c9 6fe14bcf fetch 2 ,mem_mouse_no_data_timeout 
+49ca 68494ac3 fetcht 2 ,mem_mouse_no_data_timer 
+49cb 98460400 isub temp ,temp 
+49cc 6fe14bd9 fetch 2 ,mem_adc_low_volatage_led_blink_timer 
+49cd 98467c00 isub temp ,null 
+49ce 242149db nbranch mouse_low_voltage_led_blink_disable ,positive 
+49cf 6fe0c8fd fetch 1 ,mem_adc_low_volatage_led_blink_enable 
+49d0 247a0000 nrtn blank 
+49d1 7048fd01 jam 1 ,mem_adc_low_volatage_led_blink_enable 
+49d2 202049d3 branch mouse_low_voltage_led_blink_init 
+
+mouse_low_voltage_led_blink_init:
+49d3 6fe14bd7 fetch 2 ,mem_mouse_low_v_led_blink_time 
+49d4 67e14935 store 2 ,mem_mouse_on_time 
+49d5 67e14937 store 2 ,mem_mouse_off_time 
+49d6 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+49d7 c291491d bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_setting_led_gpio_comman 
+49d8 6fe0c925 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+49d9 c17f8000 rtneq gpio_disable 
+49da 20204927 branch mouse_led_blink 
+
+mouse_low_voltage_led_blink_disable:
+49db 7048fd00 jam 0 ,mem_adc_low_volatage_led_blink_enable 
+49dc 202049c3 branch mouse_low_voltage_led_off 
+
+mouse_low_voltage_led_no_enter_lpm:
+49dd 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+49de c4108000 rtnbit0 mouse_enable_low_voltage_led 
+49df c4020000 rtnbit0 mouse_low_voltage_flag 
+49e0 c291c9ef bbit1 mouse_enable_low_voltage_led_blink_n_second ,mouse_low_voltage_led_no_enter_lpm_blink 
+49e1 6fe0c8fc fetch 1 ,mem_adc_low_volatage_led_timer_count 
+49e2 1fe67c0a sub pdata ,10 ,null 
+49e3 202149eb branch mouse_lpm_mode_clear ,positive 
+
+mouse_low_voltage_led_no_enter_lpm_next:
+49e4 6fe0c93d fetch 1 ,mem_device_flag 
+49e5 c00049e8 beq mode_24g_device ,g24_transmit_by_interrupt_exit_check 
+49e6 70409901 jam 1 ,mem_lpm_mode 
+49e7 20600000 rtn 
+
+g24_transmit_by_interrupt_exit_check:
+49e8 6fe44bbc fetch mouse_flag_len ,mem_mouse_flag 
+49e9 c38c0000 rtnbit1 mouse_enable_24g_250hz 
+49ea 202026d7 branch g24_transmit_by_interrupt_exit 
+
+mouse_lpm_mode_clear:
+49eb 6fe0c93d fetch 1 ,mem_device_flag 
+49ec c00026e8 beq mode_24g_device ,g24_transmit_by_interrupt_enable 
+49ed 70409900 jam 0 ,mem_lpm_mode 
+49ee 20600000 rtn 
+
+mouse_low_voltage_led_no_enter_lpm_blink:
+49ef 6fe0c8fd fetch 1 ,mem_adc_low_volatage_led_blink_enable 
+49f0 243a49eb nbranch mouse_lpm_mode_clear ,blank 
+49f1 202049e4 branch mouse_low_voltage_led_no_enter_lpm_next 
+
+mouse_store_signal_rssi:
+49f2 20401293 call rssi_hex2dec 
+49f3 6fe08018 fetch 1 ,mem_rssi 
+49f4 202025e9 branch rssi_signal 
+
+mouse_le_transmit:
+49f5 204049f2 call mouse_store_signal_rssi 
+49f6 202026f5 branch power_ctrl_start 
+
+mouse_bt_slave_match:
+49f7 204049f2 call mouse_store_signal_rssi 
+49f8 6fe08030 fetch 1 ,mem_state 
+49f9 2feffe00 isolate1 state_inconn ,pdata 
+49fa 24608000 nrtn true 
+49fb 6fe08047 fetch 1 ,mem_arq 
+49fc 2feffe03 isolate1 wack ,pdata 
+49fd 2040a72b call power_ctrl_pac_succ_decrs ,true 
+49fe 2440a727 ncall power_ctrl_pac_succ_incrs ,true 
+49ff 202026f5 branch power_ctrl_start 
+
+mouse_le_set_lpm_mult:
+4a00 6fe0cb86 fetch 1 ,mem_le_connect_status_flag 
+4a01 2fe00603 compare 3 ,pdata ,3 
+4a02 2420fecf nbranch disable_blank ,true 
+4a03 20403295 call app_lpm_mult_enable 
+4a04 20207ed1 branch enable_blank 
+
+mouse_bt_set_lpm_mult:
+4a05 20405355 call l2cap_malloc_is_fifo_empty 
+4a06 247a0000 nrtn blank 
+4a07 70008801 jam 1 ,mem_current_sniff_attempt 
+4a08 70008900 jam 0 ,mem_current_sniff_timeout 
+4a09 20207ed1 branch enable_blank 
+
+mouse_set_lpm_mult:
+4a0a 6fe1478f fetch 2 ,mem_ui_state_map 
+4a0b c284ca00 bbit1 ui_state_ble_connected ,mouse_le_set_lpm_mult 
+4a0c 20204a05 branch mouse_bt_set_lpm_mult 
+
+remote_car_init:
+4a0d 20758000 rtn wake 
+4a0e 204061da call keyscan_key_init 
+4a0f 58004ac1 setarg remote_car_g24_package_data 
+4a10 67e1489f store 2 ,mem_cb_24g_transmit_data 
+4a11 58004a50 setarg remote_car_process_lpm_before 
+4a12 67e148a3 store 2 ,mem_cb_24g_lpm_before 
+4a13 58004a4b setarg remote_car_le_before_hibernate 
+4a14 67e1445d store 2 ,mem_cb_before_hibernate 
+4a15 58004a8b setarg remote_car_scale_process_idle 
+4a16 67e14465 store 2 ,mem_cb_idle_process 
+4a17 58004a8d setarg remote_car_scale_process_bb_event 
+4a18 67e14467 store 2 ,mem_cb_bb_event_process 
+4a19 58004aa6 setarg remote_car_event_timer 
+4a1a 67e1446f store 2 ,mem_cb_event_timer 
+4a1b 58004a40 setarg remote_car_power_off_signal 
+4a1c 67e14995 store 2 ,mem_remote_car_power_off_cb 
+4a1d 58004a30 setarg remote_car_soft_switch_power_on_signal 
+4a1e 67e14999 store 2 ,mem_remote_car_power_standby_cb 
+4a1f 44f1401c bpatch patch1c_2 ,mem_patch1c 
+4a20 20405e59 call set_eeprom_size_2k 
+4a21 20404a47 call remote_car_init_environment 
+4a22 204079a5 call queue_init 
+4a23 6fe0c965 fetch 1 ,mem_remote_car_config_soft_switch_enable 
+4a24 67e0c8d4 store 1 ,mem_remote_car_hard_soft_switch 
+4a25 c0004a2f beq hard_switch ,remote_car_hard_switch_power_on_signal 
+4a26 6fe0c966 fetch 1 ,mem_remote_car_config_soft_switch_gpio 
+4a27 67e0c793 store 1 ,mem_ui_button_gpio 
+
+remote_car_soft_switch_power_on_init:
+4a28 20404a40 call remote_car_ui_led_init 
+4a29 20407826 call ui_button_init 
+4a2a 20407830 call ui_button_polling 
+4a2b 70499101 jam power_starting ,mem_remote_car_power_state 
+4a2c 6fe1478f fetch 2 ,mem_ui_state_map 
+4a2d c3860000 rtnbit1 ui_state_btn_down 
+4a2e 20203289 branch app_enter_hibernate 
+
+remote_car_hard_switch_power_on_signal:
+4a2f 70499102 jam power_standby ,mem_remote_car_power_state 
+
+remote_car_soft_switch_power_on_signal:
+4a30 20404a40 call remote_car_ui_led_init 
+4a31 da200000 arg 0 ,rega 
+4a32 20407871 call ui_led_blink_start_global 
+4a33 20404a3c call remote_car_set_24g_addr_eeprom 
+4a34 20405e79 call iicd_read_eep_data 
+4a35 204026ec call g24_factory_check 
+4a36 203422e4 branch g24_pair_start ,user 
+4a37 6fe2483f fetch 4 ,mem_24g_addr 
+4a38 67e24895 store 4 ,mem_24g_receiver_addr 
+4a39 6fe14889 fetch 2 ,mem_24g_reconn_timeout_init 
+4a3a 67e1488b store 2 ,mem_24g_reconn_timeout 
+4a3b 20202562 branch g24_reconn_start 
+
+remote_car_set_24g_addr_eeprom:
+4a3c d8400004 arg 4 ,temp 
+4a3d da20483f arg mem_24g_addr ,rega 
+4a3e da400000 arg remote_info_eeprom_offect ,regb 
+4a3f 20600000 rtn 
+
+remote_car_power_off_signal:
+
+remote_car_ui_led_init:
+4a40 44f1c01c bpatch patch1c_3 ,mem_patch1c 
+4a41 6fe0c963 fetch 1 ,mem_remote_car_config_connect_led_gpio 
+4a42 c0ffca45 bne invalid_pin_num ,remote_car_pairing_led_gpio_set 
+
+remote_car_ui_led_init_1:
+4a43 6848c940 fetcht 1 ,mem_remote_car_led_map 
+4a44 2020610d branch gpio_config_output 
+
+remote_car_pairing_led_gpio_set:
+4a45 67e0c940 store 1 ,mem_remote_car_led_map 
+4a46 20204a43 branch remote_car_ui_led_init_1 
+
+remote_car_init_environment:
+4a47 2040260e call g24_transmit_init 
+
+remote_no_data_timer_init:
+4a48 6fe1498d fetch 2 ,mem_remote_car_no_data_timeout 
+4a49 67e1498f store 2 ,mem_remote_car_no_data_timer 
+4a4a 20600000 rtn 
+
+remote_car_le_before_hibernate:
+4a4b 20404a50 call remote_car_process_lpm_before 
+
+remote_gpio_set_before_hibernate:
+4a4c 6fe0c936 fetch 1 ,mem_remote_style_struct_led_gpio 
+4a4d 79207e07 set1 7 ,pdata 
+4a4e d840003f arg gpcfg_output_high ,temp 
+4a4f 2020612b branch gpio_config_function 
+
+remote_car_process_lpm_before:
+4a50 20406136 call gpio_set_before_lpm 
+4a51 202061ff branch keyscan_process_lpm_before 
+
+remote_car_key_scan_process:
+4a52 2040620b call keyscan_key_process 
+4a53 20404a63 call get_remote_key_state 
+4a54 20404a56 call remote_conn_led_state 
+4a55 20204a71 branch send_data 
+
+remote_conn_led_state:
+4a56 6fe0c99c fetch 1 ,mem_remote_car_24g_status 
+4a57 c1808000 rtnne work_paired 
+4a58 6fe249a0 fetch 4 ,mem_remote_car_motor1_key0_press_state 
+4a59 203a4a5d branch remote_car_stop_state ,blank 
+4a5a 7049a600 jam 0 ,mem_remote_car_no_data_check 
+4a5b 78347c00 enable user 
+4a5c 20207976 branch check_51cmd_led_on 
+
+remote_car_stop_state:
+4a5d 6fe0c9a6 fetch 1 ,mem_remote_car_no_data_check 
+4a5e c17f8000 rtneq 0xff 
+4a5f 1fe0fe01 pincrease 1 
+4a60 67e0c9a6 store 1 ,mem_remote_car_no_data_check 
+4a61 78547c00 disable user 
+4a62 20207974 branch check_51cmd_led_off 
+
+get_remote_key_state:
+4a63 684944ca fetcht 2 ,mem_key_value_retention 
+4a64 18417e01 and temp ,0x01 ,pdata 
+4a65 18430400 rshift temp ,temp 
+4a66 67e0c9a0 store 1 ,mem_remote_car_motor1_key0_press_state 
+4a67 18417e01 and temp ,0x01 ,pdata 
+4a68 18430400 rshift temp ,temp 
+4a69 67e0c9a1 store 1 ,mem_remote_car_motor1_key1_press_state 
+4a6a 18417e01 and temp ,0x01 ,pdata 
+4a6b 18430400 rshift temp ,temp 
+4a6c 67e0c9a2 store 1 ,mem_remote_car_motor2_key2_press_state 
+4a6d 18417e01 and temp ,0x01 ,pdata 
+4a6e 18430400 rshift temp ,temp 
+4a6f 67e0c9a3 store 1 ,mem_remote_car_motor2_key3_press_state 
+4a70 20600000 rtn 
+
+send_data:
+4a71 44f2401c bpatch patch1c_4 ,mem_patch1c 
+4a72 20404a81 call remote_car_fb_check 
+4a73 20404a86 call remote_car_lr_check 
+4a74 20404a77 call remote_car_no_data_timeout_check 
+4a75 24740000 nrtn user 
+4a76 20204abd branch remote_car_send_key 
+
+remote_car_no_data_timeout_check:
+4a77 6fe0c99c fetch 1 ,mem_remote_car_24g_status 
+4a78 c1808000 rtnne work_paired 
+4a79 6fe0c9a6 fetch 1 ,mem_remote_car_no_data_check 
+4a7a 207a0000 rtn blank 
+4a7b 1fe67c01 sub pdata ,1 ,null 
+4a7c 24610000 nrtn positive 
+4a7d 6fe14889 fetch 2 ,mem_24g_reconn_timeout_init 
+4a7e 67e1488b store 2 ,mem_24g_reconn_timeout 
+4a7f 78347c00 enable user 
+4a80 20600000 rtn 
+
+remote_car_fb_check:
+4a81 6fe0c9a0 fetch 1 ,mem_remote_car_motor1_key0_press_state 
+4a82 243a4ab1 nbranch remote_car_send_motor1_key0_press ,blank 
+4a83 6fe0c9a1 fetch 1 ,mem_remote_car_motor1_key1_press_state 
+4a84 243a4ab3 nbranch remote_car_send_motor1_key1_press ,blank 
+4a85 20204ab9 branch remote_car_send_motor1_key0_rel 
+
+remote_car_lr_check:
+4a86 6fe0c9a2 fetch 1 ,mem_remote_car_motor2_key2_press_state 
+4a87 243a4ab5 nbranch remote_car_send_motor2_key2_press ,blank 
+4a88 6fe0c9a3 fetch 1 ,mem_remote_car_motor2_key3_press_state 
+4a89 243a4ab7 nbranch remote_car_send_motor2_key3_press ,blank 
+4a8a 20204abb branch remote_car_send_motor2_key2_rel 
+
+remote_car_scale_process_idle:
+4a8b 20404a9b call remote_car_24g_status_process 
+4a8c 20204a52 branch remote_car_key_scan_process 
+
+remote_car_scale_process_bb_event:
+4a8d 1a627e00 copy regc ,pdata 
+4a8e c016b2b1 beq bt_evt_button_up ,app_event_button_up 
+4a8f c0083299 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+4a90 c01cca95 beq bt_evt_24g_pairing_complete ,remote_car_24g_pairing_complete 
+4a91 c01e4a97 beq bt_evt_24g_attempt_success ,remote_car_24g_attempt_success 
+4a92 c01d4a94 beq bt_evt_24g_attempt_fail ,remote_car_24g_attempt_fail 
+4a93 20600000 rtn 
+
+remote_car_24g_attempt_fail:
+4a94 202025a0 branch g24_txbuf_clear 
+
+remote_car_24g_pairing_complete:
+4a95 20404a3c call remote_car_set_24g_addr_eeprom 
+4a96 20405e6b call iicd_write_protect_eep_data 
+
+remote_car_24g_attempt_success:
+4a97 7048a500 jam 0 ,mem_24g_conn_sm 
+4a98 70499d01 jam work_paired ,mem_remote_car_24g_auto_work_step 
+4a99 70499e01 jam work_paired ,mem_remote_car_24g_pair_success_flag 
+4a9a 20600000 rtn 
+
+remote_car_24g_status_process:
+4a9b 6fe0c99d fetch 1 ,mem_remote_car_24g_auto_work_step 
+4a9c c1000000 rtneq power_on 
+4a9d 6fe0c99c fetch 1 ,mem_remote_car_24g_status 
+4a9e c1008000 rtneq work_paired 
+4a9f 70499c01 jam work_paired ,mem_remote_car_24g_status 
+
+remote_car_scale_process_paired:
+4aa0 da200000 arg 0 ,rega 
+4aa1 2020786c branch ui_led_off_global 
+
+remote_car_scale_process_shutdown:
+4aa2 da200000 arg 0 ,rega 
+4aa3 2040786c call ui_led_off_global 
+4aa4 20404a40 call remote_car_ui_led_init 
+4aa5 20203289 branch app_enter_hibernate 
+
+remote_car_event_timer:
+4aa6 2040320a call app_power_timer 
+4aa7 204022e1 call g24_pair_timeout_timer 
+4aa8 2040255f call g24_reconn_timeout_timer 
+4aa9 20204aaa branch remote_car_no_data_timer 
+
+remote_car_no_data_timer:
+4aaa 6fe0c967 fetch 1 ,mem_remote_car_config_timeout_shutdown_enable 
+4aab 207a0000 rtn blank 
+4aac 6fe0c4ca fetch 1 ,mem_key_value_retention 
+4aad 243a4a48 nbranch remote_no_data_timer_init ,blank 
+4aae da60498f arg mem_remote_car_no_data_timer ,regc 
+4aaf da404aa2 arg remote_car_scale_process_shutdown ,regb 
+4ab0 20203203 branch timer_single_step_2b 
+
+remote_car_send_motor1_key0_press:
+4ab1 70496e01 jam motor_positive ,mem_remote_car_24g_motor1_payload 
+4ab2 20600000 rtn 
+
+remote_car_send_motor1_key1_press:
+4ab3 70496e02 jam motor_negative ,mem_remote_car_24g_motor1_payload 
+4ab4 20600000 rtn 
+
+remote_car_send_motor2_key2_press:
+4ab5 70497001 jam motor_positive ,mem_remote_car_24g_motor2_payload 
+4ab6 20600000 rtn 
+
+remote_car_send_motor2_key3_press:
+4ab7 70497002 jam motor_negative ,mem_remote_car_24g_motor2_payload 
+4ab8 20600000 rtn 
+
+remote_car_send_motor1_key0_rel:
+
+remote_car_send_motor1_key1_rel:
+4ab9 70496e00 jam motor_stop ,mem_remote_car_24g_motor1_payload 
+4aba 20600000 rtn 
+
+remote_car_send_motor2_key2_rel:
+
+remote_car_send_motor2_key3_rel:
+4abb 70497000 jam motor_stop ,mem_remote_car_24g_motor2_payload 
+4abc 20600000 rtn 
+
+remote_car_send_key:
+4abd da204968 arg mem_remote_car_24g_motor_packet ,rega 
+4abe 202079aa branch queue_push 
+
+remote_car_send_attack:
+4abf da204975 arg mem_remote_car_24g_fire_packet ,rega 
+4ac0 202079aa branch queue_push 
+
+remote_car_g24_package_data:
+4ac1 6fe0c99e fetch 1 ,mem_remote_car_24g_pair_success_flag 
+4ac2 c000cacb beq work_paired ,remote_car_g24_send_empty 
+4ac3 da20497e arg mem_remote_car_24g_tx_temp ,rega 
+4ac4 204079c1 call queue_pop 
+4ac5 24344ad0 nbranch remote_car_moto_data ,user 
+
+remote_car_g24_package_data_continue:
+4ac6 d8c0497e arg mem_remote_car_24g_tx_temp ,contr 
+4ac7 efe08006 ifetch 1 ,contr 
+4ac8 1fe22200 copy pdata ,rega 
+4ac9 da40497f arg mem_remote_car_24g_tx_temp + 1 ,regb 
+4aca 20600000 rtn 
+
+remote_car_g24_send_empty:
+4acb 70499e00 jam 0 ,mem_remote_car_24g_pair_success_flag 
+4acc 78347c00 enable user 
+4acd da200001 arg 1 ,rega 
+4ace da40499f arg mem_remote_car_empty_packet ,regb 
+4acf 20600000 rtn 
+
+remote_car_moto_data:
+4ad0 6fe0c981 fetch 1 ,mem_remote_car_24g_tx_temp + 3 
+4ad1 c0024ad4 beq car_cmd_l_r_motor_control ,remote_car_moto_data_next 
+4ad2 c002cad4 beq car_cmd_f_b_motor_control ,remote_car_moto_data_next 
+4ad3 20600000 rtn 
+
+remote_car_moto_data_next:
+4ad4 6fe0c984 fetch 1 ,mem_remote_car_24g_tx_temp + 6 
+4ad5 243a4adb nbranch remote_car_moto_data_enable_user ,blank 
+4ad6 6fe0c986 fetch 1 ,mem_remote_car_24g_tx_temp + 8 
+4ad7 243a4adb nbranch remote_car_moto_data_enable_user ,blank 
+4ad8 6fe0c988 fetch 1 ,mem_remote_car_24g_tx_temp + 10 
+4ad9 243a4adb nbranch remote_car_moto_data_enable_user ,blank 
+4ada 20600000 rtn 
+
+remote_car_moto_data_enable_user:
+4adb 78347c00 enable user 
+4adc 20204ac6 branch remote_car_g24_package_data_continue 
+
+remote_car_default_init:
+4add 70479214 jam 0x14 ,mem_ui_button_timeout 
+4ade 70478601 jam 0x01 ,mem_ui_button_last_state 
+4adf 5800060f setarg 0x060f 
+4ae0 67e148d5 store 2 ,mem_remote_car_queue_each_size 
+4ae1 580048d5 setarg mem_remote_car_queue_each_size 
+4ae2 67e1448c store 2 ,mem_queue_ptr 
+4ae3 70409901 jam 0x01 ,mem_lpm_mode 
+4ae4 70415b06 jam 0x06 ,mem_lpm_overhead 
+4ae5 70417802 jam 0x02 ,mem_lpm_mult_timeout 
+4ae6 7048d400 jam 0x00 ,mem_remote_car_hard_soft_switch 
+4ae7 58004934 setarg mem_remote_style_led_type 
+4ae8 67e1448f store 2 ,mem_ui_led_struct_ptr 
+4ae9 70448e01 jam 0x01 ,mem_ui_led_struct_num 
+4aea 704935ff jam 0xff ,mem_remote_style_blink_count 
+4aeb 58000296 setarg 0x0296 
+4aec 67e14937 store 2 ,mem_remote_style_on_time 
+4aed 5800073a setarg 0x073a 
+4aee 67e14939 store 2 ,mem_remote_style_off_time 
+4aef 58004991 setarg mem_remote_car_soft_power 
+4af0 67e144cc store 2 ,mem_power_param_ptr 
+4af1 58000c0c setarg 0x0c0c 
+4af2 67e14993 store 2 ,mem_remote_car_power_off_timeout 
+4af3 58004948 setarg mem_remote_car_keyscan 
+4af4 67e144c8 store 2 ,mem_keyscan_ptr 
+4af5 70496500 jam 0x00 ,mem_remote_car_config_soft_switch_enable 
+4af6 704963ff jam 0xff ,mem_remote_car_config_connect_led_gpio 
+4af7 704966ff jam 0xff ,mem_remote_car_config_soft_switch_gpio 
+4af8 70496100 jam 0x00 ,mem_remote_car_config_key_map 
+4af9 70496200 jam 0x00 ,mem_remote_car_config_layout 
+4afa 70496400 jam 0x00 ,mem_remote_car_config_check_way 
+4afb 70496701 jam 0x01 ,mem_remote_car_config_timeout_shutdown_enable 
+4afc 58004e55 setarg 0x4e55 
+4afd 67e14954 store 2 ,mem_current_vdd_value_default_mid_x 
+4afe 67e14956 store 2 ,mem_current_vdd_value_default_mid_y 
+4aff 58000007 setarg 0x0007 
+4b00 67e1495a store 2 ,mem_current_vdd_default_range 
+4b01 7044a202 jam 0x02 ,mem_adc_config_flag 
+4b02 38035a0c setsect 0 ,0x35a0c 
+4b03 3804011a setsect 1 ,0x11a 
+4b04 38080060 setsect 2 ,0x60 
+4b05 380c0028 setsect 3 ,0x28 
+4b06 67e4c968 store 9 ,mem_remote_car_24g_motor_packet 
+4b07 3802000a setsect 0 ,0x2000a 
+4b08 38040002 setsect 1 ,0x02 
+4b09 e7e20005 istore 4 ,contw 
+4b0a 38035a08 setsect 0 ,0x35a08 
+4b0b 3804019a setsect 1 ,0x19a 
+4b0c 38080000 setsect 2 ,0x00 
+4b0d 380c0000 setsect 3 ,0x00 
+4b0e 67e4c975 store 9 ,mem_remote_car_24g_fire_packet 
+4b0f 58000064 setarg 0x0064 
+4b10 67e1498d store 2 ,mem_remote_car_no_data_timeout 
+4b11 7041e800 jam tx_power_0db ,mem_tx_power 
+4b12 70483901 jam 0x01 ,mem_24g_data_type 
+4b13 7048ac06 jam 0x06 ,mem_24g_max_retry 
+4b14 70485e01 jam 0x01 ,mem_24g_pair_switch 
+4b15 70489000 jam 0x00 ,mem_24g_fast_conn_enable 
+4b16 204022d0 call g24_rx_window_init 
+4b17 2040261a call g24_interval_param_8ms 
+4b18 204022b5 call g24_chmap_param_init 
+4b19 204022db call g24_pair_param_init 
+4b1a 58000708 setarg 0x0708 
+4b1b 67e14885 store 2 ,mem_24g_pair_timeout_init 
+4b1c 58000050 setarg 0x0050 
+4b1d 67e14889 store 2 ,mem_24g_reconn_timeout_init 
+4b1e 580a7700 setarg 0x0a7700 
+4b1f 67e1c8b4 store 3 ,mem_24g_long_sleep_set 
+4b20 58604800 setarg 0x604800 
+4b21 67e1c85f store 3 ,mem_24g_enter_hibernate 
+4b22 20203174 branch app_sys_param_init 
+
+shutter_init:
+4b23 20406e5e call enable_authrom 
+4b24 20758000 rtn wake 
+4b25 58004ba8 setarg shutter_le_before_hibernate 
+4b26 67e1445d store 2 ,mem_cb_before_hibernate 
+4b27 58004ba6 setarg shutter_process_lpm_before 
+4b28 67e1445f store 2 ,mem_cb_before_lpm 
+4b29 58003289 setarg app_enter_hibernate 
+4b2a 67e14469 store 2 ,mem_cb_discovry_timeout 
+4b2b 58004ba4 setarg shutter_process_idle 
+4b2c 67e14465 store 2 ,mem_cb_idle_process 
+4b2d 58004b53 setarg shutter_process_bb_event 
+4b2e 67e14467 store 2 ,mem_cb_bb_event_process 
+4b2f 58004b4d setarg shutter_le_scale_lpm_lock 
+4b30 67e1445b store 2 ,mem_cb_check_wakelock 
+4b31 58004c15 setarg ble_shutter_receive_data 
+4b32 67e1446b store 2 ,mem_cb_att_write 
+4b33 58004b8a setarg shutter_le_bb_event_timer 
+4b34 67e1446f store 2 ,mem_cb_event_timer 
+4b35 58004bf0 setarg shutter_key_change 
+4b36 67e147eb store 2 ,mem_cb_shutter_keycan 
+4b37 58004c2c setarg shutter_soft_swtich_power_on 
+4b38 67e147e6 store 2 ,mem_shutter_soft_switch_poweron_callback_function 
+4b39 58004c2d setarg shutter_soft_swtich_power_off 
+4b3a 67e147e8 store 2 ,mem_shutter_soft_switch_poweroff_callback_function 
+4b3b 20404b48 call shutter_set_ble_version 
+4b3c 20401a55 call le_modified_name 
+4b3d 20404c18 call shutter_init_param 
+4b3e 204061da call keyscan_key_init 
+4b3f 204079a5 call queue_init 
+4b40 2040785b call ui_led_init_global 
+4b41 44f2c01c bpatch patch1c_5 ,mem_patch1c 
+4b42 20404c25 call shutter_load_buffer_config_form_datarom 
+4b43 6fe0c7e1 fetch 1 ,mem_shutter_hard_soft_switch_case 
+4b44 c0004b4a beq hard_switch ,shutter_hart_swtich_power_on 
+4b45 6fe0c7e2 fetch 1 ,mem_shutter_soft_switch_button_gpio 
+4b46 67e0c793 store 1 ,mem_ui_button_gpio 
+4b47 20204c34 branch ui_soft_swtich_init 
+
+shutter_set_ble_version:
+4b48 7045fa07 jam 7 ,mem_lmp_version 
+4b49 20600000 rtn 
+
+shutter_hart_swtich_power_on:
+4b4a 704793ff jam ui_button_gpio_disable ,mem_ui_button_gpio 
+4b4b 7047e301 jam ss_state_power_on ,mem_shutter_soft_switch_power_state 
+4b4c 20204bc3 branch shutter_start_reconnect 
+
+shutter_le_scale_lpm_lock:
+4b4d 6fe0c7e3 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b4e c001324f beq ss_state_power_off ,app_get_lpm_wake_lock 
+4b4f 2040535f call l2cap_malloc_get_full_map 
+4b50 6fe0c4e9 fetch 1 ,mem_used_map 
+4b51 243a324f nbranch app_get_lpm_wake_lock ,blank 
+4b52 20203251 branch app_put_lpm_wake_lock 
+
+shutter_process_bb_event:
+4b53 1a627e00 copy regc ,pdata 
+4b54 c00a4b5c beq bt_evt_le_connected ,ble_shutter_process_baseband_connect 
+4b55 c00acb60 beq bt_evt_le_disconnected ,ble_shutter_process_baseband_disconnect 
+4b56 c01fcb63 beq bt_evt_le_reconnect_complete ,ble_shutter_process_reconnect_complete 
+4b57 c0204b69 beq bt_evt_le_parse_conn_papa_update_rsp ,ble_shutter_process_parse_connect_parameter_update_response 
+4b58 c0084b6f beq bt_evt_button_long_pressed ,shutter_process_soft_swtich_button_long_press 
+4b59 c0164b70 beq bt_evt_button_down ,shutter_process_soft_swtich_button_down 
+4b5a c016cb7b beq bt_evt_button_up ,shutter_process_soft_swtich_button_up 
+4b5b 20600000 rtn 
+
+ble_shutter_process_baseband_connect:
+4b5c 20404baa call shutter_stop_bluetooth_discovery 
+4b5d 58000000 setarg 0 
+4b5e 67e147bb store 2 ,mem_ble_shutter_reconn_timer 
+4b5f 20203287 branch app_led_off 
+
+ble_shutter_process_baseband_disconnect:
+4b60 204079a5 call queue_init 
+4b61 7047b400 jam 0 ,mem_ble_shutter_enable_notify 
+4b62 20204bc3 branch shutter_start_reconnect 
+
+ble_shutter_process_reconnect_complete:
+4b63 204079a5 call queue_init 
+4b64 7047b401 jam 1 ,mem_ble_shutter_enable_notify 
+4b65 6fe447c5 fetch 8 ,mem_ble_shutter_interval_min 
+4b66 67e44372 store 8 ,mem_le_interval_min 
+4b67 20403295 call app_lpm_mult_enable 
+4b68 20201f04 branch le_l2cap_tx_update_req 
+
+ble_shutter_process_parse_connect_parameter_update_response:
+4b69 6fe143db fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+4b6a c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
+4b6b 6fe447cd fetch 8 ,mem_ble_shutter_interval_min_new 
+4b6c 207a0000 rtn blank 
+4b6d 67e44372 store 8 ,mem_le_interval_min 
+4b6e 20201f04 branch le_l2cap_tx_update_req 
+
+shutter_process_soft_swtich_button_long_press:
+4b6f 20204c45 branch ui_soft_switch_botton_long_press 
+
+shutter_process_soft_swtich_button_down:
+4b70 6fe0c7e1 fetch 1 ,mem_shutter_hard_soft_switch_case 
+4b71 c1000000 rtneq hard_switch 
+4b72 6fe0c7e3 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b73 c1808000 rtnne ss_state_power_on 
+4b74 20404b76 call shutter_store_currenct_led_state 
+4b75 20203285 branch app_led_on 
+
+shutter_store_currenct_led_state:
+4b76 7049e301 jam 1 ,mem_shutter_soft_swtich_botton_down 
+4b77 df20000b arg 11 ,loopcnt 
+4b78 d8a049e4 arg mem_shutter_soft_swtich_led_struct_temp ,contw 
+4b79 d8c049cd arg mem_shutter_led_struct_app_led ,contr 
+4b7a 20207dd4 branch memcpy 
+
+shutter_process_soft_swtich_button_up:
+4b7b 6fe0c7e1 fetch 1 ,mem_shutter_hard_soft_switch_case 
+4b7c c1000000 rtneq hard_switch 
+4b7d 6fe0c7e3 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b7e c000cb80 beq ss_state_power_on ,shutter_load_currenct_led_state 
+4b7f 20204c41 branch ui_soft_switch_botton_up 
+
+shutter_load_currenct_led_state:
+4b80 6fe0c9e3 fetch 1 ,mem_shutter_soft_swtich_botton_down 
+4b81 c1808000 rtnne 1 
+4b82 7049e300 jam 0 ,mem_shutter_soft_swtich_botton_down 
+4b83 6fe1478f fetch 2 ,mem_ui_state_map 
+4b84 c2803287 bbit1 ui_state_bt_connected ,app_led_off 
+4b85 c284b287 bbit1 ui_state_ble_connected ,app_led_off 
+4b86 df20000b arg 11 ,loopcnt 
+4b87 d8c049e4 arg mem_shutter_soft_swtich_led_struct_temp ,contr 
+4b88 d8a049cd arg mem_shutter_led_struct_app_led ,contw 
+4b89 20207dd4 branch memcpy 
+
+shutter_le_bb_event_timer:
+4b8a 20404b8d call shutter_check_sleep_timer 
+4b8b 20404b94 call shutter_check_power_off_timer 
+4b8c 20204b9f branch ble_shutter_reconn_timer 
+
+shutter_check_sleep_timer:
+4b8d da6047df arg mem_shutter_sleep_timer ,regc 
+4b8e da404b90 arg shutter_sleep_timeout ,regb 
+4b8f 20203203 branch timer_single_step_2b 
+
+shutter_sleep_timeout:
+4b90 7047e302 jam ss_state_power_off ,mem_shutter_soft_switch_power_state 
+4b91 20403287 call app_led_off 
+4b92 20404bd4 call shutter_disconnect_current_connection 
+4b93 20204c31 branch shutter_wait_power_off 
+
+shutter_check_power_off_timer:
+4b94 da6049f0 arg mem_shutter_power_off_timer ,regc 
+4b95 da404b97 arg shutter_check_power_off_timeout ,regb 
+4b96 202031fc branch timer_single_step 
+
+shutter_check_power_off_timeout:
+4b97 6fe1478f fetch 2 ,mem_ui_state_map 
+4b98 c284cc31 bbit1 ui_state_ble_connected ,shutter_wait_power_off 
+4b99 c2804c31 bbit1 ui_state_bt_connected ,shutter_wait_power_off 
+4b9a 6fe0c9cd fetch 1 ,mem_shutter_led_struct_app_led_type 
+4b9b c000cc31 beq ui_led_state_blink_start ,shutter_wait_power_off 
+4b9c c0024c31 beq ui_led_state_blink_lighting ,shutter_wait_power_off 
+4b9d c002cc31 beq ui_led_state_blink_darking ,shutter_wait_power_off 
+4b9e 20203289 branch app_enter_hibernate 
+
+ble_shutter_reconn_timer:
+4b9f 6fe0c7e3 fetch 1 ,mem_shutter_soft_switch_power_state 
+4ba0 c1808000 rtnne ss_state_power_on 
+4ba1 da6047bb arg mem_ble_shutter_reconn_timer ,regc 
+4ba2 da404bb1 arg shutter_start_bluetooth_discovery ,regb 
+4ba3 20203203 branch timer_single_step_2b 
+
+shutter_process_idle:
+4ba4 20404c01 call shutter_send_data_to_master 
+4ba5 2020620b branch keyscan_key_process 
+
+shutter_process_lpm_before:
+4ba6 20406136 call gpio_set_before_lpm 
+4ba7 202061ff branch keyscan_process_lpm_before 
+
+shutter_le_before_hibernate:
+4ba8 20406136 call gpio_set_before_lpm 
+4ba9 20206e62 branch disable_authrom 
+
+shutter_stop_bluetooth_discovery:
+4baa 6fe0c7a7 fetch 1 ,mem_shutter_bluetooth_type 
+4bab c2804bad bbit1 ble_shutter ,ble_shutter_stop_bluetooth_discovery 
+4bac 20600000 rtn 
+
+ble_shutter_stop_bluetooth_discovery:
+4bad 6fe147db fetch 2 ,mem_ble_shutter_connect_timeout 
+4bae 67e147dd store 2 ,mem_shutter_sleep_timeout 
+4baf 67e147df store 2 ,mem_shutter_sleep_timer 
+4bb0 20203277 branch app_ble_stop_adv 
+
+shutter_start_bluetooth_discovery:
+4bb1 6fe0c7e3 fetch 1 ,mem_shutter_soft_switch_power_state 
+4bb2 c1808000 rtnne ss_state_power_on 
+4bb3 6fe0c7a7 fetch 1 ,mem_shutter_bluetooth_type 
+4bb4 c2804bb6 bbit1 ble_shutter ,ble_shutter_start_discovery 
+4bb5 20600000 rtn 
+
+ble_shutter_start_discovery:
+4bb6 6fe1478f fetch 2 ,mem_ui_state_map 
+4bb7 c3848000 rtnbit1 ui_state_ble_connected 
+4bb8 6fe147d9 fetch 2 ,mem_ble_shutter_discovery_timeout 
+4bb9 67e147dd store 2 ,mem_shutter_sleep_timeout 
+4bba 67e147df store 2 ,mem_shutter_sleep_timer 
+4bbb 6fe147b7 fetch 2 ,mem_ble_shutter_discovery_adv_interval 
+4bbc 20404c56 call shutter_ble_adv_interval_set 
+4bbd 20403283 call app_led_start_blink 
+4bbe 6fe247c1 fetch 4 ,mem_ble_shutter_discovery_blink_on_time 
+4bbf 67e249d0 store 4 ,mem_shutter_led_struct_app_led_on_time 
+4bc0 6fe1478f fetch 2 ,mem_ui_state_map 
+4bc1 c3858000 rtnbit1 ui_state_ble_adv 
+4bc2 20203279 branch app_ble_start_adv 
+
+shutter_start_reconnect:
+4bc3 6fe0c7e3 fetch 1 ,mem_shutter_soft_switch_power_state 
+4bc4 c1808000 rtnne ss_state_power_on 
+4bc5 6fe0c7a7 fetch 1 ,mem_shutter_bluetooth_type 
+4bc6 c2804bc8 bbit1 ble_shutter ,ble_shutter_start_reconnect 
+4bc7 20600000 rtn 
+
+ble_shutter_start_reconnect:
+4bc8 6fe147bb fetch 2 ,mem_ble_shutter_reconn_timer 
+4bc9 684947b9 fetcht 2 ,mem_ble_shutter_reconn_timeout 
+4bca 604947bb storet 2 ,mem_ble_shutter_reconn_timer 
+4bcb 247a0000 nrtn blank 
+4bcc 6fe147b5 fetch 2 ,mem_ble_shutter_reconn_adv_interval 
+4bcd 20404c56 call shutter_ble_adv_interval_set 
+4bce 20403283 call app_led_start_blink 
+4bcf 6fe247bd fetch 4 ,mem_ble_shutter_reconn_blink_on_time 
+4bd0 67e249d0 store 4 ,mem_shutter_led_struct_app_led_on_time 
+4bd1 6fe1478f fetch 2 ,mem_ui_state_map 
+4bd2 c3858000 rtnbit1 ui_state_ble_adv 
+4bd3 20203279 branch app_ble_start_adv 
+
+shutter_disconnect_current_connection:
+4bd4 6fe1478f fetch 2 ,mem_ui_state_map 
+4bd5 c284b281 bbit1 ui_state_ble_connected ,app_ble_disconnect 
+4bd6 20204baa branch shutter_stop_bluetooth_discovery 
+
+shutter_check_data_enable:
+4bd7 20407ec7 call disable_user 
+4bd8 6fe1478f fetch 2 ,mem_ui_state_map 
+4bd9 c284cbdb bbit1 ui_state_ble_connected ,shutter_check_ble_data_enable 
+4bda 20600000 rtn 
+
+shutter_check_ble_data_enable:
+4bdb 6fe0c7b4 fetch 1 ,mem_ble_shutter_enable_notify 
+4bdc 207a0000 rtn blank 
+4bdd 20207ec5 branch enable_user 
+
+shutter_check_bluetooth_conn:
+4bde 20407ec7 call disable_user 
+4bdf 6fe1478f fetch 2 ,mem_ui_state_map 
+4be0 c3800000 rtnbit1 ui_state_bt_connected 
+4be1 c3848000 rtnbit1 ui_state_ble_connected 
+4be2 20207ec5 branch enable_user 
+
+shutter_change_bluetooth_status_bt_disconn:
+4be3 6fe0c7a7 fetch 1 ,mem_shutter_bluetooth_type 
+4be4 c2804be6 bbit1 ble_shutter ,ble_shutter_change_bluetooth_status_bt_disconn 
+4be5 20600000 rtn 
+
+ble_shutter_change_bluetooth_status_bt_disconn:
+4be6 20204bc3 branch shutter_start_reconnect 
+
+shutter_check_send_data:
+4be7 78567c00 disable user2 
+4be8 6fe147dd fetch 2 ,mem_shutter_sleep_timeout 
+4be9 67e147df store 2 ,mem_shutter_sleep_timer 
+4bea 20404bde call shutter_check_bluetooth_conn 
+4beb 20344be3 branch shutter_change_bluetooth_status_bt_disconn ,user 
+4bec 20404bd7 call shutter_check_data_enable 
+4bed 24740000 nrtn user 
+4bee 78367c00 enable user2 
+4bef 20600000 rtn 
+
+shutter_key_change:
+4bf0 20404be7 call shutter_check_send_data 
+4bf1 24760000 nrtn user2 
+4bf2 1a227e00 deposit rega 
+4bf3 203a4bf7 branch shutter_key_release ,blank 
+
+shutter_key_press:
+4bf4 20403285 call app_led_on 
+4bf5 da6047f5 arg mem_key0_press ,regc 
+4bf6 20204bf9 branch push_queue_press_or_release 
+
+shutter_key_release:
+4bf7 20403287 call app_led_off 
+4bf8 da60481d arg mem_key0_release ,regc 
+
+push_queue_press_or_release:
+4bf9 dfe00005 arg max_queue_num ,pdata 
+4bfa 98effe00 imul32 queue ,pdata 
+4bfb 9a60a600 iadd regc ,regc 
+
+push_buffer_in_queue:
+4bfc efe08013 ifetch 1 ,regc 
+4bfd 207a0000 rtn blank 
+4bfe 20404c0d call queue_push_one_byte 
+4bff 1a60a601 increase 1 ,regc 
+4c00 20204bfc branch push_buffer_in_queue 
+
+shutter_send_data_to_master:
+4c01 6fe1478f fetch 2 ,mem_ui_state_map 
+4c02 c284cc04 bbit1 ui_state_ble_connected ,pop_queue_to_ble_data 
+4c03 20600000 rtn 
+
+pop_queue_to_ble_data:
+4c04 20401b24 call le_fifo_check_nearly_full 
+4c05 247a0000 nrtn blank 
+4c06 20404c10 call queue_pop_one_byte 
+4c07 24740000 nrtn user 
+4c08 1fe0ffff pincrease -1 
+4c09 1feffe05 mul32 pdata ,shutter_ble_data_buffer ,pdata 
+4c0a d8404845 arg mem_ble_data_buffer1 ,temp 
+4c0b 98408c00 iadd temp ,contr 
+4c0c 20204c5a branch le_send_notify_from_list 
+
+queue_push_one_byte:
+4c0d 67e0895c store 1 ,mem_pdatatemp 
+4c0e da20095c arg mem_pdatatemp ,rega 
+4c0f 202079aa branch queue_push 
+
+queue_pop_one_byte:
+4c10 da20095c arg mem_pdatatemp ,rega 
+4c11 204079c1 call queue_pop 
+4c12 24740000 nrtn user 
+4c13 6fe0895c fetch 1 ,mem_pdatatemp 
+4c14 20600000 rtn 
+
+ble_shutter_receive_data:
+4c15 6fe14437 fetch 2 ,mem_le_att_handle 
+4c16 c00c4b63 beq gatt_keyboard_write_handle ,ble_shutter_process_reconnect_complete 
+4c17 20600000 rtn 
+
+shutter_init_param:
+4c18 58000002 setarg 0x02 
+4c19 67e0c9ef store 1 ,mem_shutter_power_off_timeout 
+4c1a 58200008 setarg 0x00200008 
+4c1b 67e247c5 store 4 ,mem_ble_shutter_interval_min 
+4c1c 592c0005 setarg 0x012c0005 
+4c1d e7e20005 istore 4 ,contw 
+4c1e 70438017 jam 0x17 ,mem_le_local_mtu 
+4c1f 5800001b setarg 0x1b 
+4c20 67e143d1 store 2 ,mem_le_pairing_handle 
+4c21 20401ac2 call le_set_config_fixed_ltk 
+4c22 20401ade call le_set_fixed_ltk 
+4c23 20401aeb call le_set_justwork 
+4c24 20201aca branch le_set_config_read_authentication 
+
+shutter_load_buffer_config_form_datarom:
+4c25 df200028 arg ble_key_value_list_size ,loopcnt 
+4c26 d8a04845 arg mem_ble_data_buffer1 ,contw 
+4c27 d8c09e57 arg ble_shutter_key_value_list ,contr 
+4c28 20207dc7 branch memcpy_fast 
+
+shutter_load_ble_gatt_form_datarom:
+4c29 df20017e arg ble_gatt_list_size ,loopcnt 
+4c2a d8c09af2 arg ble_shutter_gatt_list ,contr 
+4c2b 20207dc7 branch memcpy_fast 
+
+shutter_soft_swtich_power_on:
+4c2c 20204bc3 branch shutter_start_reconnect 
+
+shutter_soft_swtich_power_off:
+4c2d da200000 arg 0 ,rega 
+4c2e da6049d8 arg mem_shutter_power_off_led_style ,regc 
+4c2f 20407877 call ui_led_set_style_global 
+4c30 20404bd4 call shutter_disconnect_current_connection 
+
+shutter_wait_power_off:
+4c31 6fe0c9ef fetch 1 ,mem_shutter_power_off_timeout 
+4c32 67e0c9f0 store 1 ,mem_shutter_power_off_timer 
+4c33 20600000 rtn 
+
+ui_soft_swtich_init:
+4c34 58000000 setarg ss_state_power_up 
+4c35 20404c3c call ui_soft_swtich_init_power_on_time 
+4c36 70478601 jam ui_button_state_up ,mem_ui_button_last_state 
+4c37 20407826 call ui_button_init 
+4c38 20407830 call ui_button_polling 
+4c39 6fe1478f fetch 2 ,mem_ui_state_map 
+4c3a c3860000 rtnbit1 ui_state_btn_down 
+4c3b 20203289 branch app_enter_hibernate 
+
+ui_soft_swtich_init_power_on_time:
+4c3c 684944cc fetcht 2 ,mem_power_param_ptr 
+4c3d e7e08002 istore 1 ,temp 
+4c3e efe08005 ifetch 1 ,contw 
+4c3f 67e0c792 store 1 ,mem_ui_button_timeout 
+4c40 20600000 rtn 
+
+ui_soft_switch_botton_up:
+4c41 6fe144cc fetch 2 ,mem_power_param_ptr 
+4c42 efe0803f ifetch 1 ,pdata 
+4c43 c1800000 rtnne ss_state_power_up 
+4c44 20203289 branch app_enter_hibernate 
+
+ui_soft_switch_botton_long_press:
+4c45 684944cc fetcht 2 ,mem_power_param_ptr 
+4c46 efe08002 ifetch 1 ,temp 
+4c47 c000cc50 beq ss_state_power_on ,ui_soft_switch_power_off 
+
+ui_soft_switch_power_on:
+4c48 58000001 setarg ss_state_power_on 
+4c49 684944cc fetcht 2 ,mem_power_param_ptr 
+4c4a e7e08002 istore 1 ,temp 
+4c4b 18408c02 add temp ,ss_power_off_time ,contr 
+4c4c efe08006 ifetch 1 ,contr 
+4c4d e7e08012 istore 1 ,mem_ui_button_timeout 
+4c4e efe10006 ifetch 2 ,contr 
+4c4f 20207e7a branch callback_func 
+
+ui_soft_switch_power_off:
+4c50 58000002 setarg ss_state_power_off 
+4c51 20404c3c call ui_soft_swtich_init_power_on_time 
+4c52 18408c05 add temp ,ss_power_off_cb ,contr 
+4c53 efe10006 ifetch 2 ,contr 
+4c54 203a3289 branch app_enter_hibernate ,blank 
+4c55 20207e7a branch callback_func 
+
+shutter_ble_adv_interval_set:
+4c56 67e14159 store 2 ,mem_lpm_interval 
+4c57 1fe0fffc increase -4 ,pdata 
+4c58 67e14428 store 2 ,mem_le_adv_interval 
+4c59 20600000 rtn 
+
+le_send_notify_from_list:
+4c5a efe08006 ifetch 1 ,contr 
+4c5b 1fe22200 copy pdata ,rega 
+4c5c e8410006 ifetcht 2 ,contr 
+4c5d 20407d5e call store_contr 
+4c5e 20401e5f call le_att_malloc_tx_notify 
+4c5f 1a227200 copy rega ,loopcnt 
+4c60 20407d58 call get_contr 
+4c61 20207dd4 branch memcpy 
+
+shutter_default_init:
+4c62 6fe149f1 fetch 2 ,mem_shutter_key_conf0_temp 
+4c63 67e147ed store 2 ,mem_shutter_key_conf0 
+4c64 6fe0c9f3 fetch 1 ,mem_shutter_led_struct_app_led_gpio_temp 
+4c65 67e0c9cf store 1 ,mem_shutter_led_struct_app_led_gpio 
+4c66 67e0c9da store 1 ,mem_shutter_power_off_led_style_gpio 
+4c67 6fe0c9f4 fetch 1 ,mem_shutter_hard_soft_switch_case_temp 
+4c68 67e0c7e1 store 1 ,mem_shutter_hard_soft_switch_case 
+4c69 6fe0c9f5 fetch 1 ,mem_shutter_soft_switch_button_gpio_temp 
+4c6a 67e0c7e2 store 1 ,mem_shutter_soft_switch_button_gpio 
+4c6b 7047a701 jam 0x01 ,mem_shutter_bluetooth_type 
+4c6c 58000030 setarg 0x0030 
+4c6d 67e147b2 store 2 ,mem_classic_shutter_random_mac_offset_addr 
+4c6e 58000000 setarg 0x0000 
+4c6f 67e147a8 store 2 ,mem_shutter_config_eeprom_offset_addr 
+4c70 58000001 setarg 0x0001 
+4c71 67e147f5 store 2 ,mem_key0_press 
+4c72 67e147fa store 2 ,mem_key1_press 
+4c73 58000006 setarg 0x0006 
+4c74 67e1481d store 2 ,mem_key0_release 
+4c75 67e14822 store 2 ,mem_key1_release 
+4c76 58000007 setarg 0x0007 
+4c77 67e147ff store 2 ,mem_key2_press 
+4c78 58000008 setarg 0x0008 
+4c79 67e14827 store 2 ,mem_key2_release 
+4c7a 580047e3 setarg mem_shutter_soft_switch_power_state 
+4c7b 67e144cc store 2 ,mem_power_param_ptr 
+4c7c 58201400 setarg 0x201400 
+4c7d 67e1c7e3 store 3 ,mem_shutter_soft_switch_power_state 
+4c7e 70409901 jam 0x01 ,mem_lpm_mode 
+4c7f 58000100 setarg 0x0100 
+4c80 67e14159 store 2 ,mem_lpm_interval 
+4c81 70415b08 jam 0x08 ,mem_lpm_overhead 
+4c82 70417705 jam 0x05 ,mem_lpm_mult 
+4c83 70417802 jam 0x02 ,mem_lpm_mult_timeout 
+4c84 58000030 setarg 0x0030 
+4c85 67e14455 store 2 ,mem_sniff_param_interval 
+4c86 58000001 setarg 0x0001 
+4c87 e7e10005 istore 2 ,contw 
+4c88 7046440a jam 0x0a ,mem_unsniff2sniff_timer 
+4c89 58000096 setarg 0x0096 
+4c8a 67e147bd store 2 ,mem_ble_shutter_reconn_blink_on_time 
+4c8b e7e10005 istore 2 ,contw 
+4c8c 58000296 setarg 0x0296 
+4c8d 67e147c1 store 2 ,mem_ble_shutter_discovery_blink_on_time 
+4c8e e7e10005 istore 2 ,contw 
+4c8f 38000010 setsect 0 ,0x10 
+4c90 38048008 setsect 1 ,0x8008 
+4c91 380ac000 setsect 2 ,0x2c000 
+4c92 380c0004 setsect 3 ,0x04 
+4c93 67e447cd store 8 ,mem_ble_shutter_interval_min_new 
+4c94 70448e01 jam 0x01 ,mem_ui_led_struct_num 
+4c95 580049cd setarg mem_shutter_led_struct_app_led 
+4c96 67e1448f store 2 ,mem_ui_led_struct_ptr 
+4c97 58000000 setarg 0x0000 
+4c98 67e149cd store 2 ,mem_shutter_led_struct_app_led 
+4c99 380001a0 setsect 0 ,0x1a0 
+4c9a 38040068 setsect 1 ,0x68 
+4c9b 38080000 setsect 2 ,0x00 
+4c9c 380c0000 setsect 3 ,0x00 
+4c9d 67e449d0 store 8 ,mem_shutter_led_struct_app_led_on_time 
+4c9e 58000301 setarg 0x0301 
+4c9f 67e149d8 store 2 ,mem_shutter_power_off_led_style 
+4ca0 380001a0 setsect 0 ,0x1a0 
+4ca1 380400e8 setsect 1 ,0xe8 
+4ca2 38080000 setsect 2 ,0x00 
+4ca3 380c0000 setsect 3 ,0x00 
+4ca4 67e449db store 8 ,mem_shutter_power_off_led_style_on_time 
+4ca5 5800000e setarg 0x000e 
+4ca6 67e147b5 store 2 ,mem_ble_shutter_reconn_adv_interval 
+4ca7 58000140 setarg 0x0140 
+4ca8 67e147b7 store 2 ,mem_ble_shutter_discovery_adv_interval 
+4ca9 67e14428 store 2 ,mem_le_adv_interval 
+4caa 58000050 setarg 0x0050 
+4cab 67e147b9 store 2 ,mem_ble_shutter_reconn_timeout 
+4cac 70443207 jam 0x07 ,mem_le_adv_channel_map 
+4cad 70442700 jam 0x00 ,mem_le_adv_enable 
+4cae 380000fb setsect 0 ,0xfb 
+4caf 3806c212 setsect 1 ,0x2c212 
+4cb0 3808800f setsect 2 ,0x800f 
+4cb1 380c0021 setsect 3 ,0x21 
+4cb2 67e4444c store 8 ,mem_local_rx_max_octets 
+4cb3 38000bb8 setsect 0 ,0x0bb8 
+4cb4 380402ee setsect 1 ,0x02ee 
+4cb5 67e247d9 store 4 ,mem_ble_shutter_discovery_timeout 
+4cb6 580048fe setarg mem_queue_each_size 
+4cb7 67e1448c store 2 ,mem_queue_ptr 
+4cb8 58002001 setarg 0x2001 
+4cb9 67e148fe store 2 ,mem_queue_each_size 
+4cba 7043e71f jam 0x1f ,mem_le_adv_data_len 
+4cbb 38010102 setsect 0 ,0x10102 
+4cbc 380480c1 setsect 1 ,0x80c1 
+4cbd 38098120 setsect 2 ,0x18120 
+4cbe 380c640c setsect 3 ,0x640c 
+4cbf 67e4c3e8 store 9 ,mem_le_adv_data 
+4cc0 380003c1 setsect 0 ,0x3c1 
+4cc1 e7e10005 istore 2 ,contw 
+4cc2 7044071f jam 0x1f ,mem_le_scan_data_len 
+4cc3 3802090d setsect 0 ,0x2090d 
+4cc4 38074c15 setsect 1 ,0x34c15 
+4cc5 380a8532 setsect 2 ,0x28532 
+4cc6 380dd1d5 setsect 3 ,0x1d1d5 
+4cc7 67e4c408 store 9 ,mem_le_scan_data 
+4cc8 38026574 setsect 0 ,0x26574 
+4cc9 3804001c setsect 1 ,0x1c 
+4cca e7e18005 istore 3 ,contw 
+4ccb 580047ea setarg mem_shutter_keyscan 
+4ccc 67e144c8 store 2 ,mem_keyscan_ptr 
+4ccd 7047ea02 jam 0x02 ,mem_shutter_key_num 
+4cce 70447f17 jam 0x17 ,mem_app_connection_options 
+4ccf 58004923 setarg mem_shutter_nv_data 
+4cd0 67e14489 store 2 ,mem_nv_data_ptr 
+4cd1 70448b05 jam 0x05 ,mem_nv_data_number 
+4cd2 58002540 setarg 0x2540 
+4cd3 67e140b2 store 2 ,mem_class 
+4cd4 58040003 setarg 0x040003 
+4cd5 67e1c768 store 3 ,mem_lmp_io_cap_payload_iocap 
+4cd6 70476f03 jam 0x03 ,mem_ssp_mode_flag 
+4cd7 70476701 jam 0x01 ,mem_ssp_enable 
+4cd8 70479101 jam 0x01 ,mem_ui_profile_supported 
+4cd9 70415f00 jam 0x00 ,mem_ptt 
+4cda 3803ffff setsect 0 ,0x3ffff 
+4cdb 3806fe23 setsect 1 ,0x2fe23 
+4cdc 380999d9 setsect 2 ,0x199d9 
+4cdd 380c020d setsect 3 ,0x20d 
+4cde 67e440a0 store 8 ,mem_features 
+4cdf 58009af2 setarg 0x9af2 
+4ce0 67e14396 store 2 ,mem_ui_le_uuid_table 
+4ce1 7040d801 jam 0x01 ,mem_eir_enable 
+4ce2 38010306 setsect 0 ,0x10306 
+4ce3 38040004 setsect 1 ,0x4 
+4ce4 38082010 setsect 2 ,0x2010 
+4ce5 380c9040 setsect 3 ,0x9040 
+4ce6 67e4c665 store 9 ,mem_all_uuid_16bits 
+4ce7 38020011 setsect 0 ,0x20011 
+4ce8 38040044 setsect 1 ,0x44 
+4ce9 e7e28005 istore 5 ,contw 
+4cea 70467b00 jam 0x00 ,mem_all_uuid_128bits 
+4ceb 58009c70 setarg 0x9c70 
+4cec 67e14663 store 2 ,mem_ui_uuid_table 
+4ced 7040c518 jam 0x18 ,mem_fcomp_div 
+4cee 20403174 call app_sys_param_init 
+4cef df20001e arg 30 ,loopcnt 
+4cf0 d8a042f8 arg mem_le_name ,contw 
+4cf1 20407d9b call clear_mem 
+4cf2 7042f70b jam 0x0b ,mem_le_name_len 
+4cf3 58204241 setarg 0x204241 
+4cf4 67e1c2f8 store 3 ,mem_le_name 
+4cf5 58756853 setarg 0x756853 
+4cf6 e7e18005 istore 3 ,contw 
+4cf7 58657474 setarg 0x657474 
+4cf8 e7e18005 istore 3 ,contw 
+4cf9 58003372 setarg 0x3372 
+4cfa e7e10005 istore 2 ,contw 
+4cfb 6fe0c9f6 fetch 1 ,mem_shutter_le_name_len 
+4cfc 207a0000 rtn blank 
+4cfd 67e0c2f7 store 1 ,mem_le_name_len 
+4cfe 1fe27200 copy pdata ,loopcnt 
+4cff d8c049f7 arg mem_shutter_le_name ,contr 
+4d00 d8a042f8 arg mem_le_name ,contw 
+4d01 20207dd4 branch memcpy 
+
+rf_debug_rx_gpio_low:
+4d02 6fe0c4d7 fetch 1 ,mem_rf_debug_rx_gpio 
+
+rf_debug_gpio_low:
+4d03 d840003e arg gpcfg_output_low ,temp 
+4d04 2020612b branch gpio_config_function 
+
+rf_debug_rx_on_line:
+
+rf_debug_rx_gpio_high:
+4d05 6fe0c4d7 fetch 1 ,mem_rf_debug_rx_gpio 
+
+rf_debug_gpio_high:
+4d06 d840003f arg gpcfg_output_high ,temp 
+4d07 2020612b branch gpio_config_function 
+
+rf_debug_rx_gpio_h_l_h:
+4d08 20404d05 call rf_debug_rx_gpio_high 
+
+rf_debug_rx_gpio_l_h:
+4d09 20404d02 call rf_debug_rx_gpio_low 
+4d0a 20204d05 branch rf_debug_rx_gpio_high 
+
+rf_debug_rx_gpio_l_h_l:
+
+rf_debug_shutdown_radio_line:
+4d0b 20404d09 call rf_debug_rx_gpio_l_h 
+
+rf_debug_rx_crc_line:
+4d0c 20204d02 branch rf_debug_rx_gpio_low 
+
+rf_debug_rx_sync_line:
+4d0d 20204d09 branch rf_debug_rx_gpio_l_h 
+
+rf_debug_rx_crc_fail_line:
+4d0e 20404d09 call rf_debug_rx_gpio_l_h 
+4d0f 20204d0b branch rf_debug_rx_gpio_l_h_l 
+
+rf_debug_rx_match_line:
+
+rf_debug_rx_crc_error_line:
+
+rf_debug_rx_sync_timeout_line:
+4d10 20204d02 branch rf_debug_rx_gpio_low 
+
+rf_debug_tx_off_line:
+
+rf_debug_tx_gpio_low:
+4d11 6fe0c4d8 fetch 1 ,mem_rf_debug_tx_gpio 
+4d12 20204d03 branch rf_debug_gpio_low 
+
+rf_debug_tx_on_line:
+
+rf_debug_tx_gpio_high:
+4d13 6fe0c4d8 fetch 1 ,mem_rf_debug_tx_gpio 
+4d14 20204d06 branch rf_debug_gpio_high 
+
+rf_debug_tx_gpio_l_h_l:
+4d15 20404d11 call rf_debug_tx_gpio_low 
+4d16 20404d13 call rf_debug_tx_gpio_high 
+4d17 20204d11 branch rf_debug_tx_gpio_low 
+
+hci_init:
+4d18 20800000 clear_stack 
+4d19 20404d22 call hci_init_clksel 
+4d1a 20404d2c call hci_init_uart_default_config 
+4d1b 20404d40 call hci_init_uart_config 
+4d1c 20404d5f call hci_init_pwm_default_config 
+4d1d 20404d63 call hci_init_pwm 
+4d1e 7009fc01 jam 1 ,mem_hci_command_complete_num_hci_command_packet 
+4d1f 7009f904 jam hci_h4_type_event ,mem_hci_event_head_type 
+
+hci_process_loop:
+4d20 20404d6e call hci_process_check_uart_rx 
+4d21 20204d20 branch hci_process_loop 
+
+hci_init_clksel:
+4d22 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_hci_boot_clksel 
+4d23 c283cd2a bbit1 7 ,hci_init_clksel_xtal 
+
+hci_init_clksel_dpll:
+4d24 708a01ff jam 0xff ,core_clkpll_ctrl1 
+4d25 20000064 nop 100 
+4d26 708a020e jam 0x0e ,core_clkpll_ctrl2 
+4d27 708a0003 jam 0x03 ,core_clkpll_ctrl0 
+4d28 70804205 jam clksel_dpll ,core_clksel 
+4d29 20600000 rtn 
+
+hci_init_clksel_xtal:
+4d2a 70804204 jam clksel_xtal ,core_clksel 
+4d2b 20600000 rtn 
+
+hci_init_uart_default_config:
+4d2c 20404d30 call hci_init_uart_default_config_tx 
+4d2d 20404d34 call hci_init_uart_default_config_rx 
+4d2e 20404d38 call hci_init_uart_default_config_rts 
+4d2f 20204d3c branch hci_init_uart_default_config_cts 
+
+hci_init_uart_default_config_tx:
+4d30 6fe0c7a7 fetch 1 ,mem_hci_uart_tx_gpio 
+4d31 247a0000 nrtn blank 
+4d32 7047a70d jam hci_uart_tx_gpio_num ,mem_hci_uart_tx_gpio 
+4d33 20600000 rtn 
+
+hci_init_uart_default_config_rx:
+4d34 6fe0c7a8 fetch 1 ,mem_hci_uart_rx_gpio 
+4d35 247a0000 nrtn blank 
+4d36 7047a80e jam hci_uart_rx_gpio_num ,mem_hci_uart_rx_gpio 
+4d37 20600000 rtn 
+
+hci_init_uart_default_config_rts:
+4d38 6fe0c7a9 fetch 1 ,mem_hci_uart_rts_gpio 
+4d39 247a0000 nrtn blank 
+4d3a 7047a909 jam hci_uart_rts_gpio_num ,mem_hci_uart_rts_gpio 
+4d3b 20600000 rtn 
+
+hci_init_uart_default_config_cts:
+4d3c 6fe0c7aa fetch 1 ,mem_hci_uart_cts_gpio 
+4d3d 247a0000 nrtn blank 
+4d3e 7047aa0a jam hci_uart_cts_gpio_num ,mem_hci_uart_cts_gpio 
+4d3f 20600000 rtn 
+
+hci_init_uart_config:
+4d40 58001800 setarg mem_h5rx_buf 
+4d41 67e1095c store 2 ,mem_pdatatemp 
+4d42 58001bff setarg mem_h5rx_buf_end 
+4d43 e7e10005 istore 2 ,contw 
+4d44 58001c00 setarg mem_h5tx_buf 
+4d45 e7e10005 istore 2 ,contw 
+4d46 58001fff setarg mem_h5tx_buf_end 
+4d47 e7e10005 istore 2 ,contw 
+4d48 6fe4095c fetch 8 ,mem_pdatatemp 
+4d49 20405f56 call uarta_init_dma_mem 
+4d4a 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_hci_boot_clksel 
+4d4b 2feffe07 isolate1 7 ,pdata 
+4d4c 2040df7d call uart_clock_select_main_freq_crystal ,true 
+4d4d 2440df81 ncall uart_clock_select_main_freq_dpll ,true 
+4d4e d841c200 arg 115200 ,temp 
+4d4f 20405f6e call uarta_calc_baud_rate_config 
+4d50 6fe0c7a7 fetch 1 ,mem_hci_uart_tx_gpio 
+4d51 d8400008 arg gpcfg_uart_txd ,temp 
+4d52 2040612c call gpio_config_function_int 
+4d53 6fe0c7a8 fetch 1 ,mem_hci_uart_rx_gpio 
+4d54 d8400049 arg gpcfg_uart_rxd | gpcfg_pullup ,temp 
+4d55 2040612c call gpio_config_function_int 
+4d56 6fe0c7a9 fetch 1 ,mem_hci_uart_rts_gpio 
+4d57 d840000a arg gpcfg_uart_rts ,temp 
+4d58 2040612c call gpio_config_function_int 
+4d59 6fe0c7aa fetch 1 ,mem_hci_uart_cts_gpio 
+4d5a d840000b arg gpcfg_uart_cts ,temp 
+4d5b 2040612c call gpio_config_function_int 
+4d5c d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+4d5d 60588060 storet 1 ,core_uart_ctrl 
+4d5e 20207e77 branch clean_mem 
+
+hci_init_pwm_default_config:
+4d5f 6fe0c7ab fetch 1 ,mem_hci_pwm_12mhz_gpio 
+4d60 247a0000 nrtn blank 
+4d61 7047ab0c jam hci_pmw_12mhz_gpio_num ,mem_hci_pwm_12mhz_gpio 
+4d62 20600000 rtn 
+
+hci_init_pwm:
+4d63 6fe0c7ab fetch 1 ,mem_hci_pwm_12mhz_gpio 
+4d64 d8400010 arg gpcfg_pwm_out0 ,temp 
+4d65 2040612c call gpio_config_function_int 
+4d66 da200040 arg 0x40 ,rega 
+4d67 20406239 call pwm_init 
+4d68 da200000 arg 0 ,rega 
+4d69 da400000 arg 0 ,regb 
+4d6a 58000000 setarg 0 
+4d6b 20406272 call pwm_duty_cycle_set 
+4d6c d8e00000 arg 0 ,queue 
+4d6d 20206285 branch pwm_set_select 
+
+hci_process_check_uart_rx:
+4d6e 6ff10112 fetch 2 ,core_uart_rxitems 
+4d6f 1fe0a3fc add pdata ,-4 ,rega 
+4d70 24610000 nrtn positive 
+4d71 20405f9d call uarta_prepare_rx 
+4d72 efe08003 ifetch 1 ,contru 
+4d73 c000cd76 beq hci_h4_type_cmd ,hci_parse_packet_cmd 
+4d74 20407d85 call delay_10ms 
+4d75 20205fad branch uarta_clear_current_rx 
+
+hci_parse_packet_cmd:
+4d76 efe10003 ifetch 2 ,contru 
+4d77 67e109fd store 2 ,mem_hci_opcode 
+4d78 d84003ff arg 0x3ff ,temp 
+4d79 98410400 iand temp ,temp 
+4d7a 604909f6 storet 2 ,mem_hci_opcode_ocf 
+4d7b 1feb7e00 rshift2 pdata ,pdata 
+4d7c 1fecfe00 rshift8 pdata ,pdata 
+4d7d 67e089f8 store 1 ,mem_hci_opcode_ogf 
+4d7e efe08003 ifetch 1 ,contru 
+4d7f 1fe0ffff pincrease -1 
+4d80 9a267c00 isub rega ,null 
+4d81 20610000 rtn positive 
+4d82 20404d84 call hci_parse_complete_packet 
+4d83 20204ddf branch hci_drop_current_packet 
+
+hci_parse_complete_packet:
+4d84 6fe089f8 fetch 1 ,mem_hci_opcode_ogf 
+4d85 c01fcd87 beq hci_ogf_vendor_specific_debug ,hci_parse_packet_cmd_ogf_vendorspecific_debug 
+4d86 20204dcb branch hci_send_event_command_complete_error_command_nuknown 
+
+hci_parse_packet_cmd_ogf_vendorspecific_debug:
+4d87 44f3401c bpatch patch1c_6 ,mem_patch1c 
+4d88 6fe089f6 fetch 1 ,mem_hci_opcode_ocf 
+4d89 c0004dca beq hci_vendor_cmd_reset ,hci_normal_reply 
+4d8a c000cd92 beq hci_vendor_cmd_chipid ,phci_grp_vendor_chipid 
+4d8b c0014d97 beq hci_vendor_cmd_baud ,phci_grp_vendor_baud 
+4d8c c001cda5 beq hci_vendor_cmd_patch ,phci_grp_vendor_patch 
+4d8d c0024daf beq hci_vendor_cmd_patch_done ,phci_grp_vendor_done 
+4d8e c002cdca beq hci_vendor_cmd_echo ,hci_normal_reply 
+4d8f c0084dc0 beq hci_vendor_cmd_mem ,phci_grp_vendor_mem 
+4d90 c00a4dc6 beq hci_vendor_cmd_set_flow_control ,phci_grp_vendor_flow_control 
+4d91 20204dca branch hci_normal_reply 
+
+phci_grp_vendor_chipid:
+4d92 7009ff00 jam command_succeeded ,mem_hci_command_complete_return_parameter 
+4d93 6ff10000 fetch 2 ,core_chipid 
+4d94 67e10a00 store 2 ,mem_hci_command_complete_return_parameter_chip_id 
+4d95 df200003 arg 3 ,loopcnt 
+4d96 20204dd2 branch hci_send_event_command_complete 
+
+phci_grp_vendor_baud:
+4d97 efe10003 ifetch 2 ,contu 
+4d98 67f10052 store 2 ,core_uart_baud 
+4d99 20600000 rtn 
+
+phci_grp_vendor_patch_common:
+4d9a efe08003 ifetch 1 ,contu 
+4d9b 1fe20400 copy pdata ,temp 
+4d9c 67f08024 store 1 ,core_ucode_low 
+4d9d efe08003 ifetch 1 ,contu 
+4d9e 98408400 iadd temp ,temp 
+4d9f 79207e07 set1 7 ,pdata 
+4da0 67f08023 store 1 ,core_ucode_ctrl 
+4da1 efe08003 ifetch 1 ,contu 
+4da2 98408400 iadd temp ,temp 
+4da3 1fe27200 copy pdata ,loopcnt 
+4da4 20600000 rtn 
+
+phci_grp_vendor_patch:
+4da5 20404d9a call phci_grp_vendor_patch_common 
+
+phci_grp_vendor_patch_loop:
+4da6 efe08003 ifetch 1 ,contu 
+4da7 67f08025 store 1 ,core_ucode_data 
+4da8 98408400 iadd temp ,temp 
+4da9 c2004da6 loop phci_grp_vendor_patch_loop 
+
+phci_grp_vendor_patch_check_sum:
+4daa 184104ff and temp ,0xff ,temp 
+4dab efe08003 ifetch 1 ,contu 
+4dac 98467c00 isub temp ,null 
+4dad 2422cdbe nbranch phci_grp_vendor_patch_bad ,zero 
+4dae 20204dca branch hci_normal_reply 
+
+phci_grp_vendor_done:
+4daf df200020 arg 0x20 ,loopcnt 
+4db0 d8a04000 arg mem_patch00 ,contw 
+4db1 d8400000 arg 0 ,temp 
+
+phci_grp_vendor_done_loop:
+4db2 efe08003 ifetch 1 ,contu 
+4db3 e7e08005 istore 1 ,contw 
+4db4 98408400 iadd temp ,temp 
+4db5 c2004db2 loop phci_grp_vendor_done_loop 
+4db6 184104ff and temp ,0xff ,temp 
+4db7 efe08003 ifetch 1 ,contu 
+4db8 98467c00 isub temp ,null 
+4db9 2422cdbe nbranch phci_grp_vendor_patch_bad ,zero 
+4dba 70802300 jam 0 ,core_ucode_ctrl 
+4dbb 20404dca call hci_normal_reply 
+4dbc 20407e7c call wait_uarttx 
+4dbd 20200801 branch soft_reset 
+
+phci_grp_vendor_patch_bad:
+4dbe 70802300 jam 0 ,core_ucode_ctrl 
+4dbf 20204dcb branch hci_send_event_command_complete_error_command_nuknown 
+
+phci_grp_vendor_mem:
+4dc0 efe08003 ifetch 1 ,contu 
+4dc1 1fe27200 copy pdata ,loopcnt 
+4dc2 efe10003 ifetch 2 ,contu 
+4dc3 1fe20a00 copy pdata ,contw 
+4dc4 20405ff3 call uart_copy_rx_bytes 
+4dc5 20204dca branch hci_normal_reply 
+
+phci_grp_vendor_flow_control:
+4dc6 6ff08060 fetch 1 ,core_uart_ctrl 
+4dc7 79207e04 set1 bit_uart_control_flow_control ,pdata 
+4dc8 67f08060 store 1 ,core_uart_ctrl 
+4dc9 20204dca branch hci_normal_reply 
+
+hci_normal_reply:
+4dca 20204dcf branch hci_send_event_command_complete_without_payload 
+
+hci_send_event_command_complete_error_command_nuknown:
+4dcb 7009ff01 jam command_unknown ,mem_hci_command_complete_return_parameter 
+4dcc 20204dd0 branch hci_send_event_command_complete_without_payload + 1 
+
+hci_send_event_command_complete_error_command_disallowed:
+4dcd 7009ff0c jam command_disallowed ,mem_hci_command_complete_return_parameter 
+4dce 20204dd0 branch hci_send_event_command_complete_without_payload + 1 
+
+hci_send_event_command_complete_without_payload:
+4dcf 7009ff00 jam command_succeeded ,mem_hci_command_complete_return_parameter 
+4dd0 df200001 arg 1 ,loopcnt 
+4dd1 20204dd2 branch hci_send_event_command_complete 
+
+hci_send_event_command_complete:
+4dd2 7009fa0e jam hci_event_command_complete ,mem_hci_event_head_event_code 
+4dd3 1f20fe03 add loopcnt ,3 ,pdata 
+4dd4 67e089fb store 1 ,mem_hci_event_para_total_length 
+4dd5 20404ddb call hci_prepare_send_event 
+4dd6 6fe189fc fetch 3 ,mem_hci_command_complete_num_hci_command_packet 
+4dd7 e7e18003 istore 3 ,contwu 
+4dd8 d8c009ff arg mem_hci_command_complete_return_parameter ,contr 
+4dd9 20405fd9 call uart_copy_tx_bytes 
+4dda 20205fb9 branch uarta_send_register_pop 
+
+hci_prepare_send_event:
+4ddb 20405fb5 call uarta_prepare_tx_register_push 
+4ddc 6fe189f9 fetch 3 ,mem_hci_event_head_type 
+4ddd e7e18003 istore 3 ,contwu 
+4dde 20600000 rtn 
+
+hci_drop_current_packet:
+4ddf 20405f9d call uarta_prepare_rx 
+4de0 18608603 increase 3 ,contru 
+4de1 efe08003 ifetch 1 ,contru 
+4de2 98608600 iadd contru ,contru 
+4de3 20205fa9 branch uarta_rxdone 
+
+cmd_exit:
+4de4 7041db00 jam 0 ,mem_hci_cmd 
+4de5 20600000 rtn 
+
+cmd_check_plap:
+4de6 6fe341dd fetch 6 ,mem_hci_plap 
+4de7 684b0040 fetcht 6 ,mem_plap 
+4de8 98467c00 isub temp ,null 
+4de9 20600000 rtn 
+
+hid_rx_process:
+4dea 44f3c01c bpatch patch1c_7 ,mem_patch1c 
+4deb 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+4dec 1fe20c00 copy pdata ,contr 
+4ded efe08006 ifetch 1 ,contr 
+4dee 67e0c5f8 store 1 ,mem_l2cap_rcv_hidtype 
+4def 1fe1040f and pdata ,0x0f ,temp 
+4df0 1ff1fe00 rshift4 pdata ,pdata 
+4df1 c004ce0b beq hid_type_set_idle ,hid_rx_process_handshake 
+4df2 c003ce0b beq hid_type_set_protocol ,hid_rx_process_handshake 
+4df3 c0054e1a beq hid_type_data ,hid_rx_process_data 
+4df4 c002ce03 beq hid_type_set_report ,hid_rx_process_set_report 
+4df5 c000cdf7 beq hid_type_control ,hid_rx_process_hid_control 
+4df6 20600000 rtn 
+
+hid_rx_process_hid_control:
+4df7 18427e00 copy temp ,pdata 
+4df8 c002cdfb beq hid_control_p_virtualcableunplug ,hid_rx_process_virtual_cable_unplug 
+4df9 c001ce02 beq hid_control_p_suspend ,hid_rx_process_suspend 
+4dfa 20600000 rtn 
+
+hid_rx_process_virtual_cable_unplug:
+4dfb 70095b27 jam bt_evt_virtual_cable_unplug ,mem_fifo_temp 
+4dfc 204078dc call ui_ipc_send_event 
+4dfd 6fe0c09a fetch 1 ,mem_device_option 
+4dfe c1840000 rtnne dvc_op_mouse 
+4dff 18427e00 copy temp ,pdata 
+4e00 c002c48c beq hid_control_p_virtualcableunplug ,mouse_irtual_cable_unplug 
+4e01 20600000 rtn 
+
+hid_rx_process_suspend:
+4e02 20600000 rtn 
+
+hid_rx_process_set_report:
+4e03 20404e1a call hid_rx_process_data 
+4e04 da200001 arg 0x01 ,rega 
+4e05 20404e1e call hid_malloc_tx_buff 
+4e06 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+4e07 e7e10005 istore 2 ,contw 
+4e08 58000000 setarg 0x00 
+4e09 e7e08005 istore 1 ,contw 
+4e0a 20600000 rtn 
+
+hid_rx_process_handshake:
+4e0b da200001 arg 1 ,rega 
+4e0c 20404e1e call hid_malloc_tx_buff 
+4e0d 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+4e0e e7e10005 istore 2 ,contw 
+4e0f 58000000 setarg 0 
+4e10 e7e08005 istore 1 ,contw 
+4e11 70095001 jam 1 ,mem_ui_data_txbuff_length 
+4e12 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+4e13 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
+4e14 67e0c4e5 store 1 ,mem_hid_control_state 
+4e15 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
+4e16 204078dc call ui_ipc_send_event 
+4e17 6fe0c09a fetch 1 ,mem_device_option 
+4e18 c1840000 rtnne dvc_op_mouse 
+4e19 2020446c branch mouse_bt_hid_handshake_boot_check 
+
+hid_rx_process_data:
+4e1a efe08006 ifetch 1 ,contr 
+4e1b c000ce1d beq hid_report_id_kb ,hid_rx_process_data_hid_kb 
+4e1c 20600000 rtn 
+
+hid_rx_process_data_hid_kb:
+4e1d 20600000 rtn 
+
+hid_malloc_tx_buff:
+4e1e 204052fb call l2cap_malloc 
+4e1f 1a220400 copy rega ,temp 
+4e20 60488950 storet 1 ,mem_ui_data_txbuff_length 
+4e21 1fe20a00 copy pdata ,contw 
+4e22 1a227e00 copy rega ,pdata 
+4e23 e7e10005 istore 2 ,contw 
+4e24 20600000 rtn 
+
+l2cap_init:
+4e25 2035ce2a branch l2cap_init_wake ,wake 
+
+l2cap_init_work:
+4e26 580045f9 setarg mem_l2cap_xmem_end 
+4e27 d8a044d9 arg mem_l2cap_xmem_start ,contw 
+4e28 98a67200 isub contw ,loopcnt 
+4e29 20407d9b call clear_mem 
+
+l2cap_init_wake:
+4e2a 44f4401d bpatch patch1d_0 ,mem_patch1d 
+4e2b 58000424 setarg mem_sdp_mem_end 
+4e2c d8a003e4 arg mem_sdp_mem_start ,contw 
+4e2d 98a67200 isub contw ,loopcnt 
+4e2e 20407d9b call clear_mem 
+4e2f 5800037a setarg mem_l2cap_mem_end 
+4e30 d8a0030e arg mem_l2cap_mem_start ,contw 
+4e31 98a67200 isub contw ,loopcnt 
+4e32 20407d9b call clear_mem 
+4e33 202053c9 branch l2cap_lpm_load_txbuf 
+
+process_rx_l2cap_pkt:
+4e34 44f4c01d bpatch patch1d_1 ,mem_patch1d 
+4e35 18c20400 copy contr ,temp 
+4e36 18420c00 copy temp ,contr 
+4e37 efe10006 ifetch 2 ,contr 
+4e38 67e10317 store 2 ,mem_l2cap_rx_pkt_length 
+4e39 efe10006 ifetch 2 ,contr 
+4e3a 67e10319 store 2 ,mem_l2cap_rx_cid 
+4e3b 18c27e00 deposit contr 
+4e3c 67e10315 store 2 ,mem_l2cap_payload_ptr 
+4e3d 6fe0c78e fetch 1 ,memui_reconnect_mode 
+4e3e c0004e40 beq no_reconnection ,l2cap_rx_multiplexing 
+4e3f 202051ab branch ml2cap_rx_multiplexing 
+
+l2cap_rx_multiplexing:
+4e40 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+4e41 203a4eb8 branch l2cap_rx_reset_state ,blank 
+4e42 44f5401d bpatch patch1d_2 ,mem_patch1d 
+4e43 6fe08319 fetch 1 ,mem_l2cap_rx_cid 
+4e44 c000ce56 beq l2cap_signal_channel ,l2cap_call_proc_signal 
+
+l2cap_rx_multiplexing0:
+4e45 c0284e98 beq l2cap_sdp_channel ,l2cap_call_proc_sdp 
+4e46 c028ceb1 beq l2cap_rfcomm_channel ,l2cap_call_proc_rfcomm 
+4e47 c0294eaf beq l2cap_hid_control_channel ,l2cap_call_proc_hid 
+4e48 c029ceaf beq l2cap_hid_interrupt_channel ,l2cap_call_proc_hid 
+4e49 20204eb8 branch l2cap_rx_reset_state 
+
+l2cap_check_map:
+4e4a 44f5c01d bpatch patch1d_3 ,mem_patch1d 
+4e4b 2040535f call l2cap_malloc_get_full_map 
+4e4c 6fe0c4e9 fetch 1 ,mem_used_map 
+4e4d c0007ed1 beq 0 ,set_pdata_0 
+4e4e c000fed1 beq 1 ,set_pdata_0 
+4e4f c0017ed1 beq 2 ,set_pdata_0 
+4e50 c001fed1 beq 3 ,set_pdata_0 
+4e51 c040fed1 beq 0x81 ,set_pdata_0 
+4e52 c0607ed1 beq 0xc0 ,set_pdata_0 
+4e53 c0407ed1 beq 0x80 ,set_pdata_0 
+4e54 c0207ed1 beq 0x40 ,set_pdata_0 
+4e55 20600000 rtn 
+
+l2cap_call_proc_signal:
+4e56 20404e4a call l2cap_check_map 
+4e57 247a0000 nrtn blank 
+
+l2cap_call_proc_signal0:
+4e58 20405369 call l2cap_malloc_signal_channel 
+4e59 20404ebd call l2cap_process_signal_pkt 
+4e5a 68490320 fetcht 2 ,mem_l2cap_signal_tx_length 
+4e5b 203a4eb7 branch l2cap_call_proc_no_reply ,blank 
+4e5c 20405372 call l2cap_get_signal_tx_buff 
+4e5d 6fe10320 fetch 2 ,mem_l2cap_signal_tx_length 
+4e5e e7e10005 istore 2 ,contw 
+4e5f 18007e01 force l2cap_signal_channel ,pdata 
+4e60 e7e10005 istore 2 ,contw 
+4e61 20204eb8 branch l2cap_rx_reset_state 
+
+l2cap_call_proc_sigal_pending:
+4e62 6fe0c5f7 fetch 1 ,mem_l2cap_pending_item 
+4e63 207a0000 rtn blank 
+4e64 1fe22200 copy pdata ,rega 
+4e65 44f6401d bpatch patch1d_4 ,mem_patch1d 
+4e66 6fe20386 fetch 4 ,mem_l2cap_sdpres_delay_time 
+4e67 d8400100 arg 0x100 ,temp 
+4e68 98408400 iadd temp ,temp 
+4e69 1c427e00 copy clkn_bt ,pdata 
+4e6a 98467c00 isub temp ,null 
+4e6b 24610000 nrtn positive 
+4e6c 7045f700 jam 0 ,mem_l2cap_pending_item 
+4e6d 1a227e00 copy rega ,pdata 
+4e6e c0284e70 beq l2cap_sdp_channel ,l2cap_sdp_conn_succ 
+4e6f 2020137c branch assert 
+
+l2cap_sdp_conn_succ:
+4e70 d9000000 arg 0 ,debug 
+4e71 20405369 call l2cap_malloc_signal_channel 
+4e72 20404f36 call restore_l2cap_req_param 
+4e73 20405374 call l2cap_get_signal_tx_payload 
+4e74 20407d61 call save_cont_pointers 
+4e75 20404f69 call send_connection_sdp_res 
+4e76 20405372 call l2cap_get_signal_tx_buff 
+4e77 5800000c setarg 0x000c 
+4e78 e7e10005 istore 2 ,contw 
+4e79 18007e01 force l2cap_signal_channel ,pdata 
+4e7a e7e10005 istore 2 ,contw 
+4e7b 20204eb8 branch l2cap_rx_reset_state 
+
+l2cap_reset_sdp_map:
+4e7c 44f6c01d bpatch patch1d_5 ,mem_patch1d 
+4e7d 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+4e7e 1fe0fe04 increase 4 ,pdata 
+4e7f 20407f27 call rshift7 
+4e80 1fe08401 add pdata ,1 ,temp 
+4e81 d8c044f3 arg mem_tx_fifo3 ,contr 
+4e82 efe18006 ifetch 3 ,contr 
+4e83 207a0000 rtn blank 
+4e84 67e1898e store 3 ,mem_tx_fifo_map_temp 
+4e85 6fe0898e fetch 1 ,mem_tx_fifo_map_temp 
+4e86 1fe22200 copy pdata ,rega 
+4e87 20404e8b call check_l2cap_map 
+4e88 1a427e00 copy regb ,pdata 
+4e89 67e0c4f3 store 1 ,mem_tx_fifo3 
+4e8a 20600000 rtn 
+
+check_l2cap_map:
+4e8b d8e00000 arg 0 ,queue 
+4e8c da400000 arg 0 ,regb 
+
+check_l2cap_map_loop:
+4e8d 18e67c07 sub queue ,7 ,null 
+4e8e 24610000 nrtn positive 
+4e8f aa2fffff qisolate1 rega 
+4e90 2020ce92 branch check_l2cap_map_used ,true 
+4e91 20204e96 branch check_l2cap_map_used2 
+
+check_l2cap_map_used:
+4e92 18427e00 copy temp ,pdata 
+4e93 203a4e96 branch check_l2cap_map_used2 ,blank 
+4e94 f9202400 qset1 regb 
+4e95 184085ff increase -1 ,temp 
+
+check_l2cap_map_used2:
+4e96 18e08e01 increase 1 ,queue 
+4e97 20204e8d branch check_l2cap_map_loop 
+
+l2cap_call_proc_sdp:
+4e98 20405355 call l2cap_malloc_is_fifo_empty 
+4e99 247a0000 nrtn blank 
+4e9a 20404e4a call l2cap_check_map 
+4e9b 247a0000 nrtn blank 
+4e9c 20405376 call l2cap_malloc_sdp_channel 
+4e9d 20406e5e call enable_authrom 
+4e9e 2040672f call sdp_process 
+4e9f 20406e62 call disable_authrom 
+4ea0 20404e7c call l2cap_reset_sdp_map 
+4ea1 20204ea8 branch l2cap_call_proc_sdp_common 
+
+ml2cap_call_proc_sdp:
+4ea2 20405355 call l2cap_malloc_is_fifo_empty 
+4ea3 247a0000 nrtn blank 
+4ea4 20405376 call l2cap_malloc_sdp_channel 
+4ea5 20406e5e call enable_authrom 
+4ea6 2040672f call sdp_process 
+4ea7 20406e62 call disable_authrom 
+
+l2cap_call_proc_sdp_common:
+4ea8 2040537f call l2cap_get_sdp_tx_buff 
+4ea9 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+4eaa 203a4eb7 branch l2cap_call_proc_no_reply ,blank 
+4eab e7e10005 istore 2 ,contw 
+4eac 6fe144db fetch 2 ,mem_sdp_remote_cid 
+4ead e7e10005 istore 2 ,contw 
+4eae 20204eb8 branch l2cap_rx_reset_state 
+
+l2cap_call_proc_hid:
+4eaf 20404dea call hid_rx_process 
+4eb0 20204eb8 branch l2cap_rx_reset_state 
+
+l2cap_call_proc_rfcomm:
+4eb1 44f7401d bpatch patch1d_6 ,mem_patch1d 
+4eb2 70033500 jam rfcomm_malloc_succeed ,mem_rfcomm_malloc_fail_flag 
+4eb3 204063a9 call rfcomm_rx_process 
+4eb4 6fe08335 fetch 1 ,mem_rfcomm_malloc_fail_flag 
+4eb5 c1008000 rtneq rfcomm_malloc_fail 
+4eb6 20204eb8 branch l2cap_rx_reset_state 
+
+l2cap_call_proc_no_reply:
+4eb7 20405345 call l2cap_malloc_discard 
+
+l2cap_rx_reset_state:
+4eb8 58000000 setarg 0 
+4eb9 67e10317 store 2 ,mem_l2cap_rx_pkt_length 
+4eba 67e10319 store 2 ,mem_l2cap_rx_cid 
+4ebb 70031b01 jam l2cap_rx_done ,mem_l2cap_rx_done 
+4ebc 20600000 rtn 
+
+l2cap_process_signal_pkt:
+4ebd 44f7c01d bpatch patch1d_7 ,mem_patch1d 
+4ebe 20405374 call l2cap_get_signal_tx_payload 
+4ebf 18002400 force 0 ,regb 
+4ec0 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+4ec1 1fe22600 copy pdata ,regc 
+4ec2 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+4ec3 98000c00 iforce contr 
+
+l2cap_process_signal_pkt_loop:
+4ec4 20404ecc call l2cap_process_one_signal 
+4ec5 1a627e00 deposit regc 
+4ec6 1a60a7fc increase -4 ,regc 
+4ec7 1fe0fffc increase -4 ,pdata 
+4ec8 243a4ec4 nbranch l2cap_process_signal_pkt_loop ,blank 
+4ec9 1a427e00 copy regb ,pdata 
+4eca 67e10320 store 2 ,mem_l2cap_signal_tx_length 
+4ecb 20600000 rtn 
+
+l2cap_process_one_signal:
+4ecc 44f8401e bpatch patch1e_0 ,mem_patch1e 
+4ecd efe08006 ifetch 1 ,contr 
+4ece c000cf05 beq signal_cmd_reject ,l2cap_proc_signal_cmd_reject 
+4ecf c0014f0d beq signal_connect_req ,l2cap_proc_signal_connect_req 
+4ed0 c001cf91 beq signal_connect_rsp ,l2cap_proc_signal_connect_rsp 
+4ed1 c0024fc1 beq signal_config_req ,l2cap_proc_signal_config_req 
+4ed2 c002d05e beq signal_config_rsp ,l2cap_proc_signal_config_rsp 
+4ed3 c0035087 beq signal_disconnect_req ,l2cap_proc_signal_disconnect_req 
+4ed4 c003d0d7 beq signal_disconnect_rsp ,l2cap_proc_signal_disconnect_rsp 
+4ed5 c004510c beq signal_echo_req ,l2cap_proc_signal_echo_req 
+4ed6 c004d11c beq signal_echo_rsp ,l2cap_proc_signal_echo_rsp 
+4ed7 c0054edb beq signal_info_req ,l2cap_proc_signal_info_req 
+4ed8 c005d11d beq signal_info_rsp ,l2cap_proc_signal_info_rsp 
+4ed9 2040511e call l2cap_reject_command 
+
+l2cap_process_one_signal_rtn:
+4eda 20600000 rtn 
+
+l2cap_proc_signal_info_req:
+4edb efe08006 ifetch 1 ,contr 
+4edc 1fe20e00 copy pdata ,queue 
+4edd efe10006 ifetch 2 ,contr 
+4ede 1fe22200 copy pdata ,rega 
+4edf 1a627e00 copy regc ,pdata 
+4ee0 9a262600 isub rega ,regc 
+4ee1 5800000b setarg signal_info_rsp 
+4ee2 e7e08005 istore 1 ,contw 
+4ee3 18e27e00 copy queue ,pdata 
+4ee4 e7e08005 istore 1 ,contw 
+4ee5 efe10006 ifetch 2 ,contr 
+
+l2cap_proc_signal_info_req_reply:
+4ee6 c0014ee9 beq l2cap_sig_ext_featrue ,l2cap_proc_signal_info_req_ext 
+4ee7 c001ceef beq l2cap_sig_fix_featrue ,l2cap_proc_signal_info_req_fix 
+4ee8 20600000 rtn 
+
+l2cap_proc_signal_info_req_ext:
+4ee9 58020008 setarg 0x020008 
+4eea e7e30005 istore 6 ,contw 
+4eeb 58000280 setarg 0x0280 
+4eec e7e20005 istore 4 ,contw 
+4eed 18007e0c force 12 ,pdata 
+4eee 20204ef4 branch l2cap_proc_signal_info_req_common 
+
+l2cap_proc_signal_info_req_fix:
+4eef 5803000c setarg 0x3000c 
+4ef0 e7e30005 istore 6 ,contw 
+4ef1 58000006 setarg 0x0006 
+4ef2 e7e40005 istore 8 ,contw 
+4ef3 18007e10 force 16 ,pdata 
+
+l2cap_proc_signal_info_req_common:
+4ef4 9a40a400 iadd regb ,regb 
+4ef5 20204eda branch l2cap_process_one_signal_rtn 
+
+ml2cap_proc_signal_info_req:
+4ef6 efe08006 ifetch 1 ,contr 
+4ef7 1fe20e00 copy pdata ,queue 
+4ef8 efe10006 ifetch 2 ,contr 
+4ef9 1fe22200 copy pdata ,rega 
+4efa efe10006 ifetch 2 ,contr 
+4efb 67e10964 store 2 ,mem_temp 
+4efc 1a627e00 copy regc ,pdata 
+4efd 9a262600 isub rega ,regc 
+4efe 20405374 call l2cap_get_signal_tx_payload 
+4eff 5800000b setarg signal_info_rsp 
+4f00 e7e08005 istore 1 ,contw 
+4f01 18e27e00 copy queue ,pdata 
+4f02 e7e08005 istore 1 ,contw 
+4f03 6fe10964 fetch 2 ,mem_temp 
+4f04 20204ee6 branch l2cap_proc_signal_info_req_reply 
+
+l2cap_proc_signal_cmd_reject:
+4f05 efe08006 ifetch 1 ,contr 
+4f06 1fe20e00 copy pdata ,queue 
+4f07 efe10006 ifetch 2 ,contr 
+4f08 1fe22200 copy pdata ,rega 
+4f09 98c08c00 iadd contr ,contr 
+4f0a 1a627e00 copy regc ,pdata 
+4f0b 9a262600 isub rega ,regc 
+
+l2cap_proc_signal_cmd_reject_rtn:
+4f0c 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_connect_req:
+4f0d 20407d61 call save_cont_pointers 
+4f0e 20407d66 call load_cont_pointers 
+4f0f d9000000 arg 0 ,debug 
+4f10 efe08006 ifetch 1 ,contr 
+4f11 1fe20e00 copy pdata ,queue 
+4f12 efe10006 ifetch 2 ,contr 
+4f13 1fe22200 copy pdata ,rega 
+4f14 efe10006 ifetch 2 ,contr 
+4f15 1fe20400 copy pdata ,temp 
+4f16 efe10006 ifetch 2 ,contr 
+4f17 1fe21600 copy pdata ,timeup 
+4f18 44f8c01e bpatch patch1e_1 ,mem_patch1e 
+4f19 18427e00 copy temp ,pdata 
+4f1a c000cf20 beq psm_sdp ,l2cap_proc_signal_connect_req_sdp 
+4f1b c001cf42 beq psm_rfcomm ,l2cap_proc_signal_connect_req_rfcomm 
+4f1c c008cf4e beq psm_hid_control ,l2cap_proc_signal_connect_req_hid_ctrl 
+4f1d c009cf59 beq psm_hid_interrupt ,l2cap_proc_signal_connect_req_hid_int 
+4f1e 2040511e call l2cap_reject_command 
+4f1f 20204f90 branch l2cap_proc_signal_connect_req_rtn 
+
+l2cap_proc_signal_connect_req_sdp:
+4f20 20407d61 call save_cont_pointers 
+4f21 d8400050 arg l2cap_sdp_channel ,temp 
+4f22 6fe144db fetch 2 ,mem_sdp_remote_cid 
+4f23 243a4f8a nbranch already_connected ,blank 
+4f24 19627e00 copy timeup ,pdata 
+4f25 67e144db store 2 ,mem_sdp_remote_cid 
+4f26 1c427e00 copy clkn_bt ,pdata 
+4f27 67e20386 store 4 ,mem_l2cap_sdpres_delay_time 
+4f28 20404f2a call store_l2cap_req_param 
+4f29 20204f65 branch send_connection_pending 
+
+store_l2cap_req_param:
+4f2a 60490384 storet 2 ,mem_psm 
+4f2b 19627e00 deposit timeup 
+4f2c 67e1037a store 2 ,mem_scid 
+4f2d 1a227e00 deposit rega 
+4f2e 67e1037c store 2 ,mem_cmd_length 
+4f2f 1a427e00 deposit regb 
+4f30 67e1037e store 2 ,mem_tt2 
+4f31 1a627e00 deposit regc 
+4f32 67e10380 store 2 ,mem_tt3 
+4f33 18e27e00 deposit queue 
+4f34 67e10382 store 2 ,mem_id 
+4f35 20600000 rtn 
+
+restore_l2cap_req_param:
+4f36 68490384 fetcht 2 ,mem_psm 
+4f37 6fe1037a fetch 2 ,mem_scid 
+4f38 1fe21600 copy pdata ,timeup 
+4f39 6fe1037c fetch 2 ,mem_cmd_length 
+4f3a 1fe22200 copy pdata ,rega 
+4f3b 6fe1037e fetch 2 ,mem_tt2 
+4f3c 1fe22400 copy pdata ,regb 
+4f3d 6fe10380 fetch 2 ,mem_tt3 
+4f3e 1fe22600 copy pdata ,regc 
+4f3f 6fe10382 fetch 2 ,mem_id 
+4f40 1fe20e00 copy pdata ,queue 
+4f41 20600000 rtn 
+
+l2cap_proc_signal_connect_req_rfcomm:
+4f42 20407d61 call save_cont_pointers 
+4f43 58000051 setarg l2cap_rfcomm_channel 
+4f44 d8400051 arg l2cap_rfcomm_channel ,temp 
+4f45 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+4f46 243a4f8a nbranch already_connected ,blank 
+4f47 19627e00 copy timeup ,pdata 
+4f48 67e144dd store 2 ,mem_rfcomm_remote_cid 
+4f49 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+4f4a 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4f4b 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f4c 67e0c4e4 store 1 ,mem_rfcomm_state 
+4f4d 20204f6d branch send_connection_res 
+
+l2cap_proc_signal_connect_req_hid_ctrl:
+4f4e 20407d61 call save_cont_pointers 
+4f4f d8400052 arg l2cap_hid_control_channel ,temp 
+4f50 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+4f51 243a4f8a nbranch already_connected ,blank 
+4f52 19627e00 copy timeup ,pdata 
+4f53 67e144df store 2 ,mem_hid_ctrl_remote_cid 
+4f54 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+4f55 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4f56 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f57 67e0c4e5 store 1 ,mem_hid_control_state 
+4f58 20204f6d branch send_connection_res 
+
+l2cap_proc_signal_connect_req_hid_int:
+4f59 20407d61 call save_cont_pointers 
+4f5a 1b427e00 deposit clke 
+4f5b d8400053 arg l2cap_hid_interrupt_channel ,temp 
+4f5c 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+4f5d 243a4f8a nbranch already_connected ,blank 
+4f5e 19627e00 copy timeup ,pdata 
+4f5f 67e144e1 store 2 ,mem_hid_int_remote_cid 
+4f60 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+4f61 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4f62 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f63 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+4f64 20204f6d branch send_connection_res 
+
+send_connection_pending:
+4f65 58000001 setarg l2cap_connect_pending 
+4f66 67e1032e store 2 ,meml2cap_t1 
+4f67 7045f750 jam l2cap_sdp_channel ,mem_l2cap_pending_item 
+4f68 20204f6f branch send_connection_res0 
+
+send_connection_sdp_res:
+4f69 6fe0c4e3 fetch 1 ,mem_sdp_state 
+4f6a 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4f6b 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f6c 67e0c4e3 store 1 ,mem_sdp_state 
+
+send_connection_res:
+4f6d 58000000 setarg l2cap_connect_successful 
+4f6e 67e1032e store 2 ,meml2cap_t1 
+
+send_connection_res0:
+4f6f 44f9401e bpatch patch1e_2 ,mem_patch1e 
+4f70 20407d66 call load_cont_pointers 
+4f71 58000003 setarg signal_connect_rsp 
+4f72 e7e08005 istore 1 ,contw 
+4f73 18e27e00 copy queue ,pdata 
+4f74 e7e08005 istore 1 ,contw 
+4f75 58000008 setarg 0x0008 
+4f76 e7e10005 istore 2 ,contw 
+4f77 18427e00 copy temp ,pdata 
+4f78 e7e10005 istore 2 ,contw 
+4f79 19627e00 copy timeup ,pdata 
+4f7a e7e10005 istore 2 ,contw 
+4f7b 6fe1032e fetch 2 ,meml2cap_t1 
+4f7c c000cf85 beq l2cap_connect_pending ,connect_pending 
+4f7d 290c0000 isolate0 0 ,debug 
+4f7e 2020cf80 branch connect_suc ,true 
+4f7f 58000004 setarg l2cap_connect_refused_no_resources 
+
+connect_suc:
+4f80 e7e10005 istore 2 ,contw 
+4f81 18007e00 force 0x0000 ,pdata 
+4f82 e7e10005 istore 2 ,contw 
+4f83 5800000c setarg 12 
+4f84 20204f8c branch connect_req_update_byte_counts 
+
+connect_pending:
+4f85 e7e10005 istore 2 ,contw 
+4f86 18007e02 force 0x0002 ,pdata 
+4f87 e7e10005 istore 2 ,contw 
+4f88 5800000c setarg 12 
+4f89 20204f8c branch connect_req_update_byte_counts 
+
+already_connected:
+4f8a 79201000 set1 0 ,debug 
+4f8b 20204f6d branch send_connection_res 
+
+connect_req_update_byte_counts:
+4f8c 9a40a400 iadd regb ,regb 
+4f8d 1a627e00 copy regc ,pdata 
+4f8e 9a262600 isub rega ,regc 
+4f8f 20204f90 branch l2cap_proc_signal_connect_req_rtn 
+
+l2cap_proc_signal_connect_req_rtn:
+4f90 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_connect_rsp:
+4f91 efe08006 ifetch 1 ,contr 
+4f92 1fe20e00 copy pdata ,queue 
+4f93 efe10006 ifetch 2 ,contr 
+4f94 1fe22200 copy pdata ,rega 
+4f95 1a627e00 copy regc ,pdata 
+4f96 9a262600 isub rega ,regc 
+4f97 efe10006 ifetch 2 ,contr 
+4f98 1fe21600 copy pdata ,timeup 
+4f99 efe10006 ifetch 2 ,contr 
+4f9a 1fe20400 copy pdata ,temp 
+4f9b 44f9c01e bpatch patch1e_3 ,mem_patch1e 
+4f9c 58000050 setarg l2cap_sdp_channel 
+4f9d 98467c00 isub temp ,null 
+4f9e 2022cfa9 branch l2cap_proc_signal_connect_rsp_sdp ,zero 
+4f9f 58000051 setarg l2cap_rfcomm_channel 
+4fa0 98467c00 isub temp ,null 
+4fa1 2022cfaf branch l2cap_proc_signal_connect_rsp_rfcomm ,zero 
+4fa2 58000052 setarg l2cap_hid_control_channel 
+4fa3 98467c00 isub temp ,null 
+4fa4 2022cfbb branch l2cap_proc_signal_connect_rsp_hid_ctrl ,zero 
+4fa5 58000053 setarg l2cap_hid_interrupt_channel 
+4fa6 98467c00 isub temp ,null 
+4fa7 2022cfb5 branch l2cap_proc_signal_connect_rsp_hid_int ,zero 
+4fa8 20600000 rtn 
+
+l2cap_proc_signal_connect_rsp_sdp:
+4fa9 19627e00 copy timeup ,pdata 
+4faa 67e144db store 2 ,mem_sdp_remote_cid 
+4fab 6fe0c4e3 fetch 1 ,mem_sdp_state 
+4fac 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4fad 67e0c4e3 store 1 ,mem_sdp_state 
+4fae 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_connect_rsp_rfcomm:
+4faf 19627e00 copy timeup ,pdata 
+4fb0 67e144dd store 2 ,mem_rfcomm_remote_cid 
+4fb1 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+4fb2 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4fb3 67e0c4e4 store 1 ,mem_rfcomm_state 
+4fb4 20600000 rtn 
+
+l2cap_proc_signal_connect_rsp_hid_int:
+4fb5 19627e00 copy timeup ,pdata 
+4fb6 67e144df store 2 ,mem_hid_ctrl_remote_cid 
+4fb7 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+4fb8 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4fb9 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+4fba 20600000 rtn 
+
+l2cap_proc_signal_connect_rsp_hid_ctrl:
+4fbb 19627e00 copy timeup ,pdata 
+4fbc 67e144e1 store 2 ,mem_hid_int_remote_cid 
+4fbd 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+4fbe 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4fbf 67e0c4e5 store 1 ,mem_hid_control_state 
+4fc0 20600000 rtn 
+
+l2cap_proc_signal_config_req:
+4fc1 efe08006 ifetch 1 ,contr 
+4fc2 1fe20e00 copy pdata ,queue 
+4fc3 efe10006 ifetch 2 ,contr 
+4fc4 1fe22200 copy pdata ,rega 
+4fc5 1a627e00 copy regc ,pdata 
+4fc6 9a262600 isub rega ,regc 
+4fc7 efe10006 ifetch 2 ,contr 
+4fc8 1fe20400 copy pdata ,temp 
+4fc9 18422200 copy temp ,rega 
+4fca 44fa401e bpatch patch1e_4 ,mem_patch1e 
+4fcb 58000050 setarg l2cap_sdp_channel 
+4fcc 98467c00 isub temp ,null 
+4fcd 2022cfd8 branch l2cap_proc_signal_config_req_sdp ,zero 
+4fce 58000051 setarg l2cap_rfcomm_channel 
+4fcf 98467c00 isub temp ,null 
+4fd0 2022cff6 branch l2cap_proc_signal_config_req_rfcomm ,zero 
+4fd1 58000052 setarg l2cap_hid_control_channel 
+4fd2 98467c00 isub temp ,null 
+4fd3 2022cfe2 branch l2cap_proc_signal_config_req_hid_ctrl ,zero 
+4fd4 58000053 setarg l2cap_hid_interrupt_channel 
+4fd5 98467c00 isub temp ,null 
+4fd6 2022cfec branch l2cap_proc_signal_config_req_hid_int ,zero 
+4fd7 2020511e branch l2cap_reject_command 
+
+l2cap_proc_signal_config_req_sdp:
+4fd8 18a21600 copy contw ,timeup 
+4fd9 6fe0c4e3 fetch 1 ,mem_sdp_state 
+4fda 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4fdb 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4fdc 67e0c4e3 store 1 ,mem_sdp_state 
+4fdd 19620a00 copy timeup ,contw 
+4fde d9600050 arg l2cap_sdp_channel ,timeup 
+4fdf 6fe144db fetch 2 ,mem_sdp_remote_cid 
+4fe0 1fe20400 copy pdata ,temp 
+4fe1 20204fff branch l2cap_send_config_rsp 
+
+l2cap_proc_signal_config_req_hid_ctrl:
+4fe2 18a21600 copy contw ,timeup 
+4fe3 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+4fe4 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4fe5 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4fe6 67e0c4e5 store 1 ,mem_hid_control_state 
+4fe7 19620a00 copy timeup ,contw 
+4fe8 d9600052 arg l2cap_hid_control_channel ,timeup 
+4fe9 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+4fea 1fe20400 copy pdata ,temp 
+4feb 20204fff branch l2cap_send_config_rsp 
+
+l2cap_proc_signal_config_req_hid_int:
+4fec 18a21600 copy contw ,timeup 
+4fed 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+4fee 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4fef 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4ff0 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+4ff1 19620a00 copy timeup ,contw 
+4ff2 d9600053 arg l2cap_hid_interrupt_channel ,timeup 
+4ff3 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+4ff4 1fe20400 copy pdata ,temp 
+4ff5 20204fff branch l2cap_send_config_rsp 
+
+l2cap_proc_signal_config_req_rfcomm:
+4ff6 18a21600 copy contw ,timeup 
+4ff7 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+4ff8 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4ff9 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4ffa 67e0c4e4 store 1 ,mem_rfcomm_state 
+4ffb 19620a00 copy timeup ,contw 
+4ffc d9600051 arg l2cap_rfcomm_channel ,timeup 
+4ffd 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+4ffe 1fe20400 copy pdata ,temp 
+
+l2cap_send_config_rsp:
+4fff 44fac01e bpatch patch1e_5 ,mem_patch1e 
+5000 58000005 setarg signal_config_rsp 
+5001 e7e08005 istore 1 ,contw 
+5002 18e27e00 copy queue ,pdata 
+5003 e7e08005 istore 1 ,contw 
+5004 58000006 setarg 0x0006 
+5005 e7e10005 istore 2 ,contw 
+5006 18427e00 copy temp ,pdata 
+5007 e7e10005 istore 2 ,contw 
+5008 18007e00 force 0x00 ,pdata 
+5009 e7e10005 istore 2 ,contw 
+500a 18007e00 force l2cap_config_success ,pdata 
+500b e7e10005 istore 2 ,contw 
+500c 18007e0a force 10 ,pdata 
+500d 9a40a400 iadd regb ,regb 
+500e 60490333 storet 2 ,mem_config_req_dest_cid 
+500f 18e27e00 copy queue ,pdata 
+5010 67e08332 store 1 ,mem_config_identifier 
+5011 18007e50 force l2cap_sdp_channel ,pdata 
+5012 a961fe00 icompare 0xff ,timeup 
+5013 2020d015 branch l2cap_send_config_rsp_is_sdp ,true 
+5014 1fe0fe01 increase 1 ,pdata 
+
+l2cap_send_config_rsp_is_sdp:
+5015 20600000 rtn 
+
+l2cap_check_channel_state:
+5016 78547c00 disable user 
+5017 c3810000 rtnbit1 l2cap_channel_state_snd_cfg_req ,pdata 
+5018 c4000000 rtnbit0 l2cap_channel_state_conn_req ,pdata 
+5019 c4008000 rtnbit0 l2cap_channel_state_conn_res ,pdata 
+501a 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+501b 18c20a00 copy contr ,contw 
+501c 18a08bff increase -1 ,contw 
+501d e7e08005 istore 1 ,contw 
+501e 78347c00 enable user 
+501f 20600000 rtn 
+
+l2cap_send_config_req:
+
+l2cap_send_config_req_sdp:
+5020 6fe0c4e3 fetch 1 ,mem_sdp_state 
+5021 20405016 call l2cap_check_channel_state 
+5022 24345027 nbranch l2cap_send_config_req_rfcomm ,user 
+5023 70033150 jam l2cap_sdp_channel ,mem_send_config_req 
+5024 6fe144db fetch 2 ,mem_sdp_remote_cid 
+5025 67e10333 store 2 ,mem_config_req_dest_cid 
+5026 2020503b branch l2cap_generate_config_req 
+
+l2cap_send_config_req_rfcomm:
+5027 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+5028 20405016 call l2cap_check_channel_state 
+5029 2434502e nbranch l2cap_send_config_req_hid_ctrl ,user 
+502a 70033151 jam l2cap_rfcomm_channel ,mem_send_config_req 
+502b 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+502c 67e10333 store 2 ,mem_config_req_dest_cid 
+502d 2020503b branch l2cap_generate_config_req 
+
+l2cap_send_config_req_hid_ctrl:
+502e 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+502f 20405016 call l2cap_check_channel_state 
+5030 24345035 nbranch l2cap_send_config_req_hid_int ,user 
+5031 70033152 jam l2cap_hid_control_channel ,mem_send_config_req 
+5032 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+5033 67e10333 store 2 ,mem_config_req_dest_cid 
+5034 2020503b branch l2cap_generate_config_req 
+
+l2cap_send_config_req_hid_int:
+5035 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+5036 20405016 call l2cap_check_channel_state 
+5037 24740000 nrtn user 
+5038 70033153 jam l2cap_hid_interrupt_channel ,mem_send_config_req 
+5039 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+503a 67e10333 store 2 ,mem_config_req_dest_cid 
+
+l2cap_generate_config_req:
+503b 44fb401e bpatch patch1e_6 ,mem_patch1e 
+503c 204052f5 call l2cap_get_req_id 
+503d 20405369 call l2cap_malloc_signal_channel 
+503e 18002400 force 0 ,regb 
+503f 20405374 call l2cap_get_signal_tx_payload 
+5040 18007e04 force signal_config_req ,pdata 
+5041 e7e08005 istore 1 ,contw 
+5042 6fe0c4e8 fetch 1 ,mem_ml2cap_comm_id 
+5043 e7e08005 istore 1 ,contw 
+5044 58000008 setarg 0x0008 
+5045 e7e10005 istore 2 ,contw 
+5046 6fe10333 fetch 2 ,mem_config_req_dest_cid 
+5047 e7e10005 istore 2 ,contw 
+5048 58000000 setarg 0x0000 
+5049 e7e10005 istore 2 ,contw 
+504a 18007e01 force 1 ,pdata 
+504b e7e08005 istore 1 ,contw 
+504c 18007e02 force 2 ,pdata 
+504d e7e08005 istore 1 ,contw 
+504e 6fe08331 fetch 1 ,mem_send_config_req 
+504f c028d053 beq l2cap_rfcomm_channel ,l2cap_generate_config_req_rfcomm 
+5050 58000030 setarg l2cap_config_mtu_sdp 
+5051 e7e10005 istore 2 ,contw 
+5052 20205055 branch l2cap_generate_config_req_done 
+
+l2cap_generate_config_req_rfcomm:
+5053 580003e3 setarg l2cap_config_mtu_rfcomm 
+5054 e7e10005 istore 2 ,contw 
+
+l2cap_generate_config_req_done:
+5055 d840000c arg 0x0c ,temp 
+5056 60490320 storet 2 ,mem_l2cap_signal_tx_length 
+5057 20405372 call l2cap_get_signal_tx_buff 
+5058 6fe10320 fetch 2 ,mem_l2cap_signal_tx_length 
+5059 e7e10005 istore 2 ,contw 
+505a 18007e01 force l2cap_signal_channel ,pdata 
+505b e7e10005 istore 2 ,contw 
+505c 70033100 jam 0 ,mem_send_config_req 
+
+l2cap_proc_signal_config_req_rtn:
+505d 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp:
+505e 18c08c01 increase 1 ,contr 
+505f efe10006 ifetch 2 ,contr 
+5060 1fe22200 copy pdata ,rega 
+5061 1a627e00 copy regc ,pdata 
+5062 9a262600 isub rega ,regc 
+5063 efe10006 ifetch 2 ,contr 
+5064 1fe22200 copy pdata ,rega 
+5065 44fbc01e bpatch patch1e_7 ,mem_patch1e 
+5066 58000050 setarg l2cap_sdp_channel 
+5067 9a267c00 isub rega ,null 
+5068 2022d076 branch l2cap_proc_signal_config_rsp_sdp ,zero 
+5069 58000051 setarg l2cap_rfcomm_channel 
+506a 9a267c00 isub rega ,null 
+506b 2022d07a branch l2cap_proc_signal_config_rsp_rfcomm ,zero 
+506c 58000052 setarg l2cap_hid_control_channel 
+506d 9a267c00 isub rega ,null 
+506e 2022d07e branch l2cap_proc_signal_config_rsp_hid_ctrl ,zero 
+506f 58000053 setarg l2cap_hid_interrupt_channel 
+5070 9a267c00 isub rega ,null 
+5071 2022d082 branch l2cap_proc_signal_config_rsp_hid_int ,zero 
+5072 18c08c02 increase 2 ,contr 
+5073 efe10006 ifetch 2 ,contr 
+5074 98007c00 iforce null 
+5075 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_sdp:
+5076 6fe0c4e3 fetch 1 ,mem_sdp_state 
+5077 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+5078 67e0c4e3 store 1 ,mem_sdp_state 
+5079 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_rfcomm:
+507a 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+507b 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+507c 67e0c4e4 store 1 ,mem_rfcomm_state 
+507d 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_hid_ctrl:
+507e 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+507f 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+5080 67e0c4e5 store 1 ,mem_hid_control_state 
+5081 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_hid_int:
+5082 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+5083 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+5084 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+5085 70095b06 jam bt_evt_hid_connected ,mem_fifo_temp 
+5086 202078dc branch ui_ipc_send_event 
+
+l2cap_proc_signal_disconnect_req:
+5087 efe08006 ifetch 1 ,contr 
+5088 1fe20e00 copy pdata ,queue 
+5089 efe10006 ifetch 2 ,contr 
+508a 1fe22200 copy pdata ,rega 
+508b 1a627e00 copy regc ,pdata 
+508c 9a262600 isub rega ,regc 
+508d efe10006 ifetch 2 ,contr 
+508e 1fe22200 copy pdata ,rega 
+508f efe10006 ifetch 2 ,contr 
+5090 1fe21600 copy pdata ,timeup 
+5091 1a220400 copy rega ,temp 
+5092 20407d61 call save_cont_pointers 
+5093 44fc401f bpatch patch1f_0 ,mem_patch1f 
+5094 58000050 setarg l2cap_sdp_channel 
+5095 98467c00 isub temp ,null 
+5096 2022d0ae branch l2cap_proc_signal_disconnect_req_sdp ,zero 
+5097 58000051 setarg l2cap_rfcomm_channel 
+5098 98467c00 isub temp ,null 
+5099 2022d0be branch l2cap_proc_signal_disconnect_req_rfcomm ,zero 
+509a 58000052 setarg l2cap_hid_control_channel 
+509b 98467c00 isub temp ,null 
+509c 2022d0a2 branch l2cap_proc_signal_disconnect_req_hid_ctrl ,zero 
+509d 58000053 setarg l2cap_hid_interrupt_channel 
+509e 98467c00 isub temp ,null 
+509f 2022d0a8 branch l2cap_proc_signal_disconnect_req_hid_int ,zero 
+50a0 2040511e call l2cap_reject_command 
+50a1 202050d3 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_proc_signal_disconnect_req_hid_ctrl:
+50a2 19620400 copy timeup ,temp 
+50a3 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+50a4 98467c00 isub temp ,null 
+50a5 2022d0b4 branch l2cap_disconnect_hid_control_now ,zero 
+50a6 2040511e call l2cap_reject_command 
+50a7 202050d3 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_proc_signal_disconnect_req_hid_int:
+50a8 19620400 copy timeup ,temp 
+50a9 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+50aa 98467c00 isub temp ,null 
+50ab 2022d0b6 branch l2cap_disconnect_hid_interrupt_now ,zero 
+50ac 2040511e call l2cap_reject_command 
+50ad 202050d3 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_proc_signal_disconnect_req_sdp:
+50ae 19620400 copy timeup ,temp 
+50af 6fe144db fetch 2 ,mem_sdp_remote_cid 
+50b0 98467c00 isub temp ,null 
+50b1 2022d0ba branch l2cap_disconnect_sdp_now ,zero 
+50b2 2040511e call l2cap_reject_command 
+50b3 202050d3 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_disconnect_hid_control_now:
+50b4 20405135 call l2cap_reset_hid_ctrl_state 
+50b5 202050c6 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_disconnect_hid_interrupt_now:
+50b6 2040513b call l2cap_reset_hid_int_state 
+50b7 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+50b8 203a50c6 branch l2cap_send_disconnect_rsp_pkt ,blank 
+50b9 202050c6 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_disconnect_sdp_now:
+50ba 20405130 call l2cap_reset_sdp_channel_state 
+50bb 6fe08339 fetch 1 ,mem_upper_sm_ss 
+50bc 243a50c6 nbranch l2cap_send_disconnect_rsp_pkt ,blank 
+50bd 202050c6 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_proc_signal_disconnect_req_rfcomm:
+50be 19620400 copy timeup ,temp 
+50bf 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+50c0 98467c00 isub temp ,null 
+50c1 2022d0c4 branch l2cap_disconnect_rfcomm_now ,zero 
+50c2 2040511e call l2cap_reject_command 
+50c3 202050d3 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_disconnect_rfcomm_now:
+50c4 2040512b call l2cap_reset_rfcomm_channel_state 
+50c5 202050c6 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_send_disconnect_rsp_pkt:
+50c6 20407d66 call load_cont_pointers 
+50c7 58000007 setarg signal_disconnect_rsp 
+50c8 e7e08005 istore 1 ,contw 
+50c9 18e27e00 copy queue ,pdata 
+50ca e7e08005 istore 1 ,contw 
+50cb 58000004 setarg 0x0004 
+50cc e7e10005 istore 2 ,contw 
+50cd 1a227e00 copy rega ,pdata 
+50ce e7e10005 istore 2 ,contw 
+50cf 19627e00 copy timeup ,pdata 
+50d0 e7e10005 istore 2 ,contw 
+50d1 18007e08 force 8 ,pdata 
+50d2 202050d5 branch l2cap_proc_signal_disconnect_req_rtn 
+
+l2cap_proc_signal_disconnect_req_err_rtn:
+50d3 20407d66 call load_cont_pointers 
+50d4 202050d5 branch l2cap_proc_signal_disconnect_req_rtn 
+
+l2cap_proc_signal_disconnect_req_rtn:
+50d5 9a40a400 iadd regb ,regb 
+50d6 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_disconnect_rsp:
+50d7 efe08006 ifetch 1 ,contr 
+50d8 1fe20e00 copy pdata ,queue 
+50d9 efe10006 ifetch 2 ,contr 
+50da 1fe22200 copy pdata ,rega 
+50db 1a627e00 copy regc ,pdata 
+50dc 9a262600 isub rega ,regc 
+50dd efe10006 ifetch 2 ,contr 
+50de 1fe21600 copy pdata ,timeup 
+50df efe10006 ifetch 2 ,contr 
+50e0 1fe20400 copy pdata ,temp 
+50e1 20407d61 call save_cont_pointers 
+50e2 44fcc01f bpatch patch1f_1 ,mem_patch1f 
+50e3 58000050 setarg l2cap_sdp_channel 
+50e4 98467c00 isub temp ,null 
+50e5 2022d0f1 branch l2cap_proc_signal_disconnect_rsp_sdp ,zero 
+50e6 58000051 setarg l2cap_rfcomm_channel 
+50e7 98467c00 isub temp ,null 
+50e8 2022d0f7 branch l2cap_proc_signal_disconnect_rsp_rfcomm ,zero 
+50e9 58000052 setarg l2cap_hid_control_channel 
+50ea 98467c00 isub temp ,null 
+50eb 2022d0fd branch l2cap_proc_signal_disconnect_rsp_hid_ctrl ,zero 
+50ec 58000053 setarg l2cap_hid_interrupt_channel 
+50ed 98467c00 isub temp ,null 
+50ee 2022d103 branch l2cap_proc_signal_disconnect_rsp_hid_int ,zero 
+50ef 2040511e call l2cap_reject_command 
+50f0 2020510b branch l2cap_proc_signal_disconnect_rsp_err_rtn 
+
+l2cap_proc_signal_disconnect_rsp_sdp:
+50f1 18422200 copy temp ,rega 
+50f2 19620400 copy timeup ,temp 
+50f3 6fe144db fetch 2 ,mem_sdp_remote_cid 
+50f4 98467c00 isub temp ,null 
+50f5 2042d130 call l2cap_reset_sdp_channel_state ,zero 
+50f6 20205109 branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_rfcomm:
+50f7 18422200 copy temp ,rega 
+50f8 19620400 copy timeup ,temp 
+50f9 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+50fa 98467c00 isub temp ,null 
+50fb 2042d12b call l2cap_reset_rfcomm_channel_state ,zero 
+50fc 20205109 branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_hid_ctrl:
+50fd 18422200 copy temp ,rega 
+50fe 19620400 copy timeup ,temp 
+50ff 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+5100 98467c00 isub temp ,null 
+5101 2042d135 call l2cap_reset_hid_ctrl_state ,zero 
+5102 20205109 branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_hid_int:
+5103 18422200 copy temp ,rega 
+5104 19620400 copy timeup ,temp 
+5105 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+5106 98467c00 isub temp ,null 
+5107 2042d13b call l2cap_reset_hid_int_state ,zero 
+5108 20205109 branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_rtn:
+5109 20407d66 call load_cont_pointers 
+510a 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_disconnect_rsp_err_rtn:
+510b 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_echo_req:
+510c efe08006 ifetch 1 ,contr 
+510d 1fe20e00 copy pdata ,queue 
+510e efe10006 ifetch 2 ,contr 
+510f 1fe22200 copy pdata ,rega 
+5110 98c08c00 iadd contr ,contr 
+5111 58000009 setarg 9 
+5112 e7e08005 istore 1 ,contw 
+5113 18e27e00 copy queue ,pdata 
+5114 e7e08005 istore 1 ,contw 
+5115 18007e00 force 0x0000 ,pdata 
+5116 e7e10005 istore 2 ,contw 
+5117 18007e04 force 4 ,pdata 
+5118 9a40a400 iadd regb ,regb 
+5119 1a627e00 copy regc ,pdata 
+511a 9a262600 isub rega ,regc 
+511b 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_echo_rsp:
+511c 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_info_rsp:
+511d 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_reject_command:
+511e 18002400 force 0 ,regb 
+511f 20405374 call l2cap_get_signal_tx_payload 
+5120 58000001 setarg signal_cmd_reject 
+5121 e7e08005 istore 1 ,contw 
+5122 18e27e00 copy queue ,pdata 
+5123 e7e08005 istore 1 ,contw 
+5124 58000002 setarg 2 
+5125 e7e10005 istore 2 ,contw 
+5126 58000000 setarg cmd_not_understood 
+5127 e7e10005 istore 2 ,contw 
+5128 1a40a406 increase 6 ,regb 
+5129 da600004 arg 4 ,regc 
+512a 20204eda branch l2cap_process_one_signal_rtn 
+
+l2cap_reset_rfcomm_channel_state:
+512b 58000000 setarg 0 
+512c 67e1032c store 2 ,mem_rfcomm_tx_pkt_length 
+512d 67e144dd store 2 ,mem_rfcomm_remote_cid 
+512e 7044e400 jam 0 ,mem_rfcomm_state 
+512f 20600000 rtn 
+
+l2cap_reset_sdp_channel_state:
+5130 58000000 setarg 0 
+5131 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+5132 67e144db store 2 ,mem_sdp_remote_cid 
+5133 7044e300 jam 0 ,mem_sdp_state 
+5134 20600000 rtn 
+
+l2cap_reset_hid_ctrl_state:
+5135 58000000 setarg 0 
+5136 67e144df store 2 ,mem_hid_ctrl_remote_cid 
+5137 7044e500 jam 0 ,mem_hid_control_state 
+5138 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+5139 c0005141 beq 0 ,l2cap_reset_hid_disconnected 
+513a 20600000 rtn 
+
+l2cap_reset_hid_int_state:
+513b 58000000 setarg 0 
+513c 67e144e1 store 2 ,mem_hid_int_remote_cid 
+513d 7044e600 jam 0 ,mem_hid_interrupt_state 
+513e 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+513f c0005141 beq 0 ,l2cap_reset_hid_disconnected 
+5140 20600000 rtn 
+
+l2cap_reset_hid_disconnected:
+5141 70095b07 jam bt_evt_hid_disconnected ,mem_fifo_temp 
+5142 202078dc branch ui_ipc_send_event 
+
+l2cap_disconnect_interrupt_req:
+5143 6fe08330 fetch 1 ,mem_control_tasks 
+5144 793ffe00 set0 l2cap_disconnect_interrupt ,pdata 
+5145 67e08330 store 1 ,mem_control_tasks 
+5146 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+5147 207a0000 rtn blank 
+5148 20405369 call l2cap_malloc_signal_channel 
+5149 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+514a 1fe22200 copy pdata ,rega 
+514b 18002453 force l2cap_hid_interrupt_channel ,regb 
+514c 20205156 branch l2cap_generate_disconnect_req 
+
+l2cap_disconnect_control_req:
+514d 6fe08330 fetch 1 ,mem_control_tasks 
+514e 793ffe07 set0 l2cap_disconnect_control ,pdata 
+514f 67e08330 store 1 ,mem_control_tasks 
+5150 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+5151 207a0000 rtn blank 
+5152 20405369 call l2cap_malloc_signal_channel 
+5153 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+5154 1fe22200 copy pdata ,rega 
+5155 18002452 force l2cap_hid_control_channel ,regb 
+
+l2cap_generate_disconnect_req:
+5156 204052f5 call l2cap_get_req_id 
+5157 20405374 call l2cap_get_signal_tx_payload 
+5158 18007e06 force signal_disconnect_req ,pdata 
+5159 e7e08005 istore 1 ,contw 
+515a 6fe0c4e8 fetch 1 ,mem_ml2cap_comm_id 
+515b e7e08005 istore 1 ,contw 
+515c 58000004 setarg 0x0004 
+515d e7e10005 istore 2 ,contw 
+515e 1a227e00 copy rega ,pdata 
+515f e7e10005 istore 2 ,contw 
+5160 1a427e00 copy regb ,pdata 
+5161 e7e10005 istore 2 ,contw 
+5162 18000408 force 0x08 ,temp 
+5163 2020519a branch ml2cap_send_signal 
+
+ml2cap_send_signal_connect_req:
+5164 44fd401f bpatch patch1f_2 ,mem_patch1f 
+5165 204052f5 call l2cap_get_req_id 
+5166 20405374 call l2cap_get_signal_tx_payload 
+5167 58000002 setarg signal_connect_req 
+5168 e7e08005 istore 1 ,contw 
+5169 6fe0c4e8 fetch 1 ,mem_ml2cap_comm_id 
+516a e7e08005 istore 1 ,contw 
+516b 58000004 setarg 0x0004 
+516c e7e10005 istore 2 ,contw 
+516d 18427e00 copy temp ,pdata 
+516e e7e10005 istore 2 ,contw 
+516f 19627e00 copy timeup ,pdata 
+5170 e7e10005 istore 2 ,contw 
+5171 d8400008 arg 8 ,temp 
+5172 2020519a branch ml2cap_send_signal 
+
+ml2cap_send_signal_config_req:
+5173 44fdc01f bpatch patch1f_3 ,mem_patch1f 
+5174 204052f5 call l2cap_get_req_id 
+5175 20405374 call l2cap_get_signal_tx_payload 
+5176 58000004 setarg signal_config_req 
+5177 e7e08005 istore 1 ,contw 
+5178 6fe0c4e8 fetch 1 ,mem_ml2cap_comm_id 
+5179 e7e08005 istore 1 ,contw 
+517a 58000008 setarg 0x0008 
+517b e7e10005 istore 2 ,contw 
+517c 18427e00 copy temp ,pdata 
+517d e7e10005 istore 2 ,contw 
+517e 58000000 setarg 0x0000 
+517f e7e10005 istore 2 ,contw 
+5180 58000001 setarg 0x01 
+5181 e7e08005 istore 1 ,contw 
+5182 58000002 setarg 0x02 
+5183 e7e08005 istore 1 ,contw 
+5184 580003e3 setarg l2cap_config_mtu_rfcomm 
+5185 e7e10005 istore 2 ,contw 
+5186 d840000c arg 0xc ,temp 
+5187 2020519a branch ml2cap_send_signal 
+
+ml2cap_send_signal_disconn_req:
+5188 44fe401f bpatch patch1f_4 ,mem_patch1f 
+5189 204052f5 call l2cap_get_req_id 
+518a 20405374 call l2cap_get_signal_tx_payload 
+518b 58000006 setarg signal_disconnect_req 
+518c e7e08005 istore 1 ,contw 
+518d 6fe0c4e8 fetch 1 ,mem_ml2cap_comm_id 
+518e 1fe0fe01 increase 1 ,pdata 
+518f 18a22200 copy contw ,rega 
+5190 67e0c4e8 store 1 ,mem_ml2cap_comm_id 
+5191 1a220a00 copy rega ,contw 
+5192 e7e08005 istore 1 ,contw 
+5193 58000004 setarg 0x0004 
+5194 e7e10005 istore 2 ,contw 
+5195 18427e00 copy temp ,pdata 
+5196 e7e10005 istore 2 ,contw 
+5197 19627e00 copy timeup ,pdata 
+5198 e7e10005 istore 2 ,contw 
+5199 d8400008 arg 0x8 ,temp 
+
+ml2cap_send_signal:
+519a 60490320 storet 2 ,mem_l2cap_signal_tx_length 
+519b 18427e00 copy temp ,pdata 
+519c 203a5345 branch l2cap_malloc_discard ,blank 
+519d 20405372 call l2cap_get_signal_tx_buff 
+519e 6fe10320 fetch 2 ,mem_l2cap_signal_tx_length 
+519f e7e10005 istore 2 ,contw 
+51a0 18007e01 force l2cap_signal_channel ,pdata 
+51a1 e7e10005 istore 2 ,contw 
+51a2 20600000 rtn 
+
+msdp_send_req_done:
+51a3 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+51a4 203a137c branch assert ,blank 
+51a5 2040537f call l2cap_get_sdp_tx_buff 
+51a6 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+51a7 e7e10005 istore 2 ,contw 
+51a8 6fe144db fetch 2 ,mem_sdp_remote_cid 
+51a9 e7e10005 istore 2 ,contw 
+51aa 20600000 rtn 
+
+ml2cap_rx_multiplexing:
+51ab 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+51ac 203a4eb8 branch l2cap_rx_reset_state ,blank 
+51ad 44fec01f bpatch patch1f_5 ,mem_patch1f 
+51ae 6fe08319 fetch 1 ,mem_l2cap_rx_cid 
+51af c000d1b5 beq l2cap_signal_channel ,ml2cap_call_proc_signal 
+51b0 c0284ea2 beq l2cap_sdp_channel ,ml2cap_call_proc_sdp 
+51b1 c028ceb1 beq l2cap_rfcomm_channel ,l2cap_call_proc_rfcomm 
+51b2 c0294eaf beq l2cap_hid_control_channel ,l2cap_call_proc_hid 
+51b3 c029ceaf beq l2cap_hid_interrupt_channel ,l2cap_call_proc_hid 
+51b4 20204eb8 branch l2cap_rx_reset_state 
+
+ml2cap_call_proc_signal:
+51b5 20405369 call l2cap_malloc_signal_channel 
+51b6 18002400 force 0 ,regb 
+51b7 20405374 call l2cap_get_signal_tx_payload 
+51b8 1fe20a00 copy pdata ,contw 
+51b9 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+51ba 1fe22600 copy pdata ,regc 
+51bb 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+51bc 98000c00 iforce contr 
+
+ml2cap_proc_one_comm_loop:
+51bd 204051c3 call ml2cap_proc_one_comm 
+51be 1a60a7fc increase -4 ,regc 
+51bf 2422d1bd nbranch ml2cap_proc_one_comm_loop ,zero 
+51c0 1a420400 copy regb ,temp 
+51c1 2040519a call ml2cap_send_signal 
+51c2 20204eb8 branch l2cap_rx_reset_state 
+
+ml2cap_proc_one_comm:
+51c3 efe08006 ifetch 1 ,contr 
+51c4 c00151ce beq signal_connect_req ,ml2cap_proc_signal_connect_req 
+51c5 c000d1d1 beq signal_cmd_reject ,ml2cap_proc_signal_cmd_reject 
+51c6 c001d1db beq signal_connect_rsp ,ml2cap_proc_signal_connect_rsp 
+51c7 c002d217 beq signal_config_rsp ,ml2cap_proc_signal_config_rsp 
+51c8 c0025249 beq signal_config_req ,ml2cap_proc_signal_config_req 
+51c9 c003d2ce beq signal_disconnect_rsp ,ml2cap_proc_signal_disconn_rsp 
+51ca c003529c beq signal_disconnect_req ,ml2cap_proc_signal_disconn_req 
+51cb c004510c beq signal_echo_req ,l2cap_proc_signal_echo_req 
+51cc c0054ef6 beq signal_info_req ,ml2cap_proc_signal_info_req 
+51cd 202052e9 branch ml2cap_proc_send_reject 
+
+ml2cap_proc_signal_connect_req:
+51ce 20407d61 call save_cont_pointers 
+51cf 20407d66 call load_cont_pointers 
+51d0 20204f0d branch l2cap_proc_signal_connect_req 
+
+ml2cap_proc_signal_cmd_reject:
+51d1 efe08006 ifetch 1 ,contr 
+51d2 1fe20e00 copy pdata ,queue 
+51d3 efe10006 ifetch 2 ,contr 
+51d4 1fe22200 copy pdata ,rega 
+51d5 1a627e00 copy regc ,pdata 
+51d6 9a262600 isub rega ,regc 
+
+mvptr:
+51d7 efe08006 ifetch 1 ,contr 
+51d8 1a20a3ff increase -1 ,rega 
+51d9 2422d1d7 nbranch mvptr ,zero 
+51da 20600000 rtn 
+
+ml2cap_proc_signal_connect_rsp:
+51db efe08006 ifetch 1 ,contr 
+51dc 1fe20e00 copy pdata ,queue 
+51dd efe10006 ifetch 2 ,contr 
+51de 1fe22200 copy pdata ,rega 
+51df efe10006 ifetch 2 ,contr 
+51e0 1fe21600 copy pdata ,timeup 
+51e1 efe10006 ifetch 2 ,contr 
+51e2 1fe20400 copy pdata ,temp 
+51e3 efe10006 ifetch 2 ,contr 
+51e4 1fe67c00 sub pdata ,0 ,null 
+51e5 2022d1ed branch ml2cap_proc_signal_connect_rsp_sucessful ,zero 
+51e6 c00151e9 beq l2cap_connect_refused_psm_unsupported ,ml2cap_proc_signal_connect_refused_result 
+51e7 c00251e9 beq l2cap_connect_refused_no_resources ,ml2cap_proc_signal_connect_refused_result 
+51e8 202051eb branch ml2cap_proc_signal_connect_rsp_mnosucc 
+
+ml2cap_proc_signal_connect_refused_result:
+51e9 70095b16 jam bt_evt_ml2cap_conn_refused ,mem_fifo_temp 
+51ea 204078dc call ui_ipc_send_event 
+
+ml2cap_proc_signal_connect_rsp_mnosucc:
+51eb efe10006 ifetch 2 ,contr 
+51ec 20205214 branch mnosucc 
+
+ml2cap_proc_signal_connect_rsp_sucessful:
+51ed 20407d61 call save_cont_pointers 
+51ee 44ff401f bpatch patch1f_6 ,mem_patch1f 
+51ef 58000050 setarg l2cap_sdp_channel 
+51f0 98467c00 isub temp ,null 
+51f1 2022d1fc branch ml2cap_proc_signal_connect_rsp_sdp ,zero 
+51f2 58000051 setarg l2cap_rfcomm_channel 
+51f3 98467c00 isub temp ,null 
+51f4 2022d202 branch ml2cap_proc_signal_connect_rsp_rfcomm ,zero 
+51f5 58000053 setarg l2cap_hid_interrupt_channel 
+51f6 98467c00 isub temp ,null 
+51f7 2022d20e branch ml2cap_proc_signal_connect_rsp_hid_int ,zero 
+51f8 58000052 setarg l2cap_hid_control_channel 
+51f9 98467c00 isub temp ,null 
+51fa 2022d208 branch ml2cap_proc_signal_connect_rsp_hid_ctrl ,zero 
+51fb 20205214 branch mnosucc 
+
+ml2cap_proc_signal_connect_rsp_sdp:
+51fc 19627e00 copy timeup ,pdata 
+51fd 67e144db store 2 ,mem_sdp_remote_cid 
+51fe 6fe0c4e3 fetch 1 ,mem_sdp_state 
+51ff 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+5200 67e0c4e3 store 1 ,mem_sdp_state 
+5201 20205213 branch mnosucc1 
+
+ml2cap_proc_signal_connect_rsp_rfcomm:
+5202 19627e00 copy timeup ,pdata 
+5203 67e144dd store 2 ,mem_rfcomm_remote_cid 
+5204 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+5205 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+5206 67e0c4e4 store 1 ,mem_rfcomm_state 
+5207 20205213 branch mnosucc1 
+
+ml2cap_proc_signal_connect_rsp_hid_ctrl:
+5208 19627e00 copy timeup ,pdata 
+5209 67e144df store 2 ,mem_hid_ctrl_remote_cid 
+520a 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+520b 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+520c 67e0c4e5 store 1 ,mem_hid_control_state 
+520d 20205213 branch mnosucc1 
+
+ml2cap_proc_signal_connect_rsp_hid_int:
+520e 19627e00 copy timeup ,pdata 
+520f 67e144e1 store 2 ,mem_hid_int_remote_cid 
+5210 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+5211 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+5212 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+
+mnosucc1:
+5213 20407d66 call load_cont_pointers 
+
+mnosucc:
+5214 1a627e00 copy regc ,pdata 
+5215 9a262600 isub rega ,regc 
+5216 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp:
+5217 efe08006 ifetch 1 ,contr 
+5218 1fe20e00 copy pdata ,queue 
+5219 efe10006 ifetch 2 ,contr 
+521a 1fe22200 copy pdata ,rega 
+521b 1a627e00 copy regc ,pdata 
+521c 9a262600 isub rega ,regc 
+521d efe10006 ifetch 2 ,contr 
+521e 1fe21600 copy pdata ,timeup 
+521f efe10006 ifetch 2 ,contr 
+5220 efe10006 ifetch 2 ,contr 
+5221 243a5243 nbranch mcrsdone1 ,blank 
+5222 20407d61 call save_cont_pointers 
+5223 19620400 copy timeup ,temp 
+5224 44ffc01f bpatch patch1f_7 ,mem_patch1f 
+5225 58000050 setarg l2cap_sdp_channel 
+5226 98467c00 isub temp ,null 
+5227 2022d231 branch ml2cap_proc_signal_config_rsp_sdp ,zero 
+5228 58000051 setarg l2cap_rfcomm_channel 
+5229 98467c00 isub temp ,null 
+522a 2022d235 branch ml2cap_proc_signal_config_rsp_rfcomm ,zero 
+522b 58000052 setarg l2cap_hid_control_channel 
+522c 98467c00 isub temp ,null 
+522d 2022d239 branch ml2cap_proc_signal_config_rsp_hid_ctrl ,zero 
+522e 58000053 setarg l2cap_hid_interrupt_channel 
+522f 98467c00 isub temp ,null 
+5230 2022d23d branch ml2cap_proc_signal_config_rsp_hid_int ,zero 
+
+ml2cap_proc_signal_config_rsp_sdp:
+5231 6fe0c4e3 fetch 1 ,mem_sdp_state 
+5232 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+5233 67e0c4e3 store 1 ,mem_sdp_state 
+5234 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp_rfcomm:
+5235 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+5236 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+5237 67e0c4e4 store 1 ,mem_rfcomm_state 
+5238 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp_hid_ctrl:
+5239 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+523a 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+523b 67e0c4e5 store 1 ,mem_hid_control_state 
+523c 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp_hid_int:
+523d 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+523e 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+523f 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+5240 70095b06 jam bt_evt_hid_connected ,mem_fifo_temp 
+5241 202078dc branch ui_ipc_send_event 
+
+mcfrsdone:
+5242 20407d66 call load_cont_pointers 
+
+mcrsdone1:
+5243 1a20a3fa increase -6 ,rega 
+
+mloop2:
+5244 2022d248 branch mcrsdone ,zero 
+5245 18c08c01 increase 1 ,contr 
+5246 1a20a3ff increase -1 ,rega 
+5247 20205244 branch mloop2 
+
+mcrsdone:
+5248 20600000 rtn 
+
+ml2cap_proc_signal_config_req:
+5249 efe08006 ifetch 1 ,contr 
+524a 1fe20e00 copy pdata ,queue 
+524b efe10006 ifetch 2 ,contr 
+524c 1fe22200 copy pdata ,rega 
+524d 1a627e00 copy regc ,pdata 
+524e 9a262600 isub rega ,regc 
+524f efe10006 ifetch 2 ,contr 
+5250 18c08c02 increase 2 ,contr 
+5251 1fe20400 copy pdata ,temp 
+5252 58000005 setarg signal_config_rsp 
+5253 e7e08005 istore 1 ,contw 
+5254 18e27e00 copy queue ,pdata 
+5255 e7e08005 istore 1 ,contw 
+5256 1a20a202 increase 2 ,rega 
+5257 1a227e00 copy rega ,pdata 
+5258 e7e10005 istore 2 ,contw 
+5259 20407d61 call save_cont_pointers 
+525a 47004020 bpatchx patch20_0 ,mem_patch20 
+525b 58000050 setarg l2cap_sdp_channel 
+525c 98467c00 isub temp ,null 
+525d 2022d268 branch ml2cap_proc_signal_config_req_sdp ,zero 
+525e 58000051 setarg l2cap_rfcomm_channel 
+525f 98467c00 isub temp ,null 
+5260 2022d279 branch ml2cap_proc_signal_config_req_rfcomm ,zero 
+5261 58000052 setarg l2cap_hid_control_channel 
+5262 98467c00 isub temp ,null 
+5263 2022d27f branch ml2cap_proc_signal_config_req_hid_ctrl ,zero 
+5264 58000053 setarg l2cap_hid_interrupt_channel 
+5265 98467c00 isub temp ,null 
+5266 2022d285 branch ml2cap_proc_signal_config_req_hid_int ,zero 
+5267 2020528a branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_sdp:
+5268 6fe0c4e3 fetch 1 ,mem_sdp_state 
+5269 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+526a 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+526b 67e0c4e3 store 1 ,mem_sdp_state 
+526c c2815276 bbit1 l2cap_channel_state_snd_cfg_req ,ml2cap_proc_signal_config_req_sdp_nsndreq 
+526d 68488330 fetcht 1 ,mem_control_tasks 
+526e 79200406 set1 l2cap_init_config_req ,temp 
+526f 60488330 storet 1 ,mem_control_tasks 
+5270 18e27e00 copy queue ,pdata 
+5271 1fe0fe01 increase 1 ,pdata 
+5272 67e08332 store 1 ,mem_config_identifier 
+5273 6fe0c4e3 fetch 1 ,mem_sdp_state 
+5274 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+5275 67e0c4e3 store 1 ,mem_sdp_state 
+
+ml2cap_proc_signal_config_req_sdp_nsndreq:
+5276 6fe144db fetch 2 ,mem_sdp_remote_cid 
+5277 67e10333 store 2 ,mem_config_req_dest_cid 
+5278 2020528a branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_rfcomm:
+5279 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+527a 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+527b 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+527c 67e0c4e4 store 1 ,mem_rfcomm_state 
+527d 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+527e 2020528a branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_hid_ctrl:
+527f 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+5280 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+5281 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+5282 67e0c4e5 store 1 ,mem_hid_control_state 
+5283 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+5284 2020528a branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_hid_int:
+5285 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+5286 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+5287 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+5288 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+5289 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+
+mcfgrq_done:
+528a 1fe21600 copy pdata ,timeup 
+528b 20407d66 call load_cont_pointers 
+528c 19627e00 copy timeup ,pdata 
+528d e7e10005 istore 2 ,contw 
+528e 18007e00 force 0x0000 ,pdata 
+528f e7e10005 istore 2 ,contw 
+5290 18007e00 force 0x0000 ,pdata 
+5291 e7e10005 istore 2 ,contw 
+5292 18007e0a force 10 ,pdata 
+5293 9a40a400 iadd regb ,regb 
+5294 1a20a3fa increase -6 ,rega 
+
+mloop1:
+5295 2022d29b branch mcrqdone ,zero 
+5296 efe08006 ifetch 1 ,contr 
+5297 e7e08005 istore 1 ,contw 
+5298 1a40a401 increase 1 ,regb 
+5299 1a20a3ff increase -1 ,rega 
+529a 20205295 branch mloop1 
+
+mcrqdone:
+529b 20600000 rtn 
+
+ml2cap_proc_signal_disconn_req:
+529c efe08006 ifetch 1 ,contr 
+529d 1fe20e00 copy pdata ,queue 
+529e efe10006 ifetch 2 ,contr 
+529f 1fe22200 copy pdata ,rega 
+52a0 1a627e00 copy regc ,pdata 
+52a1 9a262600 isub rega ,regc 
+52a2 efe10006 ifetch 2 ,contr 
+52a3 1fe22200 copy pdata ,rega 
+52a4 efe10006 ifetch 2 ,contr 
+52a5 1fe21600 copy pdata ,timeup 
+52a6 20407d61 call save_cont_pointers 
+52a7 4700c020 bpatchx patch20_1 ,mem_patch20 
+52a8 58000050 setarg l2cap_sdp_channel 
+52a9 1a220400 copy rega ,temp 
+52aa 98467c00 isub temp ,null 
+52ab 2022d2b5 branch ml2cap_proc_signal_disconn_sdp ,zero 
+52ac 58000052 setarg l2cap_hid_control_channel 
+52ad 1a220400 copy rega ,temp 
+52ae 98467c00 isub temp ,null 
+52af 2022d2ba branch ml2cap_proc_signal_disconn_hid_ctrl ,zero 
+52b0 58000053 setarg l2cap_hid_interrupt_channel 
+52b1 1a220400 copy rega ,temp 
+52b2 98467c00 isub temp ,null 
+52b3 2022d2bc branch ml2cap_proc_signal_disconn_hid_int ,zero 
+52b4 202052be branch mclsrfc 
+
+ml2cap_proc_signal_disconn_sdp:
+52b5 58000000 setarg 0x0000 
+52b6 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+52b7 67e144db store 2 ,mem_sdp_remote_cid 
+52b8 67e0c4e3 store 1 ,mem_sdp_state 
+52b9 202052c0 branch mclssdp 
+
+ml2cap_proc_signal_disconn_hid_ctrl:
+52ba 20405135 call l2cap_reset_hid_ctrl_state 
+52bb 202052c0 branch mclssdp 
+
+ml2cap_proc_signal_disconn_hid_int:
+52bc 2040513b call l2cap_reset_hid_int_state 
+52bd 202052c0 branch mclssdp 
+
+mclsrfc:
+52be 58000000 setarg 0x0000 
+52bf 67e1032c store 2 ,mem_rfcomm_tx_pkt_length 
+
+mclssdp:
+52c0 20407d66 call load_cont_pointers 
+52c1 58000007 setarg signal_disconnect_rsp 
+52c2 e7e08005 istore 1 ,contw 
+52c3 18e27e00 copy queue ,pdata 
+52c4 e7e08005 istore 1 ,contw 
+52c5 58000004 setarg 0x0004 
+52c6 e7e10005 istore 2 ,contw 
+52c7 1a227e00 copy rega ,pdata 
+52c8 e7e10005 istore 2 ,contw 
+52c9 19627e00 copy timeup ,pdata 
+52ca e7e10005 istore 2 ,contw 
+52cb 18007e08 force 8 ,pdata 
+52cc 9a40a400 iadd regb ,regb 
+52cd 20600000 rtn 
+
+ml2cap_proc_signal_disconn_rsp:
+52ce efe08006 ifetch 1 ,contr 
+52cf 1fe20e00 copy pdata ,queue 
+52d0 efe10006 ifetch 2 ,contr 
+52d1 1fe22200 copy pdata ,rega 
+52d2 efe10006 ifetch 2 ,contr 
+52d3 1fe21600 copy pdata ,timeup 
+52d4 efe10006 ifetch 2 ,contr 
+52d5 1fe20400 copy pdata ,temp 
+52d6 20407d61 call save_cont_pointers 
+52d7 47014020 bpatchx patch20_2 ,mem_patch20 
+52d8 6fe0c4e8 fetch 1 ,mem_ml2cap_comm_id 
+52d9 a8e1fe00 icompare 0xff ,queue 
+52da 2420d2e5 nbranch mdisdone ,true 
+52db 58000050 setarg l2cap_sdp_channel 
+52dc 98467c00 isub temp ,null 
+52dd 2022d2e2 branch ml2cap_proc_signal_disconn_rsp_sdp ,zero 
+52de 58000051 setarg l2cap_rfcomm_channel 
+52df 98467c00 isub temp ,null 
+52e0 2022d2e5 branch ml2cap_proc_signal_disconn_rsp_rfcomm ,zero 
+52e1 202052e5 branch mdisdone 
+
+ml2cap_proc_signal_disconn_rsp_sdp:
+52e2 7044db00 jam 0 ,mem_sdp_remote_cid 
+52e3 7044e300 jam 0 ,mem_sdp_state 
+52e4 202052e5 branch mdisdone 
+
+ml2cap_proc_signal_disconn_rsp_rfcomm:
+
+mdisdone:
+52e5 20407d66 call load_cont_pointers 
+52e6 1a627e00 copy regc ,pdata 
+52e7 9a262600 isub rega ,regc 
+52e8 20600000 rtn 
+
+ml2cap_proc_send_reject:
+52e9 58000001 setarg signal_cmd_reject 
+52ea e7e08005 istore 1 ,contw 
+52eb efe08006 ifetch 1 ,contr 
+52ec e7e08005 istore 1 ,contw 
+52ed 58000002 setarg 0x0002 
+52ee e7e10005 istore 2 ,contw 
+52ef 58000000 setarg 0x0000 
+52f0 e7e10005 istore 2 ,contw 
+52f1 58000006 setarg 0x0006 
+52f2 9a40a400 iadd regb ,regb 
+52f3 18002604 force 4 ,regc 
+52f4 20600000 rtn 
+
+l2cap_get_req_id:
+52f5 6fe0c4e8 fetch 1 ,mem_ml2cap_comm_id 
+52f6 1fe0fe01 increase 1 ,pdata 
+52f7 c08052f9 bne 0 ,l2cap_get_req_id_ok 
+52f8 1fe0fe01 increase 1 ,pdata 
+
+l2cap_get_req_id_ok:
+52f9 67e0c4e8 store 1 ,mem_ml2cap_comm_id 
+52fa 20600000 rtn 
+
+l2cap_malloc:
+
+bt_l2cap_malloc:
+52fb db001800 arg mem_tx_buff0 ,regd 
+52fc dd600080 arg mem_bt_l2cap_tx_buff_size ,rege 
+52fd 20407ec5 call enable_user 
+52fe 20205303 branch host_l2cap_malloc 
+
+ble_l2cap_malloc:
+52ff 6b0143de fetchr regd ,2 ,mem_ble_l2cap_tx_buff0_ptr 
+5300 6d6143e0 fetchr rege ,2 ,mem_ble_l2cap_tx_buff_size_ptr 
+5301 20407ec7 call disable_user 
+5302 20205303 branch host_l2cap_malloc 
+
+host_l2cap_malloc:
+5303 4701c020 bpatchx patch20_3 ,mem_patch20 
+5304 2040534f call l2cap_malloc_is_fifo_full 
+5305 243a137c nbranch assert ,blank 
+5306 2040535f call l2cap_malloc_get_full_map 
+5307 df200008 arg 8 ,loopcnt 
+
+host_l2cap_malloc_loop:
+5308 6848c4e9 fetcht 1 ,mem_used_map 
+5309 1f260e08 sub loopcnt ,8 ,queue 
+530a a84fffff qisolate1 temp 
+530b 2020d310 branch host_l2cap_malloc_next_buffer ,true 
+530c 20405317 call host_l2cap_malloc_check_buffer_enough 
+530d 24215310 nbranch host_l2cap_malloc_next_buffer ,positive 
+530e 2040532d call host_l2cap_malloc_into_fifo 
+530f 20205314 branch host_l2cap_malloc_succ 
+
+host_l2cap_malloc_next_buffer:
+5310 1d627e00 copy rege ,pdata 
+5311 9b00b000 iadd regd ,regd 
+5312 c2005308 loop host_l2cap_malloc_loop 
+5313 2020137c branch assert 
+
+host_l2cap_malloc_succ:
+5314 1b027e00 copy regd ,pdata 
+5315 1b020a00 copy regd ,contw 
+5316 20600000 rtn 
+
+host_l2cap_malloc_check_buffer_enough:
+5317 47024020 bpatchx patch20_4 ,mem_patch20 
+5318 1f260e08 sub loopcnt ,8 ,queue 
+5319 d8400000 arg 0 ,temp 
+531a d9600000 arg 0 ,timeup 
+
+host_l2cap_malloc_check_buffer_enough_loop:
+531b 18e27e00 copy queue ,pdata 
+531c c0045328 beq 8 ,host_l2cap_malloc_check_buffer_enough_end 
+531d 6fe0c4e9 fetch 1 ,mem_used_map 
+531e afefffff qisolate1 pdata 
+531f 2020d328 branch host_l2cap_malloc_check_buffer_enough_end ,true 
+5320 f9201600 qset1 timeup 
+5321 1d627e00 copy rege ,pdata 
+5322 98408400 iadd temp ,temp 
+5323 18e08e01 increase 1 ,queue 
+5324 1a227e00 copy rega ,pdata 
+5325 98467c00 isub temp ,null 
+5326 2022d328 branch host_l2cap_malloc_check_buffer_enough_end ,zero 
+5327 2021531b branch host_l2cap_malloc_check_buffer_enough_loop ,positive 
+
+host_l2cap_malloc_check_buffer_enough_end:
+5328 18427e00 copy temp ,pdata 
+5329 9a267c00 isub rega ,null 
+532a 24628000 nrtn zero 
+532b f9201600 qset1 timeup 
+532c 20600000 rtn 
+
+host_l2cap_malloc_into_fifo:
+532d 4702c020 bpatchx patch20_5 ,mem_patch20 
+532e 2040534f call l2cap_malloc_is_fifo_full 
+532f 243a137c nbranch assert ,blank 
+5330 20405355 call l2cap_malloc_is_fifo_empty 
+5331 203a5336 branch host_l2cap_malloc_into_fifo_no_push ,blank 
+5332 6fe4c4ed fetch 9 ,mem_tx_fifo1 
+5333 67e4c4ea store 9 ,mem_tx_fifo0 
+5334 58000000 setarg 0 
+5335 e7e18005 istore 3 ,contw 
+
+host_l2cap_malloc_into_fifo_no_push:
+5336 6160c4f3 storer timeup ,1 ,mem_tx_fifo3_map 
+5337 630144f4 storer regd ,2 ,mem_tx_fifo3_ptr 
+5338 20600000 rtn 
+
+l2cap_malloc_fifo_out:
+5339 47034020 bpatchx patch20_6 ,mem_patch20 
+533a 20405358 call l2cap_malloc_fifo_get_first_ptr 
+533b 18c08c01 increase 1 ,contr 
+533c efe10006 ifetch 2 ,contr 
+533d 20600000 rtn 
+
+l2cap_malloc_free:
+533e 4703c020 bpatchx patch20_7 ,mem_patch20 
+533f 20405358 call l2cap_malloc_fifo_get_first_ptr 
+5340 18c20a00 copy contr ,contw 
+5341 18c20400 copy contr ,temp 
+5342 58000000 setarg 0 
+5343 e7e18005 istore 3 ,contw 
+5344 20600000 rtn 
+
+l2cap_malloc_discard:
+5345 47044021 bpatchx patch21_0 ,mem_patch21 
+5346 20405355 call l2cap_malloc_is_fifo_empty 
+5347 203a137c branch assert ,blank 
+5348 6fe1c4f0 fetch 3 ,mem_tx_fifo2 
+5349 67e1c4f3 store 3 ,mem_tx_fifo3 
+534a 6fe1c4ed fetch 3 ,mem_tx_fifo1 
+534b 67e1c4f0 store 3 ,mem_tx_fifo2 
+534c 6fe1c4ea fetch 3 ,mem_tx_fifo0 
+534d 67e1c4ed store 3 ,mem_tx_fifo1 
+534e 20600000 rtn 
+
+l2cap_malloc_is_fifo_full:
+534f 4704c021 bpatchx patch21_1 ,mem_patch21 
+5350 6fe1c4ea fetch 3 ,mem_tx_fifo0 
+5351 20600000 rtn 
+
+l2cap_malloc_is_fifo_nearly_full:
+5352 47054021 bpatchx patch21_2 ,mem_patch21 
+5353 6fe1c4ed fetch 3 ,mem_tx_fifo1 
+5354 20600000 rtn 
+
+l2cap_malloc_is_fifo_empty:
+5355 4705c021 bpatchx patch21_3 ,mem_patch21 
+5356 6fe1c4f3 fetch 3 ,mem_tx_fifo3 
+5357 20600000 rtn 
+
+l2cap_malloc_fifo_get_first_ptr:
+5358 20405355 call l2cap_malloc_is_fifo_empty 
+5359 203a535d branch l2cap_malloc_fifo_get_first_ptr_empty ,blank 
+535a d8c044ea arg mem_tx_fifo0 ,contr 
+
+l2cap_malloc_free_loop:
+535b efe18006 ifetch 3 ,contr 
+535c 203a535b branch l2cap_malloc_free_loop ,blank 
+
+l2cap_malloc_fifo_get_first_ptr_empty:
+535d 18c08dfd increase -3 ,contr 
+535e 20600000 rtn 
+
+l2cap_malloc_get_full_map:
+535f 47064021 bpatchx patch21_4 ,mem_patch21 
+5360 df200004 arg 4 ,loopcnt 
+5361 d8c044ea arg mem_tx_fifo0_map ,contr 
+5362 d8400000 arg 0 ,temp 
+
+l2cap_malloc_get_full_map_loop:
+5363 efe18006 ifetch 3 ,contr 
+5364 1fe17eff and pdata ,0xff ,pdata 
+5365 98418400 ior temp ,temp 
+5366 c2005363 loop l2cap_malloc_get_full_map_loop 
+5367 6048c4e9 storet 1 ,mem_used_map 
+5368 20600000 rtn 
+
+l2cap_malloc_signal_channel:
+5369 4706c021 bpatchx patch21_5 ,mem_patch21 
+536a da20007f arg l2cap_signal_malloc_size ,rega 
+536b 204052fb call l2cap_malloc 
+536c 67e1031c store 2 ,mem_l2cap_signal_tx_buff_ptr 
+536d 1fe0fe04 increase 4 ,pdata 
+536e 67e1031e store 2 ,mem_l2cap_signal_tx_payload_ptr 
+536f 58000000 setarg 0 
+5370 67e10320 store 2 ,mem_l2cap_signal_tx_length 
+5371 20600000 rtn 
+
+l2cap_get_signal_tx_buff:
+5372 6fe1031c fetch 2 ,mem_l2cap_signal_tx_buff_ptr 
+5373 20205393 branch l2cap_util_pdata_to_contw 
+
+l2cap_get_signal_tx_payload:
+5374 6fe1031e fetch 2 ,mem_l2cap_signal_tx_payload_ptr 
+5375 20205393 branch l2cap_util_pdata_to_contw 
+
+l2cap_malloc_sdp_channel:
+5376 47074021 bpatchx patch21_6 ,mem_patch21 
+5377 da2000fa arg sdp_malloc_size ,rega 
+5378 204052fb call l2cap_malloc 
+5379 67e10322 store 2 ,mem_sdp_tx_buff_ptr 
+537a 1fe0fe04 increase 4 ,pdata 
+537b 67e10324 store 2 ,mem_sdp_tx_payload_ptr 
+537c 58000000 setarg 0 
+537d 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+537e 20600000 rtn 
+
+l2cap_get_sdp_tx_buff:
+537f 6fe10322 fetch 2 ,mem_sdp_tx_buff_ptr 
+5380 20205393 branch l2cap_util_pdata_to_contw 
+
+l2cap_get_sdp_tx_payload:
+5381 6fe10324 fetch 2 ,mem_sdp_tx_payload_ptr 
+5382 20205393 branch l2cap_util_pdata_to_contw 
+
+l2cap_malloc_rfcomm_channel:
+5383 4707c021 bpatchx patch21_7 ,mem_patch21 
+5384 20407d3b call push_stack 
+5385 70033501 jam rfcomm_malloc_fail ,mem_rfcomm_malloc_fail_flag 
+5386 2040534f call l2cap_malloc_is_fifo_full 
+5387 247a0000 nrtn blank 
+5388 da20007f arg rfcomm_malloc_size ,rega 
+5389 204052fb call l2cap_malloc 
+538a 67e10328 store 2 ,mem_rfcomm_tx_buff_ptr 
+538b 1fe0fe04 increase 4 ,pdata 
+538c 67e1032a store 2 ,mem_rfcomm_tx_payload_ptr 
+538d 58000000 setarg 0 
+538e 67e1032c store 2 ,mem_rfcomm_tx_pkt_length 
+538f 70033500 jam rfcomm_malloc_succeed ,mem_rfcomm_malloc_fail_flag 
+5390 20207d47 branch pop_stack 
+
+l2cap_get_rfcomm_tx_buff:
+5391 6fe10328 fetch 2 ,mem_rfcomm_tx_buff_ptr 
+5392 20205393 branch l2cap_util_pdata_to_contw 
+
+l2cap_util_pdata_to_contw:
+5393 203a137c branch assert ,blank 
+5394 1fe20a00 copy pdata ,contw 
+5395 20600000 rtn 
+
+l2cap_lpm_save_calc_len:
+5396 47084022 bpatchx patch22_0 ,mem_patch22 
+5397 da400000 arg 0 ,regb 
+5398 da2044ea arg mem_tx_fifo0_map ,rega 
+5399 1a20a3fe increase -2 ,rega 
+
+l2cap_lpm_save_calc_len_loop:
+539a 1a20a202 increase 2 ,rega 
+539b 580044f6 setarg mem_tx_fifo_end 
+539c 9a267c00 isub rega ,null 
+539d 2022d3a6 branch l2cap_lpm_save_calc_len_end ,zero 
+539e efe08011 ifetch 1 ,rega 
+539f 1a20a201 increase 1 ,rega 
+53a0 203a539a branch l2cap_lpm_save_calc_len_loop ,blank 
+53a1 e8410011 ifetcht 2 ,rega 
+53a2 efe10002 ifetch 2 ,temp 
+53a3 9a40a400 iadd regb ,regb 
+53a4 1a40a404 increase 4 ,regb 
+53a5 2020539a branch l2cap_lpm_save_calc_len_loop 
+
+l2cap_lpm_save_calc_len_end:
+53a6 1a427e00 copy regb ,pdata 
+53a7 20600000 rtn 
+
+l2cap_lpm_get_wake_lock:
+53a8 d8e0000c arg wake_lock_l2cap_tx ,queue 
+53a9 20201566 branch lpm_get_wake_lock 
+
+l2cap_lpm_put_wake_lock:
+53aa d8e0000c arg wake_lock_l2cap_tx ,queue 
+53ab 2020156a branch lpm_put_wake_lock 
+
+l2cap_lpm_save_txbuf:
+53ac 4708c022 bpatchx patch22_1 ,mem_patch22 
+53ad 2040535f call l2cap_malloc_get_full_map 
+53ae 6fe0c4e9 fetch 1 ,mem_used_map 
+53af 207a0000 rtn blank 
+53b0 20405396 call l2cap_lpm_save_calc_len 
+53b1 d8400100 arg l2cap_lpm_txbuf_len ,temp 
+53b2 98467c00 isub temp ,null 
+53b3 202153a8 branch l2cap_lpm_get_wake_lock ,positive 
+53b4 204053aa call l2cap_lpm_put_wake_lock 
+53b5 d8a044f6 arg mem_l2cap_lpm_txbuf ,contw 
+53b6 da2044ea arg mem_tx_fifo0 ,rega 
+
+l2cap_lpm_save_txbuf_loop:
+53b7 580044f6 setarg mem_tx_fifo_end 
+53b8 9a267c00 isub rega ,null 
+53b9 20628000 rtn zero 
+53ba efe08011 ifetch 1 ,rega 
+53bb 1a20a201 increase 1 ,rega 
+53bc 243a53c0 nbranch l2cap_lpm_save_txbuf_nempty ,blank 
+53bd e7e10005 istore 2 ,contw 
+53be 1a20a202 increase 2 ,rega 
+53bf 202053b7 branch l2cap_lpm_save_txbuf_loop 
+
+l2cap_lpm_save_txbuf_nempty:
+53c0 efe10011 ifetch 2 ,rega 
+53c1 1a20a202 increase 2 ,rega 
+53c2 1fe20c00 copy pdata ,contr 
+53c3 efe10006 ifetch 2 ,contr 
+53c4 e7e10005 istore 2 ,contw 
+53c5 1fe27200 copy pdata ,loopcnt 
+53c6 1f20f202 increase 2 ,loopcnt 
+53c7 20407dd4 call memcpy 
+53c8 202053b7 branch l2cap_lpm_save_txbuf_loop 
+
+l2cap_lpm_load_txbuf:
+53c9 47094022 bpatchx patch22_2 ,mem_patch22 
+53ca 2040535f call l2cap_malloc_get_full_map 
+53cb 6fe0c4e9 fetch 1 ,mem_used_map 
+53cc 207a0000 rtn blank 
+53cd da2044eb arg mem_tx_fifo0_ptr ,rega 
+53ce 1a20a3fd increase -3 ,rega 
+53cf d8c044f6 arg mem_l2cap_lpm_txbuf ,contr 
+
+l2cap_lpm_load_txbuf_loop:
+53d0 1a20a203 increase 3 ,rega 
+53d1 580044f7 setarg mem_tx_fifo_end + 1 
+53d2 9a267c00 isub rega ,null 
+53d3 20628000 rtn zero 
+53d4 efe10006 ifetch 2 ,contr 
+53d5 203a53d0 branch l2cap_lpm_load_txbuf_loop ,blank 
+53d6 1fe0fe04 increase 4 ,pdata 
+53d7 1fe27200 copy pdata ,loopcnt 
+53d8 18c22400 copy contr ,regb 
+53d9 efe10011 ifetch 2 ,rega 
+53da 1fe20a00 copy pdata ,contw 
+53db 1a420c00 copy regb ,contr 
+53dc 18c08dfe increase -2 ,contr 
+53dd 20407dd4 call memcpy 
+53de 202053d0 branch l2cap_lpm_load_txbuf_loop 
+
+init_lmp:
+53df 20758000 rtn wake 
+
+init_lmp_work:
+53e0 4709c022 bpatchx patch22_3 ,mem_patch22 
+53e1 58000000 setarg 0 
+53e2 67e08048 store 1 ,mem_lmp_to_send 
+53e3 67e08055 store 1 ,mem_conn_sm 
+53e4 67e08078 store 1 ,mem_lmo_opcode1 
+53e5 67e0807c store 1 ,mem_lmo_opcode2 
+53e6 67e0c15d store 1 ,mem_esco_addr 
+53e7 67e080bc store 1 ,mem_connection_options 
+53e8 67e08877 store 1 ,mem_pairing_auth 
+53e9 67e1c647 store 3 ,mem_encapsulated_major_type 
+53ea 67e0c64a store 1 ,mem_remote_br_sc_support 
+53eb 70464500 jam switch_flag_init ,mem_switch_flag 
+53ec 70030c00 jam 0 ,mem_switch_fail_master_count 
+53ed 7003ab00 jam null_encryp ,mem_wait_encryption 
+
+init_lmp_reinit:
+53ee 70087700 jam 0 ,mem_pairing_auth 
+53ef 70087600 jam 0 ,mem_sp_localsm 
+53f0 7003a500 jam 0 ,mem_lmp_conn_state 
+
+parse_rx_done:
+53f1 20600000 rtn 
+
+parse_lmp:
+53f2 470a4022 bpatchx patch22_4 ,mem_patch22 
+53f3 2054da82 call setlocalsm_master ,master 
+53f4 2454da86 ncall setlocalsm_slave ,master 
+53f5 20405a3f call lmo_fifo_check 
+53f6 247a0000 nrtn blank 
+53f7 6fe0804c fetch 1 ,mem_state_map 
+53f8 c4030000 rtnbit0 smap_rxlmp 
+53f9 793ffe06 set0 smap_rxlmp ,pdata 
+53fa 793f8001 set0 mark_rxbuf_inuse ,mark 
+53fb 67e0804c store 1 ,mem_state_map 
+53fc 6fe080ce fetch 1 ,mem_rxbuf 
+53fd 6848804c fetcht 1 ,mem_state_map 
+53fe 2feffe00 isolate1 smap_lmptidinit ,pdata 
+53ff 79208401 setflag true ,smap_lmptid ,temp 
+5400 6048804c storet 1 ,mem_state_map 
+5401 18410402 and_into 0x2 ,temp 
+5402 6048807f storet 1 ,mem_lmo_tid2 
+5403 6848804c fetcht 1 ,mem_state_map 
+5404 1fe37e00 rshift pdata ,pdata 
+5405 67e0807d store 1 ,mem_lmi_opcode2 
+5406 470ac022 bpatchx patch22_5 ,mem_patch22 
+5407 6fe0807d fetch 1 ,mem_lmi_opcode2 
+5408 c03fd454 beq lmp_escape ,parse_lmp_escape 
+5409 c001d4c0 beq lmp_accepted ,parse_lmp_accepted 
+540a c00254d1 beq lmp_not_accepted ,parse_lmp_not_accepted 
+540b c01e5447 beq lmp_set_afh ,parse_lmp_set_afh 
+540c c002d443 beq lmp_clkoffset_req ,parse_lmp_clkoffset_req 
+540d c007d6f7 beq lmp_encryption_mode_req ,parse_lmp_encryption_mode_req 
+540e c0085536 beq lmp_encryption_key_size_req ,parse_lmp_crypt_key 
+540f c011d555 beq lmp_auto_rate ,parse_lmp_auto_rate 
+5410 c01cd710 beq lmp_test_control ,parse_lmp_test_control 
+5411 c01c570b beq lmp_test_activate ,parse_lmp_test_activate 
+5412 c018d53b beq lmp_setup_complete ,parse_lmp_setup_complete 
+5413 c01bd5d7 beq lmp_supervision_timeout ,parse_lmp_supervision_timeout 
+5414 c013d5d3 beq lmp_features_req ,parse_lmp_features_req 
+5415 c019d5d0 beq lmp_host_connection_req ,parse_lmp_conn_req 
+5416 c012d5d5 beq lmp_version_req ,parse_lmp_version_req 
+5417 c0135551 beq lmp_version_res ,parse_lmp_version_res 
+5418 c003d54a beq lmp_detach ,parse_lmp_detach 
+5419 c016d541 beq lmp_max_slot ,parse_lmp_max_slot 
+541a c0175542 beq lmp_max_slot_req ,parse_lmp_max_slot_req 
+541b c000d5cc beq lmp_name_req ,parse_lmp_name_req 
+541c c00155b7 beq lmp_name_res ,parse_lmp_name_res 
+541d c0145702 beq lmp_features_res ,parse_lmp_features_res 
+541e c004d5ad beq lmp_comb_key ,parse_lmp_comb_key 
+541f c005d574 beq lmp_au_rand ,parse_lmp_au_rand 
+5420 c0045556 beq lmp_in_rand ,parse_lmp_in_rand 
+5421 c0065586 beq lmp_sres ,parse_lmp_sres 
+5422 c00fd54d beq lmp_incr_power_req ,parse_lmp_incr_power 
+5423 c010554f beq lmp_decr_power_req ,parse_lmp_decr_power 
+5424 c010d5f1 beq lmp_max_power ,parse_lmp_max_power 
+5425 c01155f1 beq lmp_min_power ,parse_lmp_min_power 
+5426 c01ad5f2 beq lmp_page_mode_req ,parse_lmp_page_mode_req 
+5427 c01b55f3 beq lmp_page_scan_mode_req ,parse_lmp_page_scan_mode_req 
+5428 c01255f1 beq lmp_preferred_rate ,parse_lmp_preferred_rate 
+5429 c01a55f4 beq lmp_slot_offset ,parse_lmp_slot_offset 
+542a c00bd5fd beq lmp_sniff_req ,parse_lmp_sniff_req 
+542b c008d617 beq lmp_start_encryption_req ,parse_lmp_start_encryption_req 
+542c c0095624 beq lmp_stop_encryption_req ,parse_lmp_stop_encryption_req 
+542d c009d626 beq lmp_switch_req ,parse_lmp_switch_req 
+542e c006d636 beq lmp_temp_rand ,parse_lmp_temp_rand 
+542f c0075636 beq lmp_temp_key ,parse_lmp_temp_key 
+5430 c017d5d1 beq lmp_timing_accuracy_req ,parse_lmp_timing_accuracy_req 
+5431 c0185636 beq lmp_timing_accuracy_res ,parse_lmp_timing_accuracy_res 
+5432 c0055636 beq lmp_unit_key ,parse_lmp_unit_key 
+5433 c00c5637 beq lmp_unsniff_req ,parse_lmp_unsniff_req 
+5434 c0195636 beq lmp_use_semi_permanent_key ,parse_lmp_use_semi_permanend_key 
+5435 c01ed63c beq lmp_encapsulated_header ,parse_lmp_encapsulated_header 
+5436 c01f5685 beq lmp_encapsulated_payload ,parse_lmp_encapsulated_payload 
+5437 c01fd67e beq lmp_simple_pairing_confirm ,parse_simple_pairing_confirm 
+5438 c02056c8 beq lmp_simple_pairing_number ,parse_lmp_simple_pairing_number 
+5439 c020d6d9 beq lmp_dhkey_check ,parse_dhkey_check 
+543a c00356f6 beq lmp_clkoffset_res ,parse_lmp_clkoffset_res 
+543b c01d5445 beq lmp_enc_key_size_mask_req ,parse_enc_key_size_mask_req 
+543c c0155441 beq lmp_quality_of_service_req ,parse_quality_of_server_req 
+543d c014d442 beq lmp_quality_of_service ,parse_quality_of_server 
+
+reject_unknown_packet:
+543e 70007e19 jam unknown_lmp_pdu ,mem_lmo_reason2 
+
+reject_lmp_packet:
+543f 70007c04 jam lmp_not_accepted ,mem_lmo_opcode2 
+5440 20600000 rtn 
+
+parse_quality_of_server_req:
+5441 2020554b branch accept_lmp_msg 
+
+parse_quality_of_server:
+5442 20600000 rtn 
+
+parse_lmp_clkoffset_req:
+5443 70007c06 jam lmp_clkoffset_res ,mem_lmo_opcode2 
+5444 20600000 rtn 
+
+parse_enc_key_size_mask_req:
+5445 70007c3b jam lmp_enc_key_size_mask_res ,mem_lmo_opcode2 
+5446 20600000 rtn 
+
+parse_lmp_set_afh:
+5447 6fe200cf fetch 4 ,mem_rxbuf + 1 
+5448 1fe3fe00 lshift pdata ,pdata 
+5449 67e240d9 store 4 ,mem_afh_instant 
+544a 6fe080d3 fetch 1 ,mem_rxbuf + 5 
+544b 67e0c0e0 store 1 ,mem_afh_new_mod 
+544c 6fe280d4 fetch 5 ,mem_rxbuf + 6 
+544d 67e2c0ee store 5 ,mem_afh_map_new 
+544e 6fe280d9 fetch 5 ,mem_rxbuf + 11 
+544f e7e28005 istore 5 ,contw 
+5450 6fe08031 fetch 1 ,mem_mode 
+5451 79207e03 set1 afh_change ,pdata 
+5452 67e08031 store 1 ,mem_mode 
+5453 20600000 rtn 
+
+parse_lmp_escape:
+5454 470b4022 bpatchx patch22_6 ,mem_patch22 
+5455 6fe080cf fetch 1 ,mem_rxbuf + 1 
+5456 79207e07 set1 7 ,pdata 
+5457 67e0807d store 1 ,mem_lmi_opcode2 
+5458 c040d479 beq lmp_ext_accepted ,parse_lmpext_accepted 
+5459 c041547e beq lmp_not_accepted_ext ,parse_lmpext_not_accepted 
+545a c04ad5d8 beq lmp_sniff_subrating_req ,parse_lmp_sniff_subrating_req 
+545b c04b55f1 beq lmp_sniff_subrating_res ,parse_lmp_sniff_subrating_res 
+545c c045d5e6 beq lmp_packet_type_table_req ,parse_lmpext_packet_type_table_req 
+545d c041d494 beq lmp_ext_features_req ,parse_lmpext_features_req 
+545e c04254b6 beq lmp_ext_features_res ,parse_lmpext_features_res 
+545f c048546b beq lmp_ext_chn_classification_req ,parse_lmpext_chn_classification_req 
+5460 c04bd48d beq lmp_pause_encryption_req ,parse_lmpext_pause_encrypt 
+5461 c04c5492 beq lmp_resume_encryption_req ,parse_lmpext_resume_encrypt 
+5462 c04cd46e beq lmp_io_cap_req ,parse_lmpext_iocap_req 
+5463 c04d5471 beq lmp_io_cap_res ,parse_lmpext_iocap_res 
+5464 c050d469 beq lmp_ping_req ,parse_lmpext_ping_req 
+5465 c1420000 rtneq lmp_ext_features_res 
+
+reject_unknown_ext_packet:
+5466 70007c82 jam lmp_not_accepted_ext ,mem_lmo_opcode2 
+5467 70007e19 jam unknown_lmp_pdu ,mem_lmo_reason2 
+5468 20600000 rtn 
+
+parse_lmpext_ping_req:
+5469 70007ca2 jam lmp_ping_res ,mem_lmo_opcode2 
+546a 20600000 rtn 
+
+parse_lmpext_chn_classification_req:
+546b 70007c82 jam lmp_not_accepted_ext ,mem_lmo_opcode2 
+546c 70007e2e jam not_support_chn_classification ,mem_lmo_reason2 
+546d 20600000 rtn 
+
+parse_lmpext_iocap_req:
+546e 20405473 call iocap_lmpext_load 
+546f 70007c9a jam lmp_io_cap_res ,mem_lmo_opcode2 
+5470 20600000 rtn 
+
+parse_lmpext_iocap_res:
+5471 20405473 call iocap_lmpext_load 
+5472 20205477 branch iocap_lmpext_common 
+
+iocap_lmpext_load:
+5473 d8a0476b arg mem_sp_iocap_remote ,contw 
+5474 6fe180d0 fetch 3 ,mem_rxbuf + 2 
+5475 e7e18005 istore 3 ,contw 
+5476 20600000 rtn 
+
+iocap_lmpext_common:
+5477 2020f0d3 branch master_set_mem_master_sp_flag ,true 
+5478 20600000 rtn 
+
+parse_lmpext_accepted:
+5479 6fe080d1 fetch 1 ,mem_rxbuf + 3 
+547a 79207e07 set1 7 ,pdata 
+547b 67e0839d store 1 ,mem_lmi_accepted_opcode 
+547c c045d483 beq lmp_packet_type_table_req ,parse_lmpext_accepted_ptt 
+547d 20600000 rtn 
+
+parse_lmpext_not_accepted:
+547e 6fe080d1 fetch 1 ,mem_rxbuf + 3 
+547f 79207e07 set1 7 ,pdata 
+5480 67e0839d store 1 ,mem_lmi_accepted_opcode 
+5481 c045d487 beq lmp_packet_type_table_req ,parse_lmpext_not_accepted_ptt 
+5482 20600000 rtn 
+
+parse_lmpext_accepted_ptt:
+5483 6fe0c15f fetch 1 ,mem_ptt 
+5484 6848804c fetcht 1 ,mem_state_map 
+5485 7d3a0405 nsetflag blank ,smap_edr ,temp 
+5486 6048804c storet 1 ,mem_state_map 
+
+parse_lmpext_not_accepted_ptt:
+5487 6fe08030 fetch 1 ,mem_state 
+5488 c4028000 rtnbit0 state_init_seq 
+5489 793ffe05 set0 state_init_seq ,pdata 
+548a 67e08030 store 1 ,mem_state 
+548b 70007c31 jam lmp_setup_complete ,mem_lmo_opcode2 
+548c 20600000 rtn 
+
+parse_lmpext_pause_encrypt:
+548d 2434d490 nbranch parse_lmpext_pause_encrypt_slave ,master 
+548e 70007c12 jam lmp_stop_encryption_req ,mem_lmo_opcode2 
+548f 20205a6e branch tid_reply 
+
+parse_lmpext_pause_encrypt_slave:
+5490 70007c97 jam lmp_pause_encryption_req ,mem_lmo_opcode2 
+5491 20600000 rtn 
+
+parse_lmpext_resume_encrypt:
+5492 20405a6e call tid_reply 
+5493 2020574d branch lmp_start_encryption 
+
+parse_lmpext_features_req:
+5494 efe08006 ifetch 1 ,contr 
+5495 67e083a1 store 1 ,mem_ext_features_page 
+5496 c000d499 beq 1 ,parse_lmpext_features_req_page1 
+5497 c001549e beq 2 ,parse_lmpext_features_req_page2 
+5498 20600000 rtn 
+
+parse_lmpext_features_req_page1:
+5499 70007c84 jam lmp_ext_features_res ,mem_lmo_opcode2 
+549a 18c08c01 increase 1 ,contr 
+549b efe08006 ifetch 1 ,contr 
+549c c281d4b0 bbit1 lmp_features_ext_page1_sc_host_bit ,remote_support_br_sc_host 
+549d 202054b3 branch remote_not_support_br_sc_host 
+
+parse_lmpext_features_req_page2:
+549e 70007c84 jam lmp_ext_features_res ,mem_lmo_opcode2 
+549f 18c08c01 increase 1 ,contr 
+54a0 efe10006 ifetch 2 ,contr 
+54a1 c28454a3 bbit1 lmp_features_ext_page2_sc_controller_bit ,remote_support_br_sc_controller 
+54a2 202054ac branch remote_not_support_br_sc_controller 
+
+remote_support_br_sc_controller:
+54a3 6fe0c64a fetch 1 ,mem_remote_br_sc_support 
+54a4 79207e01 set1 remote_br_sc_controller_bit ,pdata 
+54a5 204054ae call set_remote_br_sc_support 
+54a6 6fe0c64a fetch 1 ,mem_remote_br_sc_support 
+54a7 c1818000 rtnne 3 
+54a8 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+54a9 c4008000 rtnbit0 secure_connections_br_bit 
+54aa 70464802 jam encapsulated_minor_type_p256 ,mem_encapsulated_minor_type 
+54ab 20600000 rtn 
+
+remote_not_support_br_sc_controller:
+54ac 6fe0c64a fetch 1 ,mem_remote_br_sc_support 
+54ad 793ffe01 set0 remote_br_sc_controller_bit ,pdata 
+
+set_remote_br_sc_support:
+54ae 67e0c64a store 1 ,mem_remote_br_sc_support 
+54af 20600000 rtn 
+
+remote_support_br_sc_host:
+54b0 6fe0c64a fetch 1 ,mem_remote_br_sc_support 
+54b1 79207e00 set1 remote_br_sc_host_bit ,pdata 
+54b2 202054ae branch set_remote_br_sc_support 
+
+remote_not_support_br_sc_host:
+54b3 6fe0c64a fetch 1 ,mem_remote_br_sc_support 
+54b4 793ffe00 set0 remote_br_sc_host_bit ,pdata 
+54b5 202054ae branch set_remote_br_sc_support 
+
+parse_lmpext_features_res:
+54b6 684880d2 fetcht 1 ,mem_rxbuf + 4 
+54b7 18410401 and temp ,0x1 ,temp 
+54b8 604883a4 storet 1 ,mem_remote_sppcap 
+54b9 6fe0c1db fetch 1 ,mem_hci_cmd 
+54ba c0a8d4bc bne hci_cmd_wait_remote_ext_feature ,parse_lmpext_features_res_not_hci 
+54bb 7041db00 jam 0 ,mem_hci_cmd 
+
+parse_lmpext_features_res_not_hci:
+54bc 6fe08055 fetch 1 ,mem_conn_sm 
+54bd c18a8000 rtnne conn_sm_wait_features_ext 
+54be 70005504 jam conn_sm_send_conn_req ,mem_conn_sm 
+54bf 20205a9e branch process_conn_sm 
+
+parse_lmp_accepted:
+54c0 470bc022 bpatchx patch22_7 ,mem_patch22 
+54c1 6fe080cf fetch 1 ,mem_rxbuf + 1 
+54c2 67e0839d store 1 ,mem_lmi_accepted_opcode 
+54c3 c019d4e7 beq lmp_host_connection_req ,parse_lmp_accepted_hostconn 
+54c4 c00454f6 beq lmp_in_rand ,parse_lmp_accepted_inrand 
+54c5 c007d4fd beq lmp_encryption_mode_req ,parse_lmp_accepted_enc_mode 
+54c6 c0085503 beq lmp_encryption_key_size_req ,parse_lmp_accepted_enc_keysize 
+54c7 c008d504 beq lmp_start_encryption_req ,parse_lmp_accepted_start_enc 
+54c8 c009550c beq lmp_stop_encryption_req ,parse_lmp_accepted_stop_enc 
+54c9 c00c5525 beq lmp_unsniff_req ,parse_lmp_accepted_unsniff_req 
+54ca c00bd528 beq lmp_sniff_req ,parse_lmp_accepted_sniff_req 
+54cb c009d4de beq lmp_switch_req ,parse_lmp_accepted_switch 
+54cc c01ed651 beq lmp_encapsulated_header ,parse_lmp_accepted_encapsulated_header 
+54cd c01f56b2 beq lmp_encapsulated_payload ,parse_lmp_accepted_encapsulated_payload 
+54ce c0205653 beq lmp_simple_pairing_number ,parse_lmp_accepted_simple_pairing_number 
+54cf c020d670 beq lmp_dhkey_check ,parse_lmp_accepted_dhkey_check 
+54d0 20600000 rtn 
+
+parse_lmp_not_accepted:
+54d1 470c4023 bpatchx patch23_0 ,mem_patch23 
+54d2 6fe080cf fetch 1 ,mem_rxbuf + 1 
+54d3 67e0839d store 1 ,mem_lmi_accepted_opcode 
+54d4 c000d51c beq lmp_name_req ,parse_lmp_not_accepted_name_req 
+54d5 c019d4f1 beq lmp_host_connection_req ,parse_lmp_not_accepted_hostconn 
+54d6 c005d50d beq lmp_au_rand ,parse_lmp_not_accepted_aurand 
+54d7 c0045513 beq lmp_in_rand ,parse_lmp_not_accepted_inrand 
+54d8 c009d4e1 beq lmp_switch_req ,parse_lmp_not_accepted_switch 
+54d9 c020551d beq lmp_simple_pairing_number ,parse_lmp_not_accepted_simple_pairing_number 
+54da c020d520 beq lmp_dhkey_check ,parse_lmp_not_accepted_dhkey_check 
+54db c00c5523 beq lmp_unsniff_req ,parse_lmp_not_accepted_unsniff_req 
+54dc c00bd534 beq lmp_sniff_req ,parse_lmp_not_acdcept_sniff_req 
+54dd 20600000 rtn 
+
+parse_lmp_accepted_switch:
+54de 70095b20 jam bt_evt_switch_accept ,mem_fifo_temp 
+54df 204078dc call ui_ipc_send_event 
+54e0 202009dd branch role_switch_prepare0 
+
+parse_lmp_not_accepted_switch:
+54e1 70095b19 jam bt_evt_switch_not_accept ,mem_fifo_temp 
+54e2 204078dc call ui_ipc_send_event 
+54e3 70464502 jam switch_flag_not_accept ,mem_switch_flag 
+54e4 58000050 setarg timer_switch_waite 
+54e5 d8e00006 arg switch_wait_timer ,queue 
+54e6 20207ddb branch timer_init 
+
+parse_lmp_accepted_hostconn:
+54e7 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+54e8 79207e00 set1 received_conn_req ,pdata 
+54e9 67e083a5 store 1 ,mem_lmp_conn_state 
+54ea 70095b01 jam bt_evt_bb_connected ,mem_fifo_temp 
+54eb 204078dc call ui_ipc_send_event 
+54ec 70007c8b jam lmp_packet_type_table_req ,mem_lmo_opcode2 
+
+parse_lmp_accepted_hostconn_ctn:
+54ed 6fe08055 fetch 1 ,mem_conn_sm 
+54ee c082d3f1 bne conn_sm_wait_conn_accept ,parse_rx_done 
+54ef 70005506 jam conn_sm_auth_pair ,mem_conn_sm 
+54f0 20600000 rtn 
+
+parse_lmp_not_accepted_hostconn:
+54f1 70039e0b jam acl_connection_already_exists ,mem_disconn_reason_send 
+54f2 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+54f3 70005500 jam conn_sm_standby ,mem_conn_sm 
+54f4 2020d3f1 branch parse_rx_done ,true 
+54f5 20600000 rtn 
+
+parse_lmp_accepted_inrand:
+54f6 6fe0c1ca fetch 1 ,mem_link_key_exists 
+54f7 247a0000 nrtn blank 
+54f8 20400c5c call clear_linkkey 
+54f9 2040574b call lmp_generate_key 
+54fa 20748000 rtn master 
+54fb 79200021 set1 mark_slave_in_rand_accepted ,mark 
+54fc 20600000 rtn 
+
+parse_lmp_accepted_enc_mode:
+54fd 24748000 nrtn master 
+54fe 70007c10 jam lmp_encryption_key_size_req ,mem_lmo_opcode2 
+54ff 6fe0804c fetch 1 ,mem_state_map 
+5500 c4010000 rtnbit0 smap_encryption 
+5501 70007c12 jam lmp_stop_encryption_req ,mem_lmo_opcode2 
+5502 20600000 rtn 
+
+parse_lmp_accepted_enc_keysize:
+5503 2020574d branch lmp_start_encryption 
+
+parse_lmp_accepted_start_enc:
+5504 204057a9 call send_create_conn_start_l2cap_timer_sm 
+5505 6fe08030 fetch 1 ,mem_state 
+5506 c3820000 rtnbit1 state_conn_comp 
+5507 70007c31 jam lmp_setup_complete ,mem_lmo_opcode2 
+5508 6fe08055 fetch 1 ,mem_conn_sm 
+5509 c1850000 rtnne conn_sm_encrypt_wait 
+550a 7000550b jam conn_sm_encrypt_wait_clear ,mem_conn_sm 
+550b 20600000 rtn 
+
+parse_lmp_accepted_stop_enc:
+550c 20600000 rtn 
+
+parse_lmp_not_accepted_aurand:
+
+parse_lmp_not_accepted_aurand_send_detach:
+550d 6fe0c09a fetch 1 ,mem_device_option 
+550e 1fe67c08 sub pdata ,dvc_op_mouse ,null 
+550f 2042be57 call mouse_delay_enter_hibernata ,zero 
+5510 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+5511 70039e13 jam other_end_terminated ,mem_disconn_reason_send 
+5512 20600000 rtn 
+
+parse_lmp_not_accepted_inrand:
+5513 6fe080d0 fetch 1 ,mem_rxbuf + 2 
+5514 c0035519 beq key_missing ,parse_lmp_inrand_key_missing 
+5515 c18c0000 rtnne pairing_not_allowed 
+5516 70039e18 jam pairing_not_allowed ,mem_disconn_reason_send 
+5517 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+5518 20600000 rtn 
+
+parse_lmp_inrand_key_missing:
+5519 70039e06 jam key_missing ,mem_disconn_reason_send 
+551a 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+551b 20600000 rtn 
+
+parse_lmp_not_accepted_name_req:
+551c 20600000 rtn 
+
+parse_lmp_not_accepted_simple_pairing_number:
+551d 70087000 jam sp_stat_null ,mem_sp_state 
+551e 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+551f 202053f1 branch parse_rx_done 
+
+parse_lmp_not_accepted_dhkey_check:
+5520 70087000 jam sp_stat_null ,mem_sp_state 
+5521 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+5522 202053f1 branch parse_rx_done 
+
+parse_lmp_not_accepted_unsniff_req:
+5523 70095b24 jam bt_evt_unsniff_not_accept ,mem_fifo_temp 
+5524 202078dc branch ui_ipc_send_event 
+
+parse_lmp_accepted_unsniff_req:
+5525 70095b23 jam bt_evt_unsniff_accept ,mem_fifo_temp 
+5526 204078dc call ui_ipc_send_event 
+5527 20200f12 branch sniff_exit 
+
+parse_lmp_accepted_sniff_req:
+5528 70095b22 jam bt_evt_sniff_accept ,mem_fifo_temp 
+5529 204078dc call ui_ipc_send_event 
+552a 58000000 setarg 0 
+552b 67e10075 store 2 ,mem_dsniff 
+552c 6fe14455 fetch 2 ,mem_sniff_param_interval 
+552d 1fe3fe00 lshift pdata ,pdata 
+552e 67e10032 store 2 ,mem_tsniff 
+552f 6fe0c457 fetch 1 ,mem_sniff_param_attempt 
+5530 67e08073 store 1 ,mem_sniff_attempt 
+5531 6fe0c459 fetch 1 ,mem_sniff_param_timeout 
+5532 67e08074 store 1 ,mem_sniff_timeout 
+5533 20200ef1 branch sniff_init 
+
+parse_lmp_not_acdcept_sniff_req:
+5534 70095b21 jam bt_evt_sniff_not_accept ,mem_fifo_temp 
+5535 202078dc branch ui_ipc_send_event 
+
+parse_lmp_crypt_key:
+5536 684880cf fetcht 1 ,mem_rxbuf + 1 
+5537 18467c06 sub temp ,6 ,null 
+5538 202156ec branch lmp_reject_pdu_not_allowed ,positive 
+5539 60488054 storet 1 ,mem_key_size 
+553a 2020554b branch accept_lmp_msg 
+
+parse_lmp_setup_complete:
+553b 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+553c 79207e02 set1 received_setup_complete ,pdata 
+553d 67e083a5 store 1 ,mem_lmp_conn_state 
+553e c3818000 rtnbit1 sent_setup_complete 
+553f 70007c31 jam lmp_setup_complete ,mem_lmo_opcode2 
+5540 202053f1 branch parse_rx_done 
+
+parse_lmp_max_slot:
+5541 20600000 rtn 
+
+parse_lmp_max_slot_req:
+5542 6fe0c0d7 fetch 1 ,mem_max_slot 
+5543 684880cf fetcht 1 ,mem_rxbuf + 1 
+5544 98467c00 isub temp ,null 
+5545 2021554b branch accept_lmp_msg ,positive 
+5546 70007c04 jam lmp_not_accepted ,mem_lmo_opcode2 
+5547 70007e1f jam unspecified_error ,mem_lmo_reason2 
+5548 70007d2e jam lmp_max_slot_req ,mem_lmi_opcode2 
+5549 20600000 rtn 
+
+parse_lmp_detach:
+554a 202058c0 branch prepare_disconnect 
+
+accept_lmp_msg:
+554b 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+554c 20600000 rtn 
+
+parse_lmp_incr_power:
+554d 70007c21 jam lmp_max_power ,mem_lmo_opcode2 
+554e 20600000 rtn 
+
+parse_lmp_decr_power:
+554f 70007c22 jam lmp_min_power ,mem_lmo_opcode2 
+5550 20600000 rtn 
+
+parse_lmp_version_res:
+5551 6fe08055 fetch 1 ,mem_conn_sm 
+5552 c1098000 rtneq conn_sm_wait_version 
+5553 70005502 jam conn_sm_send_features ,mem_conn_sm 
+5554 20600000 rtn 
+
+parse_lmp_auto_rate:
+5555 20600000 rtn 
+
+parse_lmp_in_rand:
+5556 6fe0c6b9 fetch 1 ,mem_sc_only_mode 
+5557 243a555f nbranch parse_lmp_in_rand_not_accept ,blank 
+5558 20405748 call lmp_copy_rand 
+5559 7003a801 jam pincode_state_wait_pincode ,mem_pincode_state 
+555a 70095b0a jam bt_evt_pincode_req ,mem_fifo_temp 
+555b 204078dc call ui_ipc_send_event 
+555c 20405a76 call tid_check 
+555d 2420d750 nbranch lmp_accept_inrand ,true 
+555e 2434d563 nbranch parse_lmp_inrand_res ,master 
+
+parse_lmp_in_rand_not_accept:
+555f 70007c04 jam lmp_not_accepted ,mem_lmo_opcode2 
+5560 70007d08 jam lmp_in_rand ,mem_lmi_opcode2 
+5561 70007e23 jam transaction_collision ,mem_lmo_reason2 
+5562 20600000 rtn 
+
+parse_lmp_inrand_res:
+5563 6fe0804b fetch 1 ,mem_op 
+5564 79207e02 set1 op_inrand_req ,pdata 
+5565 67e0804b store 1 ,mem_op 
+5566 20600000 rtn 
+
+pop_tid_follow:
+5567 6848804c fetcht 1 ,mem_state_map 
+5568 7d3a0401 nsetflag blank ,smap_lmptid ,temp 
+5569 6048804c storet 1 ,mem_state_map 
+556a 20600000 rtn 
+
+push_tid_follow:
+556b 6fe0807f fetch 1 ,mem_lmo_tid2 
+556c 1fe37e00 rshift pdata ,pdata 
+556d 1fe17e01 and_into 1 ,pdata 
+556e 20600000 rtn 
+
+parse_lmp_au_rand_moudle:
+556f 6fe0c48b fetch 1 ,mem_nv_data_number 
+5570 207a0000 rtn blank 
+5571 6fe08877 fetch 1 ,mem_pairing_auth 
+5572 205a60af call load_device_list ,blank 
+5573 20600000 rtn 
+
+parse_lmp_au_rand:
+5574 2040556f call parse_lmp_au_rand_moudle 
+5575 2040556b call push_tid_follow 
+5576 67e083a9 store 1 ,mem_sres_tid 
+5577 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+5578 c0015581 beq encapsulated_minor_type_p256 ,parse_lmp_au_rand_256 
+5579 20405748 call lmp_copy_rand 
+557a 70007c0c jam lmp_sres ,mem_lmo_opcode2 
+
+parse_lmp_au_rand_common:
+557b 6fe0c1ca fetch 1 ,mem_link_key_exists 
+557c 247a0000 nrtn blank 
+557d 6fe08030 fetch 1 ,mem_state 
+557e c3830000 rtnbit1 state_combkey 
+557f 70007e06 jam key_missing ,mem_lmo_reason2 
+5580 2020543f branch reject_lmp_packet 
+
+parse_lmp_au_rand_256:
+5581 70007c0b jam lmp_au_rand ,mem_lmo_opcode2 
+5582 d8a008f0 arg mem_sp_random_remote ,contw 
+5583 d8c000cf arg mem_rxbuf + 1 ,contr 
+5584 20407d7f call memcpy16 
+5585 2020557b branch parse_lmp_au_rand_common 
+
+parse_lmp_sres:
+5586 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+5587 c0015596 beq encapsulated_minor_type_p256 ,parse_lmp_sres_256 
+5588 da200040 arg mem_plap ,rega 
+5589 20406ba6 call function_e1 
+558a 684a0454 fetcht 4 ,mem_input_store 
+558b 6fe200cf fetch 4 ,mem_rxbuf + 1 
+558c 98467c00 isub temp ,null 
+558d 2022d591 branch authentication_ok ,zero 
+
+authentication_fail:
+558e 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+558f 70039e05 jam authentication_failure_error ,mem_disconn_reason_send 
+5590 20600000 rtn 
+
+authentication_ok:
+5591 20406ca4 call copy_aco 
+5592 2040559f call authentication_ok_common 
+5593 6fe0c767 fetch 1 ,mem_ssp_enable 
+5594 203a5671 branch pairing_success ,blank 
+5595 20600000 rtn 
+
+parse_lmp_sres_256:
+5596 6fe200cf fetch 4 ,mem_rxbuf + 1 
+5597 684a091c fetcht 4 ,mema 
+5598 98467c00 isub temp ,null 
+5599 2022d59b branch authentication_ok_256 ,zero 
+559a 2020558e branch authentication_fail 
+
+authentication_ok_256:
+559b 2040559f call authentication_ok_common 
+559c 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+559d c280d671 bbit1 secure_connections_br_bit ,pairing_success 
+559e 20600000 rtn 
+
+authentication_ok_common:
+559f 204009b4 call linkkey_ready 
+55a0 6fe0804b fetch 1 ,mem_op 
+55a1 2feffe01 isolate1 op_auth_req ,pdata 
+55a2 793ffe01 set0 op_auth_req ,pdata 
+55a3 67e0804b store 1 ,mem_op 
+55a4 6fe08055 fetch 1 ,mem_conn_sm 
+55a5 c00cd5a8 beq conn_sm_auth_wait ,authentication_ok_conn_sm 
+55a6 c00c55a8 beq conn_sm_pairing_wait ,authentication_ok_conn_sm 
+55a7 20600000 rtn 
+
+authentication_ok_conn_sm:
+55a8 6fe08877 fetch 1 ,mem_pairing_auth 
+55a9 c1800000 rtnne defalt_pairing_auth 
+55aa 6fe0804c fetch 1 ,mem_state_map 
+55ab c3810000 rtnbit1 smap_encryption 
+55ac 20205b35 branch host_create_conn_encrypt 
+
+parse_lmp_comb_key:
+55ad da2000cf arg mem_rxbuf + 1 ,rega 
+55ae da400444 arg mem_kinit ,regb 
+55af d8a00424 arg mem_random_number ,contw 
+55b0 20406c70 call xor16 
+55b1 da200040 arg mem_plap ,rega 
+55b2 20405a94 call generate_linkkey 
+55b3 70007c0b jam lmp_au_rand ,mem_lmo_opcode2 
+55b4 6fe08030 fetch 1 ,mem_state 
+55b5 c303574b bbit0 state_combkey ,lmp_generate_key 
+55b6 20600000 rtn 
+
+parse_lmp_name_res:
+55b7 6fe100ae fetch 2 ,mem_len 
+55b8 1fe0f3fd add pdata ,-3 ,loopcnt 
+55b9 684880cf fetcht 1 ,mem_rxbuf + 1 
+55ba 58000a01 setarg mem_tmp_buffer 
+55bb 98408a00 iadd temp ,contw 
+55bc d8c000d1 arg mem_rxbuf + 3 ,contr 
+55bd 20407dd4 call memcpy 
+55be 68488053 fetcht 1 ,mem_name_offset 
+55bf 6fe080d0 fetch 1 ,mem_rxbuf + 2 
+55c0 98467e00 isub temp ,pdata 
+55c1 1fe67c0e sub pdata ,14 ,null 
+55c2 202155c7 branch parse_lmp_name_res_end ,positive 
+55c3 1840fe0e add temp ,14 ,pdata 
+55c4 67e08053 store 1 ,mem_name_offset 
+55c5 70007c01 jam lmp_name_req ,mem_lmo_opcode2 
+55c6 20600000 rtn 
+
+parse_lmp_name_res_end:
+55c7 6fe0804c fetch 1 ,mem_state_map 
+55c8 79207e03 set1 smap_name_res ,pdata 
+55c9 67e0804c store 1 ,mem_state_map 
+55ca c2825755 bbit1 smap_name_req ,lmp_disconnect 
+55cb 20600000 rtn 
+
+parse_lmp_name_req:
+55cc 6fe080cf fetch 1 ,mem_rxbuf + 1 
+55cd 67e0807d store 1 ,mem_lmi_opcode2 
+55ce 70007c02 jam lmp_name_res ,mem_lmo_opcode2 
+55cf 20600000 rtn 
+
+parse_lmp_conn_req:
+55d0 2020554b branch accept_lmp_msg 
+
+parse_lmp_timing_accuracy_req:
+55d1 70007c30 jam lmp_timing_accuracy_res ,mem_lmo_opcode2 
+55d2 20600000 rtn 
+
+parse_lmp_features_req:
+55d3 70007c28 jam lmp_features_res ,mem_lmo_opcode2 
+55d4 20600000 rtn 
+
+parse_lmp_version_req:
+55d5 70007c26 jam lmp_version_res ,mem_lmo_opcode2 
+55d6 20600000 rtn 
+
+parse_lmp_supervision_timeout:
+55d7 20600000 rtn 
+
+parse_lmp_sniff_subrating_req:
+55d8 6fe10032 fetch 2 ,mem_tsniff 
+55d9 98000400 iforce temp 
+55da 6fe080d0 fetch 1 ,mem_rxbuf + 2 
+55db 67e08092 store 1 ,mem_subsniff_rate 
+55dc 984f8400 imul32 temp ,temp 
+55dd 6fe100d1 fetch 2 ,mem_rxbuf + 3 
+55de 1fe3fe00 lshift pdata ,pdata 
+55df 67e10093 store 2 ,mem_subsniff_tcmax 
+55e0 6fe200d3 fetch 4 ,mem_rxbuf + 5 
+55e1 1fe3fe00 lshift pdata ,pdata 
+55e2 67e2008e store 4 ,mem_subsniff_instant 
+55e3 18427e00 deposit temp 
+55e4 67e10095 store 2 ,mem_subsniff_tsniff 
+55e5 20600000 rtn 
+
+parse_lmpext_packet_type_table_req:
+55e6 6848c15f fetcht 1 ,mem_ptt 
+55e7 6fe080d0 fetch 1 ,mem_rxbuf + 2 
+55e8 9842fc00 ixor temp ,null 
+55e9 2422d466 nbranch reject_unknown_ext_packet ,zero 
+55ea 2feffe00 isolate1 0 ,pdata 
+55eb 6fe0804c fetch 1 ,mem_state_map 
+55ec 7920fe05 setflag true ,smap_edr ,pdata 
+55ed 67e0804c store 1 ,mem_state_map 
+55ee 70007c81 jam lmp_ext_accepted ,mem_lmo_opcode2 
+55ef 70007d8b jam lmp_packet_type_table_req ,mem_lmi_opcode2 
+55f0 20600000 rtn 
+
+parse_lmp_sniff_subrating_res:
+
+parse_lmp_preferred_rate:
+
+parse_lmp_max_power:
+
+parse_lmp_min_power:
+55f1 20600000 rtn 
+
+parse_lmp_page_mode_req:
+55f2 2020554b branch accept_lmp_msg 
+
+parse_lmp_page_scan_mode_req:
+55f3 2020554b branch accept_lmp_msg 
+
+parse_lmp_slot_offset:
+55f4 6fe100cf fetch 2 ,mem_rxbuf + 1 
+55f5 67e100c0 store 2 ,mem_slot_offset 
+55f6 20600000 rtn 
+
+parse_lmp_sniff_req_check_sniff_para:
+55f7 6fe100d2 fetch 2 ,mem_rxbuf + 4 
+55f8 6848c177 fetcht 1 ,mem_lpm_mult 
+55f9 984ffe00 imul32 temp ,pdata 
+55fa d8400640 arg 0x640 ,temp 
+55fb 98467c00 isub temp ,null 
+55fc 20600000 rtn 
+
+parse_lmp_sniff_req:
+55fd 6fe100d4 fetch 2 ,mem_rxbuf + 6 
+55fe 203a56ec branch lmp_reject_pdu_not_allowed ,blank 
+55ff 204055f7 call parse_lmp_sniff_req_check_sniff_para 
+5600 202156ec branch lmp_reject_pdu_not_allowed ,positive 
+5601 6fe0c09a fetch 1 ,mem_device_option 
+5602 1fe67c0a sub pdata ,dvc_op_module ,null 
+5603 2042bc4c call module_set_lpm_mult_2 ,zero 
+5604 6fe08030 fetch 1 ,mem_state 
+5605 c280d6ec bbit1 state_insniff ,lmp_reject_pdu_not_allowed 
+5606 6fe100d0 fetch 2 ,mem_rxbuf + 2 
+5607 1fe3fe00 lshift pdata ,pdata 
+5608 67e10075 store 2 ,mem_dsniff 
+5609 6fe100d2 fetch 2 ,mem_rxbuf + 4 
+560a 1fe3fe00 lshift pdata ,pdata 
+560b 67e10032 store 2 ,mem_tsniff 
+560c 6fe100d4 fetch 2 ,mem_rxbuf + 6 
+560d 67e08073 store 1 ,mem_sniff_attempt 
+560e 98000400 iforce temp 
+560f 6fe100d6 fetch 2 ,mem_rxbuf + 8 
+5610 67e08074 store 1 ,mem_sniff_timeout 
+5611 98467c00 isub temp ,null 
+5612 24215614 nbranch set_big_value_to_attempt ,positive 
+5613 67e08073 store 1 ,mem_sniff_attempt 
+
+set_big_value_to_attempt:
+5614 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+5615 70007d17 jam lmp_sniff_req ,mem_lmi_opcode2 
+5616 20600000 rtn 
+
+parse_lmp_start_encryption_req:
+5617 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+5618 c001561d beq encapsulated_minor_type_p256 ,parse_lmp_start_encryption_req_256 
+5619 2040554b call accept_lmp_msg 
+561a 20405748 call lmp_copy_rand 
+561b 20406ba9 call function_e3 
+561c 20200ee1 branch start_encryption 
+
+parse_lmp_start_encryption_req_256:
+561d 2040554b call accept_lmp_msg 
+561e 20400ee1 call start_encryption 
+
+calc_kc:
+561f 20407537 call function_h3 
+5620 d8a00062 arg mem_kc ,contw 
+5621 d8c00910 arg mem_sp_calc_result_high ,contr 
+5622 df200010 arg 0x10 ,loopcnt 
+5623 20207ed9 branch reverse_byte 
+
+parse_lmp_stop_encryption_req:
+5624 2040554b call accept_lmp_msg 
+5625 20200eeb branch stop_encryption 
+
+parse_lmp_switch_req:
+5626 6fe200cf fetch 4 ,mem_rxbuf + 1 
+5627 1fe3fe00 lshift pdata ,pdata 
+5628 2034d630 branch parse_lmp_switch_accept ,master 
+5629 6848c1ca fetcht 1 ,mem_link_key_exists 
+562a 243a562d nbranch parse_lmp_switch_req_clear_mark ,blank 
+
+parse_lmp_switch_req_not_accept:
+562b 70007d13 jam lmp_switch_req ,mem_lmi_opcode2 
+562c 202056ec branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_switch_req_clear_mark:
+562d 70007c34 jam lmp_slot_offset ,mem_lmo_opcode2 
+562e 70005500 jam 0 ,mem_conn_sm 
+562f 202009db branch role_switch_prepare 
+
+parse_lmp_switch_accept:
+5630 204009db call role_switch_prepare 
+5631 79200022 set1 mark_reconn_recieve_switch ,mark 
+5632 6fe080bc fetch 1 ,mem_connection_options 
+5633 793ffe02 set0 connection_switch ,pdata 
+5634 67e080bc store 1 ,mem_connection_options 
+5635 2020554b branch accept_lmp_msg 
+
+parse_lmp_temp_rand:
+
+parse_lmp_temp_key:
+
+parse_lmp_timing_accuracy_res:
+
+parse_lmp_unit_key:
+
+parse_lmp_use_semi_permanend_key:
+5636 20600000 rtn 
+
+parse_lmp_unsniff_req:
+5637 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+5638 70007d18 jam lmp_unsniff_req ,mem_lmi_opcode2 
+5639 70095b2e jam bt_evt_remote_unsniff ,mem_fifo_temp 
+563a 204078dc call ui_ipc_send_event 
+563b 20200f12 branch sniff_exit 
+
+parse_lmp_encapsulated_header:
+563c 70087900 jam 0 ,mem_sp_remote_key_recv_count 
+563d 6fe080cf fetch 1 ,mem_rxbuf + 1 
+563e 67e0c647 store 1 ,mem_encapsulated_major_type 
+563f c080d6ec bne encapsulated_major_type ,lmp_reject_pdu_not_allowed 
+5640 684880d0 fetcht 1 ,mem_rxbuf + 2 
+5641 6048c648 storet 1 ,mem_encapsulated_minor_type 
+5642 6fe0c6b9 fetch 1 ,mem_sc_only_mode 
+5643 203a5646 branch parse_lmp_encapsulated_header2 ,blank 
+5644 18467c02 sub temp ,encapsulated_minor_type_p256 ,null 
+5645 2422d58e nbranch authentication_fail ,zero 
+
+parse_lmp_encapsulated_header2:
+5646 6fe080d1 fetch 1 ,mem_rxbuf + 3 
+5647 c020564a beq encapsulated_len_p256 ,parse_lmp_encapsulated_header3 
+5648 c018564a beq encapsulated_len_p192 ,parse_lmp_encapsulated_header3 
+5649 202056ec branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_encapsulated_header3:
+564a 67e0c649 store 1 ,mem_encapsulated_len 
+564b 20405a7f call check_localsm 
+564c 2020d64e branch parse_lmp_encapsulated_header_master ,true 
+564d 70087001 jam sp_stat_key_recv ,mem_sp_state 
+
+parse_lmp_encapsulated_header_master:
+564e 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+564f 70007d3d jam lmp_encapsulated_header ,mem_lmi_opcode2 
+5650 202053f1 branch parse_rx_done 
+
+parse_lmp_accepted_encapsulated_header:
+5651 70007c3e jam lmp_encapsulated_payload ,mem_lmo_opcode2 
+5652 20600000 rtn 
+
+parse_lmp_accepted_simple_pairing_number:
+5653 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+5654 c000d65a beq ssp_mode_ssp_pin_flag ,parse_lmp_accepted_simple_pairing_number_ssp_pin 
+5655 c001565e beq ssp_mode_passkey_entry_flag ,parse_lmp_accepted_simple_pairing_number_passkey 
+
+parse_lmp_accepted_simple_pairing_number_common:
+5656 20405a7f call check_localsm 
+5657 20608000 rtn true 
+5658 70087008 jam sp_stat_confirm_recv ,mem_sp_state 
+5659 20600000 rtn 
+
+parse_lmp_accepted_simple_pairing_number_ssp_pin:
+565a 2040735d call g_noninit_number_confirm 
+565b 70095b35 jam bt_evt_bt_gkey_generate ,mem_fifo_temp 
+565c 204078dc call ui_ipc_send_event 
+565d 20205656 branch parse_lmp_accepted_simple_pairing_number_common 
+
+parse_lmp_accepted_simple_pairing_number_passkey:
+565e 20405a7f call check_localsm 
+565f 20608000 rtn true 
+5660 6fe0c770 fetch 1 ,mem_authentication_passkey_times 
+5661 c009d66e beq 19 ,authentication_passkey_end 
+5662 1fe0fe01 increase 1 ,pdata 
+5663 67e0c770 store 1 ,mem_authentication_passkey_times 
+
+authentication_passkey:
+5664 70087201 jam sp_flag_commit ,mem_sp_flag 
+5665 70087004 jam sp_stat_commit_calc ,mem_sp_state 
+5666 6fe0c770 fetch 1 ,mem_authentication_passkey_times 
+5667 1fe20e00 copy pdata ,queue 
+5668 6fe34797 fetch 6 ,mem_pin 
+5669 afefffff qisolate1 pdata 
+566a 58000080 setarg 0x80 
+566b 7920fe00 setflag true ,0 ,pdata 
+566c 67e0c771 store 1 ,mem_passkey_1bit 
+566d 20600000 rtn 
+
+authentication_passkey_end:
+566e 70087008 jam sp_stat_confirm_recv ,mem_sp_state 
+566f 20600000 rtn 
+
+parse_lmp_accepted_dhkey_check:
+5670 20405676 call parse_lmp_accepted_dhkey_check_common 
+
+pairing_success:
+5671 6fe0c772 fetch 1 ,mem_flag_pairing_state 
+5672 207a0000 rtn blank 
+5673 70477200 jam flag_pairing_state_not_pairing ,mem_flag_pairing_state 
+5674 70095b38 jam bt_evt_bt_pairing_success ,mem_fifo_temp 
+5675 202078dc branch ui_ipc_send_event 
+
+parse_lmp_accepted_dhkey_check_common:
+5676 20405a7f call check_localsm 
+5677 2440f367 ncall g_noninit_192 ,true 
+5678 2040f377 call g_init_192 ,true 
+5679 20405a7f call check_localsm 
+567a 20608000 rtn true 
+567b 7008700c jam sp_stat_link_key_calc ,mem_sp_state 
+567c 70087201 jam sp_flag_commit ,mem_sp_flag 
+567d 20600000 rtn 
+
+parse_simple_pairing_confirm:
+567e d8a00930 arg mem_sp_confirm_remote ,contw 
+567f d8c000cf arg mem_rxbuf + 1 ,contr 
+5680 20407d7f call memcpy16 
+5681 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+5682 c1010000 rtneq ssp_mode_passkey_entry_flag 
+5683 202070d3 branch master_set_mem_master_sp_flag 
+5684 20600000 rtn 
+
+parse_lmp_encapsulated_payload:
+5685 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+5686 c000d69b beq encapsulated_minor_type_p192 ,parse_lmp_encapsulated_payload_192 
+5687 c0015689 beq encapsulated_minor_type_p256 ,parse_lmp_encapsulated_payload_256 
+5688 202056ec branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_encapsulated_payload_256:
+5689 6fe08871 fetch 1 ,mem_master_sp_state 
+568a c003d68d beq sp_stat_random_send ,parse_encapsulated_payload_256_master 
+568b 6fe08870 fetch 1 ,mem_sp_state 
+568c c080d6ec bne sp_stat_key_recv ,lmp_reject_pdu_not_allowed 
+
+parse_encapsulated_payload_256_master:
+568d 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+568e 1fe60a30 sub pdata ,0x30 ,contw 
+568f 242156ec nbranch lmp_reject_pdu_not_allowed ,positive 
+5690 d8a00880 arg mem_le_pubkey_remote_x_256 ,contw 
+5691 98a08a00 iadd contw ,contw 
+5692 6fe400cf fetch 8 ,mem_rxbuf + 1 
+5693 e7e40005 istore 8 ,contw 
+5694 6fe400d7 fetch 8 ,mem_rxbuf + 9 
+5695 e7e40005 istore 8 ,contw 
+5696 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+5697 1fe0fe10 increase 16 ,pdata 
+5698 67e08879 store 1 ,mem_sp_remote_key_recv_count 
+5699 c0a0554b bne encapsulated_len_p256 ,accept_lmp_msg 
+569a 202056ac branch parse_lmp_encapsulated_payload_completed 
+
+parse_lmp_encapsulated_payload_192:
+569b 6fe08871 fetch 1 ,mem_master_sp_state 
+569c c003d69f beq sp_stat_random_send ,parse_encapsulated_payload_192_master 
+569d 6fe08870 fetch 1 ,mem_sp_state 
+569e c080d6ec bne sp_stat_key_recv ,lmp_reject_pdu_not_allowed 
+
+parse_encapsulated_payload_192_master:
+569f 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+56a0 1fe60a20 sub pdata ,0x20 ,contw 
+56a1 242156ec nbranch lmp_reject_pdu_not_allowed ,positive 
+56a2 d8a00888 arg mem_sp_pubkey_remote ,contw 
+56a3 98a08a00 iadd contw ,contw 
+56a4 6fe400cf fetch 8 ,mem_rxbuf + 1 
+56a5 e7e40005 istore 8 ,contw 
+56a6 6fe400d7 fetch 8 ,mem_rxbuf + 9 
+56a7 e7e40005 istore 8 ,contw 
+56a8 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+56a9 1fe0fe10 increase 16 ,pdata 
+56aa 67e08879 store 1 ,mem_sp_remote_key_recv_count 
+56ab c098554b bne encapsulated_len_p192 ,accept_lmp_msg 
+
+parse_lmp_encapsulated_payload_completed:
+56ac 20405a7f call check_localsm 
+56ad 2020d54b branch accept_lmp_msg ,true 
+56ae 70087a01 jam sp_key_valid ,mem_sp_remote_key_invalid 
+56af 70087002 jam sp_stat_key_generate ,mem_sp_state 
+56b0 70087201 jam sp_flag_commit ,mem_sp_flag 
+56b1 2020554b branch accept_lmp_msg 
+
+parse_lmp_accepted_encapsulated_payload:
+56b2 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+56b3 c000d6b6 beq encapsulated_minor_type_p192 ,parse_lmp_accepted_encapsulated_payload_192 
+56b4 c00156ba beq encapsulated_minor_type_p256 ,parse_lmp_accepted_encapsulated_payload_256 
+56b5 20600000 rtn 
+
+parse_lmp_accepted_encapsulated_payload_192:
+56b6 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+56b7 c01856be beq encapsulated_len_p192 ,parse_lmp_encapsulated_payload_all_accepted 
+56b8 70007c3e jam lmp_encapsulated_payload ,mem_lmo_opcode2 
+56b9 20600000 rtn 
+
+parse_lmp_accepted_encapsulated_payload_256:
+56ba 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+56bb c02056be beq encapsulated_len_p256 ,parse_lmp_encapsulated_payload_all_accepted 
+56bc 70007c3e jam lmp_encapsulated_payload ,mem_lmo_opcode2 
+56bd 20600000 rtn 
+
+parse_lmp_encapsulated_payload_all_accepted:
+56be 20405a7f call check_localsm 
+56bf 2020d6c7 branch parse_lmp_encapsulated_payload_all_accepted_master ,true 
+56c0 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+56c1 c00156c5 beq ssp_mode_passkey_entry_flag ,parse_lmp_encapsulated_payload_all_accepted_get_passkey 
+56c2 70087201 jam sp_flag_commit ,mem_sp_flag 
+56c3 70087004 jam sp_stat_commit_calc ,mem_sp_state 
+56c4 202053f1 branch parse_rx_done 
+
+parse_lmp_encapsulated_payload_all_accepted_get_passkey:
+56c5 70095b36 jam bt_evt_bt_get_passkey ,mem_fifo_temp 
+56c6 202078dc branch ui_ipc_send_event 
+
+parse_lmp_encapsulated_payload_all_accepted_master:
+56c7 202053f1 branch parse_rx_done 
+
+parse_lmp_simple_pairing_number:
+56c8 6fe08871 fetch 1 ,mem_master_sp_state 
+56c9 c003d6cc beq sp_stat_random_send ,parse_lmp_simple_pairing_number_master 
+56ca 6fe08870 fetch 1 ,mem_sp_state 
+56cb c08356ec bne sp_stat_random_recv ,lmp_reject_pdu_not_allowed 
+
+parse_lmp_simple_pairing_number_master:
+56cc d8a008f0 arg mem_sp_random_remote ,contw 
+56cd 6fe400cf fetch 8 ,mem_rxbuf + 1 
+56ce e7e40005 istore 8 ,contw 
+56cf 6fe400d7 fetch 8 ,mem_rxbuf + 9 
+56d0 e7e40005 istore 8 ,contw 
+56d1 20405a7f call check_localsm 
+56d2 2020d6d6 branch parse_lmp_simple_pairing_number_master0 ,true 
+56d3 70087007 jam sp_stat_random_send ,mem_sp_state 
+56d4 70087201 jam sp_flag_commit ,mem_sp_flag 
+56d5 2020554b branch accept_lmp_msg 
+
+parse_lmp_simple_pairing_number_master0:
+56d6 70087104 jam sp_stat_commit_calc ,mem_master_sp_state 
+56d7 202070d3 branch master_set_mem_master_sp_flag 
+56d8 202056ec branch lmp_reject_pdu_not_allowed 
+
+parse_dhkey_check:
+56d9 6fe08871 fetch 1 ,mem_master_sp_state 
+56da c005d6dd beq sp_stat_confirm_send ,parse_dhkey_check_master 
+56db 6fe08870 fetch 1 ,mem_sp_state 
+56dc c08456ec bne sp_stat_confirm_recv ,lmp_reject_pdu_not_allowed 
+
+parse_dhkey_check_master:
+56dd d8a00920 arg mem_sp_check_result ,contw 
+56de d8c000cf arg mem_rxbuf + 1 ,contr 
+56df 20407d7f call memcpy16 
+56e0 20405a7f call check_localsm 
+56e1 2020d6e9 branch parse_dhkey_check_master0 ,true 
+56e2 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+56e3 c000d6ee beq ssp_mode_ssp_pin_flag ,number_comparison_mode 
+
+number_comparison_successed:
+56e4 70476e00 jam 0 ,mem_flag_mode_ssp_pin 
+56e5 70087009 jam sp_stat_confirm_check ,mem_sp_state 
+56e6 70087201 jam sp_flag_commit ,mem_sp_flag 
+56e7 70007d41 jam lmp_dhkey_check ,mem_lmi_opcode2 
+56e8 202053f1 branch parse_rx_done 
+
+parse_dhkey_check_master0:
+56e9 70087109 jam sp_stat_confirm_check ,mem_master_sp_state 
+56ea 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+56eb 202053f1 branch parse_rx_done 
+
+lmp_reject_pdu_not_allowed:
+56ec 70007e24 jam pdu_not_allowed ,mem_lmo_reason2 
+56ed 2020543f branch reject_lmp_packet 
+
+number_comparison_mode:
+56ee 6fe0c76e fetch 1 ,mem_flag_mode_ssp_pin 
+56ef c283d6f3 bbit1 flag_mode_ssp_pin_reviceve_comparison_bit ,comparison_result 
+56f0 79207e06 set1 flag_mode_ssp_pin_recieve_dhkey_bit ,pdata 
+56f1 67e0c76e store 1 ,mem_flag_mode_ssp_pin 
+56f2 20600000 rtn 
+
+comparison_result:
+56f3 c28056e4 bbit1 flag_mode_ssp_pin_comparison_result_bit ,number_comparison_successed 
+56f4 70476e00 jam 0 ,mem_flag_mode_ssp_pin 
+56f5 202056ec branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_clkoffset_res:
+56f6 202053f1 branch parse_rx_done 
+
+parse_lmp_encryption_mode_req:
+56f7 6fe080bc fetch 1 ,mem_connection_options 
+56f8 793ffe01 set0 connection_encrypt ,pdata 
+56f9 67e080bc store 1 ,mem_connection_options 
+56fa 2040554b call accept_lmp_msg 
+56fb 24748000 nrtn master 
+56fc 6fe080cf fetch 1 ,mem_rxbuf + 1 
+56fd 6848804b fetcht 1 ,mem_op 
+56fe 793a0404 setflag blank ,op_stop_enc ,temp 
+56ff 7d3a0405 nsetflag blank ,op_start_enc ,temp 
+5700 6048804b storet 1 ,mem_op 
+5701 20600000 rtn 
+
+parse_lmp_features_res:
+5702 684c00cf fetcht 8 ,mem_rxbuf + 1 
+
+parse_lmp_features_res_not_hci:
+5703 6fe08055 fetch 1 ,mem_conn_sm 
+5704 c1818000 rtnne conn_sm_wait_features_res 
+5705 6fe080bc fetch 1 ,mem_connection_options 
+5706 c3025709 bbit0 connection_feature_ext ,parse_lmp_send_conn 
+5707 70005514 jam conn_sm_send_features_ext ,mem_conn_sm 
+5708 20600000 rtn 
+
+parse_lmp_send_conn:
+5709 70005504 jam conn_sm_send_conn_req ,mem_conn_sm 
+570a 20600000 rtn 
+
+parse_lmp_test_activate:
+570b 6fe080e3 fetch 1 ,mem_debug_config 
+570c 67e08a5b store 1 ,mem_test_mode_old_debug_config 
+570d 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+570e 70007d38 jam lmp_test_activate ,mem_lmi_opcode2 
+570f 20600000 rtn 
+
+parse_lmp_test_control:
+5710 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+5711 70007d39 jam lmp_test_control ,mem_lmi_opcode2 
+5712 18007209 force 9 ,loopcnt 
+5713 d8c000cf arg mem_rxbuf + 1 ,contr 
+5714 d8a00a52 arg mem_temp_payload ,contw 
+
+parse_lmp_test_xor:
+5715 efe08006 ifetch 1 ,contr 
+5716 1fe2fe55 xor_into 0x55 ,pdata 
+5717 e7e08005 istore 1 ,contw 
+5718 c2005715 loop parse_lmp_test_xor 
+5719 6fe08a52 fetch 1 ,test_mode_scenario 
+571a 68488a51 fetcht 1 ,mem_tester_emulate 
+571b 793f8407 set0 tester_no_whitening ,temp 
+571c 793f8404 set0 tester_pattern_test ,temp 
+571d c07fd729 beq exit_test_mode ,parse_lmp_test_control_exit 
+571e c0005742 beq pause_test_mode ,parse_lmp_test_control_pause 
+571f c002d736 beq closed_loop_back_acl ,parse_lmp_test_control_loopback 
+5720 c003d735 beq acl_without_whitening ,parse_lmp_test_control_loopback_nowhite 
+5721 c0035736 beq closed_loop_back_sco ,parse_lmp_test_control_loopback 
+5722 c0045735 beq sco_without_whitening ,parse_lmp_test_control_loopback_nowhite 
+5723 c000d72e beq zero_pattern ,parse_lmp_test_control_pattern 
+5724 c001572e beq one_pattern ,parse_lmp_test_control_pattern 
+5725 c001d72e beq alt_pattern ,parse_lmp_test_control_pattern 
+5726 c004d72e beq alt2_pattern ,parse_lmp_test_control_pattern 
+5727 c002572e beq pseudorandom ,parse_lmp_test_control_pattern 
+5728 20600000 rtn 
+
+parse_lmp_test_control_exit:
+5729 6fe08a51 fetch 1 ,mem_tester_emulate 
+572a 79207e03 set1 tester_exit ,pdata 
+572b 79207e02 set1 tester_change ,pdata 
+572c 67e08a51 store 1 ,mem_tester_emulate 
+572d 20600000 rtn 
+
+parse_lmp_test_control_pattern:
+572e 79200404 set1 tester_pattern_test ,temp 
+572f 7000e405 jam 5 ,mem_lch_code 
+5730 6fe10a59 fetch 2 ,test_mode_data_length 
+5731 98007200 iforce loopcnt 
+5732 67e100ae store 2 ,mem_len 
+5733 d8a000ce arg mem_rxbuf ,contw 
+5734 20407e48 call pn9 
+
+parse_lmp_test_control_loopback_nowhite:
+5735 79200407 set1 tester_no_whitening ,temp 
+
+parse_lmp_test_control_loopback:
+5736 79200402 set1 tester_change ,temp 
+5737 18007e00 force 0 ,pdata 
+5738 67e0800b store 1 ,mem_slave_rcvcnt 
+5739 67e109fa store 2 ,mem_tst_pktcnt_crc 
+573a 67e109fc store 2 ,mem_tst_pktcnt_dmh 
+573b 67e109f8 store 2 ,mem_tst_pktcnt_hec 
+573c 67e109f6 store 2 ,mem_tst_pktcnt_sync 
+573d 6fe08a53 fetch 1 ,test_mode_hopping_mode 
+573e 2fe1fe00 compare fixed_freq ,pdata ,0xff 
+573f 79208406 setflag true ,tester_fixed_freq ,temp 
+5740 60488a51 storet 1 ,mem_tester_emulate 
+5741 20600000 rtn 
+
+parse_lmp_test_control_pause:
+5742 793f8011 set0 mark_testmode ,mark 
+5743 700a5100 jam 0 ,mem_tester_emulate 
+5744 6fe080e3 fetch 1 ,mem_debug_config 
+5745 793ffe06 set0 debug_tx_pattern ,pdata 
+5746 67e080e3 store 1 ,mem_debug_config 
+5747 20600000 rtn 
+
+lmp_copy_rand:
+5748 d8c000cf arg mem_rxbuf + 1 ,contr 
+5749 d8a00424 arg mem_random_number ,contw 
+574a 20207d7f branch memcpy16 
+
+lmp_generate_key:
+574b 70007c09 jam lmp_comb_key ,mem_lmo_opcode2 
+574c 20600000 rtn 
+
+lmp_start_encryption:
+574d 24748000 nrtn master 
+574e 70007c11 jam lmp_start_encryption_req ,mem_lmo_opcode2 
+574f 20600000 rtn 
+
+lmp_accept_inrand:
+5750 da2040a8 arg mem_lap ,rega 
+5751 20406b73 call generate_kinit 
+5752 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+5753 70007d08 jam lmp_in_rand ,mem_lmi_opcode2 
+5754 20600000 rtn 
+
+lmp_disconnect:
+5755 7000720a jam 10 ,mem_conn_timer 
+5756 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+5757 70039e16 jam local_host ,mem_disconn_reason_send 
+5758 20600000 rtn 
+
+send_lmp:
+5759 470cc023 bpatchx patch23_1 ,mem_patch23 
+575a 78547c00 disable user 
+575b 20405a44 call lmo_fifo_process 
+575c 6fe08048 fetch 1 ,mem_lmp_to_send 
+575d 207a0000 rtn blank 
+575e c283d78e bbit1 7 ,send_lmp_escape 
+
+send_lmp0:
+575f c000d8d8 beq lmp_name_req ,send_lmp_name_req 
+5760 c0015859 beq lmp_name_res ,send_lmp_name_res 
+5761 c001d79a beq lmp_accepted ,send_lmp_accepted 
+5762 c00257b0 beq lmp_not_accepted ,send_lmp_not_accepted 
+5763 c013d944 beq lmp_features_req ,send_lmp_features_req 
+5764 c014587d beq lmp_features_res ,send_lmp_features_res 
+5765 c0185869 beq lmp_timing_accuracy_res ,send_lmp_timing_accuracy_res 
+5766 c012d93f beq lmp_version_req ,send_lmp_version_req 
+5767 c0135878 beq lmp_version_res ,send_lmp_version_res 
+5768 c018d92c beq lmp_setup_complete ,send_lmp_setup_complete 
+5769 c01bd8d3 beq lmp_supervision_timeout ,send_lmp_superto 
+576a c019d8c5 beq lmp_host_connection_req ,send_lmp_no_payload 
+576b c00459c6 beq lmp_in_rand ,send_lmp_inrand 
+576c c004d9bc beq lmp_comb_key ,send_lmp_comb_key 
+576d c005d9d1 beq lmp_au_rand ,send_lmp_aurand 
+576e c00659de beq lmp_sres ,send_lmp_sres 
+576f c007d8cb beq lmp_encryption_mode_req ,send_lmp_encryption_mode_req 
+5770 c0085a14 beq lmp_encryption_key_size_req ,send_lmp_encryption_key_size_req 
+5771 c008da0a beq lmp_start_encryption_req ,send_lmp_start_encryption 
+5772 c003d8bb beq lmp_detach ,send_lmp_detach 
+5773 c01558e7 beq lmp_quality_of_service_req ,send_lmp_quality_of_service_req 
+5774 c00558e8 beq lmp_unit_key ,send_lmp_unit_key 
+5775 c00fd925 beq lmp_incr_power_req ,send_lmp_inc_power 
+5776 c003586e beq lmp_clkoffset_res ,send_lmp_clkoffset_res 
+5777 c010d8c8 beq lmp_max_power ,send_lmp_nopayload_reply 
+5778 c016d91b beq lmp_max_slot ,send_lmp_max_slot 
+5779 c0175920 beq lmp_max_slot_req ,send_lmp_max_slot_req 
+577a c01158c8 beq lmp_min_power ,send_lmp_nopayload_reply 
+577b c01a58e9 beq lmp_slot_offset ,send_lmp_slot_offset 
+577c c009d8fe beq lmp_switch_req ,send_lmp_switch_req 
+577d c00bd90d beq lmp_sniff_req ,send_lmp_sniff_req 
+577e c0095a11 beq lmp_stop_encryption_req ,send_lmp_stop_encryption_req 
+577f c017d913 beq lmp_timing_accuracy_req ,send_lmp_timing_accuracy_req 
+5780 c00c5918 beq lmp_unsniff_req ,send_lmp_unsniff_req 
+5781 c01ed967 beq lmp_encapsulated_header ,send_lmp_encapsulated_header 
+5782 c01f596f beq lmp_encapsulated_payload ,send_lmp_encapsulated_payload 
+5783 c01fd98a beq lmp_simple_pairing_confirm ,send_lmp_simple_pairing_comfirm 
+5784 c0205994 beq lmp_simple_pairing_number ,send_lmp_simple_pairing_number 
+5785 c020d9a9 beq lmp_dhkey_check ,send_lmp_dhkey_check 
+5786 c011d9b8 beq lmp_auto_rate ,send_lmp_auto_rate 
+5787 c01dd9b3 beq lmp_enc_key_size_mask_res ,send_lmp_enc_key_size_mask_res 
+5788 c002d9b9 beq lmp_clkoffset_req ,send_lmp_clkoffset_req 
+5789 c014d9ba beq lmp_quality_of_service ,send_lmp_quality_of_service 
+578a c01c59bb beq lmp_test_activate ,send_lmp_test_activate 
+578b c01cd8de beq lmp_test_control ,send_lmp_test_control 
+
+send_lmp_error:
+578c 2020137c branch assert 
+578d 20600000 rtn 
+
+send_lmp_escape:
+578e c040d7bd beq lmp_ext_accepted ,send_lmpext_accepted 
+578f c041d882 beq lmp_ext_features_req ,send_lmpext_features_req 
+5790 c04257ec beq lmp_ext_features_res ,send_lmpext_features_res 
+5791 c04157c6 beq lmp_not_accepted_ext ,send_lmpext_not_accepted 
+5792 c045d88f beq lmp_packet_type_table_req ,send_lmpext_packet_type_table_req 
+5793 c04bd8b7 beq lmp_pause_encryption_req ,send_lmpext_pause_encryption_req 
+5794 c04cd84a beq lmp_io_cap_req ,send_lmp_io_cap_req 
+5795 c04d5819 beq lmp_io_cap_res ,send_lmpext_io_cap_res 
+5796 c04ad84f beq lmp_sniff_subrating_req ,send_lmpext_sniff_subrating_req 
+5797 c04b5850 beq lmp_sniff_subrating_res ,send_lmpext_sniff_subrating_res 
+5798 c05157e9 beq lmp_ping_res ,send_lmpext_ping_res 
+5799 2020137c branch assert 
+
+send_lmp_accepted:
+579a 18007e02 force 2 ,pdata 
+579b 20405a1a call msg_send_lmp 
+579c 6fe08049 fetch 1 ,mem_lmi_opcode 
+579d e7e08005 istore 1 ,contw 
+579e 20405a29 call send_lmp_follow 
+579f 470d4023 bpatchx patch23_2 ,mem_patch23 
+57a0 6fe08049 fetch 1 ,mem_lmi_opcode 
+57a1 c00457d0 beq lmp_in_rand ,send_lmp_accepted_inrand 
+57a2 c007d7d4 beq lmp_encryption_mode_req ,send_lmp_accepted_enc_mode 
+57a3 c00857df beq lmp_encryption_key_size_req ,send_lmp_accepted_enc_key 
+57a4 c00bd7af beq lmp_sniff_req ,send_lmp_accept_sniff_req 
+57a5 c019d7e2 beq lmp_host_connection_req ,send_lmp_accepted_connection 
+57a6 c020d7e8 beq lmp_dhkey_check ,send_lmp_accept_dhkey_check 
+57a7 c008d7a9 beq lmp_start_encryption_req ,send_create_conn_start_l2cap_timer_sm 
+57a8 20600000 rtn 
+
+send_create_conn_start_l2cap_timer_sm:
+57a9 6fe08055 fetch 1 ,mem_conn_sm 
+57aa 207a0000 rtn blank 
+57ab 7000551b jam conn_sm_wait_done ,mem_conn_sm 
+57ac 5800000c setarg timer_enpt_waite 
+57ad d8e00007 arg enpt_delay_timer ,queue 
+57ae 20207ddb branch timer_init 
+
+send_lmp_accept_sniff_req:
+57af 20200ef1 branch sniff_init 
+
+send_lmp_not_accepted:
+57b0 18007e03 force 3 ,pdata 
+57b1 20405a1a call msg_send_lmp 
+57b2 6fe08049 fetch 1 ,mem_lmi_opcode 
+57b3 c005d7b8 beq lmp_au_rand ,send_not_accept_aurand 
+57b4 e7e08005 istore 1 ,contw 
+57b5 6fe0804a fetch 1 ,mem_lmo_reason 
+57b6 e7e08005 istore 1 ,contw 
+57b7 20205a29 branch send_lmp_follow 
+
+send_not_accept_aurand:
+57b8 e7e08005 istore 1 ,contw 
+57b9 6fe0804a fetch 1 ,mem_lmo_reason 
+57ba e7e08005 istore 1 ,contw 
+57bb d84003a9 arg mem_sres_tid ,temp 
+57bc 20205a65 branch special_tid_store 
+
+send_lmpext_accepted:
+57bd 18000e04 force 4 ,queue 
+57be 20405a22 call send_lmpext 
+57bf 5800007f setarg lmp_escape 
+57c0 e7e08005 istore 1 ,contw 
+57c1 6fe08049 fetch 1 ,mem_lmi_opcode 
+57c2 793ffe07 set0 7 ,pdata 
+57c3 e7e08005 istore 1 ,contw 
+57c4 6fe08049 fetch 1 ,mem_lmi_opcode 
+57c5 20205a29 branch send_lmp_follow 
+
+send_lmpext_not_accepted:
+57c6 18000e05 force 5 ,queue 
+57c7 20405a22 call send_lmpext 
+57c8 5800007f setarg lmp_escape 
+57c9 e7e08005 istore 1 ,contw 
+57ca 6fe08049 fetch 1 ,mem_lmi_opcode 
+57cb 793ffe07 set0 7 ,pdata 
+57cc e7e08005 istore 1 ,contw 
+57cd 6fe0804a fetch 1 ,mem_lmo_reason 
+57ce e7e08005 istore 1 ,contw 
+57cf 20205a29 branch send_lmp_follow 
+
+send_lmp_accepted_inrand:
+57d0 20400c5c call clear_linkkey 
+57d1 20405a76 call tid_check 
+57d2 20608000 rtn true 
+57d3 2020574b branch lmp_generate_key 
+
+send_lmp_accepted_enc_mode:
+57d4 6fe0804b fetch 1 ,mem_op 
+57d5 c282d7db bbit1 op_start_enc ,send_lmp_accepted_enc_start 
+57d6 c4020000 rtnbit0 op_stop_enc 
+57d7 70007c12 jam lmp_stop_encryption_req ,mem_lmo_opcode2 
+57d8 793ffe04 set0 op_stop_enc ,pdata 
+57d9 20405a6e call tid_reply 
+57da 202057dd branch send_lmp_accepted_enc_exit 
+
+send_lmp_accepted_enc_start:
+57db 70007c10 jam lmp_encryption_key_size_req ,mem_lmo_opcode2 
+57dc 793ffe05 set0 op_start_enc ,pdata 
+
+send_lmp_accepted_enc_exit:
+57dd 67e0804b store 1 ,mem_op 
+57de 20600000 rtn 
+
+send_lmp_accepted_enc_key:
+57df 20405a7f call check_localsm 
+57e0 2020d74d branch lmp_start_encryption ,true 
+57e1 20600000 rtn 
+
+send_lmp_accepted_connection:
+57e2 70007c8b jam lmp_packet_type_table_req ,mem_lmo_opcode2 
+57e3 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+57e4 79207e00 set1 received_conn_req ,pdata 
+57e5 67e083a5 store 1 ,mem_lmp_conn_state 
+57e6 70095b01 jam bt_evt_bb_connected ,mem_fifo_temp 
+57e7 202078dc branch ui_ipc_send_event 
+
+send_lmp_accept_dhkey_check:
+57e8 20600000 rtn 
+
+send_lmpext_ping_res:
+57e9 18000e02 force 2 ,queue 
+57ea 20405a22 call send_lmpext 
+57eb 20205a32 branch send_lmp_reply 
+
+send_lmpext_features_res:
+57ec 1fe22200 copy pdata ,rega 
+57ed 20405802 call check_ssp_enable 
+57ee 6fe083a1 fetch 1 ,mem_ext_features_page 
+57ef c000d7f2 beq 1 ,send_lmpext_features_res1 
+57f0 c00157fa beq 2 ,send_lmpext_features_res2 
+57f1 20600000 rtn 
+
+send_lmpext_features_res1:
+57f2 1a227e00 copy rega ,pdata 
+57f3 18000e0c force 12 ,queue 
+57f4 20405a22 call send_lmpext 
+57f5 58000001 setarg 0x01 
+57f6 e7e08005 istore 1 ,contw 
+57f7 6fe103a2 fetch 2 ,mem_lmpext_ssp_enable 
+57f8 e7e48005 istore 9 ,contw 
+57f9 20205a32 branch send_lmp_reply 
+
+send_lmpext_features_res2:
+57fa 1a227e00 copy rega ,pdata 
+57fb 18000e0c force 12 ,queue 
+57fc 20405a22 call send_lmpext 
+57fd 58000002 setarg 0x02 
+57fe e7e08005 istore 1 ,contw 
+57ff 58010002 setarg 0x010002 
+5800 e7e48005 istore 9 ,contw 
+5801 20205a32 branch send_lmp_reply 
+
+check_ssp_enable:
+5802 6fe0c767 fetch 1 ,mem_ssp_enable 
+5803 203a5806 branch ssp_disable ,blank 
+5804 2040580c call ssp_enable 
+5805 20205813 branch check_br_sc_enable 
+
+ssp_disable:
+5806 6fe0c0a6 fetch 1 ,mem_features + 6 
+5807 793ffe03 set0 param_featrue_ssp ,pdata 
+5808 67e0c0a6 store 1 ,mem_features + 6 
+5809 58000001 setarg 0x1 
+580a 67e103a2 store 2 ,mem_lmpext_ssp_enable 
+580b 20206f37 branch sp_clear_flags 
+
+ssp_enable:
+580c 470dc023 bpatchx patch23_3 ,mem_patch23 
+580d 6fe0c0a6 fetch 1 ,mem_features + 6 
+580e 79207e03 set1 param_featrue_ssp ,pdata 
+580f 67e0c0a6 store 1 ,mem_features + 6 
+5810 58000101 setarg param_lmpext_ssp_enable 
+5811 67e103a2 store 2 ,mem_lmpext_ssp_enable 
+5812 20600000 rtn 
+
+check_br_sc_enable:
+5813 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+5814 c280d816 bbit1 secure_connections_br_bit ,br_sc_enable 
+5815 20600000 rtn 
+
+br_sc_enable:
+5816 58000902 setarg 0x0902 
+5817 67e103a2 store 2 ,mem_lmpext_ssp_enable 
+5818 20600000 rtn 
+
+send_lmpext_io_cap_res:
+5819 18000e05 force 5 ,queue 
+581a 20405a22 call send_lmpext 
+581b 6fe1c768 fetch 3 ,mem_lmp_io_cap_payload_iocap 
+581c e7e18005 istore 3 ,contw 
+581d 20405a32 call send_lmp_reply 
+581e 70477201 jam flag_pairing_state_pairing ,mem_flag_pairing_state 
+581f 6fe0c768 fetch 1 ,mem_lmp_io_cap_payload_iocap 
+5820 c000d82a beq io_capability_display_yesno ,responder_iocap_display_yesno 
+5821 c0015824 beq io_capability_keyboard_only ,responder_iocap_keyboard_only 
+5822 c001d830 beq io_capability_no_input_no_output ,responder_iocap_no_input_no_output 
+5823 20600000 rtn 
+
+responder_iocap_keyboard_only:
+5824 6fe0c76b fetch 1 ,mem_sp_iocap_remote 
+5825 c000583c beq io_capability_display_only ,responder_iocap_keyboard_only_initiator_iocap_display_only 
+5826 c000d83c beq io_capability_display_yesno ,responder_iocap_keyboard_only_initiator_iocap_display_yesno 
+5827 c001583c beq io_capability_keyboard_only ,responder_iocap_keyboard_only_initiator_iocap_keyboard_only 
+5828 c001d836 beq io_capability_no_input_no_output ,responder_iocap_keyboard_only_initiator_iocap_no_input_no_output 
+5829 20600000 rtn 
+
+responder_iocap_display_yesno:
+582a 6fe0c76b fetch 1 ,mem_sp_iocap_remote 
+582b c0005836 beq io_capability_display_only ,responder_iocap_display_yesno_initiator_iocap_display_only 
+582c c000d83a beq io_capability_display_yesno ,responder_iocap_display_yesno_initiator_iocap_display_yesno 
+582d c001583c beq io_capability_keyboard_only ,responder_iocap_display_yesno_initiator_iocap_keyboard_only 
+582e c001d836 beq io_capability_no_input_no_output ,responder_iocap_display_yesno_initiator_iocap_no_input_no_output 
+582f 20600000 rtn 
+
+responder_iocap_no_input_no_output:
+5830 6fe0c76b fetch 1 ,mem_sp_iocap_remote 
+5831 c0005836 beq io_capability_display_only ,responder_iocap_no_input_no_output_initiator_iocap_display_only 
+5832 c000d836 beq io_capability_display_yesno ,responder_iocap_no_input_no_output_initiator_iocap_display_yesno 
+5833 c0015836 beq io_capability_keyboard_only ,responder_iocap_no_input_no_output_initiator_iocap_keyboard_only 
+5834 c001d836 beq io_capability_no_input_no_output ,responder_iocap_no_input_no_output_initiator_iocap_no_input_no_output 
+5835 20600000 rtn 
+
+responder_iocap_keyboard_only_initiator_iocap_no_input_no_output:
+
+responder_iocap_display_yesno_initiator_iocap_no_input_no_output:
+
+responder_iocap_display_yesno_initiator_iocap_display_only:
+
+responder_iocap_no_input_no_output_initiator_iocap_display_only:
+
+responder_iocap_no_input_no_output_initiator_iocap_display_yesno:
+
+responder_iocap_no_input_no_output_initiator_iocap_keyboard_only:
+
+responder_iocap_no_input_no_output_initiator_iocap_no_input_no_output:
+
+set_ssp_mode_justwork:
+5836 70476f03 jam ssp_mode_just_work_flag ,mem_ssp_mode_flag 
+5837 6fe0c646 fetch 1 ,mem_classic_bt_flag 
+5838 c2803268 bbit1 flag_ssp_reject_justwork ,app_bt_disconnect 
+5839 20600000 rtn 
+
+responder_iocap_display_yesno_initiator_iocap_display_yesno:
+
+set_ssp_mode_numeric_comparison:
+583a 70476f01 jam ssp_mode_ssp_pin_flag ,mem_ssp_mode_flag 
+583b 20600000 rtn 
+
+responder_iocap_keyboard_only_initiator_iocap_display_yesno:
+
+responder_iocap_keyboard_only_initiator_iocap_keyboard_only:
+
+responder_iocap_keyboard_only_initiator_iocap_display_only:
+
+responder_iocap_display_yesno_initiator_iocap_keyboard_only:
+
+set_ssp_mode_passkey:
+583c 70476f02 jam ssp_mode_passkey_entry_flag ,mem_ssp_mode_flag 
+583d 20600000 rtn 
+
+classic_bt_set_reject_justwork_flag:
+583e d8e00000 arg flag_ssp_reject_justwork ,queue 
+583f 20205842 branch classic_bluetooth_set_flag 
+
+classic_bt_clr_reject_justwork_flag:
+5840 d8e00000 arg flag_ssp_reject_justwork ,queue 
+5841 20205846 branch classic_bluetooth_clr_flag 
+
+classic_bluetooth_set_flag:
+5842 6fe0c646 fetch 1 ,mem_classic_bt_flag 
+5843 f9207e00 qset1 pdata 
+5844 67e0c646 store 1 ,mem_classic_bt_flag 
+5845 20600000 rtn 
+
+classic_bluetooth_clr_flag:
+5846 6fe0c646 fetch 1 ,mem_classic_bt_flag 
+5847 f93ffe00 qset0 pdata 
+5848 67e0c646 store 1 ,mem_classic_bt_flag 
+5849 20600000 rtn 
+
+send_lmp_io_cap_req:
+584a 18000e05 force 5 ,queue 
+584b 20405a22 call send_lmpext 
+584c 6fe1c768 fetch 3 ,mem_lmp_io_cap_payload_iocap 
+584d e7e18005 istore 3 ,contw 
+584e 20205a34 branch send_lmp_request 
+
+send_lmpext_sniff_subrating_req:
+584f 20600000 rtn 
+
+send_lmpext_sniff_subrating_res:
+5850 18000e09 force 9 ,queue 
+5851 20405a22 call send_lmpext 
+5852 6fe08092 fetch 1 ,mem_subsniff_rate 
+5853 e7e08005 istore 1 ,contw 
+5854 6fe10093 fetch 2 ,mem_subsniff_tcmax 
+5855 e7e10005 istore 2 ,contw 
+5856 6fe2008e fetch 4 ,mem_subsniff_instant 
+5857 e7e20005 istore 4 ,contw 
+5858 20205a32 branch send_lmp_reply 
+
+send_lmp_name_res:
+5859 18007e11 force 17 ,pdata 
+585a 20405a1a call msg_send_lmp 
+585b 6fe08049 fetch 1 ,mem_lmi_opcode 
+585c 1fe20400 copy pdata ,temp 
+585d c0005861 beq 0x00 ,send_lmp_name_res_offset_ok 
+585e c0075861 beq 0x0e ,send_lmp_name_res_offset_ok 
+585f c00e5861 beq 0x1c ,send_lmp_name_res_offset_ok 
+5860 20600000 rtn 
+
+send_lmp_name_res_offset_ok:
+5861 e7e08005 istore 1 ,contw 
+5862 6fe0c5ff fetch 1 ,mem_local_name_length 
+5863 e7e08005 istore 1 ,contw 
+5864 df20000e arg 14 ,loopcnt 
+5865 58004600 setarg mem_local_name 
+5866 98408c00 iadd temp ,contr 
+5867 20407dd4 call memcpy 
+5868 20205a32 branch send_lmp_reply 
+
+send_lmp_timing_accuracy_res:
+5869 18007e03 force 3 ,pdata 
+586a 20405a1a call msg_send_lmp 
+586b 58000114 setarg 0x0114 
+586c e7e10005 istore 2 ,contw 
+586d 20205a32 branch send_lmp_reply 
+
+send_lmp_clkoffset_res:
+586e 18007e03 force 3 ,pdata 
+586f 20405a1a call msg_send_lmp 
+5870 6fe200b4 fetch 4 ,mem_clke_bt 
+5871 9c467e00 isub clkn_bt ,pdata 
+5872 2034d874 branch send_lmp_clkoffset_res_master ,master 
+5873 1fe67e00 sub pdata ,0 ,pdata 
+
+send_lmp_clkoffset_res_master:
+5874 1feb7e00 rshift2 pdata ,pdata 
+5875 793ffe0f set0 15 ,pdata 
+5876 e7e10005 istore 2 ,contw 
+5877 20205a32 branch send_lmp_reply 
+
+send_lmp_version_res:
+5878 18007e06 force 6 ,pdata 
+5879 20405a1a call msg_send_lmp 
+587a 6fe2c5fa fetch 5 ,mem_lmp_version 
+587b e7e28005 istore 5 ,contw 
+587c 20205a32 branch send_lmp_reply 
+
+send_lmp_features_res:
+587d 18007e09 force 9 ,pdata 
+587e 20405a1a call msg_send_lmp 
+587f 6fe440a0 fetch 8 ,mem_features 
+5880 e7e40005 istore 8 ,contw 
+5881 20205a32 branch send_lmp_reply 
+
+send_lmpext_features_req:
+5882 20405802 call check_ssp_enable 
+5883 6fe08048 fetch 1 ,mem_lmp_to_send 
+5884 18000e0c force 12 ,queue 
+5885 20405a22 call send_lmpext 
+5886 58000001 setarg 0x01 
+5887 e7e08005 istore 1 ,contw 
+5888 6fe103a2 fetch 2 ,mem_lmpext_ssp_enable 
+5889 e7e10005 istore 2 ,contw 
+588a 58000000 setarg 0 
+588b e7e18005 istore 3 ,contw 
+588c 58000000 setarg 0x00 
+588d e7e20005 istore 4 ,contw 
+588e 20205a34 branch send_lmp_request 
+
+send_lmpext_packet_type_table_req:
+588f 18000e03 force 3 ,queue 
+5890 20405a22 call send_lmpext 
+5891 6fe0c15f fetch 1 ,mem_ptt 
+5892 e7e08005 istore 1 ,contw 
+5893 78547c00 disable user 
+5894 20405a34 call send_lmp_request 
+5895 24740000 nrtn user 
+5896 24748000 nrtn master 
+5897 6fe0c0df fetch 1 ,mem_afh_cfg 
+5898 c4000000 rtnbit0 afh_cfg_on 
+5899 2040589b call afh_init 
+589a 202058a5 branch afh_open_all_channels 
+
+afh_init:
+589b 7040df03 jam 0x3 ,mem_afh_cfg 
+589c 58000000 setarg 0 
+589d 67e24149 store 4 ,mem_afh_timer 
+589e d8a040e1 arg mem_afh_map_lo ,contw 
+589f 204058a9 call afh_reset_map 
+58a0 d8a040ee arg mem_afh_map_new ,contw 
+58a1 204058a9 call afh_reset_map 
+58a2 d8a0414d arg mem_afh_classify_channel_map ,contw 
+58a3 204058a9 call afh_reset_map 
+58a4 202058b0 branch afh_clear_error_counter 
+
+afh_open_all_channels:
+58a5 d8a040ee arg mem_afh_map_new ,contw 
+58a6 204058a9 call afh_reset_map 
+58a7 204058b0 call afh_clear_error_counter 
+58a8 202058b3 branch afh_set_send_flag 
+
+afh_reset_map:
+58a9 58ffffff setarg 0xffffff 
+58aa e7e18005 istore 3 ,contw 
+58ab e7e18005 istore 3 ,contw 
+58ac e7e18005 istore 3 ,contw 
+58ad 5800007f setarg 0x7f 
+58ae e7e08005 istore 1 ,contw 
+58af 20600000 rtn 
+
+afh_clear_error_counter:
+58b0 58000000 setarg 0 
+58b1 67e140dd store 2 ,mem_afh_error_total 
+58b2 20600000 rtn 
+
+afh_set_send_flag:
+58b3 6fe0c0df fetch 1 ,mem_afh_cfg 
+58b4 79207e02 set1 send_lmp_set_afh ,pdata 
+58b5 67e0c0df store 1 ,mem_afh_cfg 
+58b6 20600000 rtn 
+
+send_lmpext_pause_encryption_req:
+58b7 18000e02 force 2 ,queue 
+58b8 20405a22 call send_lmpext 
+58b9 2434da32 nbranch send_lmp_reply ,master 
+58ba 20205a34 branch send_lmp_request 
+
+send_lmp_detach:
+58bb 18007e02 force 2 ,pdata 
+58bc 20405a1a call msg_send_lmp 
+58bd 6fe0839e fetch 1 ,mem_disconn_reason_send 
+58be e7e08005 istore 1 ,contw 
+58bf 20405a34 call send_lmp_request 
+
+prepare_disconnect:
+58c0 6fe0804b fetch 1 ,mem_op 
+58c1 79207e03 set1 op_disconn ,pdata 
+58c2 67e0804b store 1 ,mem_op 
+58c3 70007232 jam 50 ,mem_conn_timer 
+58c4 20600000 rtn 
+
+send_lmp_no_payload:
+58c5 18007e01 force 1 ,pdata 
+58c6 20405a1a call msg_send_lmp 
+58c7 20205a34 branch send_lmp_request 
+
+send_lmp_nopayload_reply:
+58c8 18007e01 force 1 ,pdata 
+58c9 20405a1a call msg_send_lmp 
+58ca 20205a32 branch send_lmp_reply 
+
+send_lmp_encryption_mode_req:
+58cb 18007e02 force 2 ,pdata 
+58cc 20405a1a call msg_send_lmp 
+58cd 6fe0804c fetch 1 ,mem_state_map 
+58ce 2fec0002 isolate0 smap_encryption ,pdata 
+58cf 7920fe00 setflag true ,0 ,pdata 
+58d0 1fe17e01 and_into 1 ,pdata 
+58d1 e7e08005 istore 1 ,contw 
+58d2 20205a34 branch send_lmp_request 
+
+send_lmp_superto:
+58d3 18007e03 force 3 ,pdata 
+58d4 20405a1a call msg_send_lmp 
+58d5 6fe10051 fetch 2 ,mem_supervision_to 
+58d6 e7e10005 istore 2 ,contw 
+58d7 20205a34 branch send_lmp_request 
+
+send_lmp_name_req:
+58d8 700072fa jam 250 ,mem_conn_timer 
+58d9 18007e02 force 2 ,pdata 
+58da 20405a1a call msg_send_lmp 
+58db 6fe08053 fetch 1 ,mem_name_offset 
+58dc e7e08005 istore 1 ,contw 
+58dd 20205a34 branch send_lmp_request 
+
+send_lmp_test_control:
+58de 18007e0a force 10 ,pdata 
+58df 20405a1a call msg_send_lmp 
+58e0 d8c00a52 arg mem_temp_payload ,contr 
+58e1 18007209 force 9 ,loopcnt 
+
+send_lmp_test_control_loop:
+58e2 efe08006 ifetch 1 ,contr 
+58e3 1fe2fe55 xor_into 0x55 ,pdata 
+58e4 e7e08005 istore 1 ,contw 
+58e5 c20058e2 loop send_lmp_test_control_loop 
+58e6 20205a34 branch send_lmp_request 
+
+send_lmp_quality_of_service_req:
+58e7 20205a34 branch send_lmp_request 
+
+send_lmp_unit_key:
+58e8 20205a34 branch send_lmp_request 
+
+send_lmp_slot_offset:
+58e9 20748000 rtn master 
+58ea 2040104a call calc_slot_offset 
+58eb 18007e09 force 9 ,pdata 
+58ec 20405a1a call msg_send_lmp 
+58ed 6fe100c0 fetch 2 ,mem_slot_offset 
+58ee e7e10005 istore 2 ,contw 
+58ef 6fe1c0a8 fetch 3 ,mem_lap 
+58f0 e7e18005 istore 3 ,contw 
+58f1 6fe0c0ab fetch 1 ,mem_uap 
+58f2 e7e08005 istore 1 ,contw 
+58f3 6fe140ac fetch 2 ,mem_nap 
+58f4 e7e10005 istore 2 ,contw 
+58f5 c581d8fa bmark0 mark_switch_initiated ,send_lmp_slot_offset_reply 
+58f6 793f8003 set0 mark_switch_initiated ,mark 
+58f7 20405a34 call send_lmp_request 
+58f8 70007c13 jam lmp_switch_req ,mem_lmo_opcode2 
+58f9 20600000 rtn 
+
+send_lmp_slot_offset_reply:
+58fa 20405a32 call send_lmp_reply 
+58fb 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+58fc 70007d13 jam lmp_switch_req ,mem_lmi_opcode2 
+58fd 20600000 rtn 
+
+send_lmp_switch_req:
+58fe d8400200 arg 0x200 ,temp 
+58ff 2034d902 branch switch_on_native ,master 
+5900 1d027e00 deposit clke_bt 
+5901 20205903 branch switch_slack 
+
+switch_on_native:
+5902 1c427e00 deposit clkn_bt 
+
+switch_slack:
+5903 1c227e00 deposit bt_clk 
+5904 9840fe00 iadd temp ,pdata 
+5905 1fe17ffc and_into 0x1fc ,pdata 
+5906 67e20034 store 4 ,mem_sniff_anchor 
+5907 18007e05 force 5 ,pdata 
+5908 20405a1a call msg_send_lmp 
+5909 6fe20034 fetch 4 ,mem_sniff_anchor 
+590a 1fe37e00 rshift pdata ,pdata 
+590b e7e20005 istore 4 ,contw 
+590c 20205a34 branch send_lmp_request 
+
+send_lmp_sniff_req:
+590d 18007e0a force 10 ,pdata 
+590e 20405a1a call msg_send_lmp 
+590f d8c003ac arg mem_sniff_payload ,contr 
+5910 efe48006 ifetch 9 ,contr 
+5911 e7e48005 istore 9 ,contw 
+5912 20205a34 branch send_lmp_request 
+
+send_lmp_timing_accuracy_req:
+5913 18007e03 force 3 ,pdata 
+5914 20405a1a call msg_send_lmp 
+5915 58000114 setarg 0x0114 
+5916 e7e10005 istore 2 ,contw 
+5917 20205a34 branch send_lmp_request 
+
+send_lmp_unsniff_req:
+5918 18007e01 force 1 ,pdata 
+5919 20405a1a call msg_send_lmp 
+591a 20205a34 branch send_lmp_request 
+
+send_lmp_max_slot:
+591b 18007e02 force 2 ,pdata 
+591c 20405a1a call msg_send_lmp 
+591d 6fe0c0d7 fetch 1 ,mem_max_slot 
+591e e7e08005 istore 1 ,contw 
+591f 20205a34 branch send_lmp_request 
+
+send_lmp_max_slot_req:
+5920 18007e02 force 2 ,pdata 
+5921 20405a1a call msg_send_lmp 
+5922 58000005 setarg 0x05 
+5923 e7e08005 istore 1 ,contw 
+5924 20205a34 branch send_lmp_request 
+
+send_lmp_inc_power:
+5925 18007e02 force 2 ,pdata 
+5926 20405a1a call msg_send_lmp 
+5927 58000000 setarg 0x00 
+5928 e7e08005 istore 1 ,contw 
+5929 20205a34 branch send_lmp_request 
+
+send_lmp_setup_complete_by_module:
+592a 70007c2e jam lmp_max_slot_req ,mem_lmo_opcode2 
+592b 20600000 rtn 
+
+send_lmp_setup_complete:
+592c 6fe0c09a fetch 1 ,mem_device_option 
+592d 1fe67c0a sub pdata ,dvc_op_module ,null 
+592e 2042d92a call send_lmp_setup_complete_by_module ,zero 
+592f 6fe08030 fetch 1 ,mem_state 
+5930 79207e04 set1 state_conn_comp ,pdata 
+5931 67e08030 store 1 ,mem_state 
+5932 1c427e00 copy clkn_bt ,pdata 
+5933 67e203bc store 4 ,mem_aurand_send_delay_time 
+5934 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5935 c281d93d bbit1 sent_setup_complete ,send_lmp_setup_complete_has_sent 
+5936 79207e03 set1 sent_setup_complete ,pdata 
+5937 67e083a5 store 1 ,mem_lmp_conn_state 
+5938 70095b05 jam bt_evt_setup_complete ,mem_fifo_temp 
+5939 204078dc call ui_ipc_send_event 
+593a 18007e01 force 1 ,pdata 
+593b 20405a1a call msg_send_lmp 
+593c 20205a34 branch send_lmp_request 
+
+send_lmp_setup_complete_has_sent:
+593d 70004800 jam 0 ,mem_lmp_to_send 
+593e 20600000 rtn 
+
+send_lmp_version_req:
+593f 18007e06 force 6 ,pdata 
+5940 20405a1a call msg_send_lmp 
+5941 6fe2c5fa fetch 5 ,mem_lmp_version 
+5942 e7e28005 istore 5 ,contw 
+5943 20205a34 branch send_lmp_request 
+
+send_lmp_features_req:
+5944 18007e09 force 9 ,pdata 
+5945 20405a1a call msg_send_lmp 
+5946 6fe440a0 fetch 8 ,mem_features 
+5947 e7e40005 istore 8 ,contw 
+5948 20205a34 branch send_lmp_request 
+
+sp_master_send_io_cap_get:
+5949 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+594a 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+594b c1808000 rtnne sp_key_valid 
+594c 70087113 jam sp_master_stat_start_done ,mem_master_sp_state 
+594d 20600000 rtn 
+
+sp_master_send_io_cap_send:
+594e 20405a72 call tid_initiate 
+594f 70007c99 jam lmp_io_cap_req ,mem_lmo_opcode2 
+5950 70087103 jam sp_stat_key_send ,mem_master_sp_state 
+5951 20600000 rtn 
+
+sp_master_send_lmp_encapsulated_header:
+5952 20405a72 call tid_initiate 
+5953 70007c3d jam lmp_encapsulated_header ,mem_lmo_opcode2 
+5954 70087107 jam sp_stat_random_send ,mem_master_sp_state 
+5955 20600000 rtn 
+
+sp_master_commitment_compare:
+5956 da200910 arg mem_sp_calc_result_high ,rega 
+5957 da400930 arg mem_sp_confirm_remote ,regb 
+5958 df200010 arg 16 ,loopcnt 
+5959 20407e66 call string_compare 
+595a 2022d95f branch sp_master_commitment_compare_success ,zero 
+595b 70087100 jam sp_stat_null ,mem_master_sp_state 
+595c 204070d5 call master_clear_mem_master_sp_flag 
+595d 70007d40 jam lmp_simple_pairing_number ,mem_lmi_opcode2 
+595e 202056ec branch lmp_reject_pdu_not_allowed 
+
+sp_master_commitment_compare_success:
+595f 7008710a jam sp_stat_confirm_calc ,mem_master_sp_state 
+5960 204070d3 call master_set_mem_master_sp_flag 
+5961 70007d40 jam lmp_simple_pairing_number ,mem_lmi_opcode2 
+5962 2020554b branch accept_lmp_msg 
+
+sp_master_send_lmp_simple_pairing_number:
+5963 70007c40 jam lmp_simple_pairing_number ,mem_lmo_opcode2 
+5964 20600000 rtn 
+
+sp_send_lmp_encapsulated_header:
+5965 70007c3d jam lmp_encapsulated_header ,mem_lmo_opcode2 
+5966 20600000 rtn 
+
+send_lmp_encapsulated_header:
+5967 70087800 jam 0 ,mem_sp_local_key_send_count 
+5968 18007e04 force 4 ,pdata 
+5969 20405a1a call msg_send_lmp 
+596a 6fe1c647 fetch 3 ,mem_encapsulated_major_type 
+596b e7e18005 istore 3 ,contw 
+596c 20405a7f call check_localsm 
+596d 2020da34 branch send_lmp_request ,true 
+596e 20205a32 branch send_lmp_reply 
+
+send_lmp_encapsulated_payload:
+596f 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+5970 c0015973 beq encapsulated_minor_type_p256 ,send_lmp_encapsulated_payload_256 
+5971 c000d978 beq encapsulated_minor_type_p192 ,send_lmp_encapsulated_payload_192 
+5972 20600000 rtn 
+
+send_lmp_encapsulated_payload_256:
+5973 18007e11 force 17 ,pdata 
+5974 20405a1a call msg_send_lmp 
+5975 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+5976 d8c046df arg mem_sc_pubkey_local_x_256 ,contr 
+5977 2020597c branch send_lmp_encapsulated_payload_common 
+
+send_lmp_encapsulated_payload_192:
+5978 18007e11 force 17 ,pdata 
+5979 20405a1a call msg_send_lmp 
+597a 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+597b d8c04737 arg mem_sp_pubkey_local ,contr 
+
+send_lmp_encapsulated_payload_common:
+597c 98c08c00 iadd contr ,contr 
+597d efe40006 ifetch 8 ,contr 
+597e e7e40005 istore 8 ,contw 
+597f efe40006 ifetch 8 ,contr 
+5980 e7e40005 istore 8 ,contw 
+5981 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+5982 1fe0fe10 increase 16 ,pdata 
+5983 67e08878 store 1 ,mem_sp_local_key_send_count 
+5984 20405a7f call check_localsm 
+5985 2020da34 branch send_lmp_request ,true 
+5986 20205a32 branch send_lmp_reply 
+
+sp_send_lmp_simple_pairing_comfirm:
+5987 70087006 jam sp_stat_random_recv ,mem_sp_state 
+5988 70007c3f jam lmp_simple_pairing_confirm ,mem_lmo_opcode2 
+5989 20600000 rtn 
+
+send_lmp_simple_pairing_comfirm:
+598a 18007e11 force 17 ,pdata 
+598b 20405a1a call msg_send_lmp 
+598c d8c00910 arg mem_sp_calc_result_high ,contr 
+598d efe40006 ifetch 8 ,contr 
+598e e7e40005 istore 8 ,contw 
+598f efe40006 ifetch 8 ,contr 
+5990 e7e40005 istore 8 ,contw 
+5991 20205a32 branch send_lmp_reply 
+
+sp_send_lmp_simple_pairing_number:
+5992 70007c40 jam lmp_simple_pairing_number ,mem_lmo_opcode2 
+5993 20600000 rtn 
+
+send_lmp_simple_pairing_number:
+5994 20405a7f call check_localsm 
+5995 2040efe9 call sp_local_random_key_generator ,true 
+5996 18007e11 force 17 ,pdata 
+5997 20405a1a call msg_send_lmp 
+5998 d8c008e0 arg mem_sp_random_local ,contr 
+5999 efe40006 ifetch 8 ,contr 
+599a e7e40005 istore 8 ,contw 
+599b efe40006 ifetch 8 ,contr 
+599c e7e40005 istore 8 ,contw 
+599d 20405a7f call check_localsm 
+599e 2420da32 nbranch send_lmp_reply ,true 
+599f 2020da34 branch send_lmp_request ,true 
+
+master_sp_sm_end:
+59a0 7008710f jam sp_stat_done ,mem_master_sp_state 
+
+sp_aurand_send:
+59a1 20405a72 call tid_initiate 
+59a2 70007c0b jam lmp_au_rand ,mem_lmo_opcode2 
+59a3 20405a8a call check_localsm_master 
+59a4 2020f037 branch sp_master_key_prarm_push ,true 
+59a5 20207041 branch sp_link_key_prarm_push 
+
+master_sp_send_lmp_dhkey_check:
+59a6 20405a6e call tid_reply 
+
+sp_send_lmp_dhkey_check:
+59a7 70007c41 jam lmp_dhkey_check ,mem_lmo_opcode2 
+59a8 20600000 rtn 
+
+send_lmp_dhkey_check:
+59a9 18007e11 force 17 ,pdata 
+59aa 20405a1a call msg_send_lmp 
+59ab d8c00910 arg mem_sp_calc_result_high ,contr 
+59ac efe40006 ifetch 8 ,contr 
+59ad e7e40005 istore 8 ,contw 
+59ae efe40006 ifetch 8 ,contr 
+59af e7e40005 istore 8 ,contw 
+59b0 20405a7f call check_localsm 
+59b1 2420da32 nbranch send_lmp_reply ,true 
+59b2 2020da34 branch send_lmp_request ,true 
+
+send_lmp_enc_key_size_mask_res:
+59b3 18007e03 force 3 ,pdata 
+59b4 20405a1a call msg_send_lmp 
+59b5 5800fffe setarg 0xfffe 
+59b6 e7e10005 istore 2 ,contw 
+59b7 20205a32 branch send_lmp_reply 
+
+send_lmp_auto_rate:
+59b8 20205a34 branch send_lmp_request 
+
+send_lmp_clkoffset_req:
+59b9 20205a34 branch send_lmp_request 
+
+send_lmp_quality_of_service:
+59ba 20205a34 branch send_lmp_request 
+
+send_lmp_test_activate:
+59bb 20205a34 branch send_lmp_request 
+
+send_lmp_comb_key:
+59bc 20405a8e call generate_random_number 
+59bd da2040a8 arg mem_lap ,rega 
+59be 20405a94 call generate_linkkey 
+59bf 18007e11 force 17 ,pdata 
+59c0 20405a1a call msg_send_lmp 
+59c1 da200444 arg mem_kinit ,rega 
+59c2 da400424 arg mem_random_number ,regb 
+59c3 20406c70 call xor16 
+59c4 2434da29 nbranch send_lmp_follow ,master 
+59c5 20205a2f branch send_lmp_tid 
+
+send_lmp_inrand:
+59c6 20405a8e call generate_random_number 
+59c7 da200040 arg mem_plap ,rega 
+59c8 20406b73 call generate_kinit 
+
+send_lmp_rand:
+59c9 18007e11 force 17 ,pdata 
+59ca 20405a1a call msg_send_lmp 
+59cb d8c00424 arg mem_random_number ,contr 
+59cc 20407d7f call memcpy16 
+59cd 6fe08055 fetch 1 ,mem_conn_sm 
+59ce c00cda34 beq conn_sm_auth_wait ,send_lmp_request 
+59cf c00c5a34 beq conn_sm_pairing_wait ,send_lmp_request 
+59d0 20205a2f branch send_lmp_tid 
+
+send_lmp_aurand:
+59d1 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+59d2 c00159dc beq encapsulated_minor_type_p256 ,send_lmp_aurand_256 
+59d3 6fe08877 fetch 1 ,mem_pairing_auth 
+59d4 203a59d9 branch send_lmp_aurand_notpairing ,blank 
+
+send_lmp_aurand2:
+59d5 20405a7f call check_localsm 
+59d6 2040da72 call tid_initiate ,true 
+59d7 2440da6e ncall tid_reply ,true 
+59d8 202059da branch send_lmp_aurand_common 
+
+send_lmp_aurand_notpairing:
+59d9 20405a72 call tid_initiate 
+
+send_lmp_aurand_common:
+59da 20405a8e call generate_random_number 
+59db 202059c9 branch send_lmp_rand 
+
+send_lmp_aurand_256:
+59dc 70007c0c jam lmp_sres ,mem_lmo_opcode2 
+59dd 202059d5 branch send_lmp_aurand2 
+
+send_lmp_sres:
+59de 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+59df c00159f8 beq encapsulated_minor_type_p256 ,send_lmp_sres_256 
+59e0 da2040a8 arg mem_lap ,rega 
+59e1 20406ba6 call function_e1 
+59e2 18007e05 force 5 ,pdata 
+59e3 20405a1a call msg_send_lmp 
+59e4 6fe20454 fetch 4 ,mem_input_store 
+59e5 e7e20005 istore 4 ,contw 
+59e6 d84003a9 arg mem_sres_tid ,temp 
+59e7 20405a65 call special_tid_store 
+59e8 20406ca4 call copy_aco 
+59e9 20405a7f call check_localsm 
+59ea 2020d9ef branch send_lmp_sres_master ,true 
+59eb 7003ab01 jam done_encryp ,mem_wait_encryption 
+59ec 6fe08877 fetch 1 ,mem_pairing_auth 
+59ed 207a0000 rtn blank 
+59ee 70007c0b jam lmp_au_rand ,mem_lmo_opcode2 
+
+send_lmp_sres_master:
+59ef 6fe0c1ca fetch 1 ,mem_link_key_exists 
+59f0 207a0000 rtn blank 
+
+send_lmp_sres_startenc:
+59f1 20405a7f call check_localsm 
+59f2 2420d9f4 nbranch send_lmp_sres_startenc_slave ,true 
+59f3 20600000 rtn 
+
+send_lmp_sres_startenc_slave:
+59f4 c6908000 rtnmark0 mark_slave_in_rand_accepted 
+59f5 793f8021 set0 mark_slave_in_rand_accepted ,mark 
+59f6 70007c0f jam lmp_encryption_mode_req ,mem_lmo_opcode2 
+59f7 20600000 rtn 
+
+send_lmp_sres_256:
+59f8 2040755f call function_h4 
+59f9 20407584 call function_h5 
+59fa 18007e05 force 5 ,pdata 
+59fb 20405a1a call msg_send_lmp 
+59fc 6fe20918 fetch 4 ,memb 
+59fd e7e20005 istore 4 ,contw 
+59fe d84003a9 arg mem_sres_tid ,temp 
+59ff 20405a65 call special_tid_store 
+5a00 20405a07 call copy_aco_256 
+5a01 20405a7f call check_localsm 
+5a02 2020d9ef branch send_lmp_sres_master ,true 
+5a03 7003ab01 jam done_encryp ,mem_wait_encryption 
+5a04 6fe08877 fetch 1 ,mem_pairing_auth 
+5a05 207a0000 rtn blank 
+5a06 202059ef branch send_lmp_sres_master 
+
+copy_aco_256:
+5a07 6fe40910 fetch 8 ,mem_sp_calc_result_high 
+5a08 67e446ad store 8 ,mem_ccm_iv 
+5a09 20600000 rtn 
+
+send_lmp_start_encryption:
+5a0a 20405a8e call generate_random_number 
+5a0b 20406ba9 call function_e3 
+5a0c 18007e11 force 17 ,pdata 
+5a0d 20405a1a call msg_send_lmp 
+5a0e d8c00424 arg mem_random_number ,contr 
+5a0f 20407d7f call memcpy16 
+5a10 20205a2f branch send_lmp_tid 
+
+send_lmp_stop_encryption_req:
+5a11 18007e01 force 1 ,pdata 
+5a12 20405a1a call msg_send_lmp 
+5a13 20205a2f branch send_lmp_tid 
+
+send_lmp_encryption_key_size_req:
+5a14 18007e02 force 2 ,pdata 
+5a15 20405a1a call msg_send_lmp 
+5a16 18007e10 force 16 ,pdata 
+5a17 e7e08005 istore 1 ,contw 
+5a18 67e08054 store 1 ,mem_key_size 
+5a19 20205a2f branch send_lmp_tid 
+
+msg_send_lmp:
+5a1a 1fe9fe00 lshift3 pdata ,pdata 
+5a1b 1fe1fe07 or_into 0x07 ,pdata 
+5a1c 67e0838a store 1 ,mem_lmo_header_length 
+5a1d df200011 arg 17 ,loopcnt 
+5a1e d8a0038c arg mem_lmo_payload ,contw 
+5a1f 20407d9b call clear_mem 
+5a20 d8a0038c arg mem_lmo_payload ,contw 
+5a21 20600000 rtn 
+
+send_lmpext:
+5a22 1fe1227f and pdata ,0x7f ,rega 
+5a23 7000487f jam lmp_escape ,mem_lmp_to_send 
+5a24 18e27e00 deposit queue 
+5a25 20405a1a call msg_send_lmp 
+5a26 1a227e00 deposit rega 
+5a27 e7e08005 istore 1 ,contw 
+5a28 20600000 rtn 
+
+send_lmp_follow:
+5a29 6fe08048 fetch 1 ,mem_lmp_to_send 
+5a2a 1fe3fe00 lshift pdata ,pdata 
+5a2b 6848804c fetcht 1 ,mem_state_map 
+5a2c 284ffe01 isolate1 smap_lmptid ,temp 
+5a2d 7920fe00 setflag true ,0 ,pdata 
+5a2e 20205a39 branch send_lmp_exit 
+
+send_lmp_tid:
+5a2f 6848804c fetcht 1 ,mem_state_map 
+5a30 18410401 and_into 1 ,temp 
+5a31 20205a35 branch send_lmp_end 
+
+send_lmp_reply:
+5a32 18000400 force 0 ,temp 
+5a33 20205a35 branch send_lmp_end 
+
+send_lmp_request:
+5a34 18000401 force 1 ,temp 
+
+send_lmp_end:
+5a35 6fe08048 fetch 1 ,mem_lmp_to_send 
+5a36 1fe3fe00 lshift pdata ,pdata 
+5a37 7934fe00 setflag master ,0 ,pdata 
+5a38 9842fe00 ixor temp ,pdata 
+
+send_lmp_exit:
+5a39 67e0838b store 1 ,mem_lmo_header_opcode 
+5a3a 67e0c5f9 store 1 ,mem_lmo_header_opcode_x 
+5a3b 70004800 jam 0 ,mem_lmp_to_send 
+5a3c 20405a4a call lmo_fifo_process_lmo0empty 
+5a3d 78347c00 enable user 
+5a3e 20600000 rtn 
+
+lmo_fifo_check:
+5a3f 6fe0807c fetch 1 ,mem_lmo_opcode2 
+5a40 207a0000 rtn blank 
+5a41 20405a44 call lmo_fifo_process 
+5a42 6fe0807c fetch 1 ,mem_lmo_opcode2 
+5a43 20600000 rtn 
+
+lmo_fifo_process:
+5a44 470e4023 bpatchx patch23_4 ,mem_patch23 
+5a45 6fe08048 fetch 1 ,mem_lmp_to_send 
+5a46 203a5a4a branch lmo_fifo_process_lmo0empty ,blank 
+5a47 6fe08078 fetch 1 ,mem_lmo_opcode1 
+5a48 247a0000 nrtn blank 
+5a49 20205a54 branch lmo_fifo_process_lmo2to1 
+
+lmo_fifo_process_lmo0empty:
+5a4a 6fe08078 fetch 1 ,mem_lmo_opcode1 
+5a4b 203a5a5a branch lmo_fifo_process_lmo1_empty ,blank 
+5a4c 6fe18078 fetch 3 ,mem_lmo_opcode1 
+5a4d 67e18048 store 3 ,mem_lmp_to_send 
+5a4e 6848807b fetcht 1 ,mem_lmo_tid1 
+5a4f 6fe0804c fetch 1 ,mem_state_map 
+5a50 793ffe01 set0 smap_lmptid ,pdata 
+5a51 9841fe00 ior temp ,pdata 
+5a52 67e0804c store 1 ,mem_state_map 
+5a53 70007800 jam 0 ,mem_lmo_opcode1 
+
+lmo_fifo_process_lmo2to1:
+5a54 6fe0807c fetch 1 ,mem_lmo_opcode2 
+5a55 207a0000 rtn blank 
+5a56 6fe2007c fetch 4 ,mem_lmo_opcode2 
+5a57 67e20078 store 4 ,mem_lmo_opcode1 
+5a58 70007c00 jam 0 ,mem_lmo_opcode2 
+5a59 20600000 rtn 
+
+lmo_fifo_process_lmo1_empty:
+5a5a 6fe0807c fetch 1 ,mem_lmo_opcode2 
+5a5b 207a0000 rtn blank 
+5a5c 6fe1807c fetch 3 ,mem_lmo_opcode2 
+5a5d 67e18048 store 3 ,mem_lmp_to_send 
+5a5e 6848807f fetcht 1 ,mem_lmo_tid2 
+5a5f 6fe0804c fetch 1 ,mem_state_map 
+5a60 793ffe01 set0 smap_lmptid ,pdata 
+5a61 9841fe00 ior temp ,pdata 
+5a62 67e0804c store 1 ,mem_state_map 
+5a63 70007c00 jam 0 ,mem_lmo_opcode2 
+5a64 20600000 rtn 
+
+special_tid_store:
+5a65 470ec023 bpatchx patch23_5 ,mem_patch23 
+5a66 6fe0804c fetch 1 ,mem_state_map 
+5a67 1fe22600 copy pdata ,regc 
+5a68 efe08002 ifetch 1 ,temp 
+5a69 20405567 call pop_tid_follow 
+5a6a 20405a29 call send_lmp_follow 
+5a6b 1a627e00 copy regc ,pdata 
+5a6c 67e0804c store 1 ,mem_state_map 
+5a6d 20600000 rtn 
+
+tid_reply:
+5a6e 6848804c fetcht 1 ,mem_state_map 
+5a6f 793f8400 set0 smap_lmptidinit ,temp 
+5a70 6048804c storet 1 ,mem_state_map 
+5a71 20600000 rtn 
+
+tid_initiate:
+5a72 6848804c fetcht 1 ,mem_state_map 
+5a73 79200400 set1 smap_lmptidinit ,temp 
+5a74 6048804c storet 1 ,mem_state_map 
+5a75 20600000 rtn 
+
+tid_check:
+5a76 7d34fe01 nsetflag master ,smap_lmptid ,pdata 
+5a77 6848804c fetcht 1 ,mem_state_map 
+5a78 9842fe00 ixor temp ,pdata 
+5a79 2feffe01 isolate1 smap_lmptid ,pdata 
+5a7a 20600000 rtn 
+
+tid_set_reply:
+5a7b 6fe0804c fetch 1 ,mem_state_map 
+5a7c 7934fe01 setflag master ,smap_lmptid ,pdata 
+5a7d 67e0804c store 1 ,mem_state_map 
+5a7e 20600000 rtn 
+
+check_localsm:
+5a7f 6fe08876 fetch 1 ,mem_sp_localsm 
+5a80 2fe0fe01 compare local_statemachine ,pdata ,0x7f 
+5a81 20600000 rtn 
+
+setlocalsm_master:
+5a82 6fe08876 fetch 1 ,mem_sp_localsm 
+5a83 79207e07 set1 7 ,pdata 
+5a84 67e08876 store 1 ,mem_sp_localsm 
+5a85 20600000 rtn 
+
+setlocalsm_slave:
+5a86 6fe08876 fetch 1 ,mem_sp_localsm 
+5a87 793ffe07 set0 7 ,pdata 
+5a88 67e08876 store 1 ,mem_sp_localsm 
+5a89 20600000 rtn 
+
+check_localsm_master:
+5a8a 6fe08876 fetch 1 ,mem_sp_localsm 
+5a8b 2feffe07 isolate1 7 ,pdata 
+5a8c 67e08876 store 1 ,mem_sp_localsm 
+5a8d 20600000 rtn 
+
+generate_random_number:
+5a8e d8a00424 arg mem_random_number ,contw 
+
+generate_random:
+5a8f 18007210 force 16 ,loopcnt 
+
+generate_random_another:
+
+generate_random_loop:
+5a90 180a7e00 random pdata 
+5a91 e7e08005 istore 1 ,contw 
+5a92 c2005a90 loop generate_random_another 
+5a93 20600000 rtn 
+
+generate_linkkey:
+5a94 20406b77 call function_e21 
+5a95 da2041cb arg mem_link_key ,rega 
+5a96 da400454 arg mem_input_store ,regb 
+5a97 efe40011 ifetch 8 ,rega 
+5a98 68488030 fetcht 1 ,mem_state 
+5a99 7d3a0406 nsetflag blank ,state_combkey ,temp 
+5a9a 60488030 storet 1 ,mem_state 
+5a9b 1a220a00 copy rega ,contw 
+5a9c 20406c70 call xor16 
+5a9d 202009c6 branch generate_linkkey_continue 
+
+process_conn_sm:
+5a9e 470f4023 bpatchx patch23_6 ,mem_patch23 
+5a9f 20405a3f call lmo_fifo_check 
+5aa0 247a0000 nrtn blank 
+
+process_conn_sm_continue:
+5aa1 6fe08055 fetch 1 ,mem_conn_sm 
+5aa2 207a0000 rtn blank 
+5aa3 c0025af2 beq conn_sm_send_conn_req ,host_create_conn_send_conn_req 
+5aa4 c002daf8 beq conn_sm_wait_conn_accept ,host_create_conn_wait_accept 
+5aa5 c0015ae9 beq conn_sm_send_features ,host_create_conn_send_features 
+5aa6 c001db00 beq conn_sm_wait_features_res ,host_create_conn_waiting 
+5aa7 c0075aec beq conn_sm_send_switch ,host_create_conn_send_switch 
+5aa8 c0035b1c beq conn_sm_auth_pair ,host_create_conn_auth_pair 
+5aa9 c003db34 beq conn_sm_auth_pair_wait ,host_create_conn_auth_pair_wait 
+5aaa c004db35 beq conn_sm_encrypt ,host_create_conn_encrypt 
+5aab c0055b3e beq conn_sm_encrypt_wait ,host_create_conn_encrypt_wait 
+5aac c005db42 beq conn_sm_encrypt_wait_clear ,host_create_conn_encrypt_wait_clear 
+5aad c0065b0a beq conn_sm_send_setup_complete ,host_create_conn_send_setup_complete 
+5aae c006db0d beq conn_sm_wait_setup_complete ,host_create_conn_wait_setup_complete 
+5aaf c007db13 beq conn_sm_detach_delay ,host_create_conn_master_detach 
+5ab0 c0095adc beq conn_sm_send_version ,host_create_conn_send_version 
+5ab1 c009db00 beq conn_sm_wait_version ,host_create_conn_waiting 
+5ab2 c0085adf beq conn_sm_wait_switch_after_host_connection ,host_creat_conn_wait_switch 
+5ab3 c00a5ad9 beq conn_sm_send_features_ext ,host_creat_conn_send_feat_ext 
+5ab4 c00adb00 beq conn_sm_wait_features_ext ,host_create_conn_waiting 
+5ab5 c00b5ad3 beq conn_sm_pairing ,host_create_conn_pairing 
+5ab6 c00c5ad8 beq conn_sm_pairing_wait ,host_create_conn_pairing_wait 
+5ab7 c00bdacc beq conn_sm_auth ,host_create_conn_auth 
+5ab8 c00cdad2 beq conn_sm_auth_wait ,host_create_conn_auth_wait 
+5ab9 c00d5abd beq conn_sm_done ,host_create_conn_done 
+5aba c00ddac7 beq conn_sm_wait_done ,host_create_conn_done_wait 
+5abb 70005500 jam conn_sm_standby ,mem_conn_sm 
+5abc 20600000 rtn 
+
+host_create_conn_done:
+5abd 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5abe c4010000 rtnbit0 received_setup_complete 
+5abf c4018000 rtnbit0 sent_setup_complete 
+5ac0 70005500 jam conn_sm_standby ,mem_conn_sm 
+5ac1 20405ac3 call host_conn_judge_encrypt 
+5ac2 2020660d branch scheduler_start_upper_sm 
+
+host_conn_judge_encrypt:
+5ac3 6fe080bc fetch 1 ,mem_connection_options 
+5ac4 c4008000 rtnbit0 connection_encrypt 
+5ac5 7000550a jam conn_sm_encrypt_wait ,mem_conn_sm 
+5ac6 20600000 rtn 
+
+host_create_conn_done_wait:
+5ac7 d8e00007 arg enpt_delay_timer ,queue 
+5ac8 20407de9 call timer_check 
+5ac9 247a0000 nrtn blank 
+5aca 7000551a jam conn_sm_done ,mem_conn_sm 
+5acb 20600000 rtn 
+
+host_create_conn_auth:
+5acc 6fe080bc fetch 1 ,mem_connection_options 
+5acd 793ffe00 set0 connection_auth ,pdata 
+5ace 67e080bc store 1 ,mem_connection_options 
+5acf 70005519 jam conn_sm_auth_wait ,mem_conn_sm 
+5ad0 70007c0b jam lmp_au_rand ,mem_lmo_opcode2 
+5ad1 20600000 rtn 
+
+host_create_conn_auth_wait:
+5ad2 20600000 rtn 
+
+host_create_conn_pairing:
+5ad3 6fe083a8 fetch 1 ,mem_pincode_state 
+5ad4 c1810000 rtnne pincode_state_pincode_ready 
+5ad5 20405b44 call host_auth 
+5ad6 70005518 jam conn_sm_pairing_wait ,mem_conn_sm 
+5ad7 20600000 rtn 
+
+host_create_conn_pairing_wait:
+5ad8 20600000 rtn 
+
+host_creat_conn_send_feat_ext:
+5ad9 70005515 jam conn_sm_wait_features_ext ,mem_conn_sm 
+5ada 70007c83 jam lmp_ext_features_req ,mem_lmo_opcode2 
+5adb 20600000 rtn 
+
+host_create_conn_send_version:
+5adc 70005513 jam conn_sm_wait_version ,mem_conn_sm 
+5add 70007c25 jam lmp_version_req ,mem_lmo_opcode2 
+5ade 20600000 rtn 
+
+host_creat_conn_wait_switch:
+5adf 6fe0c645 fetch 1 ,mem_switch_flag 
+5ae0 c1000000 rtneq switch_flag_init 
+5ae1 c000dae7 beq switch_flag_accept ,host_create_conn_switch_accept 
+5ae2 d8e00006 arg switch_wait_timer ,queue 
+5ae3 20407de9 call timer_check 
+5ae4 247a0000 nrtn blank 
+5ae5 70464500 jam switch_flag_init ,mem_switch_flag 
+5ae6 20205b01 branch host_create_conn_switch 
+
+host_create_conn_switch_accept:
+5ae7 20748000 rtn master 
+5ae8 20205b1c branch host_create_conn_auth_pair 
+
+host_create_conn_send_features:
+5ae9 70005503 jam conn_sm_wait_features_res ,mem_conn_sm 
+5aea 70007c27 jam lmp_features_req ,mem_lmo_opcode2 
+5aeb 20600000 rtn 
+
+host_create_conn_send_switch:
+5aec 70007c13 jam lmp_switch_req ,mem_lmo_opcode2 
+5aed 79200003 set1 mark_switch_initiated ,mark 
+5aee 70005505 jam conn_sm_wait_conn_accept ,mem_conn_sm 
+5aef 580001ff setarg 0x1ff 
+5af0 67e103a6 store 2 ,mem_soft_timer 
+5af1 20600000 rtn 
+
+host_create_conn_send_conn_req:
+5af2 70005505 jam conn_sm_wait_conn_accept ,mem_conn_sm 
+5af3 580000ff setarg 0xff 
+5af4 67e103a6 store 2 ,mem_soft_timer 
+5af5 793f8022 set0 mark_reconn_recieve_switch ,mark 
+5af6 70007c33 jam lmp_host_connection_req ,mem_lmo_opcode2 
+5af7 202053ee branch init_lmp_reinit 
+
+host_create_conn_wait_accept:
+5af8 c6110000 rtnmark1 mark_reconn_recieve_switch 
+5af9 6fe103a6 fetch 2 ,mem_soft_timer 
+5afa 1fe0ffff increase -1 ,pdata 
+5afb 2022dafe branch host_create_conn_resend ,zero 
+5afc 67e103a6 store 2 ,mem_soft_timer 
+5afd 20600000 rtn 
+
+host_create_conn_resend:
+5afe 7000550e jam conn_sm_send_switch ,mem_conn_sm 
+5aff 20600000 rtn 
+
+host_create_conn_waiting:
+5b00 20600000 rtn 
+
+host_create_conn_switch:
+5b01 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5b02 c4018000 rtnbit0 sent_setup_complete 
+5b03 c4010000 rtnbit0 received_setup_complete 
+5b04 6fe080bc fetch 1 ,mem_connection_options 
+5b05 793ffe02 set0 connection_switch ,pdata 
+5b06 67e080bc store 1 ,mem_connection_options 
+5b07 70007c13 jam lmp_switch_req ,mem_lmo_opcode2 
+5b08 70005510 jam conn_sm_wait_switch_after_host_connection ,mem_conn_sm 
+5b09 20600000 rtn 
+
+host_create_conn_send_setup_complete:
+5b0a 7000550d jam conn_sm_wait_setup_complete ,mem_conn_sm 
+5b0b 70007c31 jam lmp_setup_complete ,mem_lmo_opcode2 
+5b0c 20600000 rtn 
+
+host_create_conn_wait_setup_complete:
+5b0d 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5b0e c4010000 rtnbit0 received_setup_complete 
+5b0f 70005500 jam conn_sm_standby ,mem_conn_sm 
+5b10 20600000 rtn 
+
+host_create_conn_wait_setup_complete_rtn:
+5b11 70005506 jam conn_sm_auth_pair ,mem_conn_sm 
+5b12 20600000 rtn 
+
+host_create_conn_master_detach:
+5b13 6fe103a6 fetch 2 ,mem_soft_timer 
+5b14 1fe0ffff increase -1 ,pdata 
+5b15 203a5b18 branch host_create_conn_send_detach ,blank 
+5b16 67e103a6 store 2 ,mem_soft_timer 
+5b17 20600000 rtn 
+
+host_create_conn_send_detach:
+5b18 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+5b19 70039e16 jam local_host ,mem_disconn_reason_send 
+5b1a 70005500 jam 0 ,mem_conn_sm 
+5b1b 20600000 rtn 
+
+host_create_conn_auth_pair:
+5b1c 6fe080bc fetch 1 ,mem_connection_options 
+5b1d c2815b01 bbit1 connection_switch ,host_create_conn_switch 
+5b1e c2805b21 bbit1 connection_auth ,host_create_conn_auth_pair_true 
+
+host_create_conn_sm_done:
+5b1f 7000551a jam conn_sm_done ,mem_conn_sm 
+5b20 20600000 rtn 
+
+host_create_conn_auth_pair_true:
+5b21 6fe0c1ca fetch 1 ,mem_link_key_exists 
+5b22 203a5b2d branch host_create_conn_auth_pair_nokey ,blank 
+5b23 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5b24 c4018000 rtnbit0 sent_setup_complete 
+5b25 c4010000 rtnbit0 received_setup_complete 
+5b26 6fe203bc fetch 4 ,mem_aurand_send_delay_time 
+5b27 d8400064 arg 100 ,temp 
+5b28 98408400 iadd temp ,temp 
+5b29 1c427e00 copy clkn_bt ,pdata 
+5b2a 98467c00 isub temp ,null 
+5b2b 24610000 nrtn positive 
+5b2c 20205acc branch host_create_conn_auth 
+
+host_create_conn_auth_pair_nokey:
+5b2d 70005516 jam conn_sm_pairing ,mem_conn_sm 
+5b2e 70479604 jam 4 ,mem_pin_length 
+5b2f 58003030 setarg 0x3030 
+5b30 67e14797 store 2 ,mem_pin 
+5b31 e7e10005 istore 2 ,contw 
+5b32 7003a802 jam pincode_state_pincode_ready ,mem_pincode_state 
+5b33 20205ad3 branch host_create_conn_pairing 
+
+host_create_conn_auth_pair_wait:
+5b34 20600000 rtn 
+
+host_create_conn_encrypt:
+5b35 6fe080bc fetch 1 ,mem_connection_options 
+5b36 c280db39 bbit1 connection_encrypt ,host_create_conn_encrypt_start 
+5b37 7000551a jam conn_sm_done ,mem_conn_sm 
+5b38 20600000 rtn 
+
+host_create_conn_encrypt_start:
+5b39 6fe080bc fetch 1 ,mem_connection_options 
+5b3a 793ffe01 set0 connection_encrypt ,pdata 
+5b3b 67e080bc store 1 ,mem_connection_options 
+5b3c 70007c0f jam lmp_encryption_mode_req ,mem_lmo_opcode2 
+5b3d 20600000 rtn 
+
+host_create_conn_encrypt_wait:
+5b3e 6fe083ab fetch 1 ,mem_wait_encryption 
+5b3f 207a0000 rtn blank 
+5b40 70005500 jam conn_sm_standby ,mem_conn_sm 
+5b41 20205b39 branch host_create_conn_encrypt_start 
+
+host_create_conn_encrypt_wait_clear:
+5b42 7000550c jam conn_sm_send_setup_complete ,mem_conn_sm 
+5b43 20600000 rtn 
+
+host_auth:
+5b44 6fe0804b fetch 1 ,mem_op 
+5b45 c2815b49 bbit1 op_inrand_req ,remote_auth 
+5b46 20405a72 call tid_initiate 
+5b47 70007c08 jam lmp_in_rand ,mem_lmo_opcode2 
+5b48 20204de4 branch cmd_exit 
+
+remote_auth:
+5b49 6fe0804b fetch 1 ,mem_op 
+5b4a 793ffe02 set0 op_inrand_req ,pdata 
+5b4b 67e0804b store 1 ,mem_op 
+5b4c 20405750 call lmp_accept_inrand 
+5b4d 20405a7b call tid_set_reply 
+5b4e 20204de4 branch cmd_exit 
+
+pincode_reinit:
+5b4f 58000004 setarg 4 
+5b50 67e0c796 store 1 ,mem_pin_length 
+5b51 58003030 setarg 0x3030 
+5b52 e7e10005 istore 2 ,contw 
+5b53 e7e10005 istore 2 ,contw 
+5b54 20600000 rtn 
+
+twspi_reset:
+5b55 470fc023 bpatchx patch23_7 ,mem_patch23 
+5b56 1fe17eff and_into 0xff ,pdata 
+5b57 d8a08070 arg core_gpio_conf ,contw 
+5b58 98a08a00 iadd contw ,contw 
+5b59 18a22200 copy contw ,rega 
+5b5a d840003e arg gpcfg_output_low ,temp 
+5b5b e0408005 istoret 1 ,contw 
+5b5c 20405b62 call twspi_disable 
+5b5d 2000001e nop 30 
+5b5e 1a220a00 copy rega ,contw 
+5b5f d840003f arg gpcfg_output_high ,temp 
+5b60 e0408005 istoret 1 ,contw 
+5b61 20205b66 branch twspi_enable 
+
+twspi_disable:
+5b62 6ff08085 fetch 1 ,core_aes_en 
+5b63 1fe17efb and_into 0xfb ,pdata 
+5b64 67f08085 store 1 ,core_aes_en 
+5b65 20600000 rtn 
+
+twspi_enable:
+5b66 6ff08085 fetch 1 ,core_aes_en 
+5b67 1fe1fe04 or_into 0x04 ,pdata 
+5b68 67f08085 store 1 ,core_aes_en 
+5b69 20600000 rtn 
+
+aes_disable:
+5b6a 6ff08085 fetch 1 ,core_aes_en 
+5b6b 1fe17efd and_into 0xfd ,pdata 
+5b6c 67f08085 store 1 ,core_aes_en 
+5b6d 20600000 rtn 
+
+read_function_aes:
+5b6e 24345b72 nbranch read_function ,user 
+5b6f 6ff08085 fetch 1 ,core_aes_en 
+5b70 1fe1fe02 or_into 0x2 ,pdata 
+5b71 67f08085 store 1 ,core_aes_en 
+
+read_function:
+5b72 18427c00 copy temp ,null 
+5b73 2022db75 branch read_fuction_zero ,zero 
+5b74 1a627a00 copy regc ,pc 
+
+read_fuction_zero:
+5b75 2fcc0000 isolate0 0 ,null 
+5b76 20205c92 branch set_ucode_status 
+
+get_block_header:
+5b77 18000404 force 4 ,temp 
+
+get_block_header0:
+5b78 da2002eb arg mem_ucode_buf ,rega 
+5b79 20405b6a call aes_disable 
+5b7a 20405b72 call read_function 
+5b7b da2055aa arg 0x55aa ,rega 
+5b7c 6fe102eb fetch 2 ,mem_ucode_buf 
+5b7d e8410006 ifetcht 2 ,contr 
+5b7e 9a267c00 isub rega ,null 
+5b7f 20600000 rtn 
+
+read_first_block:
+5b80 d8400002 arg 2 ,temp 
+5b81 da2002f1 arg mem_ucode_ptr ,rega 
+5b82 20405b72 call read_function 
+5b83 6fe102f1 fetch 2 ,mem_ucode_ptr 
+5b84 67e102e4 store 2 ,mem_addr_mi 
+5b85 20545b87 call get_iv ,user 
+5b86 20600000 rtn 
+
+get_iv:
+5b87 d8400010 arg 16 ,temp 
+5b88 da2002f3 arg mem_ucode_keybuf ,rega 
+5b89 20405b6a call aes_disable 
+5b8a 20405b72 call read_function 
+
+set_iv:
+5b8b d8c002f3 arg mem_ucode_keybuf ,contr 
+5b8c df200010 arg 16 ,loopcnt 
+5b8d 20406e1a call aes_load_data 
+5b8e 20406dca call aes_init 
+5b8f 20406e36 call aes_clear_data 
+5b90 20206dc4 branch do_aes_cbc 
+
+load_storage:
+5b91 58000000 setarg 0 
+5b92 67e10985 store 2 ,mem_queue 
+5b93 7856fc00 disable match 
+5b94 20405b77 call get_block_header 
+5b95 24628000 nrtn zero 
+5b96 70802380 jam 0x80 ,core_ucode_ctrl 
+5b97 70802200 jam 0 ,core_ucode_hi 
+5b98 70802400 jam 0 ,core_ucode_low 
+5b99 da208025 arg core_ucode_data ,rega 
+5b9a 20405b6e call read_function_aes 
+5b9b 70802300 jam 0x0 ,core_ucode_ctrl 
+
+load_storage_loop:
+5b9c d8400006 arg 6 ,temp 
+5b9d 20405b78 call get_block_header0 
+5b9e 2422dbb8 nbranch load_data_checksum_compare ,zero 
+5b9f efe10006 ifetch 2 ,contr 
+5ba0 98002200 iforce rega 
+5ba1 20405b72 call read_function 
+5ba2 20405baf call load_data_checksum_calc 
+5ba3 20205b9c branch load_storage_loop 
+
+load_data_checksum:
+5ba4 da20aa55 arg 0xaa55 ,rega 
+5ba5 6fe102eb fetch 2 ,mem_ucode_buf 
+5ba6 9a267c00 isub rega ,null 
+5ba7 24628000 nrtn zero 
+5ba8 da2055aa arg 0x55aa ,rega 
+5ba9 6fe102ed fetch 2 ,mem_ucode_len 
+5baa 9a267c00 isub rega ,null 
+5bab 24628000 nrtn zero 
+5bac 6fe102ef fetch 2 ,mem_sched_addr 
+5bad 67e10970 store 2 ,mem_rega 
+5bae 20600000 rtn 
+
+load_data_checksum_calc:
+5baf 6fe10985 fetch 2 ,mem_queue 
+5bb0 df200006 arg 6 ,loopcnt 
+5bb1 d8c002eb arg mem_ucode_buf ,contr 
+5bb2 20407ed3 call cal_sum 
+5bb3 6f2102ed fetchr loopcnt ,2 ,mem_ucode_len 
+5bb4 1a220c00 copy rega ,contr 
+5bb5 20407ed3 call cal_sum 
+5bb6 67e10985 store 2 ,mem_queue 
+5bb7 20600000 rtn 
+
+load_data_checksum_compare:
+5bb8 20405ba4 call load_data_checksum 
+5bb9 2022db9c branch load_storage_loop ,zero 
+5bba 6fe10970 fetch 2 ,mem_rega 
+5bbb 68490985 fetcht 2 ,mem_queue 
+5bbc 98467c00 isub temp ,null 
+5bbd 24628000 nrtn zero 
+5bbe 7836fc00 enable match 
+5bbf 20600000 rtn 
+
+load_storage_efuse:
+5bc0 6fe08a04 fetch 1 ,mem_tmp_buffer + efuse_offset_offset 
+5bc1 d8c00a01 arg mem_tmp_buffer ,contr 
+5bc2 98c08c00 iadd contr ,contr 
+5bc3 70802380 jam 0x80 ,core_ucode_ctrl 
+5bc4 70802200 jam 0 ,core_ucode_hi 
+5bc5 70802400 jam 0 ,core_ucode_low 
+5bc6 da208025 arg core_ucode_data ,rega 
+5bc7 ef208006 ifetchr loopcnt ,1 ,contr 
+5bc8 1f267c00 sub loopcnt ,0 ,null 
+5bc9 2442dbd6 ncall load_efuse_read_code ,zero 
+5bca 70802300 jam 0x0 ,core_ucode_ctrl 
+
+load_storage_efuse_loop:
+5bcb efe08006 ifetch 1 ,contr 
+5bcc 207a0000 rtn blank 
+5bcd 1fe27200 copy pdata ,loopcnt 
+5bce ea410006 ifetchr regb ,2 ,contr 
+5bcf 1a420a00 copy regb ,contw 
+5bd0 20407dd6 call memcpy_loop 
+5bd1 20205bcb branch load_storage_efuse_loop 
+
+load_efuse_read_code_loop:
+5bd2 efe08006 ifetch 1 ,contr 
+5bd3 e7e08011 istore 1 ,rega 
+5bd4 c2005bd2 loop load_efuse_read_code_loop 
+5bd5 20600000 rtn 
+
+load_efuse_read_code:
+5bd6 20407ec9 call enable_user2 
+5bd7 1f220400 copy loopcnt ,temp 
+5bd8 24345bd2 nbranch load_efuse_read_code_loop ,user 
+
+load_efuse_read_code_loop_enc:
+5bd9 18467c00 sub temp ,0 ,null 
+5bda 20628000 rtn zero 
+5bdb 20405be0 call load_efuse_store_code 
+5bdc 20406dc4 call do_aes_cbc 
+5bdd 184085f0 add temp ,-16 ,temp 
+5bde 20215bd9 branch load_efuse_read_code_loop_enc ,positive 
+5bdf 20600000 rtn 
+
+load_efuse_store_code:
+5be0 1800700c force regidx_result ,regext_index 
+5be1 18427200 copy temp ,loopcnt 
+
+load_efuse_store_code_loop:
+5be2 efe20006 ifetch 4 ,contr 
+5be3 9de2fe00 ixor regext ,pdata 
+5be4 1fe25e00 copy pdata ,regext 
+5be5 e7e08011 istore 1 ,rega 
+5be6 1fecfe00 rshift8 pdata ,pdata 
+5be7 e7e08011 istore 1 ,rega 
+5be8 1fecfe00 rshift8 pdata ,pdata 
+5be9 e7e08011 istore 1 ,rega 
+5bea 1fecfe00 rshift8 pdata ,pdata 
+5beb e7e08011 istore 1 ,rega 
+5bec 1f00f001 increase 1 ,regext_index 
+5bed 2f000600 compare 0 ,regext_index ,0x3 
+5bee 20608000 rtn true 
+5bef 1f20f3fc add loopcnt ,-4 ,loopcnt 
+5bf0 20628000 rtn zero 
+5bf1 20215be2 branch load_efuse_store_code_loop ,positive 
+5bf2 20600000 rtn 
+
+run_efuse_code:
+5bf3 dfa00000 arg 0 ,pc 
+5bf4 20600000 rtn 
+
+loadcode:
+5bf5 20407e77 call clean_mem 
+5bf6 70805025 jam 0x25 ,core_clkoff 
+5bf7 78347c00 enable user 
+5bf8 7041e300 jam 0 ,mem_loadcode_times 
+
+load_efuse:
+5bf9 20405c58 call loadcode_timeout 
+5bfa 24215c90 nbranch loadcode_error ,positive 
+5bfb 58000000 setarg 0 
+5bfc da200a01 arg mem_tmp_buffer ,rega 
+5bfd d8400040 arg 64 ,temp 
+5bfe 20405f00 call efuse_read_data 
+5bff 20405c68 call loadcode_efuse_check 
+5c00 24345bf9 nbranch load_efuse ,user 
+5c01 20405cb0 call app_read_efuse_app_vsel 
+5c02 78547c00 disable user 
+5c03 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5c04 c301dc17 bbit0 ucode_flag_enc ,loadcode_efuse 
+5c05 20406e33 call regext_clear 
+5c06 70800608 jam lock_otp ,core_misc_ctrl 
+5c07 7920002b set1 mark_otp_encrypt ,mark 
+5c08 18007004 force regidx_key ,regext_index 
+5c09 20406e37 call aes_clear 
+5c0a 18007004 force regidx_key ,regext_index 
+5c0b 6de20a3d fetchr regext ,4 ,mem_tmp_buffer + efuse_offset_key_addr 
+5c0c 58f1ab8f setarg 0xf1ab8f 
+5c0d 67e202f3 store 4 ,mem_ucode_keybuf 
+5c0e 1febfe00 lshift2 pdata ,pdata 
+5c0f e7e20005 istore 4 ,contw 
+5c10 1fe3fe00 lshift pdata ,pdata 
+5c11 e7e20005 istore 4 ,contw 
+5c12 1febfe00 lshift2 pdata ,pdata 
+5c13 e7e20005 istore 4 ,contw 
+5c14 20405b6a call aes_disable 
+5c15 20405b8b call set_iv 
+5c16 78347c00 enable user 
+
+loadcode_efuse:
+5c17 6fe20a01 fetch 4 ,mem_tmp_buffer 
+5c18 203a5c1e branch loadcode_iic ,blank 
+5c19 67e1c4ce store 3 ,mem_efuse_header 
+5c1a 20407ecb call disable_user2 
+5c1b 20405ceb call app_lpm_peripheral_lock_check 
+5c1c 20405bc0 call load_storage_efuse 
+5c1d 20565bf3 call run_efuse_code ,user2 
+
+loadcode_iic:
+5c1e 7041e300 jam 0 ,mem_loadcode_times 
+
+loadcode_iic_loop:
+5c1f 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5c20 c2815c3d bbit1 ucode_flag_skip_eep ,loadcode_spi 
+5c21 20405c58 call loadcode_timeout 
+5c22 24215c2a nbranch loadcode_iic_eeprom_2k ,positive 
+5c23 20405c36 call iicd_load_gpio_init 
+5c24 20405e5c call clear_eeprom_size_2k 
+5c25 20405c8a call loadcode_iic_by_eeprom 
+5c26 2436dc1f nbranch loadcode_iic_loop ,match 
+5c27 6fe082e1 fetch 1 ,mem_ucode_status 
+5c28 c3005c1f bbit0 0 ,loadcode_iic_loop 
+5c29 20205c4c branch loadcode_hci 
+
+loadcode_iic_eeprom_2k:
+5c2a 7041e300 jam 0 ,mem_loadcode_times 
+
+loadcode_iic_eeprom_2k_loop:
+5c2b 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5c2c c2815c3d bbit1 ucode_flag_skip_eep ,loadcode_spi 
+5c2d 20405c58 call loadcode_timeout 
+5c2e 24215c3d nbranch loadcode_spi ,positive 
+5c2f 20405c36 call iicd_load_gpio_init 
+5c30 20405e59 call set_eeprom_size_2k 
+5c31 20405c8a call loadcode_iic_by_eeprom 
+5c32 2436dc2b nbranch loadcode_iic_eeprom_2k_loop ,match 
+5c33 6fe082e1 fetch 1 ,mem_ucode_status 
+5c34 c3005c2b bbit0 0 ,loadcode_iic_eeprom_2k_loop 
+5c35 20205c4c branch loadcode_hci 
+
+iicd_load_gpio_init:
+5c36 6fe0c4c5 fetch 1 ,mem_eeprom_sda_gpio 
+5c37 6848c4c4 fetcht 1 ,mem_eeprom_scl_gpio 
+5c38 98467c00 isub temp ,null 
+5c39 2422de42 nbranch iicd_read_init_pin ,zero 
+
+iicd_load_default_gpio:
+5c3a 58000102 setarg 0x000102 
+5c3b 67e1c4c3 store 3 ,mem_eeprom_wp_gpio 
+5c3c 20205e42 branch iicd_read_init_pin 
+
+loadcode_spi:
+5c3d 7041e300 jam 0 ,mem_loadcode_times 
+
+loadcode_spi_loop:
+5c3e 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5c3f c280dc4c bbit1 ucode_flag_skip_flash ,loadcode_hci 
+5c40 20405c58 call loadcode_timeout 
+5c41 24215c4c nbranch loadcode_hci ,positive 
+5c42 20405daf call spid_init_flash 
+5c43 200000c8 nop 200 
+5c44 20405dbd call spid_flash_release_form_powerdown 
+5c45 20000064 nop 100 
+5c46 da605df1 arg spid_load_flash ,regc 
+5c47 20405b80 call read_first_block 
+5c48 20405b91 call load_storage 
+5c49 2436dc3e nbranch loadcode_spi_loop ,match 
+5c4a 6fe082e1 fetch 1 ,mem_ucode_status 
+5c4b c3005c3e bbit0 0 ,loadcode_spi_loop 
+
+loadcode_hci:
+5c4c 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5c4d c3005c50 bbit0 ucode_flag_hci ,clear_key_buf 
+5c4e 20405c50 call clear_key_buf 
+5c4f 20204d18 branch hci_init 
+
+clear_key_buf:
+5c50 58000000 setarg 0 
+5c51 67e20a3d store 4 ,mem_tmp_buffer + efuse_offset_key_addr 
+5c52 67e402f3 store 8 ,mem_ucode_keybuf 
+5c53 e7e40005 istore 8 ,contw 
+5c54 18007004 force regidx_key ,regext_index 
+5c55 20406e37 call aes_clear 
+5c56 70805021 jam 0x21 ,core_clkoff 
+5c57 20600000 rtn 
+
+loadcode_timeout:
+5c58 20405c5e call loadcode_error_delay 
+5c59 6fe0c1e3 fetch 1 ,mem_loadcode_times 
+5c5a 1fe0fe01 increase 1 ,pdata 
+5c5b 1fe67c03 sub pdata ,3 ,null 
+5c5c 67e0c1e3 store 1 ,mem_loadcode_times 
+5c5d 20600000 rtn 
+
+loadcode_error_delay:
+5c5e 6fe0c1e3 fetch 1 ,mem_loadcode_times 
+5c5f 207a0000 rtn blank 
+5c60 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_loadcode_delay 
+5c61 1fe17e40 and_into 0x40 ,pdata 
+5c62 207a0000 rtn blank 
+5c63 20207d89 branch delay_50ms 
+
+loadcode_efuse_check_xor:
+5c64 1ff18400 rshift4 pdata ,temp 
+5c65 1fe17e0f and pdata ,0x0f ,pdata 
+5c66 9842fe00 ixor temp ,pdata 
+5c67 20600000 rtn 
+
+loadcode_efuse_check:
+5c68 6fe20a01 fetch 4 ,mem_tmp_buffer 
+5c69 207a0000 rtn blank 
+5c6a 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5c6b 20405c64 call loadcode_efuse_check_xor 
+5c6c c087fec7 bne 0x0f ,disable_user 
+5c6d 6fe08a02 fetch 1 ,mem_tmp_buffer + efuse_offset_device_lock 
+5c6e 20405c64 call loadcode_efuse_check_xor 
+5c6f c087fec7 bne 0x0f ,disable_user 
+
+loadcode_efuse_check_sum:
+5c70 6fe08a01 fetch 1 ,mem_tmp_buffer 
+5c71 e8408006 ifetcht 1 ,contr 
+5c72 9840fe00 iadd temp ,pdata 
+5c73 e8408006 ifetcht 1 ,contr 
+5c74 9840fe00 iadd temp ,pdata 
+5c75 e8408006 ifetcht 1 ,contr 
+5c76 9840a200 iadd temp ,rega 
+5c77 dfe00a01 arg mem_tmp_buffer ,pdata 
+5c78 98408c00 iadd temp ,contr 
+5c79 1a227e00 copy rega ,pdata 
+5c7a ef208006 ifetchr loopcnt ,1 ,contr 
+5c7b 9f20fe00 iadd loopcnt ,pdata 
+5c7c 20407ed3 call cal_sum 
+5c7d 20405c83 call loadcode_efuse_check_sum_loop 
+5c7e e8408006 ifetcht 1 ,contr 
+5c7f 1fe17eff and pdata ,0xff ,pdata 
+5c80 98467c00 isub temp ,null 
+5c81 2422fec7 nbranch disable_user ,zero 
+5c82 20600000 rtn 
+
+loadcode_efuse_check_sum_loop:
+5c83 ef208006 ifetchr loopcnt ,1 ,contr 
+5c84 1f267c00 sub loopcnt ,0 ,null 
+5c85 20628000 rtn zero 
+5c86 9f20fe00 iadd loopcnt ,pdata 
+5c87 1f20f202 increase 2 ,loopcnt 
+5c88 20407ed3 call cal_sum 
+5c89 20205c83 branch loadcode_efuse_check_sum_loop 
+
+loadcode_iic_by_eeprom:
+5c8a 58000000 setarg 0x0 
+5c8b 67e102e4 store 2 ,mem_addr_mi 
+5c8c da605e7f arg iicd_read_eep ,regc 
+5c8d 20405e2b call iic_init_600khz 
+5c8e 20405b80 call read_first_block 
+5c8f 20205b91 branch load_storage 
+
+loadcode_error:
+5c90 20405c50 call clear_key_buf 
+5c91 20205d33 branch app_lpm_mpu_lock_br_ble 
+
+set_ucode_status:
+5c92 6fe082e1 fetch 1 ,mem_ucode_status 
+5c93 1fe3fe00 lshift pdata ,pdata 
+5c94 7920fe00 setflag true ,0 ,pdata 
+5c95 2a2c000f isolate0 15 ,rega 
+5c96 20608000 rtn true 
+5c97 67e082e1 store 1 ,mem_ucode_status 
+5c98 20600000 rtn 
+
+decrypt_code:
+5c99 6ff08085 fetch 1 ,core_aes_en 
+5c9a c4008000 rtnbit0 1 
+5c9b 20205c9f branch decrypt_code_skip 
+
+decrypt_code_loop:
+5c9c 6ff0812c fetch 1 ,core_dma_status 
+5c9d afefffff qisolate1 pdata 
+5c9e 20608000 rtn true 
+
+decrypt_code_skip:
+5c9f 6ff08108 fetch 1 ,core_misc_status 
+5ca0 c300dc9c bbit0 1 ,decrypt_code_loop 
+5ca1 20406dc4 call do_aes_cbc 
+5ca2 20205c9c branch decrypt_code_loop 
+
+load_ucode:
+5ca3 6fe141a6 fetch 2 ,mem_patch_ptr 
+5ca4 207a0000 rtn blank 
+5ca5 70802380 jam 0x80 ,core_ucode_ctrl 
+5ca6 70802200 jam 0 ,core_ucode_hi 
+5ca7 70802400 jam 0 ,core_ucode_low 
+5ca8 684941a8 fetcht 2 ,mem_patch_len 
+5ca9 184bf200 lshift2 temp ,loopcnt 
+5caa 98000c00 iforce contr 
+
+load_ucode_loop:
+5cab efe08006 ifetch 1 ,contr 
+5cac 67f08025 store 1 ,core_ucode_data 
+5cad c2005cab loop load_ucode_loop 
+5cae 70802300 jam 0x0 ,core_ucode_ctrl 
+5caf 20600000 rtn 
+
+app_read_efuse_app_vsel:
+5cb0 6fe08a31 fetch 1 ,mem_tmp_buffer + efuse_offset_app_vsel 
+5cb1 1fe17e0f and_into 0x0f ,pdata 
+5cb2 2feffe03 isolate1 3 ,pdata 
+5cb3 7920fe04 setflag true ,4 ,pdata 
+5cb4 1fe3fe00 lshift pdata ,pdata 
+5cb5 67e0c182 store 1 ,mem_lpm_ctrl3 
+5cb6 20201554 branch lpm_write_sel_vdd 
+
+app_read_efuse_sys_config:
+5cb7 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_device_option 
+5cb8 1fe17e0f and_into 0x0f ,pdata 
+5cb9 207a0000 rtn blank 
+5cba 67e0c09a store 1 ,mem_device_option 
+5cbb 6fe08a2d fetch 1 ,mem_tmp_buffer + efuse_offset_xtal_offset 
+5cbc 67e0c17b store 1 ,mem_lpm_ctrim 
+5cbd 6fe08a2e fetch 1 ,mem_tmp_buffer + efuse_offset_xtal_cnt 
+5cbe 67e0c17d store 1 ,mem_lpm_xtalcnt 
+5cbf 20600000 rtn 
+
+app_read_efuse_dig_aon_vsel:
+5cc0 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_dig_aon_vsel 
+5cc1 1fe17e30 and_into 0x30 ,pdata 
+5cc2 1ff1fe00 rshift4 pdata ,pdata 
+5cc3 207a0000 rtn blank 
+5cc4 67e0c4d2 store 1 ,mem_dig_aon_vsel 
+5cc5 20600000 rtn 
+
+app_read_efuse_syn_afc_cfg1:
+5cc6 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_tx_vco_current 
+5cc7 1fe17e0f and_into 0x0f ,pdata 
+5cc8 207a0000 rtn blank 
+5cc9 67e0c4d3 store 1 ,mem_syn_afc_cfg1 
+5cca 20600000 rtn 
+
+app_read_efuse_rf_ldo_cfg1:
+5ccb 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_ldo_cfg1 
+5ccc 1fe17e30 and_into 0x30 ,pdata 
+5ccd 1ff1fe00 rshift4 pdata ,pdata 
+5cce 207a0000 rtn blank 
+5ccf 67e0c4d4 store 1 ,mem_rf_ldo_cfg1 
+5cd0 20600000 rtn 
+
+app_read_efuse_rc_cal:
+5cd1 6fe08a33 fetch 1 ,mem_tmp_buffer + efuse_offset_rc_cal 
+5cd2 207a0000 rtn blank 
+5cd3 67e0c4d5 store 1 ,mem_rc_cal 
+5cd4 20600000 rtn 
+
+app_read_efuse_agc:
+5cd5 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_agc_sel 
+5cd6 c283dcde bbit1 7 ,app_disable_soft_agc 
+5cd7 7041eb88 jam 0x88 ,mem_gain_table 
+5cd8 7041ec66 jam 0x66 ,mem_gain_table + 1 
+5cd9 7041ed44 jam 0x44 ,mem_gain_table + 2 
+5cda 6fe10a2f fetch 2 ,mem_tmp_buffer + efuse_offset_agc_table 
+5cdb 207a0000 rtn blank 
+5cdc 67e141ec store 2 ,mem_gain_table + 1 
+5cdd 20600000 rtn 
+
+app_disable_soft_agc:
+5cde 7041eaff jam 0xff ,mem_gain_fix 
+5cdf 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_agc_sec_en 
+5ce0 1fe17e40 and_into 0x40 ,pdata 
+5ce1 1fe97e00 rshift3 pdata ,pdata 
+5ce2 67e0c1ee store 1 ,mem_gain_second_agc_en 
+5ce3 20600000 rtn 
+
+app_lpm_efuse_lock_prep:
+5ce4 70800273 jam 0x73 ,0x8002 
+5ce5 37d98200 until null ,lpo_edge 
+5ce6 37d98200 until null ,lpo_edge 
+5ce7 6ff10120 fetch 2 ,core_ucode_flag 
+5ce8 793ffe0d set0 13 ,pdata 
+5ce9 67f1004c store 2 ,core_lpm_reg 
+5cea 20205d4e branch lpm_write2_ctrl_option 
+
+app_lpm_peripheral_lock_check:
+5ceb 6fe08a02 fetch 1 ,mem_tmp_buffer + efuse_offset_device_lock 
+5cec 1fe17e0f and pdata ,0x0f ,pdata 
+5ced c0055cf8 beq dvc_op_module ,app_lpm_peripheral_lock_module 
+5cee c000dcf8 beq dvc_op_hci ,app_lpm_peripheral_lock_hci 
+5cef c0025cfb beq dvc_op_dongle ,app_lpm_peripheral_lock_dongle 
+5cf0 c0045d00 beq dvc_op_mouse ,app_lpm_peripheral_lock_mouse 
+5cf1 c004dd05 beq dvc_op_shutter ,app_lpm_peripheral_lock_shutter 
+5cf2 c005dd0a beq dvc_op_ali_mesh ,app_lpm_peripheral_lock_mesh 
+5cf3 c0065cf8 beq dvc_op_hci_boot ,app_lpm_peripheral_lock_hciboot 
+5cf4 c006dd0d beq dvc_op_remote_car ,app_lpm_peripheral_lock_remote_car 
+5cf5 c0075d12 beq dvc_op_car ,app_lpm_peripheral_lock_car 
+5cf6 c007dd17 beq dvc_op_antilost ,app_lpm_peripheral_lock_antilost 
+5cf7 20600000 rtn 
+
+app_lpm_peripheral_lock_module:
+
+app_lpm_peripheral_lock_hci:
+
+app_lpm_peripheral_lock_hciboot:
+5cf8 20405ce4 call app_lpm_efuse_lock_prep 
+5cf9 20405d1c call app_lpm_mpu_lock_mesh 
+5cfa 20205d3d branch lpm_write_lock 
+
+app_lpm_peripheral_lock_dongle:
+5cfb 20405ce4 call app_lpm_efuse_lock_prep 
+5cfc dfe03814 arg module_init ,pdata 
+5cfd d8404c50 arg ui_soft_switch_power_off ,temp 
+5cfe 20405d22 call app_mpu_s0_lock 
+5cff 20205d3d branch lpm_write_lock 
+
+app_lpm_peripheral_lock_mouse:
+5d00 20405ce4 call app_lpm_efuse_lock_prep 
+5d01 dfe032b9 arg antilost_init ,pdata 
+5d02 d8403c71 arg module_set_state ,temp 
+5d03 20405d22 call app_mpu_s0_lock 
+5d04 20205d3d branch lpm_write_lock 
+
+app_lpm_peripheral_lock_shutter:
+5d05 20405ce4 call app_lpm_efuse_lock_prep 
+5d06 dfe032b9 arg antilost_init ,pdata 
+5d07 d8404adb arg remote_car_moto_data_enable_user ,temp 
+5d08 20405d22 call app_mpu_s0_lock 
+5d09 20205d3d branch lpm_write_lock 
+
+app_lpm_peripheral_lock_mesh:
+5d0a 20405ce4 call app_lpm_efuse_lock_prep 
+5d0b 20405d25 call app_lpm_mpu_lock_app 
+5d0c 20205d3d branch lpm_write_lock 
+
+app_lpm_peripheral_lock_remote_car:
+5d0d 20405ce4 call app_lpm_efuse_lock_prep 
+5d0e dfe032b9 arg antilost_init ,pdata 
+5d0f d84049ef arg mouse_low_voltage_led_no_enter_lpm_blink ,temp 
+5d10 20405d22 call app_mpu_s0_lock 
+5d11 20205d3d branch lpm_write_lock 
+
+app_lpm_peripheral_lock_car:
+5d12 20405ce4 call app_lpm_efuse_lock_prep 
+5d13 dfe0369a arg dongle_init ,pdata 
+5d14 d8404c50 arg ui_soft_switch_power_off ,temp 
+5d15 20405d22 call app_mpu_s0_lock 
+5d16 20205d3d branch lpm_write_lock 
+
+app_lpm_peripheral_lock_antilost:
+5d17 20405ce4 call app_lpm_efuse_lock_prep 
+5d18 dfe0345e arg car_init ,pdata 
+5d19 d8404c50 arg ui_soft_switch_power_off ,temp 
+5d1a 20405d22 call app_mpu_s0_lock 
+5d1b 20205d3d branch lpm_write_lock 
+
+app_lpm_mpu_lock_mesh:
+5d1c dfe02735 arg ali_mesh_access_layer_resolve_message ,pdata 
+5d1d d840314b arg ali_mesh_upper_transport_layer_clear_tx_buffer ,temp 
+5d1e 20205d22 branch app_mpu_s0_lock 
+
+app_lpm_mpu_lock_module:
+5d1f 20405ce4 call app_lpm_efuse_lock_prep 
+5d20 dfe03814 arg module_init ,pdata 
+5d21 d8403c71 arg module_set_state ,temp 
+
+app_mpu_s0_lock:
+5d22 67f10013 store 2 ,core_mpu_s0_saddr 
+5d23 60590015 storet 2 ,core_mpu_s0_eaddr 
+5d24 20600000 rtn 
+
+app_lpm_mpu_lock_app:
+5d25 dfe032b9 arg antilost_init ,pdata 
+5d26 d8404c50 arg ui_soft_switch_power_off ,temp 
+5d27 20205d22 branch app_mpu_s0_lock 
+
+app_lpm_mpu_lock_br:
+5d28 dfe053f2 arg parse_lmp ,pdata 
+5d29 d8405b49 arg remote_auth ,temp 
+5d2a 20205d2d branch app_mpu_s1_lock 
+
+app_lpm_mpu_lock_ble:
+5d2b dfe01c7d arg le_parse_att ,pdata 
+5d2c d840217c arg le_send_ll_one_lenth ,temp 
+
+app_mpu_s1_lock:
+5d2d 67f10017 store 2 ,core_mpu_s1_saddr 
+5d2e 60590019 storet 2 ,core_mpu_s1_eaddr 
+5d2f 20600000 rtn 
+
+app_lpm_mpu_lock_24g:
+5d30 dfe02181 arg g24_prep ,pdata 
+5d31 d8402733 arg power_ctrl_pac_succ_cnt_reinit ,temp 
+5d32 20205d2d branch app_mpu_s1_lock 
+
+app_lpm_mpu_lock_br_ble:
+5d33 20405d28 call app_lpm_mpu_lock_br 
+5d34 dfe01c7d arg le_parse_att ,pdata 
+5d35 d840217c arg le_send_ll_one_lenth ,temp 
+5d36 20205d22 branch app_mpu_s0_lock 
+
+app_lpm_mpu_mode_lock:
+5d37 6fe08a03 fetch 1 ,mem_tmp_buffer + efuse_offset_peripherals_lock 
+5d38 1fe17ec0 and pdata ,0xc0 ,pdata 
+5d39 c0605d33 beq 0xc0 ,app_lpm_mpu_lock_br_ble 
+5d3a c2835d2b bbit1 efuse_le_lock_bit ,app_lpm_mpu_lock_ble 
+5d3b c283dd28 bbit1 efuse_br_lock_bit ,app_lpm_mpu_lock_br 
+5d3c 20600000 rtn 
+
+lpm_write_lock:
+5d3d 20405d37 call app_lpm_mpu_mode_lock 
+5d3e 6fe08a03 fetch 1 ,mem_tmp_buffer + efuse_offset_peripherals_lock 
+5d3f 1fe1221f and pdata ,0x1f ,rega 
+5d40 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5d41 1fe17e0f and pdata ,0x0f ,pdata 
+5d42 68488a02 fetcht 1 ,mem_tmp_buffer + efuse_offset_device_lock 
+5d43 1841040f and temp ,0x0f ,temp 
+5d44 18520400 lshift4 temp ,temp 
+5d45 9841fe00 ior temp ,pdata 
+5d46 1a2d2200 lshift8 rega ,rega 
+5d47 9a21fe00 ior rega ,pdata 
+5d48 79207e0d set1 lpmreg_rom_lock_bit ,pdata 
+5d49 79207e0e set1 lpmreg_ice_mode_bit ,pdata 
+5d4a 67f2004c store 4 ,core_lpm_reg 
+5d4b 20405d4e call lpm_write2_ctrl_option 
+5d4c 70801108 jam 8 ,core_encrypt 
+5d4d 20600000 rtn 
+
+lpm_write2_ctrl_option:
+5d4e 58000002 setarg lpmreg_sel_option 
+
+lpm_write2:
+5d4f 37d98200 until null ,lpo_edge 
+5d50 67f08012 store 1 ,core_lpm_wr2 
+5d51 37d98200 until null ,lpo_edge 
+5d52 37d98200 until null ,lpo_edge 
+5d53 20600000 rtn 
+
+spid_init:
+5d54 47104024 bpatchx patch24_0 ,mem_patch24 
+
+spid_init_common:
+5d55 6fe0c486 fetch 1 ,mem_spi_init_clk 
+5d56 67f08086 store 1 ,core_spid_ctrl 
+5d57 6fe0c487 fetch 1 ,mem_spi_init_delay_time 
+5d58 67f08087 store 1 ,core_spid_delay 
+5d59 580002e2 setarg mem_spid_tbuf 
+5d5a 67f1008a store 2 ,core_spid_txaddr 
+5d5b 580002e7 setarg mem_spid_rbuf 
+5d5c 67f1008c store 2 ,core_spid_rxaddr 
+5d5d 20205b62 branch twspi_disable 
+
+twspi_write:
+
+spid_write_reg:
+5d5e 79207e07 set1 7 ,pdata 
+5d5f 67e102e2 store 2 ,mem_spid_tbuf 
+5d60 4710c024 bpatchx patch24_1 ,mem_patch24 
+5d61 70808802 jam 2 ,core_spid_txlen 
+5d62 70808e00 jam 0 ,core_spid_rxlen 
+5d63 70800602 jam spid_start ,core_misc_ctrl 
+5d64 20205d6e branch wait_spid_done 
+
+twspi_read:
+
+spid_read_reg:
+5d65 18000401 force 1 ,temp 
+
+spid_read_regs:
+5d66 67e082e2 store 1 ,mem_spid_tbuf 
+5d67 47114024 bpatchx patch24_2 ,mem_patch24 
+5d68 70808801 jam 1 ,core_spid_txlen 
+5d69 6059008e storet 2 ,core_spid_rxlen 
+5d6a 70800602 jam spid_start ,core_misc_ctrl 
+5d6b 20405d6e call wait_spid_done 
+5d6c 6fe082e7 fetch 1 ,mem_spid_rbuf 
+5d6d 20600000 rtn 
+
+wait_spid_done:
+5d6e 6fe140dd fetch 2 ,mem_afh_error_total 
+5d6f 1fe0fe01 increase 1 ,pdata 
+5d70 67e140dd store 2 ,mem_afh_error_total 
+5d71 6ff0812c fetch 1 ,core_dma_status 
+5d72 c301dd6e bbit0 spid_done ,wait_spid_done 
+5d73 20600000 rtn 
+
+flash_write:
+5d74 78547c00 disable user 
+5d75 1fe22400 copy pdata ,regb 
+5d76 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
+5d77 c1800000 rtnne flash_sm_no_buys 
+5d78 78347c00 enable user 
+5d79 1a427e00 copy regb ,pdata 
+5d7a 20205d82 branch spid_flash_write_start 
+
+flash_write_spi_sm_timer:
+5d7b 6fe0c4ae fetch 1 ,mem_spi_write_flash_sm 
+5d7c c000dd82 beq flash_sm_start ,spid_flash_write_start 
+5d7d c0015d88 beq flash_sm_erase_sector ,spid_flash_erase_sector 
+5d7e c001dd90 beq flash_sm_wait_erase_sector ,spid_flash_wait_erase_sector 
+5d7f c0025d94 beq flash_sm_write_data ,spid_flash_write_data 
+5d80 c002dd9a beq flash_sm_wait_write_data ,spid_flash_wait_write_data 
+5d81 20600000 rtn 
+
+spid_flash_write_start:
+5d82 67e1c4a7 store 3 ,mem_spi_write_addr 
+5d83 1a227e00 copy rega ,pdata 
+5d84 67e144aa store 2 ,mem_spi_write_ptr 
+5d85 604944ac storet 2 ,mem_spi_write_len 
+5d86 7044ae02 jam flash_sm_erase_sector ,mem_spi_write_flash_sm 
+5d87 20205daf branch spid_init_flash 
+
+spid_flash_erase_sector:
+5d88 20405daf call spid_init_flash 
+5d89 7044ae03 jam flash_sm_wait_erase_sector ,mem_spi_write_flash_sm 
+5d8a 20405db4 call spid_unlock_flash 
+5d8b da2002e2 arg mem_spid_tbuf ,rega 
+5d8c 70808804 jam 4 ,core_spid_txlen 
+5d8d 6fe1c4a7 fetch 3 ,mem_spi_write_addr 
+5d8e d8400020 arg flash_command_sector_erase ,temp 
+5d8f 20205dc5 branch spid_write_flash_common 
+
+spid_flash_wait_erase_sector:
+5d90 20405daf call spid_init_flash 
+5d91 20405de8 call wait_spid_flash_done 
+5d92 7044ae04 jam flash_sm_write_data ,mem_spi_write_flash_sm 
+5d93 20600000 rtn 
+
+spid_flash_write_data:
+5d94 20405daf call spid_init_flash 
+5d95 7044ae05 jam flash_sm_wait_write_data ,mem_spi_write_flash_sm 
+5d96 20405db4 call spid_unlock_flash 
+5d97 20405da7 call spid_flash_data_preserve 
+5d98 20405dc1 call spid_write_flash 
+5d99 20205da2 branch spid_flash_data_recover 
+
+spid_flash_wait_write_data:
+5d9a 20405daf call spid_init_flash 
+5d9b 20405db4 call spid_unlock_flash 
+5d9c 58000005 setarg flash_read_satus 
+5d9d 20405d65 call spid_read_reg 
+5d9e c3800000 rtnbit1 flash_status_wip 
+5d9f 7044ae00 jam flash_sm_no_buys ,mem_spi_write_flash_sm 
+5da0 6fe14473 fetch 2 ,mem_cb_spi_flash_write_complate 
+5da1 20207e7a branch callback_func 
+
+spid_flash_data_recover:
+5da2 6fe20964 fetch 4 ,mem_temp 
+5da3 684944aa fetcht 2 ,mem_spi_write_ptr 
+
+spid_flash_data_recover_comm:
+5da4 184085fc increase -4 ,temp 
+5da5 e7e20002 istore 4 ,temp 
+5da6 20600000 rtn 
+
+spid_flash_data_preserve:
+5da7 684944aa fetcht 2 ,mem_spi_write_ptr 
+5da8 18422200 copy temp ,rega 
+5da9 184085fc increase -4 ,temp 
+5daa efe20002 ifetch 4 ,temp 
+5dab 67e20964 store 4 ,mem_temp 
+5dac 684944ac fetcht 2 ,mem_spi_write_len 
+5dad 6fe1c4a7 fetch 3 ,mem_spi_write_addr 
+5dae 20600000 rtn 
+
+spid_init_flash:
+5daf 20405e13 call spi_gpio_init 
+5db0 20405b62 call twspi_disable 
+5db1 58000000 setarg 0 
+5db2 67e202e2 store 4 ,mem_spid_tbuf 
+5db3 20600000 rtn 
+
+spid_unlock_flash:
+5db4 7002e206 jam flash_command_write_enable ,mem_spid_tbuf 
+
+spid_sendcmd_common:
+5db5 58000000 setarg 0 
+5db6 67f1008e store 2 ,core_spid_rxlen 
+5db7 58000001 setarg 1 
+5db8 67f10088 store 2 ,core_spid_txlen 
+5db9 580002e2 setarg mem_spid_tbuf 
+5dba 67f1008a store 2 ,core_spid_txaddr 
+5dbb 70800602 jam spid_start ,core_misc_ctrl 
+5dbc 20205d6e branch wait_spid_done 
+
+spid_flash_release_form_powerdown:
+5dbd 7002e2ab jam flash_command_release_from_powerdown ,mem_spid_tbuf 
+5dbe 20205db5 branch spid_sendcmd_common 
+
+spid_flash_powerdown:
+5dbf 7002e2b9 jam flash_command_powerdown ,mem_spid_tbuf 
+5dc0 20205db5 branch spid_sendcmd_common 
+
+spid_write_flash:
+5dc1 18408404 increase 4 ,temp 
+5dc2 60590088 storet 2 ,core_spid_txlen 
+5dc3 d8400002 arg flash_command_write_data ,temp 
+5dc4 1a20a3fc increase -4 ,rega 
+
+spid_write_flash_common:
+5dc5 e0408011 istoret 1 ,rega 
+5dc6 1ff10400 rshift16 pdata ,temp 
+5dc7 e0408005 istoret 1 ,contw 
+5dc8 1fec8400 rshift8 pdata ,temp 
+5dc9 e0408005 istoret 1 ,contw 
+5dca e7e08005 istore 1 ,contw 
+5dcb 1a227e00 deposit rega 
+5dcc 67f1008a store 2 ,core_spid_txaddr 
+5dcd 58000000 setarg 0 
+5dce 67f1008e store 2 ,core_spid_rxlen 
+5dcf 70800602 jam spid_start ,core_misc_ctrl 
+5dd0 20405d6e call wait_spid_done 
+5dd1 20205de8 branch wait_spid_flash_done 
+
+spid_read_flash:
+5dd2 6059008e storet 2 ,core_spid_rxlen 
+5dd3 1ff10400 rshift16 pdata ,temp 
+5dd4 604882e3 storet 1 ,mem_addr_hi 
+5dd5 1fec8400 rshift8 pdata ,temp 
+5dd6 604882e4 storet 1 ,mem_addr_mi 
+5dd7 67e082e5 store 1 ,mem_addr_lo 
+5dd8 58000004 setarg 4 
+5dd9 67f10088 store 2 ,core_spid_txlen 
+5dda 7002e203 jam flash_command_read_data ,mem_spid_tbuf 
+5ddb 580002e2 setarg mem_spid_tbuf 
+5ddc 67f1008a store 2 ,core_spid_txaddr 
+5ddd 1a227e00 deposit rega 
+5dde 67f1008c store 2 ,core_spid_rxaddr 
+5ddf 6ff08086 fetch 1 ,core_spid_ctrl 
+5de0 2a2c000f isolate0 15 ,rega 
+5de1 7920fe06 setflag true ,6 ,pdata 
+5de2 67f08086 store 1 ,core_spid_ctrl 
+5de3 70800602 jam spid_start ,core_misc_ctrl 
+
+spid_read_flash_wait:
+5de4 6ff0812c fetch 1 ,core_dma_status 
+5de5 c283dde4 bbit1 7 ,spid_read_flash_wait 
+5de6 d8e00003 arg spid_done ,queue 
+5de7 20205d6e branch wait_spid_done 
+
+wait_spid_flash_done:
+5de8 580007d0 setarg 2000 
+5de9 2040137f call sleep 
+5dea 20405db4 call spid_unlock_flash 
+5deb 580002e7 setarg mem_spid_rbuf 
+5dec 67f1008c store 2 ,core_spid_rxaddr 
+5ded 58000005 setarg flash_read_satus 
+5dee 20405d65 call spid_read_reg 
+5def c2805de8 bbit1 flash_status_wip ,wait_spid_flash_done 
+5df0 20600000 rtn 
+
+spid_load_flash:
+5df1 6059008e storet 2 ,core_spid_rxlen 
+5df2 58000004 setarg 4 
+5df3 67f10088 store 2 ,core_spid_txlen 
+5df4 7002e203 jam 3 ,mem_spid_tbuf 
+5df5 580002e2 setarg mem_spid_tbuf 
+5df6 67f1008a store 2 ,core_spid_txaddr 
+5df7 1a227e00 deposit rega 
+5df8 67f1008c store 2 ,core_spid_rxaddr 
+5df9 6ff08086 fetch 1 ,core_spid_ctrl 
+5dfa 2a2c000f isolate0 15 ,rega 
+5dfb 7920fe06 setflag true ,6 ,pdata 
+5dfc 67f08086 store 1 ,core_spid_ctrl 
+5dfd 70800602 jam spid_start ,core_misc_ctrl 
+
+spi_load_flash_wait:
+5dfe 6ff0812c fetch 1 ,core_dma_status 
+5dff c283ddfe bbit1 7 ,spi_load_flash_wait 
+5e00 d8e00003 arg spid_done ,queue 
+5e01 20405c99 call decrypt_code 
+5e02 20405d6e call wait_spid_done 
+5e03 2feffe02 isolate1 spid_crcok ,pdata 
+5e04 20405c92 call set_ucode_status 
+5e05 6fe082e3 fetch 1 ,mem_addr_hi 
+5e06 1ff02400 lshift16 pdata ,regb 
+5e07 6fe082e4 fetch 1 ,mem_addr_mi 
+5e08 1fed7e00 lshift8 pdata ,pdata 
+5e09 9a41a400 ior regb ,regb 
+5e0a 6fe082e5 fetch 1 ,mem_addr_lo 
+5e0b 9a41fe00 ior regb ,pdata 
+5e0c 9840fe00 iadd temp ,pdata 
+5e0d 67e082e5 store 1 ,mem_addr_lo 
+5e0e 1fecfe00 rshift8 pdata ,pdata 
+5e0f 67e082e4 store 1 ,mem_addr_mi 
+5e10 1fecfe00 rshift8 pdata ,pdata 
+5e11 67e082e3 store 1 ,mem_addr_hi 
+5e12 20600000 rtn 
+
+spi_gpio_init:
+5e13 6fe0c4b7 fetch 1 ,mem_spi_cs_gpio 
+5e14 6848c4b9 fetcht 1 ,mem_spi_so_gpio 
+5e15 98467c00 isub temp ,null 
+5e16 2422de18 nbranch spi_pin_set ,zero 
+5e17 20405e24 call spi_gpio_default_init 
+
+spi_pin_set:
+5e18 6fe0c4b7 fetch 1 ,mem_spi_cs_gpio 
+5e19 d8400020 arg gpcfg_spid_ncs ,temp 
+5e1a 2040612c call gpio_config_function_int 
+5e1b 6fe0c4ba fetch 1 ,mem_spi_sclk_gpio 
+5e1c d8400021 arg gpcfg_spid_sck ,temp 
+5e1d 2040612c call gpio_config_function_int 
+5e1e 6fe0c4b8 fetch 1 ,mem_spi_si_gpio 
+5e1f d8400022 arg gpcfg_spid_mosi ,temp 
+5e20 2040612c call gpio_config_function_int 
+5e21 6fe0c4b9 fetch 1 ,mem_spi_so_gpio 
+5e22 d840001f arg gpcfg_spid_miso ,temp 
+5e23 2020612c branch gpio_config_function_int 
+
+spi_gpio_default_init:
+5e24 58100d0e setarg 0x100d0e 
+5e25 67e1c4b7 store 3 ,mem_spi_cs_gpio 
+5e26 5812110f setarg 0x12110f 
+5e27 e7e18005 istore 3 ,contw 
+5e28 20600000 rtn 
+
+soft_reset_chip:
+5e29 70801001 jam 1 ,core_reset 
+5e2a 20600000 rtn 
+
+iic_init_600khz:
+5e2b 70809105 jam 5 ,core_iicd_scl_low 
+5e2c 70809207 jam 7 ,core_iicd_scl_high 
+5e2d 70809307 jam 7 ,core_iicd_start_setup 
+5e2e 70809407 jam 7 ,core_iicd_start_hold 
+5e2f 70809507 jam 7 ,core_iicd_stop_setup 
+5e30 70809605 jam 5 ,core_iicd_data_setup 
+5e31 70809700 jam 0 ,core_iicd_data_hold 
+5e32 20600000 rtn 
+
+iic_init_360khz:
+5e33 7080910c jam 12 ,core_iicd_scl_low 
+5e34 7080920d jam 13 ,core_iicd_scl_high 
+5e35 7080930d jam 13 ,core_iicd_start_setup 
+5e36 7080940d jam 13 ,core_iicd_start_hold 
+5e37 7080950d jam 13 ,core_iicd_stop_setup 
+5e38 7080960c jam 12 ,core_iicd_data_setup 
+5e39 70809700 jam 0 ,core_iicd_data_hold 
+5e3a 20600000 rtn 
+
+iicd_init_pin:
+5e3b 20405e70 call iicd_eeprom_write_enable 
+
+iicd_init_pin_scl_sda:
+5e3c 6fe0c4c4 fetch 1 ,mem_eeprom_scl_gpio 
+5e3d d840006c arg gpcfg_iic_scl | gpcfg_pullup ,temp 
+5e3e 2040612c call gpio_config_function_int 
+5e3f 6fe0c4c5 fetch 1 ,mem_eeprom_sda_gpio 
+5e40 d840006d arg gpcfg_iic_sda | gpcfg_pullup ,temp 
+5e41 2020612c branch gpio_config_function_int 
+
+iicd_read_init_pin:
+5e42 20405e77 call iicd_eeprom_write_disable 
+5e43 20205e3c branch iicd_init_pin_scl_sda 
+
+wait_iicd_done:
+5e44 6ff0812c fetch 1 ,core_dma_status 
+5e45 c302de44 bbit0 iicd_done ,wait_iicd_done 
+5e46 20600000 rtn 
+
+iicd_read_data:
+5e47 67e082e6 store 1 ,mem_iicd_addr 
+5e48 580002e6 setarg mem_iicd_addr 
+5e49 67f1009a store 2 ,core_iicd_txaddr 
+5e4a 58000001 setarg 1 
+5e4b 67f10098 store 2 ,core_iicd_txlen 
+5e4c 6059009e storet 2 ,core_iicd_rxlen 
+5e4d 6231009c storer rega ,2 ,core_iicd_rxaddr 
+5e4e 70809001 jam 1 ,core_iicd_ctrl 
+5e4f 70800604 jam iicd_start ,core_misc_ctrl 
+5e50 20205e44 branch wait_iicd_done 
+
+iic_write_data:
+5e51 58000000 setarg 0 
+5e52 67f1009e store 2 ,core_iicd_rxlen 
+5e53 67f1009c store 2 ,core_iicd_rxaddr 
+5e54 60590098 storet 2 ,core_iicd_txlen 
+5e55 6231009a storer rega ,2 ,core_iicd_txaddr 
+5e56 70809001 jam 1 ,core_iicd_ctrl 
+5e57 70800604 jam iicd_start ,core_misc_ctrl 
+5e58 20205e44 branch wait_iicd_done 
+
+set_eeprom_size_2k:
+5e59 79200028 set1 mark_eeprom_size ,mark 
+5e5a 70448508 jam 0x08 ,mem_eeprom_block_size 
+5e5b 20600000 rtn 
+
+clear_eeprom_size_2k:
+5e5c 793f8028 set0 mark_eeprom_size ,mark 
+5e5d 70448520 jam 0x20 ,mem_eeprom_block_size 
+5e5e 20600000 rtn 
+
+iicd_read_eep_data_size_2k:
+5e5f 6fe0c47b fetch 1 ,mem_eeprom_base 
+5e60 9a40fe00 iadd regb ,pdata 
+5e61 67e082e4 store 1 ,mem_addr_mi 
+5e62 20205e66 branch iicd_read_eep_size_2k 
+
+iicd_read_eep_size_2k_lcadcode:
+5e63 6fe102e4 fetch 2 ,mem_addr_mi 
+5e64 1ff0fe00 byteswap pdata ,pdata 
+5e65 67e082e4 store 1 ,mem_addr_mi 
+
+iicd_read_eep_size_2k:
+5e66 58000003 setarg 3 
+5e67 67f10098 store 2 ,core_iicd_txlen 
+5e68 7002e3a0 jam 0xa0 ,mem_iicd_tbuf 
+5e69 7002e5a1 jam 0xa1 ,mem_iicd_tbuf + 2 
+5e6a 20205e85 branch iicd_read_eep_common 
+
+iicd_write_protect_eep_data:
+5e6b 60490964 storet 2 ,mem_temp 
+5e6c 20405e70 call iicd_eeprom_write_enable 
+5e6d 68490964 fetcht 2 ,mem_temp 
+5e6e 20405e9f call iicd_write_eep_data 
+5e6f 20205e77 branch iicd_eeprom_write_disable 
+
+iicd_eeprom_write_enable:
+5e70 6fe0c4c3 fetch 1 ,mem_eeprom_wp_gpio 
+5e71 c17f8000 rtneq gpio_disable 
+5e72 c3035e75 bbit0 6 ,iicd_wp_gpio_output_low 
+5e73 580249f0 setarg 150000 
+5e74 2040137f call sleep 
+
+iicd_wp_gpio_output_low:
+5e75 6848c4c3 fetcht 1 ,mem_eeprom_wp_gpio 
+5e76 2020610d branch gpio_out_active 
+
+iicd_eeprom_write_disable:
+5e77 6848c4c3 fetcht 1 ,mem_eeprom_wp_gpio 
+5e78 20206109 branch gpio_out_inactive 
+
+iicd_read_eep_data:
+5e79 4711c024 bpatchx patch24_3 ,mem_patch24 
+5e7a c5145e5f bmark1 mark_eeprom_size ,iicd_read_eep_data_size_2k 
+5e7b 6fe1447b fetch 2 ,mem_eeprom_base 
+5e7c 9a40fe00 iadd regb ,pdata 
+5e7d 1ff0fe00 byteswap pdata ,pdata 
+5e7e 67e102e4 store 2 ,mem_addr_mi 
+
+iicd_read_eep:
+5e7f 47124024 bpatchx patch24_4 ,mem_patch24 
+5e80 c5145e63 bmark1 mark_eeprom_size ,iicd_read_eep_size_2k_lcadcode 
+5e81 58000004 setarg 4 
+5e82 67f10098 store 2 ,core_iicd_txlen 
+5e83 7002e3a0 jam 0xa0 ,mem_iicd_tbuf 
+5e84 7002e6a1 jam 0xa1 ,mem_iicd_tbuf + 3 
+
+iicd_read_eep_common:
+5e85 580002e3 setarg mem_iicd_tbuf 
+5e86 67f1009a store 2 ,core_iicd_txaddr 
+5e87 6059009e storet 2 ,core_iicd_rxlen 
+5e88 6231009c storer rega ,2 ,core_iicd_rxaddr 
+5e89 58000002 setarg 2 
+5e8a 2a2c000f isolate0 15 ,rega 
+5e8b 7920fe00 setflag true ,0 ,pdata 
+5e8c 67f08090 store 1 ,core_iicd_ctrl 
+5e8d 70800604 jam iicd_start ,core_misc_ctrl 
+5e8e d8e00005 arg iicd_done ,queue 
+5e8f 20405c99 call decrypt_code 
+5e90 20405e44 call wait_iicd_done 
+5e91 2feffe04 isolate1 iicd_crcok ,pdata 
+5e92 20405c92 call set_ucode_status 
+5e93 c5145e9a bmark1 mark_eeprom_size ,iicd_read_eep_load_code_size_2k 
+5e94 6fe102e4 fetch 2 ,mem_addr_mi 
+5e95 1ff0fe00 byteswap pdata ,pdata 
+5e96 9840fe00 iadd temp ,pdata 
+5e97 1ff0fe00 byteswap pdata ,pdata 
+5e98 67e102e4 store 2 ,mem_addr_mi 
+5e99 20600000 rtn 
+
+iicd_read_eep_load_code_size_2k:
+5e9a 6fe082e4 fetch 1 ,mem_addr_mi 
+5e9b 9840fe00 iadd temp ,pdata 
+5e9c 1ff0fe00 byteswap pdata ,pdata 
+5e9d 67e102e4 store 2 ,mem_addr_mi 
+5e9e 20600000 rtn 
+
+iicd_write_eep_data:
+5e9f 6fe1447b fetch 2 ,mem_eeprom_base 
+5ea0 9a40fe00 iadd regb ,pdata 
+
+iicd_write_ota_data:
+5ea1 67e1095c store 2 ,mem_pdatatemp 
+5ea2 4712c024 bpatchx patch24_5 ,mem_patch24 
+5ea3 60490964 storet 2 ,mem_temp 
+5ea4 6221097b storer rega ,2 ,mem_contr 
+
+iicd_write_eep_loop:
+5ea5 20405eb4 call iicd_eep_transparency 
+5ea6 68490974 fetcht 2 ,mem_regb 
+5ea7 6a21097b fetchr rega ,2 ,mem_contr 
+5ea8 6fe1095c fetch 2 ,mem_pdatatemp 
+5ea9 20405ed5 call iicd_write_eep 
+5eaa 6fe10974 fetch 2 ,mem_regb 
+5eab 6849097b fetcht 2 ,mem_contr 
+5eac 98408400 iadd temp ,temp 
+5ead 6049097b storet 2 ,mem_contr 
+5eae 6849095c fetcht 2 ,mem_pdatatemp 
+5eaf 98408400 iadd temp ,temp 
+5eb0 6049095c storet 2 ,mem_pdatatemp 
+5eb1 6fe10964 fetch 2 ,mem_temp 
+5eb2 243a5ea5 nbranch iicd_write_eep_loop ,blank 
+5eb3 20600000 rtn 
+
+iicd_eep_transparency:
+5eb4 47134024 bpatchx patch24_6 ,mem_patch24 
+5eb5 6fe0c485 fetch 1 ,mem_eeprom_block_size 
+5eb6 1fe0ffff increase -1 ,pdata 
+5eb7 6849095c fetcht 2 ,mem_pdatatemp 
+5eb8 9841fe00 ior temp ,pdata 
+5eb9 1fe0fe01 increase 1 ,pdata 
+5eba 67e18978 store 3 ,mem_regc 
+5ebb 6fe10964 fetch 2 ,mem_temp 
+5ebc 9840fe00 iadd temp ,pdata 
+5ebd 68498978 fetcht 3 ,mem_regc 
+5ebe 98467e00 isub temp ,pdata 
+5ebf 24215ec6 nbranch iicd_eep_deal_short_packet ,positive 
+5ec0 67e10964 store 2 ,mem_temp 
+5ec1 6fe18978 fetch 3 ,mem_regc 
+5ec2 6849095c fetcht 2 ,mem_pdatatemp 
+5ec3 98467e00 isub temp ,pdata 
+5ec4 67e10974 store 2 ,mem_regb 
+5ec5 20600000 rtn 
+
+iicd_eep_deal_short_packet:
+5ec6 6fe10964 fetch 2 ,mem_temp 
+5ec7 67e10974 store 2 ,mem_regb 
+5ec8 58000000 setarg 0 
+5ec9 67e10964 store 2 ,mem_temp 
+5eca 20600000 rtn 
+
+iicd_write_eep_size_2k:
+5ecb 1a427e00 copy regb ,pdata 
+5ecc 18408402 increase 2 ,temp 
+5ecd 60590098 storet 2 ,core_iicd_txlen 
+5ece 1a20a3fe increase -2 ,rega 
+5ecf e8418011 ifetcht 3 ,rega 
+5ed0 18422400 copy temp ,regb 
+5ed1 d84000a0 arg 0xa0 ,temp 
+5ed2 e0408011 istoret 1 ,rega 
+5ed3 e7e08005 istore 1 ,contw 
+5ed4 20205ee2 branch iicd_write_eep_common 
+
+iicd_write_eep:
+5ed5 1fe22400 copy pdata ,regb 
+5ed6 4713c024 bpatchx patch24_7 ,mem_patch24 
+5ed7 c5145ecb bmark1 mark_eeprom_size ,iicd_write_eep_size_2k 
+5ed8 1a427e00 copy regb ,pdata 
+5ed9 18408403 increase 3 ,temp 
+5eda 60590098 storet 2 ,core_iicd_txlen 
+5edb 1a20a3fd increase -3 ,rega 
+5edc e8418011 ifetcht 3 ,rega 
+5edd 18422400 copy temp ,regb 
+5ede d84000a0 arg 0xa0 ,temp 
+5edf e0408011 istoret 1 ,rega 
+5ee0 1ff0fe00 byteswap pdata ,pdata 
+5ee1 e7e10005 istore 2 ,contw 
+
+iicd_write_eep_common:
+5ee2 6231009a storer rega ,2 ,core_iicd_txaddr 
+5ee3 58000000 setarg 0 
+5ee4 67f1009e store 2 ,core_iicd_rxlen 
+5ee5 70809001 jam 1 ,core_iicd_ctrl 
+5ee6 70800604 jam iicd_start ,core_misc_ctrl 
+5ee7 20405e44 call wait_iicd_done 
+5ee8 e2418011 istorer regb ,3 ,rega 
+
+iic_check_eeprom_standby:
+5ee9 47144025 bpatchx patch25_0 ,mem_patch25 
+5eea 7002e600 jam 0 ,mem_iicd_tbuf + 3 
+
+iic_check_eeprom_standby_wait:
+5eeb 58000001 setarg 1 
+5eec 67f10098 store 2 ,core_iicd_txlen 
+5eed 7002e3a0 jam 0xa0 ,mem_iicd_tbuf 
+5eee 580002e3 setarg mem_iicd_tbuf 
+5eef 67f1009a store 2 ,core_iicd_txaddr 
+5ef0 58000000 setarg 0 
+5ef1 67f1009e store 2 ,core_iicd_rxlen 
+5ef2 67f1009c store 2 ,core_iicd_rxaddr 
+5ef3 58000003 setarg 3 
+5ef4 67f08090 store 1 ,core_iicd_ctrl 
+5ef5 70800604 jam iicd_start ,core_misc_ctrl 
+5ef6 20405e44 call wait_iicd_done 
+5ef7 6ff0812c fetch 1 ,core_dma_status 
+5ef8 c4030000 rtnbit0 iicd_ack 
+5ef9 200005dc nop 1500 
+5efa 6fe082e6 fetch 1 ,mem_iicd_tbuf + 3 
+5efb 1fe0fe01 increase 1 ,pdata 
+5efc 67e082e6 store 1 ,mem_iicd_tbuf + 3 
+5efd 1fe67c28 sub pdata ,40 ,null 
+5efe 24610000 nrtn positive 
+5eff 20205eeb branch iic_check_eeprom_standby_wait 
+
+efuse_read_data:
+5f00 18427200 copy temp ,loopcnt 
+5f01 1fe20400 copy pdata ,temp 
+5f02 4714c025 bpatchx patch25_1 ,mem_patch25 
+5f03 18498400 lshift3 temp ,temp 
+5f04 20405f3c call efuse_vdd_on 
+5f05 70804780 jam 0x80 ,core_efuse_ctrl 
+
+efuse_read_loop:
+5f06 70804786 jam 0x86 ,core_efuse_ctrl 
+5f07 60590045 storet 2 ,core_efuse_addr 
+5f08 18408408 increase 8 ,temp 
+5f09 70804787 jam 0x87 ,core_efuse_ctrl 
+5f0a 6ff08007 fetch 1 ,core_efuse_rdata 
+5f0b e7e08011 istore 1 ,rega 
+5f0c 1a20a201 increase 1 ,rega 
+5f0d c2005f06 loop efuse_read_loop 
+5f0e 70804786 jam 0x86 ,core_efuse_ctrl 
+5f0f 70804780 jam 0x80 ,core_efuse_ctrl 
+5f10 70804700 jam 0x0 ,core_efuse_ctrl 
+5f11 20205f44 branch efuse_vdd_off 
+
+efuse_program:
+5f12 20405f34 call efuse_vdd_fsource_on 
+5f13 70804780 jam 0x80 ,core_efuse_ctrl 
+5f14 18498400 lshift3 temp ,temp 
+5f15 1a220c00 copy rega ,contr 
+
+efuse_program_loop:
+5f16 efe08006 ifetch 1 ,contr 
+5f17 da400008 arg 8 ,regb 
+
+efuse_program_bit_loop:
+5f18 1fe17c01 and pdata ,1 ,null 
+5f19 2442df50 ncall efuse_program_bit ,zero 
+5f1a 1fe37e00 rshift pdata ,pdata 
+5f1b 18408401 increase 1 ,temp 
+5f1c 1a40a5ff increase -1 ,regb 
+5f1d 2422df18 nbranch efuse_program_bit_loop ,zero 
+5f1e c2005f16 loop efuse_program_loop 
+5f1f 70804780 jam 0x80 ,core_efuse_ctrl 
+5f20 70804700 jam 0x0 ,core_efuse_ctrl 
+5f21 20205f44 branch efuse_vdd_off 
+
+efuse_pa_vdd_set:
+5f22 6ff10a14 fetch 2 ,core_rf_ldo_cfg8 
+5f23 67e1095c store 2 ,mem_pdatatemp 
+5f24 708a146a jam 0x6a ,core_rf_ldo_cfg8 
+5f25 708a150b jam 0x0b ,core_rf_ldo_cfg9 
+5f26 20600000 rtn 
+
+efuse_pa_vdd_recover:
+5f27 6fe1095c fetch 2 ,mem_pdatatemp 
+5f28 67f10a14 store 2 ,core_rf_ldo_cfg8 
+5f29 20600000 rtn 
+
+efuse_lna_pa_ldo_on:
+5f2a 20405f22 call efuse_pa_vdd_set 
+5f2b 6ff08a0a fetch 1 ,core_rf_ldo_en0 
+5f2c 79207e01 set1 1 ,pdata 
+5f2d 67f08a0a store 1 ,core_rf_ldo_en0 
+5f2e 200000c8 nop 200 
+5f2f 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5f30 79207e00 set1 0 ,pdata 
+5f31 67f08a0b store 1 ,core_rf_ldo_en1 
+5f32 200007d0 nop 2000 
+5f33 20600000 rtn 
+
+efuse_vdd_fsource_on:
+5f34 20405f2a call efuse_lna_pa_ldo_on 
+5f35 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5f36 793ffe05 set0 5 ,pdata 
+5f37 79207e04 set1 4 ,pdata 
+5f38 79207e03 set1 3 ,pdata 
+5f39 67f08a0b store 1 ,core_rf_ldo_en1 
+5f3a 200001f4 nop 500 
+5f3b 20600000 rtn 
+
+efuse_vdd_on:
+5f3c 20405f2a call efuse_lna_pa_ldo_on 
+5f3d 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5f3e 79207e05 set1 5 ,pdata 
+5f3f 79207e04 set1 4 ,pdata 
+5f40 793ffe03 set0 3 ,pdata 
+5f41 67f08a0b store 1 ,core_rf_ldo_en1 
+5f42 200001f4 nop 500 
+5f43 20600000 rtn 
+
+efuse_vdd_off:
+5f44 47154025 bpatchx patch25_2 ,mem_patch25 
+5f45 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5f46 793ffe05 set0 5 ,pdata 
+5f47 793ffe04 set0 4 ,pdata 
+5f48 793ffe03 set0 3 ,pdata 
+5f49 793ffe00 set0 0 ,pdata 
+5f4a 67f08a0b store 1 ,core_rf_ldo_en1 
+5f4b 200000c8 nop 200 
+5f4c 6ff08a0a fetch 1 ,core_rf_ldo_en0 
+5f4d 793ffe01 set0 1 ,pdata 
+5f4e 67f08a0a store 1 ,core_rf_ldo_en0 
+5f4f 20205f27 branch efuse_pa_vdd_recover 
+
+efuse_program_bit:
+5f50 70804780 jam 0x80 ,core_efuse_ctrl 
+5f51 2000000a nop 10 
+5f52 60590045 storet 2 ,core_efuse_addr 
+5f53 70804781 jam 0x81 ,core_efuse_ctrl 
+5f54 2000006e nop 110 
+5f55 20600000 rtn 
+
+uarta_init_dma_mem:
+5f56 20407ec5 call enable_user 
+5f57 20205f5a branch uart_init_dma_mem 
+
+uartb_init_dma_mem:
+5f58 20407ec7 call disable_user 
+5f59 20205f5a branch uart_init_dma_mem 
+
+uart_init_dma_mem:
+5f5a 1ff10400 rshift16 pdata ,temp 
+5f5b 20545f8d call uarta_init_rx ,user 
+5f5c 24545f91 ncall uartb_init_rx ,user 
+5f5d 1fef7e00 rshift32 pdata ,pdata 
+5f5e 1ff10400 rshift16 pdata ,temp 
+5f5f 20545f85 call uarta_init_tx ,user 
+5f60 24545f89 ncall uartb_init_tx ,user 
+5f61 24345f66 nbranch uartb_init_dma_turn_on_clk ,user 
+5f62 6ff10050 fetch 2 ,core_clkoff 
+5f63 793ffe0f set0 clock_off_uart ,pdata 
+5f64 67f10050 store 2 ,core_clkoff 
+5f65 20600000 rtn 
+
+uartb_init_dma_turn_on_clk:
+5f66 6ff10050 fetch 2 ,core_clkoff 
+5f67 793ffe0e set0 clock_off_uartb ,pdata 
+5f68 67f10050 store 2 ,core_clkoff 
+5f69 20600000 rtn 
+
+uarta_init_baud_rate:
+5f6a 67f10052 store uart_baud_len ,core_uart_baud 
+5f6b 20600000 rtn 
+
+uartb_init_baud_rate:
+5f6c 67f10062 store uart_baud_len ,core_uartb_baud 
+5f6d 20600000 rtn 
+
+uarta_calc_baud_rate_config:
+5f6e 20405f72 call uart_calc_baud_rate_config 
+5f6f 20205f6a branch uarta_init_baud_rate 
+
+uartb_calc_baud_rate_config:
+5f70 20405f72 call uart_calc_baud_rate_config 
+5f71 20205f6c branch uartb_init_baud_rate 
+
+uart_calc_baud_rate_config:
+5f72 20405f77 call uart_calc_baud_rate_config_choice_uart_clock 
+5f73 9846fc00 idiv temp 
+5f74 20407e64 call wait_div_end 
+5f75 1807fe00 quotient pdata 
+5f76 20600000 rtn 
+
+uart_calc_baud_rate_config_choice_uart_clock:
+5f77 6ff08043 fetch 1 ,core_uart_clksel 
+5f78 c3005f7b bbit0 uart_clock_select_bit ,uart_calc_baud_rate_config_choice_uart_clock_crystal 
+5f79 5adc6c00 setarg uart_clock_freq_48m 
+5f7a 20600000 rtn 
+
+uart_calc_baud_rate_config_choice_uart_clock_crystal:
+5f7b 596e3600 setarg uart_clock_freq_24m 
+5f7c 20600000 rtn 
+
+uart_clock_select_main_freq_crystal:
+5f7d 6ff08043 fetch 1 ,core_uart_clksel 
+5f7e 1fe17efe and pdata ,uart_clock_select_crystal ,pdata 
+5f7f 67f08043 store 1 ,core_uart_clksel 
+5f80 20600000 rtn 
+
+uart_clock_select_main_freq_dpll:
+5f81 6ff08043 fetch 1 ,core_uart_clksel 
+5f82 1fe1fe01 or pdata ,uart_clock_select_dpll ,pdata 
+5f83 67f08043 store 1 ,core_uart_clksel 
+5f84 20600000 rtn 
+
+uarta_init_tx:
+5f85 67f1005a store 2 ,core_uart_tsaddr 
+5f86 67f1005e store 2 ,core_uart_twptr 
+5f87 6059005c storet 2 ,core_uart_teaddr 
+5f88 20600000 rtn 
+
+uartb_init_tx:
+5f89 67f1006a store 2 ,core_uartb_tsaddr 
+5f8a 67f1006e store 2 ,core_uartb_twptr 
+5f8b 6059006c storet 2 ,core_uartb_teaddr 
+5f8c 20600000 rtn 
+
+uarta_init_rx:
+5f8d 67f10054 store 2 ,core_uart_rsaddr 
+5f8e 67f10058 store 2 ,core_uart_rrptr 
+5f8f 60590056 storet 2 ,core_uart_readdr 
+5f90 20600000 rtn 
+
+uartb_init_rx:
+5f91 67f10064 store 2 ,core_uartb_rsaddr 
+5f92 67f10068 store 2 ,core_uartb_rrptr 
+5f93 60590066 storet 2 ,core_uartb_readdr 
+5f94 20600000 rtn 
+
+uarta_prepare_tx:
+5f95 6951005a fetchr contus ,2 ,core_uart_tsaddr 
+5f96 6a11005c fetchr contue ,2 ,core_uart_teaddr 
+5f97 6871005e fetchr contu ,2 ,core_uart_twptr 
+5f98 20600000 rtn 
+
+uartb_prepare_tx:
+5f99 6951006a fetchr contus ,2 ,core_uartb_tsaddr 
+5f9a 6a11006c fetchr contue ,2 ,core_uartb_teaddr 
+5f9b 6871006e fetchr contu ,2 ,core_uartb_twptr 
+5f9c 20600000 rtn 
+
+uarta_prepare_rx:
+5f9d 69510054 fetchr contus ,2 ,core_uart_rsaddr 
+5f9e 6a110056 fetchr contue ,2 ,core_uart_readdr 
+5f9f 68710058 fetchr contu ,2 ,core_uart_rrptr 
+5fa0 20600000 rtn 
+
+uartb_prepare_rx:
+5fa1 69510064 fetchr contus ,2 ,core_uartb_rsaddr 
+5fa2 6a110066 fetchr contue ,2 ,core_uartb_readdr 
+5fa3 68710068 fetchr contu ,2 ,core_uartb_rrptr 
+5fa4 20600000 rtn 
+
+uarta_send:
+5fa5 6071005e storer contu ,2 ,core_uart_twptr 
+5fa6 20600000 rtn 
+
+uartb_send:
+5fa7 6071006e storer contu ,2 ,core_uartb_twptr 
+5fa8 20600000 rtn 
+
+uarta_rxdone:
+5fa9 60710058 storer contu ,2 ,core_uart_rrptr 
+5faa 20600000 rtn 
+
+uartb_rxdone:
+5fab 60710068 storer contu ,2 ,core_uartb_rrptr 
+5fac 20600000 rtn 
+
+uarta_clear_current_rx:
+5fad 20405f9d call uarta_prepare_rx 
+5fae 6ff10112 fetch 2 ,core_uart_rxitems 
+5faf 98608600 iadd contu ,contu 
+5fb0 20205fa9 branch uarta_rxdone 
+
+uartb_clear_current_rx:
+5fb1 20405fa1 call uartb_prepare_rx 
+5fb2 6ff10158 fetch 2 ,core_uartb_rxitems 
+5fb3 98608600 iadd contu ,contu 
+5fb4 20205fab branch uartb_rxdone 
+
+uarta_prepare_tx_register_push:
+5fb5 20405fbd call uart_register_push 
+5fb6 20205f95 branch uarta_prepare_tx 
+
+uartb_prepare_tx_register_push:
+5fb7 20405fbd call uart_register_push 
+5fb8 20205f99 branch uartb_prepare_tx 
+
+uarta_send_register_pop:
+5fb9 20405fa5 call uarta_send 
+5fba 20205fc1 branch uart_register_pop 
+
+uartb_send_register_pop:
+5fbb 20405fa7 call uartb_send 
+5fbc 20205fc1 branch uart_register_pop 
+
+uart_register_push:
+5fbd 60610983 storer contu ,2 ,mem_contu 
+5fbe 61410981 storer contus ,2 ,mem_contue 
+5fbf 6201097f storer contue ,2 ,mem_contus 
+5fc0 20600000 rtn 
+
+uart_register_pop:
+5fc1 68610983 fetchr contu ,2 ,mem_contu 
+5fc2 69410981 fetchr contus ,2 ,mem_contue 
+5fc3 6a01097f fetchr contue ,2 ,mem_contus 
+5fc4 20600000 rtn 
+
+uart_copy_tx_bytes_fast:
+5fc5 1f227e00 deposit loopcnt 
+5fc6 207a0000 rtn blank 
+
+uart_copy_tx_bytes_fast_loop:
+5fc7 1f20f3f8 increase -8 ,loopcnt 
+5fc8 20415fd3 call uart_tx_8_bytes ,positive 
+5fc9 20628000 rtn zero 
+5fca 20215fc7 branch uart_copy_tx_bytes_fast_loop ,positive 
+5fcb 1f20f208 increase 8 ,loopcnt 
+
+uart_copy_tx_bytes_fast_loop_four:
+5fcc 1f20f3fc increase -4 ,loopcnt 
+5fcd 20415fd6 call uart_tx_4_bytes ,positive 
+5fce 20628000 rtn zero 
+5fcf 20215fcc branch uart_copy_tx_bytes_fast_loop_four ,positive 
+5fd0 1f20f204 increase 4 ,loopcnt 
+5fd1 20205fd9 branch uart_copy_tx_bytes 
+
+uart_tx_16_bytes:
+5fd2 20405fd3 call uart_tx_8_bytes 
+
+uart_tx_8_bytes:
+5fd3 efe40006 ifetch 8 ,contr 
+5fd4 e7e40003 istore 8 ,contu 
+5fd5 20600000 rtn 
+
+uart_tx_4_bytes:
+5fd6 efe20006 ifetch 4 ,contr 
+5fd7 e7e20003 istore 4 ,contu 
+5fd8 20600000 rtn 
+
+uart_copy_tx_bytes:
+5fd9 1f227e00 deposit loopcnt 
+5fda 207a0000 rtn blank 
+
+uart_copy_tx_bytes_loop:
+5fdb efe08006 ifetch 1 ,contr 
+5fdc e7e08003 istore 1 ,contu 
+5fdd c2005fdb loop uart_copy_tx_bytes_loop 
+5fde 20600000 rtn 
+
+uart_copy_rx_bytes_fast:
+5fdf 1f227e00 deposit loopcnt 
+5fe0 207a0000 rtn blank 
+
+uart_copy_rx_bytes_fast_loop:
+5fe1 1f20f3f8 increase -8 ,loopcnt 
+5fe2 20415fed call uart_rx_8_bytes ,positive 
+5fe3 20628000 rtn zero 
+5fe4 20215fe1 branch uart_copy_rx_bytes_fast_loop ,positive 
+5fe5 1f20f208 increase 8 ,loopcnt 
+
+uart_copy_rx_bytes_fast_loop_four:
+5fe6 1f20f3fc increase -4 ,loopcnt 
+5fe7 20415ff0 call uart_rx_4_bytes ,positive 
+5fe8 20628000 rtn zero 
+5fe9 20215fe6 branch uart_copy_rx_bytes_fast_loop_four ,positive 
+5fea 1f20f204 increase 4 ,loopcnt 
+5feb 20205ff3 branch uart_copy_rx_bytes 
+
+uart_rx_16_bytes:
+5fec 20405fed call uart_rx_8_bytes 
+
+uart_rx_8_bytes:
+5fed efe40003 ifetch 8 ,contu 
+5fee e7e40005 istore 8 ,contw 
+5fef 20600000 rtn 
+
+uart_rx_4_bytes:
+5ff0 efe20003 ifetch 4 ,contu 
+5ff1 e7e20005 istore 4 ,contw 
+5ff2 20600000 rtn 
+
+uart_copy_rx_bytes:
+5ff3 1f227e00 deposit loopcnt 
+5ff4 207a0000 rtn blank 
+
+uart_copy_rx_bytes_loop:
+5ff5 efe08003 ifetch 1 ,contu 
+5ff6 e7e08005 istore 1 ,contw 
+5ff7 c2005ff5 loop uart_copy_rx_bytes_loop 
+5ff8 20600000 rtn 
+
+app_store_nvram_event:
+5ff9 70095b3d jam bt_evt_store_nvram ,mem_fifo_temp 
+5ffa 202078dc branch ui_ipc_send_event 
+
+check_51cmd_store_reconn_info:
+
+check_51cmd_update_device_record:
+5ffb 4715c025 bpatchx patch25_3 ,mem_patch25 
+5ffc 6fe0c48b fetch 1 ,mem_nv_data_number 
+5ffd 207a0000 rtn blank 
+5ffe 204060a0 call check_nvram 
+5fff 2042e0a6 call init_device_list ,zero 
+6000 20407ecb call disable_user2 
+6001 2040602f call nvram_find_addr_from_bd_list 
+
+write_device_record:
+6002 6fe0c48b fetch 1 ,mem_nv_data_number 
+6003 1fe22600 icopy regc 
+6004 68494489 fetcht 2 ,mem_nv_data_ptr 
+6005 604900ee storet 2 ,mem_list_item_ptr 
+
+write_device_loop_find:
+6006 1a627e00 copy regc ,pdata 
+6007 203a5ff9 branch app_store_nvram_event ,blank 
+6008 1a60a7ff increase -1 ,regc 
+6009 18422200 copy temp ,rega 
+600a efe08011 ifetch 1 ,rega 
+600b 684880e6 fetcht 1 ,mem_select_list_item 
+600c 98467c00 isub temp ,null 
+600d 2042e016 call set_index_finded_device ,zero 
+600e 20216012 branch write_device_loop_find0 ,positive 
+600f efe08011 ifetch 1 ,rega 
+6010 1fe0fe01 increase 1 ,pdata 
+6011 e7e08011 istore 1 ,rega 
+
+write_device_loop_find0:
+6012 684900ee fetcht 2 ,mem_list_item_ptr 
+6013 18408422 increase nv_data_len ,temp 
+6014 604900ee storet 2 ,mem_list_item_ptr 
+6015 20206006 branch write_device_loop_find 
+
+set_index_finded_device:
+6016 58000000 setarg 0 
+6017 e7e08011 istore 1 ,rega 
+6018 6fe080e7 fetch 1 ,mem_temp_reconn_record 
+6019 e7e08005 istore 1 ,contw 
+601a c099e024 bne rec_3_mode ,set_index_finded_device_ble_mode 
+601b da4041cb arg mem_link_key ,regb 
+
+set_index_find_device_master_addr:
+601c efe30006 ifetch 6 ,contr 
+601d e7e40005 istore 8 ,contw 
+601e 58000000 setarg 0 
+601f e7e40005 istore 8 ,contw 
+6020 1a420c00 copy regb ,contr 
+
+store_rec_data_common:
+6021 20407d7f call memcpy16 
+6022 18007c01 force 1 ,null 
+6023 20600000 rtn 
+
+set_index_finded_device_ble_mode:
+6024 c01b6028 beq rec_4_mode_random_resolvable_private_address ,set_index_finded_device_irk 
+6025 c01be02c beq rec_4_mode_random_non_resolvable_private_address ,set_index_finded_device_ediv 
+6026 da404316 arg mem_le_ltk ,regb 
+6027 2020601c branch set_index_find_device_master_addr 
+
+set_index_finded_device_irk:
+6028 d8c043ac arg mem_le_irk ,contr 
+6029 20407d7f call memcpy16 
+
+store_ble_rec_data_common:
+602a d8c04316 arg mem_le_ltk ,contr 
+602b 20206021 branch store_rec_data_common 
+
+set_index_finded_device_ediv:
+602c d8c043a4 arg mem_le_rand ,contr 
+602d 20407d7f call memcpy16 
+602e 2020602a branch store_ble_rec_data_common 
+
+nvram_find_addr_from_bd_list:
+602f 20407ec7 call disable_user 
+6030 6fe0c48b fetch 1 ,mem_nv_data_number 
+6031 207a0000 rtn blank 
+6032 47164025 bpatchx patch25_4 ,mem_patch25 
+6033 6fe1478f fetch 2 ,mem_ui_state_map 
+6034 c2806052 bbit1 ui_state_bt_connected ,find_addr_from_bd_list_spp_mode 
+6035 c4048000 rtnbit0 ui_state_ble_connected 
+
+find_addr_from_bd_list_ble_mode:
+6036 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+6037 c000604b beq master_public_addr ,find_addr_from_bd_list_public_device_addr 
+6038 6fe0829c fetch 1 ,mem_le_plap + 5 
+6039 2fe180c0 compare 0xc0 ,pdata ,0xc0 
+603a 2020e03e branch find_addr_from_bd_list_static_addr ,true 
+603b 2fe18040 compare 0x40 ,pdata ,0xc0 
+603c 2020e050 branch find_addr_from_bd_list_random_addr ,true 
+603d 20206045 branch find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr:
+603e 20366042 branch find_addr_from_bd_list_static_addr_reconnect ,user2 
+603f 6fe0c34e fetch 1 ,mem_le_preq_init_key_distribution 
+6040 c300e04b bbit0 le_initator_irk_bit ,find_addr_from_bd_list_public_device_addr 
+6041 20206045 branch find_addr_from_bd_list_static_addr_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr_reconnect:
+6042 2040604b call find_addr_from_bd_list_public_device_addr 
+6043 20740000 rtn user 
+6044 20206045 branch find_addr_from_bd_list_static_addr_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr_sc_or_legacy:
+
+find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy:
+6045 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+6046 c283e048 bbit1 le_pairing_mode_secure_connect_bit ,find_addr_from_bd_list_random_non_resolvable_private_address_sc 
+6047 2020604e branch find_addr_from_bd_list_random_non_resolvable_private_address 
+
+find_addr_from_bd_list_static_addr_sc:
+
+find_addr_from_bd_list_random_non_resolvable_private_address_sc:
+6048 6fe30297 fetch 6 ,mem_le_plap 
+6049 67e443a4 store 8 ,mem_le_rand 
+604a 2020604e branch find_addr_from_bd_list_random_non_resolvable_private_address 
+
+find_addr_from_bd_list_public_device_addr:
+604b 7000e735 jam rec_4_mode_static_address ,mem_temp_reconn_record 
+604c 6fe30297 fetch 6 ,mem_le_plap 
+604d 20206054 branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_random_non_resolvable_private_address:
+604e 7000e737 jam rec_4_mode_random_non_resolvable_private_address ,mem_temp_reconn_record 
+604f 20206054 branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_random_addr:
+6050 7000e736 jam rec_4_mode_random_resolvable_private_address ,mem_temp_reconn_record 
+6051 20206054 branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_spp_mode:
+6052 7000e733 jam rec_3_mode ,mem_temp_reconn_record 
+6053 6fe30040 fetch 6 ,mem_plap 
+
+find_addr_from_bd_list_common:
+6054 67e300e8 store 6 ,mem_temp_lap 
+6055 6fe14489 fetch 2 ,mem_nv_data_ptr 
+6056 e840803f ifetcht 1 ,pdata 
+6057 1fe0fe01 pincrease 1 
+6058 67e100ee store 2 ,mem_list_item_ptr 
+6059 604880e6 storet 1 ,mem_select_list_item 
+605a 6fe0c48b fetch 1 ,mem_nv_data_number 
+605b 1fe22600 icopy regc 
+
+nvram_find_addr_from_list:
+605c 6fe100ee fetch 2 ,mem_list_item_ptr 
+605d 1fe22200 copy pdata ,rega 
+605e 2040606c call nvram_find_addr_from_list_compare 
+605f 20740000 rtn user 
+6060 684900ee fetcht 2 ,mem_list_item_ptr 
+6061 18408422 increase nv_data_len ,temp 
+6062 604900ee storet 2 ,mem_list_item_ptr 
+6063 184085ff increase -1 ,temp 
+6064 efe08002 ifetch 1 ,temp 
+6065 67e080e6 store 1 ,mem_select_list_item 
+6066 1a60a7ff increase -1 ,regc 
+6067 2422e05c nbranch nvram_find_addr_from_list ,zero 
+6068 6fe0c48b fetch 1 ,mem_nv_data_number 
+6069 1fe0ffff pincrease decreased_one 
+606a 67e080e6 store 1 ,mem_select_list_item 
+606b 20600000 rtn 
+
+nvram_find_addr_from_list_compare:
+606c 6fe080e7 fetch 1 ,mem_temp_reconn_record 
+606d c099e073 bne rec_3_mode ,find_addr_from_list_compare_ble_mode 
+
+find_master_addr_from_list_compare:
+606e da4000e7 arg mem_temp_reconn_record ,regb 
+606f df200007 arg 7 ,loopcnt 
+6070 20407e66 call string_compare 
+6071 2022fec5 branch enable_user ,zero 
+6072 20600000 rtn 
+
+find_addr_from_list_compare_ble_mode:
+6073 c01b6076 beq rec_4_mode_random_resolvable_private_address ,find_irk_form_list_compare 
+6074 c01be091 beq rec_4_mode_random_non_resolvable_private_address ,find_ediv_form_list_compare 
+6075 2020606e branch find_master_addr_from_list_compare 
+
+find_irk_form_list_compare:
+6076 e8408011 ifetcht 1 ,rega 
+6077 98467c00 isub temp ,null 
+6078 24628000 nrtn zero 
+6079 d8a0098e arg mem_le_prand ,contw 
+607a df200010 arg 16 ,loopcnt 
+607b 20407d9b call clear_mem 
+607c 6fe1829a fetch 3 ,mem_le_plap + 3 
+607d 67e1898e store 3 ,mem_le_prand 
+607e 20406088 call genernate_master_macaddress 
+607f 6fe109ab fetch 2 ,mem_le_aes_128 + 13 
+6080 1ff0fe00 byteswap pdata ,pdata 
+6081 1fed0400 lshift8 pdata ,temp 
+6082 efe08006 ifetch 1 ,contr 
+6083 9840fe00 iadd temp ,pdata 
+6084 68498297 fetcht 3 ,mem_le_plap 
+6085 98467c00 isub temp ,null 
+6086 2022fec5 branch enable_user ,zero 
+6087 20600000 rtn 
+
+genernate_master_macaddress:
+6088 d8c0098e arg mem_le_prand ,contr 
+6089 20406e28 call load_data128 
+608a efe08011 ifetch 1 ,rega 
+608b 20406e29 call load_regext 
+608c 18006c38 force 0x38 ,aes_ctrl 
+608d 18006c00 force 0x0 ,aes_ctrl 
+608e 20406dbf call wait_aes 
+608f d8a0099e arg mem_le_aes_128 ,contw 
+6090 20206e3c branch store_aes_result 
+
+find_ediv_form_list_compare:
+6091 e8408011 ifetcht 1 ,rega 
+6092 98467c00 isub temp ,null 
+6093 24628000 nrtn zero 
+6094 18c22200 copy contr ,rega 
+6095 18c0a608 add contr ,8 ,regc 
+6096 da4043a4 arg mem_le_rand ,regb 
+6097 df200008 arg 8 ,loopcnt 
+6098 20407e66 call string_compare 
+6099 2022fec5 branch enable_user ,zero 
+609a 1a622200 copy regc ,rega 
+609b da4043ac arg mem_le_irk ,regb 
+609c df200008 arg 8 ,loopcnt 
+609d 20407e66 call string_compare 
+609e 2022fec5 branch enable_user ,zero 
+609f 20600000 rtn 
+
+check_nvram:
+60a0 6fe14489 fetch 2 ,mem_nv_data_ptr 
+60a1 e840803f ifetcht 1 ,pdata 
+60a2 1fe0fe22 pincrease nv_data_len 
+60a3 efe0803f ifetch 1 ,pdata 
+60a4 98467c00 isub temp ,null 
+60a5 20600000 rtn 
+
+init_device_list:
+60a6 6fe0c48b fetch 1 ,mem_nv_data_number 
+60a7 1fe27200 icopy loopcnt 
+60a8 68494489 fetcht 2 ,mem_nv_data_ptr 
+60a9 58000000 setarg 0 
+
+init_device_list_loop:
+60aa e7e08002 istore 1 ,temp 
+60ab 18408422 increase nv_data_len ,temp 
+60ac 1fe0fe01 pincrease 1 
+60ad c20060aa loop init_device_list_loop 
+60ae 20600000 rtn 
+
+load_device_list:
+60af 4716c025 bpatchx patch25_5 ,mem_patch25 
+60b0 20407ec9 call enable_user2 
+60b1 2040602f call nvram_find_addr_from_bd_list 
+60b2 6fe08030 fetch 1 ,mem_state 
+60b3 79347e06 setflag user ,state_combkey ,pdata 
+60b4 67e08030 store 1 ,mem_state 
+60b5 243460ba nbranch clear_key_exists ,user 
+60b6 1a208c0a add rega ,10 ,contr 
+60b7 d8a041cb arg mem_link_key ,contw 
+60b8 20407d7f call memcpy16 
+60b9 202060d0 branch check_link_key_load 
+
+clear_key_exists:
+60ba 7041ca00 jam 0 ,mem_link_key_exists 
+60bb 20600000 rtn 
+
+load_device_list_mode_4:
+60bc 20407ec9 call enable_user2 
+60bd 2040602f call nvram_find_addr_from_bd_list 
+60be 243460c7 nbranch clear_ltk_exists ,user 
+60bf 6fe100ee fetch 2 ,mem_list_item_ptr 
+60c0 1fe08c01 add pdata ,1 ,contr 
+60c1 d8a043ac arg mem_le_irk ,contw 
+60c2 20407d7f call memcpy16 
+60c3 d8a04316 arg mem_le_ltk ,contw 
+60c4 20407d7f call memcpy16 
+60c5 70432601 jam 1 ,mem_ltk_exists 
+60c6 20600000 rtn 
+
+clear_ltk_exists:
+60c7 70432600 jam 0 ,mem_ltk_exists 
+60c8 20600000 rtn 
+
+eeprom_store_le_reconn_info:
+60c9 7000e734 jam rec_4_mode ,mem_record_bt_mode 
+60ca 202060cc branch eeprom_store_reconn_info 
+
+eeprom_store_bd_reconn_info:
+60cb 7000e733 jam rec_3_mode ,mem_record_bt_mode 
+
+eeprom_store_reconn_info:
+60cc 6fe0c09a fetch 1 ,mem_device_option 
+60cd c0055ffb beq dvc_op_module ,check_51cmd_update_device_record 
+60ce c00445c6 beq dvc_op_mouse ,mouse_store_remote_bdaddr 
+60cf 20600000 rtn 
+
+check_link_key_load:
+60d0 6fe441cb fetch 8 ,mem_link_key 
+60d1 684c41d3 fetcht 8 ,mem_link_key + 8 
+60d2 9841fe00 ior temp ,pdata 
+60d3 207a0000 rtn blank 
+60d4 7041ca01 jam 1 ,mem_link_key_exists 
+60d5 20600000 rtn 
+
+gpio_set_wake_by_current_state:
+60d6 47174025 bpatchx patch25_6 ,mem_patch25 
+60d7 79200407 set1 gpio_active_bit ,temp 
+60d8 204060fd call gpio_get_bit 
+60d9 7d208407 nsetflag true ,gpio_active_bit ,temp 
+
+gpio_set_wake:
+60da 4717c025 bpatchx patch25_7 ,mem_patch25 
+60db 18467cff sub temp ,ui_button_gpio_disable ,null 
+60dc 20628000 rtn zero 
+60dd 284c0007 isolate0 gpio_active_bit ,temp 
+60de 18410e1f and temp ,0x1f ,queue 
+60df 6fe2009e fetch 4 ,mem_gpio_wakeup_low 
+60e0 f920fe00 qsetflag true ,pdata 
+60e1 67e2009e store 4 ,mem_gpio_wakeup_low 
+60e2 6fe200a2 fetch 4 ,mem_gpio_wakeup_high 
+60e3 fd20fe00 nqsetflag true ,pdata 
+60e4 67e200a2 store 4 ,mem_gpio_wakeup_high 
+60e5 20600000 rtn 
+
+gpio_clr_wake:
+60e6 47184026 bpatchx patch26_0 ,mem_patch26 
+60e7 18467cff sub temp ,ui_button_gpio_disable ,null 
+60e8 20628000 rtn zero 
+60e9 284c0007 isolate0 gpio_active_bit ,temp 
+60ea 18410e1f and temp ,0x1f ,queue 
+60eb 6fe2009e fetch 4 ,mem_gpio_wakeup_low 
+60ec f93ffe00 qset0 pdata 
+60ed 67e2009e store 4 ,mem_gpio_wakeup_low 
+60ee 6fe200a2 fetch 4 ,mem_gpio_wakeup_high 
+60ef f93ffe00 qset0 pdata 
+60f0 67e200a2 store 4 ,mem_gpio_wakeup_high 
+60f1 20600000 rtn 
+
+gpio_config_input_nowake:
+60f2 204060e6 call gpio_clr_wake 
+60f3 202060f7 branch gpio_config_input_without_wake 
+
+gpio_config_input:
+60f4 18467cff sub temp ,ui_button_gpio_disable ,null 
+60f5 20628000 rtn zero 
+60f6 2455e0da ncall gpio_set_wake ,wake 
+
+gpio_config_input_without_wake:
+60f7 20406124 call gpio_addr 
+60f8 58000000 setarg 0 
+60f9 284ffe07 isolate1 gpio_active_bit ,temp 
+60fa 7d20fe06 nsetflag true ,6 ,pdata 
+60fb 7920fe07 setflag true ,7 ,pdata 
+60fc 2020611f branch gpio_write 
+
+gpio_get_bit:
+60fd d8a0811c arg core_gpio_in ,contw 
+60fe 18410e07 and temp ,0x07 ,queue 
+60ff 18497e00 rshift3 temp ,pdata 
+6100 1fe17e03 and_into 3 ,pdata 
+6101 98a08a00 iadd contw ,contw 
+6102 efe08005 ifetch 1 ,contw 
+6103 284ffe07 isolate1 gpio_active_bit ,temp 
+6104 2020e107 branch gpio_get_bit_reverse ,true 
+6105 afec0000 qisolate0 pdata 
+6106 20600000 rtn 
+
+gpio_get_bit_reverse:
+6107 afefffff qisolate1 pdata 
+6108 20600000 rtn 
+
+gpio_out_inactive:
+6109 18467cff sub temp ,ui_button_gpio_disable ,null 
+610a 20628000 rtn zero 
+610b 2fcffe07 isolate1 gpio_active_bit ,null 
+610c 20206110 branch gpio_out_flag 
+
+gpio_config_output:
+
+gpio_out_active:
+610d 18467cff sub temp ,ui_button_gpio_disable ,null 
+610e 20628000 rtn zero 
+610f 2fcc0007 isolate0 gpio_active_bit ,null 
+
+gpio_out_flag:
+6110 58000000 setarg 0 
+6111 7d20fe07 nsetflag true ,gpio_active_bit ,pdata 
+6112 98428400 ixor temp ,temp 
+
+gpio_out:
+6113 20406124 call gpio_addr 
+6114 5800003f setarg gpcfg_output_high 
+6115 284ffe07 isolate1 gpio_active_bit ,temp 
+6116 7920fe00 setflag true ,0 ,pdata 
+6117 2020611f branch gpio_write 
+
+gpio_check_active:
+6118 20406124 call gpio_addr 
+6119 efe08005 ifetch 1 ,contw 
+611a c280611d bbit1 0 ,gpio_check_active_high 
+611b 284c0007 isolate0 gpio_active_bit ,temp 
+611c 20600000 rtn 
+
+gpio_check_active_high:
+611d 284ffe07 isolate1 gpio_active_bit ,temp 
+611e 20600000 rtn 
+
+gpio_write:
+611f e7e08005 istore 1 ,contw 
+6120 20600000 rtn 
+
+gpio_set_high_impedance:
+6121 20406124 call gpio_addr 
+6122 58000000 setarg gpcfg_high_impedance 
+6123 2020611f branch gpio_write 
+
+gpio_addr:
+6124 18417e3f and temp ,0x3f ,pdata 
+6125 d8a08070 arg core_gpio_conf ,contw 
+6126 98a08a00 iadd contw ,contw 
+6127 20600000 rtn 
+
+gpio_config_param:
+6128 1fe104ff and pdata ,0xff ,temp 
+6129 1fecfe00 rshift8 pdata ,pdata 
+612a 2020612c branch gpio_config_function_int 
+
+gpio_config_function:
+612b c4038000 rtnbit0 gpio_active_bit 
+
+gpio_config_function_int:
+612c 1fe17e3f and_into 0x3f ,pdata 
+612d d8a08070 arg core_gpio_conf ,contw 
+612e 98a08a00 iadd contw ,contw 
+612f e0408005 istoret 1 ,contw 
+6130 20600000 rtn 
+
+gpio_get_config:
+6131 1841043f and_into 0x3f ,temp 
+6132 58008070 setarg core_gpio_conf 
+6133 98408c00 iadd temp ,contr 
+6134 efe08006 ifetch 1 ,contr 
+6135 20600000 rtn 
+
+gpio_set_before_lpm:
+6136 df200014 arg 20 ,loopcnt 
+6137 d8c08070 arg core_gpio_conf ,contr 
+
+setgpio_loop:
+6138 18c20a00 copy contr ,contw 
+6139 efe08006 ifetch 1 ,contr 
+613a c001614a beq gpcfg_qspi_ncs ,setgpio_pullup 
+613b c001e14a beq gpcfg_qspi_sck ,setgpio_pullup 
+613c c002614a beq gpcfg_qspi_io0 ,setgpio_pullup 
+613d c002e14a beq gpcfg_qspi_io1 ,setgpio_pullup 
+613e c003614a beq gpcfg_qspi_io2 ,setgpio_pullup 
+613f c003e14a beq gpcfg_qspi_io3 ,setgpio_pullup 
+6140 c00fe14a beq gpcfg_spid_miso ,setgpio_pullup 
+6141 c010614a beq gpcfg_spid_ncs ,setgpio_pullup 
+6142 c010e14a beq gpcfg_spid_sck ,setgpio_pullup 
+6143 c011614a beq gpcfg_spid_mosi ,setgpio_pullup 
+6144 c011e14a beq gpcfg_spid_sdio ,setgpio_pullup 
+6145 c016614a beq gpcfg_iic_scl ,setgpio_pullup 
+6146 c016e14a beq gpcfg_iic_sda ,setgpio_pullup 
+6147 c000614a beq gpcfg_input ,setgpio_pullup 
+
+setgpio_loop_end:
+6148 c2006138 loop setgpio_loop 
+6149 20600000 rtn 
+
+setgpio_pullup:
+614a 58000040 setarg gpcfg_pullup 
+614b e7e08005 istore 1 ,contw 
+614c 20206148 branch setgpio_loop_end 
+
+setgpio_pulldown:
+614d 58000080 setarg gpcfg_pulldown 
+614e e7e08005 istore 1 ,contw 
+614f 20206148 branch setgpio_loop_end 
+
+adc_init_data:
+6150 4718c026 bpatchx patch26_1 ,mem_patch26 
+
+adc_init_cal_data:
+6151 6fe40a34 fetch 8 ,mem_tmp_buffer + efuse_offset_adc 
+6152 203a615d branch adc_init_cal_data_default ,blank 
+6153 d8c00a34 arg mem_tmp_buffer + efuse_offset_adc ,contr 
+6154 d8a04492 arg mem_3v_adc_io_data ,contw 
+6155 df200003 arg 3 ,loopcnt 
+
+adc_init_cal_data_loop:
+6156 efe18006 ifetch 3 ,contr 
+6157 1ff20400 lshift4 pdata ,temp 
+6158 e0410005 istoret 2 ,contw 
+6159 1fec8400 rshift8 pdata ,temp 
+615a e0410005 istoret 2 ,contw 
+615b c2006156 loop adc_init_cal_data_loop 
+615c 20600000 rtn 
+
+adc_init_cal_data_default:
+615d 5800469a setarg 0x469a 
+615e 67e14492 store 2 ,mem_3v_adc_io_data 
+615f 5800ab77 setarg 0xab77 
+6160 67e14498 store 2 ,mem_1v_adc_io_data 
+6161 580073d0 setarg 0x73d0 
+6162 67e1449c store 2 ,mem_3v_adc_vinlpm_data 
+6163 58009658 setarg 0x9658 
+6164 67e14496 store 2 ,mem_2v_adc_vinlpm_data 
+6165 20600000 rtn 
+
+enable_adc:
+6166 47194026 bpatchx patch26_2 ,mem_patch26 
+6167 6a508a12 fetchr regb ,1 ,core_rf_ldo_cfg6 
+6168 708a123d jam 0x3d ,core_rf_ldo_cfg6 
+6169 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+616a 708a0a0c jam 0x0c ,core_rf_ldo_en0 
+616b 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+616c 79207e07 set1 7 ,pdata 
+616d 67f08a09 store 1 ,core_clkpll_cfg6 
+616e 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+616f 2000003c nop 60 
+6170 708a1600 jam 0 ,core_syn_en 
+6171 708a1706 jam 6 ,core_rx_en0 
+6172 20406182 call read_adc_mode 
+6173 67f08a97 store 1 ,core_gpadc_ctrl 
+6174 7080dc03 jam 0x03 ,core_sum_ctrl 
+6175 2000003c nop 60 
+6176 6ff08053 fetch 1 ,core_sum_en 
+6177 79207e07 set1 7 ,pdata 
+6178 67f08053 store 1 ,core_sum_en 
+6179 200003e8 nop 1000 
+617a 6ff10150 fetch 2 ,core_adc_sum 
+617b 67e144a4 store 2 ,mem_adc_current_value 
+617c 6ff08053 fetch 1 ,core_sum_en 
+617d 793ffe07 set0 7 ,pdata 
+617e 67f08053 store 1 ,core_sum_en 
+617f 708a9700 jam 0 ,core_gpadc_ctrl 
+6180 62508a12 storer regb ,1 ,core_rf_ldo_cfg6 
+6181 20600000 rtn 
+
+read_adc_mode:
+6182 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+6183 c0006189 beq adc_config_vinlpm ,adc_mode_vdcdc 
+6184 c000e18b beq adc_config_hvin ,adc_adc_mode_vbat 
+
+adc_check_gpio:
+6185 6fe0c4a3 fetch 1 ,mem_adc_channel 
+6186 1fe9fe00 lshift3 pdata ,pdata 
+6187 1fe1fe07 or pdata ,7 ,pdata 
+6188 20600000 rtn 
+
+adc_mode_vdcdc:
+6189 58000057 setarg 0x57 
+618a 20600000 rtn 
+
+adc_adc_mode_vbat:
+618b 5800004f setarg 0x4f 
+618c 20600000 rtn 
+
+vdd_calculate_by_mode:
+618d 4719c026 bpatchx patch26_3 ,mem_patch26 
+618e 6fe0c4a2 fetch 1 ,mem_adc_config_flag 
+618f c0006193 beq adc_config_vinlpm ,vdd_calculate_vinlpm 
+6190 c000e199 beq adc_config_hvin ,vdd_calculate_hvin 
+6191 c001619f beq adc_config_gpio ,vdd_calculate_io 
+6192 20600000 rtn 
+
+vdd_calculate_vinlpm:
+6193 58000064 setarg 100 
+6194 67e144a0 store 2 ,mem_reference_voltage 
+6195 6849449c fetcht 2 ,mem_3v_adc_vinlpm_data 
+6196 6fe14496 fetch 2 ,mem_2v_adc_vinlpm_data 
+6197 da60012c arg 300 ,regc 
+6198 202061a4 branch vdd_calculate 
+
+vdd_calculate_hvin:
+6199 58000064 setarg 100 
+619a 67e144a0 store 2 ,mem_reference_voltage 
+619b 6849449a fetcht 2 ,mem_3v_adc_hvin_data 
+619c 6fe14494 fetch 2 ,mem_2v_adc_hvin_data 
+619d da60012c arg 300 ,regc 
+619e 202061a4 branch vdd_calculate 
+
+vdd_calculate_io:
+619f 580000c8 setarg 200 
+61a0 67e144a0 store 2 ,mem_reference_voltage 
+61a1 68494492 fetcht 2 ,mem_3v_adc_io_data 
+61a2 6fe14498 fetch 2 ,mem_1v_adc_io_data 
+61a3 da60012c arg 300 ,regc 
+
+vdd_calculate:
+61a4 98462200 isub temp ,rega 
+61a5 6fe144a4 fetch 2 ,mem_adc_current_value 
+61a6 98467e00 isub temp ,pdata 
+61a7 242161b1 nbranch vdd_calculate1 ,positive 
+61a8 684944a0 fetcht 2 ,mem_reference_voltage 
+61a9 984fa400 imul32 temp ,regb 
+61aa 1a627e00 copy regc ,pdata 
+61ab 9a2ffe00 imul32 rega ,pdata 
+61ac 9a467e00 isub regb ,pdata 
+
+vdd_calculate2:
+61ad 9a26fc00 idiv rega 
+61ae 20407e64 call wait_div_end 
+61af 1807fe00 quotient pdata 
+61b0 20600000 rtn 
+
+vdd_calculate1:
+61b1 18427e00 copy temp ,pdata 
+61b2 684944a4 fetcht 2 ,mem_adc_current_value 
+61b3 98467e00 isub temp ,pdata 
+61b4 684944a0 fetcht 2 ,mem_reference_voltage 
+61b5 984fa400 imul32 temp ,regb 
+61b6 1a627e00 copy regc ,pdata 
+61b7 9a2ffe00 imul32 rega ,pdata 
+61b8 9a40fe00 iadd regb ,pdata 
+61b9 202061ad branch vdd_calculate2 
+
+adc_bat_percent_lowpower_out:
+61ba efe40011 ifetch 8 ,rega 
+61bb 67e4095c store 8 ,mem_pdatatemp 
+61bc 6fe1095c fetch 2 ,mem_pdatatemp 
+61bd 6849095e fetcht 2 ,mem_pdatatemp + 2 
+61be 98462200 isub temp ,rega 
+61bf 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+61c0 98462400 isub temp ,regb 
+61c1 68490960 fetcht 2 ,mem_pdatatemp + 4 
+61c2 98467c00 isub temp ,null 
+61c3 244161ca ncall adc_set_low_power_flag ,positive 
+61c4 1a4ffe64 mul32 regb ,100 ,pdata 
+61c5 9a26fc00 idiv rega 
+61c6 20407e64 call wait_div_end 
+61c7 1807fe00 quotient pdata 
+61c8 205a61d2 call adc_set_no_power_flag ,blank 
+61c9 20600000 rtn 
+
+adc_set_low_power_flag:
+61ca 6fe0c4a6 fetch 1 ,mem_adc_power_flag 
+61cb 79207e00 set1 0 ,pdata 
+61cc 67e0c4a6 store 1 ,mem_adc_power_flag 
+61cd 20600000 rtn 
+
+adc_clear_low_power_flag:
+61ce 6fe0c4a6 fetch 1 ,mem_adc_power_flag 
+61cf 793ffe00 set0 0 ,pdata 
+61d0 67e0c4a6 store 1 ,mem_adc_power_flag 
+61d1 20600000 rtn 
+
+adc_set_no_power_flag:
+61d2 6848c4a6 fetcht 1 ,mem_adc_power_flag 
+61d3 79200401 set1 1 ,temp 
+61d4 6048c4a6 storet 1 ,mem_adc_power_flag 
+61d5 20600000 rtn 
+
+adc_clear_no_power_flag:
+61d6 6848c4a6 fetcht 1 ,mem_adc_power_flag 
+61d7 793f8401 set0 1 ,temp 
+61d8 6048c4a6 storet 1 ,mem_adc_power_flag 
+61d9 20600000 rtn 
+
+keyscan_key_init:
+61da 6fe144c8 fetch 2 ,mem_key_num_ptr 
+61db efe0803f ifetch 1 ,pdata 
+
+keyscan_key_init_next:
+61dc 207a0000 rtn blank 
+61dd 1fe27200 copy pdata ,loopcnt 
+61de 6fe144c8 fetch 2 ,mem_keyscan_ptr 
+61df 1fe0fe03 increase 3 ,pdata 
+61e0 1fe22200 copy pdata ,rega 
+
+keyscan_key_init_lp1:
+61e1 e8408011 ifetcht 1 ,rega 
+61e2 204060f4 call gpio_config_input 
+61e3 1a20a201 increase key_conf_struct_len ,rega 
+61e4 c20061e1 loop keyscan_key_init_lp1 
+
+keyscan_key_init_end:
+61e5 20600000 rtn 
+
+keyscan_scan_key:
+61e6 6fe144c8 fetch 2 ,mem_keyscan_ptr 
+61e7 1fe0fe03 increase 3 ,pdata 
+61e8 1fe22200 copy pdata ,rega 
+61e9 18002400 force 0 ,regb 
+61ea 58000000 setarg 0 
+61eb 67e109de store 2 ,mem_key_value_temp 
+
+keyscan_scan_key_lp1:
+61ec e8408011 ifetcht 1 ,rega 
+61ed 204060fd call gpio_get_bit 
+61ee 471a4026 bpatchx patch26_4 ,mem_patch26 
+61ef 6fe109de fetch 2 ,mem_key_value_temp 
+61f0 1a420e00 copy regb ,queue 
+61f1 f920fe00 qsetflag true ,pdata 
+61f2 67e109de store 2 ,mem_key_value_temp 
+61f3 1a20a201 increase key_conf_struct_len ,rega 
+61f4 1a40a401 increase 1 ,regb 
+61f5 6fe144c8 fetch 2 ,mem_key_num_ptr 
+61f6 efe0803f ifetch 1 ,pdata 
+
+keyscan_scan_key_lp1_next:
+61f7 9a42fc00 ixor regb ,null 
+61f8 2422e1ec nbranch keyscan_scan_key_lp1 ,zero 
+61f9 6fe109de fetch 2 ,mem_key_value_temp 
+61fa 684944ca fetcht 2 ,mem_key_value_retention 
+61fb 9842fc00 ixor temp ,null 
+61fc 20628000 rtn zero 
+61fd 78347c00 enable user 
+61fe 20600000 rtn 
+
+keyscan_process_lpm_before:
+61ff 6fe144c8 fetch 2 ,mem_key_num_ptr 
+6200 efe0803f ifetch 1 ,pdata 
+
+keyscan_process_lpm_before_next:
+6201 207a0000 rtn blank 
+6202 1fe27200 copy pdata ,loopcnt 
+6203 6fe144c8 fetch 2 ,mem_keyscan_ptr 
+6204 1fe0fe03 increase 3 ,pdata 
+6205 1fe22200 copy pdata ,rega 
+
+keyscan_process_lpm_before_lp1:
+6206 e8408011 ifetcht 1 ,rega 
+6207 204060d6 call gpio_set_wake_by_current_state 
+6208 1a20a201 increase key_conf_struct_len ,rega 
+6209 c2006206 loop keyscan_process_lpm_before_lp1 
+
+keyscan_process_lpm_before_end:
+620a 20600000 rtn 
+
+keyscan_key_process:
+620b d8e00009 arg key_scan_timer ,queue 
+620c 20407de9 call timer_check 
+620d 247a0000 nrtn blank 
+620e 58000020 setarg 0x20 
+620f d8e00009 arg key_scan_timer ,queue 
+6210 20407ddb call timer_init 
+6211 78547c00 disable user 
+6212 204061ff call keyscan_process_lpm_before 
+6213 471ac026 bpatchx patch26_5 ,mem_patch26 
+6214 6fe144c8 fetch 2 ,mem_key_num_ptr 
+6215 efe0803f ifetch 1 ,pdata 
+
+keyscan_key_process_next:
+6216 207a0000 rtn blank 
+6217 204061e6 call keyscan_scan_key 
+6218 24347855 nbranch lpm_button_clean_wake_lock ,user 
+6219 20407853 call lpm_button_get_wake_lock 
+621a 78547c00 disable user 
+621b 6fe109de fetch 2 ,mem_key_value_temp 
+621c 67e109e5 store 2 ,mem_key_value_temp4 
+621d 7009e700 jam 0 ,mem_key_value_temp6 
+621e 18000e00 force 0 ,queue 
+
+keyscan_key_lp1:
+621f 6fe144ca fetch 2 ,mem_key_value_retention 
+6220 1fe30400 rshift pdata ,temp 
+6221 604944ca storet 2 ,mem_key_value_retention 
+6222 1fe17e01 and pdata ,0x01 ,pdata 
+6223 684909e5 fetcht 2 ,mem_key_value_temp4 
+6224 18412201 and temp ,0x01 ,rega 
+6225 18430400 rshift temp ,temp 
+6226 604909e5 storet 2 ,mem_key_value_temp4 
+6227 9a22fc00 ixor rega ,null 
+6228 2442e234 ncall keyscan_send_key_data ,zero 
+6229 6fe144c8 fetch 2 ,mem_key_num_ptr 
+622a efe0803f ifetch 1 ,pdata 
+
+keyscan_key_lp1_next:
+622b 684889e7 fetcht 1 ,mem_key_value_temp6 
+622c 18408401 increase 1 ,temp 
+622d 604889e7 storet 1 ,mem_key_value_temp6 
+622e 18420e00 copy temp ,queue 
+622f 98e2fc00 ixor queue ,null 
+6230 2422e21f nbranch keyscan_key_lp1 ,zero 
+6231 6fe109de fetch 2 ,mem_key_value_temp 
+6232 67e144ca store 2 ,mem_key_value_retention 
+6233 20600000 rtn 
+
+keyscan_send_key_data:
+6234 471b4026 bpatchx patch26_6 ,mem_patch26 
+6235 6fe144c8 fetch 2 ,mem_keyscan_ptr 
+6236 1fe0fe01 increase 1 ,pdata 
+6237 efe1003f ifetch 2 ,pdata 
+6238 20207e7a branch callback_func 
+
+pwm_init:
+6239 6ff08042 fetch 1 ,core_clksel 
+623a 9a21fe00 ior rega ,pdata 
+623b 67f08042 store 1 ,core_clksel 
+623c 6ff10050 fetch 2 ,core_clkoff 
+623d 793ffe0d set0 clock_off_pwm ,pdata 
+623e 67f10050 store 2 ,core_clkoff 
+
+delay_nop100:
+623f 20000064 nop 100 
+6240 20600000 rtn 
+
+pwm_clk_set:
+6241 6ff08042 fetch 1 ,core_clksel 
+6242 c2836246 bbit1 6 ,pwm_24m_clk_set 
+6243 c283e248 bbit1 7 ,pwm_33k_clk_set 
+
+pwm_12m_clk_set:
+6244 58b71b00 setarg pwm_12mhz 
+6245 20600000 rtn 
+
+pwm_24m_clk_set:
+6246 596e3600 setarg pwm_24mhz 
+6247 20600000 rtn 
+
+pwm_33k_clk_set:
+6248 580080e8 setarg pwm_33khz 
+6249 20600000 rtn 
+
+pwm_cont_set:
+624a 6fe0895d fetch 1 ,mem_pdatatemp + 1 
+624b c282624e bbit1 4 ,pwm_cont_set1 
+624c c3026255 bbit0 4 ,pwm_cont_set0 
+624d 20600000 rtn 
+
+pwm_cont_set1:
+624e 78347c00 enable user 
+624f 1fe10e0f and pdata ,0x0f ,queue 
+6250 2040625c call pwm_set_value 
+6251 1807a400 quotient regb 
+6252 18427e00 copy temp ,pdata 
+6253 9a462200 isub regb ,rega 
+6254 20600000 rtn 
+
+pwm_cont_set0:
+6255 78547c00 disable user 
+6256 1fe10e0f and pdata ,0x0f ,queue 
+6257 2040625c call pwm_set_value 
+6258 1807a200 quotient rega 
+6259 18427e00 copy temp ,pdata 
+625a 9a262400 isub rega ,regb 
+625b 20600000 rtn 
+
+pwm_set_value:
+625c 6ff080d8 fetch 1 ,core_pwm_init 
+625d f9347e00 qsetflag user ,pdata 
+625e 67f080d8 store 1 ,core_pwm_init 
+625f 20600000 rtn 
+
+pwm_out_set:
+6260 6849895e fetcht 3 ,mem_pdatatemp + 2 
+6261 20406241 call pwm_clk_set 
+6262 9846fc00 idiv temp 
+6263 20407e64 call wait_div_end 
+6264 18078400 quotient temp 
+6265 6fe08961 fetch 1 ,mem_pdatatemp + 5 
+6266 984ffe00 imul32 temp ,pdata 
+6267 1fe6fc64 div pdata ,100 
+6268 20407e64 call wait_div_end 
+6269 2040624a call pwm_cont_set 
+626a 6fe0895d fetch 1 ,mem_pdatatemp + 1 
+626b 20406272 call pwm_duty_cycle_set 
+626c 6fe0895c fetch 1 ,mem_pdatatemp 
+626d 6848895d fetcht 1 ,mem_pdatatemp + 1 
+626e 1841040f and_into 0x0f ,temp 
+626f 184d0400 lshift8 temp ,temp 
+6270 9841fe00 ior temp ,pdata 
+6271 2020627b branch pwm_enable 
+
+pwm_duty_cycle_set:
+6272 1fe17e0f and_into 0x0f ,pdata 
+6273 d8a080a0 arg core_pwm_pcnt0 ,contw 
+6274 1feffe04 mul32 pdata ,4 ,pdata 
+6275 98a08a00 iadd contw ,contw 
+6276 1a227e00 copy rega ,pdata 
+6277 e7e10005 istore 2 ,contw 
+6278 1a427e00 copy regb ,pdata 
+6279 e7e10005 istore 2 ,contw 
+627a 20600000 rtn 
+
+pwm_enable:
+627b 78347c00 enable user 
+627c 20406290 call pwm_srst_set 
+627d 20206280 branch pwm_gpio_set 
+
+pwm_disable:
+627e 78547c00 disable user 
+627f 2040628b call pwm_select_channel 
+
+pwm_gpio_set:
+6280 18427e00 copy temp ,pdata 
+6281 1fed7e00 lshift8 pdata ,pdata 
+6282 18e08410 add queue ,gpcfg_pwm_out0 ,temp 
+6283 9841fe00 ior temp ,pdata 
+6284 20406128 call gpio_config_param 
+
+pwm_set_select:
+6285 6ff08084 fetch 1 ,core_pwm_en 
+6286 70808400 jam 0x00 ,core_pwm_en 
+6287 200004b0 nop 1200 
+6288 f9347e00 qsetflag user ,pdata 
+6289 67f08084 store 1 ,core_pwm_en 
+628a 20600000 rtn 
+
+pwm_select_channel:
+628b 1fe20400 copy pdata ,temp 
+628c 1fecfe00 rshift8 pdata ,pdata 
+628d 1fe20e00 copy pdata ,queue 
+628e 20600000 rtn 
+
+pwm_srst_powerdown:
+628f 78547c00 disable user 
+
+pwm_srst_set:
+6290 2040628b call pwm_select_channel 
+6291 6ff080dd fetch 1 ,core_pwm_srst 
+6292 fd347e00 nqsetflag user ,pdata 
+6293 67f080dd store 1 ,core_pwm_srst 
+6294 20206280 branch pwm_gpio_set 
+
+wdt_init_config:
+6295 d8402710 arg 0x2710 ,temp 
+6296 984ffe00 imul32 temp ,pdata 
+6297 d841312d arg 0x1312d ,temp 
+6298 9846fc00 idiv temp 
+6299 20407e64 call wait_div_end 
+629a 18078400 quotient temp 
+629b 58000800 setarg 2048 
+629c 98467e00 isub temp ,pdata 
+629d 1fe20400 copy pdata ,temp 
+629e 1841040f and_into 0x0f ,temp 
+629f 6058800b storet 1 ,core_write_wdt2 
+62a0 1fe20400 copy pdata ,temp 
+62a1 18518400 rshift4 temp ,temp 
+62a2 60588004 storet 1 ,core_write_wdt 
+62a3 20600000 rtn 
+
+wdt_set_enable:
+62a4 78367c00 enable user2 
+62a5 202062a7 branch wdt_init_set 
+
+wdt_set_disable:
+62a6 78567c00 disable user2 
+
+wdt_init_set:
+62a7 6ff08043 fetch 1 ,core_config 
+62a8 79367e03 setflag user2 ,3 ,pdata 
+62a9 67f08043 store 1 ,core_config 
+62aa 20600000 rtn 
+
+nec61212_init:
+62ab d8400031 arg fun_nec_enable | fun_nec_clk_divide_24 ,temp 
+
+nec_init_config:
+62ac 67f200ca store 4 ,core_nec_start_addr 
+62ad 67f100ce store 2 ,core_nec_rptr 
+62ae 605880d0 storet 1 ,core_nec_control 
+62af 20600000 rtn 
+
+nec_check_rxbuff_size:
+62b0 6ff10130 fetch 2 ,core_nec_rxitem 
+62b1 20600000 rtn 
+
+nec_prepare_read:
+62b2 687100ce fetchr contu ,2 ,core_nec_rptr 
+62b3 695100ca fetchr contus ,2 ,core_nec_start_addr 
+62b4 6a1100cc fetchr contue ,2 ,core_nec_end_addr 
+62b5 20600000 rtn 
+
+nec_read_done:
+62b6 607100ce storer contu ,2 ,core_nec_rptr 
+62b7 20600000 rtn 
+
+nec_parse_nec61212:
+62b8 20407ec5 call enable_user 
+62b9 dd600000 arg 0 ,rege 
+62ba 204062b0 call nec_check_rxbuff_size 
+62bb c00162fa beq 2 ,nec_parse_nec61212_check_timeout 
+62bc 1fe67c04 sub pdata ,4 ,null 
+62bd 20610000 rtn positive 
+62be 204062b2 call nec_prepare_read 
+62bf e8410003 ifetcht 2 ,contu 
+62c0 5800a654 setarg nec61212_data2repeat_time 
+62c1 20406303 call nec_check_pulse_range_legal_default_deviation 
+62c2 242162e8 nbranch nec_parse_nec61212_check_repeat_data ,positive 
+62c3 1b020400 copy regd ,temp 
+62c4 58017f8e setarg nec61212_repeat2repeat_time 
+62c5 20406303 call nec_check_pulse_range_legal_default_deviation 
+62c6 242162e8 nbranch nec_parse_nec61212_check_repeat_data ,positive 
+62c7 1b020400 copy regd ,temp 
+62c8 58002328 setarg nec61212_boot_code_start_time 
+62c9 20406303 call nec_check_pulse_range_legal_default_deviation 
+62ca 202162df branch nec_parse_nec61212_error_data ,positive 
+62cb e8410003 ifetcht 2 ,contu 
+62cc 58001194 setarg nec61212_boot_code_end_time 
+62cd 20406303 call nec_check_pulse_range_legal_default_deviation 
+62ce 202162df branch nec_parse_nec61212_error_data ,positive 
+62cf 204062b0 call nec_check_rxbuff_size 
+62d0 1fe67c85 sub pdata ,133 ,null 
+62d1 20610000 rtn positive 
+62d2 df200020 arg 32 ,loopcnt 
+
+nec_parse_nec61212_data:
+62d3 e8410003 ifetcht 2 ,contu 
+62d4 58000230 setarg nec61212_data_bit_1_start_time 
+62d5 20406303 call nec_check_pulse_range_legal_default_deviation 
+62d6 202162df branch nec_parse_nec61212_error_data ,positive 
+62d7 e8410003 ifetcht 2 ,contu 
+62d8 5800069a setarg nec61212_data_bit_1_end_time 
+62d9 20406303 call nec_check_pulse_range_legal_default_deviation 
+62da 242162e4 nbranch nec_parse_nec61212_add_bit1 ,positive 
+62db 1b020400 copy regd ,temp 
+62dc 58000230 setarg nec61212_data_bit_0_end_time 
+62dd 20406303 call nec_check_pulse_range_legal_default_deviation 
+62de 242162e5 nbranch nec_parse_nec61212_add_bit0 ,positive 
+
+nec_parse_nec61212_error_data:
+62df 1b020400 copy regd ,temp 
+62e0 5800ffff setarg nec61212_timeout_time 
+62e1 98467c00 isub temp ,null 
+62e2 2022e2ff branch nec_parse_nec61212_check_timeout_cb ,zero 
+62e3 202062b6 branch nec_read_done 
+
+nec_parse_nec61212_add_bit1:
+62e4 79205620 set1 32 ,rege 
+
+nec_parse_nec61212_add_bit0:
+62e5 1d635600 rshift rege ,rege 
+62e6 c20062d3 loop nec_parse_nec61212_data 
+62e7 202062f3 branch nec_parse_nec61212_check_stop_bit 
+
+nec_parse_nec61212_check_repeat_data:
+62e8 204062b0 call nec_check_rxbuff_size 
+62e9 1fe67c07 sub pdata ,7 ,null 
+62ea 20610000 rtn positive 
+62eb e8410003 ifetcht 2 ,contu 
+62ec 58002328 setarg nec61212_repeat_start_time 
+62ed 20406303 call nec_check_pulse_range_legal_default_deviation 
+62ee 202162df branch nec_parse_nec61212_error_data ,positive 
+62ef e8410003 ifetcht 2 ,contu 
+62f0 580008ca setarg nec61212_repeat_end_time 
+62f1 20406303 call nec_check_pulse_range_legal_default_deviation 
+62f2 202162df branch nec_parse_nec61212_error_data ,positive 
+
+nec_parse_nec61212_check_stop_bit:
+62f3 e8410003 ifetcht 2 ,contu 
+62f4 58000230 setarg nec61212_stop_time 
+62f5 20406303 call nec_check_pulse_range_legal_default_deviation 
+62f6 202162df branch nec_parse_nec61212_error_data ,positive 
+62f7 204062b6 call nec_read_done 
+62f8 1a627e00 copy regc ,pdata 
+62f9 20207e7a branch callback_func 
+
+nec_parse_nec61212_check_timeout:
+62fa 204062b2 call nec_prepare_read 
+62fb e8410003 ifetcht 2 ,contu 
+62fc 5800ffff setarg nec61212_timeout_time 
+62fd 98467c00 isub temp ,null 
+62fe 24628000 nrtn zero 
+
+nec_parse_nec61212_check_timeout_cb:
+62ff 204062b6 call nec_read_done 
+6300 20407ec7 call disable_user 
+6301 1a627e00 copy regc ,pdata 
+6302 20207e7a branch callback_func 
+
+nec_check_pulse_range_legal_default_deviation:
+6303 6a40c4d6 fetchr regb ,1 ,mem_nec_decode_error_value 
+
+nec_check_pulse_range_legal:
+6304 18423000 copy temp ,regd 
+6305 9a4fa400 imul32 regb ,regb 
+6306 18438400 lshift temp ,temp 
+6307 98462200 isub temp ,rega 
+6308 2441630c ncall nec_check_pulse_range_legal_data_negative ,positive 
+6309 1a2ffe64 mul32 rega ,100 ,pdata 
+630a 9a467c00 isub regb ,null 
+630b 20600000 rtn 
+
+nec_check_pulse_range_legal_data_negative:
+630c 1a262200 sub rega ,0 ,rega 
+630d 20600000 rtn 
+
+select_system_clk_24m:
+630e 7041f018 jam system_clk_24m ,mem_system_clk 
+630f 70804201 jam clksel_dpll_24m ,core_clksel 
+6310 58001d4b setarg 7499 
+6311 67f10040 store 2 ,core_halfslot 
+
+calc_new_param:
+6312 df20000b arg 11 ,loopcnt 
+6313 da200155 arg mem_param_tx_setup ,rega 
+
+calc_new_param_loop:
+6314 efe10011 ifetch 2 ,rega 
+6315 1fe3fe00 lshift pdata ,pdata 
+6316 e7e10011 istore 2 ,rega 
+6317 1a20a202 increase 2 ,rega 
+6318 c2006314 loop calc_new_param_loop 
+6319 20600000 rtn 
+
+calc_new_le_time:
+631a 1b63b600 lshift stop_watch ,stop_watch 
+631b 20600000 rtn 
+
+select_system_clk_12m_xtal:
+631c 70804204 jam clksel_xtal ,core_clksel 
+
+select_system_clk_12m_common:
+631d 7041f00c jam system_clk_12m ,mem_system_clk 
+631e 58000ea5 setarg 3749 
+631f 67f10040 store 2 ,core_halfslot 
+6320 20600000 rtn 
+
+select_system_clk_12m_dpll:
+6321 70804205 jam clksel_dpll ,core_clksel 
+6322 2020631d branch select_system_clk_12m_common 
+
+rfcomm_init:
+6323 20758000 rtn wake 
+6324 70465500 jam 0 ,mem_rfcomm_send_more_pkt 
+6325 7003c003 jam bits9600 ,memremoterpnbitrate 
+6326 7003c103 jam databits8 ,memremoteprndatabits 
+6327 7003c511 jam 0x11 ,memremoteprnxon 
+6328 7003c613 jam 0x13 ,memremoteprnxoff 
+6329 58000000 setarg 0 
+632a 67e183c2 store 3 ,memremoteprnstopbit 
+632b 67e0c4e7 store 1 ,mem_spp_state 
+632c 70478e00 jam 0 ,memui_reconnect_mode 
+
+rfcomm_init_spp:
+632d 58000000 setarg 0 
+632e 67e0c4e7 store 1 ,mem_spp_state 
+632f 67e0c652 store 1 ,mem_remote_spp_channel 
+6330 67e0c64b store 1 ,mem_pn_dlci 
+6331 6fe0c659 fetch 1 ,mem_rfcomm_credit_flag 
+6332 c000e335 beq credit_enable ,rfcomm_init_spp_with_credit 
+6333 70465750 jam 0x50 ,mem_credit_given 
+6334 20600000 rtn 
+
+rfcomm_init_spp_with_credit:
+6335 70465700 jam 0x00 ,mem_credit_given 
+6336 20600000 rtn 
+
+set_cr_bit:
+6337 18418402 or_into 0x02 ,temp 
+6338 20600000 rtn 
+
+rfcomm_calculate_fcs_sabm:
+6339 18427e00 copy temp ,pdata 
+633a 1fedfe00 reverse pdata ,pdata 
+633b 67e0c650 store 1 ,memfcstemp3 
+633c 18007e3f force ini_tx_sabm ,pdata 
+633d 1fedfe00 reverse pdata ,pdata 
+633e 67e0c64f store 1 ,memfcstemp2 
+633f 18007e01 force 0x01 ,pdata 
+6340 1fedfe00 reverse pdata ,pdata 
+6341 67e0c64e store 1 ,memfcstemp1 
+6342 2040636f call caculate_fcs 
+6343 18427e00 copy temp ,pdata 
+6344 20600000 rtn 
+
+rfcomm_calculate_fcs_ua:
+6345 1fedfe00 reverse pdata ,pdata 
+6346 67e0c650 store 1 ,memfcstemp3 
+6347 18007e73 force rsp_tx_ua ,pdata 
+6348 1fedfe00 reverse pdata ,pdata 
+6349 67e0c64f store 1 ,memfcstemp2 
+634a 18007e01 force 0x01 ,pdata 
+634b 1fedfe00 reverse pdata ,pdata 
+634c 67e0c64e store 1 ,memfcstemp1 
+634d 2020636f branch caculate_fcs 
+
+rfcomm_calculate_fcs_dlci0:
+634e 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+634f 203a6352 branch rfcomm_calculate_fcs_dlci0_res ,blank 
+6350 58000070 setarg 0x70 
+6351 20600000 rtn 
+
+rfcomm_calculate_fcs_dlci0_res:
+6352 580000aa setarg 0xaa 
+6353 20600000 rtn 
+
+rfcomm_save_fcs_uih:
+6354 1fedfe00 reverse pdata ,pdata 
+6355 67e0c650 store 1 ,memfcstemp3 
+6356 18007eef force rsp_rx_uih ,pdata 
+6357 20406363 call caculate_uihdata_fcs 
+6358 684903ca fetcht 2 ,mem_contw_temp 
+6359 18420a00 copy temp ,contw 
+635a e7e08005 istore 1 ,contw 
+635b 18a20400 copy contw ,temp 
+635c 604903ca storet 2 ,mem_contw_temp 
+635d 18007eff force rsp_rx_uih_wdata ,pdata 
+635e 20406363 call caculate_uihdata_fcs 
+635f 684903ca fetcht 2 ,mem_contw_temp 
+6360 18420a00 copy temp ,contw 
+6361 e7e08005 istore 1 ,contw 
+6362 20600000 rtn 
+
+caculate_uihdata_fcs:
+6363 1fedfe00 reverse pdata ,pdata 
+6364 67e0c64f store 1 ,memfcstemp2 
+6365 6fe1464f fetch 2 ,memfcstemp2 
+6366 1fed7e00 lshift8 pdata ,pdata 
+6367 67e183c7 store 3 ,mem_mod2div_temp 
+6368 da200107 arg 0x107 ,rega 
+6369 da40000f arg 0xf ,regb 
+636a 2040637c call mod2div 
+636b 1fe2fed7 xor_into 0xd7 ,pdata 
+636c 1fe47e00 invert pdata ,pdata 
+636d 1fedfe00 reverse pdata ,pdata 
+636e 20600000 rtn 
+
+caculate_fcs:
+636f 6fe1c64e fetch 3 ,memfcstemp1 
+6370 67e183c7 store 3 ,mem_mod2div_temp 
+6371 da200107 arg 0x107 ,rega 
+6372 da40000f arg 0xf ,regb 
+6373 2040637c call mod2div 
+6374 1fed7e00 lshift8 pdata ,pdata 
+6375 da400007 arg 0x7 ,regb 
+6376 2040637c call mod2div 
+6377 1fe2fe2b xor_into 0x2b ,pdata 
+6378 1fe47e00 invert pdata ,pdata 
+6379 1fedfe00 reverse pdata ,pdata 
+637a 1fe20400 copy pdata ,temp 
+637b 20600000 rtn 
+
+mod2div:
+637c da600000 arg 0 ,regc 
+637d 1a427200 copy regb ,loopcnt 
+637e 20407d30 call right_shift_n 
+637f 1fe20400 icopy temp 
+
+mod2div_loop:
+6380 18427e00 copy temp ,pdata 
+6381 1a63a600 lshift regc ,regc 
+6382 c3046385 bbit0 8 ,mod2div_not_enough_reduction 
+6383 9a228400 ixor rega ,temp 
+6384 1a60a601 increase 1 ,regc 
+
+mod2div_not_enough_reduction:
+6385 18438400 lshift temp ,temp 
+6386 6fe183c7 fetch 3 ,mem_mod2div_temp 
+6387 1a40a5ff increase -1 ,regb 
+6388 2a41feff compare 0xff ,regb ,0xff 
+6389 2020e38f branch mod2div_end ,true 
+638a 1a427200 copy regb ,loopcnt 
+638b 20407d30 call right_shift_n 
+638c 2feffe00 isolate1 0 ,pdata 
+638d 79208400 setflag true ,0 ,temp 
+638e 20206380 branch mod2div_loop 
+
+mod2div_end:
+638f 18437e00 rshift temp ,pdata 
+6390 20600000 rtn 
+
+get_rfcomm_snd_adss:
+6391 6848c64b fetcht 1 ,mem_pn_dlci 
+
+dlci_to_address_cmd:
+6392 184b8400 lshift2 temp ,temp 
+6393 79200400 set1 rfcomm_address_ext_len ,temp 
+6394 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+6395 245a6337 ncall set_cr_bit ,blank 
+6396 604883e0 storet 1 ,mem_rfcomm_send_adss 
+6397 20600000 rtn 
+
+channel_to_dlci:
+6398 18438400 lshift temp ,temp 
+6399 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+639a 793a0400 setflag blank ,0 ,temp 
+639b 20600000 rtn 
+
+rfcomm_rx_process_dlci0_sabm:
+639c 684883cf fetcht 1 ,mem_current_channel 
+639d 7003d1d7 jam 0xd7 ,mem_current_fcs 
+639e 204064d5 call rfcomm_send_ua 
+639f 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+63a0 79207e06 set1 l2cap_channel_rfcomm_only_sabm ,pdata 
+63a1 79207e07 set1 l2cap_channel_rfcomm_only_ua ,pdata 
+63a2 67e0c4e4 store 1 ,mem_rfcomm_state 
+63a3 70465100 jam 0 ,mem_rfcomm_initiator 
+63a4 202064b6 branch rfcomm_rx_process_end 
+
+rfcomm_rx_process_dlci0_ua:
+63a5 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+63a6 79207e07 set1 l2cap_channel_rfcomm_only_ua ,pdata 
+63a7 67e0c4e4 store 1 ,mem_rfcomm_state 
+63a8 202064b6 branch rfcomm_rx_process_end 
+
+rfcomm_rx_process:
+63a9 471bc026 bpatchx patch26_7 ,mem_patch26 
+63aa 6fe0c78e fetch 1 ,memui_reconnect_mode 
+63ab c00063ad beq no_reconnection ,rfcomm_rx_process_remote_page 
+63ac 2020646b branch rfcomm_rx_process_reconn 
+
+rfcomm_rx_process_remote_page:
+63ad 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+63ae 1fe20c00 copy pdata ,contr 
+63af 204063d7 call get_rfcomm_head_struct 
+63b0 6fe083cf fetch 1 ,mem_current_channel 
+63b1 c00063b3 beq 0 ,parse_dlci0_rp 
+63b2 20206437 branch parse_uih_rp 
+
+parse_dlci0_rp:
+63b3 471c4027 bpatchx patch27_0 ,mem_patch27 
+63b4 6fe083d0 fetch 1 ,mem_current_frame_type 
+63b5 c01fe39c beq rfcomm_frame_type_sabm ,rfcomm_rx_process_dlci0_sabm 
+63b6 c039e3a5 beq rfcomm_frame_type_ua ,rfcomm_rx_process_dlci0_ua 
+63b7 c077e3ba beq rfcomm_frame_type_uih ,parse_dlci0_rp_uih 
+63b8 c029e463 beq rfcomm_frame_type_disconn ,parse_uih_rp_spp_disconn_send_event 
+63b9 20600000 rtn 
+
+parse_dlci0_rp_uih:
+63ba 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+63bb 1fe20c00 copy pdata ,contr 
+63bc 204063e2 call get_rfcomm_uih_head_struct 
+63bd 6fe083d6 fetch 1 ,mem_uih_cmd_type 
+63be c020e3c4 beq uih_param_neg_cmd ,parse_dlci0_rp_uih_pn_cmd 
+63bf c02063cc beq uih_param_neg_res ,parse_dlci0_rp_uih_pn_res 
+63c0 c038e405 beq uih_modem_status_cmd ,parse_dlci0_rp_uih_ms_cmd 
+63c1 c0386411 beq uih_modem_status_res ,parse_dlci0_rp_uih_ms_res 
+63c2 c024e41c beq uih_param_cmd_remove_port ,parse_dlci0_rp_uih_cmd_port 
+63c3 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_pn_cmd:
+63c4 204063ce call parse_dlci0_rp_uih_pn_res_common 
+63c5 202063c6 branch parse_dlci0_rp_uih_pn_cmd_spp 
+
+parse_dlci0_rp_uih_pn_cmd_spp:
+63c6 6fe0c4e7 fetch 1 ,mem_spp_state 
+63c7 79207e00 set1 rfcomm_channel_state_pn_cmd ,pdata 
+63c8 79207e01 set1 rfcomm_channel_state_pn_res ,pdata 
+63c9 67e0c4e7 store 1 ,mem_spp_state 
+63ca 204064ff call rfcomm_send_param_neg_res 
+63cb 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_pn_res:
+63cc 204063ce call parse_dlci0_rp_uih_pn_res_common 
+63cd 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_pn_res_common:
+63ce 204063ea call get_param_payload_ptr 
+63cf 202063f6 branch get_rfcomm_prarmer_negotiation 
+
+get_rfcomm_param_modem_status:
+63d0 204063ea call get_param_payload_ptr 
+63d1 efe08006 ifetch 1 ,contr 
+63d2 1fe97e00 rshift3 pdata ,pdata 
+63d3 67e0c658 store 1 ,mem_ms_channel 
+63d4 efe08006 ifetch 1 ,contr 
+63d5 67e083db store 1 ,mem_ms_param 
+63d6 20600000 rtn 
+
+get_rfcomm_head_struct:
+63d7 efe08006 ifetch 1 ,contr 
+63d8 67e083ce store 1 ,mem_current_adss 
+63d9 1fe97e00 rshift3 pdata ,pdata 
+63da 67e083cf store 1 ,mem_current_channel 
+63db efe08006 ifetch 1 ,contr 
+63dc 67e083d0 store 1 ,mem_current_frame_type 
+
+get_rfcomm_current_length:
+63dd 204063ed call get_rfcomm_length_common 
+63de 604903d2 storet 2 ,mem_current_length 
+63df 18c27e00 copy contr ,pdata 
+63e0 67e103d4 store 2 ,mem_rfcomm_uih_payload_ptr 
+63e1 20600000 rtn 
+
+get_rfcomm_uih_head_struct:
+63e2 efe08006 ifetch 1 ,contr 
+63e3 1fe37e00 rshift pdata ,pdata 
+63e4 67e083d6 store 1 ,mem_uih_cmd_type 
+63e5 204063ed call get_rfcomm_length_common 
+63e6 604903d7 storet 2 ,mem_uih_length 
+63e7 18c27e00 copy contr ,pdata 
+63e8 67e103d9 store 2 ,mem_param_payload_ptr 
+63e9 20600000 rtn 
+
+get_param_payload_ptr:
+63ea 6fe103d9 fetch 2 ,mem_param_payload_ptr 
+63eb 1fe20c00 copy pdata ,contr 
+63ec 20600000 rtn 
+
+get_rfcomm_length_common:
+63ed efe08006 ifetch 1 ,contr 
+63ee 1fe20400 copy pdata ,temp 
+63ef 18430400 rshift temp ,temp 
+63f0 c3800000 rtnbit1 0 
+63f1 efe08006 ifetch 1 ,contr 
+63f2 1fe9fe00 lshift3 pdata ,pdata 
+63f3 1ff27e00 lshift4 pdata ,pdata 
+63f4 98408400 iadd temp ,temp 
+63f5 20600000 rtn 
+
+get_rfcomm_prarmer_negotiation:
+63f6 efe08006 ifetch 1 ,contr 
+63f7 67e0c64b store 1 ,mem_pn_dlci 
+63f8 efe08006 ifetch 1 ,contr 
+63f9 67e083dc store 1 ,mem_pn_credit_flow_type_info 
+63fa efe08006 ifetch 1 ,contr 
+63fb 67e083dd store 1 ,mem_pn_priority 
+63fc efe08006 ifetch 1 ,contr 
+63fd 67e083de store 1 ,mem_pn_acknowledg_timer 
+63fe efe10006 ifetch 2 ,contr 
+63ff 67e1464c store 2 ,mem_pn_max_frame_size 
+6400 efe08006 ifetch 1 ,contr 
+6401 67e083df store 1 ,mem_pn_max_retrans 
+6402 efe08006 ifetch 1 ,contr 
+6403 67e0c656 store 1 ,mem_remote_credits 
+6404 20600000 rtn 
+
+parse_dlci0_rp_uih_ms_cmd:
+6405 204063d0 call get_rfcomm_param_modem_status 
+6406 20206407 branch parse_dlci0_rp_uih_ms_cmd_spp 
+
+parse_dlci0_rp_uih_ms_cmd_spp:
+6407 6fe0c4e7 fetch 1 ,mem_spp_state 
+6408 79207e05 set1 rfcomm_channel_state_rcv_ms_cmd ,pdata 
+6409 79207e06 set1 rfcomm_channel_state_snd_ms_res ,pdata 
+640a 67e0c4e7 store 1 ,mem_spp_state 
+640b 6848c64b fetcht 1 ,mem_pn_dlci 
+640c 184b8400 lshift2 temp ,temp 
+640d 18418403 or_into 3 ,temp 
+640e 20406530 call rfcomm_send_modem_status_res 
+640f 70465503 jam more_pkt_msc_cmd_spp ,mem_rfcomm_send_more_pkt 
+6410 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_ms_res:
+6411 70095b08 jam bt_evt_spp_connected ,mem_fifo_temp 
+6412 204078dc call ui_ipc_send_event 
+6413 204063d0 call get_rfcomm_param_modem_status 
+6414 6fe0c658 fetch 1 ,mem_ms_channel 
+6415 1fe67c01 sub pdata ,1 ,null 
+6416 2022e418 branch parse_dlci0_rp_uih_ms_res_spp ,zero 
+6417 2020137c branch assert 
+
+parse_dlci0_rp_uih_ms_res_spp:
+6418 6fe0c4e7 fetch 1 ,mem_spp_state 
+6419 79207e07 set1 rfcomm_channel_state_rcv_ms_res ,pdata 
+641a 67e0c4e7 store 1 ,mem_spp_state 
+641b 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_cmd_port:
+641c 204063ea call get_param_payload_ptr 
+641d efe08006 ifetch 1 ,contr 
+641e 67e0898e store 1 ,mem_rpn_dlci 
+641f 20405383 call l2cap_malloc_rfcomm_channel 
+6420 20405391 call l2cap_get_rfcomm_tx_buff 
+6421 5800000e setarg 0x000e 
+6422 e7e10005 istore 2 ,contw 
+6423 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+6424 e7e10005 istore 2 ,contw 
+6425 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+6426 1fe3fe00 lshift pdata ,pdata 
+6427 79207e00 set1 0 ,pdata 
+6428 e7e08005 istore 1 ,contw 
+6429 471cc027 bpatchx patch27_1 ,mem_patch27 
+642a 580015ef setarg 0x15ef 
+642b e7e10005 istore 2 ,contw 
+642c 58001191 setarg 0x1191 
+642d e7e10005 istore 2 ,contw 
+642e 6fe0898e fetch 1 ,mem_rpn_dlci 
+642f e7e08005 istore 1 ,contw 
+6430 58000007 setarg 0x000007 
+6431 e7e28005 istore 5 ,contw 
+6432 58000001 setarg 0x01 
+6433 e7e10005 istore 2 ,contw 
+6434 2040634e call rfcomm_calculate_fcs_dlci0 
+6435 e7e08005 istore 1 ,contw 
+6436 20600000 rtn 
+
+parse_uih_rp:
+6437 20206438 branch parse_uih_rp_spp 
+
+parse_uih_rp_spp:
+6438 471d4027 bpatchx patch27_2 ,mem_patch27 
+6439 6fe083d0 fetch 1 ,mem_current_frame_type 
+643a c039e440 beq rfcomm_frame_type_ua ,parse_uih_rp_spp_ua 
+643b c01fe444 beq rfcomm_frame_type_sabm ,parse_uih_rp_spp_sabm 
+643c c077e45e beq rfcomm_frame_type_uih ,parse_uih_spp_uih 
+643d c07fe456 beq rfcomm_frame_type_uih_credits ,parse_uih_spp_uih_credits 
+643e c029e465 beq rfcomm_frame_type_disconn ,parse_uih_rp_spp_disconn 
+643f 20600000 rtn 
+
+parse_uih_rp_spp_ua:
+6440 6fe0c4e7 fetch 1 ,mem_spp_state 
+6441 79207e03 set1 rfcomm_channel_state_ua ,pdata 
+6442 67e0c4e7 store 1 ,mem_spp_state 
+6443 202064b6 branch rfcomm_rx_process_end 
+
+parse_uih_rp_spp_sabm:
+6444 6fe0c4e7 fetch 1 ,mem_spp_state 
+6445 79207e03 set1 rfcomm_channel_state_ua ,pdata 
+6446 79207e02 set1 rfcomm_channel_state_sabm ,pdata 
+6447 67e0c4e7 store 1 ,mem_spp_state 
+6448 6fe083ce fetch 1 ,mem_current_adss 
+6449 20406345 call rfcomm_calculate_fcs_ua 
+644a 67e083d1 store 1 ,mem_current_fcs 
+644b 204064d5 call rfcomm_send_ua 
+644c 6fe083ce fetch 1 ,mem_current_adss 
+644d 1feb7e00 rshift2 pdata ,pdata 
+644e 67e0c64b store 1 ,mem_pn_dlci 
+644f 1febfe00 lshift2 pdata ,pdata 
+6450 793ffe01 set0 rfcomm_address_cr ,pdata 
+6451 79207e00 set1 rfcomm_address_ext_len ,pdata 
+6452 d8404653 arg mem_hiufcs_spp ,temp 
+6453 604903ca storet 2 ,mem_contw_temp 
+6454 20406354 call rfcomm_save_fcs_uih 
+6455 202064b6 branch rfcomm_rx_process_end 
+
+parse_uih_spp_uih_credits:
+6456 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+6457 1fe20c00 copy pdata ,contr 
+6458 1fe0fe01 increase 1 ,pdata 
+6459 67e103d4 store 2 ,mem_rfcomm_uih_payload_ptr 
+645a efe08006 ifetch 1 ,contr 
+645b 6848c656 fetcht 1 ,mem_remote_credits 
+645c 9840fe00 iadd temp ,pdata 
+645d 67e0c656 store 1 ,mem_remote_credits 
+
+parse_uih_spp_uih:
+645e 20406561 call rfcomm_increase_credit_given 
+
+parse_uih_spp_uih_cont:
+645f 20406391 call get_rfcomm_snd_adss 
+6460 20406547 call rfcomm_send_uih_without_payload 
+6461 2040656a call spp_process_rx_data 
+6462 202064b6 branch rfcomm_rx_process_end 
+
+parse_uih_rp_spp_disconn_send_event:
+6463 70095b09 jam bt_evt_spp_disconnected ,mem_fifo_temp 
+6464 204078dc call ui_ipc_send_event 
+
+parse_uih_rp_spp_disconn:
+6465 2040632d call rfcomm_init_spp 
+6466 6fe083ce fetch 1 ,mem_current_adss 
+6467 20406345 call rfcomm_calculate_fcs_ua 
+6468 67e083d1 store 1 ,mem_current_fcs 
+6469 204064d5 call rfcomm_send_ua 
+646a 202064b6 branch rfcomm_rx_process_end 
+
+rfcomm_rx_process_reconn:
+646b 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+646c 1fe20c00 copy pdata ,contr 
+646d 204063d7 call get_rfcomm_head_struct 
+646e 6fe083cf fetch 1 ,mem_current_channel 
+646f c0006471 beq 0 ,parse_dlci0_reconn 
+6470 202064a5 branch parse_uih_reconn 
+
+parse_dlci0_reconn:
+6471 471dc027 bpatchx patch27_3 ,mem_patch27 
+6472 6fe083d0 fetch 1 ,mem_current_frame_type 
+6473 c01fe39c beq rfcomm_frame_type_sabm ,rfcomm_rx_process_dlci0_sabm 
+6474 c039e3a5 beq rfcomm_frame_type_ua ,rfcomm_rx_process_dlci0_ua 
+6475 c077e477 beq rfcomm_frame_type_uih ,parse_dlci0_reconn_uih 
+6476 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih:
+6477 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+6478 1fe20c00 copy pdata ,contr 
+6479 204063e2 call get_rfcomm_uih_head_struct 
+647a 6fe083d6 fetch 1 ,mem_uih_cmd_type 
+647b c020e480 beq uih_param_neg_cmd ,parse_dlci0_reconn_uih_pn_cmd 
+647c c0206480 beq uih_param_neg_res ,parse_dlci0_reconn_uih_pn_cmd 
+647d c038e48b beq uih_modem_status_cmd ,parse_dlci0_reconn_uih_ms_cmd 
+647e c038649b beq uih_modem_status_res ,parse_dlci0_reconn_uih_ms_res 
+647f 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_pn_cmd:
+6480 204063ce call parse_dlci0_rp_uih_pn_res_common 
+6481 6fe0c64b fetch 1 ,mem_pn_dlci 
+6482 1fe37e00 rshift pdata ,pdata 
+6483 6848c652 fetcht 1 ,mem_remote_spp_channel 
+6484 98467c00 isub temp ,null 
+6485 2022e487 branch parse_dlci0_reconn_uih_pn_cmd_spp ,zero 
+6486 2020137c branch assert 
+
+parse_dlci0_reconn_uih_pn_cmd_spp:
+6487 6fe0c4e7 fetch 1 ,mem_spp_state 
+6488 79207e01 set1 rfcomm_channel_state_pn_res ,pdata 
+6489 67e0c4e7 store 1 ,mem_spp_state 
+648a 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_ms_cmd:
+648b 204063d0 call get_rfcomm_param_modem_status 
+648c 6fe0c658 fetch 1 ,mem_ms_channel 
+648d 6848c652 fetcht 1 ,mem_remote_spp_channel 
+648e 98467c00 isub temp ,null 
+648f 2022e492 branch parse_dlci0_reconn_uih_ms_cmd_spp ,zero 
+6490 2020137c branch assert 
+6491 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_ms_cmd_spp:
+6492 6fe0c4e7 fetch 1 ,mem_spp_state 
+6493 79207e05 set1 rfcomm_channel_state_rcv_ms_cmd ,pdata 
+6494 79207e06 set1 rfcomm_channel_state_snd_ms_res ,pdata 
+6495 67e0c4e7 store 1 ,mem_spp_state 
+6496 6848c64b fetcht 1 ,mem_pn_dlci 
+6497 184b8400 lshift2 temp ,temp 
+6498 18418403 or_into 3 ,temp 
+6499 20406530 call rfcomm_send_modem_status_res 
+649a 202064b6 branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_ms_res:
+649b 204063d0 call get_rfcomm_param_modem_status 
+649c 6fe0c658 fetch 1 ,mem_ms_channel 
+649d 6848c652 fetcht 1 ,mem_remote_spp_channel 
+649e 98467c00 isub temp ,null 
+649f 2022e4a1 branch parse_dlci0_reconn_uih_ms_res_spp ,zero 
+64a0 2020137c branch assert 
+
+parse_dlci0_reconn_uih_ms_res_spp:
+64a1 6fe0c4e7 fetch 1 ,mem_spp_state 
+64a2 79207e07 set1 rfcomm_channel_state_rcv_ms_res ,pdata 
+64a3 67e0c4e7 store 1 ,mem_spp_state 
+64a4 202064b6 branch rfcomm_rx_process_end 
+
+parse_uih_reconn:
+64a5 6fe083cf fetch 1 ,mem_current_channel 
+64a6 6848c652 fetcht 1 ,mem_remote_spp_channel 
+64a7 98467c00 isub temp ,null 
+64a8 2022e4ab branch parse_uih_reconn_spp ,zero 
+64a9 2020137c branch assert 
+64aa 202064b6 branch rfcomm_rx_process_end 
+
+parse_uih_reconn_spp:
+64ab 6fe083d0 fetch 1 ,mem_current_frame_type 
+64ac c039e4b0 beq rfcomm_frame_type_ua ,parse_uih_reconn_spp_ua 
+64ad c077e45e beq rfcomm_frame_type_uih ,parse_uih_spp_uih 
+64ae c07fe456 beq rfcomm_frame_type_uih_credits ,parse_uih_spp_uih_credits 
+64af c029e4b5 beq rfcomm_frame_type_disconn ,parse_uih_reconn_spp_disconn 
+
+parse_uih_reconn_spp_ua:
+64b0 6fe0c4e7 fetch 1 ,mem_spp_state 
+64b1 79207e03 set1 rfcomm_channel_state_ua ,pdata 
+64b2 67e0c4e7 store 1 ,mem_spp_state 
+64b3 202064b6 branch rfcomm_rx_process_end 
+
+parse_uih_reconn_spp_sabm:
+64b4 202064b4 branch parse_uih_reconn_spp_sabm 
+
+parse_uih_reconn_spp_disconn:
+64b5 20206465 branch parse_uih_rp_spp_disconn 
+
+rfcomm_rx_process_end:
+64b6 20600000 rtn 
+
+rfcomm_send_more_pkt:
+64b7 6fe0c655 fetch 1 ,mem_rfcomm_send_more_pkt 
+64b8 207a0000 rtn blank 
+64b9 c001e4bb beq more_pkt_msc_cmd_spp ,rfcomm_send_more_pkt_msc_cmd_spp 
+64ba 2020137c branch assert 
+
+rfcomm_send_more_pkt_msc_cmd_spp:
+64bb 70465500 jam 0 ,mem_rfcomm_send_more_pkt 
+64bc 20405383 call l2cap_malloc_rfcomm_channel 
+64bd d8400001 arg spp_slave_channel ,temp 
+64be 6848c64b fetcht 1 ,mem_pn_dlci 
+64bf 184b8400 lshift2 temp ,temp 
+
+rfcomm_send_more_pkt_msc_cmd_spp0:
+64c0 18418403 or_into 0x03 ,temp 
+64c1 da2000aa arg 0xaa ,rega 
+64c2 2040651b call rfcomm_send_modem_status_cmd 
+64c3 20405391 call l2cap_get_rfcomm_tx_buff 
+64c4 18a20c00 copy contw ,contr 
+64c5 efe10006 ifetch 2 ,contr 
+64c6 203a137c branch assert ,blank 
+64c7 20600000 rtn 
+
+rfcomm_send_sabm:
+64c8 20405391 call l2cap_get_rfcomm_tx_buff 
+64c9 58000004 setarg 0x0004 
+64ca e7e10005 istore 2 ,contw 
+64cb 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+64cc e7e10005 istore 2 ,contw 
+64cd 6fe083ce fetch 1 ,mem_current_adss 
+64ce e7e08005 istore 1 ,contw 
+64cf 471e4027 bpatchx patch27_4 ,mem_patch27 
+64d0 5800013f setarg 0x013f 
+64d1 e7e10005 istore 2 ,contw 
+64d2 6fe083d1 fetch 1 ,mem_current_fcs 
+64d3 e7e08005 istore 1 ,contw 
+64d4 20600000 rtn 
+
+rfcomm_send_ua:
+64d5 20405383 call l2cap_malloc_rfcomm_channel 
+64d6 20405391 call l2cap_get_rfcomm_tx_buff 
+64d7 58000004 setarg 0x0004 
+64d8 e7e10005 istore 2 ,contw 
+64d9 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+64da e7e10005 istore 2 ,contw 
+64db 6fe083ce fetch 1 ,mem_current_adss 
+64dc e7e08005 istore 1 ,contw 
+64dd 471ec027 bpatchx patch27_5 ,mem_patch27 
+64de 58000173 setarg 0x0173 
+64df e7e10005 istore 2 ,contw 
+64e0 6fe083d1 fetch 1 ,mem_current_fcs 
+64e1 e7e08005 istore 1 ,contw 
+64e2 20600000 rtn 
+
+rfcomm_send_param_neg_cmd:
+64e3 20405391 call l2cap_get_rfcomm_tx_buff 
+64e4 5800000e setarg 0x000e 
+64e5 e7e10005 istore 2 ,contw 
+64e6 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+64e7 e7e10005 istore 2 ,contw 
+64e8 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+64e9 1fe3fe00 lshift pdata ,pdata 
+64ea 79207e00 set1 0 ,pdata 
+64eb e7e08005 istore 1 ,contw 
+64ec 471f4027 bpatchx patch27_6 ,mem_patch27 
+64ed 580015ef setarg 0x15ef 
+64ee e7e10005 istore 2 ,contw 
+64ef 58001183 setarg 0x1183 
+64f0 e7e10005 istore 2 ,contw 
+64f1 18427e00 copy temp ,pdata 
+64f2 e7e08005 istore 1 ,contw 
+64f3 580000f0 setarg 0x0000f0 
+64f4 e7e18005 istore 3 ,contw 
+64f5 5800007f setarg rfcomm_max_frame_size 
+64f6 e7e10005 istore 2 ,contw 
+64f7 58000000 setarg 0 
+64f8 e7e08005 istore 1 ,contw 
+64f9 58000001 setarg 0x01 
+64fa e7e08005 istore 1 ,contw 
+64fb 2040634e call rfcomm_calculate_fcs_dlci0 
+64fc e7e08005 istore 1 ,contw 
+64fd 70465710 jam 0x10 ,mem_credit_given 
+64fe 20600000 rtn 
+
+rfcomm_send_param_neg_res:
+64ff 20405383 call l2cap_malloc_rfcomm_channel 
+6500 20405391 call l2cap_get_rfcomm_tx_buff 
+6501 5800000e setarg 0x000e 
+6502 e7e10005 istore 2 ,contw 
+6503 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+6504 e7e10005 istore 2 ,contw 
+6505 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+6506 1fe3fe00 lshift pdata ,pdata 
+6507 79207e00 set1 0 ,pdata 
+6508 e7e08005 istore 1 ,contw 
+6509 471fc027 bpatchx patch27_7 ,mem_patch27 
+650a 580015ef setarg 0x15ef 
+650b e7e10005 istore 2 ,contw 
+650c 58001181 setarg 0x1181 
+650d e7e10005 istore 2 ,contw 
+650e 6fe0c64b fetch 1 ,mem_pn_dlci 
+650f e7e08005 istore 1 ,contw 
+6510 580000e0 setarg 0x0000e0 
+6511 e7e18005 istore 3 ,contw 
+6512 6fe1465a fetch 2 ,mem_rfcomm_max_frame_size 
+6513 e7e10005 istore 2 ,contw 
+6514 58000000 setarg 0x00 
+6515 e7e08005 istore 1 ,contw 
+6516 6fe0c65c fetch 1 ,mem_rfcomm_credit_init_data 
+6517 e7e08005 istore 1 ,contw 
+6518 2040634e call rfcomm_calculate_fcs_dlci0 
+6519 e7e08005 istore 1 ,contw 
+651a 20600000 rtn 
+
+rfcomm_send_modem_status_cmd:
+651b 20405391 call l2cap_get_rfcomm_tx_buff 
+651c 58000008 setarg 0x0008 
+651d e7e10005 istore 2 ,contw 
+651e 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+651f e7e10005 istore 2 ,contw 
+6520 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+6521 1fe3fe00 lshift pdata ,pdata 
+6522 79207e00 set1 0 ,pdata 
+6523 e7e08005 istore 1 ,contw 
+6524 47204028 bpatchx patch28_0 ,mem_patch28 
+6525 580009ef setarg 0x09ef 
+6526 e7e10005 istore 2 ,contw 
+6527 580005e3 setarg 0x05e3 
+6528 e7e10005 istore 2 ,contw 
+6529 18427e00 copy temp ,pdata 
+652a e7e08005 istore 1 ,contw 
+652b 5800008d setarg 0x8d 
+652c e7e08005 istore 1 ,contw 
+652d 2040634e call rfcomm_calculate_fcs_dlci0 
+652e e7e08005 istore 1 ,contw 
+652f 20600000 rtn 
+
+rfcomm_send_modem_status_res:
+6530 20405383 call l2cap_malloc_rfcomm_channel 
+6531 20405391 call l2cap_get_rfcomm_tx_buff 
+6532 58000008 setarg 0x0008 
+6533 e7e10005 istore 2 ,contw 
+6534 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+6535 e7e10005 istore 2 ,contw 
+6536 18421600 copy temp ,timeup 
+6537 6fe0c651 fetch 1 ,mem_rfcomm_initiator 
+6538 1fe3fe00 lshift pdata ,pdata 
+6539 79207e00 set1 0 ,pdata 
+653a e7e08005 istore 1 ,contw 
+653b 4720c028 bpatchx patch28_1 ,mem_patch28 
+653c 580009ef setarg 0x09ef 
+653d e7e10005 istore 2 ,contw 
+653e 580005e1 setarg 0x05e1 
+653f e7e10005 istore 2 ,contw 
+6540 19627e00 copy timeup ,pdata 
+6541 e7e08005 istore 1 ,contw 
+6542 5800008d setarg 0x8d 
+6543 e7e08005 istore 1 ,contw 
+6544 2040634e call rfcomm_calculate_fcs_dlci0 
+6545 e7e08005 istore 1 ,contw 
+6546 20600000 rtn 
+
+rfcomm_send_uih_without_payload:
+6547 47214028 bpatchx patch28_2 ,mem_patch28 
+6548 6fe0c657 fetch 1 ,mem_credit_given 
+6549 207a0000 rtn blank 
+654a 6ff10112 fetch 2 ,core_uart_rxitems 
+654b 247a0000 nrtn blank 
+654c 1a227e00 copy rega ,pdata 
+654d 67e0895d store 1 ,mem_pdatatemp + 1 
+654e 6048895c storet 1 ,mem_pdatatemp 
+654f 2040534f call l2cap_malloc_is_fifo_full 
+6550 247a0000 nrtn blank 
+6551 20405383 call l2cap_malloc_rfcomm_channel 
+6552 20405391 call l2cap_get_rfcomm_tx_buff 
+6553 58000005 setarg 0x05 
+6554 e7e10005 istore 2 ,contw 
+6555 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+6556 e7e10005 istore 2 ,contw 
+6557 6fe083e0 fetch 1 ,mem_rfcomm_send_adss 
+6558 e7e08005 istore 1 ,contw 
+6559 580001ff setarg 0x01ff 
+655a e7e10005 istore 2 ,contw 
+655b 6fe0c657 fetch 1 ,mem_credit_given 
+655c e7e08005 istore 1 ,contw 
+655d 6fe0c654 fetch 1 ,mem_hiufcs_spp_wcredits 
+655e e7e08005 istore 1 ,contw 
+655f 70465700 jam 0 ,mem_credit_given 
+6560 20600000 rtn 
+
+rfcomm_increase_credit_given:
+6561 4721c028 bpatchx patch28_3 ,mem_patch28 
+6562 6fe0c659 fetch 1 ,mem_rfcomm_credit_flag 
+6563 c1008000 rtneq credit_enable 
+6564 6fe103d2 fetch 2 ,mem_current_length 
+6565 207a0000 rtn blank 
+6566 6fe0c657 fetch 1 ,mem_credit_given 
+6567 1fe0fe01 increase 1 ,pdata 
+6568 67e0c657 store 1 ,mem_credit_given 
+6569 20600000 rtn 
+
+spp_process_rx_data:
+656a 6fe1465d fetch 2 ,mem_cb_receive_spp_data 
+656b 20207e7a branch callback_func 
+
+spp_tx_rfcomm_packet:
+656c 47224028 bpatchx patch28_4 ,mem_patch28 
+656d 6fe0c656 fetch 1 ,mem_remote_credits 
+656e 207a0000 rtn blank 
+656f 1fe0ffff increase -1 ,pdata 
+6570 67e0c656 store 1 ,mem_remote_credits 
+6571 6fe1464c fetch 2 ,mem_pn_max_frame_size 
+6572 684947ac fetcht 2 ,mem_current_packet_length 
+6573 98467c00 isub temp ,null 
+6574 20216576 branch ssp_tx_rfcomm_from_uart ,positive 
+6575 67e147ac store 2 ,mem_current_packet_length 
+
+ssp_tx_rfcomm_from_uart:
+6576 6fe0c657 fetch 1 ,mem_credit_given 
+6577 203a657e branch ssp_tx_rfcomm_from_uart_without_credit ,blank 
+6578 7003e301 jam 1 ,mem_rfcomm_send_offset 
+6579 6fe0c654 fetch 1 ,mem_hiufcs_spp_wcredits 
+657a 67e083e2 store 1 ,mem_rfcomm_send_fcs 
+657b 580000ff setarg rsp_rx_uih_wdata 
+657c 67e083e1 store 1 ,mem_rfcomm_send_frame_type 
+657d 20206583 branch ssp_tx_rfcomm_from_uart_common 
+
+ssp_tx_rfcomm_from_uart_without_credit:
+657e 7003e300 jam 0 ,mem_rfcomm_send_offset 
+657f 6fe0c653 fetch 1 ,mem_hiufcs_spp 
+6580 67e083e2 store 1 ,mem_rfcomm_send_fcs 
+6581 580000ef setarg rsp_tx_uih 
+6582 67e083e1 store 1 ,mem_rfcomm_send_frame_type 
+
+ssp_tx_rfcomm_from_uart_common:
+6583 4722c028 bpatchx patch28_5 ,mem_patch28 
+6584 6fe147ac fetch 2 ,mem_current_packet_length 
+6585 1fe67c7f sub pdata ,127 ,null 
+6586 2021658a branch ssp_tx_rfcomm_from_uart_common0 ,positive 
+6587 6fe083e3 fetch 1 ,mem_rfcomm_send_offset 
+6588 1fe0fe01 increase 1 ,pdata 
+6589 67e083e3 store 1 ,mem_rfcomm_send_offset 
+
+ssp_tx_rfcomm_from_uart_common0:
+658a 20406391 call get_rfcomm_snd_adss 
+658b 6fe147ac fetch 2 ,mem_current_packet_length 
+658c 1fe0fe08 increase 8 ,pdata 
+658d 684883e3 fetcht 1 ,mem_rfcomm_send_offset 
+658e 9840a200 iadd temp ,rega 
+658f 204052fb call l2cap_malloc 
+6590 67e10328 store 2 ,mem_rfcomm_tx_buff_ptr 
+6591 1fe0fe04 increase 4 ,pdata 
+6592 67e1032a store 2 ,mem_rfcomm_tx_payload_ptr 
+6593 1fe20a00 copy pdata ,contw 
+6594 6fe083e0 fetch 1 ,mem_rfcomm_send_adss 
+6595 e7e08005 istore 1 ,contw 
+6596 6fe083e1 fetch 1 ,mem_rfcomm_send_frame_type 
+6597 e7e08005 istore 1 ,contw 
+6598 204065b4 call ssp_tx_write_length 
+6599 204065c5 call ssp_tx_write_given_credit 
+659a 47234028 bpatchx patch28_6 ,mem_patch28 
+659b 6fe1465f fetch 2 ,mem_nl_rx_data_src 
+659c 1fe20600 copy pdata ,contu 
+659d 6fe147ac fetch 2 ,mem_current_packet_length 
+659e 1fe27200 copy pdata ,loopcnt 
+659f 20405fdf call uart_copy_rx_bytes_fast 
+65a0 18a20400 copy contw ,temp 
+65a1 18627e00 copy contu ,pdata 
+65a2 67e1465f store 2 ,mem_nl_rx_data_src 
+65a3 18420a00 copy temp ,contw 
+65a4 6fe083e2 fetch 1 ,mem_rfcomm_send_fcs 
+65a5 e7e08005 istore 1 ,contw 
+65a6 6fe10328 fetch 2 ,mem_rfcomm_tx_buff_ptr 
+65a7 1fe20a00 copy pdata ,contw 
+65a8 6fe147ac fetch 2 ,mem_current_packet_length 
+65a9 684883e3 fetcht 1 ,mem_rfcomm_send_offset 
+65aa 9840fe00 iadd temp ,pdata 
+65ab 1fe0fe04 increase 4 ,pdata 
+65ac e7e10005 istore 2 ,contw 
+65ad 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+65ae e7e10005 istore 2 ,contw 
+65af 70465700 jam 0 ,mem_credit_given 
+65b0 6fe14661 fetch 2 ,mem_nl_rx_len_all 
+65b1 c0003969 beq 0 ,module_hci_command_tx_spp_tx_complete 
+65b2 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+65b3 20600000 rtn 
+
+ssp_tx_write_length:
+65b4 4723c028 bpatchx patch28_7 ,mem_patch28 
+65b5 6fe147ac fetch 2 ,mem_current_packet_length 
+65b6 1fe67c7f sub pdata ,0x7f ,null 
+65b7 242165bc nbranch ssp_tx_write_long_packet ,positive 
+65b8 1fe3fe00 lshift pdata ,pdata 
+65b9 79207e00 set1 0 ,pdata 
+65ba e7e08005 istore 1 ,contw 
+65bb 20600000 rtn 
+
+ssp_tx_write_long_packet:
+65bc 6fe147ac fetch 2 ,mem_current_packet_length 
+65bd 1fe97e00 rshift3 pdata ,pdata 
+65be 1ff18400 rshift4 pdata ,temp 
+65bf 1fe17e7f and_into 0x7f ,pdata 
+65c0 1fe3fe00 lshift pdata ,pdata 
+65c1 793ffe00 set0 0 ,pdata 
+65c2 e7e08005 istore 1 ,contw 
+65c3 e0408005 istoret 1 ,contw 
+65c4 20600000 rtn 
+
+ssp_tx_write_given_credit:
+65c5 6fe0c657 fetch 1 ,mem_credit_given 
+65c6 207a0000 rtn blank 
+65c7 e7e08005 istore 1 ,contw 
+65c8 20600000 rtn 
+
+scheduler_process:
+65c9 47244029 bpatchx patch29_0 ,mem_patch29 
+65ca 204078f2 call check_51cmd 
+65cb 20403184 call app_process_bb_event 
+65cc 20405a9e call process_conn_sm 
+65cd 4724c029 bpatchx patch29_1 ,mem_patch29 
+65ce 204070d7 call sp_calc_sequence 
+65cf 204070b0 call simple_pairing_sequence 
+65d0 204070c1 call master_simple_paring_sequence 
+65d1 2040534f call l2cap_malloc_is_fifo_full 
+65d2 247a0000 nrtn blank 
+65d3 20404e62 call l2cap_call_proc_sigal_pending 
+65d4 2040534f call l2cap_malloc_is_fifo_full 
+65d5 247a0000 nrtn blank 
+65d6 47254029 bpatchx patch29_2 ,mem_patch29 
+65d7 20406613 call process_upper_sm 
+65d8 20405020 call l2cap_send_config_req 
+65d9 204064b7 call rfcomm_send_more_pkt 
+
+scheduler_process0:
+65da 204065dd call scheduler_tx_disconnect_hid 
+65db 4725c029 bpatchx patch29_3 ,mem_patch29 
+65dc 20203180 branch app_process_bt 
+
+scheduler_tx_disconnect_hid:
+65dd 6fe08330 fetch 1 ,mem_control_tasks 
+65de c2805143 bbit1 l2cap_disconnect_interrupt ,l2cap_disconnect_interrupt_req 
+65df c283d14d bbit1 l2cap_disconnect_control ,l2cap_disconnect_control_req 
+65e0 20600000 rtn 
+
+scheduler_tx_l2cap_pkt:
+65e1 47264029 bpatchx patch29_4 ,mem_patch29 
+65e2 20405355 call l2cap_malloc_is_fifo_empty 
+65e3 207a0000 rtn blank 
+65e4 6fe0804b fetch 1 ,mem_op 
+65e5 c3830000 rtnbit1 op_txl2cap 
+65e6 20405339 call l2cap_malloc_fifo_out 
+65e7 67e100be store 2 ,mem_txptr 
+65e8 1fe20c00 copy pdata ,contr 
+65e9 efe10006 ifetch 2 ,contr 
+65ea 1fe0fe04 increase 4 ,pdata 
+65eb 67e141e6 store 2 ,mem_tx_len 
+65ec 7041e506 jam 6 ,mem_tx_lch 
+65ed 4726c029 bpatchx patch29_5 ,mem_patch29 
+65ee 6fe144d9 fetch 2 ,mem_l2cap_tx_multi_offset 
+65ef 203a65fc branch scheduler_tx_l2cap_start_pkt ,blank 
+65f0 6fe0804b fetch 1 ,mem_op 
+65f1 c4038000 rtnbit0 op_pkt_comp 
+65f2 793ffe07 set0 op_pkt_comp ,pdata 
+65f3 67e0804b store 1 ,mem_op 
+65f4 7041e505 jam 5 ,mem_tx_lch 
+65f5 684944d9 fetcht 2 ,mem_l2cap_tx_multi_offset 
+65f6 6fe100be fetch 2 ,mem_txptr 
+65f7 9840fe00 iadd temp ,pdata 
+65f8 67e100be store 2 ,mem_txptr 
+65f9 6fe141e6 fetch 2 ,mem_tx_len 
+65fa 98467e00 isub temp ,pdata 
+65fb 67e141e6 store 2 ,mem_tx_len 
+
+scheduler_tx_l2cap_start_pkt:
+65fc 6fe141e6 fetch 2 ,mem_tx_len 
+65fd 203a137c branch assert ,blank 
+65fe d8400104 arg l2cap_max_pkt_len ,temp 
+65ff 98467e00 isub temp ,pdata 
+6600 2022e607 branch scheduler_tx_l2cap_last_pkt ,zero 
+6601 24216607 nbranch scheduler_tx_l2cap_last_pkt ,positive 
+6602 604941e6 storet 2 ,mem_tx_len 
+6603 6fe144d9 fetch 2 ,mem_l2cap_tx_multi_offset 
+6604 9840fe00 iadd temp ,pdata 
+6605 67e144d9 store 2 ,mem_l2cap_tx_multi_offset 
+6606 20206609 branch scheduler_tx_l2cap_pkt_end 
+
+scheduler_tx_l2cap_last_pkt:
+6607 58000000 setarg 0 
+6608 67e144d9 store 2 ,mem_l2cap_tx_multi_offset 
+
+scheduler_tx_l2cap_pkt_end:
+6609 6fe0804b fetch 1 ,mem_op 
+660a 79207e06 set1 op_txl2cap ,pdata 
+660b 67e0804b store 1 ,mem_op 
+660c 20600000 rtn 
+
+scheduler_start_upper_sm:
+660d 6fe0c791 fetch 1 ,mem_ui_profile_supported 
+660e c2806611 bbit1 support_hid ,scheduler_start_upper_sm_hid 
+660f 70033801 jam uppersm_reconn_sdp_conn ,mem_upper_sm_reconn 
+6610 20600000 rtn 
+
+scheduler_start_upper_sm_hid:
+6611 7003380f jam uppersm_reconn_hid_ctrl_conn ,mem_upper_sm_reconn 
+6612 20600000 rtn 
+
+process_upper_sm:
+6613 6fe0c78e fetch 1 ,memui_reconnect_mode 
+6614 243a6619 nbranch process_upper_sm_reconn ,blank 
+
+process_upper_sm_remote_page:
+6615 6fe08337 fetch 1 ,mem_upper_sm_remote_page 
+6616 207a0000 rtn blank 
+6617 70033700 jam 0 ,mem_upper_sm_remote_page 
+
+process_upper_sm_rp_wait:
+6618 20600000 rtn 
+
+process_upper_sm_reconn:
+6619 47274029 bpatchx patch29_6 ,mem_patch29 
+661a 6fe08338 fetch 1 ,mem_upper_sm_reconn 
+661b 207a0000 rtn blank 
+661c c000e639 beq uppersm_reconn_sdp_conn ,process_upper_sm_reconn_sdp_conn 
+661d c0016692 beq uppersm_reconn_sdp_conn_wait ,process_upper_sm_reconn_sdp_conn_wait 
+661e c001e63f beq uppersm_reconn_sdp_cfg ,process_upper_sm_reconn_sdp_cfg 
+661f c0026696 beq uppersm_reconn_sdp_cfg_wait ,process_upper_sm_reconn_sdp_cfg_wait 
+6620 c01de649 beq uppersm_reconn_ss_spp ,process_upper_sm_reconn_ss_spp 
+6621 c01e6699 beq uppersm_reconn_ss_spp_wait ,process_upper_sm_reconn_ss_spp_wait 
+6622 c006e64e beq uppersm_reconn_sdp_disconn ,process_upper_sm_reconn_sdp_disconn 
+6623 c007669e beq uppersm_reconn_sdp_disconn_wait ,process_upper_sm_reconn_sdp_disconn_wait 
+6624 c007e651 beq uppersm_reconn_hid_ctrl_conn ,process_upper_sm_reconn_hid_ctrl_conn 
+6625 c00866a4 beq uppersm_reconn_hid_ctrl_conn_wait ,process_upper_sm_reconn_hid_ctrl_conn_wait 
+6626 c008e657 beq uppersm_reconn_hid_ctrl_cfg ,process_upper_sm_reconn_hid_ctrl_cfg 
+6627 c00966a8 beq uppersm_reconn_hid_ctrl_cfg_wait ,process_upper_sm_reconn_hid_ctrl_cfg_wait 
+6628 c009e65d beq uppersm_reconn_hid_int_conn ,process_upper_sm_reconn_hid_int_conn 
+6629 c00a66ac beq uppersm_reconn_hid_int_conn_wait ,process_upper_sm_reconn_hid_int_conn_wait 
+662a c00ae663 beq uppersm_reconn_hid_int_cfg ,process_upper_sm_reconn_hid_int_cfg 
+662b c00b66b0 beq uppersm_reconn_hid_int_cfg_wait ,process_upper_sm_reconn_hid_int_cfg_wait 
+662c c00be669 beq uppersm_reconn_rfcomm_conn ,process_upper_sm_reconn_rfcomm_conn 
+662d c00c66b5 beq uppersm_reconn_rfcomm_conn_wait ,process_upper_sm_reconn_rfcomm_conn_wait 
+662e c00ce66f beq uppersm_reconn_rfcomm_cfg ,process_upper_sm_reconn_rfcomm_cfg 
+662f c00d66b9 beq uppersm_reconn_rfcomm_cfg_wait ,process_upper_sm_reconn_rfcomm_cfg_wait 
+6630 c00de675 beq uppersm_reconn_rfcomm_sabm ,process_upper_sm_reconn_rfcomm_sabm 
+6631 c00e66bd beq uppersm_reconn_rfcomm_sabm_wait ,process_upper_sm_reconn_rfcomm_sabm_wait 
+6632 c00ee67b beq uppersm_reconn_spp_cmd_pn ,process_upper_sm_reconn_spp_cmd_pn 
+6633 c00f66c2 beq uppersm_reconn_spp_cmd_pn_wait ,process_upper_sm_reconn_spp_cmd_pn_wait 
+6634 c00fe681 beq uppersm_reconn_spp_sabm ,process_upper_sm_reconn_spp_sabm 
+6635 c01066c6 beq uppersm_reconn_spp_sabm_wait ,process_upper_sm_reconn_spp_sabm_wait 
+6636 c010e68c beq uppersm_reconn_spp_cmd_ms ,process_upper_sm_reconn_spp_cmd_ms 
+6637 c01166ca beq uppersm_reconn_spp_cmd_ms_wait ,process_upper_sm_reconn_spp_cmd_ms_wait 
+
+process_upper_sm_reconn_wait:
+6638 20600000 rtn 
+
+process_upper_sm_reconn_sdp_conn:
+6639 204066d5 call upper_sm_send_sdp_conn 
+663a 70033802 jam uppersm_reconn_sdp_conn_wait ,mem_upper_sm_reconn 
+663b 6fe0c4e3 fetch 1 ,mem_sdp_state 
+663c 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+663d 67e0c4e3 store 1 ,mem_sdp_state 
+663e 20600000 rtn 
+
+process_upper_sm_reconn_sdp_cfg:
+663f 70033804 jam uppersm_reconn_sdp_cfg_wait ,mem_upper_sm_reconn 
+6640 6fe0c4e3 fetch 1 ,mem_sdp_state 
+6641 c3810000 rtnbit1 l2cap_channel_state_snd_cfg_req 
+6642 70033803 jam uppersm_reconn_sdp_cfg ,mem_upper_sm_reconn 
+6643 204066dc call upper_sm_send_sdp_cfg 
+6644 70033804 jam uppersm_reconn_sdp_cfg_wait ,mem_upper_sm_reconn 
+6645 6fe0c4e3 fetch 1 ,mem_sdp_state 
+6646 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+6647 67e0c4e3 store 1 ,mem_sdp_state 
+6648 20600000 rtn 
+
+process_upper_sm_reconn_ss_spp:
+6649 20405355 call l2cap_malloc_is_fifo_empty 
+664a 247a0000 nrtn blank 
+664b 204066eb call upper_sm_send_ss_spp 
+664c 7003383c jam uppersm_reconn_ss_spp_wait ,mem_upper_sm_reconn 
+664d 20600000 rtn 
+
+process_upper_sm_reconn_sdp_disconn:
+664e 204066e1 call upper_sm_send_sdp_disconn 
+664f 7003380e jam uppersm_reconn_sdp_disconn_wait ,mem_upper_sm_reconn 
+6650 20600000 rtn 
+
+process_upper_sm_reconn_hid_ctrl_conn:
+6651 204066fb call upper_sm_send_hid_ctrl_conn 
+6652 70033810 jam uppersm_reconn_hid_ctrl_conn_wait ,mem_upper_sm_reconn 
+6653 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+6654 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+6655 67e0c4e5 store 1 ,mem_hid_control_state 
+6656 20600000 rtn 
+
+process_upper_sm_reconn_hid_ctrl_cfg:
+6657 20406702 call upper_sm_send_hid_ctrl_cfg 
+6658 70033812 jam uppersm_reconn_hid_ctrl_cfg_wait ,mem_upper_sm_reconn 
+6659 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+665a 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+665b 67e0c4e5 store 1 ,mem_hid_control_state 
+665c 20600000 rtn 
+
+process_upper_sm_reconn_hid_int_conn:
+665d 20406707 call upper_sm_send_hid_int_conn 
+665e 70033814 jam uppersm_reconn_hid_int_conn_wait ,mem_upper_sm_reconn 
+665f 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+6660 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+6661 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+6662 20600000 rtn 
+
+process_upper_sm_reconn_hid_int_cfg:
+6663 2040670e call upper_sm_send_hid_int_cfg 
+6664 70033816 jam uppersm_reconn_hid_int_cfg_wait ,mem_upper_sm_reconn 
+6665 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+6666 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+6667 67e0c4e6 store 1 ,mem_hid_interrupt_state 
+6668 20600000 rtn 
+
+process_upper_sm_reconn_rfcomm_conn:
+6669 204066ef call upper_sm_send_rfcomm_conn 
+666a 70033818 jam uppersm_reconn_rfcomm_conn_wait ,mem_upper_sm_reconn 
+666b 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+666c 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+666d 67e0c4e4 store 1 ,mem_rfcomm_state 
+666e 20600000 rtn 
+
+process_upper_sm_reconn_rfcomm_cfg:
+666f 204066f6 call upper_sm_send_rfcomm_cfg 
+6670 7003381a jam uppersm_reconn_rfcomm_cfg_wait ,mem_upper_sm_reconn 
+6671 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+6672 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+6673 67e0c4e4 store 1 ,mem_rfcomm_state 
+6674 20600000 rtn 
+
+process_upper_sm_reconn_rfcomm_sabm:
+6675 20406713 call upper_sm_send_rfcomm_sabm 
+6676 7003381c jam uppersm_reconn_rfcomm_sabm_wait ,mem_upper_sm_reconn 
+6677 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+6678 79207e06 set1 l2cap_channel_rfcomm_only_sabm ,pdata 
+6679 67e0c4e4 store 1 ,mem_rfcomm_state 
+667a 20600000 rtn 
+
+process_upper_sm_reconn_spp_cmd_pn:
+667b 2040671a call upper_sm_send_spp_cmd_pn 
+667c 6fe0c4e7 fetch 1 ,mem_spp_state 
+667d 79207e00 set1 rfcomm_channel_state_pn_cmd ,pdata 
+667e 67e0c4e7 store 1 ,mem_spp_state 
+667f 7003381e jam uppersm_reconn_spp_cmd_pn_wait ,mem_upper_sm_reconn 
+6680 20600000 rtn 
+
+process_upper_sm_reconn_spp_sabm:
+6681 20406720 call upper_sm_send_spp_sabm 
+6682 6fe0c4e7 fetch 1 ,mem_spp_state 
+6683 79207e02 set1 rfcomm_channel_state_sabm ,pdata 
+6684 67e0c4e7 store 1 ,mem_spp_state 
+6685 70033820 jam uppersm_reconn_spp_sabm_wait ,mem_upper_sm_reconn 
+6686 6fe0c652 fetch 1 ,mem_remote_spp_channel 
+6687 1fe9fe00 lshift3 pdata ,pdata 
+6688 1fe1fe03 or_into 3 ,pdata 
+6689 d8404653 arg mem_hiufcs_spp ,temp 
+668a 604903ca storet 2 ,mem_contw_temp 
+668b 20206354 branch rfcomm_save_fcs_uih 
+
+process_upper_sm_reconn_spp_cmd_ms:
+668c 2040672a call upper_sm_send_spp_cmd_ms 
+668d 6fe0c4e7 fetch 1 ,mem_spp_state 
+668e 79207e04 set1 rfcomm_channel_state_snd_ms_cmd ,pdata 
+668f 67e0c4e7 store 1 ,mem_spp_state 
+6690 70033822 jam uppersm_reconn_spp_cmd_ms_wait ,mem_upper_sm_reconn 
+6691 20600000 rtn 
+
+process_upper_sm_reconn_sdp_conn_wait:
+6692 6fe0c4e3 fetch 1 ,mem_sdp_state 
+6693 c4008000 rtnbit0 l2cap_channel_state_conn_res 
+6694 70033803 jam uppersm_reconn_sdp_cfg ,mem_upper_sm_reconn 
+6695 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_sdp_cfg_wait:
+6696 6fe0c4e3 fetch 1 ,mem_sdp_state 
+6697 c19f8000 rtnne l2cap_channel_setup_complete 
+6698 7003383b jam uppersm_reconn_ss_spp ,mem_upper_sm_reconn 
+
+process_upper_sm_reconn_ss_spp_wait:
+6699 6fe08336 fetch 1 ,mem_message_to_uppersm 
+669a c18b8000 rtnne recieve_ss_reasult_hf 
+669b 70033600 jam 0 ,mem_message_to_uppersm 
+669c 7003380d jam uppersm_reconn_sdp_disconn ,mem_upper_sm_reconn 
+669d 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_sdp_disconn_wait:
+669e 6fe0c4e3 fetch 1 ,mem_sdp_state 
+669f 247a0000 nrtn blank 
+66a0 6fe0c791 fetch 1 ,mem_ui_profile_supported 
+66a1 c28066cd bbit1 support_hid ,process_upper_sm_reconn_setup_hid 
+66a2 c28366cf bbit1 support_spp ,process_upper_sm_reconn_setup_rfcomm 
+66a3 202066d3 branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_hid_ctrl_conn_wait:
+66a4 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+66a5 c4008000 rtnbit0 l2cap_channel_state_conn_res 
+66a6 70033811 jam uppersm_reconn_hid_ctrl_cfg ,mem_upper_sm_reconn 
+66a7 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_hid_ctrl_cfg_wait:
+66a8 6fe0c4e5 fetch 1 ,mem_hid_control_state 
+66a9 c19f8000 rtnne l2cap_channel_setup_complete 
+66aa 70033813 jam uppersm_reconn_hid_int_conn ,mem_upper_sm_reconn 
+66ab 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_hid_int_conn_wait:
+66ac 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+66ad c4008000 rtnbit0 l2cap_channel_state_conn_res 
+66ae 70033815 jam uppersm_reconn_hid_int_cfg ,mem_upper_sm_reconn 
+66af 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_hid_int_cfg_wait:
+66b0 6fe0c4e6 fetch 1 ,mem_hid_interrupt_state 
+66b1 c19f8000 rtnne l2cap_channel_setup_complete 
+66b2 6fe0c791 fetch 1 ,mem_ui_profile_supported 
+66b3 c28366cf bbit1 support_spp ,process_upper_sm_reconn_setup_rfcomm 
+66b4 202066d3 branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_rfcomm_conn_wait:
+66b5 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+66b6 c4008000 rtnbit0 l2cap_channel_state_conn_res 
+66b7 70033819 jam uppersm_reconn_rfcomm_cfg ,mem_upper_sm_reconn 
+66b8 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_rfcomm_cfg_wait:
+66b9 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+66ba c19f8000 rtnne l2cap_channel_setup_complete 
+66bb 7003381b jam uppersm_reconn_rfcomm_sabm ,mem_upper_sm_reconn 
+66bc 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_rfcomm_sabm_wait:
+66bd 6fe0c4e4 fetch 1 ,mem_rfcomm_state 
+66be c1ff8000 rtnne l2cap_channel_rfcomm_dlci0_opened 
+66bf 6fe0c791 fetch 1 ,mem_ui_profile_supported 
+66c0 c28366d1 bbit1 support_spp ,process_upper_sm_reconn_setup_spp 
+66c1 202066d3 branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_spp_cmd_pn_wait:
+66c2 6fe0c4e7 fetch 1 ,mem_spp_state 
+66c3 c4008000 rtnbit0 rfcomm_channel_state_pn_res 
+66c4 7003381f jam uppersm_reconn_spp_sabm ,mem_upper_sm_reconn 
+66c5 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_spp_sabm_wait:
+66c6 6fe0c4e7 fetch 1 ,mem_spp_state 
+66c7 c4018000 rtnbit0 rfcomm_channel_state_ua 
+66c8 70033821 jam uppersm_reconn_spp_cmd_ms ,mem_upper_sm_reconn 
+66c9 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_spp_cmd_ms_wait:
+66ca 6fe0c4e7 fetch 1 ,mem_spp_state 
+66cb c1ff8000 rtnne rfcomm_channel_setup_complete 
+66cc 202066d3 branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_setup_hid:
+66cd 7003380f jam uppersm_reconn_hid_ctrl_conn ,mem_upper_sm_reconn 
+66ce 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_setup_rfcomm:
+66cf 70033817 jam uppersm_reconn_rfcomm_conn ,mem_upper_sm_reconn 
+66d0 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_setup_spp:
+66d1 7003381d jam uppersm_reconn_spp_cmd_pn ,mem_upper_sm_reconn 
+66d2 20206619 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_termination:
+66d3 70033800 jam 0 ,mem_upper_sm_reconn 
+66d4 20600000 rtn 
+
+upper_sm_send_sdp_conn:
+66d5 4727c029 bpatchx patch29_7 ,mem_patch29 
+66d6 20405369 call l2cap_malloc_signal_channel 
+66d7 58000001 setarg psm_sdp 
+66d8 1fe20400 copy pdata ,temp 
+66d9 58000050 setarg l2cap_sdp_channel 
+66da 1fe21600 copy pdata ,timeup 
+66db 20205164 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_sdp_cfg:
+66dc 4728402a bpatchx patch2a_0 ,mem_patch2a 
+66dd 20405369 call l2cap_malloc_signal_channel 
+66de 6fe144db fetch 2 ,mem_sdp_remote_cid 
+66df 1fe20400 copy pdata ,temp 
+66e0 20205173 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_sdp_disconn:
+66e1 4728c02a bpatchx patch2a_1 ,mem_patch2a 
+66e2 20405369 call l2cap_malloc_signal_channel 
+66e3 6fe144db fetch 2 ,mem_sdp_remote_cid 
+66e4 1fe20400 copy pdata ,temp 
+66e5 d9600050 arg l2cap_sdp_channel ,timeup 
+66e6 20405188 call ml2cap_send_signal_disconn_req 
+66e7 6fe0c4e3 fetch 1 ,mem_sdp_state 
+66e8 793ffe05 set0 l2cap_channel_state_rcv_cfg_res ,pdata 
+66e9 67e0c4e3 store 1 ,mem_sdp_state 
+66ea 20600000 rtn 
+
+upper_sm_send_ss_spp:
+66eb 4729402a bpatchx patch2a_2 ,mem_patch2a 
+66ec 20405376 call l2cap_malloc_sdp_channel 
+66ed 20406a56 call sdp_send_spp_request 
+66ee 202051a3 branch msdp_send_req_done 
+
+upper_sm_send_rfcomm_conn:
+66ef 4729c02a bpatchx patch2a_3 ,mem_patch2a 
+66f0 20405369 call l2cap_malloc_signal_channel 
+66f1 58000003 setarg psm_rfcomm 
+66f2 1fe20400 copy pdata ,temp 
+66f3 58000051 setarg l2cap_rfcomm_channel 
+66f4 1fe21600 copy pdata ,timeup 
+66f5 20205164 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_rfcomm_cfg:
+66f6 472a402a bpatchx patch2a_4 ,mem_patch2a 
+66f7 20405369 call l2cap_malloc_signal_channel 
+66f8 6fe144dd fetch 2 ,mem_rfcomm_remote_cid 
+66f9 1fe20400 copy pdata ,temp 
+66fa 20205173 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_hid_ctrl_conn:
+66fb 472ac02a bpatchx patch2a_5 ,mem_patch2a 
+66fc 20405369 call l2cap_malloc_signal_channel 
+66fd 58000011 setarg psm_hid_control 
+66fe 1fe20400 copy pdata ,temp 
+66ff 58000052 setarg l2cap_hid_control_channel 
+6700 1fe21600 copy pdata ,timeup 
+6701 20205164 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_hid_ctrl_cfg:
+6702 472b402a bpatchx patch2a_6 ,mem_patch2a 
+6703 20405369 call l2cap_malloc_signal_channel 
+6704 6fe144df fetch 2 ,mem_hid_ctrl_remote_cid 
+6705 1fe20400 copy pdata ,temp 
+6706 20205173 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_hid_int_conn:
+6707 472bc02a bpatchx patch2a_7 ,mem_patch2a 
+6708 20405369 call l2cap_malloc_signal_channel 
+6709 58000013 setarg psm_hid_interrupt 
+670a 1fe20400 copy pdata ,temp 
+670b 58000053 setarg l2cap_hid_interrupt_channel 
+670c 1fe21600 copy pdata ,timeup 
+670d 20205164 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_hid_int_cfg:
+670e 472c402b bpatchx patch2b_0 ,mem_patch2b 
+670f 20405369 call l2cap_malloc_signal_channel 
+6710 6fe144e1 fetch 2 ,mem_hid_int_remote_cid 
+6711 1fe20400 copy pdata ,temp 
+6712 20205173 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_rfcomm_sabm:
+6713 472cc02b bpatchx patch2b_1 ,mem_patch2b 
+6714 20405383 call l2cap_malloc_rfcomm_channel 
+6715 7003ce03 jam 3 ,mem_current_adss 
+6716 7003d11c jam 0x1c ,mem_current_fcs 
+6717 204064c8 call rfcomm_send_sabm 
+6718 70465101 jam 1 ,mem_rfcomm_initiator 
+6719 20600000 rtn 
+
+upper_sm_send_spp_cmd_pn:
+671a 472d402b bpatchx patch2b_2 ,mem_patch2b 
+671b 20405383 call l2cap_malloc_rfcomm_channel 
+671c 6848c652 fetcht 1 ,mem_remote_spp_channel 
+671d 20406398 call channel_to_dlci 
+671e 6048c64b storet 1 ,mem_pn_dlci 
+671f 202064e3 branch rfcomm_send_param_neg_cmd 
+
+upper_sm_send_spp_sabm:
+6720 472dc02b bpatchx patch2b_3 ,mem_patch2b 
+6721 20405383 call l2cap_malloc_rfcomm_channel 
+6722 6848c64b fetcht 1 ,mem_pn_dlci 
+6723 20406392 call dlci_to_address_cmd 
+6724 20406339 call rfcomm_calculate_fcs_sabm 
+6725 67e083d1 store 1 ,mem_current_fcs 
+6726 6848c64b fetcht 1 ,mem_pn_dlci 
+6727 20406392 call dlci_to_address_cmd 
+6728 604883ce storet 1 ,mem_current_adss 
+6729 202064c8 branch rfcomm_send_sabm 
+
+upper_sm_send_spp_cmd_ms:
+672a 472e402b bpatchx patch2b_4 ,mem_patch2b 
+672b 20405383 call l2cap_malloc_rfcomm_channel 
+672c 6848c64b fetcht 1 ,mem_pn_dlci 
+672d 20406392 call dlci_to_address_cmd 
+672e 2020651b branch rfcomm_send_modem_status_cmd 
+
+sdp_process:
+672f 472ec02b bpatchx patch2b_5 ,mem_patch2b 
+6730 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+6731 98000c00 iforce contr 
+6732 efe08006 ifetch 1 ,contr 
+6733 1fe22400 copy pdata ,regb 
+6734 67e083ee store 1 ,mem_sdp_pduid 
+6735 efe10006 ifetch 2 ,contr 
+6736 67e103ef store 2 ,mem_sdp_transactionid 
+6737 efe08006 ifetch 1 ,contr 
+6738 1fed1600 lshift8 pdata ,timeup 
+6739 efe08006 ifetch 1 ,contr 
+673a 99609600 iadd timeup ,timeup 
+673b 472f402b bpatchx patch2b_6 ,mem_patch2b 
+673c 18c20400 copy contr ,temp 
+673d df200004 arg 4 ,loopcnt 
+673e d8a003fd arg mem_sdp_handle_list ,contw 
+673f 20407d8c call memset0 
+6740 18420c00 copy temp ,contr 
+6741 1a427e00 deposit regb 
+6742 c000e8d8 beq sdp_error_res ,sdp_process_error_res 
+6743 c001674a beq sdp_search_req ,sdp_process_ss_req 
+6744 c001e8d8 beq sdp_search_res ,sdp_process_ss_res 
+6745 c0026772 beq sdp_attribute_req ,sdp_process_sa_req 
+6746 c002e8d8 beq sdp_attribute_res ,sdp_process_sa_res 
+6747 c0036820 beq sdp_searchattrib_req ,sdp_process_ssa_req 
+6748 c003e8d8 beq sdp_searchattrib_res ,sdp_process_ssa_res 
+6749 202068df branch sdp_insufficient_resource 
+
+sdp_process_ss_req:
+674a 472fc02b bpatchx patch2b_7 ,mem_patch2b 
+674b 204068ee call ask_serviceclassid 
+674c 2841fe01 compare 1 ,temp ,0xff 
+674d 2020e95e branch ss_empty_rsp ,true 
+674e 2841feff compare 0xff ,temp ,0xff 
+674f 2020e8e2 branch sdp_invalid_request_syntax ,true 
+6750 efe10006 ifetch 2 ,contr 
+6751 67e103f5 store 2 ,mem_sdp_record_maxcnt 
+6752 196097fe increase -2 ,timeup 
+6753 196097ff increase -1 ,timeup 
+6754 2422e8dc nbranch sdp_invalid_pdu_size ,zero 
+6755 d96003e4 arg mem_sdp_uuid_search_ptr ,timeup 
+6756 efe1000b ifetch 2 ,timeup 
+6757 207a0000 rtn blank 
+6758 204069a0 call search_all_uuid 
+6759 20405381 call l2cap_get_sdp_tx_payload 
+675a 18007e03 force 3 ,pdata 
+675b e7e08005 istore 1 ,contw 
+675c 6fe103ef fetch 2 ,mem_sdp_transactionid 
+675d e7e10005 istore 2 ,contw 
+675e 18ebfe00 lshift2 queue ,pdata 
+675f 1fe0fe05 add pdata ,5 ,pdata 
+6760 1fe0a605 add pdata ,5 ,regc 
+6761 1ff0fe00 byteswap pdata ,pdata 
+6762 e7e10005 istore 2 ,contw 
+6763 18e27e00 deposit queue 
+6764 1ff0fe00 byteswap pdata ,pdata 
+6765 e7e10005 istore 2 ,contw 
+6766 e7e10005 istore 2 ,contw 
+6767 d8c003fd arg mem_sdp_handle_list ,contr 
+6768 18e27200 copy queue ,loopcnt 
+6769 2022e76d branch ss_req_blank ,zero 
+
+ss_req_loop:
+676a efe20006 ifetch 4 ,contr 
+676b e7e20005 istore 4 ,contw 
+676c c200676a loop ss_req_loop 
+
+ss_req_blank:
+676d 18007e00 force 0 ,pdata 
+676e e7e08005 istore 1 ,contw 
+676f 1a627e00 deposit regc 
+6770 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+6771 20600000 rtn 
+
+sdp_process_sa_req:
+6772 4730402c bpatchx patch2c_0 ,mem_patch2c 
+6773 efe20006 ifetch 4 ,contr 
+6774 67e203f7 store 4 ,mem_sdp_record_handle 
+6775 196097fc increase -4 ,timeup 
+6776 2040684c call sdp_store_maxbyte 
+6777 67e103f3 store 2 ,mem_sdp_attribute_maxbyte 
+6778 196097fe increase -2 ,timeup 
+6779 20406946 call dataelementtype6 
+677a 2022e8e2 branch sdp_invalid_request_syntax ,zero 
+677b 2a21fe05 compare 5 ,rega ,0xff 
+677c 2020e780 branch sa_judge_wholerange ,true 
+
+sa_isnot_wholerange:
+677d d8a003fd arg mem_sdp_attrib_list ,contw 
+677e 18000e00 force 0 ,queue 
+677f 2020678f branch sa_req_loop 
+
+sa_judge_wholerange:
+6780 efe08006 ifetch 1 ,contr 
+6781 c08568e2 bne sdp_attribute_range ,sdp_invalid_request_syntax 
+6782 efe10006 ifetch 2 ,contr 
+6783 243a678d nbranch sa_judge_wholerange_false1 ,blank 
+6784 efe08006 ifetch 1 ,contr 
+6785 c0ffe78b bne 0xff ,sa_judge_wholerange_false2 
+6786 efe08006 ifetch 1 ,contr 
+6787 c0ffe789 bne 0xff ,sa_judge_wholerange_false3 
+6788 202067d6 branch sa_req_all 
+
+sa_judge_wholerange_false3:
+6789 18c08dfb increase -5 ,contr 
+678a 2020677d branch sa_isnot_wholerange 
+
+sa_judge_wholerange_false2:
+678b 18c08dfc increase -4 ,contr 
+678c 2020677d branch sa_isnot_wholerange 
+
+sa_judge_wholerange_false1:
+678d 18c08dfd increase -3 ,contr 
+678e 2020677d branch sa_isnot_wholerange 
+
+sa_req_loop:
+678f efe08006 ifetch 1 ,contr 
+6790 c004e7a4 beq sdp_attribute_id ,sa_req_one_id 
+6791 c0056792 beq sdp_attribute_range ,sa_req_range 
+
+sa_req_range:
+6792 efe10006 ifetch 2 ,contr 
+6793 e7e10005 istore 2 ,contw 
+6794 18e08e01 increase 1 ,queue 
+6795 1ff0a400 byteswap pdata ,regb 
+6796 efe10006 ifetch 2 ,contr 
+6797 1ff0fe00 byteswap pdata ,pdata 
+
+sa_req_range_id_increase:
+6798 1a40a401 increase 1 ,regb 
+6799 9a467c00 isub regb ,null 
+679a 242167a1 nbranch sa_req_range_id_finish ,positive 
+679b 1fe22600 copy pdata ,regc 
+679c 1a50fe00 byteswap regb ,pdata 
+679d e7e10005 istore 2 ,contw 
+679e 18e08e01 increase 1 ,queue 
+679f 1a627e00 copy regc ,pdata 
+67a0 20206798 branch sa_req_range_id_increase 
+
+sa_req_range_id_finish:
+67a1 196097fb increase -5 ,timeup 
+67a2 1a20a3fb increase -5 ,rega 
+67a3 202067a9 branch sa_req_check_next_id 
+
+sa_req_one_id:
+67a4 efe10006 ifetch 2 ,contr 
+67a5 e7e10005 istore 2 ,contw 
+67a6 18e08e01 increase 1 ,queue 
+67a7 196097fd increase -3 ,timeup 
+67a8 1a20a3fd increase -3 ,rega 
+
+sa_req_check_next_id:
+67a9 242168e2 nbranch sdp_invalid_request_syntax ,positive 
+67aa 2422e78f nbranch sa_req_loop ,zero 
+67ab 196097ff increase -1 ,timeup 
+67ac 2422e8e2 nbranch sdp_invalid_request_syntax ,zero 
+67ad 20405381 call l2cap_get_sdp_tx_payload 
+67ae 18a08a0a increase 10 ,contw 
+67af da2003fd arg mem_sdp_attrib_list ,rega 
+
+sa_req_handle_attributelist_next:
+67b0 18e27e00 copy queue ,pdata 
+67b1 203a67c3 branch sa_req_handle_attributelist_end ,blank 
+67b2 efe10011 ifetch 2 ,rega 
+67b3 203a67c3 branch sa_req_handle_attributelist_end ,blank 
+67b4 98002400 iforce regb 
+67b5 6fe203f7 fetch 4 ,mem_sdp_record_handle 
+67b6 98000400 iforce temp 
+67b7 20406a05 call search_handle_attrib 
+67b8 18c27e00 copy contr ,pdata 
+67b9 203a67c0 branch sa_req_handle_attributelist_notfound ,blank 
+67ba 18c08dfd increase -3 ,contr 
+67bb efe18006 ifetch 3 ,contr 
+67bc e7e18005 istore 3 ,contw 
+67bd 20406979 call sdp_data_len 
+67be 98007200 iforce loopcnt 
+67bf 20407dd4 call memcpy 
+
+sa_req_handle_attributelist_notfound:
+67c0 1a20a202 increase 2 ,rega 
+67c1 18e08fff increase -1 ,queue 
+67c2 202067b0 branch sa_req_handle_attributelist_next 
+
+sa_req_handle_attributelist_end:
+67c3 da200005 arg sdp_attribute_res ,rega 
+67c4 204068a2 call ssa_req_range_lastfreg_common 
+67c5 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+67c6 c005e961 beq 11 ,sa_empty_rsp 
+67c7 202068b8 branch ssa_req_range_attrbutes_length_no_continue 
+
+sdp_store_continue_common:
+67c8 efe08006 ifetch 1 ,contr 
+67c9 c00067cc beq 0 ,sdp_store_continue_0byte 
+67ca c000e7ce beq 1 ,sdp_store_continue_1byte 
+67cb c00167d1 beq 2 ,sdp_store_continue_2byte 
+
+sdp_store_continue_0byte:
+67cc 196097ff increase -1 ,timeup 
+67cd 202067d4 branch sdp_store_continue_end 
+
+sdp_store_continue_1byte:
+67ce efe08006 ifetch 1 ,contr 
+67cf 196097fe increase -2 ,timeup 
+67d0 202067d4 branch sdp_store_continue_end 
+
+sdp_store_continue_2byte:
+67d1 efe10006 ifetch 2 ,contr 
+67d2 1ff0fe00 byteswap pdata ,pdata 
+67d3 196097fd increase -3 ,timeup 
+
+sdp_store_continue_end:
+67d4 67e103ec store 2 ,mem_sdp_continue_byte 
+67d5 20600000 rtn 
+
+sa_req_all:
+67d6 196097fb increase -5 ,timeup 
+67d7 204067c8 call sdp_store_continue_common 
+67d8 2422e8dc nbranch sdp_invalid_pdu_size ,zero 
+67d9 684a03f7 fetcht 4 ,mem_sdp_record_handle 
+67da 204069cf call search_handle 
+67db 2422e8d9 nbranch sdp_invalid_service_record_handle ,zero 
+67dc 18c22200 copy contr ,rega 
+67dd 20405381 call l2cap_get_sdp_tx_payload 
+67de 1a220c00 copy rega ,contr 
+67df 18a08a03 increase 3 ,contw 
+67e0 18c21600 copy contr ,timeup 
+67e1 20406980 call sdp_get_data 
+67e2 1fe22200 copy pdata ,rega 
+67e3 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+67e4 1fe22400 copy pdata ,regb 
+67e5 1a227e00 copy rega ,pdata 
+67e6 9a462400 isub regb ,regb 
+67e7 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+67e8 9a467c00 isub regb ,null 
+67e9 24216805 nbranch sa_req_all_fragment_sdp ,positive 
+67ea 78547c00 disable user 
+67eb 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+67ec 203a67f8 branch sa_req_all_fisrt_fragment ,blank 
+67ed 99608c00 iadd timeup ,contr 
+67ee 1a40a403 increase 3 ,regb 
+67ef 1a427200 copy regb ,loopcnt 
+67f0 1f227e00 copy loopcnt ,pdata 
+67f1 1fe0fe03 increase 3 ,pdata 
+67f2 1ff0fe00 byteswap pdata ,pdata 
+67f3 e7e10005 istore 2 ,contw 
+67f4 1f227e00 copy loopcnt ,pdata 
+67f5 1ff0fe00 byteswap pdata ,pdata 
+67f6 e7e10005 istore 2 ,contw 
+67f7 20206813 branch sa_req_all_answer_attributelist_full_loop 
+
+sa_req_all_fisrt_fragment:
+67f8 1a20f206 add rega ,6 ,loopcnt 
+67f9 203467fc branch sa_req_all_parlength_continue_byte ,user 
+67fa 1f30fe00 byteswap loopcnt ,pdata 
+67fb 202067ff branch sa_req_all_parlength_continue_byte_end 
+
+sa_req_all_parlength_continue_byte:
+67fc 1f227e00 copy loopcnt ,pdata 
+67fd 1fe0fe02 increase 2 ,pdata 
+67fe 1ff0fe00 byteswap pdata ,pdata 
+
+sa_req_all_parlength_continue_byte_end:
+67ff e7e10005 istore 2 ,contw 
+6800 1f20f3fd increase -3 ,loopcnt 
+6801 1f30fe00 byteswap loopcnt ,pdata 
+6802 e7e10005 istore 2 ,contw 
+6803 19620c00 copy timeup ,contr 
+6804 20206813 branch sa_req_all_answer_attributelist_full_loop 
+
+sa_req_all_fragment_sdp:
+6805 78347c00 enable user 
+6806 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+6807 1fe22200 copy pdata ,rega 
+6808 1a227200 copy rega ,loopcnt 
+6809 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+680a 203a67f8 branch sa_req_all_fisrt_fragment ,blank 
+680b 99608c00 iadd timeup ,contr 
+680c 1a227e00 copy rega ,pdata 
+680d 1fe0fe05 increase 5 ,pdata 
+680e 1ff0fe00 byteswap pdata ,pdata 
+680f e7e10005 istore 2 ,contw 
+6810 1a227e00 copy rega ,pdata 
+6811 1ff0fe00 byteswap pdata ,pdata 
+6812 e7e10005 istore 2 ,contw 
+
+sa_req_all_answer_attributelist_full_loop:
+6813 20407dd4 call memcpy 
+6814 2434681c nbranch sa_req_all_last_frag_continue ,user 
+6815 18007e02 force 2 ,pdata 
+6816 e7e08005 istore 1 ,contw 
+6817 18c27e00 copy contr ,pdata 
+6818 99667e00 isub timeup ,pdata 
+6819 1ff0fe00 byteswap pdata ,pdata 
+681a e7e10005 istore 2 ,contw 
+681b 2020681e branch sa_req_all_frag_end 
+
+sa_req_all_last_frag_continue:
+681c 18007e00 force 0 ,pdata 
+681d e7e08005 istore 1 ,contw 
+
+sa_req_all_frag_end:
+681e da200005 arg sdp_attribute_res ,rega 
+681f 202068ce branch ssa_req_range_common 
+
+sdp_process_ssa_req:
+6820 4730c02c bpatchx patch2c_1 ,mem_patch2c 
+6821 204068ee call ask_serviceclassid 
+6822 2841feff compare 0xff ,temp ,0xff 
+6823 2020e8e2 branch sdp_invalid_request_syntax ,true 
+6824 2040684c call sdp_store_maxbyte 
+6825 67e103f3 store 2 ,mem_sdp_attribute_maxbyte 
+6826 196097fe increase -2 ,timeup 
+6827 20406946 call dataelementtype6 
+6828 d8a003fd arg mem_sdp_attrib_list ,contw 
+6829 18000e00 force 0 ,queue 
+
+ssa_req_loop:
+682a efe08006 ifetch 1 ,contr 
+682b c0056854 beq sdp_attribute_range ,ssa_req_range 
+682c efe10006 ifetch 2 ,contr 
+682d e7e10005 istore 2 ,contw 
+682e 18e08e01 increase 1 ,queue 
+682f 196097fd increase -3 ,timeup 
+6830 1a20a3fd increase -3 ,rega 
+6831 242168e2 nbranch sdp_invalid_request_syntax ,positive 
+6832 2422e82a nbranch ssa_req_loop ,zero 
+6833 196097ff increase -1 ,timeup 
+6834 2422e8e2 nbranch sdp_invalid_request_syntax ,zero 
+6835 20405381 call l2cap_get_sdp_tx_payload 
+6836 18a08a0d increase 13 ,contw 
+6837 6fe103e4 fetch 2 ,mem_sdp_uuid_search_ptr 
+6838 98002600 iforce regc 
+6839 da2003fd arg mem_sdp_attrib_list ,rega 
+
+ssa_req_attributelist_next:
+683a efe10011 ifetch 2 ,rega 
+683b 203a6847 branch ssa_req_attributelist_end ,blank 
+683c 98002400 iforce regb 
+683d 204069e4 call search_attrib 
+683e 203a6845 branch ssa_req_attributelist_notfound ,blank 
+683f 18c08dfd increase -3 ,contr 
+6840 efe18006 ifetch 3 ,contr 
+6841 e7e18005 istore 3 ,contw 
+6842 20406979 call sdp_data_len 
+6843 98007200 iforce loopcnt 
+6844 20407dd4 call memcpy 
+
+ssa_req_attributelist_notfound:
+6845 1a20a202 increase 2 ,rega 
+6846 2020683a branch ssa_req_attributelist_next 
+
+ssa_req_attributelist_end:
+6847 204068a1 call ssa_req_range_lastfreg 
+6848 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+6849 c0076964 beq 14 ,ssa_empty_rsp 
+684a 204068b8 call ssa_req_range_attrbutes_length_no_continue 
+684b 202068b8 branch ssa_req_range_attrbutes_length_no_continue 
+
+sdp_store_maxbyte:
+684c efe10006 ifetch 2 ,contr 
+684d 1ff0fe00 byteswap pdata ,pdata 
+684e 1fe0fffd increase -3 ,pdata 
+684f d84000c8 arg 200 ,temp 
+6850 98467c00 isub temp ,null 
+6851 24610000 nrtn positive 
+6852 580000c8 setarg 200 
+6853 20600000 rtn 
+
+ssa_req_range:
+6854 18c08c04 increase 4 ,contr 
+6855 196097fb increase -5 ,timeup 
+6856 1a20a3fb increase -5 ,rega 
+6857 2422e8e2 nbranch sdp_invalid_request_syntax ,zero 
+6858 204067c8 call sdp_store_continue_common 
+6859 2422e8dc nbranch sdp_invalid_pdu_size ,zero 
+685a d96003e4 arg mem_sdp_uuid_search_ptr ,timeup 
+685b 204069a0 call search_all_uuid 
+685c 18e27e00 deposit queue 
+685d 203a6964 branch ssa_empty_rsp ,blank 
+685e 67e08421 store 1 ,mem_handle_humber 
+685f 1a427e00 copy regb ,pdata 
+6860 67e1041f store 2 ,mem_sdp_all_length 
+6861 d8e00000 arg 0 ,queue 
+6862 da200000 arg 0 ,rega 
+6863 20405381 call l2cap_get_sdp_tx_payload 
+6864 18a08a0a increase 10 ,contw 
+
+ssa_req_range_find_handle:
+6865 2040688a call ssa_req_range_get_length 
+6866 2434137c nbranch assert ,user 
+6867 18c21600 copy contr ,timeup 
+6868 1fe22600 copy pdata ,regc 
+6869 9a20a200 iadd rega ,rega 
+686a 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+686b 1fe22400 copy pdata ,regb 
+686c 203a6893 branch ssa_req_range_first_freg ,blank 
+
+ssa_req_range_later_freg_with_continue:
+686d 1a227e00 copy rega ,pdata 
+686e 9a462400 isub regb ,regb 
+686f 2022e885 branch ssa_req_range_next_handle ,zero 
+6870 24216885 nbranch ssa_req_range_next_handle ,positive 
+6871 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+6872 9a467c00 isub regb ,null 
+6873 2022e87c branch ssa_req_range_maxbyte_with_continue ,zero 
+6874 2421687c nbranch ssa_req_range_maxbyte_with_continue ,positive 
+
+ssa_req_range_send_not_maxbyte:
+6875 1a427200 copy regb ,loopcnt 
+6876 2040687f call ssa_req_range_maxbyte_with_continue_cpy 
+6877 6fe08421 fetch 1 ,mem_handle_humber 
+6878 18e08e01 increase 1 ,queue 
+6879 98e67c00 isub queue ,null 
+687a 2022e8a1 branch ssa_req_range_lastfreg ,zero 
+687b 202068be branch ssa_req_range_freg_with_continue 
+
+ssa_req_range_maxbyte_with_continue:
+687c 1fe27200 copy pdata ,loopcnt 
+687d 2040687f call ssa_req_range_maxbyte_with_continue_cpy 
+687e 202068be branch ssa_req_range_freg_with_continue 
+
+ssa_req_range_maxbyte_with_continue_cpy:
+687f 18a08bfd increase -3 ,contw 
+6880 1f220400 copy loopcnt ,temp 
+6881 1a627e00 copy regc ,pdata 
+6882 9a467e00 isub regb ,pdata 
+6883 99608c00 iadd timeup ,contr 
+6884 20207dd4 branch memcpy 
+
+ssa_req_range_next_handle:
+6885 6fe08421 fetch 1 ,mem_handle_humber 
+6886 18e08e01 increase 1 ,queue 
+6887 98e67c00 isub queue ,null 
+6888 20628000 rtn zero 
+6889 20206865 branch ssa_req_range_find_handle 
+
+ssa_req_range_get_length:
+688a 20407ec7 call disable_user 
+688b d8c003fd arg mem_sdp_handle_list ,contr 
+688c 18ebfe00 lshift2 queue ,pdata 
+688d 98c08c00 iadd contr ,contr 
+688e e8420006 ifetcht 4 ,contr 
+688f 204069cf call search_handle 
+6890 24628000 nrtn zero 
+6891 20406979 call sdp_data_len 
+6892 20207ec5 branch enable_user 
+
+ssa_req_range_first_freg:
+6893 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+6894 9a267c00 isub rega ,null 
+6895 242168ad nbranch ssa_req_range_firstfreg_maxbyte_with_continue ,positive 
+6896 1a227200 copy rega ,loopcnt 
+6897 1f220400 copy loopcnt ,temp 
+6898 19620c00 copy timeup ,contr 
+6899 20407dd4 call memcpy 
+689a 6fe1041f fetch 2 ,mem_sdp_all_length 
+689b 9a267c00 isub rega ,null 
+689c 2022e89f branch ssa_req_range_freg_no_continue ,zero 
+
+ssa_req_range_firstfreg_not_maxbyte_with_continue:
+689d 204068be call ssa_req_range_freg_with_continue 
+689e 202068b2 branch ssa_req_range_attrbutes_length 
+
+ssa_req_range_freg_no_continue:
+689f 204068a1 call ssa_req_range_lastfreg 
+68a0 202068b2 branch ssa_req_range_attrbutes_length 
+
+ssa_req_range_lastfreg:
+68a1 da200007 arg sdp_searchattrib_res ,rega 
+
+ssa_req_range_lastfreg_common:
+68a2 18007e00 force 0 ,pdata 
+68a3 e7e08005 istore 1 ,contw 
+68a4 204068ce call ssa_req_range_common 
+68a5 68490326 fetcht 2 ,mem_sdp_tx_pkt_length 
+68a6 184085fb increase -5 ,temp 
+68a7 1850fe00 byteswap temp ,pdata 
+68a8 e7e10005 istore 2 ,contw 
+68a9 184085fd increase -3 ,temp 
+68aa 1850fe00 byteswap temp ,pdata 
+68ab e7e10005 istore 2 ,contw 
+68ac 20600000 rtn 
+
+ssa_req_range_firstfreg_maxbyte_with_continue:
+68ad 1fe27200 copy pdata ,loopcnt 
+68ae 1f220400 copy loopcnt ,temp 
+68af 19620c00 copy timeup ,contr 
+68b0 20407dd4 call memcpy 
+68b1 204068be call ssa_req_range_freg_with_continue 
+
+ssa_req_range_attrbutes_length:
+68b2 58000036 setarg 0x36 
+68b3 e7e08005 istore 1 ,contw 
+68b4 6fe1041f fetch 2 ,mem_sdp_all_length 
+68b5 1ff0fe00 byteswap pdata ,pdata 
+68b6 e7e10005 istore 2 ,contw 
+68b7 20600000 rtn 
+
+ssa_req_range_attrbutes_length_no_continue:
+68b8 58000036 setarg 0x36 
+68b9 e7e08005 istore 1 ,contw 
+68ba 184085fd increase -3 ,temp 
+68bb 1850fe00 byteswap temp ,pdata 
+68bc e7e10005 istore 2 ,contw 
+68bd 20600000 rtn 
+
+ssa_req_range_freg_with_continue:
+68be da200007 arg sdp_searchattrib_res ,rega 
+68bf 58000002 setarg 2 
+68c0 e7e08005 istore 1 ,contw 
+68c1 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+68c2 98408400 iadd temp ,temp 
+68c3 1850fe00 byteswap temp ,pdata 
+68c4 e7e10005 istore 2 ,contw 
+68c5 204068ce call ssa_req_range_common 
+68c6 68490326 fetcht 2 ,mem_sdp_tx_pkt_length 
+68c7 184085fb increase -5 ,temp 
+68c8 1850fe00 byteswap temp ,pdata 
+68c9 e7e10005 istore 2 ,contw 
+68ca 184085fb increase -5 ,temp 
+68cb 1850fe00 byteswap temp ,pdata 
+68cc e7e10005 istore 2 ,contw 
+68cd 20600000 rtn 
+
+ssa_req_range_common:
+68ce 6fe10324 fetch 2 ,mem_sdp_tx_payload_ptr 
+68cf 98a67e00 isub contw ,pdata 
+68d0 1fe67e00 sub pdata ,0 ,pdata 
+68d1 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+68d2 20405381 call l2cap_get_sdp_tx_payload 
+68d3 1a227e00 copy rega ,pdata 
+68d4 e7e08005 istore 1 ,contw 
+68d5 6fe103ef fetch 2 ,mem_sdp_transactionid 
+68d6 e7e10005 istore 2 ,contw 
+68d7 20600000 rtn 
+
+sdp_process_ssa_res:
+
+sdp_process_ss_res:
+
+sdp_process_sa_res:
+
+sdp_process_error_res:
+68d8 20600000 rtn 
+
+sdp_invalid_service_record_handle:
+68d9 58000200 setarg 0x0200 
+68da 67e1041d store 2 ,mem_sdp_error_code 
+68db 202068e4 branch sdp_error_response 
+
+sdp_invalid_pdu_size:
+68dc 58000400 setarg 0x0400 
+68dd 67e1041d store 2 ,mem_sdp_error_code 
+68de 202068e4 branch sdp_error_response 
+
+sdp_insufficient_resource:
+68df 58000600 setarg 0x0600 
+68e0 67e1041d store 2 ,mem_sdp_error_code 
+68e1 202068e4 branch sdp_error_response 
+
+sdp_invalid_request_syntax:
+68e2 58000300 setarg 0x0300 
+68e3 67e1041d store 2 ,mem_sdp_error_code 
+
+sdp_error_response:
+68e4 20405381 call l2cap_get_sdp_tx_payload 
+68e5 e7e08005 istore 1 ,contw 
+68e6 6fe103ef fetch 2 ,mem_sdp_transactionid 
+68e7 e7e10005 istore 2 ,contw 
+68e8 58000200 setarg 0x0200 
+68e9 e7e10005 istore 2 ,contw 
+68ea 6fe1041d fetch 2 ,mem_sdp_error_code 
+68eb e7e10005 istore 2 ,contw 
+68ec 70032607 jam 7 ,mem_sdp_tx_pkt_length 
+68ed 20600000 rtn 
+
+ask_serviceclassid:
+68ee da400000 arg 0 ,regb 
+68ef 18000400 force 0 ,temp 
+68f0 d8a003e4 arg mem_sdp_uuid_search_ptr ,contw 
+68f1 20406946 call dataelementtype6 
+68f2 2022e944 branch asksrv_error ,zero 
+
+classidloop:
+68f3 1a40a401 increase 1 ,regb 
+68f4 efe08006 ifetch 1 ,contr 
+68f5 1a20a3ff increase -1 ,rega 
+68f6 196097ff increase -1 ,timeup 
+68f7 2fe1f018 compare 0x18 ,pdata ,0xf8 
+68f8 2420e944 nbranch asksrv_error ,true 
+68f9 2fe00e04 compare 0x04 ,pdata ,0x07 
+68fa 2420e911 nbranch cmp032 ,true 
+68fb 18000401 force 1 ,temp 
+
+skip2bytes:
+68fc efe08006 ifetch 1 ,contr 
+68fd 1a20a3ff increase -1 ,rega 
+68fe 196097ff increase -1 ,timeup 
+68ff c0806905 bne 0x00 ,frstbwrong 
+6900 efe08006 ifetch 1 ,contr 
+6901 1a20a3ff increase -1 ,rega 
+6902 196097ff increase -1 ,timeup 
+6903 c0006916 beq 0x00 ,cmpuuid 
+6904 20206908 branch scndbwrong 
+
+frstbwrong:
+6905 18c08c01 increase 1 ,contr 
+6906 1a20a3ff increase -1 ,rega 
+6907 196097ff increase -1 ,timeup 
+
+scndbwrong:
+6908 18c08c02 increase 2 ,contr 
+6909 1a20a3fe increase -2 ,rega 
+690a 196097fe increase -2 ,timeup 
+690b 2841fe00 compare 0x00 ,temp ,0xff 
+690c 2020e93e branch loopornot ,true 
+690d 18c08c0c increase 12 ,contr 
+690e 1a20a3f4 increase -12 ,rega 
+690f 196097f4 increase -12 ,timeup 
+6910 2020693e branch loopornot 
+
+cmp032:
+6911 2fe00e02 compare 0x02 ,pdata ,0x07 
+6912 2420e914 nbranch cmp016 ,true 
+6913 202068fc branch skip2bytes 
+
+cmp016:
+6914 2fe00e01 compare 0x01 ,pdata ,0x07 
+6915 2420e944 nbranch asksrv_error ,true 
+
+cmpuuid:
+6916 1a20a3fe increase -2 ,rega 
+6917 196097fe increase -2 ,timeup 
+6918 efe10006 ifetch 2 ,contr 
+6919 1a467c04 sub regb ,4 ,null 
+691a 2022e91c branch uuidsize ,zero 
+691b e7e10005 istore 2 ,contw 
+
+uuidsize:
+691c 2841fe00 compare 0x00 ,temp ,0xff 
+691d 2020e93e branch loopornot ,true 
+691e 18c20400 copy contr ,temp 
+691f efe08006 ifetch 1 ,contr 
+6920 c0806937 bne 0x00 ,wrong12b 
+6921 efe08006 ifetch 1 ,contr 
+6922 c0806937 bne 0x00 ,wrong12b 
+6923 efe08006 ifetch 1 ,contr 
+6924 c0886937 bne 0x10 ,wrong12b 
+6925 efe08006 ifetch 1 ,contr 
+6926 c0806937 bne 0x00 ,wrong12b 
+6927 efe08006 ifetch 1 ,contr 
+6928 c0c06937 bne 0x80 ,wrong12b 
+6929 efe08006 ifetch 1 ,contr 
+692a c0806937 bne 0x00 ,wrong12b 
+692b efe08006 ifetch 1 ,contr 
+692c c0806937 bne 0x00 ,wrong12b 
+692d efe08006 ifetch 1 ,contr 
+692e c0c06937 bne 0x80 ,wrong12b 
+692f efe08006 ifetch 1 ,contr 
+6930 c0afe937 bne 0x5f ,wrong12b 
+6931 efe08006 ifetch 1 ,contr 
+6932 c0cde937 bne 0x9b ,wrong12b 
+6933 efe08006 ifetch 1 ,contr 
+6934 c09a6937 bne 0x34 ,wrong12b 
+6935 efe08006 ifetch 1 ,contr 
+6936 c07de93c beq 0xfb ,chck12dn 
+
+wrong12b:
+6937 18420c00 copy temp ,contr 
+
+wrong12b1:
+6938 18c08c0c increase 12 ,contr 
+6939 18000e00 force 0x00 ,queue 
+693a 18000400 force 0x00 ,temp 
+693b 2020693c branch chck12dn 
+
+chck12dn:
+693c 196097f4 increase -12 ,timeup 
+693d 1a20a3f4 increase -12 ,rega 
+
+loopornot:
+693e 18000400 force 0x00 ,temp 
+693f 2a21fe00 compare 0x00 ,rega ,0xff 
+6940 2420e8f3 nbranch classidloop ,true 
+6941 18007e00 force 0 ,pdata 
+6942 e7e10005 istore 2 ,contw 
+6943 20600000 rtn 
+
+asksrv_error:
+6944 d84000ff arg 0xff ,temp 
+6945 20600000 rtn 
+
+dataelementtype6:
+6946 4732402c bpatchx patch2c_4 ,mem_patch2c 
+6947 efe08006 ifetch 1 ,contr 
+6948 196097ff increase -1 ,timeup 
+6949 2fe1f030 compare 0x30 ,pdata ,0xf8 
+694a 2420e95c nbranch dsize_error ,true 
+694b 2fe00e07 compare 0x07 ,pdata ,0x07 
+694c 2020e955 branch dsize32 ,true 
+694d 2fe00e06 compare 0x06 ,pdata ,0x07 
+694e 2020e957 branch dsize16 ,true 
+694f 2fe00e05 compare 0x05 ,pdata ,0x07 
+6950 2420e95c nbranch dsize_error ,true 
+6951 efe08006 ifetch 1 ,contr 
+6952 1fe22200 copy pdata ,rega 
+6953 196097ff increase -1 ,timeup 
+6954 2020695a branch dsize 
+
+dsize32:
+6955 18c08c02 increase 2 ,contr 
+6956 196097fe increase -2 ,timeup 
+
+dsize16:
+6957 efe10006 ifetch 2 ,contr 
+6958 1ff0a200 byteswap pdata ,rega 
+6959 196097fe increase -2 ,timeup 
+
+dsize:
+695a 18007e01 force 0x01 ,pdata 
+695b 20600000 rtn 
+
+dsize_error:
+695c 18007e00 force 0x00 ,pdata 
+695d 20600000 rtn 
+
+ss_empty_rsp:
+695e 58000003 setarg sdp_search_res 
+695f 67e083ee store 1 ,mem_sdp_pduid 
+6960 20206966 branch empty_response 
+
+sa_empty_rsp:
+6961 58000005 setarg sdp_attribute_res 
+6962 67e083ee store 1 ,mem_sdp_pduid 
+6963 20206966 branch empty_response 
+
+ssa_empty_rsp:
+6964 58000007 setarg sdp_searchattrib_res 
+6965 67e083ee store 1 ,mem_sdp_pduid 
+
+empty_response:
+6966 20405381 call l2cap_get_sdp_tx_payload 
+6967 6fe083ee fetch 1 ,mem_sdp_pduid 
+6968 1fe22400 copy pdata ,regb 
+6969 e7e08005 istore 1 ,contw 
+696a 6fe103ef fetch 2 ,mem_sdp_transactionid 
+696b e7e10005 istore 2 ,contw 
+696c 58000500 setarg 0x0500 
+696d e7e10005 istore 2 ,contw 
+696e 2a41fe05 compare sdp_attribute_res ,regb ,0xff 
+696f 2020e975 branch fullsearch ,true 
+6970 2a41fe07 compare sdp_searchattrib_res ,regb ,0xff 
+6971 2020e975 branch fullsearch ,true 
+6972 58000000 setarg 0x000000 
+6973 e7e28005 istore 5 ,contw 
+6974 20206977 branch outempty 
+
+fullsearch:
+6975 58350200 setarg 0x350200 
+6976 e7e28005 istore 5 ,contw 
+
+outempty:
+6977 7003260a jam 10 ,mem_sdp_tx_pkt_length 
+6978 20600000 rtn 
+
+sdp_data_len:
+6979 20407d5b call store_contw 
+697a 20407d5e call store_contr 
+697b 20406980 call sdp_get_data 
+697c 20407d55 call get_contw 
+697d 20407d58 call get_contr 
+697e 18427e00 copy temp ,pdata 
+697f 20600000 rtn 
+
+sdp_get_data:
+6980 efe08006 ifetch 1 ,contr 
+6981 1fe17207 and pdata ,0x7 ,loopcnt 
+6982 1fe97e00 rshift3 pdata ,pdata 
+6983 c080698a bne 0 ,sdp_get_data_type_not0 
+
+sdp_get_data_type0:
+6984 18007e01 force 1 ,pdata 
+6985 18000401 force 1 ,temp 
+6986 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex01234:
+6987 20407d35 call left_shift_n 
+6988 1fe08401 add pdata ,1 ,temp 
+6989 20600000 rtn 
+
+sdp_get_data_type_not0:
+698a 1f227e00 deposit loopcnt 
+698b 1fe67c04 sub pdata ,4 ,null 
+698c 20216987 branch sdp_get_data_type_not0_sizeindex01234 ,positive 
+698d c002e991 beq 5 ,sdp_get_data_type_not0_sizeindex5 
+698e c0036994 beq 6 ,sdp_get_data_type_not0_sizeindex6 
+698f c003e998 beq 7 ,sdp_get_data_type_not0_sizeindex7 
+6990 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex5:
+6991 efe08006 ifetch 1 ,contr 
+6992 1fe08402 add pdata ,2 ,temp 
+6993 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex6:
+6994 efe10006 ifetch 2 ,contr 
+6995 1ff0fe00 byteswap pdata ,pdata 
+6996 1fe08403 add pdata ,3 ,temp 
+6997 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex7:
+6998 efe10006 ifetch 2 ,contr 
+6999 1ff0fe00 byteswap pdata ,pdata 
+699a e8410006 ifetcht 2 ,contr 
+699b 18508400 byteswap temp ,temp 
+699c 18500400 lshift16 temp ,temp 
+699d 9840fe00 iadd temp ,pdata 
+699e 1fe08405 add pdata ,5 ,temp 
+699f 20600000 rtn 
+
+search_all_uuid:
+69a0 4732c02c bpatchx patch2c_5 ,mem_patch2c 
+69a1 18000e00 force 0 ,queue 
+69a2 da400000 arg 0 ,regb 
+69a3 d8a003fd arg mem_sdp_handle_list ,contw 
+
+search_all_uuid_llop:
+69a4 efe1000b ifetch 2 ,timeup 
+69a5 207a0000 rtn blank 
+69a6 204069ab call search_uuid 
+69a7 18e27e00 copy queue ,pdata 
+69a8 c1038000 rtneq sdp_max_handle_number 
+69a9 19609602 increase 2 ,timeup 
+69aa 202069a4 branch search_all_uuid_llop 
+
+search_uuid:
+69ab 98002600 iforce regc 
+69ac 6fe14663 fetch 2 ,mem_ui_uuid_table 
+69ad 98000c00 iforce contr 
+
+search_uuid_next:
+69ae 18e27e00 copy queue ,pdata 
+69af c1038000 rtneq sdp_max_handle_number 
+69b0 78547c00 disable user 
+69b1 efe08006 ifetch 1 ,contr 
+69b2 207a0000 rtn blank 
+69b3 98007200 iforce loopcnt 
+
+search_uuid_loop:
+69b4 efe10006 ifetch 2 ,contr 
+69b5 9a667c00 isub regc ,null 
+69b6 2422e9b8 nbranch search_uuid_not_found ,zero 
+69b7 78347c00 enable user 
+
+search_uuid_not_found:
+69b8 c20069b4 loop search_uuid_loop 
+69b9 e8420006 ifetcht 4 ,contr 
+69ba 18c22200 copy contr ,rega 
+69bb 243469cb nbranch search_uuid_nomatch ,user 
+69bc d8c003fd arg mem_sdp_handle_list ,contr 
+69bd df200007 arg sdp_max_handle_number ,loopcnt 
+
+search_uuid_check_same_handle:
+69be efe20006 ifetch 4 ,contr 
+69bf 203a69c4 branch search_uuid_store_handle ,blank 
+69c0 98467c00 isub temp ,null 
+69c1 2022e9cb branch search_uuid_nomatch ,zero 
+69c2 c20069be loop search_uuid_check_same_handle 
+69c3 20600000 rtn 
+
+search_uuid_store_handle:
+69c4 e0420005 istoret 4 ,contw 
+69c5 18e08e01 increase 1 ,queue 
+69c6 1a220c00 copy rega ,contr 
+69c7 20406979 call sdp_data_len 
+69c8 9a40a400 iadd regb ,regb 
+69c9 98c08c00 iadd contr ,contr 
+69ca 202069ae branch search_uuid_next 
+
+search_uuid_nomatch:
+69cb 1a220c00 copy rega ,contr 
+69cc 20406980 call sdp_get_data 
+69cd 98c08c00 iadd contr ,contr 
+69ce 202069ae branch search_uuid_next 
+
+search_handle:
+69cf 4733402c bpatchx patch2c_6 ,mem_patch2c 
+69d0 6fe14663 fetch 2 ,mem_ui_uuid_table 
+69d1 98000c00 iforce contr 
+
+search_handle_loop:
+69d2 efe08006 ifetch 1 ,contr 
+69d3 203a7ec1 branch disable_zero ,blank 
+69d4 1fe3fe00 lshift pdata ,pdata 
+69d5 98c08c00 iadd contr ,contr 
+69d6 efe20006 ifetch 4 ,contr 
+69d7 98467c00 isub temp ,null 
+69d8 20628000 rtn zero 
+69d9 18a27e00 deposit contw 
+69da 67e1097d store 2 ,mem_contw 
+69db 604c0964 storet 8 ,mem_temp 
+69dc 20406980 call sdp_get_data 
+69dd 98c08c00 iadd contr ,contr 
+69de 18c27e00 copy contr ,pdata 
+69df 6849097d fetcht 2 ,mem_contw 
+69e0 18420a00 copy temp ,contw 
+69e1 684c0964 fetcht 8 ,mem_temp 
+69e2 1fe20c00 copy pdata ,contr 
+69e3 202069d2 branch search_handle_loop 
+
+search_attrib:
+69e4 4733c02c bpatchx patch2c_7 ,mem_patch2c 
+69e5 6fe14663 fetch 2 ,mem_ui_uuid_table 
+69e6 98000c00 iforce contr 
+
+search_attrib_next:
+69e7 efe08006 ifetch 1 ,contr 
+69e8 203a6a02 branch search_attrib_end ,blank 
+69e9 98007200 iforce loopcnt 
+
+search_attrib_loop:
+69ea efe10006 ifetch 2 ,contr 
+69eb 9a667c00 isub regc ,null 
+69ec 2022e9f2 branch search_attrib_found_uuid ,zero 
+69ed c20069ea loop search_attrib_loop 
+69ee 18c08c04 increase 4 ,contr 
+69ef 20406980 call sdp_get_data 
+69f0 98c08c00 iadd contr ,contr 
+69f1 202069e7 branch search_attrib_next 
+
+search_attrib_found_uuid:
+69f2 1f20f3ff increase -1 ,loopcnt 
+69f3 1f23fe00 lshift loopcnt ,pdata 
+69f4 98c08c00 iadd contr ,contr 
+69f5 18c08c04 increase 4 ,contr 
+69f6 20406980 call sdp_get_data 
+69f7 98c09600 iadd contr ,timeup 
+
+search_attrib_loop_attribs:
+69f8 18c08c01 increase 1 ,contr 
+69f9 efe10006 ifetch 2 ,contr 
+69fa 9a467c00 isub regb ,null 
+69fb 2022fecf branch disable_blank ,zero 
+69fc 20406979 call sdp_data_len 
+69fd 98c08c00 iadd contr ,contr 
+69fe 19627e00 deposit timeup 
+69ff 98c67c00 isub contr ,null 
+6a00 2022ea02 branch search_attrib_end ,zero 
+6a01 202069f8 branch search_attrib_loop_attribs 
+
+search_attrib_end:
+6a02 18000c00 force 0 ,contr 
+6a03 18007e00 force 0 ,pdata 
+6a04 20600000 rtn 
+
+search_handle_attrib:
+6a05 4734402d bpatchx patch2d_0 ,mem_patch2d 
+6a06 6fe14663 fetch 2 ,mem_ui_uuid_table 
+6a07 98000c00 iforce contr 
+
+search_handle_attrib_next:
+6a08 efe08006 ifetch 1 ,contr 
+6a09 203a6a1e branch search_handle_attrib_end ,blank 
+6a0a 1fe3fe00 lshift pdata ,pdata 
+6a0b 98c08c00 iadd contr ,contr 
+6a0c efe20006 ifetch 4 ,contr 
+6a0d 98467c00 isub temp ,null 
+6a0e 2022ea12 branch search_handl_attrib_found_handle ,zero 
+6a0f 20406980 call sdp_get_data 
+6a10 98c08c00 iadd contr ,contr 
+6a11 20206a08 branch search_handle_attrib_next 
+
+search_handl_attrib_found_handle:
+6a12 20406980 call sdp_get_data 
+6a13 98c09600 iadd contr ,timeup 
+
+search_handle_attrib_loop_attribs:
+6a14 18c08c01 increase 1 ,contr 
+6a15 efe10006 ifetch 2 ,contr 
+6a16 9a467c00 isub regb ,null 
+6a17 20628000 rtn zero 
+6a18 20406979 call sdp_data_len 
+6a19 98c08c00 iadd contr ,contr 
+6a1a 19627e00 deposit timeup 
+6a1b 98c67c00 isub contr ,null 
+6a1c 2022ea1e branch search_handle_attrib_end ,zero 
+6a1d 20206a14 branch search_handle_attrib_loop_attribs 
+
+search_handle_attrib_end:
+6a1e 18000c00 force 0 ,contr 
+6a1f 20600000 rtn 
+
+search_rfcomm_cn:
+6a20 da400400 arg 0x0400 ,regb 
+6a21 20406a12 call search_handl_attrib_found_handle 
+6a22 da400300 arg 0x0300 ,regb 
+6a23 20406a2b call search_uuid_in_data 
+6a24 24740000 nrtn user 
+6a25 1a267c03 sub rega ,3 ,null 
+6a26 20217ec7 branch disable_user ,positive 
+6a27 efe08006 ifetch 1 ,contr 
+6a28 c0847ec7 bne 0x08 ,disable_user 
+6a29 efe08006 ifetch 1 ,contr 
+6a2a 20600000 rtn 
+
+search_uuid_in_data:
+6a2b 4734c02d bpatchx patch2d_1 ,mem_patch2d 
+6a2c 20406980 call sdp_get_data 
+6a2d 1fe22200 copy pdata ,rega 
+
+search_uuid_in_data_loop:
+6a2e efe08006 ifetch 1 ,contr 
+6a2f 1fe17207 and pdata ,0x7 ,loopcnt 
+6a30 1fe97e00 rshift3 pdata ,pdata 
+6a31 1fe67c03 sub pdata ,3 ,null 
+6a32 2022ea47 branch search_uuid_in_data_found_uuid ,zero 
+6a33 1f227e00 copy loopcnt ,pdata 
+6a34 c002ea3e beq 5 ,search_uuid_in_data_found_element_index5 
+6a35 c0036a41 beq 6 ,search_uuid_in_data_found_element_index6 
+6a36 c003ea44 beq 7 ,search_uuid_in_data_found_element_index7 
+6a37 18c08dff increase -1 ,contr 
+6a38 20406980 call sdp_get_data 
+6a39 98c08c00 iadd contr ,contr 
+6a3a 1a227e00 copy rega ,pdata 
+6a3b 98462200 isub temp ,rega 
+6a3c 2022fec7 branch disable_user ,zero 
+6a3d 20206a2e branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_element_index5:
+6a3e 1a20a3fe increase -2 ,rega 
+6a3f 18c08c01 increase 1 ,contr 
+6a40 20206a2e branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_element_index6:
+6a41 1a20a3fd increase -3 ,rega 
+6a42 18c08c02 increase 2 ,contr 
+6a43 20206a2e branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_element_index7:
+6a44 1a20a3fb increase -5 ,rega 
+6a45 18c08c04 increase 4 ,contr 
+6a46 20206a2e branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_uuid:
+6a47 1a20a3ff increase -1 ,rega 
+6a48 1f227e00 copy loopcnt ,pdata 
+6a49 c000ea50 beq 1 ,search_uuid_in_data_type_uuid_16 
+6a4a c0016a4e beq 2 ,search_uuid_in_data_type_uuid_32 
+6a4b c0026a4d beq 4 ,search_uuid_in_data_type_uuid_128 
+6a4c 20207ec7 branch disable_user 
+
+search_uuid_in_data_type_uuid_128:
+6a4d 1a20a3f4 increase -12 ,rega 
+
+search_uuid_in_data_type_uuid_32:
+6a4e efe10006 ifetch 2 ,contr 
+6a4f 1a20a3fe increase -2 ,rega 
+
+search_uuid_in_data_type_uuid_16:
+6a50 efe10006 ifetch 2 ,contr 
+6a51 9a467c00 isub regb ,null 
+6a52 2022fec5 branch enable_user ,zero 
+6a53 1a20a3fe increase -2 ,rega 
+6a54 2022fec7 branch disable_user ,zero 
+6a55 20206a2e branch search_uuid_in_data_loop 
+
+sdp_send_spp_request:
+6a56 20405381 call l2cap_get_sdp_tx_payload 
+6a57 1fe20a00 copy pdata ,contw 
+6a58 58000006 setarg 6 
+6a59 e7e08005 istore 1 ,contw 
+6a5a 5800006e setarg sdp_tid_spp 
+6a5b e7e10005 istore 2 ,contw 
+6a5c 58000f00 setarg 0x0f00 
+6a5d e7e10005 istore 2 ,contw 
+6a5e 581a0535 setarg 0x1a0535 
+6a5f e7e18005 istore 3 ,contw 
+6a60 58000111 setarg 0x0111 
+6a61 1ff07e00 lshift16 pdata ,pdata 
+6a62 e7e20005 istore 4 ,contw 
+6a63 58002600 setarg 0x2600 
+6a64 e7e10005 istore 2 ,contw 
+6a65 58000335 setarg 0x0335 
+6a66 e7e10005 istore 2 ,contw 
+6a67 58000009 setarg 0x0009 
+6a68 e7e10005 istore 2 ,contw 
+6a69 58000004 setarg 0x0004 
+6a6a e7e10005 istore 2 ,contw 
+6a6b 70032614 jam 0x14 ,mem_sdp_tx_pkt_length 
+6a6c 20600000 rtn 
+
+function_g2:
+6a6d 4735402d bpatchx patch2d_2 ,mem_patch2d 
+6a6e 7004a750 jam 80 ,mem_aes_cmac_data_length 
+6a6f d8a004a8 arg memdat ,contw 
+6a70 d8c04337 arg mem_le_srand ,contr 
+6a71 20407d7f call memcpy16 
+6a72 d8c046df arg mem_sc_pubkey_local_x_256 ,contr 
+6a73 20407d7d call memcpy32 
+6a74 d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+6a75 20407d7d call memcpy32 
+6a76 20406b28 call inverse_memdat 
+6a77 d8c00277 arg mem_le_mrand ,contr 
+6a78 20406b23 call store_inverse_k 
+6a79 20406aee call function_aes_cmac 
+6a7a d8a009be arg mem_aes_cmac_temp ,contw 
+6a7b 20406b1f call load_inverse_result 
+6a7c 580f4240 setarg 1000000 
+6a7d 1fe22200 copy pdata ,rega 
+6a7e 6fe209be fetch 4 ,mem_aes_cmac_temp 
+6a7f 9a26fc00 idiv rega 
+6a80 20407e64 call wait_div_end 
+6a81 18077e00 remainder pdata 
+6a82 67e2087c store 4 ,mem_gkey 
+6a83 20600000 rtn 
+
+function_f6_eb:
+6a84 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6a85 d8a004a8 arg memdat ,contw 
+6a86 20406ad3 call store_addr_common_a 
+6a87 20406ace call store_addr_common_b 
+6a88 6fe1c351 fetch 3 ,mem_le_pres + 1 
+6a89 e7e18005 istore 3 ,contw 
+6a8a 20406a94 call get_r 
+6a8b d8c00277 arg mem_le_mrand ,contr 
+6a8c 20407d7f call memcpy16 
+6a8d d8c04337 arg mem_le_srand ,contr 
+6a8e 20407d7f call memcpy16 
+6a8f 20406b28 call inverse_memdat 
+6a90 d8c009de arg mem_le_mackey ,contr 
+6a91 d8a0098e arg mem_aes_cmac_k ,contw 
+6a92 20407d7f call memcpy16 
+6a93 20206aee branch function_aes_cmac 
+
+get_r:
+6a94 6fe2439e fetch 4 ,mem_le_tk 
+6a95 e7e20005 istore 4 ,contw 
+6a96 20407d94 call memset0_4 
+6a97 20207d91 branch memset0_8 
+
+function_f6_ea:
+6a98 4735c02d bpatchx patch2d_3 ,mem_patch2d 
+6a99 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6a9a d8a004a8 arg memdat ,contw 
+6a9b 20406ace call store_addr_common_b 
+6a9c 20406ad3 call store_addr_common_a 
+6a9d 6fe1c34a fetch 3 ,mem_le_preq + 1 
+6a9e e7e18005 istore 3 ,contw 
+6a9f 20406a94 call get_r 
+6aa0 d8c04337 arg mem_le_srand ,contr 
+6aa1 20407d7f call memcpy16 
+6aa2 d8c00277 arg mem_le_mrand ,contr 
+6aa3 20407d7f call memcpy16 
+6aa4 20406b28 call inverse_memdat 
+6aa5 d8c009de arg mem_le_mackey ,contr 
+6aa6 d8a0098e arg mem_aes_cmac_k ,contw 
+6aa7 20407d7f call memcpy16 
+6aa8 20406aee call function_aes_cmac 
+6aa9 d8a009be arg mem_aes_cmac_temp ,contw 
+6aaa 20206b1f branch load_inverse_result 
+
+function_f5:
+6aab 7004a720 jam 32 ,mem_aes_cmac_data_length 
+6aac d8c008c0 arg mem_le_dhkey_256 ,contr 
+6aad d8a004a8 arg memdat ,contw 
+6aae 20407d7d call memcpy32 
+6aaf 20406b28 call inverse_memdat 
+6ab0 d8c00860 arg mem_le_slat ,contr 
+6ab1 20406b23 call store_inverse_k 
+6ab2 20406aee call function_aes_cmac 
+6ab3 d8a0098e arg mem_aes_cmac_k ,contw 
+6ab4 20406e3c call store_aes_result 
+6ab5 d8400001 arg 1 ,temp 
+6ab6 20406abd call function_f5_common 
+6ab7 d8a04316 arg mem_le_ltk ,contw 
+6ab8 20406b1f call load_inverse_result 
+6ab9 d8400000 arg 0 ,temp 
+6aba 20406abd call function_f5_common 
+6abb d8a009de arg mem_le_mackey ,contw 
+6abc 20206e3c branch store_aes_result 
+
+function_f5_common:
+6abd 4736402d bpatchx patch2d_4 ,mem_patch2d 
+6abe 7004a735 jam 53 ,mem_aes_cmac_data_length 
+6abf 58000100 setarg 0x100 
+6ac0 67e104a8 store 2 ,memdat 
+6ac1 20406ace call store_addr_common_b 
+6ac2 20406ad3 call store_addr_common_a 
+6ac3 d8c04337 arg mem_le_srand ,contr 
+6ac4 20407d7f call memcpy16 
+6ac5 d8c00277 arg mem_le_mrand ,contr 
+6ac6 20407d7f call memcpy16 
+6ac7 58006c65 setarg 0x6c65 
+6ac8 e7e10005 istore 2 ,contw 
+6ac9 58006274 setarg 0x6274 
+6aca e7e10005 istore 2 ,contw 
+6acb e0408005 istoret 1 ,contw 
+6acc 20406b28 call inverse_memdat 
+6acd 20206aee branch function_aes_cmac 
+
+store_addr_common_b:
+6ace 6fe3437a fetch 6 ,mem_le_lap 
+6acf e7e30005 istore 6 ,contw 
+6ad0 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+6ad1 e7e08005 istore 1 ,contw 
+6ad2 20600000 rtn 
+
+store_addr_common_a:
+6ad3 6fe30297 fetch 6 ,mem_le_plap 
+6ad4 e7e30005 istore 6 ,contw 
+6ad5 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+6ad6 e7e08005 istore 1 ,contw 
+6ad7 20600000 rtn 
+
+function_f4_ca:
+6ad8 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6ad9 6fe0c771 fetch 1 ,mem_passkey_1bit 
+6ada 67e084a8 store 1 ,memdat 
+6adb d8c046df arg mem_sc_pubkey_local_x_256 ,contr 
+6adc 20407d7d call memcpy32 
+6add d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+6ade 20407d7d call memcpy32 
+6adf 20406b28 call inverse_memdat 
+6ae0 d8c00277 arg mem_le_mrand ,contr 
+6ae1 20406b23 call store_inverse_k 
+6ae2 20206aee branch function_aes_cmac 
+
+function_f4_cb:
+6ae3 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6ae4 6fe0c771 fetch 1 ,mem_passkey_1bit 
+6ae5 67e084a8 store 1 ,memdat 
+6ae6 d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+6ae7 20407d7d call memcpy32 
+6ae8 d8c046df arg mem_sc_pubkey_local_x_256 ,contr 
+6ae9 20407d7d call memcpy32 
+6aea 20406b28 call inverse_memdat 
+6aeb d8c04337 arg mem_le_srand ,contr 
+6aec 20406b23 call store_inverse_k 
+6aed 20206aee branch function_aes_cmac 
+
+function_aes_cmac:
+6aee 4736c02d bpatchx patch2d_5 ,mem_patch2d 
+6aef 20406b3d call function_aes_cmac_generate_subkey 
+6af0 6fe084a7 fetch 1 ,mem_aes_cmac_data_length 
+6af1 1fe20400 copy pdata ,temp 
+
+function_ceil16:
+6af2 1fe0fe0f increase 15 ,pdata 
+6af3 1ff1fe00 rshift4 pdata ,pdata 
+6af4 1fe22400 copy pdata ,regb 
+6af5 203a6b00 branch function_aes_cmac_set_flag_0_balnk ,blank 
+6af6 18417e0f and temp ,0x0f ,pdata 
+6af7 243a6b03 nbranch function_aes_cmac_set_flag_0 ,blank 
+6af8 da60099e arg mem_aes_cmac_k1 ,regc 
+6af9 dfe004a8 arg memdat ,pdata 
+6afa 1fe0fff0 increase -16 ,pdata 
+6afb 9840a200 iadd temp ,rega 
+6afc d8a009ce arg mem_aes_cmac_m_last ,contw 
+6afd df200004 arg 4 ,loopcnt 
+6afe 20407da4 call xor_loop 
+6aff 20206b0e branch function_aes_cmac_aes 
+
+function_aes_cmac_set_flag_0_balnk:
+6b00 da400001 arg 1 ,regb 
+6b01 da200000 arg 0 ,rega 
+6b02 20206b04 branch function_aes_cmac_set_flag_0_common 
+
+function_aes_cmac_set_flag_0:
+6b03 1841220f and temp ,0x0f ,rega 
+
+function_aes_cmac_set_flag_0_common:
+6b04 dfe004a8 arg memdat ,pdata 
+6b05 9840fe00 iadd temp ,pdata 
+6b06 9a260c00 isub rega ,contr 
+6b07 d8a009be arg mem_aes_cmac_temp ,contw 
+6b08 20406b63 call function_aes_cmac_padding 
+6b09 da6009ae arg mem_aes_cmac_k2 ,regc 
+6b0a da2009be arg mem_aes_cmac_temp ,rega 
+6b0b d8a009ce arg mem_aes_cmac_m_last ,contw 
+6b0c df200004 arg 4 ,loopcnt 
+6b0d 20407da4 call xor_loop 
+
+function_aes_cmac_aes:
+6b0e 20406e36 call aes_clear_data 
+6b0f 20406dca call aes_init 
+6b10 d8c004a8 arg memdat ,contr 
+
+function_aes_cmac_aes_loop:
+6b11 1a40a5ff increase -1 ,regb 
+6b12 1a427e00 deposit regb 
+6b13 203a6b17 branch function_aes_cmac_aes_loop_end ,blank 
+6b14 20406e28 call load_data128 
+6b15 20406dc4 call do_aes_cbc 
+6b16 20206b11 branch function_aes_cmac_aes_loop 
+
+function_aes_cmac_aes_loop_end:
+6b17 d8a009be arg mem_aes_cmac_temp ,contw 
+6b18 20406e3c call store_aes_result 
+6b19 d8c009ce arg mem_aes_cmac_m_last ,contr 
+6b1a 20406e28 call load_data128 
+6b1b 20406dca call aes_init 
+6b1c d8c009be arg mem_aes_cmac_temp ,contr 
+6b1d 20406e28 call load_data128 
+6b1e 20206dc4 branch do_aes_cbc 
+
+load_inverse_result:
+6b1f 18a22200 copy contw ,rega 
+6b20 20406e3c call store_aes_result 
+6b21 df200010 arg 16 ,loopcnt 
+6b22 20207dac branch inverse_data 
+
+store_inverse_k:
+6b23 d8a0098e arg mem_aes_cmac_k ,contw 
+6b24 20407d7f call memcpy16 
+
+inverse_k:
+6b25 df200010 arg 16 ,loopcnt 
+6b26 da20098e arg mem_aes_cmac_k ,rega 
+6b27 20207dac branch inverse_data 
+
+inverse_memdat:
+6b28 6fe084a7 fetch 1 ,mem_aes_cmac_data_length 
+6b29 1fe27200 copy pdata ,loopcnt 
+6b2a da2004a8 arg memdat ,rega 
+6b2b 20207dac branch inverse_data 
+
+bn_lshift_0_inverse:
+6b2c efe08011 ifetch 1 ,rega 
+6b2d 1fe3fe00 lshift pdata ,pdata 
+6b2e 2a6ffe00 isolate1 0 ,regc 
+6b2f 7920fe00 setflag true ,0 ,pdata 
+6b30 2feffe08 isolate1 8 ,pdata 
+6b31 7920a600 setflag true ,0 ,regc 
+6b32 e7e08011 istore 1 ,rega 
+6b33 1a20a3ff increase -1 ,rega 
+6b34 c2006b2c loop bn_lshift_0_inverse 
+6b35 20600000 rtn 
+
+function_aes_cmac_k1_inverse:
+6b36 da20099e arg mem_aes_cmac_k1 ,rega 
+
+function_aes_cmac_inverse_common:
+6b37 1a20a20f increase 15 ,rega 
+6b38 18007210 force 16 ,loopcnt 
+6b39 18002600 force 0 ,regc 
+6b3a 20206b2c branch bn_lshift_0_inverse 
+
+function_aes_cmac_k2_inverse:
+6b3b da2009ae arg mem_aes_cmac_k2 ,rega 
+6b3c 20206b37 branch function_aes_cmac_inverse_common 
+
+function_aes_cmac_generate_subkey:
+6b3d d8c0098e arg mem_aes_cmac_k ,contr 
+6b3e 20406e26 call load_key 
+6b3f 18007008 force regidx_xor ,regext_index 
+6b40 20406e37 call aes_clear 
+6b41 20406e36 call aes_clear_data 
+6b42 20406dc1 call do_aes_ocb 
+6b43 d8a0099e arg mem_aes_cmac_k1 ,contw 
+6b44 20406e3c call store_aes_result 
+
+function_aes_cmac_k1:
+6b45 4737402d bpatchx patch2d_6 ,mem_patch2d 
+6b46 6fe0899e fetch 1 ,mem_aes_cmac_k1 
+6b47 2feffe07 isolate1 7 ,pdata 
+6b48 2420eb4e nbranch function_aes_cmac_k1_0 ,true 
+6b49 20406b36 call function_aes_cmac_k1_inverse 
+6b4a da60099e arg mem_aes_cmac_k1 ,regc 
+6b4b d8a0099e arg mem_aes_cmac_k1 ,contw 
+6b4c 20406b58 call function_aes_cmac_xor_rb 
+6b4d 20206b4f branch function_aes_cmac_k2 
+
+function_aes_cmac_k1_0:
+6b4e 20406b36 call function_aes_cmac_k1_inverse 
+
+function_aes_cmac_k2:
+6b4f d8c0099e arg mem_aes_cmac_k1 ,contr 
+6b50 d8a009ae arg mem_aes_cmac_k2 ,contw 
+6b51 20407d7f call memcpy16 
+6b52 6fe089ae fetch 1 ,mem_aes_cmac_k2 
+6b53 2feffe07 isolate1 7 ,pdata 
+6b54 2420eb3b nbranch function_aes_cmac_k2_inverse ,true 
+6b55 20406b3b call function_aes_cmac_k2_inverse 
+6b56 da6009ae arg mem_aes_cmac_k2 ,regc 
+6b57 d8a009ae arg mem_aes_cmac_k2 ,contw 
+
+function_aes_cmac_xor_rb:
+6b58 df200003 arg 3 ,loopcnt 
+
+function_aes_cmac_xor_rb_loop:
+6b59 d8400000 arg 0 ,temp 
+6b5a 20406b5f call function_aes_cmac_xor_loop_common 
+6b5b 1a60a604 increase 4 ,regc 
+6b5c c2006b59 loop function_aes_cmac_xor_rb_loop 
+6b5d d8408700 arg 0x8700 ,temp 
+6b5e 18500400 lshift16 temp ,temp 
+
+function_aes_cmac_xor_loop_common:
+6b5f efe20013 ifetch 4 ,regc 
+6b60 9842fe00 ixor temp ,pdata 
+6b61 e7e20005 istore 4 ,contw 
+6b62 20600000 rtn 
+
+function_aes_cmac_padding:
+6b63 4737c02d bpatchx patch2d_7 ,mem_patch2d 
+6b64 df200010 arg 16 ,loopcnt 
+6b65 dfe00000 arg 0 ,pdata 
+
+function_aes_cmac_padding_loop:
+6b66 9a267c00 isub rega ,null 
+6b67 2022eb6e branch function_aes_cmac_padding_beq_length ,zero 
+6b68 20216b71 branch function_aes_cmac_padding_big_length ,positive 
+6b69 e8408006 ifetcht 1 ,contr 
+6b6a e0408005 istoret 1 ,contw 
+
+function_aes_cmac_padding_loop2:
+6b6b 1fe0fe01 increase 1 ,pdata 
+6b6c c2006b66 loop function_aes_cmac_padding_loop 
+6b6d 20600000 rtn 
+
+function_aes_cmac_padding_beq_length:
+6b6e d8400080 arg 0x80 ,temp 
+
+function_aes_cmac_padding_common:
+6b6f e0408005 istoret 1 ,contw 
+6b70 20206b6b branch function_aes_cmac_padding_loop2 
+
+function_aes_cmac_padding_big_length:
+6b71 d8400000 arg 0 ,temp 
+6b72 20206b6f branch function_aes_cmac_padding_common 
+
+generate_kinit:
+6b73 20406b86 call function_e22 
+6b74 d8c00454 arg mem_input_store ,contr 
+6b75 d8a00444 arg mem_kinit ,contw 
+6b76 20207d7f branch memcpy16 
+
+function_e21:
+6b77 78547c00 disable user 
+6b78 20406c7d call function_expand 
+6b79 d8c00424 arg mem_random_number ,contr 
+6b7a d8a00464 arg mem_x ,contw 
+6b7b 1800720f force 15 ,loopcnt 
+6b7c 20407dd4 call memcpy 
+6b7d efe08006 ifetch 1 ,contr 
+6b7e 1fe2fe06 xor_into 6 ,pdata 
+6b7f e7e08005 istore 1 ,contw 
+6b80 58000474 setarg mem_y 
+6b81 67e10498 store 2 ,memp_ar_input 
+6b82 58000464 setarg mem_x 
+6b83 67e10496 store 2 ,memp_ar_key 
+6b84 79200012 set1 mark_ar2 ,mark 
+6b85 20206bc6 branch function_ar 
+
+function_e22:
+6b86 6848c796 fetcht 1 ,mem_pin_length 
+6b87 18002410 force 16 ,regb 
+6b88 1840a606 add temp ,6 ,regc 
+6b89 1a667c10 sub regc ,16 ,null 
+6b8a 20216b8c branch function_e22_pin_init ,positive 
+6b8b 18002610 force 16 ,regc 
+
+function_e22_pin_init:
+6b8c d8a00464 arg mem_x ,contw 
+
+function_e22_genx_pin:
+6b8d d8c04797 arg mem_pin ,contr 
+6b8e 18427200 copy temp ,loopcnt 
+6b8f 78547c00 disable user 
+
+function_e22_genx_loop:
+6b90 efe08006 ifetch 1 ,contr 
+6b91 e7e08005 istore 1 ,contw 
+6b92 1a40a5ff increase -1 ,regb 
+6b93 2022eb9a branch function_e22_genx_end ,zero 
+6b94 c2006b90 loop function_e22_genx_loop 
+6b95 20346b8d branch function_e22_genx_pin ,user 
+6b96 78347c00 enable user 
+6b97 18007206 force 6 ,loopcnt 
+6b98 1a220c00 copy rega ,contr 
+6b99 20206b90 branch function_e22_genx_loop 
+
+function_e22_genx_end:
+6b9a d8c00424 arg mem_random_number ,contr 
+6b9b d8a00474 arg mem_y ,contw 
+6b9c 20407d7f call memcpy16 
+6b9d 6fe08483 fetch 1 ,mem_y15 
+6b9e 9a62fe00 ixor regc ,pdata 
+6b9f 67e08483 store 1 ,mem_y15 
+6ba0 58000474 setarg mem_y 
+6ba1 67e10498 store 2 ,memp_ar_input 
+6ba2 58000464 setarg mem_x 
+6ba3 67e10496 store 2 ,memp_ar_key 
+6ba4 79200012 set1 mark_ar2 ,mark 
+6ba5 20206bc6 branch function_ar 
+
+function_e1:
+6ba6 78547c00 disable user 
+6ba7 20406c7d call function_expand 
+6ba8 20206bb0 branch function_hash 
+
+function_e3:
+6ba9 da200056 arg mem_aco ,rega 
+6baa 78347c00 enable user 
+6bab 20406c7d call function_expand 
+6bac 20406bb0 call function_hash 
+6bad d8c00454 arg mem_input_store ,contr 
+6bae d8a00062 arg mem_kc ,contw 
+6baf 20207d7f branch memcpy16 
+
+function_hash:
+6bb0 58000424 setarg mem_random_number 
+6bb1 67e10498 store 2 ,memp_ar_input 
+6bb2 580041cb setarg mem_link_key 
+6bb3 67e10496 store 2 ,memp_ar_key 
+6bb4 793f8012 set0 mark_ar2 ,mark 
+6bb5 20406bc6 call function_ar 
+6bb6 da200454 arg mem_input_store ,rega 
+6bb7 da400424 arg mem_random_number ,regb 
+6bb8 d8a00464 arg mem_x ,contw 
+6bb9 20406c70 call xor16 
+6bba da200464 arg mem_x ,rega 
+6bbb da400474 arg mem_y ,regb 
+6bbc 1a420a00 copy regb ,contw 
+6bbd 78347c00 enable user 
+6bbe 20406c6e call add16 
+6bbf 20406c88 call key_offset 
+6bc0 58000474 setarg mem_y 
+6bc1 67e10498 store 2 ,memp_ar_input 
+6bc2 58000464 setarg mem_x 
+6bc3 67e10496 store 2 ,memp_ar_key 
+6bc4 79200012 set1 mark_ar2 ,mark 
+6bc5 20206bc6 branch function_ar 
+
+function_ar:
+6bc6 70049a00 jam 0 ,mem_ar_hround 
+6bc7 6fe10496 fetch 2 ,memp_ar_key 
+6bc8 98000c00 iforce contr 
+6bc9 d8a00484 arg mem_key_store ,contw 
+6bca 20407d7f call memcpy16 
+6bcb 6fe10498 fetch 2 ,memp_ar_input 
+6bcc 98000c00 iforce contr 
+6bcd d8a00454 arg mem_input_store ,contw 
+6bce 20407d7f call memcpy16 
+
+function_ar_loop:
+6bcf 20406bed call key_scheduling 
+6bd0 78547c00 disable user 
+6bd1 c5896bd7 bmark0 mark_ar2 ,function_ar_original 
+6bd2 6fe0849a fetch 1 ,mem_ar_hround 
+6bd3 c0826bd7 bne 4 ,function_ar_original 
+6bd4 6fe10498 fetch 2 ,memp_ar_input 
+6bd5 98002400 iforce regb 
+6bd6 20406c1f call xor_mod32_ar2 
+
+function_ar_original:
+6bd7 20406c1e call xor_mod32 
+6bd8 20406c31 call el_boxes 
+6bd9 6fe0849a fetch 1 ,mem_ar_hround 
+6bda 1fe0fe01 increase 1 ,pdata 
+6bdb 67e0849a store 1 ,mem_ar_hround 
+6bdc 20406bed call key_scheduling 
+6bdd 78347c00 enable user 
+6bde 20406c1e call xor_mod32 
+6bdf 20406c40 call pht 
+6be0 20406c4f call permute 
+6be1 20406c40 call pht 
+6be2 20406c4f call permute 
+6be3 20406c40 call pht 
+6be4 20406c4f call permute 
+6be5 20406c40 call pht 
+6be6 6fe0849a fetch 1 ,mem_ar_hround 
+6be7 1fe0fe01 increase 1 ,pdata 
+6be8 67e0849a store 1 ,mem_ar_hround 
+6be9 c0886bcf bne 16 ,function_ar_loop 
+6bea 20406bed call key_scheduling 
+6beb 78547c00 disable user 
+6bec 20206c1e branch xor_mod32 
+
+key_scheduling:
+6bed 6fe0849a fetch 1 ,mem_ar_hround 
+6bee d8c00484 arg mem_key_store ,contr 
+6bef 203a6c14 branch key_sched_zero ,blank 
+6bf0 98002400 iforce regb 
+6bf1 18007211 force 17 ,loopcnt 
+6bf2 18c20a00 copy contr ,contw 
+
+key_rotateloop:
+6bf3 efe08006 ifetch 1 ,contr 
+6bf4 1fe98400 lshift3 pdata ,temp 
+6bf5 1feb7e00 rshift2 pdata ,pdata 
+6bf6 1fe97e00 rshift3 pdata ,pdata 
+6bf7 9841fe00 ior temp ,pdata 
+6bf8 e7e08005 istore 1 ,contw 
+6bf9 c2006bf3 loop key_rotateloop 
+6bfa 58000484 setarg mem_key_store 
+6bfb 9a408c00 iadd regb ,contr 
+6bfc 18007210 force 16 ,loopcnt 
+6bfd d8a00434 arg mem_round_key ,contw 
+
+key_select_octet_loop:
+6bfe efe08006 ifetch 1 ,contr 
+6bff e7e08005 istore 1 ,contw 
+6c00 28c1fe95 compare mem_key_store_end ,contr ,0xff 
+6c01 2420ec03 nbranch key_select_octet_nwrap ,true 
+6c02 18c08def increase -17 ,contr 
+
+key_select_octet_nwrap:
+6c03 c2006bfe loop key_select_octet_loop 
+6c04 18002200 force 0 ,rega 
+6c05 1a40a7ff add regb ,-1 ,regc 
+6c06 1a6ba600 lshift2 regc ,regc 
+6c07 1a6ba600 lshift2 regc ,regc 
+6c08 20406e5e call enable_authrom 
+6c09 58009000 setarg mem_b_box 
+6c0a 9a60a600 iadd regc ,regc 
+6c0b d8a00434 arg mem_round_key ,contw 
+6c0c 18007210 force 16 ,loopcnt 
+
+bias_round_key_loop:
+6c0d e8408013 ifetcht 1 ,regc 
+6c0e efe08005 ifetch 1 ,contw 
+6c0f 9840fe00 iadd temp ,pdata 
+6c10 e7e08005 istore 1 ,contw 
+6c11 1a60a601 increase 1 ,regc 
+6c12 c2006c0d loop bias_round_key_loop 
+6c13 20206e62 branch disable_authrom 
+
+key_sched_zero:
+6c14 18007210 force 16 ,loopcnt 
+6c15 18000400 force 0 ,temp 
+
+create_byte_16_loop:
+6c16 efe08006 ifetch 1 ,contr 
+6c17 98428400 ixor temp ,temp 
+6c18 c2006c16 loop create_byte_16_loop 
+6c19 18427e00 deposit temp 
+6c1a e7e08006 istore 1 ,contr 
+6c1b d8c00484 arg mem_key_store ,contr 
+6c1c d8a00434 arg mem_round_key ,contw 
+6c1d 20207d7f branch memcpy16 
+
+xor_mod32:
+6c1e da400434 arg mem_round_key ,regb 
+
+xor_mod32_ar2:
+6c1f 18007210 force 16 ,loopcnt 
+6c20 da200454 arg mem_input_store ,rega 
+6c21 1a220a00 copy rega ,contw 
+
+xor_mod32_loop:
+6c22 e8408011 ifetcht 1 ,rega 
+6c23 efe08012 ifetch 1 ,regb 
+6c24 9842e000 ixor temp ,alarm 
+6c25 1f212603 and loopcnt ,3 ,regc 
+6c26 24346c28 nbranch xor_mod32_invert ,user 
+6c27 1a62a603 xor_into 3 ,regc 
+
+xor_mod32_invert:
+6c28 1a662601 sub regc ,1 ,regc 
+6c29 20216c2b branch xor_even ,positive 
+6c2a 9840e000 iadd temp ,alarm 
+
+xor_even:
+6c2b 1e027e00 deposit alarm 
+6c2c e7e08005 istore 1 ,contw 
+6c2d 1a20a201 increase 1 ,rega 
+6c2e 1a40a401 increase 1 ,regb 
+6c2f c2006c22 loop xor_mod32_loop 
+6c30 20600000 rtn 
+
+el_boxes:
+6c31 20406e5e call enable_authrom 
+6c32 18007210 force 16 ,loopcnt 
+6c33 da200454 arg mem_input_store ,rega 
+
+el_box_loop:
+6c34 efe08011 ifetch 1 ,rega 
+6c35 d8c09100 arg mem_e_box ,contr 
+6c36 1f212603 and loopcnt ,3 ,regc 
+6c37 1a667c01 sub regc ,1 ,null 
+6c38 20216c3a branch e_boxes ,positive 
+6c39 d8c09200 arg mem_l_box ,contr 
+
+e_boxes:
+6c3a 98c08c00 iadd contr ,contr 
+6c3b efe08006 ifetch 1 ,contr 
+6c3c e7e08011 istore 1 ,rega 
+6c3d 1a20a201 increase 1 ,rega 
+6c3e c2006c34 loop el_box_loop 
+6c3f 20206e62 branch disable_authrom 
+
+pht:
+6c40 18007208 force 8 ,loopcnt 
+6c41 d8c00454 arg mem_input_store ,contr 
+6c42 18c20a00 copy contr ,contw 
+
+pht_loop:
+6c43 efe08006 ifetch 1 ,contr 
+6c44 98002200 iforce rega 
+6c45 efe08006 ifetch 1 ,contr 
+6c46 98002400 iforce regb 
+6c47 1a23fe00 lshift rega ,pdata 
+6c48 9a40fe00 iadd regb ,pdata 
+6c49 e7e08005 istore 1 ,contw 
+6c4a 1a227e00 deposit rega 
+6c4b 9a40fe00 iadd regb ,pdata 
+6c4c e7e08005 istore 1 ,contw 
+6c4d c2006c43 loop pht_loop 
+6c4e 20600000 rtn 
+
+permute:
+6c4f 588ae42c setarg 0x8ae42c 
+6c50 98000400 iforce temp 
+6c51 18007207 force 7 ,loopcnt 
+6c52 20406c5e call permute_exchange 
+6c53 580d751b setarg 0xd751b 
+6c54 98000400 iforce temp 
+6c55 18007205 force 5 ,loopcnt 
+6c56 20406c5e call permute_exchange 
+6c57 6fe08463 fetch 1 ,mem_input_store + 15 
+6c58 98002200 iforce rega 
+6c59 6fe08457 fetch 1 ,mem_input_store + 3 
+6c5a 67e08463 store 1 ,mem_input_store + 15 
+6c5b 1a227e00 deposit rega 
+6c5c 67e08457 store 1 ,mem_input_store + 3 
+6c5d 20600000 rtn 
+
+permute_exchange:
+6c5e 1841240f and temp ,0xf ,regb 
+
+permute_loop:
+6c5f 18417e0f and temp ,0xf ,pdata 
+6c60 d8a00454 arg mem_input_store ,contw 
+6c61 98a08a00 iadd contw ,contw 
+6c62 efe08005 ifetch 1 ,contw 
+6c63 98002600 iforce regc 
+6c64 1a227e00 deposit rega 
+6c65 e7e08005 istore 1 ,contw 
+6c66 1a622200 copy regc ,rega 
+6c67 18518400 rshift4 temp ,temp 
+6c68 c2006c5f loop permute_loop 
+6c69 58000454 setarg mem_input_store 
+6c6a 9a408a00 iadd regb ,contw 
+6c6b 1a227e00 deposit rega 
+6c6c e7e08005 istore 1 ,contw 
+6c6d 20600000 rtn 
+
+add16:
+6c6e 78347c00 enable user 
+6c6f 20206c71 branch xor_add16 
+
+xor16:
+6c70 78547c00 disable user 
+
+xor_add16:
+6c71 18007210 force 16 ,loopcnt 
+
+xoradd_loop:
+6c72 e8408011 ifetcht 1 ,rega 
+6c73 efe08012 ifetch 1 ,regb 
+6c74 20346c77 branch xoradd_add ,user 
+6c75 9842fe00 ixor temp ,pdata 
+6c76 20206c78 branch xoradd_store 
+
+xoradd_add:
+6c77 9840fe00 iadd temp ,pdata 
+
+xoradd_store:
+6c78 e7e08005 istore 1 ,contw 
+6c79 1a20a201 increase 1 ,rega 
+6c7a 1a40a401 increase 1 ,regb 
+6c7b c2006c72 loop xoradd_loop 
+6c7c 20600000 rtn 
+
+function_expand:
+6c7d d8a00474 arg mem_y ,contw 
+6c7e efe30011 ifetch 6 ,rega 
+6c7f e7e30005 istore 6 ,contw 
+6c80 20346c83 branch expand_12 ,user 
+6c81 efe30011 ifetch 6 ,rega 
+6c82 20206c84 branch expand_cont 
+
+expand_12:
+6c83 efe30006 ifetch 6 ,contr 
+
+expand_cont:
+6c84 e7e30005 istore 6 ,contw 
+6c85 efe20011 ifetch 4 ,rega 
+6c86 e7e20005 istore 4 ,contw 
+6c87 20600000 rtn 
+
+key_offset:
+6c88 d8c041cb arg mem_link_key ,contr 
+6c89 d8a00464 arg mem_x ,contw 
+6c8a d8400000 arg 0 ,temp 
+6c8b 588395a7 setarg 0x8395a7 
+6c8c 20406ca9 call concatenate_temp24 
+6c8d 58b3c1df setarg 0xb3c1df 
+6c8e 20406ca9 call concatenate_temp24 
+6c8f 5800e5e9 setarg 0xe5e9 
+6c90 20406caa call concatenate_temp16 
+6c91 18422800 copy temp ,regab 
+6c92 78547c00 disable user 
+6c93 20406c97 call key_addxor 
+6c94 1a820400 copy regab ,temp 
+6c95 78347c00 enable user 
+6c96 20206c97 branch key_addxor 
+
+key_addxor:
+6c97 18007208 force 8 ,loopcnt 
+
+key_addxor_loop:
+6c98 efe08006 ifetch 1 ,contr 
+6c99 2f200201 compare 1 ,loopcnt ,1 
+6c9a 20346c9e branch key_high ,user 
+6c9b 2020ec9f branch key_xor ,true 
+
+key_add:
+6c9c 9840fe00 iadd temp ,pdata 
+6c9d 20206ca0 branch key_store 
+
+key_high:
+6c9e 2020ec9c branch key_add ,true 
+
+key_xor:
+6c9f 9842fe00 ixor temp ,pdata 
+
+key_store:
+6ca0 e7e08005 istore 1 ,contw 
+6ca1 184c8400 rshift8 temp ,temp 
+6ca2 c2006c98 loop key_addxor_loop 
+6ca3 20600000 rtn 
+
+copy_aco:
+6ca4 6fe30458 fetch 6 ,mem_input_store + 4 
+6ca5 67e30056 store 6 ,mem_aco 
+6ca6 efe30006 ifetch 6 ,contr 
+6ca7 e7e30005 istore 6 ,contw 
+6ca8 20600000 rtn 
+
+concatenate_temp24:
+6ca9 184d0400 lshift8 temp ,temp 
+
+concatenate_temp16:
+6caa 18500400 lshift16 temp ,temp 
+6cab 98418400 ior temp ,temp 
+6cac 20600000 rtn 
+
+loop1:
+6cad 20206cad branch loop1 
+
+generate_stk:
+6cae 4738402e bpatchx patch2e_0 ,mem_patch2e 
+6caf 20406dcd call function_s1 
+6cb0 d8a04316 arg mem_le_ltk ,contw 
+6cb1 20206e3c branch store_aes_result 
+
+authenticate_rconfirm:
+6cb2 d8a04337 arg mem_le_srand ,contw 
+6cb3 2034ecb5 branch authenticate_mconfirm ,master 
+6cb4 d8a00277 arg mem_le_mrand ,contw 
+
+authenticate_mconfirm:
+6cb5 18c22200 copy contr ,rega 
+6cb6 20407d7f call memcpy16 
+6cb7 20406de2 call function_c1 
+6cb8 d8c04327 arg mem_le_rconfirm ,contr 
+6cb9 20206e55 branch compare_res 
+
+generate_confirm:
+6cba da200277 arg mem_le_mrand ,rega 
+6cbb 2034ecbd branch generate_mrand ,master 
+6cbc da204337 arg mem_le_srand ,rega 
+
+generate_mrand:
+6cbd 1a220a00 copy rega ,contw 
+6cbe 20405a8f call generate_random 
+6cbf 20206de2 branch function_c1 
+
+generate_sk:
+6cc0 d8c04384 arg mem_le_skdm ,contr 
+6cc1 20406e28 call load_data128 
+6cc2 d8c04316 arg mem_le_ltk ,contr 
+6cc3 20406e29 call load_regext 
+6cc4 18006c38 force 0x38 ,aes_ctrl 
+6cc5 18006c00 force 0x0 ,aes_ctrl 
+6cc6 20406dbf call wait_aes 
+6cc7 d8a002c7 arg mem_le_sk ,contw 
+6cc8 20206e3c branch store_aes_result 
+
+ccm_b0:
+6cc9 18007008 force regidx_xor ,regext_index 
+6cca 18007e49 force 0x49 ,pdata 
+6ccb 20206cd0 branch iv_common 
+
+first_block_counter:
+6ccc 18007e49 force 0x49 ,pdata 
+6ccd 20206ccf branch first_block 
+
+first_block_data:
+6cce 18007e01 force 1 ,pdata 
+
+first_block:
+6ccf 18007000 force regidx_data ,regext_index 
+
+iv_common:
+6cd0 184d5e00 lshift8 temp ,regext 
+6cd1 9de1de00 ior regext ,regext 
+6cd2 1f00f001 increase 1 ,regext_index 
+6cd3 184cde00 rshift8 temp ,regext 
+6cd4 1df15e00 rshift16 regext ,regext 
+6cd5 6fe146ad fetch 2 ,mem_ccm_iv 
+6cd6 1ff07e00 lshift16 pdata ,pdata 
+6cd7 9de1de00 ior regext ,regext 
+6cd8 1f00f001 increase 1 ,regext_index 
+6cd9 ede20006 ifetchr regext ,4 ,contr 
+6cda 1f00f001 increase 1 ,regext_index 
+6cdb efe10006 ifetch 2 ,contr 
+6cdc 1a30de00 byteswap rega ,regext 
+6cdd 1df05e00 lshift16 regext ,regext 
+6cde 9de1de00 ior regext ,regext 
+6cdf 1f00f001 increase 1 ,regext_index 
+6ce0 20600000 rtn 
+
+generate_mic:
+6ce1 1a608c01 add regc ,1 ,contr 
+6ce2 efe08006 ifetch 1 ,contr 
+6ce3 98002200 iforce rega 
+6ce4 20406ccc call first_block_counter 
+6ce5 20406dc1 call do_aes_ocb 
+6ce6 18007000 force regidx_data ,regext_index 
+6ce7 efe08013 ifetch 1 ,regc 
+6ce8 1fe17e03 and_into 0x3 ,pdata 
+6ce9 1ff05e00 lshift16 pdata ,regext 
+6cea 79205e08 set1 8 ,regext 
+6ceb 20406e31 call clear_hidata 
+6cec 20406dc4 call do_aes_cbc 
+6ced 1a227200 copy rega ,loopcnt 
+6cee 1a608c02 add regc ,2 ,contr 
+6cef 20406e10 call padding_data 
+
+generate_mic_loop:
+6cf0 20406e1a call aes_load_data 
+6cf1 20406dc4 call do_aes_cbc 
+6cf2 1f227e00 deposit loopcnt 
+6cf3 203a6cf5 branch generate_mic_end ,blank 
+6cf4 20206cf0 branch generate_mic_loop 
+
+generate_mic_end:
+6cf5 1800700c force regidx_result ,regext_index 
+6cf6 1de27e00 deposit regext 
+6cf7 67e2026f store 4 ,mem_le_mic 
+6cf8 20600000 rtn 
+
+aes_crypt_data:
+6cf9 1a20a201 increase 1 ,rega 
+6cfa 20406cce call first_block_data 
+6cfb 1a620c00 copy regc ,contr 
+6cfc 20406e24 call aes_load_xor 
+6cfd 20406dc7 call do_aes_ctr 
+6cfe 20406e43 call store_enc_data 
+6cff 1a60a610 increase 16 ,regc 
+6d00 1a40a5f0 increase -16 ,regb 
+6d01 20216cf9 branch aes_crypt_data ,positive 
+6d02 20600000 rtn 
+
+ccm_br_enc_new:
+6d03 20406db4 call ccm_init_common 
+6d04 4738c02e bpatchx patch2e_1 ,mem_patch2e 
+6d05 d8c00062 arg mem_kc ,contr 
+6d06 20406e26 call load_key 
+6d07 7080d500 jam 0 ,core_ccm_aad0 
+6d08 18217e0f and type ,0x0f ,pdata 
+6d09 1fe9fe00 lshift3 pdata ,pdata 
+6d0a 9881fe00 ior am_addr ,pdata 
+6d0b 67f080d6 store 1 ,core_ccm_aad1 
+6d0c 6fe0c1e4 fetch 1 ,mem_llid 
+6d0d 67f080d7 store 1 ,core_ccm_aad2 
+6d0e 627100d1 storer regc ,2 ,core_ccm_input_playload_addr 
+6d0f 627100d3 storer regc ,2 ,core_ccm_output_playload_addr 
+6d10 6a2146b5 fetchr rega ,2 ,mem_ccm_len 
+6d11 684ac69f fetcht 5 ,mem_ccm_pcnt_tx 
+6d12 20406d25 call ccm_br_check_0_length_continuation 
+6d13 20406cc9 call ccm_b0 
+6d14 70800a02 jam 2 ,core_ccm_ctrl 
+6d15 70800a03 jam 3 ,core_ccm_ctrl 
+6d16 6fe146b5 fetch 2 ,mem_ccm_len 
+6d17 67f100da store 2 ,core_ccm_inptr 
+6d18 1fe0fe04 increase 4 ,pdata 
+6d19 67e146b5 store 2 ,mem_ccm_len 
+6d1a 1a627e00 copy regc ,pdata 
+6d1b 9a20a200 iadd rega ,rega 
+6d1c 20406dbb call wait_ccm_done 
+6d1d df00000c arg regidx_result ,regext_index 
+6d1e e5e20011 istorer regext ,4 ,rega 
+6d1f 65e2026f storer regext ,4 ,mem_le_mic 
+6d20 20600000 rtn 
+
+ccm_br_pcnt_tx_add:
+6d21 6fe2c69f fetch 5 ,mem_ccm_pcnt_tx 
+6d22 1fe0fe01 increase 1 ,pdata 
+6d23 67e2c69f store 5 ,mem_ccm_pcnt_tx 
+6d24 20206d2b branch ccm_br_pcnt_tx_set 
+
+ccm_br_check_0_length_continuation:
+6d25 6fe0c1e4 fetch 1 ,mem_llid 
+6d26 c1808000 rtnne llid_l2cap_cont 
+6d27 6fe146b5 fetch 2 ,mem_ccm_len 
+6d28 247a0000 nrtn blank 
+6d29 79200424 set1 br_ccm_0_length_continuation ,temp 
+6d2a 20600000 rtn 
+
+ccm_br_pcnt_tx_set:
+6d2b 6fe0c6a3 fetch 1 ,mem_ccm_pcnt_tx + 4 
+6d2c 1fe17e0f and pdata ,0x0f ,pdata 
+6d2d 1fe1fe20 or pdata ,0x20 ,pdata 
+6d2e 67e0c6a3 store 1 ,mem_ccm_pcnt_tx + 4 
+6d2f 20600000 rtn 
+
+ccm_br_pcnt_rx_set:
+6d30 6fe0c6a8 fetch 1 ,mem_ccm_pcnt_rx + 4 
+6d31 1fe17e0f and pdata ,0x0f ,pdata 
+6d32 67e0c6a8 store 1 ,mem_ccm_pcnt_rx + 4 
+6d33 20600000 rtn 
+
+ccm_br_decrypt_new:
+6d34 18a27e00 copy contw ,pdata 
+6d35 684900ae fetcht 2 ,mem_len 
+6d36 18408404 increase 4 ,temp 
+6d37 98467e00 isub temp ,pdata 
+6d38 67e146b7 store 2 ,mem_ccm_rx_ptr 
+6d39 67f100d1 store 2 ,core_ccm_input_playload_addr 
+6d3a 67f100d3 store 2 ,core_ccm_output_playload_addr 
+6d3b 20407ecb call disable_user2 
+6d3c 20406db4 call ccm_init_common 
+6d3d d8c00062 arg mem_kc ,contr 
+6d3e 20406e26 call load_key 
+6d3f 7080d500 jam 0 ,core_ccm_aad0 
+6d40 6fe08019 fetch 1 ,mem_rx_type 
+6d41 1fe17e0f and pdata ,0x0f ,pdata 
+6d42 1fe9fe00 lshift3 pdata ,pdata 
+6d43 9881fe00 ior am_addr ,pdata 
+6d44 67f080d6 store 1 ,core_ccm_aad1 
+6d45 6fe080e4 fetch 1 ,mem_lch_code 
+6d46 1fe17e03 and pdata ,0x3 ,pdata 
+6d47 67e0c1e4 store 1 ,mem_llid 
+6d48 67f080d7 store 1 ,core_ccm_aad2 
+6d49 6a2100ae fetchr rega ,2 ,mem_len 
+6d4a 622146b5 storer rega ,2 ,mem_ccm_len 
+6d4b 6fe146b7 fetch 2 ,mem_ccm_rx_ptr 
+6d4c 9a208c00 iadd rega ,contr 
+6d4d 18007000 force regidx_data ,regext_index 
+6d4e ede20006 ifetchr regext ,4 ,contr 
+6d4f 65e20273 storer regext ,4 ,mem_le_peer_mic 
+6d50 684ac6a4 fetcht 5 ,mem_ccm_pcnt_rx 
+6d51 20406d25 call ccm_br_check_0_length_continuation 
+6d52 20406cc9 call ccm_b0 
+6d53 70800a06 jam 6 ,core_ccm_ctrl 
+6d54 70800a07 jam 7 ,core_ccm_ctrl 
+6d55 6fe100ae fetch 2 ,mem_len 
+6d56 67f100da store 2 ,core_ccm_inptr 
+6d57 20406dbb call wait_ccm_done 
+6d58 6ff08108 fetch 1 ,core_misc_status 
+6d59 c4038000 rtnbit0 7 
+6d5a 20207ec9 branch enable_user2 
+
+ccm_br_pcnt_rx_add:
+6d5b c6078000 rtnmark1 mark_old_packet 
+6d5c 684a0273 fetcht 4 ,mem_le_peer_mic 
+6d5d 604a46a9 storet 4 ,mem_ccm_last_mic 
+6d5e 6fe2c6a4 fetch 5 ,mem_ccm_pcnt_rx 
+6d5f 1fe0fe01 increase 1 ,pdata 
+6d60 67e2c6a4 store 5 ,mem_ccm_pcnt_rx 
+6d61 20206d30 branch ccm_br_pcnt_rx_set 
+
+le_decrypt_new:
+6d62 20406db4 call ccm_init_common 
+6d63 7080d500 jam 0 ,core_ccm_aad0 
+6d64 7080d601 jam 1 ,core_ccm_aad1 
+6d65 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+6d66 1fe17e03 and_into 0x3 ,pdata 
+6d67 67f080d7 store 1 ,core_ccm_aad2 
+6d68 5800016d setarg mem_le_rxbuf_data_payload 
+6d69 67f100d1 store 2 ,core_ccm_input_playload_addr 
+6d6a 67f100d3 store 2 ,core_ccm_output_playload_addr 
+6d6b 6a20816c fetchr rega ,1 ,mem_le_rxbuf_data_length 
+6d6c 1a20a3fc increase -4 ,rega 
+6d6d 24217ecf nbranch disable_blank ,positive 
+6d6e 6220816c storer rega ,1 ,mem_le_rxbuf_data_length 
+6d6f 5800016d setarg mem_le_rxbuf_data_payload 
+6d70 9a208c00 iadd rega ,contr 
+6d71 18007000 force regidx_data ,regext_index 
+6d72 ede20006 ifetchr regext ,4 ,contr 
+6d73 65e20273 storer regext ,4 ,mem_le_peer_mic 
+6d74 684ac6a4 fetcht 5 ,mem_ccm_pcnt_rx 
+6d75 20406cc9 call ccm_b0 
+6d76 70800a06 jam 6 ,core_ccm_ctrl 
+6d77 70800a07 jam 7 ,core_ccm_ctrl 
+6d78 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+6d79 67f100da store 2 ,core_ccm_inptr 
+6d7a 20406dbb call wait_ccm_done 
+6d7b 6ff08108 fetch 1 ,core_misc_status 
+6d7c c303fecf bbit0 7 ,disable_blank 
+6d7d 684a0273 fetcht 4 ,mem_le_peer_mic 
+6d7e 6fe246a9 fetch 4 ,mem_ccm_last_mic 
+6d7f 98467e00 isub temp ,pdata 
+6d80 207a0000 rtn blank 
+6d81 604a46a9 storet 4 ,mem_ccm_last_mic 
+6d82 6fe2c6a4 fetch 5 ,mem_ccm_pcnt_rx 
+6d83 1fe0fe01 increase 1 ,pdata 
+6d84 79207e27 set1 le_ccm_directionbit ,pdata 
+6d85 67e2c6a4 store 5 ,mem_ccm_pcnt_rx 
+6d86 18007e00 force 0 ,pdata 
+6d87 20600000 rtn 
+
+le_encrypt_new:
+6d88 20406d8f call le_encrypt_new_start 
+6d89 580041f7 setarg mem_le_txpayload 
+6d8a 9a20a200 iadd rega ,rega 
+6d8b 20406dbb call wait_ccm_done 
+6d8c df00000c arg regidx_result ,regext_index 
+6d8d e5e20011 istorer regext ,4 ,rega 
+6d8e 20600000 rtn 
+
+le_encrypt_new_start:
+6d8f 20406db4 call ccm_init_common 
+6d90 4739402e bpatchx patch2e_2 ,mem_patch2e 
+6d91 7080d500 jam 0 ,core_ccm_aad0 
+6d92 7080d601 jam 1 ,core_ccm_aad1 
+6d93 6fe0c1f5 fetch 1 ,mem_le_txheader 
+6d94 1fe17e03 and_into 0x3 ,pdata 
+6d95 67f080d7 store 1 ,core_ccm_aad2 
+6d96 6fe1097b fetch 2 ,mem_contr 
+6d97 67f100d1 store 2 ,core_ccm_input_playload_addr 
+6d98 580041f7 setarg mem_le_txpayload 
+6d99 67f100d3 store 2 ,core_ccm_output_playload_addr 
+6d9a 6a20c1f6 fetchr rega ,1 ,mem_le_txlen 
+6d9b 684ac69f fetcht 5 ,mem_ccm_pcnt_tx 
+6d9c 20406cc9 call ccm_b0 
+6d9d 70800a02 jam 2 ,core_ccm_ctrl 
+6d9e 70800a03 jam 3 ,core_ccm_ctrl 
+6d9f 6fe0c1f6 fetch 1 ,mem_le_txlen 
+6da0 67f100da store 2 ,core_ccm_inptr 
+6da1 1fe0fe04 increase 4 ,pdata 
+6da2 67e0c1f6 store 1 ,mem_le_txlen 
+6da3 6fe2c69f fetch 5 ,mem_ccm_pcnt_tx 
+6da4 1fe0fe01 increase 1 ,pdata 
+6da5 793ffe27 set0 le_ccm_directionbit ,pdata 
+6da6 67e2c69f store 5 ,mem_ccm_pcnt_tx 
+6da7 20600000 rtn 
+
+ccm_wait_enc:
+6da8 6ff1011a fetch 2 ,core_ccm_outptr 
+6da9 98467c00 isub temp ,null 
+6daa 20628000 rtn zero 
+6dab 247a0000 nrtn blank 
+6dac 20206da8 branch ccm_wait_enc 
+
+ccm_check_enc_done:
+6dad 6ff08108 fetch 1 ,core_misc_status 
+6dae c303137c bbit0 6 ,assert 
+
+ccm_enc_done:
+6daf 580041f7 setarg mem_le_txpayload 
+6db0 98408a00 iadd temp ,contw 
+6db1 df00000c arg regidx_result ,regext_index 
+6db2 e5e20005 istorer regext ,4 ,contw 
+6db3 20206dbd branch ccm_ctrl_clr 
+
+ccm_init_common:
+6db4 4739c02e bpatchx patch2e_3 ,mem_patch2e 
+6db5 1800700c force regidx_result ,regext_index 
+6db6 20406e37 call aes_clear 
+6db7 20406e36 call aes_clear_data 
+6db8 58000000 setarg 0 
+6db9 67f100da store 2 ,core_ccm_inptr 
+6dba 20600000 rtn 
+
+wait_ccm_done:
+6dbb 6ff08108 fetch 1 ,core_misc_status 
+6dbc c3036dbb bbit0 6 ,wait_ccm_done 
+
+ccm_ctrl_clr:
+6dbd 70800a00 jam 0 ,core_ccm_ctrl 
+6dbe 20600000 rtn 
+
+wait_aes:
+6dbf 243bedbf nbranch wait_aes ,aes_ready 
+6dc0 20600000 rtn 
+
+do_aes_ocb:
+6dc1 18006c30 force 0x30 ,aes_ctrl 
+6dc2 18006c00 force 0x0 ,aes_ctrl 
+6dc3 20206dbf branch wait_aes 
+
+do_aes_cbc:
+6dc4 18006c32 force 0x32 ,aes_ctrl 
+6dc5 18006c02 force 0x2 ,aes_ctrl 
+6dc6 20206dbf branch wait_aes 
+
+do_aes_ctr:
+6dc7 18006c34 force 0x34 ,aes_ctrl 
+6dc8 18006c04 force 0x4 ,aes_ctrl 
+6dc9 20206dbf branch wait_aes 
+
+aes_init:
+6dca 18006c01 force 1 ,aes_ctrl 
+6dcb 18006c00 force 0 ,aes_ctrl 
+6dcc 20600000 rtn 
+
+function_s1:
+6dcd 18007000 force regidx_data ,regext_index 
+6dce 6fe20277 fetch 4 ,mem_le_mrand 
+6dcf 98005e00 iforce regext 
+6dd0 1f00f001 increase 1 ,regext_index 
+6dd1 efe20006 ifetch 4 ,contr 
+6dd2 98005e00 iforce regext 
+6dd3 1f00f001 increase 1 ,regext_index 
+6dd4 6fe24337 fetch 4 ,mem_le_srand 
+6dd5 98005e00 iforce regext 
+6dd6 1f00f001 increase 1 ,regext_index 
+6dd7 efe20006 ifetch 4 ,contr 
+6dd8 98005e00 iforce regext 
+6dd9 1f00f001 increase 1 ,regext_index 
+6dda 20406e37 call aes_clear 
+6ddb 1f00f1fc increase -4 ,regext_index 
+6ddc 6fe2439e fetch 4 ,mem_le_tk 
+6ddd 1fe25e00 copy pdata ,regext 
+6dde 1f00f004 increase 4 ,regext_index 
+6ddf 18006c38 force 0x38 ,aes_ctrl 
+6de0 18006c08 force 0x8 ,aes_ctrl 
+6de1 20206dbf branch wait_aes 
+
+function_c1:
+6de2 473a402e bpatchx patch2e_4 ,mem_patch2e 
+6de3 6fe3437a fetch 6 ,mem_le_lap 
+6de4 684b0297 fetcht 6 ,mem_le_plap 
+6de5 2034ede8 branch function_c1_master ,master 
+6de6 6fe30297 fetch 6 ,mem_le_plap 
+6de7 684b437a fetcht 6 ,mem_le_lap 
+
+function_c1_master:
+6de8 18007008 force regidx_xor ,regext_index 
+6de9 18425e00 copy temp ,regext 
+6dea 1f00f001 increase 1 ,regext_index 
+6deb 184f5e00 rshift32 temp ,regext 
+6dec 1ff07e00 lshift16 pdata ,pdata 
+6ded 9de1de00 ior regext ,regext 
+6dee 1f00f001 increase 1 ,regext_index 
+6def 1fef5e00 rshift32 pdata ,regext 
+6df0 1f00f001 increase 1 ,regext_index 
+6df1 18005e00 force 0 ,regext 
+6df2 18007e00 force 0 ,pdata 
+6df3 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+6df4 6848c42b fetcht 1 ,mem_le_adv_own_addr_type 
+6df5 2434edf8 nbranch function_c1_irat ,master 
+6df6 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+6df7 6848c36a fetcht 1 ,mem_le_conn_peer_addr_type 
+
+function_c1_irat:
+6df8 67e0c347 store 1 ,mem_le_iat 
+6df9 6048c348 storet 1 ,mem_le_rat 
+6dfa 18007000 force regidx_data ,regext_index 
+6dfb da404347 arg mem_le_iat ,regb 
+6dfc 18007204 force 4 ,loopcnt 
+
+function_c1_loop1:
+6dfd efe20011 ifetch 4 ,rega 
+6dfe e8420012 ifetcht 4 ,regb 
+6dff 9842de00 ixor temp ,regext 
+6e00 1f00f001 increase 1 ,regext_index 
+6e01 1a20a204 increase 4 ,rega 
+6e02 1a40a404 increase 4 ,regb 
+6e03 c2006dfd loop function_c1_loop1 
+6e04 20406e37 call aes_clear 
+6e05 1f00f1fc increase -4 ,regext_index 
+6e06 6fe2439e fetch 4 ,mem_le_tk 
+6e07 1fe25e00 copy pdata ,regext 
+6e08 1f00f004 increase 4 ,regext_index 
+6e09 18006c38 force 0x38 ,aes_ctrl 
+6e0a 18006c0c force 0xc ,aes_ctrl 
+6e0b 20406dbf call wait_aes 
+6e0c 20406e36 call aes_clear_data 
+6e0d 18006c3a force 0x3a ,aes_ctrl 
+6e0e 18006c08 force 0x8 ,aes_ctrl 
+6e0f 20206dbf branch wait_aes 
+
+padding_data:
+6e10 2f200600 compare 0 ,loopcnt ,3 
+6e11 20608000 rtn true 
+6e12 18c27e00 deposit contr 
+6e13 9f208a00 iadd loopcnt ,contw 
+6e14 18007e00 force 0 ,pdata 
+
+padding_loop:
+6e15 e7e08005 istore 1 ,contw 
+6e16 1f20f201 increase 1 ,loopcnt 
+6e17 2f200600 compare 0 ,loopcnt ,3 
+6e18 20608000 rtn true 
+6e19 20206e15 branch padding_loop 
+
+aes_load_data:
+6e1a 18007000 force regidx_data ,regext_index 
+
+load_data_loop:
+6e1b 1f227e00 deposit loopcnt 
+6e1c 203a6e1f branch load_data_padding ,blank 
+6e1d efe20006 ifetch 4 ,contr 
+6e1e 1f20f3fc increase -4 ,loopcnt 
+
+load_data_padding:
+6e1f 98005e00 iforce regext 
+6e20 1f00f001 increase 1 ,regext_index 
+6e21 2f001e04 compare regidx_key ,regext_index ,0xf 
+6e22 20608000 rtn true 
+6e23 20206e1b branch load_data_loop 
+
+aes_load_xor:
+6e24 18007008 force regidx_xor ,regext_index 
+6e25 20206e29 branch load_regext 
+
+load_key:
+6e26 18007004 force regidx_key ,regext_index 
+6e27 20206e29 branch load_regext 
+
+load_data128:
+6e28 18007000 force regidx_data ,regext_index 
+
+load_regext:
+6e29 18007204 force 4 ,loopcnt 
+
+load_regext_loop:
+6e2a efe20006 ifetch 4 ,contr 
+6e2b 98005e00 iforce regext 
+6e2c 1f00f001 increase 1 ,regext_index 
+6e2d c2006e2a loop load_regext_loop 
+6e2e 20600000 rtn 
+
+load_sk:
+6e2f d8c002c7 arg mem_le_sk ,contr 
+6e30 20206e26 branch load_key 
+
+clear_hidata:
+6e31 18007204 force 4 ,loopcnt 
+6e32 20206e39 branch clear_data_rest 
+
+regext_clear:
+6e33 18007000 force 0 ,regext_index 
+6e34 18007210 force 16 ,loopcnt 
+6e35 20206e38 branch clear_loop 
+
+aes_clear_data:
+6e36 18007000 force regidx_data ,regext_index 
+
+aes_clear:
+6e37 18007204 force 4 ,loopcnt 
+
+clear_loop:
+6e38 18005e00 force 0 ,regext 
+
+clear_data_rest:
+6e39 1f00f001 increase 1 ,regext_index 
+6e3a c2006e38 loop clear_loop 
+6e3b 20600000 rtn 
+
+store_aes_result:
+6e3c 1800700c force regidx_result ,regext_index 
+6e3d 18007204 force 4 ,loopcnt 
+
+send_aes_result_loop:
+6e3e 1de27e00 deposit regext 
+6e3f e7e20005 istore 4 ,contw 
+6e40 1f00f001 increase 1 ,regext_index 
+6e41 c2006e3e loop send_aes_result_loop 
+6e42 20600000 rtn 
+
+store_enc_data:
+6e43 1800700c force regidx_result ,regext_index 
+6e44 1a620a00 copy regc ,contw 
+6e45 1a40f201 add regb ,1 ,loopcnt 
+6e46 1f267c0f sub loopcnt ,15 ,null 
+6e47 20216e49 branch store_enc_loop ,positive 
+6e48 18007210 force 16 ,loopcnt 
+
+store_enc_loop:
+6e49 1de27e00 deposit regext 
+6e4a 1f267c03 sub loopcnt ,3 ,null 
+6e4b 20216e51 branch store_enc_byte ,positive 
+6e4c e7e20005 istore 4 ,contw 
+6e4d 1f20f3fc increase -4 ,loopcnt 
+6e4e 20628000 rtn zero 
+6e4f 1f00f001 increase 1 ,regext_index 
+6e50 20206e49 branch store_enc_loop 
+
+store_enc_byte:
+6e51 e7e08005 istore 1 ,contw 
+6e52 1fecfe00 rshift8 pdata ,pdata 
+6e53 c2006e51 loop store_enc_byte 
+6e54 20600000 rtn 
+
+compare_res:
+6e55 1800700c force regidx_result ,regext_index 
+6e56 18007204 force 4 ,loopcnt 
+
+compare_res_loop:
+6e57 efe20006 ifetch 4 ,contr 
+6e58 9de67c00 isub regext ,null 
+6e59 24628000 nrtn zero 
+6e5a 1f00f001 increase 1 ,regext_index 
+6e5b c2006e57 loop compare_res_loop 
+6e5c 18007c00 force 0 ,null 
+6e5d 20600000 rtn 
+
+enable_authrom:
+6e5e 6ff08050 fetch 1 ,core_clkoff 
+6e5f 793ffe00 set0 clock_off_auth_rom ,pdata 
+6e60 67f08050 store 1 ,core_clkoff 
+6e61 20600000 rtn 
+
+disable_authrom:
+6e62 6ff08050 fetch 1 ,core_clkoff 
+6e63 79207e00 set1 clock_off_auth_rom ,pdata 
+6e64 67f08050 store 1 ,core_clkoff 
+6e65 20600000 rtn 
+
+init_memp:
+6e66 d8a00748 arg mem_p ,contw 
+6e67 3803ffff setsect 0 ,0x3ffff 
+6e68 3807ffff setsect 1 ,0x3ffff 
+6e69 380bffff setsect 2 ,0x3ffff 
+6e6a 380ffbff setsect 3 ,0x3fbff 
+6e6b e7e48005 istore 9 ,contw 
+6e6c 3803ffff setsect 0 ,0x3ffff 
+6e6d 3807ffff setsect 1 ,0x3ffff 
+6e6e 380bffff setsect 2 ,0x3ffff 
+6e6f 380fffff setsect 3 ,0x3ffff 
+6e70 e7e48005 istore 9 ,contw 
+6e71 3803ffff setsect 0 ,0x3ffff 
+6e72 3807ffff setsect 1 ,0x3ffff 
+6e73 380bcfff setsect 2 ,0x3cfff 
+6e74 380fffff setsect 3 ,0x3ffff 
+6e75 e7e48005 istore 9 ,contw 
+6e76 3803ffff setsect 0 ,0x3ffff 
+6e77 3807ffff setsect 1 ,0x3ffff 
+6e78 380bffef setsect 2 ,0x3ffef 
+6e79 380fffff setsect 3 ,0x3ffff 
+6e7a e7e48005 istore 9 ,contw 
+6e7b 3803ffff setsect 0 ,0x3ffff 
+6e7c 3807ffff setsect 1 ,0x3ffff 
+6e7d 380bffff setsect 2 ,0x3ffff 
+6e7e 380fffff setsect 3 ,0x3ffff 
+6e7f e7e48005 istore 9 ,contw 
+6e80 3803ffff setsect 0 ,0x3ffff 
+6e81 38066c7f setsect 1 ,0x26c7f 
+6e82 3808146b setsect 2 ,0x146b 
+6e83 380f7bb3 setsect 3 ,0x37bb3 
+6e84 e7e48005 istore 9 ,contw 
+6e85 3801feb8 setsect 0 ,0x1feb8 
+6e86 38050c12 setsect 1 ,0x10c12 
+6e87 380ab722 setsect 2 ,0x2b722 
+6e88 380e9fa6 setsect 3 ,0x29fa6 
+6e89 e7e48005 istore 9 ,contw 
+6e8a 3800e70f setsect 0 ,0xe70f 
+6e8b 38056720 setsect 1 ,0x16720 
+6e8c 3808519e setsect 2 ,0x519e 
+6e8d 380d9084 setsect 3 ,0x19084 
+6e8e e7e48005 istore 9 ,contw 
+6e8f 38031012 setsect 0 ,0x31012 
+6e90 380760bf setsect 1 ,0x360bf 
+6e91 380bf0af setsect 2 ,0x3f0af 
+6e92 380c03d3 setsect 3 ,0x3d3 
+6e93 e7e48005 istore 9 ,contw 
+6e94 3803a188 setsect 0 ,0x3a188 
+6e95 38043ad0 setsect 1 ,0x3ad0 
+6e96 380bcbf2 setsect 2 ,0x3cbf2 
+6e97 380e43d9 setsect 3 ,0x243d9 
+6e98 e7e48005 istore 9 ,contw 
+6e99 3802b030 setsect 0 ,0x2b030 
+6e9a 38076a03 setsect 1 ,0x36a03 
+6e9b 38091188 setsect 2 ,0x11188 
+6e9c 380de520 setsect 3 ,0x1e520 
+6e9d e7e48005 istore 9 ,contw 
+6e9e 3803a11e setsect 0 ,0x3a11e 
+6e9f 3804fe5d setsect 1 ,0xfe5d 
+6ea0 3808dd57 setsect 2 ,0xdd57 
+6ea1 380dac93 setsect 3 ,0x1ac93 
+6ea2 e7e48005 istore 9 ,contw 
+6ea3 380011ed setsect 0 ,0x11ed 
+6ea4 380618c4 setsect 1 ,0x218c4 
+6ea5 38088da7 setsect 2 ,0x8da7 
+6ea6 380e57ff setsect 3 ,0x257ff 
+6ea7 e7e48005 istore 9 ,contw 
+6ea8 3803192b setsect 0 ,0x3192b 
+6ea9 38074641 setsect 1 ,0x34641 
+6eaa 3809be0c setsect 2 ,0x1be0c 
+6eab 380f66ad setsect 3 ,0x366ad 
+6eac e7e48005 istore 9 ,contw 
+6ead 38001f83 setsect 0 ,0x1f83 
+6eae 38055a23 setsect 1 ,0x15a23 
+6eaf 380bf9b0 setsect 2 ,0x3f9b0 
+6eb0 380c3949 setsect 3 ,0x3949 
+6eb1 e7e48005 istore 9 ,contw 
+6eb2 38013a51 setsect 0 ,0x13a51 
+6eb3 380553fd setsect 1 ,0x153fd 
+6eb4 380b372a setsect 2 ,0x3372a 
+6eb5 380cf1bb setsect 3 ,0xf1bb 
+6eb6 e7e48005 istore 9 ,contw 
+6eb7 3803ae85 setsect 0 ,0x3ae85 
+6eb8 3805eed9 setsect 1 ,0x1eed9 
+6eb9 38089e66 setsect 2 ,0x9e66 
+6eba 380c01a8 setsect 3 ,0x1a8 
+6ebb e7e40005 istore 8 ,contw 
+6ebc 20600000 rtn 
+
+init_memp_256:
+6ebd d8a007e0 arg mem_p_256 ,contw 
+6ebe 3803ffff setsect 0 ,0x3ffff 
+6ebf 3807ffff setsect 1 ,0x3ffff 
+6ec0 380bffff setsect 2 ,0x3ffff 
+6ec1 380fffff setsect 3 ,0x3ffff 
+6ec2 e7e48005 istore 9 ,contw 
+6ec3 3803ffff setsect 0 ,0x3ffff 
+6ec4 3804003f setsect 1 ,0x3f 
+6ec5 38080000 setsect 2 ,0x0 
+6ec6 380c0000 setsect 3 ,0x0 
+6ec7 e7e48005 istore 9 ,contw 
+6ec8 38000000 setsect 0 ,0x0 
+6ec9 38040000 setsect 1 ,0x0 
+6eca 38081000 setsect 2 ,0x1000 
+6ecb 380c0000 setsect 3 ,0x0 
+6ecc e7e48005 istore 9 ,contw 
+6ecd 3803ff00 setsect 0 ,0x3ff00 
+6ece 3807ffff setsect 1 ,0x3ffff 
+6ecf 380bffcf setsect 2 ,0x3ffcf 
+6ed0 380fffff setsect 3 ,0x3ffff 
+6ed1 e7e48005 istore 9 ,contw 
+6ed2 3803ffff setsect 0 ,0x3ffff 
+6ed3 3807ffff setsect 1 ,0x3ffff 
+6ed4 380bffff setsect 2 ,0x3ffff 
+6ed5 380c03ff setsect 3 ,0x3ff 
+6ed6 e7e48005 istore 9 ,contw 
+6ed7 38000000 setsect 0 ,0x0 
+6ed8 38040000 setsect 1 ,0x0 
+6ed9 38080000 setsect 2 ,0x0 
+6eda 380c0000 setsect 3 ,0x0 
+6edb e7e48005 istore 9 ,contw 
+6edc 38010000 setsect 0 ,0x10000 
+6edd 38040000 setsect 1 ,0x0 
+6ede 380bf000 setsect 2 ,0x3f000 
+6edf 380fffff setsect 3 ,0x3ffff 
+6ee0 e7e48005 istore 9 ,contw 
+6ee1 380296ff setsect 0 ,0x296ff 
+6ee2 38062630 setsect 1 ,0x22630 
+6ee3 380b945d setsect 2 ,0x3945d 
+6ee4 380fd284 setsect 3 ,0x3d284 
+6ee5 e7e48005 istore 9 ,contw 
+6ee6 380333a0 setsect 0 ,0x333a0 
+6ee7 38044b7a setsect 1 ,0x4b7a 
+6ee8 380837d8 setsect 2 ,0x37d8 
+6ee9 380fc9dc setsect 3 ,0x3c9dc 
+6eea e7e48005 istore 9 ,contw 
+6eeb 3803a440 setsect 0 ,0x3a440 
+6eec 3805b958 setsect 1 ,0x1b958 
+6eed 380b8bce setsect 2 ,0x38bce 
+6eee 380d091f setsect 3 ,0x1091f 
+6eef e7e48005 istore 9 ,contw 
+6ef0 3802e12c setsect 0 ,0x2e12c 
+6ef1 3805f47c setsect 1 ,0x1f47c 
+6ef2 380b56b1 setsect 2 ,0x356b1 
+6ef3 380efd47 setsect 3 ,0x2fd47 
+6ef4 e7e48005 istore 9 ,contw 
+6ef5 38006837 setsect 0 ,0x6837 
+6ef6 3806ed90 setsect 1 ,0x2ed90 
+6ef7 3809ecec setsect 2 ,0x1ecec 
+6ef8 380dacc5 setsect 3 ,0x1acc5 
+6ef9 e7e48005 istore 9 ,contw 
+6efa 38023357 setsect 0 ,0x23357 
+6efb 38058af3 setsect 1 ,0x18af3 
+6efc 3808f9e1 setsect 2 ,0xf9e1 
+6efd 380d29f0 setsect 3 ,0x129f0 
+6efe e7e48005 istore 9 ,contw 
+6eff 3802e7eb setsect 0 ,0x2e7eb 
+6f00 3807e6e3 setsect 1 ,0x3e6e3 
+6f01 380be1a7 setsect 2 ,0x3e1a7 
+6f02 380d0b8b setsect 3 ,0x10b8b 
+6f03 e7e48005 istore 9 ,contw 
+6f04 38024fe3 setsect 0 ,0x24fe3 
+6f05 380420ef setsect 1 ,0x20ef 
+6f06 3809b5a6 setsect 2 ,0x1b5a6 
+6f07 380cdc2f setsect 3 ,0xdc2f 
+6f08 e7e48005 istore 9 ,contw 
+6f09 38013860 setsect 0 ,0x13860 
+6f0a 3806bd69 setsect 1 ,0x2bd69 
+6f0b 3808391a setsect 2 ,0x391a 
+6f0c 380db222 setsect 3 ,0x1b222 
+6f0d e7e48005 istore 9 ,contw 
+6f0e 20600000 rtn 
+
+publickey_init:
+6f0f 6fe0c767 fetch 1 ,mem_ssp_enable 
+6f10 243a6f2a nbranch sp_initialize ,blank 
+6f11 202075ac branch sp_initialize_256 
+
+sp_calc_sequence_256_check:
+6f12 473ac02e bpatchx patch2e_5 ,mem_patch2e 
+6f13 6fe0c767 fetch 1 ,mem_ssp_enable 
+6f14 207a0000 rtn blank 
+6f15 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+6f16 c1808000 rtnne sp_key_valid 
+6f17 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+6f18 207a0000 rtn blank 
+6f19 6fe0c6be fetch 1 ,mem_sc_local_key_invalid 
+6f1a c1018000 rtneq sp_key_valid_256 
+6f1b 6fe1478f fetch 2 ,mem_ui_state_map 
+6f1c c2806f20 bbit1 ui_state_bt_connected ,stop_publickey_calc_256 
+6f1d 6fe0c6bd fetch 1 ,mem_sc_calc 
+6f1e c00075ac beq sp_calc_standby ,sp_initialize_256 
+6f1f 20600000 rtn 
+
+stop_publickey_calc_256:
+6f20 7046bd00 jam sp_calc_standby ,mem_sc_calc 
+6f21 20600000 rtn 
+
+sp_br_secure_connection_enable:
+6f22 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+6f23 79207e01 set1 secure_connections_br_bit ,pdata 
+6f24 67e0c6bb store 1 ,mem_secure_connections_enable 
+6f25 20600000 rtn 
+
+sp_br_secure_connection_disable:
+6f26 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+6f27 793ffe01 set0 secure_connections_br_bit ,pdata 
+6f28 67e0c6bb store 1 ,mem_secure_connections_enable 
+6f29 20600000 rtn 
+
+sp_initialize:
+6f2a 473b402e bpatchx patch2e_6 ,mem_patch2e 
+6f2b 6fe0c767 fetch 1 ,mem_ssp_enable 
+6f2c 243a7066 nbranch sp_pubkey_calc ,blank 
+
+sp_reset:
+6f2d 20406f37 call sp_clear_flags 
+6f2e 7046bc00 jam sp_key_invalid ,mem_sp_local_key_invalid 
+6f2f 70087400 jam sp_calc_standby ,mem_sp_calc 
+6f30 20600000 rtn 
+
+sp_wait_pubkey_calc_done:
+6f31 6fe0c767 fetch 1 ,mem_ssp_enable 
+6f32 207a0000 rtn blank 
+6f33 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+6f34 c1008000 rtneq sp_key_valid 
+6f35 204070d7 call sp_calc_sequence 
+6f36 20206f31 branch sp_wait_pubkey_calc_done 
+
+sp_clear_flags:
+6f37 473bc02e bpatchx patch2e_7 ,mem_patch2e 
+6f38 58000880 setarg mem_sp_state_end 
+6f39 d8a00870 arg mem_sp_state_start ,contw 
+6f3a 98a67200 isub contw ,loopcnt 
+6f3b 20407d9b call clear_mem 
+6f3c 58004773 setarg mem_sp_state_xmem_end 
+6f3d d8a0476b arg mem_sp_state_xmem ,contw 
+6f3e 98a67200 isub contw ,loopcnt 
+6f3f 20207d9b branch clear_mem 
+
+sp_generate_local_key:
+6f40 70087201 jam sp_flag_commit ,mem_sp_flag 
+6f41 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+6f42 c0016f45 beq encapsulated_minor_type_p256 ,sp_generate_local_key0_256 
+6f43 c000ef50 beq encapsulated_minor_type_p192 ,sp_generate_local_key0_192 
+6f44 20600000 rtn 
+
+sp_generate_local_key0_256:
+6f45 6fe0c6be fetch 1 ,mem_sc_local_key_invalid 
+6f46 c001ef48 beq sp_key_valid_256 ,sp_start_send_pubkey_256 
+6f47 202075cd branch sp_pubkey_calc_256 
+
+sp_start_send_pubkey_256:
+6f48 204075ec call sp_dhkey_calc_256 
+6f49 6fe08871 fetch 1 ,mem_master_sp_state 
+6f4a 247a0000 nrtn blank 
+6f4b 70087003 jam sp_stat_key_send ,mem_sp_state 
+6f4c 20600000 rtn 
+
+sp_master_generate_local_key:
+6f4d 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+6f4e c000f085 beq sp_key_valid ,sp_dhkey_calc 
+6f4f 2020137c branch assert 
+
+sp_generate_local_key0_192:
+6f50 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+6f51 c000ef53 beq sp_key_valid ,sp_start_send_pubkey 
+6f52 20207066 branch sp_pubkey_calc 
+
+sp_start_send_pubkey:
+6f53 20407085 call sp_dhkey_calc 
+6f54 6fe08871 fetch 1 ,mem_master_sp_state 
+6f55 247a0000 nrtn blank 
+6f56 70087003 jam sp_stat_key_send ,mem_sp_state 
+6f57 20600000 rtn 
+
+sp_calc_check_publickey_256:
+6f58 20406f73 call sp_calc_b256 
+6f59 da2008a0 arg mem_le_pubkey_remote_y_256 ,rega 
+6f5a d8a00728 arg mem_t7_256 ,contw 
+6f5b 204077cc call bn_sqrmod_256 
+6f5c da200880 arg mem_le_pubkey_remote_x_256 ,rega 
+6f5d d8a006e8 arg mem_t2_256 ,contw 
+6f5e 204077cc call bn_sqrmod_256 
+6f5f da2006e8 arg mem_t2_256 ,rega 
+6f60 da400880 arg mem_le_pubkey_remote_x_256 ,regb 
+6f61 d8a006e8 arg mem_t2_256 ,contw 
+6f62 20407734 call bn_mulmod_256 
+6f63 da200800 arg mem_a_256 ,rega 
+6f64 da400880 arg mem_le_pubkey_remote_x_256 ,regb 
+6f65 d8a00708 arg mem_t3_256 ,contw 
+6f66 20407734 call bn_mulmod_256 
+6f67 da200708 arg mem_t3_256 ,rega 
+6f68 da4006e8 arg mem_t2_256 ,regb 
+6f69 d8a006e8 arg mem_t2_256 ,contw 
+6f6a 204077d0 call bn_addmod_256 
+6f6b da2006c8 arg mem_t0_256 ,rega 
+6f6c da4006e8 arg mem_t2_256 ,regb 
+6f6d d8a006c8 arg mem_t0_256 ,contw 
+6f6e 204077d0 call bn_addmod_256 
+6f6f df200020 arg 32 ,loopcnt 
+6f70 da200728 arg mem_t7_256 ,rega 
+6f71 da4006c8 arg mem_t0_256 ,regb 
+6f72 20207e66 branch string_compare 
+
+sp_calc_b256:
+6f73 da200840 arg mem_gy_256 ,rega 
+6f74 d8a006c8 arg mem_t0_256 ,contw 
+6f75 204077cc call bn_sqrmod_256 
+6f76 da200820 arg mem_gx_256 ,rega 
+6f77 d8a006e8 arg mem_t2_256 ,contw 
+6f78 204077cc call bn_sqrmod_256 
+6f79 da2006e8 arg mem_t2_256 ,rega 
+6f7a da400820 arg mem_gx_256 ,regb 
+6f7b d8a006e8 arg mem_t2_256 ,contw 
+6f7c 20407734 call bn_mulmod_256 
+6f7d da200800 arg mem_a_256 ,rega 
+6f7e da400820 arg mem_gx_256 ,regb 
+6f7f d8a00708 arg mem_t3_256 ,contw 
+6f80 20407734 call bn_mulmod_256 
+6f81 da200708 arg mem_t3_256 ,rega 
+6f82 da4006e8 arg mem_t2_256 ,regb 
+6f83 d8a006e8 arg mem_t2_256 ,contw 
+6f84 204077d0 call bn_addmod_256 
+6f85 da2006c8 arg mem_t0_256 ,rega 
+6f86 da4006e8 arg mem_t2_256 ,regb 
+6f87 d8a006c8 arg mem_t0_256 ,contw 
+6f88 202077e9 branch bn_submod_256 
+
+sp_calc_check_publickey:
+6f89 20406fa4 call sp_calc_b 
+6f8a da2008a8 arg mem_sp_pubkey_remote_y ,rega 
+6f8b d8a00728 arg mem_t7_256 ,contw 
+6f8c 204071a3 call bn_sqrmod 
+6f8d da200888 arg mem_sp_pubkey_remote_x ,rega 
+6f8e d8a006e8 arg mem_t2_256 ,contw 
+6f8f 204071a3 call bn_sqrmod 
+6f90 da2006e8 arg mem_t2_256 ,rega 
+6f91 da400888 arg mem_sp_pubkey_remote_x ,regb 
+6f92 d8a006e8 arg mem_t2_256 ,contw 
+6f93 20407181 call bn_mulmod 
+6f94 da200760 arg mem_a ,rega 
+6f95 da400888 arg mem_sp_pubkey_remote_x ,regb 
+6f96 d8a00708 arg mem_t3_256 ,contw 
+6f97 20407181 call bn_mulmod 
+6f98 da200708 arg mem_t3_256 ,rega 
+6f99 da4006e8 arg mem_t2_256 ,regb 
+6f9a d8a006e8 arg mem_t2_256 ,contw 
+6f9b 20407150 call bn_addmod 
+6f9c da2006c8 arg mem_t0_256 ,rega 
+6f9d da4006e8 arg mem_t2_256 ,regb 
+6f9e d8a006c8 arg mem_t0_256 ,contw 
+6f9f 20407150 call bn_addmod 
+6fa0 df200018 arg 24 ,loopcnt 
+6fa1 da200728 arg mem_t7_256 ,rega 
+6fa2 da4006c8 arg mem_t0_256 ,regb 
+6fa3 20207e66 branch string_compare 
+
+sp_calc_b:
+6fa4 da2007a8 arg mem_gy ,rega 
+6fa5 d8a006c8 arg mem_t0_256 ,contw 
+6fa6 204071a3 call bn_sqrmod 
+6fa7 da200790 arg mem_gx ,rega 
+6fa8 d8a006e8 arg mem_t2_256 ,contw 
+6fa9 204071a3 call bn_sqrmod 
+6faa da2006e8 arg mem_t2_256 ,rega 
+6fab da400790 arg mem_gx ,regb 
+6fac d8a006e8 arg mem_t2_256 ,contw 
+6fad 20407181 call bn_mulmod 
+6fae da200760 arg mem_a ,rega 
+6faf da400790 arg mem_gx ,regb 
+6fb0 d8a00708 arg mem_t3_256 ,contw 
+6fb1 20407181 call bn_mulmod 
+6fb2 da200708 arg mem_t3_256 ,rega 
+6fb3 da4006e8 arg mem_t2_256 ,regb 
+6fb4 d8a006e8 arg mem_t2_256 ,contw 
+6fb5 20407150 call bn_addmod 
+6fb6 da2006c8 arg mem_t0_256 ,rega 
+6fb7 da4006e8 arg mem_t2_256 ,regb 
+6fb8 d8a006c8 arg mem_t0_256 ,contw 
+6fb9 20207153 branch bn_submod 
+
+sp_calculate_commitment:
+6fba 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+6fbb c0016fbe beq encapsulated_minor_type_p256 ,sp_calculate_commitment_256 
+6fbc c000efce beq encapsulated_minor_type_p192 ,sp_calculate_commitment_192 
+6fbd 20600000 rtn 
+
+sp_calculate_commitment_256:
+6fbe 6fe0c6bd fetch 1 ,mem_sc_calc 
+6fbf c0806fec bne sp_calc_standby ,sp_calculate_commitment_wait_dhkey_calc 
+6fc0 20406fe9 call sp_local_random_key_generator 
+6fc1 d8a00940 arg mem_sp_prarm_stack ,contw 
+6fc2 580008f0 setarg mem_sp_random_local_end 
+6fc3 e7e10005 istore 2 ,contw 
+6fc4 580046ff setarg mem_sc_pubkey_local_x_256 + 32 
+6fc5 e7e10005 istore 2 ,contw 
+6fc6 580008a0 setarg mem_le_pubkey_remote_x_256 + 32 
+6fc7 e7e10005 istore 2 ,contw 
+
+sp_calculate_commitment0_256:
+6fc8 20407495 call function_f1_256 
+6fc9 6fe08871 fetch 1 ,mem_master_sp_state 
+6fca c0026fe6 beq sp_stat_commit_calc ,master_sp_calculate_commitment0 
+6fcb 70087201 jam sp_flag_commit ,mem_sp_flag 
+6fcc 70087005 jam sp_stat_commit_send ,mem_sp_state 
+6fcd 20600000 rtn 
+
+sp_calculate_commitment_192:
+6fce 6fe08874 fetch 1 ,mem_sp_calc 
+6fcf c0806fec bne sp_calc_standby ,sp_calculate_commitment_wait_dhkey_calc 
+6fd0 20406fe9 call sp_local_random_key_generator 
+6fd1 d8a00940 arg mem_sp_prarm_stack ,contw 
+6fd2 580008f0 setarg mem_sp_random_local_end 
+6fd3 e7e10005 istore 2 ,contw 
+6fd4 5800474f setarg mem_sp_pubkey_local_x_end 
+6fd5 e7e10005 istore 2 ,contw 
+6fd6 580008a0 setarg mem_sp_pubkey_remote_x_end 
+6fd7 e7e10005 istore 2 ,contw 
+6fd8 20206fe0 branch sp_calculate_commitment0 
+
+master_sp_calculate_commitment:
+6fd9 d8a00940 arg mem_sp_prarm_stack ,contw 
+6fda 58000900 setarg mem_sp_random_remote_end 
+6fdb e7e10005 istore 2 ,contw 
+6fdc 580008a0 setarg mem_sp_pubkey_remote_x_end 
+6fdd e7e10005 istore 2 ,contw 
+6fde 5800474f setarg mem_sp_pubkey_local_x_end 
+6fdf e7e10005 istore 2 ,contw 
+
+sp_calculate_commitment0:
+6fe0 204073bc call function_f1_192 
+6fe1 6fe08871 fetch 1 ,mem_master_sp_state 
+6fe2 c0026fe6 beq sp_stat_commit_calc ,master_sp_calculate_commitment0 
+6fe3 70087201 jam sp_flag_commit ,mem_sp_flag 
+6fe4 70087005 jam sp_stat_commit_send ,mem_sp_state 
+6fe5 20600000 rtn 
+
+master_sp_calculate_commitment0:
+6fe6 70087114 jam sp_stat_commitment_compare ,mem_master_sp_state 
+6fe7 20406f4d call sp_master_generate_local_key 
+6fe8 202070d3 branch master_set_mem_master_sp_flag 
+
+sp_local_random_key_generator:
+6fe9 d8a008e0 arg mem_sp_random_local ,contw 
+6fea 18000e08 force 8 ,queue 
+6feb 2020709d branch random_generator 
+
+sp_calculate_commitment_wait_dhkey_calc:
+6fec 70087201 jam sp_flag_commit ,mem_sp_flag 
+6fed 20600000 rtn 
+
+sp_confirm_check:
+6fee 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+6fef c0016ff4 beq encapsulated_minor_type_p256 ,sp_confirm_check_256 
+6ff0 c000eff7 beq encapsulated_minor_type_p192 ,sp_confirm_check_192 
+
+sp_confirm_check_wait:
+6ff1 70087009 jam sp_stat_confirm_check ,mem_sp_state 
+6ff2 70087201 jam sp_flag_commit ,mem_sp_flag 
+6ff3 20600000 rtn 
+
+sp_confirm_check_256:
+6ff4 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+6ff5 c081eff1 bne sp_key_valid_256 ,sp_confirm_check_wait 
+6ff6 20206ff9 branch sp_confirm_check_common 
+
+sp_confirm_check_192:
+6ff7 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+6ff8 c080eff1 bne sp_key_valid ,sp_confirm_check_wait 
+
+sp_confirm_check_common:
+6ff9 d8a005e9 arg mem_addr_value ,contw 
+6ffa 6fe340a8 fetch 6 ,mem_lap 
+6ffb e7e30005 istore 6 ,contw 
+6ffc 6fe30040 fetch 6 ,mem_plap 
+6ffd e7e30005 istore 6 ,contw 
+6ffe 6fe1c76b fetch 3 ,mem_sp_iocap_remote 
+6fff e7e18005 istore 3 ,contw 
+7000 204074b4 call function_f3a 
+7001 da200910 arg mem_sp_calc_result_high ,rega 
+7002 da400920 arg mem_sp_check_result ,regb 
+7003 18000e04 force 4 ,queue 
+7004 204070a2 call compare4 
+7005 2420f012 nbranch sp_confirm_check_failed ,true 
+7006 20407009 call sp_confirm_check_success 
+7007 70007d41 jam lmp_dhkey_check ,mem_lmi_opcode2 
+7008 20205a7b branch tid_set_reply 
+
+sp_confirm_check_success:
+7009 6fe08871 fetch 1 ,mem_master_sp_state 
+700a c004f00f beq sp_stat_confirm_check ,sp_confirm_check_success_master 
+700b 7008700a jam sp_stat_confirm_calc ,mem_sp_state 
+700c 70087201 jam sp_flag_commit ,mem_sp_flag 
+700d 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+700e 20600000 rtn 
+
+sp_confirm_check_success_master:
+700f 70007c03 jam lmp_accepted ,mem_lmo_opcode2 
+7010 70087115 jam sp_state_end ,mem_master_sp_state 
+7011 202070d3 branch master_set_mem_master_sp_flag 
+
+sp_confirm_check_failed:
+7012 6fe08871 fetch 1 ,mem_master_sp_state 
+7013 c004f018 beq sp_stat_confirm_check ,sp_confirm_check_failed_master 
+7014 70087000 jam sp_stat_null ,mem_sp_state 
+7015 70007c04 jam lmp_not_accepted ,mem_lmo_opcode2 
+7016 70007e05 jam authentication_failure_error ,mem_lmo_reason2 
+7017 20600000 rtn 
+
+sp_confirm_check_failed_master:
+7018 70007c04 jam lmp_not_accepted ,mem_lmo_opcode2 
+7019 70087100 jam sp_stat_null ,mem_master_sp_state 
+701a 20600000 rtn 
+
+sp_confirm_calc:
+701b 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+701c c001701f beq encapsulated_minor_type_p256 ,sp_confirm_calc_256 
+701d c000f023 beq encapsulated_minor_type_p192 ,sp_confirm_calc_192 
+701e 20600000 rtn 
+
+sp_confirm_calc_256:
+701f 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+7020 c001f027 beq sp_key_valid_256 ,sp_confirm_calc_ready 
+7021 7008710a jam sp_stat_confirm_calc ,mem_master_sp_state 
+7022 202070d3 branch master_set_mem_master_sp_flag 
+
+sp_confirm_calc_192:
+7023 6fe08875 fetch 1 ,mem_sp_dh_ready 
+7024 c000f027 beq sp_flag_commit ,sp_confirm_calc_ready 
+7025 7008710a jam sp_stat_confirm_calc ,mem_master_sp_state 
+7026 202070d3 branch master_set_mem_master_sp_flag 
+
+sp_confirm_calc_ready:
+7027 d8a005e9 arg mem_addr_value ,contw 
+7028 6fe30040 fetch 6 ,mem_plap 
+7029 e7e30005 istore 6 ,contw 
+702a 6fe340a8 fetch 6 ,mem_lap 
+702b e7e30005 istore 6 ,contw 
+702c 6fe1c768 fetch 3 ,mem_lmp_io_cap_payload_iocap 
+702d e7e18005 istore 3 ,contw 
+702e 204074f7 call function_f3b 
+702f 6fe08871 fetch 1 ,mem_master_sp_state 
+7030 c0057034 beq sp_stat_confirm_calc ,sp_confirm_calc_master 
+7031 7008700b jam sp_stat_confirm_send ,mem_sp_state 
+7032 70087201 jam sp_flag_commit ,mem_sp_flag 
+7033 20600000 rtn 
+
+sp_confirm_calc_master:
+7034 7008710b jam sp_stat_confirm_send ,mem_master_sp_state 
+7035 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+7036 20600000 rtn 
+
+sp_master_key_prarm_push:
+7037 d8a00940 arg mem_sp_prarm_stack ,contw 
+7038 6fe30040 fetch 6 ,mem_plap 
+7039 e7e30005 istore 6 ,contw 
+703a 6fe340a8 fetch 6 ,mem_lap 
+703b e7e30005 istore 6 ,contw 
+703c 580008f0 setarg mem_sp_random_local_end 
+703d e7e10005 istore 2 ,contw 
+703e 58000900 setarg mem_sp_random_remote_end 
+703f e7e10005 istore 2 ,contw 
+7040 2020704b branch sp_link_key_calc 
+
+sp_link_key_prarm_push:
+7041 7008700f jam sp_stat_done ,mem_sp_state 
+7042 d8a00940 arg mem_sp_prarm_stack ,contw 
+7043 6fe340a8 fetch 6 ,mem_lap 
+7044 e7e30005 istore 6 ,contw 
+7045 6fe30040 fetch 6 ,mem_plap 
+7046 e7e30005 istore 6 ,contw 
+7047 58000900 setarg mem_sp_random_remote_end 
+7048 e7e10005 istore 2 ,contw 
+7049 580008f0 setarg mem_sp_random_local_end 
+704a e7e10005 istore 2 ,contw 
+
+sp_link_key_calc:
+704b d8a005e9 arg mem_addr_value ,contw 
+704c 6fe30940 fetch 6 ,mem_sp_prarm_stack 
+704d e7e30005 istore 6 ,contw 
+704e 6fe30946 fetch 6 ,mem_sp_prarm_stack + 6 
+704f e7e30005 istore 6 ,contw 
+7050 2040750b call function_f2 
+7051 7041ca01 jam 1 ,mem_link_key_exists 
+7052 d8a041cb arg mem_link_key ,contw 
+7053 d8c00910 arg mem_sp_calc_result_high ,contr 
+7054 20407d7f call memcpy16 
+7055 202009c6 branch generate_linkkey_continue 
+
+sp_debug_private:
+7056 d8a0471f arg mem_sp_private_key ,contw 
+7057 380118ff setsect 0 ,0x118ff 
+7058 3807fd29 setsect 1 ,0x3fd29 
+7059 3809ed2e setsect 2 ,0x1ed2e 
+705a 380cad89 setsect 3 ,0xad89 
+705b e7e48005 istore 9 ,contw 
+705c 38030c14 setsect 0 ,0x30c14 
+705d 380475b3 setsect 1 ,0x75b3 
+705e 380805df setsect 2 ,0x5df 
+705f 380f709c setsect 3 ,0x3709c 
+7060 e7e48005 istore 9 ,contw 
+7061 3802918d setsect 0 ,0x2918d 
+7062 380457e1 setsect 1 ,0x57e1 
+7063 38080079 setsect 2 ,0x79 
+7064 e7e30005 istore 6 ,contw 
+7065 20600000 rtn 
+
+sp_pubkey_calc:
+7066 473c402f bpatchx patch2f_0 ,mem_patch2f 
+7067 6fe0c6bc fetch 1 ,mem_sp_local_key_invalid 
+7068 c1800000 rtnne sp_key_invalid 
+7069 6fe08874 fetch 1 ,mem_sp_calc 
+706a c1800000 rtnne sp_calc_standby 
+706b d8a0471f arg mem_sp_private_key ,contw 
+706c 18000e0b force 11 ,queue 
+706d 2040709d call random_generator 
+706e 180a7e00 random pdata 
+706f 1fe37e00 rshift pdata ,pdata 
+7070 e7e10005 istore 2 ,contw 
+7071 6fe0c6ba fetch 1 ,mem_sp_debug_mode 
+7072 245a7056 ncall sp_debug_private ,blank 
+7073 d8a00580 arg mem_k ,contw 
+7074 d8c0471f arg mem_sp_private_key ,contr 
+7075 20407d7e call memcpy24 
+7076 d8a004a8 arg mem_ax ,contw 
+7077 d8c00790 arg mem_gx ,contr 
+7078 20407d7c call memcpy48 
+7079 d8a004d8 arg mem_az ,contw 
+707a 20407d8b call bn_zero 
+707b 7004d801 jam 1 ,mem_az 
+707c 20407479 call eckp_calc_init 
+707d 70087401 jam sp_calc_pubkey ,mem_sp_calc 
+707e 20600000 rtn 
+
+sp_pubkey_generated:
+707f d8a04737 arg mem_sp_pubkey_local ,contw 
+7080 d8c004f0 arg mem_bx ,contr 
+7081 20407d7c call memcpy48 
+7082 7046bc01 jam sp_key_valid ,mem_sp_local_key_invalid 
+7083 70087400 jam sp_calc_standby ,mem_sp_calc 
+7084 20600000 rtn 
+
+sp_dhkey_calc:
+7085 473cc02f bpatchx patch2f_1 ,mem_patch2f 
+7086 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+7087 c1800000 rtnne sp_key_invalid 
+7088 6fe08874 fetch 1 ,mem_sp_calc 
+7089 c1800000 rtnne sp_calc_standby 
+708a d8a00580 arg mem_k ,contw 
+708b d8c0471f arg mem_sp_private_key ,contr 
+708c 20407d7e call memcpy24 
+708d d8a004a8 arg mem_ax ,contw 
+708e d8c00888 arg mem_sp_pubkey_remote ,contr 
+708f 20407d7c call memcpy48 
+7090 d8a004d8 arg mem_az ,contw 
+7091 20407d8b call bn_zero 
+7092 7004d801 jam 1 ,mem_az 
+7093 20407479 call eckp_calc_init 
+7094 70087402 jam sp_calc_dhkey ,mem_sp_calc 
+7095 20600000 rtn 
+
+sp_dhkey_generated:
+7096 70087501 jam sp_flag_commit ,mem_sp_dh_ready 
+7097 d8a008c8 arg mem_sp_dhkey ,contw 
+7098 d8c004f0 arg mem_bx ,contr 
+7099 20407d7e call memcpy24 
+709a 70087b01 jam sp_key_valid ,mem_sp_dhkey_invalid 
+709b 70087400 jam sp_calc_standby ,mem_sp_calc 
+709c 20600000 rtn 
+
+random_generator:
+709d 18e08fff increase -1 ,queue 
+709e 24610000 nrtn positive 
+709f 180a7e00 random pdata 
+70a0 e7e10005 istore 2 ,contw 
+70a1 2020709d branch random_generator 
+
+compare4:
+70a2 18e08fff increase -1 ,queue 
+70a3 242170ae nbranch compare4_success ,positive 
+70a4 efe20011 ifetch 4 ,rega 
+70a5 1fe20400 copy pdata ,temp 
+70a6 efe20012 ifetch 4 ,regb 
+70a7 9842fe00 iflip temp ,pdata 
+70a8 2422f0ac nbranch compare4_failed ,zero 
+70a9 1a20a204 increase 4 ,rega 
+70aa 1a40a404 increase 4 ,regb 
+70ab 202070a2 branch compare4 
+
+compare4_failed:
+70ac 7840fc00 disable true 
+70ad 20600000 rtn 
+
+compare4_success:
+70ae 7820fc00 enable true 
+70af 20600000 rtn 
+
+simple_pairing_sequence:
+70b0 473d402f bpatchx patch2f_2 ,mem_patch2f 
+70b1 6fe08872 fetch 1 ,mem_sp_flag 
+70b2 207a0000 rtn blank 
+70b3 20405a3f call lmo_fifo_check 
+70b4 247a0000 nrtn blank 
+70b5 70087200 jam sp_flag_standby ,mem_sp_flag 
+70b6 6fe08870 fetch 1 ,mem_sp_state 
+70b7 c001d965 beq sp_stat_key_send ,sp_send_lmp_encapsulated_header 
+70b8 c002d987 beq sp_stat_commit_send ,sp_send_lmp_simple_pairing_comfirm 
+70b9 c003d992 beq sp_stat_random_send ,sp_send_lmp_simple_pairing_number 
+70ba c005d9a7 beq sp_stat_confirm_send ,sp_send_lmp_dhkey_check 
+70bb c0016f40 beq sp_stat_key_generate ,sp_generate_local_key 
+70bc c0026fba beq sp_stat_commit_calc ,sp_calculate_commitment 
+70bd c004efee beq sp_stat_confirm_check ,sp_confirm_check 
+70be c005701b beq sp_stat_confirm_calc ,sp_confirm_calc 
+70bf c0067041 beq sp_stat_link_key_calc ,sp_link_key_prarm_push 
+70c0 20600000 rtn 
+
+master_simple_paring_sequence:
+70c1 473dc02f bpatchx patch2f_3 ,mem_patch2f 
+70c2 6fe08873 fetch 1 ,mem_master_sp_flag 
+70c3 207a0000 rtn blank 
+70c4 20405a3f call lmo_fifo_check 
+70c5 247a0000 nrtn blank 
+70c6 70087300 jam sp_flag_standby ,mem_master_sp_flag 
+70c7 6fe08871 fetch 1 ,mem_master_sp_state 
+70c8 c0095949 beq sp_master_stat_start_skip ,sp_master_send_io_cap_get 
+70c9 c009d94e beq sp_master_stat_start_done ,sp_master_send_io_cap_send 
+70ca c001d952 beq sp_stat_key_send ,sp_master_send_lmp_encapsulated_header 
+70cb c0026fd9 beq sp_stat_commit_calc ,master_sp_calculate_commitment 
+70cc c00a5956 beq sp_stat_commitment_compare ,sp_master_commitment_compare 
+70cd c003d963 beq sp_stat_random_send ,sp_master_send_lmp_simple_pairing_number 
+70ce c005701b beq sp_stat_confirm_calc ,sp_confirm_calc 
+70cf c005d9a6 beq sp_stat_confirm_send ,master_sp_send_lmp_dhkey_check 
+70d0 c004efee beq sp_stat_confirm_check ,sp_confirm_check 
+70d1 c00ad9a0 beq sp_state_end ,master_sp_sm_end 
+70d2 20600000 rtn 
+
+master_set_mem_master_sp_flag:
+70d3 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+70d4 20600000 rtn 
+
+master_clear_mem_master_sp_flag:
+70d5 70087300 jam sp_flag_standby ,mem_master_sp_flag 
+70d6 20600000 rtn 
+
+sp_calc_sequence:
+70d7 473e402f bpatchx patch2f_4 ,mem_patch2f 
+70d8 6fe0c767 fetch 1 ,mem_ssp_enable 
+70d9 207a0000 rtn blank 
+70da 6fe08874 fetch 1 ,mem_sp_calc 
+70db 207a0000 rtn blank 
+70dc 1fe0fe80 increase 0x80 ,pdata 
+70dd 67e08874 store 1 ,mem_sp_calc 
+70de c3838000 rtnbit1 7 
+70df 6fe084a5 fetch 1 ,mem_ec_loopc 
+70e0 203a70e2 branch sp_calc_sequence_done ,blank 
+70e1 20207484 branch eckp_calc 
+
+sp_calc_sequence_done:
+70e2 204072ce call ecunmapz 
+70e3 6fe08874 fetch 1 ,mem_sp_calc 
+70e4 c000f07f beq sp_calc_pubkey ,sp_pubkey_generated 
+70e5 c0017096 beq sp_calc_dhkey ,sp_dhkey_generated 
+70e6 20600000 rtn 
+
+bn_testbit:
+70e7 1fe10e07 and pdata ,7 ,queue 
+70e8 1fe97e00 rshift3 pdata ,pdata 
+70e9 98c08c00 iadd contr ,contr 
+70ea efe08006 ifetch 1 ,contr 
+70eb afec0000 qisolate0 pdata 
+70ec 20600000 rtn 
+
+ec_copy:
+70ed 20407d7e call memcpy24 
+70ee 20407d7e call memcpy24 
+70ef 20207d7e branch memcpy24 
+
+bn_eq_zero:
+70f0 efe40006 ifetch 8 ,contr 
+70f1 247a0000 nrtn blank 
+70f2 efe40006 ifetch 8 ,contr 
+70f3 247a0000 nrtn blank 
+70f4 efe40006 ifetch 8 ,contr 
+70f5 20600000 rtn 
+
+bn_eq_0:
+70f6 efe20011 ifetch 4 ,rega 
+70f7 98000400 iforce temp 
+70f8 efe20012 ifetch 4 ,regb 
+70f9 98467c00 isub temp ,null 
+70fa 24628000 nrtn zero 
+70fb 1a20a204 increase 4 ,rega 
+70fc 1a40a404 increase 4 ,regb 
+70fd c20070f6 loop bn_eq_0 
+70fe 20600000 rtn 
+
+bn_bigeq:
+70ff 18007206 force 6 ,loopcnt 
+7100 1a20a214 increase 20 ,rega 
+7101 1a40a414 increase 20 ,regb 
+
+bn_bigeq_0:
+7102 efe20012 ifetch 4 ,regb 
+7103 98000400 iforce temp 
+7104 efe20011 ifetch 4 ,rega 
+7105 98467e00 isub temp ,pdata 
+7106 24610000 nrtn positive 
+7107 247a0000 nrtn blank 
+7108 1a20a3fc increase -4 ,rega 
+7109 1a40a5fc increase -4 ,regb 
+710a c2007102 loop bn_bigeq_0 
+710b 20600000 rtn 
+
+bn_add:
+710c 18007206 force 6 ,loopcnt 
+710d 18002600 force 0 ,regc 
+
+bn_add_0:
+710e efe20011 ifetch 4 ,rega 
+710f 98000400 iforce temp 
+7110 efe20012 ifetch 4 ,regb 
+7111 9840fe00 iadd temp ,pdata 
+7112 9a60fe00 iadd regc ,pdata 
+7113 e7e20005 istore 4 ,contw 
+7114 2feffe20 isolate1 32 ,pdata 
+7115 7920a600 setflag true ,0 ,regc 
+7116 1a20a204 increase 4 ,rega 
+7117 1a40a404 increase 4 ,regb 
+7118 c200710e loop bn_add_0 
+7119 20600000 rtn 
+
+bn_sub:
+711a 18007206 force 6 ,loopcnt 
+711b 18002600 force 0 ,regc 
+
+bn_sub_0:
+711c efe20012 ifetch 4 ,regb 
+711d 98000400 iforce temp 
+711e efe20011 ifetch 4 ,rega 
+711f 98467e00 isub temp ,pdata 
+7120 9a667e00 isub regc ,pdata 
+7121 e7e20005 istore 4 ,contw 
+7122 2feffe20 isolate1 32 ,pdata 
+7123 7920a600 setflag true ,0 ,regc 
+7124 1a20a204 increase 4 ,rega 
+7125 1a40a404 increase 4 ,regb 
+7126 c200711c loop bn_sub_0 
+7127 20600000 rtn 
+
+bn_rshift6:
+7128 18007206 force 6 ,loopcnt 
+7129 1a20a214 increase 20 ,rega 
+
+bn_rshift:
+712a 18002600 force 0 ,regc 
+
+bn_rshift_0:
+712b efe20011 ifetch 4 ,rega 
+712c 2feffe00 isolate1 0 ,pdata 
+712d 7920a601 setflag true ,1 ,regc 
+712e 1fe37e00 rshift pdata ,pdata 
+712f 2a6ffe00 isolate1 0 ,regc 
+7130 7920fe1f setflag true ,31 ,pdata 
+7131 e7e20011 istore 4 ,rega 
+7132 1a20a3fc increase -4 ,rega 
+7133 1a632600 rshift regc ,regc 
+7134 c200712b loop bn_rshift_0 
+7135 20600000 rtn 
+
+bn_lshift:
+7136 18007206 force 6 ,loopcnt 
+7137 18002600 force 0 ,regc 
+
+bn_lshift_0:
+7138 efe20011 ifetch 4 ,rega 
+7139 2feffe1f isolate1 31 ,pdata 
+713a 7920a601 setflag true ,1 ,regc 
+713b 1fe3fe00 lshift pdata ,pdata 
+713c 2a6ffe00 isolate1 0 ,regc 
+713d 7920fe00 setflag true ,0 ,pdata 
+713e e7e20011 istore 4 ,rega 
+713f 1a20a204 increase 4 ,rega 
+7140 1a632600 rshift regc ,regc 
+7141 c2007138 loop bn_lshift_0 
+7142 20600000 rtn 
+
+bn_lshiftmod:
+7143 20407136 call bn_lshift 
+
+bn_lshiftmod_ismod:
+7144 2a6ffe00 isolate1 0 ,regc 
+7145 2020f14c branch bn_lshiftmod_0 ,true 
+7146 da400748 arg mem_p ,regb 
+7147 1a222600 copy rega ,regc 
+7148 1a20a3e8 increase -24 ,rega 
+7149 204070ff call bn_bigeq 
+714a 24610000 nrtn positive 
+714b 1a622200 copy regc ,rega 
+
+bn_lshiftmod_0:
+714c 1a20a3e8 increase -24 ,rega 
+714d da400748 arg mem_p ,regb 
+714e 1a220a00 copy rega ,contw 
+714f 2020711a branch bn_sub 
+
+bn_addmod:
+7150 2040710c call bn_add 
+7151 18a22200 copy contw ,rega 
+7152 20207144 branch bn_lshiftmod_ismod 
+
+bn_submod:
+7153 2040711a call bn_sub 
+7154 2a6c0000 isolate0 0 ,regc 
+7155 20608000 rtn true 
+7156 da400748 arg mem_p ,regb 
+7157 18a0a3e8 add contw ,-24 ,rega 
+7158 1a220a00 copy rega ,contw 
+7159 2020710c branch bn_add 
+
+bn_p192mod:
+715a 18a21600 copy contw ,timeup 
+715b 1a226000 copy rega ,alarm 
+715c da4005d8 arg mem_tmp2 ,regb 
+715d 1a420a00 copy regb ,contw 
+715e 1a208c18 add rega ,24 ,contr 
+715f efe40006 ifetch 8 ,contr 
+7160 e7e40005 istore 8 ,contw 
+7161 e7e40005 istore 8 ,contw 
+7162 18007e00 force 0 ,pdata 
+7163 e7e40005 istore 8 ,contw 
+7164 19620a00 copy timeup ,contw 
+7165 20407150 call bn_addmod 
+7166 da4005d8 arg mem_tmp2 ,regb 
+7167 1a420a00 copy regb ,contw 
+7168 18007e00 force 0 ,pdata 
+7169 e7e40005 istore 8 ,contw 
+716a 1e008c20 add alarm ,32 ,contr 
+716b efe40006 ifetch 8 ,contr 
+716c e7e40005 istore 8 ,contw 
+716d e7e40005 istore 8 ,contw 
+716e 19622200 copy timeup ,rega 
+716f 1a220a00 copy rega ,contw 
+7170 20407150 call bn_addmod 
+7171 da4005d8 arg mem_tmp2 ,regb 
+7172 1a420a00 copy regb ,contw 
+7173 1e008c28 add alarm ,40 ,contr 
+7174 efe40006 ifetch 8 ,contr 
+7175 e7e40005 istore 8 ,contw 
+7176 e7e40005 istore 8 ,contw 
+7177 e7e40005 istore 8 ,contw 
+7178 19622200 copy timeup ,rega 
+7179 1a220a00 copy rega ,contw 
+717a 20207150 branch bn_addmod 
+
+bn_load:
+717b 18007206 force 6 ,loopcnt 
+
+bn_load_0:
+717c efe20006 ifetch 4 ,contr 
+717d 98005e00 iforce regext 
+717e 1f00f001 increase 1 ,regext_index 
+717f c200717c loop bn_load_0 
+7180 20600000 rtn 
+
+bn_mulmod:
+7181 18a21600 copy contw ,timeup 
+7182 d8a005a8 arg mem_tmp1 ,contw 
+7183 20407d8b call bn_zero 
+7184 d8a005a8 arg mem_tmp1 ,contw 
+7185 1a220c00 copy rega ,contr 
+7186 18007000 force 0 ,regext_index 
+7187 2040717b call bn_load 
+7188 1a420c00 copy regb ,contr 
+7189 2040717b call bn_load 
+718a 18002400 force 0 ,regb 
+
+bn_mulmod_1:
+718b 18000400 force 0 ,temp 
+718c 18002606 force 6 ,regc 
+
+bn_mulmod_0:
+718d efe20005 ifetch 4 ,contw 
+718e 98002200 iforce rega 
+718f 1a427000 copy regb ,regext_index 
+7190 1de27e00 deposit regext 
+7191 1a627000 copy regc ,regext_index 
+7192 9deffe00 imul32 regext ,pdata 
+7193 9a20fe00 iadd rega ,pdata 
+7194 9840fe00 iadd temp ,pdata 
+7195 e7e20005 istore 4 ,contw 
+7196 1fef0400 rshift32 pdata ,temp 
+7197 1a60a601 increase 1 ,regc 
+7198 2a61fe0c compare 12 ,regc ,0xff 
+7199 2420f18d nbranch bn_mulmod_0 ,true 
+719a 18427e00 deposit temp 
+719b e7e20005 istore 4 ,contw 
+719c 18a08be8 increase -24 ,contw 
+719d 1a40a401 increase 1 ,regb 
+719e 2a41fe06 compare 6 ,regb ,0xff 
+719f 2420f18b nbranch bn_mulmod_1 ,true 
+71a0 da2005a8 arg mem_tmp1 ,rega 
+71a1 19620a00 copy timeup ,contw 
+71a2 2020715a branch bn_p192mod 
+
+bn_sqrmod:
+71a3 1a222400 copy rega ,regb 
+71a4 20207181 branch bn_mulmod 
+
+bn_rshifteven:
+71a5 1a226000 copy rega ,alarm 
+
+bn_rshifteven_1:
+71a6 1e022200 copy alarm ,rega 
+71a7 efe08011 ifetch 1 ,rega 
+71a8 2feffe00 isolate1 0 ,pdata 
+71a9 20608000 rtn true 
+71aa 20407128 call bn_rshift6 
+71ab efe08012 ifetch 1 ,regb 
+71ac 2fec0000 isolate0 0 ,pdata 
+71ad 2020f1b5 branch bn_rshifteven_0 ,true 
+71ae da200748 arg mem_p ,rega 
+71af 1a420a00 copy regb ,contw 
+71b0 2040710c call bn_add 
+71b1 efe08012 ifetch 1 ,regb 
+71b2 9a60fe00 iadd regc ,pdata 
+71b3 e7e08012 istore 1 ,regb 
+71b4 1a40a5e8 increase -24 ,regb 
+
+bn_rshifteven_0:
+71b5 1a40a218 add regb ,24 ,rega 
+71b6 18007207 force 7 ,loopcnt 
+71b7 2040712a call bn_rshift 
+71b8 202071a6 branch bn_rshifteven_1 
+
+bn_invmod:
+71b9 18a21600 copy contw ,timeup 
+71ba d8a00608 arg mem_tmp0 ,contw 
+71bb 20407d8b call bn_zero 
+71bc 18007e00 force 0 ,pdata 
+71bd 67e205c0 store 4 ,mem_tmp5 
+71be 67e20620 store 4 ,mem_t2 
+71bf 70060801 jam 1 ,mem_tmp0 
+71c0 d8a005a8 arg mem_tmp1 ,contw 
+71c1 20407d8b call bn_zero 
+71c2 d8c00748 arg mem_p ,contr 
+71c3 d8a005d8 arg mem_tmp2 ,contw 
+71c4 20407d7e call memcpy24 
+71c5 1a220c00 copy rega ,contr 
+71c6 d8a005f0 arg mem_tmp3 ,contw 
+71c7 20407d7e call memcpy24 
+
+bn_invmod_2:
+71c8 d8c005f0 arg mem_tmp3 ,contr 
+71c9 204070f0 call bn_eq_zero 
+71ca 203a71f1 branch bn_invmod_0 ,blank 
+71cb da2005f0 arg mem_tmp3 ,rega 
+71cc da400608 arg mem_tmp0 ,regb 
+71cd 204071a5 call bn_rshifteven 
+71ce da2005d8 arg mem_tmp2 ,rega 
+71cf da4005a8 arg mem_tmp1 ,regb 
+71d0 204071a5 call bn_rshifteven 
+71d1 da2005f0 arg mem_tmp3 ,rega 
+71d2 da4005d8 arg mem_tmp2 ,regb 
+71d3 204070ff call bn_bigeq 
+71d4 202171e3 branch bn_invmod_1 ,positive 
+71d5 da2005d8 arg mem_tmp2 ,rega 
+71d6 da4005f0 arg mem_tmp3 ,regb 
+71d7 1a220a00 copy rega ,contw 
+71d8 2040711a call bn_sub 
+71d9 da200608 arg mem_tmp0 ,rega 
+71da da4005a8 arg mem_tmp1 ,regb 
+71db 1a420a00 copy regb ,contw 
+71dc 2040710c call bn_add 
+71dd efe08011 ifetch 1 ,rega 
+71de 9a60a600 iadd regc ,regc 
+71df efe08012 ifetch 1 ,regb 
+71e0 9a60fe00 iadd regc ,pdata 
+71e1 e7e08012 istore 1 ,regb 
+71e2 202071c8 branch bn_invmod_2 
+
+bn_invmod_1:
+71e3 da2005f0 arg mem_tmp3 ,rega 
+71e4 da4005d8 arg mem_tmp2 ,regb 
+71e5 1a220a00 copy rega ,contw 
+71e6 2040711a call bn_sub 
+71e7 da2005a8 arg mem_tmp1 ,rega 
+71e8 da400608 arg mem_tmp0 ,regb 
+71e9 1a420a00 copy regb ,contw 
+71ea 2040710c call bn_add 
+71eb efe08011 ifetch 1 ,rega 
+71ec 9a60a600 iadd regc ,regc 
+71ed efe08012 ifetch 1 ,regb 
+71ee 9a60fe00 iadd regc ,pdata 
+71ef e7e08012 istore 1 ,regb 
+71f0 202071c8 branch bn_invmod_2 
+
+bn_invmod_0:
+71f1 d8a00608 arg mem_tmp0 ,contw 
+71f2 20407d8b call bn_zero 
+71f3 6fe085c0 fetch 1 ,mem_tmp5 
+71f4 67e08608 store 1 ,mem_tmp0 
+71f5 67e08610 store 1 ,mem_tmp0a 
+71f6 da200608 arg mem_tmp0 ,rega 
+71f7 da4005a8 arg mem_tmp1 ,regb 
+71f8 1a420a00 copy regb ,contw 
+71f9 20407150 call bn_addmod 
+71fa da200748 arg mem_p ,rega 
+71fb da4005a8 arg mem_tmp1 ,regb 
+71fc 19620a00 copy timeup ,contw 
+71fd 20207153 branch bn_submod 
+
+ecdbl:
+71fe da200568 arg mem_cz ,rega 
+71ff d8a00620 arg mem_t2 ,contw 
+7200 204071a3 call bn_sqrmod 
+7201 da200620 arg mem_t2 ,rega 
+7202 d8a00638 arg mem_t3 ,contw 
+7203 204071a3 call bn_sqrmod 
+7204 da200760 arg mem_a ,rega 
+7205 da400638 arg mem_t3 ,regb 
+7206 d8a00638 arg mem_t3 ,contw 
+7207 20407181 call bn_mulmod 
+7208 da200538 arg mem_cx ,rega 
+7209 d8a00620 arg mem_t2 ,contw 
+720a 204071a3 call bn_sqrmod 
+720b d8c00620 arg mem_t2 ,contr 
+720c d8a005f0 arg mem_t1 ,contw 
+720d 20407d7e call memcpy24 
+720e da2005f0 arg mem_t1 ,rega 
+720f 20407143 call bn_lshiftmod 
+7210 da200620 arg mem_t2 ,rega 
+7211 da4005f0 arg mem_t1 ,regb 
+7212 d8a00620 arg mem_t2 ,contw 
+7213 20407150 call bn_addmod 
+7214 da200620 arg mem_t2 ,rega 
+7215 da400638 arg mem_t3 ,regb 
+7216 d8a00620 arg mem_t2 ,contw 
+7217 20407150 call bn_addmod 
+7218 d8c00538 arg mem_cx ,contr 
+7219 d8a005f0 arg mem_t1 ,contw 
+721a 20407d7e call memcpy24 
+721b da200550 arg mem_cy ,rega 
+721c d8a00638 arg mem_t3 ,contw 
+721d 204071a3 call bn_sqrmod 
+721e da2005f0 arg mem_t1 ,rega 
+721f 20407143 call bn_lshiftmod 
+7220 da2005f0 arg mem_t1 ,rega 
+7221 20407143 call bn_lshiftmod 
+7222 da2005f0 arg mem_t1 ,rega 
+7223 da400638 arg mem_t3 ,regb 
+7224 d8a005f0 arg mem_t1 ,contw 
+7225 20407181 call bn_mulmod 
+7226 da200638 arg mem_t3 ,rega 
+7227 d8a00608 arg mem_t0 ,contw 
+7228 204071a3 call bn_sqrmod 
+7229 da200608 arg mem_t0 ,rega 
+722a 20407143 call bn_lshiftmod 
+722b da200608 arg mem_t0 ,rega 
+722c 20407143 call bn_lshiftmod 
+722d da200608 arg mem_t0 ,rega 
+722e 20407143 call bn_lshiftmod 
+722f d8c00550 arg mem_cy ,contr 
+7230 d8a00638 arg mem_t3 ,contw 
+7231 20407d7e call memcpy24 
+7232 da200638 arg mem_t3 ,rega 
+7233 20407143 call bn_lshiftmod 
+7234 da200638 arg mem_t3 ,rega 
+7235 da400568 arg mem_cz ,regb 
+7236 d8a00568 arg mem_cz ,contw 
+7237 20407181 call bn_mulmod 
+7238 da200620 arg mem_t2 ,rega 
+7239 d8a00638 arg mem_t3 ,contw 
+723a 204071a3 call bn_sqrmod 
+723b da200638 arg mem_t3 ,rega 
+723c da4005f0 arg mem_t1 ,regb 
+723d d8a00638 arg mem_t3 ,contw 
+723e 20407153 call bn_submod 
+723f da200638 arg mem_t3 ,rega 
+7240 da4005f0 arg mem_t1 ,regb 
+7241 d8a00538 arg mem_cx ,contw 
+7242 20407153 call bn_submod 
+7243 da2005f0 arg mem_t1 ,rega 
+7244 da400538 arg mem_cx ,regb 
+7245 d8a00638 arg mem_t3 ,contw 
+7246 20407153 call bn_submod 
+7247 da200638 arg mem_t3 ,rega 
+7248 da400620 arg mem_t2 ,regb 
+7249 d8a00638 arg mem_t3 ,contw 
+724a 20407181 call bn_mulmod 
+724b da200638 arg mem_t3 ,rega 
+724c da400608 arg mem_t0 ,regb 
+724d d8a00550 arg mem_cy ,contw 
+724e 20207153 branch bn_submod 
+
+ecadd:
+724f da2004d8 arg mem_az ,rega 
+7250 d8a00650 arg mem_t7 ,contw 
+7251 204071a3 call bn_sqrmod 
+7252 da200538 arg mem_cx ,rega 
+7253 da400650 arg mem_t7 ,regb 
+7254 d8a00608 arg mem_t0 ,contw 
+7255 20407181 call bn_mulmod 
+7256 da2004d8 arg mem_az ,rega 
+7257 da400650 arg mem_t7 ,regb 
+7258 d8a00650 arg mem_t7 ,contw 
+7259 20407181 call bn_mulmod 
+725a da200550 arg mem_cy ,rega 
+725b da400650 arg mem_t7 ,regb 
+725c d8a005f0 arg mem_t1 ,contw 
+725d 20407181 call bn_mulmod 
+725e da200568 arg mem_cz ,rega 
+725f d8a00650 arg mem_t7 ,contw 
+7260 204071a3 call bn_sqrmod 
+7261 da2004a8 arg mem_ax ,rega 
+7262 da400650 arg mem_t7 ,regb 
+7263 d8a00620 arg mem_t2 ,contw 
+7264 20407181 call bn_mulmod 
+7265 da200568 arg mem_cz ,rega 
+7266 da400650 arg mem_t7 ,regb 
+7267 d8a00650 arg mem_t7 ,contw 
+7268 20407181 call bn_mulmod 
+7269 da2004c0 arg mem_ay ,rega 
+726a da400650 arg mem_t7 ,regb 
+726b d8a00638 arg mem_t3 ,contw 
+726c 20407181 call bn_mulmod 
+726d da200608 arg mem_t0 ,rega 
+726e da400620 arg mem_t2 ,regb 
+726f d8a00650 arg mem_t7 ,contw 
+7270 20407153 call bn_submod 
+7271 da200608 arg mem_t0 ,rega 
+7272 da400620 arg mem_t2 ,regb 
+7273 d8a00608 arg mem_t0 ,contw 
+7274 20407150 call bn_addmod 
+7275 da2005f0 arg mem_t1 ,rega 
+7276 da400638 arg mem_t3 ,regb 
+7277 d8a00620 arg mem_t2 ,contw 
+7278 20407153 call bn_submod 
+7279 da2005f0 arg mem_t1 ,rega 
+727a da400638 arg mem_t3 ,regb 
+727b d8a005f0 arg mem_t1 ,contw 
+727c 20407150 call bn_addmod 
+727d da2005f0 arg mem_t1 ,rega 
+727e da400650 arg mem_t7 ,regb 
+727f d8a005f0 arg mem_t1 ,contw 
+7280 20407181 call bn_mulmod 
+7281 da200568 arg mem_cz ,rega 
+7282 da4004d8 arg mem_az ,regb 
+7283 d8a00638 arg mem_t3 ,contw 
+7284 20407181 call bn_mulmod 
+7285 da200638 arg mem_t3 ,rega 
+7286 da400650 arg mem_t7 ,regb 
+7287 d8a00568 arg mem_cz ,contw 
+7288 20407181 call bn_mulmod 
+7289 da200650 arg mem_t7 ,rega 
+728a d8a00650 arg mem_t7 ,contw 
+728b 204071a3 call bn_sqrmod 
+728c da200650 arg mem_t7 ,rega 
+728d da400608 arg mem_t0 ,regb 
+728e d8a00638 arg mem_t3 ,contw 
+728f 20407181 call bn_mulmod 
+7290 da200650 arg mem_t7 ,rega 
+7291 da4005f0 arg mem_t1 ,regb 
+7292 d8a005f0 arg mem_t1 ,contw 
+7293 20407181 call bn_mulmod 
+7294 da200620 arg mem_t2 ,rega 
+7295 d8a00538 arg mem_cx ,contw 
+7296 204071a3 call bn_sqrmod 
+7297 da200538 arg mem_cx ,rega 
+7298 da400638 arg mem_t3 ,regb 
+7299 d8a00538 arg mem_cx ,contw 
+729a 20407153 call bn_submod 
+729b d8c00538 arg mem_cx ,contr 
+729c d8a00650 arg mem_t7 ,contw 
+729d 20407d7e call memcpy24 
+729e da200650 arg mem_t7 ,rega 
+729f 20407143 call bn_lshiftmod 
+72a0 da200638 arg mem_t3 ,rega 
+72a1 da400650 arg mem_t7 ,regb 
+72a2 d8a00638 arg mem_t3 ,contw 
+72a3 20407153 call bn_submod 
+72a4 da200638 arg mem_t3 ,rega 
+72a5 da400620 arg mem_t2 ,regb 
+72a6 d8a00620 arg mem_t2 ,contw 
+72a7 20407181 call bn_mulmod 
+72a8 da200620 arg mem_t2 ,rega 
+72a9 da4005f0 arg mem_t1 ,regb 
+72aa d8a00550 arg mem_cy ,contw 
+72ab 20407153 call bn_submod 
+72ac da200550 arg mem_cy ,rega 
+72ad da400748 arg mem_p ,regb 
+72ae d8a00550 arg mem_cy ,contw 
+72af 18002600 force 0 ,regc 
+72b0 6fe08550 fetch 1 ,mem_cy 
+72b1 2feffe00 isolate1 0 ,pdata 
+72b2 2040f10c call bn_add ,true 
+72b3 1a626000 copy regc ,alarm 
+72b4 da200550 arg mem_cy ,rega 
+72b5 20407128 call bn_rshift6 
+72b6 6fe08567 fetch 1 ,mem_cy5 
+72b7 2e0ffe00 isolate1 0 ,alarm 
+72b8 7920fe07 setflag true ,7 ,pdata 
+72b9 67e08567 store 1 ,mem_cy5 
+72ba 20600000 rtn 
+
+eckp_0:
+72bb 6fe084a5 fetch 1 ,mem_ec_loopc 
+72bc 1fe0ffff increase -1 ,pdata 
+72bd 24610000 nrtn positive 
+72be 67e084a5 store 1 ,mem_ec_loopc 
+72bf 6fe084a4 fetch 1 ,mem_ec_infinite 
+72c0 205a71fe call ecdbl ,blank 
+72c1 6fe084a5 fetch 1 ,mem_ec_loopc 
+72c2 d8c00580 arg mem_k ,contr 
+72c3 204070e7 call bn_testbit 
+72c4 2020f2bb branch eckp_0 ,true 
+72c5 6fe084a4 fetch 1 ,mem_ec_infinite 
+72c6 243a72c9 nbranch eckp_1 ,blank 
+72c7 2040724f call ecadd 
+72c8 202072bb branch eckp_0 
+
+eckp_1:
+72c9 7004a400 jam 0 ,mem_ec_infinite 
+72ca d8c004a8 arg mem_ax ,contr 
+72cb d8a00538 arg mem_cx ,contw 
+72cc 204070ed call ec_copy 
+72cd 202072bb branch eckp_0 
+
+ecunmapz:
+72ce da200568 arg mem_cz ,rega 
+72cf d8a00638 arg mem_t3 ,contw 
+72d0 204071b9 call bn_invmod 
+72d1 da200638 arg mem_t3 ,rega 
+72d2 d8a005f0 arg mem_t1 ,contw 
+72d3 204071a3 call bn_sqrmod 
+72d4 da200538 arg mem_cx ,rega 
+72d5 da4005f0 arg mem_t1 ,regb 
+72d6 d8a004f0 arg mem_bx ,contw 
+72d7 20407181 call bn_mulmod 
+72d8 da200638 arg mem_t3 ,rega 
+72d9 da4005f0 arg mem_t1 ,regb 
+72da d8a00620 arg mem_t2 ,contw 
+72db 20407181 call bn_mulmod 
+72dc da200550 arg mem_cy ,rega 
+72dd da400620 arg mem_t2 ,regb 
+72de d8a00508 arg mem_by ,contw 
+72df 20207181 branch bn_mulmod 
+
+sha_endian_swap2:
+72e0 efe20006 ifetch 4 ,contr 
+72e1 18002204 force 4 ,rega 
+72e2 18a08a03 increase 3 ,contw 
+
+sha_endian_loop:
+72e3 e7e08005 istore 1 ,contw 
+72e4 1fecfe00 rshift8 pdata ,pdata 
+72e5 18a08bfe increase -2 ,contw 
+72e6 1a20a3ff increase -1 ,rega 
+72e7 2422f2e3 nbranch sha_endian_loop ,zero 
+72e8 18a08a05 increase 5 ,contw 
+72e9 c20072e0 loop sha_endian_swap2 
+72ea 20600000 rtn 
+
+sha_getw:
+72eb 18ebfe00 lshift2 queue ,pdata 
+72ec 99608c00 iadd timeup ,contr 
+72ed efe20006 ifetch 4 ,contr 
+72ee 20600000 rtn 
+
+sha_r:
+72ef 18006010 force 16 ,alarm 
+72f0 d96004a8 arg memdat ,timeup 
+
+sha_r_loop:
+72f1 1e008ff9 add alarm ,-7 ,queue 
+72f2 204072eb call sha_getw 
+72f3 98000400 iforce temp 
+72f4 1e008ff0 add alarm ,-16 ,queue 
+72f5 204072eb call sha_getw 
+72f6 98408400 iadd temp ,temp 
+72f7 1e008ffe add alarm ,-2 ,queue 
+72f8 204072eb call sha_getw 
+72f9 1fee7e01 shasx pdata ,1 ,pdata 
+72fa 98408400 iadd temp ,temp 
+72fb 1e008ff1 add alarm ,-15 ,queue 
+72fc 204072eb call sha_getw 
+72fd 1fee7e00 shasx pdata ,0 ,pdata 
+72fe 98408400 iadd temp ,temp 
+72ff 1e0bfe00 lshift2 alarm ,pdata 
+7300 99608a00 iadd timeup ,contw 
+7301 e0420005 istoret 4 ,contw 
+7302 1e00e001 increase 1 ,alarm 
+7303 2e01fe40 compare 64 ,alarm ,0xff 
+7304 2420f2f1 nbranch sha_r_loop ,true 
+7305 20600000 rtn 
+
+sha_init:
+7306 d8c007c0 arg memh0 ,contr 
+7307 18007007 force 7 ,regext_index 
+
+sha_init_0:
+7308 efe20006 ifetch 4 ,contr 
+7309 98005e00 iforce regext 
+730a 1f00f1ff increase -1 ,regext_index 
+730b 20217308 branch sha_init_0 ,positive 
+730c 20600000 rtn 
+
+sha:
+730d 473ec02f bpatchx patch2f_5 ,mem_patch2f 
+730e 204072ef call sha_r 
+730f d8a005a8 arg memahbak ,contw 
+7310 18007000 force 0 ,regext_index 
+
+sha_0:
+7311 1de27e00 deposit regext 
+7312 e7e20005 istore 4 ,contw 
+7313 1f00f001 increase 1 ,regext_index 
+7314 2f01fe08 compare 8 ,regext_index ,0xff 
+7315 2420f311 nbranch sha_0 ,true 
+7316 20406e5e call enable_authrom 
+7317 d9609300 arg memk ,timeup 
+7318 de0004a8 arg memdat ,alarm 
+7319 18007240 force 64 ,loopcnt 
+
+sha_loop:
+731a e8420030 ifetcht 4 ,alarm 
+731b efe2000b ifetch 4 ,timeup 
+731c 19609604 increase 4 ,timeup 
+731d 1e00e004 increase 4 ,alarm 
+731e 9840fe00 iadd temp ,pdata 
+731f 18007007 force 7 ,regext_index 
+7320 9de08400 iadd regext ,temp 
+7321 18007004 force 4 ,regext_index 
+7322 1dee7e03 shasx regext ,3 ,pdata 
+7323 98408400 iadd temp ,temp 
+7324 18007005 force 5 ,regext_index 
+7325 1de27e00 deposit regext 
+7326 18007006 force 6 ,regext_index 
+7327 9de2fe00 ixor regext ,pdata 
+7328 18007004 force 4 ,regext_index 
+7329 9de17e00 iand regext ,pdata 
+732a 18007006 force 6 ,regext_index 
+732b 9de2fe00 ixor regext ,pdata 
+732c 98408400 iadd temp ,temp 
+732d 18007007 force 7 ,regext_index 
+732e 18425e00 copy temp ,regext 
+732f 18007003 force 3 ,regext_index 
+7330 1de27e00 deposit regext 
+7331 9840de00 iadd temp ,regext 
+7332 18007000 force 0 ,regext_index 
+7333 1de27e00 deposit regext 
+7334 18007001 force 1 ,regext_index 
+7335 9de10400 iand regext ,temp 
+7336 9de1fe00 ior regext ,pdata 
+7337 18007002 force 2 ,regext_index 
+7338 9de17e00 iand regext ,pdata 
+7339 98418400 ior temp ,temp 
+733a 18007000 force 0 ,regext_index 
+733b 1dee7e02 shasx regext ,2 ,pdata 
+733c 9840fe00 iadd temp ,pdata 
+733d 18007007 force 7 ,regext_index 
+733e 9de0de00 iadd regext ,regext 
+733f 980efc00 regexrot 
+7340 c200731a loop sha_loop 
+7341 d8c005a8 arg memahbak ,contr 
+7342 18007000 force 0 ,regext_index 
+
+sha_1:
+7343 efe20006 ifetch 4 ,contr 
+7344 9de0de00 iadd regext ,regext 
+7345 1f00f001 increase 1 ,regext_index 
+7346 2f01fe08 compare 8 ,regext_index ,0xff 
+7347 2420f343 nbranch sha_1 ,true 
+7348 20206e62 branch disable_authrom 
+
+sha_result:
+7349 d8a00900 arg memresult ,contw 
+734a 18007007 force 7 ,regext_index 
+
+sha_regext_save:
+734b 1de27e00 deposit regext 
+734c e7e20005 istore 4 ,contw 
+734d 1f00f1ff increase -1 ,regext_index 
+734e 2021734b branch sha_regext_save ,positive 
+734f 20600000 rtn 
+
+pad_xor:
+7350 d8a004a8 arg memdat ,contw 
+7351 18c08dfc increase -4 ,contr 
+7352 1f262210 sub loopcnt ,16 ,rega 
+
+pad_xor_0:
+7353 efe20006 ifetch 4 ,contr 
+7354 9842fe00 ixor temp ,pdata 
+7355 e7e20005 istore 4 ,contw 
+7356 18c08df8 increase -8 ,contr 
+7357 c2007353 loop pad_xor_0 
+7358 1a227200 copy rega ,loopcnt 
+7359 18427e00 deposit temp 
+
+pad_xor_1:
+735a e7e20005 istore 4 ,contw 
+735b c200735a loop pad_xor_1 
+735c 20600000 rtn 
+
+g_noninit_number_confirm:
+735d 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+735e c0017364 beq encapsulated_minor_type_p256 ,g_noninit_number_confirm_256 
+735f c000f361 beq encapsulated_minor_type_p192 ,g_noninit_number_confirm_192 
+7360 20600000 rtn 
+
+g_noninit_number_confirm_192:
+7361 20407369 call g_noninit0_192 
+7362 20407349 call sha_result 
+7363 2020738f branch g_common0 
+
+g_noninit_number_confirm_256:
+7364 204073a3 call g_noninit0_256 
+7365 20407349 call sha_result 
+7366 2020738f branch g_common0 
+
+g_noninit_192:
+7367 20407369 call g_noninit0_192 
+7368 2020738f branch g_common0 
+
+g_noninit0_192:
+7369 d8c008a0 arg mem_sp_pubkey_remote_x_end ,contr 
+736a d8a004a8 arg memdat ,contw 
+736b 18007206 force 6 ,loopcnt 
+736c 2040748d call memcpy_dword_swap 
+736d d8c0474f arg mem_sp_pubkey_local_x_end ,contr 
+736e 18007206 force 6 ,loopcnt 
+736f 2040748d call memcpy_dword_swap 
+7370 d8c00900 arg mem_sp_random_remote_end ,contr 
+7371 2040748c call memcpy_dword_swap4 
+7372 20407306 call sha_init 
+7373 2040730d call sha 
+7374 d8c008f0 arg mem_sp_random_local_end ,contr 
+7375 d8a004a8 arg memdat ,contw 
+7376 20207386 branch g_common_192 
+
+g_init_192:
+7377 d8c0474f arg mem_sp_pubkey_local_x_end ,contr 
+7378 d8a004a8 arg memdat ,contw 
+7379 18007206 force 6 ,loopcnt 
+737a 2040748d call memcpy_dword_swap 
+737b d8c008a0 arg mem_sp_pubkey_remote_x_end ,contr 
+737c 18007206 force 6 ,loopcnt 
+737d 2040748d call memcpy_dword_swap 
+737e d8c008f0 arg mem_sp_random_local_end ,contr 
+737f 2040748c call memcpy_dword_swap4 
+7380 20407306 call sha_init 
+7381 2040730d call sha 
+7382 d8c00900 arg mem_sp_random_remote_end ,contr 
+7383 d8a004a8 arg memdat ,contw 
+7384 20407386 call g_common_192 
+7385 2020738f branch g_common0 
+
+g_common_192:
+7386 2040748c call memcpy_dword_swap4 
+7387 58800000 setarg 0x800000 
+7388 1fed7e00 lshift8 pdata ,pdata 
+7389 e7e20005 istore 4 ,contw 
+738a 18007205 force 5 ,loopcnt 
+738b 20407d8c call memset0 
+738c 58000280 setarg 640 
+738d e7e20005 istore 4 ,contw 
+738e 2020730d branch sha 
+
+g_common0:
+738f 6fe20900 fetch 4 ,memresult 
+7390 da2003e8 arg 1000 ,rega 
+7391 9a26fc00 idiv rega 
+7392 20407e64 call wait_div_end 
+7393 18077e00 remainder pdata 
+7394 67e2087c store 4 ,mem_gkey 
+7395 1807fe00 quotient pdata 
+7396 da2003e8 arg 1000 ,rega 
+7397 9a26fc00 idiv rega 
+7398 20407e64 call wait_div_end 
+7399 18077e00 remainder pdata 
+739a da2003e8 arg 1000 ,rega 
+739b 9a2ffe00 imul32 rega ,pdata 
+739c 684a087c fetcht 4 ,mem_gkey 
+739d 9840fe00 iadd temp ,pdata 
+739e 67e2087c store 4 ,mem_gkey 
+739f 20600000 rtn 
+
+noninit_number_confirm:
+73a0 204073a3 call g_noninit0_256 
+73a1 20407349 call sha_result 
+73a2 2020738f branch g_common0 
+
+g_noninit0_256:
+73a3 d8c008a0 arg mem_le_pubkey_remote_x_256 + 32 ,contr 
+73a4 d8a004a8 arg memdat ,contw 
+73a5 18007208 force 8 ,loopcnt 
+73a6 2040748d call memcpy_dword_swap 
+73a7 d8c046ff arg mem_sc_pubkey_local_x_256 + 32 ,contr 
+73a8 18007208 force 8 ,loopcnt 
+73a9 2040748d call memcpy_dword_swap 
+73aa 20407306 call sha_init 
+73ab 2040730d call sha 
+73ac d8c00900 arg mem_sp_random_remote_end ,contr 
+73ad d8a004a8 arg memdat ,contw 
+73ae 2040748c call memcpy_dword_swap4 
+73af d8c008f0 arg mem_sp_random_local_end ,contr 
+73b0 202073b1 branch g_common_256 
+
+g_common_256:
+73b1 2040748c call memcpy_dword_swap4 
+73b2 58800000 setarg 0x800000 
+73b3 1fed7e00 lshift8 pdata ,pdata 
+73b4 e7e20005 istore 4 ,contw 
+73b5 18007203 force 3 ,loopcnt 
+73b6 20407d8c call memset0 
+73b7 58000300 setarg 768 
+73b8 e7e20005 istore 4 ,contw 
+73b9 2020730d branch sha 
+
+function_f1_192_no_key:
+73ba 70477100 jam 0 ,mem_passkey_1bit 
+73bb 202073be branch function_f1_192_common 
+
+function_f1_192:
+73bc 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+73bd c08173ba bne ssp_mode_passkey_entry_flag ,function_f1_192_no_key 
+
+function_f1_192_common:
+73be 473f402f bpatchx patch2f_6 ,mem_patch2f 
+73bf 58363636 setarg 0x363636 
+73c0 1fed0400 lshift8 pdata ,temp 
+73c1 18418436 or_into 0x36 ,temp 
+73c2 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+73c3 1fe20c00 copy pdata ,contr 
+73c4 18007204 force 4 ,loopcnt 
+73c5 20407350 call pad_xor 
+73c6 20407306 call sha_init 
+73c7 2040730d call sha 
+73c8 6fe10942 fetch 2 ,mem_sp_prarm_stack + 2 
+73c9 1fe20c00 copy pdata ,contr 
+73ca d8a004a8 arg memdat ,contw 
+73cb 18007206 force 6 ,loopcnt 
+73cc 2040748d call memcpy_dword_swap 
+73cd 6fe10944 fetch 2 ,mem_sp_prarm_stack + 4 
+73ce 1fe20c00 copy pdata ,contr 
+73cf 18007206 force 6 ,loopcnt 
+73d0 2040748d call memcpy_dword_swap 
+73d1 58800000 setarg 0x800000 
+73d2 e7e18005 istore 3 ,contw 
+73d3 6fe0c771 fetch 1 ,mem_passkey_1bit 
+73d4 e7e08005 istore 1 ,contw 
+73d5 18007e00 force 0 ,pdata 
+73d6 e7e40005 istore 8 ,contw 
+73d7 58000388 setarg 0x0388 
+73d8 e7e20005 istore 4 ,contw 
+
+function_f1_common2:
+73d9 2040730d call sha 
+73da 20407349 call sha_result 
+73db d8c00900 arg memresult ,contr 
+73dc d8a005c8 arg memahsave ,contw 
+73dd 20407d7d call memcpy32 
+73de 585c5c5c setarg 0x5c5c5c 
+73df 1fed0400 lshift8 pdata ,temp 
+73e0 1841845c or_into 0x5c ,temp 
+73e1 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+73e2 1fe20c00 copy pdata ,contr 
+73e3 18007204 force 4 ,loopcnt 
+73e4 20407350 call pad_xor 
+73e5 20407306 call sha_init 
+73e6 2040730d call sha 
+73e7 d8c005e8 arg memahsave_end ,contr 
+73e8 d8a004a8 arg memdat ,contw 
+73e9 18007208 force 8 ,loopcnt 
+73ea 2040748d call memcpy_dword_swap 
+73eb 58800000 setarg 0x800000 
+73ec 1fed7e00 lshift8 pdata ,pdata 
+73ed e7e20005 istore 4 ,contw 
+73ee 20407d8b call bn_zero 
+73ef 58000300 setarg 0x0300 
+73f0 e7e20005 istore 4 ,contw 
+73f1 2040730d call sha 
+73f2 20207349 branch sha_result 
+
+function_f2_192:
+73f3 58363636 setarg 0x363636 
+73f4 1fed0400 lshift8 pdata ,temp 
+73f5 18418436 or_into 0x36 ,temp 
+73f6 d8c008e0 arg mem_sp_dhkey_end ,contr 
+73f7 18007206 force 6 ,loopcnt 
+73f8 20407350 call pad_xor 
+73f9 20407306 call sha_init 
+73fa 2040730d call sha 
+73fb 6fe1094c fetch 2 ,mem_sp_prarm_stack + 12 
+73fc 1fe20c00 copy pdata ,contr 
+73fd d8a004a8 arg memdat ,contw 
+73fe 2040748c call memcpy_dword_swap4 
+73ff 6fe1094e fetch 2 ,mem_sp_prarm_stack + 14 
+7400 1fe20c00 copy pdata ,contr 
+7401 2040748c call memcpy_dword_swap4 
+7402 5862746c setarg 0x62746c 
+7403 1fed7e00 lshift8 pdata ,pdata 
+7404 1fe1fe6b or_into 0x6b ,pdata 
+7405 e7e20005 istore 4 ,contw 
+7406 d8c005f5 arg mem_addr_value_end ,contr 
+7407 18007203 force 3 ,loopcnt 
+7408 2040748d call memcpy_dword_swap 
+7409 58800000 setarg 0x800000 
+740a 1fed7e00 lshift8 pdata ,pdata 
+740b e7e20005 istore 4 ,contw 
+740c 18007e00 force 0 ,pdata 
+740d e7e40005 istore 8 ,contw 
+740e 58000380 setarg 0x0380 
+740f e7e20005 istore 4 ,contw 
+7410 2040730d call sha 
+7411 20407349 call sha_result 
+7412 d8c00900 arg memresult ,contr 
+7413 d8a005c8 arg memahsave ,contw 
+7414 20407d7d call memcpy32 
+7415 585c5c5c setarg 0x5c5c5c 
+7416 1fed0400 lshift8 pdata ,temp 
+7417 1841845c or_into 0x5c ,temp 
+7418 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7419 18007206 force 6 ,loopcnt 
+741a 20407350 call pad_xor 
+741b 20407306 call sha_init 
+741c 2040730d call sha 
+741d d8c005e8 arg memahsave_end ,contr 
+741e d8a004a8 arg memdat ,contw 
+741f 18007208 force 8 ,loopcnt 
+7420 2040748d call memcpy_dword_swap 
+7421 58800000 setarg 0x800000 
+7422 1fed7e00 lshift8 pdata ,pdata 
+7423 e7e20005 istore 4 ,contw 
+7424 20407d8b call bn_zero 
+7425 58000300 setarg 0x0300 
+7426 e7e20005 istore 4 ,contw 
+7427 2040730d call sha 
+7428 20207349 branch sha_result 
+
+function_f3a_192:
+7429 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+742a c081743a bne ssp_mode_passkey_entry_flag ,function_f3a_no_pin 
+
+function_f3a_common:
+742b 473fc02f bpatchx patch2f_7 ,mem_patch2f 
+742c 58363636 setarg 0x363636 
+742d 1fed0400 lshift8 pdata ,temp 
+742e 18418436 or_into 0x36 ,temp 
+742f d8c008e0 arg mem_sp_dhkey_end ,contr 
+7430 18007206 force 6 ,loopcnt 
+7431 20407350 call pad_xor 
+7432 20407306 call sha_init 
+7433 2040730d call sha 
+7434 d8c00900 arg mem_sp_random_remote_end ,contr 
+7435 d8a004a8 arg memdat ,contw 
+7436 2040748c call memcpy_dword_swap4 
+7437 d8c008f0 arg mem_sp_random_local_end ,contr 
+7438 2040748c call memcpy_dword_swap4 
+7439 2020744f branch function_f3_common 
+
+function_f3a_no_pin:
+743a 58000000 setarg 0 
+743b 67e24797 store 4 ,mem_pin 
+743c 2020742b branch function_f3a_common 
+
+function_f3b_no_pin:
+743d 58000000 setarg 0 
+743e 67e24797 store 4 ,mem_pin 
+743f 20207442 branch function_f3b_common 
+
+function_f3b_192:
+7440 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+7441 c081743d bne ssp_mode_passkey_entry_flag ,function_f3b_no_pin 
+
+function_f3b_common:
+7442 58363636 setarg 0x363636 
+7443 1fed0400 lshift8 pdata ,temp 
+7444 18418436 or_into 0x36 ,temp 
+7445 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7446 18007206 force 6 ,loopcnt 
+7447 20407350 call pad_xor 
+7448 20407306 call sha_init 
+7449 2040730d call sha 
+744a d8c008f0 arg mem_sp_random_local_end ,contr 
+744b d8a004a8 arg memdat ,contw 
+744c 2040748c call memcpy_dword_swap4 
+744d d8c00900 arg mem_sp_random_remote_end ,contr 
+744e 2040748c call memcpy_dword_swap4 
+
+function_f3_common:
+744f 58000000 setarg 0x0 
+7450 e7e40005 istore 8 ,contw 
+7451 e7e20005 istore 4 ,contw 
+7452 6fe24797 fetch 4 ,mem_pin 
+7453 e7e20005 istore 4 ,contw 
+7454 18a20400 copy contw ,temp 
+7455 7005e880 jam 0x80 ,mem_addr_padding 
+7456 18420a00 copy temp ,contw 
+7457 d8c005f8 arg mem_addr_iocap_end ,contr 
+7458 2040748c call memcpy_dword_swap4 
+7459 2040730d call sha 
+745a d8a004a8 arg memdat ,contw 
+745b 18007207 force 7 ,loopcnt 
+745c 20407d8c call memset0 
+745d e7e20005 istore 4 ,contw 
+745e 580003f8 setarg 0x03F8 
+745f e7e20005 istore 4 ,contw 
+7460 2040730d call sha 
+7461 20407349 call sha_result 
+7462 d8c00900 arg memresult ,contr 
+7463 d8a005c8 arg memahsave ,contw 
+7464 20407d7d call memcpy32 
+7465 585c5c5c setarg 0x5c5c5c 
+7466 1fed0400 lshift8 pdata ,temp 
+7467 1841845c or_into 0x5c ,temp 
+7468 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7469 18007206 force 6 ,loopcnt 
+746a 20407350 call pad_xor 
+746b 20407306 call sha_init 
+746c 2040730d call sha 
+746d d8c005e8 arg memahsave_end ,contr 
+746e d8a004a8 arg memdat ,contw 
+746f 18007208 force 8 ,loopcnt 
+7470 2040748d call memcpy_dword_swap 
+7471 58800000 setarg 0x800000 
+7472 1fed7e00 lshift8 pdata ,pdata 
+7473 e7e20005 istore 4 ,contw 
+7474 20407d8b call bn_zero 
+7475 58000300 setarg 0x0300 
+7476 e7e20005 istore 4 ,contw 
+7477 2040730d call sha 
+7478 20207349 branch sha_result 
+
+eckp_calc_init:
+7479 7004a5c0 jam 192 ,mem_ec_loopc 
+
+eckp_calc_init_1:
+747a 6fe084a5 fetch 1 ,mem_ec_loopc 
+747b 207a0000 rtn blank 
+747c 1fe0ffff increase -1 ,pdata 
+747d 67e084a5 store 1 ,mem_ec_loopc 
+747e d8c00580 arg mem_k ,contr 
+747f 204070e7 call bn_testbit 
+7480 2020f47a branch eckp_calc_init_1 ,true 
+7481 d8c004a8 arg mem_ax ,contr 
+7482 d8a00538 arg mem_cx ,contw 
+7483 202070ed branch ec_copy 
+
+eckp_calc:
+7484 204071fe call ecdbl 
+7485 6fe084a5 fetch 1 ,mem_ec_loopc 
+7486 1fe0ffff increase -1 ,pdata 
+7487 67e084a5 store 1 ,mem_ec_loopc 
+7488 d8c00580 arg mem_k ,contr 
+7489 204070e7 call bn_testbit 
+748a 20608000 rtn true 
+748b 2020724f branch ecadd 
+
+memcpy_dword_swap4:
+748c 18007204 force 4 ,loopcnt 
+
+memcpy_dword_swap:
+748d 18c08dfc increase -4 ,contr 
+
+memcpy_dword_swap_loop:
+748e efe20006 ifetch 4 ,contr 
+748f e7e20005 istore 4 ,contw 
+7490 18c08df8 increase -8 ,contr 
+7491 c200748e loop memcpy_dword_swap_loop 
+7492 20600000 rtn 
+
+function_f1_no_key_256:
+7493 70477100 jam 0 ,mem_passkey_1bit 
+7494 20207497 branch function_f1_common_256 
+
+function_f1_256:
+7495 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+7496 c0817493 bne ssp_mode_passkey_entry_flag ,function_f1_no_key_256 
+
+function_f1_common_256:
+7497 58363636 setarg 0x363636 
+7498 1fed0400 lshift8 pdata ,temp 
+7499 18418436 or_into 0x36 ,temp 
+749a 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+749b 1fe20c00 copy pdata ,contr 
+749c 18007204 force 4 ,loopcnt 
+749d 20407350 call pad_xor 
+749e 20407306 call sha_init 
+749f 2040730d call sha 
+74a0 6fe10942 fetch 2 ,mem_sp_prarm_stack + 2 
+74a1 1fe20c00 copy pdata ,contr 
+74a2 d8a004a8 arg memdat ,contw 
+74a3 18007208 force 8 ,loopcnt 
+74a4 2040748d call memcpy_dword_swap 
+74a5 6fe10944 fetch 2 ,mem_sp_prarm_stack + 4 
+74a6 1fe20c00 copy pdata ,contr 
+74a7 18007208 force 8 ,loopcnt 
+74a8 2040748d call memcpy_dword_swap 
+74a9 2040730d call sha 
+74aa d8a004a8 arg memdat ,contw 
+74ab 58800000 setarg 0x800000 
+74ac e7e18005 istore 3 ,contw 
+74ad 6fe0c771 fetch 1 ,mem_passkey_1bit 
+74ae e7e08005 istore 1 ,contw 
+74af df200007 arg 7 ,loopcnt 
+74b0 20407d8c call memset0 
+74b1 58000408 setarg 0x0408 
+74b2 e7e20005 istore 4 ,contw 
+74b3 202073d9 branch function_f1_common2 
+
+function_f3a:
+74b4 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+74b5 c00174b8 beq encapsulated_minor_type_p256 ,function_f3a_256 
+74b6 c000f429 beq encapsulated_minor_type_p192 ,function_f3a_192 
+74b7 20600000 rtn 
+
+function_f3a_256:
+74b8 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+74b9 c08174f1 bne ssp_mode_passkey_entry_flag ,function_f3a_no_pin_256 
+
+function_f3a_common_256:
+74ba 58363636 setarg 0x363636 
+74bb 1fed0400 lshift8 pdata ,temp 
+74bc 18418436 or_into 0x36 ,temp 
+74bd d8c008e0 arg mem_sp_dhkey_end ,contr 
+74be 18007208 force 8 ,loopcnt 
+74bf 20407350 call pad_xor 
+74c0 20407306 call sha_init 
+74c1 2040730d call sha 
+74c2 d8c00900 arg mem_sp_random_remote_end ,contr 
+74c3 d8a004a8 arg memdat ,contw 
+74c4 2040748c call memcpy_dword_swap4 
+74c5 d8c008f0 arg mem_sp_random_local_end ,contr 
+74c6 2040748c call memcpy_dword_swap4 
+
+function_f3_common_256:
+74c7 58000000 setarg 0x0 
+74c8 e7e40005 istore 8 ,contw 
+74c9 e7e20005 istore 4 ,contw 
+74ca 6fe24797 fetch 4 ,mem_pin 
+74cb e7e20005 istore 4 ,contw 
+74cc 18a20400 copy contw ,temp 
+74cd 7005e880 jam 0x80 ,mem_addr_padding 
+74ce 18420a00 copy temp ,contw 
+74cf d8c005f8 arg mem_addr_iocap_end ,contr 
+74d0 2040748c call memcpy_dword_swap4 
+74d1 2040730d call sha 
+74d2 d8a004a8 arg memdat ,contw 
+74d3 18007207 force 7 ,loopcnt 
+74d4 20407d8c call memset0 
+74d5 e7e20005 istore 4 ,contw 
+74d6 580003f8 setarg 0x03F8 
+74d7 e7e20005 istore 4 ,contw 
+74d8 2040730d call sha 
+74d9 20407349 call sha_result 
+74da d8c00900 arg memresult ,contr 
+74db d8a005c8 arg memahsave ,contw 
+74dc 20407d7d call memcpy32 
+74dd 585c5c5c setarg 0x5c5c5c 
+74de 1fed0400 lshift8 pdata ,temp 
+74df 1841845c or_into 0x5c ,temp 
+74e0 d8c008e0 arg mem_sp_dhkey_end ,contr 
+74e1 18007208 force 8 ,loopcnt 
+
+sha_end_common:
+74e2 20407350 call pad_xor 
+74e3 20407306 call sha_init 
+74e4 2040730d call sha 
+74e5 d8c005e8 arg memahsave_end ,contr 
+74e6 d8a004a8 arg memdat ,contw 
+74e7 18007208 force 8 ,loopcnt 
+74e8 2040748d call memcpy_dword_swap 
+74e9 58800000 setarg 0x800000 
+74ea 1fed7e00 lshift8 pdata ,pdata 
+74eb e7e20005 istore 4 ,contw 
+74ec 20407d8b call bn_zero 
+74ed 58000300 setarg 0x0300 
+74ee e7e20005 istore 4 ,contw 
+74ef 2040730d call sha 
+74f0 20207349 branch sha_result 
+
+function_f3a_no_pin_256:
+74f1 58000000 setarg 0 
+74f2 67e24797 store 4 ,mem_pin 
+74f3 202074ba branch function_f3a_common_256 
+
+function_f3b_no_pin_256:
+74f4 58000000 setarg 0 
+74f5 67e24797 store 4 ,mem_pin 
+74f6 202074fd branch function_f3b_common_256 
+
+function_f3b:
+74f7 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+74f8 c00174fb beq encapsulated_minor_type_p256 ,function_f3b_256 
+74f9 c000f440 beq encapsulated_minor_type_p192 ,function_f3b_192 
+74fa 20600000 rtn 
+
+function_f3b_256:
+74fb 6fe0c76f fetch 1 ,mem_ssp_mode_flag 
+74fc c08174f4 bne ssp_mode_passkey_entry_flag ,function_f3b_no_pin_256 
+
+function_f3b_common_256:
+74fd 58363636 setarg 0x363636 
+74fe 1fed0400 lshift8 pdata ,temp 
+74ff 18418436 or_into 0x36 ,temp 
+7500 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7501 18007208 force 8 ,loopcnt 
+7502 20407350 call pad_xor 
+7503 20407306 call sha_init 
+7504 2040730d call sha 
+7505 d8c008f0 arg mem_sp_random_local_end ,contr 
+7506 d8a004a8 arg memdat ,contw 
+7507 2040748c call memcpy_dword_swap4 
+7508 d8c00900 arg mem_sp_random_remote_end ,contr 
+7509 2040748c call memcpy_dword_swap4 
+750a 202074c7 branch function_f3_common_256 
+
+function_f2:
+750b 6fe0c648 fetch 1 ,mem_encapsulated_minor_type 
+750c c001750f beq encapsulated_minor_type_p256 ,function_f2_256 
+750d c000f3f3 beq encapsulated_minor_type_p192 ,function_f2_192 
+750e 20600000 rtn 
+
+function_f2_256:
+750f 58363636 setarg 0x363636 
+7510 1fed0400 lshift8 pdata ,temp 
+7511 18418436 or_into 0x36 ,temp 
+7512 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7513 18007208 force 8 ,loopcnt 
+7514 20407350 call pad_xor 
+7515 20407306 call sha_init 
+7516 2040730d call sha 
+7517 6fe1094c fetch 2 ,mem_sp_prarm_stack + 12 
+7518 1fe20c00 copy pdata ,contr 
+7519 d8a004a8 arg memdat ,contw 
+751a 2040748c call memcpy_dword_swap4 
+751b 6fe1094e fetch 2 ,mem_sp_prarm_stack + 14 
+751c 1fe20c00 copy pdata ,contr 
+751d 2040748c call memcpy_dword_swap4 
+751e 5862746c setarg 0x62746c 
+751f 1fed7e00 lshift8 pdata ,pdata 
+7520 1fe1fe6b or_into 0x6b ,pdata 
+7521 e7e20005 istore 4 ,contw 
+7522 d8c005f5 arg mem_addr_value_end ,contr 
+7523 18007203 force 3 ,loopcnt 
+7524 2040748d call memcpy_dword_swap 
+7525 58800000 setarg 0x800000 
+7526 1fed7e00 lshift8 pdata ,pdata 
+7527 e7e20005 istore 4 ,contw 
+7528 18007e00 force 0 ,pdata 
+7529 e7e40005 istore 8 ,contw 
+752a 58000380 setarg 0x0380 
+752b e7e20005 istore 4 ,contw 
+752c 2040730d call sha 
+752d 20407349 call sha_result 
+752e d8c00900 arg memresult ,contr 
+752f d8a005c8 arg memahsave ,contw 
+7530 20407d7d call memcpy32 
+7531 585c5c5c setarg 0x5c5c5c 
+7532 1fed0400 lshift8 pdata ,temp 
+7533 1841845c or_into 0x5c ,temp 
+7534 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7535 18007208 force 8 ,loopcnt 
+7536 202074e2 branch sha_end_common 
+
+function_h3:
+7537 6fe340a8 fetch 6 ,mem_lap 
+7538 67e305e9 store 6 ,mem_addr_value 
+7539 6fe30040 fetch 6 ,mem_plap 
+753a e7e30005 istore 6 ,contw 
+753b 58363636 setarg 0x363636 
+753c 1fed0400 lshift8 pdata ,temp 
+753d 18418436 or_into 0x36 ,temp 
+753e d8c041db arg mem_link_key + 16 ,contr 
+753f 18007204 force 4 ,loopcnt 
+7540 20407350 call pad_xor 
+7541 20407306 call sha_init 
+7542 2040730d call sha 
+7543 58627461 setarg 0x627461 
+7544 1fed7e00 lshift8 pdata ,pdata 
+7545 1fe1fe6b or_into 0x6b ,pdata 
+7546 67e204a8 store 4 ,memdat 
+7547 d8c005f5 arg mem_addr_value + 12 ,contr 
+7548 18007203 force 3 ,loopcnt 
+7549 2040748d call memcpy_dword_swap 
+754a d8c046b5 arg mem_ccm_iv + 8 ,contr 
+754b df200002 arg 2 ,loopcnt 
+754c 2040748d call memcpy_dword_swap 
+754d 58800000 setarg 0x800000 
+754e 1fed7e00 lshift8 pdata ,pdata 
+754f e7e20005 istore 4 ,contw 
+7550 df200004 arg 4 ,loopcnt 
+7551 20407d8c call memset0 
+7552 580002c0 setarg 704 
+7553 e7e20005 istore 4 ,contw 
+7554 2040730d call sha 
+7555 20407349 call sha_result 
+7556 d8c00900 arg memresult ,contr 
+7557 d8a005c8 arg memahsave ,contw 
+7558 20407d7d call memcpy32 
+7559 585c5c5c setarg 0x5c5c5c 
+755a 1fed0400 lshift8 pdata ,temp 
+755b 1841845c or_into 0x5c ,temp 
+755c d8c041db arg mem_link_key + 16 ,contr 
+755d 18007204 force 4 ,loopcnt 
+755e 202074e2 branch sha_end_common 
+
+function_h4:
+755f 6fe340a8 fetch 6 ,mem_lap 
+7560 67e305e9 store 6 ,mem_addr_value 
+7561 6fe30040 fetch 6 ,mem_plap 
+7562 e7e30005 istore 6 ,contw 
+7563 58363636 setarg 0x363636 
+7564 1fed0400 lshift8 pdata ,temp 
+7565 18418436 or_into 0x36 ,temp 
+7566 d8c041db arg mem_link_key + 16 ,contr 
+7567 18007204 force 4 ,loopcnt 
+7568 20407350 call pad_xor 
+7569 20407306 call sha_init 
+756a 2040730d call sha 
+756b 58627464 setarg 0x627464 
+756c 1fed7e00 lshift8 pdata ,pdata 
+756d 1fe1fe6b or_into 0x6b ,pdata 
+756e 67e204a8 store 4 ,memdat 
+756f d8c005f5 arg mem_addr_value + 12 ,contr 
+7570 18007203 force 3 ,loopcnt 
+7571 2040748d call memcpy_dword_swap 
+7572 58800000 setarg 0x800000 
+7573 1fed7e00 lshift8 pdata ,pdata 
+7574 e7e20005 istore 4 ,contw 
+7575 df200005 arg 5 ,loopcnt 
+7576 20407d8c call memset0 
+7577 58000280 setarg 640 
+7578 e7e20005 istore 4 ,contw 
+7579 2040730d call sha 
+757a 20407349 call sha_result 
+757b d8c00900 arg memresult ,contr 
+757c d8a005c8 arg memahsave ,contw 
+757d 20407d7d call memcpy32 
+757e 585c5c5c setarg 0x5c5c5c 
+757f 1fed0400 lshift8 pdata ,temp 
+7580 1841845c or_into 0x5c ,temp 
+7581 d8c041db arg mem_link_key + 16 ,contr 
+7582 18007204 force 4 ,loopcnt 
+7583 202074e2 branch sha_end_common 
+
+function_h5:
+7584 d8c00910 arg mem_sp_calc_result_high ,contr 
+7585 d8a00454 arg mem_input_store ,contw 
+7586 20407d7f call memcpy16 
+7587 58000900 setarg mem_sp_random_remote + 16 
+7588 67e10940 store 2 ,mem_sp_prarm_stack 
+7589 58000434 setarg mem_random_number + 16 
+758a e7e10005 istore 2 ,contw 
+758b 58363636 setarg 0x363636 
+758c 1fed0400 lshift8 pdata ,temp 
+758d 18418436 or_into 0x36 ,temp 
+758e d8c00464 arg mem_input_store + 16 ,contr 
+758f 18007204 force 4 ,loopcnt 
+7590 20407350 call pad_xor 
+7591 20407306 call sha_init 
+7592 2040730d call sha 
+7593 d8a004a8 arg memdat ,contw 
+7594 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+7595 1fe20c00 copy pdata ,contr 
+7596 2040748c call memcpy_dword_swap4 
+7597 6fe10942 fetch 2 ,mem_sp_prarm_stack + 2 
+7598 1fe20c00 copy pdata ,contr 
+7599 2040748c call memcpy_dword_swap4 
+759a 58800000 setarg 0x800000 
+759b 1fed7e00 lshift8 pdata ,pdata 
+759c e7e20005 istore 4 ,contw 
+759d df200003 arg 3 ,loopcnt 
+759e 20407d8c call memset0 
+759f 58000300 setarg 768 
+75a0 e7e20005 istore 4 ,contw 
+75a1 2040730d call sha 
+75a2 20407349 call sha_result 
+75a3 d8c00900 arg memresult ,contr 
+75a4 d8a005c8 arg memahsave ,contw 
+75a5 20407d7d call memcpy32 
+75a6 585c5c5c setarg 0x5c5c5c 
+75a7 1fed0400 lshift8 pdata ,temp 
+75a8 1841845c or_into 0x5c ,temp 
+75a9 d8c00464 arg mem_input_store + 16 ,contr 
+75aa 18007204 force 4 ,loopcnt 
+75ab 202074e2 branch sha_end_common 
+
+sp_initialize_256:
+75ac 47404030 bpatchx patch30_0 ,mem_patch30 
+75ad 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+75ae 243a75cd nbranch sp_pubkey_calc_256 ,blank 
+
+sc_reset:
+75af 7046bd00 jam sp_calc_standby ,mem_sc_calc 
+75b0 7046be00 jam sp_key_invalid ,mem_sc_local_key_invalid 
+75b1 20600000 rtn 
+
+sp_wait_pubkey_calc_256_done:
+75b2 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+75b3 207a0000 rtn blank 
+75b4 6fe0c6be fetch 1 ,mem_sc_local_key_invalid 
+75b5 c1018000 rtneq sp_key_valid_256 
+75b6 20407602 call sp_calc_sequence_256 
+75b7 202075b2 branch sp_wait_pubkey_calc_256_done 
+
+sp_debug_private_256:
+75b8 d8a046bf arg mem_sc_private_key_256 ,contw 
+75b9 38001abd setsect 0 ,0x1abd 
+75ba 3805b34f setsect 1 ,0x1b34f 
+75bb 38099b8a setsect 2 ,0x19b8a 
+75bc 380e6562 setsect 3 ,0x26562 
+75bd e7e48005 istore 9 ,contw 
+75be 380340b7 setsect 0 ,0x340b7 
+75bf 38041efa setsect 1 ,0x1efa 
+75c0 3808aff6 setsect 2 ,0xaff6 
+75c1 380cfd41 setsect 3 ,0xfd41 
+75c2 e7e48005 istore 9 ,contw 
+75c3 3803d210 setsect 0 ,0x3d210 
+75c4 38066cf8 setsect 1 ,0x26cf8 
+75c5 380b874c setsect 2 ,0x3874c 
+75c6 380f157c setsect 3 ,0x3157c 
+75c7 e7e48005 istore 9 ,contw 
+75c8 3802d4a3 setsect 0 ,0x2d4a3 
+75c9 3807d27d setsect 1 ,0x3d27d 
+75ca 38080003 setsect 2 ,0x3 
+75cb e7e28005 istore 5 ,contw 
+75cc 20600000 rtn 
+
+sp_pubkey_calc_256:
+75cd 6fe0c6be fetch 1 ,mem_sc_local_key_invalid 
+75ce c1800000 rtnne sp_key_invalid 
+75cf 6fe0c6bd fetch 1 ,mem_sc_calc 
+75d0 c1800000 rtnne sp_calc_standby 
+75d1 20406ebd call init_memp_256 
+75d2 d8a046bf arg mem_sc_private_key_256 ,contw 
+75d3 18000e0f force 15 ,queue 
+75d4 2040709d call random_generator 
+75d5 180a7e00 random pdata 
+75d6 1fe37e00 rshift pdata ,pdata 
+75d7 e7e10005 istore 2 ,contw 
+75d8 6fe0c6ba fetch 1 ,mem_sp_debug_mode 
+75d9 245a75b8 ncall sp_debug_private_256 ,blank 
+75da d8a00628 arg mem_k_256 ,contw 
+75db d8c046bf arg mem_sc_private_key_256 ,contr 
+75dc 20407d7d call memcpy32 
+75dd d8a00508 arg mem_ax_256 ,contw 
+75de d8c00820 arg mem_gx_256 ,contr 
+75df 20407d72 call memcpy64 
+75e0 d8a00548 arg mem_az_256 ,contw 
+75e1 20407d97 call clear_mem_256 
+75e2 70054801 jam 1 ,mem_az_256 
+75e3 2040761a call eckp_calc_init_256 
+75e4 7046bd03 jam sp_calc_pubkey_256 ,mem_sc_calc 
+75e5 20600000 rtn 
+
+sp_pubkey_generated_256:
+75e6 d8a046df arg mem_sc_pubkey_local_x_256 ,contw 
+75e7 d8c00568 arg mem_bx_256 ,contr 
+75e8 20407d72 call memcpy64 
+75e9 7046be03 jam sp_key_valid_256 ,mem_sc_local_key_invalid 
+75ea 7046bd00 jam sp_calc_standby ,mem_sc_calc 
+75eb 20600000 rtn 
+
+sp_dhkey_calc_256:
+75ec 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+75ed c1800000 rtnne sp_key_invalid 
+75ee 6fe0c6bd fetch 1 ,mem_sc_calc 
+75ef c1800000 rtnne sp_calc_standby 
+75f0 d8a00628 arg mem_k_256 ,contw 
+75f1 d8c046bf arg mem_sc_private_key_256 ,contr 
+75f2 20407d7d call memcpy32 
+75f3 d8a00508 arg mem_ax_256 ,contw 
+75f4 d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+75f5 20407d72 call memcpy64 
+75f6 d8a00548 arg mem_az_256 ,contw 
+75f7 20407d97 call clear_mem_256 
+75f8 70054801 jam 1 ,mem_az_256 
+75f9 2040761a call eckp_calc_init_256 
+75fa 7046bd04 jam sp_calc_dhkey_256 ,mem_sc_calc 
+75fb 20600000 rtn 
+
+sp_dhkey_generated_256:
+75fc d8a008c0 arg mem_le_dhkey_256 ,contw 
+75fd d8c00568 arg mem_bx_256 ,contr 
+75fe 20407d7d call memcpy32 
+75ff 70087b03 jam sp_key_valid_256 ,mem_sp_dhkey_invalid 
+7600 7046bd00 jam sp_calc_standby ,mem_sc_calc 
+7601 20600000 rtn 
+
+sp_calc_sequence_256:
+7602 6fe0c6bb fetch 1 ,mem_secure_connections_enable 
+7603 207a0000 rtn blank 
+7604 6fe0c6bd fetch 1 ,mem_sc_calc 
+7605 207a0000 rtn blank 
+7606 1fe0fe80 increase 0x80 ,pdata 
+7607 67e0c6bd store 1 ,mem_sc_calc 
+7608 c3838000 rtnbit1 7 
+7609 6fe104a5 fetch 2 ,mem_ec_loopc 
+760a 203a760c branch sp_calc_sequence_done_256 ,blank 
+760b 20207612 branch eckp_calc_256 
+
+sp_calc_sequence_done_256:
+760c 4740c030 bpatchx patch30_1 ,mem_patch30 
+760d 20407627 call ecunmapz_256 
+760e 6fe0c6bd fetch 1 ,mem_sc_calc 
+760f c001f5e6 beq sp_calc_pubkey_256 ,sp_pubkey_generated_256 
+7610 c00275fc beq sp_calc_dhkey_256 ,sp_dhkey_generated_256 
+7611 20600000 rtn 
+
+eckp_calc_256:
+7612 20407639 call ecdbl_256 
+7613 6fe104a5 fetch 2 ,mem_ec_loopc 
+7614 1fe0ffff increase -1 ,pdata 
+7615 67e104a5 store 2 ,mem_ec_loopc 
+7616 d8c00628 arg mem_k_256 ,contr 
+7617 204070e7 call bn_testbit 
+7618 20608000 rtn true 
+7619 2020768a branch ecadd_256 
+
+eckp_calc_init_256:
+761a 47414030 bpatchx patch30_2 ,mem_patch30 
+761b 58000100 setarg 256 
+761c 67e104a5 store 2 ,mem_ec_loopc 
+
+eckp_calc_init_256_1:
+761d 6fe104a5 fetch 2 ,mem_ec_loopc 
+761e 207a0000 rtn blank 
+761f 1fe0ffff increase -1 ,pdata 
+7620 67e104a5 store 2 ,mem_ec_loopc 
+7621 d8c00628 arg mem_k_256 ,contr 
+7622 204070e7 call bn_testbit 
+7623 2020f61d branch eckp_calc_init_256_1 ,true 
+7624 d8c00508 arg mem_ax_256 ,contr 
+7625 d8a005c8 arg mem_cx_256 ,contw 
+7626 20207d71 branch memcpy96 
+
+ecunmapz_256:
+7627 da200608 arg mem_cz_256 ,rega 
+7628 d8a00708 arg mem_t3_256 ,contw 
+7629 204076f6 call bn_invmod_256 
+762a da200708 arg mem_t3_256 ,rega 
+762b d8a006a8 arg mem_t1_256 ,contw 
+762c 204077cc call bn_sqrmod_256 
+762d da2005c8 arg mem_cx_256 ,rega 
+762e da4006a8 arg mem_t1_256 ,regb 
+762f d8a00568 arg mem_bx_256 ,contw 
+7630 20407734 call bn_mulmod_256 
+7631 da200708 arg mem_t3_256 ,rega 
+7632 da4006a8 arg mem_t1_256 ,regb 
+7633 d8a006e8 arg mem_t2_256 ,contw 
+7634 20407734 call bn_mulmod_256 
+7635 da2005e8 arg mem_cy_256 ,rega 
+7636 da4006e8 arg mem_t2_256 ,regb 
+7637 d8a00588 arg mem_by_256 ,contw 
+7638 20207734 branch bn_mulmod_256 
+
+ecdbl_256:
+7639 da200608 arg mem_cz_256 ,rega 
+763a d8a006e8 arg mem_t2_256 ,contw 
+763b 204077cc call bn_sqrmod_256 
+763c da2006e8 arg mem_t2_256 ,rega 
+763d d8a00708 arg mem_t3_256 ,contw 
+763e 204077cc call bn_sqrmod_256 
+763f da200800 arg mem_a_256 ,rega 
+7640 da400708 arg mem_t3_256 ,regb 
+7641 d8a00708 arg mem_t3_256 ,contw 
+7642 20407734 call bn_mulmod_256 
+7643 da2005c8 arg mem_cx_256 ,rega 
+7644 d8a006e8 arg mem_t2_256 ,contw 
+7645 204077cc call bn_sqrmod_256 
+7646 d8c006e8 arg mem_t2_256 ,contr 
+7647 d8a006a8 arg mem_t1_256 ,contw 
+7648 20407d7d call memcpy32 
+7649 da2006a8 arg mem_t1_256 ,rega 
+764a 204077d3 call bn_lshiftmod_256 
+764b da2006e8 arg mem_t2_256 ,rega 
+764c da4006a8 arg mem_t1_256 ,regb 
+764d d8a006e8 arg mem_t2_256 ,contw 
+764e 204077d0 call bn_addmod_256 
+764f da2006e8 arg mem_t2_256 ,rega 
+7650 da400708 arg mem_t3_256 ,regb 
+7651 d8a006e8 arg mem_t2_256 ,contw 
+7652 204077d0 call bn_addmod_256 
+7653 d8c005c8 arg mem_cx_256 ,contr 
+7654 d8a006a8 arg mem_t1_256 ,contw 
+7655 20407d7d call memcpy32 
+7656 da2005e8 arg mem_cy_256 ,rega 
+7657 d8a00708 arg mem_t3_256 ,contw 
+7658 204077cc call bn_sqrmod_256 
+7659 da2006a8 arg mem_t1_256 ,rega 
+765a 204077d3 call bn_lshiftmod_256 
+765b da2006a8 arg mem_t1_256 ,rega 
+765c 204077d3 call bn_lshiftmod_256 
+765d da2006a8 arg mem_t1_256 ,rega 
+765e da400708 arg mem_t3_256 ,regb 
+765f d8a006a8 arg mem_t1_256 ,contw 
+7660 20407734 call bn_mulmod_256 
+7661 da200708 arg mem_t3_256 ,rega 
+7662 d8a006c8 arg mem_t0_256 ,contw 
+7663 204077cc call bn_sqrmod_256 
+7664 da2006c8 arg mem_t0_256 ,rega 
+7665 204077d3 call bn_lshiftmod_256 
+7666 da2006c8 arg mem_t0_256 ,rega 
+7667 204077d3 call bn_lshiftmod_256 
+7668 da2006c8 arg mem_t0_256 ,rega 
+7669 204077d3 call bn_lshiftmod_256 
+766a d8c005e8 arg mem_cy_256 ,contr 
+766b d8a00708 arg mem_t3_256 ,contw 
+766c 20407d7d call memcpy32 
+766d da200708 arg mem_t3_256 ,rega 
+766e 204077d3 call bn_lshiftmod_256 
+766f da200708 arg mem_t3_256 ,rega 
+7670 da400608 arg mem_cz_256 ,regb 
+7671 d8a00608 arg mem_cz_256 ,contw 
+7672 20407734 call bn_mulmod_256 
+7673 da2006e8 arg mem_t2_256 ,rega 
+7674 d8a00708 arg mem_t3_256 ,contw 
+7675 204077cc call bn_sqrmod_256 
+7676 da200708 arg mem_t3_256 ,rega 
+7677 da4006a8 arg mem_t1_256 ,regb 
+7678 d8a00708 arg mem_t3_256 ,contw 
+7679 204077e9 call bn_submod_256 
+767a da200708 arg mem_t3_256 ,rega 
+767b da4006a8 arg mem_t1_256 ,regb 
+767c d8a005c8 arg mem_cx_256 ,contw 
+767d 204077e9 call bn_submod_256 
+767e da2006a8 arg mem_t1_256 ,rega 
+767f da4005c8 arg mem_cx_256 ,regb 
+7680 d8a00708 arg mem_t3_256 ,contw 
+7681 204077e9 call bn_submod_256 
+7682 da200708 arg mem_t3_256 ,rega 
+7683 da4006e8 arg mem_t2_256 ,regb 
+7684 d8a00708 arg mem_t3_256 ,contw 
+7685 20407734 call bn_mulmod_256 
+7686 da200708 arg mem_t3_256 ,rega 
+7687 da4006c8 arg mem_t0_256 ,regb 
+7688 d8a005e8 arg mem_cy_256 ,contw 
+7689 202077e9 branch bn_submod_256 
+
+ecadd_256:
+768a da200548 arg mem_az_256 ,rega 
+768b d8a00728 arg mem_t7_256 ,contw 
+768c 204077cc call bn_sqrmod_256 
+768d da2005c8 arg mem_cx_256 ,rega 
+768e da400728 arg mem_t7_256 ,regb 
+768f d8a006c8 arg mem_t0_256 ,contw 
+7690 20407734 call bn_mulmod_256 
+7691 da200548 arg mem_az_256 ,rega 
+7692 da400728 arg mem_t7_256 ,regb 
+7693 d8a00728 arg mem_t7_256 ,contw 
+7694 20407734 call bn_mulmod_256 
+7695 da2005e8 arg mem_cy_256 ,rega 
+7696 da400728 arg mem_t7_256 ,regb 
+7697 d8a006a8 arg mem_t1_256 ,contw 
+7698 20407734 call bn_mulmod_256 
+7699 da200608 arg mem_cz_256 ,rega 
+769a d8a00728 arg mem_t7_256 ,contw 
+769b 204077cc call bn_sqrmod_256 
+769c da200508 arg mem_ax_256 ,rega 
+769d da400728 arg mem_t7_256 ,regb 
+769e d8a006e8 arg mem_t2_256 ,contw 
+769f 20407734 call bn_mulmod_256 
+76a0 da200608 arg mem_cz_256 ,rega 
+76a1 da400728 arg mem_t7_256 ,regb 
+76a2 d8a00728 arg mem_t7_256 ,contw 
+76a3 20407734 call bn_mulmod_256 
+76a4 da200528 arg mem_ay_256 ,rega 
+76a5 da400728 arg mem_t7_256 ,regb 
+76a6 d8a00708 arg mem_t3_256 ,contw 
+76a7 20407734 call bn_mulmod_256 
+76a8 da4006c8 arg mem_t0_256 ,regb 
+76a9 da2006e8 arg mem_t2_256 ,rega 
+76aa d8a00728 arg mem_t7_256 ,contw 
+76ab 204077e9 call bn_submod_256 
+76ac da2006c8 arg mem_t0_256 ,rega 
+76ad da4006e8 arg mem_t2_256 ,regb 
+76ae d8a006c8 arg mem_t0_256 ,contw 
+76af 204077d0 call bn_addmod_256 
+76b0 da4006a8 arg mem_t1_256 ,regb 
+76b1 da200708 arg mem_t3_256 ,rega 
+76b2 d8a006e8 arg mem_t2_256 ,contw 
+76b3 204077e9 call bn_submod_256 
+76b4 da2006a8 arg mem_t1_256 ,rega 
+76b5 da400708 arg mem_t3_256 ,regb 
+76b6 d8a006a8 arg mem_t1_256 ,contw 
+76b7 204077d0 call bn_addmod_256 
+76b8 da2006a8 arg mem_t1_256 ,rega 
+76b9 da400728 arg mem_t7_256 ,regb 
+76ba d8a006a8 arg mem_t1_256 ,contw 
+76bb 20407734 call bn_mulmod_256 
+76bc da200608 arg mem_cz_256 ,rega 
+76bd da400548 arg mem_az_256 ,regb 
+76be d8a00708 arg mem_t3_256 ,contw 
+76bf 20407734 call bn_mulmod_256 
+76c0 da200708 arg mem_t3_256 ,rega 
+76c1 da400728 arg mem_t7_256 ,regb 
+76c2 d8a00608 arg mem_cz_256 ,contw 
+76c3 20407734 call bn_mulmod_256 
+76c4 da200728 arg mem_t7_256 ,rega 
+76c5 d8a00728 arg mem_t7_256 ,contw 
+76c6 204077cc call bn_sqrmod_256 
+76c7 da200728 arg mem_t7_256 ,rega 
+76c8 da4006c8 arg mem_t0_256 ,regb 
+76c9 d8a00708 arg mem_t3_256 ,contw 
+76ca 20407734 call bn_mulmod_256 
+76cb da200728 arg mem_t7_256 ,rega 
+76cc da4006a8 arg mem_t1_256 ,regb 
+76cd d8a006a8 arg mem_t1_256 ,contw 
+76ce 20407734 call bn_mulmod_256 
+76cf da2006e8 arg mem_t2_256 ,rega 
+76d0 d8a005c8 arg mem_cx_256 ,contw 
+76d1 204077cc call bn_sqrmod_256 
+76d2 da2005c8 arg mem_cx_256 ,rega 
+76d3 da400708 arg mem_t3_256 ,regb 
+76d4 d8a005c8 arg mem_cx_256 ,contw 
+76d5 204077e9 call bn_submod_256 
+76d6 d8c005c8 arg mem_cx_256 ,contr 
+76d7 d8a00728 arg mem_t7_256 ,contw 
+76d8 20407d7d call memcpy32 
+76d9 da200728 arg mem_t7_256 ,rega 
+76da 204077d3 call bn_lshiftmod_256 
+76db da200708 arg mem_t3_256 ,rega 
+76dc da400728 arg mem_t7_256 ,regb 
+76dd d8a00708 arg mem_t3_256 ,contw 
+76de 204077e9 call bn_submod_256 
+76df da200708 arg mem_t3_256 ,rega 
+76e0 da4006e8 arg mem_t2_256 ,regb 
+76e1 d8a006e8 arg mem_t2_256 ,contw 
+76e2 20407734 call bn_mulmod_256 
+76e3 da2006e8 arg mem_t2_256 ,rega 
+76e4 da4006a8 arg mem_t1_256 ,regb 
+76e5 d8a005e8 arg mem_cy_256 ,contw 
+76e6 204077e9 call bn_submod_256 
+76e7 da2005e8 arg mem_cy_256 ,rega 
+76e8 da4007e0 arg mem_p_256 ,regb 
+76e9 d8a005e8 arg mem_cy_256 ,contw 
+76ea 18002600 force 0 ,regc 
+76eb 6fe085e8 fetch 1 ,mem_cy_256 
+76ec 2feffe00 isolate1 0 ,pdata 
+76ed 2040f7ce call bn_add_256 ,true 
+76ee 1a626000 copy regc ,alarm 
+76ef da2005e8 arg mem_cy_256 ,rega 
+76f0 204077fe call bn_rshift_256 
+76f1 6fe08607 fetch 1 ,mem_cy5_256 
+76f2 2e0ffe00 isolate1 0 ,alarm 
+76f3 7920fe07 setflag true ,7 ,pdata 
+76f4 67e08607 store 1 ,mem_cy5_256 
+76f5 20600000 rtn 
+
+bn_invmod_256:
+76f6 18a21600 copy contw ,timeup 
+76f7 d8a006c8 arg mem_tmp0_256 ,contw 
+76f8 20407d97 call clear_mem_256 
+76f9 18007e00 force 0 ,pdata 
+76fa 67e206e8 store 4 ,mem_t2_256 
+76fb 7006c801 jam 1 ,mem_tmp0_256 
+76fc d8a00648 arg mem_tmp1_256 ,contw 
+76fd 20407d99 call clear_mem_512 
+76fe d8c007e0 arg mem_p_256 ,contr 
+76ff d8a00688 arg mem_tmp2_256 ,contw 
+7700 20407d7d call memcpy32 
+7701 1a220c00 copy rega ,contr 
+7702 d8a006a8 arg mem_tmp3_256 ,contw 
+7703 20407d7d call memcpy32 
+
+bn_invmod_256_2:
+7704 d8c006a8 arg mem_tmp3_256 ,contr 
+7705 20407808 call bn_eq_zero_256 
+7706 203a772d branch bn_invmod_256_0 ,blank 
+7707 da2006a8 arg mem_tmp3_256 ,rega 
+7708 da4006c8 arg mem_tmp0_256 ,regb 
+7709 2040780b call bn_rshifteven_256 
+770a da200688 arg mem_tmp2_256 ,rega 
+770b da400648 arg mem_tmp1_256 ,regb 
+770c 2040780b call bn_rshifteven_256 
+770d da2006a8 arg mem_tmp3_256 ,rega 
+770e da400688 arg mem_tmp2_256 ,regb 
+770f 20407804 call bn_bigeq_256 
+7710 2021771f branch bn_invmod_256_1 ,positive 
+7711 da200688 arg mem_tmp2_256 ,rega 
+7712 da4006a8 arg mem_tmp3_256 ,regb 
+7713 1a220a00 copy rega ,contw 
+7714 204077fc call bn_sub_256 
+7715 da2006c8 arg mem_tmp0_256 ,rega 
+7716 da400648 arg mem_tmp1_256 ,regb 
+7717 1a420a00 copy regb ,contw 
+7718 204077ce call bn_add_256 
+7719 efe08011 ifetch 1 ,rega 
+771a 9a60a600 iadd regc ,regc 
+771b efe08012 ifetch 1 ,regb 
+771c 9a60fe00 iadd regc ,pdata 
+771d e7e08012 istore 1 ,regb 
+771e 20207704 branch bn_invmod_256_2 
+
+bn_invmod_256_1:
+771f da2006a8 arg mem_tmp3_256 ,rega 
+7720 da400688 arg mem_tmp2_256 ,regb 
+7721 1a220a00 copy rega ,contw 
+7722 204077fc call bn_sub_256 
+7723 da200648 arg mem_tmp1_256 ,rega 
+7724 da4006c8 arg mem_tmp0_256 ,regb 
+7725 1a420a00 copy regb ,contw 
+7726 204077ce call bn_add_256 
+7727 efe08011 ifetch 1 ,rega 
+7728 9a60a600 iadd regc ,regc 
+7729 efe08012 ifetch 1 ,regb 
+772a 9a60fe00 iadd regc ,pdata 
+772b e7e08012 istore 1 ,regb 
+772c 20207704 branch bn_invmod_256_2 
+
+bn_invmod_256_0:
+772d da200648 arg mem_tmp1_256 ,rega 
+772e 19620a00 copy timeup ,contw 
+772f 2040775d call bn_p256mod 
+7730 da2007e0 arg mem_p_256 ,rega 
+7731 19622400 copy timeup ,regb 
+7732 19620a00 copy timeup ,contw 
+7733 202077e9 branch bn_submod_256 
+
+bn_mulmod_256:
+7734 18a21600 copy contw ,timeup 
+7735 18007000 force 0 ,regext_index 
+7736 d8a00648 arg mem_tmp1_256 ,contw 
+7737 20407d99 call clear_mem_512 
+7738 d8a0099e arg mem_regext ,contw 
+7739 20407d99 call clear_mem_512 
+773a 1a220c00 copy rega ,contr 
+773b 70099e00 jam 0 ,mem_regext 
+773c 58000000 setarg 0 
+773d 204077c6 call bn_load_mem 
+773e 1a420c00 copy regb ,contr 
+773f 204077ca call bn_load_256 
+7740 18000e00 force 0 ,queue 
+7741 d8a00648 arg mem_tmp1_256 ,contw 
+
+bn_mulmod_256_1:
+7742 d840099e arg mem_regext ,temp 
+7743 18e22400 copy queue ,regb 
+7744 1a4bfe00 lshift2 regb ,pdata 
+7745 9840a400 iadd temp ,regb 
+7746 18000400 force 0 ,temp 
+7747 18002600 force 0 ,regc 
+
+bn_mulmod_256_0:
+7748 efe20005 ifetch 4 ,contw 
+7749 98002200 iforce rega 
+774a efe20012 ifetch 4 ,regb 
+774b 1a627000 copy regc ,regext_index 
+774c 9deffe00 imul32 regext ,pdata 
+774d 9a20fe00 iadd rega ,pdata 
+774e 9840fe00 iadd temp ,pdata 
+774f e7e20005 istore 4 ,contw 
+7750 1fef0400 rshift32 pdata ,temp 
+7751 1a60a601 increase 1 ,regc 
+7752 2a61fe08 compare 8 ,regc ,0xff 
+7753 2420f748 nbranch bn_mulmod_256_0 ,true 
+7754 18427e00 deposit temp 
+7755 e7e20005 istore 4 ,contw 
+7756 18a08be0 increase -32 ,contw 
+7757 18e08e01 increase 1 ,queue 
+7758 28e1fe08 compare 8 ,queue ,0xff 
+7759 2420f742 nbranch bn_mulmod_256_1 ,true 
+775a da200648 arg mem_tmp1_256 ,rega 
+775b 19620a00 copy timeup ,contw 
+775c 2020775d branch bn_p256mod 
+
+bn_p256mod:
+775d 4741c030 bpatchx patch30_3 ,mem_patch30 
+775e 18a21600 copy contw ,timeup 
+775f 1a226000 copy rega ,alarm 
+7760 da400688 arg mem_tmp2_256 ,regb 
+7761 1a420a00 copy regb ,contw 
+7762 20407d94 call memset0_4 
+7763 e7e40005 istore 8 ,contw 
+7764 1a208c2c add rega ,44 ,contr 
+7765 20407d79 call memcpy8 
+7766 20407d75 call memcpy12 
+7767 1a422200 copy regb ,rega 
+7768 204077d3 call bn_lshiftmod_256 
+7769 da400688 arg mem_tmp2_256 ,regb 
+776a 1e022200 copy alarm ,rega 
+776b 19620a00 copy timeup ,contw 
+776c 204077d0 call bn_addmod_256 
+776d da400688 arg mem_tmp2_256 ,regb 
+776e 1a420a00 copy regb ,contw 
+776f 20407d94 call memset0_4 
+7770 e7e40005 istore 8 ,contw 
+7771 1e008c30 add alarm ,48 ,contr 
+7772 20407d7f call memcpy16 
+7773 20407d94 call memset0_4 
+7774 1a422200 copy regb ,rega 
+7775 204077d3 call bn_lshiftmod_256 
+7776 da400688 arg mem_tmp2_256 ,regb 
+7777 19622200 copy timeup ,rega 
+7778 1a220a00 copy rega ,contw 
+7779 204077d0 call bn_addmod_256 
+777a da400688 arg mem_tmp2_256 ,regb 
+777b 1a420a00 copy regb ,contw 
+777c 1e008c20 add alarm ,32 ,contr 
+777d 20407d75 call memcpy12 
+777e 20407d94 call memset0_4 
+777f e7e40005 istore 8 ,contw 
+7780 1e008c38 add alarm ,56 ,contr 
+7781 20407d79 call memcpy8 
+7782 19622200 copy timeup ,rega 
+7783 1a220a00 copy rega ,contw 
+7784 204077d0 call bn_addmod_256 
+7785 da400688 arg mem_tmp2_256 ,regb 
+7786 1a420a00 copy regb ,contw 
+7787 1e008c24 add alarm ,36 ,contr 
+7788 20407d75 call memcpy12 
+7789 1e008c34 add alarm ,52 ,contr 
+778a 20407d75 call memcpy12 
+778b 1e008c34 add alarm ,52 ,contr 
+778c 20407d76 call memcpy4 
+778d 1e008c20 add alarm ,32 ,contr 
+778e 20407d76 call memcpy4 
+778f 19622200 copy timeup ,rega 
+7790 1a220a00 copy rega ,contw 
+7791 204077d0 call bn_addmod_256 
+7792 da400688 arg mem_tmp2_256 ,regb 
+7793 1a420a00 copy regb ,contw 
+7794 1e008c2c add alarm ,44 ,contr 
+7795 20407d75 call memcpy12 
+7796 20407d94 call memset0_4 
+7797 e7e40005 istore 8 ,contw 
+7798 1e008c20 add alarm ,32 ,contr 
+7799 20407d76 call memcpy4 
+779a 1e008c28 add alarm ,40 ,contr 
+779b 20407d76 call memcpy4 
+779c 19622200 copy timeup ,rega 
+779d 1a220a00 copy rega ,contw 
+779e 204077e9 call bn_submod_256 
+779f da400688 arg mem_tmp2_256 ,regb 
+77a0 1a420a00 copy regb ,contw 
+77a1 1e008c30 add alarm ,48 ,contr 
+77a2 20407d79 call memcpy8 
+77a3 20407d79 call memcpy8 
+77a4 18007e00 force 0 ,pdata 
+77a5 e7e40005 istore 8 ,contw 
+77a6 1e008c24 add alarm ,36 ,contr 
+77a7 20407d76 call memcpy4 
+77a8 1e008c2c add alarm ,44 ,contr 
+77a9 20407d76 call memcpy4 
+77aa 19622200 copy timeup ,rega 
+77ab 1a220a00 copy rega ,contw 
+77ac 204077e9 call bn_submod_256 
+77ad da400688 arg mem_tmp2_256 ,regb 
+77ae 1a420a00 copy regb ,contw 
+77af 1e008c34 add alarm ,52 ,contr 
+77b0 20407d75 call memcpy12 
+77b1 1e008c20 add alarm ,32 ,contr 
+77b2 20407d75 call memcpy12 
+77b3 20407d94 call memset0_4 
+77b4 1e008c30 add alarm ,48 ,contr 
+77b5 20407d76 call memcpy4 
+77b6 19622200 copy timeup ,rega 
+77b7 1a220a00 copy rega ,contw 
+77b8 204077e9 call bn_submod_256 
+77b9 da400688 arg mem_tmp2_256 ,regb 
+77ba 1a420a00 copy regb ,contw 
+77bb 1e008c38 add alarm ,56 ,contr 
+77bc 20407d79 call memcpy8 
+77bd 20407d94 call memset0_4 
+77be 1e008c24 add alarm ,36 ,contr 
+77bf 20407d75 call memcpy12 
+77c0 20407d94 call memset0_4 
+77c1 1e008c34 add alarm ,52 ,contr 
+77c2 20407d76 call memcpy4 
+77c3 19622200 copy timeup ,rega 
+77c4 1a220a00 copy rega ,contw 
+77c5 202077e9 branch bn_submod_256 
+
+bn_load_mem:
+77c6 18007220 force 32 ,loopcnt 
+77c7 d8a0099e arg mem_regext ,contw 
+77c8 98a08a00 iadd contw ,contw 
+77c9 20207dd4 branch memcpy 
+
+bn_load_256:
+77ca 18007208 force 8 ,loopcnt 
+77cb 2020717c branch bn_load_0 
+
+bn_sqrmod_256:
+77cc 1a222400 copy rega ,regb 
+77cd 20207734 branch bn_mulmod_256 
+
+bn_add_256:
+77ce 18007208 force 8 ,loopcnt 
+77cf 2020710d branch bn_add + 1 
+
+bn_addmod_256:
+77d0 204077ce call bn_add_256 
+77d1 18a22200 copy contw ,rega 
+77d2 202077d4 branch bn_lshiftmod_ismod_256 
+
+bn_lshiftmod_256:
+77d3 20407801 call bn_lshift_256 
+
+bn_lshiftmod_ismod_256:
+77d4 2a6ffe00 isolate1 0 ,regc 
+77d5 2020f7dd branch bn_lshiftmod_p_256 ,true 
+77d6 da4007e0 arg mem_p_256 ,regb 
+77d7 1a222600 copy rega ,regc 
+77d8 1a20a3e0 increase -32 ,rega 
+77d9 20407804 call bn_bigeq_256 
+77da 24610000 nrtn positive 
+77db 1a622200 copy regc ,rega 
+77dc 202077e5 branch sub_p2_256 
+
+bn_lshiftmod_p_256:
+77dd 204077e5 call sub_p2_256 
+77de 1a222600 copy rega ,regc 
+77df 1a20a3e0 increase -32 ,rega 
+77e0 da4007e0 arg mem_p_256 ,regb 
+77e1 20407804 call bn_bigeq_256 
+77e2 24610000 nrtn positive 
+77e3 1a622200 copy regc ,rega 
+77e4 202077e5 branch sub_p2_256 
+
+sub_p2_256:
+77e5 1a20a3e0 increase -32 ,rega 
+77e6 da4007e0 arg mem_p_256 ,regb 
+77e7 1a220a00 copy rega ,contw 
+77e8 202077fc branch bn_sub_256 
+
+bn_submod_256:
+77e9 204077fc call bn_sub_256 
+77ea 2020f7f3 branch bn_submod_256_np ,true 
+77eb 18a0a3e0 add contw ,-32 ,rega 
+77ec da4007e0 arg mem_p_256 ,regb 
+77ed 20407804 call bn_bigeq_256 
+77ee 24610000 nrtn positive 
+77ef da4007e0 arg mem_p_256 ,regb 
+77f0 18a0a3e0 add contw ,-32 ,rega 
+77f1 1a220a00 copy rega ,contw 
+77f2 202077fc branch bn_sub_256 
+
+bn_submod_256_np:
+77f3 18a0a3e0 add contw ,-32 ,rega 
+77f4 da4007e0 arg mem_p_256 ,regb 
+77f5 1a220a00 copy rega ,contw 
+77f6 204077ce call bn_add_256 
+77f7 20608000 rtn true 
+77f8 18a0a3e0 add contw ,-32 ,rega 
+77f9 da4007e0 arg mem_p_256 ,regb 
+77fa 1a220a00 copy rega ,contw 
+77fb 202077ce branch bn_add_256 
+
+bn_sub_256:
+77fc 18007208 force 8 ,loopcnt 
+77fd 2020711b branch bn_sub + 1 
+
+bn_rshift_256:
+77fe 18007208 force 8 ,loopcnt 
+77ff 1a20a21c increase 28 ,rega 
+7800 2020712a branch bn_rshift 
+
+bn_lshift_256:
+7801 18007208 force 8 ,loopcnt 
+7802 18002600 force 0 ,regc 
+7803 20207138 branch bn_lshift_0 
+
+bn_bigeq_256:
+7804 18007208 force 8 ,loopcnt 
+7805 1a20a21c increase 28 ,rega 
+7806 1a40a41c increase 28 ,regb 
+7807 20207102 branch bn_bigeq_0 
+
+bn_eq_zero_256:
+7808 efe40006 ifetch 8 ,contr 
+7809 247a0000 nrtn blank 
+780a 202070f0 branch bn_eq_zero 
+
+bn_rshifteven_256:
+780b 1a226000 copy rega ,alarm 
+
+bn_rshifteven_256_1:
+780c 1e022200 copy alarm ,rega 
+780d efe08011 ifetch 1 ,rega 
+780e 2feffe00 isolate1 0 ,pdata 
+780f 20608000 rtn true 
+7810 204077fe call bn_rshift_256 
+7811 efe08012 ifetch 1 ,regb 
+7812 2fec0000 isolate0 0 ,pdata 
+7813 2020f81b branch bn_rshifteven_256_0 ,true 
+7814 da2007e0 arg mem_p_256 ,rega 
+7815 1a420a00 copy regb ,contw 
+7816 204077ce call bn_add_256 
+7817 efe08012 ifetch 1 ,regb 
+7818 9a60fe00 iadd regc ,pdata 
+7819 e7e08012 istore 1 ,regb 
+781a 1a40a5e0 increase -32 ,regb 
+
+bn_rshifteven_256_0:
+781b 1a40a220 add regb ,32 ,rega 
+781c 18007209 force 9 ,loopcnt 
+781d 2040712a call bn_rshift 
+781e 2020780c branch bn_rshifteven_256_1 
+
+ui_init:
+781f 20401597 call lpm_disable_exen_output 
+7820 20758000 rtn wake 
+7821 20407826 call ui_button_init 
+7822 204078cc call ui_timer_init 
+7823 2020785b branch ui_led_init_global 
+
+ui_dispatch:
+7824 2040787c call ui_led_dispatch 
+7825 202078bb branch ui_timer_check 
+
+ui_button_init:
+7826 6fe0c793 fetch 1 ,mem_ui_button_gpio 
+7827 c17f8000 rtneq ui_button_gpio_disable 
+7828 98000400 iforce temp 
+7829 2040610d call gpio_config_output 
+782a 6848c793 fetcht 1 ,mem_ui_button_gpio 
+782b 20406109 call gpio_out_inactive 
+782c 20000064 nop 100 
+782d 6848c793 fetcht 1 ,mem_ui_button_gpio 
+782e 204060f4 call gpio_config_input 
+782f 20207830 branch ui_button_polling 
+
+ui_button_polling:
+7830 47424030 bpatchx patch30_4 ,mem_patch30 
+7831 6fe0c793 fetch 1 ,mem_ui_button_gpio 
+7832 c17f8000 rtneq ui_button_gpio_disable 
+7833 1fe20400 copy pdata ,temp 
+7834 204060fd call gpio_get_bit 
+7835 2420f842 nbranch ui_button_up ,true 
+
+ui_button_down:
+7836 2040784c call ui_button_check_long_press 
+7837 6fe1478f fetch 2 ,mem_ui_state_map 
+7838 79207e0c set1 ui_state_btn_down ,pdata 
+7839 67e1478f store 2 ,mem_ui_state_map 
+783a 6fe0c786 fetch 1 ,mem_ui_button_last_state 
+783b c1000000 rtneq ui_button_state_down 
+783c 70478600 jam ui_button_state_down ,mem_ui_button_last_state 
+783d 6fe0c792 fetch 1 ,mem_ui_button_timeout 
+783e 67e0c785 store 1 ,mem_ui_button_timer 
+783f 20407853 call lpm_button_get_wake_lock 
+7840 70095b2c jam bt_evt_button_down ,mem_fifo_temp 
+7841 202078dc branch ui_ipc_send_event 
+
+ui_button_up:
+7842 6fe1478f fetch 2 ,mem_ui_state_map 
+7843 793ffe0c set0 ui_state_btn_down ,pdata 
+7844 67e1478f store 2 ,mem_ui_state_map 
+7845 6fe0c786 fetch 1 ,mem_ui_button_last_state 
+7846 c1008000 rtneq ui_button_state_up 
+7847 70478601 jam ui_button_state_up ,mem_ui_button_last_state 
+7848 70478500 jam 0 ,mem_ui_button_timer 
+7849 20407855 call lpm_button_clean_wake_lock 
+784a 70095b2d jam bt_evt_button_up ,mem_fifo_temp 
+784b 202078dc branch ui_ipc_send_event 
+
+ui_button_check_long_press:
+784c 6fe0c785 fetch 1 ,mem_ui_button_timer 
+784d 207a0000 rtn blank 
+784e 1fe0ffff increase -1 ,pdata 
+784f 67e0c785 store 1 ,mem_ui_button_timer 
+7850 247a0000 nrtn blank 
+7851 70095b10 jam bt_evt_button_long_pressed ,mem_fifo_temp 
+7852 202078dc branch ui_ipc_send_event 
+
+lpm_button_get_wake_lock:
+7853 d8e00007 arg wake_lock_button ,queue 
+7854 20201566 branch lpm_get_wake_lock 
+
+lpm_button_clean_wake_lock:
+7855 d8e00007 arg wake_lock_button ,queue 
+7856 2020156a branch lpm_put_wake_lock 
+
+calc_curr_struct_prt:
+7857 6fe1448f fetch 2 ,mem_ui_led_struct_ptr 
+7858 1a2fa40b mul32 rega ,led_offset_length ,regb 
+7859 9a40a400 iadd regb ,regb 
+785a 20600000 rtn 
+
+ui_led_init_global:
+785b 6fe0c48e fetch 1 ,mem_ui_led_struct_num 
+785c 207a0000 rtn blank 
+785d 1fe27200 copy pdata ,loopcnt 
+785e 6fe1448f fetch 2 ,mem_ui_led_struct_ptr 
+785f 1fe22400 copy pdata ,regb 
+
+ui_led_init_loop:
+7860 1a40a602 add regb ,led_offset_led_gpio ,regc 
+7861 e8408013 ifetcht 1 ,regc 
+7862 2040610d call gpio_config_output 
+7863 20407885 call ui_led_off_static 
+7864 1a40a40b increase led_offset_length ,regb 
+7865 c2007860 loop ui_led_init_loop 
+7866 20600000 rtn 
+
+ui_led_on_global:
+7867 20407857 call calc_curr_struct_prt 
+7868 58000002 setarg ui_led_state_lighting 
+7869 e7e08012 istore 1 ,regb 
+786a 204078b5 call ui_led_stop_timer 
+786b 2020788a branch ui_led_on_static 
+
+ui_led_blink_stop_global:
+
+ui_led_off_global:
+786c 20407857 call calc_curr_struct_prt 
+786d 58000003 setarg ui_led_state_darking 
+786e e7e08012 istore 1 ,regb 
+786f 204078b5 call ui_led_stop_timer 
+7870 20207885 branch ui_led_off_static 
+
+ui_led_blink_start_global:
+7871 20407857 call calc_curr_struct_prt 
+7872 58000001 setarg ui_led_state_blink_start 
+7873 e7e08012 istore 1 ,regb 
+7874 580000ff setarg led_infinite_flash_num 
+7875 e7e08005 istore 1 ,contw 
+7876 20207885 branch ui_led_off_static 
+
+ui_led_set_style_global:
+7877 20407857 call calc_curr_struct_prt 
+7878 df20000b arg led_offset_length ,loopcnt 
+7879 1a620c00 copy regc ,contr 
+787a 1a420a00 copy regb ,contw 
+787b 20207dc7 branch memcpy_fast 
+
+ui_led_dispatch:
+787c 6fe0c48e fetch 1 ,mem_ui_led_struct_num 
+787d 207a0000 rtn blank 
+787e da200000 arg 0 ,rega 
+
+ui_led_blink_polling:
+787f 2040788f call ui_led_change_style_by_type 
+7880 1a20a201 increase 1 ,rega 
+7881 6fe0c48e fetch 1 ,mem_ui_led_struct_num 
+7882 9a267c00 isub rega ,null 
+7883 20628000 rtn zero 
+7884 2020787f branch ui_led_blink_polling 
+
+ui_led_off_static:
+7885 1a40a602 add regb ,led_offset_led_gpio ,regc 
+7886 e8408013 ifetcht 1 ,regc 
+7887 6fe0c09a fetch 1 ,mem_device_option 
+7888 c0044980 beq dvc_op_mouse ,mouse_ui_led_off_static 
+7889 20206109 branch gpio_out_inactive 
+
+ui_led_on_static:
+788a 1a40a602 add regb ,led_offset_led_gpio ,regc 
+788b e8408013 ifetcht 1 ,regc 
+788c 6fe0c09a fetch 1 ,mem_device_option 
+788d c004498c beq dvc_op_mouse ,mouse_ui_led_on_static 
+788e 2020610d branch gpio_out_active 
+
+ui_led_change_style_by_type:
+788f 1a208e0b add rega ,ui_led_blink ,queue 
+7890 20407de9 call timer_check 
+7891 247a0000 nrtn blank 
+7892 20407857 call calc_curr_struct_prt 
+7893 efe08012 ifetch 1 ,regb 
+7894 c001788a beq ui_led_state_lighting ,ui_led_on_static 
+7895 c001f885 beq ui_led_state_darking ,ui_led_off_static 
+7896 c0007885 beq ui_led_state_blink_stop ,ui_led_off_static 
+7897 c002f8a3 beq ui_led_state_blink_darking ,ui_led_blink_state_darking 
+
+ui_led_blink_state_lighting:
+7898 2040788a call ui_led_on_static 
+7899 1a40a607 add regb ,led_offset_cb_ledon ,regc 
+789a 20407d3b call push_stack 
+789b efe10013 ifetch 2 ,regc 
+789c 20407e7a call callback_func 
+789d 20407d47 call pop_stack 
+789e 58000005 setarg ui_led_state_blink_darking 
+789f e7e08012 istore 1 ,regb 
+78a0 1a40a603 add regb ,led_offset_on_time ,regc 
+78a1 efe10013 ifetch 2 ,regc 
+78a2 202078b3 branch ui_led_blink_timer_start 
+
+ui_led_blink_state_darking:
+78a3 20407885 call ui_led_off_static 
+78a4 1a40a609 add regb ,led_offset_cb_ledoff ,regc 
+78a5 20407d3b call push_stack 
+78a6 efe10013 ifetch 2 ,regc 
+78a7 20407e7a call callback_func 
+78a8 20407d47 call pop_stack 
+78a9 1a40a601 add regb ,led_offset_blink_count ,regc 
+78aa efe08013 ifetch 1 ,regc 
+78ab c07ff8af beq led_infinite_flash_num ,ui_led_blink_infinite 
+78ac 1fe0ffff increase -1 ,pdata 
+78ad e7e08013 istore 1 ,regc 
+78ae 203a786c branch ui_led_blink_stop_global ,blank 
+
+ui_led_blink_infinite:
+78af 58000004 setarg ui_led_state_blink_lighting 
+78b0 e7e08012 istore 1 ,regb 
+78b1 1a40a605 add regb ,led_offset_off_time ,regc 
+78b2 efe10013 ifetch 2 ,regc 
+
+ui_led_blink_timer_start:
+78b3 1a208e0b add rega ,ui_led_blink ,queue 
+78b4 20207ddb branch timer_init 
+
+ui_led_stop_timer:
+78b5 58000000 setarg 0 
+78b6 202078b3 branch ui_led_blink_timer_start 
+
+ui_timer_timeout:
+78b7 58001000 setarg 0x1000 
+78b8 1ff07e00 lshift16 pdata ,pdata 
+78b9 9a40a400 iadd regb ,regb 
+78ba 20600000 rtn 
+
+ui_timer_check:
+78bb 4742c030 bpatchx patch30_5 ,mem_patch30 
+78bc da200000 arg 0 ,rega 
+78bd 684a4787 fetcht 4 ,mem_ui_timer_last_btclk 
+78be 1c422400 copy clkn_bt ,regb 
+78bf 1a427e00 copy regb ,pdata 
+78c0 98467c00 isub temp ,null 
+78c1 244178b7 ncall ui_timer_timeout ,positive 
+
+ui_timer_check_loop:
+78c2 1a427e00 copy regb ,pdata 
+78c3 184084a0 increase 160 ,temp 
+78c4 184084a0 increase 160 ,temp 
+78c5 98467c00 isub temp ,null 
+78c6 242178cf nbranch ui_timer_check_end ,positive 
+78c7 1a20a201 increase 1 ,rega 
+78c8 1a217e0f and rega ,0x0f ,pdata 
+78c9 243a78c2 nbranch ui_timer_check_loop ,blank 
+78ca da200000 arg 0 ,rega 
+78cb 204078d5 call ui_timer_check_send_evt 
+
+ui_timer_init:
+78cc 1c427e00 copy clkn_bt ,pdata 
+78cd 67e24787 store 4 ,mem_ui_timer_last_btclk 
+78ce 20600000 rtn 
+
+ui_timer_check_end:
+78cf 1a227e00 copy rega ,pdata 
+78d0 207a0000 rtn blank 
+78d1 18408560 increase -160 ,temp 
+78d2 18408560 increase -160 ,temp 
+78d3 793f841c set0 28 ,temp 
+78d4 604a4787 storet 4 ,mem_ui_timer_last_btclk 
+
+ui_timer_check_send_evt:
+78d5 202031ee branch app_evt_timer 
+
+ui_ipc_get_lock:
+78d6 70477301 jam 1 ,mem_ipc_lock_bt 
+
+ui_ipc_get_lock_wait:
+78d7 6fe0c774 fetch 1 ,mem_ipc_lock_c51 
+78d8 243a78d7 nbranch ui_ipc_get_lock_wait ,blank 
+78d9 20600000 rtn 
+
+ui_ipc_put_lock:
+78da 70477300 jam 0 ,mem_ipc_lock_bt 
+78db 20600000 rtn 
+
+ui_ipc_send_event:
+78dc 47434030 bpatchx patch30_6 ,mem_patch30 
+78dd 204078d6 call ui_ipc_get_lock 
+78de 1a227e00 copy rega ,pdata 
+78df 67e20953 store 4 ,mem_ipc_rega_temp 
+78e0 da204775 arg mem_ipc_fifo_bt2c51 ,rega 
+78e1 20407e96 call fifo_in 
+78e2 6fe20953 fetch 4 ,mem_ipc_rega_temp 
+78e3 1fe22200 copy pdata ,rega 
+78e4 202078da branch ui_ipc_put_lock 
+
+ui_ipc_send_cmd:
+78e5 4743c030 bpatchx patch30_7 ,mem_patch30 
+78e6 204078d6 call ui_ipc_get_lock 
+78e7 1a227e00 copy rega ,pdata 
+78e8 67e20953 store 4 ,mem_ipc_rega_temp 
+78e9 da20477d arg mem_ipc_fifo_c512bt ,rega 
+78ea 20407e96 call fifo_in 
+78eb 6fe20953 fetch 4 ,mem_ipc_rega_temp 
+78ec 1fe22200 copy pdata ,rega 
+78ed 202078da branch ui_ipc_put_lock 
+
+ui_ipc_clean_all_fifo:
+78ee 58000000 setarg 0 
+78ef 67e4477d store util_fifo_len ,mem_ipc_fifo_c512bt 
+78f0 67e44775 store util_fifo_len ,mem_ipc_fifo_bt2c51 
+78f1 20600000 rtn 
+
+check_51cmd:
+78f2 47444031 bpatchx patch31_0 ,mem_patch31 
+78f3 6fe0c1db fetch 1 ,mem_hci_cmd 
+78f4 247a0000 nrtn blank 
+78f5 da20477d arg mem_ipc_fifo_c512bt ,rega 
+78f6 20407eae call fifo_is_empty 
+78f7 207a0000 rtn blank 
+78f8 70095200 jam ipc_continue_process ,mem_ipc_skip_continue_proc 
+78f9 204078fd call check_51cmd_once 
+78fa 6fe08952 fetch 1 ,mem_ipc_skip_continue_proc 
+78fb 203a78f2 branch check_51cmd ,blank 
+78fc 20600000 rtn 
+
+check_51cmd_once:
+78fd 204078d6 call ui_ipc_get_lock 
+78fe da20477d arg mem_ipc_fifo_c512bt ,rega 
+78ff 20407ea2 call fifo_out 
+7900 1fe20400 copy pdata ,temp 
+7901 204078da call ui_ipc_put_lock 
+7902 4744c031 bpatchx patch31_1 ,mem_patch31 
+7903 18427e00 copy temp ,pdata 
+7904 207a0000 rtn blank 
+7905 c000f92f beq bt_cmd_start_discovery ,check_51cmd_start_discovery 
+7906 c0017934 beq bt_cmd_stop_discovery ,check_51cmd_stop_discovery 
+7907 c001f93a beq bt_cmd_reconnect ,check_51cmd_reconnect 
+7908 c006f959 beq bt_cmd_start_adv ,check_51cmd_adv 
+7909 c007795f beq bt_cmd_stop_adv ,check_51cmd_stop_adv 
+790a c007f964 beq bt_cmd_start_direct_adv ,check_51cmd_direct_adv 
+790b c008796a beq bt_cmd_stop_direct_adv ,check_51cmd_stop_direct_adv 
+790c c009f974 beq bt_cmd_led_off ,check_51cmd_led_off 
+790d c00a7976 beq bt_cmd_led_on ,check_51cmd_led_on 
+790e c00af978 beq bt_cmd_led_blink ,check_51cmd_led_start_blink 
+790f c00b7982 beq bt_cmd_le_start_conn ,check_51cmd_le_start_con 
+7910 c00bf985 beq bt_cmd_le_start_scan ,check_51cmd_start_scan 
+7911 c00c7987 beq bt_cmd_le_stop_scan ,check_51cmd_stop_scan 
+7912 c00cf98a beq bt_cmd_enter_hibernate ,check_51cmd_hibernate 
+7913 c00f799c beq bt_cmd_bb_reconn_cancel ,check_51cmd_bb_reconn_cancel 
+7914 67e0895b store 1 ,mem_fifo_temp 
+7915 20405a3f call lmo_fifo_check 
+7916 243a792d nbranch check_51cmd_restore ,blank 
+
+check_51cmd_once_continue:
+7917 6fe0895b fetch 1 ,mem_fifo_temp 
+7918 c584f928 bmark0 mark_context ,check_51cmd_check_idle 
+7919 47454031 bpatchx patch31_2 ,mem_patch31 
+791a 6fe0895b fetch 1 ,mem_fifo_temp 
+791b c002793c beq bt_cmd_disconnect ,check_51cmd_disconnect 
+791c c002f93f beq bt_cmd_enter_sniff ,check_51cmd_enter_sniff 
+791d c003794a beq bt_cmd_exit_sniff ,check_51cmd_exit_sniff 
+791e c005794c beq bt_cmd_set_pin_code ,check_51cmd_pincode 
+791f c008f96f beq bt_cmd_le_disconnect ,check_51cmd_le_disconnect 
+7920 c00df992 beq bt_cmd_le_smp_security_request ,check_51cmd_le_smp_sec_req 
+7921 c0097973 beq bt_cmd_le_update_conn ,check_51cmd_ble_update_connect_param 
+7922 c00ef993 beq bt_cmd_role_switch ,check_51cmd_role_switch 
+7923 c00fe0c9 beq bt_cmd_store_reconn_info_le ,eeprom_store_le_reconn_info 
+7924 c01060cb beq bt_cmd_store_reconn_info_bt ,eeprom_store_bd_reconn_info 
+7925 c010f99e beq bt_cmd_dhkey_not_accept ,check_51cmd_dhkey_not_accept 
+7926 c012dffb beq bt_cmd_store_reconn_info ,check_51cmd_store_reconn_info 
+7927 20600000 rtn 
+
+check_51cmd_check_idle:
+7928 67e0895b store 1 ,mem_fifo_temp 
+7929 20400a5f call context_check_idle 
+792a 2022f92d branch check_51cmd_restore ,zero 
+792b 20400a67 call context_search_plap 
+792c 24628000 nrtn zero 
+
+check_51cmd_restore:
+792d 70095201 jam ipc_skip_continue_process ,mem_ipc_skip_continue_proc 
+792e 202078e5 branch ui_ipc_send_cmd 
+
+check_51cmd_start_discovery:
+792f 6fe1478f fetch 2 ,mem_ui_state_map 
+7930 79207e06 set1 ui_state_bt_discovery ,pdata 
+7931 67e1478f store 2 ,mem_ui_state_map 
+7932 70409b03 jam 3 ,mem_scan_mode 
+7933 20600000 rtn 
+
+check_51cmd_stop_discovery:
+7934 70478d00 jam 0 ,mem_hid_handshake_timer_count 
+7935 70409b00 jam 0 ,mem_scan_mode 
+7936 6fe1478f fetch 2 ,mem_ui_state_map 
+7937 793ffe06 set0 ui_state_bt_discovery ,pdata 
+7938 67e1478f store 2 ,mem_ui_state_map 
+7939 20600000 rtn 
+
+check_51cmd_reconnect:
+793a 7041db05 jam hci_cmd_create_conn ,mem_hci_cmd 
+793b 20600000 rtn 
+
+check_51cmd_disconnect:
+793c 70007c07 jam lmp_detach ,mem_lmo_opcode2 
+793d 70039e13 jam other_end_terminated ,mem_disconn_reason_send 
+793e 20600000 rtn 
+
+check_51cmd_enter_sniff:
+793f 70007c17 jam lmp_sniff_req ,mem_lmo_opcode2 
+7940 d8a003ac arg mem_sniff_payload ,contw 
+7941 58000000 setarg 0 
+7942 2d0ffe1b isolate1 27 ,clke_bt 
+7943 7920fe01 setflag true ,1 ,pdata 
+7944 e7e08005 istore 1 ,contw 
+7945 58000000 setarg 0 
+7946 e7e10005 istore 2 ,contw 
+7947 6fe34455 fetch 6 ,mem_sniff_param_interval 
+7948 e7e30005 istore 6 ,contw 
+7949 20600000 rtn 
+
+check_51cmd_exit_sniff:
+794a 70007c18 jam lmp_unsniff_req ,mem_lmo_opcode2 
+794b 20600000 rtn 
+
+check_51cmd_pincode:
+794c 7003a802 jam pincode_state_pincode_ready ,mem_pincode_state 
+794d 6fe0804b fetch 1 ,mem_op 
+794e c2817952 bbit1 op_inrand_req ,check_51cmd_pincode_pair_passive 
+794f 20405a72 call tid_initiate 
+7950 70007c08 jam lmp_in_rand ,mem_lmo_opcode2 
+7951 20600000 rtn 
+
+check_51cmd_pincode_pair_passive:
+7952 793ffe02 set0 op_inrand_req ,pdata 
+7953 67e0804b store 1 ,mem_op 
+7954 20405750 call lmp_accept_inrand 
+7955 58000000 setarg 0 
+7956 7934fe01 setflag master ,smap_lmptid ,pdata 
+7957 67e0807f store 1 ,mem_lmo_tid2 
+7958 20600000 rtn 
+
+check_51cmd_adv:
+7959 70442701 jam on ,mem_le_adv_enable 
+795a 70442a00 jam adv_ind ,mem_le_adv_type 
+795b 6fe1478f fetch 2 ,mem_ui_state_map 
+795c 79207e0b set1 ui_state_ble_adv ,pdata 
+795d 67e1478f store 2 ,mem_ui_state_map 
+795e 20600000 rtn 
+
+check_51cmd_stop_adv:
+795f 6fe1478f fetch 2 ,mem_ui_state_map 
+7960 793ffe0b set0 ui_state_ble_adv ,pdata 
+7961 67e1478f store 2 ,mem_ui_state_map 
+7962 70442700 jam off ,mem_le_adv_enable 
+7963 20600000 rtn 
+
+check_51cmd_direct_adv:
+7964 70442701 jam on ,mem_le_adv_enable 
+7965 70442a01 jam adv_direct_ind ,mem_le_adv_type 
+7966 6fe1478f fetch 2 ,mem_ui_state_map 
+7967 79207e0b set1 ui_state_ble_adv ,pdata 
+7968 67e1478f store 2 ,mem_ui_state_map 
+7969 20600000 rtn 
+
+check_51cmd_stop_direct_adv:
+796a 6fe1478f fetch 2 ,mem_ui_state_map 
+796b 793ffe0b set0 ui_state_ble_adv ,pdata 
+796c 67e1478f store 2 ,mem_ui_state_map 
+796d 70442700 jam off ,mem_le_adv_enable 
+796e 20600000 rtn 
+
+check_51cmd_le_disconnect:
+796f 58000014 setarg 20 
+7970 67e102b5 store 2 ,mem_le_superto 
+7971 67e14394 store 2 ,mem_le_init_superto 
+7972 20202134 branch le_send_terminate_ind_user_terminated 
+
+check_51cmd_ble_update_connect_param:
+7973 20201f04 branch le_l2cap_tx_update_req 
+
+check_51cmd_led_off:
+7974 da200000 arg 0 ,rega 
+7975 2020786c branch ui_led_off_global 
+
+check_51cmd_led_on:
+7976 da200000 arg 0 ,rega 
+7977 20207867 branch ui_led_on_global 
+
+check_51cmd_led_start_blink:
+7978 da200000 arg 0 ,rega 
+7979 20407857 call calc_curr_struct_prt 
+797a efe08012 ifetch 1 ,regb 
+797b c000f97f beq ui_led_state_blink_start ,check_51cmd_led_start_blink_in_blink 
+797c c002797f beq ui_led_state_blink_lighting ,check_51cmd_led_start_blink_in_blink 
+797d c002f97f beq ui_led_state_blink_darking ,check_51cmd_led_start_blink_in_blink 
+797e 20207871 branch ui_led_blink_start_global 
+
+check_51cmd_led_start_blink_in_blink:
+797f efe08006 ifetch 1 ,contr 
+7980 c17f8000 rtneq led_infinite_flash_num 
+7981 20207871 branch ui_led_blink_start_global 
+
+check_51cmd_le_start_con:
+7982 7043e201 jam on ,mem_le_scan_enable 
+7983 7041db1b jam hci_cmd_le_create_conn ,mem_hci_cmd 
+7984 20600000 rtn 
+
+check_51cmd_start_scan:
+7985 7043e201 jam on ,mem_le_scan_enable 
+7986 20600000 rtn 
+
+check_51cmd_stop_scan:
+7987 7043e200 jam off ,mem_le_scan_enable 
+7988 7041db00 jam 0 ,mem_hci_cmd 
+7989 20600000 rtn 
+
+check_51cmd_hibernate:
+798a 6fe1445d fetch 2 ,mem_cb_before_hibernate 
+798b 20407e7a call callback_func 
+798c 6fe0c793 fetch 1 ,mem_ui_button_gpio 
+798d c07ff990 beq ui_button_gpio_disable ,check_51cmd_hibernate_btn_disabled 
+798e 1fe20400 copy pdata ,temp 
+798f 204060f4 call gpio_config_input 
+
+check_51cmd_hibernate_btn_disabled:
+7990 204078ee call ui_ipc_clean_all_fifo 
+7991 20201459 branch lpm_hibernate 
+
+check_51cmd_le_smp_sec_req:
+7992 20201f46 branch le_send_smp_security_request 
+
+check_51cmd_role_switch:
+7993 70007c34 jam lmp_slot_offset ,mem_lmo_opcode2 
+7994 79200003 set1 mark_switch_initiated ,mark 
+7995 24748000 nrtn master 
+7996 70464500 jam switch_flag_init ,mem_switch_flag 
+7997 70007c13 jam lmp_switch_req ,mem_lmo_opcode2 
+7998 6fe080bc fetch 1 ,mem_connection_options 
+7999 793ffe02 set0 connection_switch ,pdata 
+799a 67e080bc store 1 ,mem_connection_options 
+799b 20600000 rtn 
+
+check_51cmd_bb_reconn_cancel:
+799c 18000e03 force page_length_timer ,queue 
+799d 20207dda branch timer_stop 
+
+check_51cmd_dhkey_not_accept:
+799e 20405a7b call tid_set_reply 
+799f 70007d41 jam lmp_dhkey_check ,mem_lmi_opcode2 
+79a0 202056ec branch lmp_reject_pdu_not_allowed 
+
+ui_check_paring_button:
+79a1 6fe0c78f fetch 1 ,mem_ui_state_map 
+79a2 c4060000 rtnbit0 ui_state_btn_down 
+79a3 c4038000 rtnbit0 ui_state_bt_reconnect 
+79a4 2020799c branch check_51cmd_bb_reconn_cancel 
+
+queue_init:
+79a5 6fe1448c fetch 2 ,mem_queue_ptr 
+79a6 1fe08a02 add pdata ,queue_offset_curr_num ,contw 
+79a7 58000000 setarg 0 
+79a8 e7e18005 istore 3 ,contw 
+79a9 20600000 rtn 
+
+queue_push:
+79aa 20407ec7 call disable_user 
+79ab 204079f4 call queue_full 
+79ac 207a0000 rtn blank 
+79ad 6fe1448c fetch 2 ,mem_queue_ptr 
+79ae 1fe0a402 add pdata ,queue_offset_curr_num ,regb 
+79af e8408012 ifetcht 1 ,regb 
+79b0 18408401 increase 1 ,temp 
+79b1 e0408012 istoret 1 ,regb 
+79b2 e840803f ifetcht 1 ,pdata 
+79b3 18427200 copy temp ,loopcnt 
+79b4 1fe0a404 add pdata ,queue_offset_write_ptr ,regb 
+79b5 efe08012 ifetch 1 ,regb 
+79b6 984ffe00 imul32 temp ,pdata 
+79b7 98c08a00 iadd contr ,contw 
+79b8 1a220c00 copy rega ,contr 
+
+calc_queue_next_ptr:
+79b9 20407dd4 call memcpy 
+79ba 204079f8 call queue_get_size 
+79bb 1fe0ffff pincrease -1 
+79bc e8408012 ifetcht 1 ,regb 
+79bd 18408401 increase 1 ,temp 
+79be 98410400 iand temp ,temp 
+79bf e0408012 istoret 1 ,regb 
+79c0 20207ec5 branch enable_user 
+
+queue_pop:
+79c1 20407ec7 call disable_user 
+79c2 204079f0 call queue_empty 
+79c3 207a0000 rtn blank 
+79c4 6fe1448c fetch 2 ,mem_queue_ptr 
+79c5 1fe0a402 add pdata ,queue_offset_curr_num ,regb 
+79c6 e8408012 ifetcht 1 ,regb 
+79c7 184085ff increase -1 ,temp 
+79c8 e0408012 istoret 1 ,regb 
+79c9 e840803f ifetcht 1 ,pdata 
+79ca 18427200 copy temp ,loopcnt 
+79cb 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+79cc efe08012 ifetch 1 ,regb 
+79cd 984ffe00 imul32 temp ,pdata 
+79ce 98c08c00 iadd contr ,contr 
+79cf 18c08c01 increase 1 ,contr 
+79d0 1a220a00 copy rega ,contw 
+79d1 202079b9 branch calc_queue_next_ptr 
+
+queue_get_new_ele:
+79d2 20407ec7 call disable_user 
+79d3 204079f0 call queue_empty 
+79d4 207a0000 rtn blank 
+79d5 6fe1448c fetch 2 ,mem_queue_ptr 
+79d6 e840803f ifetcht 1 ,pdata 
+79d7 18427200 copy temp ,loopcnt 
+79d8 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+79d9 efe08012 ifetch 1 ,regb 
+79da 984ffe00 imul32 temp ,pdata 
+79db 98c08c00 iadd contr ,contr 
+79dc 18c08c01 increase 1 ,contr 
+79dd 18c22400 copy contr ,regb 
+79de 1a220a00 copy rega ,contw 
+79df 20407dd4 call memcpy 
+79e0 20207ec5 branch enable_user 
+
+queue_store_new_ele:
+79e1 20407ec7 call disable_user 
+79e2 204079f0 call queue_empty 
+79e3 207a0000 rtn blank 
+79e4 6fe1448c fetch 2 ,mem_queue_ptr 
+79e5 e840803f ifetcht 1 ,pdata 
+79e6 18427200 copy temp ,loopcnt 
+79e7 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+79e8 efe08012 ifetch 1 ,regb 
+79e9 984ffe00 imul32 temp ,pdata 
+79ea 98c08c00 iadd contr ,contr 
+79eb 18c08a02 add contr ,2 ,contw 
+79ec 1a220c00 copy rega ,contr 
+79ed 1f20f3ff increase -1 ,loopcnt 
+79ee 20407dd4 call memcpy 
+79ef 20207ec5 branch enable_user 
+
+queue_empty:
+79f0 6fe1448c fetch 2 ,mem_queue_ptr 
+79f1 1fe08c02 add pdata ,queue_offset_curr_num ,contr 
+79f2 efe08006 ifetch 1 ,contr 
+79f3 20600000 rtn 
+
+queue_full:
+79f4 204079f8 call queue_get_size 
+79f5 e8408006 ifetcht 1 ,contr 
+79f6 98467e00 isub temp ,pdata 
+79f7 20600000 rtn 
+
+queue_get_size:
+79f8 6fe1448c fetch 2 ,mem_queue_ptr 
+79f9 1fe08c01 add pdata ,queue_offset_length ,contr 
+79fa efe08006 ifetch 1 ,contr 
+79fb 20600000 rtn 
+
+usb_isr:
+79fc 4745c031 bpatchx patch31_3 ,mem_patch31 
+79fd 6ff08c23 fetch 1 ,core_usb_status 
+79fe 2feffe03 isolate1 usb_status_reset ,pdata 
+79ff 2040fa08 call usb_init ,true 
+7a00 6ff08c23 fetch 1 ,core_usb_status 
+7a01 67f08c23 store 1 ,core_usb_status 
+7a02 67e089f6 store 1 ,mem_usb_status 
+7a03 20407a68 call usb_nak_state_judge 
+7a04 20407a90 call usb_rx 
+7a05 20407c81 call usb0_tx 
+7a06 20407cc9 call usb_tx 
+7a07 20207a60 branch usb_nak_state 
+
+usb_init:
+7a08 47464031 bpatchx patch31_4 ,mem_patch31 
+7a09 20406e5e call enable_authrom 
+7a0a 20407a27 call usb_init_param 
+7a0b 708c0000 jam 0x00 ,core_usb_config 
+7a0c 20002710 nop 10000 
+7a0d 708c18c0 jam 0xc0 ,core_usb_trig 
+7a0e 6ff10050 fetch 2 ,core_clkoff 
+7a0f 793ffe0a set0 clock_off_usb ,pdata 
+7a10 67f10050 store 2 ,core_clkoff 
+7a11 708c1100 jam 0x0 ,core_usb_hmode 
+7a12 708c003c jam 0x3c ,core_usb_config 
+7a13 58000a4f setarg mem_usb_rxbuf 
+7a14 67f10c03 store 2 ,core_usb_rx_saddr 
+7a15 67f10c07 store 2 ,core_usb_rxptr 
+7a16 58000a8f setarg mem_usb_rxbuf_end 
+7a17 67f10c05 store 2 ,core_usb_rx_eaddr 
+7a18 708c1104 jam 0x4 ,core_usb_hmode 
+7a19 708c0200 jam 0 ,core_usb_addr 
+7a1a 708c23ff jam 0xff ,core_usb_status 
+7a1b 58000c4b setarg mem_usb_clear_mem_end 
+7a1c d8a00b59 arg mem_usb_clear_mem_start ,contw 
+7a1d 98a67200 isub contw ,loopcnt 
+7a1e 20207d9b branch clear_mem 
+
+usb_offline_check_init:
+7a1f 68488b58 fetcht 1 ,mem_usb_offline_check_gpio 
+7a20 202060f4 branch gpio_config_input 
+
+usb_offline_state:
+7a21 6fe08bfa fetch 1 ,mem_usb_device_enumeration_endflag 
+7a22 207a0000 rtn blank 
+7a23 68488b58 fetcht 1 ,mem_usb_offline_check_gpio 
+7a24 204060fd call gpio_get_bit 
+7a25 2020fa08 branch usb_init ,true 
+7a26 20600000 rtn 
+
+usb_init_param:
+7a27 700b5702 jam dev_default ,mem_usb0_state 
+7a28 58000000 setarg 0x0 
+7a29 67e08a92 store 1 ,mem_remain 
+7a2a 67e10b51 store 2 ,mem_usb_zero_packet 
+7a2b 1fe0fe01 pincrease 1 
+7a2c 67e10b53 store 2 ,mem_usb_ones_packet 
+7a2d 1fe0fe01 pincrease 1 
+7a2e 67e10b55 store 2 ,mem_usb_two_packet 
+7a2f d8a00ae6 arg mem_string0 ,contw 
+7a30 58030404 setarg 0x030404 
+7a31 e7e18005 istore 3 ,contw 
+7a32 58000409 setarg 0x0409 
+7a33 e7e10005 istore 2 ,contw 
+7a34 d8a00aeb arg mem_string1 ,contw 
+7a35 38015906 setsect 0 ,0x15906 
+7a36 380610d2 setsect 1 ,0x210d2 
+7a37 38090494 setsect 2 ,0x10494 
+7a38 380c0001 setsect 3 ,0x1 
+7a39 e7e48005 istore 9 ,contw 
+7a3a d8a00b09 arg mem_string2 ,contw 
+7a3b 3801570f setsect 0 ,0x1570f 
+7a3c 38055c9a setsect 1 ,0x15c9a 
+7a3d 380a56c6 setsect 2 ,0x256c6 
+7a3e 380dcdcd setsect 3 ,0x1cdcd 
+7a3f e7e48005 istore 9 ,contw 
+7a40 38014420 setsect 0 ,0x14420 
+7a41 38065d99 setsect 1 ,0x25d99 
+7a42 380a5636 setsect 2 ,0x25636 
+7a43 380c0001 setsect 3 ,0x1 
+7a44 e7e38005 istore 7 ,contw 
+7a45 d8a00b27 arg mem_string3 ,contw 
+7a46 3801620a setsect 0 ,0x1620a 
+7a47 38040c8c setsect 1 ,0xc8c 
+7a48 380b0333 setsect 2 ,0x30333 
+7a49 380cc0c0 setsect 3 ,0xc0c0 
+7a4a e7e48005 istore 9 ,contw 
+7a4b 38003130 setsect 0 ,0x3130 
+7a4c e7e10005 istore 2 ,contw 
+7a4d 580099a4 setarg usb_kbdata_vendor_define_addr 
+7a4e 67e10a93 store 2 ,mem_hidreportdesc_kb 
+7a4f 580099ff setarg usb_msdata_addr 
+7a50 67e10a95 store 2 ,mem_hidreportdesc_m 
+7a51 d8c09aa3 arg usb_devicedata_addr ,contr 
+7a52 d8a00a97 arg mem_devicedesc ,contw 
+7a53 df200013 arg 19 ,loopcnt 
+7a54 20407dd4 call memcpy 
+7a55 d8c09ab6 arg usb_confdata_addr ,contr 
+7a56 d8a00aaa arg mem_confdesc ,contw 
+7a57 df20003c arg 60 ,loopcnt 
+7a58 20407dd4 call memcpy 
+
+usb_config_cb:
+7a59 6fe10b45 fetch 2 ,mem_cb_usb_config 
+7a5a 20207e7a branch callback_func 
+
+usb_tx_interval_config:
+7a5b 6fe08b47 fetch 1 ,mem_usb_tx_interval 
+7a5c 207a0000 rtn blank 
+7a5d 67e08acc store 1 ,mem_confdesc + 34 
+7a5e 67e08ae5 store 1 ,mem_confdesc + 59 
+7a5f 20600000 rtn 
+
+usb_nak_state:
+7a60 d8e00000 arg timer_nak ,queue 
+7a61 20407de9 call timer_check 
+7a62 247a0000 nrtn blank 
+7a63 6fe08bfb fetch 1 ,mem_usb_wakestate_onetime_flag 
+7a64 247a0000 nrtn blank 
+7a65 6fe08bfa fetch 1 ,mem_usb_device_enumeration_endflag 
+7a66 245a7d1f ncall usb_mac_wakeup_judge ,blank 
+7a67 20600000 rtn 
+
+usb_nak_state_judge:
+7a68 6fe089f6 fetch 1 ,mem_usb_status 
+7a69 c2817a6b bbit1 usb_status_nak ,usb_nak_state_timer_init 
+7a6a 20600000 rtn 
+
+usb_nak_state_timer_init:
+7a6b 20407a70 call usb0_attached_state_judge 
+7a6c 20407de8 call timer_reinit 
+7a6d 58000280 setarg timer_nak_delay 
+7a6e d8e00000 arg timer_nak ,queue 
+7a6f 20207ddb branch timer_init 
+
+usb0_attached_state_judge:
+7a70 6fe08bec fetch 1 ,mem_usb_state 
+7a71 c0817a75 bne usb_connected ,usb_clear_halt_dispose 
+7a72 700bfb00 jam 0 ,mem_usb_wakestate_onetime_flag 
+7a73 700bfc00 jam 0 ,mem_usb_mac_wakeup_trig 
+7a74 20600000 rtn 
+
+usb_clear_halt_dispose:
+7a75 6fe08bfe fetch 1 ,mem_usb_clear_halt 
+7a76 207a0000 rtn blank 
+7a77 700bfe00 jam 0 ,mem_usb_clear_halt 
+7a78 700bec02 jam usb_connected ,mem_usb_state 
+7a79 700bfa01 jam 1 ,mem_usb_device_enumeration_endflag 
+7a7a 20600000 rtn 
+
+usb_rx_no_data:
+7a7b 6fe089f6 fetch 1 ,mem_usb_status 
+7a7c c2807a9d bbit1 usb_status_setup ,usb_class_type 
+7a7d 20600000 rtn 
+
+usb_rx_data:
+7a7e 6ff08c24 fetch 1 ,core_usb_txbusy 
+7a7f c3830000 rtnbit1 usb_status_rxempty 
+7a80 69510c03 fetchr contus ,2 ,core_usb_rx_saddr 
+7a81 6a110c05 fetchr contue ,2 ,core_usb_rx_eaddr 
+7a82 68710c07 fetchr contu ,2 ,core_usb_rxptr 
+7a83 efe10003 ifetch 2 ,contu 
+7a84 1fec8400 rshift8 pdata ,temp 
+7a85 18518400 rshift4 temp ,temp 
+7a86 d8c00fff arg 0xfff ,contr 
+7a87 98c17200 iand contr ,loopcnt 
+7a88 1f222200 copy loopcnt ,rega 
+
+usb_rx_read:
+7a89 efe08003 ifetch 1 ,contu 
+7a8a e7e08005 istore 1 ,contw 
+7a8b c2007a89 loop usb_rx_read 
+7a8c 60710c07 storer contu ,2 ,core_usb_rxptr 
+7a8d 622109f8 storer rega ,2 ,mem_usb_read_len 
+7a8e 20600000 rtn 
+
+usb_data_rx:
+7a8f 20600000 rtn 
+
+usb_rx:
+7a90 4746c031 bpatchx patch31_5 ,mem_patch31 
+7a91 6fe089f6 fetch 1 ,mem_usb_status 
+7a92 c4028000 rtnbit0 usb_status_rxready 
+7a93 d8a00b59 arg mem_usb_setup ,contw 
+7a94 20407a7e call usb_rx_data 
+7a95 18427e00 copy temp ,pdata 
+7a96 c0007a98 beq 0 ,usb0_rx 
+7a97 20207a8f branch usb_data_rx 
+
+usb0_rx:
+7a98 6fe089f8 fetch 1 ,mem_usb_read_len 
+7a99 c0007a7b beq 0x00 ,usb_rx_no_data 
+7a9a c000faa4 beq 0x01 ,usb_out_one_byte 
+7a9b 1fe67c07 sub pdata ,7 ,null 
+7a9c 20610000 rtn positive 
+
+usb_class_type:
+7a9d 47474031 bpatchx patch31_6 ,mem_patch31 
+7a9e 793f8023 set0 mark_isstr ,mark 
+7a9f 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7aa0 1fe17e80 and_into 0x80 ,pdata 
+7aa1 c0407aa8 beq in_device ,usb_in_device 
+7aa2 c0007ab0 beq out_device ,usb_out_device 
+7aa3 2020137c branch assert 
+
+usb_out_one_byte:
+7aa4 6fe08b59 fetch 1 ,mem_usb_setup 
+7aa5 c3838000 rtnbit1 7 
+7aa6 20407c56 call usb_get_led_status 
+7aa7 20207ad6 branch usb0_reply_zerolen 
+
+usb_in_device:
+7aa8 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7aa9 1ff1fe00 rshift4 pdata ,pdata 
+7aaa 1fe37e00 rshift pdata ,pdata 
+7aab 1fe17e03 and_into 0x03 ,pdata 
+7aac c0007ab8 beq standard_req ,usb_in_standard_req 
+7aad c000fabe beq class_req ,usb_in_class_req 
+7aae c0017ac3 beq manufacturer_req ,usb_in_manufacturer_req 
+7aaf 2020137c branch assert 
+
+usb_out_device:
+7ab0 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7ab1 1ff1fe00 rshift4 pdata ,pdata 
+7ab2 1fe37e00 rshift pdata ,pdata 
+7ab3 1fe17e03 and_into 0x03 ,pdata 
+7ab4 c0007ac4 beq standard_req ,usb_out_standard_req 
+7ab5 c000facc beq class_req ,usb_out_class_req 
+7ab6 c0017ad1 beq manufacturer_req ,usb_out_manufacturer_req 
+7ab7 2020137c branch assert 
+
+usb_in_standard_req:
+7ab8 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7ab9 c0047ad8 beq get_configuration ,usb0_request_get_configuration 
+7aba c0037aee beq get_descriptor ,usb0_request_get_descriptor 
+7abb c0057b33 beq get_interface ,usb0_request_get_interface 
+7abc c0007b45 beq get_status ,usb0_request_get_status 
+7abd 20207ad2 branch usb0_force_stall 
+
+usb_in_class_req:
+7abe 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7abf c0017b7a beq get_idle ,usb_get_idle 
+7ac0 c000fb7e beq get_report ,usb_get_report 
+7ac1 c001fb8f beq get_protocol ,usb_get_protocol_req 
+7ac2 20207ad2 branch usb0_force_stall 
+
+usb_in_manufacturer_req:
+7ac3 20207ad2 branch usb0_force_stall 
+
+usb_out_standard_req:
+7ac4 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7ac5 c000fb99 beq clear_feature ,usb0_request_clear_feature 
+7ac6 c001fbc8 beq set_feature ,usb0_request_set_feature 
+7ac7 c002fbf3 beq set_address ,usb0_request_set_address 
+7ac8 c004fc0c beq set_configuration ,usb0_request_set_configuration 
+7ac9 c005fc27 beq set_interface ,usb0_request_set_interface 
+7aca c003fad2 beq set_descriptor ,usb0_force_stall 
+7acb 20207ad2 branch usb0_force_stall 
+
+usb_out_class_req:
+7acc 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7acd c0057c38 beq set_idle ,usb_set_idle 
+7ace c004fc4a beq set_report ,usb_set_report 
+7acf c005fc68 beq set_protocol ,usb_set_protocol_req 
+7ad0 20207ad2 branch usb0_force_stall 
+
+usb_out_manufacturer_req:
+7ad1 20207ad2 branch usb0_force_stall 
+
+usb0_force_stall:
+7ad2 6ff08c19 fetch 1 ,core_usb_stall 
+7ad3 79207e00 set1 0 ,pdata 
+7ad4 67f08c19 store 1 ,core_usb_stall 
+7ad5 20207ad6 branch usb0_reply_zerolen 
+
+usb0_reply_zerolen:
+7ad6 708c1810 jam 0x10 ,core_usb_trig 
+7ad7 20600000 rtn 
+
+usb0_request_get_configuration:
+7ad8 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7ad9 c0c07ad2 bne in_device ,usb0_force_stall 
+7ada 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7adb c0807ad2 bne 0 ,usb0_force_stall 
+7adc 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7add c0807ad2 bne 0 ,usb0_force_stall 
+7ade 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7adf c080fad2 bne 1 ,usb0_force_stall 
+7ae0 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7ae1 c0807ad2 bne 0 ,usb0_force_stall 
+7ae2 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7ae3 c0807ad2 bne 0 ,usb0_force_stall 
+7ae4 6fe08b5c fetch 1 ,mem_usb_setup_bvalue + 1 
+7ae5 c0807ad2 bne 0 ,usb0_force_stall 
+7ae6 6fe08b57 fetch 1 ,mem_usb0_state 
+7ae7 c0027aea beq dev_configured ,usb0_request_get_cfg_dev_cfg 
+7ae8 c001faec beq dev_address ,usb0_request_get_cfg_dev_addr 
+7ae9 20207ad2 branch usb0_force_stall 
+
+usb0_request_get_cfg_dev_cfg:
+7aea da400001 arg 1 ,regb 
+7aeb 20207b5f branch usb_send_ones_packet 
+
+usb0_request_get_cfg_dev_addr:
+7aec da400001 arg 1 ,regb 
+7aed 20207b5d branch usb_send_zero_packet 
+
+usb0_request_get_descriptor:
+7aee 4747c031 bpatchx patch31_7 ,mem_patch31 
+7aef 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7af0 c000fb01 beq dsc_device ,dsc_device_info 
+7af1 c0017b1a beq dsc_config ,dsc_config_info 
+7af2 c001fb1d beq dsc_string ,dsc_string_info 
+7af3 c010faf6 beq dsc_hid ,dsc_hid_info 
+7af4 c0117b2b beq dsc_hid_report ,dsc_hid_report_info 
+7af5 20207ad2 branch usb0_force_stall 
+
+dsc_hid_info:
+7af6 700be900 jam 0 ,mem_usb_get_protocol_flag 
+7af7 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7af8 c0007afb beq 0 ,dsc_hid_info_interface0 
+7af9 c000fafe beq 1 ,dsc_hid_info_interface1 
+7afa 20207ad2 branch usb0_force_stall 
+
+dsc_hid_info_interface0:
+7afb 6a408abd fetchr regb ,1 ,mem_confdesc + 19 
+7afc da200abd arg mem_confdesc + 19 ,rega 
+7afd 20207c77 branch usb0_respond 
+
+dsc_hid_info_interface1:
+7afe 6a408ad6 fetchr regb ,1 ,mem_confdesc + 44 
+7aff da200ad6 arg mem_confdesc + 44 ,rega 
+7b00 20207c77 branch usb0_respond 
+
+dsc_device_info:
+7b01 6fe08bfd fetch 1 ,mem_usb_set_high_addr_flag 
+7b02 245a7b12 ncall usb_set_high_addr ,blank 
+7b03 58000a97 setarg mem_devicedesc 
+7b04 68488a97 fetcht 1 ,mem_devicedesc 
+
+dsc_info_set_data_len:
+7b05 67e10bf4 store 2 ,mem_dsc_info_data_pointer 
+7b06 60488bf6 storet 1 ,mem_dsc_info_len 
+7b07 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b08 98467c00 isub temp ,null 
+7b09 24217b10 nbranch dsc_info_set_current_data_len ,positive 
+
+dsc_info_set_initial_data_len:
+7b0a 6fe08bf6 fetch 1 ,mem_dsc_info_len 
+
+dsc_info_set_data_size_completed:
+7b0b 98002400 iforce regb 
+7b0c 6fe10bf4 fetch 2 ,mem_dsc_info_data_pointer 
+7b0d 1fe0fe01 add pdata ,1 ,pdata 
+7b0e 98002200 iforce rega 
+7b0f 20207c77 branch usb0_respond 
+
+dsc_info_set_current_data_len:
+7b10 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b11 20207b0b branch dsc_info_set_data_size_completed 
+
+usb_set_high_addr:
+7b12 6ff08c02 fetch 1 ,core_usb_addr 
+7b13 245a7b16 ncall usb0_set_addr ,blank 
+7b14 700bfd00 jam 0 ,mem_usb_set_high_addr_flag 
+7b15 20600000 rtn 
+
+usb0_set_addr:
+7b16 6ff08c02 fetch 1 ,core_usb_addr 
+7b17 79207e07 set1 7 ,pdata 
+7b18 67f08c02 store 1 ,core_usb_addr 
+7b19 20600000 rtn 
+
+dsc_config_info:
+7b1a 58000aaa setarg mem_confdesc 
+7b1b 68488aaa fetcht 1 ,mem_confdesc 
+7b1c 20207b05 branch dsc_info_set_data_len 
+
+dsc_string_info:
+7b1d 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b1e 1fe67c03 sub pdata ,3 ,null 
+7b1f 24217ad2 nbranch usb0_force_stall ,positive 
+7b20 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b21 da200ae6 arg mem_string0 ,rega 
+7b22 c0007c75 beq 0 ,usb0_respond_length 
+7b23 79200023 set1 mark_isstr ,mark 
+7b24 da200aeb arg mem_string1 ,rega 
+7b25 c000fc75 beq 1 ,usb0_respond_length 
+7b26 da200b09 arg mem_string2 ,rega 
+7b27 c0017c75 beq 2 ,usb0_respond_length 
+7b28 da200b27 arg mem_string3 ,rega 
+7b29 c001fc75 beq 3 ,usb0_respond_length 
+7b2a 20600000 rtn 
+
+dsc_hid_report_info:
+7b2b 6fe10b5d fetch 2 ,mem_usb_setup_windex 
+7b2c c000fb2f beq 1 ,dsc_hid_report_info0 
+7b2d 6a210a93 fetchr rega ,2 ,mem_hidreportdesc_kb 
+7b2e 20207c75 branch usb0_respond_length 
+
+dsc_hid_report_info0:
+7b2f 700bfa01 jam 1 ,mem_usb_device_enumeration_endflag 
+7b30 700bec01 jam usb_got_report_req ,mem_usb_state 
+7b31 6a210a95 fetchr rega ,2 ,mem_hidreportdesc_m 
+7b32 20207c75 branch usb0_respond_length 
+
+usb0_request_get_interface:
+7b33 6fe08b57 fetch 1 ,mem_usb0_state 
+7b34 c0827ad2 bne dev_configured ,usb0_force_stall 
+7b35 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7b36 c0c0fad2 bne in_interface ,usb0_force_stall 
+7b37 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b38 c0807ad2 bne 0 ,usb0_force_stall 
+7b39 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7b3a c0807ad2 bne 0 ,usb0_force_stall 
+7b3b 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b3c c080fad2 bne 1 ,usb0_force_stall 
+7b3d 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7b3e c0807ad2 bne 0 ,usb0_force_stall 
+7b3f 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7b40 c0807ad2 bne 0 ,usb0_force_stall 
+7b41 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7b42 c0807ad2 bne 0 ,usb0_force_stall 
+7b43 da400001 arg 1 ,regb 
+7b44 20207b5d branch usb_send_zero_packet 
+
+usb0_request_get_status:
+7b45 6fe08b57 fetch 1 ,mem_usb0_state 
+7b46 c0017ad2 beq dev_default ,usb0_force_stall 
+7b47 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b48 c0807ad2 bne 0 ,usb0_force_stall 
+7b49 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7b4a c0807ad2 bne 0 ,usb0_force_stall 
+7b4b 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b4c c0817ad2 bne 2 ,usb0_force_stall 
+7b4d 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7b4e c0807ad2 bne 0 ,usb0_force_stall 
+7b4f 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7b50 c0807ad2 bne 0 ,usb0_force_stall 
+7b51 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7b52 c0407b58 beq in_device ,usb0_get_status_in_device 
+7b53 c040fb63 beq in_interface ,usb0_get_status_in_interface 
+7b54 c0417b67 beq in_endpoint ,usb0_get_status_in_endpoint 
+7b55 20207ad2 branch usb0_force_stall 
+
+usb0_sdsystem_dispose:
+7b56 700bef01 jam 1 ,mem_sdsystem_wakeup_flag 
+7b57 20207b61 branch usb_send_two_packet 
+
+usb0_get_status_in_device:
+7b58 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7b59 c0807ad2 bne 0 ,usb0_force_stall 
+7b5a da400002 arg 2 ,regb 
+7b5b 6fe08bed fetch 1 ,mem_usb_remote_wakeup 
+7b5c c000fb56 beq 0x01 ,usb0_sdsystem_dispose 
+
+usb_send_zero_packet:
+7b5d da200b51 arg mem_usb_zero_packet ,rega 
+7b5e 20207c77 branch usb0_respond 
+
+usb_send_ones_packet:
+7b5f da200b53 arg mem_usb_ones_packet ,rega 
+7b60 20207c77 branch usb0_respond 
+
+usb_send_two_packet:
+7b61 da200b55 arg mem_usb_two_packet ,rega 
+7b62 20207c77 branch usb0_respond 
+
+usb0_get_status_in_interface:
+7b63 6fe08b57 fetch 1 ,mem_usb0_state 
+7b64 c0827ad2 bne dev_configured ,usb0_force_stall 
+7b65 da400002 arg 2 ,regb 
+7b66 20207b5d branch usb_send_zero_packet 
+
+usb0_get_status_in_endpoint:
+7b67 6fe08b57 fetch 1 ,mem_usb0_state 
+7b68 c0827ad2 bne dev_configured ,usb0_force_stall 
+7b69 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7b6a c040fb74 beq in_ep1 ,usb0_get_status_in_ep_in_ep1 
+7b6b c0417b76 beq in_ep2 ,usb0_get_status_in_ep_in_ep2 
+7b6c c041fb78 beq in_ep3 ,usb0_get_status_in_ep_in_ep3 
+7b6d 1fe17e7f and_into 0x7f ,pdata 
+7b6e c0007b70 beq 0x00 ,usb0_get_status_in_ep_in_ep0 
+7b6f 20207ad2 branch usb0_force_stall 
+
+usb0_get_status_in_ep_in_ep0:
+7b70 6fe08bf0 fetch 1 ,mem_usb_ep0_stall_status 
+
+usb0_get_status_in_ep_in_ack:
+7b71 da400002 arg 2 ,regb 
+7b72 c000fb5f beq 1 ,usb_send_ones_packet 
+7b73 20207b5d branch usb_send_zero_packet 
+
+usb0_get_status_in_ep_in_ep1:
+7b74 6fe08bf1 fetch 1 ,mem_usb_ep1_stall_status 
+7b75 20207b71 branch usb0_get_status_in_ep_in_ack 
+
+usb0_get_status_in_ep_in_ep2:
+7b76 6fe08bf2 fetch 1 ,mem_usb_ep2_stall_status 
+7b77 20207b71 branch usb0_get_status_in_ep_in_ack 
+
+usb0_get_status_in_ep_in_ep3:
+7b78 6fe08bf3 fetch 1 ,mem_usb_ep3_stall_status 
+7b79 20207b71 branch usb0_get_status_in_ep_in_ack 
+
+usb_get_idle:
+7b7a 700be701 jam 1 ,mem_usb_idle_flag 
+7b7b da200be8 arg mem_usb_idle_rate ,rega 
+7b7c da400001 arg 1 ,regb 
+7b7d 20207c77 branch usb0_respond 
+
+usb_get_report:
+7b7e 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+7b7f d84001ba arg pc_get_report ,temp 
+7b80 98467c00 isub temp ,null 
+7b81 2422fad2 nbranch usb0_force_stall ,zero 
+
+usb_get_report_dispose:
+7b82 6fe08be4 fetch 1 ,mem_usb0_data_ready_report 
+7b83 243a7b8c nbranch usb_get_report_data_success ,blank 
+7b84 700ba100 jam pc_get_nondata ,mem_usb0_get_report_data 
+
+usb_get_report_send_data:
+7b85 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b86 98002400 iforce regb 
+7b87 da200ba1 arg mem_usb0_get_report_data ,rega 
+7b88 20407c77 call usb0_respond 
+
+usb_get_report_data_release:
+7b89 d8a00ba1 arg mem_usb0_get_report_data ,contw 
+7b8a df200008 arg 8 ,loopcnt 
+7b8b 20207d8c branch memset0 
+
+usb_get_report_data_success:
+7b8c 700be400 jam 0 ,mem_usb0_data_ready_report 
+7b8d 700ba101 jam pc_get_data ,mem_usb0_get_report_data 
+7b8e 20207b85 branch usb_get_report_send_data 
+
+usb_get_protocol_req:
+7b8f 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b90 c080fad2 bne 1 ,usb0_force_stall 
+7b91 700be901 jam 1 ,mem_usb_get_protocol_flag 
+7b92 da400001 arg 1 ,regb 
+7b93 6fe08beb fetch 1 ,mem_usb_set_protocol_value 
+7b94 c0007b97 beq 0 ,usb_get_report_protocol 
+7b95 c000fb98 beq 1 ,usb_get_boot_protocol 
+7b96 20207b5d branch usb_send_zero_packet 
+
+usb_get_report_protocol:
+7b97 20207b5f branch usb_send_ones_packet 
+
+usb_get_boot_protocol:
+7b98 20207b5d branch usb_send_zero_packet 
+
+usb0_request_clear_feature:
+7b99 6fe08b57 fetch 1 ,mem_usb0_state 
+7b9a c0827ad2 bne dev_configured ,usb0_force_stall 
+7b9b 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b9c c0807ad2 bne 0 ,usb0_force_stall 
+7b9d 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7b9e c0807ad2 bne 0 ,usb0_force_stall 
+7b9f 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7ba0 c0807ad2 bne 0 ,usb0_force_stall 
+7ba1 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7ba2 c0807ad2 bne 0 ,usb0_force_stall 
+7ba3 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7ba4 c0007ba8 beq out_device ,usb0_request_clear_feature_out_device 
+7ba5 c000fbb5 beq out_interface ,usb0_request_clear_feature_out_interface 
+7ba6 c0017bb6 beq out_endpoint ,usb0_request_clear_feature_out_endpoint 
+7ba7 20207ad2 branch usb0_force_stall 
+
+usb0_request_clear_feature_out_device:
+7ba8 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7ba9 c080fad2 bne device_remote_wakeup ,usb0_force_stall 
+7baa 6ff08c00 fetch 1 ,core_usb_config 
+7bab 793ffe07 set0 7 ,pdata 
+7bac 67f08c00 store 1 ,core_usb_config 
+7bad 700bed00 jam 0 ,mem_usb_remote_wakeup 
+7bae 700bee01 jam 1 ,mem_usb_clear_remote_wakeup 
+7baf 6fe08bef fetch 1 ,mem_sdsystem_wakeup_flag 
+7bb0 203a7ad6 branch usb0_reply_zerolen ,blank 
+7bb1 700bef00 jam 0 ,mem_sdsystem_wakeup_flag 
+7bb2 700bee00 jam 0 ,mem_usb_clear_remote_wakeup 
+7bb3 700bec02 jam usb_connected ,mem_usb_state 
+7bb4 20207ad6 branch usb0_reply_zerolen 
+
+usb0_request_clear_feature_out_interface:
+7bb5 20207ad2 branch usb0_force_stall 
+
+usb0_request_clear_feature_out_endpoint:
+7bb6 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7bb7 c0807ad2 bne endpoint_halt ,usb0_force_stall 
+7bb8 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7bb9 c040fbc1 beq in_ep1 ,usb0_force_stall_ep1_in_off 
+7bba c0417bc4 beq in_ep2 ,usb0_force_stall_ep2_in_off 
+7bbb c041fbc6 beq in_ep3 ,usb0_force_stall_ep3_in_off 
+7bbc 1fe17e7f and_into 0x7f ,pdata 
+7bbd c0007bbf beq 0x00 ,usb0_force_stall_ep0_in_off 
+7bbe 20207ad2 branch usb0_force_stall 
+
+usb0_force_stall_ep0_in_off:
+7bbf 700bf000 jam 0 ,mem_usb_ep0_stall_status 
+7bc0 20207ad6 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep1_in_off:
+7bc1 700bf100 jam 0 ,mem_usb_ep1_stall_status 
+
+usb0_force_stall_ep1_in_off_reply:
+7bc2 700bfe01 jam 1 ,mem_usb_clear_halt 
+7bc3 20207ad6 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep2_in_off:
+7bc4 700bf200 jam 0 ,mem_usb_ep2_stall_status 
+7bc5 20207bc2 branch usb0_force_stall_ep1_in_off_reply 
+
+usb0_force_stall_ep3_in_off:
+7bc6 700bf300 jam 0 ,mem_usb_ep3_stall_status 
+7bc7 20207bc2 branch usb0_force_stall_ep1_in_off_reply 
+
+usb0_request_set_feature:
+7bc8 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7bc9 c0807ad2 bne 0 ,usb0_force_stall 
+7bca 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7bcb c0807ad2 bne 0 ,usb0_force_stall 
+7bcc 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7bcd c0007bd1 beq out_device ,usb0_request_set_feature_out_device 
+7bce c000fbdf beq out_interface ,usb0_request_set_feature_out_interface 
+7bcf c0017be0 beq out_endpoint ,usb0_request_set_feature_out_endpoint 
+7bd0 20207ad2 branch usb0_force_stall 
+
+usb0_request_set_feature_out_device:
+7bd1 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7bd2 c080fad2 bne device_remote_wakeup ,usb0_force_stall 
+7bd3 20403779 call dongle_set_pc_sleep_flag 
+7bd4 6ff08c00 fetch 1 ,core_usb_config 
+7bd5 79207e07 set1 7 ,pdata 
+7bd6 67f08c00 store 1 ,core_usb_config 
+7bd7 700bed01 jam 1 ,mem_usb_remote_wakeup 
+7bd8 700bec03 jam usb_sleep ,mem_usb_state 
+7bd9 700be500 jam 0 ,mem_usb_tx_win_enable 
+7bda 20407ad6 call usb0_reply_zerolen 
+
+usb_wakeup_timer_reinit:
+7bdb 20407de8 call timer_reinit 
+7bdc 58001388 setarg timer_wakeup_delay 
+7bdd d8e0000f arg timer_wakeup ,queue 
+7bde 20207ddb branch timer_init 
+
+usb0_request_set_feature_out_interface:
+7bdf 20207ad2 branch usb0_force_stall 
+
+usb0_request_set_feature_out_endpoint:
+7be0 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7be1 c0807ad2 bne endpoint_halt ,usb0_force_stall 
+7be2 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7be3 c0807ad2 bne 0 ,usb0_force_stall 
+7be4 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7be5 c040fbed beq in_ep1 ,usb0_force_stall_ep1_in_on 
+7be6 c0417bef beq in_ep2 ,usb0_force_stall_ep2_in_on 
+7be7 c041fbf1 beq in_ep3 ,usb0_force_stall_ep3_in_on 
+7be8 1fe17e7f and_into 0x7f ,pdata 
+7be9 c0007beb beq 0x00 ,usb0_force_stall_ep0_in_on 
+7bea 20207ad2 branch usb0_force_stall 
+
+usb0_force_stall_ep0_in_on:
+7beb 700bf001 jam 1 ,mem_usb_ep0_stall_status 
+7bec 20207ad6 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep1_in_on:
+7bed 700bf101 jam 1 ,mem_usb_ep1_stall_status 
+7bee 20207ad6 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep2_in_on:
+7bef 700bf201 jam 1 ,mem_usb_ep2_stall_status 
+7bf0 20207ad6 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep3_in_on:
+7bf1 700bf301 jam 1 ,mem_usb_ep3_stall_status 
+7bf2 20207ad6 branch usb0_reply_zerolen 
+
+usb0_request_set_address:
+7bf3 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7bf4 c0807ad2 bne out_device ,usb0_force_stall 
+7bf5 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7bf6 c0807ad2 bne 0 ,usb0_force_stall 
+7bf7 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7bf8 c0807ad2 bne 0 ,usb0_force_stall 
+7bf9 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7bfa c0807ad2 bne 0 ,usb0_force_stall 
+7bfb 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7bfc c0807ad2 bne 0 ,usb0_force_stall 
+7bfd 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7bfe c0807ad2 bne 0 ,usb0_force_stall 
+7bff 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7c00 1fe17e80 and_into 0x80 ,pdata 
+7c01 c0807ad2 bne 0 ,usb0_force_stall 
+7c02 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7c03 c0807c0a bne 0 ,usb_usb0_state_set_dev_addr 
+
+usb_usb0_state_set_dev_default:
+7c04 700b5702 jam dev_default ,mem_usb0_state 
+
+usb0_request_set_wait_address:
+7c05 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7c06 67f08c02 store 1 ,core_usb_addr 
+7c07 20407ad6 call usb0_reply_zerolen 
+7c08 700bfd01 jam 1 ,mem_usb_set_high_addr_flag 
+7c09 20600000 rtn 
+
+usb_usb0_state_set_dev_addr:
+7c0a 700b5703 jam dev_address ,mem_usb0_state 
+7c0b 20207c05 branch usb0_request_set_wait_address 
+
+usb0_request_set_configuration:
+7c0c 6fe08b57 fetch 1 ,mem_usb0_state 
+7c0d c0017ad2 beq dev_default ,usb0_force_stall 
+7c0e 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7c0f c0807ad2 bne out_device ,usb0_force_stall 
+7c10 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7c11 c0807ad2 bne 0 ,usb0_force_stall 
+7c12 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7c13 c0807ad2 bne 0 ,usb0_force_stall 
+7c14 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7c15 c0807ad2 bne 0 ,usb0_force_stall 
+7c16 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7c17 c0807ad2 bne 0 ,usb0_force_stall 
+7c18 6fe08b5c fetch 1 ,mem_usb_setup_bvalue + 1 
+7c19 c0807ad2 bne 0 ,usb0_force_stall 
+7c1a 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7c1b 1fe67c01 sub pdata ,usb_max_num_cfg ,null 
+7c1c 24217ad2 nbranch usb0_force_stall ,positive 
+7c1d 6fe08b57 fetch 1 ,mem_usb0_state 
+7c1e c001fc21 beq dev_address ,usb0_request_set_cfg_addr_state 
+7c1f c0027c21 beq dev_configured ,usb0_request_set_cfg_cfg_state 
+7c20 20207ad2 branch usb0_force_stall 
+
+usb0_request_set_cfg_addr_state:
+
+usb0_request_set_cfg_cfg_state:
+7c21 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7c22 c0007c25 beq 0 ,usb0_request_set_cfg_stay_addr_state 
+7c23 700b5704 jam dev_configured ,mem_usb0_state 
+7c24 20207ad6 branch usb0_reply_zerolen 
+
+usb0_request_set_cfg_stay_addr_state:
+7c25 700b5703 jam dev_address ,mem_usb0_state 
+7c26 20207ad6 branch usb0_reply_zerolen 
+
+usb0_request_set_interface:
+7c27 6fe08b57 fetch 1 ,mem_usb0_state 
+7c28 c0827ad2 bne dev_configured ,usb0_force_stall 
+7c29 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7c2a c080fad2 bne out_interface ,usb0_force_stall 
+7c2b 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7c2c c0807ad2 bne 0 ,usb0_force_stall 
+7c2d 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7c2e c0807ad2 bne 0 ,usb0_force_stall 
+7c2f 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7c30 c0807ad2 bne 0 ,usb0_force_stall 
+7c31 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7c32 c0807ad2 bne 0 ,usb0_force_stall 
+7c33 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7c34 c0807ad2 bne 0 ,usb0_force_stall 
+7c35 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7c36 c0807ad2 bne 0 ,usb0_force_stall 
+7c37 20207ad6 branch usb0_reply_zerolen 
+
+usb_set_idle:
+7c38 47484032 bpatchx patch32_0 ,mem_patch32 
+7c39 700be701 jam 1 ,mem_usb_idle_flag 
+7c3a 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7c3b 67e08be8 store 1 ,mem_usb_idle_rate 
+7c3c 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7c3d 1fe67c01 sub pdata ,1 ,null 
+7c3e 2042fc46 call usb_clear_remote_wakeup_set0 ,zero 
+7c3f 6fe08bec fetch 1 ,mem_usb_state 
+7c40 c0827ad6 bne usb_resume ,usb0_reply_zerolen 
+7c41 700bec02 jam usb_connected ,mem_usb_state 
+7c42 20407ad6 call usb0_reply_zerolen 
+7c43 20007530 nop 30000 
+7c44 20007530 nop 30000 
+7c45 20600000 rtn 
+
+usb_clear_remote_wakeup_set0:
+7c46 700bfa01 jam 1 ,mem_usb_device_enumeration_endflag 
+7c47 700bee00 jam 0 ,mem_usb_clear_remote_wakeup 
+7c48 700bec04 jam usb_resume ,mem_usb_state 
+7c49 20600000 rtn 
+
+usb_set_report:
+7c4a d8a00b61 arg mem_usb0_set_report_data ,contw 
+7c4b 20407a7e call usb_rx_data 
+7c4c 700be301 jam 1 ,mem_usb0_get_set_report 
+7c4d 20407c5a call usb_set_report_resume_judge 
+7c4e 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+7c4f 67e10be1 store 2 ,mem_usb_setup_bvalue_temp 
+7c50 20407ad6 call usb0_reply_zerolen 
+7c51 6fe0c09a fetch 1 ,mem_device_option 
+7c52 c1820000 rtnne dvc_op_dongle 
+7c53 6fe08be5 fetch 1 ,mem_usb_tx_win_enable 
+7c54 207a0000 rtn blank 
+7c55 6fe08b61 fetch 1 ,mem_usb0_set_report_data 
+
+usb_get_led_status:
+7c56 67e0c8ce store 1 ,mem_24g_led_status 
+7c57 700be500 jam 0 ,mem_usb_tx_win_enable 
+7c58 7048be03 jam kb_led_ackpayload ,mem_24g_ackpayload_enable 
+7c59 20600000 rtn 
+
+usb_set_report_resume_judge:
+7c5a 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+7c5b d8400200 arg pc_set_report_bvalue ,temp 
+7c5c 98467c00 isub temp ,null 
+7c5d 24628000 nrtn zero 
+7c5e 6fe10b5d fetch 2 ,mem_usb_setup_windex 
+7c5f d8400000 arg pc_set_report_windex ,temp 
+7c60 98467c00 isub temp ,null 
+7c61 24628000 nrtn zero 
+7c62 6fe10b5f fetch 2 ,mem_usb_setup_blength 
+7c63 d8400001 arg pc_set_report_blength ,temp 
+7c64 98467c00 isub temp ,null 
+7c65 24628000 nrtn zero 
+7c66 700be501 jam 1 ,mem_usb_tx_win_enable 
+7c67 20600000 rtn 
+
+usb_set_protocol_req:
+7c68 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7c69 c0807ad2 bne 0 ,usb0_force_stall 
+7c6a 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7c6b c0007c6e beq boot_protocol ,usb_set_boot_protocol 
+7c6c c000fc71 beq report_protocol ,usb_set_report_protocol 
+7c6d 20207ad2 branch usb0_force_stall 
+
+usb_set_boot_protocol:
+7c6e 700bea00 jam 0 ,mem_usb_set_protocol_status 
+7c6f 700beb01 jam 1 ,mem_usb_set_protocol_value 
+7c70 20207ad6 branch usb0_reply_zerolen 
+
+usb_set_report_protocol:
+7c71 700be601 jam 1 ,mem_usb_tx_mac_enable 
+7c72 700bea01 jam 1 ,mem_usb_set_protocol_status 
+7c73 700beb00 jam 0 ,mem_usb_set_protocol_value 
+7c74 20207ad6 branch usb0_reply_zerolen 
+
+usb0_respond_length:
+7c75 ea408011 ifetchr regb ,1 ,rega 
+7c76 1a20a201 increase 1 ,rega 
+
+usb0_respond:
+7c77 4748c032 bpatchx patch32_1 ,mem_patch32 
+7c78 7920000e set1 mark_usb_first_resp ,mark 
+7c79 c591fc7c bmark0 mark_isstr ,usb0_respond_nostr 
+7c7a 1a40a401 increase 1 ,regb 
+7c7b 1a43a400 lshift regb ,regb 
+
+usb0_respond_nostr:
+7c7c 62210a90 storer rega ,2 ,mem_bufptr 
+7c7d 62408a92 storer regb ,1 ,mem_remain 
+7c7e 20207c81 branch usb0_tx 
+
+usb_no_respond_data:
+7c7f d8e00000 arg 0 ,queue 
+7c80 20207cc1 branch usb_trig 
+
+usb0_tx:
+7c81 47494032 bpatchx patch32_2 ,mem_patch32 
+7c82 6ff08c24 fetch 1 ,core_usb_txbusy 
+7c83 c3800000 rtnbit1 0 
+7c84 6fe08a92 fetch 1 ,mem_remain 
+7c85 207a0000 rtn blank 
+7c86 1fe27200 copy pdata ,loopcnt 
+7c87 98000400 iforce temp 
+7c88 6fe10b5f fetch 2 ,mem_usb_setup_blength 
+7c89 1fe67c40 sub pdata ,ep0_packet_size ,null 
+7c8a 20217c8f branch usb0_tx_short ,positive 
+7c8b 1f267c40 sub loopcnt ,ep0_packet_size ,null 
+7c8c 20217c93 branch usb0_tx_info ,positive 
+7c8d 18007240 force ep0_packet_size ,loopcnt 
+7c8e 20207c93 branch usb0_tx_info 
+
+usb0_tx_short:
+7c8f 9f267c00 isub loopcnt ,null 
+7c90 20217c93 branch usb0_tx_info ,positive 
+7c91 98007200 iforce loopcnt 
+7c92 67e08a92 store 1 ,mem_remain 
+
+usb0_tx_info:
+7c93 6fe08a92 fetch 1 ,mem_remain 
+7c94 9f267e00 isub loopcnt ,pdata 
+7c95 67e08a92 store 1 ,mem_remain 
+7c96 1f20ffff add loopcnt ,-1 ,pdata 
+7c97 67e089fa store 1 ,mem_usb_txbuf 
+7c98 c591fca5 bmark0 mark_isstr ,usb0_tx_nostr 
+7c99 1fe37e00 rshift pdata ,pdata 
+7c9a 1f20ffff add loopcnt ,-1 ,pdata 
+7c9b 67e089fa store 1 ,mem_usb_txbuf 
+7c9c c5877ca5 bmark0 mark_usb_first_resp ,usb0_tx_nostr 
+7c9d 793f800e set0 mark_usb_first_resp ,mark 
+7c9e e0408005 istoret 1 ,contw 
+7c9f 58000003 setarg 3 
+7ca0 e7e08005 istore 1 ,contw 
+7ca1 1f20f3ff increase -1 ,loopcnt 
+7ca2 1f227e00 copy loopcnt ,pdata 
+7ca3 2422fca5 nbranch usb0_tx_nostr ,zero 
+7ca4 1f20f201 increase 1 ,loopcnt 
+
+usb0_tx_nostr:
+7ca5 6fe10a90 fetch 2 ,mem_bufptr 
+7ca6 1fe20c00 copy pdata ,contr 
+
+usb0_tx0:
+7ca7 efe08006 ifetch 1 ,contr 
+7ca8 e7e08005 istore 1 ,contw 
+7ca9 c591fcac bmark0 mark_isstr ,usb0_tx1 
+7caa 58000000 setarg 0 
+7cab e7e08005 istore 1 ,contw 
+
+usb0_tx1:
+7cac c2007ca7 loop usb0_tx0 
+7cad 18c27e00 copy contr ,pdata 
+7cae 67e10a90 store 2 ,mem_bufptr 
+7caf 580009fa setarg mem_usb_txbuf 
+7cb0 67f10c09 store 2 ,core_usb_tx_saddr0 
+7cb1 d8e00000 arg 0 ,queue 
+7cb2 20407cc1 call usb_trig 
+7cb3 6fe08a92 fetch 1 ,mem_remain 
+7cb4 247a0000 nrtn blank 
+7cb5 6fe08bec fetch 1 ,mem_usb_state 
+7cb6 c1808000 rtnne usb_got_report_req 
+7cb7 700bec02 jam usb_connected ,mem_usb_state 
+7cb8 20600000 rtn 
+
+usb_tx_ep1:
+7cb9 d8e00001 arg 1 ,queue 
+7cba da200a3b arg mem_usb_txbuf1 ,rega 
+7cbb 62310c0b storer rega ,2 ,core_usb_tx_saddr1 
+
+usb_tx_buf:
+7cbc 1f20ffff add loopcnt ,-1 ,pdata 
+7cbd e7e08011 istore 1 ,rega 
+
+usb_tx_loop:
+7cbe efe08006 ifetch 1 ,contr 
+7cbf e7e08005 istore 1 ,contw 
+7cc0 c2007cbe loop usb_tx_loop 
+
+usb_trig:
+7cc1 58000000 setarg 0 
+7cc2 f9207e00 qset1 pdata 
+7cc3 67f08c18 store 1 ,core_usb_trig 
+7cc4 20600000 rtn 
+
+usb_tx_ep2:
+7cc5 d8e00002 arg 2 ,queue 
+7cc6 da200a45 arg mem_usb_txbuf2 ,rega 
+7cc7 62310c0d storer rega ,2 ,core_usb_tx_saddr2 
+7cc8 20207cbc branch usb_tx_buf 
+
+usb_tx:
+7cc9 4749c032 bpatchx patch32_3 ,mem_patch32 
+7cca 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7ccb 207a0000 rtn blank 
+7ccc 6fe08bfa fetch 1 ,mem_usb_device_enumeration_endflag 
+7ccd 203a7ced branch usb_tx_fifo_release ,blank 
+7cce 6fe08bec fetch 1 ,mem_usb_state 
+7ccf c001fd27 beq usb_sleep ,usb_windows_wakeup 
+7cd0 c0817ced bne usb_connected ,usb_tx_fifo_release 
+7cd1 6fe08bee fetch 1 ,mem_usb_clear_remote_wakeup 
+7cd2 243a7ced nbranch usb_tx_fifo_release ,blank 
+7cd3 20407cd5 call usb_tx_data_ep1 
+7cd4 20207ce0 branch usb_tx_data_ep2 
+
+usb_tx_data_ep1:
+7cd5 6ff08c24 fetch 1 ,core_usb_txbusy 
+7cd6 c3808000 rtnbit1 1 
+7cd7 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7cd8 c4008000 rtnbit0 1 
+7cd9 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7cda 793ffe01 set0 1 ,pdata 
+7cdb 67e08bf9 store 1 ,mem_usb_tx_enable 
+7cdc 6fe08bf7 fetch 1 ,mem_usb_ep1_data 
+7cdd 207a0000 rtn blank 
+7cde c0087d0f beq usb_ep1_kb ,usb_tx_kb_normal_data 
+7cdf 2020137c branch assert 
+
+usb_tx_data_ep2:
+7ce0 6ff08c24 fetch 1 ,core_usb_txbusy 
+7ce1 c3810000 rtnbit1 2 
+7ce2 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7ce3 c4010000 rtnbit0 2 
+7ce4 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7ce5 793ffe02 set0 2 ,pdata 
+7ce6 67e08bf9 store 1 ,mem_usb_tx_enable 
+7ce7 6fe08bf8 fetch 1 ,mem_usb_ep2_data 
+7ce8 207a0000 rtn blank 
+7ce9 c0107cf0 beq usb_ep2_ms ,usb_tx_ms_data 
+7cea c010fd0b beq usb_ep2_multikey ,usb_tx_kb_multikey_data 
+7ceb c0117d13 beq usb_ep2_systemkey ,usb_tx_kb_systemkey_data 
+7cec 2020137c branch assert 
+
+usb_tx_fifo_release:
+7ced d8a00bff arg mem_usb_mouse_data ,contw 
+7cee df200008 arg 8 ,loopcnt 
+7cef 20207d8c branch memset0 
+
+usb_tx_ms_data:
+7cf0 6fe08be7 fetch 1 ,mem_usb_idle_flag 
+7cf1 68488be9 fetcht 1 ,mem_usb_get_protocol_flag 
+7cf2 98417e00 iand temp ,pdata 
+7cf3 203a7d07 branch usb_tx_ms_data_normal_mode ,blank 
+7cf4 68488bea fetcht 1 ,mem_usb_set_protocol_status 
+7cf5 9840fe00 iadd temp ,pdata 
+7cf6 c000fcf8 beq mac_boot_mode ,usb_tx_ms_data_mac_boot_mode 
+7cf7 20207d07 branch usb_tx_ms_data_normal_mode 
+
+usb_tx_ms_data_mac_boot_mode:
+7cf8 700bf800 jam 0 ,mem_usb_ep2_data 
+
+usb_tx_ms_data_mac_boot_regroup:
+7cf9 6fe08c00 fetch 1 ,mem_usb_mouse_data + 1 
+7cfa c0017d08 beq r_key ,usb_tx_mac_boot_ms_regroup_r_or_lrkey 
+7cfb c001fd08 beq lr_key ,usb_tx_mac_boot_ms_regroup_r_or_lrkey 
+7cfc 6fe08c00 fetch 1 ,mem_usb_mouse_data + 1 
+7cfd 67e08bff store 1 ,mem_usb_mouse_data 
+7cfe 6fe08c01 fetch 1 ,mem_usb_mouse_data + 2 
+7cff e7e08005 istore 1 ,contw 
+7d00 6fe08c03 fetch 1 ,mem_usb_mouse_data + 4 
+7d01 e7e08005 istore 1 ,contw 
+7d02 6fe08c05 fetch 1 ,mem_usb_mouse_data + 6 
+7d03 e7e08005 istore 1 ,contw 
+7d04 df200004 arg 4 ,loopcnt 
+7d05 d8c00bff arg mem_usb_mouse_data ,contr 
+7d06 20207cc5 branch usb_tx_ep2 
+
+usb_tx_ms_data_normal_mode:
+7d07 700bf800 jam 0 ,mem_usb_ep2_data 
+
+usb_tx_mac_boot_ms_regroup_r_or_lrkey:
+7d08 df200008 arg 8 ,loopcnt 
+7d09 d8c00bff arg mem_usb_mouse_data ,contr 
+7d0a 20207cc5 branch usb_tx_ep2 
+
+usb_tx_kb_multikey_data:
+7d0b 700bf800 jam 0 ,mem_usb_ep2_data 
+7d0c df200003 arg 3 ,loopcnt 
+7d0d d8c00c1f arg mem_usb_kb_multikey ,contr 
+7d0e 20207cc5 branch usb_tx_ep2 
+
+usb_tx_kb_normal_data:
+7d0f 700bf700 jam 0 ,mem_usb_ep1_data 
+7d10 df200008 arg 8 ,loopcnt 
+7d11 d8c00c0f arg mem_usb_kb_data ,contr 
+7d12 20207cb9 branch usb_tx_ep1 
+
+usb_tx_kb_systemkey_data:
+7d13 700bf800 jam 0 ,mem_usb_ep2_data 
+7d14 df200002 arg 2 ,loopcnt 
+7d15 d8c00c2f arg mem_usb_kb_system ,contr 
+7d16 20207cc5 branch usb_tx_ep2 
+
+usb_inwake_state_tx_dispose:
+7d17 6fe08bec fetch 1 ,mem_usb_state 
+7d18 c0017d1a beq usb_connected ,usb_mac_wakeup_trig 
+7d19 20600000 rtn 
+
+usb_mac_wakeup_trig:
+7d1a 6ff08c00 fetch 1 ,core_usb_config 
+7d1b 79207e07 set1 7 ,pdata 
+7d1c 67f08c00 store 1 ,core_usb_config 
+7d1d 700bfc01 jam 1 ,mem_usb_mac_wakeup_trig 
+7d1e 20600000 rtn 
+
+usb_mac_wakeup_judge:
+7d1f 6fe08bec fetch 1 ,mem_usb_state 
+7d20 c1018000 rtneq usb_sleep 
+7d21 c0017d23 beq usb_connected ,usb_mac_wakeup 
+7d22 20600000 rtn 
+
+usb_mac_wakeup:
+7d23 6fe08bfc fetch 1 ,mem_usb_mac_wakeup_trig 
+7d24 207a0000 rtn blank 
+7d25 700bfb01 jam 1 ,mem_usb_wakestate_onetime_flag 
+7d26 20207d2a branch usb_wakeup 
+
+usb_windows_wakeup:
+7d27 d8e0000f arg timer_wakeup ,queue 
+7d28 20407de9 call timer_check 
+7d29 247a0000 nrtn blank 
+
+usb_wakeup:
+7d2a 6ff08c00 fetch 1 ,core_usb_config 
+7d2b c4038000 rtnbit0 7 
+7d2c 708c00fc jam 0xfc ,core_usb_config 
+7d2d 20007530 nop 30000 
+7d2e 708c003c jam 0x3c ,core_usb_config 
+7d2f 20600000 rtn 
+
+right_shift_n:
+7d30 1f267c00 sub loopcnt ,0 ,null 
+7d31 20628000 rtn zero 
+
+right_shift_n_loop:
+7d32 1fe37e00 rshift pdata ,pdata 
+7d33 c2007d32 loop right_shift_n_loop 
+7d34 20600000 rtn 
+
+left_shift_n:
+7d35 18007e01 force 1 ,pdata 
+7d36 1f267c00 sub loopcnt ,0 ,null 
+7d37 20628000 rtn zero 
+
+left_shift_n_loop:
+7d38 1fe3fe00 lshift pdata ,pdata 
+7d39 c2007d38 loop left_shift_n_loop 
+7d3a 20600000 rtn 
+
+push_stack:
+7d3b 60a1097d storer contw ,2 ,mem_contw 
+7d3c 604c0964 storet 8 ,mem_temp 
+7d3d 6162096c storer timeup ,4 ,mem_timeup 
+7d3e 20407d43 call push_stack_rega_b_c 
+7d3f 60c1097b storer contr ,2 ,mem_contr 
+7d40 67210987 storer loopcnt ,2 ,mem_loopcnt 
+7d41 60e10985 storer queue ,2 ,mem_queue 
+7d42 20600000 rtn 
+
+push_stack_rega_b_c:
+7d43 62220970 storer rega ,4 ,mem_rega 
+7d44 62420974 storer regb ,4 ,mem_regb 
+7d45 62618978 storer regc ,3 ,mem_regc 
+7d46 20600000 rtn 
+
+pop_stack:
+7d47 6fe1097d fetch 2 ,mem_contw 
+7d48 98000a00 iforce contw 
+7d49 684c0964 fetcht 8 ,mem_temp 
+7d4a 6962096c fetchr timeup ,4 ,mem_timeup 
+7d4b 20407d51 call pop_stack_rega_b_c 
+7d4c 6f210987 fetchr loopcnt ,2 ,mem_loopcnt 
+7d4d 68e10985 fetchr queue ,2 ,mem_queue 
+7d4e 6fe1097b fetch 2 ,mem_contr 
+7d4f 98000c00 iforce contr 
+7d50 20600000 rtn 
+
+pop_stack_rega_b_c:
+7d51 6a220970 fetchr rega ,4 ,mem_rega 
+7d52 6a420974 fetchr regb ,4 ,mem_regb 
+7d53 6a618978 fetchr regc ,3 ,mem_regc 
+7d54 20600000 rtn 
+
+get_contw:
+7d55 6fe1097d fetch 2 ,mem_contw 
+7d56 1fe20a00 copy pdata ,contw 
+7d57 20600000 rtn 
+
+get_contr:
+7d58 6fe1097b fetch 2 ,mem_contr 
+7d59 1fe20c00 copy pdata ,contr 
+7d5a 20600000 rtn 
+
+store_contw:
+7d5b 18a27e00 copy contw ,pdata 
+7d5c 67e1097d store 2 ,mem_contw 
+7d5d 20600000 rtn 
+
+store_contr:
+7d5e 18c27e00 copy contr ,pdata 
+7d5f 67e1097b store 2 ,mem_contr 
+7d60 20600000 rtn 
+
+save_cont_pointers:
+7d61 18a27e00 copy contw ,pdata 
+7d62 67e10959 store 2 ,mem_hold_contw 
+7d63 18c27e00 copy contr ,pdata 
+7d64 67e10957 store 2 ,mem_hold_contr 
+7d65 20600000 rtn 
+
+load_cont_pointers:
+7d66 6fe10959 fetch 2 ,mem_hold_contw 
+7d67 1fe20a00 copy pdata ,contw 
+7d68 6fe10957 fetch 2 ,mem_hold_contr 
+7d69 1fe20c00 copy pdata ,contr 
+7d6a 20600000 rtn 
+
+get_diff:
+7d6b 98462200 isub temp ,rega 
+7d6c 20610000 rtn positive 
+7d6d da200100 arg 0x100 ,rega 
+7d6e 9a20fe00 iadd rega ,pdata 
+7d6f 98462200 isub temp ,rega 
+7d70 20600000 rtn 
+
+memcpy96:
+7d71 20407d7d call memcpy32 
+
+memcpy64:
+7d72 20407d7d call memcpy32 
+7d73 20207d7d branch memcpy32 
+
+memcpy20:
+7d74 20407d79 call memcpy8 
+
+memcpy12:
+7d75 20407d79 call memcpy8 
+
+memcpy4:
+7d76 efe20006 ifetch 4 ,contr 
+7d77 e7e20005 istore 4 ,contw 
+7d78 20600000 rtn 
+
+memcpy8:
+7d79 efe40006 ifetch 8 ,contr 
+7d7a e7e40005 istore 8 ,contw 
+7d7b 20600000 rtn 
+
+memcpy48:
+7d7c 20407d7f call memcpy16 
+
+memcpy32:
+7d7d 20407d79 call memcpy8 
+
+memcpy24:
+7d7e 20407d79 call memcpy8 
+
+memcpy16:
+7d7f 20407d79 call memcpy8 
+7d80 20207d79 branch memcpy8 
+
+delay:
+7d81 1fe0ffff increase -1 ,pdata 
+7d82 20000026 nop 38 
+7d83 243a7d81 nbranch delay ,blank 
+7d84 20600000 rtn 
+
+delay_10ms:
+7d85 df20000a arg 10 ,loopcnt 
+
+delay_ms_wait:
+7d86 20002ee0 nop 12000 
+7d87 c2007d86 loop delay_ms_wait 
+7d88 20600000 rtn 
+
+delay_50ms:
+7d89 df200032 arg 50 ,loopcnt 
+7d8a 20207d86 branch delay_ms_wait 
+
+bn_zero:
+7d8b 18007203 force 3 ,loopcnt 
+
+memset0:
+7d8c 18007e00 force 0 ,pdata 
+
+memset8:
+7d8d e7e40005 istore 8 ,contw 
+7d8e c2007d8d loop memset8 
+7d8f 20600000 rtn 
+
+memset0_16:
+7d90 20407d91 call memset0_8 
+
+memset0_8:
+7d91 18007e00 force 0 ,pdata 
+7d92 e7e40005 istore 8 ,contw 
+7d93 20600000 rtn 
+
+memset0_4:
+7d94 18007e00 force 0 ,pdata 
+7d95 e7e20005 istore 4 ,contw 
+7d96 20600000 rtn 
+
+clear_mem_256:
+7d97 18007204 force 4 ,loopcnt 
+7d98 20207d8c branch memset0 
+
+clear_mem_512:
+7d99 18007208 force 8 ,loopcnt 
+7d9a 20207d8c branch memset0 
+
+clear_mem:
+7d9b 1f227e00 deposit loopcnt 
+7d9c 207a0000 rtn blank 
+7d9d 58000000 setarg 0 
+
+clear_mem_loop:
+7d9e e7e08005 istore 1 ,contw 
+7d9f c2007d9e loop clear_mem_loop 
+7da0 20600000 rtn 
+
+clear_temp_block:
+7da1 df200020 arg 32 ,loopcnt 
+7da2 d8a0098e arg mem_temp_block0 ,contw 
+7da3 20207d9b branch clear_mem 
+
+xor_loop:
+7da4 efe20013 ifetch 4 ,regc 
+7da5 e8420011 ifetcht 4 ,rega 
+7da6 9842fe00 ixor temp ,pdata 
+7da7 e7e20005 istore 4 ,contw 
+7da8 1a20a204 increase 4 ,rega 
+7da9 1a60a604 increase 4 ,regc 
+7daa c2007da4 loop xor_loop 
+7dab 20600000 rtn 
+
+inverse_data:
+7dac 474a4032 bpatchx patch32_4 ,mem_patch32 
+7dad 1f227e00 copy loopcnt ,pdata 
+7dae 1fe67c01 sub pdata ,1 ,null 
+7daf 20610000 rtn positive 
+7db0 9a20a400 iadd rega ,regb 
+7db1 1a40a5ff increase -1 ,regb 
+7db2 1f237200 rshift loopcnt ,loopcnt 
+
+inverse_loop:
+7db3 e8408011 ifetcht 1 ,rega 
+7db4 efe08012 ifetch 1 ,regb 
+7db5 e7e08011 istore 1 ,rega 
+7db6 e0408012 istoret 1 ,regb 
+7db7 1a40a5ff increase -1 ,regb 
+7db8 1a20a201 increase 1 ,rega 
+7db9 c2007db3 loop inverse_loop 
+7dba 20600000 rtn 
+
+le2be_6byte:
+
+inverse_data_6byte:
+7dbb 1fef0400 rshift32 pdata ,temp 
+7dbc 20407dc1 call inverse_data_4byte 
+7dbd 18508400 byteswap temp ,temp 
+7dbe 1ff07e00 lshift16 pdata ,pdata 
+7dbf 9841fe00 ior temp ,pdata 
+7dc0 20600000 rtn 
+
+le2be_4byte:
+
+inverse_data_4byte:
+7dc1 1ff10c00 rshift16 pdata ,contr 
+7dc2 18d08c00 byteswap contr ,contr 
+7dc3 1ff0fe00 byteswap pdata ,pdata 
+7dc4 1ff07e00 lshift16 pdata ,pdata 
+7dc5 98c1fe00 ior contr ,pdata 
+7dc6 20600000 rtn 
+
+memcpy_fast:
+7dc7 1f227e00 deposit loopcnt 
+7dc8 207a0000 rtn blank 
+
+memcpy_fast_loop:
+7dc9 1f20f3f8 increase -8 ,loopcnt 
+7dca 20417d79 call memcpy8 ,positive 
+7dcb 20628000 rtn zero 
+7dcc 20217dc9 branch memcpy_fast_loop ,positive 
+7dcd 1f20f208 increase 8 ,loopcnt 
+
+memcpy_fast_loop_four:
+7dce 1f20f3fc increase -4 ,loopcnt 
+7dcf 20417d76 call memcpy4 ,positive 
+7dd0 20628000 rtn zero 
+7dd1 20217dce branch memcpy_fast_loop_four ,positive 
+7dd2 1f20f204 increase 4 ,loopcnt 
+7dd3 20207dd4 branch memcpy 
+
+memcpy:
+7dd4 1f227e00 deposit loopcnt 
+7dd5 207a0000 rtn blank 
+
+memcpy_loop:
+7dd6 efe08006 ifetch 1 ,contr 
+7dd7 e7e08005 istore 1 ,contw 
+7dd8 c2007dd6 loop memcpy_loop 
+7dd9 20600000 rtn 
+
+timer_stop:
+7dda 58000000 setarg 0 
+
+timer_init:
+7ddb 1c430400 rshift clkn_bt ,temp 
+7ddc 604a409c storet 4 ,mem_last_clkn 
+7ddd d8a041aa arg mem_timers ,contw 
+7dde 98000400 iforce temp 
+7ddf 18e3fe00 lshift queue ,pdata 
+7de0 98a08a00 iadd contw ,contw 
+7de1 e0410005 istoret 2 ,contw 
+7de2 474ac032 bpatchx patch32_5 ,mem_patch32 
+7de3 20600000 rtn 
+
+timer_check_timeout:
+7de4 d9600800 arg 0x800 ,timeup 
+7de5 19701600 lshift16 timeup ,timeup 
+7de6 9960fe00 iadd timeup ,pdata 
+7de7 20600000 rtn 
+
+timer_reinit:
+7de8 d8e00000 arg 0 ,queue 
+
+timer_check:
+7de9 474b4032 bpatchx patch32_6 ,mem_patch32 
+7dea 684a409c fetcht 4 ,mem_last_clkn 
+7deb 1c437e00 rshift clkn_bt ,pdata 
+7dec 67e2409c store 4 ,mem_last_clkn 
+7ded 98467c00 isub temp ,null 
+7dee 24417de4 ncall timer_check_timeout ,positive 
+7def 98461600 isub temp ,timeup 
+7df0 19620400 copy timeup ,temp 
+7df1 d8c041aa arg mem_timers ,contr 
+7df2 18c20a00 copy contr ,contw 
+7df3 df200010 arg 16 ,loopcnt 
+
+timer_loop:
+7df4 efe10006 ifetch 2 ,contr 
+7df5 98467e00 isub temp ,pdata 
+7df6 20217df8 branch timer_counting ,positive 
+7df7 18007e00 force 0 ,pdata 
+
+timer_counting:
+7df8 e7e10005 istore 2 ,contw 
+7df9 c2007df4 loop timer_loop 
+7dfa d8c041aa arg mem_timers ,contr 
+7dfb 18e3fe00 lshift queue ,pdata 
+7dfc 98c08c00 iadd contr ,contr 
+7dfd efe10006 ifetch 2 ,contr 
+7dfe 20600000 rtn 
+
+clk_add:
+7dff 98408400 iadd temp ,temp 
+7e00 18427200 copy temp ,loopcnt 
+7e01 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+7e02 9f267e00 isub loopcnt ,pdata 
+7e03 20610000 rtn positive 
+7e04 1fe67e00 sub pdata ,0 ,pdata 
+7e05 18510400 rshift16 temp ,temp 
+7e06 18408401 increase 1 ,temp 
+7e07 18500400 lshift16 temp ,temp 
+7e08 98418400 ior temp ,temp 
+7e09 20600000 rtn 
+
+clk_diff_rt:
+7e0a 20407e0c call clk_diff 
+7e0b 20207e19 branch clk2rt 
+
+clk_diff:
+7e0c 78547c00 disable user 
+7e0d 98467e00 isub temp ,pdata 
+7e0e 20217e11 branch clk_diff_pos ,positive 
+7e0f 78347c00 enable user 
+7e10 1fe67e00 sub pdata ,0 ,pdata 
+
+clk_diff_pos:
+7e11 c4078000 rtnbit0 15 
+7e12 1fe22800 copy pdata ,regab 
+7e13 d8410000 arg 0x10000 ,temp 
+7e14 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+7e15 98467e00 isub temp ,pdata 
+7e16 9a80fe00 iadd regab ,pdata 
+7e17 793ffe40 set0 64 ,pdata 
+7e18 20600000 rtn 
+
+clk2rt:
+7e19 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+7e1a 98000c00 iforce contr 
+7e1b 1ff17e00 rshift16 pdata ,pdata 
+7e1c 984ffe00 imul32 temp ,pdata 
+7e1d 98c0fe00 iadd contr ,pdata 
+7e1e 20600000 rtn 
+
+clk2lpo:
+7e1f 1fed7e00 lshift8 pdata ,pdata 
+7e20 1ff27e00 lshift4 pdata ,pdata 
+7e21 6849c174 fetcht 3 ,mem_clks_per_lpo 
+7e22 9846fc00 idiv temp 
+7e23 20407e64 call wait_div_end 
+7e24 18078400 quotient temp 
+7e25 20600000 rtn 
+
+clk2bt:
+7e26 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+7e27 9846fc00 idiv temp 
+7e28 20407e61 call get_div_result 
+7e29 1ff07e00 lshift16 pdata ,pdata 
+7e2a 18070400 remainder temp 
+7e2b 98418400 ior temp ,temp 
+7e2c 20600000 rtn 
+
+string2dec_from_uart:
+7e2d d8400000 arg 0 ,temp 
+
+string2dec_from_uart_done:
+7e2e 18422800 copy temp ,regab 
+7e2f efe08003 ifetch 1 ,contu 
+7e30 20407e39 call uchar2dialog 
+7e31 1a820400 copy regab ,temp 
+7e32 20407e73 call swap 
+7e33 da40000a arg 10 ,regb 
+7e34 9a4ffe00 imul32 regb ,pdata 
+7e35 9840fe00 iadd temp ,pdata 
+7e36 1fe20400 copy pdata ,temp 
+7e37 c2007e2e loop string2dec_from_uart_done 
+7e38 20600000 rtn 
+
+uchar2dialog:
+7e39 d840003a arg 0x3a ,temp 
+7e3a 98467c00 isub temp ,null 
+7e3b 24217e42 nbranch uchar2dialog_number ,positive 
+7e3c d8400061 arg 0x61 ,temp 
+7e3d 98467c00 isub temp ,null 
+7e3e 20217e45 branch uchar2dialog_a2f ,positive 
+7e3f d8400037 arg 0x37 ,temp 
+7e40 98467e00 isub temp ,pdata 
+7e41 20600000 rtn 
+
+uchar2dialog_number:
+7e42 d8400030 arg 0x30 ,temp 
+7e43 98467e00 isub temp ,pdata 
+7e44 20600000 rtn 
+
+uchar2dialog_a2f:
+7e45 d8400057 arg 0x57 ,temp 
+7e46 98467e00 isub temp ,pdata 
+7e47 20600000 rtn 
+
+pn9:
+7e48 18426000 copy temp ,alarm 
+7e49 580001ff setarg 0x1ff 
+7e4a 18002400 force 0 ,regb 
+
+pn9_loop:
+7e4b 1fe92200 rshift3 pdata ,rega 
+7e4c 1a232200 rshift rega ,rega 
+7e4d 9a22a200 ixor rega ,rega 
+7e4e 2a2ffe00 isolate1 0 ,rega 
+7e4f 7920fe09 setflag true ,9 ,pdata 
+7e50 18430400 rshift temp ,temp 
+7e51 2feffe00 isolate1 0 ,pdata 
+7e52 79208407 setflag true ,7 ,temp 
+7e53 1fe37e00 rshift pdata ,pdata 
+7e54 1a40a401 increase 1 ,regb 
+7e55 2a400e00 compare 0 ,regb ,0x7 
+7e56 2420fe4b nbranch pn9_loop ,true 
+7e57 e0408005 istoret 1 ,contw 
+7e58 c2007e4b loop pn9_loop 
+7e59 1e020400 copy alarm ,temp 
+7e5a 20600000 rtn 
+
+calc_average:
+7e5b 58000000 setarg 0 
+7e5c 1f222200 copy loopcnt ,rega 
+
+calc_average_loop:
+7e5d e8410006 ifetcht 2 ,contr 
+7e5e 9840fe00 iadd temp ,pdata 
+7e5f c2007e5d loop calc_average_loop 
+7e60 9a26fc00 idiv rega 
+
+get_div_result:
+7e61 20407e64 call wait_div_end 
+7e62 1807fe00 quotient pdata 
+7e63 20600000 rtn 
+
+wait_div_end:
+7e64 207a8000 rtn modone 
+7e65 20207e64 branch wait_div_end 
+
+compare_loop:
+
+string_compare:
+7e66 efe08011 ifetch 1 ,rega 
+7e67 e8408012 ifetcht 1 ,regb 
+7e68 98467c00 isub temp ,null 
+7e69 24628000 nrtn zero 
+7e6a 1a20a201 increase 1 ,rega 
+7e6b 1a40a401 increase 1 ,regb 
+7e6c c2007e66 loop string_compare 
+7e6d 18007c00 force 0 ,null 
+7e6e 20600000 rtn 
+
+ceiling:
+7e6f 98467c00 isub temp ,null 
+7e70 24610000 nrtn positive 
+7e71 18427e00 deposit temp 
+7e72 20600000 rtn 
+
+swap:
+7e73 9840fe00 iadd temp ,pdata 
+7e74 98460400 isub temp ,temp 
+7e75 98467e00 isub temp ,pdata 
+7e76 20600000 rtn 
+
+clean_mem:
+7e77 df200200 arg 0x200 ,loopcnt 
+7e78 d8a04000 arg 0x4000 ,contw 
+7e79 20207d8c branch memset0 
+
+callback_func:
+7e7a 207a0000 rtn blank 
+7e7b 1fe27a00 copy pdata ,pc 
+
+wait_uarttx:
+7e7c 6ff1010e fetch 2 ,core_uart_txitems 
+7e7d 243a7e7c nbranch wait_uarttx ,blank 
+7e7e 20600000 rtn 
+
+ice_break:
+7e7f 70820301 jam 0x1 ,core_ice_ctrl 
+7e80 20600000 rtn 
+
+ice_setbp:
+7e81 67f10205 store 2 ,core_ice_break0 
+7e82 6ff08203 fetch 1 ,core_ice_ctrl 
+7e83 79207e04 set1 4 ,pdata 
+7e84 67f08203 store 1 ,core_ice_ctrl 
+7e85 20600000 rtn 
+
+ice_setbp2:
+7e86 67f10207 store 2 ,core_ice_break1 
+7e87 6ff08203 fetch 1 ,core_ice_ctrl 
+7e88 79207e06 set1 6 ,pdata 
+7e89 67f08203 store 1 ,core_ice_ctrl 
+7e8a 20600000 rtn 
+
+ice_set_write_bp:
+7e8b 67f10205 store 2 ,core_ice_break0 
+7e8c 70820330 jam 0x30 ,core_ice_ctrl 
+7e8d 20600000 rtn 
+
+test_enable_white:
+7e8e 6ff08043 fetch 1 ,core_config 
+7e8f 793ffe04 set0 whiteoff_bit ,pdata 
+7e90 67f08043 store 1 ,core_config 
+7e91 20600000 rtn 
+
+check_uart_tx_buff:
+7e92 6ff1010e fetch 2 ,core_uart_txitems 
+7e93 d8400200 arg uart_air_control_threshold ,temp 
+
+pdata_sub_temp:
+7e94 98467c00 isub temp ,null 
+7e95 20600000 rtn 
+
+fifo_in:
+7e96 474bc032 bpatchx patch32_7 ,mem_patch32 
+7e97 e8440011 ifetcht util_fifo_len ,rega 
+7e98 18417eff and temp ,0xff ,pdata 
+7e99 243a7e9c nbranch fifo_in_push ,blank 
+7e9a 184cfe00 rshift8 temp ,pdata 
+7e9b e7e40011 istore util_fifo_len ,rega 
+
+fifo_in_push:
+7e9c 1a20a207 increase util_fifo_len + util_fifo_offset ,rega 
+7e9d efe08011 ifetch 1 ,rega 
+7e9e 243a137c nbranch assert ,blank 
+7e9f 6fe0895b fetch 1 ,mem_fifo_temp 
+7ea0 e7e08011 istore 1 ,rega 
+7ea1 20600000 rtn 
+
+fifo_out:
+7ea2 474c4033 bpatchx patch33_0 ,mem_patch33 
+7ea3 df200008 arg util_fifo_len ,loopcnt 
+7ea4 efe40011 ifetch util_fifo_len ,rega 
+7ea5 207a0000 rtn blank 
+
+fifo_out_loop:
+7ea6 efe08011 ifetch 1 ,rega 
+7ea7 243a7eab nbranch fifo_out_end ,blank 
+7ea8 1a20a201 increase 1 ,rega 
+7ea9 c2007ea6 loop fifo_out_loop 
+7eaa 2020137c branch assert 
+
+fifo_out_end:
+7eab d8400000 arg 0 ,temp 
+7eac e0408011 istoret 1 ,rega 
+7ead 20600000 rtn 
+
+fifo_is_empty:
+7eae efe40011 ifetch util_fifo_len ,rega 
+7eaf 20600000 rtn 
+
+fifo_is_full:
+7eb0 efe08011 ifetch 1 ,rega 
+7eb1 20600000 rtn 
+
+fifo_is_near_full:
+7eb2 efe10011 ifetch 2 ,rega 
+7eb3 20600000 rtn 
+
+fifo_content_count:
+7eb4 d8400000 arg 0 ,temp 
+
+fifo_content_count_loop:
+7eb5 6fe08006 fetch 1 ,contr 
+7eb6 c2007eb5 loop fifo_content_count_loop ,blank 
+7eb7 18408401 increase 1 ,temp 
+7eb8 c2007eb5 loop fifo_content_count_loop 
+7eb9 18427e00 copy temp ,pdata 
+7eba 20600000 rtn 
+
+not_greater_than:
+7ebb 98467c00 isub temp ,null 
+7ebc 24610000 nrtn positive 
+
+copy_temp2pdata:
+7ebd 18427e00 copy temp ,pdata 
+7ebe 20600000 rtn 
+
+disable_positive:
+7ebf 18007dff force -1 ,null 
+7ec0 20600000 rtn 
+
+enable_positive:
+
+disable_zero:
+7ec1 18007c01 force 1 ,null 
+7ec2 20600000 rtn 
+
+enable_zero:
+7ec3 18007c00 force 0 ,null 
+7ec4 20600000 rtn 
+
+enable_user:
+7ec5 78347c00 enable user 
+7ec6 20600000 rtn 
+
+disable_user:
+7ec7 78547c00 disable user 
+7ec8 20600000 rtn 
+
+enable_user2:
+7ec9 78367c00 enable user2 
+7eca 20600000 rtn 
+
+disable_user2:
+7ecb 78567c00 disable user2 
+7ecc 20600000 rtn 
+
+enable_user7:
+7ecd 7838fc00 enable user7 
+7ece 20600000 rtn 
+
+disable_blank:
+7ecf 58000001 setarg 1 
+7ed0 20600000 rtn 
+
+enable_blank:
+
+set_pdata_0:
+7ed1 58000000 setarg 0 
+7ed2 20600000 rtn 
+
+cal_sum:
+7ed3 1f267c00 sub loopcnt ,0 ,null 
+7ed4 20628000 rtn zero 
+
+cal_sum_loop:
+7ed5 e8408006 ifetcht 1 ,contr 
+7ed6 9840fe00 iadd temp ,pdata 
+7ed7 c2007ed5 loop cal_sum_loop 
+7ed8 20600000 rtn 
+
+reverse_byte:
+7ed9 1f227e00 copy loopcnt ,pdata 
+7eda 207a0000 rtn blank 
+7edb 18c27e00 copy contr ,pdata 
+7edc 9f20fe00 iadd loopcnt ,pdata 
+7edd 1fe0ffff increase -1 ,pdata 
+7ede 1fe20c00 copy pdata ,contr 
+
+reverse_loop:
+7edf efe08006 ifetch 1 ,contr 
+7ee0 18c08dfe increase -2 ,contr 
+7ee1 e7e08005 istore 1 ,contw 
+7ee2 c2007edf loop reverse_loop 
+7ee3 20600000 rtn 
+
+calc_k12:
+7ee4 19622400 copy timeup ,regb 
+
+calc_k:
+7ee5 da609420 arg mem_local_sig ,regc 
+7ee6 18007224 force 36 ,loopcnt 
+7ee7 18005600 force 0 ,rege 
+7ee8 18006e00 force 0 ,regf 
+
+rxcal_k1_loop:
+7ee9 20407ef9 call complex_mult16to8 
+7eea 52207e00 preload rega 
+7eeb 9d60d600 iadd rege ,rege 
+7eec 50407e00 preload temp 
+7eed 9ee0ee00 iadd regf ,regf 
+7eee 1a40a404 increase 4 ,regb 
+7eef 1a60a602 increase 2 ,regc 
+7ef0 c2007ee9 loop rxcal_k1_loop 
+7ef1 55607e00 preload rege 
+7ef2 d8400024 arg 36 ,temp 
+7ef3 20407f45 call signed_div 
+7ef4 e7e20005 istore 4 ,contw 
+7ef5 56e07e00 preload regf 
+7ef6 20407f45 call signed_div 
+7ef7 e7e20005 istore 4 ,contw 
+7ef8 20600000 rtn 
+
+complex_mult16to8:
+7ef9 edc10012 ifetchr nap ,2 ,regb 
+7efa eb808013 ifetchr fhs_misc ,1 ,regc 
+7efb 20407f2a call signed_ext16by8 
+7efc 98482200 imults temp ,rega 
+7efd eb808006 ifetchr fhs_misc ,1 ,contr 
+7efe 20347f00 branch complex_not_conj ,user 
+7eff 1b863800 sub fhs_misc ,0 ,fhs_misc 
+
+complex_not_conj:
+7f00 1a408c02 add regb ,2 ,contr 
+7f01 edc10006 ifetchr nap ,2 ,contr 
+7f02 20407f2a call signed_ext16by8 
+7f03 98483000 imults temp ,regd 
+7f04 52207e00 preload rega 
+7f05 9b062200 isub regd ,rega 
+7f06 edc10012 ifetchr nap ,2 ,regb 
+7f07 55c07e00 preload nap 
+7f08 98483000 imults temp ,regd 
+7f09 edc10006 ifetchr nap ,2 ,contr 
+7f0a eb808013 ifetchr fhs_misc ,1 ,regc 
+7f0b 20407f2a call signed_ext16by8 
+7f0c 98480400 imults temp ,temp 
+7f0d 53007e00 preload regd 
+7f0e 98408400 iadd temp ,temp 
+7f0f 20600000 rtn 
+
+complex_mult32to32:
+7f10 efe20012 ifetch 4 ,regb 
+7f11 ea220013 ifetchr rega ,4 ,regc 
+7f12 9a285600 imults rega ,rege 
+7f13 ea220006 ifetchr rega ,4 ,contr 
+7f14 52206e00 aligned rega ,regf 
+7f15 1a408c04 add regb ,4 ,contr 
+7f16 efe20006 ifetch 4 ,contr 
+7f17 9a280400 imults rega ,temp 
+7f18 55607e00 preload rege 
+7f19 98465600 isub temp ,rege 
+7f1a efe20012 ifetch 4 ,regb 
+7f1b 9ee86e00 imults regf ,regf 
+7f1c efe20006 ifetch 4 ,contr 
+7f1d ea220013 ifetchr rega ,4 ,regc 
+7f1e 9a287e00 imults rega ,pdata 
+7f1f 9ee0ee00 iadd regf ,regf 
+7f20 20600000 rtn 
+
+lshift14:
+7f21 1ff07e00 lshift16 pdata ,pdata 
+
+rshift2:
+7f22 1feb7e00 rshift2 pdata ,pdata 
+7f23 20600000 rtn 
+
+lshift6:
+7f24 1fed7e00 lshift8 pdata ,pdata 
+7f25 20207f22 branch rshift2 
+
+calc_vok:
+7f26 9feffe00 imul32 pdata ,pdata 
+
+rshift7:
+7f27 1ff1fe00 rshift4 pdata ,pdata 
+7f28 1fe97e00 rshift3 pdata ,pdata 
+7f29 20600000 rtn 
+
+signed_ext16by8:
+7f2a 55c07e00 preload nap 
+7f2b 53800400 aligned fhs_misc ,temp 
+7f2c 20600000 rtn 
+
+abs32:
+7f2d c40f8000 rtnbit0 31 
+7f2e 18000400 force 0 ,temp 
+7f2f 79200420 set1 32 ,temp 
+7f30 184085ff increase -1 ,temp 
+7f31 9842fe00 ixor temp ,pdata 
+7f32 1fe0fe01 pincrease 1 
+7f33 20600000 rtn 
+
+sqrt:
+7f34 98002200 iforce rega 
+7f35 db000000 arg 0 ,regd 
+7f36 7920301e set1 30 ,regd 
+7f37 da400000 arg 0 ,regb 
+7f38 df200010 arg 16 ,loopcnt 
+
+sqrt_loop:
+7f39 1b027e00 deposit regd 
+7f3a 9a40fe00 iadd regb ,pdata 
+7f3b 1a432400 rshift regb ,regb 
+7f3c 9a267e00 isub rega ,pdata 
+7f3d 2022ff3f branch sqrt_less ,zero 
+7f3e 20217f42 branch sqrt_greater ,positive 
+
+sqrt_less:
+7f3f 1fe62200 sub pdata ,0 ,rega 
+7f40 1b027e00 deposit regd 
+7f41 9a41a400 ior regb ,regb 
+
+sqrt_greater:
+7f42 1b0b3000 rshift2 regd ,regd 
+7f43 c2007f39 loop sqrt_loop 
+7f44 20600000 rtn 
+
+signed_div:
+7f45 793f802c set0 mark_temp ,mark 
+7f46 c31fff49 bbit0 63 ,signed_div_unsigna 
+7f47 7920002c set1 mark_temp ,mark 
+7f48 1fe67e00 sub pdata ,0 ,pdata 
+
+signed_div_unsigna:
+7f49 284c003f isolate0 63 ,temp 
+7f4a 2020ff4d branch signed_div_unsignb ,true 
+7f4b 7940002c setflip mark_temp ,mark 
+7f4c 18460400 sub temp ,0 ,temp 
+
+signed_div_unsignb:
+7f4d 9846fc00 idiv temp 
+7f4e 20407e61 call get_div_result 
+7f4f c6960000 rtnmark0 mark_temp 
+7f50 1fe67e00 sub pdata ,0 ,pdata 
+7f51 20600000 rtn 
+
+clear_wake:
+7f52 58000000 setarg 0 
+7f53 79207e13 set1 19 ,pdata 
+7f54 67e4009e store 8 ,mem_gpio_wakeup_low 
+7f55 20600000 rtn 
+              org 0x10001
+
+z_entrance0:
+10001 20600000 rtn 
+              org 0x20001
+
+z_entrance1:
+20001 20600000 rtn 
+
Index: mouse_public_3mode_usb/output/ramcode.rom
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/ramcode.rom	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/ramcode.rom	(working copy)
@@ -0,0 +1,1608 @@
+20200040
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+20000001
+c284005d
+c0000098
+c031057c
+c04100c2
+c04180c9
+c04500dc
+c04580d7
+c05680e6
+c0618276
+c06303f0
+c06403fb
+c064841f
+c06582fb
+c06685b6
+c0670457
+c0678460
+c06805e2
+c06903ca
+c06983df
+c06a8473
+c06c02cc
+c06e8424
+c06f0088
+c0700070
+c070806c
+c06c8563
+c06d056d
+c06e03c3
+2020137e
+c00f80ef
+c0428570
+c0530574
+c06e8078
+c06f0211
+c07082ac
+c07104e7
+c071850f
+c0748519
+c0750161
+c0760558
+c04f8584
+c050858e
+c05f0590
+2020137e
+18427e00
+c17f8000
+1fe20400
+2020497d
+18427e00
+c17f8000
+1fe20400
+20204979
+6fe0cbc0
+247a0000
+70448e00
+20600000
+c513a3e1
+c6930000
+6fe0c8a5
+c280a2f6
+c2812589
+6fe0c8c1
+c0008080
+20200161
+6fe44bbc
+c28d0084
+c28c8084
+202026cd
+204022a0
+24740000
+204026e2
+20202628
+6fe0cbc5
+c1008000
+2040033c
+20404700
+6048c93d
+7041ca00
+20404718
+20400092
+204031e6
+202046fb
+6fe1478f
+c3838000
+20204358
+6fe0c17b
+67e0cc58
+20600000
+20800000
+70808673
+24558095
+20403166
+24558074
+58004c37
+67e1489d
+20403cb3
+20401246
+70804204
+6fe0c0c5
+c00c00a5
+70804205
+6fe0cc58
+67e0c17b
+58000f0f
+d8a00fff
+98a10a00
+6fe0c17a
+1fe17ef0
+1fed7e00
+98a1fe00
+793ffe02
+67f1004c
+efe10006
+e7e10005
+58000001
+37d98200
+67f08005
+70417b08
+20200805
+6ff20138
+79207e02
+67f2004c
+58000001
+37d98200
+67f08005
+37d98200
+37d98200
+37d98200
+20002710
+20600000
+6fe0c1ea
+67e08964
+2040114c
+708a0a00
+6fe08964
+67e0c1ea
+20600000
+70890005
+20000002
+70890000
+6fe0c0c5
+c00c1164
+708a8729
+20201179
+6ff08a0a
+79207e03
+67f08a0a
+200000f0
+793ffe03
+67f08a0a
+20600000
+7041eaff
+708a8500
+70892140
+204000d0
+20201252
+6fe0c1e8
+c05500e0
+c04a80e3
+20201237
+708a390a
+708a3a00
+20201226
+708a390a
+708a3a00
+20201226
+20406e5e
+20400118
+204041e7
+20758000
+20400461
+20404766
+2040012b
+204003e9
+20203c7f
+6fe0c923
+20205b56
+6fe0cbff
+207a0000
+1fe0f201
+d8c04bff
+d8a042f7
+20207dd4
+6fe44bbc
+c28d00fc
+c28c8102
+c28c0108
+2020010d
+7048ca05
+58010101
+67e1c857
+58002ee0
+67e1cc16
+202026e8
+7048ca09
+58080606
+67e1c857
+58005c1c
+67e1cc16
+202026e8
+5800bb80
+67e1cc16
+7048ca0f
+58006000
+20200111
+58017700
+67e1cc16
+7048ca1e
+58011760
+67e1c8b1
+67e1cc2c
+20600000
+58000000
+67e0cc1a
+67e2cc25
+20600000
+20758000
+2040260e
+d8400358
+6049483b
+204022b5
+20400114
+20403f60
+204000f1
+20403dd6
+20400329
+204000f7
+20400125
+20203cab
+6fe0c1e8
+67e0cc72
+20600000
+6fe0cc72
+67e0c1e8
+20600000
+58004902
+67e14479
+58000130
+67e1489f
+20203c89
+c6930000
+20403fb0
+24740000
+6fe0cc32
+704c3200
+245a041d
+6fe44bbc
+c30a813a
+6fe0cb9c
+243a48c1
+20400151
+6fe44bbc
+c28c813f
+c28d013f
+202048ac
+6fe0c839
+c280814d
+6848c7ca
+6fe0c8d4
+9841fe00
+67e0c8d4
+6848c7cf
+6fe0c8d9
+9840fe00
+67e0c8d9
+6848c7d0
+6fe0c8da
+9840fe00
+67e0c8da
+70483901
+da200007
+da4048d4
+202026e8
+6fe0c915
+c1ff8000
+6fe0cc73
+243a0156
+2020430d
+704c7300
+2020430f
+6fe24895
+684a4891
+98467c00
+2022815e
+7041eaff
+20600000
+7041ea00
+7041e8aa
+20600000
+20402638
+243404a3
+204001f8
+20400158
+6fe0cbf2
+243a016b
+6fe448b4
+67e4485f
+6fe148c6
+67e148c8
+204026c2
+24740000
+6fe0cc31
+704c3100
+1fe67c00
+24228176
+68494c2f
+18467c00
+202281a2
+6fe24c21
+203a01a2
+684a4c33
+284ffe1f
+2020819d
+6fe24c21
+9840fe00
+684a4c16
+98460400
+604a4c33
+242101a5
+6fe1c8b1
+98467e00
+242101ac
+d8400600
+98467c00
+242101ac
+6fe1c8b1
+20407e1f
+604a4160
+6fe0c0c5
+c004018c
+58000000
+67f18a00
+704c2bfa
+204012d1
+6fe24164
+9840fe00
+67e24164
+18027e00
+67e4419d
+d8c08070
+d8a04186
+20407d74
+6ff08086
+67e0c1a5
+20401410
+6ff08042
+1fe1fe14
+67f08042
+2020146d
+dfffffff
+98465e00
+6fe24c21
+9de67e00
+2020017b
+204001a9
+6fe1c8b1
+20200185
+18460400
+6fe1c8b1
+9840fe00
+20200185
+58000000
+67e24c33
+20600000
+704c3101
+20600000
+6fe44bbc
+c38c8000
+c38d0000
+6fe0c8c1
+c00081f4
+6fe0cc1a
+203a01f4
+1b227e00
+684b4c1b
+67e34c1b
+20407e0a
+67e24c21
+6fe0cc31
+247a0000
+6fe14c2f
+247a0000
+6fe24c33
+247a0000
+6fe24c21
+684a4c16
+18438400
+98467c00
+20210114
+684acc25
+9840fe00
+67e2cc25
+6848cc1a
+6fe0cc2a
+98467c00
+202281cf
+18408401
+6048cc1a
+20600000
+704c1a01
+d8400000
+6fe2cc25
+604acc25
+6848cc2a
+9846fc00
+20407e64
+1807a200
+6fe24c16
+6848cc2b
+98460400
+1a227e00
+98467e00
+202101e8
+1fe67e00
+1feb7e00
+6849c8b1
+98408400
+6fe1cc2c
+da201800
+9a20fe00
+98467c00
+242101f2
+6049c8b1
+20600000
+1feb0400
+6fe1c8b1
+98460400
+6fe1cc2c
+da201800
+9a267e00
+98467c00
+202101f2
+6049c8b1
+20600000
+67e1c8b1
+20600000
+704c1a01
+1b227e00
+67e34c1b
+20600000
+58000000
+67e0c8aa
+67e14c2f
+20400202
+242c022a
+2437822a
+204001ae
+20402679
+2040026b
+20202658
+7857fc00
+204021f8
+6fe0c82f
+c000a1f1
+18002a00
+6fe2483f
+98001200
+204010ac
+68488017
+2040118b
+2000012c
+204011a2
+20400219
+2057a1f1
+20600000
+6fe0c867
+20401637
+6fe2483f
+98001200
+204010ac
+2040115d
+6848c83d
+20401674
+20402181
+c597821e
+783cfc00
+2000001e
+20402181
+7857fc00
+7826fc00
+7830fc00
+78507c00
+78287c00
+6fe1483b
+98003600
+37c18400
+242c21ef
+20404d0d
+c517a1a4
+202021a4
+6fe0cad6
+247a0000
+2040025b
+6fe0c8ab
+247a0000
+6fe148a7
+1fe0fe01
+67e148a7
+6fe148a7
+c2842680
+20400239
+6fe14c2f
+1fe0fe01
+67e14c2f
+202001fb
+6848c8aa
+6fe0c8ca
+98467c00
+24210253
+18408401
+6048c8aa
+6fe0c8ca
+c002824f
+c004024b
+c0078247
+6fe0c8aa
+c00a269d
+c00f269d
+20600000
+6fe0c8aa
+c005269d
+c007a69d
+20600000
+6fe0c8aa
+c003269d
+c004a69d
+20600000
+6fe0c8aa
+c001a69d
+c002a69d
+20600000
+20400255
+20202281
+6fe0c8a7
+1fe67c80
+20610000
+704c7301
+df200028
+20207d86
+6fe0c91f
+c17f8000
+da200000
+704ba706
+6848c91f
+204046a8
+67e0cba5
+6fe0c914
+c07f8268
+204041a8
+1a227e00
+c28346cb
+202046be
+6848c91f
+20403f96
+20200265
+6fe0cbf2
+245a026f
+704bf200
+20600000
+204003cc
+6fe44bbc
+c41e0000
+6fe0c917
+20403f96
+6fe0c918
+20203f96
+6fe44bbc
+c30a0283
+20406166
+2040618d
+67e148ed
+68494496
+6fe144a4
+98467c00
+20210276
+da2048e7
+20403f1a
+6fe0c4a6
+c280be5a
+6fe44bbc
+c2978297
+6fe0c93d
+c000029e
+20400371
+20404354
+6fe0c93d
+c000828d
+c0010292
+20600000
+6fe3493f
+684b4979
+98467c00
+2022c32b
+20203e1c
+6fe3495c
+684b4979
+98467c00
+2022c32b
+20203e1c
+20403e28
+20344855
+70493d00
+6fe14bcb
+67e1488b
+70488f01
+20202562
+6fe44bbc
+c308c842
+20400365
+20403e28
+20344845
+6fe44bbc
+c2980299
+c318c84b
+20404150
+1a217e07
+6848cbdc
+98467c00
+202284cd
+2020484b
+6fe0c868
+20401637
+6fe2483f
+98001200
+20402181
+204021f5
+79202a00
+782efc00
+78307c00
+7850fc00
+20404d13
+785d7c00
+c517a229
+c51682c0
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+c517a210
+20202210
+6fe0c1f0
+1fe37200
+20000002
+c20002c2
+19317e00
+1fecfe00
+1ff18400
+18427e00
+08008608
+18427e00
+08008628
+202002be
+20403edc
+20400318
+204022e1
+2040255f
+204002e0
+20400331
+204002e5
+204040bc
+20400440
+20400377
+2040453f
+2040038e
+20404552
+20400392
+20404555
+20400395
+20404575
+20404062
+204003ad
+20200398
+da6048c8
+da4002e3
+202031fc
+204003a9
+2020480e
+6fe0ccbf
+207a0000
+6fe0ccc1
+1fe0fe01
+67e0ccc1
+c00182ed
+c00302f1
+20600000
+6fe0ccb5
+c2800344
+6848ccbc
+2020610d
+704cc100
+6fe0ccc0
+1fe0ffff
+67e0ccc0
+243a02f7
+704cbf00
+6fe0ccb5
+c280034a
+6848ccbc
+20206109
+7048fa00
+20406166
+2040618d
+67e148ed
+6fe0c4a2
+c0810307
+684948ed
+184ffe08
+1fe6fc0a
+20407e61
+9840fe00
+67e148ed
+da2048e7
+20403f1a
+6fe0c4a6
+c280bf5e
+c300030e
+7048fe01
+20203f10
+d8e00004
+20404732
+7048fc0c
+6fe0c8fe
+207a0000
+7048fe00
+6fe0ccb5
+c280834a
+6848ccbd
+20206109
+6fe0ccbe
+207a0000
+6fe44bbc
+c4020000
+6fe0c8fc
+1fe0fe01
+67e0c8fc
+1fe67c14
+24410327
+1fe67c0a
+20210314
+6fe0ccb5
+c2808344
+6848ccbd
+2020610d
+7048fc01
+20600000
+704cb100
+704cbf00
+704cc100
+20400356
+20400358
+2040035a
+204002f7
+20200314
+6fe0ccb1
+207a0000
+6fe0ccb2
+c000833e
+6fe0ccb6
+203a033a
+1fe0ffff
+67e0ccb6
+20200344
+704cbe01
+704cb600
+704cb100
+2020034a
+da604cb8
+da400341
+202031fc
+2040035c
+6fe0ccb3
+c000834a
+704cb301
+6fe0c93d
+c0000350
+c0008352
+c0010354
+20600000
+704cb300
+6fe0c93d
+c0000356
+c0008358
+c001035a
+20600000
+6848ccb9
+2020610d
+6848ccba
+2020610d
+6848ccbb
+2020610d
+6848ccb9
+20206109
+6848ccba
+20206109
+6848ccbb
+20206109
+6fe0ccb7
+67e0ccb8
+20600000
+6fe0ccb0
+207a0000
+704cb614
+704cb200
+704cb101
+20600000
+6fe0ccb0
+207a0000
+704cb702
+704cb300
+704cb803
+704cb101
+704cb201
+20200344
+6fe0ccb0
+207a0000
+704cb702
+20200368
+6fe0ccb0
+207a0000
+6fe0ccb4
+207a0000
+704cb705
+20200368
+6fe0c93d
+c000037d
+6fe44bbc
+c41a8000
+6848cbdb
+20200380
+6fe44bbc
+c4190000
+6848cbdc
+6048cbae
+20404155
+1fe17e07
+6848cbae
+98467c00
+20228387
+2020452b
+2040038c
+6fe0cbb0
+c1008000
+704bb001
+20600000
+da4004cd
+20204537
+da604b88
+da40454a
+204031fc
+20204547
+6fe44bbc
+c39d8000
+2020455f
+da604c70
+da4043ac
+202031fc
+da604ac3
+da40039b
+20203203
+6fe0c92f
+c3838000
+6fe0c93d
+c080435b
+7048a900
+20402659
+5fffffff
+67e2485f
+58000000
+67e3c8d4
+704bf201
+204003e9
+204003a9
+202004a8
+6fe44bbc
+c28ca6d7
+c28d26d7
+20600000
+da6049c4
+da4003b0
+202031fc
+204003b7
+20404631
+204003bb
+6fe0cad6
+207a0000
+204000b7
+202046fe
+6848c923
+20403f96
+6848c924
+20203f96
+6848c4b7
+20403f96
+6848c4ba
+20403f96
+6848c4b8
+20403f96
+6848c4b9
+20203f96
+6fe44bbc
+c289c67f
+20405daf
+2040464a
+2040465f
+20405db4
+20204646
+20403fa5
+20758000
+20404276
+204041f5
+c01803d4
+c018c257
+c02c03d8
+204041f2
+20001af4
+202003cd
+6fe0c9c7
+1fe17ef0
+c060425e
+202041fc
+6fe0c9c7
+c02b83dc
+c02cc264
+202003cd
+70492c0c
+da604c74
+202003e4
+20403fa5
+6fe0c92c
+c00583e6
+20404272
+da604ab4
+2040426b
+20200461
+204003f9
+da604bf5
+202003e4
+204041e7
+20403fa5
+6fe0c92c
+c00583ee
+2020427e
+58001f06
+20205d5e
+58000006
+20405d65
+c281be5d
+204003f6
+204003e9
+20203e5d
+6fe0c92c
+c00583f9
+20204272
+58009706
+20204273
+20404329
+20407f52
+20404055
+6848c914
+2040610d
+6848c914
+204060e6
+6fe0c924
+20400612
+20403e80
+20403e72
+d8400001
+2040610d
+d8400013
+20403f96
+2040032c
+2040040f
+20400413
+d8400000
+202060e6
+6fe0c922
+c17f8000
+6848c922
+20206121
+6fe44bbc
+c41e0000
+6848c917
+204060e6
+6848c918
+204060e6
+6848c917
+20403f94
+6848c918
+20203f94
+20407f52
+2020155d
+6848c917
+204060f4
+6848c918
+204060f4
+20203e81
+204049dd
+204079a1
+20400443
+2040042c
+2040042f
+20404714
+20403fc8
+20600000
+6fe0ccaf
+247a0000
+20204693
+6fe0ccaf
+247a0000
+6fe44bbc
+c4150000
+6848c922
+20403f96
+6848c922
+204060fd
+2020c6ef
+6fe0c93d
+c1008000
+70493d01
+202046fe
+6fe0c93d
+c1000000
+70493d00
+202046fe
+6fe0ccaf
+247a0000
+2020450c
+6fe44bbc
+c2974076
+6fe0c913
+c17f8000
+da200000
+704ba705
+6848c913
+2040044c
+2020406f
+6fe44bbc
+c2964088
+6fe0cba4
+1fe22600
+6fe0c914
+c07f8453
+2020407f
+6fe0c913
+20400615
+6848c913
+202041d5
+204040b2
+20740000
+6fe0c997
+1fe0fe01
+1fe17e03
+67e0c997
+20400460
+20400464
+2020462e
+204040cf
+6fe0c92c
+c00640fb
+202040d8
+6fe0ccbe
+207a0000
+6fe0c997
+c000046d
+c000846f
+c001046b
+20600000
+58000001
+20200470
+58000002
+20200470
+58000003
+67e0ccc0
+704cbf01
+20600000
+1a627e00
+c01e048a
+c01c8486
+c01d049a
+c01904d0
+c00a84dc
+c00a04e5
+c02004d7
+c001047d
+20204376
+704b9000
+704b9900
+20404433
+20404449
+6fe0ccaf
+247a0000
+20204442
+2040015c
+20200128
+20400484
+20404584
+2040035f
+20204896
+6fe2483f
+67e24895
+67e24998
+20402587
+20404584
+2040430a
+704abf00
+7048a500
+70488f00
+6fe24895
+684a4891
+98467c00
+20628000
+2040035f
+20400484
+20204861
+704cbe00
+20400484
+6fe0c8a9
+243a039f
+6fe0c88f
+c00104c0
+c00084c0
+c002c883
+20204876
+6fe0c8ab
+205a04b2
+6fe0c8c1
+c1008000
+204026a6
+204026c2
+24740000
+204026cb
+704c3100
+704c3201
+20400114
+6fe0cbf2
+245a3e6a
+6fe2485f
+202026bf
+70483901
+7048ab01
+20402649
+67e0c7c9
+58000000
+67e3c7ca
+6fe248ad
+67e247d1
+7048380c
+6fe0c839
+79207e03
+67e0c839
+20402247
+20200163
+6fe44bbc
+c29784c9
+c29804c9
+c31d4845
+6fe24998
+684a4979
+98467c00
+202284cd
+20204845
+6fe14885
+67e1488b
+70488f05
+20202562
+70488f00
+20400365
+20204866
+6fe0cad8
+c00084d4
+704b8714
+202043b3
+204043ac
+704b870a
+202043b3
+6fe0cc6f
+247a0000
+704c6f01
+704c701e
+20600000
+58000000
+67e14b03
+67e0cc6f
+67e0cc70
+67e0cad7
+704b0500
+704abd00
+20401ac8
+2020047d
+2040035f
+20204390
+70488f00
+6fe14bfd
+1fe0fe01
+67e14bfd
+6fe0cbfd
+1fe17eff
+c00004ef
+20600000
+6fe0c883
+c07fa344
+c00084f6
+c00104f8
+c00184fe
+c0020504
+20600000
+7047c9ff
+20200505
+6fe0c85e
+203a04fc
+6fe248ad
+20402292
+7047c9aa
+20200505
+7047c955
+6fe0c85e
+203a0505
+6fe24895
+67e247cb
+20200507
+7047c922
+6fe248ad
+67e247cb
+6fe0c839
+1fe17e07
+67e0c7ca
+7047cf00
+70483807
+20402247
+20400202
+20202316
+6fe0c883
+c17f8000
+c0010513
+2020231d
+6fe0c85e
+203a232d
+6fe2480f
+207a0000
+67e24895
+2020232d
+6fe1488d
+d84001f8
+98417e00
+203a0524
+6fe1488d
+1fe0fe01
+67e1488d
+20600000
+6fe44bbc
+c29822e4
+20202577
+204025a3
+20400202
+242c0542
+24378542
+20402679
+6fe0c82d
+203a053b
+6fe2487b
+684a483f
+98467c00
+20228521
+6fe248ad
+684a483f
+98467c00
+2042853e
+6fe0c8a5
+793ffe02
+67e0c8a5
+58000000
+67e14887
+67e1488d
+67e1488b
+2020259e
+6fe2480f
+207a0000
+2020052b
+6fe2480f
+207a0000
+67e24895
+20202587
+6fe0c890
+203a2281
+6fe1488d
+1fe0fe01
+67e1488d
+2feffe09
+6fe0c88f
+c002854d
+c0020556
+c0010553
+202025b1
+2020a577
+202022ef
+2020a577
+2020256f
+2020a577
+202022ef
+2020a57e
+7041e8aa
+20202571
+2020a57e
+202022ef
+6fe0cbbb
+243a7ec7
+78347c00
+20401436
+6fe1c174
+203a7ec7
+6fe0c099
+203a7ec7
+6fe0c8c1
+c000fec7
+20600000
+2040036d
+6fe1478f
+2feffe0b
+2040c5c1
+6fe1478f
+2feffe07
+2040c362
+58000000
+67e14b03
+20204594
+58000000
+67e14ad3
+202045b7
+6fe0cbf4
+245a78cc
+704bf400
+202078bc
+18427e00
+c2801651
+c2808578
+2020163c
+20401640
+2040057e
+708a6d89
+20600000
+2040057e
+20200e7d
+6fe44bbc
+c28c8582
+c28d0582
+20600000
+70893002
+20600000
+6fe0c3dd
+1fe0fe01
+67e0c3dd
+c0061606
+204018c7
+20401916
+6fe082bd
+20401637
+204017e4
+20201601
+20400e7c
+2020160d
+efe10006
+c0020593
+20201990
+efe18006
+67e1c436
+c0050598
+c00905a7
+20201c7f
+6fe44bbc
+c31d9d93
+20401e39
+68494437
+6fe0c3c0
+c28185a2
+6fe14437
+c0181e74
+68494437
+20201d97
+6fe143d1
+98467c00
+2422859e
+2434059e
+20201dbc
+18c22200
+6fe143d4
+1fe0a5fd
+204019d1
+6fe0cad2
+c07f9e1f
+6fe0cad8
+203a1e1f
+6fe0cb86
+c2809e1f
+5800001a
+68494437
+98467c00
+24229e1f
+20201dbc
+78547c00
+58000000
+67e348d5
+204005c6
+58000089
+20405d5e
+20400461
+20403fbe
+20403fc3
+204005df
+6fe0c8d4
+1fe17e1f
+67e0c8d4
+24344766
+204005d6
+20204584
+6fe0c4ae
+c1800000
+6fe0c92c
+c00605cc
+c00585cc
+20204283
+20404304
+6fe0c915
+c07f85d2
+6848c915
+204060fd
+24608000
+58000000
+20405d65
+c0ac41f2
+202042b9
+6fe44bbc
+c38c8000
+c38d0000
+c38f8000
+6fe0c92c
+c1018000
+c1058000
+20404758
+20600000
+204005e2
+2040412d
+2020411e
+6fe0cbf2
+245a4161
+da200000
+204005e9
+204005f8
+20400605
+2020415e
+6fe0c91c
+20400612
+20404164
+6848c91c
+20403f96
+6fe0c91d
+20400612
+2040416a
+6848c91d
+20403f96
+6fe0c91e
+20400612
+20404170
+6848c91e
+20203f96
+6fe0c911
+c17f8000
+704ba703
+6fe0cba2
+1fe22600
+6848c911
+6fe0c914
+c07f8601
+2020417e
+6fe0c911
+20400615
+6848c911
+2020418b
+6fe0c912
+c17f8000
+704ba704
+6fe0cba3
+1fe22600
+6848c912
+6fe0c914
+c07f860e
+20204197
+6fe0c912
+20400615
+6848c912
+202041a4
+c17f8000
+d840003f
+2020612c
+c17f8000
+d840003e
+2020612c
+6848ccc2
+18518400
+6fe0ccc7
+98467c00
+2022863a
+6048ccc7
+18408401
+58000100
+984f8400
+6fe1ccc8
+98467e00
+6849cccb
+9840fe00
+67e1ccce
+2040063c
+204003b7
+20405e18
+6fe1ccce
+d8400100
+da201f00
+20405dd2
+2040063f
+24228626
+204003bb
+6fe21f00
+684a4cd1
+98467c00
+24228626
+58001f00
+67e141a6
+7041a840
+20405ca3
+58000000
+67e241a6
+6fe0ccc2
+20200001
+d8a01f00
+df200100
+20207d9b
+d8c01f00
+da200000
+df20003f
+efe20006
+9a20a200
+c2000642
+efe20006
+9a267c00
+20600000
Index: mouse_public_3mode_usb/output/romcode.rom
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/romcode.rom	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/output/romcode.rom	(working copy)
@@ -0,0 +1,30553 @@
+204013e1
+44804000
+20800000
+20403166
+20401246
+20405e33
+20401386
+20404e25
+4480c000
+20406323
+204053df
+2040781f
+20403150
+44814000
+2055b15d
+20406f0f
+20406f31
+20559484
+4481c000
+204070d7
+20407602
+20406f12
+20401b3f
+20400838
+2040317b
+44824000
+20400890
+20400b05
+20400b77
+20400821
+2040217e
+204014ac
+20200812
+20400826
+c6848000
+793f8009
+20400a30
+2020165e
+4482c000
+20400a6b
+2422882f
+20400a17
+1a208c01
+efe08006
+c28015cb
+c2808969
+20200bdc
+20400a38
+1f227c00
+20628000
+20400a17
+6fe08030
+c28188d3
+6fe08031
+c2808969
+20200bdc
+6fe0c1db
+207a0000
+c0008848
+c001084d
+c0018850
+c0028855
+c00d8845
+20400a64
+20628000
+20400a67
+20628000
+7041db00
+20600000
+7002e01b
+7041db00
+20600000
+7920001c
+793f801e
+70008cff
+70008a1f
+20200843
+793f801c
+18003600
+20200843
+20400a67
+20628000
+18000401
+7000bd05
+2020085c
+44834000
+6fe341dd
+20000001
+70478e01
+70005503
+2020085b
+18000425
+4483c000
+6fe080a7
+203a0862
+1fe9fe00
+1ff27e00
+1fe0ffff
+67e0c0ae
+67e080a6
+70008b1f
+793f800c
+20400a48
+24228884
+2040135f
+67e08077
+6048807c
+6fe341dd
+67e30040
+44844001
+20407de8
+6848807c
+18007e00
+2841fe01
+7d20fe05
+79207e03
+67e08030
+70095b03
+204078dc
+18007e00
+7920fe04
+67e0804c
+58000000
+79207e01
+67e08031
+7834fc00
+20400a30
+7854fc00
+18000e03
+6fe140c1
+20407ddb
+20200843
+4484c001
+6fe341dd
+67e30040
+2841fe01
+2020888a
+20200843
+d8a00a01
+df200008
+20407d8c
+70095b04
+204078dc
+20200843
+c68e0000
+18000e01
+20407de9
+7d3a001c
+243a0896
+20600000
+44854001
+684940c3
+18000e04
+20400f40
+20740000
+204010f6
+18004800
+20618000
+793f800b
+793f8000
+1c40c201
+280ffe1e
+7920c802
+2c200400
+242088bf
+4485c001
+6fe08012
+1fe0fe01
+67e08012
+2040112a
+20401124
+20401144
+20401340
+20401345
+20401353
+20400e7c
+204008b2
+2020089d
+44864001
+6fe0808a
+1fe0ffff
+67e0808a
+20610000
+70008a1f
+6fe0808c
+1fe0ffff
+67e0808c
+20610000
+7940001e
+70008cff
+20600000
+4486c001
+2040112a
+2040111e
+20401144
+2040134a
+204012d5
+204012fb
+202c08c9
+204008b2
+202008a0
+44874001
+2040127f
+2040135b
+20400d43
+793f8001
+c6858000
+6fe08013
+1fe0fe01
+67e08013
+20600000
+4487c001
+7834fc00
+78387c00
+6fe140bd
+203a08db
+18000e08
+20407de9
+247a0000
+44884002
+684940bf
+18000e28
+20400f40
+20340914
+18000e03
+20407de9
+243a08f0
+6fe0804c
+c28208e6
+202008e9
+d8a00a01
+df200008
+20407d8c
+4488c002
+70003000
+204053e0
+70478e00
+70095b13
+204078dc
+20200914
+44894002
+18001600
+34730200
+6fe080a8
+1fe0ffff
+9c42fe00
+2fe00600
+242088f0
+18827e00
+67e080e5
+18004c00
+18004800
+4489c002
+20218914
+2040112e
+69610157
+34730200
+448a4002
+6fe200a8
+98004200
+1fe0fe01
+67e200a8
+280ffe0c
+7920c802
+2c200400
+24208928
+6fe0800c
+1fe0fe01
+67e0800c
+20401124
+20401340
+20401345
+20401353
+20400e7c
+2040091a
+202008fc
+448ac002
+7854fc00
+6fe140bd
+207a0000
+18000e08
+20207ddb
+448b4002
+6fe0808b
+1fe0ffff
+67e0808b
+20610000
+70008b1f
+6fe080a6
+1fe0ffff
+67e080a6
+20610000
+7940000c
+6fe0c0ae
+67e080a6
+20600000
+448bc002
+2040111e
+2040134a
+204012d5
+204012fb
+202c0930
+2040091a
+20200901
+20400e7c
+6fe0800d
+1fe0fe01
+67e0800d
+18003600
+6fe200a8
+448c4003
+2040133e
+2040112e
+1cc0cc01
+1c2143fd
+1c8149fc
+20401124
+20401340
+20401345
+20401353
+1c427e00
+67e200b0
+18000800
+18000202
+2040135b
+20400f8a
+448cc003
+2040133c
+1c21c202
+1c8149fc
+2040111e
+2040134a
+204012d5
+204012fb
+204c0e7c
+202c0955
+6fe08010
+203a08fc
+1fe0ffff
+67e08010
+20200936
+448d4003
+6fe0800e
+1fe0fe01
+67e0800e
+20400c42
+79200033
+20400aff
+202c0961
+793f8033
+20400c62
+243a095a
+202008fc
+448dc003
+793f8033
+6fe08030
+793ffe03
+67e08030
+20400c4d
+7854fc00
+20600000
+448e4003
+7834fc00
+78387c00
+204009e3
+20740000
+2040133e
+1c40c201
+20401134
+18004803
+204065e1
+20400c96
+20401124
+20401340
+20401345
+20401353
+20400f86
+448ec003
+204053f2
+20400af1
+24368982
+20401378
+20400f4c
+6fe0800f
+1fe0fe01
+67e0800f
+448f4003
+204065c9
+2040098d
+24748000
+20400f1c
+243a098a
+7854fc00
+20600000
+20400c96
+20400ae7
+20200979
+20368990
+2040136f
+2021099e
+204009a9
+2434099e
+6fe0804c
+c4020000
+c3818000
+6fe0804b
+c3818000
+204009b0
+247a0000
+6fe080bd
+1fe0ffff
+67e080bd
+247a0000
+20205755
+448fc003
+20400c6a
+7854fc00
+6fe0804c
+c28209a4
+20600000
+6fe0804c
+c3818000
+d8a00a01
+df200008
+20207d8c
+44904004
+78347c00
+6fe0804b
+c4018000
+204009b0
+247a0000
+20207ec7
+6fe08072
+1fe0ffff
+67e08072
+20600000
+4490c004
+6fe08030
+c28389bd
+6fe08877
+203a09bd
+70087700
+70095b18
+204078dc
+202009bd
+44914004
+20400a61
+6fe08030
+79207e07
+67e08030
+7041ca01
+6fe08055
+c08b09c5
+20600000
+70087701
+6fe08030
+793ffe07
+67e08030
+20600000
+4491c004
+78547c00
+6fe10032
+d840ffff
+98467c00
+24628000
+6fe20034
+203809d5
+9d067e00
+202009d6
+9c467e00
+1fe67c04
+24610000
+18007e00
+67e10032
+20207ec5
+1fe20400
+604a0034
+44924004
+70464501
+5800ffff
+67e10032
+70007301
+20600000
+4492c004
+204009cb
+24740000
+78547c00
+70001120
+793f800b
+793f8031
+2040133e
+20400af3
+c50589f8
+20400c62
+243a09ea
+c5188a02
+44934004
+78547c00
+1c427e00
+67e240d1
+78387c00
+7834fc00
+70095b2a
+202078dc
+4493c004
+2040133c
+d8200010
+20400ae9
+79200031
+793f800b
+6fe08077
+98000800
+70001102
+202009ea
+6fe200b4
+1fe0fe08
+67e200b4
+78587c00
+7854fc00
+20401035
+20400c42
+44944005
+20400c89
+20368a0f
+20400c62
+243a0a09
+202009f0
+6fe08031
+793ffe01
+67e08031
+20401378
+2040105d
+78347c00
+70095b2b
+202078dc
+4494c005
+79200009
+1a227e00
+67e1001e
+18007258
+d8a00287
+1a208c01
+efe08006
+1a220c00
+c2807dd4
+d8a00030
+20407dd4
+78577c00
+6fe08077
+98000800
+70008801
+20348a29
+70008801
+6fe08030
+c4008000
+6fe08073
+67e08088
+6fe08074
+67e08089
+20600000
+44954005
+6fe1001e
+98000a00
+18007258
+d8c00287
+203b7dd4
+d8c00030
+20207dd4
+df200001
+68488015
+18408401
+2841fe01
+24208a3e
+d8400000
+60488015
+184ffe58
+da204040
+9a20a200
+efe08011
+c2808a46
+c3800000
+c3818000
+c2000a3a
+20600000
+4495c005
+da600a77
+20400a6e
+24628000
+1a227e00
+67e1001e
+18007c00
+20600000
+20400f49
+20208a58
+6fe1001e
+1fe08a17
+6fe08047
+e7e08005
+da600ab7
+20200a6e
+6fe08047
+2feffe03
+20208a5d
+18007c01
+20600000
+18007c00
+20600000
+da600ab4
+20200a6e
+6849001e
+da600adc
+20200a6e
+6848c1dc
+da600a82
+20200a6e
+44964005
+684b41dd
+da600a7b
+20200a6e
+da600a88
+20200a6e
+da600ad3
+4496c005
+da204040
+df200001
+efe08011
+1a627a00
+1a20a258
+c2000a71
+18007c01
+20600000
+c2800a73
+c2818a73
+18007c00
+20600000
+c2818a7d
+c3000a73
+1a208c10
+efe30006
+98467c00
+20628000
+20200a73
+c3000a73
+1a208c16
+efe08006
+98467c00
+20628000
+20200a73
+c3008a73
+20400ac0
+20400aa4
+98467e00
+1fe0fe01
+20210a9e
+18c22400
+67e48964
+6fe0c6bd
+243a0a96
+6fe48964
+1a420c00
+1fe0fe05
+20200a99
+6fe48964
+1a420c00
+1fe0fe14
+24210a73
+18424200
+20400acc
+18007c00
+20600000
+98002400
+1a208c02
+efe10006
+203a0a9a
+20400acc
+20200a89
+1ff11600
+196c9600
+20228aae
+29601e0f
+24608000
+18511600
+196c9600
+24628000
+7920041c
+20600000
+18511600
+196c9600
+29601e0f
+24608000
+79207e1c
+20600000
+c3000a73
+18007c00
+20600000
+c3000a73
+1a208c01
+efe08006
+c2800a73
+1a208c17
+efe08006
+c3018a73
+18007c00
+20600000
+1a208c01
+e8408006
+1c427e00
+284ffe01
+1a208c04
+e8420006
+20608000
+1a208c08
+efe30006
+20401073
+1d027e00
+20600000
+1a208c02
+1a208a04
+efe10006
+98409600
+19627e00
+e7e20005
+202016b1
+c3008a73
+20400ac0
+9b60fe00
+9b60fe00
+98e0fe00
+98467c00
+24210a73
+18007c00
+20600000
+c3000a73
+18427e00
+9a267c00
+203f0a73
+1a208c01
+efe08006
+c2800a73
+efe08011
+793ffe07
+e7e08011
+20200a73
+44974005
+2040133e
+1c40c201
+20401134
+18004803
+20401124
+20401340
+20401345
+20401353
+20200f86
+4497c005
+2040133c
+1c40c201
+20401134
+18004803
+2040111e
+20400c37
+204012da
+2040134a
+204012d5
+204012fb
+246c0000
+2040127f
+20200d40
+44984006
+6fe080e5
+98000800
+18000201
+20400ae7
+20200af1
+6fe0c09b
+c4000000
+18000e04
+20407de9
+247a0000
+684940b5
+18000e04
+20400f40
+20740000
+20400b15
+18000e04
+6fe140b7
+242c7ddb
+180a7e00
+9ea17e00
+20207ddb
+4498c006
+7000e500
+78587c00
+78577c00
+204010f6
+1c4143fc
+18004801
+2040112a
+2040111e
+7940001d
+6fe08006
+1fe0fe01
+67e08006
+20401144
+204012d5
+20401302
+246c0000
+44994006
+18003600
+2040114b
+6fe08007
+1fe0fe01
+67e08007
+2040112a
+2040133c
+1c21c202
+18004801
+20401124
+20401144
+20401340
+2040134e
+1c427e00
+67e200b0
+20401353
+18000202
+18000800
+2040135b
+20400f8a
+20400b3f
+1c2143fd
+1cc0cc01
+20600000
+4499c006
+6fe0c0d8
+207a0000
+d8a000f0
+6fe0c5ff
+1fe27200
+1fe0fe01
+e7e08005
+18a20400
+1fe0fe01
+67e141e6
+18420a00
+58000009
+e7e08005
+d8c04600
+20407dd4
+da60467b
+df200004
+20400b61
+da604665
+df200001
+20400b61
+1800020a
+7041e502
+580000f0
+67e100be
+2040133c
+20401124
+20401340
+2040134e
+20401353
+2040135b
+20400f8a
+20600000
+18a20400
+1a620c00
+efe08006
+207a0000
+1fe3fe00
+c2000b65
+1fe22200
+1fe0fe02
+1fe20e00
+6fe141e6
+98e0fe00
+67e141e6
+18420a00
+1a227e00
+1fe0fe01
+e7e08005
+1a620c00
+efe08006
+efe08006
+e7e08005
+1a227200
+20207dd4
+6fe0c09b
+c4008000
+18000e05
+20407de9
+247a0000
+684940b9
+18000e28
+20400f40
+20740000
+18000800
+70001008
+793f800b
+20400b87
+18000e05
+6fe140bb
+20207ddb
+449a4006
+78587c00
+204010f6
+6fe08008
+1fe0fe01
+67e08008
+18004c00
+20401134
+1c40c201
+18004802
+449ac006
+2040111e
+204012d5
+20401302
+246c0000
+2040114b
+6fe08009
+1fe0fe01
+67e08009
+18003600
+2040133c
+1c21c202
+18004801
+20401124
+20401340
+2040134e
+20401353
+20400e7c
+18000800
+69610157
+35330200
+1d01d003
+1c2143fd
+449b4006
+1cc0cc01
+2040111e
+204012d5
+204012f5
+242c0bb1
+2040135b
+20400d43
+c5058bb8
+449bc006
+6fe08010
+207a0000
+1fe0ffff
+67e08010
+2040133e
+20200ba8
+449c4007
+793fd001
+79205000
+6fe0800a
+1fe0fe01
+67e0800a
+2040133c
+1c21c202
+20401124
+20401340
+2040134e
+20401353
+20400e7c
+2d000603
+20208bc9
+37cb8200
+20200bc5
+6fe200b4
+1fe1fe03
+1fe25000
+449cc007
+6fe300c7
+67e30040
+20400c42
+20400c89
+20368bd5
+20400c62
+243a0bd0
+20600000
+449d4007
+20400c4d
+20400a48
+24628000
+70003100
+2040105d
+20200a30
+449dc007
+2040106f
+20400c01
+20740000
+449e4007
+204065c9
+20400d38
+24368bf0
+6fe14477
+20407e7a
+20401378
+204065e1
+20400c96
+20400f7b
+20400f4c
+204053f2
+6fe0800b
+1fe0fe01
+67e0800b
+2040105d
+449ec007
+204014f5
+2040136f
+20210bf9
+204009a9
+24340bf9
+20400f1c
+243a0be0
+20600000
+449f4007
+700a5100
+7000e300
+20400c6a
+793f8011
+20407e8e
+6fe08030
+20600000
+204009cb
+24740000
+18820400
+2040135f
+67e080e5
+18420800
+70001120
+449fc007
+2040133e
+18000202
+20400f73
+1c427e00
+67e200b0
+20400f86
+2040133c
+7837fc00
+20400d19
+202c0c1a
+2040114b
+20400c62
+243a0c08
+c6820000
+70007c34
+79200003
+20600000
+78387c00
+20400c42
+204010f6
+44a04008
+20400aff
+202c0c26
+20400c62
+243a0c1d
+78587c00
+1d027e00
+67e240d1
+20600000
+7834fc00
+c5820c2c
+793f8004
+70007c03
+70007d33
+20405a7b
+18827e00
+67e08077
+18007e00
+67e30038
+6fe08031
+79207e01
+67e08031
+20401378
+7854fc00
+78347c00
+20600000
+44a0c008
+7856fc00
+793f8005
+793f800a
+793f8010
+793f800f
+6fe08047
+793ffe05
+79207e04
+67e08047
+20600000
+44a14008
+70001120
+70004750
+6fe140c6
+67e1003e
+1c427e00
+67e240d1
+20780000
+1d027e00
+67e240d1
+20600000
+44a1c008
+204053ee
+20400c66
+67e08046
+58000000
+67e1030e
+58001c80
+67e10051
+6fe08030
+79207e00
+67e08030
+70004b00
+70004c00
+70009d00
+20201378
+44a24008
+18007e00
+67e441cb
+e7e40005
+204009c7
+20200a61
+6fe08011
+1fe0ffff
+67e08011
+20600000
+6fe0c0d6
+1fe0fe01
+67e0c0d6
+20600000
+44a2c008
+6fe0c1db
+c0018c6f
+6fe08048
+c0808c73
+20404de6
+24228c73
+204009a6
+7041db00
+44a34008
+2040323e
+20400f12
+70095b02
+204078dc
+204053e0
+20404e26
+20406f37
+6fe08030
+793ffe00
+67e08030
+70478e00
+6fe0804c
+2fe18000
+20208c83
+793f8001
+6fe08047
+c3018c85
+6fe0804b
+c4030000
+793f8002
+20600000
+44a3c008
+6fe080c3
+207a0000
+1fe20800
+20400d38
+24768000
+18000200
+20400f7b
+18827e00
+67e08077
+18007e00
+67e080c3
+20600000
+44a44009
+6fe08030
+c3010ca3
+18000207
+c5838ca2
+20400f49
+24208ca3
+20370ca3
+20400ce4
+58000002
+67e140cf
+20600000
+24770000
+44a4c009
+20400a50
+24228cb4
+6fe08047
+c3018cbd
+c5028cc1
+6fe080e3
+c2830cc7
+6fe140cf
+1fe0ffff
+67e140cf
+203a0cb2
+6fe0c0cc
+98000200
+20600000
+44a54009
+20400eb7
+20400f49
+20208cbd
+20405759
+20340ccb
+6fe0804b
+c2830cd7
+c5028cc1
+6fe080e3
+c2830cc7
+18000201
+20748000
+18000200
+20600000
+44a5c009
+6fe08019
+98000200
+c1808000
+18000200
+20600000
+6fe08a58
+1fe1020f
+79200005
+20600000
+18000213
+20400ce4
+20400ddd
+207a0000
+7041e403
+6fe0838a
+1fe17ff8
+1fe97e00
+67e146b5
+1fe22200
+da60038b
+20206d03
+20400ced
+20400ce4
+20400ddd
+207a0000
+6fe0c1e5
+1fe17e03
+67e0c1e4
+6fe141e6
+1fe22200
+67e146b5
+6fe100be
+1fe22600
+20206d03
+44a64009
+68488047
+79200403
+60488047
+18227e00
+67e0c0cc
+5800ffff
+67e140cf
+20600000
+44a6c009
+6fe0804c
+2feffe05
+6fe141e6
+20208d03
+18000203
+1fe67c11
+20610000
+18000204
+1fe67c1b
+20610000
+1800020a
+1fe67c79
+20610000
+1800020b
+1fe67cb7
+20610000
+1800020e
+1fe67ce0
+20610000
+1800020f
+20600000
+18000203
+1fe67c11
+20610000
+18000204
+1fe67c36
+20610000
+1800020a
+d840016f
+98467c00
+24610000
+1800020e
+d84002a7
+98467c00
+24610000
+1800020f
+20600000
+6fe08030
+c3008d18
+6fe10032
+203a0d18
+24370d1a
+2040133e
+1d00c201
+78287c00
+6fe1003e
+1fe37e00
+6849015d
+9840fe00
+20401313
+2040113c
+18004803
+2040111e
+20400c37
+204012da
+44a74009
+6fe1003e
+1fe37e00
+20401313
+204012d5
+7826fc00
+6fe1003e
+6849015b
+9840b600
+37c18400
+1b420400
+604b0097
+7846fc00
+246c0000
+6fe1015b
+1fe25200
+1c225000
+20359444
+20600000
+44a7c009
+20400d13
+242c114b
+2040127f
+c5888d40
+6fe109f6
+1fe0fe01
+67e109f6
+20404d0d
+1c230400
+18419c40
+44a8400a
+7823fc00
+78257c00
+7825fc00
+09800003
+198cfe00
+67e080ac
+09800004
+08008007
+19827e00
+67e08019
+09800003
+198cfe00
+67e080ad
+6fe08019
+1fe67c03
+20210d58
+c0038d58
+6fe0804c
+2feffe05
+7920aa01
+44a8c00a
+09800008
+7845fc00
+78457c00
+20230e5f
+c5888d61
+6fe109f8
+1fe0fe01
+67e109f8
+44a9400a
+6fe080ac
+2fe00e00
+7920800a
+20208d6f
+a8800e00
+20208d6d
+c5838e7c
+6fe08047
+793ffe05
+79207e04
+67e08047
+20404d10
+7836fc00
+44a9c00a
+6fe08019
+1fe20200
+c5050d7e
+684880ad
+6fe08047
+793ffe00
+284ffe00
+7920fe00
+284ffe01
+7920fe01
+67e08047
+284c0001
+20208d7e
+20400eb7
+44aa400a
+d8400000
+2040130b
+18217e0f
+c0008d9a
+c0000e7c
+c0010e88
+684880ad
+6fe08047
+a8400800
+24208d8c
+c5850d8b
+c3038d8c
+7920000f
+44aac00a
+18227e00
+c0018d9c
+c0020da0
+c0040d9f
+d8400004
+2040130b
+c0050d9b
+c0058d9e
+d8400008
+2040130b
+c0070d9b
+c0078d9e
+20600000
+20200e7c
+79200010
+78267c00
+20200da1
+79200010
+79202a02
+7826fc00
+44ab400a
+c5198e7c
+c5008e7c
+2aac0001
+20208dae
+7843fc00
+7826fc00
+78467c00
+1c409602
+34530400
+242c0e6b
+79200010
+7823fc00
+44abc00a
+78277c00
+7824fc00
+09800003
+198cfe00
+67e080e4
+09800005
+c5080db9
+19897200
+1f297200
+20200dbc
+09800005
+19837200
+09800003
+44ac400b
+1f227e00
+67e100ae
+203a0dd4
+20400ddd
+203a0dc4
+1f20f204
+1f227e00
+9ea67c00
+20210e6b
+44acc00b
+793f8000
+6fe080e4
+1fe17e03
+d8a000ce
+c0018de2
+c5088dd2
+6fe080e4
+1fe17e03
+c0010de7
+c0008dfb
+20200e6b
+d8a01000
+20200e0c
+20400ddd
+203a0e10
+58000000
+67e146b5
+09800020
+1fef7e00
+1fecfe00
+67e20273
+20200e10
+6fe0804c
+c3017ed1
+6fe0c648
+c0817ed1
+20207ecf
+6fe100ae
+1fe67c11
+24210e6b
+c5078e4c
+20200e0c
+44ad400b
+c5078e4c
+6fe100ae
+d84002e0
+98467c00
+20210e6b
+6fe08314
+c3000df1
+c3008df6
+20200e7c
+70031201
+6fe1030e
+c0800e7c
+d8a01000
+20200e0c
+70031202
+6fe10310
+c0800e7c
+d8a01400
+20200e0c
+44adc00b
+c5078e4c
+6fe100ae
+d84002e0
+98467c00
+20210e6b
+6fe08312
+c0008e05
+c0010e09
+20200e7c
+d8a01000
+6fe1030e
+98a08a00
+20200e0c
+d8a01400
+6fe10310
+98a08a00
+09800008
+19897e00
+e7e08005
+c2000e0c
+44ae400b
+09800010
+20230e65
+20400ddd
+20407ec9
+245a6d34
+24360e6c
+20404d0c
+6fe0c5f6
+c0008e6c
+c5088e39
+c5078e79
+6fe080e4
+2fe00603
+20208e39
+6fe100ae
+203a0e39
+44aec00b
+6fe08312
+c0008e26
+c0010e30
+2020137c
+6fe1030e
+684900ae
+9840fe00
+67e1030e
+207a0000
+68491000
+18408404
+98467c00
+20428f6b
+20200e39
+6fe10310
+684900ae
+9840fe00
+67e10310
+207a0000
+68491400
+18408404
+98467c00
+20428f6f
+44af400b
+6848804c
+6fe080e4
+2fe00603
+79208406
+7d208407
+6048804c
+24208e42
+79200001
+c5888e4c
+284ffe06
+20208e4c
+6fe109fa
+1fe0fe01
+67e109fa
+79200005
+793f8407
+793f8001
+6048804c
+44afc00b
+20400ddd
+245a6d5b
+684880ad
+6fe08047
+79207e05
+284ffe02
+7920fe02
+280ffe0a
+7920fe07
+67e08047
+6fe100ae
+243a0e7c
+6fe0804c
+793ffe07
+67e0804c
+6fe080e4
+2fe00e01
+20200e7c
+44b0400c
+7856fc00
+6fe1001a
+1fe0fe01
+67e1001a
+20200e7c
+6fe1001c
+1fe0fe01
+67e1001c
+20400e6d
+c5888e6b
+79200005
+20200e7c
+20200e65
+44b0c00c
+6fe080e4
+2fe00603
+24208e75
+6848804c
+793f8406
+6048804c
+20600000
+6848804c
+793f8407
+6048804c
+20600000
+6fe08047
+79207e05
+67e08047
+44b1400c
+784efc00
+784e7c00
+7846fc00
+78467c00
+7844fc00
+78477c00
+7843fc00
+2030914b
+37d38200
+20000064
+2020114b
+44b1c00c
+7824fc00
+78267c00
+09800048
+2feffe3a
+79208000
+1c020400
+57e04000
+57e03c00
+782afc00
+380bffff
+380cffff
+20000020
+29a80000
+1d827e00
+67e180c7
+1da27e00
+67e080ca
+18424000
+20208e9d
+20200e6b
+44b2400c
+09800048
+57e03e00
+57e00800
+57e05c00
+57e02400
+18007e00
+09800010
+20230e6b
+20404d0c
+5ffffffc
+9a417e00
+67e200b4
+1ba27e00
+67e180c4
+1b827e00
+67e080c2
+18827e00
+67e080c3
+1dc27e00
+67e100cb
+1c227e00
+08008220
+28201e02
+7920800b
+20200e7c
+44b2c00c
+6fe08047
+c4018000
+793ffe03
+79407e06
+67e08047
+20400ddd
+245a6d21
+6fe0c0cc
+c0098ece
+c1038000
+6fe0804b
+c4030000
+793ffe06
+79207e07
+67e0804b
+793f8002
+6fe144d9
+247a0000
+6fe0804b
+793ffe07
+67e0804b
+2020533e
+44b3400c
+6fe0c5f9
+1fe37e00
+c0088ee1
+c0090eeb
+c00c0f12
+c03f8ed9
+c1818000
+6fe0838c
+c0088edc
+20600000
+6fe0838c
+79207e07
+20600000
+20748000
+6fe08030
+c3820000
+70007c31
+20600000
+44b3c00c
+6fe0804c
+79207e02
+67e0804c
+70801101
+18007e00
+67e2c6a4
+79207e25
+67e2c69f
+20600000
+44b4400d
+6fe0804c
+793ffe02
+67e0804c
+70801100
+20600000
+44b4c00d
+1c40a203
+20348ef5
+1d00a203
+68490032
+1a227e00
+793ffe1b
+9846fc00
+6fe10075
+20407e64
+18072600
+9a667e00
+20210eff
+9840fe00
+9a20fe00
+67e20034
+70464500
+6fe08030
+79207e01
+67e08030
+6fe08073
+67e08088
+58000000
+67e1c16e
+67e1c171
+67e0c15e
+70095b0b
+204078dc
+6fe140c8
+67e1003e
+24748000
+18808fff
+20600000
+44b5400d
+6fe08030
+c4008000
+793ffe01
+67e08030
+6fe140c6
+67e1003e
+7855fc00
+70095b0c
+202078dc
+44b5c00d
+78377c00
+6fe08030
+c2808f29
+c6088000
+6fe08047
+c3818000
+6fe08048
+247a0000
+6fe0804b
+c3830000
+18007e00
+20600000
+c3010f33
+6fe08088
+c0010f2f
+6fe08047
+c2818f3c
+c5840f3c
+24348f3c
+6fe08048
+243a0f3c
+20200f27
+6fe08088
+c0808f3c
+6fe08089
+203a0f3c
+1fe0ffff
+67e08089
+6fe08047
+c3818000
+24768000
+6fe08088
+1fe0ffff
+67e08088
+20600000
+44b6400d
+78487c00
+18423600
+20400a6d
+78547c00
+24628000
+18003600
+78347c00
+20600000
+6fe0c15d
+a881fe00
+20600000
+44b6c00d
+793f8001
+70031b00
+6fe08314
+207a0000
+2feffe00
+d8c01000
+2040ce34
+44b7400d
+6fe0831b
+c0008f5f
+70031b00
+6fe08314
+c4008000
+d8c01400
+20404e34
+6fe0831b
+c0008f65
+20600000
+6fe08314
+793ffe00
+67e08314
+58000000
+67e1030e
+20600000
+6fe08314
+793ffe01
+67e08314
+58000000
+67e10310
+20600000
+6fe08314
+79207e00
+67e08314
+20600000
+6fe08314
+79207e01
+67e08314
+20600000
+44b7c00d
+1d00c201
+2040113c
+18004803
+20401124
+20401340
+2040134e
+20201353
+44b8400e
+2040133c
+1d027e00
+684a40d1
+98467e00
+c1808000
+28203e00
+24208f85
+6fe08019
+207a0000
+20400f73
+28203e10
+20208e7c
+1c230400
+18419c40
+44b8c00e
+7823fc00
+78257c00
+782dfc00
+793f8010
+18827e00
+08008603
+18227e00
+08008604
+6fe08047
+08008004
+08008603
+78247c00
+08008608
+784dfc00
+78447c00
+78457c00
+793faa02
+d8400000
+2040130b
+44b9400e
+18217e1f
+c0098fce
+c0000e7c
+c0008e7c
+c0010faf
+c0018fdd
+c0020fe3
+c0040fe2
+d8400004
+2040130b
+c0050fdf
+c0058fe5
+d8400008
+2040130b
+c0078fe5
+20200fdf
+44b9c00e
+6fe080e5
+1fe20800
+6fe0808d
+1fe23800
+6fe1c0b2
+1fe23a00
+6fe140ac
+1fe25c00
+7824fc00
+782e7c00
+1c022200
+20401134
+782afc00
+20000020
+1c221600
+6fe200b0
+1fe24200
+53c07e00
+79207e3a
+08008648
+53e07e00
+08008648
+19624200
+1a224000
+78247c00
+08008610
+78447c00
+20200e7c
+78477c00
+20200fd2
+44ba400e
+20400ddd
+243a0fcc
+78277c00
+7824fc00
+782e7c00
+6fe0838a
+1fe105f8
+d8c0038a
+18408408
+18497200
+efe08006
+08008608
+c2000fd9
+2020100f
+782e7c00
+20200fe8
+782e7c00
+79200010
+20200fe8
+79202a02
+782efc00
+20200fe8
+79202a02
+782efc00
+79200010
+44bac00e
+6fe0804c
+c3028ffd
+18267c03
+20210ffd
+78477c00
+784e7c00
+782efc00
+7843fc00
+79202a01
+2aaffe02
+20208ff7
+580abeee
+08008614
+20200ffb
+585faeba
+08008618
+58000012
+08008606
+7823fc00
+79200010
+78277c00
+7824fc00
+c502901d
+6fe0c1e5
+08008603
+6fe141e6
+98007200
+c5081007
+08008605
+20201008
+0800860d
+1f227e00
+203a100f
+6fe100be
+98000c00
+efe08006
+08008608
+c200100c
+44bb400e
+20400ddd
+203a1014
+6fe2026f
+08008620
+78247c00
+08008610
+78447c00
+20400ce4
+6fe0804c
+c3028e7c
+18007e00
+08008606
+20200e7c
+44bbc00e
+c5081025
+6fe080e4
+08008603
+6fe080ae
+98002600
+08008605
+2020102a
+6fe080e4
+08008603
+6fe100ae
+98002600
+0800860d
+d8c01000
+1a627c00
+20229031
+efe08006
+08008608
+1a60a7ff
+2020102b
+6fe109fc
+1fe0fe01
+67e109fc
+2020100f
+6fe200b4
+1fe0a207
+6fe100c0
+243a103b
+1a20a3fd
+20201043
+1feffe0c
+68590040
+18408401
+98467e00
+24211042
+1a20a3ff
+2020103e
+1fe67e00
+37d18200
+2c400600
+24209043
+98005200
+1a225000
+98005200
+20600000
+44bc400f
+37d10200
+1b427e00
+98000c00
+1ff17e00
+9c467200
+1f217203
+24229054
+18007e00
+20201058
+68490163
+18007e00
+9840fe00
+c2001056
+98c0fe00
+1fe6fc0c
+20407e61
+67e100c0
+20600000
+44bcc00f
+1b427e00
+1b220400
+98467c00
+7d217e2c
+98460400
+6fe10163
+284c000f
+2020906b
+18426000
+d8410000
+6fe10163
+98467e00
+9e008400
+604b028f
+207b0000
+604b0038
+20600000
+78587c00
+6fe3028f
+203b1073
+6fe30038
+9b20e000
+1e00e00a
+6fe10163
+9e067e00
+2fec000f
+2020907f
+58010000
+6b010163
+9b067e00
+9e00e000
+1e023400
+20600000
+18007c00
+2020107d
+203b10a9
+58402c17
+67e189ee
+19317e00
+1fe90400
+df200030
+58000000
+67e189f1
+18437e00
+9842fe00
+1fe17e03
+c300908e
+1fe0ffff
+d8a009f1
+98a08a00
+efe08005
+1fe0fe01
+e7e08005
+18430400
+c2001089
+da2009f3
+da4009ee
+da600000
+df200003
+efe08011
+e8408012
+984ffe00
+9a60a600
+1a20a3ff
+1a40a401
+c2001099
+6fe089ef
+1fed7e00
+1ff27e00
+9a66fc00
+20407e64
+1807fe00
+67f10938
+67e109f4
+20600000
+6fe109f4
+67f10938
+20600000
+58402d19
+67e189ee
+192f7e00
+1fe90400
+df200020
+20201087
+44bd400f
+2040115d
+1c227e00
+1fe17f80
+2c800e03
+242090bb
+1fe97e00
+9ae0fe00
+202010bc
+1ae27e00
+1fe6fc4f
+782afc00
+20407e64
+18072200
+1a2085d8
+202110c4
+1a238400
+202010c6
+18438400
+18408401
+44bdc00f
+6fe08031
+c30190d7
+6fe240d9
+9c267c00
+202110d7
+204010f6
+6fe0c0e0
+207a0000
+6fe08031
+79207e02
+67e08031
+6fe2c0ee
+67e2c0e1
+efe28006
+67e2c0e6
+204010fb
+6fe08031
+c4010000
+2c2ffe01
+202090f3
+18492200
+18410e07
+580040e1
+9a20a200
+efe08011
+afec0000
+202090e4
+18427e00
+202010f0
+6fe0c0eb
+98002400
+1c227e00
+1fe17f80
+1fe97e00
+9ae0fe00
+9a46fc00
+580040f9
+20407e64
+18072200
+9a208c00
+efe08006
+67e0c0ec
+98000400
+20600000
+6fe0c0ec
+98000400
+20600000
+6fe08031
+793ffe02
+793ffe03
+67e08031
+20600000
+44be400f
+d8a040f9
+1800720a
+20407d8c
+d8a040f9
+18002600
+18000e02
+6fe2c0e1
+98000400
+28e1fe02
+20209107
+18430400
+284c0000
+2020910b
+1a627e00
+e7e08005
+184b0400
+1a60a602
+2a61fc28
+24209114
+6fe2c0e6
+98000400
+28e1fe02
+20209114
+18430400
+1a667c4e
+20211107
+18002601
+18e08fff
+24229102
+da2040f9
+18a27e00
+9a267e00
+67e0c0eb
+20600000
+44bec00f
+204010b2
+6fe080e3
+c3029123
+684883a0
+2020118b
+44bf400f
+204010b2
+6fe080e3
+c3021129
+6848839f
+20201201
+18005a00
+6fe1c0af
+98005800
+20600000
+44bfc00f
+6fe0c1e0
+1fe25a00
+6fe1c1dd
+1fe25800
+20600000
+44c04010
+6fe140ac
+1fe25c00
+6fe0c0ab
+1fe25a00
+6fe1c0a8
+1fe25800
+20600000
+44c0c010
+6fe10044
+1fe25c00
+6fe08043
+1fe25a00
+6fe18040
+1fe25800
+20600000
+c5101147
+c68e8000
+c68f8000
+1d815900
+782afc00
+20000020
+20600000
+44c14010
+20404d0b
+18002a08
+18002a00
+7850fc00
+78507c00
+782f7c00
+70890005
+20000002
+70890000
+2040115d
+708a1600
+708a0a10
+6ff08a09
+793ffe07
+67f08a09
+708a0b00
+2020129e
+44c1c010
+70890005
+20000002
+70890000
+6fe0c0c5
+c00c1164
+c0041179
+708a10aa
+708a11aa
+708a1215
+708a0a78
+6ff08a09
+79207e07
+67f08a09
+708a0b04
+2000003c
+708a167a
+708a1700
+708a1800
+708a1900
+708a1a00
+708a112a
+708a0a78
+6ff08a09
+793ffe07
+67f08a09
+708a4300
+20600000
+708a8be6
+708a10aa
+708a11aa
+708a1215
+708a0a78
+6ff08a09
+79207e07
+67f08a09
+708a0b04
+2000003c
+708a163a
+708a1700
+708a1800
+708a1900
+708a1a00
+708a112a
+708a0a38
+20201174
+44c24010
+6fe0c0c5
+1fe67c18
+20429196
+2442919c
+60488017
+1840fe00
+c5169194
+1840fe01
+204011c1
+20201081
+708a4300
+708a3d04
+708a3e00
+708a8403
+708a8940
+20600000
+708a4330
+708a3d06
+708a3e00
+708a8420
+708a8915
+20600000
+44c2c010
+20404d05
+6fe0c1ea
+c07f91ab
+d8c041eb
+98c08c00
+efe08006
+67f08961
+70896027
+6848c1ee
+6ff08960
+9841fe00
+67f08960
+708a10aa
+708a112a
+708a1213
+708a0a7f
+6ff08a09
+793ffe07
+67f08a09
+2000003c
+708a171f
+708a18f8
+708a1918
+708a1000
+708a1120
+2000000a
+70890004
+20000002
+7089000c
+20600000
+44c34010
+d8c00960
+98c0fe00
+6848c0c5
+202011d0
+44c3c010
+6fe0c0c5
+1fe67c18
+204291f3
+244291fa
+58000960
+9a20fe00
+1fe3fe00
+6848c0c5
+184f8403
+18438400
+9846fc00
+20407e64
+1807fe00
+67f08a3f
+18077e00
+1ff07e00
+1fed7e00
+9846fc00
+20407e64
+1807fe00
+67f08a42
+1fecfe00
+67f08a41
+1fecfe00
+67f08a40
+68588a43
+184104f0
+60588a43
+2000000c
+6fe0c0c5
+c00c11e7
+c00411ed
+1841840c
+60588a43
+2000000c
+18418403
+60588a43
+20600000
+1841843c
+60588a43
+2000000c
+18418433
+60588a43
+20600000
+708a4300
+708a3d12
+708a3e00
+708a8403
+708a8ba6
+708a8940
+20600000
+708a4330
+708a3d15
+708a3e00
+708a8420
+708a8ba6
+708a8915
+20600000
+44c44011
+708a3d12
+60488017
+1840a202
+204011c6
+200003c0
+44c4c011
+708a10aa
+708a112a
+708a1210
+708a0a7f
+6ff08a09
+793ffe07
+67f08a09
+708a0b07
+2000003c
+708a190d
+708a1af9
+708a1000
+708a1120
+2000000a
+70890001
+20000002
+70890003
+44c54011
+6fe0c1e8
+c0019229
+c002922e
+c0031231
+c0039234
+c0051237
+c041923a
+c042923d
+c04a1240
+c04f1243
+708a396a
+708a3a07
+708a14a3
+708a1507
+20600000
+708a3966
+708a3a0b
+708a14aa
+708a150a
+20600000
+708a396c
+708a3a0d
+2020122b
+708a396b
+708a3a0f
+2020122b
+708a39a7
+708a3a0f
+2020122b
+708a39b6
+708a3a0f
+2020122b
+708a3968
+708a3a05
+20201226
+708a3960
+708a3a05
+20201226
+708a3953
+708a3a01
+20201226
+708a394c
+708a3a00
+20201226
+70804206
+6fe140ca
+c3071247
+98000c00
+d8408a00
+efe08006
+c07f9251
+98418a00
+efe08006
+e7e08005
+2020124b
+44c5c011
+708a0305
+708a7a94
+20401279
+20401273
+2040126c
+708a8be6
+708a8390
+708a0e0b
+708a0f05
+70896876
+70896976
+6fe0c0c5
+c0841260
+708a0834
+708a01ff
+20000064
+708a020e
+708a0003
+20401224
+708a9a2b
+708a9b13
+204012d3
+2000000a
+70804205
+7041f00c
+2020165e
+6fe0c4d3
+203a1271
+1fe1fe20
+67f08a87
+20600000
+708a8729
+20600000
+6fe0c4d4
+203a1277
+67f08a0d
+20600000
+708a0d00
+20600000
+6fe0c4d5
+203a127d
+67f08a6c
+20600000
+708a6cd3
+20600000
+44c64011
+70015420
+6ff089a0
+67e0c1e9
+1fe67cfc
+24610000
+1fe67c7f
+20610000
+6ff089a3
+1fe1040f
+18438400
+1ff1fe00
+98408400
+184f8403
+6fe0c1e9
+1fe67eff
+9840fe00
+1fe0fffb
+67e08154
+20600000
+6fe08154
+20401297
+67e08018
+20600000
+1fe17eff
+1fe6fc0a
+20407e61
+1ff27e00
+18070400
+9841fe00
+20600000
+6fe0c1ea
+c17f8000
+242c12c4
+6fe0c1e9
+1fe67cf0
+242112c8
+1fe67c7f
+202112c8
+6a308961
+6fe0c1ea
+c1000000
+d8c041eb
+98c08c00
+efe08006
+9a267c00
+24628000
+18c08dfe
+e8408006
+1851fe00
+1a31a400
+9a462400
+18417e0f
+1a21220f
+9a262200
+1a23fe00
+9a40a400
+1a4fa403
+6848c1e9
+18417e80
+207a0000
+58000100
+98460400
+1a427e00
+98467e00
+20610000
+1fe17eff
+c17f8000
+c17f0000
+6fe0c1ea
+c00092cd
+c00112cf
+202012cd
+6fe0c1ea
+c00012cf
+c00092cb
+7041ea02
+20600000
+7041ea00
+20600000
+7041ea01
+20600000
+58000f0f
+20201543
+5800080f
+20201543
+44c6c011
+78507c00
+7830fc00
+782b7c00
+202011a2
+44c74011
+20400ddd
+243a12ea
+6fe0804c
+2feffe02
+7920fe00
+67f08011
+d8c00062
+efe48006
+98006400
+efe38006
+98006600
+6fe08054
+1fe0e9ff
+782d7c00
+20600000
+70801100
+20600000
+1b427e00
+67e30097
+7846fc00
+242c114b
+6fe1015b
+1fe25200
+1d00d001
+1d0151fc
+20600000
+7826fc00
+37cb8400
+202c12ec
+2d000402
+242092f6
+202012ec
+44c7c011
+69610159
+7826fc00
+34730400
+7846fc00
+242c114b
+20600000
+44c84012
+7826fc00
+37c18400
+7846fc00
+242c114b
+6fe1015b
+1fe25200
+1d0151fc
+20600000
+44c8c012
+98002200
+1c227e00
+98409600
+19627e00
+67e240d1
+1a227e00
+20600000
+1fe20400
+44c94012
+18427e00
+20407e26
+1c307e00
+79207e2c
+20407e0c
+793ffe2c
+20401367
+20407e0c
+20740000
+20407e19
+98003600
+37c18200
+20600000
+44c9c012
+20381327
+35330200
+1d020400
+2020132a
+20371329
+34730200
+1c420400
+20341336
+28400601
+24209322
+44ca4012
+6fe08030
+c4000000
+6fe240d1
+98467e00
+24610000
+1fe67cff
+20211322
+20600000
+28400603
+24209322
+2020132d
+44cac012
+69610157
+20201322
+78547c00
+20201339
+78347c00
+20201339
+44cb4012
+204012da
+7850fc00
+78307c00
+20600000
+44cbc012
+69610155
+34730200
+782b7c00
+20600000
+44cc4013
+6961015f
+34730200
+20600000
+44ccc013
+69610155
+35330200
+782b7c00
+20600000
+44cd4013
+20404d13
+51207e00
+782efc00
+79202a00
+08008648
+784efc00
+20600000
+1ca20400
+18418460
+18421c00
+20600000
+44cdc013
+6fe0c098
+1fe0fe01
+c0839364
+18007e01
+67e0c098
+98000800
+20600000
+1b220400
+20748000
+1b420400
+20600000
+1c427e00
+20748000
+1d027e00
+20600000
+44ce4013
+684a004d
+2040136b
+98461600
+19627e00
+68490051
+18438400
+98467e00
+20600000
+44cec013
+2040136b
+67e2004d
+20600000
+44cf4013
+2020137c
+2020137e
+207a0000
+1fe37e00
+1fe0fffd
+1fe0ffff
+24229382
+18007e00
+20600000
+df200010
+d8a00000
+20407d8c
+d8a00287
+df20000a
+20407d8c
+70087400
+70095b00
+7002df00
+7000e300
+7003a500
+7000bc00
+700a5100
+700a5c00
+589e8b33
+67e1c0af
+70008d60
+7040d705
+70001402
+58000e43
+67e10155
+58000600
+67e10157
+58000600
+67e10159
+58000d00
+67e1015f
+580003bb
+67e1015b
+58000500
+67e1015d
+580007d0
+67e10161
+58000ea6
+67e10163
+580001e0
+67e10165
+58000120
+67e10167
+5800011a
+67e10169
+58001400
+67e143de
+58000100
+67e143e0
+20406e66
+58000880
+d8a00870
+98a67200
+20407d9b
+44cfc013
+20758000
+7045fa09
+5800050e
+67e145fb
+58000008
+67e145fd
+7044d17f
+58000024
+67e140b5
+67e140b9
+58000200
+67e140b7
+67e140bb
+58000020
+67e140c3
+67e140bf
+58002000
+67e140c1
+58000480
+67e140c6
+58000c00
+67e140c8
+58000c3f
+67e1417e
+58000333
+e7e10005
+5824109d
+67e1c183
+20407f52
+58000000
+67e141e6
+1c437e00
+67e2409c
+20600000
+70804206
+70804201
+2000000a
+58001d4a
+67f10040
+20600000
+5800ee21
+67f10050
+6ff2011c
+67e2098a
+6ff0813b
+67e08989
+6ff0813e
+c301dbf5
+7835fc00
+c30393f2
+7855fc00
+1ce27e00
+243a13f2
+6ff0813b
+c28113f2
+d85fffff
+2020147f
+6ff20134
+67f2004c
+6ff08135
+1fe17ee0
+67f0804d
+2040155b
+6ff1813c
+67f1804c
+efe08006
+1fe1feef
+e7e08005
+2040154e
+6ff0804f
+79207e04
+67f0804f
+2040154e
+20559424
+6ff0804e
+793ffe03
+67f0804e
+2040154e
+2435dbf5
+2040140c
+c6958000
+70800608
+20600000
+6fe1c4ce
+207a0000
+67e18a01
+20205ceb
+6fe0c4d2
+c0009418
+c001141c
+c0019420
+6fe0c183
+1fe17ee0
+67e0c183
+20600000
+6fe0c183
+1fe17ee0
+1fe1fe1d
+20201416
+6fe0c183
+1fe17ee0
+1fe1fe1b
+20201416
+6fe0c183
+1fe17ee0
+1fe1fe17
+20201416
+6fe0c1a5
+67f08086
+d8c04186
+d8a08070
+20407d74
+6fe4419d
+98000000
+6ff40140
+67e4009e
+20205ca3
+18027e00
+67e4419d
+d8c08070
+d8a04186
+20407d74
+6ff08086
+67e0c1a5
+2020155d
+6ff08085
+1ff1fe00
+243a143f
+6fe1c174
+247a0000
+6ff08085
+1fe1fec0
+67f08085
+70800680
+6ff0812d
+c4008000
+6ff18149
+67e1c174
+20600000
+44d04014
+1b427e00
+20407e0a
+684a4164
+18467cff
+20610000
+1fed7e00
+1ff27e00
+9846fc00
+20407e61
+d84000c8
+20407e6f
+67e08096
+24341453
+1fe67e00
+6849c174
+9840fe00
+67e1c174
+58000000
+67e24164
+20600000
+d85fffff
+6fe0c17b
+793ffe07
+67e0c17b
+44d0c014
+2040155d
+6fe0c15c
+67e0c181
+6fe0c17f
+79207e07
+67e0c17f
+44d14014
+204012d1
+6fe14479
+20407e7a
+6fe24164
+9840fe00
+67e24164
+2040142e
+20401410
+6fe24182
+1fe22400
+6fe2c17d
+67f2004c
+1fef2200
+37d98200
+1b227e00
+67e34168
+70800502
+37d98200
+37d98200
+1a227e00
+67f0804f
+70800502
+37d98200
+37d98200
+6252004c
+70800520
+37d98200
+37d98200
+605a004c
+70800510
+37df8200
+44d1c014
+58000000
+1ce27c00
+2022948f
+6ff0813c
+6858813d
+98467c00
+2021148d
+18427e00
+9ce67e00
+1fe0fe01
+1fe0fe0a
+37d98200
+9e20fe00
+684a4160
+9840fe00
+6849c174
+984ffe00
+1fecfe00
+1ff1fe00
+1fe0fe6e
+68490163
+9846fc00
+20407e61
+1ff07e00
+18070400
+9841fe00
+684b4168
+20407dff
+18423200
+6fe34048
+20401073
+1b427e00
+67e3095c
+1ce27e00
+e7e08005
+6ff0811d
+1fe1fef0
+e7e08005
+20600000
+44d24014
+20401436
+6fe1c174
+207a0000
+6fe0c099
+207a0000
+6fe0c767
+203a14b6
+6fe0c6bc
+207a0000
+6fe0c6bd
+247a0000
+da600ab7
+20400a6e
+20628000
+2040156e
+247a0000
+6fe0c040
+2fe00e03
+242094e2
+6fe14042
+207a0000
+20758000
+44d2c014
+6848809d
+6fe14042
+984ffe00
+18518400
+184b0400
+98467e00
+684a4044
+9840fe00
+6848c15b
+98467e00
+1ff06000
+44d34014
+6fe1404e
+1fe37e00
+20407e26
+1e027e00
+20407e0c
+1b420400
+20407e0a
+20740000
+20407e1f
+44d3c014
+6fe0c17d
+98467c00
+20211456
+604a4160
+204031b6
+204053ac
+684a4160
+20201464
+44d44015
+6fe0c040
+c3800000
+c3818000
+6fe0c767
+203a14ea
+6fe0c6bc
+207a0000
+6fe0c427
+243a14ee
+6fe0c09b
+207a0000
+6fe14159
+207a0000
+6848c15b
+98467e00
+d8401d4c
+984ffe00
+202014d8
+44d4c015
+7855fc00
+6fe08030
+c4008000
+24369517
+20401512
+6fe140c8
+67e1003e
+6fe08047
+c2819525
+c5869525
+20405355
+243a1525
+6fe0c646
+c2809525
+6fe14471
+20407e7a
+243a1525
+70009d00
+c5869525
+6fe0c179
+203a1529
+1fe0ffff
+67e0c179
+20600000
+d8e00001
+20205842
+d8e00001
+20205846
+70415e00
+6fe1c16e
+1fe0fe01
+67e1c16e
+20600000
+44d54015
+684940c8
+18430400
+6fe1003e
+9840fe00
+67e1003e
+70009d00
+6fe1c171
+1fe0fe01
+67e1c171
+6fe0c15e
+1fe0fe01
+67e0c15e
+20600000
+70009d00
+6fe0c178
+67e0c179
+20600000
+6848c177
+6048809d
+20600000
+6fe0c17d
+247a0000
+70804206
+58000f0c
+20401543
+58030d40
+2040137f
+37d98200
+1e226000
+204012d1
+70804204
+2000000a
+37d98200
+1e227e00
+9e067e00
+1fe0fe30
+d84000ff
+20407e6f
+67e0c17d
+20007530
+20007530
+20007530
+20600000
+d8a00fff
+98a10a00
+6fe0c17a
+1fe17ef0
+1fed7e00
+98a1fe00
+67f1004c
+efe10006
+e7e10005
+58000001
+2020154f
+58000002
+37d98200
+67f08005
+37d98200
+37d98200
+20600000
+6ff20134
+67f2004c
+6ff08134
+1fe17e41
+6848c182
+9841fe00
+67f0804c
+58000020
+2020154f
+44d5c015
+6fe2009e
+67f2004c
+58000004
+2040154f
+6fe200a2
+67f2004c
+58000008
+2020154f
+6fe14157
+f9207e00
+67e14157
+20600000
+6fe14157
+f93ffe00
+67e14157
+20600000
+44d64015
+204031b4
+6fe14157
+1fe22200
+6fe0804c
+2feffe06
+7920a20b
+6fe08078
+6848807c
+9840fe00
+68488048
+9840fe00
+7d3a220a
+6fe1c4f3
+7d3a2201
+6fe1030e
+68490310
+9840fe00
+7d3a220d
+6fe44775
+7d3a220f
+6fe4477d
+7d3a220e
+6fe0c1db
+7d3a2208
+6fe0c09a
+2fe1fe0a
+2040958d
+1a227e00
+67e14157
+20600000
+6ff10112
+7d3a2206
+6ff1010e
+7d3a2205
+20600000
+6ff20138
+793ffe1b
+67f2004c
+2040154c
+2020137c
+6ff2013c
+793ffe14
+67f2004c
+2020154e
+474cc033
+7855fc00
+70029d01
+70028703
+70029e01
+5fffffff
+67e102a1
+18007e00
+67e0829f
+67e082aa
+67e1c16e
+67e1c171
+20401901
+7041f501
+7041f600
+7002bc01
+7002bd01
+70443500
+202019dc
+474d4033
+7834fc00
+70028803
+70443701
+70099e01
+5800ffff
+67e109a0
+18007e00
+67e2c6a4
+79207e27
+67e2c69f
+2020159b
+474dc033
+7854fc00
+58000017
+67e14382
+1fe0fe04
+67e14444
+70028801
+70442700
+70009d00
+20401626
+6fe102b5
+67e14394
+6fe10289
+1feffe05
+1ff1fe00
+67e102b5
+2020159b
+474e4033
+20401651
+6fe08287
+2feffe04
+79208032
+20403182
+6fe08288
+c28095d4
+202015e6
+474ec033
+7834fc00
+204019d3
+202115e3
+204016a2
+20401916
+7856fc00
+204017d4
+24768000
+6fe08005
+1fe0fe01
+67e08005
+204018c7
+7854fc00
+20600000
+2040161a
+7854fc00
+20600000
+474f4033
+7043dd00
+793f8030
+20407602
+20402064
+78577c00
+204019d3
+2021161a
+6fe082bc
+20401637
+204016a2
+204016fa
+242c160c
+2040162a
+203695f7
+c51815f7
+20201606
+474fc033
+6fe0c3dd
+1fe0fe01
+67e0c3dd
+c0061606
+204018c7
+20401916
+6fe082bd
+20401637
+204017e2
+20401979
+6fe1446d
+20407e7a
+2040160f
+20341614
+47504034
+2040202a
+20402021
+204078f2
+6fe082aa
+c281961a
+4750c034
+20401aa6
+2020105d
+78547c00
+c5157ec5
+c514fec5
+c5187ec5
+20600000
+47514034
+78377c00
+204017d8
+203695f7
+c51815f7
+20201606
+4751c034
+20401621
+20403243
+20401626
+20402072
+70095b15
+202078dc
+d8a044e9
+20407d90
+70029d00
+70028800
+70028700
+47524034
+70439c00
+70439b00
+20206f37
+4752c034
+6fe08005
+1fe0fe01
+67e08005
+6fe08287
+c3818000
+79207e03
+67e08287
+6fe14394
+67e102b5
+58000000
+67e243bc
+20600000
+1fe20400
+47534034
+18427e00
+c2801651
+c2809640
+c3011651
+c283964e
+c2811646
+20201651
+20401651
+7920002d
+793f802f
+70890103
+70892084
+20600000
+20401651
+7920002f
+793f802e
+70890105
+70892080
+70893020
+7089340a
+20600000
+20401646
+7920002e
+20600000
+4753c034
+783b7c00
+793f802d
+793f802f
+70890101
+70892080
+708925a7
+70893003
+70893358
+7089340a
+70893740
+708a6d09
+20600000
+47544035
+785b7c00
+793f8032
+70890100
+70892080
+708925a3
+70893003
+70893368
+70893409
+70893728
+708a6d09
+20600000
+7844fc00
+7843fc00
+6fe182af
+98001e00
+6fe08016
+1fed8400
+79200401
+18431c00
+20600000
+2040167c
+2040118b
+6fe1015d
+2040137f
+202011a2
+20369207
+c5181207
+2040167c
+20201201
+4754c035
+2040115d
+6fe082df
+243a168f
+6fe08016
+1fe67c24
+20211689
+18000400
+c1128000
+18000418
+c1130000
+1800044e
+20600000
+1fe67c0a
+2021168c
+1fe0fe01
+1fe3fe00
+1fe08402
+20600000
+6fe08016
+1fe38400
+20600000
+d84001f4
+207a0000
+d84000fa
+c1008000
+d8400096
+c1010000
+d8400064
+c1018000
+d840004b
+c1020000
+d8400032
+c1028000
+d8400028
+c1030000
+d8400014
+20600000
+47554035
+78287c00
+6fe202ab
+98001200
+204010ac
+204016d8
+58000200
+203496ac
+6fe10295
+1fe37e00
+6849015d
+9840fe00
+20401313
+1b427e00
+20600000
+4755c035
+20407d43
+67210987
+1a208c01
+efe08006
+c4000000
+1a208a1a
+efe10005
+1fe0fe01
+e7e10005
+20401844
+20401869
+20401872
+204016c2
+20407d51
+6f210987
+20600000
+1a208c19
+efe08006
+1a208a18
+e8408005
+9840fe00
+1fe67c24
+202116ca
+1fe0ffdb
+e7e08005
+20600000
+1a208c30
+efe28006
+18000400
+18007225
+c30016d2
+18408401
+1fe37e00
+c20016d0
+1840ffff
+1a208a22
+e7e08005
+20600000
+47564035
+6fe0829f
+98000e00
+684a82b7
+a84fffff
+202096ed
+6fe082a9
+98e67e00
+202116e3
+1fe60fff
+202016de
+18e27200
+18000e00
+a84fffff
+202096e8
+1f20f201
+1f227e00
+203a16ed
+18e08e01
+1f20f3ff
+202016e5
+18e27e00
+67e08016
+20600000
+203496f3
+37c18200
+20600000
+d9600ea0
+34730200
+20600000
+78487c00
+6fe143e5
+1fe21600
+20201700
+4756c035
+20401764
+78287c00
+6fe10295
+684a43bc
+98409600
+20401673
+47574035
+2040166a
+c5979708
+783cfc00
+2000001e
+2040166a
+19699600
+7856fc00
+7826fc00
+7830fc00
+78507c00
+19623600
+37c18400
+20371711
+1b420400
+604b0097
+242c179f
+4757c035
+78287c00
+d8404ea9
+6fe0c1f0
+984fb600
+20404d0d
+2037171e
+204017a3
+6fe08287
+c301971e
+684b0097
+20559444
+2040127f
+7823fc00
+7824fc00
+09800008
+19897e00
+67e0816b
+09800008
+19897e00
+67e0816c
+1fe27200
+20229743
+c519172f
+09800008
+19897e00
+e7e08005
+c200172a
+20201743
+18a22400
+204018c0
+6a20816c
+1a20a3fc
+24211797
+20401769
+1a420a00
+d8400000
+6f20816c
+1f20f3fc
+20229741
+09800008
+19897e00
+e7e08005
+18408401
+18417c0f
+20429786
+c200173a
+2040178e
+1a420a00
+47584036
+09800018
+1fef7e00
+1ff17e00
+e7e18005
+78287c00
+204017b1
+2023179b
+c5991755
+6fe0816c
+203a1755
+1fe0fffc
+67e0816c
+20406dbb
+6ff08108
+c3039797
+1800700c
+65e20273
+20404d0c
+7836fc00
+793f8030
+20406dbd
+6fe082bc
+7d3e7e07
+67e082bc
+4758c036
+68488017
+1840a202
+c5169761
+1840a202
+7846fc00
+2040115d
+202011c6
+c6990000
+20406e2f
+1800700c
+20406e37
+20206e36
+7080d500
+7080d601
+6fe0816b
+1fe17e03
+67f080d7
+5800016d
+67f100d1
+67f100d3
+6a20816c
+1a20a3fc
+684ac6a4
+280ffe0f
+2040977c
+20406cc9
+58000000
+67f100da
+70800a06
+70800a07
+20600000
+18467c00
+20229781
+184085ff
+79200427
+20600000
+58ffffff
+1ff07e00
+d840ffff
+98418400
+20600000
+18a22400
+6fe0816c
+1fe0fffc
+98467c00
+20628000
+605900da
+1a420a00
+20600000
+09800020
+1fef7e00
+1fecfe00
+e7e20005
+18a22400
+18007000
+1fe25e00
+605900da
+20600000
+202017a1
+204017b1
+20400e7c
+20201755
+20404d0e
+c518179f
+79200030
+20201758
+793f8030
+202017a1
+20406dbd
+20200e7c
+c51797a9
+c51697ad
+6fe10165
+1fe25200
+1c225000
+20600000
+6fe10169
+1fe25200
+1c20d001
+20600000
+6fe10167
+1fe25200
+1c225000
+20600000
+6fe0816c
+1fe08405
+18498400
+6fe082bc
+c51797b8
+c28017ba
+c28097bb
+203e17bd
+202017c0
+202017c5
+18430400
+202017c5
+18408403
+18438400
+202017c2
+18408403
+18498400
+58000028
+98408400
+202017c5
+6fe0c1f0
+984f8400
+da204e20
+9a2ffe00
+98460400
+1b627e00
+98463600
+20600000
+204017e4
+68488017
+2040118b
+204011a2
+78287c00
+d960157c
+20201701
+47594036
+6fe082bd
+20401637
+204017e4
+6fe082bc
+20401637
+68488017
+2040118b
+204011a2
+78287c00
+d960157c
+c5979701
+d9602134
+20201701
+204017e4
+20200e7c
+4759c036
+2040166a
+20401678
+20404d13
+79202a00
+782efc00
+78307c00
+7850fc00
+204016f0
+785d7c00
+c5179826
+c5169838
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+7823fc00
+7824fc00
+475a4036
+6fe0c1f5
+08008608
+efe08006
+1fe27200
+08008608
+1f267c00
+20229805
+6ff0800a
+203a1801
+c519181b
+d8c041f7
+efe08006
+08008608
+c2001802
+78247c00
+08008618
+78447c00
+c597980c
+7843fc00
+58000000
+08008603
+37d38200
+20000064
+784efc00
+785c7c00
+2040115d
+20404d11
+6fe0c1f5
+1fe17e03
+c1818000
+6fe0c39c
+c0011901
+c1828000
+6fe0c1f7
+c00298fc
+20600000
+1f20f3fc
+1f220400
+20406da8
+d8c041f7
+efe08006
+08008608
+c200181f
+20406dad
+1de27e00
+08008620
+20201805
+df20000a
+5800003c
+08008608
+c2001827
+784efc00
+783c7c00
+19317e00
+1ff17e00
+1ff1fe00
+08008620
+c5171835
+58000001
+08008605
+783d7c00
+202017f4
+58000000
+08008605
+202017f4
+6fe0c1f0
+1fe37200
+20000002
+c200183a
+19317e00
+1fecfe00
+1ff18400
+18427e00
+08008608
+18427e00
+08008628
+202017f4
+da601848
+da40185c
+d8e00005
+202018a0
+1a208c04
+e8420006
+1a208c37
+efe08006
+1a208a2b
+e7e08005
+efe10006
+1febfe00
+98409600
+1a208a04
+19627e00
+e7e20005
+efe10006
+1febfe00
+1a208a02
+e7e10005
+efe20006
+1a208a2c
+e7e20005
+202019df
+efe08011
+793ffe03
+e7e08011
+6fe102b5
+67e14394
+62210970
+70095b44
+204078dc
+6a210970
+1a208c2e
+efe10006
+67e14394
+20600000
+da600000
+da40186d
+d8e00006
+202018a0
+1a208c37
+efe28006
+1a208a30
+e7e28005
+202016cc
+da600000
+da401876
+d8e00007
+202018a0
+1a208c37
+efe08006
+20401883
+e7e08005
+1a208c38
+efe08006
+20401891
+e7e08005
+62210970
+70095b42
+204078dc
+6a210970
+20600000
+205a188b
+1a208a35
+24748000
+6848c442
+284ffe07
+7920fe07
+1a208a36
+20600000
+1a208c35
+efe08006
+24748000
+1a208c36
+efe08006
+20600000
+205a189a
+6848c442
+284ffe07
+7920fe07
+1a208a36
+24748000
+793ffe07
+1a208a35
+20600000
+1a208c36
+efe08006
+24748000
+1a208c35
+efe08006
+20600000
+efe08011
+afec0000
+20608000
+1a208c1a
+e8410006
+1a208c20
+efe10006
+98467e00
+202298af
+242118b4
+1fe67c01
+202298ad
+20600000
+1a627e00
+20207e7a
+efe08011
+f93ffe00
+e7e08011
+1a427e00
+20207e7a
+1a208c1a
+efe10006
+1a208c20
+efe10006
+98467e00
+d840ffff
+98467c00
+202298af
+d840f000
+98467c00
+242118af
+20600000
+6848829e
+6fe0816b
+1fe37e00
+9842fe00
+2feffe02
+7920800f
+20600000
+475ac036
+204019dc
+c6180000
+204018ee
+6fe0816b
+2feffe04
+7920802a
+1fe37e00
+9842fe00
+2feffe02
+7920800f
+c6078000
+6fe0816c
+203a18e0
+6fe08287
+c30218e0
+684a0273
+6fe246a9
+98467c00
+2022937c
+604a46a9
+6fe2c6a4
+1fe0fe01
+79207e27
+67e2c6a4
+6848829e
+79400402
+6048829e
+6fe0c3c0
+c4030000
+475b4036
+6fe0816c
+207a0000
+6fe0816b
+2fe00601
+20209ed7
+2fe00602
+20209ec5
+20600000
+475bc036
+6848829e
+284c0005
+20608000
+6fe0816b
+1fe3fe00
+9842fe00
+c4018000
+793f8405
+79400403
+6048829e
+28400603
+24608000
+20600000
+6fe08287
+79207e04
+67e08287
+79200032
+20600000
+475c4037
+70439c00
+dfe00000
+67e246a9
+67e2c69f
+79207e27
+67e2c6a4
+6fe08287
+793ffe04
+67e08287
+793f8032
+20600000
+da200001
+6fe0816b
+c3830000
+da200000
+20600000
+18c20a00
+68494444
+18a20c00
+20600000
+475cc037
+6fe0829e
+c3828000
+20401937
+20401b0d
+203a195b
+efe10006
+e8410006
+18422200
+9a267e00
+20401912
+20407ebb
+1fe20400
+e8208006
+1a227e00
+98c0fe00
+67e1097b
+2040194b
+2040195d
+20401b0d
+efe10006
+1fe22200
+18c22600
+e8410006
+18422400
+9a467e00
+20401912
+20407ebb
+9a40fe00
+e7e10013
+9a267c00
+24628000
+20201b26
+2040193e
+c6148000
+6fe0c3c0
+c3011949
+20401b10
+203a1949
+20201947
+20401b0d
+203a1949
+efe10006
+e8410006
+98462200
+20401912
+18427e00
+9a267c00
+20211949
+79200029
+20600000
+793f8029
+20600000
+1a227e00
+207a0000
+d8200001
+20600000
+475d4037
+18408401
+20401a0e
+18c08dfe
+efe10006
+d8402902
+98467c00
+24628000
+18c08c01
+18c22200
+efe08006
+20600000
+18000400
+18000201
+475dc037
+6048c1f6
+6848829e
+79200405
+18417efc
+9821fe00
+67e0829e
+1fe17e1f
+280ffe29
+7920fe04
+67e0c1f5
+6fe0c1f5
+28200601
+2420996d
+6fe0c1f6
+207a0000
+c5191973
+6f20c1f6
+6fe1097b
+1fe20c00
+d8a041f7
+20207dc7
+20406e2f
+20206d8f
+d8e00000
+20201566
+d8e00000
+2020156a
+475e4037
+c6078000
+c6180000
+6fe0816b
+1fe17e03
+67e0c3d3
+6fe0816c
+207a0000
+5800016d
+67e143d8
+475ec037
+6fe0c3d3
+c001a0b8
+20401993
+24341975
+20401977
+58000000
+67e143d6
+6fe143d8
+1fe08c02
+475f4037
+efe10006
+c0021c7d
+c0031f39
+c0029efb
+20600000
+6fe0c3d3
+c00119a2
+c00099b9
+20600000
+20407ec5
+d8400004
+9fe67c00
+20628000
+d8400005
+9fe67c00
+20628000
+d8400006
+9fe67c00
+20628000
+20207ec7
+6fe143d8
+1fe20c00
+efe10006
+67e143d4
+efe10006
+20401997
+24740000
+6848816c
+604943d6
+6fe143d4
+1fe0fe04
+98467c00
+2022fec5
+6f20816c
+d8a01000
+6fe143d8
+1fe20c00
+20407dc7
+20207ec7
+20407ec5
+6fe143d6
+247a0000
+20207ec7
+204019b5
+24740000
+6fe143d6
+d8a01000
+98a0a200
+6848816c
+9840fe00
+67e143d6
+6f20816c
+1a220a00
+6fe143d8
+1fe20c00
+20407dc7
+58001000
+67e143d8
+6fe143d4
+1fe0fe04
+684943d6
+98467c00
+2022fec5
+20207ec7
+20407d5e
+d8a04359
+20201ebf
+6fe1446b
+20207e7a
+684a02a3
+2040136b
+98461600
+19627e00
+684902b5
+18520400
+18438400
+98467e00
+20600000
+2040136b
+67e202a3
+20600000
+475fc037
+1a208c50
+efe08006
+20401692
+1a208c02
+efe10006
+984ffe00
+68490163
+984ffe00
+d84f4240
+9846fc00
+d8400682
+6fe0c1f0
+984f8400
+1a208c2b
+efe08006
+984ffe00
+9840fe00
+67e243bc
+6fe140c8
+20407e64
+18078400
+9840fe00
+1a208a0e
+e7e10005
+20600000
+47604038
+6fe1099e
+98002400
+6fe109a0
+98002600
+6fe14396
+98000c00
+78347c00
+20600000
+efe10006
+1fe17eff
+207a0000
+9a467c00
+24610000
+9a667c00
+20628000
+20211a0c
+18007c01
+20600000
+18007e00
+20600000
+20401a11
+20229a1e
+20600000
+4760c038
+6fe14396
+98000c00
+efe10006
+1fe17eff
+207a0000
+98467c00
+20628000
+efe08006
+98c08c00
+efe08006
+98c08c00
+20201a14
+efe08006
+98c08c00
+20600000
+47614038
+6fe14396
+98000c00
+efe10006
+1fe17eff
+207a0000
+efe08006
+98c08c00
+18c08dfe
+efe10006
+98467c00
+20628000
+efe08006
+98c08c00
+20201a24
+6fe14396
+98000c00
+efe10006
+1fe17eff
+207a0000
+1fe08401
+efe08006
+98c08c00
+efe08006
+98c08c00
+18c20a00
+20201a32
+6fe109b4
+20201a40
+4761c038
+6fe14396
+98000c00
+efe10006
+1fe17eff
+203a1a4b
+98467c00
+20229a4c
+efe08006
+98c08c00
+efe08006
+98c08c00
+20201a41
+20207ecf
+efe08006
+67e089ba
+1fe27200
+d8a009bb
+20407dc7
+efe08006
+67e089b3
+20407d5e
+20207ed1
+47624038
+20401a58
+20201a6a
+d8402a00
+20401a21
+207a0000
+efe08006
+18c20a00
+6848c2f7
+18427200
+98467c00
+24211a67
+98460400
+d8c042f8
+20407dc7
+18427200
+24429aa2
+20600000
+1fe27200
+d8c042f8
+20207dc7
+da604407
+da2043e8
+20401a77
+58000000
+79347e00
+67e0895c
+da604427
+da204408
+20401a77
+20740000
+6fe0895c
+203a137c
+20600000
+4762c038
+20407ec5
+20407da1
+da400000
+d8a0098f
+20401a91
+6fe0c2f7
+1fe08401
+9a40a200
+1a20a202
+1a267c1f
+24211a8f
+e0408005
+d8400009
+e0408005
+98007200
+20407dc7
+1a222400
+1a427e00
+67e0898e
+d8c0098e
+5fffffe0
+9a608a00
+20207d7d
+20407ec7
+20201a89
+efe08011
+207a0000
+1fe0fe01
+e8408006
+18467c09
+20229aa0
+9a40a400
+1a220c00
+98007200
+20407dc7
+18c22200
+1a227e00
+9a667c00
+20610000
+20201a91
+9a20a200
+20201a9c
+58000020
+e7e08005
+c2001aa2
+20600000
+47634038
+7855fc00
+20371aaa
+24369ab8
+20401512
+6fe140c8
+67e10295
+24369525
+c5079525
+6fe0816c
+243a1525
+6fe0c1f6
+243a1525
+6fe0c3c0
+c2829525
+6fe08287
+c2829525
+20201504
+684940c8
+18430400
+6fe10295
+9840fe00
+67e10295
+2020151d
+d8e00000
+20201ad6
+d8e00000
+20201ada
+d8e00001
+20201ad6
+d8e00001
+20201ada
+d8e00002
+20201ad6
+d8e00002
+20201ada
+d8e00003
+20201ad6
+d8e00003
+20201ada
+d8e00004
+20201ad6
+d8e00004
+20201ada
+d8e00005
+20201ad6
+d8e00005
+20201ada
+6fe0c3c0
+f9207e00
+67e0c3c0
+20600000
+6fe0c3c0
+f93ffe00
+67e0c3c0
+20600000
+58112233
+67e1c3c1
+58445566
+e7e18005
+58778899
+e7e18005
+58001122
+e7e18005
+58334455
+e7e18005
+58000066
+e7e08005
+20600000
+59000302
+67e24350
+58010010
+67e1c354
+70439d01
+20600000
+da200000
+d8200001
+20201b02
+d8200003
+20401b02
+1a427e00
+e7e08005
+20600000
+18000202
+1a20a204
+20401b02
+1a20a3fc
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+20600000
+4763c038
+1a20a205
+204052ff
+1a20a3fb
+1a227e00
+e7e10005
+58000000
+e7e10005
+18227e00
+e7e08005
+20600000
+20405339
+1fe20c00
+20600000
+6fe144f1
+20600000
+20401b15
+1fe20c00
+20600000
+6fe144f4
+20600000
+20401b0d
+18c08c05
+20600000
+20401b0d
+18c08c09
+20600000
+20401b12
+18c08c09
+20600000
+20401b12
+18c08c05
+20600000
+2020534f
+20205352
+20205355
+2020533e
+67e4444c
+20201b39
+184122ff
+20401b2d
+184ca200
+20201b33
+6220c442
+2a2ffe01
+20409b35
+2a2ffe02
+20409b37
+20600000
+6220c443
+20201b2e
+d8e00008
+20201b3b
+d8e0000b
+20201b3b
+d8e00005
+20201b3b
+6fe4443a
+f9207e00
+67e4443a
+20600000
+7002bc01
+7002bd01
+20401651
+20401b45
+20401bc3
+2020165e
+47644039
+6fe0c3e2
+c1808000
+d8e00002
+20407de9
+247a0000
+6fe143e3
+684943e5
+98467e00
+d8e00002
+20407ddb
+7854fc00
+20401be4
+20401b64
+24768000
+4764c039
+6fe3016d
+67e30297
+6fe08002
+1fe0fe01
+67e08002
+20401b6b
+20748000
+20401c0b
+24768000
+6fe08004
+1fe0fe01
+67e08004
+6fe48173
+67e48a01
+20600000
+47654039
+20401c56
+204016f6
+6fe08001
+1fe0fe01
+67e08001
+20600000
+4765c039
+6fe082e0
+c18d8000
+6fe30297
+684b436b
+98467c00
+24628000
+20400a48
+24628000
+20401b7b
+204015ae
+7041db00
+7002d700
+7043e200
+7002e000
+20200a30
+47664039
+18007fff
+38080001
+67e282b7
+da200287
+204016cc
+18007204
+d8a002ab
+20405a90
+6fe14378
+67e102b5
+180a7e00
+1fe17e0f
+1fe67c04
+20211b86
+67e082a0
+67e085a8
+4766c039
+684941f3
+60490289
+18422600
+1c40fe07
+9a66fc00
+20407e64
+18072200
+9a267e00
+9a60fe00
+684941f1
+9840fe00
+67e2028b
+9c462200
+1a20a3fa
+da402205
+6fe0c371
+7d3a2406
+6fe0c36a
+7d3a2407
+1a427e00
+67e141f5
+6fe3437a
+e7e30005
+6fe30297
+e7e30005
+6fe202ab
+e7e20005
+180a7e00
+e7e10005
+180a7e00
+e7e08005
+18007e02
+e7e08005
+1a2b7e00
+e7e10005
+1a6b7e00
+e7e10005
+47674039
+58000000
+e7e10005
+6fe14378
+e7e10005
+6fe282b7
+e7e28005
+6fe082a0
+d84000a0
+9841fe00
+e7e08005
+204017e2
+580041f5
+1fe08c12
+efe18006
+67e182af
+20600000
+70001624
+70098e00
+6fe0c427
+207a0000
+d8e00000
+20407de9
+247a0000
+4767c039
+78287c00
+20401be4
+20401c56
+20401bed
+24369bd7
+6fe08003
+1fe0fe01
+67e08003
+6fe0816b
+1fe17e0f
+c0019c1c
+c0029c2e
+4768403a
+6fe0898e
+6848c432
+98467c00
+24229bc5
+180a7e00
+d84001ff
+98417e00
+1fe0fefa
+20407d81
+d8e00000
+6fe14428
+20207ddb
+4768c03a
+7854fc00
+588e89be
+1fed7e00
+1fe1fed6
+98001200
+58555555
+67e182af
+202010ac
+4769403a
+6fe0c42a
+6848c42b
+18520400
+184b8400
+98408400
+6048c1f5
+c0009bfe
+6848c3e7
+1840fe06
+67e0c1f6
+6fe3437a
+67e341f7
+18427200
+d8c043e8
+20407dc7
+20201c04
+5800000c
+67e0c1f6
+6fe3437a
+67e341f7
+6fe341dd
+e7e30005
+4769c03a
+6fe08000
+1fe0fe01
+67e08000
+db600708
+7856fc00
+202017cd
+476a403a
+6fe0c433
+c1808000
+6fe08000
+1fe0fe01
+67e08000
+d8400c03
+6fe0c434
+7d3a0406
+1a227e00
+7d3a0407
+604941f5
+6fe3437a
+e7e30005
+6fe30297
+e7e30005
+202017cd
+6fe30173
+684b437a
+98467c00
+24628000
+d8400004
+6fe0c42b
+7d3a0406
+6048c1f5
+6848c407
+1840fe06
+67e0c1f6
+6fe3437a
+67e341f7
+d8c04408
+18427200
+20407dc7
+204017e2
+20201bd7
+6fe30173
+684b437a
+98467c00
+24628000
+2040190d
+6220c36a
+6fe3016d
+67e30297
+6fe40179
+67e402ab
+68490181
+476ac03a
+184b8400
+6fe10183
+1febfe00
+67e10289
+67e2028b
+98467e00
+1fe0d1fe
+6fe48185
+67e482b3
+6fe0818e
+1fe1041f
+604882a0
+1ff18400
+18430400
+604882d7
+da200287
+204019df
+da200287
+204016cc
+204015ba
+20400a48
+24628000
+476b403a
+2040105d
+20401f18
+70095b14
+204078dc
+20200a30
+476bc03a
+6fe08016
+c0129c5c
+c0131c62
+c0139c68
+20201c68
+6848c432
+284ffe01
+20209c73
+284ffe02
+20209c78
+20201c6e
+6848c432
+284ffe02
+20209c78
+284ffe00
+20209c6e
+20201c73
+6848c432
+284ffe00
+20209c6e
+284ffe01
+20209c73
+20201c78
+70001625
+6fe0898e
+79207e00
+67e0898e
+20600000
+70001626
+6fe0898e
+79207e01
+67e0898e
+20600000
+70001627
+6fe0898e
+79207e02
+67e0898e
+20600000
+efe18006
+67e1c436
+c0011c94
+c0019c9c
+c0021c9f
+c0031cc8
+c0041d15
+c0051d93
+c0061dc2
+c0081dd8
+c0091e1b
+c00b1e3f
+c00c1e52
+c00f1e57
+c0291e5b
+20600000
+18002203
+20401e80
+58000002
+e7e08005
+6fe14380
+e7e10005
+20600000
+20401c9c
+18002203
+20401e80
+58000003
+e7e08005
+6fe14380
+e7e10005
+20600000
+1fecfe00
+67e14382
+20600000
+20401eb0
+20407ec5
+20201ca2
+d9600003
+204019f9
+20401a02
+203a1cc6
+24211cc3
+18c08dfe
+20407d5e
+20407d55
+24341cb6
+20407d43
+20407ec7
+6162096c
+18002214
+20401e80
+6962096c
+20407d51
+58000005
+e7e08005
+58000001
+e7e08005
+20407d58
+efe10006
+1fe17eff
+e7e10005
+efe08006
+1fe27200
+20407dd4
+20407d5b
+196097ff
+20229cc6
+efe08006
+98c08c00
+20201ca4
+efe08006
+98c08c00
+20201cc0
+20341e74
+20201ea3
+20401eb0
+efe10006
+67e1435a
+20407d5e
+d8a009a2
+6fe143d4
+1fe0fff9
+20401ec1
+20201cdb
+78547c00
+6849099e
+6fe109a0
+98467c00
+24211cd8
+18427e00
+c1800000
+78347c00
+7002d801
+20201e75
+20401cd1
+20740000
+6849435a
+58002800
+98467c00
+20229ce2
+20201e74
+70443900
+6849099e
+60490964
+20401a3e
+243a1e74
+68490964
+20401a3e
+243a1cfb
+18c22200
+6fe089b3
+1fe27200
+684889a2
+98467c00
+24229cf7
+da4009a3
+20407e66
+20229cfe
+6fe109bb
+6849435a
+98467c00
+20229d06
+6fe10964
+1fe0fe01
+67e10964
+20201ce7
+6fe0c439
+c0009d06
+20201e74
+6fe109bb
+6849435a
+98467c00
+24229cf7
+70443901
+68490964
+604909b6
+20201cf7
+6fe0c439
+c0001cf7
+70443902
+68490964
+184085ff
+604909b8
+da200005
+20401e80
+58000007
+e7e08005
+6fe109b6
+e7e10005
+6fe109b8
+e7e10005
+20600000
+20401eb0
+20401ebd
+20201d18
+6849099e
+60490964
+204019f9
+20401a11
+18c08dfe
+18c27e00
+67e109b4
+684909a3
+58002a00
+98467c00
+20229d7f
+58002803
+98467c00
+24229d6b
+d9600002
+20401e86
+24211d48
+68490964
+20401a3c
+243a1d48
+20401e8a
+24229d46
+24341d4a
+78547c00
+da200014
+20401e80
+58000009
+e7e08005
+18a26000
+18a08a01
+20401d58
+20401e82
+20401a3c
+20401d5f
+6fe089ba
+1fe0a205
+e2208030
+1a267c07
+2442fec9
+2042fecb
+20401eb5
+9a26fc00
+20407e64
+18079600
+196097ff
+20229d48
+20401e82
+20201d27
+20341e74
+20201ea3
+20401e95
+20401e82
+20401a3c
+20401e09
+243a1d48
+20407d55
+6fe10964
+1fe0ffff
+e7e10005
+20401e9f
+20401d5f
+196097ff
+20229d48
+20201d46
+6fe10964
+e7e10005
+6fe089b3
+1fe27200
+20407d58
+20407dc7
+20207d5b
+20407d55
+6fe10964
+e7e10005
+20407d5b
+6fe089ba
+1fe27200
+20407d55
+20407d58
+9f260c00
+18c08dff
+20407dc7
+20207d5b
+20401a21
+203a1e74
+18c22600
+18c08dfb
+efe10006
+67e10964
+da200014
+20401e80
+58000009
+e7e08005
+efe08013
+1fe27200
+1fe0fe02
+e7e08005
+6fe10964
+e7e10005
+1a608c01
+20407dc7
+20407d5b
+20201ea3
+d8402a00
+20401a21
+207a0000
+18c08dfb
+efe10006
+67e10964
+da200014
+20401e80
+58000009
+e7e08005
+6fe0c2f7
+1fe27200
+1fe0fe02
+e7e08005
+6fe10964
+e7e10005
+d8c042f8
+20407dc7
+20407d5b
+20201ea3
+20401e39
+68494437
+6fe0c3c0
+c2819db8
+20401a11
+24229e74
+20541dbe
+20740000
+20401a1e
+18c08dfe
+efe10006
+d8402a00
+98467c00
+20229dae
+efe08006
+1fe67c16
+20211da5
+18007e16
+1fe22600
+20407d5e
+1a60a201
+20401e80
+5800000b
+e7e08005
+1a627200
+20407d58
+20207dd4
+20407d5e
+6fe0c2f7
+1fe0a201
+20401e80
+5800000b
+e7e08005
+6fe0c2f7
+1fe27200
+d8c042f8
+20207dd4
+6fe143d1
+98467c00
+24229d97
+24341d97
+7002d805
+20201e75
+18c08dfe
+efe10006
+c2871dbc
+20207ec7
+efe10006
+67e109a2
+da200014
+20401e80
+5800000d
+e7e08005
+6fe109a2
+98002200
+68494437
+20401a0e
+203a1e74
+efe08006
+9a267200
+24211e74
+1f267c16
+20211dd3
+18007216
+1a227e00
+98c08c00
+20407dc7
+20407d5b
+20201ea3
+20401eb0
+20401ebd
+20201ddb
+d9600002
+6849099e
+60490964
+20401a11
+18c08dfe
+18c27e00
+67e109b4
+20401e86
+24211e11
+68490964
+20401a3c
+243a1e14
+20401e8a
+24229e07
+19627e00
+c0001e14
+24341dfd
+78547c00
+da200014
+20401e80
+58000011
+e7e08005
+6fe089b3
+1fe0a204
+e2208005
+20407d5b
+1a267c06
+2442fec9
+2042fecb
+20401eb5
+9a26fc00
+20407e64
+18079600
+20201e03
+20401e0b
+243a1e14
+6fe10964
+1fe0ffff
+67e109b8
+20401e9a
+6fe10964
+67e109b6
+20401e95
+196097ff
+20401e82
+20201de2
+6fe089ba
+20201e0c
+6fe089b3
+20361e0f
+1fe0fffe
+20600000
+1fe0fff0
+20600000
+6fe10964
+67e109b8
+20201e18
+6fe10964
+1fe0ffff
+67e109b8
+20201e18
+20341e74
+20401e9a
+20201ea3
+18c22200
+6fe143d4
+1fe0a5fd
+204019d1
+20401e39
+68494437
+20401a11
+24229e37
+20541e33
+20740000
+6fe0c3c0
+c3021e2e
+68494437
+6fe143d1
+98467c00
+24229e2e
+20401e39
+24341e2e
+20201dbc
+18002201
+20401e80
+58000013
+e7e08005
+20600000
+18c08dfe
+efe10006
+c2879dbc
+20207ec7
+7002d801
+20201e75
+20407ec7
+6fe0c39d
+c1000000
+6fe0c040
+c3820000
+20207ec5
+18c0a202
+6fe143d4
+1fe0a5fb
+204019d1
+20201e44
+6fe143d4
+1fe22200
+20401e80
+58000017
+e7e08005
+6fe14437
+e7e10005
+6fe143d4
+1fe0f3fb
+6fe143d8
+1fe08c07
+efe10006
+e7e10005
+20207dc7
+18002201
+20401e80
+58000019
+e7e08005
+20600000
+6fe0c435
+793ffe00
+67e0c435
+20600000
+18c22200
+6fe143d4
+1fe0a5fd
+202019d1
+18422600
+1a20a203
+20401e80
+1a20a3fd
+5800001b
+e7e08005
+1a620400
+e0410005
+20600000
+6fe0c435
+79207e00
+67e0c435
+18422600
+1a20a203
+20401e80
+1a20a3fd
+5800001d
+e7e08005
+1a620400
+e0410005
+20600000
+7002d80a
+18002205
+20401e80
+58000001
+e7e08005
+6fe0c436
+e7e08005
+6fe14437
+e7e10005
+6fe082d8
+e7e08005
+20600000
+18002404
+20201af9
+68490964
+18408401
+60490964
+20600000
+68490964
+6fe109a0
+98467c00
+20600000
+684889a2
+da2009a3
+6fe089ba
+1fe27200
+98467c00
+24628000
+da4009bb
+20207e66
+6848c359
+da20435a
+20201e8c
+6fe089b3
+67e08a01
+1fe27200
+20407d58
+20207dc7
+20407d55
+6fe109b6
+e7e10005
+6fe109b8
+e7e10005
+6fe08a01
+1fe27200
+20407dc7
+20207d5b
+476c403b
+20407d55
+20401b1d
+18a27e00
+98c62200
+20401b20
+1a227e00
+e7e10006
+1a20a204
+20401b12
+1a227e00
+e7e08006
+20600000
+1fecfe00
+67e1099e
+efe10006
+67e109a0
+20600000
+6fe14382
+1fe0fffe
+68494380
+184085fe
+20407ebb
+d84000f0
+20407ebb
+20600000
+20407d5e
+d8a009a2
+6fe143d4
+1fe0fffb
+e7e08005
+1fe27200
+20407d58
+20207dc7
+6fe1016f
+c1820000
+6fe0c435
+79207e01
+67e0c435
+6fe18171
+67e1c436
+7920000f
+c0091ee0
+c0291ee5
+c00c1e52
+c0011c94
+c00f1e57
+793f800f
+6fe0c435
+793ffe01
+67e0c435
+20600000
+6fe0c435
+c4008000
+7920000f
+20401eef
+20401ef5
+20541ed3
+6fe0c436
+c0091e1f
+20600000
+20401ee5
+20201ee2
+20401ef5
+24740000
+20201e1f
+20401ee8
+da200174
+202019d1
+6fe0816c
+1fe0a5f9
+1fe0fffc
+67e143d6
+6849016d
+604943d4
+20600000
+6a40816c
+6fe143d6
+9a408400
+604943d6
+da20016d
+202019d1
+20407ec7
+6fe143d6
+684943d4
+98467c00
+24628000
+20207ec5
+efe08006
+e8408006
+e8410006
+c0099f00
+20600000
+efe10006
+67e143db
+70095b40
+202078dc
+da20000c
+da600012
+20401f0c
+58000008
+e7e10005
+6fe44372
+e7e40005
+20600000
+20401f14
+da400005
+20401af9
+1a627e00
+e7e08005
+6fe0c3da
+e7e08005
+20600000
+6fe0c3da
+1fe0fe01
+67e0c3da
+c1800000
+7043da01
+20600000
+6fe0c39d
+c0001f29
+c0009f2c
+c0011f2e
+c0409f22
+c0411f24
+c0419f27
+20600000
+7043530d
+20201f2a
+7043530d
+70435101
+20600000
+7043530d
+20201f2f
+70435300
+70435103
+20600000
+70435305
+20201f2a
+70435305
+70435100
+20600000
+6fe0c6bb
+79207e00
+67e0c6bb
+20600000
+6fe0c6bb
+793ffe00
+67e0c6bb
+20600000
+efe08006
+c0009f4d
+c0019f74
+c0021f95
+c0029fa2
+c003a00a
+c0041ff6
+c004a006
+c005200a
+c005a00a
+c006200b
+c006a010
+20600000
+18002202
+204020b6
+5800000b
+e7e08005
+6fe0c353
+e7e08005
+20600000
+67e0c349
+efe30006
+e7e30005
+6fe0c39d
+c0001fa7
+20401f6f
+6fe0c6b9
+203a1f59
+6fe0c34c
+c301b281
+6fe0c39d
+c303b281
+70439b03
+6fe0c34a
+c0001f61
+c0009f61
+c0019f61
+6fe0c39d
+c0011f64
+c1418000
+dfe00000
+67e2439e
+20600000
+6fe0c3c0
+c2801f6d
+da20439e
+1a220a00
+df200003
+20405a90
+6fe143a0
+1fe17e07
+67e143a0
+70095b34
+202078dc
+18002207
+204020b6
+6fe3c350
+e7e38005
+20600000
+70439b05
+d8a04327
+20407d7f
+6fe0c39d
+c0419f7c
+c0021f7f
+c0421f81
+20201f84
+70439802
+70439908
+20600000
+70095b43
+202078dc
+6fe2439e
+203a1f7f
+20201f7c
+70439b06
+6fe0c39d
+c2839f8d
+20406cba
+18002211
+204020b6
+58000003
+e7e08005
+20206e3c
+d8a04337
+20405a8f
+20406ae3
+18002211
+204020b6
+58000003
+e7e08005
+20206b1f
+18c22200
+6fe0c39d
+c2839fa9
+1a220c00
+20406cb2
+20229fbe
+7002d904
+18002202
+204020b6
+58000005
+e7e08005
+6fe082d9
+e7e08005
+18000e0a
+20407dda
+70439b00
+70095b30
+202078dc
+7002d905
+20201f9c
+d8a00277
+1a220c00
+20407d7f
+6fe0c39d
+c0419fb5
+c0421fb5
+20406a6d
+20401fc3
+6fe0c39d
+c1c10000
+70095b3b
+202078dc
+20406ad8
+d8a009be
+20406b1f
+da2009be
+da404327
+df200010
+20407e66
+24229f9b
+20201fc3
+20406cae
+70095b31
+204078dc
+70432601
+70439b09
+18002211
+204020b6
+58000004
+e7e08005
+d8c04337
+20207d7f
+18002211
+204020b6
+58000006
+e7e08005
+6fe0c3c0
+c2809fd1
+d8c04316
+20207d7f
+d8c043c1
+20207d7f
+d8a043a2
+1800720a
+20405a90
+1800220b
+204020b6
+58000007
+e7e08005
+6fe143a2
+e7e10005
+6fe443a4
+e7e40005
+20600000
+18002211
+204020b6
+58000008
+e7e08005
+58000000
+e7e40005
+e7e40005
+20600000
+18002208
+204020b6
+58000009
+e7e08005
+6fe0c371
+e7e08005
+6fe3437a
+e7e30005
+20600000
+7002d908
+20201f9c
+6fe0c355
+6848c355
+98417e00
+20600000
+d8a043ac
+20407d7f
+20401ff2
+2fec0001
+20209ff0
+6fe0c09a
+c1850000
+20402000
+24740000
+2020328f
+20407ec7
+6fe0c36a
+c1000000
+6fe0c34e
+c4008000
+20207ec5
+20401ff2
+2fec0001
+20209ff0
+20600000
+20600000
+d8a00880
+20407d72
+70439802
+70439901
+20600000
+d8a00930
+20407d7f
+70439906
+70439802
+20600000
+18002241
+204020b6
+5800000c
+e7e08005
+d8c046df
+20207d72
+20406a84
+18002211
+204020b6
+5800000d
+e7e08005
+20206b1f
+6fe0c39b
+c17f8000
+d8400003
+98467c00
+24610000
+d8e0000a
+20407de9
+247a0000
+20201ff0
+476cc03b
+20401b24
+247a0000
+6fe0c39b
+c0002037
+c000a03d
+c0012037
+c001a03f
+c004a043
+c005a053
+c0062055
+c006a05c
+20600000
+6fe0c39c
+c1820000
+70439cff
+70439bff
+70095b3f
+202078dc
+70439b02
+20201f46
+70439b04
+58017700
+d8e0000a
+20207ddb
+6fe0c39c
+c0022046
+20600000
+6fe0c39d
+c283a051
+70439b0b
+20401fc9
+70095b29
+204078dc
+6fe0c09a
+c1850000
+20402000
+20740000
+2020328f
+70439b0c
+2020204a
+70439b0c
+20201fd3
+6fe0c34f
+6848c356
+98417e00
+2fec0001
+2020a05e
+70439b0d
+20201fdf
+20401fe7
+2020205e
+18000e0a
+20407dda
+70439cff
+70439bff
+70095b3e
+202078dc
+476d403b
+6fe0c39d
+c4038000
+6fe0c398
+c1810000
+70439800
+6fe0c399
+c000a0ac
+c00120b3
+c001a0a4
+c0032089
+c003a080
+c0042076
+20600000
+70439800
+70439900
+70439a00
+20600000
+6fe0c770
+1fe20e00
+1fe0fe01
+67e0c770
+6fe2439e
+afefffff
+58000080
+7920fe00
+67e0c771
+202020a8
+6fe0c39a
+70439a00
+c000a085
+70439802
+20600000
+70095b31
+204078dc
+70439b09
+2020201b
+6fe0887b
+c001a08d
+70439802
+20600000
+20406aab
+6fe0c39d
+c041a092
+c0422092
+20401f61
+20406a98
+da2009be
+da400930
+df200010
+20407e66
+2022a09a
+7002d90b
+20201f9c
+20406f58
+2422a098
+70432601
+6fe0c39d
+c040a085
+c041a085
+c0422085
+70439802
+70439907
+20600000
+6fe0c39d
+c041a0a9
+c04220a9
+70477100
+20201f84
+70477000
+c1420000
+20201f64
+70439802
+6fe0c6be
+c001a0b0
+20600000
+70439902
+70087b00
+202075ec
+70439802
+70439903
+20202015
+18002406
+20201af9
+6fe0816d
+c00020cf
+c000a0d7
+c00120df
+c001a0e3
+c0022102
+c002a107
+c003210b
+c003a110
+c0042111
+c004a112
+c0052113
+c005a117
+c0062118
+c006a11a
+c009211b
+c009a11c
+c00a211d
+c00aa11f
+c00b212a
+c00c212b
+6a60816d
+2020214e
+efe48006
+67e482be
+efe10006
+67e102a7
+6fe08287
+79207e05
+67e08287
+20600000
+efe28006
+67e282be
+efe10006
+67e102a7
+6fe08287
+79207e06
+67e08287
+20600000
+58000014
+67e102b5
+67e14394
+20600000
+efe40006
+67e443a4
+efe10006
+67e143a2
+efe40006
+67e44384
+efe20006
+67e246ad
+2040213b
+476dc03b
+6fe0c39b
+c004a0f5
+6fe0c3c0
+c280a0f8
+6fe0c48b
+245a60bc
+6fe0c326
+c00020fd
+70439c01
+20402149
+20206cc0
+70432601
+d8c043c1
+d8a04316
+20407d7f
+202020f5
+476e403b
+70439c00
+70439b00
+70095b41
+202078dc
+efe40006
+67e4438c
+efe20006
+67e246b1
+20206cc0
+6fe08287
+79207e04
+67e08287
+20600000
+20748000
+70095b32
+204078dc
+70439c04
+2020214c
+20600000
+20202153
+20600000
+70439c02
+2040215a
+70095b33
+202078dc
+20600000
+20748000
+2020215c
+20600000
+20202168
+20600000
+2040211f
+2020216c
+efe40006
+67e44444
+6fe14444
+68494450
+20407ebb
+67e14444
+6fe14448
+6849444c
+20407ebb
+67e14448
+20600000
+20202172
+efe10006
+67e102be
+efe10006
+67e102a7
+207a0000
+6fe08287
+79207e07
+67e08287
+20600000
+da600013
+da200002
+da400002
+20401af4
+1a627e00
+e7e08005
+20600000
+d8a0438c
+18007208
+20405a90
+d8a046b1
+18007204
+20405a90
+da20000d
+da400004
+20401af4
+6fe4438c
+e7e40005
+6fe246b1
+e7e20005
+20600000
+70439c05
+da400005
+2020217c
+da400006
+2020217c
+da200002
+da400007
+20401af4
+e2608005
+20600000
+da200009
+da400009
+20401af4
+6fe4443a
+1fe1fe01
+e7e40005
+20600000
+da40000b
+2020217c
+da200006
+da40000c
+20401af4
+6fe2c5fa
+e7e28005
+20600000
+da200002
+da40000d
+20401af4
+58000006
+e7e08005
+20600000
+da400013
+2020217c
+da400014
+2020216d
+da400015
+da200009
+20401af4
+6fe4444c
+e7e40005
+20600000
+da200003
+da400017
+20401af4
+6fe0c442
+1fe17e07
+e7e08005
+6fe0c443
+1fe17e07
+e7e08005
+20600000
+da200001
+20201af4
+476ec03b
+c513a3e1
+20202622
+7844fc00
+7843fc00
+58555555
+98001e00
+6fe0c83d
+2020166f
+476f403b
+6fe0c867
+20401637
+6fe2483f
+98001200
+204010ac
+2040115d
+6848c83d
+20401674
+20402181
+c597a195
+783cfc00
+2000001e
+20402181
+7857fc00
+7826fc00
+7830fc00
+78507c00
+78287c00
+6fe1483b
+98003600
+37c18400
+242c21ef
+20404d0d
+c517a1a4
+6fe0c87a
+243a21a4
+7846fc00
+7825fc00
+7823fc00
+7824fc00
+204021ec
+67e0c85d
+6848c85c
+98467c00
+2422a1f1
+476fc03b
+7858fc00
+280ffe2f
+2040a1de
+2038a1f1
+204021ec
+67e0c7a7
+c513a1b7
+6fe0c7a7
+6848c839
+a8400e00
+2420a1f1
+204021ec
+280ffe2f
+2040a1e7
+e7e08005
+1fe97e00
+1fe67c1f
+242121f1
+1fe27200
+2022a1c3
+204021ec
+e7e08005
+c20021c0
+c513a1c8
+18a22200
+204021ec
+67e0c882
+1a220a00
+09800018
+1fef7e00
+1ff17e00
+e7e18005
+6fe0c87a
+243a21dc
+7845fc00
+280ffe27
+2040a5e5
+202321f1
+20404d0c
+7837fc00
+2040175c
+4770403c
+c6138000
+6fe0c882
+6848c8d1
+98467c00
+20417ebd
+202025e9
+7846fc00
+202021cf
+204021ec
+1fe67c01
+20217ecd
+1fe0fffe
+c513a1e5
+203a7ecd
+1fe0ffff
+67e08964
+20600000
+1fe17e07
+68488964
+18498400
+9841fe00
+20600000
+09800008
+19897e00
+20600000
+280ffe27
+2040a601
+2040165e
+784dfc00
+7845fc00
+20200e7c
+2040115d
+6848c83d
+20201201
+4770c03c
+6fe0c868
+20401637
+6fe2483f
+98001200
+20402181
+204021f5
+79202a00
+782efc00
+78307c00
+7850fc00
+20404d13
+785d7c00
+c517a229
+c516a23b
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+c517a210
+6fe0c87a
+243a2210
+784efc00
+782dfc00
+7823fc00
+7824fc00
+6fe0c83a
+98007200
+d8c047e9
+efe08006
+08008608
+c2002215
+78247c00
+08008618
+78447c00
+c597a21f
+7843fc00
+58000000
+08008603
+37d38200
+20000064
+785d7c00
+784efc00
+6fe0c87a
+243a2226
+784dfc00
+785c7c00
+2040115d
+20204d11
+df20000a
+5800003c
+08008608
+c200222a
+784efc00
+783c7c00
+19317e00
+1ff17e00
+1ff1fe00
+08008620
+c5172238
+58000001
+08008605
+783d7c00
+2020220b
+58000000
+08008605
+2020220b
+6fe0c1f0
+1fe37200
+20000002
+c200223d
+19317e00
+1fecfe00
+1ff18400
+18427e00
+08008608
+18427e00
+08008628
+2020220b
+6fe0c868
+c2812266
+6fe0c838
+1fe0fe03
+67e0c83a
+6fe0c85c
+67e0c7e9
+6fe0c839
+e7e08005
+6fe0c838
+1fe9fe00
+6848c82e
+18410403
+18438400
+9841fe00
+6848c82f
+9840fe00
+e7e08005
+6fe0c838
+98007200
+d8c047c9
+20407dd4
+c6938000
+6fe08154
+e7e08005
+6fe0c868
+c3810000
+6fe0c83a
+1fe0fe01
+67e0c83a
+20600000
+6fe0c838
+1fe0fe04
+c593a26a
+1fe0fe01
+67e0c83a
+6fe0c85c
+67e0c7e9
+6fe0c83a
+1fe0fffe
+e7e08005
+6fe0c839
+e7e08005
+58000000
+20202251
+6fe0c7a8
+1fe97e00
+67e0c82d
+1fe0fe01
+d8c047a8
+98c08c00
+efe18006
+67e1c830
+6fe0c7a8
+1fe37e00
+1fe17e03
+67e0c836
+20600000
+6848c83e
+20402285
+6048c83e
+20600000
+20402289
+18408401
+18410403
+20600000
+6fe0c83f
+1fe17e03
+1fefa204
+58004843
+9a20fe00
+98408c00
+efe08006
+67e0c83d
+20600000
+67e2483f
+da200000
+df200004
+d8c0483f
+efe08006
+9a20a200
+c2002296
+1a227e00
+67e1485a
+6fe0c85a
+6848c85b
+9840fe00
+67e0c85c
+20600000
+20407ec7
+684a4853
+1c427e00
+98467c00
+244122af
+1fe22400
+6fe24853
+6848c857
+98408400
+1a427e00
+98467c00
+24610000
+793ffe1c
+67e24853
+20207ec5
+20628000
+79207e1c
+20600000
+58000000
+67e24853
+20600000
+38001300
+3805908b
+380b6150
+380c3d20
+67e4c843
+38003a1a
+3804c453
+3808d312
+380c0001
+e7e38005
+6fe0c869
+207a0000
+d8c0486a
+d8a04843
+20207d7f
+584e001e
+67e1c86b
+58032303
+e7e18005
+58250642
+e7e18005
+58094c06
+e7e18005
+583c0927
+e7e18005
+70486901
+20600000
+d8406978
+c513a2d6
+d84012c0
+6fe0c867
+c30122d6
+d8402ee0
+6049483b
+20600000
+70486701
+70486801
+20600000
+70487f4e
+58101520
+67e1c87b
+58000005
+e7e08005
+20600000
+da604887
+da402683
+20203203
+79200026
+6fe0c8a5
+793ffe02
+79207e01
+67e0c8a5
+58000000
+67e1488b
+6fe14885
+67e14887
+70488400
+20402322
+70482e00
+6fe0c87f
+67e0c83d
+6fe0c880
+67e0c1e8
+6fe2487b
+20202292
+4771403c
+6fe0c883
+c07fa344
+c000a2fe
+c0012300
+c001a306
+c002230c
+20600000
+7047c9ff
+2020230d
+6fe0c85e
+203a2304
+6fe248ad
+20402292
+7047c9aa
+2020230d
+7047c955
+6fe0c85e
+203a230d
+6fe24895
+67e247cb
+2020230f
+7047c922
+6fe248ad
+67e247cb
+6fe0c839
+1fe17e07
+67e0c7ca
+7047cf00
+70483807
+20402247
+20402662
+246c0000
+24778000
+204025a0
+20402679
+4771c03c
+6fe0c883
+c17f8000
+c000a327
+c0012329
+c001a32f
+c0022337
+20600000
+70488302
+6fe0c85e
+207a0000
+70488301
+20600000
+70488302
+2020265e
+6fe0c85e
+203a232d
+6fe2480f
+67e24895
+70488303
+2020265e
+6fe0c85e
+203a2335
+6fe2480f
+684a48ad
+98467c00
+24628000
+70488304
+2020265e
+6fe0c85e
+203a233d
+6fe2480f
+684a4895
+98467c00
+24628000
+704883ff
+70095b39
+204078dc
+58000000
+67e14887
+6fe2480f
+20402292
+6fe0c8a5
+793ffe01
+67e0c8a5
+2020265e
+7048c301
+7048c200
+20600000
+6fe0c8c2
+c3808000
+79207e01
+67e0c8c2
+58000000
+67e1c882
+67e248d9
+7048be01
+202022ef
+7048be01
+70483808
+d8c04885
+d8a047c9
+20207d79
+204023fa
+20402187
+2437a3fa
+20402367
+2040242c
+204023d6
+20403805
+6fe0c85e
+207a0000
+6fe248d9
+207a0000
+20202292
+204023fa
+202021f1
+7048cf05
+d8c047a7
+d8a04895
+20407d79
+4772403c
+6fe0c897
+c0552372
+c02aa37f
+c011239c
+c07fa5be
+20600000
+6fe0c898
+c000a376
+c001237c
+20600000
+70488201
+70488501
+70488680
+6fe340a8
+67e34887
+20600000
+70488301
+70488502
+20202378
+6fe0c85e
+203a2385
+6fe24899
+684a40a8
+98467c00
+24628000
+6fe0c898
+c000a389
+c0012394
+20600000
+6fe0c882
+c000a38c
+20600000
+70488202
+6fe0c85e
+203a2377
+70488501
+70488680
+6fe248d9
+67e24887
+20207ec5
+6fe0c883
+c000a397
+20600000
+70488302
+6fe0c85e
+203a237d
+70488502
+20202390
+6fe0c85e
+203a23a2
+6fe24899
+684a48d9
+98467c00
+24628000
+6fe0c898
+c000a3a6
+c00123b1
+20600000
+6fe0c882
+c00123a9
+20600000
+204023ca
+20402377
+6fe0c884
+1fe1fe01
+67e0c884
+58000000
+67e14882
+20600000
+6fe0c883
+c08023b4
+20600000
+204023d0
+2040237d
+6fe0c884
+1fe1fe02
+67e0c884
+204023ae
+202037ff
+6fe0c8c3
+c1808000
+6fe0c8bd
+247a0000
+6fe0c7aa
+c000a3c3
+c00123c7
+20600000
+6fe0c8d8
+c4000000
+7857fc00
+20600000
+6fe0c8d8
+c4008000
+202023c5
+6fe0c8bd
+247a0000
+6fe0c8d8
+1fe1fe01
+67e0c8d8
+20600000
+6fe0c8bd
+247a0000
+6fe0c8d8
+1fe1fe02
+67e0c8d8
+20600000
+6fe0c884
+207a0000
+6fe0c898
+c000a3ca
+c00123d0
+20600000
+79200027
+6fe0c1e8
+67e0c8d0
+204022d0
+202025f4
+6fe1488d
+20207e7a
+70483800
+6fe0c8be
+207a0000
+6fe1488f
+20207e7a
+20402429
+2437a3fa
+2040241b
+243423fa
+6fe0c82d
+203a23fa
+1fe0fe02
+98007200
+d8c047a7
+d8a04895
+20407dd4
+7048c000
+6fe0c8bd
+205a2436
+6fe0c897
+c000a3ff
+c001240e
+c07fa3fd
+d8a047a7
+df200042
+20207d9b
+204023d8
+202025be
+204023ca
+2040255c
+6fe0c8b7
+6848c895
+284ffe03
+7920fe00
+67e0c8b7
+c000a414
+6fe0c8bf
+6848c895
+284ffe04
+7920fe00
+67e0c8bf
+6fe14891
+20207e7a
+204023d0
+6848c895
+284ffe03
+2020a419
+6fe14893
+20207e7a
+6fe0c09a
+1fe67c0e
+2042b4f0
+6fe2489f
+202025c4
+6fe2489f
+202025c8
+20407ec7
+6fe0c836
+6848c837
+98467c00
+2442fec5
+6fe0c836
+67e0c837
+6fe1c830
+6849c833
+98467c00
+2442fec5
+6fe1c830
+67e1c833
+20600000
+204023fa
+20402187
+24778000
+6fe0c7a7
+67e0c839
+20402274
+6fe0c7a8
+2feffe00
+2020a435
+204023e3
+20402247
+204021f8
+202021f1
+7048c101
+58000280
+d8e00008
+20207ddb
+7048c001
+7048c400
+704857ff
+202022b2
+4772c03c
+6fe0c8c0
+207a0000
+204022a0
+24740000
+2040244b
+6fe0c8c4
+1fe0fe01
+1fe17e01
+67e0c8c4
+c0002450
+c000a453
+20600000
+6fe0c8cf
+207a0000
+1fe0ffff
+67e0c8cf
+20600000
+6fe0c8cf
+247a0000
+20202493
+6fe0c8cf
+247a0000
+20202348
+6fe0c8d7
+247a0000
+6fe0c8d5
+205a2483
+6fe0c8d2
+c3800000
+79207e00
+67e0c8d2
+7048d101
+7048d600
+58000000
+67e148d3
+70485760
+202022b2
+6fe0c8c3
+c1000000
+6fe0c8d7
+247a0000
+6fe0c8d5
+247a0000
+6fe0c8d1
+207a0000
+204022a0
+24740000
+6fe148d3
+1fe0fe01
+67e148d3
+d84007d0
+98467c00
+2021247f
+2040244b
+6fe0c8d6
+1fe0fe01
+1fe17e01
+67e0c8d6
+c000247c
+c000a348
+20600000
+6fe0c8cf
+243a2348
+20202544
+7048d501
+20202544
+7048d100
+20600000
+7048d101
+20600000
+6fe0c8c2
+c3800000
+79207e00
+67e0c8c2
+6fe0c8d0
+67e0c1e8
+7048be00
+700bf900
+7048b701
+70482e00
+6fe240a8
+20402292
+20402281
+202023fa
+7048be00
+7048c300
+7048c200
+20600000
+6fe0c8c3
+c1800000
+20402485
+20402547
+202023e8
+4773403c
+6fe0c8c3
+c1808000
+2040234b
+20402359
+6fe0c8bd
+247a0000
+6fe0c884
+207a0000
+7048c000
+20402493
+20402436
+202022b2
+6fe0c8c2
+c3838000
+79207e07
+67e0c8c2
+7048c400
+7048be01
+58000000
+67e1c8ea
+67e3c8c7
+20402536
+24628000
+6fe0c83e
+67e0c8c6
+6fe0c83d
+67e0c8c5
+20600000
+4773c03c
+6fe0c8c3
+c1838000
+204024a9
+204024df
+20402429
+2437a3fa
+20402536
+2042a3ea
+6fe0c8b7
+205a2481
+7048c300
+6fe0c8c2
+79207e00
+67e0c8c2
+6fe0c8be
+1fe67c02
+2442a534
+204023fa
+20402436
+20402536
+2022a4d8
+6fe2483f
+684a48e1
+98467c00
+2022a4db
+6fe2483f
+684a48dd
+98467c00
+2022a4dd
+20600000
+6fe0c8c6
+67e0c83e
+20600000
+6fe0c8cc
+202024d9
+6fe0c8c9
+202024d9
+6fe0c8c4
+1fe0fe01
+1fe17e03
+67e0c8c4
+c0002502
+c000a51c
+c00124e8
+c001a51c
+20600000
+20402377
+6fe248dd
+203a24df
+20402292
+6fe0c8ca
+205a24fd
+6fe0c8c8
+67e0c83d
+6848c8eb
+6a2148f1
+204025ca
+6048c8eb
+204025d2
+6048c8e8
+18467c50
+24610000
+6848c8c9
+20402285
+6048c8c9
+67e0c8c8
+20600000
+7048ca01
+d8400000
+20402289
+67e0c8c8
+20600000
+2040237d
+6fe248e1
+203a24df
+20402292
+6fe0c8cd
+205a2517
+6fe0c8cb
+67e0c83d
+6848c8ec
+6a2148f3
+204025ca
+6048c8ec
+204025d2
+6048c8e9
+18467c50
+24610000
+6848c8cc
+20402285
+6048c8cc
+67e0c8cb
+20600000
+7048cd01
+d8400000
+20402289
+67e0c8cb
+20600000
+20402377
+6fe240a8
+20402292
+6fe0c8c7
+205a2530
+6fe0c8c5
+67e0c83d
+6848c8ea
+6a2148ef
+204025ca
+6048c8ea
+204025d2
+6048c8e7
+18467c50
+24610000
+6848c8c6
+20402285
+6048c8c6
+67e0c8c5
+20600000
+7048c701
+6fe0c8c5
+67e0c83d
+20600000
+7048be00
+20600000
+6fe2483f
+684a40a8
+98467c00
+20600000
+6fe0c8be
+c1010000
+6fe0c8c1
+207a0000
+d8e00008
+20407de9
+247a0000
+7048c100
+7048cf00
+20402456
+7048c307
+7048c200
+202023fa
+6fe0c8b7
+c000a608
+6fe0c8bf
+c000a55a
+684a48b8
+1c427e00
+98467c00
+244122af
+1fe22400
+6fe248b8
+6848c8bc
+98408400
+1a427e00
+98467c00
+24610000
+793ffe1c
+67e248b8
+7048b701
+20202281
+7048bf00
+20202281
+1c427e00
+67e248b8
+20600000
+da60488b
+da402683
+20203203
+4774403d
+79200026
+6fe0c8a5
+793ffe01
+79207e02
+67e0c8a5
+6fe0c890
+203a2577
+6fe0c88f
+c000a56f
+c001256f
+c001a57e
+c002257e
+6fe0c880
+67e0c1e8
+6848c899
+6048c83e
+6fe24891
+20402587
+6048c899
+20600000
+7041e803
+6848c89a
+6048c83e
+6fe24895
+20402587
+6048c89a
+20600000
+7041e803
+6848c89b
+6048c83e
+6fe248ad
+20402587
+6048c89b
+20600000
+6fe2480f
+67e24895
+20402292
+20202281
+4774c03d
+204025a3
+20402662
+242c25aa
+2437a5aa
+20402679
+6fe0c8a5
+793ffe02
+67e0c8a5
+58000000
+67e14887
+67e1488d
+67e1488b
+6fe2487b
+684a483f
+98467c00
+2022a2e4
+6fe248ad
+684a483f
+98467c00
+2042a585
+70095b3c
+204078dc
+df200004
+d8a047c9
+20207d8c
+7047c9ff
+6fe0c839
+67e0c7ca
+6fe248ad
+67e247cb
+70483806
+20202247
+6fe0c890
+203a2281
+6fe1488d
+1fe0fe01
+67e1488d
+2feffe03
+6fe0c88f
+c000a5b6
+c00125b8
+c001a5ba
+c00225bc
+20202577
+2020a577
+2020256f
+2020a57e
+2020256f
+2020a57e
+20202577
+2020a2ef
+2020257e
+6fe0c898
+c000a5c2
+c00125c6
+20600000
+6fe24899
+67e248d9
+67e248dd
+20600000
+6fe24899
+67e248d9
+67e248e1
+20600000
+1a227e00
+98408a00
+6fe08018
+e7e08005
+18408401
+6fe0c881
+98410400
+20600000
+6fe0c881
+1fe0fe01
+67e10987
+1fe27200
+1a220c00
+dfe00000
+e8408006
+9840fe00
+c20025d8
+68490987
+9846fc00
+20407e64
+18078400
+c6138000
+18427e00
+c6930000
+20401297
+1fe20400
+20600000
+2040127f
+20201293
+6fe1489d
+202025fb
+1fe22200
+6848c89c
+6fe1489d
+98408a00
+1a227e00
+e7e08005
+18408401
+6fe0c881
+98410400
+6048c89c
+20600000
+6fe148ed
+204025fb
+6fe148ef
+204025fb
+6fe148f1
+204025fb
+6fe148f3
+207a0000
+1fe20a00
+6fe0c881
+1fe0fe01
+1fe27200
+20207d9b
+204025e5
+207a0000
+6848c8e6
+6a2148ed
+204025ca
+6048c8e6
+20600000
+6a2148ed
+204025d2
+6048c8e5
+18467c50
+24610000
+20202281
+6fe240a8
+67e248ad
+204022d0
+202025e7
+58002fb2
+67e1c8b1
+58100c0c
+67e1c857
+5800bb80
+67e1c8b4
+7048ca05
+20600000
+5800f80c
+67e1c8b1
+581c1919
+67e1c857
+58017700
+67e1c8b4
+7048ca0b
+20600000
+c6930000
+6fe0c8a5
+c280a2f6
+c2812589
+6fe0c8c1
+c000a6cd
+4775403d
+20402638
+243426a8
+2040264d
+204026f5
+6fe0c09a
+c004482e
+6fe448b4
+67e4485f
+6fe148c6
+67e148c8
+204026c2
+24740000
+20407f52
+6fe1c8b1
+202026bf
+2040263b
+24740000
+20202247
+6fe1489f
+20407e7a
+20342641
+6fe3c7ca
+207a0000
+20207ec5
+7048ab00
+1a20fe01
+67e0c838
+20402649
+67e0c7c9
+1a420c00
+1a227200
+20207dd4
+6fe0c839
+1fe17e07
+67e0c839
+20600000
+7048aa00
+6961015f
+34730200
+20402662
+6fe0c82f
+c000a658
+242c2670
+2437a670
+20402679
+6fe0c09a
+c004482a
+20402727
+204025a0
+6fe0c82e
+1fe0fe01
+67e0c82e
+2040269b
+58000000
+67e0c8a6
+67e148a7
+20600000
+7857fc00
+204021f8
+6fe0c82f
+c000a1f1
+18002a00
+6fe2483f
+98001200
+204010ac
+68488017
+2040118b
+204011a2
+20402190
+2057a1f1
+20600000
+6fe0c8ab
+247a0000
+6fe148a7
+1fe0fe01
+67e148a7
+6fe0c8a8
+c2822680
+20402685
+2020264e
+20402274
+6fe0c82d
+207a0000
+98007200
+d8c047a9
+d8a0480d
+20207dd4
+58000000
+67e148a7
+7048a901
+70095b3a
+202078dc
+4775c03d
+6848c8aa
+6fe0c8ca
+98467c00
+242126a3
+18408401
+6048c8aa
+6fe0c8ca
+c002a692
+6fe0c8aa
+c003269d
+c006269d
+20600000
+6fe0c8aa
+c001a69d
+c003269d
+20600000
+c517a699
+67e0c7ea
+20600000
+67e0c7eb
+20600000
+6fe0c839
+c4020000
+6fe0c839
+793ffe04
+67e0c839
+20402696
+2040272b
+20202281
+2040271b
+2040272b
+20202281
+6fe148a1
+20207e7a
+6fe0c8ab
+205a26ae
+6fe0c8c1
+c1008000
+204026a6
+202026bc
+70483901
+7048ab01
+20402649
+67e0c7c9
+58000000
+67e3c7ca
+6fe248ad
+67e247d1
+7048380c
+6fe0c839
+79207e03
+67e0c839
+20402247
+2020262b
+204026c2
+24740000
+6fe4485f
+20407e1f
+604a4160
+20201464
+4776403d
+78347c00
+20401436
+6fe1c174
+203a7ec7
+6fe0c099
+203a7ec7
+6fe0c8c1
+c000fec7
+6fe148a3
+20207e7a
+204022a0
+24740000
+204026e2
+6fe148c2
+1fe0fe01
+67e148c2
+684948c4
+98467c00
+2042a6d7
+20202628
+7048c100
+58000000
+67e148c2
+58000064
+67e148c4
+7048c000
+6fe0c858
+67e0c857
+20600000
+6fe0c859
+202026de
+6fe0c8c0
+1fe0fe01
+67e0c8c0
+c00226e0
+c002a6dc
+20600000
+7048c101
+58000000
+67e148c2
+20600000
+df200002
+d8c0483f
+20407ec5
+5800ffff
+e8410006
+98467c00
+2442fec7
+c20026f0
+20600000
+4776c03d
+6fe1478f
+c3858000
+c3838000
+c3830000
+6a21489d
+204025d2
+6048c8cb
+6fe0c8d0
+c5132700
+6fe0c8d3
+98467c00
+2421271a
+6fe0c8cd
+1fe67c02
+24212708
+6fe0c8cd
+c000271b
+20600000
+6fe0c8cd
+6848c8ce
+98467c00
+24628000
+7048cd00
+6848c8cb
+6fe0c8cf
+c5132711
+6fe0c8d2
+98467c00
+24610000
+6fe0c8cc
+c0002722
+1fe0ffff
+67e0c8cc
+c0002722
+7041e800
+20600000
+7048cd00
+6fe0c8cc
+c0012720
+1fe0fe01
+67e0c8cc
+c000a718
+7041e806
+20600000
+7041e885
+20600000
+7048cc01
+7048cd00
+20600000
+6fe0c8cd
+1fe0fe01
+67e0c8cd
+20600000
+6fe0c8cd
+1fe67c02
+24412733
+6fe0c8cd
+c1000000
+1fe0ffff
+67e0c8cd
+20600000
+7048cd03
+20600000
+6fe08be0
+67e089f6
+1e020c00
+20407d7e
+2040278d
+6fe149ef
+20207e7a
+6fe089f7
+c0002744
+c0402d95
+c0412e95
+c068a791
+c06827ab
+c06aa7ab
+20600000
+d8c009fb
+d8a04b19
+20407d7f
+70496b00
+20402b0e
+20402b00
+2040275f
+20402750
+20402755
+70496b00
+6fe149f1
+20207e7a
+6fe08c3a
+70496b04
+c1008000
+70496b00
+20600000
+58000080
+67e08a10
+58000003
+e7e08005
+58000000
+e7e08005
+6fe189f8
+e7e18005
+700a0f06
+2020305d
+6fe14a15
+c3810000
+20402e14
+1a20a606
+5fffffff
+e7e40013
+e7e40005
+efe10011
+e7e10013
+1a427e00
+9a20a200
+c2002762
+6fe14a11
+20207e7a
+58000082
+67e08a10
+58000004
+e7e08005
+6fe089f9
+e7e08005
+700a0f03
+2020305d
+58000082
+67e08a10
+5800004e
+e7e08005
+6fe109f9
+e7e10005
+700a0f04
+2020305d
+58000082
+67e08a10
+58000060
+e7e08005
+6fe209f9
+e7e20005
+700a0f06
+2020305d
+5800005e
+67e08a10
+58000000
+e7e08005
+6fe109f9
+e7e10005
+700a0f04
+2020305d
+6f208be0
+1e022200
+da400050
+202029e6
+204027ac
+24740000
+6fe109fb
+d840f01f
+98467c00
+2022a7c0
+d840f010
+98467c00
+2022a7c4
+d840f011
+98467c00
+2022a7cd
+d840f012
+98467c00
+2022a7d6
+d8400534
+98467c00
+2022a7b7
+d8400533
+98467c00
+2022a7ba
+d8400123
+98467c00
+2022a7bd
+6fe149f5
+20207e7a
+20600000
+20407ec7
+6fe109f8
+d84001a8
+98467c00
+24628000
+6848c7a7
+6fe089fa
+98467c00
+20628000
+67e0c7a7
+20207ec5
+20402828
+6fe14a05
+20207e7a
+20402828
+6fe14a07
+20207e7a
+20402822
+6fe14a09
+20207e7a
+20402824
+6fe209fd
+67e247a9
+20202859
+2040281e
+204027ef
+207a0000
+6fe089fd
+204027eb
+684c09fd
+e0440005
+6fe14a13
+20207e7a
+20402820
+204027ef
+207a0000
+700a0459
+6fe089fd
+204027eb
+6fe409fd
+e7e40005
+202027cb
+204027e8
+204027ef
+207a0000
+6fe089fd
+207a0000
+204027eb
+d8400000
+e0408005
+6fe089f6
+1fe67c08
+2042a7e2
+202027cb
+204027ef
+6fe089fe
+204027eb
+d8400000
+e0408005
+20600000
+6fe089f6
+c003a828
+20202826
+1fe0ffff
+1fe9fe00
+98a08a00
+20600000
+20402e14
+1a20a204
+6fe0ca2d
+9a4ffe00
+9a20a200
+efe10011
+1fe20a00
+20600000
+580000d3
+67e08a10
+580001a8
+e7e10005
+6fe0c7a7
+e7e08005
+e0410005
+20600000
+d8e00000
+d8400003
+da20f009
+20202830
+da200100
+20202830
+d8e00000
+da20f004
+20202835
+d8e00000
+da200534
+20202830
+d8e00000
+da200533
+20202830
+d8e00000
+20402ecb
+da200121
+20202835
+d8e00000
+20402ed9
+da200122
+20202835
+18438400
+18418411
+da20f009
+20202835
+2040283c
+5800f009
+e7e10005
+20600000
+df200008
+2020282a
+df200008
+2020282a
+df200006
+2020282a
+df200004
+2020282a
+df200002
+2020282a
+df200001
+2020282a
+1f20fe06
+67e08a0f
+204027f7
+d8c009fd
+20407dd4
+2020305d
+2040283c
+e2210005
+e0408005
+700a0f07
+2020283a
+2040283c
+e2210005
+e0410005
+700a0f08
+2020283a
+20402f2f
+2020305d
+6fe0c935
+67e08c14
+580000f0
+67e10c35
+6fe0c7a8
+1fe0fe01
+67e0c7a8
+c060284b
+580000d4
+67e08a10
+580001a8
+e7e10005
+6fe0c7a8
+e7e08005
+20600000
+7047a880
+20600000
+1c420400
+6fe247ad
+98467c00
+2041285f
+20402866
+98467c00
+20610000
+2040285a
+6fe247a9
+1fe0fe01
+67e247a9
+2020286a
+1c427e00
+67e247ad
+6fe0c7b0
+1fe17e0f
+67e0c7b0
+20600000
+20628000
+1fe22400
+58100000
+1fed7e00
+98408400
+1a427e00
+20600000
+df200014
+1fe0fea0
+c2002867
+20600000
+20402e14
+1a20a204
+704a2d00
+20402f25
+efe10011
+203a2872
+1fe26000
+2040287c
+20402f2a
+6fe0ca2d
+1fe0fe01
+67e0ca2d
+6848ca17
+98467e00
+20628000
+1a427e00
+9a20a200
+2020286d
+df200028
+1f227e00
+67e08c00
+efe08030
+245a2886
+1e00e008
+6fe08c00
+1fe27200
+c200287d
+20600000
+e8440030
+604c09fd
+6fe08a04
+c02ca8a0
+684a47a9
+6fe209fe
+98467c00
+6fe08a04
+2022a890
+20600000
+67e089f9
+6fe149fb
+20407e7a
+1e027e00
+67e10c08
+68e0ca2d
+e8408030
+20402816
+684889f9
+68e0ca2d
+20402803
+6fe10c08
+1fe26000
+58000000
+e7e08030
+202027cb
+6fe247a9
+d840003c
+9846fc00
+20407e64
+18077e00
+247a0000
+6fe247a9
+d8454600
+98467e00
+d8493a80
+9846fc00
+20407e64
+18077e00
+d8415180
+9846fc00
+20407e64
+18072200
+18078e00
+58000000
+f9207e00
+68488a00
+98417e00
+207a0000
+1a227e00
+d840003c
+9846fc00
+20407e64
+18078400
+580001e0
+98408400
+6fe109fe
+98467c00
+24628000
+6fe08a03
+20202890
+4777403d
+700a7414
+6fe0c98f
+67e08a75
+6fe08bff
+1fe0fe0b
+1fe0f3fe
+67e08a76
+1fe0ffff
+e7e08005
+5800002a
+e7e08005
+d8c04b58
+20407dc7
+6fe1478f
+2feffe09
+2040b017
+6a210c02
+204028d7
+202079aa
+1a208c02
+efe10006
+67e1448c
+da200a74
+20600000
+da6028de
+20202e1f
+1a208c16
+efe08006
+c1808000
+58000002
+1a208a16
+e7e08005
+20202a1a
+204028f3
+1840fe0d
+67e0c7b1
+2040290a
+1840fe09
+e7e08005
+580000ff
+e7e08005
+6fe40bec
+e7e40005
+1a220c00
+18427200
+20407dd4
+20202951
+580ea801
+67e18bec
+58000007
+67e08bef
+6fe0c8d4
+67e08bf0
+6fe08a75
+67e08bf1
+6fe08a74
+2feffe07
+20402901
+67e08bf2
+60488bf3
+20600000
+da200a79
+d8400012
+58000021
+24608000
+da200a8b
+68488a76
+184085ee
+58000022
+20600000
+d8a047b2
+58000002
+e7e08005
+58000001
+e7e08005
+58000002
+e7e08005
+20600000
+d8401827
+58000003
+e7e08005
+58000003
+e7e08005
+e0410005
+20600000
+2020291a
+20401651
+20401be4
+20402924
+24768000
+6fe08002
+1fe0fe01
+67e08002
+6fe149ed
+20407e7a
+2020165e
+6fe149f7
+20207e7a
+20402928
+202016f6
+6fe0c7d1
+1fe0fe01
+67e0c7d1
+67e08016
+c1940000
+7047d125
+70001625
+20600000
+6fe0816b
+1fe17e0f
+c0002935
+c0012935
+20600000
+e8408006
+18467c06
+20610000
+18467c25
+24610000
+1840a3fa
+18c0a406
+e8408012
+18467c01
+20610000
+18467c1e
+24610000
+18427e00
+207a0000
+4777c03d
+efe08006
+c07fac6a
+c0152f3d
+c003ace2
+1840fe01
+9a267c00
+20610000
+9a40a400
+18467fff
+9a20a200
+1a227e00
+207a0000
+2020293c
+6fe08000
+1fe0fe01
+67e08000
+4778403e
+20401651
+df200027
+d8c041f5
+d8a00a97
+20407dc7
+70001625
+db600708
+7856fc00
+20401be4
+2040296d
+180a7e00
+d84001ff
+98417e00
+1fe0fe64
+20407d81
+6fe08016
+1fe0fe01
+67e08016
+c094295d
+df200027
+d8a041f5
+d8c00a97
+20407dc7
+2020165e
+d8400002
+6048c1f5
+6848c7b1
+1840fe06
+67e0c1f6
+6fe3437a
+67e341f7
+18427200
+d8c047b2
+20407dc7
+202017e2
+4778c03e
+68490be1
+6fe08be0
+18420c00
+da2048f5
+de004905
+20402bb1
+20407ec7
+1a627e00
+9e008c00
+684a4905
+6fe10bfd
+1fe22200
+df20000a
+efe20011
+203a2993
+98467c00
+20628000
+1a20a204
+c2002986
+6fe10bfd
+1fe20a00
+1fe08c04
+df200024
+20407dc7
+e0420005
+20207ec5
+e0420011
+20207ec5
+2040299c
+204029a0
+204029a7
+204029ab
+204029af
+204029b0
+202029b4
+d840001a
+da2049d3
+da400000
+20205e79
+d8400013
+da204976
+da40001a
+20405e79
+6fe0c986
+67e0ca31
+20600000
+d8400010
+da204b19
+da40002d
+20205e79
+d8400010
+da204827
+da40003d
+20205e79
+20600000
+d8400003
+da204b52
+da40004e
+20205e79
+6fe14a15
+c3810000
+d8400040
+da20098e
+da400051
+20405e79
+20402e14
+d8c0098e
+1a20a206
+1a220a00
+20407d7f
+1a427e00
+9a20a200
+c20029bd
+20600000
+204029c6
+204029ca
+202029ce
+d8400013
+da204976
+da40001a
+20205e6b
+d8400010
+da204b19
+da40002d
+20205e6b
+d8400010
+da204827
+da40003d
+20205e6b
+d8400003
+da204b52
+da40004e
+20205e6b
+204029db
+d8400040
+da20098e
+da400051
+20205e6b
+20402e14
+d8a0098e
+1a20a206
+1a220c00
+20407d7f
+1a427e00
+9a20a200
+c20029de
+20600000
+d8400000
+202029ee
+d8400001
+202029ee
+d8400002
+202029ee
+d8400003
+202029ee
+d8400004
+202029ee
+4779403e
+20407d3b
+6fe0ca15
+c2807d47
+20405fb7
+580000aa
+e7e08003
+58000003
+e7e08003
+1f20fe04
+e7e08003
+e0410003
+e2410003
+1a220c00
+20405fc5
+580000bb
+e7e08003
+20405fbb
+20207d47
+6fe0ca15
+c3800000
+70807b0c
+70807c4d
+20402a0c
+d84e1000
+20405f70
+20405f7d
+d8400081
+60588061
+20600000
+58001c00
+67e1095c
+58001c01
+e7e10005
+58001c02
+e7e10005
+58001fff
+e7e10005
+6fe4095c
+20205f58
+20402a26
+20202a1e
+20402a8d
+20202a83
+7047d201
+20600000
+7047d200
+20600000
+da402a22
+da200015
+d8e0000d
+20202a78
+6fe0c96b
+c1800000
+da602a2a
+20202e1f
+da402a37
+da20001d
+d8e0000e
+20202a78
+1a208c1a
+efe08006
+c4008000
+204028d7
+204079d2
+24740000
+6fe08a76
+1fe0fffe
+67e08a76
+6fe08a74
+79407e07
+e7e08012
+202028e5
+6fe0c96b
+c0002a3b
+c0012a76
+20202a65
+da602a3d
+20202e1f
+204028d7
+204079d2
+24740000
+6fe08a74
+1fe0ffff
+e7e08012
+c2832a58
+1fe17e3f
+205a2a5f
+6a210c02
+1a208c1a
+efe08006
+c2812a4f
+c4000000
+d8a047b1
+d8c00a76
+20407d7d
+20202951
+da200a74
+204079c1
+204079f0
+247a0000
+6a210c02
+1a208a16
+58000000
+e7e08005
+20202a1c
+1fe17e3f
+247a0000
+6a210c02
+1a208a16
+58000000
+e7e08005
+202079a5
+da200a74
+204079c1
+204079f0
+247a0000
+700a7454
+202079aa
+20402c41
+20402c4d
+20402c5b
+20402a6e
+24628000
+6fe0c96b
+c001aa72
+c000aa74
+20600000
+6fe0c7d5
+1fe0ffff
+67e0c7d5
+20600000
+7047d658
+20202a1c
+7047d606
+20202a1c
+20402cc0
+20202951
+180a7e00
+1fe17e07
+9a20a200
+6fe0c7d2
+c1808000
+20407de9
+247a0000
+1a227e00
+20407ddb
+1a427e00
+20207e7a
+da6047d3
+da402a86
+20203203
+6fe0c96b
+c1808000
+6fe0c96e
+79207e00
+67e0c96e
+70496b03
+20202a96
+da6047d6
+da402a90
+202031fc
+6fe0c96b
+c001aa96
+c000aa94
+20600000
+7047d506
+20202a1a
+7047d506
+20202a1a
+20402a9e
+20402aa6
+20402aab
+20402ab0
+20402ab8
+20202abc
+20402ac9
+d8c04847
+df20000f
+20402b37
+20402b51
+d8c00900
+d8a04837
+20207d7f
+20402acc
+20402b51
+d8c00900
+d8a047e7
+20207d7f
+20402acc
+20402b51
+d8c00900
+d8a04817
+20207d7f
+6fe44807
+67e447df
+6fe4480f
+67e447d7
+d8c047d7
+da204837
+de0047f7
+20202b9f
+d8c04807
+da204837
+de004807
+20202b9f
+d8c047f7
+df200010
+20402b34
+d8c04860
+df200009
+20402b37
+20402b51
+d8c00900
+d8a04827
+20207d7f
+20402aca
+d8c04807
+20202b33
+20402ac7
+d8c0480f
+20202b33
+d8c049d3
+df200004
+20402b3a
+d8c049d7
+df200006
+20402b3a
+d8c049dd
+df200010
+20202b34
+20402ae1
+da204973
+da400900
+df20000b
+efe10011
+e8410012
+9842fe00
+e7e10011
+1a20a202
+1a40a402
+c2002ad9
+20600000
+d8c047f7
+df200010
+20402b34
+d8c04856
+df20000a
+20402b37
+20202b51
+d8c04976
+d8a04894
+20407d7f
+d8c04894
+da2048a4
+de0048b4
+20402ba1
+de0048c4
+da400001
+58000000
+20402ba3
+6fe0c8d3
+1fe17e7f
+67e0c8d4
+de0048e5
+da400002
+58000010
+da2048c4
+20402ba3
+de0048d5
+da400003
+58000010
+da2048e5
+20202ba3
+d8c04b19
+da2048f5
+de004905
+20402ba1
+d8c04915
+da204905
+de004925
+58000004
+20402bb1
+6fe0c934
+1fe17e3f
+79207e06
+67e0c935
+20600000
+d8c04976
+da204936
+de004946
+20402ba1
+d8c04956
+da204946
+de00495b
+58000005
+20402bb1
+20402ff3
+6fe1478f
+c3848000
+70442701
+20600000
+da204b59
+6fe3cb5f
+20202b21
+da200c0c
+6fe38c12
+67e38bc7
+58000000
+67e28bbe
+20402b2a
+6fe30bce
+e8430011
+9842fe00
+e7e30011
+20600000
+6fe24a2e
+67e20bc3
+d8c048d5
+20406e26
+d8c00bbe
+20406e28
+20406dc1
+d8a00bce
+20206e3c
+df200008
+20402b41
+20402b90
+20202b3e
+20402b41
+20407dd4
+20202b3e
+20402b41
+20402b90
+5800002c
+e7e08005
+18a27e00
+67e1487a
+20600000
+18c20400
+1f222200
+6fe1487a
+1fe20a00
+6fe0c869
+205a2b4a
+18420c00
+1a227200
+20600000
+70486901
+20402b4e
+d8a00abe
+20600000
+df200020
+d8a00abe
+20207d8c
+20402b6e
+da400010
+da200abe
+6f24486a
+204029e4
+20402b89
+58000abe
+67e14881
+20407306
+6fe14881
+1fe20c00
+d8a004a8
+20407d72
+2040730d
+6fe14881
+1fe0fe40
+67e14881
+6fe0c87e
+1fe0ffff
+67e0c87e
+243a2b5a
+20407349
+da200900
+df200020
+20407dac
+da400011
+da200900
+df200020
+202029e4
+70486900
+6fe1487a
+1fe20a00
+d8400080
+e0408005
+d8400abe
+98467e00
+67e4486a
+1fe98400
+604c4872
+1ff1a600
+1a6b2600
+1fe17e3f
+1fe67c37
+24412b87
+1a60fe01
+67e0c87e
+1fefa240
+1ff22600
+1a60a7ff
+58000aba
+9a20a200
+6fe24872
+e7e20011
+20600000
+1a60a601
+20600000
+da200abe
+df200004
+20407dac
+1a20a202
+1a60a7ff
+2422ab8a
+20600000
+efe08006
+1ff18400
+20402b99
+e0408005
+1fe1040f
+20402b99
+e0408005
+c2002b90
+20600000
+18467c09
+20212b9d
+18408457
+20600000
+18408430
+20600000
+58000020
+20202bb1
+58000010
+20202bb1
+6848c883
+18408401
+98408400
+604884a7
+1a220c00
+1fe27200
+20407dc7
+6848c883
+18427200
+20407dd4
+1a427e00
+e7e08005
+da2048b4
+20202bb4
+67e084a7
+1fe27200
+20407dc7
+1a220c00
+d8a0098e
+20407d7f
+da400012
+da2004a8
+6f2084a7
+204029e4
+da400013
+da20098e
+df200010
+204029e4
+20406aee
+1e020a00
+20406e3c
+da400014
+1e022200
+df200010
+202029e4
+68488beb
+20202bc9
+18000401
+18007000
+6fe10bde
+1fe20c00
+efe18006
+1fed7e00
+9841de00
+1f00f001
+efe20006
+1fe25e00
+1f00f001
+efe20006
+1fe25e00
+1f00f001
+1a30de00
+1df05e00
+efe10006
+9de1de00
+20600000
+6fe08be0
+1fe22200
+20402bc6
+20406dc1
+1800700c
+1de27e00
+1a227200
+68490be1
+18420c00
+20406e10
+20206cf0
+700beb19
+20202bea
+700beb09
+20202bea
+67e08be0
+60490be1
+4779c03e
+20402bdb
+18007008
+98005e00
+1800700d
+1de27e00
+18007009
+98005e00
+18002200
+18422600
+20402bc8
+20406dc7
+20402c29
+604c0be3
+6fe08be0
+1fe22400
+20402c31
+68488be0
+6fe10be1
+9840a200
+684c0be3
+e0420011
+6fe08beb
+1fe67e09
+207a0000
+e0440011
+20600000
+700beb19
+20202c0b
+700beb09
+20202c0b
+67e08be0
+60490be1
+18422600
+1fe22400
+9a608c00
+477a403e
+efe40006
+18007008
+98005e00
+18007009
+1fef7e00
+98005e00
+18002200
+20402bc8
+20406dc7
+20402c29
+604c0be3
+20402c31
+20402bdb
+20402c29
+6fe08beb
+c00cac26
+604a0be7
+6fe20be3
+684a0be7
+98467e00
+20600000
+6fe40be3
+98467e00
+20600000
+1800700c
+1de27e00
+1800700d
+1de20400
+18500400
+18500400
+98418400
+20600000
+1a20a201
+20402bc8
+1a620c00
+20406e24
+20406dc7
+20406e43
+1a60a610
+1a40a5f0
+20212c31
+20600000
+70496b01
+70496c00
+7047d201
+58001770
+67e147d3
+20600000
+580001a8
+67e10bec
+6fe0c96d
+e7e08005
+6fe249d3
+20407dc1
+e7e20005
+6fe3437a
+e7e30005
+6fe1c96e
+e7e18005
+20600000
+20402c4f
+20202951
+7047b115
+58000014
+67e0c7b2
+5800002b
+e7e08005
+58000000
+e7e08005
+d8c00bec
+20407d7f
+6fe14971
+e7e10005
+20600000
+6fe0ca15
+c3818000
+20402c5f
+20202951
+7047b11d
+2040290a
+20402912
+20402c64
+20202c56
+58000015
+e7e08005
+58000016
+e7e08005
+e0410005
+20600000
+1840f3ff
+20402d2e
+24740000
+efe08006
+c0002c72
+c0012c8d
+c0032cac
+20600000
+20402c7f
+24740000
+20402a98
+20402c77
+20202cd6
+d8400012
+20402cae
+58000001
+e7e08005
+6fe149db
+e7e10005
+d8c04807
+20207d7f
+20407ec7
+e8410006
+d8a04807
+20407d7f
+6fe149db
+98467c00
+24628000
+6fe0c96c
+c3808000
+79207e01
+67e0c96c
+70496b02
+20402cd2
+20207ec5
+18c22200
+6fe0c96b
+c1000000
+6fe0c96c
+c4008000
+c3810000
+1a220c00
+df200016
+d8a04973
+20407dd4
+20402ad5
+68494973
+6fe149db
+98467c00
+24628000
+20402cda
+6fe0c96c
+79207e02
+67e0c96c
+20402ae8
+6fe0c986
+67e0ca31
+20402ca5
+20202cde
+d8400006
+20402cae
+58000003
+e7e08005
+6fe349d7
+e7e30005
+20600000
+da400012
+20202d18
+477ac03e
+20402ccc
+58008fff
+67e1498d
+20402a1a
+1840fe09
+67e0c7b1
+2040290a
+1840fe05
+e7e08005
+580000ff
+e7e08005
+580001a8
+1ff0fe00
+e7e10005
+6fe08bfc
+e7e08005
+20600000
+6fe24989
+243a2cc3
+20202ccc
+1c427e00
+684a4989
+98460400
+6fe1498d
+98467c00
+20610000
+20402a1c
+6fe149f3
+20207e7a
+1c427e00
+67e24989
+20600000
+18c0a3fd
+da400001
+202029e4
+df200001
+da400002
+da20496c
+202029e6
+6f20c7b1
+da400003
+da2047b2
+202029e6
+df200001
+da400004
+da20496c
+202029e6
+6f20c7b1
+da400005
+da2047b2
+202029e6
+20402d26
+24740000
+6fe08bef
+c0032d16
+6fe0c96b
+c1000000
+c1018000
+6fe10bf0
+684949db
+98467c00
+24628000
+da200bf2
+da400007
+20402d38
+20740000
+477b403e
+6fe08bef
+c0002cf7
+c0012cfb
+c0022d0a
+20600000
+6fe149db
+67e10a78
+d8c00a78
+20202c72
+6fe0c96b
+c1000000
+6fe0c96c
+c4008000
+c3810000
+d8c00a7a
+df200014
+d8a04975
+20407dd4
+20402ae1
+da204975
+da400900
+df20000a
+20402ad9
+20202c9c
+6fe0c96b
+c1808000
+70496b02
+d8400003
+20402cae
+58000005
+e7e08005
+6fe149db
+e7e10005
+58000001
+e7e08005
+20600000
+d8c00bf0
+da400008
+477bc03e
+efe08006
+18c22200
+6848c8d4
+98467c00
+24628000
+20402ccc
+20402d38
+20740000
+700c3a01
+68488a79
+18408401
+d8c00a7a
+20202f3e
+d8a00bec
+20407d7f
+da200bec
+df200010
+20407dac
+df200010
+d8c00bec
+20202d2e
+20407ec7
+e8410006
+580001a8
+1ff0fe00
+98467c00
+24628000
+efe08006
+67e08bfc
+20407ec5
+20202ccf
+477c403f
+20402d71
+20202d3b
+1a208c01
+e8408006
+1851fe00
+c000ad6b
+1fe67c04
+24217ec5
+1fe27200
+20402d61
+18410e0f
+98e67c00
+2042ad5a
+18e08fff
+6fe08a78
+afefffff
+2020fec5
+f9207e00
+67e08a78
+1a208c02
+efe08006
+1fe27200
+1a427e00
+98effe00
+d8a00a7a
+98a08a00
+20407dc7
+6fe08a78
+9a667c00
+2442fec5
+2422ad66
+20402d92
+20207ec7
+1fe0ffff
+9a4ffe00
+1a208c02
+e8408006
+9840fe00
+67e08a79
+20600000
+da600000
+1f208fff
+f9202600
+c2002d62
+20600000
+6fe10a74
+1fe20a00
+d8c00a76
+df200021
+20207dc7
+efe08006
+1fe27200
+67e08a79
+d8a00a7a
+20407dd4
+20207ec7
+70499032
+20402d80
+68494991
+98467c00
+2022ad84
+18467c00
+2022ad84
+684949b2
+98467c00
+2022ad87
+18467c00
+2022ad87
+20402d92
+20402d80
+20202d84
+efe08011
+207a0000
+79207e08
+20600000
+67e14991
+58004991
+20202d8a
+67e149b2
+580049b2
+20202d8a
+67e10a74
+1fe20c00
+d8a00a76
+df200021
+20207dc7
+da604990
+da402d92
+202031fc
+d8a04991
+df200042
+20207d9b
+6fe089f8
+c024ad9a
+c00dada3
+c00e2daa
+20600000
+20402d9d
+6fe14a0d
+20207e7a
+58000080
+67e08a10
+5800004a
+e7e08005
+700a0f02
+2020305d
+20402dc8
+6fe14a15
+c3810000
+20402dd2
+20402ddb
+6fe14a11
+20207e7a
+20402dc8
+6fe14a15
+c3810000
+20402dd2
+684909fb
+184cfe00
+1ff1fe00
+c0062db8
+20402dbd
+24740000
+58000000
+e7e10011
+6fe14a11
+20207e7a
+5fffffff
+e7e40011
+e7e40005
+6fe14a11
+20207e7a
+df200008
+efe10011
+da40ffff
+9a467c00
+2022fec5
+98467c00
+2022fec5
+1a20a202
+c2002dbe
+20407ec7
+20600000
+58000080
+67e08a10
+5800001f
+e7e08005
+58000000
+e7e08005
+6fe309f9
+e7e30005
+700a0f09
+2020305d
+20402e14
+1a20a206
+6fe109f9
+68494987
+18508400
+98467e00
+9a4ffe00
+9a20a200
+20600000
+684909fb
+df200008
+efe10011
+203a2de5
+da40ffff
+9a467c00
+2022ade5
+1a20a202
+c2002ddd
+20600000
+18508400
+e0410011
+20600000
+20406e66
+58002930
+67e149ed
+58002e18
+67e14465
+58002f9f
+67e14a0b
+580029c3
+67e149f1
+580029d6
+67e14a11
+580029d2
+67e14a0f
+58002e1d
+67e1446f
+5800273c
+67e149ef
+58002926
+67e149f7
+5800300b
+67e1446b
+58003014
+67e14467
+7047d124
+2040284b
+477cc03f
+20402a01
+20402e28
+da204976
+da400000
+df200001
+204029e6
+20402995
+20402e10
+6fe0c976
+c07fac3b
+20402b0e
+20402b00
+20402ae8
+202027ff
+6fe349d7
+20407dbb
+67e3437a
+20600000
+6f20ca17
+6a214a18
+6a414a1a
+20600000
+2040284d
+20402a16
+20403086
+204028dc
+20202919
+20402a18
+20202d8f
+20402e14
+20402f25
+1a627e00
+20407e7a
+20402f2a
+1a427e00
+9a20a200
+c2002e20
+20600000
+7080723f
+7080716c
+7080706d
+20205e5c
+477d403f
+6fe08c14
+c283ae31
+704b2900
+20203021
+20402e37
+20740000
+20402e58
+20740000
+20402e68
+20202e75
+20407ec7
+df200003
+da200c15
+20407dac
+6a218c15
+1a21041f
+6048ca20
+6fe0ca27
+98467c00
+24217ec5
+1a31fe00
+1fe37e00
+1fe1041f
+6048ca1f
+1ff1fe00
+1fe37e00
+da201fff
+9a210400
+1fe22400
+6fe14a1d
+98467c00
+2442ae54
+60494a1d
+1a4cfe00
+1ff1fe00
+1fe37e00
+67e0ca1c
+67e0cb29
+20600000
+58000000
+67e24a21
+704a2600
+20600000
+20407ec7
+6fe0ca1f
+1fe20e00
+6fe24a21
+afefffff
+2020fec5
+f9207e00
+67e24a21
+6848ca20
+1840f201
+1f208fff
+afefffff
+24608000
+c2002e62
+704a2501
+20600000
+6fe08c0a
+1fe0fffa
+1fe27200
+6848ca26
+98408400
+6048ca26
+6fe14a28
+98000a00
+6fe0ca1f
+1feffe0c
+98a08a00
+d8c00c18
+20207dd4
+6fe0ca25
+c1000000
+58000000
+67e2ca21
+68490c0e
+18508400
+5800e000
+98410400
+6fe14a1d
+9841fe00
+1ff0fe00
+67e10c0e
+2020302b
+6fe08a0f
+1fe08401
+1fe27200
+60488bff
+6fe08c14
+793ffe07
+67e0cb61
+d8c00a10
+20407dc7
+20202fdb
+1a208404
+1a227200
+60488bff
+d8a04b65
+20407dc7
+6fe08c14
+79207e07
+67e0cb61
+20202fdb
+6fe089f8
+c000ae9c
+c0012ea2
+c0212ea7
+c0262eaa
+c02f2eb0
+20600000
+da602e9e
+20202f14
+6fe149f9
+20407e7a
+67e089f9
+2020276d
+da602ea4
+20202f14
+2040276d
+6fe149fb
+20207e7a
+20402785
+6fe149fd
+20207e7a
+6fe109f9
+20402ebf
+67e089fe
+20402775
+6fe149ff
+20207e7a
+6fe14a2a
+684909fb
+98467c00
+20628000
+6fe109fb
+20402ed1
+67e08a03
+6fe109fb
+67e14a2a
+6fe14a01
+20407e7a
+604909f9
+2040277d
+6fe14a03
+20207e7a
+207a0000
+1feffe64
+d840ffff
+9846fc00
+20407e64
+18070400
+184c8400
+1807fe00
+18467cff
+24628000
+1fe0fe01
+20600000
+dfe0ffff
+984ffe00
+1fe6fc64
+20407e64
+18078400
+20600000
+d8400320
+98462200
+20402ee0
+1a227e00
+9846fc00
+20407e64
+1807fe00
+20600000
+18422200
+20402ee0
+1a227e00
+984ffe00
+d8400320
+98408400
+20600000
+58004e20
+d8400320
+98467e00
+1fe6fc64
+20407e64
+18078400
+20600000
+d8e00000
+6f20ca17
+20407ec7
+6fe14987
+98467c00
+2022aef3
+1ff0fe00
+1fe0fe01
+1ff0fe00
+18e08e01
+c2002eeb
+20600000
+704a2c00
+60e0ca2d
+20402f2f
+20207ec5
+d8e00000
+da600000
+20402e14
+20407ec7
+6fe14a15
+c3012f0a
+efe10011
+98467c00
+2042af08
+1a427e00
+9a20a200
+18e08e01
+c2002efb
+1a627e00
+207a0000
+67e0ca2c
+20207ec5
+f9202600
+20600000
+1a208c06
+de000008
+efe10006
+98467c00
+2022af12
+1e00e1ff
+2022af00
+20202f0c
+20402f08
+20202f00
+d8e00000
+6fe0ca2c
+203a2f20
+1fe22400
+6f20ca17
+60e0ca2d
+aa4fffff
+2040af20
+68e0ca2d
+18e08e01
+c2002f19
+20600000
+20402f25
+20402f2f
+1a627e00
+20407e7a
+20202f2a
+67210c00
+62210c02
+62410c04
+62610c06
+20600000
+6f210c00
+6a210c02
+6a410c04
+6a610c06
+20600000
+477dc03f
+6fe14987
+1ff0fe00
+98e0fe00
+1ff0fe00
+67e14b55
+20402e14
+18e27e00
+9a4ffe00
+9a20a200
+1a208c17
+efe10006
+67e1448c
+20600000
+700c3a00
+18467c0c
+20610000
+18467c1e
+24610000
+477e403f
+20402f97
+20402f65
+24740000
+20402b1f
+20402f8e
+6fe08c0a
+d8400c12
+20402c09
+24628000
+477ec03f
+68490c12
+20402ee7
+20342f72
+df20001d
+d8a00a98
+d8c00c0b
+20407dd4
+20402f5b
+df20001d
+d8c00a98
+d8a00c0b
+20407dd4
+6fe14a0b
+20207e7a
+20402ef7
+20342f72
+704a2cff
+5800ffcf
+98467c00
+2022af72
+5800ffff
+98467c00
+2022af72
+20600000
+20407ec7
+68488c0b
+1851fe00
+1fe97e00
+6a20ca31
+1a212201
+9a267c00
+24628000
+1841047f
+6fe0c8d4
+98467c00
+24628000
+20207ec5
+da204a32
+df20000a
+68490c10
+efe10011
+203a2f7c
+98467c00
+2022af7d
+1a20a205
+c2002f74
+da204a32
+e0410011
+60490c35
+1a20a602
+efe18013
+67e18c37
+20202f82
+20402f8b
+6fe18c37
+68498c0d
+98467c00
+20610000
+e0418013
+20402f8b
+20402fee
+20202e2c
+da200c0d
+df200003
+20207dac
+20402f91
+d8c048e5
+20206e26
+d8a00c28
+58000000
+e7e08005
+6fe30c0c
+e7e40005
+20202fe9
+1840fff4
+67e08c0a
+df20001d
+d8a00c0b
+20407d9b
+1840f3ff
+d8a00c0b
+20207dc7
+20402fb6
+24740000
+20402fcb
+700a740a
+6fe08c0a
+1fe0840d
+60488a76
+184085ff
+e0408005
+5800002a
+e7e08005
+1840f3ff
+6fe38c0b
+d8c00c0b
+20407dd4
+6fe1478f
+2feffe09
+2040afb3
+da200a74
+202079aa
+6fe08c3a
+c1010000
+20203017
+20407ec7
+6fe08c3a
+c1008000
+6fe14a15
+c3808000
+6fe0c96b
+c1800000
+68490c10
+20402ee7
+24740000
+20402fd0
+24740000
+20402fd3
+6fe08c0c
+207a0000
+1fe0ffff
+207a0000
+67e08c0c
+58004a8c
+67e1448c
+20207ec5
+20402f8e
+6fe08c0a
+d8400c12
+20402be8
+20202b1f
+58004a64
+67e10bfd
+20202978
+df200002
+da200c12
+da400021
+204029e6
+6f208be0
+6a210be1
+da400021
+202029e4
+477f403f
+20402fdf
+20402fe8
+202028c3
+6fe08bff
+1fe0a202
+1fe0fe04
+67e08bff
+d8404b5f
+20202fe5
+20402f8e
+1a227e00
+20202be8
+20202b1c
+6fe24a2e
+e7e20005
+18a0fff3
+67e10bde
+20600000
+6fe08c0a
+1fe0f20b
+da200c0b
+da400020
+202029e4
+7043e714
+58000002
+67e0c3e8
+58000001
+e7e08005
+58000006
+e7e08005
+58000003
+e7e08005
+58000003
+e7e08005
+58001828
+e7e10005
+5800000c
+e7e08005
+58000016
+e7e08005
+58001828
+e7e10005
+58000000
+e7e08005
+6fe44963
+e7e40005
+20600000
+6fe14437
+c007300e
+20600000
+1a420400
+efe08011
+c0003012
+20600000
+700a9702
+20202f3e
+1a627e00
+c00ab279
+20600000
+20401b24
+247a0000
+6fe08a76
+1fe0a3ff
+d8400010
+20401e5f
+58000000
+e7e08005
+d8c00a79
+20207d7d
+c3033024
+2040304a
+20203026
+20403057
+20203026
+6fe08c0a
+1fe0fff9
+de000c15
+20407ec7
+20203038
+6fe08c14
+c303302f
+2040304a
+20203031
+20403057
+20203031
+6fe0cb29
+245a7ec5
+205a7ec7
+6fe0ca26
+1fe0fffc
+704a2600
+de004bc6
+1e020400
+20403044
+24628000
+df200001
+da200be0
+da400040
+204029e6
+20403047
+24740000
+6fe10be1
+1fe26000
+20202735
+24342c09
+1fe0fffc
+20202c07
+58004b2a
+67e10bfd
+20202978
+2040304d
+d8c04b19
+20206e26
+d8a00c28
+58000001
+e7e08005
+6fe0cb29
+d8400000
+7d3a0407
+e0408005
+6fe38c0d
+e7e38005
+20202fe9
+2040305a
+d8c04827
+20206e26
+d8a00c28
+58000002
+2020304f
+477fc03f
+2040314b
+2040314c
+2040311b
+20403066
+20740000
+2040307e
+da200c43
+202079aa
+20407ec7
+d8400002
+6fe0c96b
+98408400
+6fe08c3a
+1fe67c02
+79228407
+6fe08c3a
+1fe67c01
+79228406
+60488c43
+6fe4cb58
+67e48c47
+6fe08a10
+c1ea0000
+6fe0c96b
+c0807ec5
+6fe08a13
+67e08c46
+6fe08c43
+1fe0fe01
+79207e05
+67e08c43
+20600000
+6fe08a0f
+1fe27200
+67e08c50
+6fe08c14
+67e08c51
+d8a00c56
+d8c00a10
+20207dd4
+da603088
+20202e1f
+1a208c16
+efe08006
+247a0000
+efe10006
+67e1448c
+da200c43
+204079d2
+24740000
+6a210c02
+68488c43
+18417e0f
+203a30ca
+1a208a16
+58000001
+e7e08005
+204030b4
+68488c43
+204030ba
+1a208a19
+e7e08005
+1a208c1a
+efe08006
+284ffe07
+7920fe02
+1a208a1a
+e7e08005
+79200404
+184085ff
+e0408012
+68488c43
+284ffe04
+2420b0cf
+68488c50
+60488a0f
+18427200
+d8a00a10
+d8c00c56
+20407dd4
+18467c0f
+242130b1
+20202e82
+6fe20c52
+67e20c3e
+202030f0
+6fe08c51
+67e08c14
+6fe48c47
+67e4cb58
+67e48c0b
+20600000
+58000003
+204030c7
+6fe08c46
+284ffe05
+20608000
+58000001
+204030c7
+58000000
+284ffe06
+24608000
+58000002
+204030c7
+20207ed1
+1a208a1a
+e7e08005
+20600000
+58000000
+1a208a19
+e7e08005
+da200c43
+202079c1
+20403113
+20403127
+6fe4cb58
+67e48c47
+204030e8
+58000000
+67e0cb29
+20403109
+68488a0f
+60488c50
+18427200
+d8c00a10
+d8a00c56
+20407dd4
+18467c0f
+242130e2
+da200c44
+204079e1
+20202e82
+2040312f
+6fe20c3e
+67e20c52
+da200c44
+204079e1
+202030f0
+6fe08c50
+1fe27200
+67e08a0f
+6fe08c51
+67e08c14
+d8c00c56
+d8a00a10
+20207dd4
+2040313c
+58000a10
+67e10c3b
+204030b4
+20403113
+20403127
+68488a0f
+5800000c
+20407ebb
+1fe22200
+18427e00
+9a267e00
+67e08a0f
+6fe10c3b
+1fe20c00
+9a208400
+60490c3b
+20402e8c
+6fe08a0f
+207a0000
+6fe08c40
+1fe0fe01
+67e08c40
+2040313c
+202030f3
+6fe08c14
+c303310d
+2040304a
+2020310e
+20403057
+6fe08a0f
+1fe08404
+60488a0f
+d8400a10
+20202be8
+6fe1cb52
+1fe0fe01
+67e1cb52
+6fe0c98f
+1fe0fe01
+67e0c98f
+6fe14a0f
+20207e7a
+6fe0ca31
+1ff27e00
+1fe9fe00
+6848c8d4
+9841fe00
+67e0cb58
+6fe0cb57
+67e0cb59
+6fe14b55
+67e14b5d
+6fe10c35
+67e14b5f
+6fe1cb52
+67e1cb5a
+da204b5a
+df200003
+20407dac
+6fe44b59
+67e40c0c
+20600000
+6fe08a0f
+1fe6fc0c
+20407e64
+18078400
+18077e00
+205a3149
+60488c41
+700c4000
+6fe1cb52
+d8401fff
+98417e00
+67e10c3e
+20600000
+6fe10c3e
+1ff27e00
+1fe3fe00
+68488c40
+9841fe00
+1ff27e00
+1fe3fe00
+68488c41
+9841fe00
+67e1cb62
+df200003
+da204b62
+20207dac
+184085ff
+20600000
+20600000
+da200a10
+6f208a0f
+da400041
+202029e6
+44d6c015
+6fe0c09a
+203a3150
+c002369a
+c007b2b9
+c004cb23
+c0053814
+c007345e
+c006ca0d
+c0064d18
+c005ade8
+c0043c75
+20600000
+700a5100
+7000e300
+7000e400
+58000000
+67e28870
+6fe0c09a
+203a315d
+c005383d
+20600000
+20758000
+20405cb7
+20405cc0
+20405cc6
+20405ccb
+20405cd1
+20405cd5
+20406150
+6fe0c09a
+c004cc62
+c00236a5
+c0043cb8
+c006cadd
+20600000
+7041efff
+580041ef
+67e140ca
+704793ff
+70417a88
+70417cce
+20600000
+20407824
+204078f2
+20403184
+6fe14465
+20207e7a
+6fe14463
+20207e7a
+6fe14461
+20207e7a
+44d74015
+da204775
+20407ea2
+207a0000
+1fe22600
+2040318d
+202031b2
+da600000
+20600000
+c000b19f
+c00831e6
+c002b1c3
+c00931ca
+c00331e2
+c0023223
+c0013228
+c009b223
+c00a31d9
+c00ab1dd
+c001b1bc
+c005b1ce
+c00631d5
+c00b31ea
+c00c31b8
+c01531a8
+c015b1a6
+20600000
+6fe1478f
+79207e00
+67e1478f
+6fe14482
+793ffe00
+67e14482
+20207934
+70030c00
+20600000
+6fe0830c
+1fe0fe01
+67e0830c
+1fe67c01
+2021325e
+70030c00
+6fe14482
+79207e09
+67e14482
+20203268
+6fe14467
+20207e7a
+6fe1445b
+20207e7a
+6fe1445f
+20207e7a
+6fe14482
+79207e01
+67e14482
+20203291
+6fe1478f
+79207e07
+67e1478f
+6fe14482
+79207e02
+67e14482
+20600000
+6fe1478f
+79207e01
+67e1478f
+6fe14482
+79207e04
+67e14482
+20600000
+6fe1478f
+79207e03
+67e1478f
+20600000
+6fe1478f
+79207e05
+67e1478f
+6fe14482
+79207e03
+67e14482
+20600000
+6fe1478f
+793ffe05
+67e1478f
+20600000
+6fe1478f
+79207e09
+67e1478f
+20600000
+70443500
+6fe1478f
+793ffe09
+67e1478f
+20203297
+6fe1478f
+79207e02
+67e1478f
+20600000
+6fe14482
+79207e00
+67e14482
+20600000
+6fe14482
+79207e08
+67e14482
+20203268
+67e0830d
+44d7c015
+6fe0830d
+207a0000
+1fe0ffff
+67e0830d
+20407830
+20403255
+20403216
+2040321c
+20405d7b
+6fe1446f
+20407e7a
+202031ef
+efe08013
+207a0000
+1fe0ffff
+e7e08013
+247a0000
+1a427e00
+20207e7a
+efe10013
+207a0000
+1fe0ffff
+e7e10013
+247a0000
+1a427e00
+20207e7a
+684944cc
+1840a601
+da40320e
+202031fc
+204032ad
+c000b211
+20203289
+58000002
+e7e08013
+1840a408
+efe10012
+20207e7a
+da60447d
+da403219
+202031fc
+20400a5f
+2022b28d
+20600000
+da60478b
+da40321f
+20203203
+2040326f
+20403287
+6fe14469
+20207e7a
+2040323b
+6fe1478f
+793ffe07
+67e1478f
+20600000
+70447d00
+6fe1478f
+c283b22d
+2fec0001
+2040b18b
+44d84016
+6fe1478f
+793ffe00
+793ffe01
+793ffe02
+793ffe03
+793ffe07
+67e1478f
+20203297
+20403238
+20203289
+58000000
+67e14480
+20600000
+58000000
+67e14482
+20600000
+6fe14482
+67e14480
+58000000
+67e14482
+20600000
+6fe14482
+79207e07
+67e14480
+58000000
+67e14482
+20600000
+6fe0c78f
+2feffe05
+20600000
+6fe0c644
+67e0c47d
+20600000
+d8e00009
+20201566
+d8e00009
+2020156a
+70447e05
+2020324f
+da60447e
+da403251
+202031fc
+7045f601
+20600000
+7045f600
+20600000
+70095b0a
+202078e5
+70095b1d
+202078e5
+44d8c016
+6fe0c47f
+67e080bc
+70030b01
+70095b03
+202078e5
+70095b1e
+202078e5
+70095b04
+202078e5
+6fe14794
+67e1478b
+20403283
+70095b01
+202078e5
+58000000
+67e1478b
+70095b02
+202078e5
+70095b0f
+202078e5
+70095b10
+202078e5
+70095b0e
+202078e5
+70095b0d
+202078e5
+70095b17
+202078e5
+70095b18
+202078e5
+70095b16
+202078e5
+70095b11
+202078e5
+70095b15
+202078e5
+70095b14
+202078e5
+70095b13
+202078e5
+70095b19
+202078e5
+70095b06
+202078e5
+70095b05
+202078e5
+70095b1f
+202078e5
+70095b20
+202078e5
+70095b25
+202078e5
+7920000d
+20600000
+793f800d
+20600000
+204032ad
+c00132a3
+58000001
+e7e08013
+1840a203
+1840a406
+e8408011
+1a60a601
+e0408013
+20203214
+58000000
+e7e08013
+6fe1478f
+c304b2a9
+20402134
+20403281
+684944cc
+1840a202
+1840a404
+2020329f
+684944cc
+1840a600
+efe08013
+20600000
+204032ad
+c08032b4
+20203289
+1840a40a
+20203214
+58000002
+67e0c78d
+20600000
+20758000
+580032e8
+67e1445d
+580061ff
+67e1445f
+58003395
+67e14465
+58003394
+67e14461
+58003303
+67e14467
+58003340
+67e1446f
+580032ea
+67e1446d
+580032f5
+67e1445b
+580033a1
+67e1446b
+44d94016
+2040343a
+204032e6
+204061da
+2040344c
+2040785b
+20407826
+580033ab
+67e14873
+5800339c
+67e1486a
+58003398
+67e1486c
+580032f1
+67e1486e
+58003441
+67e147b6
+58003443
+67e147b8
+58003448
+67e147c1
+58003445
+67e147c3
+6fe1478f
+c3860000
+20203289
+7045fa07
+20600000
+20403425
+20203289
+20401b24
+247a0000
+da2009d2
+204079c1
+24740000
+d8c009d2
+20204c5a
+6fe148a4
+67e1489e
+70486001
+2020342e
+6fe0c8aa
+c000b2fe
+6fe1478f
+c304b2fe
+6fe0c8ab
+c000b24f
+6fe0c80d
+243a324f
+20203251
+6fe0c8a8
+6848c8a9
+9841fe00
+c000b24f
+20203251
+1a627e00
+c016b2b1
+c0083299
+c00a337d
+c00ab386
+c020330b
+c0223315
+20600000
+20403311
+6fe143db
+c000b31b
+70489702
+70489c3c
+20600000
+6fe08287
+c3828000
+704a6301
+20600000
+6fe0ca63
+207a0000
+704a6300
+6fe102c3
+203a3330
+20600000
+6fe14376
+203a332e
+70489701
+684948c1
+6fe14372
+9840fe00
+67e14372
+1fe22200
+6fe14374
+9840fe00
+67e14374
+9a20fe00
+1fe30400
+6fe148cd
+9846fc00
+20407e61
+67e14376
+70489d01
+20600000
+70489703
+20600000
+70417700
+70489d00
+6fe102c1
+684948cb
+98467c00
+79212200
+6fe148cd
+684902c1
+98467e00
+79212201
+2a200603
+20608000
+6fe448cb
+67e44372
+70489d01
+20600000
+2040320a
+20403357
+2040335c
+20403373
+20403368
+20403362
+20403350
+20403349
+20203377
+da604a65
+da40334c
+20203203
+da200001
+2040786c
+6fe148ae
+2020627e
+da604a64
+da403353
+202031fc
+2040344e
+2040344e
+2040344e
+20203458
+da6048a6
+da40335a
+202031fc
+7048a700
+20600000
+da6048a0
+da40335f
+20203203
+da6047cc
+da4047ab
+20203430
+da60489c
+da403365
+202031fc
+6fe14376
+67e0c177
+20600000
+da60489d
+da40336b
+202031fc
+6fe08287
+2fe0c000
+2420b371
+70489701
+20403295
+20201f04
+70489d01
+20600000
+da60489e
+da403376
+20203203
+20203299
+da60489a
+da40337a
+20203203
+6fe148b4
+67e1489a
+2020344e
+6fe148b4
+67e1489a
+58000000
+67e148a0
+67e1489e
+204033fc
+20403425
+70417700
+20203277
+58000000
+67e2489a
+67e1c897
+67e143db
+7048ad01
+6fe148a4
+67e1489e
+6fe14a67
+67e14a65
+204079a5
+6fe0c866
+c1000000
+2040342e
+2020340e
+202033a8
+6fe0c866
+c1810000
+202033a8
+da6047da
+20403421
+da6047d3
+20203423
+70442700
+da6047e8
+20403421
+da6047e1
+2020339b
+6fe0c436
+c00933a4
+20600000
+6fe14437
+c006b3d6
+c005b411
+20600000
+6fe0c860
+207a0000
+2020620b
+1a227e00
+203a33b0
+18e27e00
+c00033b3
+20600000
+18e27e00
+c00033bb
+20600000
+7048aa01
+da604804
+20403421
+da6047fd
+20403423
+6fe1478f
+c304b3d2
+202033c1
+7048aa00
+202033bd
+6fe0c8a7
+c1808000
+7048a605
+20600000
+6fe0c8a7
+1fe0fe01
+67e0c8a7
+c000b3c7
+c00133cb
+20600000
+204033fc
+70487e01
+da604879
+202033e4
+7048a700
+70487e02
+da604879
+204033e4
+6fe0c8ab
+c000b3f1
+20600000
+6fe148a4
+67e1489e
+204033fc
+2020342e
+44d9c016
+2040356d
+efe08011
+c001b3dc
+c003b3e0
+20600000
+6fe0c8ab
+c00033f1
+c000b3fc
+20600000
+efe08012
+c000b404
+c0003409
+20600000
+44da4016
+6fe0c898
+2feffe00
+24608000
+1a608c06
+efe10006
+1ff0fe00
+1fe0f205
+1a608c03
+20403561
+e7e08006
+1a622200
+202079aa
+6fe0c866
+207a0000
+7048ab01
+da6047f6
+20403421
+da6047ef
+20403423
+70488d04
+70489001
+da604888
+202033e4
+6fe0c8ab
+207a0000
+7048ab00
+20403425
+70488d04
+70489000
+da604888
+202033e4
+7048ac01
+70488d07
+70489001
+da604888
+202033e4
+7048ac00
+70488d07
+70489000
+da604888
+202033e4
+6fe0c8ac
+207a0000
+202033f1
+efe10011
+67e14898
+2feffe00
+24608000
+6fe0c8ad
+207a0000
+7048ad00
+6fe448c3
+67e44372
+704a6403
+70488d07
+70489d1e
+6fe0c8ac
+67e0c890
+da604888
+202033e4
+da200001
+20203424
+da200000
+2020342b
+da200000
+2040786c
+da200001
+2040786c
+6fe148ae
+2020627e
+20407857
+df200007
+20207879
+da6047c5
+da4047a7
+20403435
+20403423
+6fe148a2
+67e148a0
+20203279
+efe10012
+67e14159
+efe10006
+67e14428
+20600000
+da200000
+20406239
+6fe348ae
+67e3095c
+20406260
+6fe148ae
+2020627e
+7048a801
+20600000
+7048a800
+20600000
+7048a900
+6fe148ae
+2020627e
+7048a901
+6fe348ae
+67e3095c
+20206260
+7044a200
+20600000
+2040618d
+67e148bd
+da2048b7
+204061ba
+67e0c8b6
+58000065
+c000345d
+1fe67c64
+2421345b
+67e0c890
+70488d05
+da604888
+202033e4
+70489064
+20203458
+20203299
+20406e5e
+20758000
+58003654
+67e1488d
+58002354
+67e1488f
+58003686
+67e14891
+580034da
+67e1445d
+580034da
+67e1445f
+58003289
+67e14469
+580034dc
+67e14465
+580034fd
+67e14467
+5800324f
+67e1445b
+58003567
+67e1446b
+58003527
+67e1446f
+44dac016
+204034c0
+204034ea
+204079a5
+70417702
+704c6400
+6fe0ca26
+67e0c8f5
+c0003489
+6fe0ca27
+67e0c793
+70442700
+20407826
+20407830
+704a4e01
+6fe1478f
+c3860000
+20203289
+202034a7
+704a4e02
+70442701
+58000020
+20404c56
+d8a042ff
+6fe0c37a
+1fe104f0
+18518400
+204034a1
+e0408005
+1fe1040f
+204034a1
+e0408005
+20401a58
+6848c2f7
+18427200
+d8a043ea
+d8c042f8
+20407dd4
+6848c2f7
+18427200
+d8a0440a
+d8c042f8
+20207dd4
+18467c09
+202134a5
+18408437
+20600000
+18408430
+20600000
+6fe0ca1b
+c0ffb4b9
+6fe0ca19
+c0ffb4bc
+6fe0ca24
+c0ffb4be
+6fe0c987
+1fe27200
+58004988
+1fe22200
+1a220c00
+efe08006
+18c22200
+c07fb4b7
+1fe20400
+2040610d
+c20034b1
+20600000
+6fe44a1b
+67e4498a
+202034a9
+67e0c988
+202034ab
+67e0c989
+202034ad
+20403650
+da200000
+20406239
+204034a7
+204034f2
+204034d8
+202034c7
+6fe0cc51
+1fe27200
+58004c52
+1fe22200
+1a220c00
+efe08006
+18c22200
+c07fb4d2
+1fe20400
+67e0cc56
+204034d4
+c20034cb
+20600000
+6fe0cc56
+c17f8000
+98000400
+2020610d
+704a2a64
+20600000
+202061ff
+2020620b
+204034f4
+204034df
+202034db
+6fe1478f
+c3848000
+6fe0cc64
+c000b4e4
+20600000
+6fe0ca45
+c1008000
+704a4501
+204034ee
+204034f0
+20203507
+6fe14c69
+67e14c6b
+704c6d00
+20600000
+58000000
+202034eb
+da200000
+2020786c
+da200000
+20207871
+6fe1478f
+c4048000
+20401b24
+247a0000
+da204973
+204079c1
+24740000
+d8c04973
+20204c5a
+1a627e00
+c016b2b1
+c0083299
+c00a3503
+c00ab50d
+20600000
+204034ee
+204034f0
+793f8027
+20203509
+6fe14a46
+67e14a48
+704a2914
+70409900
+20403277
+20203295
+79200027
+204034ea
+20403604
+204035f8
+58000000
+67e2c9f7
+58000004
+2040627e
+58000005
+2040627e
+58000014
+2040627e
+58000015
+2040627e
+58000016
+2040627e
+58000007
+2040627e
+204079a5
+7049b90a
+7049bb0a
+7049bd0a
+70417702
+58000020
+20404c56
+20203279
+204035a5
+204035a8
+204035ab
+2040320a
+2040353d
+20403537
+2040352f
+20203532
+da604c65
+da400000
+202031fc
+da604c6b
+da403535
+20203203
+704c6d01
+20600000
+da604a48
+da40353a
+20203203
+704a4502
+704c6400
+20203511
+6fe0ca23
+207a0000
+da604a29
+da403542
+202031fc
+6fe0ca28
+67e0ca29
+6fe0ca2c
+247a0000
+2040618d
+67e14a43
+da204a3d
+204061ba
+6848ca2a
+98467c00
+2021354f
+67e0ca2a
+1fe20400
+6048ca2b
+6fe0ca25
+98467c00
+2041355a
+6048ca36
+df200006
+d8c04a31
+20403561
+67e0ca37
+da204a2e
+202079aa
+6fe0ca2d
+247a0000
+704a2d01
+da200001
+20207871
+da200001
+2020786c
+da200000
+efe08006
+9a20a200
+c2003562
+1a217eff
+20600000
+6fe0c436
+c009356a
+20600000
+6fe14437
+c00a3581
+20600000
+44db4016
+efe28011
+67e289de
+6fe109de
+d8406b5a
+98467c00
+24628000
+6fe109e1
+1ff0fe00
+67e109e1
+1fe27200
+1a20a205
+1a220c00
+d8a009e3
+20407dd4
+efe08006
+67e089ed
+da2009e0
+da4009e3
+20600000
+58000000
+67e2c9ad
+67e2c9b2
+2040356d
+1a420c00
+d8a049ad
+df20000a
+20407dd4
+44dbc016
+efe08011
+c00135b4
+c001b5c9
+c00235d0
+c002b5d0
+c0033640
+c003b641
+c0043644
+20600000
+20403581
+6fe089e0
+c0023598
+c002b598
+20600000
+6fe0c9ad
+245a359f
+6fe0c9af
+245a35a1
+6fe0c9b1
+245a35a3
+20600000
+704c4e05
+20600000
+704c4f05
+20600000
+704c5005
+20600000
+da604c4e
+da4035ae
+202031fc
+da604c4f
+da4035b0
+202031fc
+da604c50
+da4035b2
+202031fc
+7049ad00
+202035d0
+7049af00
+202035d0
+7049b100
+202035d0
+6fe0c9ad
+67e0c9b8
+6fe0c9ae
+67e0c9ba
+202035da
+6fe0c9ad
+67e0c9ba
+202035e8
+6fe0c9b9
+204035c1
+6fe0c9ae
+67e0c9b8
+202035e6
+c00135c5
+c001b5c7
+67e0c9b9
+20600000
+7049b905
+20600000
+7049b90a
+20600000
+6fe0c9ad
+204035c1
+6fe0c9b9
+20403634
+20403637
+70095d00
+20206272
+6fe0ca4b
+247a0000
+6fe349ad
+67e349b8
+6fe0c9b9
+6848c9bb
+98417e00
+6848c9bd
+98417e00
+205a35ec
+44dc4017
+6fe1478f
+2feffe09
+2440b4ea
+204035e6
+204035e8
+202035e1
+6fe0c9b8
+6848c9ba
+9840fe00
+243a7976
+20207974
+d8c049b8
+202035ee
+d8c049ba
+202035f3
+d8c049bc
+20203610
+704a2c00
+20600000
+efe08006
+c00035f8
+c000b5fc
+c0013600
+20600000
+efe08006
+c0003604
+c0013608
+c000b60c
+20600000
+6848cc52
+20406109
+6848cc53
+20206109
+6848cc52
+2040610d
+6848cc53
+20206109
+6848cc52
+20406109
+6848cc53
+2020610d
+6848cc54
+20406109
+6848cc55
+20206109
+6848cc54
+2040610d
+6848cc55
+20206109
+6848cc54
+20406109
+6848cc55
+2020610d
+44dcc017
+efe08006
+c000361d
+c000b616
+c0013618
+20600000
+7049d600
+20203619
+7049d601
+efe08006
+67e0c9d8
+efe40012
+20203622
+efe08012
+2040627e
+1a40a401
+efe08012
+2020627e
+67e449d9
+704a2c01
+6fe0c9d6
+c0003630
+6fe0c9da
+67e0c9db
+6fe0c9d9
+2040627e
+6fe0c9d8
+20403634
+67e0c9e0
+6fe349db
+67e3095c
+20206260
+6fe0c9d9
+67e0c9db
+6fe0c9da
+20203629
+1feffe05
+1fe0fe32
+20600000
+d8402ee0
+984ffe00
+1fe6fc64
+20407e64
+18078400
+18422200
+58002ee0
+98462400
+20600000
+20600000
+6fe449ad
+67e449f7
+20600000
+6fe0ca14
+67e0ca0a
+6fe0ca15
+67e0ca0b
+6fe0ca16
+67e0ca0c
+df20000d
+d8c04a05
+20403561
+67e0ca12
+da204a02
+202079aa
+58000000
+67e44885
+204023dc
+2020243a
+20403658
+20403660
+2040366f
+2020368d
+2040243e
+6fe0c8c3
+c1808000
+6fe0cc65
+243a2493
+6fe0ca45
+c0012493
+20600000
+6fe0c8c3
+c1800000
+20402497
+2037b66d
+6fe0cc6d
+207a0000
+6fe0cc6e
+1fe0fe01
+67e0cc6e
+c002366d
+20402281
+204023e8
+2437b664
+704c6e00
+20600000
+6fe0c8c3
+c1808000
+2040234b
+20403683
+20402359
+6fe0c884
+243a367c
+2040253a
+6fe0c8c1
+207a0000
+58000000
+67e248dd
+20600000
+7048c000
+da200000
+2040786c
+20402493
+204022b2
+6fe240a8
+20202292
+6fe248dd
+207a0000
+20202292
+6fe1478f
+c3848000
+6fe14a46
+67e14a48
+704c6401
+da204898
+20203593
+6fe0cc6d
+207a0000
+20403695
+24740000
+6fe1c85f
+20407e1f
+604a4160
+20201464
+78347c00
+20401436
+6fe1c174
+203a7ec7
+202034da
+580036cc
+67e1488d
+5800379c
+67e14891
+580037ad
+67e14893
+58003773
+67e1488f
+580036d8
+67e10b45
+20207a08
+6fe08a2b
+67e0c8f5
+204036c7
+6fe0c915
+2feffe05
+2020b6ae
+6fe0c915
+2feffe06
+2040a2c4
+6fe0c915
+1fe17e0f
+67e0c1e8
+20403174
+704881ff
+58000c4b
+67e148ed
+58000d4b
+67e148ef
+58000e4b
+67e148f1
+58000f4b
+67e148f3
+70488085
+70493e00
+7048d800
+204022d8
+204023dc
+204022db
+204022b5
+6fe0c91f
+67e08b47
+6fe4c916
+67e48b48
+20600000
+7040c518
+6fe0c915
+c4038000
+7040c508
+20600000
+6fe0c8bd
+c0003763
+c000b6fd
+20600000
+d8400001
+da2048f5
+5800002a
+20205f00
+df200001
+da2048f5
+d840002a
+20205f12
+6fe0c915
+c28236dc
+6fe0c8f5
+c0ad36e0
+7048f55a
+6ff21aac
+79207e1d
+67e20aa0
+204036f7
+20407a5b
+204036e4
+202036ed
+6fe08b48
+207a0000
+6fe0c8f5
+c02d36eb
+6fe20b49
+67e20aa0
+20600000
+6fe20b4d
+202036e9
+6fe0c8f5
+c02d36f3
+580099a4
+67e10a93
+700ac41a
+20600000
+580099bf
+67e10a93
+700ac43f
+20600000
+6fe0c920
+207a0000
+d8c04920
+d8a00b09
+df20001e
+20207dd4
+20402493
+2040376b
+2040249c
+2040372f
+202036fe
+20403705
+20403714
+20203723
+6fe0c914
+207a0000
+d8e0000b
+20407de9
+247a0000
+70491400
+58000001
+67e08bff
+58000000
+e7e38005
+700bf820
+6fe08bf9
+79207e02
+67e08bf9
+20600000
+6fe0c912
+207a0000
+d8e0000e
+20407de9
+247a0000
+70491200
+d8a00c0f
+df200002
+20407d8c
+700c0f00
+700bf710
+6fe08bf9
+79207e01
+67e08bf9
+20600000
+6fe0c913
+207a0000
+d8e0000c
+20407de9
+247a0000
+70491300
+d8a00c1f
+df200002
+20407d8c
+700c1f03
+700bf821
+20203710
+44dd4017
+6fe08bed
+205a377d
+204079fc
+6fe08be3
+207a0000
+700be300
+6fe10be1
+d84002ba
+98467c00
+24628000
+6fe08b61
+c1dd0000
+6fe08b62
+c0503744
+c050b74a
+c0533756
+c053b758
+c054b75e
+700be400
+20600000
+6fe08b63
+c040b747
+20203742
+20402348
+700be401
+20600000
+6fe08b63
+c000b74f
+c0423752
+c053b754
+20203742
+6fe0c884
+67e08ba2
+20203748
+20402494
+2020374f
+700ba2a1
+20203748
+700ba215
+20203748
+6fe0c8c3
+c000375c
+c000b754
+20600000
+700ba2a0
+20203748
+700ba200
+700ba300
+700ba401
+700ba507
+20203748
+2040243a
+2040243e
+20402464
+2040376b
+2040249c
+204024b9
+2040372f
+20203764
+44ddc017
+6fe0c8c3
+c1800000
+20402497
+20403702
+6fe0c8bd
+247a0000
+2020253a
+6fe0c839
+c000b776
+c001377f
+6fe0c93f
+c2803785
+20203781
+6fe0c09a
+c1820000
+70493f03
+20600000
+70493f00
+20600000
+6fe0c93f
+c280b789
+6fe0c8be
+c000b790
+c001b794
+20600000
+6fe0c93f
+793ffe00
+67e0c93f
+2020378c
+6fe0c93f
+793ffe01
+67e0c93f
+70483801
+580000ff
+67e0c7c9
+20600000
+7048be01
+204023bb
+24778000
+20202354
+6fe0c7a9
+c000b790
+c07fb790
+700be500
+70483801
+6fe0c8ce
+67e0c7c9
+20600000
+58000001
+67e08bff
+6fe3c898
+e7e38005
+6fe0c898
+245a37a5
+6fe0c898
+205a37a9
+2020370f
+70491401
+58000180
+d8e0000b
+20207ddb
+70491400
+58000000
+d8e0000b
+20207ddb
+6fe0c898
+c00037b2
+c00137e5
+c001b7cd
+202023fa
+6fe0c89a
+67e0c8be
+70489a00
+d8a00c0f
+d8c04899
+df200008
+20407dd4
+6fe40c0f
+245a37c5
+6fe40c0f
+205a37c9
+6fe40c0f
+67e448f6
+684c48fe
+98467c00
+2442b71e
+6fe448f6
+67e448fe
+202023fa
+70491201
+58000180
+d8e0000e
+20207ddb
+70491200
+58000000
+d8e0000e
+20207ddb
+d8a00c1f
+d8c04898
+df200003
+20407dd4
+6fe10c20
+245a37dd
+6fe10c20
+205a37e1
+6fe18c1f
+67e1c906
+6849c909
+98467c00
+2442b72d
+6fe1c906
+67e1c909
+202023fa
+70491301
+58000180
+d8e0000c
+20207ddb
+70491300
+58000000
+d8e0000c
+20207ddb
+d8a00c2f
+d8c04898
+df200002
+20407dd4
+6fe10c2f
+245a37f5
+6fe10c2f
+205a37f9
+6fe10c2f
+67e1490c
+6849490f
+98467c00
+2442b7fd
+6fe1490c
+67e1490f
+202023fa
+70491301
+58000180
+d8e0000c
+20207ddb
+70491300
+58000000
+d8e0000c
+20207ddb
+700bf822
+20203710
+6fe0c09a
+c1820000
+6fe0c8f5
+c12d0000
+70493e01
+20600000
+6fe0c09a
+c1820000
+6fe0c93e
+207a0000
+70096400
+7048f55a
+204036d4
+204036d0
+6fe08964
+1fe0fe01
+67e08964
+c07fde29
+6fe0c8f5
+c0ad380a
+20205e29
+20758000
+20401a55
+5800385b
+67e14465
+58003848
+67e14463
+5800385f
+67e14467
+58003844
+67e1445b
+58003998
+67e1446d
+58003b94
+67e1465d
+58003c37
+67e1446b
+58003c4e
+67e1446f
+20403858
+44de4017
+2040382b
+2040383f
+20203baa
+6ff08060
+793ffe00
+67f08060
+6fe447b7
+20405f56
+6fe147bf
+20405f6a
+20405f7d
+70807d08
+70807e49
+7080790a
+70807a0b
+d8400081
+6fe147c6
+2feffe00
+79208404
+60588060
+20600000
+20403858
+2020382b
+6848c7ab
+2040610d
+204038c2
+6848c7a9
+202060f4
+6848c7a9
+204060fd
+2420b251
+2020324f
+2040384a
+20203c5e
+6fe0c78f
+c3023858
+58003eff
+684a47ce
+98408400
+1c427e00
+98467c00
+24610000
+6fe1478f
+c282b858
+6fe147c6
+c3850000
+20403c61
+2040328d
+1c427e00
+67e247ce
+20600000
+20403c5e
+2040534f
+247a0000
+202038c7
+1a627e00
+c000b8af
+c001387e
+c00238b2
+c002b89f
+c0043885
+c004b88c
+c00538a5
+c005b891
+c006389d
+c009b8b2
+c00a38ab
+c00ab8a1
+c010b8a6
+c011b8a7
+c01238aa
+c0183bf2
+c018bbf4
+c0193c02
+c019bc00
+c01a3bec
+c01abbd5
+c01b3bea
+c01bbbf6
+c01c3bf8
+c01dbbd5
+c01ebbcc
+c020b8b4
+c02138b6
+c021bbea
+20600000
+20403858
+6fe0c772
+245a3bf6
+204038b2
+6fe1478f
+c4020000
+2020388c
+6fe1478f
+79207e04
+67e1478f
+6fe0c7b4
+67e0c177
+204038c2
+20203b7f
+6fe1478f
+c4020000
+793ffe04
+67e1478f
+20203b83
+20403858
+6fe14042
+1fe37e00
+68494455
+98467c00
+2422b898
+20203295
+6fe147c6
+c3848000
+6ff10112
+245a3c65
+2020328b
+20403c63
+20203297
+20403858
+202038b9
+20401ac8
+7047c800
+204038b2
+20203b85
+2020325c
+20203c63
+6fe147c6
+c304b28d
+20203c67
+20203c67
+204038b9
+6fe0c7b5
+67e0c177
+20203b81
+70476e00
+20403c63
+20203c67
+2040392f
+202038b7
+20402162
+20201f46
+20203c18
+6848c7ab
+2020610d
+204038bb
+202038c2
+6fe0c7ae
+2feffe00
+2040b26f
+6fe0c7ae
+2feffe01
+2040b277
+20600000
+6848c7ab
+20206109
+6fe0c659
+c1000000
+20206547
+6ff0810b
+c28138c4
+20405f9d
+efe08003
+c080b8dd
+6ff10112
+1fe67c02
+20610000
+efe08003
+67e089cf
+e8408003
+18622200
+604889d0
+18408403
+6ff10112
+98460400
+24610000
+7009d101
+204038eb
+6fe089d1
+c1000000
+202038e6
+20407d85
+20403bdb
+202038e0
+44dec017
+20405f9d
+6ff10112
+207a0000
+98608600
+202038ea
+20405f9d
+18608602
+efe08003
+98608600
+20205fa9
+44df4017
+6fe089cf
+c000391d
+c000b922
+c0013927
+c001b93c
+c0023946
+c002b94a
+c004b96c
+c005b9c3
+c00639c4
+c006b9e8
+c00739eb
+c007b9f3
+c00839fb
+c008b9ff
+c0093a03
+c00aba07
+c0133a0c
+c0143a11
+c014ba21
+c0153a2a
+c015ba5d
+c0163a63
+c0183a6a
+c018ba74
+c0193a85
+c019ba90
+c01a3abd
+c01abac0
+c01b3ac9
+c01bbad2
+c01c3ad5
+c0203add
+c0213ae7
+c0243aec
+c024baf7
+c028bafd
+c030bb01
+c03b3b10
+c03bbb16
+c03c3b1b
+c03d3b51
+c0483b5f
+c048bb64
+c0493b68
+c049bb6d
+c04a3b71
+c07fbb77
+20203b79
+6fe089d0
+c0833b79
+efe30003
+67e340a8
+20203b7c
+6fe089d0
+c0833b79
+efe30003
+67e3437a
+20203b7c
+6fe089d0
+c080bb79
+e8408003
+6048c7b6
+20403b7c
+6fe1478f
+c3848000
+c3800000
+6fe0c7ae
+2feffe00
+2420b935
+6848c7b6
+18417e03
+67e0c09b
+6fe0c7ae
+2feffe01
+24608000
+6848c7b6
+284ffe02
+2020b279
+20203277
+6fe089d0
+1fe67c43
+24213b79
+67e0c5ff
+df200008
+20407d8c
+6f2089d0
+d8a04600
+20405fdf
+20203b7c
+dfe0001d
+d8a042f7
+20403ac3
+20201a55
+6fe0c78f
+c3023b79
+20403249
+2020b95a
+7009d100
+20403858
+6fe0c656
+207a0000
+6fe14661
+243a3958
+6fe089d0
+67e14661
+67e1465f
+6061465f
+2040395c
+2020656c
+7009d100
+20203c48
+20403962
+6fe14661
+684947ac
+98467e00
+67e14661
+20600000
+6fe14661
+6849465a
+20407ebb
+6849464c
+20407ebb
+67e147ac
+20600000
+7009d101
+7009cf05
+20203b7c
+6fe1478f
+c304bb79
+204039c0
+20343b79
+7009d100
+6fe147c6
+c2843991
+6fe0c7c8
+247a0000
+7009d101
+efe10003
+67e147c9
+606147cb
+6fe089d0
+1fe0fffe
+24213b79
+2022bb79
+67e0c7c8
+684947c9
+184085ff
+20401a11
+203a3994
+e8420006
+59280302
+98467c00
+2422b994
+efe08006
+67e0c7cd
+1fe17e30
+203a3994
+7009d100
+20401ac6
+20403998
+20403998
+20403998
+6fe147c6
+c4040000
+7009d101
+20403c6b
+20203b7c
+7047c800
+7009d101
+20403c6b
+20203b79
+6fe0c7c8
+207a0000
+20401b24
+247a0000
+204039bb
+44dfc017
+6fe14380
+20407ebb
+1fe20400
+6fe0c435
+c3800000
+1840fffd
+d84000fb
+20407ebb
+6848c7c8
+20407ebb
+1fe22200
+18427e00
+9a267e00
+67e0c7c8
+204039b6
+6fe147cb
+1fe20600
+1a227200
+20405fdf
+18627e00
+67e147cb
+6fe0c7c8
+247a0000
+20203c69
+684947c9
+6fe0c7cd
+c2829e68
+c2821e5f
+20600000
+d8400017
+6fe147c6
+c3808000
+68494382
+20600000
+6fe147c6
+c2811e39
+20207ec7
+20203bae
+efe08003
+c040b9d1
+c04139d3
+c041b9d5
+1fe22200
+20406f26
+204075af
+1a227e00
+c00039d7
+c000b9da
+c00139e4
+c001b9e6
+20203b79
+20406f22
+202039da
+20406f22
+202039e4
+20406f22
+202039e6
+20406f2d
+70476700
+20203b7c
+58000003
+67e0c76f
+67e0c768
+58000000
+67e0c769
+58000004
+67e0c76a
+2040580c
+70476701
+20203b7c
+58000002
+202039db
+58000001
+202039db
+dfe00010
+d8a04796
+20203ac3
+efe08003
+6848c7c6
+7d3a0400
+6048c7c6
+68588060
+7d3a0404
+60588060
+20203b7c
+6f2089d0
+20407e2d
+20405f72
+67e147bf
+20403b7c
+20407e7c
+6fe147bf
+20205f6a
+da200002
+da4047a7
+d8400000
+20203b87
+6fe1478f
+c3003b79
+20403b7c
+20203268
+6fe1478f
+c304bb79
+20403b7c
+20203281
+6fe089d0
+c081bb79
+efe18003
+67e1c0b2
+20203b7c
+6f2089d0
+6fe14489
+1fe20a00
+20405fdf
+20203b7c
+6fe1478f
+c284baec
+c3003b79
+efe08003
+6848c76e
+793a0400
+79200407
+6048c76e
+20403b7c
+6fe0c76e
+c2833a1d
+20600000
+c28056e4
+70476e00
+70095b21
+202078e5
+6fe0c78f
+c4020000
+6fe0c659
+c1000000
+efe08003
+6848c657
+98408400
+6048c657
+20600000
+df200040
+d8a043e7
+20407d9b
+58000000
+67e08974
+1a220600
+18627e00
+67e10978
+20403a58
+6fe08974
+68488964
+18408401
+9840fe00
+67e08974
+1fe67c1f
+24213a44
+6848c3e7
+580043e8
+9840fe00
+67e1097d
+68488964
+18408401
+6fe0c3e7
+9840fe00
+67e0c3e7
+20203a4d
+6848c407
+58004408
+9840fe00
+67e1097d
+68488964
+18408401
+6fe0c407
+9840fe00
+67e0c407
+6fe1097d
+1fe20a00
+6fe10978
+1fe20600
+18427200
+20405fdf
+6fe089d0
+68488974
+98467c00
+2422ba30
+20203b7c
+efe08003
+67e08964
+efe08003
+67e08970
+20600000
+d8400000
+da200002
+6fe147c3
+67e1098e
+da40098e
+20203b87
+6fe089d0
+c080bb79
+efe08003
+67e0c7c1
+58000000
+67e147c3
+20203b7c
+6fe089d0
+c0823b79
+6fe1478f
+c284bb51
+efe20003
+67e24797
+70479604
+70477000
+20403b7c
+20205664
+6fe089d0
+c081bb79
+efe08003
+c0003a7a
+c000ba80
+20203b79
+20403b7c
+e8408003
+efe08003
+c0016121
+7d3a0407
+202060f4
+20403b7c
+e8408003
+efe08003
+203a610d
+20206109
+6fe089d0
+c080bb79
+e8408003
+204060fd
+58000000
+7d20fe00
+da200001
+67e1098e
+da40098e
+d8400000
+20203b87
+efe08003
+1fe20400
+c040ba9f
+c0413aa3
+c041baa8
+c0423aac
+67e0c39d
+204075af
+20401f35
+6fe0c39d
+c0003ab0
+c000bab3
+c0013ab5
+c0023ab7
+20203b79
+6048c39d
+20401f31
+7043530d
+20203ab1
+6048c39d
+20401f31
+7043530d
+70435101
+20203b7c
+6048c39d
+20401f31
+7043530d
+20203abb
+6048c39d
+20401f31
+7043530d
+20203ab9
+70435300
+70435103
+20203b7c
+70435301
+20203ab1
+70435305
+20203abb
+70435305
+20203ab9
+70435102
+20203b7c
+70435100
+20203b7c
+dfe0001f
+d8a043e7
+20203ac3
+dfe0001f
+d8a04407
+20203ac3
+6f2089d0
+9f267c00
+24213b79
+e7208005
+20405fdf
+20203b7c
+6fe1478f
+c304bb79
+6fe089d0
+c0843b79
+efe40003
+67e44372
+70095b12
+204078e5
+20203b7c
+efe10003
+67e14428
+20203b7c
+6fe0c39d
+203a3b79
+6fe0c39b
+c0803b79
+6fe0c39c
+c0803b79
+20407992
+20203b7c
+6fe089d0
+c082bb79
+efe08003
+67e0c7af
+efe20003
+67e247b0
+6848c7af
+2040610d
+20403c35
+20203b7c
+6fe089d0
+c080bb79
+efe08003
+67e0c1e8
+20203b7c
+efe08003
+c000baf5
+6fe0c399
+c001baf3
+c0033af3
+c003baf3
+20203b79
+70439a01
+20203b7c
+20401f9b
+20203b7c
+6fe089d0
+c080bb79
+20403b7c
+efe08003
+203a5840
+2020583e
+20403b7c
+20407e7c
+70801001
+2020137e
+6fe089d0
+c0003b79
+efe08003
+203a3b0e
+6fe089d0
+c082bb79
+efe20003
+d84f4240
+98467c00
+20213b79
+67e2439e
+20401abe
+20203b7c
+20401ac0
+20203b7c
+e8410003
+20401a11
+18c08bfe
+58000000
+e7e10005
+20203b7c
+20403b1f
+20403b4d
+58000000
+e7e10005
+20203c0f
+efe08003
+20403b23
+20403b2a
+20203c0f
+20403b4a
+58280002
+e7e18005
+20600000
+67e0895c
+20403b4a
+59280302
+e7e20005
+6fe0895c
+e7e18005
+20600000
+20401a30
+efe08003
+1fe1721f
+1fe22200
+2a2ffe07
+7920840f
+2a2ffe06
+7920840e
+e0410005
+1f227e00
+e7e08005
+20405ff3
+20403b4d
+58000000
+e7e10005
+184104ff
+184085ff
+20401a11
+18c08c04
+efe08006
+c2823b42
+c282bb42
+18408401
+20600000
+20401a30
+2a2ffe05
+7920840f
+e0410005
+5a290202
+e7e40005
+184085ff
+20600000
+20401a30
+e0410005
+20600000
+efe08003
+1fe27200
+e7e08005
+20205ff3
+6fe0c39b
+c082bb79
+6fe0c39d
+c0023b5d
+c0423b57
+20203b79
+70439802
+70439908
+20203b5a
+efe20003
+67e2439e
+20203b7c
+20403b5a
+20201f84
+6fe089d0
+c0813b79
+e8410003
+20401b29
+20203b7c
+d8400000
+da200002
+da404075
+20203b87
+6fe089d0
+c0843b79
+efe40003
+20401b27
+20203b7c
+ea208003
+ea410003
+d8400000
+20203b87
+6f2089d0
+1f20f3fe
+efe10003
+1fe20a00
+20405fdf
+20203b7c
+70409900
+20203b7c
+d8400001
+da200000
+20203b87
+d8400000
+da200000
+20203b87
+7009cf00
+20203bab
+7009cf02
+20203bab
+7009cf03
+20203bab
+7009cf05
+20203bab
+6fe089cf
+1fe22600
+7009cf06
+58000002
+9a20fe00
+20403c1e
+1a627e00
+e7e08003
+e0408003
+1a227200
+1a420c00
+20405fd9
+20203c28
+20403858
+7009cf07
+6fe083d2
+207a0000
+20403c1e
+6fe083d2
+1fe27200
+6fe103d4
+1fe20c00
+20405fc5
+20203c28
+7009cf08
+1f20fe02
+20403c1e
+6fe109fa
+e7e10003
+6fe109f8
+1fe20c00
+20405fc5
+18c27e00
+67e109f8
+20203c28
+7009cf09
+58000000
+20403c1e
+20203c28
+7009cf0a
+58000001
+20403c1e
+20403bbf
+6fe1478f
+d8e00002
+afefffff
+79208403
+d8e00009
+afefffff
+79208405
+6fe0c78f
+d8e00004
+afefffff
+79208404
+e0408003
+20203c28
+d8400000
+6fe0c09b
+d8e00000
+afefffff
+79208400
+d8e00001
+afefffff
+79208401
+6fe0c427
+d8e00000
+afefffff
+79208402
+20600000
+7009cf0d
+6fe0c48b
+1feffe22
+1fe27200
+20403c1e
+6fe14489
+1fe20c00
+20405fc5
+20203c28
+7009cf0e
+58000004
+20403c1e
+6fe2087c
+e7e20003
+20203c28
+7009cf0f
+6ff10112
+d8400040
+20407ebb
+1fe22200
+1fe27200
+20405f9d
+d8a0098e
+20405fdf
+1a227e00
+1a227200
+20403c1e
+d8c0098e
+20405fc5
+20203c28
+7009cf10
+20203bab
+7009cf11
+58000004
+20403c1e
+6fe2439e
+e7e20003
+20203c28
+da200180
+20203bf9
+da200080
+20203bf9
+da200101
+20203bf9
+da200001
+70476e00
+7009cf14
+58000002
+20403c1e
+1a227e00
+e7e10003
+20203c28
+da600000
+20203c03
+da600001
+7009cf15
+58000001
+20403c1e
+1a627e00
+e7e08003
+20203c28
+7009cf1d
+58000004
+20403c1e
+6fe2087c
+e7e20003
+20203c28
+60490964
+7009cf29
+58000002
+20403c1e
+68490964
+e0410003
+20203c28
+7009cf2b
+20203bab
+7009cf40
+58000002
+20403c1e
+6fe14075
+e7e10003
+20203c28
+7009ce02
+67e089d0
+604c0964
+44e04018
+20403c2a
+684c0964
+20405fb5
+6fe189ce
+e7e18003
+20600000
+44e0c018
+20205fb9
+20403c33
+20608000
+20403c31
+6fe247b0
+1feb7e00
+207a0000
+20207d81
+6848c7af
+2020610d
+6848c7af
+20206118
+6848c7af
+20206109
+622109f8
+624109f6
+6fe14437
+67e109fa
+204039c0
+20740000
+684909f6
+6fe0c7c5
+20407ebb
+1fe27200
+18427e00
+9f267e00
+67e109f6
+20403b9f
+6fe109f6
+207a0000
+20203c3d
+6fe147c6
+c3848000
+20403c65
+2020328b
+70417702
+20600000
+6fe0c7c1
+207a0000
+6fe0c7c2
+207a0000
+1fe0ffff
+67e0c7c2
+247a0000
+7047c205
+20406166
+2040618d
+1fe6fc64
+20407e61
+18070400
+67e0c7c3
+6048c7c4
+20600000
+20407e92
+20213258
+2020325a
+d8e0000a
+20203c71
+d8e0000a
+20203c6d
+d8e00009
+20203c71
+d8e00009
+20203c6d
+d8e00008
+20203c71
+d8e00008
+20203c6d
+6fe147c6
+f93ffe00
+67e147c6
+20600000
+6fe147c6
+f9207e00
+67e147c6
+20600000
+20406e5e
+20403ca6
+204041e7
+204040ce
+20758000
+20404766
+20403c83
+2040427c
+6fe0c92f
+c3838000
+6fe1478f
+c2864593
+204046de
+20203e15
+58004902
+67e14479
+580048a5
+67e1489f
+580048cc
+67e148a1
+58003e80
+67e148a3
+580043df
+67e14461
+58004497
+67e14463
+58003e7b
+67e1445f
+58004374
+67e14467
+5800468b
+67e14465
+58003e5e
+67e1445d
+580043c8
+67e1446b
+580044f5
+67e1446f
+58003fa9
+67e14473
+58003e4d
+67e1445b
+580049f5
+67e1446d
+580049f7
+67e14477
+58004a0a
+67e14471
+20600000
+20758000
+2040260e
+204022b5
+20403f60
+20403dd6
+20401ac2
+20401aeb
+20401ade
+20401aca
+6fe44bbc
+c289c675
+c2894636
+20600000
+7040c508
+6fe44bbc
+c3860000
+7040c518
+20600000
+700b58ff
+704793ff
+7047921e
+7049c505
+58004932
+67e1448f
+70448e01
+58004ac6
+67e1489d
+70483901
+6fe14902
+67e14794
+6fe14904
+67e14885
+6fe0c907
+67e14889
+6fe2c909
+67e2c8cf
+6fe0c908
+67e0c880
+6fe44bbc
+247a0000
+58020800
+67e1cbbc
+58800700
+e7e18005
+58000300
+e7e10005
+70409901
+6fe0c90e
+2feffe00
+2040c724
+6fe0c90e
+2feffe02
+2040c726
+6fe0c90e
+2feffe01
+2040c728
+6fe0c90e
+2feffe03
+2040c72a
+6fe0c90e
+2feffe04
+2040c72c
+6fe0c90e
+2feffe05
+2040c736
+6fe0c869
+245a22c4
+20403cb3
+6fe0c90f
+1fe10407
+6048c4a3
+1fe97e00
+1fe10401
+6048c869
+1fe37e00
+1fe10403
+6048c901
+1feb7e00
+1fe17e03
+20404812
+6fe0c910
+1fe10403
+6048c929
+1feb7e00
+1fe10403
+6048c92a
+1feb7e00
+1fe10401
+6048c92b
+6048c997
+1fe37e00
+1fe10401
+6048c87a
+1fe37e00
+1fe17e03
+67e0cbc5
+44e14018
+580b0c0a
+67e1c91c
+58ffffff
+e7e18005
+580607ff
+e7e18005
+58ffffff
+e7e18005
+7048fb0a
+58000064
+67e14bd9
+20403ebc
+58001770
+67e14bcf
+704bd114
+58000190
+67e14bd7
+67e14bd3
+580003e8
+67e14bd5
+70488107
+7048ce7d
+7041e800
+70489001
+58000f0f
+67e14891
+67e14893
+6fe140a8
+67e140ac
+d8a0437a
+d8c040a8
+df200006
+20407ed9
+704b9b20
+70493e34
+6fe3437a
+67e34955
+704bc402
+7043e71f
+58050102
+67e1c3e8
+58120303
+e7e18005
+58190318
+e7e18005
+580003c2
+e7e10005
+5806ff06
+67e1cae3
+58000300
+e7e18005
+58090c80
+e7e18005
+58355442
+e7e18005
+5820322e
+e7e18005
+58756f4d
+e7e18005
+58006573
+e7e10005
+7044071f
+d8c04aea
+d8a04408
+df20000d
+20407dd4
+6fe0c408
+1fe0ffff
+67e0c2f7
+d8c0440a
+d8a042f8
+df20000b
+20407dd4
+58070007
+67e1c372
+58002000
+e7e18005
+5800012c
+e7e10005
+58181203
+67e1cadd
+580000ff
+67e1cae0
+380000fb
+3806c212
+3808800f
+380c0021
+67e4444c
+70443207
+58000015
+67e14af8
+58000019
+67e14357
+5800001d
+67e14afa
+58000021
+67e14afc
+58000030
+67e14afe
+58000022
+67e143d1
+704b0196
+70493d00
+204022d8
+204022db
+58604800
+67e1c85f
+5800012c
+67e148c6
+58000050
+67e148c4
+58000005
+67e14bcb
+58000708
+67e14bcd
+58010403
+67e1c9d5
+582a2002
+e7e18005
+5822153f
+e7e18005
+58114433
+e7e18005
+58265a09
+67e1c9e4
+58041934
+e7e18005
+58000009
+e7e10005
+5800ffff
+e7e10005
+580d5a09
+67e1c9f8
+58ed1d10
+e7e18005
+5800807d
+e7e10005
+5800ffff
+e7e10005
+58ff5a09
+67e1ca3e
+5840ab27
+e7e18005
+589b56b3
+e7e18005
+5812a8e6
+e7e18005
+58bec0a9
+e7e18005
+58afa5e6
+e7e18005
+58a121a0
+e7e18005
+5810b802
+e7e18005
+58a70bb9
+e7e18005
+58d0b5ff
+e7e18005
+58ff00b6
+e7e18005
+58000900
+e7e18005
+5800ffff
+e7e10005
+580d5a09
+67e1ca64
+58c50e10
+e7e18005
+58109a5b
+e7e18005
+58421138
+e7e18005
+58412828
+e7e18005
+58394923
+e7e18005
+584bb04a
+e7e18005
+58904ca0
+e7e18005
+5809704d
+e7e18005
+58ffff00
+e7e18005
+5846a509
+67e1ca92
+58101934
+e7e18005
+58690760
+e7e18005
+58207d04
+e7e18005
+5809007e
+e7e18005
+58220d00
+e7e18005
+58ff220e
+e7e18005
+704aa7ff
+580b5a09
+67e1cab4
+580009f3
+e7e18005
+5800ffff
+e7e10005
+20203174
+58009468
+67e14663
+58009732
+67e14396
+58002580
+67e1c0b2
+70417803
+70415b08
+704baf00
+704baf00
+704bb000
+58000200
+67e14159
+70438017
+70438217
+58000a77
+67e14486
+38000306
+38044440
+38090000
+380c4408
+67e4c665
+38001224
+38044000
+38080000
+e7e28005
+3803ffff
+3806fe23
+380999d9
+380c020d
+67e440a0
+58004b06
+67e143de
+58000010
+67e143e0
+2040495b
+20404913
+20403ecf
+6fe44bbc
+c30dbe02
+7044550c
+58000006
+67e14372
+67e14374
+2040261a
+6fe44bbc
+c30c3e06
+20402612
+6fe0c93d
+67e0cac5
+6fe1c37d
+67e1cada
+6fe0c901
+1fe17efe
+67e0c901
+67e0c4a2
+58000000
+67e3c8d4
+6fe0c792
+67e0cbac
+67e0cbad
+20401a55
+202042e0
+44e1c018
+6fe44bbc
+c297c849
+6fe0c93d
+c0004835
+20403e28
+2434432b
+44e24018
+da20493e
+6fe0c93d
+1fe0ffff
+1feffe1d
+9a20a200
+efe08011
+67e0c484
+6fe0c484
+c019be32
+c01a3e3e
+20204593
+44e2c018
+78547c00
+6fe44bbc
+c305be2f
+6fe08989
+c3013e2f
+78347c00
+6fe0cac2
+67e0cac1
+20600000
+68494bc9
+6fe0cad2
+c07fbe36
+68494bc6
+604940c1
+6fe341dd
+203a326a
+70447f17
+6fe0c767
+243a3260
+70447f04
+20203260
+704ad801
+6848cbc8
+6fe0cad2
+c07fbe43
+6848c906
+6048cb88
+20403297
+6fe1cae0
+67e1c3ec
+20404428
+58000004
+e7e08006
+d8c04408
+2040442f
+20207959
+c513324f
+6fe0cabd
+203a324f
+6fe0cb05
+c000b24f
+6fe144db
+243a324f
+6fe0c8e5
+243a324f
+20203251
+6fe0c906
+67e0cad5
+20600000
+44e34018
+20404272
+2040427c
+20203289
+44e3c018
+6ff20138
+79207e1a
+67f2004c
+2040154c
+20406e62
+2040495b
+20404055
+20403e6a
+2040466d
+6848c915
+202060e6
+44e44019
+20404329
+20407f52
+20403e80
+20403e72
+6848c91b
+20403f96
+20203f98
+d8c08070
+df200013
+efe08006
+243a3e79
+58000040
+18c08bff
+e7e08005
+c2003e74
+20600000
+c6130000
+20403e80
+6fe0809d
+247a0000
+202060e6
+44e4c019
+20403fc8
+6fe0c923
+d840003f
+2040612c
+20405b62
+6848c91c
+204060da
+6848c91d
+204060da
+6848c91e
+204060da
+6848c911
+204060da
+6848c912
+204060da
+6848c913
+204060da
+6848c91f
+204060da
+6848c916
+204060da
+6848c917
+204060d6
+6848c918
+204060d6
+6848c920
+204060d6
+6848c921
+204060d6
+6848c915
+202060da
+6fe1478f
+c284bea5
+6fe1478f
+c2803ea8
+20600000
+1a227e00
+243a1ad2
+20201ad4
+1a227e00
+243a150e
+20201510
+6fe0c4a2
+c1810000
+44e54019
+6848c4a3
+18467c03
+20213eb9
+18408405
+6048c900
+18422200
+20406131
+c01fc9a1
+2040499f
+1a220400
+20206121
+18408404
+6048c900
+20203eb3
+6fe0c901
+c0013ec5
+c0003eca
+70490100
+582c0172
+67e1c8e7
+58014001
+e7e18005
+20600000
+585d0099
+67e1c8e7
+58007100
+e7e18005
+20600000
+58c8012c
+67e1c8e7
+5800dc00
+e7e18005
+20600000
+6fe44bbc
+c40a0000
+7048f901
+c3970000
+c3958000
+7048f900
+20600000
+6fe0c8fa
+1fe0fe01
+67e0c8fa
+6848c8fb
+98467c00
+20600000
+6fe44bbc
+c40a0000
+20403eab
+6fe0c8f9
+203a3ef3
+6fe0c4a2
+c0013ee8
+7048f903
+20403ed6
+20213eea
+20403eef
+20203ef9
+7048f902
+20203ef9
+20403ead
+7044a202
+6fe0cbbb
+245a3eef
+20203ef9
+7048fa00
+6fe0c901
+67e0c4a2
+20600000
+6fe0c4a2
+c0813ef7
+6fe0cbbb
+247a0000
+20403ed6
+24610000
+44e5c019
+6fe0cbbb
+247a0000
+7048fa00
+20406166
+2040618d
+67e148ed
+6fe0c4a2
+c0813f08
+684948ed
+184ffe08
+1fe6fc0a
+20407e61
+9840fe00
+67e148ed
+da2048e7
+20403f1a
+6fe0c4a6
+c2813f5c
+c280bf5e
+c3003f12
+7048fe01
+20203f10
+d8e00004
+2020472e
+d8e00004
+20404732
+7048fc0c
+6fe0c8fe
+207a0000
+7048fe00
+6848c925
+20204978
+44e64019
+efe40011
+67e4095c
+6fe0c8f9
+c0003f32
+c0013f21
+c001bf51
+6fe44bbc
+c3173f27
+6fe10962
+684948ef
+98467c00
+24213f54
+6fe44bbc
+c315bf32
+7048ff00
+6fe10962
+684948f1
+98467c00
+24213f30
+204046e7
+20203f32
+204046eb
+20203f32
+20403f58
+204061d6
+204061ce
+6fe10962
+6849095e
+98467c00
+244161d2
+68490960
+98467c00
+244161ca
+6fe10962
+6849095c
+98467c00
+20213f4d
+6849095e
+98467e00
+24213f4f
+203a3f4f
+1fefa264
+6fe1095c
+6849095e
+98460400
+1a227e00
+9846fc00
+20407e61
+67e0cb00
+20600000
+704b0064
+20600000
+704b0000
+20600000
+6fe0c4a2
+c0013f21
+20203f32
+6848c4a6
+79200402
+6048c4a6
+20600000
+6848c4a6
+793f8402
+6048c4a6
+20600000
+7048ff01
+20600000
+2040495b
+20203e5a
+6848c4c3
+2040610d
+20407a1f
+6848c91c
+20403f96
+6848c91d
+20403f96
+6848c91e
+20403f96
+6848c911
+20403f96
+6848c912
+20403f96
+6848c913
+20403f96
+6848c914
+20403f96
+6848c91f
+20403f96
+6848c916
+20403f96
+6848c917
+20403f96
+6848c918
+20403f96
+6848c920
+20403f96
+6848c921
+20403f96
+6848c915
+20403f96
+6848c922
+20403f96
+6848c925
+2040610d
+6848c919
+2040610d
+6848c926
+2040610d
+6848c927
+2040610d
+6848c928
+2040610d
+6848c91a
+20203f96
+18467cff
+20628000
+18410e7f
+6ff2011c
+afefffff
+2020bf96
+20203f94
+79200407
+202060f4
+793f8407
+202060f4
+6fe1cbef
+67e1895c
+df200014
+d8400000
+6fe1895c
+2feffe00
+2040e121
+6fe1895c
+1fe3fe00
+67e1895c
+18408401
+c2003f9c
+20600000
+20403faa
+70448673
+20403fa9
+20205b66
+20205d54
+6fe0c923
+d8400021
+2040612c
+6fe0c924
+d8400023
+2020612c
+44e6c019
+78547c00
+58000000
+67e348d5
+20404280
+20403fbe
+20403fc3
+2040411c
+6fe0c8d4
+1fe17e1f
+67e0c8d4
+24344766
+20404758
+20204584
+6fe0c8e4
+207a0000
+67e0c8d9
+7048e400
+20207ec5
+6fe0c8e0
+207a0000
+67e0c8da
+7048e000
+20207ec5
+20403fd5
+20404011
+6fe0c8de
+6848c8dd
+67e0c8dd
+98467c00
+2422b253
+6fe0c8e2
+6848c8e1
+67e0c8e1
+98467c00
+2422b253
+20600000
+6fe0c920
+c17f8000
+da200000
+6848c920
+204060fd
+7920a200
+6848c921
+204060fd
+7920a201
+1a227e00
+67e0c8de
+c000bfe5
+c0013fe9
+6fe0c8df
+c283bff5
+20600000
+6fe0c8dd
+c0003fed
+c001bfef
+20600000
+6fe0c8dd
+c0003ff1
+c001bff3
+20600000
+7048df82
+20600000
+7048df81
+20600000
+7048df80
+20600000
+7048df83
+20600000
+6fe0c8df
+793ffe07
+67e0c8df
+c0003ffd
+c000c000
+c0014003
+c001c006
+20600000
+6fe0c8de
+c001c009
+20600000
+6fe0c8de
+c0004009
+20600000
+6fe0c8de
+c001c00d
+20600000
+6fe0c8de
+c000400d
+20600000
+6fe0c8e0
+1fe0fe01
+67e0c8e0
+20600000
+6fe0c8e0
+1fe0ffff
+67e0c8e0
+20600000
+6fe0c917
+c17f8000
+da200000
+6848c917
+204060fd
+7920a200
+6848c918
+204060fd
+7920a201
+1a227e00
+67e0c8e2
+c000c021
+c0014025
+6fe0c8e3
+c283c031
+20600000
+6fe0c8e1
+c0004029
+c001c02b
+20600000
+6fe0c8e1
+c000402d
+c001c02f
+20600000
+7048e382
+20600000
+7048e381
+20600000
+7048e380
+20600000
+7048e383
+20600000
+6fe0c8e3
+793ffe07
+67e0c8e3
+c0004039
+c000c03c
+c001403f
+c001c042
+20600000
+6fe0c8e2
+c001c045
+20600000
+6fe0c8e2
+c0004045
+20600000
+6fe0c8e2
+c001c049
+20600000
+6fe0c8e2
+c0004049
+20600000
+6fe0c8e4
+1fe0fe01
+67e0c8e4
+20600000
+6fe0c8e4
+1fe0ffff
+67e0c8e4
+20600000
+6848c917
+204060d6
+6848c918
+204060d6
+6848c920
+204060d6
+6848c921
+202060d6
+6848c917
+20403f8d
+6848c918
+20403f8d
+6848c920
+20403f8d
+6848c921
+20203f8d
+6fe148d9
+207a0000
+7048e501
+7048e60a
+20600000
+da6048e6
+da404065
+202031fc
+7048e500
+20600000
+6fe44bbc
+c2974076
+6fe0c913
+c17f8000
+da200000
+704ba705
+6848c913
+20404079
+67e0cba4
+6fe0c914
+c07fc082
+204041a8
+1a227e00
+c282c092
+20204099
+6fe0c8ff
+203a4099
+20204092
+6fe44bbc
+c2964088
+6fe0cba4
+1fe22600
+6fe0c914
+c07fc1d5
+6fe0cbab
+243a4085
+2020408a
+6848c913
+20403f96
+20204073
+7049e200
+704ba400
+20600000
+6fe0cba4
+202041c7
+204060fd
+6848c914
+2020c088
+6848c914
+2040610d
+6848c913
+6fe0cba4
+202041c7
+6fe0c9e2
+c1008000
+7049e201
+6fe44bbc
+c3940000
+c39b0000
+202040a9
+6fe0c9e2
+c1000000
+7049e200
+6fe44bbc
+c29440a0
+c29b40a0
+20600000
+6fe0c9e3
+243a40a4
+6fe0cbad
+245a40a9
+7049e300
+6fe0c792
+67e0cbad
+67e0cbac
+20600000
+44e74019
+204040b2
+20740000
+6fe0c997
+1fe0fe01
+1fe17e03
+67e0c997
+204040d5
+2020462e
+78547c00
+6fe44bbc
+c3960000
+c3970000
+6fe0cb9f
+207a0000
+6fe0cba0
+207a0000
+78347c00
+20600000
+6fe44bbc
+c29440c0
+c29b40c7
+20600000
+6fe0c9e2
+c1808000
+da604bad
+da4040c5
+202031fc
+7049e301
+202046f3
+6fe0c9e2
+c1808000
+da604bac
+da4040cc
+202031fc
+7049e301
+20204514
+202040d8
+6fe44bbc
+c38e0000
+6fe0c997
+c1818000
+70499700
+20600000
+44e7c019
+204040cf
+2040492e
+6fe0c92c
+c001c0fb
+c005c10f
+6fe0c997
+c00040e2
+c000c0e0
+c00140e4
+c001c0e6
+6848c9d6
+202040e8
+6848c9d5
+202040e8
+6848c9d7
+202040e8
+6848c9d8
+202040e8
+6fe0c92c
+c00240f7
+c002c0f7
+c00440f9
+c003c0f9
+c00340f7
+6048c9e1
+58000006
+20405d65
+1fe104f8
+6fe0c9e1
+9840fe00
+1fed7e00
+1fe0fe06
+20205d5e
+184085ff
+202040ee
+18408402
+202040ee
+6fe0c997
+c0004102
+c000c100
+c0014104
+c001c106
+6fe0c9da
+20204107
+6fe0c9d9
+20204107
+6fe0c9db
+20204107
+6fe0c9dc
+67e0c9e1
+1fed7e00
+1fe22200
+1fe0fe0d
+20405d5e
+1a227e00
+1fe0fe0e
+20205d5e
+6fe0c997
+c0004116
+c000c114
+c0014118
+c001c11a
+6fe0c9de
+20204107
+6fe0c9dd
+20204107
+6fe0c9df
+20204107
+6fe0c9e0
+20204107
+20404155
+2040412d
+20403ea0
+20404128
+1a227e00
+6848c8dc
+67e0c8dc
+67e0c8d4
+9842fe00
+1fe67c00
+20628000
+20207ec5
+c6930000
+1a227e00
+207a0000
+67e0c8d4
+20207ec5
+704ba900
+704baa00
+704bab00
+1fe20400
+2040413d
+20404140
+20404143
+20404146
+6fe0cbaa
+207a0000
+6fe0cba9
+207a0000
+704bab01
+6fe0c8dc
+1fe22200
+20600000
+18417e09
+c004c14e
+20600000
+18417e14
+c00a414e
+20600000
+18417e18
+c00c414c
+20600000
+18417e07
+c001c14c
+c002c14c
+c003414c
+c003c14c
+20600000
+704baa01
+20600000
+704ba901
+20600000
+20404161
+20404155
+58000000
+67e1cb9f
+20600000
+44e8401a
+6fe0cbf2
+245a4161
+da200000
+20404164
+2040416a
+20404170
+20404176
+2040418f
+204041aa
+1a227e00
+20600000
+58030303
+67e1cb9f
+20600000
+704ba700
+6848c91c
+6fe0cb9f
+204041c7
+67e0cb9f
+20600000
+704ba701
+6848c91d
+6fe0cba0
+204041c7
+67e0cba0
+20600000
+704ba702
+6848c91e
+6fe0cba1
+204041c7
+67e0cba1
+20600000
+6fe0c911
+c17f8000
+704ba703
+6fe0cba2
+1fe22600
+6848c911
+6fe0c914
+c07fc18b
+204060fd
+2020c187
+6848c914
+2040610d
+6848c911
+6fe0cba2
+204041c7
+67e0cba2
+202041a8
+6848c914
+6fe0cba2
+204041c7
+20204185
+204041d5
+67e0cba2
+6848c911
+20203f96
+6fe0c912
+c17f8000
+704ba704
+6fe0cba3
+1fe22600
+6848c912
+6fe0c914
+c07fc1a4
+204060fd
+2020c1a0
+6848c914
+2040610d
+6848c912
+6fe0cba3
+204041c7
+67e0cba3
+202041a8
+6848c914
+6fe0cba3
+204041c7
+2020419e
+204041d5
+67e0cba3
+6848c912
+20203f96
+6848c914
+20203f96
+704b9c00
+6fe44bbc
+c40a8000
+6fe0c916
+c17f8000
+704ba707
+6848c916
+6fe0cba6
+204041c7
+67e0cba6
+1a227e00
+c283c1ba
+204041bd
+6fe0cb9d
+67e0cb9e
+20600000
+704b9d01
+204041c0
+202041b7
+704b9d00
+6fe0cb9e
+207a0000
+704b9c01
+20600000
+204060fd
+6848cba7
+18420e00
+2020c1d3
+202041d1
+1fe3fe00
+1fe22400
+204060fd
+7920a400
+1a417e07
+6848cba7
+18420e00
+c003c1d3
+c00041d1
+20600000
+f93fa200
+20600000
+f9202200
+20600000
+44e8c01a
+1a627e00
+67e0cba8
+1fe3fe00
+1fe22400
+18422600
+20403f94
+1a620400
+204060fd
+7d20a400
+204041e1
+202041cb
+6848cba8
+18410401
+1a417e01
+98467c00
+2422c36f
+20600000
+44e9401a
+20403fa5
+20758000
+20404276
+204041f5
+c01841fc
+c018c257
+c02c4260
+204041f2
+20001af4
+202041eb
+6fe0c923
+20405b55
+20203faa
+58000001
+20405d65
+67e0c9c7
+58000000
+20405d65
+67e0c9c6
+20600000
+6fe0c9c7
+c02d4205
+c06c420b
+c068c21a
+c0694223
+c001422a
+c02a422d
+c0284254
+202041eb
+70492c05
+20404272
+20407d85
+da604a3e
+2040426b
+202040ce
+58000016
+20405d65
+1fe67cbd
+2422c1e7
+58000019
+20405d65
+1fe67c55
+2422c1e7
+5800001b
+20405d65
+1fe67c1d
+2422c1e7
+70492c06
+da604a82
+2020426b
+70492c00
+da6049f8
+2040426b
+da604a02
+2040426b
+58000943
+20405d5e
+da604a1c
+2020426b
+70492c02
+da6049ee
+2040426b
+da604a02
+2040426b
+da604a1c
+2020426b
+70492c03
+da6049e4
+2020426b
+20404269
+58009a5b
+20405d5e
+5800000d
+20405d65
+1fe67c12
+2022c241
+1fe67c0a
+2422c244
+5800000e
+20405d65
+1fe67ce5
+2422c1eb
+58000010
+20405d65
+1fe67ca5
+2022c241
+20404251
+70492c08
+20600000
+70492c09
+da604a64
+2020426b
+1fe67c10
+2422c1eb
+5800000e
+20405d65
+1fe67cc5
+2422c1eb
+58000010
+20405d65
+1fe67c38
+2422c1eb
+20404251
+70492c0a
+20600000
+5800005b
+20405d5e
+20204267
+70492c07
+da604aa8
+2020426b
+20404276
+6fe0c9c7
+c038425e
+c000425c
+202041eb
+70492c01
+20600000
+70492c04
+20600000
+20404276
+6fe0c9c7
+c02cc264
+202041fc
+70492c0b
+da604a92
+2020426b
+58000009
+20205d5e
+58005a09
+20205d5e
+efe10013
+d840ffff
+98467c00
+20628000
+20405d5e
+1a60a602
+2020426b
+58008006
+20405d5e
+20002ee0
+20600000
+44e9c01a
+20403fa5
+20404272
+da604ab4
+2040426b
+202040ce
+204041e7
+20403fa5
+58000806
+20205d5e
+6fe0c4ae
+c1800000
+6fe0c92c
+c000428c
+c000c28c
+c004428c
+c001428c
+c001c2b0
+c002428c
+c00342d5
+c005c2ce
+2020428c
+20404304
+78547c00
+6fe0c915
+c07fc293
+6848c915
+204060fd
+24608000
+58000000
+20405d65
+c09842a6
+58000002
+20405d65
+c4038000
+2040431b
+6fe0c8d5
+20404313
+67e148d5
+6fe0c8d7
+20404313
+67e148d7
+6fe0c92d
+c00042a8
+c000c2aa
+c00142ac
+c001c2ae
+20600000
+c018c296
+202041f2
+204042ed
+20204322
+204042f5
+20204322
+204042f1
+20204322
+204042fd
+20204322
+20404304
+6fe0c915
+c07fc2b6
+6848c915
+204060fd
+24608000
+58000000
+20405d65
+c09841f2
+58000002
+20405d65
+c4038000
+2040431b
+204042cc
+67e0c8db
+1ff1fe00
+20404317
+67e0c8d6
+6fe0c8db
+1fe17e0f
+20404317
+67e0c8d8
+6fe0c92d
+c00042ed
+c000c2f5
+c00142f1
+c001c2fd
+20600000
+58000012
+20205d65
+20404304
+6fe0c915
+c07fc2d4
+6848c915
+204060fd
+24608000
+202042b9
+20404304
+78547c00
+58000002
+20405d65
+c4038000
+58000008
+20405d65
+203a4299
+58000000
+67e348d5
+20600000
+6fe0c929
+67e0c92d
+6fe0c91a
+c17f8000
+6848c91a
+20403f96
+6848c91a
+204060fd
+2040c2ea
+20203f94
+6fe0c92a
+67e0c92d
+20600000
+6fe148d5
+1fe67e00
+67e148d5
+20207ec5
+6fe148d7
+1fe67e00
+67e148d7
+20207ec5
+6fe148d7
+1fe67e00
+67e148d7
+6fe148d5
+1fe67e00
+67e148d5
+204042ff
+20207ec5
+204042ff
+20207ec5
+6fe148d7
+684948d5
+67e148d5
+604948d7
+20600000
+6fe0c9cd
+205a431b
+7049cd01
+20600000
+704abd01
+20401ac6
+202041e7
+6fe0c915
+c1ff8000
+6fe0cabf
+c1808000
+58000000
+67e0cabf
+67e248d5
+2020430a
+c4038000
+d840ff00
+9841fe00
+20600000
+c4018000
+d84000f0
+9841fe00
+20600000
+dfe00003
+20405d65
+67e148d5
+dfe00004
+20405d65
+67e148d7
+20600000
+6848c924
+204060fd
+20608000
+5800000a
+20405d65
+200003e8
+20204322
+58008100
+20205d5e
+704ad2ff
+6fe0cbc4
+c280c32f
+c2804334
+70448434
+580f0f0f
+67e1c37a
+67e1c37d
+20203e24
+70448433
+d8c04979
+20404608
+20203e24
+44ea401a
+204045fd
+20404354
+6fe0c93d
+c000c33f
+c0014341
+20600000
+6fe3493f
+20204342
+6fe3495c
+684b4979
+98467c00
+2022c593
+20203e1c
+20404354
+6fe0c5ff
+1fe0fe03
+1fe22200
+20404e1e
+6fe144e1
+e7e10005
+580004a1
+e7e10005
+6fe0c5ff
+1fe0fe01
+1fe27200
+d8c045ff
+20207dd4
+704ad25a
+20600000
+6fe1478f
+c283c362
+c284b281
+c2803268
+202045b6
+58000000
+67e14ac3
+6fe1478f
+c284b281
+6fe1478f
+c2803268
+20600000
+2040471c
+2020799c
+6fe44bbc
+c40d8000
+2434436c
+6fe0cabe
+1fe0fe01
+1fe17e0f
+67e0cabe
+247a0000
+704abe00
+78547c00
+20600000
+6fe0c915
+c1ff8000
+70417700
+704ac01e
+20600000
+44eac01a
+1a627e00
+c00a4390
+c000c43a
+c00ac39f
+c001443e
+c002c461
+c008458e
+c0094464
+c00332b6
+c0024472
+c009c472
+c00cb25e
+c015c47d
+c010c483
+c005448a
+c017324c
+c018c3aa
+c014c3ac
+c01943ae
+c01f43b9
+c02043ba
+c013c48c
+c01cc896
+c01d4872
+c01e488d
+c02243d0
+20600000
+704abf00
+2040430a
+704ad701
+20404861
+6fe0cad8
+243a4397
+704ad914
+6fe14482
+793ffe00
+67e14482
+704b8800
+6fe14b01
+67e14b03
+20404584
+202045b6
+704ad700
+58000006
+6fe44bbc
+c28dc3a4
+58000007
+67e14372
+67e14374
+704b0500
+704abd00
+20401ac8
+2020443e
+d8e00002
+202043b5
+70095b12
+202078e5
+6fe0cad8
+c000c3b1
+202043b3
+204043ac
+704b8714
+d8e00001
+202043b5
+6fe0cb86
+f9207e00
+67e0cb86
+20600000
+2020328f
+6fe143db
+c1000000
+6fe08289
+1feb7e00
+1fe67c0c
+20610000
+58000009
+67e14372
+67e14374
+204043ac
+704b0501
+20600000
+704b0500
+20600000
+6fe0cad8
+247a0000
+6fe0c437
+1fe67e22
+24628000
+704b8700
+d8e00000
+202043b5
+6fe082c1
+1fe67c0c
+242143c4
+6fe082c3
+6848cb9b
+98467c00
+202143da
+6fe082c3
+67e0c177
+202043c6
+6fe0cb9b
+67e0c177
+202043c6
+704b8600
+20600000
+44eb401a
+20401b24
+247a0000
+6fe0cad2
+c07fc3e7
+6fe0cb86
+1fe17e03
+c1818000
+6fe0cabd
+205a4308
+6fe44bbc
+c280c411
+c2804411
+c282c411
+c2834411
+20403fb0
+20404364
+24740000
+2040436f
+2040430b
+2040405d
+6fe44bbc
+c30ac3f8
+6fe0cb9c
+c000c3f9
+20204413
+6fe0cb9d
+203a4403
+6fe44bde
+67e4095c
+6fe0cbdd
+c001c405
+c0014408
+704af708
+68494af8
+20204418
+6fe44be7
+202043fc
+704af703
+68494afa
+20204418
+704af702
+68494afc
+20204418
+da200001
+68494afe
+20401e5f
+6fe0cb00
+e7e08005
+20600000
+58000000
+67e3c8d4
+704af707
+6fe3c8d4
+67e3895c
+68494357
+20204418
+6fe0caf7
+1fe22200
+20401e5f
+6848caf7
+18427200
+d8c0095c
+20207dd4
+704ad800
+6fe1cadd
+67e1c3ec
+20404428
+58000005
+e7e08006
+d8c04ae3
+2040442f
+20207959
+da2043e8
+efe08011
+207a0000
+98c0a200
+efe08006
+c1008000
+20204429
+d8a043f3
+df200013
+20407dd4
+20201a6a
+5800000c
+67e14455
+6fe44bbc
+c38d8000
+5800000e
+67e14455
+20600000
+704abf00
+2040430a
+20404861
+202045b6
+704b9000
+704b9900
+20404433
+20404449
+6fe14480
+c283c450
+c2803238
+c280c454
+c2814457
+c281c457
+20204593
+58000000
+67e448dd
+e7e20005
+7049cd00
+70445400
+70432600
+20600000
+204043dd
+6fe14480
+c2803238
+20203e5a
+c282c457
+c281c457
+20204593
+6fe1478f
+c2864593
+20403238
+20404150
+2040451c
+6fe0cbb0
+c000be57
+6fe0cad5
+247a0000
+20203e5a
+20600000
+704b9804
+20600000
+70445401
+20403295
+20403291
+58000000
+67e1478b
+67e0c78d
+20404462
+2020328d
+704b9100
+6fe0c5f8
+2feffe00
+20608000
+704b9101
+20600000
+6fe0cad2
+c07fc338
+6fe1478f
+c3860000
+c3830000
+c3858000
+6fe44bbc
+c3828000
+c299c593
+c297c85e
+20203e5a
+6fe0cb90
+c1810000
+704b9000
+20404433
+20404462
+2020328d
+6fe0cb90
+c1010000
+1fe0fe01
+67e0cb90
+70445512
+20404462
+2020328d
+20405b4f
+2020325c
+58000001
+67e30040
+7000e733
+202045cd
+5fffffff
+67e30040
+7000e733
+704ad2ff
+204045e2
+70493eff
+2020462e
+44ebc01a
+20770000
+6fe0c454
+207a0000
+20405352
+247a0000
+6fe0cad2
+c07fc346
+6fe0cabd
+205a4308
+6fe44bbc
+c280c4ce
+c28044ce
+c282c4ce
+c28344ce
+20403fb0
+20404364
+24740000
+2040436f
+2040430b
+2040405d
+6fe0cb91
+c000c4bd
+6fe0cb99
+207a0000
+6fe44bbc
+c30ac4b4
+6fe0cb9c
+c000c4d1
+da200009
+20404e1e
+6fe144e1
+e7e10005
+580002a1
+e7e10005
+6fe3c8d4
+e7e38005
+20600000
+6fe0c8d4
+67e0cb92
+6fe0c8d5
+e7e08005
+6fe0c8d7
+e7e08005
+6fe148d9
+e7e10005
+da200007
+20404e1e
+6fe144e1
+e7e10005
+580002a1
+e7e10005
+6fe2cb92
+e7e28005
+20600000
+58000000
+67e3c8d4
+202044b4
+6fe0cb9d
+203a44f3
+6fe44bde
+67e4095c
+6fe0cbdd
+c001c4e1
+c00144ea
+da20000a
+20404e1e
+6fe144e1
+e7e10005
+580001a1
+e7e10005
+6fe4095c
+e7e40005
+20600000
+da200004
+20404e1e
+6fe144e1
+e7e10005
+580003a1
+e7e10005
+6fe1095c
+e7e10005
+20600000
+da200003
+20404e1e
+6fe144e1
+e7e10005
+580004a1
+e7e10005
+6fe0895c
+e7e08005
+20600000
+6fe44be7
+202044d4
+44ec401b
+20403edc
+204049a3
+204022e1
+2040255f
+2040480b
+2040490b
+2040493c
+204040bc
+2040450c
+2040451c
+2040453f
+20404544
+20404552
+2040455f
+20404555
+2040456a
+2040456d
+20404572
+20404575
+20404062
+20404587
+2020457c
+6fe44bbc
+c29bc50f
+20600000
+6fe0cbaf
+c1808000
+da604bac
+da404514
+202031fc
+6fe0c93d
+c1000000
+6fe44bbc
+c3830000
+d8e00006
+2040472e
+204031e6
+2020458e
+6fe0c93d
+c0004522
+6fe44bbc
+c41a8000
+6848cbdb
+20204525
+6fe44bbc
+c4190000
+6848cbdc
+6048cbae
+20404155
+1fe17e07
+6848cbae
+98467c00
+2022c531
+6fe0c792
+67e0cbb1
+6fe0cbb0
+c1000000
+704bb000
+20600000
+20404536
+6fe0cbb0
+c1008000
+704bb001
+2020799c
+da404866
+da604bb1
+6fe0c93d
+c00031fc
+da404514
+204031fc
+6fe0cbb1
+c000c720
+20600000
+da604ad3
+da404542
+20203203
+204045b6
+20203e5a
+da604b88
+da40454a
+20403203
+6fe0cb88
+c000b275
+20600000
+6fe0cad2
+c07fc338
+6fe0cac1
+243a474c
+6fe44bbc
+c299c593
+c297c85e
+20203e5a
+da604b87
+da4043ce
+202031fc
+6fe0cad7
+207a0000
+da604ad9
+da40455a
+202031fc
+6fe0cad8
+247a0000
+6fe0c39b
+c1800000
+2020203d
+da604b03
+da404562
+202031fc
+6fe14b01
+67e14b03
+2020440b
+6fe0cb86
+c3810000
+204043ac
+d8e00000
+202043b5
+da60478d
+da404464
+202031fc
+da604b98
+da404570
+202031fc
+704b9901
+20600000
+da604ad5
+da403e5a
+202031fc
+da604ac0
+da404578
+202031fc
+6fe0cb9b
+67e0c177
+704abf01
+20600000
+6fe0c92f
+c3838000
+da604ac3
+da404581
+20203203
+6fe0c93d
+c0004820
+2020435b
+6fe14bcf
+67e14ac3
+20600000
+da6049c4
+da40458a
+202031fc
+20404631
+6fe0cad6
+243a46fe
+20600000
+280ffe26
+2040c831
+2040435b
+204043dd
+20204593
+44ecc01b
+20404354
+6fe1478f
+c285c59f
+6fe44bbc
+c304459f
+6849499c
+18408401
+6049499c
+6049437b
+180a7e00
+67e0c37a
+6fe1cada
+67e1c37d
+20403297
+6fe14794
+67e14ad3
+7000bc06
+58000000
+67e14ac3
+67e0cb88
+67e0cad5
+67e0cbb8
+67e0cabd
+d8e00002
+2040472e
+20404722
+6fe0cbc4
+2feffe01
+2040c41f
+6fe0cbc4
+2feffe00
+2040f92f
+204049db
+20204919
+44ed401b
+d8e00006
+20404732
+704ad500
+6fe0cbc4
+2feffe01
+2040c5c1
+6fe0cbc4
+2feffe00
+2040c5c3
+2020495f
+704b8800
+2020795f
+58000000
+67e14ad3
+20207934
+44edc01b
+6fe44bbc
+c4010000
+20404913
+d8e00002
+20404732
+204045cf
+204045e2
+2020462e
+6fe080e7
+c01a45d3
+c019c5d6
+20600000
+67e0cb89
+6fe30297
+202045d8
+67e0cb89
+6fe30040
+67e34b8a
+6fe3cb89
+d8c0493e
+df200003
+e8438006
+98467c00
+2022c5f7
+18c08c16
+c20045dc
+20600000
+da20493e
+6fe0c93d
+1fe0ffff
+1feffe1d
+9a20a200
+6fe080e7
+e7e08011
+c01a45ec
+c019c5f3
+20600000
+6fe30297
+e7e30005
+d8c04316
+20407d7f
+6fe3437a
+e7e30005
+20600000
+6fe30040
+e7e30005
+d8c041cb
+20207d7f
+18c08dfa
+18c20a00
+684b4b8a
+18408403
+e0430005
+20600000
+da20493e
+6fe0c93d
+c1000000
+1fe0ffff
+1feffe1d
+9a20a200
+efe08011
+67e0c484
+c019c608
+c01a460d
+20600000
+efe30006
+67e341dd
+d8a041cb
+20407d7f
+202060d0
+efe30006
+67e341dd
+d8a04316
+20407d7f
+efe30006
+67e3437a
+20600000
+6fe14995
+d840aa55
+98467c00
+2022c622
+60494995
+20404627
+6fe0cac5
+67e0c93d
+6fe0c92b
+67e0c997
+6fe24891
+67e24895
+67e2483f
+20600000
+204045fd
+6fe24998
+67e24895
+67e2483f
+20600000
+6fe3437a
+67e34955
+1fe0ff00
+67e34972
+1fe0ff00
+67e3498f
+20600000
+6fe0c9c5
+67e0c9c4
+20600000
+44ee401b
+6fe44bbc
+c289c67f
+c2894643
+20600000
+20405daf
+2040464a
+2040463d
+20405dd2
+20404651
+20404614
+20203fa5
+580049bd
+d840493d
+98460400
+6fe1c9bd
+da20493d
+20600000
+20405daf
+2040464a
+2040465f
+2040463d
+20404662
+20404651
+20203fa5
+700964ab
+2040623f
+20405db4
+da2049c0
+68488964
+20404653
+2020623f
+700964b9
+2020464b
+e0408011
+1ff10400
+e0408005
+1fec8400
+e0408005
+e7e08005
+1a227e00
+67f1008a
+58000000
+67f1008e
+70800602
+20205d6e
+6fe1c9bd
+67e1c4a7
+20205d8a
+1fe22600
+1a227e00
+1fe0fffc
+1fe22400
+efe20012
+67e249c0
+1a627e00
+20405dc1
+6fe249c0
+e7e20012
+20600000
+6fe44bbc
+c4090000
+20404651
+20405b66
+6848c4b7
+20406109
+6848c4bc
+20203f94
+20405e42
+6fe44bbc
+2feffe09
+2440de5c
+2040467b
+20204614
+d8400080
+da20493d
+da400000
+20205e79
+d8400080
+da20493d
+da400000
+20205e6b
+d8400001
+da204997
+da40005a
+20205e6b
+d8400001
+da204997
+da40005a
+20205e79
+44eec01b
+204049dd
+204079a1
+20404067
+20404693
+204046de
+20404714
+20203fc8
+6fe44bbc
+c294c698
+c29bc698
+20600000
+704ba503
+6fe0c91f
+c17f8000
+da200000
+704ba706
+6848c91f
+204046a8
+67e0cba5
+6fe0c914
+c07fc6a5
+204041a8
+1a227e00
+c28346c9
+202046be
+6848c91f
+20403f96
+202046a2
+6fe44bbc
+c296c6b4
+6fe0cba5
+1fe22600
+6fe0c914
+c07fc1d5
+6fe0cbab
+243a46b1
+202046b6
+704baf00
+704ba500
+20600000
+6fe0cba5
+202041c7
+204060fd
+6848c914
+2020c6b4
+6848c914
+2040610d
+6848c91f
+6fe0cba5
+202041c7
+6fe0cbaf
+c1000000
+704baf00
+6fe44bbc
+c39a0000
+6fe0cbac
+1fe67c14
+244146f3
+6fe0c792
+67e0cbac
+20600000
+204046d5
+20740000
+6fe0cbaf
+c1008000
+704baf01
+6fe44bbc
+c29a4514
+6fe0cb88
+207a0000
+6fe0c906
+67e0cb88
+20600000
+78547c00
+6fe44bbc
+c3968000
+6fe0cb9f
+207a0000
+6fe0cba0
+207a0000
+78347c00
+20600000
+6fe44bbc
+c29546e2
+c295bedc
+20600000
+6848c922
+20403f96
+6848c922
+204060fd
+2020c6eb
+6fe0c93d
+c1008000
+70493d01
+20204356
+6fe44bbc
+c315c6ef
+6fe348f3
+67e348e7
+6fe0c93d
+c1000000
+70493d00
+20204831
+44ef401b
+6fe0cbc5
+c1008000
+20404700
+6048c93d
+7041ca00
+20404718
+20404356
+2040471a
+704ad601
+2020462e
+20404718
+20205e29
+6848c93d
+18408401
+6fe44bbc
+c288c707
+18467c02
+2441470e
+20600000
+6fe0cbc5
+1fe0ffff
+98467c00
+2441470c
+20600000
+d8400000
+20600000
+d8400001
+20600000
+d8400001
+da20493d
+da400000
+20205e6b
+6fe44bbc
+c41a0000
+20404698
+20600000
+d8e00000
+2020472e
+d8e00000
+20204732
+d8e00003
+2020472e
+d8e00003
+20204732
+d8e00005
+2020472e
+d8e00005
+20204732
+d8e00014
+2020472e
+d8e00018
+2020472e
+d8e00016
+2020472e
+d8e0000c
+2020472e
+d8e0001c
+2020472e
+6fe44bbc
+f9207e00
+67e44bbc
+20600000
+6fe44bbc
+f93ffe00
+67e44bbc
+20600000
+d8e00015
+2040472e
+58000000
+67e44bdd
+67e44be6
+6fe0c90e
+1fe17ec0
+c0204743
+c0404745
+c060474a
+58070008
+67e44bde
+20600000
+58040005
+20204741
+58022303
+67e44bdd
+58000003
+67e44be6
+20600000
+5800cd03
+20204746
+44efc01b
+6fe0cac1
+1fe0ffff
+67e0cac1
+6848c93d
+18467c01
+2442c700
+6048c93d
+7041ca00
+20404710
+204045e2
+20203e1c
+6fe44bbc
+c41c0000
+6fe248d5
+207a0000
+204047fb
+58000003
+204047f1
+205a47ed
+245a47ef
+58000002
+204047f6
+205a47ed
+6fe0c9ce
+c000c76b
+6fe44bbc
+c41c0000
+df200005
+d8a049ce
+20207d9b
+2040477f
+6fe149cf
+67e109f8
+6fe148d5
+67e109fa
+204047b7
+6fe109f8
+67e149cf
+6fe109fa
+67e148d5
+6fe149d1
+67e109f8
+6fe148d7
+67e109fa
+204047bf
+6fe109f8
+67e149d1
+6fe109fa
+67e148d7
+20600000
+6fe44bbc
+c41c8000
+6fe149cf
+67e109ff
+20404792
+67e149cf
+6fe148d5
+67e109ff
+204047a0
+67e148d5
+6fe149d1
+67e109ff
+20404792
+67e149d1
+6fe148d7
+67e109ff
+204047a0
+67e148d7
+20600000
+6fe08a00
+203a4795
+2020479a
+6fe089ff
+204047ad
+67e089ff
+6fe109ff
+20600000
+6fe089ff
+204047e9
+204047ad
+205a7ecf
+204047e5
+20204798
+6fe08a00
+203a47a3
+202047a7
+6fe089ff
+204047b2
+67e089ff
+20204798
+6fe089ff
+204047e9
+204047b2
+205a7ecf
+204047e5
+20204798
+1feffe04
+1fe6fc05
+20407e64
+1807fe00
+20600000
+1feffe0c
+1fe6fc0a
+20407e64
+1807fe00
+20600000
+6fe109f8
+684909fa
+9840fe00
+6848c9d3
+9840fe00
+1fe10401
+6048c9d3
+202047c7
+6fe109f8
+684909fa
+9840fe00
+6848c9d4
+9840fe00
+1fe10401
+6048c9d4
+202047c7
+67e189fc
+2feffe10
+2020c7d1
+6fe089fd
+c07fc7d8
+6fe089fc
+1fe37e00
+67e109f8
+67e109fa
+20600000
+6fe089fd
+c00047d5
+6fe189fc
+202047cd
+7009fe00
+6fe089fc
+202047cd
+6fe089fc
+204047e3
+67e089f8
+67e089fa
+203a47e1
+580000ff
+67e089f9
+67e089fb
+20600000
+58000000
+202047de
+204047e9
+1fe37e00
+204047ea
+1fe67e00
+67e089ff
+20600000
+1fe67e00
+67e08970
+6fe08970
+20600000
+7049ce00
+20600000
+7049ce01
+20600000
+9a267c00
+24217ecf
+9a467c00
+24217ecf
+20207ed1
+9a267c00
+24610000
+9a467c00
+24610000
+20207ed1
+6fe148d5
+20404802
+1fe22200
+6fe148d7
+20404802
+1fe22400
+20600000
+67e109fa
+6fe089fb
+c07fc808
+6fe089fa
+1fe17eff
+20600000
+6fe109fa
+1fe67e00
+20204806
+da6048c8
+da40480e
+202031fc
+6fe248bc
+67e2485f
+704abf01
+20600000
+6fe0cbf3
+c000481a
+c000c81c
+c0014817
+c001c81e
+580ea600
+67e248bc
+20600000
+5805e740
+20204818
+580927c0
+20204818
+58124f80
+20204818
+7048a900
+20402659
+5fffffff
+67e2485f
+58000000
+67e3c8d4
+704bf201
+2040427c
+20403e6a
+202026bc
+6fe0cbf2
+245a41ea
+704bf200
+20202658
+6fe0cbf2
+243a2633
+2020262f
+793f8026
+7048a500
+d8e00001
+20204732
+6fe44bbc
+c308c842
+20403e28
+20344845
+6fe44bbc
+c298484b
+c318c84b
+20404150
+1fe17e07
+6848cbdc
+98467c00
+2022c866
+2020484b
+6fe0cac1
+243a474c
+20600000
+6fe14889
+67e1488b
+70488f03
+20202562
+20403e28
+20344855
+70493d00
+6fe14bcb
+67e1488b
+70488f02
+20202562
+20404919
+6fe14885
+67e1488b
+70488f04
+20202562
+6fe0c93d
+c0004845
+20404354
+20204859
+20404831
+2040495b
+70493d01
+204045fd
+20203e1c
+20403e28
+20343e5a
+20204593
+20403e28
+20740000
+6fe44bbc
+c297c62e
+20600000
+d8e00001
+2040472e
+58000000
+67e1488b
+204045b6
+204049db
+20404919
+70483901
+6fe44bbc
+c30aa2e4
+70483902
+202022e4
+6fe0c8a9
+243a4820
+6fe0c88f
+c001487f
+c0024883
+c001c888
+2040495f
+20404831
+6fe0cac1
+243a474c
+6fe0c93d
+c0003e5a
+20600000
+6fe44bbc
+c297c850
+c2984850
+20204845
+6fe44bbc
+c317c878
+6fe0cbc5
+c000c878
+20204859
+6fe44bbc
+c317c878
+c289c878
+c2894878
+20204851
+2040430a
+704abf00
+7048a500
+70488f00
+6fe24895
+6fe24891
+98467c00
+20628000
+20204861
+d8e00001
+20404732
+20404913
+58000000
+67e14887
+67e1488b
+67e0c8a5
+67e0c9cd
+67e0c88f
+2040430a
+2040431b
+6fe2483f
+67e24895
+67e24998
+2020462e
+c6930000
+20403fb0
+24740000
+6fe44bbc
+c30ac8ac
+6fe0cb9c
+243a48c1
+2040430b
+6fe0c839
+c280c8bb
+6848c7ca
+6fe0c8d4
+9841fe00
+67e0c8d4
+6848c7cf
+6fe0c8d9
+9840fe00
+67e0c8d9
+6848c7d0
+6fe0c8da
+9840fe00
+67e0c8da
+70483901
+da200007
+da4048d4
+6fe148d9
+207a0000
+202026e8
+70483902
+da200009
+6fe0cb9d
+243a48c7
+da404be6
+20600000
+da404bdd
+20600000
+58000000
+67e1cbb5
+20600000
+6fe44bbc
+c40b0000
+6fe0cabf
+207a0000
+6fe0c8ab
+207a0000
+6fe0cbb2
+1fe0fe01
+1fe17e03
+67e0cbb2
+247a0000
+704bb300
+6fe0cbb3
+1fe0fe01
+67e0cbb3
+1fe67c08
+242148e3
+204025a3
+20402662
+242c48e9
+2437c8e9
+204048fb
+204048f2
+204025a0
+6fe0cbb4
+1fe0fe01
+67e0cbb4
+c00848eb
+20600000
+20402281
+202048d8
+704bb400
+6fe0cbb5
+c3800000
+79207e00
+67e0cbb5
+6fe14bcd
+20204820
+6fe0c8ab
+203a48c9
+704bb400
+6fe0cbb5
+c4000000
+793ffe00
+67e0cbb5
+20404584
+202041ea
+20402679
+6fe0c7a8
+2fe1f008
+24608000
+6fe0c7a9
+c07fc820
+20600000
+6fe0c93d
+c0801468
+6fe0c87a
+207a0000
+70804202
+6ff08138
+1fe17efc
+67f0804c
+2020154c
+6fe44bbc
+c4100000
+6fe0cbb8
+207a0000
+1fe0ffff
+67e0cbb8
+203a495f
+2020496d
+6fe44bbc
+c4100000
+204049db
+6fe0cbd1
+67e0cbb8
+20600000
+704bb800
+6fe14bd5
+67e14935
+67e14937
+6fe0c93d
+c0004922
+c000c924
+c0014926
+20600000
+6fe0c919
+20204927
+6fe0c926
+20204927
+6fe0c927
+67e08964
+2040495f
+6fe08964
+67e0c934
+da200000
+70493201
+20207871
+6fe0c928
+c17f8000
+6fe14ad3
+247a0000
+6fe14887
+247a0000
+6fe1488b
+247a0000
+6fe0cbb8
+247a0000
+6fe0cbd2
+203a493f
+67e0cbb9
+20600000
+da604bb9
+da40493f
+202031fc
+6fe0c928
+67e0c934
+6fe14bd3
+67e14935
+67e14937
+da200000
+6848c997
+18408401
+6fe44bbc
+c30e494c
+18408401
+18467c04
+2441494f
+6048c933
+70493201
+20600000
+d8400001
+20600000
+78547c00
+6fe0c928
+6848c934
+98467c00
+24628000
+6fe0c933
+207a0000
+7048fd00
+78347c00
+20600000
+2040496b
+20404964
+20404967
+20204969
+6fe0c93d
+c0004964
+c000c967
+c0014969
+20600000
+704bbb00
+6848c919
+20204978
+6848c926
+20204978
+6848c927
+20204978
+6848c928
+20204978
+6fe0c93d
+c0004972
+c000c974
+c0014976
+20600000
+6848c919
+2020497c
+6848c926
+2020497c
+6848c927
+2020497c
+44f0401c
+6048c934
+da200000
+2020786c
+44f0c01c
+6048c934
+da200000
+20207867
+6fe0c919
+98467c00
+2042c99f
+6fe44bbc
+c3126109
+20404990
+20404994
+20404998
+6fe0cbba
+203a6109
+704bba00
+20206121
+6fe0c919
+98467c00
+2042c9a1
+2020610d
+6fe44bbc
+c4130000
+6fe0c927
+2020499b
+6fe44bbc
+c4128000
+6fe0c928
+2020499b
+6fe44bbc
+c4138000
+6fe0c925
+98467c00
+24628000
+704bba01
+20600000
+704bbb00
+20600000
+704bbb01
+20600000
+6fe14ad3
+247a0000
+6fe14887
+247a0000
+6fe1488b
+247a0000
+6fe0cbb8
+247a0000
+20404951
+20740000
+6fe44bbc
+c4108000
+c4020000
+c291c9c9
+6fe0c8fc
+1fe0fe01
+67e0c8fc
+1fe67c14
+244149bb
+c00149bd
+c00249c3
+c00349bd
+c00449c3
+20600000
+7048fc01
+202049c3
+6fe44bbc
+c291496d
+6fe0c925
+c17f8000
+6848c925
+2020497c
+6fe44bbc
+c291495f
+6fe0c925
+c17f8000
+6848c925
+20204978
+6fe14bcf
+68494ac3
+98460400
+6fe14bd9
+98467c00
+242149db
+6fe0c8fd
+247a0000
+7048fd01
+202049d3
+6fe14bd7
+67e14935
+67e14937
+6fe44bbc
+c291491d
+6fe0c925
+c17f8000
+20204927
+7048fd00
+202049c3
+6fe44bbc
+c4108000
+c4020000
+c291c9ef
+6fe0c8fc
+1fe67c0a
+202149eb
+6fe0c93d
+c00049e8
+70409901
+20600000
+6fe44bbc
+c38c0000
+202026d7
+6fe0c93d
+c00026e8
+70409900
+20600000
+6fe0c8fd
+243a49eb
+202049e4
+20401293
+6fe08018
+202025e9
+204049f2
+202026f5
+204049f2
+6fe08030
+2feffe00
+24608000
+6fe08047
+2feffe03
+2040a72b
+2440a727
+202026f5
+6fe0cb86
+2fe00603
+2420fecf
+20403295
+20207ed1
+20405355
+247a0000
+70008801
+70008900
+20207ed1
+6fe1478f
+c284ca00
+20204a05
+20758000
+204061da
+58004ac1
+67e1489f
+58004a50
+67e148a3
+58004a4b
+67e1445d
+58004a8b
+67e14465
+58004a8d
+67e14467
+58004aa6
+67e1446f
+58004a40
+67e14995
+58004a30
+67e14999
+44f1401c
+20405e59
+20404a47
+204079a5
+6fe0c965
+67e0c8d4
+c0004a2f
+6fe0c966
+67e0c793
+20404a40
+20407826
+20407830
+70499101
+6fe1478f
+c3860000
+20203289
+70499102
+20404a40
+da200000
+20407871
+20404a3c
+20405e79
+204026ec
+203422e4
+6fe2483f
+67e24895
+6fe14889
+67e1488b
+20202562
+d8400004
+da20483f
+da400000
+20600000
+44f1c01c
+6fe0c963
+c0ffca45
+6848c940
+2020610d
+67e0c940
+20204a43
+2040260e
+6fe1498d
+67e1498f
+20600000
+20404a50
+6fe0c936
+79207e07
+d840003f
+2020612b
+20406136
+202061ff
+2040620b
+20404a63
+20404a56
+20204a71
+6fe0c99c
+c1808000
+6fe249a0
+203a4a5d
+7049a600
+78347c00
+20207976
+6fe0c9a6
+c17f8000
+1fe0fe01
+67e0c9a6
+78547c00
+20207974
+684944ca
+18417e01
+18430400
+67e0c9a0
+18417e01
+18430400
+67e0c9a1
+18417e01
+18430400
+67e0c9a2
+18417e01
+18430400
+67e0c9a3
+20600000
+44f2401c
+20404a81
+20404a86
+20404a77
+24740000
+20204abd
+6fe0c99c
+c1808000
+6fe0c9a6
+207a0000
+1fe67c01
+24610000
+6fe14889
+67e1488b
+78347c00
+20600000
+6fe0c9a0
+243a4ab1
+6fe0c9a1
+243a4ab3
+20204ab9
+6fe0c9a2
+243a4ab5
+6fe0c9a3
+243a4ab7
+20204abb
+20404a9b
+20204a52
+1a627e00
+c016b2b1
+c0083299
+c01cca95
+c01e4a97
+c01d4a94
+20600000
+202025a0
+20404a3c
+20405e6b
+7048a500
+70499d01
+70499e01
+20600000
+6fe0c99d
+c1000000
+6fe0c99c
+c1008000
+70499c01
+da200000
+2020786c
+da200000
+2040786c
+20404a40
+20203289
+2040320a
+204022e1
+2040255f
+20204aaa
+6fe0c967
+207a0000
+6fe0c4ca
+243a4a48
+da60498f
+da404aa2
+20203203
+70496e01
+20600000
+70496e02
+20600000
+70497001
+20600000
+70497002
+20600000
+70496e00
+20600000
+70497000
+20600000
+da204968
+202079aa
+da204975
+202079aa
+6fe0c99e
+c000cacb
+da20497e
+204079c1
+24344ad0
+d8c0497e
+efe08006
+1fe22200
+da40497f
+20600000
+70499e00
+78347c00
+da200001
+da40499f
+20600000
+6fe0c981
+c0024ad4
+c002cad4
+20600000
+6fe0c984
+243a4adb
+6fe0c986
+243a4adb
+6fe0c988
+243a4adb
+20600000
+78347c00
+20204ac6
+70479214
+70478601
+5800060f
+67e148d5
+580048d5
+67e1448c
+70409901
+70415b06
+70417802
+7048d400
+58004934
+67e1448f
+70448e01
+704935ff
+58000296
+67e14937
+5800073a
+67e14939
+58004991
+67e144cc
+58000c0c
+67e14993
+58004948
+67e144c8
+70496500
+704963ff
+704966ff
+70496100
+70496200
+70496400
+70496701
+58004e55
+67e14954
+67e14956
+58000007
+67e1495a
+7044a202
+38035a0c
+3804011a
+38080060
+380c0028
+67e4c968
+3802000a
+38040002
+e7e20005
+38035a08
+3804019a
+38080000
+380c0000
+67e4c975
+58000064
+67e1498d
+7041e800
+70483901
+7048ac06
+70485e01
+70489000
+204022d0
+2040261a
+204022b5
+204022db
+58000708
+67e14885
+58000050
+67e14889
+580a7700
+67e1c8b4
+58604800
+67e1c85f
+20203174
+20406e5e
+20758000
+58004ba8
+67e1445d
+58004ba6
+67e1445f
+58003289
+67e14469
+58004ba4
+67e14465
+58004b53
+67e14467
+58004b4d
+67e1445b
+58004c15
+67e1446b
+58004b8a
+67e1446f
+58004bf0
+67e147eb
+58004c2c
+67e147e6
+58004c2d
+67e147e8
+20404b48
+20401a55
+20404c18
+204061da
+204079a5
+2040785b
+44f2c01c
+20404c25
+6fe0c7e1
+c0004b4a
+6fe0c7e2
+67e0c793
+20204c34
+7045fa07
+20600000
+704793ff
+7047e301
+20204bc3
+6fe0c7e3
+c001324f
+2040535f
+6fe0c4e9
+243a324f
+20203251
+1a627e00
+c00a4b5c
+c00acb60
+c01fcb63
+c0204b69
+c0084b6f
+c0164b70
+c016cb7b
+20600000
+20404baa
+58000000
+67e147bb
+20203287
+204079a5
+7047b400
+20204bc3
+204079a5
+7047b401
+6fe447c5
+67e44372
+20403295
+20201f04
+6fe143db
+c1000000
+6fe447cd
+207a0000
+67e44372
+20201f04
+20204c45
+6fe0c7e1
+c1000000
+6fe0c7e3
+c1808000
+20404b76
+20203285
+7049e301
+df20000b
+d8a049e4
+d8c049cd
+20207dd4
+6fe0c7e1
+c1000000
+6fe0c7e3
+c000cb80
+20204c41
+6fe0c9e3
+c1808000
+7049e300
+6fe1478f
+c2803287
+c284b287
+df20000b
+d8c049e4
+d8a049cd
+20207dd4
+20404b8d
+20404b94
+20204b9f
+da6047df
+da404b90
+20203203
+7047e302
+20403287
+20404bd4
+20204c31
+da6049f0
+da404b97
+202031fc
+6fe1478f
+c284cc31
+c2804c31
+6fe0c9cd
+c000cc31
+c0024c31
+c002cc31
+20203289
+6fe0c7e3
+c1808000
+da6047bb
+da404bb1
+20203203
+20404c01
+2020620b
+20406136
+202061ff
+20406136
+20206e62
+6fe0c7a7
+c2804bad
+20600000
+6fe147db
+67e147dd
+67e147df
+20203277
+6fe0c7e3
+c1808000
+6fe0c7a7
+c2804bb6
+20600000
+6fe1478f
+c3848000
+6fe147d9
+67e147dd
+67e147df
+6fe147b7
+20404c56
+20403283
+6fe247c1
+67e249d0
+6fe1478f
+c3858000
+20203279
+6fe0c7e3
+c1808000
+6fe0c7a7
+c2804bc8
+20600000
+6fe147bb
+684947b9
+604947bb
+247a0000
+6fe147b5
+20404c56
+20403283
+6fe247bd
+67e249d0
+6fe1478f
+c3858000
+20203279
+6fe1478f
+c284b281
+20204baa
+20407ec7
+6fe1478f
+c284cbdb
+20600000
+6fe0c7b4
+207a0000
+20207ec5
+20407ec7
+6fe1478f
+c3800000
+c3848000
+20207ec5
+6fe0c7a7
+c2804be6
+20600000
+20204bc3
+78567c00
+6fe147dd
+67e147df
+20404bde
+20344be3
+20404bd7
+24740000
+78367c00
+20600000
+20404be7
+24760000
+1a227e00
+203a4bf7
+20403285
+da6047f5
+20204bf9
+20403287
+da60481d
+dfe00005
+98effe00
+9a60a600
+efe08013
+207a0000
+20404c0d
+1a60a601
+20204bfc
+6fe1478f
+c284cc04
+20600000
+20401b24
+247a0000
+20404c10
+24740000
+1fe0ffff
+1feffe05
+d8404845
+98408c00
+20204c5a
+67e0895c
+da20095c
+202079aa
+da20095c
+204079c1
+24740000
+6fe0895c
+20600000
+6fe14437
+c00c4b63
+20600000
+58000002
+67e0c9ef
+58200008
+67e247c5
+592c0005
+e7e20005
+70438017
+5800001b
+67e143d1
+20401ac2
+20401ade
+20401aeb
+20201aca
+df200028
+d8a04845
+d8c09e57
+20207dc7
+df20017e
+d8c09af2
+20207dc7
+20204bc3
+da200000
+da6049d8
+20407877
+20404bd4
+6fe0c9ef
+67e0c9f0
+20600000
+58000000
+20404c3c
+70478601
+20407826
+20407830
+6fe1478f
+c3860000
+20203289
+684944cc
+e7e08002
+efe08005
+67e0c792
+20600000
+6fe144cc
+efe0803f
+c1800000
+20203289
+684944cc
+efe08002
+c000cc50
+58000001
+684944cc
+e7e08002
+18408c02
+efe08006
+e7e08012
+efe10006
+20207e7a
+58000002
+20404c3c
+18408c05
+efe10006
+203a3289
+20207e7a
+67e14159
+1fe0fffc
+67e14428
+20600000
+efe08006
+1fe22200
+e8410006
+20407d5e
+20401e5f
+1a227200
+20407d58
+20207dd4
+6fe149f1
+67e147ed
+6fe0c9f3
+67e0c9cf
+67e0c9da
+6fe0c9f4
+67e0c7e1
+6fe0c9f5
+67e0c7e2
+7047a701
+58000030
+67e147b2
+58000000
+67e147a8
+58000001
+67e147f5
+67e147fa
+58000006
+67e1481d
+67e14822
+58000007
+67e147ff
+58000008
+67e14827
+580047e3
+67e144cc
+58201400
+67e1c7e3
+70409901
+58000100
+67e14159
+70415b08
+70417705
+70417802
+58000030
+67e14455
+58000001
+e7e10005
+7046440a
+58000096
+67e147bd
+e7e10005
+58000296
+67e147c1
+e7e10005
+38000010
+38048008
+380ac000
+380c0004
+67e447cd
+70448e01
+580049cd
+67e1448f
+58000000
+67e149cd
+380001a0
+38040068
+38080000
+380c0000
+67e449d0
+58000301
+67e149d8
+380001a0
+380400e8
+38080000
+380c0000
+67e449db
+5800000e
+67e147b5
+58000140
+67e147b7
+67e14428
+58000050
+67e147b9
+70443207
+70442700
+380000fb
+3806c212
+3808800f
+380c0021
+67e4444c
+38000bb8
+380402ee
+67e247d9
+580048fe
+67e1448c
+58002001
+67e148fe
+7043e71f
+38010102
+380480c1
+38098120
+380c640c
+67e4c3e8
+380003c1
+e7e10005
+7044071f
+3802090d
+38074c15
+380a8532
+380dd1d5
+67e4c408
+38026574
+3804001c
+e7e18005
+580047ea
+67e144c8
+7047ea02
+70447f17
+58004923
+67e14489
+70448b05
+58002540
+67e140b2
+58040003
+67e1c768
+70476f03
+70476701
+70479101
+70415f00
+3803ffff
+3806fe23
+380999d9
+380c020d
+67e440a0
+58009af2
+67e14396
+7040d801
+38010306
+38040004
+38082010
+380c9040
+67e4c665
+38020011
+38040044
+e7e28005
+70467b00
+58009c70
+67e14663
+7040c518
+20403174
+df20001e
+d8a042f8
+20407d9b
+7042f70b
+58204241
+67e1c2f8
+58756853
+e7e18005
+58657474
+e7e18005
+58003372
+e7e10005
+6fe0c9f6
+207a0000
+67e0c2f7
+1fe27200
+d8c049f7
+d8a042f8
+20207dd4
+6fe0c4d7
+d840003e
+2020612b
+6fe0c4d7
+d840003f
+2020612b
+20404d05
+20404d02
+20204d05
+20404d09
+20204d02
+20204d09
+20404d09
+20204d0b
+20204d02
+6fe0c4d8
+20204d03
+6fe0c4d8
+20204d06
+20404d11
+20404d13
+20204d11
+20800000
+20404d22
+20404d2c
+20404d40
+20404d5f
+20404d63
+7009fc01
+7009f904
+20404d6e
+20204d20
+6fe08a2c
+c283cd2a
+708a01ff
+20000064
+708a020e
+708a0003
+70804205
+20600000
+70804204
+20600000
+20404d30
+20404d34
+20404d38
+20204d3c
+6fe0c7a7
+247a0000
+7047a70d
+20600000
+6fe0c7a8
+247a0000
+7047a80e
+20600000
+6fe0c7a9
+247a0000
+7047a909
+20600000
+6fe0c7aa
+247a0000
+7047aa0a
+20600000
+58001800
+67e1095c
+58001bff
+e7e10005
+58001c00
+e7e10005
+58001fff
+e7e10005
+6fe4095c
+20405f56
+6fe08a2c
+2feffe07
+2040df7d
+2440df81
+d841c200
+20405f6e
+6fe0c7a7
+d8400008
+2040612c
+6fe0c7a8
+d8400049
+2040612c
+6fe0c7a9
+d840000a
+2040612c
+6fe0c7aa
+d840000b
+2040612c
+d8400081
+60588060
+20207e77
+6fe0c7ab
+247a0000
+7047ab0c
+20600000
+6fe0c7ab
+d8400010
+2040612c
+da200040
+20406239
+da200000
+da400000
+58000000
+20406272
+d8e00000
+20206285
+6ff10112
+1fe0a3fc
+24610000
+20405f9d
+efe08003
+c000cd76
+20407d85
+20205fad
+efe10003
+67e109fd
+d84003ff
+98410400
+604909f6
+1feb7e00
+1fecfe00
+67e089f8
+efe08003
+1fe0ffff
+9a267c00
+20610000
+20404d84
+20204ddf
+6fe089f8
+c01fcd87
+20204dcb
+44f3401c
+6fe089f6
+c0004dca
+c000cd92
+c0014d97
+c001cda5
+c0024daf
+c002cdca
+c0084dc0
+c00a4dc6
+20204dca
+7009ff00
+6ff10000
+67e10a00
+df200003
+20204dd2
+efe10003
+67f10052
+20600000
+efe08003
+1fe20400
+67f08024
+efe08003
+98408400
+79207e07
+67f08023
+efe08003
+98408400
+1fe27200
+20600000
+20404d9a
+efe08003
+67f08025
+98408400
+c2004da6
+184104ff
+efe08003
+98467c00
+2422cdbe
+20204dca
+df200020
+d8a04000
+d8400000
+efe08003
+e7e08005
+98408400
+c2004db2
+184104ff
+efe08003
+98467c00
+2422cdbe
+70802300
+20404dca
+20407e7c
+20200801
+70802300
+20204dcb
+efe08003
+1fe27200
+efe10003
+1fe20a00
+20405ff3
+20204dca
+6ff08060
+79207e04
+67f08060
+20204dca
+20204dcf
+7009ff01
+20204dd0
+7009ff0c
+20204dd0
+7009ff00
+df200001
+20204dd2
+7009fa0e
+1f20fe03
+67e089fb
+20404ddb
+6fe189fc
+e7e18003
+d8c009ff
+20405fd9
+20205fb9
+20405fb5
+6fe189f9
+e7e18003
+20600000
+20405f9d
+18608603
+efe08003
+98608600
+20205fa9
+7041db00
+20600000
+6fe341dd
+684b0040
+98467c00
+20600000
+44f3c01c
+6fe10315
+1fe20c00
+efe08006
+67e0c5f8
+1fe1040f
+1ff1fe00
+c004ce0b
+c003ce0b
+c0054e1a
+c002ce03
+c000cdf7
+20600000
+18427e00
+c002cdfb
+c001ce02
+20600000
+70095b27
+204078dc
+6fe0c09a
+c1840000
+18427e00
+c002c48c
+20600000
+20600000
+20404e1a
+da200001
+20404e1e
+6fe144df
+e7e10005
+58000000
+e7e08005
+20600000
+da200001
+20404e1e
+6fe144df
+e7e10005
+58000000
+e7e08005
+70095001
+6fe0c4e5
+79207e06
+67e0c4e5
+70095b12
+204078dc
+6fe0c09a
+c1840000
+2020446c
+efe08006
+c000ce1d
+20600000
+20600000
+204052fb
+1a220400
+60488950
+1fe20a00
+1a227e00
+e7e10005
+20600000
+2035ce2a
+580045f9
+d8a044d9
+98a67200
+20407d9b
+44f4401d
+58000424
+d8a003e4
+98a67200
+20407d9b
+5800037a
+d8a0030e
+98a67200
+20407d9b
+202053c9
+44f4c01d
+18c20400
+18420c00
+efe10006
+67e10317
+efe10006
+67e10319
+18c27e00
+67e10315
+6fe0c78e
+c0004e40
+202051ab
+6fe10317
+203a4eb8
+44f5401d
+6fe08319
+c000ce56
+c0284e98
+c028ceb1
+c0294eaf
+c029ceaf
+20204eb8
+44f5c01d
+2040535f
+6fe0c4e9
+c0007ed1
+c000fed1
+c0017ed1
+c001fed1
+c040fed1
+c0607ed1
+c0407ed1
+c0207ed1
+20600000
+20404e4a
+247a0000
+20405369
+20404ebd
+68490320
+203a4eb7
+20405372
+6fe10320
+e7e10005
+18007e01
+e7e10005
+20204eb8
+6fe0c5f7
+207a0000
+1fe22200
+44f6401d
+6fe20386
+d8400100
+98408400
+1c427e00
+98467c00
+24610000
+7045f700
+1a227e00
+c0284e70
+2020137c
+d9000000
+20405369
+20404f36
+20405374
+20407d61
+20404f69
+20405372
+5800000c
+e7e10005
+18007e01
+e7e10005
+20204eb8
+44f6c01d
+6fe10326
+1fe0fe04
+20407f27
+1fe08401
+d8c044f3
+efe18006
+207a0000
+67e1898e
+6fe0898e
+1fe22200
+20404e8b
+1a427e00
+67e0c4f3
+20600000
+d8e00000
+da400000
+18e67c07
+24610000
+aa2fffff
+2020ce92
+20204e96
+18427e00
+203a4e96
+f9202400
+184085ff
+18e08e01
+20204e8d
+20405355
+247a0000
+20404e4a
+247a0000
+20405376
+20406e5e
+2040672f
+20406e62
+20404e7c
+20204ea8
+20405355
+247a0000
+20405376
+20406e5e
+2040672f
+20406e62
+2040537f
+6fe10326
+203a4eb7
+e7e10005
+6fe144db
+e7e10005
+20204eb8
+20404dea
+20204eb8
+44f7401d
+70033500
+204063a9
+6fe08335
+c1008000
+20204eb8
+20405345
+58000000
+67e10317
+67e10319
+70031b01
+20600000
+44f7c01d
+20405374
+18002400
+6fe10317
+1fe22600
+6fe10315
+98000c00
+20404ecc
+1a627e00
+1a60a7fc
+1fe0fffc
+243a4ec4
+1a427e00
+67e10320
+20600000
+44f8401e
+efe08006
+c000cf05
+c0014f0d
+c001cf91
+c0024fc1
+c002d05e
+c0035087
+c003d0d7
+c004510c
+c004d11c
+c0054edb
+c005d11d
+2040511e
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+5800000b
+e7e08005
+18e27e00
+e7e08005
+efe10006
+c0014ee9
+c001ceef
+20600000
+58020008
+e7e30005
+58000280
+e7e20005
+18007e0c
+20204ef4
+5803000c
+e7e30005
+58000006
+e7e40005
+18007e10
+9a40a400
+20204eda
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+67e10964
+1a627e00
+9a262600
+20405374
+5800000b
+e7e08005
+18e27e00
+e7e08005
+6fe10964
+20204ee6
+efe08006
+1fe20e00
+efe10006
+1fe22200
+98c08c00
+1a627e00
+9a262600
+20204eda
+20407d61
+20407d66
+d9000000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+1fe20400
+efe10006
+1fe21600
+44f8c01e
+18427e00
+c000cf20
+c001cf42
+c008cf4e
+c009cf59
+2040511e
+20204f90
+20407d61
+d8400050
+6fe144db
+243a4f8a
+19627e00
+67e144db
+1c427e00
+67e20386
+20404f2a
+20204f65
+60490384
+19627e00
+67e1037a
+1a227e00
+67e1037c
+1a427e00
+67e1037e
+1a627e00
+67e10380
+18e27e00
+67e10382
+20600000
+68490384
+6fe1037a
+1fe21600
+6fe1037c
+1fe22200
+6fe1037e
+1fe22400
+6fe10380
+1fe22600
+6fe10382
+1fe20e00
+20600000
+20407d61
+58000051
+d8400051
+6fe144dd
+243a4f8a
+19627e00
+67e144dd
+6fe0c4e4
+79207e00
+79207e01
+67e0c4e4
+20204f6d
+20407d61
+d8400052
+6fe144df
+243a4f8a
+19627e00
+67e144df
+6fe0c4e5
+79207e00
+79207e01
+67e0c4e5
+20204f6d
+20407d61
+1b427e00
+d8400053
+6fe144e1
+243a4f8a
+19627e00
+67e144e1
+6fe0c4e6
+79207e00
+79207e01
+67e0c4e6
+20204f6d
+58000001
+67e1032e
+7045f750
+20204f6f
+6fe0c4e3
+79207e00
+79207e01
+67e0c4e3
+58000000
+67e1032e
+44f9401e
+20407d66
+58000003
+e7e08005
+18e27e00
+e7e08005
+58000008
+e7e10005
+18427e00
+e7e10005
+19627e00
+e7e10005
+6fe1032e
+c000cf85
+290c0000
+2020cf80
+58000004
+e7e10005
+18007e00
+e7e10005
+5800000c
+20204f8c
+e7e10005
+18007e02
+e7e10005
+5800000c
+20204f8c
+79201000
+20204f6d
+9a40a400
+1a627e00
+9a262600
+20204f90
+20204eda
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe21600
+efe10006
+1fe20400
+44f9c01e
+58000050
+98467c00
+2022cfa9
+58000051
+98467c00
+2022cfaf
+58000052
+98467c00
+2022cfbb
+58000053
+98467c00
+2022cfb5
+20600000
+19627e00
+67e144db
+6fe0c4e3
+79207e01
+67e0c4e3
+20204eda
+19627e00
+67e144dd
+6fe0c4e4
+79207e01
+67e0c4e4
+20600000
+19627e00
+67e144df
+6fe0c4e6
+79207e01
+67e0c4e6
+20600000
+19627e00
+67e144e1
+6fe0c4e5
+79207e01
+67e0c4e5
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe20400
+18422200
+44fa401e
+58000050
+98467c00
+2022cfd8
+58000051
+98467c00
+2022cff6
+58000052
+98467c00
+2022cfe2
+58000053
+98467c00
+2022cfec
+2020511e
+18a21600
+6fe0c4e3
+79207e04
+79207e03
+67e0c4e3
+19620a00
+d9600050
+6fe144db
+1fe20400
+20204fff
+18a21600
+6fe0c4e5
+79207e04
+79207e03
+67e0c4e5
+19620a00
+d9600052
+6fe144df
+1fe20400
+20204fff
+18a21600
+6fe0c4e6
+79207e04
+79207e03
+67e0c4e6
+19620a00
+d9600053
+6fe144e1
+1fe20400
+20204fff
+18a21600
+6fe0c4e4
+79207e04
+79207e03
+67e0c4e4
+19620a00
+d9600051
+6fe144dd
+1fe20400
+44fac01e
+58000005
+e7e08005
+18e27e00
+e7e08005
+58000006
+e7e10005
+18427e00
+e7e10005
+18007e00
+e7e10005
+18007e00
+e7e10005
+18007e0a
+9a40a400
+60490333
+18e27e00
+67e08332
+18007e50
+a961fe00
+2020d015
+1fe0fe01
+20600000
+78547c00
+c3810000
+c4000000
+c4008000
+79207e02
+18c20a00
+18a08bff
+e7e08005
+78347c00
+20600000
+6fe0c4e3
+20405016
+24345027
+70033150
+6fe144db
+67e10333
+2020503b
+6fe0c4e4
+20405016
+2434502e
+70033151
+6fe144dd
+67e10333
+2020503b
+6fe0c4e5
+20405016
+24345035
+70033152
+6fe144df
+67e10333
+2020503b
+6fe0c4e6
+20405016
+24740000
+70033153
+6fe144e1
+67e10333
+44fb401e
+204052f5
+20405369
+18002400
+20405374
+18007e04
+e7e08005
+6fe0c4e8
+e7e08005
+58000008
+e7e10005
+6fe10333
+e7e10005
+58000000
+e7e10005
+18007e01
+e7e08005
+18007e02
+e7e08005
+6fe08331
+c028d053
+58000030
+e7e10005
+20205055
+580003e3
+e7e10005
+d840000c
+60490320
+20405372
+6fe10320
+e7e10005
+18007e01
+e7e10005
+70033100
+20204eda
+18c08c01
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe22200
+44fbc01e
+58000050
+9a267c00
+2022d076
+58000051
+9a267c00
+2022d07a
+58000052
+9a267c00
+2022d07e
+58000053
+9a267c00
+2022d082
+18c08c02
+efe10006
+98007c00
+20204eda
+6fe0c4e3
+79207e05
+67e0c4e3
+20204eda
+6fe0c4e4
+79207e05
+67e0c4e4
+20204eda
+6fe0c4e5
+79207e05
+67e0c4e5
+20204eda
+6fe0c4e6
+79207e05
+67e0c4e6
+70095b06
+202078dc
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe22200
+efe10006
+1fe21600
+1a220400
+20407d61
+44fc401f
+58000050
+98467c00
+2022d0ae
+58000051
+98467c00
+2022d0be
+58000052
+98467c00
+2022d0a2
+58000053
+98467c00
+2022d0a8
+2040511e
+202050d3
+19620400
+6fe144df
+98467c00
+2022d0b4
+2040511e
+202050d3
+19620400
+6fe144e1
+98467c00
+2022d0b6
+2040511e
+202050d3
+19620400
+6fe144db
+98467c00
+2022d0ba
+2040511e
+202050d3
+20405135
+202050c6
+2040513b
+6fe144df
+203a50c6
+202050c6
+20405130
+6fe08339
+243a50c6
+202050c6
+19620400
+6fe144dd
+98467c00
+2022d0c4
+2040511e
+202050d3
+2040512b
+202050c6
+20407d66
+58000007
+e7e08005
+18e27e00
+e7e08005
+58000004
+e7e10005
+1a227e00
+e7e10005
+19627e00
+e7e10005
+18007e08
+202050d5
+20407d66
+202050d5
+9a40a400
+20204eda
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe21600
+efe10006
+1fe20400
+20407d61
+44fcc01f
+58000050
+98467c00
+2022d0f1
+58000051
+98467c00
+2022d0f7
+58000052
+98467c00
+2022d0fd
+58000053
+98467c00
+2022d103
+2040511e
+2020510b
+18422200
+19620400
+6fe144db
+98467c00
+2042d130
+20205109
+18422200
+19620400
+6fe144dd
+98467c00
+2042d12b
+20205109
+18422200
+19620400
+6fe144df
+98467c00
+2042d135
+20205109
+18422200
+19620400
+6fe144e1
+98467c00
+2042d13b
+20205109
+20407d66
+20204eda
+20204eda
+efe08006
+1fe20e00
+efe10006
+1fe22200
+98c08c00
+58000009
+e7e08005
+18e27e00
+e7e08005
+18007e00
+e7e10005
+18007e04
+9a40a400
+1a627e00
+9a262600
+20204eda
+20204eda
+20204eda
+18002400
+20405374
+58000001
+e7e08005
+18e27e00
+e7e08005
+58000002
+e7e10005
+58000000
+e7e10005
+1a40a406
+da600004
+20204eda
+58000000
+67e1032c
+67e144dd
+7044e400
+20600000
+58000000
+67e10326
+67e144db
+7044e300
+20600000
+58000000
+67e144df
+7044e500
+6fe0c4e6
+c0005141
+20600000
+58000000
+67e144e1
+7044e600
+6fe0c4e5
+c0005141
+20600000
+70095b07
+202078dc
+6fe08330
+793ffe00
+67e08330
+6fe144e1
+207a0000
+20405369
+6fe144e1
+1fe22200
+18002453
+20205156
+6fe08330
+793ffe07
+67e08330
+6fe144df
+207a0000
+20405369
+6fe144df
+1fe22200
+18002452
+204052f5
+20405374
+18007e06
+e7e08005
+6fe0c4e8
+e7e08005
+58000004
+e7e10005
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+18000408
+2020519a
+44fd401f
+204052f5
+20405374
+58000002
+e7e08005
+6fe0c4e8
+e7e08005
+58000004
+e7e10005
+18427e00
+e7e10005
+19627e00
+e7e10005
+d8400008
+2020519a
+44fdc01f
+204052f5
+20405374
+58000004
+e7e08005
+6fe0c4e8
+e7e08005
+58000008
+e7e10005
+18427e00
+e7e10005
+58000000
+e7e10005
+58000001
+e7e08005
+58000002
+e7e08005
+580003e3
+e7e10005
+d840000c
+2020519a
+44fe401f
+204052f5
+20405374
+58000006
+e7e08005
+6fe0c4e8
+1fe0fe01
+18a22200
+67e0c4e8
+1a220a00
+e7e08005
+58000004
+e7e10005
+18427e00
+e7e10005
+19627e00
+e7e10005
+d8400008
+60490320
+18427e00
+203a5345
+20405372
+6fe10320
+e7e10005
+18007e01
+e7e10005
+20600000
+6fe10326
+203a137c
+2040537f
+6fe10326
+e7e10005
+6fe144db
+e7e10005
+20600000
+6fe10317
+203a4eb8
+44fec01f
+6fe08319
+c000d1b5
+c0284ea2
+c028ceb1
+c0294eaf
+c029ceaf
+20204eb8
+20405369
+18002400
+20405374
+1fe20a00
+6fe10317
+1fe22600
+6fe10315
+98000c00
+204051c3
+1a60a7fc
+2422d1bd
+1a420400
+2040519a
+20204eb8
+efe08006
+c00151ce
+c000d1d1
+c001d1db
+c002d217
+c0025249
+c003d2ce
+c003529c
+c004510c
+c0054ef6
+202052e9
+20407d61
+20407d66
+20204f0d
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe08006
+1a20a3ff
+2422d1d7
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+1fe21600
+efe10006
+1fe20400
+efe10006
+1fe67c00
+2022d1ed
+c00151e9
+c00251e9
+202051eb
+70095b16
+204078dc
+efe10006
+20205214
+20407d61
+44ff401f
+58000050
+98467c00
+2022d1fc
+58000051
+98467c00
+2022d202
+58000053
+98467c00
+2022d20e
+58000052
+98467c00
+2022d208
+20205214
+19627e00
+67e144db
+6fe0c4e3
+79207e01
+67e0c4e3
+20205213
+19627e00
+67e144dd
+6fe0c4e4
+79207e01
+67e0c4e4
+20205213
+19627e00
+67e144df
+6fe0c4e5
+79207e01
+67e0c4e5
+20205213
+19627e00
+67e144e1
+6fe0c4e6
+79207e01
+67e0c4e6
+20407d66
+1a627e00
+9a262600
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe21600
+efe10006
+efe10006
+243a5243
+20407d61
+19620400
+44ffc01f
+58000050
+98467c00
+2022d231
+58000051
+98467c00
+2022d235
+58000052
+98467c00
+2022d239
+58000053
+98467c00
+2022d23d
+6fe0c4e3
+79207e05
+67e0c4e3
+20600000
+6fe0c4e4
+79207e05
+67e0c4e4
+20600000
+6fe0c4e5
+79207e05
+67e0c4e5
+20600000
+6fe0c4e6
+79207e05
+67e0c4e6
+70095b06
+202078dc
+20407d66
+1a20a3fa
+2022d248
+18c08c01
+1a20a3ff
+20205244
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+18c08c02
+1fe20400
+58000005
+e7e08005
+18e27e00
+e7e08005
+1a20a202
+1a227e00
+e7e10005
+20407d61
+47004020
+58000050
+98467c00
+2022d268
+58000051
+98467c00
+2022d279
+58000052
+98467c00
+2022d27f
+58000053
+98467c00
+2022d285
+2020528a
+6fe0c4e3
+79207e04
+79207e03
+67e0c4e3
+c2815276
+68488330
+79200406
+60488330
+18e27e00
+1fe0fe01
+67e08332
+6fe0c4e3
+79207e02
+67e0c4e3
+6fe144db
+67e10333
+2020528a
+6fe0c4e4
+79207e04
+79207e03
+67e0c4e4
+6fe144dd
+2020528a
+6fe0c4e5
+79207e04
+79207e03
+67e0c4e5
+6fe144df
+2020528a
+6fe0c4e6
+79207e04
+79207e03
+67e0c4e6
+6fe144e1
+1fe21600
+20407d66
+19627e00
+e7e10005
+18007e00
+e7e10005
+18007e00
+e7e10005
+18007e0a
+9a40a400
+1a20a3fa
+2022d29b
+efe08006
+e7e08005
+1a40a401
+1a20a3ff
+20205295
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe22200
+efe10006
+1fe21600
+20407d61
+4700c020
+58000050
+1a220400
+98467c00
+2022d2b5
+58000052
+1a220400
+98467c00
+2022d2ba
+58000053
+1a220400
+98467c00
+2022d2bc
+202052be
+58000000
+67e10326
+67e144db
+67e0c4e3
+202052c0
+20405135
+202052c0
+2040513b
+202052c0
+58000000
+67e1032c
+20407d66
+58000007
+e7e08005
+18e27e00
+e7e08005
+58000004
+e7e10005
+1a227e00
+e7e10005
+19627e00
+e7e10005
+18007e08
+9a40a400
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+1fe21600
+efe10006
+1fe20400
+20407d61
+47014020
+6fe0c4e8
+a8e1fe00
+2420d2e5
+58000050
+98467c00
+2022d2e2
+58000051
+98467c00
+2022d2e5
+202052e5
+7044db00
+7044e300
+202052e5
+20407d66
+1a627e00
+9a262600
+20600000
+58000001
+e7e08005
+efe08006
+e7e08005
+58000002
+e7e10005
+58000000
+e7e10005
+58000006
+9a40a400
+18002604
+20600000
+6fe0c4e8
+1fe0fe01
+c08052f9
+1fe0fe01
+67e0c4e8
+20600000
+db001800
+dd600080
+20407ec5
+20205303
+6b0143de
+6d6143e0
+20407ec7
+20205303
+4701c020
+2040534f
+243a137c
+2040535f
+df200008
+6848c4e9
+1f260e08
+a84fffff
+2020d310
+20405317
+24215310
+2040532d
+20205314
+1d627e00
+9b00b000
+c2005308
+2020137c
+1b027e00
+1b020a00
+20600000
+47024020
+1f260e08
+d8400000
+d9600000
+18e27e00
+c0045328
+6fe0c4e9
+afefffff
+2020d328
+f9201600
+1d627e00
+98408400
+18e08e01
+1a227e00
+98467c00
+2022d328
+2021531b
+18427e00
+9a267c00
+24628000
+f9201600
+20600000
+4702c020
+2040534f
+243a137c
+20405355
+203a5336
+6fe4c4ed
+67e4c4ea
+58000000
+e7e18005
+6160c4f3
+630144f4
+20600000
+47034020
+20405358
+18c08c01
+efe10006
+20600000
+4703c020
+20405358
+18c20a00
+18c20400
+58000000
+e7e18005
+20600000
+47044021
+20405355
+203a137c
+6fe1c4f0
+67e1c4f3
+6fe1c4ed
+67e1c4f0
+6fe1c4ea
+67e1c4ed
+20600000
+4704c021
+6fe1c4ea
+20600000
+47054021
+6fe1c4ed
+20600000
+4705c021
+6fe1c4f3
+20600000
+20405355
+203a535d
+d8c044ea
+efe18006
+203a535b
+18c08dfd
+20600000
+47064021
+df200004
+d8c044ea
+d8400000
+efe18006
+1fe17eff
+98418400
+c2005363
+6048c4e9
+20600000
+4706c021
+da20007f
+204052fb
+67e1031c
+1fe0fe04
+67e1031e
+58000000
+67e10320
+20600000
+6fe1031c
+20205393
+6fe1031e
+20205393
+47074021
+da2000fa
+204052fb
+67e10322
+1fe0fe04
+67e10324
+58000000
+67e10326
+20600000
+6fe10322
+20205393
+6fe10324
+20205393
+4707c021
+20407d3b
+70033501
+2040534f
+247a0000
+da20007f
+204052fb
+67e10328
+1fe0fe04
+67e1032a
+58000000
+67e1032c
+70033500
+20207d47
+6fe10328
+20205393
+203a137c
+1fe20a00
+20600000
+47084022
+da400000
+da2044ea
+1a20a3fe
+1a20a202
+580044f6
+9a267c00
+2022d3a6
+efe08011
+1a20a201
+203a539a
+e8410011
+efe10002
+9a40a400
+1a40a404
+2020539a
+1a427e00
+20600000
+d8e0000c
+20201566
+d8e0000c
+2020156a
+4708c022
+2040535f
+6fe0c4e9
+207a0000
+20405396
+d8400100
+98467c00
+202153a8
+204053aa
+d8a044f6
+da2044ea
+580044f6
+9a267c00
+20628000
+efe08011
+1a20a201
+243a53c0
+e7e10005
+1a20a202
+202053b7
+efe10011
+1a20a202
+1fe20c00
+efe10006
+e7e10005
+1fe27200
+1f20f202
+20407dd4
+202053b7
+47094022
+2040535f
+6fe0c4e9
+207a0000
+da2044eb
+1a20a3fd
+d8c044f6
+1a20a203
+580044f7
+9a267c00
+20628000
+efe10006
+203a53d0
+1fe0fe04
+1fe27200
+18c22400
+efe10011
+1fe20a00
+1a420c00
+18c08dfe
+20407dd4
+202053d0
+20758000
+4709c022
+58000000
+67e08048
+67e08055
+67e08078
+67e0807c
+67e0c15d
+67e080bc
+67e08877
+67e1c647
+67e0c64a
+70464500
+70030c00
+7003ab00
+70087700
+70087600
+7003a500
+20600000
+470a4022
+2054da82
+2454da86
+20405a3f
+247a0000
+6fe0804c
+c4030000
+793ffe06
+793f8001
+67e0804c
+6fe080ce
+6848804c
+2feffe00
+79208401
+6048804c
+18410402
+6048807f
+6848804c
+1fe37e00
+67e0807d
+470ac022
+6fe0807d
+c03fd454
+c001d4c0
+c00254d1
+c01e5447
+c002d443
+c007d6f7
+c0085536
+c011d555
+c01cd710
+c01c570b
+c018d53b
+c01bd5d7
+c013d5d3
+c019d5d0
+c012d5d5
+c0135551
+c003d54a
+c016d541
+c0175542
+c000d5cc
+c00155b7
+c0145702
+c004d5ad
+c005d574
+c0045556
+c0065586
+c00fd54d
+c010554f
+c010d5f1
+c01155f1
+c01ad5f2
+c01b55f3
+c01255f1
+c01a55f4
+c00bd5fd
+c008d617
+c0095624
+c009d626
+c006d636
+c0075636
+c017d5d1
+c0185636
+c0055636
+c00c5637
+c0195636
+c01ed63c
+c01f5685
+c01fd67e
+c02056c8
+c020d6d9
+c00356f6
+c01d5445
+c0155441
+c014d442
+70007e19
+70007c04
+20600000
+2020554b
+20600000
+70007c06
+20600000
+70007c3b
+20600000
+6fe200cf
+1fe3fe00
+67e240d9
+6fe080d3
+67e0c0e0
+6fe280d4
+67e2c0ee
+6fe280d9
+e7e28005
+6fe08031
+79207e03
+67e08031
+20600000
+470b4022
+6fe080cf
+79207e07
+67e0807d
+c040d479
+c041547e
+c04ad5d8
+c04b55f1
+c045d5e6
+c041d494
+c04254b6
+c048546b
+c04bd48d
+c04c5492
+c04cd46e
+c04d5471
+c050d469
+c1420000
+70007c82
+70007e19
+20600000
+70007ca2
+20600000
+70007c82
+70007e2e
+20600000
+20405473
+70007c9a
+20600000
+20405473
+20205477
+d8a0476b
+6fe180d0
+e7e18005
+20600000
+2020f0d3
+20600000
+6fe080d1
+79207e07
+67e0839d
+c045d483
+20600000
+6fe080d1
+79207e07
+67e0839d
+c045d487
+20600000
+6fe0c15f
+6848804c
+7d3a0405
+6048804c
+6fe08030
+c4028000
+793ffe05
+67e08030
+70007c31
+20600000
+2434d490
+70007c12
+20205a6e
+70007c97
+20600000
+20405a6e
+2020574d
+efe08006
+67e083a1
+c000d499
+c001549e
+20600000
+70007c84
+18c08c01
+efe08006
+c281d4b0
+202054b3
+70007c84
+18c08c01
+efe10006
+c28454a3
+202054ac
+6fe0c64a
+79207e01
+204054ae
+6fe0c64a
+c1818000
+6fe0c6bb
+c4008000
+70464802
+20600000
+6fe0c64a
+793ffe01
+67e0c64a
+20600000
+6fe0c64a
+79207e00
+202054ae
+6fe0c64a
+793ffe00
+202054ae
+684880d2
+18410401
+604883a4
+6fe0c1db
+c0a8d4bc
+7041db00
+6fe08055
+c18a8000
+70005504
+20205a9e
+470bc022
+6fe080cf
+67e0839d
+c019d4e7
+c00454f6
+c007d4fd
+c0085503
+c008d504
+c009550c
+c00c5525
+c00bd528
+c009d4de
+c01ed651
+c01f56b2
+c0205653
+c020d670
+20600000
+470c4023
+6fe080cf
+67e0839d
+c000d51c
+c019d4f1
+c005d50d
+c0045513
+c009d4e1
+c020551d
+c020d520
+c00c5523
+c00bd534
+20600000
+70095b20
+204078dc
+202009dd
+70095b19
+204078dc
+70464502
+58000050
+d8e00006
+20207ddb
+6fe083a5
+79207e00
+67e083a5
+70095b01
+204078dc
+70007c8b
+6fe08055
+c082d3f1
+70005506
+20600000
+70039e0b
+70007c07
+70005500
+2020d3f1
+20600000
+6fe0c1ca
+247a0000
+20400c5c
+2040574b
+20748000
+79200021
+20600000
+24748000
+70007c10
+6fe0804c
+c4010000
+70007c12
+20600000
+2020574d
+204057a9
+6fe08030
+c3820000
+70007c31
+6fe08055
+c1850000
+7000550b
+20600000
+20600000
+6fe0c09a
+1fe67c08
+2042be57
+70007c07
+70039e13
+20600000
+6fe080d0
+c0035519
+c18c0000
+70039e18
+70007c07
+20600000
+70039e06
+70007c07
+20600000
+20600000
+70087000
+70007c07
+202053f1
+70087000
+70007c07
+202053f1
+70095b24
+202078dc
+70095b23
+204078dc
+20200f12
+70095b22
+204078dc
+58000000
+67e10075
+6fe14455
+1fe3fe00
+67e10032
+6fe0c457
+67e08073
+6fe0c459
+67e08074
+20200ef1
+70095b21
+202078dc
+684880cf
+18467c06
+202156ec
+60488054
+2020554b
+6fe083a5
+79207e02
+67e083a5
+c3818000
+70007c31
+202053f1
+20600000
+6fe0c0d7
+684880cf
+98467c00
+2021554b
+70007c04
+70007e1f
+70007d2e
+20600000
+202058c0
+70007c03
+20600000
+70007c21
+20600000
+70007c22
+20600000
+6fe08055
+c1098000
+70005502
+20600000
+20600000
+6fe0c6b9
+243a555f
+20405748
+7003a801
+70095b0a
+204078dc
+20405a76
+2420d750
+2434d563
+70007c04
+70007d08
+70007e23
+20600000
+6fe0804b
+79207e02
+67e0804b
+20600000
+6848804c
+7d3a0401
+6048804c
+20600000
+6fe0807f
+1fe37e00
+1fe17e01
+20600000
+6fe0c48b
+207a0000
+6fe08877
+205a60af
+20600000
+2040556f
+2040556b
+67e083a9
+6fe0c648
+c0015581
+20405748
+70007c0c
+6fe0c1ca
+247a0000
+6fe08030
+c3830000
+70007e06
+2020543f
+70007c0b
+d8a008f0
+d8c000cf
+20407d7f
+2020557b
+6fe0c648
+c0015596
+da200040
+20406ba6
+684a0454
+6fe200cf
+98467c00
+2022d591
+70007c07
+70039e05
+20600000
+20406ca4
+2040559f
+6fe0c767
+203a5671
+20600000
+6fe200cf
+684a091c
+98467c00
+2022d59b
+2020558e
+2040559f
+6fe0c6bb
+c280d671
+20600000
+204009b4
+6fe0804b
+2feffe01
+793ffe01
+67e0804b
+6fe08055
+c00cd5a8
+c00c55a8
+20600000
+6fe08877
+c1800000
+6fe0804c
+c3810000
+20205b35
+da2000cf
+da400444
+d8a00424
+20406c70
+da200040
+20405a94
+70007c0b
+6fe08030
+c303574b
+20600000
+6fe100ae
+1fe0f3fd
+684880cf
+58000a01
+98408a00
+d8c000d1
+20407dd4
+68488053
+6fe080d0
+98467e00
+1fe67c0e
+202155c7
+1840fe0e
+67e08053
+70007c01
+20600000
+6fe0804c
+79207e03
+67e0804c
+c2825755
+20600000
+6fe080cf
+67e0807d
+70007c02
+20600000
+2020554b
+70007c30
+20600000
+70007c28
+20600000
+70007c26
+20600000
+20600000
+6fe10032
+98000400
+6fe080d0
+67e08092
+984f8400
+6fe100d1
+1fe3fe00
+67e10093
+6fe200d3
+1fe3fe00
+67e2008e
+18427e00
+67e10095
+20600000
+6848c15f
+6fe080d0
+9842fc00
+2422d466
+2feffe00
+6fe0804c
+7920fe05
+67e0804c
+70007c81
+70007d8b
+20600000
+20600000
+2020554b
+2020554b
+6fe100cf
+67e100c0
+20600000
+6fe100d2
+6848c177
+984ffe00
+d8400640
+98467c00
+20600000
+6fe100d4
+203a56ec
+204055f7
+202156ec
+6fe0c09a
+1fe67c0a
+2042bc4c
+6fe08030
+c280d6ec
+6fe100d0
+1fe3fe00
+67e10075
+6fe100d2
+1fe3fe00
+67e10032
+6fe100d4
+67e08073
+98000400
+6fe100d6
+67e08074
+98467c00
+24215614
+67e08073
+70007c03
+70007d17
+20600000
+6fe0c648
+c001561d
+2040554b
+20405748
+20406ba9
+20200ee1
+2040554b
+20400ee1
+20407537
+d8a00062
+d8c00910
+df200010
+20207ed9
+2040554b
+20200eeb
+6fe200cf
+1fe3fe00
+2034d630
+6848c1ca
+243a562d
+70007d13
+202056ec
+70007c34
+70005500
+202009db
+204009db
+79200022
+6fe080bc
+793ffe02
+67e080bc
+2020554b
+20600000
+70007c03
+70007d18
+70095b2e
+204078dc
+20200f12
+70087900
+6fe080cf
+67e0c647
+c080d6ec
+684880d0
+6048c648
+6fe0c6b9
+203a5646
+18467c02
+2422d58e
+6fe080d1
+c020564a
+c018564a
+202056ec
+67e0c649
+20405a7f
+2020d64e
+70087001
+70007c03
+70007d3d
+202053f1
+70007c3e
+20600000
+6fe0c76f
+c000d65a
+c001565e
+20405a7f
+20608000
+70087008
+20600000
+2040735d
+70095b35
+204078dc
+20205656
+20405a7f
+20608000
+6fe0c770
+c009d66e
+1fe0fe01
+67e0c770
+70087201
+70087004
+6fe0c770
+1fe20e00
+6fe34797
+afefffff
+58000080
+7920fe00
+67e0c771
+20600000
+70087008
+20600000
+20405676
+6fe0c772
+207a0000
+70477200
+70095b38
+202078dc
+20405a7f
+2440f367
+2040f377
+20405a7f
+20608000
+7008700c
+70087201
+20600000
+d8a00930
+d8c000cf
+20407d7f
+6fe0c76f
+c1010000
+202070d3
+20600000
+6fe0c648
+c000d69b
+c0015689
+202056ec
+6fe08871
+c003d68d
+6fe08870
+c080d6ec
+6fe08879
+1fe60a30
+242156ec
+d8a00880
+98a08a00
+6fe400cf
+e7e40005
+6fe400d7
+e7e40005
+6fe08879
+1fe0fe10
+67e08879
+c0a0554b
+202056ac
+6fe08871
+c003d69f
+6fe08870
+c080d6ec
+6fe08879
+1fe60a20
+242156ec
+d8a00888
+98a08a00
+6fe400cf
+e7e40005
+6fe400d7
+e7e40005
+6fe08879
+1fe0fe10
+67e08879
+c098554b
+20405a7f
+2020d54b
+70087a01
+70087002
+70087201
+2020554b
+6fe0c648
+c000d6b6
+c00156ba
+20600000
+6fe08878
+c01856be
+70007c3e
+20600000
+6fe08878
+c02056be
+70007c3e
+20600000
+20405a7f
+2020d6c7
+6fe0c76f
+c00156c5
+70087201
+70087004
+202053f1
+70095b36
+202078dc
+202053f1
+6fe08871
+c003d6cc
+6fe08870
+c08356ec
+d8a008f0
+6fe400cf
+e7e40005
+6fe400d7
+e7e40005
+20405a7f
+2020d6d6
+70087007
+70087201
+2020554b
+70087104
+202070d3
+202056ec
+6fe08871
+c005d6dd
+6fe08870
+c08456ec
+d8a00920
+d8c000cf
+20407d7f
+20405a7f
+2020d6e9
+6fe0c76f
+c000d6ee
+70476e00
+70087009
+70087201
+70007d41
+202053f1
+70087109
+70087301
+202053f1
+70007e24
+2020543f
+6fe0c76e
+c283d6f3
+79207e06
+67e0c76e
+20600000
+c28056e4
+70476e00
+202056ec
+202053f1
+6fe080bc
+793ffe01
+67e080bc
+2040554b
+24748000
+6fe080cf
+6848804b
+793a0404
+7d3a0405
+6048804b
+20600000
+684c00cf
+6fe08055
+c1818000
+6fe080bc
+c3025709
+70005514
+20600000
+70005504
+20600000
+6fe080e3
+67e08a5b
+70007c03
+70007d38
+20600000
+70007c03
+70007d39
+18007209
+d8c000cf
+d8a00a52
+efe08006
+1fe2fe55
+e7e08005
+c2005715
+6fe08a52
+68488a51
+793f8407
+793f8404
+c07fd729
+c0005742
+c002d736
+c003d735
+c0035736
+c0045735
+c000d72e
+c001572e
+c001d72e
+c004d72e
+c002572e
+20600000
+6fe08a51
+79207e03
+79207e02
+67e08a51
+20600000
+79200404
+7000e405
+6fe10a59
+98007200
+67e100ae
+d8a000ce
+20407e48
+79200407
+79200402
+18007e00
+67e0800b
+67e109fa
+67e109fc
+67e109f8
+67e109f6
+6fe08a53
+2fe1fe00
+79208406
+60488a51
+20600000
+793f8011
+700a5100
+6fe080e3
+793ffe06
+67e080e3
+20600000
+d8c000cf
+d8a00424
+20207d7f
+70007c09
+20600000
+24748000
+70007c11
+20600000
+da2040a8
+20406b73
+70007c03
+70007d08
+20600000
+7000720a
+70007c07
+70039e16
+20600000
+470cc023
+78547c00
+20405a44
+6fe08048
+207a0000
+c283d78e
+c000d8d8
+c0015859
+c001d79a
+c00257b0
+c013d944
+c014587d
+c0185869
+c012d93f
+c0135878
+c018d92c
+c01bd8d3
+c019d8c5
+c00459c6
+c004d9bc
+c005d9d1
+c00659de
+c007d8cb
+c0085a14
+c008da0a
+c003d8bb
+c01558e7
+c00558e8
+c00fd925
+c003586e
+c010d8c8
+c016d91b
+c0175920
+c01158c8
+c01a58e9
+c009d8fe
+c00bd90d
+c0095a11
+c017d913
+c00c5918
+c01ed967
+c01f596f
+c01fd98a
+c0205994
+c020d9a9
+c011d9b8
+c01dd9b3
+c002d9b9
+c014d9ba
+c01c59bb
+c01cd8de
+2020137c
+20600000
+c040d7bd
+c041d882
+c04257ec
+c04157c6
+c045d88f
+c04bd8b7
+c04cd84a
+c04d5819
+c04ad84f
+c04b5850
+c05157e9
+2020137c
+18007e02
+20405a1a
+6fe08049
+e7e08005
+20405a29
+470d4023
+6fe08049
+c00457d0
+c007d7d4
+c00857df
+c00bd7af
+c019d7e2
+c020d7e8
+c008d7a9
+20600000
+6fe08055
+207a0000
+7000551b
+5800000c
+d8e00007
+20207ddb
+20200ef1
+18007e03
+20405a1a
+6fe08049
+c005d7b8
+e7e08005
+6fe0804a
+e7e08005
+20205a29
+e7e08005
+6fe0804a
+e7e08005
+d84003a9
+20205a65
+18000e04
+20405a22
+5800007f
+e7e08005
+6fe08049
+793ffe07
+e7e08005
+6fe08049
+20205a29
+18000e05
+20405a22
+5800007f
+e7e08005
+6fe08049
+793ffe07
+e7e08005
+6fe0804a
+e7e08005
+20205a29
+20400c5c
+20405a76
+20608000
+2020574b
+6fe0804b
+c282d7db
+c4020000
+70007c12
+793ffe04
+20405a6e
+202057dd
+70007c10
+793ffe05
+67e0804b
+20600000
+20405a7f
+2020d74d
+20600000
+70007c8b
+6fe083a5
+79207e00
+67e083a5
+70095b01
+202078dc
+20600000
+18000e02
+20405a22
+20205a32
+1fe22200
+20405802
+6fe083a1
+c000d7f2
+c00157fa
+20600000
+1a227e00
+18000e0c
+20405a22
+58000001
+e7e08005
+6fe103a2
+e7e48005
+20205a32
+1a227e00
+18000e0c
+20405a22
+58000002
+e7e08005
+58010002
+e7e48005
+20205a32
+6fe0c767
+203a5806
+2040580c
+20205813
+6fe0c0a6
+793ffe03
+67e0c0a6
+58000001
+67e103a2
+20206f37
+470dc023
+6fe0c0a6
+79207e03
+67e0c0a6
+58000101
+67e103a2
+20600000
+6fe0c6bb
+c280d816
+20600000
+58000902
+67e103a2
+20600000
+18000e05
+20405a22
+6fe1c768
+e7e18005
+20405a32
+70477201
+6fe0c768
+c000d82a
+c0015824
+c001d830
+20600000
+6fe0c76b
+c000583c
+c000d83c
+c001583c
+c001d836
+20600000
+6fe0c76b
+c0005836
+c000d83a
+c001583c
+c001d836
+20600000
+6fe0c76b
+c0005836
+c000d836
+c0015836
+c001d836
+20600000
+70476f03
+6fe0c646
+c2803268
+20600000
+70476f01
+20600000
+70476f02
+20600000
+d8e00000
+20205842
+d8e00000
+20205846
+6fe0c646
+f9207e00
+67e0c646
+20600000
+6fe0c646
+f93ffe00
+67e0c646
+20600000
+18000e05
+20405a22
+6fe1c768
+e7e18005
+20205a34
+20600000
+18000e09
+20405a22
+6fe08092
+e7e08005
+6fe10093
+e7e10005
+6fe2008e
+e7e20005
+20205a32
+18007e11
+20405a1a
+6fe08049
+1fe20400
+c0005861
+c0075861
+c00e5861
+20600000
+e7e08005
+6fe0c5ff
+e7e08005
+df20000e
+58004600
+98408c00
+20407dd4
+20205a32
+18007e03
+20405a1a
+58000114
+e7e10005
+20205a32
+18007e03
+20405a1a
+6fe200b4
+9c467e00
+2034d874
+1fe67e00
+1feb7e00
+793ffe0f
+e7e10005
+20205a32
+18007e06
+20405a1a
+6fe2c5fa
+e7e28005
+20205a32
+18007e09
+20405a1a
+6fe440a0
+e7e40005
+20205a32
+20405802
+6fe08048
+18000e0c
+20405a22
+58000001
+e7e08005
+6fe103a2
+e7e10005
+58000000
+e7e18005
+58000000
+e7e20005
+20205a34
+18000e03
+20405a22
+6fe0c15f
+e7e08005
+78547c00
+20405a34
+24740000
+24748000
+6fe0c0df
+c4000000
+2040589b
+202058a5
+7040df03
+58000000
+67e24149
+d8a040e1
+204058a9
+d8a040ee
+204058a9
+d8a0414d
+204058a9
+202058b0
+d8a040ee
+204058a9
+204058b0
+202058b3
+58ffffff
+e7e18005
+e7e18005
+e7e18005
+5800007f
+e7e08005
+20600000
+58000000
+67e140dd
+20600000
+6fe0c0df
+79207e02
+67e0c0df
+20600000
+18000e02
+20405a22
+2434da32
+20205a34
+18007e02
+20405a1a
+6fe0839e
+e7e08005
+20405a34
+6fe0804b
+79207e03
+67e0804b
+70007232
+20600000
+18007e01
+20405a1a
+20205a34
+18007e01
+20405a1a
+20205a32
+18007e02
+20405a1a
+6fe0804c
+2fec0002
+7920fe00
+1fe17e01
+e7e08005
+20205a34
+18007e03
+20405a1a
+6fe10051
+e7e10005
+20205a34
+700072fa
+18007e02
+20405a1a
+6fe08053
+e7e08005
+20205a34
+18007e0a
+20405a1a
+d8c00a52
+18007209
+efe08006
+1fe2fe55
+e7e08005
+c20058e2
+20205a34
+20205a34
+20205a34
+20748000
+2040104a
+18007e09
+20405a1a
+6fe100c0
+e7e10005
+6fe1c0a8
+e7e18005
+6fe0c0ab
+e7e08005
+6fe140ac
+e7e10005
+c581d8fa
+793f8003
+20405a34
+70007c13
+20600000
+20405a32
+70007c03
+70007d13
+20600000
+d8400200
+2034d902
+1d027e00
+20205903
+1c427e00
+1c227e00
+9840fe00
+1fe17ffc
+67e20034
+18007e05
+20405a1a
+6fe20034
+1fe37e00
+e7e20005
+20205a34
+18007e0a
+20405a1a
+d8c003ac
+efe48006
+e7e48005
+20205a34
+18007e03
+20405a1a
+58000114
+e7e10005
+20205a34
+18007e01
+20405a1a
+20205a34
+18007e02
+20405a1a
+6fe0c0d7
+e7e08005
+20205a34
+18007e02
+20405a1a
+58000005
+e7e08005
+20205a34
+18007e02
+20405a1a
+58000000
+e7e08005
+20205a34
+70007c2e
+20600000
+6fe0c09a
+1fe67c0a
+2042d92a
+6fe08030
+79207e04
+67e08030
+1c427e00
+67e203bc
+6fe083a5
+c281d93d
+79207e03
+67e083a5
+70095b05
+204078dc
+18007e01
+20405a1a
+20205a34
+70004800
+20600000
+18007e06
+20405a1a
+6fe2c5fa
+e7e28005
+20205a34
+18007e09
+20405a1a
+6fe440a0
+e7e40005
+20205a34
+70087301
+6fe0c6bc
+c1808000
+70087113
+20600000
+20405a72
+70007c99
+70087103
+20600000
+20405a72
+70007c3d
+70087107
+20600000
+da200910
+da400930
+df200010
+20407e66
+2022d95f
+70087100
+204070d5
+70007d40
+202056ec
+7008710a
+204070d3
+70007d40
+2020554b
+70007c40
+20600000
+70007c3d
+20600000
+70087800
+18007e04
+20405a1a
+6fe1c647
+e7e18005
+20405a7f
+2020da34
+20205a32
+6fe0c648
+c0015973
+c000d978
+20600000
+18007e11
+20405a1a
+6fe08878
+d8c046df
+2020597c
+18007e11
+20405a1a
+6fe08878
+d8c04737
+98c08c00
+efe40006
+e7e40005
+efe40006
+e7e40005
+6fe08878
+1fe0fe10
+67e08878
+20405a7f
+2020da34
+20205a32
+70087006
+70007c3f
+20600000
+18007e11
+20405a1a
+d8c00910
+efe40006
+e7e40005
+efe40006
+e7e40005
+20205a32
+70007c40
+20600000
+20405a7f
+2040efe9
+18007e11
+20405a1a
+d8c008e0
+efe40006
+e7e40005
+efe40006
+e7e40005
+20405a7f
+2420da32
+2020da34
+7008710f
+20405a72
+70007c0b
+20405a8a
+2020f037
+20207041
+20405a6e
+70007c41
+20600000
+18007e11
+20405a1a
+d8c00910
+efe40006
+e7e40005
+efe40006
+e7e40005
+20405a7f
+2420da32
+2020da34
+18007e03
+20405a1a
+5800fffe
+e7e10005
+20205a32
+20205a34
+20205a34
+20205a34
+20205a34
+20405a8e
+da2040a8
+20405a94
+18007e11
+20405a1a
+da200444
+da400424
+20406c70
+2434da29
+20205a2f
+20405a8e
+da200040
+20406b73
+18007e11
+20405a1a
+d8c00424
+20407d7f
+6fe08055
+c00cda34
+c00c5a34
+20205a2f
+6fe0c648
+c00159dc
+6fe08877
+203a59d9
+20405a7f
+2040da72
+2440da6e
+202059da
+20405a72
+20405a8e
+202059c9
+70007c0c
+202059d5
+6fe0c648
+c00159f8
+da2040a8
+20406ba6
+18007e05
+20405a1a
+6fe20454
+e7e20005
+d84003a9
+20405a65
+20406ca4
+20405a7f
+2020d9ef
+7003ab01
+6fe08877
+207a0000
+70007c0b
+6fe0c1ca
+207a0000
+20405a7f
+2420d9f4
+20600000
+c6908000
+793f8021
+70007c0f
+20600000
+2040755f
+20407584
+18007e05
+20405a1a
+6fe20918
+e7e20005
+d84003a9
+20405a65
+20405a07
+20405a7f
+2020d9ef
+7003ab01
+6fe08877
+207a0000
+202059ef
+6fe40910
+67e446ad
+20600000
+20405a8e
+20406ba9
+18007e11
+20405a1a
+d8c00424
+20407d7f
+20205a2f
+18007e01
+20405a1a
+20205a2f
+18007e02
+20405a1a
+18007e10
+e7e08005
+67e08054
+20205a2f
+1fe9fe00
+1fe1fe07
+67e0838a
+df200011
+d8a0038c
+20407d9b
+d8a0038c
+20600000
+1fe1227f
+7000487f
+18e27e00
+20405a1a
+1a227e00
+e7e08005
+20600000
+6fe08048
+1fe3fe00
+6848804c
+284ffe01
+7920fe00
+20205a39
+6848804c
+18410401
+20205a35
+18000400
+20205a35
+18000401
+6fe08048
+1fe3fe00
+7934fe00
+9842fe00
+67e0838b
+67e0c5f9
+70004800
+20405a4a
+78347c00
+20600000
+6fe0807c
+207a0000
+20405a44
+6fe0807c
+20600000
+470e4023
+6fe08048
+203a5a4a
+6fe08078
+247a0000
+20205a54
+6fe08078
+203a5a5a
+6fe18078
+67e18048
+6848807b
+6fe0804c
+793ffe01
+9841fe00
+67e0804c
+70007800
+6fe0807c
+207a0000
+6fe2007c
+67e20078
+70007c00
+20600000
+6fe0807c
+207a0000
+6fe1807c
+67e18048
+6848807f
+6fe0804c
+793ffe01
+9841fe00
+67e0804c
+70007c00
+20600000
+470ec023
+6fe0804c
+1fe22600
+efe08002
+20405567
+20405a29
+1a627e00
+67e0804c
+20600000
+6848804c
+793f8400
+6048804c
+20600000
+6848804c
+79200400
+6048804c
+20600000
+7d34fe01
+6848804c
+9842fe00
+2feffe01
+20600000
+6fe0804c
+7934fe01
+67e0804c
+20600000
+6fe08876
+2fe0fe01
+20600000
+6fe08876
+79207e07
+67e08876
+20600000
+6fe08876
+793ffe07
+67e08876
+20600000
+6fe08876
+2feffe07
+67e08876
+20600000
+d8a00424
+18007210
+180a7e00
+e7e08005
+c2005a90
+20600000
+20406b77
+da2041cb
+da400454
+efe40011
+68488030
+7d3a0406
+60488030
+1a220a00
+20406c70
+202009c6
+470f4023
+20405a3f
+247a0000
+6fe08055
+207a0000
+c0025af2
+c002daf8
+c0015ae9
+c001db00
+c0075aec
+c0035b1c
+c003db34
+c004db35
+c0055b3e
+c005db42
+c0065b0a
+c006db0d
+c007db13
+c0095adc
+c009db00
+c0085adf
+c00a5ad9
+c00adb00
+c00b5ad3
+c00c5ad8
+c00bdacc
+c00cdad2
+c00d5abd
+c00ddac7
+70005500
+20600000
+6fe083a5
+c4010000
+c4018000
+70005500
+20405ac3
+2020660d
+6fe080bc
+c4008000
+7000550a
+20600000
+d8e00007
+20407de9
+247a0000
+7000551a
+20600000
+6fe080bc
+793ffe00
+67e080bc
+70005519
+70007c0b
+20600000
+20600000
+6fe083a8
+c1810000
+20405b44
+70005518
+20600000
+20600000
+70005515
+70007c83
+20600000
+70005513
+70007c25
+20600000
+6fe0c645
+c1000000
+c000dae7
+d8e00006
+20407de9
+247a0000
+70464500
+20205b01
+20748000
+20205b1c
+70005503
+70007c27
+20600000
+70007c13
+79200003
+70005505
+580001ff
+67e103a6
+20600000
+70005505
+580000ff
+67e103a6
+793f8022
+70007c33
+202053ee
+c6110000
+6fe103a6
+1fe0ffff
+2022dafe
+67e103a6
+20600000
+7000550e
+20600000
+20600000
+6fe083a5
+c4018000
+c4010000
+6fe080bc
+793ffe02
+67e080bc
+70007c13
+70005510
+20600000
+7000550d
+70007c31
+20600000
+6fe083a5
+c4010000
+70005500
+20600000
+70005506
+20600000
+6fe103a6
+1fe0ffff
+203a5b18
+67e103a6
+20600000
+70007c07
+70039e16
+70005500
+20600000
+6fe080bc
+c2815b01
+c2805b21
+7000551a
+20600000
+6fe0c1ca
+203a5b2d
+6fe083a5
+c4018000
+c4010000
+6fe203bc
+d8400064
+98408400
+1c427e00
+98467c00
+24610000
+20205acc
+70005516
+70479604
+58003030
+67e14797
+e7e10005
+7003a802
+20205ad3
+20600000
+6fe080bc
+c280db39
+7000551a
+20600000
+6fe080bc
+793ffe01
+67e080bc
+70007c0f
+20600000
+6fe083ab
+207a0000
+70005500
+20205b39
+7000550c
+20600000
+6fe0804b
+c2815b49
+20405a72
+70007c08
+20204de4
+6fe0804b
+793ffe02
+67e0804b
+20405750
+20405a7b
+20204de4
+58000004
+67e0c796
+58003030
+e7e10005
+e7e10005
+20600000
+470fc023
+1fe17eff
+d8a08070
+98a08a00
+18a22200
+d840003e
+e0408005
+20405b62
+2000001e
+1a220a00
+d840003f
+e0408005
+20205b66
+6ff08085
+1fe17efb
+67f08085
+20600000
+6ff08085
+1fe1fe04
+67f08085
+20600000
+6ff08085
+1fe17efd
+67f08085
+20600000
+24345b72
+6ff08085
+1fe1fe02
+67f08085
+18427c00
+2022db75
+1a627a00
+2fcc0000
+20205c92
+18000404
+da2002eb
+20405b6a
+20405b72
+da2055aa
+6fe102eb
+e8410006
+9a267c00
+20600000
+d8400002
+da2002f1
+20405b72
+6fe102f1
+67e102e4
+20545b87
+20600000
+d8400010
+da2002f3
+20405b6a
+20405b72
+d8c002f3
+df200010
+20406e1a
+20406dca
+20406e36
+20206dc4
+58000000
+67e10985
+7856fc00
+20405b77
+24628000
+70802380
+70802200
+70802400
+da208025
+20405b6e
+70802300
+d8400006
+20405b78
+2422dbb8
+efe10006
+98002200
+20405b72
+20405baf
+20205b9c
+da20aa55
+6fe102eb
+9a267c00
+24628000
+da2055aa
+6fe102ed
+9a267c00
+24628000
+6fe102ef
+67e10970
+20600000
+6fe10985
+df200006
+d8c002eb
+20407ed3
+6f2102ed
+1a220c00
+20407ed3
+67e10985
+20600000
+20405ba4
+2022db9c
+6fe10970
+68490985
+98467c00
+24628000
+7836fc00
+20600000
+6fe08a04
+d8c00a01
+98c08c00
+70802380
+70802200
+70802400
+da208025
+ef208006
+1f267c00
+2442dbd6
+70802300
+efe08006
+207a0000
+1fe27200
+ea410006
+1a420a00
+20407dd6
+20205bcb
+efe08006
+e7e08011
+c2005bd2
+20600000
+20407ec9
+1f220400
+24345bd2
+18467c00
+20628000
+20405be0
+20406dc4
+184085f0
+20215bd9
+20600000
+1800700c
+18427200
+efe20006
+9de2fe00
+1fe25e00
+e7e08011
+1fecfe00
+e7e08011
+1fecfe00
+e7e08011
+1fecfe00
+e7e08011
+1f00f001
+2f000600
+20608000
+1f20f3fc
+20628000
+20215be2
+20600000
+dfa00000
+20600000
+20407e77
+70805025
+78347c00
+7041e300
+20405c58
+24215c90
+58000000
+da200a01
+d8400040
+20405f00
+20405c68
+24345bf9
+20405cb0
+78547c00
+6fe08a01
+c301dc17
+20406e33
+70800608
+7920002b
+18007004
+20406e37
+18007004
+6de20a3d
+58f1ab8f
+67e202f3
+1febfe00
+e7e20005
+1fe3fe00
+e7e20005
+1febfe00
+e7e20005
+20405b6a
+20405b8b
+78347c00
+6fe20a01
+203a5c1e
+67e1c4ce
+20407ecb
+20405ceb
+20405bc0
+20565bf3
+7041e300
+6fe08a01
+c2815c3d
+20405c58
+24215c2a
+20405c36
+20405e5c
+20405c8a
+2436dc1f
+6fe082e1
+c3005c1f
+20205c4c
+7041e300
+6fe08a01
+c2815c3d
+20405c58
+24215c3d
+20405c36
+20405e59
+20405c8a
+2436dc2b
+6fe082e1
+c3005c2b
+20205c4c
+6fe0c4c5
+6848c4c4
+98467c00
+2422de42
+58000102
+67e1c4c3
+20205e42
+7041e300
+6fe08a01
+c280dc4c
+20405c58
+24215c4c
+20405daf
+200000c8
+20405dbd
+20000064
+da605df1
+20405b80
+20405b91
+2436dc3e
+6fe082e1
+c3005c3e
+6fe08a01
+c3005c50
+20405c50
+20204d18
+58000000
+67e20a3d
+67e402f3
+e7e40005
+18007004
+20406e37
+70805021
+20600000
+20405c5e
+6fe0c1e3
+1fe0fe01
+1fe67c03
+67e0c1e3
+20600000
+6fe0c1e3
+207a0000
+6fe08a2c
+1fe17e40
+207a0000
+20207d89
+1ff18400
+1fe17e0f
+9842fe00
+20600000
+6fe20a01
+207a0000
+6fe08a01
+20405c64
+c087fec7
+6fe08a02
+20405c64
+c087fec7
+6fe08a01
+e8408006
+9840fe00
+e8408006
+9840fe00
+e8408006
+9840a200
+dfe00a01
+98408c00
+1a227e00
+ef208006
+9f20fe00
+20407ed3
+20405c83
+e8408006
+1fe17eff
+98467c00
+2422fec7
+20600000
+ef208006
+1f267c00
+20628000
+9f20fe00
+1f20f202
+20407ed3
+20205c83
+58000000
+67e102e4
+da605e7f
+20405e2b
+20405b80
+20205b91
+20405c50
+20205d33
+6fe082e1
+1fe3fe00
+7920fe00
+2a2c000f
+20608000
+67e082e1
+20600000
+6ff08085
+c4008000
+20205c9f
+6ff0812c
+afefffff
+20608000
+6ff08108
+c300dc9c
+20406dc4
+20205c9c
+6fe141a6
+207a0000
+70802380
+70802200
+70802400
+684941a8
+184bf200
+98000c00
+efe08006
+67f08025
+c2005cab
+70802300
+20600000
+6fe08a31
+1fe17e0f
+2feffe03
+7920fe04
+1fe3fe00
+67e0c182
+20201554
+6fe08a2c
+1fe17e0f
+207a0000
+67e0c09a
+6fe08a2d
+67e0c17b
+6fe08a2e
+67e0c17d
+20600000
+6fe08a2c
+1fe17e30
+1ff1fe00
+207a0000
+67e0c4d2
+20600000
+6fe08a32
+1fe17e0f
+207a0000
+67e0c4d3
+20600000
+6fe08a32
+1fe17e30
+1ff1fe00
+207a0000
+67e0c4d4
+20600000
+6fe08a33
+207a0000
+67e0c4d5
+20600000
+6fe08a32
+c283dcde
+7041eb88
+7041ec66
+7041ed44
+6fe10a2f
+207a0000
+67e141ec
+20600000
+7041eaff
+6fe08a32
+1fe17e40
+1fe97e00
+67e0c1ee
+20600000
+70800273
+37d98200
+37d98200
+6ff10120
+793ffe0d
+67f1004c
+20205d4e
+6fe08a02
+1fe17e0f
+c0055cf8
+c000dcf8
+c0025cfb
+c0045d00
+c004dd05
+c005dd0a
+c0065cf8
+c006dd0d
+c0075d12
+c007dd17
+20600000
+20405ce4
+20405d1c
+20205d3d
+20405ce4
+dfe03814
+d8404c50
+20405d22
+20205d3d
+20405ce4
+dfe032b9
+d8403c71
+20405d22
+20205d3d
+20405ce4
+dfe032b9
+d8404adb
+20405d22
+20205d3d
+20405ce4
+20405d25
+20205d3d
+20405ce4
+dfe032b9
+d84049ef
+20405d22
+20205d3d
+20405ce4
+dfe0369a
+d8404c50
+20405d22
+20205d3d
+20405ce4
+dfe0345e
+d8404c50
+20405d22
+20205d3d
+dfe02735
+d840314b
+20205d22
+20405ce4
+dfe03814
+d8403c71
+67f10013
+60590015
+20600000
+dfe032b9
+d8404c50
+20205d22
+dfe053f2
+d8405b49
+20205d2d
+dfe01c7d
+d840217c
+67f10017
+60590019
+20600000
+dfe02181
+d8402733
+20205d2d
+20405d28
+dfe01c7d
+d840217c
+20205d22
+6fe08a03
+1fe17ec0
+c0605d33
+c2835d2b
+c283dd28
+20600000
+20405d37
+6fe08a03
+1fe1221f
+6fe08a01
+1fe17e0f
+68488a02
+1841040f
+18520400
+9841fe00
+1a2d2200
+9a21fe00
+79207e0d
+79207e0e
+67f2004c
+20405d4e
+70801108
+20600000
+58000002
+37d98200
+67f08012
+37d98200
+37d98200
+20600000
+47104024
+6fe0c486
+67f08086
+6fe0c487
+67f08087
+580002e2
+67f1008a
+580002e7
+67f1008c
+20205b62
+79207e07
+67e102e2
+4710c024
+70808802
+70808e00
+70800602
+20205d6e
+18000401
+67e082e2
+47114024
+70808801
+6059008e
+70800602
+20405d6e
+6fe082e7
+20600000
+6fe140dd
+1fe0fe01
+67e140dd
+6ff0812c
+c301dd6e
+20600000
+78547c00
+1fe22400
+6fe0c4ae
+c1800000
+78347c00
+1a427e00
+20205d82
+6fe0c4ae
+c000dd82
+c0015d88
+c001dd90
+c0025d94
+c002dd9a
+20600000
+67e1c4a7
+1a227e00
+67e144aa
+604944ac
+7044ae02
+20205daf
+20405daf
+7044ae03
+20405db4
+da2002e2
+70808804
+6fe1c4a7
+d8400020
+20205dc5
+20405daf
+20405de8
+7044ae04
+20600000
+20405daf
+7044ae05
+20405db4
+20405da7
+20405dc1
+20205da2
+20405daf
+20405db4
+58000005
+20405d65
+c3800000
+7044ae00
+6fe14473
+20207e7a
+6fe20964
+684944aa
+184085fc
+e7e20002
+20600000
+684944aa
+18422200
+184085fc
+efe20002
+67e20964
+684944ac
+6fe1c4a7
+20600000
+20405e13
+20405b62
+58000000
+67e202e2
+20600000
+7002e206
+58000000
+67f1008e
+58000001
+67f10088
+580002e2
+67f1008a
+70800602
+20205d6e
+7002e2ab
+20205db5
+7002e2b9
+20205db5
+18408404
+60590088
+d8400002
+1a20a3fc
+e0408011
+1ff10400
+e0408005
+1fec8400
+e0408005
+e7e08005
+1a227e00
+67f1008a
+58000000
+67f1008e
+70800602
+20405d6e
+20205de8
+6059008e
+1ff10400
+604882e3
+1fec8400
+604882e4
+67e082e5
+58000004
+67f10088
+7002e203
+580002e2
+67f1008a
+1a227e00
+67f1008c
+6ff08086
+2a2c000f
+7920fe06
+67f08086
+70800602
+6ff0812c
+c283dde4
+d8e00003
+20205d6e
+580007d0
+2040137f
+20405db4
+580002e7
+67f1008c
+58000005
+20405d65
+c2805de8
+20600000
+6059008e
+58000004
+67f10088
+7002e203
+580002e2
+67f1008a
+1a227e00
+67f1008c
+6ff08086
+2a2c000f
+7920fe06
+67f08086
+70800602
+6ff0812c
+c283ddfe
+d8e00003
+20405c99
+20405d6e
+2feffe02
+20405c92
+6fe082e3
+1ff02400
+6fe082e4
+1fed7e00
+9a41a400
+6fe082e5
+9a41fe00
+9840fe00
+67e082e5
+1fecfe00
+67e082e4
+1fecfe00
+67e082e3
+20600000
+6fe0c4b7
+6848c4b9
+98467c00
+2422de18
+20405e24
+6fe0c4b7
+d8400020
+2040612c
+6fe0c4ba
+d8400021
+2040612c
+6fe0c4b8
+d8400022
+2040612c
+6fe0c4b9
+d840001f
+2020612c
+58100d0e
+67e1c4b7
+5812110f
+e7e18005
+20600000
+70801001
+20600000
+70809105
+70809207
+70809307
+70809407
+70809507
+70809605
+70809700
+20600000
+7080910c
+7080920d
+7080930d
+7080940d
+7080950d
+7080960c
+70809700
+20600000
+20405e70
+6fe0c4c4
+d840006c
+2040612c
+6fe0c4c5
+d840006d
+2020612c
+20405e77
+20205e3c
+6ff0812c
+c302de44
+20600000
+67e082e6
+580002e6
+67f1009a
+58000001
+67f10098
+6059009e
+6231009c
+70809001
+70800604
+20205e44
+58000000
+67f1009e
+67f1009c
+60590098
+6231009a
+70809001
+70800604
+20205e44
+79200028
+70448508
+20600000
+793f8028
+70448520
+20600000
+6fe0c47b
+9a40fe00
+67e082e4
+20205e66
+6fe102e4
+1ff0fe00
+67e082e4
+58000003
+67f10098
+7002e3a0
+7002e5a1
+20205e85
+60490964
+20405e70
+68490964
+20405e9f
+20205e77
+6fe0c4c3
+c17f8000
+c3035e75
+580249f0
+2040137f
+6848c4c3
+2020610d
+6848c4c3
+20206109
+4711c024
+c5145e5f
+6fe1447b
+9a40fe00
+1ff0fe00
+67e102e4
+47124024
+c5145e63
+58000004
+67f10098
+7002e3a0
+7002e6a1
+580002e3
+67f1009a
+6059009e
+6231009c
+58000002
+2a2c000f
+7920fe00
+67f08090
+70800604
+d8e00005
+20405c99
+20405e44
+2feffe04
+20405c92
+c5145e9a
+6fe102e4
+1ff0fe00
+9840fe00
+1ff0fe00
+67e102e4
+20600000
+6fe082e4
+9840fe00
+1ff0fe00
+67e102e4
+20600000
+6fe1447b
+9a40fe00
+67e1095c
+4712c024
+60490964
+6221097b
+20405eb4
+68490974
+6a21097b
+6fe1095c
+20405ed5
+6fe10974
+6849097b
+98408400
+6049097b
+6849095c
+98408400
+6049095c
+6fe10964
+243a5ea5
+20600000
+47134024
+6fe0c485
+1fe0ffff
+6849095c
+9841fe00
+1fe0fe01
+67e18978
+6fe10964
+9840fe00
+68498978
+98467e00
+24215ec6
+67e10964
+6fe18978
+6849095c
+98467e00
+67e10974
+20600000
+6fe10964
+67e10974
+58000000
+67e10964
+20600000
+1a427e00
+18408402
+60590098
+1a20a3fe
+e8418011
+18422400
+d84000a0
+e0408011
+e7e08005
+20205ee2
+1fe22400
+4713c024
+c5145ecb
+1a427e00
+18408403
+60590098
+1a20a3fd
+e8418011
+18422400
+d84000a0
+e0408011
+1ff0fe00
+e7e10005
+6231009a
+58000000
+67f1009e
+70809001
+70800604
+20405e44
+e2418011
+47144025
+7002e600
+58000001
+67f10098
+7002e3a0
+580002e3
+67f1009a
+58000000
+67f1009e
+67f1009c
+58000003
+67f08090
+70800604
+20405e44
+6ff0812c
+c4030000
+200005dc
+6fe082e6
+1fe0fe01
+67e082e6
+1fe67c28
+24610000
+20205eeb
+18427200
+1fe20400
+4714c025
+18498400
+20405f3c
+70804780
+70804786
+60590045
+18408408
+70804787
+6ff08007
+e7e08011
+1a20a201
+c2005f06
+70804786
+70804780
+70804700
+20205f44
+20405f34
+70804780
+18498400
+1a220c00
+efe08006
+da400008
+1fe17c01
+2442df50
+1fe37e00
+18408401
+1a40a5ff
+2422df18
+c2005f16
+70804780
+70804700
+20205f44
+6ff10a14
+67e1095c
+708a146a
+708a150b
+20600000
+6fe1095c
+67f10a14
+20600000
+20405f22
+6ff08a0a
+79207e01
+67f08a0a
+200000c8
+6ff08a0b
+79207e00
+67f08a0b
+200007d0
+20600000
+20405f2a
+6ff08a0b
+793ffe05
+79207e04
+79207e03
+67f08a0b
+200001f4
+20600000
+20405f2a
+6ff08a0b
+79207e05
+79207e04
+793ffe03
+67f08a0b
+200001f4
+20600000
+47154025
+6ff08a0b
+793ffe05
+793ffe04
+793ffe03
+793ffe00
+67f08a0b
+200000c8
+6ff08a0a
+793ffe01
+67f08a0a
+20205f27
+70804780
+2000000a
+60590045
+70804781
+2000006e
+20600000
+20407ec5
+20205f5a
+20407ec7
+20205f5a
+1ff10400
+20545f8d
+24545f91
+1fef7e00
+1ff10400
+20545f85
+24545f89
+24345f66
+6ff10050
+793ffe0f
+67f10050
+20600000
+6ff10050
+793ffe0e
+67f10050
+20600000
+67f10052
+20600000
+67f10062
+20600000
+20405f72
+20205f6a
+20405f72
+20205f6c
+20405f77
+9846fc00
+20407e64
+1807fe00
+20600000
+6ff08043
+c3005f7b
+5adc6c00
+20600000
+596e3600
+20600000
+6ff08043
+1fe17efe
+67f08043
+20600000
+6ff08043
+1fe1fe01
+67f08043
+20600000
+67f1005a
+67f1005e
+6059005c
+20600000
+67f1006a
+67f1006e
+6059006c
+20600000
+67f10054
+67f10058
+60590056
+20600000
+67f10064
+67f10068
+60590066
+20600000
+6951005a
+6a11005c
+6871005e
+20600000
+6951006a
+6a11006c
+6871006e
+20600000
+69510054
+6a110056
+68710058
+20600000
+69510064
+6a110066
+68710068
+20600000
+6071005e
+20600000
+6071006e
+20600000
+60710058
+20600000
+60710068
+20600000
+20405f9d
+6ff10112
+98608600
+20205fa9
+20405fa1
+6ff10158
+98608600
+20205fab
+20405fbd
+20205f95
+20405fbd
+20205f99
+20405fa5
+20205fc1
+20405fa7
+20205fc1
+60610983
+61410981
+6201097f
+20600000
+68610983
+69410981
+6a01097f
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20415fd3
+20628000
+20215fc7
+1f20f208
+1f20f3fc
+20415fd6
+20628000
+20215fcc
+1f20f204
+20205fd9
+20405fd3
+efe40006
+e7e40003
+20600000
+efe20006
+e7e20003
+20600000
+1f227e00
+207a0000
+efe08006
+e7e08003
+c2005fdb
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20415fed
+20628000
+20215fe1
+1f20f208
+1f20f3fc
+20415ff0
+20628000
+20215fe6
+1f20f204
+20205ff3
+20405fed
+efe40003
+e7e40005
+20600000
+efe20003
+e7e20005
+20600000
+1f227e00
+207a0000
+efe08003
+e7e08005
+c2005ff5
+20600000
+70095b3d
+202078dc
+4715c025
+6fe0c48b
+207a0000
+204060a0
+2042e0a6
+20407ecb
+2040602f
+6fe0c48b
+1fe22600
+68494489
+604900ee
+1a627e00
+203a5ff9
+1a60a7ff
+18422200
+efe08011
+684880e6
+98467c00
+2042e016
+20216012
+efe08011
+1fe0fe01
+e7e08011
+684900ee
+18408422
+604900ee
+20206006
+58000000
+e7e08011
+6fe080e7
+e7e08005
+c099e024
+da4041cb
+efe30006
+e7e40005
+58000000
+e7e40005
+1a420c00
+20407d7f
+18007c01
+20600000
+c01b6028
+c01be02c
+da404316
+2020601c
+d8c043ac
+20407d7f
+d8c04316
+20206021
+d8c043a4
+20407d7f
+2020602a
+20407ec7
+6fe0c48b
+207a0000
+47164025
+6fe1478f
+c2806052
+c4048000
+6fe0c36a
+c000604b
+6fe0829c
+2fe180c0
+2020e03e
+2fe18040
+2020e050
+20206045
+20366042
+6fe0c34e
+c300e04b
+20206045
+2040604b
+20740000
+20206045
+6fe0c39d
+c283e048
+2020604e
+6fe30297
+67e443a4
+2020604e
+7000e735
+6fe30297
+20206054
+7000e737
+20206054
+7000e736
+20206054
+7000e733
+6fe30040
+67e300e8
+6fe14489
+e840803f
+1fe0fe01
+67e100ee
+604880e6
+6fe0c48b
+1fe22600
+6fe100ee
+1fe22200
+2040606c
+20740000
+684900ee
+18408422
+604900ee
+184085ff
+efe08002
+67e080e6
+1a60a7ff
+2422e05c
+6fe0c48b
+1fe0ffff
+67e080e6
+20600000
+6fe080e7
+c099e073
+da4000e7
+df200007
+20407e66
+2022fec5
+20600000
+c01b6076
+c01be091
+2020606e
+e8408011
+98467c00
+24628000
+d8a0098e
+df200010
+20407d9b
+6fe1829a
+67e1898e
+20406088
+6fe109ab
+1ff0fe00
+1fed0400
+efe08006
+9840fe00
+68498297
+98467c00
+2022fec5
+20600000
+d8c0098e
+20406e28
+efe08011
+20406e29
+18006c38
+18006c00
+20406dbf
+d8a0099e
+20206e3c
+e8408011
+98467c00
+24628000
+18c22200
+18c0a608
+da4043a4
+df200008
+20407e66
+2022fec5
+1a622200
+da4043ac
+df200008
+20407e66
+2022fec5
+20600000
+6fe14489
+e840803f
+1fe0fe22
+efe0803f
+98467c00
+20600000
+6fe0c48b
+1fe27200
+68494489
+58000000
+e7e08002
+18408422
+1fe0fe01
+c20060aa
+20600000
+4716c025
+20407ec9
+2040602f
+6fe08030
+79347e06
+67e08030
+243460ba
+1a208c0a
+d8a041cb
+20407d7f
+202060d0
+7041ca00
+20600000
+20407ec9
+2040602f
+243460c7
+6fe100ee
+1fe08c01
+d8a043ac
+20407d7f
+d8a04316
+20407d7f
+70432601
+20600000
+70432600
+20600000
+7000e734
+202060cc
+7000e733
+6fe0c09a
+c0055ffb
+c00445c6
+20600000
+6fe441cb
+684c41d3
+9841fe00
+207a0000
+7041ca01
+20600000
+47174025
+79200407
+204060fd
+7d208407
+4717c025
+18467cff
+20628000
+284c0007
+18410e1f
+6fe2009e
+f920fe00
+67e2009e
+6fe200a2
+fd20fe00
+67e200a2
+20600000
+47184026
+18467cff
+20628000
+284c0007
+18410e1f
+6fe2009e
+f93ffe00
+67e2009e
+6fe200a2
+f93ffe00
+67e200a2
+20600000
+204060e6
+202060f7
+18467cff
+20628000
+2455e0da
+20406124
+58000000
+284ffe07
+7d20fe06
+7920fe07
+2020611f
+d8a0811c
+18410e07
+18497e00
+1fe17e03
+98a08a00
+efe08005
+284ffe07
+2020e107
+afec0000
+20600000
+afefffff
+20600000
+18467cff
+20628000
+2fcffe07
+20206110
+18467cff
+20628000
+2fcc0007
+58000000
+7d20fe07
+98428400
+20406124
+5800003f
+284ffe07
+7920fe00
+2020611f
+20406124
+efe08005
+c280611d
+284c0007
+20600000
+284ffe07
+20600000
+e7e08005
+20600000
+20406124
+58000000
+2020611f
+18417e3f
+d8a08070
+98a08a00
+20600000
+1fe104ff
+1fecfe00
+2020612c
+c4038000
+1fe17e3f
+d8a08070
+98a08a00
+e0408005
+20600000
+1841043f
+58008070
+98408c00
+efe08006
+20600000
+df200014
+d8c08070
+18c20a00
+efe08006
+c001614a
+c001e14a
+c002614a
+c002e14a
+c003614a
+c003e14a
+c00fe14a
+c010614a
+c010e14a
+c011614a
+c011e14a
+c016614a
+c016e14a
+c000614a
+c2006138
+20600000
+58000040
+e7e08005
+20206148
+58000080
+e7e08005
+20206148
+4718c026
+6fe40a34
+203a615d
+d8c00a34
+d8a04492
+df200003
+efe18006
+1ff20400
+e0410005
+1fec8400
+e0410005
+c2006156
+20600000
+5800469a
+67e14492
+5800ab77
+67e14498
+580073d0
+67e1449c
+58009658
+67e14496
+20600000
+47194026
+6a508a12
+708a123d
+708a11aa
+708a0a0c
+6ff08a09
+79207e07
+67f08a09
+708a0b04
+2000003c
+708a1600
+708a1706
+20406182
+67f08a97
+7080dc03
+2000003c
+6ff08053
+79207e07
+67f08053
+200003e8
+6ff10150
+67e144a4
+6ff08053
+793ffe07
+67f08053
+708a9700
+62508a12
+20600000
+6fe0c4a2
+c0006189
+c000e18b
+6fe0c4a3
+1fe9fe00
+1fe1fe07
+20600000
+58000057
+20600000
+5800004f
+20600000
+4719c026
+6fe0c4a2
+c0006193
+c000e199
+c001619f
+20600000
+58000064
+67e144a0
+6849449c
+6fe14496
+da60012c
+202061a4
+58000064
+67e144a0
+6849449a
+6fe14494
+da60012c
+202061a4
+580000c8
+67e144a0
+68494492
+6fe14498
+da60012c
+98462200
+6fe144a4
+98467e00
+242161b1
+684944a0
+984fa400
+1a627e00
+9a2ffe00
+9a467e00
+9a26fc00
+20407e64
+1807fe00
+20600000
+18427e00
+684944a4
+98467e00
+684944a0
+984fa400
+1a627e00
+9a2ffe00
+9a40fe00
+202061ad
+efe40011
+67e4095c
+6fe1095c
+6849095e
+98462200
+6fe10962
+98462400
+68490960
+98467c00
+244161ca
+1a4ffe64
+9a26fc00
+20407e64
+1807fe00
+205a61d2
+20600000
+6fe0c4a6
+79207e00
+67e0c4a6
+20600000
+6fe0c4a6
+793ffe00
+67e0c4a6
+20600000
+6848c4a6
+79200401
+6048c4a6
+20600000
+6848c4a6
+793f8401
+6048c4a6
+20600000
+6fe144c8
+efe0803f
+207a0000
+1fe27200
+6fe144c8
+1fe0fe03
+1fe22200
+e8408011
+204060f4
+1a20a201
+c20061e1
+20600000
+6fe144c8
+1fe0fe03
+1fe22200
+18002400
+58000000
+67e109de
+e8408011
+204060fd
+471a4026
+6fe109de
+1a420e00
+f920fe00
+67e109de
+1a20a201
+1a40a401
+6fe144c8
+efe0803f
+9a42fc00
+2422e1ec
+6fe109de
+684944ca
+9842fc00
+20628000
+78347c00
+20600000
+6fe144c8
+efe0803f
+207a0000
+1fe27200
+6fe144c8
+1fe0fe03
+1fe22200
+e8408011
+204060d6
+1a20a201
+c2006206
+20600000
+d8e00009
+20407de9
+247a0000
+58000020
+d8e00009
+20407ddb
+78547c00
+204061ff
+471ac026
+6fe144c8
+efe0803f
+207a0000
+204061e6
+24347855
+20407853
+78547c00
+6fe109de
+67e109e5
+7009e700
+18000e00
+6fe144ca
+1fe30400
+604944ca
+1fe17e01
+684909e5
+18412201
+18430400
+604909e5
+9a22fc00
+2442e234
+6fe144c8
+efe0803f
+684889e7
+18408401
+604889e7
+18420e00
+98e2fc00
+2422e21f
+6fe109de
+67e144ca
+20600000
+471b4026
+6fe144c8
+1fe0fe01
+efe1003f
+20207e7a
+6ff08042
+9a21fe00
+67f08042
+6ff10050
+793ffe0d
+67f10050
+20000064
+20600000
+6ff08042
+c2836246
+c283e248
+58b71b00
+20600000
+596e3600
+20600000
+580080e8
+20600000
+6fe0895d
+c282624e
+c3026255
+20600000
+78347c00
+1fe10e0f
+2040625c
+1807a400
+18427e00
+9a462200
+20600000
+78547c00
+1fe10e0f
+2040625c
+1807a200
+18427e00
+9a262400
+20600000
+6ff080d8
+f9347e00
+67f080d8
+20600000
+6849895e
+20406241
+9846fc00
+20407e64
+18078400
+6fe08961
+984ffe00
+1fe6fc64
+20407e64
+2040624a
+6fe0895d
+20406272
+6fe0895c
+6848895d
+1841040f
+184d0400
+9841fe00
+2020627b
+1fe17e0f
+d8a080a0
+1feffe04
+98a08a00
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+20600000
+78347c00
+20406290
+20206280
+78547c00
+2040628b
+18427e00
+1fed7e00
+18e08410
+9841fe00
+20406128
+6ff08084
+70808400
+200004b0
+f9347e00
+67f08084
+20600000
+1fe20400
+1fecfe00
+1fe20e00
+20600000
+78547c00
+2040628b
+6ff080dd
+fd347e00
+67f080dd
+20206280
+d8402710
+984ffe00
+d841312d
+9846fc00
+20407e64
+18078400
+58000800
+98467e00
+1fe20400
+1841040f
+6058800b
+1fe20400
+18518400
+60588004
+20600000
+78367c00
+202062a7
+78567c00
+6ff08043
+79367e03
+67f08043
+20600000
+d8400031
+67f200ca
+67f100ce
+605880d0
+20600000
+6ff10130
+20600000
+687100ce
+695100ca
+6a1100cc
+20600000
+607100ce
+20600000
+20407ec5
+dd600000
+204062b0
+c00162fa
+1fe67c04
+20610000
+204062b2
+e8410003
+5800a654
+20406303
+242162e8
+1b020400
+58017f8e
+20406303
+242162e8
+1b020400
+58002328
+20406303
+202162df
+e8410003
+58001194
+20406303
+202162df
+204062b0
+1fe67c85
+20610000
+df200020
+e8410003
+58000230
+20406303
+202162df
+e8410003
+5800069a
+20406303
+242162e4
+1b020400
+58000230
+20406303
+242162e5
+1b020400
+5800ffff
+98467c00
+2022e2ff
+202062b6
+79205620
+1d635600
+c20062d3
+202062f3
+204062b0
+1fe67c07
+20610000
+e8410003
+58002328
+20406303
+202162df
+e8410003
+580008ca
+20406303
+202162df
+e8410003
+58000230
+20406303
+202162df
+204062b6
+1a627e00
+20207e7a
+204062b2
+e8410003
+5800ffff
+98467c00
+24628000
+204062b6
+20407ec7
+1a627e00
+20207e7a
+6a40c4d6
+18423000
+9a4fa400
+18438400
+98462200
+2441630c
+1a2ffe64
+9a467c00
+20600000
+1a262200
+20600000
+7041f018
+70804201
+58001d4b
+67f10040
+df20000b
+da200155
+efe10011
+1fe3fe00
+e7e10011
+1a20a202
+c2006314
+20600000
+1b63b600
+20600000
+70804204
+7041f00c
+58000ea5
+67f10040
+20600000
+70804205
+2020631d
+20758000
+70465500
+7003c003
+7003c103
+7003c511
+7003c613
+58000000
+67e183c2
+67e0c4e7
+70478e00
+58000000
+67e0c4e7
+67e0c652
+67e0c64b
+6fe0c659
+c000e335
+70465750
+20600000
+70465700
+20600000
+18418402
+20600000
+18427e00
+1fedfe00
+67e0c650
+18007e3f
+1fedfe00
+67e0c64f
+18007e01
+1fedfe00
+67e0c64e
+2040636f
+18427e00
+20600000
+1fedfe00
+67e0c650
+18007e73
+1fedfe00
+67e0c64f
+18007e01
+1fedfe00
+67e0c64e
+2020636f
+6fe0c651
+203a6352
+58000070
+20600000
+580000aa
+20600000
+1fedfe00
+67e0c650
+18007eef
+20406363
+684903ca
+18420a00
+e7e08005
+18a20400
+604903ca
+18007eff
+20406363
+684903ca
+18420a00
+e7e08005
+20600000
+1fedfe00
+67e0c64f
+6fe1464f
+1fed7e00
+67e183c7
+da200107
+da40000f
+2040637c
+1fe2fed7
+1fe47e00
+1fedfe00
+20600000
+6fe1c64e
+67e183c7
+da200107
+da40000f
+2040637c
+1fed7e00
+da400007
+2040637c
+1fe2fe2b
+1fe47e00
+1fedfe00
+1fe20400
+20600000
+da600000
+1a427200
+20407d30
+1fe20400
+18427e00
+1a63a600
+c3046385
+9a228400
+1a60a601
+18438400
+6fe183c7
+1a40a5ff
+2a41feff
+2020e38f
+1a427200
+20407d30
+2feffe00
+79208400
+20206380
+18437e00
+20600000
+6848c64b
+184b8400
+79200400
+6fe0c651
+245a6337
+604883e0
+20600000
+18438400
+6fe0c651
+793a0400
+20600000
+684883cf
+7003d1d7
+204064d5
+6fe0c4e4
+79207e06
+79207e07
+67e0c4e4
+70465100
+202064b6
+6fe0c4e4
+79207e07
+67e0c4e4
+202064b6
+471bc026
+6fe0c78e
+c00063ad
+2020646b
+6fe10315
+1fe20c00
+204063d7
+6fe083cf
+c00063b3
+20206437
+471c4027
+6fe083d0
+c01fe39c
+c039e3a5
+c077e3ba
+c029e463
+20600000
+6fe103d4
+1fe20c00
+204063e2
+6fe083d6
+c020e3c4
+c02063cc
+c038e405
+c0386411
+c024e41c
+202064b6
+204063ce
+202063c6
+6fe0c4e7
+79207e00
+79207e01
+67e0c4e7
+204064ff
+202064b6
+204063ce
+202064b6
+204063ea
+202063f6
+204063ea
+efe08006
+1fe97e00
+67e0c658
+efe08006
+67e083db
+20600000
+efe08006
+67e083ce
+1fe97e00
+67e083cf
+efe08006
+67e083d0
+204063ed
+604903d2
+18c27e00
+67e103d4
+20600000
+efe08006
+1fe37e00
+67e083d6
+204063ed
+604903d7
+18c27e00
+67e103d9
+20600000
+6fe103d9
+1fe20c00
+20600000
+efe08006
+1fe20400
+18430400
+c3800000
+efe08006
+1fe9fe00
+1ff27e00
+98408400
+20600000
+efe08006
+67e0c64b
+efe08006
+67e083dc
+efe08006
+67e083dd
+efe08006
+67e083de
+efe10006
+67e1464c
+efe08006
+67e083df
+efe08006
+67e0c656
+20600000
+204063d0
+20206407
+6fe0c4e7
+79207e05
+79207e06
+67e0c4e7
+6848c64b
+184b8400
+18418403
+20406530
+70465503
+202064b6
+70095b08
+204078dc
+204063d0
+6fe0c658
+1fe67c01
+2022e418
+2020137c
+6fe0c4e7
+79207e07
+67e0c4e7
+202064b6
+204063ea
+efe08006
+67e0898e
+20405383
+20405391
+5800000e
+e7e10005
+6fe144dd
+e7e10005
+6fe0c651
+1fe3fe00
+79207e00
+e7e08005
+471cc027
+580015ef
+e7e10005
+58001191
+e7e10005
+6fe0898e
+e7e08005
+58000007
+e7e28005
+58000001
+e7e10005
+2040634e
+e7e08005
+20600000
+20206438
+471d4027
+6fe083d0
+c039e440
+c01fe444
+c077e45e
+c07fe456
+c029e465
+20600000
+6fe0c4e7
+79207e03
+67e0c4e7
+202064b6
+6fe0c4e7
+79207e03
+79207e02
+67e0c4e7
+6fe083ce
+20406345
+67e083d1
+204064d5
+6fe083ce
+1feb7e00
+67e0c64b
+1febfe00
+793ffe01
+79207e00
+d8404653
+604903ca
+20406354
+202064b6
+6fe103d4
+1fe20c00
+1fe0fe01
+67e103d4
+efe08006
+6848c656
+9840fe00
+67e0c656
+20406561
+20406391
+20406547
+2040656a
+202064b6
+70095b09
+204078dc
+2040632d
+6fe083ce
+20406345
+67e083d1
+204064d5
+202064b6
+6fe10315
+1fe20c00
+204063d7
+6fe083cf
+c0006471
+202064a5
+471dc027
+6fe083d0
+c01fe39c
+c039e3a5
+c077e477
+202064b6
+6fe103d4
+1fe20c00
+204063e2
+6fe083d6
+c020e480
+c0206480
+c038e48b
+c038649b
+202064b6
+204063ce
+6fe0c64b
+1fe37e00
+6848c652
+98467c00
+2022e487
+2020137c
+6fe0c4e7
+79207e01
+67e0c4e7
+202064b6
+204063d0
+6fe0c658
+6848c652
+98467c00
+2022e492
+2020137c
+202064b6
+6fe0c4e7
+79207e05
+79207e06
+67e0c4e7
+6848c64b
+184b8400
+18418403
+20406530
+202064b6
+204063d0
+6fe0c658
+6848c652
+98467c00
+2022e4a1
+2020137c
+6fe0c4e7
+79207e07
+67e0c4e7
+202064b6
+6fe083cf
+6848c652
+98467c00
+2022e4ab
+2020137c
+202064b6
+6fe083d0
+c039e4b0
+c077e45e
+c07fe456
+c029e4b5
+6fe0c4e7
+79207e03
+67e0c4e7
+202064b6
+202064b4
+20206465
+20600000
+6fe0c655
+207a0000
+c001e4bb
+2020137c
+70465500
+20405383
+d8400001
+6848c64b
+184b8400
+18418403
+da2000aa
+2040651b
+20405391
+18a20c00
+efe10006
+203a137c
+20600000
+20405391
+58000004
+e7e10005
+6fe144dd
+e7e10005
+6fe083ce
+e7e08005
+471e4027
+5800013f
+e7e10005
+6fe083d1
+e7e08005
+20600000
+20405383
+20405391
+58000004
+e7e10005
+6fe144dd
+e7e10005
+6fe083ce
+e7e08005
+471ec027
+58000173
+e7e10005
+6fe083d1
+e7e08005
+20600000
+20405391
+5800000e
+e7e10005
+6fe144dd
+e7e10005
+6fe0c651
+1fe3fe00
+79207e00
+e7e08005
+471f4027
+580015ef
+e7e10005
+58001183
+e7e10005
+18427e00
+e7e08005
+580000f0
+e7e18005
+5800007f
+e7e10005
+58000000
+e7e08005
+58000001
+e7e08005
+2040634e
+e7e08005
+70465710
+20600000
+20405383
+20405391
+5800000e
+e7e10005
+6fe144dd
+e7e10005
+6fe0c651
+1fe3fe00
+79207e00
+e7e08005
+471fc027
+580015ef
+e7e10005
+58001181
+e7e10005
+6fe0c64b
+e7e08005
+580000e0
+e7e18005
+6fe1465a
+e7e10005
+58000000
+e7e08005
+6fe0c65c
+e7e08005
+2040634e
+e7e08005
+20600000
+20405391
+58000008
+e7e10005
+6fe144dd
+e7e10005
+6fe0c651
+1fe3fe00
+79207e00
+e7e08005
+47204028
+580009ef
+e7e10005
+580005e3
+e7e10005
+18427e00
+e7e08005
+5800008d
+e7e08005
+2040634e
+e7e08005
+20600000
+20405383
+20405391
+58000008
+e7e10005
+6fe144dd
+e7e10005
+18421600
+6fe0c651
+1fe3fe00
+79207e00
+e7e08005
+4720c028
+580009ef
+e7e10005
+580005e1
+e7e10005
+19627e00
+e7e08005
+5800008d
+e7e08005
+2040634e
+e7e08005
+20600000
+47214028
+6fe0c657
+207a0000
+6ff10112
+247a0000
+1a227e00
+67e0895d
+6048895c
+2040534f
+247a0000
+20405383
+20405391
+58000005
+e7e10005
+6fe144dd
+e7e10005
+6fe083e0
+e7e08005
+580001ff
+e7e10005
+6fe0c657
+e7e08005
+6fe0c654
+e7e08005
+70465700
+20600000
+4721c028
+6fe0c659
+c1008000
+6fe103d2
+207a0000
+6fe0c657
+1fe0fe01
+67e0c657
+20600000
+6fe1465d
+20207e7a
+47224028
+6fe0c656
+207a0000
+1fe0ffff
+67e0c656
+6fe1464c
+684947ac
+98467c00
+20216576
+67e147ac
+6fe0c657
+203a657e
+7003e301
+6fe0c654
+67e083e2
+580000ff
+67e083e1
+20206583
+7003e300
+6fe0c653
+67e083e2
+580000ef
+67e083e1
+4722c028
+6fe147ac
+1fe67c7f
+2021658a
+6fe083e3
+1fe0fe01
+67e083e3
+20406391
+6fe147ac
+1fe0fe08
+684883e3
+9840a200
+204052fb
+67e10328
+1fe0fe04
+67e1032a
+1fe20a00
+6fe083e0
+e7e08005
+6fe083e1
+e7e08005
+204065b4
+204065c5
+47234028
+6fe1465f
+1fe20600
+6fe147ac
+1fe27200
+20405fdf
+18a20400
+18627e00
+67e1465f
+18420a00
+6fe083e2
+e7e08005
+6fe10328
+1fe20a00
+6fe147ac
+684883e3
+9840fe00
+1fe0fe04
+e7e10005
+6fe144dd
+e7e10005
+70465700
+6fe14661
+c0003969
+7009d100
+20600000
+4723c028
+6fe147ac
+1fe67c7f
+242165bc
+1fe3fe00
+79207e00
+e7e08005
+20600000
+6fe147ac
+1fe97e00
+1ff18400
+1fe17e7f
+1fe3fe00
+793ffe00
+e7e08005
+e0408005
+20600000
+6fe0c657
+207a0000
+e7e08005
+20600000
+47244029
+204078f2
+20403184
+20405a9e
+4724c029
+204070d7
+204070b0
+204070c1
+2040534f
+247a0000
+20404e62
+2040534f
+247a0000
+47254029
+20406613
+20405020
+204064b7
+204065dd
+4725c029
+20203180
+6fe08330
+c2805143
+c283d14d
+20600000
+47264029
+20405355
+207a0000
+6fe0804b
+c3830000
+20405339
+67e100be
+1fe20c00
+efe10006
+1fe0fe04
+67e141e6
+7041e506
+4726c029
+6fe144d9
+203a65fc
+6fe0804b
+c4038000
+793ffe07
+67e0804b
+7041e505
+684944d9
+6fe100be
+9840fe00
+67e100be
+6fe141e6
+98467e00
+67e141e6
+6fe141e6
+203a137c
+d8400104
+98467e00
+2022e607
+24216607
+604941e6
+6fe144d9
+9840fe00
+67e144d9
+20206609
+58000000
+67e144d9
+6fe0804b
+79207e06
+67e0804b
+20600000
+6fe0c791
+c2806611
+70033801
+20600000
+7003380f
+20600000
+6fe0c78e
+243a6619
+6fe08337
+207a0000
+70033700
+20600000
+47274029
+6fe08338
+207a0000
+c000e639
+c0016692
+c001e63f
+c0026696
+c01de649
+c01e6699
+c006e64e
+c007669e
+c007e651
+c00866a4
+c008e657
+c00966a8
+c009e65d
+c00a66ac
+c00ae663
+c00b66b0
+c00be669
+c00c66b5
+c00ce66f
+c00d66b9
+c00de675
+c00e66bd
+c00ee67b
+c00f66c2
+c00fe681
+c01066c6
+c010e68c
+c01166ca
+20600000
+204066d5
+70033802
+6fe0c4e3
+79207e00
+67e0c4e3
+20600000
+70033804
+6fe0c4e3
+c3810000
+70033803
+204066dc
+70033804
+6fe0c4e3
+79207e02
+67e0c4e3
+20600000
+20405355
+247a0000
+204066eb
+7003383c
+20600000
+204066e1
+7003380e
+20600000
+204066fb
+70033810
+6fe0c4e5
+79207e00
+67e0c4e5
+20600000
+20406702
+70033812
+6fe0c4e5
+79207e02
+67e0c4e5
+20600000
+20406707
+70033814
+6fe0c4e6
+79207e00
+67e0c4e6
+20600000
+2040670e
+70033816
+6fe0c4e6
+79207e02
+67e0c4e6
+20600000
+204066ef
+70033818
+6fe0c4e4
+79207e00
+67e0c4e4
+20600000
+204066f6
+7003381a
+6fe0c4e4
+79207e02
+67e0c4e4
+20600000
+20406713
+7003381c
+6fe0c4e4
+79207e06
+67e0c4e4
+20600000
+2040671a
+6fe0c4e7
+79207e00
+67e0c4e7
+7003381e
+20600000
+20406720
+6fe0c4e7
+79207e02
+67e0c4e7
+70033820
+6fe0c652
+1fe9fe00
+1fe1fe03
+d8404653
+604903ca
+20206354
+2040672a
+6fe0c4e7
+79207e04
+67e0c4e7
+70033822
+20600000
+6fe0c4e3
+c4008000
+70033803
+20206619
+6fe0c4e3
+c19f8000
+7003383b
+6fe08336
+c18b8000
+70033600
+7003380d
+20206619
+6fe0c4e3
+247a0000
+6fe0c791
+c28066cd
+c28366cf
+202066d3
+6fe0c4e5
+c4008000
+70033811
+20206619
+6fe0c4e5
+c19f8000
+70033813
+20206619
+6fe0c4e6
+c4008000
+70033815
+20206619
+6fe0c4e6
+c19f8000
+6fe0c791
+c28366cf
+202066d3
+6fe0c4e4
+c4008000
+70033819
+20206619
+6fe0c4e4
+c19f8000
+7003381b
+20206619
+6fe0c4e4
+c1ff8000
+6fe0c791
+c28366d1
+202066d3
+6fe0c4e7
+c4008000
+7003381f
+20206619
+6fe0c4e7
+c4018000
+70033821
+20206619
+6fe0c4e7
+c1ff8000
+202066d3
+7003380f
+20206619
+70033817
+20206619
+7003381d
+20206619
+70033800
+20600000
+4727c029
+20405369
+58000001
+1fe20400
+58000050
+1fe21600
+20205164
+4728402a
+20405369
+6fe144db
+1fe20400
+20205173
+4728c02a
+20405369
+6fe144db
+1fe20400
+d9600050
+20405188
+6fe0c4e3
+793ffe05
+67e0c4e3
+20600000
+4729402a
+20405376
+20406a56
+202051a3
+4729c02a
+20405369
+58000003
+1fe20400
+58000051
+1fe21600
+20205164
+472a402a
+20405369
+6fe144dd
+1fe20400
+20205173
+472ac02a
+20405369
+58000011
+1fe20400
+58000052
+1fe21600
+20205164
+472b402a
+20405369
+6fe144df
+1fe20400
+20205173
+472bc02a
+20405369
+58000013
+1fe20400
+58000053
+1fe21600
+20205164
+472c402b
+20405369
+6fe144e1
+1fe20400
+20205173
+472cc02b
+20405383
+7003ce03
+7003d11c
+204064c8
+70465101
+20600000
+472d402b
+20405383
+6848c652
+20406398
+6048c64b
+202064e3
+472dc02b
+20405383
+6848c64b
+20406392
+20406339
+67e083d1
+6848c64b
+20406392
+604883ce
+202064c8
+472e402b
+20405383
+6848c64b
+20406392
+2020651b
+472ec02b
+6fe10315
+98000c00
+efe08006
+1fe22400
+67e083ee
+efe10006
+67e103ef
+efe08006
+1fed1600
+efe08006
+99609600
+472f402b
+18c20400
+df200004
+d8a003fd
+20407d8c
+18420c00
+1a427e00
+c000e8d8
+c001674a
+c001e8d8
+c0026772
+c002e8d8
+c0036820
+c003e8d8
+202068df
+472fc02b
+204068ee
+2841fe01
+2020e95e
+2841feff
+2020e8e2
+efe10006
+67e103f5
+196097fe
+196097ff
+2422e8dc
+d96003e4
+efe1000b
+207a0000
+204069a0
+20405381
+18007e03
+e7e08005
+6fe103ef
+e7e10005
+18ebfe00
+1fe0fe05
+1fe0a605
+1ff0fe00
+e7e10005
+18e27e00
+1ff0fe00
+e7e10005
+e7e10005
+d8c003fd
+18e27200
+2022e76d
+efe20006
+e7e20005
+c200676a
+18007e00
+e7e08005
+1a627e00
+67e10326
+20600000
+4730402c
+efe20006
+67e203f7
+196097fc
+2040684c
+67e103f3
+196097fe
+20406946
+2022e8e2
+2a21fe05
+2020e780
+d8a003fd
+18000e00
+2020678f
+efe08006
+c08568e2
+efe10006
+243a678d
+efe08006
+c0ffe78b
+efe08006
+c0ffe789
+202067d6
+18c08dfb
+2020677d
+18c08dfc
+2020677d
+18c08dfd
+2020677d
+efe08006
+c004e7a4
+c0056792
+efe10006
+e7e10005
+18e08e01
+1ff0a400
+efe10006
+1ff0fe00
+1a40a401
+9a467c00
+242167a1
+1fe22600
+1a50fe00
+e7e10005
+18e08e01
+1a627e00
+20206798
+196097fb
+1a20a3fb
+202067a9
+efe10006
+e7e10005
+18e08e01
+196097fd
+1a20a3fd
+242168e2
+2422e78f
+196097ff
+2422e8e2
+20405381
+18a08a0a
+da2003fd
+18e27e00
+203a67c3
+efe10011
+203a67c3
+98002400
+6fe203f7
+98000400
+20406a05
+18c27e00
+203a67c0
+18c08dfd
+efe18006
+e7e18005
+20406979
+98007200
+20407dd4
+1a20a202
+18e08fff
+202067b0
+da200005
+204068a2
+6fe10326
+c005e961
+202068b8
+efe08006
+c00067cc
+c000e7ce
+c00167d1
+196097ff
+202067d4
+efe08006
+196097fe
+202067d4
+efe10006
+1ff0fe00
+196097fd
+67e103ec
+20600000
+196097fb
+204067c8
+2422e8dc
+684a03f7
+204069cf
+2422e8d9
+18c22200
+20405381
+1a220c00
+18a08a03
+18c21600
+20406980
+1fe22200
+6fe103ec
+1fe22400
+1a227e00
+9a462400
+6fe103f3
+9a467c00
+24216805
+78547c00
+6fe103ec
+203a67f8
+99608c00
+1a40a403
+1a427200
+1f227e00
+1fe0fe03
+1ff0fe00
+e7e10005
+1f227e00
+1ff0fe00
+e7e10005
+20206813
+1a20f206
+203467fc
+1f30fe00
+202067ff
+1f227e00
+1fe0fe02
+1ff0fe00
+e7e10005
+1f20f3fd
+1f30fe00
+e7e10005
+19620c00
+20206813
+78347c00
+6fe103f3
+1fe22200
+1a227200
+6fe103ec
+203a67f8
+99608c00
+1a227e00
+1fe0fe05
+1ff0fe00
+e7e10005
+1a227e00
+1ff0fe00
+e7e10005
+20407dd4
+2434681c
+18007e02
+e7e08005
+18c27e00
+99667e00
+1ff0fe00
+e7e10005
+2020681e
+18007e00
+e7e08005
+da200005
+202068ce
+4730c02c
+204068ee
+2841feff
+2020e8e2
+2040684c
+67e103f3
+196097fe
+20406946
+d8a003fd
+18000e00
+efe08006
+c0056854
+efe10006
+e7e10005
+18e08e01
+196097fd
+1a20a3fd
+242168e2
+2422e82a
+196097ff
+2422e8e2
+20405381
+18a08a0d
+6fe103e4
+98002600
+da2003fd
+efe10011
+203a6847
+98002400
+204069e4
+203a6845
+18c08dfd
+efe18006
+e7e18005
+20406979
+98007200
+20407dd4
+1a20a202
+2020683a
+204068a1
+6fe10326
+c0076964
+204068b8
+202068b8
+efe10006
+1ff0fe00
+1fe0fffd
+d84000c8
+98467c00
+24610000
+580000c8
+20600000
+18c08c04
+196097fb
+1a20a3fb
+2422e8e2
+204067c8
+2422e8dc
+d96003e4
+204069a0
+18e27e00
+203a6964
+67e08421
+1a427e00
+67e1041f
+d8e00000
+da200000
+20405381
+18a08a0a
+2040688a
+2434137c
+18c21600
+1fe22600
+9a20a200
+6fe103ec
+1fe22400
+203a6893
+1a227e00
+9a462400
+2022e885
+24216885
+6fe103f3
+9a467c00
+2022e87c
+2421687c
+1a427200
+2040687f
+6fe08421
+18e08e01
+98e67c00
+2022e8a1
+202068be
+1fe27200
+2040687f
+202068be
+18a08bfd
+1f220400
+1a627e00
+9a467e00
+99608c00
+20207dd4
+6fe08421
+18e08e01
+98e67c00
+20628000
+20206865
+20407ec7
+d8c003fd
+18ebfe00
+98c08c00
+e8420006
+204069cf
+24628000
+20406979
+20207ec5
+6fe103f3
+9a267c00
+242168ad
+1a227200
+1f220400
+19620c00
+20407dd4
+6fe1041f
+9a267c00
+2022e89f
+204068be
+202068b2
+204068a1
+202068b2
+da200007
+18007e00
+e7e08005
+204068ce
+68490326
+184085fb
+1850fe00
+e7e10005
+184085fd
+1850fe00
+e7e10005
+20600000
+1fe27200
+1f220400
+19620c00
+20407dd4
+204068be
+58000036
+e7e08005
+6fe1041f
+1ff0fe00
+e7e10005
+20600000
+58000036
+e7e08005
+184085fd
+1850fe00
+e7e10005
+20600000
+da200007
+58000002
+e7e08005
+6fe103ec
+98408400
+1850fe00
+e7e10005
+204068ce
+68490326
+184085fb
+1850fe00
+e7e10005
+184085fb
+1850fe00
+e7e10005
+20600000
+6fe10324
+98a67e00
+1fe67e00
+67e10326
+20405381
+1a227e00
+e7e08005
+6fe103ef
+e7e10005
+20600000
+20600000
+58000200
+67e1041d
+202068e4
+58000400
+67e1041d
+202068e4
+58000600
+67e1041d
+202068e4
+58000300
+67e1041d
+20405381
+e7e08005
+6fe103ef
+e7e10005
+58000200
+e7e10005
+6fe1041d
+e7e10005
+70032607
+20600000
+da400000
+18000400
+d8a003e4
+20406946
+2022e944
+1a40a401
+efe08006
+1a20a3ff
+196097ff
+2fe1f018
+2420e944
+2fe00e04
+2420e911
+18000401
+efe08006
+1a20a3ff
+196097ff
+c0806905
+efe08006
+1a20a3ff
+196097ff
+c0006916
+20206908
+18c08c01
+1a20a3ff
+196097ff
+18c08c02
+1a20a3fe
+196097fe
+2841fe00
+2020e93e
+18c08c0c
+1a20a3f4
+196097f4
+2020693e
+2fe00e02
+2420e914
+202068fc
+2fe00e01
+2420e944
+1a20a3fe
+196097fe
+efe10006
+1a467c04
+2022e91c
+e7e10005
+2841fe00
+2020e93e
+18c20400
+efe08006
+c0806937
+efe08006
+c0806937
+efe08006
+c0886937
+efe08006
+c0806937
+efe08006
+c0c06937
+efe08006
+c0806937
+efe08006
+c0806937
+efe08006
+c0c06937
+efe08006
+c0afe937
+efe08006
+c0cde937
+efe08006
+c09a6937
+efe08006
+c07de93c
+18420c00
+18c08c0c
+18000e00
+18000400
+2020693c
+196097f4
+1a20a3f4
+18000400
+2a21fe00
+2420e8f3
+18007e00
+e7e10005
+20600000
+d84000ff
+20600000
+4732402c
+efe08006
+196097ff
+2fe1f030
+2420e95c
+2fe00e07
+2020e955
+2fe00e06
+2020e957
+2fe00e05
+2420e95c
+efe08006
+1fe22200
+196097ff
+2020695a
+18c08c02
+196097fe
+efe10006
+1ff0a200
+196097fe
+18007e01
+20600000
+18007e00
+20600000
+58000003
+67e083ee
+20206966
+58000005
+67e083ee
+20206966
+58000007
+67e083ee
+20405381
+6fe083ee
+1fe22400
+e7e08005
+6fe103ef
+e7e10005
+58000500
+e7e10005
+2a41fe05
+2020e975
+2a41fe07
+2020e975
+58000000
+e7e28005
+20206977
+58350200
+e7e28005
+7003260a
+20600000
+20407d5b
+20407d5e
+20406980
+20407d55
+20407d58
+18427e00
+20600000
+efe08006
+1fe17207
+1fe97e00
+c080698a
+18007e01
+18000401
+20600000
+20407d35
+1fe08401
+20600000
+1f227e00
+1fe67c04
+20216987
+c002e991
+c0036994
+c003e998
+20600000
+efe08006
+1fe08402
+20600000
+efe10006
+1ff0fe00
+1fe08403
+20600000
+efe10006
+1ff0fe00
+e8410006
+18508400
+18500400
+9840fe00
+1fe08405
+20600000
+4732c02c
+18000e00
+da400000
+d8a003fd
+efe1000b
+207a0000
+204069ab
+18e27e00
+c1038000
+19609602
+202069a4
+98002600
+6fe14663
+98000c00
+18e27e00
+c1038000
+78547c00
+efe08006
+207a0000
+98007200
+efe10006
+9a667c00
+2422e9b8
+78347c00
+c20069b4
+e8420006
+18c22200
+243469cb
+d8c003fd
+df200007
+efe20006
+203a69c4
+98467c00
+2022e9cb
+c20069be
+20600000
+e0420005
+18e08e01
+1a220c00
+20406979
+9a40a400
+98c08c00
+202069ae
+1a220c00
+20406980
+98c08c00
+202069ae
+4733402c
+6fe14663
+98000c00
+efe08006
+203a7ec1
+1fe3fe00
+98c08c00
+efe20006
+98467c00
+20628000
+18a27e00
+67e1097d
+604c0964
+20406980
+98c08c00
+18c27e00
+6849097d
+18420a00
+684c0964
+1fe20c00
+202069d2
+4733c02c
+6fe14663
+98000c00
+efe08006
+203a6a02
+98007200
+efe10006
+9a667c00
+2022e9f2
+c20069ea
+18c08c04
+20406980
+98c08c00
+202069e7
+1f20f3ff
+1f23fe00
+98c08c00
+18c08c04
+20406980
+98c09600
+18c08c01
+efe10006
+9a467c00
+2022fecf
+20406979
+98c08c00
+19627e00
+98c67c00
+2022ea02
+202069f8
+18000c00
+18007e00
+20600000
+4734402d
+6fe14663
+98000c00
+efe08006
+203a6a1e
+1fe3fe00
+98c08c00
+efe20006
+98467c00
+2022ea12
+20406980
+98c08c00
+20206a08
+20406980
+98c09600
+18c08c01
+efe10006
+9a467c00
+20628000
+20406979
+98c08c00
+19627e00
+98c67c00
+2022ea1e
+20206a14
+18000c00
+20600000
+da400400
+20406a12
+da400300
+20406a2b
+24740000
+1a267c03
+20217ec7
+efe08006
+c0847ec7
+efe08006
+20600000
+4734c02d
+20406980
+1fe22200
+efe08006
+1fe17207
+1fe97e00
+1fe67c03
+2022ea47
+1f227e00
+c002ea3e
+c0036a41
+c003ea44
+18c08dff
+20406980
+98c08c00
+1a227e00
+98462200
+2022fec7
+20206a2e
+1a20a3fe
+18c08c01
+20206a2e
+1a20a3fd
+18c08c02
+20206a2e
+1a20a3fb
+18c08c04
+20206a2e
+1a20a3ff
+1f227e00
+c000ea50
+c0016a4e
+c0026a4d
+20207ec7
+1a20a3f4
+efe10006
+1a20a3fe
+efe10006
+9a467c00
+2022fec5
+1a20a3fe
+2022fec7
+20206a2e
+20405381
+1fe20a00
+58000006
+e7e08005
+5800006e
+e7e10005
+58000f00
+e7e10005
+581a0535
+e7e18005
+58000111
+1ff07e00
+e7e20005
+58002600
+e7e10005
+58000335
+e7e10005
+58000009
+e7e10005
+58000004
+e7e10005
+70032614
+20600000
+4735402d
+7004a750
+d8a004a8
+d8c04337
+20407d7f
+d8c046df
+20407d7d
+d8c00880
+20407d7d
+20406b28
+d8c00277
+20406b23
+20406aee
+d8a009be
+20406b1f
+580f4240
+1fe22200
+6fe209be
+9a26fc00
+20407e64
+18077e00
+67e2087c
+20600000
+7004a741
+d8a004a8
+20406ad3
+20406ace
+6fe1c351
+e7e18005
+20406a94
+d8c00277
+20407d7f
+d8c04337
+20407d7f
+20406b28
+d8c009de
+d8a0098e
+20407d7f
+20206aee
+6fe2439e
+e7e20005
+20407d94
+20207d91
+4735c02d
+7004a741
+d8a004a8
+20406ace
+20406ad3
+6fe1c34a
+e7e18005
+20406a94
+d8c04337
+20407d7f
+d8c00277
+20407d7f
+20406b28
+d8c009de
+d8a0098e
+20407d7f
+20406aee
+d8a009be
+20206b1f
+7004a720
+d8c008c0
+d8a004a8
+20407d7d
+20406b28
+d8c00860
+20406b23
+20406aee
+d8a0098e
+20406e3c
+d8400001
+20406abd
+d8a04316
+20406b1f
+d8400000
+20406abd
+d8a009de
+20206e3c
+4736402d
+7004a735
+58000100
+67e104a8
+20406ace
+20406ad3
+d8c04337
+20407d7f
+d8c00277
+20407d7f
+58006c65
+e7e10005
+58006274
+e7e10005
+e0408005
+20406b28
+20206aee
+6fe3437a
+e7e30005
+6fe0c371
+e7e08005
+20600000
+6fe30297
+e7e30005
+6fe0c36a
+e7e08005
+20600000
+7004a741
+6fe0c771
+67e084a8
+d8c046df
+20407d7d
+d8c00880
+20407d7d
+20406b28
+d8c00277
+20406b23
+20206aee
+7004a741
+6fe0c771
+67e084a8
+d8c00880
+20407d7d
+d8c046df
+20407d7d
+20406b28
+d8c04337
+20406b23
+20206aee
+4736c02d
+20406b3d
+6fe084a7
+1fe20400
+1fe0fe0f
+1ff1fe00
+1fe22400
+203a6b00
+18417e0f
+243a6b03
+da60099e
+dfe004a8
+1fe0fff0
+9840a200
+d8a009ce
+df200004
+20407da4
+20206b0e
+da400001
+da200000
+20206b04
+1841220f
+dfe004a8
+9840fe00
+9a260c00
+d8a009be
+20406b63
+da6009ae
+da2009be
+d8a009ce
+df200004
+20407da4
+20406e36
+20406dca
+d8c004a8
+1a40a5ff
+1a427e00
+203a6b17
+20406e28
+20406dc4
+20206b11
+d8a009be
+20406e3c
+d8c009ce
+20406e28
+20406dca
+d8c009be
+20406e28
+20206dc4
+18a22200
+20406e3c
+df200010
+20207dac
+d8a0098e
+20407d7f
+df200010
+da20098e
+20207dac
+6fe084a7
+1fe27200
+da2004a8
+20207dac
+efe08011
+1fe3fe00
+2a6ffe00
+7920fe00
+2feffe08
+7920a600
+e7e08011
+1a20a3ff
+c2006b2c
+20600000
+da20099e
+1a20a20f
+18007210
+18002600
+20206b2c
+da2009ae
+20206b37
+d8c0098e
+20406e26
+18007008
+20406e37
+20406e36
+20406dc1
+d8a0099e
+20406e3c
+4737402d
+6fe0899e
+2feffe07
+2420eb4e
+20406b36
+da60099e
+d8a0099e
+20406b58
+20206b4f
+20406b36
+d8c0099e
+d8a009ae
+20407d7f
+6fe089ae
+2feffe07
+2420eb3b
+20406b3b
+da6009ae
+d8a009ae
+df200003
+d8400000
+20406b5f
+1a60a604
+c2006b59
+d8408700
+18500400
+efe20013
+9842fe00
+e7e20005
+20600000
+4737c02d
+df200010
+dfe00000
+9a267c00
+2022eb6e
+20216b71
+e8408006
+e0408005
+1fe0fe01
+c2006b66
+20600000
+d8400080
+e0408005
+20206b6b
+d8400000
+20206b6f
+20406b86
+d8c00454
+d8a00444
+20207d7f
+78547c00
+20406c7d
+d8c00424
+d8a00464
+1800720f
+20407dd4
+efe08006
+1fe2fe06
+e7e08005
+58000474
+67e10498
+58000464
+67e10496
+79200012
+20206bc6
+6848c796
+18002410
+1840a606
+1a667c10
+20216b8c
+18002610
+d8a00464
+d8c04797
+18427200
+78547c00
+efe08006
+e7e08005
+1a40a5ff
+2022eb9a
+c2006b90
+20346b8d
+78347c00
+18007206
+1a220c00
+20206b90
+d8c00424
+d8a00474
+20407d7f
+6fe08483
+9a62fe00
+67e08483
+58000474
+67e10498
+58000464
+67e10496
+79200012
+20206bc6
+78547c00
+20406c7d
+20206bb0
+da200056
+78347c00
+20406c7d
+20406bb0
+d8c00454
+d8a00062
+20207d7f
+58000424
+67e10498
+580041cb
+67e10496
+793f8012
+20406bc6
+da200454
+da400424
+d8a00464
+20406c70
+da200464
+da400474
+1a420a00
+78347c00
+20406c6e
+20406c88
+58000474
+67e10498
+58000464
+67e10496
+79200012
+20206bc6
+70049a00
+6fe10496
+98000c00
+d8a00484
+20407d7f
+6fe10498
+98000c00
+d8a00454
+20407d7f
+20406bed
+78547c00
+c5896bd7
+6fe0849a
+c0826bd7
+6fe10498
+98002400
+20406c1f
+20406c1e
+20406c31
+6fe0849a
+1fe0fe01
+67e0849a
+20406bed
+78347c00
+20406c1e
+20406c40
+20406c4f
+20406c40
+20406c4f
+20406c40
+20406c4f
+20406c40
+6fe0849a
+1fe0fe01
+67e0849a
+c0886bcf
+20406bed
+78547c00
+20206c1e
+6fe0849a
+d8c00484
+203a6c14
+98002400
+18007211
+18c20a00
+efe08006
+1fe98400
+1feb7e00
+1fe97e00
+9841fe00
+e7e08005
+c2006bf3
+58000484
+9a408c00
+18007210
+d8a00434
+efe08006
+e7e08005
+28c1fe95
+2420ec03
+18c08def
+c2006bfe
+18002200
+1a40a7ff
+1a6ba600
+1a6ba600
+20406e5e
+58009000
+9a60a600
+d8a00434
+18007210
+e8408013
+efe08005
+9840fe00
+e7e08005
+1a60a601
+c2006c0d
+20206e62
+18007210
+18000400
+efe08006
+98428400
+c2006c16
+18427e00
+e7e08006
+d8c00484
+d8a00434
+20207d7f
+da400434
+18007210
+da200454
+1a220a00
+e8408011
+efe08012
+9842e000
+1f212603
+24346c28
+1a62a603
+1a662601
+20216c2b
+9840e000
+1e027e00
+e7e08005
+1a20a201
+1a40a401
+c2006c22
+20600000
+20406e5e
+18007210
+da200454
+efe08011
+d8c09100
+1f212603
+1a667c01
+20216c3a
+d8c09200
+98c08c00
+efe08006
+e7e08011
+1a20a201
+c2006c34
+20206e62
+18007208
+d8c00454
+18c20a00
+efe08006
+98002200
+efe08006
+98002400
+1a23fe00
+9a40fe00
+e7e08005
+1a227e00
+9a40fe00
+e7e08005
+c2006c43
+20600000
+588ae42c
+98000400
+18007207
+20406c5e
+580d751b
+98000400
+18007205
+20406c5e
+6fe08463
+98002200
+6fe08457
+67e08463
+1a227e00
+67e08457
+20600000
+1841240f
+18417e0f
+d8a00454
+98a08a00
+efe08005
+98002600
+1a227e00
+e7e08005
+1a622200
+18518400
+c2006c5f
+58000454
+9a408a00
+1a227e00
+e7e08005
+20600000
+78347c00
+20206c71
+78547c00
+18007210
+e8408011
+efe08012
+20346c77
+9842fe00
+20206c78
+9840fe00
+e7e08005
+1a20a201
+1a40a401
+c2006c72
+20600000
+d8a00474
+efe30011
+e7e30005
+20346c83
+efe30011
+20206c84
+efe30006
+e7e30005
+efe20011
+e7e20005
+20600000
+d8c041cb
+d8a00464
+d8400000
+588395a7
+20406ca9
+58b3c1df
+20406ca9
+5800e5e9
+20406caa
+18422800
+78547c00
+20406c97
+1a820400
+78347c00
+20206c97
+18007208
+efe08006
+2f200201
+20346c9e
+2020ec9f
+9840fe00
+20206ca0
+2020ec9c
+9842fe00
+e7e08005
+184c8400
+c2006c98
+20600000
+6fe30458
+67e30056
+efe30006
+e7e30005
+20600000
+184d0400
+18500400
+98418400
+20600000
+20206cad
+4738402e
+20406dcd
+d8a04316
+20206e3c
+d8a04337
+2034ecb5
+d8a00277
+18c22200
+20407d7f
+20406de2
+d8c04327
+20206e55
+da200277
+2034ecbd
+da204337
+1a220a00
+20405a8f
+20206de2
+d8c04384
+20406e28
+d8c04316
+20406e29
+18006c38
+18006c00
+20406dbf
+d8a002c7
+20206e3c
+18007008
+18007e49
+20206cd0
+18007e49
+20206ccf
+18007e01
+18007000
+184d5e00
+9de1de00
+1f00f001
+184cde00
+1df15e00
+6fe146ad
+1ff07e00
+9de1de00
+1f00f001
+ede20006
+1f00f001
+efe10006
+1a30de00
+1df05e00
+9de1de00
+1f00f001
+20600000
+1a608c01
+efe08006
+98002200
+20406ccc
+20406dc1
+18007000
+efe08013
+1fe17e03
+1ff05e00
+79205e08
+20406e31
+20406dc4
+1a227200
+1a608c02
+20406e10
+20406e1a
+20406dc4
+1f227e00
+203a6cf5
+20206cf0
+1800700c
+1de27e00
+67e2026f
+20600000
+1a20a201
+20406cce
+1a620c00
+20406e24
+20406dc7
+20406e43
+1a60a610
+1a40a5f0
+20216cf9
+20600000
+20406db4
+4738c02e
+d8c00062
+20406e26
+7080d500
+18217e0f
+1fe9fe00
+9881fe00
+67f080d6
+6fe0c1e4
+67f080d7
+627100d1
+627100d3
+6a2146b5
+684ac69f
+20406d25
+20406cc9
+70800a02
+70800a03
+6fe146b5
+67f100da
+1fe0fe04
+67e146b5
+1a627e00
+9a20a200
+20406dbb
+df00000c
+e5e20011
+65e2026f
+20600000
+6fe2c69f
+1fe0fe01
+67e2c69f
+20206d2b
+6fe0c1e4
+c1808000
+6fe146b5
+247a0000
+79200424
+20600000
+6fe0c6a3
+1fe17e0f
+1fe1fe20
+67e0c6a3
+20600000
+6fe0c6a8
+1fe17e0f
+67e0c6a8
+20600000
+18a27e00
+684900ae
+18408404
+98467e00
+67e146b7
+67f100d1
+67f100d3
+20407ecb
+20406db4
+d8c00062
+20406e26
+7080d500
+6fe08019
+1fe17e0f
+1fe9fe00
+9881fe00
+67f080d6
+6fe080e4
+1fe17e03
+67e0c1e4
+67f080d7
+6a2100ae
+622146b5
+6fe146b7
+9a208c00
+18007000
+ede20006
+65e20273
+684ac6a4
+20406d25
+20406cc9
+70800a06
+70800a07
+6fe100ae
+67f100da
+20406dbb
+6ff08108
+c4038000
+20207ec9
+c6078000
+684a0273
+604a46a9
+6fe2c6a4
+1fe0fe01
+67e2c6a4
+20206d30
+20406db4
+7080d500
+7080d601
+6fe0816b
+1fe17e03
+67f080d7
+5800016d
+67f100d1
+67f100d3
+6a20816c
+1a20a3fc
+24217ecf
+6220816c
+5800016d
+9a208c00
+18007000
+ede20006
+65e20273
+684ac6a4
+20406cc9
+70800a06
+70800a07
+6fe0816c
+67f100da
+20406dbb
+6ff08108
+c303fecf
+684a0273
+6fe246a9
+98467e00
+207a0000
+604a46a9
+6fe2c6a4
+1fe0fe01
+79207e27
+67e2c6a4
+18007e00
+20600000
+20406d8f
+580041f7
+9a20a200
+20406dbb
+df00000c
+e5e20011
+20600000
+20406db4
+4739402e
+7080d500
+7080d601
+6fe0c1f5
+1fe17e03
+67f080d7
+6fe1097b
+67f100d1
+580041f7
+67f100d3
+6a20c1f6
+684ac69f
+20406cc9
+70800a02
+70800a03
+6fe0c1f6
+67f100da
+1fe0fe04
+67e0c1f6
+6fe2c69f
+1fe0fe01
+793ffe27
+67e2c69f
+20600000
+6ff1011a
+98467c00
+20628000
+247a0000
+20206da8
+6ff08108
+c303137c
+580041f7
+98408a00
+df00000c
+e5e20005
+20206dbd
+4739c02e
+1800700c
+20406e37
+20406e36
+58000000
+67f100da
+20600000
+6ff08108
+c3036dbb
+70800a00
+20600000
+243bedbf
+20600000
+18006c30
+18006c00
+20206dbf
+18006c32
+18006c02
+20206dbf
+18006c34
+18006c04
+20206dbf
+18006c01
+18006c00
+20600000
+18007000
+6fe20277
+98005e00
+1f00f001
+efe20006
+98005e00
+1f00f001
+6fe24337
+98005e00
+1f00f001
+efe20006
+98005e00
+1f00f001
+20406e37
+1f00f1fc
+6fe2439e
+1fe25e00
+1f00f004
+18006c38
+18006c08
+20206dbf
+473a402e
+6fe3437a
+684b0297
+2034ede8
+6fe30297
+684b437a
+18007008
+18425e00
+1f00f001
+184f5e00
+1ff07e00
+9de1de00
+1f00f001
+1fef5e00
+1f00f001
+18005e00
+18007e00
+6fe0c36a
+6848c42b
+2434edf8
+6fe0c371
+6848c36a
+67e0c347
+6048c348
+18007000
+da404347
+18007204
+efe20011
+e8420012
+9842de00
+1f00f001
+1a20a204
+1a40a404
+c2006dfd
+20406e37
+1f00f1fc
+6fe2439e
+1fe25e00
+1f00f004
+18006c38
+18006c0c
+20406dbf
+20406e36
+18006c3a
+18006c08
+20206dbf
+2f200600
+20608000
+18c27e00
+9f208a00
+18007e00
+e7e08005
+1f20f201
+2f200600
+20608000
+20206e15
+18007000
+1f227e00
+203a6e1f
+efe20006
+1f20f3fc
+98005e00
+1f00f001
+2f001e04
+20608000
+20206e1b
+18007008
+20206e29
+18007004
+20206e29
+18007000
+18007204
+efe20006
+98005e00
+1f00f001
+c2006e2a
+20600000
+d8c002c7
+20206e26
+18007204
+20206e39
+18007000
+18007210
+20206e38
+18007000
+18007204
+18005e00
+1f00f001
+c2006e38
+20600000
+1800700c
+18007204
+1de27e00
+e7e20005
+1f00f001
+c2006e3e
+20600000
+1800700c
+1a620a00
+1a40f201
+1f267c0f
+20216e49
+18007210
+1de27e00
+1f267c03
+20216e51
+e7e20005
+1f20f3fc
+20628000
+1f00f001
+20206e49
+e7e08005
+1fecfe00
+c2006e51
+20600000
+1800700c
+18007204
+efe20006
+9de67c00
+24628000
+1f00f001
+c2006e57
+18007c00
+20600000
+6ff08050
+793ffe00
+67f08050
+20600000
+6ff08050
+79207e00
+67f08050
+20600000
+d8a00748
+3803ffff
+3807ffff
+380bffff
+380ffbff
+e7e48005
+3803ffff
+3807ffff
+380bffff
+380fffff
+e7e48005
+3803ffff
+3807ffff
+380bcfff
+380fffff
+e7e48005
+3803ffff
+3807ffff
+380bffef
+380fffff
+e7e48005
+3803ffff
+3807ffff
+380bffff
+380fffff
+e7e48005
+3803ffff
+38066c7f
+3808146b
+380f7bb3
+e7e48005
+3801feb8
+38050c12
+380ab722
+380e9fa6
+e7e48005
+3800e70f
+38056720
+3808519e
+380d9084
+e7e48005
+38031012
+380760bf
+380bf0af
+380c03d3
+e7e48005
+3803a188
+38043ad0
+380bcbf2
+380e43d9
+e7e48005
+3802b030
+38076a03
+38091188
+380de520
+e7e48005
+3803a11e
+3804fe5d
+3808dd57
+380dac93
+e7e48005
+380011ed
+380618c4
+38088da7
+380e57ff
+e7e48005
+3803192b
+38074641
+3809be0c
+380f66ad
+e7e48005
+38001f83
+38055a23
+380bf9b0
+380c3949
+e7e48005
+38013a51
+380553fd
+380b372a
+380cf1bb
+e7e48005
+3803ae85
+3805eed9
+38089e66
+380c01a8
+e7e40005
+20600000
+d8a007e0
+3803ffff
+3807ffff
+380bffff
+380fffff
+e7e48005
+3803ffff
+3804003f
+38080000
+380c0000
+e7e48005
+38000000
+38040000
+38081000
+380c0000
+e7e48005
+3803ff00
+3807ffff
+380bffcf
+380fffff
+e7e48005
+3803ffff
+3807ffff
+380bffff
+380c03ff
+e7e48005
+38000000
+38040000
+38080000
+380c0000
+e7e48005
+38010000
+38040000
+380bf000
+380fffff
+e7e48005
+380296ff
+38062630
+380b945d
+380fd284
+e7e48005
+380333a0
+38044b7a
+380837d8
+380fc9dc
+e7e48005
+3803a440
+3805b958
+380b8bce
+380d091f
+e7e48005
+3802e12c
+3805f47c
+380b56b1
+380efd47
+e7e48005
+38006837
+3806ed90
+3809ecec
+380dacc5
+e7e48005
+38023357
+38058af3
+3808f9e1
+380d29f0
+e7e48005
+3802e7eb
+3807e6e3
+380be1a7
+380d0b8b
+e7e48005
+38024fe3
+380420ef
+3809b5a6
+380cdc2f
+e7e48005
+38013860
+3806bd69
+3808391a
+380db222
+e7e48005
+20600000
+6fe0c767
+243a6f2a
+202075ac
+473ac02e
+6fe0c767
+207a0000
+6fe0c6bc
+c1808000
+6fe0c6bb
+207a0000
+6fe0c6be
+c1018000
+6fe1478f
+c2806f20
+6fe0c6bd
+c00075ac
+20600000
+7046bd00
+20600000
+6fe0c6bb
+79207e01
+67e0c6bb
+20600000
+6fe0c6bb
+793ffe01
+67e0c6bb
+20600000
+473b402e
+6fe0c767
+243a7066
+20406f37
+7046bc00
+70087400
+20600000
+6fe0c767
+207a0000
+6fe0c6bc
+c1008000
+204070d7
+20206f31
+473bc02e
+58000880
+d8a00870
+98a67200
+20407d9b
+58004773
+d8a0476b
+98a67200
+20207d9b
+70087201
+6fe0c648
+c0016f45
+c000ef50
+20600000
+6fe0c6be
+c001ef48
+202075cd
+204075ec
+6fe08871
+247a0000
+70087003
+20600000
+6fe0c6bc
+c000f085
+2020137c
+6fe0c6bc
+c000ef53
+20207066
+20407085
+6fe08871
+247a0000
+70087003
+20600000
+20406f73
+da2008a0
+d8a00728
+204077cc
+da200880
+d8a006e8
+204077cc
+da2006e8
+da400880
+d8a006e8
+20407734
+da200800
+da400880
+d8a00708
+20407734
+da200708
+da4006e8
+d8a006e8
+204077d0
+da2006c8
+da4006e8
+d8a006c8
+204077d0
+df200020
+da200728
+da4006c8
+20207e66
+da200840
+d8a006c8
+204077cc
+da200820
+d8a006e8
+204077cc
+da2006e8
+da400820
+d8a006e8
+20407734
+da200800
+da400820
+d8a00708
+20407734
+da200708
+da4006e8
+d8a006e8
+204077d0
+da2006c8
+da4006e8
+d8a006c8
+202077e9
+20406fa4
+da2008a8
+d8a00728
+204071a3
+da200888
+d8a006e8
+204071a3
+da2006e8
+da400888
+d8a006e8
+20407181
+da200760
+da400888
+d8a00708
+20407181
+da200708
+da4006e8
+d8a006e8
+20407150
+da2006c8
+da4006e8
+d8a006c8
+20407150
+df200018
+da200728
+da4006c8
+20207e66
+da2007a8
+d8a006c8
+204071a3
+da200790
+d8a006e8
+204071a3
+da2006e8
+da400790
+d8a006e8
+20407181
+da200760
+da400790
+d8a00708
+20407181
+da200708
+da4006e8
+d8a006e8
+20407150
+da2006c8
+da4006e8
+d8a006c8
+20207153
+6fe0c648
+c0016fbe
+c000efce
+20600000
+6fe0c6bd
+c0806fec
+20406fe9
+d8a00940
+580008f0
+e7e10005
+580046ff
+e7e10005
+580008a0
+e7e10005
+20407495
+6fe08871
+c0026fe6
+70087201
+70087005
+20600000
+6fe08874
+c0806fec
+20406fe9
+d8a00940
+580008f0
+e7e10005
+5800474f
+e7e10005
+580008a0
+e7e10005
+20206fe0
+d8a00940
+58000900
+e7e10005
+580008a0
+e7e10005
+5800474f
+e7e10005
+204073bc
+6fe08871
+c0026fe6
+70087201
+70087005
+20600000
+70087114
+20406f4d
+202070d3
+d8a008e0
+18000e08
+2020709d
+70087201
+20600000
+6fe0c648
+c0016ff4
+c000eff7
+70087009
+70087201
+20600000
+6fe0887b
+c081eff1
+20206ff9
+6fe0887b
+c080eff1
+d8a005e9
+6fe340a8
+e7e30005
+6fe30040
+e7e30005
+6fe1c76b
+e7e18005
+204074b4
+da200910
+da400920
+18000e04
+204070a2
+2420f012
+20407009
+70007d41
+20205a7b
+6fe08871
+c004f00f
+7008700a
+70087201
+70007c03
+20600000
+70007c03
+70087115
+202070d3
+6fe08871
+c004f018
+70087000
+70007c04
+70007e05
+20600000
+70007c04
+70087100
+20600000
+6fe0c648
+c001701f
+c000f023
+20600000
+6fe0887b
+c001f027
+7008710a
+202070d3
+6fe08875
+c000f027
+7008710a
+202070d3
+d8a005e9
+6fe30040
+e7e30005
+6fe340a8
+e7e30005
+6fe1c768
+e7e18005
+204074f7
+6fe08871
+c0057034
+7008700b
+70087201
+20600000
+7008710b
+70087301
+20600000
+d8a00940
+6fe30040
+e7e30005
+6fe340a8
+e7e30005
+580008f0
+e7e10005
+58000900
+e7e10005
+2020704b
+7008700f
+d8a00940
+6fe340a8
+e7e30005
+6fe30040
+e7e30005
+58000900
+e7e10005
+580008f0
+e7e10005
+d8a005e9
+6fe30940
+e7e30005
+6fe30946
+e7e30005
+2040750b
+7041ca01
+d8a041cb
+d8c00910
+20407d7f
+202009c6
+d8a0471f
+380118ff
+3807fd29
+3809ed2e
+380cad89
+e7e48005
+38030c14
+380475b3
+380805df
+380f709c
+e7e48005
+3802918d
+380457e1
+38080079
+e7e30005
+20600000
+473c402f
+6fe0c6bc
+c1800000
+6fe08874
+c1800000
+d8a0471f
+18000e0b
+2040709d
+180a7e00
+1fe37e00
+e7e10005
+6fe0c6ba
+245a7056
+d8a00580
+d8c0471f
+20407d7e
+d8a004a8
+d8c00790
+20407d7c
+d8a004d8
+20407d8b
+7004d801
+20407479
+70087401
+20600000
+d8a04737
+d8c004f0
+20407d7c
+7046bc01
+70087400
+20600000
+473cc02f
+6fe0887b
+c1800000
+6fe08874
+c1800000
+d8a00580
+d8c0471f
+20407d7e
+d8a004a8
+d8c00888
+20407d7c
+d8a004d8
+20407d8b
+7004d801
+20407479
+70087402
+20600000
+70087501
+d8a008c8
+d8c004f0
+20407d7e
+70087b01
+70087400
+20600000
+18e08fff
+24610000
+180a7e00
+e7e10005
+2020709d
+18e08fff
+242170ae
+efe20011
+1fe20400
+efe20012
+9842fe00
+2422f0ac
+1a20a204
+1a40a404
+202070a2
+7840fc00
+20600000
+7820fc00
+20600000
+473d402f
+6fe08872
+207a0000
+20405a3f
+247a0000
+70087200
+6fe08870
+c001d965
+c002d987
+c003d992
+c005d9a7
+c0016f40
+c0026fba
+c004efee
+c005701b
+c0067041
+20600000
+473dc02f
+6fe08873
+207a0000
+20405a3f
+247a0000
+70087300
+6fe08871
+c0095949
+c009d94e
+c001d952
+c0026fd9
+c00a5956
+c003d963
+c005701b
+c005d9a6
+c004efee
+c00ad9a0
+20600000
+70087301
+20600000
+70087300
+20600000
+473e402f
+6fe0c767
+207a0000
+6fe08874
+207a0000
+1fe0fe80
+67e08874
+c3838000
+6fe084a5
+203a70e2
+20207484
+204072ce
+6fe08874
+c000f07f
+c0017096
+20600000
+1fe10e07
+1fe97e00
+98c08c00
+efe08006
+afec0000
+20600000
+20407d7e
+20407d7e
+20207d7e
+efe40006
+247a0000
+efe40006
+247a0000
+efe40006
+20600000
+efe20011
+98000400
+efe20012
+98467c00
+24628000
+1a20a204
+1a40a404
+c20070f6
+20600000
+18007206
+1a20a214
+1a40a414
+efe20012
+98000400
+efe20011
+98467e00
+24610000
+247a0000
+1a20a3fc
+1a40a5fc
+c2007102
+20600000
+18007206
+18002600
+efe20011
+98000400
+efe20012
+9840fe00
+9a60fe00
+e7e20005
+2feffe20
+7920a600
+1a20a204
+1a40a404
+c200710e
+20600000
+18007206
+18002600
+efe20012
+98000400
+efe20011
+98467e00
+9a667e00
+e7e20005
+2feffe20
+7920a600
+1a20a204
+1a40a404
+c200711c
+20600000
+18007206
+1a20a214
+18002600
+efe20011
+2feffe00
+7920a601
+1fe37e00
+2a6ffe00
+7920fe1f
+e7e20011
+1a20a3fc
+1a632600
+c200712b
+20600000
+18007206
+18002600
+efe20011
+2feffe1f
+7920a601
+1fe3fe00
+2a6ffe00
+7920fe00
+e7e20011
+1a20a204
+1a632600
+c2007138
+20600000
+20407136
+2a6ffe00
+2020f14c
+da400748
+1a222600
+1a20a3e8
+204070ff
+24610000
+1a622200
+1a20a3e8
+da400748
+1a220a00
+2020711a
+2040710c
+18a22200
+20207144
+2040711a
+2a6c0000
+20608000
+da400748
+18a0a3e8
+1a220a00
+2020710c
+18a21600
+1a226000
+da4005d8
+1a420a00
+1a208c18
+efe40006
+e7e40005
+e7e40005
+18007e00
+e7e40005
+19620a00
+20407150
+da4005d8
+1a420a00
+18007e00
+e7e40005
+1e008c20
+efe40006
+e7e40005
+e7e40005
+19622200
+1a220a00
+20407150
+da4005d8
+1a420a00
+1e008c28
+efe40006
+e7e40005
+e7e40005
+e7e40005
+19622200
+1a220a00
+20207150
+18007206
+efe20006
+98005e00
+1f00f001
+c200717c
+20600000
+18a21600
+d8a005a8
+20407d8b
+d8a005a8
+1a220c00
+18007000
+2040717b
+1a420c00
+2040717b
+18002400
+18000400
+18002606
+efe20005
+98002200
+1a427000
+1de27e00
+1a627000
+9deffe00
+9a20fe00
+9840fe00
+e7e20005
+1fef0400
+1a60a601
+2a61fe0c
+2420f18d
+18427e00
+e7e20005
+18a08be8
+1a40a401
+2a41fe06
+2420f18b
+da2005a8
+19620a00
+2020715a
+1a222400
+20207181
+1a226000
+1e022200
+efe08011
+2feffe00
+20608000
+20407128
+efe08012
+2fec0000
+2020f1b5
+da200748
+1a420a00
+2040710c
+efe08012
+9a60fe00
+e7e08012
+1a40a5e8
+1a40a218
+18007207
+2040712a
+202071a6
+18a21600
+d8a00608
+20407d8b
+18007e00
+67e205c0
+67e20620
+70060801
+d8a005a8
+20407d8b
+d8c00748
+d8a005d8
+20407d7e
+1a220c00
+d8a005f0
+20407d7e
+d8c005f0
+204070f0
+203a71f1
+da2005f0
+da400608
+204071a5
+da2005d8
+da4005a8
+204071a5
+da2005f0
+da4005d8
+204070ff
+202171e3
+da2005d8
+da4005f0
+1a220a00
+2040711a
+da200608
+da4005a8
+1a420a00
+2040710c
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+202071c8
+da2005f0
+da4005d8
+1a220a00
+2040711a
+da2005a8
+da400608
+1a420a00
+2040710c
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+202071c8
+d8a00608
+20407d8b
+6fe085c0
+67e08608
+67e08610
+da200608
+da4005a8
+1a420a00
+20407150
+da200748
+da4005a8
+19620a00
+20207153
+da200568
+d8a00620
+204071a3
+da200620
+d8a00638
+204071a3
+da200760
+da400638
+d8a00638
+20407181
+da200538
+d8a00620
+204071a3
+d8c00620
+d8a005f0
+20407d7e
+da2005f0
+20407143
+da200620
+da4005f0
+d8a00620
+20407150
+da200620
+da400638
+d8a00620
+20407150
+d8c00538
+d8a005f0
+20407d7e
+da200550
+d8a00638
+204071a3
+da2005f0
+20407143
+da2005f0
+20407143
+da2005f0
+da400638
+d8a005f0
+20407181
+da200638
+d8a00608
+204071a3
+da200608
+20407143
+da200608
+20407143
+da200608
+20407143
+d8c00550
+d8a00638
+20407d7e
+da200638
+20407143
+da200638
+da400568
+d8a00568
+20407181
+da200620
+d8a00638
+204071a3
+da200638
+da4005f0
+d8a00638
+20407153
+da200638
+da4005f0
+d8a00538
+20407153
+da2005f0
+da400538
+d8a00638
+20407153
+da200638
+da400620
+d8a00638
+20407181
+da200638
+da400608
+d8a00550
+20207153
+da2004d8
+d8a00650
+204071a3
+da200538
+da400650
+d8a00608
+20407181
+da2004d8
+da400650
+d8a00650
+20407181
+da200550
+da400650
+d8a005f0
+20407181
+da200568
+d8a00650
+204071a3
+da2004a8
+da400650
+d8a00620
+20407181
+da200568
+da400650
+d8a00650
+20407181
+da2004c0
+da400650
+d8a00638
+20407181
+da200608
+da400620
+d8a00650
+20407153
+da200608
+da400620
+d8a00608
+20407150
+da2005f0
+da400638
+d8a00620
+20407153
+da2005f0
+da400638
+d8a005f0
+20407150
+da2005f0
+da400650
+d8a005f0
+20407181
+da200568
+da4004d8
+d8a00638
+20407181
+da200638
+da400650
+d8a00568
+20407181
+da200650
+d8a00650
+204071a3
+da200650
+da400608
+d8a00638
+20407181
+da200650
+da4005f0
+d8a005f0
+20407181
+da200620
+d8a00538
+204071a3
+da200538
+da400638
+d8a00538
+20407153
+d8c00538
+d8a00650
+20407d7e
+da200650
+20407143
+da200638
+da400650
+d8a00638
+20407153
+da200638
+da400620
+d8a00620
+20407181
+da200620
+da4005f0
+d8a00550
+20407153
+da200550
+da400748
+d8a00550
+18002600
+6fe08550
+2feffe00
+2040f10c
+1a626000
+da200550
+20407128
+6fe08567
+2e0ffe00
+7920fe07
+67e08567
+20600000
+6fe084a5
+1fe0ffff
+24610000
+67e084a5
+6fe084a4
+205a71fe
+6fe084a5
+d8c00580
+204070e7
+2020f2bb
+6fe084a4
+243a72c9
+2040724f
+202072bb
+7004a400
+d8c004a8
+d8a00538
+204070ed
+202072bb
+da200568
+d8a00638
+204071b9
+da200638
+d8a005f0
+204071a3
+da200538
+da4005f0
+d8a004f0
+20407181
+da200638
+da4005f0
+d8a00620
+20407181
+da200550
+da400620
+d8a00508
+20207181
+efe20006
+18002204
+18a08a03
+e7e08005
+1fecfe00
+18a08bfe
+1a20a3ff
+2422f2e3
+18a08a05
+c20072e0
+20600000
+18ebfe00
+99608c00
+efe20006
+20600000
+18006010
+d96004a8
+1e008ff9
+204072eb
+98000400
+1e008ff0
+204072eb
+98408400
+1e008ffe
+204072eb
+1fee7e01
+98408400
+1e008ff1
+204072eb
+1fee7e00
+98408400
+1e0bfe00
+99608a00
+e0420005
+1e00e001
+2e01fe40
+2420f2f1
+20600000
+d8c007c0
+18007007
+efe20006
+98005e00
+1f00f1ff
+20217308
+20600000
+473ec02f
+204072ef
+d8a005a8
+18007000
+1de27e00
+e7e20005
+1f00f001
+2f01fe08
+2420f311
+20406e5e
+d9609300
+de0004a8
+18007240
+e8420030
+efe2000b
+19609604
+1e00e004
+9840fe00
+18007007
+9de08400
+18007004
+1dee7e03
+98408400
+18007005
+1de27e00
+18007006
+9de2fe00
+18007004
+9de17e00
+18007006
+9de2fe00
+98408400
+18007007
+18425e00
+18007003
+1de27e00
+9840de00
+18007000
+1de27e00
+18007001
+9de10400
+9de1fe00
+18007002
+9de17e00
+98418400
+18007000
+1dee7e02
+9840fe00
+18007007
+9de0de00
+980efc00
+c200731a
+d8c005a8
+18007000
+efe20006
+9de0de00
+1f00f001
+2f01fe08
+2420f343
+20206e62
+d8a00900
+18007007
+1de27e00
+e7e20005
+1f00f1ff
+2021734b
+20600000
+d8a004a8
+18c08dfc
+1f262210
+efe20006
+9842fe00
+e7e20005
+18c08df8
+c2007353
+1a227200
+18427e00
+e7e20005
+c200735a
+20600000
+6fe0c648
+c0017364
+c000f361
+20600000
+20407369
+20407349
+2020738f
+204073a3
+20407349
+2020738f
+20407369
+2020738f
+d8c008a0
+d8a004a8
+18007206
+2040748d
+d8c0474f
+18007206
+2040748d
+d8c00900
+2040748c
+20407306
+2040730d
+d8c008f0
+d8a004a8
+20207386
+d8c0474f
+d8a004a8
+18007206
+2040748d
+d8c008a0
+18007206
+2040748d
+d8c008f0
+2040748c
+20407306
+2040730d
+d8c00900
+d8a004a8
+20407386
+2020738f
+2040748c
+58800000
+1fed7e00
+e7e20005
+18007205
+20407d8c
+58000280
+e7e20005
+2020730d
+6fe20900
+da2003e8
+9a26fc00
+20407e64
+18077e00
+67e2087c
+1807fe00
+da2003e8
+9a26fc00
+20407e64
+18077e00
+da2003e8
+9a2ffe00
+684a087c
+9840fe00
+67e2087c
+20600000
+204073a3
+20407349
+2020738f
+d8c008a0
+d8a004a8
+18007208
+2040748d
+d8c046ff
+18007208
+2040748d
+20407306
+2040730d
+d8c00900
+d8a004a8
+2040748c
+d8c008f0
+202073b1
+2040748c
+58800000
+1fed7e00
+e7e20005
+18007203
+20407d8c
+58000300
+e7e20005
+2020730d
+70477100
+202073be
+6fe0c76f
+c08173ba
+473f402f
+58363636
+1fed0400
+18418436
+6fe10940
+1fe20c00
+18007204
+20407350
+20407306
+2040730d
+6fe10942
+1fe20c00
+d8a004a8
+18007206
+2040748d
+6fe10944
+1fe20c00
+18007206
+2040748d
+58800000
+e7e18005
+6fe0c771
+e7e08005
+18007e00
+e7e40005
+58000388
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+6fe10940
+1fe20c00
+18007204
+20407350
+20407306
+2040730d
+d8c005e8
+d8a004a8
+18007208
+2040748d
+58800000
+1fed7e00
+e7e20005
+20407d8b
+58000300
+e7e20005
+2040730d
+20207349
+58363636
+1fed0400
+18418436
+d8c008e0
+18007206
+20407350
+20407306
+2040730d
+6fe1094c
+1fe20c00
+d8a004a8
+2040748c
+6fe1094e
+1fe20c00
+2040748c
+5862746c
+1fed7e00
+1fe1fe6b
+e7e20005
+d8c005f5
+18007203
+2040748d
+58800000
+1fed7e00
+e7e20005
+18007e00
+e7e40005
+58000380
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007206
+20407350
+20407306
+2040730d
+d8c005e8
+d8a004a8
+18007208
+2040748d
+58800000
+1fed7e00
+e7e20005
+20407d8b
+58000300
+e7e20005
+2040730d
+20207349
+6fe0c76f
+c081743a
+473fc02f
+58363636
+1fed0400
+18418436
+d8c008e0
+18007206
+20407350
+20407306
+2040730d
+d8c00900
+d8a004a8
+2040748c
+d8c008f0
+2040748c
+2020744f
+58000000
+67e24797
+2020742b
+58000000
+67e24797
+20207442
+6fe0c76f
+c081743d
+58363636
+1fed0400
+18418436
+d8c008e0
+18007206
+20407350
+20407306
+2040730d
+d8c008f0
+d8a004a8
+2040748c
+d8c00900
+2040748c
+58000000
+e7e40005
+e7e20005
+6fe24797
+e7e20005
+18a20400
+7005e880
+18420a00
+d8c005f8
+2040748c
+2040730d
+d8a004a8
+18007207
+20407d8c
+e7e20005
+580003f8
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007206
+20407350
+20407306
+2040730d
+d8c005e8
+d8a004a8
+18007208
+2040748d
+58800000
+1fed7e00
+e7e20005
+20407d8b
+58000300
+e7e20005
+2040730d
+20207349
+7004a5c0
+6fe084a5
+207a0000
+1fe0ffff
+67e084a5
+d8c00580
+204070e7
+2020f47a
+d8c004a8
+d8a00538
+202070ed
+204071fe
+6fe084a5
+1fe0ffff
+67e084a5
+d8c00580
+204070e7
+20608000
+2020724f
+18007204
+18c08dfc
+efe20006
+e7e20005
+18c08df8
+c200748e
+20600000
+70477100
+20207497
+6fe0c76f
+c0817493
+58363636
+1fed0400
+18418436
+6fe10940
+1fe20c00
+18007204
+20407350
+20407306
+2040730d
+6fe10942
+1fe20c00
+d8a004a8
+18007208
+2040748d
+6fe10944
+1fe20c00
+18007208
+2040748d
+2040730d
+d8a004a8
+58800000
+e7e18005
+6fe0c771
+e7e08005
+df200007
+20407d8c
+58000408
+e7e20005
+202073d9
+6fe0c648
+c00174b8
+c000f429
+20600000
+6fe0c76f
+c08174f1
+58363636
+1fed0400
+18418436
+d8c008e0
+18007208
+20407350
+20407306
+2040730d
+d8c00900
+d8a004a8
+2040748c
+d8c008f0
+2040748c
+58000000
+e7e40005
+e7e20005
+6fe24797
+e7e20005
+18a20400
+7005e880
+18420a00
+d8c005f8
+2040748c
+2040730d
+d8a004a8
+18007207
+20407d8c
+e7e20005
+580003f8
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007208
+20407350
+20407306
+2040730d
+d8c005e8
+d8a004a8
+18007208
+2040748d
+58800000
+1fed7e00
+e7e20005
+20407d8b
+58000300
+e7e20005
+2040730d
+20207349
+58000000
+67e24797
+202074ba
+58000000
+67e24797
+202074fd
+6fe0c648
+c00174fb
+c000f440
+20600000
+6fe0c76f
+c08174f4
+58363636
+1fed0400
+18418436
+d8c008e0
+18007208
+20407350
+20407306
+2040730d
+d8c008f0
+d8a004a8
+2040748c
+d8c00900
+2040748c
+202074c7
+6fe0c648
+c001750f
+c000f3f3
+20600000
+58363636
+1fed0400
+18418436
+d8c008e0
+18007208
+20407350
+20407306
+2040730d
+6fe1094c
+1fe20c00
+d8a004a8
+2040748c
+6fe1094e
+1fe20c00
+2040748c
+5862746c
+1fed7e00
+1fe1fe6b
+e7e20005
+d8c005f5
+18007203
+2040748d
+58800000
+1fed7e00
+e7e20005
+18007e00
+e7e40005
+58000380
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007208
+202074e2
+6fe340a8
+67e305e9
+6fe30040
+e7e30005
+58363636
+1fed0400
+18418436
+d8c041db
+18007204
+20407350
+20407306
+2040730d
+58627461
+1fed7e00
+1fe1fe6b
+67e204a8
+d8c005f5
+18007203
+2040748d
+d8c046b5
+df200002
+2040748d
+58800000
+1fed7e00
+e7e20005
+df200004
+20407d8c
+580002c0
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+d8c041db
+18007204
+202074e2
+6fe340a8
+67e305e9
+6fe30040
+e7e30005
+58363636
+1fed0400
+18418436
+d8c041db
+18007204
+20407350
+20407306
+2040730d
+58627464
+1fed7e00
+1fe1fe6b
+67e204a8
+d8c005f5
+18007203
+2040748d
+58800000
+1fed7e00
+e7e20005
+df200005
+20407d8c
+58000280
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+d8c041db
+18007204
+202074e2
+d8c00910
+d8a00454
+20407d7f
+58000900
+67e10940
+58000434
+e7e10005
+58363636
+1fed0400
+18418436
+d8c00464
+18007204
+20407350
+20407306
+2040730d
+d8a004a8
+6fe10940
+1fe20c00
+2040748c
+6fe10942
+1fe20c00
+2040748c
+58800000
+1fed7e00
+e7e20005
+df200003
+20407d8c
+58000300
+e7e20005
+2040730d
+20407349
+d8c00900
+d8a005c8
+20407d7d
+585c5c5c
+1fed0400
+1841845c
+d8c00464
+18007204
+202074e2
+47404030
+6fe0c6bb
+243a75cd
+7046bd00
+7046be00
+20600000
+6fe0c6bb
+207a0000
+6fe0c6be
+c1018000
+20407602
+202075b2
+d8a046bf
+38001abd
+3805b34f
+38099b8a
+380e6562
+e7e48005
+380340b7
+38041efa
+3808aff6
+380cfd41
+e7e48005
+3803d210
+38066cf8
+380b874c
+380f157c
+e7e48005
+3802d4a3
+3807d27d
+38080003
+e7e28005
+20600000
+6fe0c6be
+c1800000
+6fe0c6bd
+c1800000
+20406ebd
+d8a046bf
+18000e0f
+2040709d
+180a7e00
+1fe37e00
+e7e10005
+6fe0c6ba
+245a75b8
+d8a00628
+d8c046bf
+20407d7d
+d8a00508
+d8c00820
+20407d72
+d8a00548
+20407d97
+70054801
+2040761a
+7046bd03
+20600000
+d8a046df
+d8c00568
+20407d72
+7046be03
+7046bd00
+20600000
+6fe0887b
+c1800000
+6fe0c6bd
+c1800000
+d8a00628
+d8c046bf
+20407d7d
+d8a00508
+d8c00880
+20407d72
+d8a00548
+20407d97
+70054801
+2040761a
+7046bd04
+20600000
+d8a008c0
+d8c00568
+20407d7d
+70087b03
+7046bd00
+20600000
+6fe0c6bb
+207a0000
+6fe0c6bd
+207a0000
+1fe0fe80
+67e0c6bd
+c3838000
+6fe104a5
+203a760c
+20207612
+4740c030
+20407627
+6fe0c6bd
+c001f5e6
+c00275fc
+20600000
+20407639
+6fe104a5
+1fe0ffff
+67e104a5
+d8c00628
+204070e7
+20608000
+2020768a
+47414030
+58000100
+67e104a5
+6fe104a5
+207a0000
+1fe0ffff
+67e104a5
+d8c00628
+204070e7
+2020f61d
+d8c00508
+d8a005c8
+20207d71
+da200608
+d8a00708
+204076f6
+da200708
+d8a006a8
+204077cc
+da2005c8
+da4006a8
+d8a00568
+20407734
+da200708
+da4006a8
+d8a006e8
+20407734
+da2005e8
+da4006e8
+d8a00588
+20207734
+da200608
+d8a006e8
+204077cc
+da2006e8
+d8a00708
+204077cc
+da200800
+da400708
+d8a00708
+20407734
+da2005c8
+d8a006e8
+204077cc
+d8c006e8
+d8a006a8
+20407d7d
+da2006a8
+204077d3
+da2006e8
+da4006a8
+d8a006e8
+204077d0
+da2006e8
+da400708
+d8a006e8
+204077d0
+d8c005c8
+d8a006a8
+20407d7d
+da2005e8
+d8a00708
+204077cc
+da2006a8
+204077d3
+da2006a8
+204077d3
+da2006a8
+da400708
+d8a006a8
+20407734
+da200708
+d8a006c8
+204077cc
+da2006c8
+204077d3
+da2006c8
+204077d3
+da2006c8
+204077d3
+d8c005e8
+d8a00708
+20407d7d
+da200708
+204077d3
+da200708
+da400608
+d8a00608
+20407734
+da2006e8
+d8a00708
+204077cc
+da200708
+da4006a8
+d8a00708
+204077e9
+da200708
+da4006a8
+d8a005c8
+204077e9
+da2006a8
+da4005c8
+d8a00708
+204077e9
+da200708
+da4006e8
+d8a00708
+20407734
+da200708
+da4006c8
+d8a005e8
+202077e9
+da200548
+d8a00728
+204077cc
+da2005c8
+da400728
+d8a006c8
+20407734
+da200548
+da400728
+d8a00728
+20407734
+da2005e8
+da400728
+d8a006a8
+20407734
+da200608
+d8a00728
+204077cc
+da200508
+da400728
+d8a006e8
+20407734
+da200608
+da400728
+d8a00728
+20407734
+da200528
+da400728
+d8a00708
+20407734
+da4006c8
+da2006e8
+d8a00728
+204077e9
+da2006c8
+da4006e8
+d8a006c8
+204077d0
+da4006a8
+da200708
+d8a006e8
+204077e9
+da2006a8
+da400708
+d8a006a8
+204077d0
+da2006a8
+da400728
+d8a006a8
+20407734
+da200608
+da400548
+d8a00708
+20407734
+da200708
+da400728
+d8a00608
+20407734
+da200728
+d8a00728
+204077cc
+da200728
+da4006c8
+d8a00708
+20407734
+da200728
+da4006a8
+d8a006a8
+20407734
+da2006e8
+d8a005c8
+204077cc
+da2005c8
+da400708
+d8a005c8
+204077e9
+d8c005c8
+d8a00728
+20407d7d
+da200728
+204077d3
+da200708
+da400728
+d8a00708
+204077e9
+da200708
+da4006e8
+d8a006e8
+20407734
+da2006e8
+da4006a8
+d8a005e8
+204077e9
+da2005e8
+da4007e0
+d8a005e8
+18002600
+6fe085e8
+2feffe00
+2040f7ce
+1a626000
+da2005e8
+204077fe
+6fe08607
+2e0ffe00
+7920fe07
+67e08607
+20600000
+18a21600
+d8a006c8
+20407d97
+18007e00
+67e206e8
+7006c801
+d8a00648
+20407d99
+d8c007e0
+d8a00688
+20407d7d
+1a220c00
+d8a006a8
+20407d7d
+d8c006a8
+20407808
+203a772d
+da2006a8
+da4006c8
+2040780b
+da200688
+da400648
+2040780b
+da2006a8
+da400688
+20407804
+2021771f
+da200688
+da4006a8
+1a220a00
+204077fc
+da2006c8
+da400648
+1a420a00
+204077ce
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+20207704
+da2006a8
+da400688
+1a220a00
+204077fc
+da200648
+da4006c8
+1a420a00
+204077ce
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+20207704
+da200648
+19620a00
+2040775d
+da2007e0
+19622400
+19620a00
+202077e9
+18a21600
+18007000
+d8a00648
+20407d99
+d8a0099e
+20407d99
+1a220c00
+70099e00
+58000000
+204077c6
+1a420c00
+204077ca
+18000e00
+d8a00648
+d840099e
+18e22400
+1a4bfe00
+9840a400
+18000400
+18002600
+efe20005
+98002200
+efe20012
+1a627000
+9deffe00
+9a20fe00
+9840fe00
+e7e20005
+1fef0400
+1a60a601
+2a61fe08
+2420f748
+18427e00
+e7e20005
+18a08be0
+18e08e01
+28e1fe08
+2420f742
+da200648
+19620a00
+2020775d
+4741c030
+18a21600
+1a226000
+da400688
+1a420a00
+20407d94
+e7e40005
+1a208c2c
+20407d79
+20407d75
+1a422200
+204077d3
+da400688
+1e022200
+19620a00
+204077d0
+da400688
+1a420a00
+20407d94
+e7e40005
+1e008c30
+20407d7f
+20407d94
+1a422200
+204077d3
+da400688
+19622200
+1a220a00
+204077d0
+da400688
+1a420a00
+1e008c20
+20407d75
+20407d94
+e7e40005
+1e008c38
+20407d79
+19622200
+1a220a00
+204077d0
+da400688
+1a420a00
+1e008c24
+20407d75
+1e008c34
+20407d75
+1e008c34
+20407d76
+1e008c20
+20407d76
+19622200
+1a220a00
+204077d0
+da400688
+1a420a00
+1e008c2c
+20407d75
+20407d94
+e7e40005
+1e008c20
+20407d76
+1e008c28
+20407d76
+19622200
+1a220a00
+204077e9
+da400688
+1a420a00
+1e008c30
+20407d79
+20407d79
+18007e00
+e7e40005
+1e008c24
+20407d76
+1e008c2c
+20407d76
+19622200
+1a220a00
+204077e9
+da400688
+1a420a00
+1e008c34
+20407d75
+1e008c20
+20407d75
+20407d94
+1e008c30
+20407d76
+19622200
+1a220a00
+204077e9
+da400688
+1a420a00
+1e008c38
+20407d79
+20407d94
+1e008c24
+20407d75
+20407d94
+1e008c34
+20407d76
+19622200
+1a220a00
+202077e9
+18007220
+d8a0099e
+98a08a00
+20207dd4
+18007208
+2020717c
+1a222400
+20207734
+18007208
+2020710d
+204077ce
+18a22200
+202077d4
+20407801
+2a6ffe00
+2020f7dd
+da4007e0
+1a222600
+1a20a3e0
+20407804
+24610000
+1a622200
+202077e5
+204077e5
+1a222600
+1a20a3e0
+da4007e0
+20407804
+24610000
+1a622200
+202077e5
+1a20a3e0
+da4007e0
+1a220a00
+202077fc
+204077fc
+2020f7f3
+18a0a3e0
+da4007e0
+20407804
+24610000
+da4007e0
+18a0a3e0
+1a220a00
+202077fc
+18a0a3e0
+da4007e0
+1a220a00
+204077ce
+20608000
+18a0a3e0
+da4007e0
+1a220a00
+202077ce
+18007208
+2020711b
+18007208
+1a20a21c
+2020712a
+18007208
+18002600
+20207138
+18007208
+1a20a21c
+1a40a41c
+20207102
+efe40006
+247a0000
+202070f0
+1a226000
+1e022200
+efe08011
+2feffe00
+20608000
+204077fe
+efe08012
+2fec0000
+2020f81b
+da2007e0
+1a420a00
+204077ce
+efe08012
+9a60fe00
+e7e08012
+1a40a5e0
+1a40a220
+18007209
+2040712a
+2020780c
+20401597
+20758000
+20407826
+204078cc
+2020785b
+2040787c
+202078bb
+6fe0c793
+c17f8000
+98000400
+2040610d
+6848c793
+20406109
+20000064
+6848c793
+204060f4
+20207830
+47424030
+6fe0c793
+c17f8000
+1fe20400
+204060fd
+2420f842
+2040784c
+6fe1478f
+79207e0c
+67e1478f
+6fe0c786
+c1000000
+70478600
+6fe0c792
+67e0c785
+20407853
+70095b2c
+202078dc
+6fe1478f
+793ffe0c
+67e1478f
+6fe0c786
+c1008000
+70478601
+70478500
+20407855
+70095b2d
+202078dc
+6fe0c785
+207a0000
+1fe0ffff
+67e0c785
+247a0000
+70095b10
+202078dc
+d8e00007
+20201566
+d8e00007
+2020156a
+6fe1448f
+1a2fa40b
+9a40a400
+20600000
+6fe0c48e
+207a0000
+1fe27200
+6fe1448f
+1fe22400
+1a40a602
+e8408013
+2040610d
+20407885
+1a40a40b
+c2007860
+20600000
+20407857
+58000002
+e7e08012
+204078b5
+2020788a
+20407857
+58000003
+e7e08012
+204078b5
+20207885
+20407857
+58000001
+e7e08012
+580000ff
+e7e08005
+20207885
+20407857
+df20000b
+1a620c00
+1a420a00
+20207dc7
+6fe0c48e
+207a0000
+da200000
+2040788f
+1a20a201
+6fe0c48e
+9a267c00
+20628000
+2020787f
+1a40a602
+e8408013
+6fe0c09a
+c0044980
+20206109
+1a40a602
+e8408013
+6fe0c09a
+c004498c
+2020610d
+1a208e0b
+20407de9
+247a0000
+20407857
+efe08012
+c001788a
+c001f885
+c0007885
+c002f8a3
+2040788a
+1a40a607
+20407d3b
+efe10013
+20407e7a
+20407d47
+58000005
+e7e08012
+1a40a603
+efe10013
+202078b3
+20407885
+1a40a609
+20407d3b
+efe10013
+20407e7a
+20407d47
+1a40a601
+efe08013
+c07ff8af
+1fe0ffff
+e7e08013
+203a786c
+58000004
+e7e08012
+1a40a605
+efe10013
+1a208e0b
+20207ddb
+58000000
+202078b3
+58001000
+1ff07e00
+9a40a400
+20600000
+4742c030
+da200000
+684a4787
+1c422400
+1a427e00
+98467c00
+244178b7
+1a427e00
+184084a0
+184084a0
+98467c00
+242178cf
+1a20a201
+1a217e0f
+243a78c2
+da200000
+204078d5
+1c427e00
+67e24787
+20600000
+1a227e00
+207a0000
+18408560
+18408560
+793f841c
+604a4787
+202031ee
+70477301
+6fe0c774
+243a78d7
+20600000
+70477300
+20600000
+47434030
+204078d6
+1a227e00
+67e20953
+da204775
+20407e96
+6fe20953
+1fe22200
+202078da
+4743c030
+204078d6
+1a227e00
+67e20953
+da20477d
+20407e96
+6fe20953
+1fe22200
+202078da
+58000000
+67e4477d
+67e44775
+20600000
+47444031
+6fe0c1db
+247a0000
+da20477d
+20407eae
+207a0000
+70095200
+204078fd
+6fe08952
+203a78f2
+20600000
+204078d6
+da20477d
+20407ea2
+1fe20400
+204078da
+4744c031
+18427e00
+207a0000
+c000f92f
+c0017934
+c001f93a
+c006f959
+c007795f
+c007f964
+c008796a
+c009f974
+c00a7976
+c00af978
+c00b7982
+c00bf985
+c00c7987
+c00cf98a
+c00f799c
+67e0895b
+20405a3f
+243a792d
+6fe0895b
+c584f928
+47454031
+6fe0895b
+c002793c
+c002f93f
+c003794a
+c005794c
+c008f96f
+c00df992
+c0097973
+c00ef993
+c00fe0c9
+c01060cb
+c010f99e
+c012dffb
+20600000
+67e0895b
+20400a5f
+2022f92d
+20400a67
+24628000
+70095201
+202078e5
+6fe1478f
+79207e06
+67e1478f
+70409b03
+20600000
+70478d00
+70409b00
+6fe1478f
+793ffe06
+67e1478f
+20600000
+7041db05
+20600000
+70007c07
+70039e13
+20600000
+70007c17
+d8a003ac
+58000000
+2d0ffe1b
+7920fe01
+e7e08005
+58000000
+e7e10005
+6fe34455
+e7e30005
+20600000
+70007c18
+20600000
+7003a802
+6fe0804b
+c2817952
+20405a72
+70007c08
+20600000
+793ffe02
+67e0804b
+20405750
+58000000
+7934fe01
+67e0807f
+20600000
+70442701
+70442a00
+6fe1478f
+79207e0b
+67e1478f
+20600000
+6fe1478f
+793ffe0b
+67e1478f
+70442700
+20600000
+70442701
+70442a01
+6fe1478f
+79207e0b
+67e1478f
+20600000
+6fe1478f
+793ffe0b
+67e1478f
+70442700
+20600000
+58000014
+67e102b5
+67e14394
+20202134
+20201f04
+da200000
+2020786c
+da200000
+20207867
+da200000
+20407857
+efe08012
+c000f97f
+c002797f
+c002f97f
+20207871
+efe08006
+c17f8000
+20207871
+7043e201
+7041db1b
+20600000
+7043e201
+20600000
+7043e200
+7041db00
+20600000
+6fe1445d
+20407e7a
+6fe0c793
+c07ff990
+1fe20400
+204060f4
+204078ee
+20201459
+20201f46
+70007c34
+79200003
+24748000
+70464500
+70007c13
+6fe080bc
+793ffe02
+67e080bc
+20600000
+18000e03
+20207dda
+20405a7b
+70007d41
+202056ec
+6fe0c78f
+c4060000
+c4038000
+2020799c
+6fe1448c
+1fe08a02
+58000000
+e7e18005
+20600000
+20407ec7
+204079f4
+207a0000
+6fe1448c
+1fe0a402
+e8408012
+18408401
+e0408012
+e840803f
+18427200
+1fe0a404
+efe08012
+984ffe00
+98c08a00
+1a220c00
+20407dd4
+204079f8
+1fe0ffff
+e8408012
+18408401
+98410400
+e0408012
+20207ec5
+20407ec7
+204079f0
+207a0000
+6fe1448c
+1fe0a402
+e8408012
+184085ff
+e0408012
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08c01
+1a220a00
+202079b9
+20407ec7
+204079f0
+207a0000
+6fe1448c
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08c01
+18c22400
+1a220a00
+20407dd4
+20207ec5
+20407ec7
+204079f0
+207a0000
+6fe1448c
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08a02
+1a220c00
+1f20f3ff
+20407dd4
+20207ec5
+6fe1448c
+1fe08c02
+efe08006
+20600000
+204079f8
+e8408006
+98467e00
+20600000
+6fe1448c
+1fe08c01
+efe08006
+20600000
+4745c031
+6ff08c23
+2feffe03
+2040fa08
+6ff08c23
+67f08c23
+67e089f6
+20407a68
+20407a90
+20407c81
+20407cc9
+20207a60
+47464031
+20406e5e
+20407a27
+708c0000
+20002710
+708c18c0
+6ff10050
+793ffe0a
+67f10050
+708c1100
+708c003c
+58000a4f
+67f10c03
+67f10c07
+58000a8f
+67f10c05
+708c1104
+708c0200
+708c23ff
+58000c4b
+d8a00b59
+98a67200
+20207d9b
+68488b58
+202060f4
+6fe08bfa
+207a0000
+68488b58
+204060fd
+2020fa08
+20600000
+700b5702
+58000000
+67e08a92
+67e10b51
+1fe0fe01
+67e10b53
+1fe0fe01
+67e10b55
+d8a00ae6
+58030404
+e7e18005
+58000409
+e7e10005
+d8a00aeb
+38015906
+380610d2
+38090494
+380c0001
+e7e48005
+d8a00b09
+3801570f
+38055c9a
+380a56c6
+380dcdcd
+e7e48005
+38014420
+38065d99
+380a5636
+380c0001
+e7e38005
+d8a00b27
+3801620a
+38040c8c
+380b0333
+380cc0c0
+e7e48005
+38003130
+e7e10005
+580099a4
+67e10a93
+580099ff
+67e10a95
+d8c09aa3
+d8a00a97
+df200013
+20407dd4
+d8c09ab6
+d8a00aaa
+df20003c
+20407dd4
+6fe10b45
+20207e7a
+6fe08b47
+207a0000
+67e08acc
+67e08ae5
+20600000
+d8e00000
+20407de9
+247a0000
+6fe08bfb
+247a0000
+6fe08bfa
+245a7d1f
+20600000
+6fe089f6
+c2817a6b
+20600000
+20407a70
+20407de8
+58000280
+d8e00000
+20207ddb
+6fe08bec
+c0817a75
+700bfb00
+700bfc00
+20600000
+6fe08bfe
+207a0000
+700bfe00
+700bec02
+700bfa01
+20600000
+6fe089f6
+c2807a9d
+20600000
+6ff08c24
+c3830000
+69510c03
+6a110c05
+68710c07
+efe10003
+1fec8400
+18518400
+d8c00fff
+98c17200
+1f222200
+efe08003
+e7e08005
+c2007a89
+60710c07
+622109f8
+20600000
+20600000
+4746c031
+6fe089f6
+c4028000
+d8a00b59
+20407a7e
+18427e00
+c0007a98
+20207a8f
+6fe089f8
+c0007a7b
+c000faa4
+1fe67c07
+20610000
+47474031
+793f8023
+6fe08b59
+1fe17e80
+c0407aa8
+c0007ab0
+2020137c
+6fe08b59
+c3838000
+20407c56
+20207ad6
+6fe08b59
+1ff1fe00
+1fe37e00
+1fe17e03
+c0007ab8
+c000fabe
+c0017ac3
+2020137c
+6fe08b59
+1ff1fe00
+1fe37e00
+1fe17e03
+c0007ac4
+c000facc
+c0017ad1
+2020137c
+6fe08b5a
+c0047ad8
+c0037aee
+c0057b33
+c0007b45
+20207ad2
+6fe08b5a
+c0017b7a
+c000fb7e
+c001fb8f
+20207ad2
+20207ad2
+6fe08b5a
+c000fb99
+c001fbc8
+c002fbf3
+c004fc0c
+c005fc27
+c003fad2
+20207ad2
+6fe08b5a
+c0057c38
+c004fc4a
+c005fc68
+20207ad2
+20207ad2
+6ff08c19
+79207e00
+67f08c19
+20207ad6
+708c1810
+20600000
+6fe08b59
+c0c07ad2
+6fe08b5d
+c0807ad2
+6fe08b5e
+c0807ad2
+6fe08b5f
+c080fad2
+6fe08b60
+c0807ad2
+6fe08b5b
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b57
+c0027aea
+c001faec
+20207ad2
+da400001
+20207b5f
+da400001
+20207b5d
+4747c031
+6fe08b5c
+c000fb01
+c0017b1a
+c001fb1d
+c010faf6
+c0117b2b
+20207ad2
+700be900
+6fe08b5d
+c0007afb
+c000fafe
+20207ad2
+6a408abd
+da200abd
+20207c77
+6a408ad6
+da200ad6
+20207c77
+6fe08bfd
+245a7b12
+58000a97
+68488a97
+67e10bf4
+60488bf6
+6fe08b5f
+98467c00
+24217b10
+6fe08bf6
+98002400
+6fe10bf4
+1fe0fe01
+98002200
+20207c77
+6fe08b5f
+20207b0b
+6ff08c02
+245a7b16
+700bfd00
+20600000
+6ff08c02
+79207e07
+67f08c02
+20600000
+58000aaa
+68488aaa
+20207b05
+6fe08b5b
+1fe67c03
+24217ad2
+6fe08b5b
+da200ae6
+c0007c75
+79200023
+da200aeb
+c000fc75
+da200b09
+c0017c75
+da200b27
+c001fc75
+20600000
+6fe10b5d
+c000fb2f
+6a210a93
+20207c75
+700bfa01
+700bec01
+6a210a95
+20207c75
+6fe08b57
+c0827ad2
+6fe08b59
+c0c0fad2
+6fe08b5b
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b5f
+c080fad2
+6fe08b60
+c0807ad2
+6fe08b5d
+c0807ad2
+6fe08b5e
+c0807ad2
+da400001
+20207b5d
+6fe08b57
+c0017ad2
+6fe08b5b
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b5f
+c0817ad2
+6fe08b60
+c0807ad2
+6fe08b5e
+c0807ad2
+6fe08b59
+c0407b58
+c040fb63
+c0417b67
+20207ad2
+700bef01
+20207b61
+6fe08b5d
+c0807ad2
+da400002
+6fe08bed
+c000fb56
+da200b51
+20207c77
+da200b53
+20207c77
+da200b55
+20207c77
+6fe08b57
+c0827ad2
+da400002
+20207b5d
+6fe08b57
+c0827ad2
+6fe08b5d
+c040fb74
+c0417b76
+c041fb78
+1fe17e7f
+c0007b70
+20207ad2
+6fe08bf0
+da400002
+c000fb5f
+20207b5d
+6fe08bf1
+20207b71
+6fe08bf2
+20207b71
+6fe08bf3
+20207b71
+700be701
+da200be8
+da400001
+20207c77
+6fe10b5b
+d84001ba
+98467c00
+2422fad2
+6fe08be4
+243a7b8c
+700ba100
+6fe08b5f
+98002400
+da200ba1
+20407c77
+d8a00ba1
+df200008
+20207d8c
+700be400
+700ba101
+20207b85
+6fe08b5f
+c080fad2
+700be901
+da400001
+6fe08beb
+c0007b97
+c000fb98
+20207b5d
+20207b5f
+20207b5d
+6fe08b57
+c0827ad2
+6fe08b5f
+c0807ad2
+6fe08b60
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b5e
+c0807ad2
+6fe08b59
+c0007ba8
+c000fbb5
+c0017bb6
+20207ad2
+6fe08b5b
+c080fad2
+6ff08c00
+793ffe07
+67f08c00
+700bed00
+700bee01
+6fe08bef
+203a7ad6
+700bef00
+700bee00
+700bec02
+20207ad6
+20207ad2
+6fe08b5b
+c0807ad2
+6fe08b5d
+c040fbc1
+c0417bc4
+c041fbc6
+1fe17e7f
+c0007bbf
+20207ad2
+700bf000
+20207ad6
+700bf100
+700bfe01
+20207ad6
+700bf200
+20207bc2
+700bf300
+20207bc2
+6fe08b5f
+c0807ad2
+6fe08b60
+c0807ad2
+6fe08b59
+c0007bd1
+c000fbdf
+c0017be0
+20207ad2
+6fe08b5b
+c080fad2
+20403779
+6ff08c00
+79207e07
+67f08c00
+700bed01
+700bec03
+700be500
+20407ad6
+20407de8
+58001388
+d8e0000f
+20207ddb
+20207ad2
+6fe08b5b
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b5d
+c040fbed
+c0417bef
+c041fbf1
+1fe17e7f
+c0007beb
+20207ad2
+700bf001
+20207ad6
+700bf101
+20207ad6
+700bf201
+20207ad6
+700bf301
+20207ad6
+6fe08b59
+c0807ad2
+6fe08b5d
+c0807ad2
+6fe08b5e
+c0807ad2
+6fe08b5f
+c0807ad2
+6fe08b60
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b5b
+1fe17e80
+c0807ad2
+6fe08b5b
+c0807c0a
+700b5702
+6fe08b5b
+67f08c02
+20407ad6
+700bfd01
+20600000
+700b5703
+20207c05
+6fe08b57
+c0017ad2
+6fe08b59
+c0807ad2
+6fe08b5d
+c0807ad2
+6fe08b5e
+c0807ad2
+6fe08b5f
+c0807ad2
+6fe08b60
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b5b
+1fe67c01
+24217ad2
+6fe08b57
+c001fc21
+c0027c21
+20207ad2
+6fe08b5b
+c0007c25
+700b5704
+20207ad6
+700b5703
+20207ad6
+6fe08b57
+c0827ad2
+6fe08b59
+c080fad2
+6fe08b5b
+c0807ad2
+6fe08b5c
+c0807ad2
+6fe08b5f
+c0807ad2
+6fe08b60
+c0807ad2
+6fe08b5d
+c0807ad2
+6fe08b5e
+c0807ad2
+20207ad6
+47484032
+700be701
+6fe08b5c
+67e08be8
+6fe08b5d
+1fe67c01
+2042fc46
+6fe08bec
+c0827ad6
+700bec02
+20407ad6
+20007530
+20007530
+20600000
+700bfa01
+700bee00
+700bec04
+20600000
+d8a00b61
+20407a7e
+700be301
+20407c5a
+6fe10b5b
+67e10be1
+20407ad6
+6fe0c09a
+c1820000
+6fe08be5
+207a0000
+6fe08b61
+67e0c8ce
+700be500
+7048be03
+20600000
+6fe10b5b
+d8400200
+98467c00
+24628000
+6fe10b5d
+d8400000
+98467c00
+24628000
+6fe10b5f
+d8400001
+98467c00
+24628000
+700be501
+20600000
+6fe08b5f
+c0807ad2
+6fe08b5b
+c0007c6e
+c000fc71
+20207ad2
+700bea00
+700beb01
+20207ad6
+700be601
+700bea01
+700beb00
+20207ad6
+ea408011
+1a20a201
+4748c032
+7920000e
+c591fc7c
+1a40a401
+1a43a400
+62210a90
+62408a92
+20207c81
+d8e00000
+20207cc1
+47494032
+6ff08c24
+c3800000
+6fe08a92
+207a0000
+1fe27200
+98000400
+6fe10b5f
+1fe67c40
+20217c8f
+1f267c40
+20217c93
+18007240
+20207c93
+9f267c00
+20217c93
+98007200
+67e08a92
+6fe08a92
+9f267e00
+67e08a92
+1f20ffff
+67e089fa
+c591fca5
+1fe37e00
+1f20ffff
+67e089fa
+c5877ca5
+793f800e
+e0408005
+58000003
+e7e08005
+1f20f3ff
+1f227e00
+2422fca5
+1f20f201
+6fe10a90
+1fe20c00
+efe08006
+e7e08005
+c591fcac
+58000000
+e7e08005
+c2007ca7
+18c27e00
+67e10a90
+580009fa
+67f10c09
+d8e00000
+20407cc1
+6fe08a92
+247a0000
+6fe08bec
+c1808000
+700bec02
+20600000
+d8e00001
+da200a3b
+62310c0b
+1f20ffff
+e7e08011
+efe08006
+e7e08005
+c2007cbe
+58000000
+f9207e00
+67f08c18
+20600000
+d8e00002
+da200a45
+62310c0d
+20207cbc
+4749c032
+6fe08bf9
+207a0000
+6fe08bfa
+203a7ced
+6fe08bec
+c001fd27
+c0817ced
+6fe08bee
+243a7ced
+20407cd5
+20207ce0
+6ff08c24
+c3808000
+6fe08bf9
+c4008000
+6fe08bf9
+793ffe01
+67e08bf9
+6fe08bf7
+207a0000
+c0087d0f
+2020137c
+6ff08c24
+c3810000
+6fe08bf9
+c4010000
+6fe08bf9
+793ffe02
+67e08bf9
+6fe08bf8
+207a0000
+c0107cf0
+c010fd0b
+c0117d13
+2020137c
+d8a00bff
+df200008
+20207d8c
+6fe08be7
+68488be9
+98417e00
+203a7d07
+68488bea
+9840fe00
+c000fcf8
+20207d07
+700bf800
+6fe08c00
+c0017d08
+c001fd08
+6fe08c00
+67e08bff
+6fe08c01
+e7e08005
+6fe08c03
+e7e08005
+6fe08c05
+e7e08005
+df200004
+d8c00bff
+20207cc5
+700bf800
+df200008
+d8c00bff
+20207cc5
+700bf800
+df200003
+d8c00c1f
+20207cc5
+700bf700
+df200008
+d8c00c0f
+20207cb9
+700bf800
+df200002
+d8c00c2f
+20207cc5
+6fe08bec
+c0017d1a
+20600000
+6ff08c00
+79207e07
+67f08c00
+700bfc01
+20600000
+6fe08bec
+c1018000
+c0017d23
+20600000
+6fe08bfc
+207a0000
+700bfb01
+20207d2a
+d8e0000f
+20407de9
+247a0000
+6ff08c00
+c4038000
+708c00fc
+20007530
+708c003c
+20600000
+1f267c00
+20628000
+1fe37e00
+c2007d32
+20600000
+18007e01
+1f267c00
+20628000
+1fe3fe00
+c2007d38
+20600000
+60a1097d
+604c0964
+6162096c
+20407d43
+60c1097b
+67210987
+60e10985
+20600000
+62220970
+62420974
+62618978
+20600000
+6fe1097d
+98000a00
+684c0964
+6962096c
+20407d51
+6f210987
+68e10985
+6fe1097b
+98000c00
+20600000
+6a220970
+6a420974
+6a618978
+20600000
+6fe1097d
+1fe20a00
+20600000
+6fe1097b
+1fe20c00
+20600000
+18a27e00
+67e1097d
+20600000
+18c27e00
+67e1097b
+20600000
+18a27e00
+67e10959
+18c27e00
+67e10957
+20600000
+6fe10959
+1fe20a00
+6fe10957
+1fe20c00
+20600000
+98462200
+20610000
+da200100
+9a20fe00
+98462200
+20600000
+20407d7d
+20407d7d
+20207d7d
+20407d79
+20407d79
+efe20006
+e7e20005
+20600000
+efe40006
+e7e40005
+20600000
+20407d7f
+20407d79
+20407d79
+20407d79
+20207d79
+1fe0ffff
+20000026
+243a7d81
+20600000
+df20000a
+20002ee0
+c2007d86
+20600000
+df200032
+20207d86
+18007203
+18007e00
+e7e40005
+c2007d8d
+20600000
+20407d91
+18007e00
+e7e40005
+20600000
+18007e00
+e7e20005
+20600000
+18007204
+20207d8c
+18007208
+20207d8c
+1f227e00
+207a0000
+58000000
+e7e08005
+c2007d9e
+20600000
+df200020
+d8a0098e
+20207d9b
+efe20013
+e8420011
+9842fe00
+e7e20005
+1a20a204
+1a60a604
+c2007da4
+20600000
+474a4032
+1f227e00
+1fe67c01
+20610000
+9a20a400
+1a40a5ff
+1f237200
+e8408011
+efe08012
+e7e08011
+e0408012
+1a40a5ff
+1a20a201
+c2007db3
+20600000
+1fef0400
+20407dc1
+18508400
+1ff07e00
+9841fe00
+20600000
+1ff10c00
+18d08c00
+1ff0fe00
+1ff07e00
+98c1fe00
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20417d79
+20628000
+20217dc9
+1f20f208
+1f20f3fc
+20417d76
+20628000
+20217dce
+1f20f204
+20207dd4
+1f227e00
+207a0000
+efe08006
+e7e08005
+c2007dd6
+20600000
+58000000
+1c430400
+604a409c
+d8a041aa
+98000400
+18e3fe00
+98a08a00
+e0410005
+474ac032
+20600000
+d9600800
+19701600
+9960fe00
+20600000
+d8e00000
+474b4032
+684a409c
+1c437e00
+67e2409c
+98467c00
+24417de4
+98461600
+19620400
+d8c041aa
+18c20a00
+df200010
+efe10006
+98467e00
+20217df8
+18007e00
+e7e10005
+c2007df4
+d8c041aa
+18e3fe00
+98c08c00
+efe10006
+20600000
+98408400
+18427200
+6fe10163
+9f267e00
+20610000
+1fe67e00
+18510400
+18408401
+18500400
+98418400
+20600000
+20407e0c
+20207e19
+78547c00
+98467e00
+20217e11
+78347c00
+1fe67e00
+c4078000
+1fe22800
+d8410000
+6fe10163
+98467e00
+9a80fe00
+793ffe40
+20600000
+68490163
+98000c00
+1ff17e00
+984ffe00
+98c0fe00
+20600000
+1fed7e00
+1ff27e00
+6849c174
+9846fc00
+20407e64
+18078400
+20600000
+68490163
+9846fc00
+20407e61
+1ff07e00
+18070400
+98418400
+20600000
+d8400000
+18422800
+efe08003
+20407e39
+1a820400
+20407e73
+da40000a
+9a4ffe00
+9840fe00
+1fe20400
+c2007e2e
+20600000
+d840003a
+98467c00
+24217e42
+d8400061
+98467c00
+20217e45
+d8400037
+98467e00
+20600000
+d8400030
+98467e00
+20600000
+d8400057
+98467e00
+20600000
+18426000
+580001ff
+18002400
+1fe92200
+1a232200
+9a22a200
+2a2ffe00
+7920fe09
+18430400
+2feffe00
+79208407
+1fe37e00
+1a40a401
+2a400e00
+2420fe4b
+e0408005
+c2007e4b
+1e020400
+20600000
+58000000
+1f222200
+e8410006
+9840fe00
+c2007e5d
+9a26fc00
+20407e64
+1807fe00
+20600000
+207a8000
+20207e64
+efe08011
+e8408012
+98467c00
+24628000
+1a20a201
+1a40a401
+c2007e66
+18007c00
+20600000
+98467c00
+24610000
+18427e00
+20600000
+9840fe00
+98460400
+98467e00
+20600000
+df200200
+d8a04000
+20207d8c
+207a0000
+1fe27a00
+6ff1010e
+243a7e7c
+20600000
+70820301
+20600000
+67f10205
+6ff08203
+79207e04
+67f08203
+20600000
+67f10207
+6ff08203
+79207e06
+67f08203
+20600000
+67f10205
+70820330
+20600000
+6ff08043
+793ffe04
+67f08043
+20600000
+6ff1010e
+d8400200
+98467c00
+20600000
+474bc032
+e8440011
+18417eff
+243a7e9c
+184cfe00
+e7e40011
+1a20a207
+efe08011
+243a137c
+6fe0895b
+e7e08011
+20600000
+474c4033
+df200008
+efe40011
+207a0000
+efe08011
+243a7eab
+1a20a201
+c2007ea6
+2020137c
+d8400000
+e0408011
+20600000
+efe40011
+20600000
+efe08011
+20600000
+efe10011
+20600000
+d8400000
+6fe08006
+c2007eb5
+18408401
+c2007eb5
+18427e00
+20600000
+98467c00
+24610000
+18427e00
+20600000
+18007dff
+20600000
+18007c01
+20600000
+18007c00
+20600000
+78347c00
+20600000
+78547c00
+20600000
+78367c00
+20600000
+78567c00
+20600000
+7838fc00
+20600000
+58000001
+20600000
+58000000
+20600000
+1f267c00
+20628000
+e8408006
+9840fe00
+c2007ed5
+20600000
+1f227e00
+207a0000
+18c27e00
+9f20fe00
+1fe0ffff
+1fe20c00
+efe08006
+18c08dfe
+e7e08005
+c2007edf
+20600000
+19622400
+da609420
+18007224
+18005600
+18006e00
+20407ef9
+52207e00
+9d60d600
+50407e00
+9ee0ee00
+1a40a404
+1a60a602
+c2007ee9
+55607e00
+d8400024
+20407f45
+e7e20005
+56e07e00
+20407f45
+e7e20005
+20600000
+edc10012
+eb808013
+20407f2a
+98482200
+eb808006
+20347f00
+1b863800
+1a408c02
+edc10006
+20407f2a
+98483000
+52207e00
+9b062200
+edc10012
+55c07e00
+98483000
+edc10006
+eb808013
+20407f2a
+98480400
+53007e00
+98408400
+20600000
+efe20012
+ea220013
+9a285600
+ea220006
+52206e00
+1a408c04
+efe20006
+9a280400
+55607e00
+98465600
+efe20012
+9ee86e00
+efe20006
+ea220013
+9a287e00
+9ee0ee00
+20600000
+1ff07e00
+1feb7e00
+20600000
+1fed7e00
+20207f22
+9feffe00
+1ff1fe00
+1fe97e00
+20600000
+55c07e00
+53800400
+20600000
+c40f8000
+18000400
+79200420
+184085ff
+9842fe00
+1fe0fe01
+20600000
+98002200
+db000000
+7920301e
+da400000
+df200010
+1b027e00
+9a40fe00
+1a432400
+9a267e00
+2022ff3f
+20217f42
+1fe62200
+1b027e00
+9a41a400
+1b0b3000
+c2007f39
+20600000
+793f802c
+c31fff49
+7920002c
+1fe67e00
+284c003f
+2020ff4d
+7940002c
+18460400
+9846fc00
+20407e61
+c6960000
+1fe67e00
+20600000
+58000000
+79207e13
+67e4009e
+20600000
+20600000
+20600000
+00008eea
Index: mouse_public_3mode_usb/program/app.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app.prog	(working copy)
@@ -0,0 +1,592 @@
+app_init:
+	bpatch patch15_5,mem_patch15
+	fetch 1,mem_device_option
+	branch app_init,blank				/* wait ram to be initialized */
+	beq dvc_op_dongle,dongle_init
+	beq dvc_op_antilost,antilost_init
+	beq dvc_op_shutter,shutter_init
+	beq dvc_op_module,module_init
+	beq dvc_op_car,car_init
+	beq dvc_op_remote_car,remote_car_init
+	beq dvc_op_hci_boot,hci_init
+	beq dvc_op_ali_mesh,ali_mesh_init
+ifdef COMPLIE_TEST_CODE	
+	beq dvc_op_test,test_init
+endif	
+	beq dvc_op_mouse,mouse_init
+	rtn
+	
+app_lpm_init:
+	jam 0,mem_tester_emulate
+	jam 0,mem_debug_config
+	jam 0, mem_lch_code
+	setarg 0
+	store 5,mem_sp_state_start
+	fetch 1,mem_device_option
+	branch app_lpm_init,blank				/* wait ram to be initialized */
+	beq dvc_op_module,module_lpm_init
+app_lpm_init0:
+	rtn
+
+app_param_init:
+	rtn wake
+	call app_read_efuse_sys_config
+	call app_read_efuse_dig_aon_vsel
+	call app_read_efuse_syn_afc_cfg1
+	call app_read_efuse_rf_ldo_cfg1
+	call app_read_efuse_rc_cal
+	call app_read_efuse_agc
+	call adc_init_data
+	fetch 1,mem_device_option
+	beq dvc_op_shutter,shutter_default_init
+	beq dvc_op_dongle,dongle_default_init
+	beq dvc_op_mouse,mouse_default_init
+	beq dvc_op_remote_car,remote_car_default_init
+	rtn
+
+app_sys_param_init:	
+	jam 0xff,mem_rf_init_data
+	setarg mem_rf_init_data
+	store 2,mem_rf_init_ptr
+	//sys init
+	jam 0xff,mem_ui_button_gpio
+	jam 0x88,mem_lpm_xtal_ib
+	jam 0xce,mem_lpm_padding
+	rtn
+
+
+	
+app_process_idle:
+	call ui_dispatch
+	call check_51cmd
+	call app_process_bb_event
+	fetch 2,mem_cb_idle_process
+	branch callback_func
+	
+app_process_bt:
+	fetch 2,mem_cb_bt_process
+	branch callback_func
+	
+app_process_ble:
+	fetch 2,mem_cb_le_process
+	branch callback_func
+
+app_process_bb_event:
+	bpatch patch15_6,mem_patch15
+	//return if c51 need to process bb event
+	arg mem_ipc_fifo_bt2c51,rega
+	call fifo_out
+	rtn blank
+	//reaching here mains c51 cannot get bb event.
+	copy pdata,regc
+	call app_event_normal_process
+	branch app_process_bb_event_priority
+	
+app_discard_event:
+	arg 0,regc
+	rtn
+
+//************************************************//
+//*APP BB EVENT NORMAL PROCESS**//
+//************************************************//
+app_event_normal_process:
+	beq BT_EVT_BB_CONNECTED,app_evt_bt_conn
+	beq BT_EVT_BUTTON_LONG_PRESSED,app_evt_button_long_pressed
+	beq BT_EVT_SETUP_COMPLETE,app_evt_setup_complete
+	beq BT_EVT_HID_HANDSHAKE,app_evt_hid_handshake
+	beq BT_EVT_HID_CONNECTED,app_bb_event_hid_connected
+	beq BT_EVT_RECONN_FAILED,app_bb_event_reconn_failed
+	beq BT_EVT_BB_DISCONNECTED,app_bb_event_bb_disconn
+	beq BT_EVT_RECONN_PAGE_TIMEOUT,app_bb_event_reconn_failed	
+	beq BT_EVT_LE_CONNECTED,app_le_event_bb_connected
+	beq BT_EVT_LE_DISCONNECTED,app_le_event_bb_disconn
+	beq BT_EVT_RECONN_STARTED,app_event_reconn_start
+	beq BT_EVT_ENTER_SNIFF,app_event_enter_sniff
+	beq BT_EVT_EXIT_SNIFF,app_event_exit_sniff
+	
+	beq BT_EVT_ML2CAP_CONN_REFUSED,app_event_ml2cap_conn_refused
+	beq BT_EVT_LINKKEY_GENERATE,app_event_linkkey_generate
+	beq BT_EVT_SWITCH_FAIL_MASTER,app_event_switch_fail_master
+	beq BT_EVT_SWITCH_SUCCESS_MASTER,app_event_switch_success
+	rtn
+
+
+app_evt_bt_conn:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_CONNECTED,pdata
+	store 2,mem_ui_state_map
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set0 APP_DISC_BY_BUTTON ,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	branch check_51cmd_stop_discovery
+
+app_event_switch_success:
+	jam 0,mem_switch_fail_master_count
+	rtn	
+
+app_event_switch_fail_master:
+	fetch 1,mem_switch_fail_master_count
+	increase 1,pdata
+	store 1,mem_switch_fail_master_count
+	sub pdata,1,null
+	branch app_bt_role_switch,positive
+	jam 0,mem_switch_fail_master_count
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_SWITCH_FAIL,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	branch app_bt_disconnect
+	
+app_process_bb_event_priority:
+	fetch 2,mem_cb_bb_event_process
+	branch callback_func
+
+app_check_wake_lock:
+	fetch 2,mem_cb_check_wakelock
+	branch callback_func
+	
+app_will_enter_lpm:
+	fetch 2,mem_cb_before_lpm
+	branch callback_func
+
+app_event_linkkey_generate:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_AFTER_PAIRING ,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	branch app_bt_store_reconn_info
+	
+app_event_reconn_start:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_RECONNECT,pdata
+	store 2,mem_ui_state_map
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_AFTER_RECONN,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+
+app_evt_setup_complete:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_SETUP_COMPLETE,pdata
+	store 2,mem_ui_state_map
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_AFTER_SETUP_DONE,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+
+app_evt_hid_handshake:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_HID_HANDSHAKE,pdata
+	store 2,mem_ui_state_map
+	rtn
+	
+app_event_enter_sniff:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_SNIFF,pdata
+	store 2,mem_ui_state_map
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_AFTER_SNIFF,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+	
+app_event_exit_sniff:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BT_SNIFF,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+app_le_event_bb_connected:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_CONNECTED,pdata
+	store 2,mem_ui_state_map
+	rtn
+	
+app_le_event_bb_disconn:
+	jam 0,mem_le_l2cap_att_states
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BLE_CONNECTED,pdata
+	store 2,mem_ui_state_map
+	branch app_lpm_mult_disable
+	
+app_bb_event_hid_connected:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_HID_CONN,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+app_evt_button_long_pressed:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_BY_BUTTON,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+	
+app_event_ml2cap_conn_refused:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_L2CAP_REFUSED,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	branch  app_bt_disconnect
+
+
+app_evt_timer:
+	store 1,mem_app_evt_timer_count
+app_evt_100ms_loop:
+	bpatch patch15_7,mem_patch15
+	fetch 1,mem_app_evt_timer_count
+	rtn blank
+	increase -1,pdata
+	store 1,mem_app_evt_timer_count
+	call ui_button_polling
+	call app_lpm_wake_auto_lock_timer
+	call app_unsniff_delay_timer
+	call app_discovery_timer
+	call flash_write_spi_sm_timer
+ifdef SPI2	
+	call flash_write_spi2_sm_timer
+endif	
+	fetch 2,mem_cb_event_timer
+	call callback_func
+	branch app_evt_100ms_loop
+
+
+//regc:timer addr
+//regb:timer up call back fuction
+timer_single_step:
+	ifetch 1,regc
+	rtn blank
+	pincrease -1
+	istore 1,regc
+	nrtn blank
+	copy regb,pdata
+	branch callback_func
+
+//regc:timer addr
+//regb:timer up call back fuction
+timer_single_step_2B:
+	ifetch 2,regc
+	rtn blank
+	pincrease -1
+	istore 2,regc
+	nrtn blank
+	copy regb,pdata
+	branch callback_func
+	
+app_power_timer:
+	fetcht 2,mem_power_param_ptr
+	add temp,power_timer_offset,regc
+	arg app_power_timer_timeout,regb
+	branch timer_single_step
+	
+app_power_timer_timeout:
+	call app_got_power_state_common
+	beq POWER_STARTING,app_enter_power_stanby_state
+app_enter_power_off_state:
+	branch app_enter_hibernate
+app_enter_power_stanby_state:
+	setarg POWER_STANDBY
+	istore 1,regc
+	add temp,power_standby_cb_offset,regb
+app_power_cb_common:
+	ifetch 2,regb
+	branch callback_func
+
+app_unsniff_delay_timer:
+	arg mem_unsniff2sniff_timer_count,regc
+	arg app_unsniff_delay_timeout,regb
+	branch timer_single_step
+	
+app_unsniff_delay_timeout:
+	call context_check_idle
+	branch app_bt_enter_sniff,zero
+	rtn
+
+
+app_discovery_timer:
+	arg mem_discovery_timeout_timer_count,regc
+	arg app_discovery_timeout,regb
+	branch timer_single_step_2B
+	
+app_discovery_timeout:
+	call app_bt_stop_discovery
+	call app_led_off
+	fetch 2,mem_cb_discovry_timeout
+	branch callback_func
+
+	
+app_bb_event_reconn_failed:
+	call app_disconn_reason_flag_clear
+app_clear_reconnect_flag:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BT_RECONNECT,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+app_bb_event_bb_disconn:
+	jam 0,mem_unsniff2sniff_timer_count
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_RECONNECT,app_bb_event_bb_reconn_disconn
+	isolate0 UI_STATE_BT_SETUP_COMPLETE,pdata
+ 	call app_discard_event,true
+app_bb_event_bb_reconn_disconn:
+	bpatch patch16_0,mem_patch16
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BT_CONNECTED,pdata
+	set0 UI_STATE_BT_SETUP_COMPLETE,pdata
+	set0 UI_STATE_BT_HID_CONN,pdata
+	set0 UI_STATE_BT_HID_HANDSHAKE,pdata
+	set0 UI_STATE_BT_RECONNECT,pdata
+	store 2,mem_ui_state_map
+	branch app_lpm_mult_disable
+	
+app_bb_hibernate:
+	call app_disconn_reason_clear
+	branch app_enter_hibernate
+
+	
+app_disconn_reason_clear:
+	setarg 0
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	rtn
+app_disconn_reason_flag_clear:
+	setarg 0
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+
+app_disconn_reason_collect_bt:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	setarg 0
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+	
+app_disconn_reason_collect_ble:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set1 APP_DISC_BLE,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	setarg 0
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	rtn
+
+	
+//************************************************//
+//********APP SHARED FUNCSIONS*******//
+//************************************************//
+
+
+app_check_sniff:
+	fetch 1,mem_ui_state_map
+	isolate1 UI_STATE_BT_SNIFF,pdata
+	rtn
+
+//*****************************************//
+//*****************API********************//
+//*****************************************//
+app_start_auto_sniff:
+	fetch 1,mem_unsniff2sniff_timer
+	store 1,mem_unsniff2sniff_timer_count
+	rtn
+	
+app_get_lpm_wake_lock:
+	arg wake_lock_app,queue
+	branch lpm_get_wake_lock
+
+app_put_lpm_wake_lock:
+	arg wake_lock_app,queue
+	branch lpm_put_wake_lock
+	
+app_lpm_wake_auto_lock:
+	jam  LPM_WAKE_UP_DELAY_TIMER,mem_wake_up_delay_timer
+	branch app_get_lpm_wake_lock
+	
+app_lpm_wake_auto_lock_timer:
+	arg mem_wake_up_delay_timer,regc
+	arg app_put_lpm_wake_lock,regb
+	branch timer_single_step
+
+app_l2cap_flow_control_enable:
+	jam L2CAP_FLOW_CTRL_ENABLE,mem_l2cap_flow_ctrl_flag
+	rtn
+
+app_l2cap_flow_control_disable:
+	jam L2CAP_FLOW_CTRL_DISABLE,mem_l2cap_flow_ctrl_flag
+	rtn
+	
+app_bt_set_pincode:
+	jam BT_CMD_SET_PIN_CODE,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_bt_role_switch:
+	jam BT_CMD_ROLE_SWITCH,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_bt_start_reconnect:
+	bpatch patch16_1,mem_patch16
+	fetch 1,mem_app_connection_options
+	store 1,mem_connection_options
+	jam APP_FLAG_RECONNECT,mem_reconnect_flag
+	jam BT_CMD_RECONNECT,mem_fifo_temp
+	branch ui_ipc_send_cmd	
+	
+app_bt_reconnect_cancel:
+	jam BT_CMD_BB_RECONN_CANCEL,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_bt_disconnect:
+	jam BT_CMD_DISCONNECT,mem_fifo_temp
+	branch ui_ipc_send_cmd	
+
+app_bt_start_discovery_short:
+	fetch 2,mem_discovery_timeout
+	store 2,mem_discovery_timeout_timer_count
+app_bt_start_discovery_led_blink:
+	call app_led_start_blink
+app_bt_start_discovery:
+	jam BT_CMD_START_DISCOVERY,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_bt_stop_discovery:
+	setarg 0
+	store 2,mem_discovery_timeout_timer_count
+	jam BT_CMD_STOP_DISCOVERY,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_start_direct_adv:
+	jam BT_CMD_START_DIRECT_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_ble_stop_direct_adv:
+	jam BT_CMD_STOP_DIRECT_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_stop_adv:
+	jam BT_CMD_STOP_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_start_adv:	
+	jam BT_CMD_START_ADV,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_start_scan:
+	jam BT_CMD_LE_START_SCAN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_stop_scan:
+	jam BT_CMD_LE_STOP_SCAN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_start_conn:
+	jam BT_CMD_LE_START_CONN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_ble_disconnect:
+	jam BT_CMD_LE_DISCONNECT,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_led_start_blink:	
+	jam BT_CMD_LED_BLINK,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_led_on:
+	jam BT_CMD_LED_ON,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_led_stop_blink:
+app_led_off:
+	jam BT_CMD_LED_OFF,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+app_enter_hibernate:
+	jam BT_CMD_ENTER_HIBERNATE,mem_fifo_temp 
+	branch ui_ipc_send_cmd
+	
+app_bt_sniff_exit:
+	jam BT_CMD_EXIT_SNIFF,mem_fifo_temp
+	branch  ui_ipc_send_cmd
+	
+app_bt_enter_sniff:
+	jam BT_CMD_ENTER_SNIFF,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_ble_store_reconn_info:
+	jam BT_CMD_STORE_RECONN_INFO_LE,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_bt_store_reconn_info:
+	jam BT_CMD_STORE_RECONN_INFO_BT,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_store_reconn_info:
+	jam BT_CMD_STORE_RECONN_INFO,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+app_lpm_mult_enable:
+	set1 mark_lpm_mult_enable,mark
+	rtn
+
+app_lpm_mult_disable:
+	set0 mark_lpm_mult_enable,mark
+	rtn
+
+
+/*
+
+mem_power_param struct
+{
+	usigned char     mem_power_state
+	usigned char     mem_power_timer
+	usigned char	 mem_power_off_timeout
+	usigned char	 mem_power_starting_timeout
+	usigned long	 mem_power_off_cb
+	usigned long	 mem_power_starting_cb
+	usigned long	 mem_power_standby_cb
+	usigned long 	 mem_ui_butten_up_cb
+}
+    	functions:power state switching by mem_app_power_timer timeout or by button_long_pressed event
+    	(power off -> power starting->power standby->power off) and power timer initialization 
+ input parameters:mem_power_param_ptr should be point to the variable(mem_power_param) address where the input parameters stored in with its format
+output parameters:switched power state will be stored in variable mem_power_state*/
+app_button_long_pressed:
+	call app_got_power_state_common
+	beq POWER_STANDBY,app_power_shutting_down
+app_power_starting:
+	setarg POWER_STARTING
+	istore 1,regc
+	add temp,power_starting_timeout_offset,rega
+	add temp,power_starting_cb_offset,regb
+app_power_common:
+	ifetcht 1,rega
+	increase 1,regc
+	istoret 1,regc
+	branch app_power_cb_common
+	
+app_power_shutting_down:
+	setarg POWER_OFF
+	istore 1,regc
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,app_power_off_end
+	call le_send_terminate_ind_user_terminated
+	call app_ble_disconnect
+app_power_off_end:
+	fetcht 2,mem_power_param_ptr
+	add temp,power_off_timeout_offset,rega
+	add temp,power_off_cb_offset,regb
+	branch app_power_common
+	
+app_got_power_state_common:
+	fetcht 2,mem_power_param_ptr
+	add temp,power_state_offset,regc
+	ifetch 1,regc
+	rtn
+
+app_event_button_up:
+	call app_got_power_state_common
+	bne POWER_OFF,app_power_release
+	branch app_enter_hibernate
+app_power_release:
+	add temp,ui_butten_up_cb_offset,regb
+	branch app_power_cb_common
+
+
+app_hid_connected:
+	setarg HID_HANDSHAKE_TIMEOUT
+	store 1,mem_hid_handshake_timer_count
+	rtn
+
+
Index: mouse_public_3mode_usb/program/app_antiLost.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_antiLost.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_antiLost.prog	(working copy)
@@ -0,0 +1,609 @@
+ifdef COMPILE_ANTILOST
+antilost_init:
+	rtn wake	
+	setarg antilost_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+	setarg keyscan_process_lpm_before
+	store 2,mem_cb_before_lpm
+	setarg antilost_idle_process	//
+	store 2,mem_cb_idle_process
+	setarg antilost_le_conn_process	//
+	store 2,mem_cb_le_process
+	setarg antilost_bb_event_process 
+	store 2,mem_cb_bb_event_process
+	setarg antilost_le_bb_event_timer
+	store 2,mem_cb_event_timer
+	setarg antilost_le_notification
+	store 2,mem_cb_ble_transmit
+	setarg antilost_lpm_lock_process
+	store 2,mem_cb_check_wakelock
+	setarg antilost_le_receive_data_process
+	store 2,mem_cb_att_write
+	bpatch patch16_2,mem_patch16
+	
+	call antilost_buzzer_pwm_init
+	call antilost_set_ble_version
+	call keyscan_key_init
+	call antilost_adc_init
+	call ui_led_init_global
+	call ui_button_init
+	setarg antilost_key_up_down
+	store 2,mem_cb_antl_key
+	setarg antilost_power_off_cb
+	store 2,mem_antl_power_off_cb
+	setarg antilost_power_starting_cb
+	store 2,mem_antl_power_starting_cb
+	setarg antilost_power_standby_cb
+	store 2,mem_antl_power_standby_cb
+	setarg antilost_led_on_cb
+	store 2,mem_antl_led_cb_on
+	setarg antilost_led_off_cb
+	store 2,mem_antl_led_cb_off
+	setarg antilost_buzzer_on
+	store 2,mem_antl_buzzer_cb_on
+	setarg antilost_buzzer_off
+	store 2,mem_antl_buzzer_cb_off
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+	branch app_enter_hibernate
+
+antilost_set_ble_version:
+	//set ble version  4.1 
+	jam 7,mem_lmp_version
+	rtn
+
+
+antilost_le_before_hibernate:
+	call antilost_led_buzzer_stop_blink
+	branch  app_enter_hibernate
+
+antilost_le_notification:
+	call le_fifo_check_nearly_full
+	nrtn blank
+	arg mem_temp_block5,rega
+	call queue_pop
+	nrtn user
+	arg mem_temp_block5,contr
+	branch le_send_notify_from_list
+
+antilost_power_standby_cb:
+	fetch 2,mem_antl_le_sleep_timeout
+	store 2,mem_antl_le_sleep_timer
+	jam 1,mem_antl_key_scan_enable
+	branch antilost_fast_adv_start
+	
+antilost_lpm_lock_process:
+	fetch 1,mem_antl_key_state
+	beq 1,antilost_lpm_ctrl_for_led_buzzer
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,antilost_lpm_ctrl_for_led_buzzer
+	fetch 1,mem_antl_lost_mode
+	beq 1,app_get_lpm_wake_lock
+	fetch 1, mem_antl_queue_curr_num
+	nbranch app_get_lpm_wake_lock,blank 
+	branch app_put_lpm_wake_lock
+	
+antilost_lpm_ctrl_for_led_buzzer:
+	fetch 1,mem_antl_led_state
+	fetcht 1,mem_antl_buzzer_state
+	ior temp,pdata
+	beq 1,app_get_lpm_wake_lock
+	branch app_put_lpm_wake_lock
+
+antilost_bb_event_process:
+	copy regc,pdata
+	beq BT_EVT_BUTTON_UP,app_event_button_up
+	beq BT_EVT_BUTTON_LONG_PRESSED,app_button_long_pressed
+	beq BT_EVT_LE_CONNECTED,antilost_le_process_conn
+	beq BT_EVT_LE_DISCONNECTED,antilost_le_process_discon
+	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,antilost_le_conn_param_update_rsp_recieved
+	beq BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED,antilost_le_conn_param_accepted
+	rtn
+antilost_le_conn_param_update_rsp_recieved:
+	call antilost_le_conn_param_updata_judge
+	fetch 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	beq BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_REJECTED,antilost_le_conn_param_rejected
+antilost_le_conn_param_updata_procedure_sucsess:
+	jam CONN_PARAM_UPDATA_PROCEDURE_COMPLETE,mem_antl_conn_updata_procedure_state
+	jam 60,mem_antl_conn_update_timer
+	rtn
+antilost_le_conn_param_updata_judge:
+	fetch 1,mem_le_state
+	rtnbit1 lestate_update_param
+	jam 1,mem_lestate_update_param_flag
+	rtn
+
+	
+antilost_le_conn_param_accepted:
+	fetch 1,mem_lestate_update_param_flag
+	rtn blank
+	jam 0,mem_lestate_update_param_flag
+	fetch 2,mem_le_new_connslavelatency
+	branch antilost_master_nonsupport_latency,blank
+	rtn
+
+antilost_le_conn_param_rejected:
+	fetch 2,mem_le_latency
+	branch antilost_conn_param_updata_procedure_faild,blank
+antilost_conn_param_retransimiting:
+	jam CONN_PARAM_UPDATA_PROCEDURE_STARTING,mem_antl_conn_updata_procedure_state
+	fetcht 2,mem_interval_increment
+	fetch 2,mem_le_interval_min
+	iadd temp,pdata
+	store 2,mem_le_interval_min
+	copy pdata,rega
+	fetch 2,mem_le_interval_max
+	iadd temp,pdata
+	store 2,mem_le_interval_max
+	iadd rega,pdata
+	rshift pdata,temp
+	fetch 2,mem_antl_le_unnormal_interval_max
+	idiv temp
+	call get_div_result
+	store 2,mem_le_latency
+	jam 1,mem_antl_send_updata_le_param_timer
+	rtn
+antilost_conn_param_updata_procedure_faild:
+	jam CONN_PARAM_UPDATA_PROCEDURE_FAILD,mem_antl_conn_updata_procedure_state
+	rtn
+
+antilost_master_nonsupport_latency:
+	jam 0,mem_lpm_mult
+	jam 0,mem_antl_send_updata_le_param_timer
+	fetch 2,mem_le_new_conninterval	//interval from master
+	fetcht 2,mem_antl_le_unnormal_interval_min
+	isub temp,null
+	setflag positive,0,rega 
+	fetch 2,mem_antl_le_unnormal_interval_max //local intervalmax
+	fetcht 2,mem_le_new_conninterval//interval form master
+	isub temp,pdata
+	setflag positive,1,rega
+	compare	0x03,rega,0x03
+	rtn true //return if the new conn_interval in range through conn_interval_min to conn_interval_max already
+	fetch 8,mem_antl_le_unnormal_interval_min
+	store 8,mem_le_interval_min
+	jam 1,mem_antl_send_updata_le_param_timer
+	rtn                               
+
+
+antilost_le_bb_event_timer:
+	call app_power_timer
+	call antilost_double_click_timer
+	call antilost_le_fast_adv_timer
+	call antilost_le_sleep_timer
+	call antilost_app_updata_le_param_timer
+	call antilost_conn_update_timer
+	call antilost_conn_battery_send_timer
+	call antilost_disconn_buzzer_on_timer
+	branch antilost_adc_check_timer
+
+antilost_disconn_buzzer_on_timer:
+	arg mem_antl_disconn_buzzer_on_timer,regc
+	arg antilost_disconn_buzzer_off,regb
+	branch timer_single_step_2B
+
+antilost_disconn_buzzer_off:
+	arg 1,rega
+	call ui_led_blink_stop_global
+	fetch 2,mem_buzzer_pwm_conf
+	branch pwm_disable
+
+
+antilost_conn_battery_send_timer:
+	arg mem_antilost_conn_battery_send_timer,regc
+	arg antilost_conn_battery_send,regb
+	branch timer_single_step
+antilost_conn_battery_send:
+	call antilost_battery_process
+	call antilost_battery_process
+	call antilost_battery_process
+	branch antilost_battery_calculate_end //send twice to combat the failure of reception first time
+
+	
+antilost_double_click_timer:
+	arg mem_double_click_timer,regc
+	arg antilost_double_click_timeout,regb
+	branch timer_single_step
+antilost_double_click_timeout:
+	jam 0,mem_butten_click_cnt
+	rtn
+antilost_le_fast_adv_timer:
+	arg mem_antl_fast_adv_timer,regc
+	arg antilost_le_fast_adv_timeout,regb
+	branch timer_single_step_2B
+antilost_le_fast_adv_timeout:
+	arg mem_antl_slow_adv_led_style,regc
+	arg mem_antl_slow_adv_lpm_interval,regb
+	branch antilost_adv_start_common
+	
+
+antilost_conn_update_timer:
+	arg mem_antl_conn_update_timer,regc
+	arg antilost_conn_update_timer_time_out,regb
+	branch timer_single_step
+	
+antilost_conn_update_timer_time_out:
+	fetch 2,mem_le_latency
+	store 1,mem_lpm_mult
+	rtn
+antilost_app_updata_le_param_timer:
+	arg mem_antl_send_updata_le_param_timer,regc
+	arg antilost_app_updata_le_param_timeout,regb
+	branch timer_single_step
+antilost_app_updata_le_param_timeout:
+	fetch 1,mem_le_state
+	compare 0,pdata,0x60
+	nbranch antilost_wait_for_updata_param_instant_expire,true
+	jam CONN_PARAM_UPDATA_PROCEDURE_STARTING,mem_antl_conn_updata_procedure_state
+	call  app_lpm_mult_enable
+	branch le_l2cap_tx_update_req	
+antilost_wait_for_updata_param_instant_expire:
+	jam 1,mem_antl_send_updata_le_param_timer
+	rtn
+	
+antilost_le_sleep_timer:
+	arg mem_antl_le_sleep_timer,regc
+	arg antilost_le_sleep_timer_timeout,regb
+	branch timer_single_step_2B
+
+
+antilost_le_sleep_timer_timeout:
+	branch app_button_long_pressed
+
+antilost_adc_check_timer:
+	arg mem_adc_timer,regc
+	arg antilost_adc_check_timer_timeout,regb
+	branch timer_single_step_2B
+antilost_adc_check_timer_timeout:
+	fetch 2,mem_adc_timeout
+	store 2,mem_adc_timer
+	branch antilost_battery_process
+
+
+antilost_le_process_conn:
+	fetch 2,mem_adc_timeout
+	store 2,mem_adc_timer
+	setarg 0
+	store 2,mem_antl_fast_adv_timer
+	store 2,mem_antl_le_sleep_timer
+	call antilost_alert_off
+	call antilost_led_buzzer_stop_blink
+	jam 0,mem_lpm_mult
+	branch app_ble_stop_adv
+	                                                      
+
+antilost_le_process_discon:
+	setarg 0
+	store 4,mem_adc_timer
+	store 3,mem_antl_conn_updata_procedure_state
+	store 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	
+	jam 1,mem_alarm_config_notfy_cnt
+	fetch 2,mem_antl_le_sleep_timeout
+	store 2,mem_antl_le_sleep_timer
+
+	fetch 2,mem_antl_disconn_buzzer_on_timeout
+	store 2,mem_antl_disconn_buzzer_on_timer
+	
+	call queue_init
+	fetch 1,mem_antl_power_state
+	rtneq POWER_OFF
+	call antilost_fast_adv_start
+	branch antilost_on_off_alarm_after_disconn
+
+
+antilost_le_conn_process:
+//bpatch
+	branch antilost_key_process
+
+antilost_idle_process:
+
+	fetch 1,mem_antl_power_state
+	rtnne POWER_STANDBY
+	branch antilost_key_process
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+/////SOFT WTICH////////
+antilost_power_starting_cb:
+	arg mem_antl_power_starting_buzzer_style,regc
+	call antilost_buzzer_configuration
+	arg mem_antl_power_starting_led_style,regc
+antilost_power_common:
+	branch antilost_led_configuration
+
+antilost_power_off_cb:
+	jam OFF,mem_le_adv_enable
+	arg mem_antl_power_off_buzzer_style,regc
+	call antilost_buzzer_configuration
+	arg mem_antl_power_off_led_style,regc
+	branch antilost_power_common
+	
+antilost_le_receive_data_process:
+	fetch 1,mem_le_att_opcode
+	beq ATTOP_WRITE_REQUEST,antilost_le_parse_att_write_request
+	rtn
+antilost_le_parse_att_write_request:
+	fetch 2,mem_le_att_handle
+//	beq  ATT_WRITE_REQUEST_HANDLE,antilost_key_data_send
+	beq NEW_SPEC_WRITE_HANDLE,antilost_cmd_parse_for_application
+	beq NEW_SPEC_NOTIFICATION_ENABLE_HANDLE,antilost_notify_alarm_config_first_time
+	rtn
+/////////////////////////////////////////////////////////
+
+
+/////////key scan
+antilost_key_process:
+	fetch 1,mem_antl_key_scan_enable
+	rtn blank
+	branch keyscan_key_process
+
+	//queue = key index
+	//rega =1 press, =0 release
+antilost_key_up_down:
+	copy rega,pdata
+	branch antilost_key_is_up,blank
+antilost_key_is_down:
+	copy queue,pdata
+	beq 0,antilost_key0_down
+	rtn
+antilost_key_is_up:
+	copy queue,pdata
+	beq 0,antilost_key0_up
+	rtn
+
+antilost_key0_down:
+	jam 1,mem_antl_key_state
+	arg mem_antl_key_buzzer_style,regc
+	call antilost_buzzer_configuration
+	arg mem_antl_key_led_style,regc
+	call antilost_led_configuration
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,antilost_butten_down_while_disconn
+	branch antilost_butten_down_after_conn
+	
+antilost_key0_up:
+	jam 0,mem_antl_key_state
+	branch antilost_double_click_timer_init
+
+//////////////process for double-click
+
+antilost_double_click_timer_init:
+	fetch 1,mem_butten_click_cnt
+	rtnne 1
+	jam 5,mem_double_click_timer
+	rtn
+
+antilost_butten_down_after_conn:
+	fetch 1,mem_butten_click_cnt
+	pincrease 1
+	store 1,mem_butten_click_cnt
+	beq 1,antilost_click_once
+	beq 2,antilost_click_twice
+	rtn
+antilost_click_once:
+	call antilost_alert_off
+	jam OPCODE1_BUTTEN_CLICK_ONCE,mem_antl_key0_press+5//5 represent opcode offset
+	arg mem_antl_key0_press,regc
+	branch antilost_prepare_data_and_send
+antilost_click_twice:
+	jam 0,mem_butten_click_cnt
+	jam OPCODE2_BUTTEN_DOUBLE_CLICK,mem_antl_key0_press+5
+	arg mem_antl_key0_press,regc
+	call antilost_prepare_data_and_send
+	fetch 1,mem_antl_lost_mode
+	beq 1,antilost_alert_on
+	rtn   //rtn should be retaind
+	
+antilost_butten_down_while_disconn:
+	fetch 2,mem_antl_le_sleep_timeout
+	store 2,mem_antl_le_sleep_timer
+	call antilost_alert_off
+	branch antilost_fast_adv_start
+	
+///////////////////////NEW App Spcecific///////
+antilost_cmd_parse_for_application:
+	bpatch patch16_3,mem_patch16
+	call le_app_receive_data
+	ifetch 1,rega
+	beq OPCODE3_ANTL_START_ALRAM,antilost_on_of_alram
+	beq OPCODE7_ANTL_CONFIG_ALRAM,antilost_configuration_for_alram
+	rtn
+
+antilost_on_of_alram:
+	fetch 1,mem_antl_lost_mode
+	beq ANTI_LE_ALARM_OFF,antilost_alert_on
+	beq ANTI_LE_ALARM_ON,antilost_alert_off
+	rtn
+
+antilost_configuration_for_alram:
+	ifetch 1,regb
+	beq 1,antilost_set_start_alarm_after_disconn
+	beq 0,antilost_set_no_alarm_after_disconn
+	rtn
+/////////////////check////////////////////////
+
+/*input: 1)package data addr in regc
+output:no
+function:calculate check_out value and send data*/
+//mem_temp_block5
+antilost_prepare_data_and_send:
+	bpatch patch16_4,mem_patch16
+	fetch 1,mem_client_characteristic_configuration_descriptor
+	isolate1 NOTIFICATION_ENABLE_BIT,pdata
+	nrtn true
+	add regc,6,contr
+	ifetch 2,contr
+	byteswap pdata,pdata
+	add pdata,5,loopcnt
+	add regc,3,contr
+	call calc_check_sum_start
+	istore 1,contr
+	copy regc,rega
+	branch queue_push
+
+/////////////////NEW APP SPECIFIC check end////////////////////
+
+
+/////////alarm//////////////////////////////
+antilost_alert_on:
+	fetch 1,mem_antl_power_state
+	rtn blank
+	jam 1,mem_antl_lost_mode
+	arg mem_antl_alert_buzzer_stlye,regc
+	call antilost_buzzer_configuration
+	arg mem_antl_alert_led_stlye,regc
+	call antilost_led_configuration
+	jam OPCODE4_CURRENT_ALARM_STATE,mem_antl_key0_release+5//5 represent opcode offset
+	jam 1,mem_antl_key0_release+8 //8 represent data offset,digit 1 represent alarm is on at present
+	arg mem_antl_key0_release,regc
+	branch antilost_prepare_data_and_send
+antilost_alert_off:
+	fetch 1,mem_antl_lost_mode
+	rtn blank
+	jam 0,mem_antl_lost_mode
+	call antilost_led_buzzer_stop_blink
+	jam OPCODE4_CURRENT_ALARM_STATE,mem_antl_key0_release+5//5 represent opcode offset
+	jam 0,mem_antl_key0_release+8 //8 represent data offset,digit 0 represent alarm is off at present
+	arg mem_antl_key0_release,regc
+	branch antilost_prepare_data_and_send
+
+antilost_set_start_alarm_after_disconn:
+	jam 1,mem_alarm_config
+	jam OPCODE7_ANTL_CONFIG_ALRAM,mem_antl_key0_release+5
+	jam 1,mem_antl_key0_release+8
+	arg mem_antl_key0_release,regc
+	branch antilost_prepare_data_and_send
+antilost_set_no_alarm_after_disconn:
+	jam 0,mem_alarm_config
+	jam OPCODE7_ANTL_CONFIG_ALRAM,mem_antl_key0_release+5
+	jam 0,mem_antl_key0_release+8
+	arg mem_antl_key0_release,regc
+	branch antilost_prepare_data_and_send
+antilost_on_off_alarm_after_disconn:
+	fetch 1,mem_alarm_config
+	rtn blank
+	branch antilost_alert_on
+	
+antilost_notify_alarm_config_first_time:
+	ifetch 2,rega
+	store 2,mem_client_characteristic_configuration_descriptor
+	isolate1 NOTIFICATION_ENABLE_BIT,pdata
+	nrtn true
+	fetch 1,mem_alarm_config_notfy_cnt
+	rtn blank
+	jam 0,mem_alarm_config_notfy_cnt
+	fetch 8,mem_antl_le_interval_min
+	store 8,mem_le_interval_min
+	jam 3,mem_antilost_conn_battery_send_timer
+	jam OPCODE7_ANTL_CONFIG_ALRAM,mem_antl_key0_release+5
+	jam 30,mem_antl_send_updata_le_param_timer
+	fetch 1,mem_alarm_config
+	store 1,mem_antl_key0_release+8
+	arg mem_antl_key0_release,regc
+	branch antilost_prepare_data_and_send
+
+//////////////alarm end//////////////////////////
+//sytle address in regc
+antilost_buzzer_configuration:
+	arg 1,rega
+	branch antilost_configuration_common
+antilost_led_configuration:
+	arg 0,rega
+antilost_configuration_common:
+	branch antilost_led_buzzer_style_configuration
+	
+antilost_led_buzzer_stop_blink:
+	arg 0,rega
+	call ui_led_blink_stop_global
+	arg 1,rega
+	call ui_led_blink_stop_global
+	fetch 2,mem_buzzer_pwm_conf
+	branch pwm_disable
+	
+antilost_led_buzzer_style_configuration:
+	call calc_curr_struct_prt
+	arg 7,loopcnt
+	branch ui_led_set_style_global+2
+
+
+
+antilost_fast_adv_start:
+	arg mem_antl_fast_adv_led_style,regc
+	arg mem_antl_lpm_interval,regb
+antilost_adv_start_common:
+	call antilost_adv_interval_lpm_interval_set
+	call antilost_led_configuration
+	fetch 2,mem_antl_fast_adv_timeout
+	store 2,mem_antl_fast_adv_timer
+	branch app_ble_start_adv
+	
+antilost_adv_interval_lpm_interval_set:
+	ifetch 2,regb
+	store 2,mem_lpm_interval
+	ifetch 2,contr
+	store 2,mem_le_adv_interval
+	rtn
+///////////////beep////////////
+antilost_buzzer_pwm_init:
+	arg 0,rega //sys clk 12mhz
+	call pwm_init
+	fetch 6,mem_buzzer_pwm_conf
+	store 6,mem_pdatatemp
+	call pwm_out_set
+	fetch 2,mem_buzzer_pwm_conf
+	branch pwm_disable
+	
+antilost_led_on_cb:
+	jam 1,mem_antl_led_state
+	rtn	
+antilost_led_off_cb:
+	jam 0,mem_antl_led_state
+	rtn
+
+
+
+antilost_buzzer_off:
+	jam 0,mem_antl_buzzer_state
+	fetch 2,mem_buzzer_pwm_conf
+	branch pwm_disable
+	
+antilost_buzzer_on:
+	jam 1,mem_antl_buzzer_state
+	fetch 6,mem_buzzer_pwm_conf
+	store 6,mem_pdatatemp
+	branch pwm_out_set
+
+////////////////beep end///////////////////////////
+/////////////adc start////////////////////////
+antilost_adc_init:
+	jam 0,mem_adc_config_flag
+	rtn
+	
+antilost_battery_process:
+	call vdd_calculate_by_mode
+	store 2,mem_battery_current_voltage
+	arg mem_battery_calculate_set,rega
+	call adc_bat_percent_lowpower_out
+	store 1,mem_voltage_remain_percent //for debug
+	setarg 0x65
+	beq 0,antilost_low_battery
+	sub pdata,0x64,null
+	nbranch antilost_full_battery,positive
+	store 1,mem_antl_key0_release+8
+antilost_battery_calculate_end:
+	jam OPCODE5_BATTER_INFORMATION,mem_antl_key0_release+5
+	arg mem_antl_key0_release,regc
+	branch antilost_prepare_data_and_send
+antilost_full_battery:
+	jam 100,mem_antl_key0_release+8
+	branch antilost_battery_calculate_end
+
+antilost_low_battery:
+	branch app_button_long_pressed
+else
+antilost_init:
+	rtn
+endif
+
+
Index: mouse_public_3mode_usb/program/app_car.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_car.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_car.prog	(working copy)
@@ -0,0 +1,800 @@
+ifdef COMPILE_CAR
+
+car_init:
+	call enable_authrom
+	rtn wake
+	setarg car_g24_receive_process
+	store 2,mem_cb_24g_receive_process
+	
+	setarg g24_bind_ackpayload_prep
+	store 2,mem_cb_24g_ackpayload
+	
+	setarg car_g24_cb_data_device1
+	store 2,mem_cb_24g_data_device1
+
+	setarg car_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+	
+	setarg car_le_process_lpm_before
+	store 2,mem_cb_before_lpm	
+	
+	setarg app_enter_hibernate
+	store 2,mem_cb_discovry_timeout
+	
+	setarg car_scale_process_idle	
+	store 2,mem_cb_idle_process	
+	
+	setarg car_scale_process_bb_event 
+	store 2,mem_cb_bb_event_process	
+	
+	setarg app_get_lpm_wake_lock
+	store 2,mem_cb_check_wakelock
+	
+	setarg car_le_receive_data
+	store 2,mem_cb_att_write
+	
+	setarg car_le_bb_event_timer
+	store 2,mem_cb_event_timer
+	
+	bpatch patch16_5,mem_patch16
+	call car_init_environment
+	call car_lpm_timer_enable
+	call queue_init
+	jam 2,mem_lpm_mult
+	jam POWER_ON,mem_car_24g_received_pac
+	fetch 1,mem_car_config_soft_switch_enable
+	store 1,mem_car_hard_soft_switch
+	beq HARD_SWITCH, car_hard_switch_power_on_signal
+	fetch 1,mem_car_config_soft_switch_gpio
+	store 1,mem_ui_button_gpio
+	jam OFF,mem_le_adv_enable
+car_soft_switch_power_on_init:
+	call ui_button_init
+	call ui_button_polling
+	jam POWER_STARTING,mem_car_power_state
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+ 	branch app_enter_hibernate
+
+car_power_off_signal:	
+	branch car_ui_led_init
+	
+car_hard_switch_power_on_signal:
+	jam POWER_STANDBY,mem_car_power_state
+car_soft_switch_power_on_signal:
+	jam ON,mem_le_adv_enable
+	setarg FAST_ADV_INTERVAL_VALUE_CAR
+	call shutter_ble_adv_interval_set
+car_le_modified_name_adv:
+	arg mem_le_name+7,contw
+	fetch 1,mem_le_lap
+car_name_loop:
+	and pdata,0xF0,temp
+	rshift4 temp,temp
+	call car_hex_to_ascii
+	istoret 1, contw
+	and pdata,0x0F,temp
+	call car_hex_to_ascii
+	istoret 1, contw
+	call le_modified_name_att_list
+	fetcht 1,mem_le_name_len
+	copy temp,loopcnt
+	arg mem_le_adv_data+2,contw
+	arg mem_le_name,contr
+	call memcpy
+car_le_modified_name_scan:
+	fetcht 1,mem_le_name_len
+	copy temp,loopcnt
+	arg mem_le_scan_data+2,contw
+	arg mem_le_name,contr
+	branch memcpy
+car_hex_to_ascii:
+	sub temp,9,null
+	branch car_hex_num,positive
+	add temp,55,temp
+	rtn
+car_hex_num:	
+	add temp,48,temp
+	rtn
+
+car_ui_led_init:
+	fetch 1,mem_car_config_blood_led1_gpio
+	bne INVALID_PIN_NUM,car_blood_led_gpio_set
+car_ui_led_init_1:
+	fetch 1,mem_car_config_pairing_led_gpio
+	bne INVALID_PIN_NUM,car_pairing_led_gpio_set
+car_ui_led_init_2:
+	fetch 1,mem_car_config_low_voltage_led_gpio
+	bne INVALID_PIN_NUM,car_low_voltage_led_gpio_set
+car_ui_led_init_3:
+	fetch 1, mem_car_led_num
+	copy pdata,loopcnt
+	setarg mem_car_led_map
+	copy pdata,rega
+car_in_lp1:
+	copy rega,contr
+	ifetch 1,contr
+	copy contr,rega
+	beq INVALID_PIN_NUM,car_in_lp1_end
+	copy pdata,temp
+	call gpio_config_output
+car_in_lp1_end:
+	loop car_in_lp1
+car_ui_led_init_end:
+	rtn
+car_blood_led_gpio_set:
+	fetch 8,mem_car_config_blood_led1_gpio
+	store 8,mem_car_led_map+2
+	branch car_ui_led_init_1
+car_pairing_led_gpio_set:
+	store 1,mem_car_led_map
+	branch car_ui_led_init_2
+car_low_voltage_led_gpio_set:
+	store 1,mem_car_led_map+1
+	branch car_ui_led_init_3
+
+car_init_environment:
+	
+	call car_g24_init
+	arg 0,rega
+	call pwm_init
+	call car_ui_led_init
+	call car_start_blink
+	call car_init_adc_hvin
+	branch car_motor_init
+
+car_motor_init:
+	fetch 1, mem_car_motor_gpio_num
+	copy pdata,loopcnt
+	setarg mem_car_motor_gpio_map
+	copy pdata,rega
+p_in_lp1:
+	copy rega,contr
+	ifetch 1,contr
+	copy contr,rega
+	beq INVALID_PIN_NUM,p_in_lp1_end
+	copy pdata,temp
+	store 1, mem_car_gpio
+	call car_ui_gpio_init
+p_in_lp1_end:
+	loop p_in_lp1
+p_car_ui_led_init_end:
+	rtn
+
+car_ui_gpio_init:
+	fetch 1,mem_car_gpio
+	rtneq UI_BUTTON_GPIO_DISABLE
+	iforce temp
+	branch gpio_config_output
+
+	
+car_init_adc_hvin:
+	jam 100,mem_car_notify_vdd_value_last
+	rtn
+	
+car_le_before_hibernate:
+car_le_process_lpm_before:
+	branch keyscan_process_lpm_before
+
+car_key_scan_process:
+	branch keyscan_key_process
+
+car_scale_process_idle:
+	call car_le_send_packet
+	call car_g24_status_process
+	branch car_key_scan_process
+
+car_g24_status_process:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	fetch 1,mem_car_24g_received_pac
+	beq WORK_PAIRED,car_g24_connected_event
+	rtn
+car_g24_connected_event:
+	fetch 1,mem_car_24g_status
+	rtneq WORK_PAIRED
+	jam WORK_PAIRED,mem_car_24g_status
+	call car_lpm_timer_disable
+	call car_stop_blink
+	branch car_g24_connected
+
+car_lpm_timer_enable:
+	fetch 2,mem_car_enter_lpm_timer_count	
+	store 2,mem_car_enter_lpm_timer
+	jam 0,mem_car_enter_lpm_flag
+	rtn
+
+	
+car_lpm_timer_disable:
+	setarg 0
+	branch car_lpm_timer_enable+1
+
+
+car_stop_blink:
+	arg 0,rega
+	branch ui_led_blink_stop_global
+	
+	
+car_start_blink:
+	arg 0,rega
+	branch ui_led_blink_start_global
+	
+
+
+
+
+car_le_send_packet:
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BLE_CONNECTED
+	call le_fifo_check_nearly_full
+	nrtn blank
+	arg mem_car_pop_queue_buff,rega
+	call queue_pop
+	nrtn user
+	arg mem_car_pop_queue_buff,contr
+	branch le_send_notify_from_list
+ 
+car_scale_process_bb_event:
+	copy regc,pdata
+	beq BT_EVT_BUTTON_UP,app_event_button_up
+	beq BT_EVT_BUTTON_LONG_PRESSED,app_button_long_pressed
+	beq BT_EVT_LE_CONNECTED,car_scale_event_le_conn
+	beq BT_EVT_LE_DISCONNECTED,car_scale_event_le_discon
+	rtn
+
+car_scale_event_le_conn:
+	call car_lpm_timer_disable
+	call car_stop_blink
+	set0 mark_24g_rxmode,mark
+	branch car_scale_process_conn
+car_g24_connected:
+	fetch 2,mem_car_24g_no_data_timeout_count
+	store 2,mem_car_24g_no_data_timeout_timer
+car_scale_process_conn:
+	jam 0x14,mem_car_notify_vdd_timer
+	jam 0,mem_lpm_mode
+	call app_ble_stop_adv
+	branch app_lpm_mult_enable
+
+
+car_scale_event_le_discon:
+	set1 mark_24g_rxmode,mark
+	call car_lpm_timer_enable
+	call car_fb_motor_stop
+	call car_lr_motor_stop
+car_g24_disconnect:
+	setarg 0
+	store 5,mem_car_led_control
+	setarg 4
+	call pwm_disable
+	setarg 5
+	call pwm_disable
+	setarg 20
+	call pwm_disable
+	setarg 21
+	call pwm_disable
+	setarg 22
+	call pwm_disable
+	setarg 7
+	call pwm_disable
+	call queue_init
+	jam 10,mem_motor1_speed
+	jam 10,mem_motor2_speed
+	jam 10,mem_motor3_speed
+//	jam 1,mem_lpm_mode
+	jam 2,mem_lpm_mult
+	setarg FAST_ADV_INTERVAL_VALUE_CAR
+	call shutter_ble_adv_interval_set
+	branch app_ble_start_adv
+
+car_le_bb_event_timer:
+	call car_moto1_blank_data_timer
+	call car_moto2_blank_data_timer
+	call car_moto3_blank_data_timer
+	call app_power_timer
+	call car_notify_vdd_timer
+	call car_24g_no_data_timeout_timer
+	call car_24g_bind_enable_timer
+	branch car_enter_lpm_timer
+
+car_24g_bind_enable_timer:
+	arg mem_car_24g_bind_enable_delay_count,regc
+	arg 0,regb
+	branch timer_single_step
+
+car_enter_lpm_timer:
+	arg mem_car_enter_lpm_timer,regc
+	arg car_enter_lpm_enable,regb
+	branch timer_single_step_2B
+car_enter_lpm_enable:
+	jam 1,mem_car_enter_lpm_flag
+	rtn
+	
+car_24g_no_data_timeout_timer:
+	arg mem_car_24g_no_data_timeout_timer,regc
+	arg car_24g_no_data_timer_timeout,regb
+	branch timer_single_step_2B
+car_24g_no_data_timer_timeout:
+	jam WORK_SEARCH,mem_car_24g_status
+	jam POWER_ON,mem_car_24g_received_pac
+	branch car_g24_disconnect
+
+car_notify_vdd_timer:
+	fetch 1,mem_car_config_bat_notify_enable
+	rtn blank
+	arg mem_car_notify_vdd_timer,regc
+	arg car_notify_vdd,regb
+	branch timer_single_step
+car_notify_vdd:
+	fetch 1,mem_car_notify_vdd_count
+	store 1,mem_car_notify_vdd_timer
+ 	fetch 1,mem_car_working_flag
+ 	nrtn blank
+car_read_hvin:
+	call vdd_calculate_by_mode
+	store 2,mem_vdd_now_vol
+	arg mem_vdd_calculate_set,rega
+	call adc_bat_percent_lowpower_out
+	fetcht 1,mem_car_notify_vdd_value_last
+	isub temp,null
+	branch car_notify_vdd_next2,positive
+	store 1,mem_car_notify_vdd_value_last
+	copy pdata,temp
+car_notify_vdd_next2:
+	storet 1,mem_car_notify_vdd_percent
+	fetch 1,mem_car_config_low_voltage_percent
+	isub temp,null
+	call car_enter_low_bat,positive
+	storet 1,mem_notify_bat_payload 
+	arg 6,loopcnt
+	arg mem_notify_bat_head,contr
+	call calc_check_sum_start
+	store 1,mem_notify_bat_check_sum
+	arg mem_notify_bat_packet,rega
+	branch queue_push
+car_enter_low_bat:
+	fetch 1,mem_low_bat_flag
+	nrtn blank
+	jam 1,mem_low_bat_flag
+	arg 1,rega
+	branch ui_led_blink_start_global
+car_low_bat_led_off:
+	arg 1,rega
+	branch ui_led_blink_stop_global
+
+////////////////////////check sum////////////////////////
+//loopcnt = sum number,contr = ptr
+calc_check_sum_start:
+	arg 0,rega
+calc_check_sum_loop:
+	ifetch 1,contr
+	iadd rega,rega
+	loop calc_check_sum_loop
+calc_check_sum_and:
+	and rega,0xff,pdata
+	rtn
+
+car_le_receive_data:	
+	fetch 1,mem_le_att_opcode
+	beq ATTOP_WRITE_REQUEST,car_le_parse_att_write_request
+	rtn
+car_le_parse_att_write_request:
+	fetch 2,mem_le_att_handle
+	beq ATT_CAR_CONTROL_HANDLE,car_control_le_receive
+	rtn
+
+/*
+*	typedef struct
+*	{
+*		2byte	packet_head				(mem_app_receive_temp)
+*		1byte	packet_cmd				(mem_app_receive_temp+2)
+*		2byte	packet_payload_length	(mem_app_receive_temp+3)
+*		10byte	packet_payload			(mem_app_receive_temp+5)
+*		1byte	packet_check_sum		(mem_app_receive_temp+15)
+*	}
+*/
+le_app_receive_data:
+	bpatch patch16_6,mem_patch16
+	ifetch 5,rega
+	store 5,mem_app_receive_temp
+	fetch 2,mem_app_receive_temp
+	arg LE_RECEIVE_PACKET_HEAD,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_app_receive_temp+3
+	byteswap pdata,pdata
+	store 2,mem_app_receive_temp+3
+	copy pdata,loopcnt
+	increase 5,rega
+	copy rega,contr
+	arg mem_app_receive_temp+5,contw
+	call memcpy
+	ifetch 1,contr
+	store 1,mem_app_receive_temp+15
+	arg mem_app_receive_temp+2,rega
+	arg mem_app_receive_temp+5,regb
+	rtn
+
+car_control_le_receive:
+	setarg 0
+	store 5,mem_le_receive_payload
+	store 5,mem_le_receive_payload+5
+	call le_app_receive_data
+	copy regb,contr
+	arg mem_le_receive_payload,contw
+	arg 10,loopcnt
+	call memcpy
+car_receive_cmd_select:
+	bpatch patch16_7,mem_patch16
+	ifetch 1,rega
+	beq CAR_CMD_OLD_CAR_CONTROL,car_drive_old
+	beq CAR_CMD_OLD_SPEED_CONTROL,car_speed_set_old
+	beq CAR_CMD_L_R_MOTOR_CONTROL,car_motor_control
+	beq CAR_CMD_F_B_MOTOR_CONTROL,car_motor_control
+	beq CAR_CMD_IR_CONTROL,car_ir_data_rx_from_app
+	beq CAR_CMD_LED_CONTROL,car_led_control_receive
+	beq CAR_CMD_DEVICE_INFO,car_info_request
+	rtn
+
+car_24g_receive_data:
+	call car_control_le_receive
+	fetch 1,mem_app_receive_temp+2	//cmd
+	beq CAR_CMD_L_R_MOTOR_CONTROL,car_24g_receive_data_next
+	beq CAR_CMD_F_B_MOTOR_CONTROL,car_24g_receive_data_next
+	rtn
+car_24g_receive_data_next:
+	fetch 1,mem_le_receive_payload	//moto1
+	ncall car_moto1_enable_blank_data_timer,blank
+	fetch 1,mem_le_receive_payload+2	//moto2
+	ncall car_moto2_enable_blank_data_timer,blank
+	fetch 1,mem_le_receive_payload+4	//moto3
+	ncall car_moto3_enable_blank_data_timer,blank
+	rtn
+
+car_moto1_enable_blank_data_timer:
+	jam 5,mem_car_moto1_blank_timer
+	rtn
+car_moto2_enable_blank_data_timer:
+	jam 5,mem_car_moto2_blank_timer
+	rtn
+car_moto3_enable_blank_data_timer:
+	jam 5,mem_car_moto3_blank_timer
+	rtn
+
+car_moto1_blank_data_timer:
+	arg mem_car_moto1_blank_timer,regc
+	arg car_moto1_blank_data,regb
+	branch timer_single_step
+car_moto2_blank_data_timer:	
+	arg mem_car_moto2_blank_timer,regc
+	arg car_moto2_blank_data,regb
+	branch timer_single_step
+car_moto3_blank_data_timer:		
+	arg mem_car_moto3_blank_timer,regc
+	arg car_moto3_blank_data,regb
+	branch timer_single_step
+
+car_moto1_blank_data:
+	jam 0,mem_le_receive_payload
+	branch car_motor_control
+car_moto2_blank_data:
+	jam 0,mem_le_receive_payload+2
+	branch car_motor_control
+car_moto3_blank_data:
+	jam 0,mem_le_receive_payload+4
+	branch car_motor_control
+	
+	
+///////////////////////Motor//////////////////////////////////////////
+
+car_drive_old:	
+	fetch 1,mem_le_receive_payload
+	store 1,mem_motor1_status
+	fetch 1,mem_le_receive_payload+1
+	store 1,mem_motor2_status
+	branch car_motor_control_common
+
+
+	
+car_left_right_control_old:
+	fetch 1,mem_le_receive_payload
+	store 1,mem_motor2_status
+	branch car_motor2_control
+car_front_back_control_old:
+	fetch 1,mem_motor1_speed
+	call car_reset_old_speed
+	fetch 1,mem_le_receive_payload+1
+	store 1,mem_motor1_status
+	branch car_motor1_control
+car_reset_old_speed:
+	beq SPEED_LEVEL_2,car_reset_old_speed2
+	beq SPEED_LEVEL_3,car_reset_old_speed3
+	store 1,mem_motor1_speed
+	rtn
+car_reset_old_speed2:
+	jam SPEED_LEVEL_5,mem_motor1_speed
+	rtn
+car_reset_old_speed3:
+	jam SPEED_LEVEL_10,mem_motor1_speed
+	rtn
+car_speed_set_old:
+	fetch 1,mem_le_receive_payload
+	call car_reset_old_speed
+	fetch 1,mem_motor1_speed
+	call car_motor_speed_duty_setting
+	call car_motor_speed_duty_transform
+	jam 0x00,mem_pdatatemp+1	//pwm channel0
+	branch pwm_duty_cycle_set
+
+car_motor_control:
+	fetch 1,mem_car_24g_go_die_flag
+	nrtn blank
+	fetch 6,mem_le_receive_payload
+	store 6,mem_motor1_status
+	fetch 1,mem_motor1_speed
+	fetcht 1,mem_motor2_speed
+	iand temp,pdata
+	fetcht 1,mem_motor3_speed
+	iand temp,pdata
+	call car_motor_working_flag,blank	
+car_motor_control_common:
+	bpatch patch17_0,mem_patch17
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BLE_CONNECTED,pdata
+	ncall car_lpm_timer_enable,true
+	call car_motor1_control
+	call car_motor2_control
+	branch car_conn_led_state
+
+car_conn_led_state:
+	fetch 1,mem_motor1_status
+	fetcht 1,mem_motor2_status
+	iadd temp,pdata
+	nbranch check_51cmd_led_on,blank
+	branch check_51cmd_led_off	
+
+car_motor1_control:
+	arg mem_motor1_status,contr
+	branch car_motor1_status_select
+car_motor2_control:
+	arg mem_motor2_status,contr
+	branch car_motor2_status_select
+car_motor3_control:
+	arg mem_motor3_status,contr
+	branch car_motor_status_select
+car_motor_working_flag:
+	jam 0,mem_car_working_flag
+	rtn
+
+car_motor1_status_select:
+	ifetch 1,contr
+	beq TURN_FRONT,car_lr_motor_stop
+	beq TURN_LEFT,car_lr_motor_left
+	beq TURN_RIGHT,car_lr_motor_right
+	rtn
+car_motor2_status_select:
+	ifetch 1,contr
+	beq MOTOR_STOP,car_fb_motor_stop
+	beq GO_BACK,car_fb_motor_front
+	beq GO_FRONT,car_fb_motor_back
+	rtn
+
+car_lr_motor_stop:
+	fetcht 1,mem_car_motor_left_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_right_gpio
+	branch gpio_out_inactive
+car_lr_motor_left:
+	fetcht 1,mem_car_motor_left_gpio
+	call gpio_out_active
+	fetcht 1,mem_car_motor_right_gpio
+	branch gpio_out_inactive
+car_lr_motor_right:
+	fetcht 1,mem_car_motor_left_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_right_gpio
+	branch gpio_out_active
+car_fb_motor_stop:
+	fetcht 1,mem_car_motor_front_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_back_gpio
+	branch gpio_out_inactive
+car_fb_motor_front:
+	fetcht 1,mem_car_motor_front_gpio
+	call gpio_out_active
+	fetcht 1,mem_car_motor_back_gpio
+	branch gpio_out_inactive
+car_fb_motor_back:
+	fetcht 1,mem_car_motor_front_gpio
+	call gpio_out_inactive
+	fetcht 1,mem_car_motor_back_gpio
+	branch gpio_out_active
+
+	
+
+
+car_motor_status_select:
+	bpatch patch17_1,mem_patch17
+	ifetch 1,contr
+	beq MOTOR_STOP,car_motor_stop
+	beq GO_FRONT,car_motor_positive
+	beq GO_BACK,car_motor_negative
+	rtn
+car_motor_positive:
+	jam 0,mem_motor_select_p_n
+	branch car_motor_negative+1
+car_motor_negative:
+	jam 1,mem_motor_select_p_n
+	ifetch 1,contr
+	store 1,mem_car_motor_speed
+	ifetch 8,regb
+	branch car_motor_work
+
+car_motor_stop:
+	ifetch 1,regb
+	call pwm_disable
+	increase 1,regb
+	ifetch 1,regb
+	branch pwm_disable
+car_motor_work:
+	store 8,mem_motor_pwm_pin1_set
+	jam 1,mem_car_working_flag
+	fetch 1,mem_motor_select_p_n
+	beq 0,car_motor_select_positive
+car_motor_select_negative:
+	fetch 1,mem_motor_pwm_pin2_set
+	store 1,mem_motor_pwm_pin_set
+	fetch 1,mem_motor_pwm_pin1_set
+car_motor_work_next:
+	call pwm_disable
+	fetch 1,mem_car_motor_speed
+	call car_motor_speed_duty_setting
+	store 1,mem_motor_pwm_dute_set
+	fetch 6,mem_motor_pwm_pin_set
+	store 6,mem_pdatatemp
+	branch pwm_out_set
+car_motor_select_positive:
+	fetch 1,mem_motor_pwm_pin1_set
+	store 1,mem_motor_pwm_pin_set
+	fetch 1,mem_motor_pwm_pin2_set
+	branch car_motor_work_next
+
+car_motor_speed_duty_setting:
+	mul32 pdata,5,pdata
+	add pdata,50,pdata
+	rtn
+car_motor_speed_duty_transform:
+	arg 12000,temp
+	imul32 temp,pdata
+	div pdata,100
+	call wait_div_end
+	quotient temp
+	copy temp,rega
+	setarg 12000
+	isub temp,regb
+	rtn
+
+car_ir_data_rx_from_app:
+	rtn
+
+car_led_control_receive:
+	fetch 8,mem_le_receive_payload
+	store 8,mem_car_led_control
+	rtn
+
+car_info_request:
+	fetch 1,mem_car_config_device_select
+	store 1,mem_car_info_request_payload
+	fetch 1,mem_car_config_motor_layout
+	store 1,mem_car_info_request_payload+1
+	fetch 1,mem_car_config_ir_enable
+	store 1,mem_car_info_request_payload+2
+	arg 13,loopcnt
+	arg mem_car_info_request_head,contr
+	call calc_check_sum_start
+	store 1,mem_car_info_request_checksum
+	arg mem_car_info_request,rega
+	branch queue_push
+
+
+/************************************G24 CAR RX FUNC START**************************************/
+car_g24_init:
+	setarg 0
+	store 8,mem_24g_bind_payload
+	call g24_receive_init
+	branch g24_mode_switch_init
+
+car_g24_receive_process:
+	call car_g24_mode_switch
+	call car_g24_work_mode
+	call car_g24_bind_mode
+	branch car_g24_lpm_dipatch
+
+car_g24_mode_switch:
+	call g24_mode_switch_bind_work
+car_g24_bind_mode_enable:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	fetch 1,mem_car_24g_bind_enable_delay_count	//after power on 10s,enable bind
+	nbranch g24_switch_work_mode,blank
+	fetch 1,mem_car_24g_status	//after paired,disable bind mode
+	beq WORK_SEARCH,g24_switch_work_mode
+	rtn
+
+car_g24_work_mode:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_WORK
+	call g24_work_mode_start
+	branch car_g24_ch_polling_clear,user3
+car_g24_receive_ch_polling:
+	fetch 1,mem_car_enter_lpm_flag
+	rtn blank
+	fetch 1,mem_car_24g_ch_polling
+	increase 1,pdata
+	store 1,mem_car_24g_ch_polling
+	beq 4,car_g24_ch_polling_clear
+	call g24_ch
+	call g24_receive_packet_start
+	nbranch car_g24_receive_ch_polling,user3
+car_g24_ch_polling_clear:
+	jam 0,mem_car_24g_ch_polling
+	rtn
+
+car_g24_bind_mode:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	call g24_bind_init
+	call car_g24_bind_device_addr
+	call g24_bind_data_process
+	fetch 1,mem_24g_bind_device_status
+	nbranch car_g24_bind_mode_exit,blank
+	call g24_nodata_process
+	fetch 1,mem_24g_nodata_timer_enable
+	rtn blank
+	setarg 0
+	store 4,mem_24g_device1_addr
+	rtn
+
+car_g24_bind_mode_exit:
+	jam 0,mem_24g_mode_switch
+	arg 0,rega
+	call ui_led_off_global
+	call g24_switch_work_mode
+	call g24_timer_init
+	fetch 4,mem_lap
+	branch g24_update_addr_and_synccrc8
+	
+car_g24_bind_device_addr:
+	fetch 4,mem_24g_device1_addr
+	rtn blank
+	branch g24_update_addr_and_synccrc8
+
+car_g24_cb_data_device1:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	fetch 2,mem_car_24g_no_data_timeout_count
+	store 2,mem_car_24g_no_data_timeout_timer
+	jam WORK_PAIRED,mem_car_24g_received_pac
+	arg mem_24g_rxdata_temp+3,rega
+	branch car_24g_receive_data
+
+car_g24_lpm_dipatch:
+	fetch 1,mem_car_enter_lpm_flag
+	rtn blank
+	call car_g24_lpm_wait
+	nrtn user
+	fetch 3,mem_24g_enter_hibernate	//about 1000ms
+	call clk2lpo
+	storet 4,mem_sleep_counter
+  	branch lpm_sleep
+car_g24_lpm_wait:
+	enable user
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	branch disable_user,blank
+	branch car_le_process_lpm_before
+
+endif
+
+
+
Index: mouse_public_3mode_usb/program/app_dongle.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_dongle.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_dongle.prog	(working copy)
@@ -0,0 +1,528 @@
+ifdef COMPILE_DONGLE
+
+dongle_init:
+	setarg dongle_dispatch
+	store 2,mem_cb_24g_receive_process
+	setarg dongle_g24_mouse
+	store 2,mem_cb_24g_data_device1
+	setarg dongle_g24_kb
+	store 2,mem_cb_24g_data_device2
+	setarg dongle_ackpayload_prep
+	store 2,mem_cb_24g_ackpayload
+	setarg dongle_usb_config
+	store 2,mem_cb_usb_config
+	branch usb_init
+
+
+dongle_default_init:
+	//sys init
+	fetch 1,mem_tmp_buffer+DONGLE_KB_BIND_EFUSE_OFFECT
+	store 1,mem_dg_kb_bind_flag
+	call dongle_xtal_select
+	fetch 1,mem_dg_sys_config
+	isolate1 DG_ENABLE_EEPROM,pdata
+	branch dongle_default_no_eeprom,true
+	fetch 1,mem_dg_sys_config
+	isolate1 DG_ENABLE_NEW_CHMAP,pdata
+	call g24_chamap_param_update,true
+dongle_default_no_eeprom:	
+	fetch 1,mem_dg_sys_config
+	and_into 0x0f,pdata	//bit4-0
+	store 1,mem_tx_power
+	call app_sys_param_init
+	//24g init
+	jam 0xff,mem_rssi_buff_index
+	setarg mem_dg_rssi_noise_buffer
+	store 2,mem_rssi_noise_buffer_ptr
+	setarg mem_dg_rssi_noise_dg_buffer
+	store 2,mem_rssi_noise_self_buffer_ptr
+	setarg mem_dg_rssi_noise_ms_buffer
+	store 2,mem_rssi_noise_device1_buffer_ptr
+	setarg mem_dg_rssi_noise_kb_buffer
+	store 2,mem_rssi_noise_device2_buffer_ptr
+	jam TX_POWER_F5DB,mem_24g_pair_tx_power
+	jam 0,mem_dg_kb_bind_success
+	jam 0,mem_24g_bind_device_living
+	call g24_enable_1M
+	call g24_receive_init
+	call g24_pair_param_init
+	call g24_chmap_param_init
+	//usb init
+	fetch 1,mem_dg_usb_tx_interval
+	store 1,mem_usb_tx_interval
+	fetch 9,mem_dg_usb_vid_pid
+	store 9,mem_usb_vid_pid
+	rtn
+	
+dongle_xtal_select:
+	jam XTAL_24M,mem_fcomp_div
+	fetch 1,mem_dg_sys_config
+	rtnbit0 DG_ENABLE_XTAL_24M
+	jam XTAL_16M,mem_fcomp_div
+	rtn
+
+dongle_dispatch:
+	fetch 1,mem_24g_pair_mode
+	beq 0x00,dongle_auto_bind
+	beq 0x01,dongle_pc_bind
+//	beq 0x0f,dongle_all_powerful
+	rtn
+
+
+dongle_read_kb_bind_status:
+	arg 1,temp
+	arg mem_dg_kb_bind_flag,rega
+	setarg DONGLE_KB_BIND_EFUSE_OFFECT
+	branch efuse_read_data
+
+dongle_write_kb_bind_status:
+	arg 1,loopcnt
+	arg mem_dg_kb_bind_flag,rega
+	arg DONGLE_KB_BIND_EFUSE_OFFECT,temp
+	branch efuse_program
+
+dongle_usb_config:
+	fetch 1,mem_dg_sys_config
+	bbit1 DG_ENABLE_KB_ICON,dongle_usb_config_kb
+	fetch 1,mem_dg_kb_bind_flag
+	bne DONGLE_KB_BIND_SUCCESS,dongle_usb_config_param
+dongle_usb_config_kb:
+	jam DONGLE_KB_BIND_SUCCESS,mem_dg_kb_bind_flag
+	fetch 4,USB_DEVICEDATA_ADDR+9
+	set1 29,pdata
+	store 4,mem_devicedesc+9
+dongle_usb_config_param:
+	call dongle_usb_device_name
+	call usb_tx_interval_config
+	call dongle_usb_vid_pid_config
+	branch dongle_usb_hid_icon_config
+
+dongle_usb_vid_pid_config:
+	fetch 1,mem_usb_vid_pid
+	rtn blank
+	fetch 1,mem_dg_kb_bind_flag
+	beq DONGLE_KB_BIND_SUCCESS,dongle_usb_vid_pid_for_suit
+dongle_usb_vid_pid_for_mouse_only_auto_pair:	
+	fetch 4,mem_usb_vid_pid+1
+dongle_usb_vid_pid_store:	
+	store 4,mem_devicedesc+9
+	rtn
+dongle_usb_vid_pid_for_suit:
+	fetch 4,mem_usb_vid_pid+5
+	branch dongle_usb_vid_pid_store
+
+dongle_usb_hid_icon_config:
+	fetch 1,mem_dg_kb_bind_flag
+	beq DONGLE_KB_BIND_SUCCESS,dongle_usb_kb_hidreportdesc
+	setarg USB_KBDATA_VENDOR_DEFINE_ADDR
+	store 2,mem_hidreportdesc_kb
+	jam 0x1a,mem_confdesc+26//hid_descriptor--keyboard length
+	rtn
+dongle_usb_kb_hidreportdesc:
+	setarg USB_KBDATA_ADDR
+	store 2,mem_hidreportdesc_kb
+	jam 0x3f,mem_confdesc+26//hid_descriptor--keyboard length	
+	rtn
+
+dongle_usb_device_name:
+	fetch 1,mem_dg_usb_device_name
+	rtn blank
+	arg mem_dg_usb_device_name,contr
+	arg mem_string2,contw
+	arg 30,loopcnt
+	branch memcpy
+
+
+//dongle_all_powerful:
+//	call g24_switch_work_mode
+//dongle_all_powerful_loop:
+//	call dongle_work_mode_auto
+//	call dongle_usb_dispatch
+//	branch dongle_all_powerful_loop
+
+dongle_pc_bind:
+	call g24_switch_work_mode
+dongle_pc_bind_loop:	
+	call dongle_work_mode_auto
+	call g24_bind_mode_auto
+	call dongle_usb_dispatch
+	branch dongle_pc_bind_loop
+
+dongle_g24_blank_data_process:
+	call dongle_g24_ms_blank_data
+	call dongle_g24_kb_blank_data
+	branch dongle_g24_kb_mul_blank_data
+
+dongle_g24_ms_blank_data:
+	fetch 1,mem_dg_ms_blank_data_enable
+	rtn blank
+	arg TIMER_MS_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_dg_ms_blank_data_enable
+	setarg MS_REPORT_ID
+	store 1,mem_usb_mouse_data
+	setarg 0
+	istore 7,contw
+dongle_usb_tx_ms_data:
+	jam USB_EP2_MS,mem_usb_ep2_data
+dongle_usb_tx_enable_ep2:
+	fetch 1,mem_usb_tx_enable
+	set1 2,pdata
+	store 1,mem_usb_tx_enable
+	rtn
+
+dongle_g24_kb_blank_data:
+	fetch 1,mem_dg_kb_blank_data_enable
+	rtn blank
+	arg TIMER_KB_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_dg_kb_blank_data_enable
+	arg mem_usb_kb_data,contw
+	arg 2,loopcnt
+	call memset0
+dongle_usb_tx_kb_data:	
+	jam KB_NORMAL_REPORT_ID,mem_usb_kb_data
+dongle_usb_tx_enable_ep1:
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	rtn
+
+dongle_g24_kb_mul_blank_data:
+	fetch 1,mem_dg_kb_mul_blank_data_enable
+	rtn blank
+	arg TIMER_KB_MUL_BLANK,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_dg_kb_mul_blank_data_enable
+	arg mem_usb_kb_multikey,contw
+	arg 2,loopcnt
+	call memset0
+	jam KB_MULTIKEY_REPORT_ID,mem_usb_kb_multikey
+dongle_usb_tx_multikey_data:
+	jam USB_EP2_MULTIKEY,mem_usb_ep2_data
+	branch dongle_usb_tx_enable_ep2
+
+dongle_usb_dispatch:
+	bpatch patch17_2,mem_patch17
+	fetch 1,mem_usb_remote_wakeup
+	call dongle_clear_pc_sleep_flag,blank
+	call usb_isr
+	fetch 1,mem_usb0_get_set_report
+	rtn blank
+	jam 0,mem_usb0_get_set_report
+	fetch 2,mem_usb_setup_bValue_temp
+	arg PC_SET_REPORT,temp
+	isub temp,null
+	nrtn zero
+	//get usb host command
+	fetch 1,mem_usb0_set_report_data
+	rtnne PC_REPORT_ID
+	fetch 1,mem_usb0_set_report_data+1
+	beq COMMAND_MODE,dongle_dispose_cmd_mode
+	beq COMMAND_BIND,dongle_dispose_cmd_bind
+	beq COMMAND_CURRENT_PROJECT,dongle_dispose_cmd_current_project
+	beq COMMAND_CURRENT_MODE,dongle_dispose_cmd_current_mode
+	beq COMMAND_CURRENT_FW_VERSION,dongle_dispose_cmd_current_fw_version
+//	beq COMMAND_USER_DEFINED,dongle_dispose_cmd_user_defined
+dongle_usb0_data_ready_report_set0:
+	jam 0,mem_usb0_data_ready_report
+	rtn
+
+dongle_dispose_cmd_mode:
+	fetch 1,mem_usb0_set_report_data+2
+	beq COM_MODE_BIND,dongle_enter_bind_mode
+	branch dongle_usb0_data_ready_report_set0
+dongle_enter_bind_mode:
+	call g24_bind_mode_enable
+dongle_usb0_data_ready_report_set1:
+	jam 1,mem_usb0_data_ready_report
+	rtn
+
+dongle_dispose_cmd_bind:
+	fetch 1,mem_usb0_set_report_data+2
+	beq COM_BIND_GET,dongle_dispose_cmd_get_bind
+	beq COM_BIND_EXIT,dongle_dispose_cmd_exit_bind
+	beq COM_READ_MODE,dongle_dispose_cmd_read_mode
+	branch dongle_usb0_data_ready_report_set0
+dongle_dispose_cmd_get_bind:
+	fetch 1,mem_24g_bind_device_status
+	store 1,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1
+dongle_dispose_cmd_exit_bind:
+	call g24_work_mode_enable
+	branch dongle_dispose_cmd_get_bind
+dongle_dispose_cmd_read_mode:
+dongle_dispose_in_bind_mode:
+	jam COMMAND_BIND,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1	
+
+dongle_dispose_cmd_current_project:
+	jam PRODUCT_ID,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1
+
+dongle_dispose_cmd_current_mode:
+	fetch 1,mem_24g_work_mode
+	beq DONGLE_WORK,dongle_dispose_in_work_mode
+	beq DONGLE_BIND,dongle_dispose_in_bind_mode
+	rtn
+dongle_dispose_in_work_mode:
+	jam COMMAND_MODE,mem_usb0_get_report_data+1
+	branch dongle_usb0_data_ready_report_set1
+	
+dongle_dispose_cmd_current_fw_version:
+	jam FW_VERSION0,mem_usb0_get_report_data+1
+	jam FW_VERSION1,mem_usb0_get_report_data+2
+	jam FW_VERSION2,mem_usb0_get_report_data+3
+	jam FW_VERSION3,mem_usb0_get_report_data+4
+	branch dongle_usb0_data_ready_report_set1
+
+//dongle_dispose_cmd_user_defined:
+//	call g24_ackpayload_disable
+//	fetch 1,mem_usb0_set_report_data+2
+//	beq 0xff,soft_reset_chip
+//	rtn
+
+dongle_auto_bind:
+	call g24_mode_switch_init
+dongle_auto_bind_loop:
+	call g24_mode_switch_bind_work
+	call g24_mode_switch_bind_search
+	call dongle_work_mode_auto
+	call g24_bind_mode_auto
+	call g24_search_mode_auto
+	call dongle_usb_dispatch
+	branch dongle_auto_bind_loop
+
+dongle_work_mode_auto:
+	bpatch patch17_3,mem_patch17
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_WORK
+	call g24_work_mode_start
+	call dongle_g24_blank_data_process
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	branch g24_nodata_process
+
+dongle_ackpayload_prep:
+	fetch 1,mem_24g_data_type
+	beq DATATYPE_DEVICE1,dongle_ackpayload_prep_mouse
+	beq DATATYPE_DEVICE2,dongle_ackpayload_prep_keyboard
+dongle_ackpayload_prep_mouse:
+	fetch 1,mem_dg_pc_sleep_flag
+	bbit1 0,dongle_pc_sleep_ackpayload_prep_mouse
+	branch dongle_ackpayload_prep_end
+
+dongle_set_pc_sleep_flag:
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	jam 3,mem_dg_pc_sleep_flag
+	rtn
+dongle_clear_pc_sleep_flag:
+	jam 0,mem_dg_pc_sleep_flag
+	rtn
+
+dongle_ackpayload_prep_keyboard:
+	fetch 1,mem_dg_pc_sleep_flag
+	bbit1 1,dongle_pc_sleep_ackpayload_prep_keyboard
+dongle_ackpayload_prep_end:
+	fetch 1,mem_24g_ackpayload_enable
+	beq BIND_ACKPAYLOAD,dongle_g24_bind_ackpayload_prep
+	beq KB_LED_ACKPAYLOAD,dongle_g24_kb_led_ackpayload_prep
+	rtn
+
+dongle_pc_sleep_ackpayload_prep_mouse:
+	fetch 1,mem_dg_pc_sleep_flag
+	set0 0,pdata
+	store 1,mem_dg_pc_sleep_flag
+	branch dongle_pc_sleep_ackpayload_prep
+
+dongle_pc_sleep_ackpayload_prep_keyboard:
+	fetch 1,mem_dg_pc_sleep_flag
+	set0 1,pdata
+	store 1,mem_dg_pc_sleep_flag
+dongle_pc_sleep_ackpayload_prep:
+	jam 0x01,mem_24g_datalen
+	setarg 0xff
+	store 1,mem_24g_txbuf
+	rtn
+
+
+dongle_g24_bind_ackpayload_prep:
+	jam 1,mem_24g_ackpayload_enable
+	call g24_binding_device_check	//works on auto pair only
+	nrtn user3
+	branch g24_bind_ackpayload_prep
+
+dongle_g24_kb_led_ackpayload_prep:
+	fetch 1,mem_24g_rxbuf+2
+	beq DATATYPE_DEVICE1,dongle_g24_bind_ackpayload_prep
+	beq DATATYPE_ATTEMP,dongle_g24_bind_ackpayload_prep
+	jam 0,mem_usb_tx_win_enable
+	jam 0x01,mem_24g_datalen
+	fetch 1,mem_24g_led_status
+	store 1,mem_24g_txbuf
+	rtn
+
+dongle_g24_mouse:
+	setarg MS_REPORT_ID
+	store 1,mem_usb_mouse_data	//report id
+	fetch 7,mem_24g_rxdata_temp+3	//key
+	istore 7,contw
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	ncall dongle_g24_ms_enable_blank_data_forcibly,blank//get kb data
+	fetch 1,mem_24g_rxdata_temp+3	//key
+	call dongle_g24_ms_disable_blank_data_forcibly,blank
+	branch dongle_usb_tx_ms_data
+
+dongle_g24_ms_enable_blank_data_forcibly:
+	jam 1,mem_dg_ms_blank_data_enable
+	setarg TIMER_MS_BLANK_DELAY
+	arg TIMER_MS_BLANK,queue
+	branch timer_init
+
+dongle_g24_ms_disable_blank_data_forcibly:
+	jam 0,mem_dg_ms_blank_data_enable
+	setarg 0
+	arg TIMER_MS_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq 0,dongle_g24_kb_type0	//normal key
+	beq 2,dongle_g24_kb_type2	//system key
+	beq 3,dongle_g24_kb_type3	//multikey
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_type0:
+	fetch 1,mem_24g_rxdata_temp+5
+	store 1,mem_24g_ackpayload_enable
+	jam 0,mem_24g_rxdata_temp+5
+	arg mem_usb_kb_data,contw
+	arg mem_24g_rxdata_temp+4,contr
+	arg 8,loopcnt
+	call memcpy
+	fetch 8,mem_usb_kb_data
+	ncall dongle_g24_kb_enable_blank_data_forcibly,blank//get kb data
+	fetch 8,mem_usb_kb_data	
+	call dongle_g24_kb_disable_blank_data_forcibly,blank
+	fetch 8,mem_usb_kb_data
+	store 8,mem_dg_kb_data_sta_data
+	fetcht 8,mem_dg_kb_data_last_data
+	isub temp,null
+	ncall dongle_usb_tx_enable_ep1,zero
+	fetch 8,mem_dg_kb_data_sta_data
+	store 8,mem_dg_kb_data_last_data
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_enable_blank_data_forcibly:
+	jam 1,mem_dg_kb_blank_data_enable
+	setarg TIMER_KB_BLANK_DELAY
+	arg TIMER_KB_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb_disable_blank_data_forcibly:
+	jam 0,mem_dg_kb_blank_data_enable
+	setarg 0
+	arg TIMER_KB_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb_type3:
+	arg mem_usb_kb_multikey,contw
+	arg mem_24g_rxdata_temp+3,contr
+	arg 3,loopcnt
+	call memcpy
+	fetch 2,mem_usb_kb_multikey+1
+	ncall dongle_g24_kb_mul_enable_blank_data_forcibly,blank//get multikey data
+	fetch 2,mem_usb_kb_multikey+1
+	call dongle_g24_kb_mul_disable_blank_data_forcibly,blank
+	fetch 3,mem_usb_kb_multikey
+	store 3,mem_dg_kb_multikey_sta_data
+	fetcht 3,mem_dg_kb_multikey_last_data
+	isub temp,null
+	ncall dongle_usb_tx_multikey_data,zero
+	fetch 3,mem_dg_kb_multikey_sta_data
+	store 3,mem_dg_kb_multikey_last_data
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_mul_enable_blank_data_forcibly:
+	jam 1,mem_dg_kb_mul_blank_data_enable
+	setarg TIMER_KB_MUL_BLANK_DELAY
+	arg TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+	
+dongle_g24_kb_mul_disable_blank_data_forcibly:
+	jam 0,mem_dg_kb_mul_blank_data_enable
+	setarg 0
+	arg TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+
+dongle_g24_kb_type2:
+	arg mem_usb_kb_system,contw
+	arg mem_24g_rxdata_temp+3,contr
+	arg 2,loopcnt
+	call memcpy
+	fetch 2,mem_usb_kb_system
+	ncall dongle_g24_kb_sys_enable_blank_data_forcibly,blank
+	fetch 2,mem_usb_kb_system
+	call dongle_g24_kb_sys_disable_blank_data_forcibly,blank
+	fetch 2,mem_usb_kb_system
+	store 2,mem_dg_kb_system_sta_data
+	fetcht 2,mem_dg_kb_system_last_data
+	isub temp,null
+	ncall dongle_usb_tx_sys_data,zero
+	fetch 2,mem_dg_kb_system_sta_data
+	store 2,mem_dg_kb_system_last_data
+	branch g24_rx_interrupt_clear
+
+dongle_g24_kb_sys_enable_blank_data_forcibly:
+	jam 1,mem_dg_kb_mul_blank_data_enable
+	setarg TIMER_KB_MUL_BLANK_DELAY
+	arg TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+dongle_g24_kb_sys_disable_blank_data_forcibly:
+	jam 0,mem_dg_kb_mul_blank_data_enable
+	setarg 0
+	arg TIMER_KB_MUL_BLANK,queue
+	branch timer_init
+
+dongle_usb_tx_sys_data:
+	jam USB_EP2_SYSTEMKEY,mem_usb_ep2_data
+	branch dongle_usb_tx_enable_ep2
+
+
+dongle_g24_store_dvc2_bind_flag:
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	fetch 1,mem_dg_kb_bind_flag
+	rtneq DONGLE_KB_BIND_SUCCESS
+dongle_prep_soft_reset:
+	jam 1,mem_dg_kb_bind_success
+	rtn
+
+
+dongle_kb_bind_soft_reset:
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	fetch 1,mem_dg_kb_bind_success
+	rtn blank
+	jam 0,mem_temp
+dongle_wirte_efuse_bind_status:	
+	jam DONGLE_KB_BIND_SUCCESS,mem_dg_kb_bind_flag
+	call dongle_write_kb_bind_status
+	call dongle_read_kb_bind_status
+	fetch 1,mem_temp
+	increase 1,pdata
+	store 1,mem_temp
+	beq 0xff,soft_reset_chip
+	fetch 1,mem_dg_kb_bind_flag
+	bne DONGLE_KB_BIND_SUCCESS,dongle_wirte_efuse_bind_status
+	branch soft_reset_chip
+
+
+endif
+
+
Index: mouse_public_3mode_usb/program/app_esl.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_esl.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_esl.prog	(working copy)
@@ -0,0 +1,887 @@
+
+ifdef COMPILE_ESL
+/**************************************INFO LOG FUNC0******************************************/
+eink_log_push_2Bdec:
+	arg 2,debug
+	call eink_log_hex2dec
+	jam 0,mem_eink_log_hex2dec_ptr
+eink_log_push_2Bdec_loop:
+	setarg mem_eink_log_hex2dec
+	fetcht 1,mem_eink_log_hex2dec_ptr
+	iadd temp,contr
+	ifetch 1,contr
+	and_into 0xf,pdata
+	call eink_log_num
+	fetch 1,mem_eink_log_hex2dec_ptr
+	increase 1,pdata
+	store 1,mem_eink_log_hex2dec_ptr
+	fetch 1,mem_eink_log_hex2dec_len
+	increase -1,pdata
+	store 1,mem_eink_log_hex2dec_len
+	nbranch eink_log_push_2Bdec_loop,blank
+	rtn
+
+eink_log_push:
+	fetch 1,mem_eink_log_last_letter	//if(last_letter != letter)
+	fetcht 1,mem_eink_log_letter
+	isub temp,null
+	nbranch eink_log_push_real,zero
+
+	fetch 1,mem_eink_log_last_cmd	//if(last_cmd != cmd)
+	fetcht 1,mem_eink_log_cmd
+	isub temp,null
+	nbranch eink_log_push_real,zero
+	
+	fetch 1,mem_eink_log_last_ch	//if(last_ch != ch)
+	fetcht 1,mem_eink_log_ch
+	isub temp,null
+	nbranch eink_log_push_real,zero
+	
+	fetch 1,mem_eink_log_last_star
+	rtneq CHAR_ASTERISK					//if(last_star == '*')    *:0x2A
+	setarg CHAR_ASTERISK
+	call eink_log_font
+	jam CHAR_ASTERISK,mem_eink_log_last_star
+	rtn
+	
+eink_log_push_real:
+	fetch 1,mem_eink_log_letter
+	call eink_log_font
+
+	fetch 1,mem_eink_log_cmd
+	call eink_log_num
+
+	call eink_log_minus
+
+	fetch 1,mem_eink_log_ch
+	call eink_log_num
+
+	call eink_log_minus
+
+	fetch 1,mem_eink_log_rssi
+	call eink_log_num
+
+	fetch 5,mem_eink_log_info
+	store 5,mem_eink_log_last_info
+	jam 0,mem_eink_log_last_star
+	rtn
+	
+
+/* print 1 byte of pdata to ring buffer screen log*/
+eink_log:
+	compare CHAR_ASTERISK,pdata,0xFF     //if(last_star == '*') *:0x2A
+	ncall eink_log_clear_last,true
+
+	copy pdata,regc
+	fetch 1,mem_eink_log_front
+	copy pdata,rega						//front -> rega
+	fetch 1,mem_eink_log_end				
+	copy pdata,regb						//end -> regb
+       
+	increase 1,rega						//front =+ 1
+	div rega,EINK_LOG_MAX				// front%20
+	call wait_div_end
+	remainder temp						//temp = front%30
+	copy temp,pdata
+	icompare 0xFF,regb					//if( front%30 == end)
+	branch eink_log_full,true
+	branch eink_log_not_full
+
+eink_log_num:
+	jam 1,mem_eink_log_is_byte		//set is  byte
+	branch eink_log
+eink_log_font:
+	jam 0,mem_eink_log_is_byte		//set is not byte
+	branch eink_log
+
+eink_log_clear_last:
+	jam 0,mem_eink_log_last_star
+	jam 0,mem_eink_log_last_letter
+	jam 0,mem_eink_log_last_cmd
+	jam 0,mem_eink_log_last_ch
+	rtn
+
+eink_log_full:
+	fetch 1,mem_eink_log_front				//ringbuf[front] = cmd;
+	arg mem_eink_log_ring_buffer,rega
+	iadd rega,rega
+	copy regc,pdata
+	istore 1,rega
+	call eink_log_set_byte_flag					//modify is-byte flag
+		
+	fetch 1,mem_eink_log_front				//front = (front + 1)%BUF_LEN;
+	increase 1,pdata
+	div pdata,EINK_LOG_MAX
+	call wait_div_end
+	remainder temp
+	storet 1,mem_eink_log_front
+
+	fetch 1, mem_eink_log_end					//end = (end + 1)%BUF_LEN;
+	increase 1,pdata
+	div pdata,EINK_LOG_MAX
+	call wait_div_end
+	remainder temp
+	storet 1,mem_eink_log_end
+	rtn
+
+eink_log_not_full:
+	fetch 1,mem_eink_log_front				//ringbuf[front] = cmd;
+	arg mem_eink_log_ring_buffer,rega
+	iadd rega,rega
+	copy regc,pdata
+	istore 1,rega
+	call eink_log_set_byte_flag					//modify is-byte flag
+
+	fetch 1,mem_eink_log_front				//front = (front + 1)%BUF_LEN;
+	increase 1, pdata
+	div pdata,EINK_LOG_MAX
+	call wait_div_end
+	remainder temp
+	storet 1,mem_eink_log_front
+	rtn
+
+eink_log_set_byte_flag:
+ 	fetch 1,mem_eink_log_front				//modify is-byte flag
+ 	div pdata,8
+ 	call wait_div_end
+ 	quotient pdata
+ 	remainder temp
+	arg mem_eink_log_ring_buffer_flag,regc
+	iadd regc,regc
+	ifetch 1,regc                       //now regc is flag byte addr
+	copy pdata,rega                //now pdata and rega is flag byte data
+
+	fetch 1,mem_eink_log_is_byte		//modify bit of is-byte 
+	call eink_log_set_flag_font,blank
+	ncall eink_log_set_flag_byte,blank
+
+	copy rega,pdata					//save back to mem
+ 	istore 1,regc
+	rtn
+
+eink_log_set_flag_font:
+	copy temp,queue
+	disable user
+	qsetflag user,rega
+	rtn
+eink_log_set_flag_byte:
+ 	copy temp,queue
+ 	enable user
+	qsetflag user,rega
+ 	rtn
+
+//rega:src buff
+//debug:length
+eink_log_hex2dec:
+	arg mem_eink_log_hex2dec,regc
+eink_log_calc_loop:
+	call eink_log_hex2dec_Rptr
+	call bcd2
+	call eink_log_hex2dec_Rcnt
+	disable user
+eink_log_bcd_loop:
+	ifetch 1,regb
+	and_into 0x1f,pdata
+	branch eink_log_do_store,user
+	branch eink_log_skip_prefix,blank
+eink_log_do_store:
+	and_into 0xf,pdata
+	call eink_store_barcode
+	enable user
+eink_log_skip_prefix:
+	increase 1,regb
+	loop eink_log_bcd_loop
+	deposit regc
+	arg mem_eink_log_hex2dec,contr
+	isub contr,pdata
+	store 1,mem_eink_log_hex2dec_len
+	copy pdata,loopcnt
+	arg mem_eink_log_hex2dec,contw
+eink_display_dec_loop:
+	arg 0x2e,temp
+	ifetch 1,contw
+	add pdata,0x30,temp
+	istoret 1,contw
+	loop eink_display_dec_loop
+	rtn
+
+eink_store_barcode:
+	istore 1,regc
+	increase 1,regc
+	rtn	
+
+eink_log_hex2dec_Rptr:
+	copy debug,pdata
+	beq 1,rega_read_1byte
+	beq 2,rega_read_2bytes
+	rtn
+rega_read_1byte:
+	ifetch 1,rega
+	rtn
+rega_read_2bytes:
+	ifetch 2,rega
+	rtn
+
+eink_log_hex2dec_Rcnt:
+	copy debug,pdata
+	beq 1,bcd_read_1byte
+	beq 2,bcd_read_2bytes
+	rtn
+bcd_read_1byte:
+	arg 3,loopcnt
+	arg mem_bcd+5,regb
+	rtn
+bcd_read_2bytes:
+	arg 5,loopcnt
+	arg mem_bcd+3,regb	
+	rtn
+
+eink_log_break:
+	setarg LETTER_B					//'B'
+	call eink_log_font
+	arg mem_parse_cnt,rega
+	call eink_log_push_2Bdec
+	call eink_log_minus				//'-'
+	fetch 1,mem_esl_24g_current_ch
+	call eink_log_num
+	call eink_log_minus				//'-'
+	fetch 1,mem_esl_24g_behavior
+	branch eink_log_num
+
+eink_log_supervision_timeout:
+	call eink_log_break
+eink_log_fail:
+	setarg LETTER_F					//'F'
+	call eink_log_font
+	fetch 2,mem_rx_cnt
+	branch eink_log_fail_rx_null,blank
+	isolate1 mark_24g_old_packet,mark
+	branch eink_log_fail_old_pac,true
+eink_log_fail_rx_lost:	
+	setarg EINK_LOG_RX_LOST
+	branch eink_log_num	
+eink_log_fail_rx_null:
+	setarg EINK_LOG_RX_NULL
+	branch eink_log_num
+eink_log_fail_old_pac:
+	setarg EINK_LOG_OLD_PAC
+	branch eink_log_num
+
+
+eink_log_minus:
+	setarg CHAR_MINUS
+	branch eink_log_font
+
+eink_log_s:
+	setarg LETTER_S					//'S'
+	branch eink_log_font
+
+eink_set_orig:
+	arg mem_eink_orig,regb
+	branch eink_wr_seq
+
+eink_init_seq:
+	arg mem_eink_init_offset,regb
+	call eink_wr_seq
+	arg mem_eink_init,regb
+eink_wr_seq:
+	ifetch 8,regb
+	rtneq 0xff
+	and pdata,0xff,regc
+	call eink_spid_cmd
+	add regc,2,pdata
+	iadd regb,regb
+	branch eink_wr_seq
+
+	// pdata[7:0] data length pdata [15:8] command pdata[63:16] data
+eink_spid_cmd:
+	and pdata,0xff,rega
+	rshift8 pdata,pdata
+	store 7,mem_spid_tbuf
+eink_spid_data:
+	setarg mem_spid_tbuf
+	call eink_spid_buf
+	call start_spid
+eink_spid_end:
+	fetcht 1,mem_cs
+	branch gpio_out_inactive
+
+
+	// pdata: tx buffer, rega is data length	
+eink_spid_buf:
+	store 2,core_spid_txaddr
+	fetcht 1,mem_cs
+	call gpio_out_active
+	fetcht 1,mem_dc
+	call gpio_out_active
+	setarg 1
+	store 2,core_spid_txlen
+	call start_spid
+	fetcht 1,mem_dc
+	call gpio_out_inactive
+	deposit rega
+	branch eink_spid_end,blank
+	store 2,core_spid_txlen
+	fetch 2,core_spid_txaddr
+	increase 1,pdata
+	store 2,core_spid_txaddr
+	rtn
+
+start_spid:
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+
+
+/**********************************RLE UNCOMPRESS FUNC***********************************/
+uncompress_init:
+	jam 0,mem_uncom_image_att_flag
+	jam 0,mem_uncom_fliter_data_flag
+	arg 0x20,loopcnt
+	arg mem_uncom_the_first_two_buff,contw
+	call memset0
+	setarg mem_uncom_clear_once_end
+	arg mem_uncom_clear_once_start,contw
+	isub contw,loopcnt
+	call clear_mem
+	setarg mem_esl_24g_rxpayload
+	arg UNCOM_SRC_INDEX,temp
+	iadd temp,pdata
+	store 2,mem_uncom_src_end
+uncompress_mem_clear_everytime:
+	setarg mem_uncom_clear_everytime_end
+	arg mem_uncom_clear_everytime_start,contw
+	isub contw,loopcnt
+	branch clear_mem
+
+uncompress_dispatch:
+	//fetch 1,mem_uncom_image_att_flag
+	//beq 0,umcompress_image_att
+	fetch 1,mem_uncom_fliter_data_flag
+	beq 1,uncompress_fliter_redundant_data
+	call uncompress_start
+	fetch 2,mem_uncom_current_len
+	rtn blank
+	call uncompress_image
+	branch wait_spid_done  //should wait spi write data finish
+	
+uncompress_fliter_redundant_data:
+	jam 0,mem_uncom_fliter_data_flag
+	call uncompress_start
+	fetchr loopcnt,1,mem_uncom_current_len
+	arg mem_uncom_the_first_two_buff,contw
+	arg mem_uncom_dest+1,contr
+	call memcpy
+	/******************reuse temp********************/	
+	fetch 2,mem_uncom_total_len
+	fetcht 1,mem_uncom_fliter_datalen
+	isub temp,pdata
+	store 2,mem_uncom_total_len
+	fetch 2,mem_uncom_current_len
+	isub temp,pdata
+	store 2,mem_uncom_current_len
+	fetchr loopcnt,1,mem_uncom_current_len
+	setarg mem_uncom_the_first_two_buff
+	iadd temp,contr
+	arg mem_uncom_dest+1,contw
+	call memcpy
+	/******************reuse temp********************/	
+	branch uncompress_image
+
+
+umcompress_image_att:
+	call uncompress_start
+	setarg mem_uncom_the_first_two_buff
+	fetcht 1,mem_uncom_the_first_two_index
+	iadd temp,contw
+	fetchr loopcnt,1,mem_uncom_current_len
+	arg mem_uncom_dest+1,contr
+	call memcpy
+	fetch 1,mem_uncom_the_first_two_index
+	branch umcompress_image_att_index,blank
+	jam 1,mem_uncom_image_att_flag
+	fetch 2,mem_uncom_total_len
+	pincrease -62	//UNCOM_IMAGE_ATT_LENTH
+	store 2,mem_uncom_total_len
+	store 2,mem_uncom_current_len
+	arg mem_uncom_the_first_two_buff,contr
+	arg mem_uncom_image_att_buf,contw
+	arg UNCOM_IMAGE_ATT_LENTH,loopcnt
+	call memcpy
+	fetchr loopcnt,1,mem_uncom_current_len
+	arg mem_uncom_the_first_two_buff+UNCOM_IMAGE_ATT_LENTH,contr
+	arg mem_uncom_dest+1,contw
+	call memcpy
+	branch uncompress_image
+
+
+umcompress_image_att_index:
+	fetch 1,mem_uncom_current_len
+	store 1,mem_uncom_the_first_two_index
+	rtn
+
+uncompress_start:
+	setarg 0
+	store 3,mem_uncom_dest_index
+	call uncompress_left_check
+	fetch 1,mem_uncom_src_index
+	beq UNCOM_SRC_LENGTH,uncompress_end
+uncompress_loop:
+	call uncompress_read_head
+	fetch 1,mem_uncom_block_head
+	branch uncompress_end,blank
+	bbit1 7,uncompress_original
+uncompress_repetition:
+	jam 1,mem_uncom_repetitive
+	fetcht 2,mem_uncom_block_body_ptr
+	fetch 2,mem_uncom_src_end
+	isub temp,null
+	nbranch repetition_overflow,positive
+	fetchr rega,1,mem_uncom_block_len
+	call uncompress_repetition_memcpy
+	fetch 1,mem_uncom_src_index
+	sub pdata,UNCOM_SRC_INDEX,null
+	branch uncompress_loop,positive
+uncompress_repetition_end:
+uncompress_original_end:
+	jam 0,mem_uncom_repetitive
+	jam 0,mem_uncom_left_len
+uncompress_end:
+	fetch 2,mem_uncom_dest_index
+	store 2,mem_uncom_current_len
+	rtn
+
+repetition_overflow:
+	fetch 1,mem_uncom_block_len
+	store 1,mem_uncom_left_len
+	branch uncompress_end
+
+uncompress_original:
+	jam 2,mem_uncom_repetitive
+	fetcht 2,mem_uncom_block_body_ptr
+	fetch 2,mem_uncom_src_end
+	isub temp,null
+	nbranch original_overflow_head_left,positive
+
+	fetch 1,mem_uncom_block_len
+	iadd temp,temp
+	fetch 2,mem_uncom_src_end
+	isub temp,temp
+	nbranch original_overflow_body_left,positive
+
+	fetchr rega,1,mem_uncom_block_len
+	call uncompress_original_memcpy
+	fetch 1,mem_uncom_src_index
+	sub pdata,UNCOM_SRC_INDEX,null
+	branch uncompress_loop,positive
+	branch uncompress_original_end
+
+original_overflow_head_left:
+	fetch 1,mem_uncom_block_len
+	store 1,mem_uncom_left_len
+	branch uncompress_end
+
+original_overflow_body_left:
+	sub temp,0,temp
+	increase -1,temp
+	storet 1,mem_uncom_left_len
+	fetch 1,mem_uncom_block_len
+	isub temp,pdata
+	store 1,mem_uncom_block_len
+	fetchr rega,1,mem_uncom_block_len
+	call uncompress_original_memcpy
+	branch uncompress_end
+
+uncompress_left_check:
+	fetch 1,mem_uncom_left_len
+	rtn blank
+	fetch 1,mem_uncom_repetitive
+	beq 2,uncompress_left_original
+uncompress_left_repetition:
+	fetchr rega,1,mem_uncom_left_len
+uncompress_repetition_memcpy:
+	copy rega,loopcnt
+	call uncompress_dest_contw
+repetition_memcpy_loop:
+	call uncompress_src_contr
+	ifetch 1,contr
+	istore 1,contw
+	loop repetition_memcpy_loop
+	call uncompress_src_index_add_one
+	/******************reuse temp********************/
+	copy rega,temp
+	call uncompress_dest_index_add_len
+	branch uncompress_total_len_add_len
+	/******************reuse temp********************/
+
+uncompress_left_original:
+	fetch 1,mem_uncom_left_len
+	sub pdata,UNCOM_SRC_INDEX,null
+	nbranch uncompress_left_original_continue,positive
+	fetchr rega,1,mem_uncom_left_len
+uncompress_original_memcpy:
+	copy rega,loopcnt
+	call uncompress_dest_contw
+	call uncompress_src_contr
+	call memcpy
+	/******************reuse temp********************/
+	copy rega,temp
+	call uncompress_src_index_add_len
+	call uncompress_dest_index_add_len
+	branch uncompress_total_len_add_len
+	/******************reuse temp********************/
+
+uncompress_left_original_continue:
+	fetch 1,mem_uncom_left_len
+	increase -32,pdata	//24g data len
+	store 1,mem_uncom_left_len
+	arg 32,rega			//24g data len
+	branch uncompress_original_memcpy
+
+uncompress_read_head:
+	call uncompress_src_contr
+	ifetch 1,contr
+	store 1,mem_uncom_block_head
+	and_into 0x7f,pdata
+	store 1,mem_uncom_block_len
+	copy contr,pdata
+	store 2,mem_uncom_block_body_ptr
+uncompress_src_index_add_one:
+	fetch 1,mem_uncom_src_index
+	increase 1,pdata
+	store 1,mem_uncom_src_index
+	rtn
+
+uncompress_src_contr:
+	setarg mem_esl_24g_rxpayload
+	fetcht 1,mem_uncom_src_index
+	iadd temp,contr
+	rtn
+
+uncompress_dest_contw:
+	setarg mem_uncom_dest
+	pincrease 1
+	fetcht 2,mem_uncom_dest_index
+	iadd temp,contw
+	rtn
+
+uncompress_src_index_add_len:
+	fetch 1,mem_uncom_src_index
+	iadd temp,pdata
+	store 1,mem_uncom_src_index
+	rtn
+
+uncompress_total_len_add_len:
+	fetch 2,mem_uncom_total_len
+	iadd temp,pdata
+	store 2,mem_uncom_total_len
+	rtn
+
+uncompress_dest_index_add_len:
+	fetch 2,mem_uncom_dest_index
+	iadd temp,pdata
+	store 2,mem_uncom_dest_index
+	rtn
+
+
+uncompress_eink_type:
+	jam 0x24,mem_uncom_dest
+	rtnmark0 mark_eink_red
+	jam 0x26,mem_uncom_dest
+	rtn	
+
+uncompress_image:
+	setarg mem_uncom_dest
+	store 2,mem_eink_head
+	fetch 2,mem_image_ptr
+	call eink_set_orig,blank
+	call uncompress_eink_type
+	fetcht 2,mem_uncom_current_len
+	copy temp,rega
+	fetch 2,mem_image_ptr
+	copy pdata,regb
+	iadd temp,pdata
+	store 2,mem_image_ptr
+	fetcht 2,mem_eink_size
+	isub temp,pdata
+	nbranch esl_write_full,positive
+	bmark1 mark_eink_red,uncompress_image_red
+uncompress_image_black:
+	store 2,mem_uncom_current_len	//red ram length
+	fetch 2,mem_eink_size
+	isub regb,rega		//black ram left length
+	fetch 2,mem_uncom_current_len
+	branch uncompress_image_black_end,blank
+	call esl_write_ram
+	call wait_spid_done	//wait write eink ram done
+	fetch 2,mem_uncom_current_len
+	fetcht 1,mem_uncom_fliter_datalen
+	isub temp,pdata
+	store 2,mem_uncom_current_len
+	copy pdata,loopcnt
+	setarg mem_uncom_dest+1
+	fetcht 1,mem_uncom_fliter_datalen
+	iadd temp,pdata
+	iadd rega,contr
+	arg mem_uncom_dest+1,contw
+	call memcpy
+	branch uncompress_image
+
+uncompress_image_red:
+	copy rega,pdata
+	fetcht 1,mem_uncom_fliter_datalen
+	isub temp,rega
+	branch esl_write_ram
+
+uncompress_image_black_end:
+	jam 1,mem_uncom_fliter_data_flag
+	branch esl_write_ram
+
+
+esl_write_ram:
+	bmark1 mark_eink_red,lost_last_packet
+esl_write_ram_start:
+	call image_ptr_clear
+	set1 mark_eink_red,mark
+esl_write_full:	
+	fetch 2,mem_eink_head
+	call eink_spid_buf
+	jam spid_start,core_misc_ctrl
+	rtn
+	
+image_ptr_clear:
+	setarg 0
+	store 2,mem_image_ptr
+	rtn	
+	
+lost_last_packet:
+	call esl_write_ram_start
+	jam STATE_DATA_FINISH,mem_update_state
+	rtn
+	
+bcd2:
+	store 8,mem_pdatatemp
+	force 0x20,pdata
+	force 8,loopcnt
+	arg mem_bcd,contw
+lpo_clear:	
+	istore 1,contw
+	loop lpo_clear
+	arg mem_bcd,contw
+	increase 7,contw
+	fetch 8,mem_pdatatemp
+bcd_loop:
+	div pdata,10
+	call wait_div_end
+	remainder pdata
+	or_into 0x30,pdata
+	istore 1,contw
+	increase -2,contw
+	quotient pdata
+	rtn blank
+	branch bcd_loop
+
+
+/**************************************INFO DISPALY FUNC******************************************/
+eink_chksum:
+	ifetch 1,rega
+	imul32 temp,pdata
+	iadd regb,regb
+	increase 1,temp
+	increase -1,rega
+	setarg mem_barcode_start
+	isub rega,null
+	nbranch eink_chksum,zero
+	div regb,47
+	call wait_div_end
+	remainder pdata
+	branch eink_store_barcode
+	// pdata: 0-9, 37=dot, 47=start/stop
+eink_display_barcode_byte:
+	arg mem_code93,contr
+	iadd contr,contr
+	ifetchr debug,1,contr
+	arg 7,queue
+eink_display_barcode_byte_loop:
+	call eink_setxy
+	qisolate1 debug
+	call eink_display_barcode_x
+	increase -1,queue
+	branch eink_display_barcode_byte_loop,positive
+	call eink_setxy
+	isolate1 0,null
+eink_display_barcode_x:
+	setarg 0x100
+	iadd timeup,timeup
+	setarg 0
+	branch eink_display_barcode_blank,true
+	setarg -1
+eink_display_barcode_blank:
+	store 4,mem_spid_tbuf+1
+	jam 0x24,mem_spid_tbuf
+	arg 4,rega
+	branch eink_spid_data
+	
+eink_clear_loop:
+	arg 32,rega
+	call eink_spid_data
+	increase -32,regb
+	branch eink_clear_loop,positive
+	rtn
+	
+eink_log_battery_vol:
+	arg 2,debug
+	arg mem_battery_vol,rega
+	call eink_log_hex2dec
+	fetch 2,mem_eink_log_hex2dec+1
+	store 2,mem_eink_log_hex2dec+2
+	jam CHAR_DOT,mem_eink_log_hex2dec+1
+	jam 4,mem_eink_log_hex2dec_len	//'2.78'
+	branch eink_display_dec+1
+
+eink_log_broadcast_rssi:
+	fetch 1,mem_rssi_save	//broadcast
+	sub pdata,95,pdata
+	ncall enable_blank,positive
+	store 1,mem_rssi_temp
+	arg 1,debug
+	arg mem_rssi_temp,rega
+	branch eink_display_dec
+eink_log_unicast_rssi:
+	fetch 1,mem_esl_24g_rssi_save	//unicast
+	branch eink_log_broadcast_rssi+1
+eink_log_push_zero:
+	arg 1,debug
+	arg mem_eink_log_push_zero,rega
+	branch eink_display_dec
+
+eink_display_dec:
+	call eink_log_hex2dec
+	fetchr loopcnt,1,mem_eink_log_hex2dec_len
+	arg mem_eink_log_hex2dec,alarm
+	branch eink_display_str
+
+
+	// timeup is yx 24 bit
+eink_setxy:
+	and timeup,0xff,pdata
+	store 1,mem_eink_setxy+2
+	fetch 2,mem_eink_xy+1
+	rshift8 timeup,temp
+	isub temp,pdata
+	store 2,mem_eink_setxy+5
+	arg mem_eink_setxy,regb
+	branch eink_wr_seq
+
+eink_display_dot:
+	setarg CHAR_DOT
+	branch eink_display_font
+
+eink_display_comma:
+	setarg CHAR_COMMA
+	call eink_display_font
+	setarg 0x300
+	iadd timeup,timeup
+	rtn
+
+eink_display_space:
+	setarg CHAR_SPACE
+	branch eink_display_font
+	
+
+	// alarm points to bytes, loopcnt is length
+eink_display_str:
+	ifetch 1,alarm
+	call eink_display_font
+	increase 1,alarm
+	loop eink_display_str
+	rtn
+	// pdata:0-ff
+eink_display_byte:
+	and pdata,0xf,type
+	rshift4 pdata,pdata
+	call eink_display_hex
+	deposit type
+
+	// pdata:0-f
+eink_display_hex:
+	pincrease 0x30
+	sub pdata,0x39,null
+	branch eink_display_font,positive
+	pincrease 0x27
+
+	// pdata:char 0-9 for digit, > 65 for A-Z, timeup is yx
+eink_display_font:
+	arg 3,debug
+	beq 0x20,eink_display_font_space
+	beq 0x2e,eink_display_font_dot
+	beq 0x2c,eink_display_font_comma
+	arg 8,debug
+	beq 0x40,eink_display_font_at
+	beq 0x3e,eink_display_font_greater
+	beq 0x25,eink_display_font_percent
+	arg 6,debug
+	beq 0x3a,eink_display_font_colon
+	beq 0x2d,eink_display_font_minus
+	beq 0x2a,eink_display_font_asterisk
+	beq 0x23,eink_display_font_pound
+	sub pdata,0x39,null
+	branch eink_display_digit,positive
+	increase -97,pdata
+	arg 8,debug
+	branch eink_display_cont
+eink_display_font_percent:
+	setarg 45
+	branch eink_display_cont
+eink_display_font_asterisk:
+	setarg 44
+	branch eink_display_cont
+eink_display_font_greater:
+	setarg 43
+	branch eink_display_cont
+eink_display_font_at:
+	setarg 42
+	branch eink_display_cont
+eink_display_font_comma:
+	setarg 41
+	branch eink_display_cont
+eink_display_font_dot:
+	setarg 40
+	branch eink_display_cont
+eink_display_font_space:
+	setarg 39
+	branch eink_display_cont
+eink_display_font_pound:
+	setarg 38
+	branch eink_display_cont
+eink_display_font_colon:
+	setarg 37
+	branch eink_display_cont
+eink_display_font_minus:
+	setarg 36
+	arg 5,debug
+	branch eink_display_cont
+eink_display_digit:
+	increase -22,pdata
+eink_display_cont:
+	lshift3 pdata,pdata
+	arg mem_eink_font,temp
+	iadd temp,regext
+eink_display_font_loop:
+	call eink_setxy
+	ifetch 1,regext
+	pinvert
+	store 1,mem_spid_tbuf+1
+	jam 0x24,mem_spid_tbuf
+	arg 1,rega
+	call eink_spid_data
+	setarg 0x100
+	iadd timeup,timeup
+	increase 1,regext
+	increase -1,debug
+	nbranch eink_display_font_loop,zero
+	rtn
+
+
+
+endif
+
Index: mouse_public_3mode_usb/program/app_module.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_module.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_module.prog	(working copy)
@@ -0,0 +1,1791 @@
+
+ifdef COMPILE_MODULE
+
+module_init:	
+	rtn wake
+	call le_modified_name
+	setarg module_process_idle
+	store 2,mem_cb_idle_process
+	setarg module_bt_conn_process
+	store 2,mem_cb_bt_process
+	setarg module_process_bb_event
+	store 2,mem_cb_bb_event_process
+	setarg module_lpm_lock
+	store 2,mem_cb_check_wakelock
+	setarg module_hci_cmd_transmit_le_notify
+	store 2,mem_cb_ble_transmit
+	setarg module_hci_event_receive_spp_data
+	store 2,mem_cb_receive_spp_data
+	setarg module_le_receive_data
+	store 2,mem_cb_att_write
+	setarg module_bb_event_timer
+	store 2,mem_cb_event_timer
+
+ifdef COMPILE_WECHAT
+	setarg module_wechat_rx_push_data
+	store 2,mem_module_wechat_rx_push_data_cb
+endif
+	call module_spp_clear_last_transmite_clock
+	bpatch patch17_4,mem_patch17
+	call module_lpm_uart_init
+	call module_gpio_init
+	branch module_hci_event_enter_standby_mode
+
+/*
+	function name:uart init by mem
+	input:
+		mem_module_uart_rx_buffer、mem_module_uart_rx_buffer_end
+		mem_module_uart_tx_buffer、mem_module_uart_tx_buffer_end
+		mem_module_uarta_baud_rate
+		bit0 of mem_module_flag
+*/
+module_lpm_uart_init:
+	fetch 1,core_uart_ctrl
+	set0 BIT_UART_CONTROL_ENABLE,pdata
+	store 1,core_uart_ctrl
+	fetch 8,mem_module_uart_rx_buffer
+	call uarta_init_dma_mem
+	fetch uart_baud_len,mem_module_uarta_baud_rate
+	call uarta_init_baud_rate
+	call uart_clock_select_main_freq_crystal
+	jam gpcfg_uart_txd,core_gpio_conf+HCI_UART_TX_GPIO_NUM
+	jam gpcfg_uart_rxd|gpcfg_pullup,core_gpio_conf+HCI_UART_RX_GPIO_NUM
+	jam gpcfg_uart_rts,core_gpio_conf+HCI_UART_RTS_GPIO_NUM
+	jam gpcfg_uart_cts,core_gpio_conf+HCI_UART_CTS_GPIO_NUM
+
+	arg FUN_UART_CONTROL_ENABLE|FUN_UART_CONTROL_SETTING_RATE_BAUD,temp
+	fetch 2,mem_module_flag
+	isolate1 MODULE_FLAG_UART_FLOW_CONTROL,pdata
+	setflag true,BIT_UART_CONTROL_FLOW_CONTROL,temp
+	storet 1,core_uart_ctrl
+	rtn
+
+/*
+	function:init uart & spp clock by lpm wake
+*/
+module_lpm_init:
+	call module_spp_clear_last_transmite_clock
+	branch module_lpm_uart_init
+
+
+
+/*
+	function name:module_gpio_init
+	init connect state & lpm wake up
+*/
+module_gpio_init:
+	fetcht 1,mem_module_connect_state_gpio
+	call gpio_config_output
+	call module_set_conn_pin_low
+	fetcht 1,mem_module_wake_up_gpio
+	branch gpio_config_input
+
+module_lpm_lock:
+	fetcht 1,mem_module_wake_up_gpio
+	call gpio_get_bit
+	nbranch app_put_lpm_wake_lock,true
+	branch app_get_lpm_wake_lock
+
+
+/*
+	function name:BT connect process callback
+	check sniff timer & check uart Tx buffer from SPP Credit
+*/
+module_bt_conn_process:
+	call module_spp_enter_sniff
+	branch module_control_air_flow
+
+module_spp_enter_sniff:
+	fetch 1,mem_ui_state_map
+	bbit0 UI_STATE_BT_SPP_CONN,module_spp_clear_last_transmite_clock
+	setarg 0x3eff
+	fetcht 4,mem_last_transmite_clock
+	iadd temp,temp
+	copy clkn_bt,pdata
+	isub temp,null
+	nrtn positive
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_SNIFF,module_spp_clear_last_transmite_clock
+	fetch 2,mem_module_flag
+	rtnbit1 MOUDLE_TASK_SNIFF
+	call module_set_sniff_task_flag
+	call app_bt_enter_sniff
+module_spp_clear_last_transmite_clock:
+	copy clkn_bt,pdata
+	store 4,mem_last_transmite_clock
+	rtn
+
+/*
+	function name:chip idle process callback
+	check uart Tx buffer from SPP Credit&check l2cap fifo&check uart rx data
+*/
+module_process_idle:
+	call module_control_air_flow
+	call l2cap_malloc_is_fifo_full
+	nrtn blank
+	branch module_process_check_hci_command_complete
+
+	
+module_process_bb_event:
+	copy regc,pdata
+	beq BT_EVT_BB_CONNECTED,module_process_bb_conn
+	beq BT_EVT_BB_DISCONNECTED,module_process_bb_event_disconned
+	beq BT_EVT_RECONN_FAILED,module_process_reconn_fail
+	beq BT_EVT_SETUP_COMPLETE,module_process_setup_complete
+	beq BT_EVT_SPP_CONNECTED,module_process_spp_connected
+	beq BT_EVT_SPP_DISCONNECTED,module_process_spp_disconnected
+	beq BT_EVT_PINCODE_REQ,module_process_evt_pincode_req
+	beq BT_EVT_ENTER_SNIFF,module_process_enter_sniff
+	beq BT_EVT_EXIT_SNIFF,module_process_exit_sniff
+	beq BT_EVT_RECONN_PAGE_TIMEOUT,module_process_page_time_out
+	beq BT_EVT_LE_CONNECTED,module_process_le_conn
+	beq BT_EVT_LE_DISCONNECTED,module_process_bb_even_le_disconn
+	beq BT_EVT_SNIFF_NOT_ACCEPT,module_process_sniff_not_accept
+	beq BT_EVT_UNSNIFF_ACCEPT,module_process_unsniff_accept
+	beq BT_EVT_UNSNIFF_NOT_ACCEPT,module_process_unsniff_not_accept
+	beq BT_EVT_LE_PAIRING_FAIL,module_hci_event_le_pairing_fail
+	beq BT_EVT_LE_PAIRING_SUCCESS,module_hci_event_le_pairing_success
+	beq BT_EVT_LE_START_ENC,module_hci_event_start_enc
+	beq BT_EVT_LE_PAUSE_ENC,module_hci_event_pause_enc
+	beq BT_EVT_LE_TK_GENERATE,module_hci_event_le_tk
+	beq BT_EVT_BT_GKEY_GENERATE,module_hci_event_gkey_generate
+	beq BT_EVT_BT_GET_PASSKEY,module_hci_event_passkey_entry_mode
+	beq BT_EVT_BT_PAIRING_FAIL,module_hci_event_bt_pairing_fail	
+	beq BT_EVT_BT_PAIRING_SUCCESS,module_hci_event_bt_pairing_success
+ifdef SECURE_CONNECTION	
+	beq BT_EVT_LE_GKEY_GENERATE,module_hci_event_gkey_generate
+endif
+	beq BT_EVT_STORE_NVRAM,module_hci_event_store_device
+	beq BT_EVT_LE_LTK_LOST,module_process_ble_ltk_lost
+	beq BT_EVT_LE_UPDATE_PHY,module_process_ble_update_phy
+	beq BT_EVT_LE_GET_PASSKEY,module_hci_event_passkey_entry_mode
+	rtn
+
+	
+module_process_bb_event_disconned:
+	call module_spp_clear_last_transmite_clock
+	fetch 1,mem_flag_pairing_state
+	ncall module_hci_event_bt_pairing_fail,blank
+	call module_disconn_start
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BT_SPP_CONN
+	branch  module_spp_disconnected
+
+module_process_spp_connected:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_SPP_CONN,pdata
+	store 2,mem_ui_state_map
+	fetch 1,mem_module_spp_lpm_mult
+	store 1,mem_lpm_mult
+	call module_set_conn_pin_low
+	branch module_hci_event_spp_connect
+
+module_process_spp_disconnected:
+//	branch module_spp_disconnected
+module_spp_disconnected:
+	fetch 2,mem_ui_state_map
+	rtnbit0 UI_STATE_BT_SPP_CONN
+	set0 UI_STATE_BT_SPP_CONN ,pdata
+	store 2,mem_ui_state_map
+	branch module_hci_event_spp_disconnect
+
+
+module_process_enter_sniff:
+
+module_sniff_param_check:
+	call module_spp_clear_last_transmite_clock
+	//fetch 1,mem_context
+	//rtnbit0 state_insniff
+	fetch 2,mem_context+coffset_tsniff
+	rshift pdata,pdata
+	fetcht 2,mem_sniff_param_interval
+	isub temp,null
+	nbranch module_sniff_param_check_unsniff,zero
+	branch app_lpm_mult_enable
+module_sniff_param_check_unsniff:
+	fetch 2,mem_module_flag
+	rtnbit1 MOUDLE_TASK_UNSNIFF
+	fetch 2,core_uart_rxitems    //*
+	ncall module_set_unsniff_task_flag,blank    //*加这两句话
+	branch app_bt_sniff_exit
+
+module_process_exit_sniff:
+	call module_clear_sniff_task_flag
+	branch app_lpm_mult_disable
+ 	
+module_process_setup_complete:
+	call module_spp_clear_last_transmite_clock
+	branch module_conn_start
+	
+module_process_bb_even_le_disconn:
+	call le_clr_config_more_data
+	jam 0,mem_module_hci_notify_len
+	call module_disconn_start
+	branch module_hci_event_le_disconnect
+
+module_process_evt_pincode_req:
+	branch  app_bt_set_pincode
+	
+
+module_process_sniff_not_accept:
+	branch module_clear_sniff_task_flag
+
+
+module_process_unsniff_accept:
+	fetch 2,mem_module_flag
+	bbit0 MOUDLE_TASK_UNSNIFF,app_bt_enter_sniff
+	branch module_clear_unsniff_task_flag
+
+	
+module_process_unsniff_not_accept:
+	branch module_clear_unsniff_task_flag
+
+	
+module_process_le_conn:
+//	call le_send_att_exchange_mtu_requset
+	call module_conn_start
+	fetch 1,mem_module_le_lpm_mult
+	store 1,mem_lpm_mult
+	branch module_hci_event_le_connect
+
+
+module_process_bb_conn:
+	jam 0,mem_flag_mode_ssp_pin
+	call module_clear_sniff_task_flag
+	branch module_clear_unsniff_task_flag
+
+module_process_page_time_out:
+module_process_reconn_fail:
+module_disconn_start:
+	call module_start_adv_discovery_by_command
+	branch module_set_conn_pin_high
+
+
+module_process_ble_ltk_lost:
+	call le_send_reject_ind
+	branch le_send_smp_security_request
+
+module_process_ble_update_phy:
+	branch module_hci_event_le_update_phy
+
+
+module_set_conn_pin_high:
+	fetcht 1,mem_module_connect_state_gpio
+	branch gpio_out_active
+
+module_conn_start:
+	call module_stop_adv_discovery
+	branch module_set_conn_pin_low
+	
+module_stop_adv_discovery:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BT_BIT,pdata
+	call app_bt_stop_discovery,true
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BLE_BIT,pdata
+	call app_ble_stop_adv,true
+	rtn
+module_set_conn_pin_low:
+	fetcht 1,mem_module_connect_state_gpio
+	branch gpio_out_inactive
+
+module_process_with_credit:
+	fetch 1,mem_rfcomm_credit_flag
+	rtneq CREDIT_DISABLE
+	branch rfcomm_send_uih_without_payload
+
+/*
+	function name:check hci command complete
+	hci command format:
+	typedef struct HciFormat
+	{
+		uint8_t HciType;
+		uint8_t HciOpcode;
+		uint8_t HciPayloadLen;
+		uint8_t HciPayload[HciPayloadLen];
+	}
+*/
+module_process_check_hci_command_complete:
+	fetch 1,core_uart_status
+	bbit1 UART_STATUS_RX_FIFO_EMPTY,module_process_with_credit  //rx no data
+	call uarta_prepare_rx
+	ifetch 1,contru
+	bne 0x01,module_hci_in_excp	//HciType != 0x01
+	fetch 2,core_uart_rxitems
+	sub pdata,2,null
+	rtn positive
+	ifetch 1,contru
+	store 1,mem_module_uart_opcode
+	ifetcht 1,contru
+	copy contru,rega
+	storet 1,mem_module_uart_len
+	add temp,3,temp
+	fetch 2,core_uart_rxitems
+	isub temp,temp
+	nrtn positive
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	call module_hci_cmd_control
+	fetch 1,mem_module_temp_nl_discard_packet
+	rtneq HCI_NOT_DISCARD_PACKET
+	branch module_hci_dicard_packet //discard this packet
+
+module_hci_in_excp:
+	call delay_10ms
+	call module_hci_event_invalid_packet
+	branch module_hci_release_except
+
+
+module_hci_release_except:
+	bpatch patch17_5,mem_patch17
+	call uarta_prepare_rx
+	fetch 2,core_uart_rxitems
+	rtn blank
+	iadd contru,contru
+	branch module_hci_dicard_bytes
+
+module_hci_dicard_packet:
+	call uarta_prepare_rx
+	increase 2,contu
+	ifetch 1,contu
+	iadd contu,contu
+module_hci_dicard_bytes:
+	branch uarta_rxdone
+	
+/*********************HCI CONTROL*********************/
+module_hci_cmd_control:
+	bpatch patch17_6,mem_patch17
+	fetch 1,mem_module_uart_opcode
+	beq HCI_CMD_SET_BT_ADDR_REQ,module_hci_cmd_set_bt_addr
+	beq HCI_CMD_SET_LE_ADDR_REQ,module_hci_cmd_set_le_addr
+	beq HCI_CMD_SET_VISIBILITY_REQ,module_hci_cmd_set_visibility	
+	beq HCI_CMD_SET_BT_NAME_REQ,module_hci_cmd_set_bt_name
+	beq HCI_CMD_SET_LE_NAME_REQ,module_hci_cmd_set_le_name
+	beq HCI_CMD_SPP_DATA_REQ,module_hci_cmd_receive_spp_data
+	beq HCI_CMD_LE_DATA_REQ,module_hci_cmd_receive_le_data
+	beq HCI_CMD_STATUS_IRQ,module_hci_cmd_inquire_status
+	beq HCI_CMD_SET_PAIRING_REQ,module_hci_cmd_set_pairing_mode
+	beq HCI_CMD_SET_PINCODE_REQ,module_hci_cmd_set_pincode	
+	beq HCI_CMD_SET_UARTCONTROL_REQ,module_hci_cmd_set_uart_control_mode
+	beq HCI_CMD_SET_UART_BAUD_REQ,module_hci_cmd_set_uart_baud
+	beq HCI_CMD_VERSION_REQ,module_hci_cmd_version_request
+	beq HCI_CMD_BT_DISCONNECT,module_hci_cmd_bt_disconnect
+	beq HCI_CMD_BLE_DISCONNECT,module_hci_cmd_ble_disconnect
+	beq HCI_CMD_SET_COD,module_hci_cmd_set_cod
+	beq HCI_CMD_SET_NVRAM_REQ,module_hci_cmd_set_nvram
+	beq HCI_CMD_CONFIRM_GKEY,module_hci_cmd_confirm_gkey
+	beq HCI_CMD_SET_CREDIT_GIVEN,module_hci_cmd_set_credit_given
+	beq HCI_CMD_AUTO_ADV_SCAN,module_hci_cmd_auto_adv
+	beq HCI_CMD_POWER_REQ,module_hci_cmd_power_request
+	beq HCI_CMD_POWER_SET,module_hci_cmd_power_set
+	beq HCI_CMD_PASSKEY_ENTRY,module_hci_cmd_passkey_entry
+	beq HCI_CMD_SET_GPIO,module_hci_cmd_set_gpio
+	beq HCI_CMD_READ_GPIO,module_hci_cmd_read_gpio
+	beq HCI_CMD_LE_SET_PAIRING,module_hci_cmd_le_set_pairing_mode
+	beq HCI_CMD_LE_SET_ADV_DATA,module_hci_cmd_le_set_adv_data
+	beq HCI_CMD_LE_SET_SCAN_DATA,module_hci_cmd_le_set_scan_data
+	beq HCI_CMD_LE_SEND_CONN_UPDATE_REQ,module_hci_cmd_le_send_conn_update_req
+	beq HCI_CMD_LE_SET_ADV_PARM,module_hci_cmd_set_le_adv_parameter
+	beq HCI_CMD_LE_START_PAIRING,module_hci_cmd_le_start_pairing
+	beq HCI_CMD_SET_WAKE_GPIO,module_hci_cmd_set_wake_gpio
+	beq HCI_CMD_SET_TX_POWER,module_hci_cmd_set_tx_power
+	beq HCI_CMD_LE_CONFIRM_GKEY,module_hci_cmd_le_confirm_gkey
+	beq HCI_CMD_REJECT_JUSTWORK,module_hci_cmd_set_reject_justwork_flag
+	beq HCI_CMD_RESET_CHIP_REQ,module_hci_cmd_reset_chip
+	beq HCI_CMD_LE_SET_FIXED_PASSKEY,module_hci_cmd_le_set_fixed_passkey
+	beq HCI_CMD_DELETE_CUSTOMIZE_SERVICE,module_hci_cmd_delete_customize_service
+	beq HCI_CMD_ADD_SERVICE_UUID,module_hci_cmd_add_service_uuid
+	beq HCI_CMD_ADD_CHARACTERISTIC_UUID,module_hci_cmd_add_characteristic_uuid
+	beq HCI_CMD_PASSKEY_ENTRY_INPUT,module_hci_cmd_le_passkey_entry_input
+	beq HCI_CMD_BLE_SET_PHY,module_hci_cmd_ble_set_phy
+	beq HCI_CMD_BLE_READ_CURRENT_PHY,module_hci_cmd_ble_read_current_phy
+	beq HCI_CMD_BLE_SET_DLE,module_hci_cmd_ble_set_dle
+	beq HCI_CMD_READ_CHIP_DATA,module_hci_cmd_read_chip_data
+	beq HCI_CMD_WRITE_CHIP_DATA,module_hci_cmd_write_chip_data
+ifdef COMPILE_WECHAT
+	beq HCI_CMD_WECHAT_SEND_DATA,module_hci_cmd_wechat_send_data
+endif
+	beq HCI_CMD_CLOSE_LPM,module_hci_cmd_close_lpm
+	branch  module_hci_event_receive_invalid_cmd
+
+/*********************HCI COMMAND*********************/
+
+//command opcode 0x00
+module_hci_cmd_set_bt_addr:
+	fetch 1,mem_module_uart_len
+	bne 6,module_hci_event_receive_invalid_cmd
+	ifetch 6,contru
+	store 6,mem_lap
+	branch module_hci_event_receive_valid_cmd
+
+//command opcode 0x01
+module_hci_cmd_set_le_addr:
+	fetch 1,mem_module_uart_len
+	bne 6,module_hci_event_receive_invalid_cmd
+	ifetch 6,contru
+	store 6,mem_le_lap
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x02
+module_hci_cmd_set_visibility:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	ifetcht 1,contru
+	storet 1,mem_module_bluetooth_stauts_by_command
+	call module_hci_event_receive_valid_cmd
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	rtnbit1 UI_STATE_BT_CONNECTED
+module_start_adv_discovery_by_command:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BT_BIT,pdata
+	nbranch moudle_start_adv_by_command,true
+	fetcht 1,mem_module_bluetooth_stauts_by_command
+	and temp,0x03,pdata
+	store 1,mem_scan_mode
+moudle_start_adv_by_command:
+	fetch 1,mem_module_state
+	isolate1 MOUDLE_STATE_BLE_BIT,pdata
+	nrtn true
+	fetcht 1,mem_module_bluetooth_stauts_by_command
+	isolate1 2,temp
+	branch app_ble_start_adv,true
+	branch app_ble_stop_adv
+
+
+//command opcode 0x03
+module_hci_cmd_set_bt_name:
+	fetch 1,mem_module_uart_len
+	sub pdata,67,null
+	nbranch module_hci_event_receive_invalid_cmd,positive
+	store 1,mem_local_name_length
+	arg 8,loopcnt
+	call memset0
+	fetchr loopcnt,1,mem_module_uart_len
+	arg mem_local_name,contw
+	call uart_copy_rx_bytes_fast
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x04
+module_hci_cmd_set_le_name:
+	arg 29,pdata
+	arg mem_le_name_len,contw
+	call module_hci_cmd_receive_store_mem
+	branch le_modified_name
+
+
+//command opcode 0x05
+module_hci_cmd_receive_spp_data:
+	fetch 1,mem_ui_state_map
+	bbit0 UI_STATE_BT_SPP_CONN,module_hci_event_receive_invalid_cmd
+	call app_check_sniff
+	branch module_hci_cmd_spp_exit_sniff,true
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	call module_spp_clear_last_transmite_clock
+	fetch 1,mem_remote_credits
+	rtn blank
+	fetch 2,mem_nl_rx_len_all
+	nbranch module_hci_cmd_pass_init_ng_rx_len_all,blank
+	fetch 1,mem_module_uart_len
+	store 2,mem_nl_rx_len_all
+
+	store 2,mem_nl_rx_data_src
+	storer contru,2,mem_nl_rx_data_src
+module_hci_cmd_pass_init_ng_rx_len_all:
+	call module_hci_cmd_get_current_packet_len_and_remain_len
+	branch spp_tx_rfcomm_packet
+	
+module_hci_cmd_spp_exit_sniff:
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	branch module_exit_sniff
+
+module_hci_cmd_get_current_packet_len_and_remain_len:
+	call module_hci_cmd_get_current_patcket_len
+	fetch 2,mem_nl_rx_len_all
+	fetcht 2,mem_current_packet_length
+	isub temp,pdata
+	store 2,mem_nl_rx_len_all
+	rtn
+
+module_hci_cmd_get_current_patcket_len:
+	fetch 2,mem_nl_rx_len_all
+	fetcht 2,mem_rfcomm_max_frame_size	//接收最大能力?
+	call not_greater_than
+	fetcht 2,mem_pn_max_frame_size		//发送最大能力?
+	call not_greater_than
+	store 2,mem_current_packet_length
+	rtn
+
+module_hci_command_tx_spp_tx_complete:
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	jam HCI_CMD_SPP_DATA_REQ,mem_module_uart_opcode
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x09
+module_hci_cmd_receive_le_data:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+	call module_check_ble_encrypt_state
+	branch module_hci_event_receive_invalid_cmd,user
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	fetch 2,mem_module_flag
+	bbit1 MODULE_FLAG_BLE_DATA_FINISH,module_hci_cmd_receive_le_data_finish
+	fetch 1,mem_module_hci_notify_len
+	nrtn blank
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	ifetch 2,contru		//handle
+	store 2,mem_module_hci_notify_handle
+	storer contru,2,mem_module_hci_nofiy_addr
+	fetch 1,mem_module_uart_len
+	pincrease -2
+	nbranch module_hci_event_receive_invalid_cmd,positive
+	branch module_hci_event_receive_invalid_cmd,zero
+	store 1,mem_module_hci_notify_len
+	fetcht 2,mem_module_hci_notify_handle
+	increase -1,temp
+	call le_att_get_handle_ptr2
+	branch module_hci_cmd_transmit_handle_error,blank
+	ifetcht 4,contr		//flag
+	setarg 0x01280302
+	isub temp,null
+	nbranch module_hci_cmd_transmit_handle_error,zero
+	ifetch 1,contr
+	store 1,mem_module_hci_notify_type
+	and_into 0x30,pdata
+	branch module_hci_cmd_transmit_handle_error,blank
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	call le_set_config_more_data
+	call module_hci_cmd_transmit_le_notify
+	call module_hci_cmd_transmit_le_notify
+	call module_hci_cmd_transmit_le_notify
+	fetch 2,mem_module_flag
+	rtnbit0 MODULE_FLAG_BLE_DATA_FINISH
+module_hci_cmd_receive_le_data_finish:
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	call module_clear_le_tx_data_flag
+	branch module_hci_event_receive_valid_cmd
+
+module_hci_cmd_transmit_handle_error:
+	jam 0,mem_module_hci_notify_len
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	call module_clear_le_tx_data_flag
+	branch module_hci_event_receive_invalid_cmd
+
+module_hci_cmd_transmit_le_notify:
+	fetch 1,mem_module_hci_notify_len
+	rtn blank
+	call le_fifo_check_nearly_full
+	nrtn blank				//no fifo
+	call module_get_le_remote_mtu
+	bpatch patch17_7,mem_patch17
+	fetch 2,mem_le_local_mtu
+	call not_greater_than
+	copy pdata,temp
+	fetch 1,mem_le_l2cap_att_states
+	rtnbit1 BLE_L2CAP_RECV_CONFIRMATION_PACKET
+	add temp,-3,pdata		//sub handle and opcode
+	arg 251,temp
+	call not_greater_than
+	fetcht 1,mem_module_hci_notify_len
+	call not_greater_than
+	copy pdata,rega
+	copy temp,pdata
+	isub rega,pdata
+	store 1,mem_module_hci_notify_len
+	call module_hci_cmd_transmit_le_notify_malloc_l2cap
+	fetch 2,mem_module_hci_nofiy_addr
+	copy pdata,contru
+	copy rega,loopcnt
+	call uart_copy_rx_bytes_fast
+	copy contru,pdata
+	store 2,mem_module_hci_nofiy_addr
+	fetch 1,mem_module_hci_notify_len
+	nrtn blank
+	branch module_set_le_tx_data_flag
+
+module_hci_cmd_transmit_le_notify_malloc_l2cap:
+	fetcht 2,mem_module_hci_notify_handle
+	fetch 1,mem_module_hci_notify_type
+	bbit1 BIT_CHARACTERISTIC_INDICATE,le_att_malloc_tx_indication
+	bbit1 BIT_CHARACTERISTIC_NOTIFY,le_att_malloc_tx_notify
+	rtn
+
+
+//output: temp is master mtu
+module_get_le_remote_mtu:
+	arg 0x17,temp
+	fetch 2,mem_module_flag
+	rtnbit1 MODULE_FLAG_BLE_SEND_MTU23
+	fetcht 2,mem_le_remote_mtu
+	rtn
+
+module_check_ble_encrypt_state:
+	fetch 2,mem_module_flag
+	bbit1 MODULE_FLAG_BLE_DATA_ENCRYPT,le_check_encrypt_state
+	branch disable_user
+	
+
+//command opcode 0x0b
+module_hci_cmd_inquire_status:
+	branch module_hci_event_status_res
+
+
+//command opcode 0x0c
+module_hci_cmd_set_pairing_mode:
+	ifetch 1,contru
+	beq BR_PAIRING_MODE_SECURE_CONNECT_JUSTWORK,module_hci_pairing_just_work_sc
+	beq BR_PAIRING_MODE_SECURE_CONNECT_PASSKEY,module_hci_pairing_passkey_sc
+	beq BR_PAIRING_MODE_SECURE_CONNECT_NUMERIC,module_hci_pairing_numeric_comparison_sc
+
+	copy pdata,rega
+	call sp_br_secure_connection_disable
+	call sc_reset
+	copy rega,pdata
+	beq BR_PAIRING_MODE_PINCODE,module_hci_pairing_pincode_mode
+	beq BR_PAIRING_MODE_JUSTWORK,module_hci_pairing_just_work_mode
+	beq BR_PAIRING_MODE_PASSKEY,module_hci_pairing_passkey
+	beq BR_PAIRING_MODE_NUMERIC,module_hci_pairing_numeric_comparison
+	branch module_hci_event_receive_invalid_cmd
+
+module_hci_pairing_just_work_sc:
+	call sp_br_secure_connection_enable
+	branch module_hci_pairing_just_work_mode
+	
+module_hci_pairing_passkey_sc:
+	call sp_br_secure_connection_enable
+	branch module_hci_pairing_passkey
+
+module_hci_pairing_numeric_comparison_sc:
+	call sp_br_secure_connection_enable
+	branch module_hci_pairing_numeric_comparison
+	
+module_hci_pairing_pincode_mode:
+	call sp_reset
+	jam 0,mem_ssp_enable
+	branch module_hci_event_receive_valid_cmd
+	
+module_hci_pairing_just_work_mode:
+	setarg IO_CAPABILITY_NO_INPUT_NO_OUTPUT
+module_hci_sspairing_mode:
+	store 1,mem_ssp_mode_flag
+	store 1,mem_lmp_io_cap_payload_iocap
+	setarg OOB_DATA_PRESENT_NOT_PRESENT
+	store 1,mem_lmp_io_cap_payload_oob_auth_data
+	setarg AUTH_REQ_MITM_PROTECTION_NOT_REQUIRED_GENERAL_BONDING
+	store 1,mem_lmp_io_cap_payload_auth_req
+	call ssp_enable
+	jam 1,mem_ssp_enable
+	branch module_hci_event_receive_valid_cmd
+module_hci_pairing_passkey:
+	setarg IO_CAPABILITY_KEYBOARD_ONLY
+	branch module_hci_sspairing_mode
+
+module_hci_pairing_numeric_comparison:
+	setarg IO_CAPABILITY_DISPLAY_YESNO
+	branch module_hci_sspairing_mode
+
+
+//command opcode 0x0d
+module_hci_cmd_set_pincode:
+	arg 16,pdata
+	arg mem_pin_length,contw
+	branch module_hci_cmd_receive_store_mem
+
+
+//command opcode 0x0e
+module_hci_cmd_set_uart_control_mode:
+	ifetch 1,contru
+	fetcht 1,mem_module_flag
+	nsetflag blank,MODULE_FLAG_UART_FLOW_CONTROL,temp
+	storet 1,mem_module_flag
+	fetcht 1,core_uart_ctrl
+	nsetflag blank,BIT_UART_CONTROL_FLOW_CONTROL,temp
+	storet 1,core_uart_ctrl
+ 	branch module_hci_event_receive_valid_cmd
+
+ 	
+//command opcode 0x0f
+module_hci_cmd_set_uart_baud:
+	fetchr loopcnt,1,mem_module_uart_len
+	call string2dec_from_uart
+	call uart_calc_baud_rate_config
+	store uart_baud_len,mem_module_uarta_baud_rate
+	call module_hci_event_receive_valid_cmd
+	call wait_uarttx
+	fetch uart_baud_len,mem_module_uarta_baud_rate
+	branch uarta_init_baud_rate
+
+
+//command opcode 0x10
+module_hci_cmd_version_request:
+	arg 2,rega
+	arg mem_soft_version_num,regb
+	arg 0,temp
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x11
+module_hci_cmd_bt_disconnect:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BT_CONNECTED,module_hci_event_receive_invalid_cmd
+module_hci_cmd_bt_disconnect_doing:
+	call module_hci_event_receive_valid_cmd
+	branch app_bt_disconnect
+
+	
+//command opcode 0x12
+module_hci_cmd_ble_disconnect:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+module_hci_cmd_ble_disconnect_doing:
+	call module_hci_event_receive_valid_cmd
+	branch app_ble_disconnect
+
+
+//command opcode 0x15
+module_hci_cmd_set_cod:
+	fetch 1,mem_module_uart_len
+	bne 3,module_hci_event_receive_invalid_cmd
+	ifetch 3,contru
+	store 3,mem_class
+	branch module_hci_event_receive_valid_cmd
+	
+
+//command opcode 0x26
+module_hci_cmd_set_nvram:
+	fetchr loopcnt,1,mem_module_uart_len
+	fetch 2,mem_nv_data_ptr
+	icopy contw
+	call uart_copy_rx_bytes_fast
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x28
+module_hci_cmd_confirm_gkey:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,module_hci_cmd_le_confirm_gkey
+	bbit0 UI_STATE_BT_CONNECTED,module_hci_event_receive_invalid_cmd	
+	ifetch 1,contru
+	fetcht 1,mem_flag_mode_ssp_pin
+	setflag blank,FLAG_MODE_SSP_PIN_COMPARISON_RESULT_BIT,temp
+	set1 FLAG_MODE_SSP_PIN_REVICEVE_COMPARISON_BIT ,temp
+	storet 1,mem_flag_mode_ssp_pin
+
+	call module_hci_event_receive_valid_cmd
+
+	fetch 1,mem_flag_mode_ssp_pin
+	bbit1 FLAG_MODE_SSP_PIN_RECIEVE_DHKEY_BIT,module_hci_cmd_spp_number_comparison_result_is1
+	rtn
+
+module_hci_cmd_spp_number_comparison_result_is1:
+	bbit1 FLAG_MODE_SSP_PIN_COMPARISON_RESULT_BIT,number_comparison_successed
+	jam 0,mem_flag_mode_ssp_pin
+	jam BT_CMD_DHKEY_NOT_ACCEPT,mem_fifo_temp
+	branch ui_ipc_send_cmd
+
+
+//command opcode 0x29
+module_hci_cmd_set_credit_given:
+	fetch 1,mem_ui_state_map
+	rtnbit0 UI_STATE_BT_SPP_CONN
+	fetch 1,mem_rfcomm_credit_flag
+	rtneq CREDIT_DISABLE
+	ifetch 1,contru
+	fetcht 1,mem_credit_given
+	iadd temp,temp
+	storet 1,mem_credit_given
+	rtn
+
+
+//command opcode 0x2a
+module_hci_cmd_auto_adv:
+	arg 0x40,loopcnt
+	arg mem_le_adv_data_len,contw
+	call clear_mem
+	setarg 0
+	store 1,mem_regb
+	copy rega,contru
+module_hci_cmd_auto_adv_loop:
+	copy contru,pdata
+	store 2,mem_regc
+	call module_hci_cmd_auto_adv_adv_analys
+
+	fetch 1,mem_regb
+	fetcht 1,mem_temp
+	increase 1,temp
+	iadd temp,pdata
+	store 1,mem_regb
+
+	sub pdata,31,null
+	nbranch module_hci_cmd_auto_adv_store_scan,positive
+module_hci_cmd_auto_adv_store_adv:
+	fetcht 1,mem_le_adv_data_len
+	setarg mem_le_adv_data
+	iadd temp,pdata
+	store 2,mem_contw
+	fetcht 1,mem_temp
+	increase 1,temp
+	fetch 1,mem_le_adv_data_len
+	iadd temp,pdata
+	store 1,mem_le_adv_data_len
+	branch module_hci_cmd_auto_adv_store_common
+module_hci_cmd_auto_adv_store_scan:
+	fetcht 1,mem_le_scan_data_len
+	setarg mem_le_scan_data
+	iadd temp,pdata
+	store 2,mem_contw
+	fetcht 1,mem_temp
+	increase 1,temp
+	fetch 1,mem_le_scan_data_len
+	iadd temp,pdata
+	store 1,mem_le_scan_data_len
+module_hci_cmd_auto_adv_store_common:
+	fetch 2,mem_contw
+	copy pdata,contw
+	fetch 2,mem_regc
+	copy pdata,contru
+
+	copy temp,loopcnt
+	call uart_copy_rx_bytes_fast
+
+	fetch 1,mem_module_uart_len
+	fetcht 1,mem_regb
+	isub temp,null
+	nbranch  module_hci_cmd_auto_adv_loop,zero
+	branch module_hci_event_receive_valid_cmd
+
+//block of adv len in mem_temp
+module_hci_cmd_auto_adv_adv_analys:
+	ifetch 1,contru
+	store 1,mem_temp
+	ifetch 1,contru
+	store 1,mem_rega
+	rtn
+
+
+//command opcode 0x2b
+module_hci_cmd_power_request:
+	arg 0,temp
+	arg 2,rega
+	fetch 2,mem_module_vdd_quotient
+	store 2,mem_event_cmd_response_content
+	arg mem_event_cmd_response_content,regb
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x2c
+module_hci_cmd_power_set:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	store 1,mem_module_read_vdd_flag
+	setarg 0x00
+	store 2,mem_module_vdd_quotient
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x30
+module_hci_cmd_passkey_entry:
+	fetch 1,mem_module_uart_len
+	bne 4,module_hci_event_receive_invalid_cmd
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,module_hci_cmd_le_passkey_entry_input
+	ifetch 4,contru
+	store 4,mem_pin
+	jam 4,mem_pin_length
+	jam 0,mem_authentication_passkey_times
+	call module_hci_event_receive_valid_cmd
+	branch authentication_passkey
+
+
+//command opcode 0x31
+module_hci_cmd_set_gpio:
+	fetch 1,mem_module_uart_len
+	bne 3,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	beq HCI_CMD_CONFIG_GPIO_INPUT,module_set_gpio_input
+	beq HCI_CMD_CONFIG_GPIO_OUTPUT,module_set_gpio_output
+	branch module_hci_event_receive_invalid_cmd
+
+module_set_gpio_input:
+	call module_hci_event_receive_valid_cmd
+	ifetcht 1,contru
+	ifetch 1,contru
+	beq GPIO_INPUT_HIGH_IMPEDANCE,gpio_set_high_impedance
+	nsetflag blank,7,temp
+	branch gpio_config_input
+
+module_set_gpio_output:
+	call module_hci_event_receive_valid_cmd
+	ifetcht 1,contru
+	ifetch 1,contru	
+	branch gpio_out_active,blank
+	branch gpio_out_inactive
+
+
+//command opcode 0x32
+module_hci_cmd_read_gpio:
+	fetch 1,mem_module_uart_len
+	bne 1,module_hci_event_receive_invalid_cmd
+	ifetcht 1,contru
+	call gpio_get_bit
+	setarg 0x0
+	nsetflag true,0,pdata
+	arg 1,rega
+	store 2,mem_event_cmd_response_content
+	arg mem_event_cmd_response_content,regb
+	arg 0,temp
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x33
+module_hci_cmd_le_set_pairing_mode:
+	ifetch 1,contru
+	copy pdata,temp
+ifdef SECURE_CONNECTION
+	beq LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK,module_le_set_pairing_mode_secure_justwork
+	beq LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC,module_le_set_pairing_mode_secure_numeric
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,module_le_set_pairing_mode_secure_passkey
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,module_le_set_pairing_mode_secure_passkey_res_input
+endif
+	store 1,mem_le_pairing_mode
+	call sc_reset
+	call le_secure_connection_disable
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_NONE, module_le_set_no_pairing
+	beq LE_PAIRING_MODE_LAGACY_JUSTWORK,module_le_set_pairing_mode_lagacy_just_work
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY,module_le_set_pairing_mode_lagacy_passkey
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT,module_le_set_pairing_mode_lagacy_passkey_res_input
+	branch module_hci_event_receive_invalid_cmd
+		
+ifdef SECURE_CONNECTION	
+module_le_set_pairing_mode_secure_justwork:
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch module_le_set_noinputnooutput
+module_le_set_pairing_mode_secure_numeric:
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	jam FLAG_IOCAP_DISPLAYYESNO,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+module_le_set_pairing_mode_secure_passkey:	
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch module_le_set_displayonly
+module_le_set_pairing_mode_secure_passkey_res_input:
+	storet 1,mem_le_pairing_mode
+	call le_secure_connection_enable
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch module_le_set_keboadonly
+
+endif
+
+module_le_set_no_pairing:
+	jam FLAG_LE_NO_BONDING_NO_MITM,mem_le_pres_auth
+module_le_set_noinputnooutput:	
+	jam FLAG_IOCAP_NOINPUTNOOUTPUT,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+module_le_set_pairing_mode_lagacy_just_work:
+	jam FLAG_LE_BONDING_NO_MITM,mem_le_pres_auth
+	branch module_le_set_noinputnooutput
+module_le_set_pairing_mode_lagacy_passkey:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+	branch module_le_set_displayonly
+module_le_set_pairing_mode_lagacy_passkey_res_input:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+	branch module_le_set_keboadonly
+module_le_set_keboadonly:	
+	jam FLAG_IOCAP_KEYBOARDONLY,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+module_le_set_displayonly:	
+	jam FLAG_IOCAP_DISPLAYONLY,mem_le_pres_iocap
+	branch module_hci_event_receive_valid_cmd	
+
+
+//command opcode 0x34
+module_hci_cmd_le_set_adv_data:
+	arg 31,pdata
+	arg mem_le_adv_data_len,contw
+	branch module_hci_cmd_receive_store_mem
+
+
+//command opcode 0x35
+module_hci_cmd_le_set_scan_data:
+	arg 31,pdata
+	arg mem_le_scan_data_len,contw
+	branch module_hci_cmd_receive_store_mem
+
+/*
+	input:contw is store mem ptr
+	pdata is max length
+*/
+module_hci_cmd_receive_store_mem:
+	fetchr loopcnt,1,mem_module_uart_len
+	isub loopcnt,null
+	nbranch module_hci_event_receive_invalid_cmd,positive
+	istorer loopcnt,1,contw
+	call uart_copy_rx_bytes_fast
+	branch module_hci_event_receive_valid_cmd	
+
+	
+//command opcode 0x36
+module_hci_cmd_le_send_conn_update_req:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+	fetch 1,mem_module_uart_len
+	bne 0x08,module_hci_event_receive_invalid_cmd
+	ifetch 8,contru
+	store 8,mem_le_interval_min
+	jam BT_CMD_LE_UPDATE_CONN,mem_fifo_temp
+	call  ui_ipc_send_cmd
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x37
+module_hci_cmd_set_le_adv_parameter:
+	ifetch 2,contru
+	store 2,mem_le_adv_interval
+	branch module_hci_event_receive_valid_cmd
+	
+	
+//command opcode 0x38
+module_hci_cmd_le_start_pairing:
+	fetch 1,mem_le_pairing_mode
+	branch module_hci_event_receive_invalid_cmd,blank
+	fetch 1,mem_le_pairing_state
+	bne FLAG_LE_PAIRING_NULL,module_hci_event_receive_invalid_cmd
+	fetch 1,mem_le_enc_state
+	bne FLAG_LE_ENC_NULL,module_hci_event_receive_invalid_cmd
+	call check_51cmd_le_smp_sec_req
+	branch module_hci_event_receive_valid_cmd	
+
+
+//command opcode 0x40
+module_hci_cmd_set_wake_gpio:
+	fetch 1,mem_module_uart_len
+	bne 5,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	store 1,mem_module_mcu_wake_pin
+	ifetch 4,contru
+	store 4, mem_module_mcu_wake_delay_us
+	fetcht 1,mem_module_mcu_wake_pin
+	call gpio_config_output
+	call module_set_mcu_wake_pin_low
+	branch module_hci_event_receive_valid_cmd
+	
+
+//command opcode 0x42
+module_hci_cmd_set_tx_power:
+	fetch 1,mem_module_uart_len
+	bne 0x01,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	store 1,mem_tx_power
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x48
+module_hci_cmd_le_confirm_gkey:
+	ifetch 1,contru
+	beq 0x01,module_hci_cmd_le_confirm_gkey_fail
+	fetch 1,mem_le_secure_connect_state
+	beq LE_SC_STAT_SEND_PUBLIC_KEY,module_hci_cmd_le_confirm_gkey_ok
+	beq LE_SC_STAT_RECEIVE_DHKEY,module_hci_cmd_le_confirm_gkey_ok
+	beq LE_SC_STAT_WAIT_CONFIRM_GKEY,module_hci_cmd_le_confirm_gkey_ok
+	branch module_hci_event_receive_invalid_cmd		
+module_hci_cmd_le_confirm_gkey_ok:
+	jam FLAG_LE_SC_CONFRIM_GKEY_OK,mem_le_sc_confirm_gkey_flag
+	branch module_hci_event_receive_valid_cmd	
+	
+module_hci_cmd_le_confirm_gkey_fail:
+	call le_send_pairing_confirm_value_failed
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x49
+module_hci_cmd_set_reject_justwork_flag:
+	fetch 1,mem_module_uart_len
+	bne 0x01,module_hci_event_receive_invalid_cmd
+	call module_hci_event_receive_valid_cmd
+	ifetch 1,contru
+	branch classic_bt_clr_reject_justwork_flag,blank
+	branch classic_bt_set_reject_justwork_flag
+
+
+//command opcode 0x51
+module_hci_cmd_reset_chip:
+	call module_hci_event_receive_valid_cmd
+	call wait_uarttx
+	jam 0x01,core_reset // rest YC1021
+	branch loop
+
+
+//command opcode 0x61
+module_hci_cmd_le_set_fixed_passkey:
+	fetch 1,mem_module_uart_len
+	beq 0,module_hci_event_receive_invalid_cmd
+	ifetch 1,contru
+	branch module_hci_cmd_le_set_random_passkey,blank
+	fetch 1,mem_module_uart_len
+	bne 5,module_hci_event_receive_invalid_cmd
+	ifetch 4,contru
+	arg 1000000,temp
+	isub temp,null
+	branch module_hci_event_receive_invalid_cmd,positive
+	store 4,mem_le_tk
+	call le_set_config_fixed_tk
+	branch module_hci_event_receive_valid_cmd
+
+module_hci_cmd_le_set_random_passkey:
+	call le_clr_config_fixed_tk
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x76
+module_hci_cmd_delete_customize_service:
+	ifetcht 2,contru
+	call le_att_get_handle_ptr2
+	add contr,-2,contw
+	setarg 0x0000
+	istore 2,contw
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x77
+module_hci_cmd_add_service_uuid:
+	call module_hci_cmd_add_service_uuid_set_uuid
+	call uart_copy_rx_bytes_len_data
+	setarg 0x0000
+	istore 2,contw
+	branch module_hci_event_uuid_handle
+
+
+
+//command opcode 0x78
+module_hci_cmd_add_characteristic_uuid:
+	ifetch 1,contru	//Characteristic
+	call module_hci_cmd_add_characteristic_uuid_set_handle
+	call module_hci_cmd_add_characteristic_uuid_set_uuid
+	branch module_hci_event_uuid_handle
+
+
+module_hci_cmd_add_service_uuid_set_uuid:
+	call le_att_creat_new_handle
+	setarg 0x280002
+	istore 3,contw
+	rtn
+
+
+module_hci_cmd_add_characteristic_uuid_set_handle:
+	store 1,mem_pdatatemp
+	call le_att_creat_new_handle
+	setarg 0x01280302
+	istore 4,contw
+	fetch 1,mem_pdatatemp
+	istore 3,contw
+	rtn
+
+
+module_hci_cmd_add_characteristic_uuid_set_uuid:
+	call le_att_get_last_handle
+	ifetch 1,contru
+	and pdata,0x1f,loopcnt
+	copy pdata,rega
+	isolate1 BIT_OF_WRITE_AUTHENTICATED,rega
+	setflag true,BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED,temp
+	isolate1 BIT_OF_READ_AUTHENTICATED,rega
+	setflag true,BIT_OF_ATT_HANDLE_READ_AUTHENTICATED,temp
+	istoret 2,contw
+	copy loopcnt,pdata
+	istore 1,contw
+	call uart_copy_rx_bytes
+	call uart_copy_rx_bytes_len_data		//data
+	setarg 0
+	istore 2,contw
+	and temp,0xff,temp
+	increase -1,temp
+	call le_att_get_handle_ptr2
+	add contr,4,contr
+	ifetch 1,contr		//characteristic data
+	bbit1 BIT_CHARACTERISTIC_NOTIFY,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid
+	bbit1 BIT_CHARACTERISTIC_INDICATE,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid
+	increase 1,temp
+	rtn
+
+
+module_hci_cmd_add_characteristic_uuid_set_ccc_uuid:
+	call le_att_get_last_handle
+	isolate1 BIT_OF_NOTIFY_AUTHENTICATED,rega
+	setflag true,BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED,temp
+	istoret 2,contw
+	setarg 0x02290202
+	istore 8,contw
+	increase -1,temp
+	rtn
+
+
+le_att_creat_new_handle:
+	call le_att_get_last_handle
+	istoret 2,contw
+	rtn
+
+
+uart_copy_rx_bytes_len_data:
+	ifetch 1,contru
+	copy pdata,loopcnt
+	istore 1,contw
+	branch uart_copy_rx_bytes
+
+
+//command opcode 0x7a
+module_hci_cmd_le_passkey_entry_input:
+	fetch 1,mem_le_pairing_state
+	bne FLAG_LE_PAIRING_RECEIVE_PAIRING_CONFIRM,module_hci_event_receive_invalid_cmd
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT,module_hci_cmd_passkey_entry_res_input
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,module_hci_cmd_passkey_entry_sc_res_input
+	branch module_hci_event_receive_invalid_cmd
+
+module_hci_cmd_passkey_entry_sc_res_input:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_PASSKEY_WAIT_CONFIRM,mem_le_secure_connect_state	
+	branch module_hci_cmd_receive_ble_passkey
+
+module_hci_cmd_receive_ble_passkey:
+	ifetch 4,contru
+	store 4,mem_le_tk
+	branch module_hci_event_receive_valid_cmd
+	
+module_hci_cmd_passkey_entry_res_input:
+	call module_hci_cmd_receive_ble_passkey
+	branch le_send_smp_pairing_confirm
+
+
+
+//command opcode 0x90
+module_hci_cmd_ble_set_phy:
+	fetch 1,mem_module_uart_len
+	bne 2,module_hci_event_receive_invalid_cmd
+	ifetcht 2,contru
+	call le_set_phys
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x91
+module_hci_cmd_ble_read_current_phy:
+	arg 0,temp
+	arg 2,rega
+	arg mem_context+coffset_le_rx_phy,regb
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x92
+module_hci_cmd_ble_set_dle:
+	fetch 1,mem_module_uart_len
+	bne 8,module_hci_event_receive_invalid_cmd
+	ifetch 8,contru
+	call le_set_dle
+	branch module_hci_event_receive_valid_cmd
+
+
+//command opcode 0x93
+module_hci_cmd_read_chip_data:
+	ifetchr rega,1,contru
+	ifetchr regb,2,contru
+	arg 0,temp
+	branch module_hci_event_set_cmd
+
+
+//command opcode 0x94
+module_hci_cmd_write_chip_data:
+	fetchr loopcnt,1,mem_module_uart_len
+	increase -2,loopcnt
+	ifetch 2,contru
+	copy pdata,contw
+	call uart_copy_rx_bytes_fast
+	branch module_hci_event_receive_valid_cmd
+
+ifdef COMPILE_WECHAT
+//command opcode 0x95
+module_hci_cmd_wechat_send_data:
+	fetch 2,mem_ui_state_map
+	bbit0 UI_STATE_BLE_CONNECTED,module_hci_event_receive_invalid_cmd
+	fetchr loopcnt,1,mem_module_uart_len
+	arg mem_module_wechat_local_data_buffer,contw
+	call uart_copy_rx_bytes_fast
+	fetchr regb,1,mem_module_uart_len
+	arg mem_module_wechat_local_data_buffer,rega
+	call wechat_air_sync_send_wechat_packet
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	rtn user
+	jam HCI_DISCARD_PACKET,mem_module_temp_nl_discard_packet 
+	branch module_hci_event_receive_valid_cmd
+endif
+
+
+//command opcode 0xff
+module_hci_cmd_close_lpm:
+	jam 0,mem_lpm_mode
+	branch module_hci_event_receive_valid_cmd
+	
+
+/*********************HCI EVENT*********************/
+
+module_hci_event_receive_invalid_cmd:
+	arg 1,temp
+	arg 0,rega
+	branch module_hci_event_set_cmd
+
+
+module_hci_event_receive_valid_cmd:
+	arg 0,temp
+	arg 0,rega
+	branch module_hci_event_set_cmd
+
+
+//event opcode 0x00
+module_hci_event_spp_connect:
+	jam  HCI_EVENT_SPP_CONN_REP,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x02
+module_hci_event_le_connect:
+	jam  HCI_EVENT_LE_CONN_REP,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x03
+module_hci_event_spp_disconnect:
+	jam  HCI_EVENT_SPP_DIS_REP,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x05
+module_hci_event_le_disconnect:
+	jam  HCI_EVENT_LE_DIS_REP,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x06
+//input:
+//	temp: success 0; fail 1
+//	rega:Response Content length
+//	regb:Response Content address
+module_hci_event_set_cmd:
+	fetch 1,mem_module_uart_opcode
+	copy pdata,regc
+	jam  HCI_EVENT_CMD_RES,mem_module_uart_opcode
+	setarg 2
+	iadd rega,pdata
+	call module_hci_prepare_tx
+	copy regc,pdata
+	istore 1,contwu
+	istoret 1,contwu
+	copy rega,loopcnt
+	copy regb,contr
+	call uart_copy_tx_bytes
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x07
+module_hci_event_receive_spp_data:
+//	call p_nl_clear_last_transmite_clock
+	call module_spp_clear_last_transmite_clock
+	jam HCI_EVENT_SPP_DATA_REP,mem_module_uart_opcode
+	fetch 1,mem_current_length
+	rtn blank
+	call module_hci_prepare_tx
+	fetch 1,mem_current_length
+	copy pdata,loopcnt
+	fetch 2,mem_rfcomm_uih_payload_ptr
+	copy pdata,contr
+	call uart_copy_tx_bytes_fast
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x08
+//loopcnt pdata is data length
+module_hci_event_receive_le_data:
+	jam HCI_EVENT_LE_DATA_REP,mem_module_uart_opcode
+	add loopcnt,2,pdata
+	call module_hci_prepare_tx
+	fetch 2,mem_module_le_rx_data_handle // Attribute handle
+	istore 2,contwu
+	fetch 2,mem_module_le_rx_data_address
+	icopy contr
+	call uart_copy_tx_bytes_fast
+	copy contr,pdata
+	store 2,mem_module_le_rx_data_address
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x09
+module_hci_event_enter_standby_mode:
+	jam HCI_EVENT_STANDBY_REP,mem_module_uart_opcode
+module_hci_event_enter_standby_mode_len0:
+	setarg 0
+	call module_hci_prepare_tx
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x0a
+module_hci_event_status_res:
+	jam HCI_EVENT_STATUS_RES,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	
+	call module_hci_read_bt_status
+	
+	fetch 2,mem_ui_state_map	
+	arg UI_STATE_BT_HID_CONN,queue
+	qisolate1 pdata
+	setflag true,3,temp
+
+	arg UI_STATE_BLE_CONNECTED,queue
+	qisolate1 pdata
+	setflag true,5,temp	
+	
+	fetch 1,mem_ui_state_map
+	arg UI_STATE_BT_SPP_CONN,queue
+	qisolate1 pdata
+	setflag true,4,temp	
+	
+	istoret 1,contwu
+	branch module_hci_transmit_tx
+
+//	temp: bit0 3.0 inquiry;bit1 3.0 scan;bit2 ble adv;
+
+module_hci_read_bt_status:
+	arg 0,temp
+	fetch 1,mem_scan_mode
+	arg inq_scan_mode,queue
+	qisolate1 pdata
+	setflag true,0,temp
+	arg page_scan_mode,queue
+	qisolate1 pdata
+	setflag true,1,temp	
+
+	fetch 1,mem_le_adv_enable
+	arg 0,queue
+	qisolate1 pdata
+	setflag true,2,temp	
+	rtn
+
+
+//event opcode 0x0d
+module_hci_event_store_device:
+	jam HCI_EVENT_NVRAM_REP,mem_module_uart_opcode
+	fetch 1,mem_nv_data_number
+	mul32 pdata,34,pdata
+	icopy loopcnt
+	call module_hci_prepare_tx
+	fetch 2,mem_nv_data_ptr
+	icopy contr
+	call uart_copy_tx_bytes_fast
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x0e
+module_hci_event_gkey_generate:
+	jam HCI_EVENT_GKEY,mem_module_uart_opcode
+	setarg 4
+	call module_hci_prepare_tx
+	fetch 4,mem_gkey
+	istore 4,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x0f
+module_hci_event_invalid_packet:
+	jam HCI_EVENT_INVALID_PACKET,mem_module_uart_opcode
+	fetch 2,core_uart_rxitems
+	arg 0x40,temp
+	call not_greater_than
+	copy pdata,rega
+	copy pdata,loopcnt
+	call uarta_prepare_rx
+	arg mem_module_rx_error_data_buffer,contw
+	call uart_copy_rx_bytes_fast
+	copy rega,pdata
+	copy rega,loopcnt
+	call module_hci_prepare_tx
+	arg mem_module_rx_error_data_buffer,contr
+	call uart_copy_tx_bytes_fast
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x10
+module_hci_event_passkey_entry_mode:
+	jam  HCI_EVENT_GET_PASSKEY,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x11
+module_hci_event_le_tk:
+	jam HCI_EVENT_LE_TK,mem_module_uart_opcode
+	setarg 4
+	call module_hci_prepare_tx
+	fetch 4,mem_le_tk
+	istore 4,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x14
+module_hci_event_le_pairing_fail:
+	arg FLAG_BLE_PAIRING_FAIL,rega
+	branch module_hci_event_pairing_completed
+
+module_hci_event_le_pairing_success:
+	arg FLAG_BLE_PAIRING_SUCCESS,rega
+	branch module_hci_event_pairing_completed
+
+module_hci_event_bt_pairing_fail:
+	arg FLAG_BT_PAIRING_FAIL,rega
+	branch module_hci_event_pairing_completed
+
+module_hci_event_bt_pairing_success:
+	arg FLAG_BT_PAIRING_SUCCESS,rega
+
+module_hci_event_pairing_completed:
+	jam 0,mem_flag_mode_ssp_pin
+	jam HCI_EVENT_LE_PAIRING_STATE,mem_module_uart_opcode
+	setarg 2
+	call module_hci_prepare_tx
+	copy rega,pdata
+	istore 2,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x15
+module_hci_event_pause_enc:
+	arg FLAG_EVENT_PAUSE_ENC,regc
+	branch module_hci_event_enc
+
+module_hci_event_start_enc:
+	arg FLAG_EVENT_START_ENC,regc
+
+module_hci_event_enc:
+	jam HCI_EVENT_LE_ENCRYPTION_STATE,mem_module_uart_opcode
+	setarg 1
+	call module_hci_prepare_tx
+	copy regc,pdata
+	istore 1,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x1d
+module_hci_event_le_gkey:
+	jam HCI_EVENT_LE_GKEY,mem_module_uart_opcode
+	setarg 4
+	call module_hci_prepare_tx
+	fetch 4,mem_gkey
+	istore 4,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x29
+//input:temp uuid number
+module_hci_event_uuid_handle:
+	storet 2,mem_temp
+	jam HCI_EVENT_UUID_HANDLE,mem_module_uart_opcode
+	setarg 2
+	call module_hci_prepare_tx
+	fetcht 2,mem_temp
+	istoret 2,contwu
+	branch module_hci_transmit_tx
+
+
+//event opcode 0x2B
+module_hci_event_le_input_passkey:
+	jam HCI_EVENT_LE_INPUT_GKEY,mem_module_uart_opcode
+	branch module_hci_event_enter_standby_mode_len0
+
+
+//event opcode 0x40
+module_hci_event_le_update_phy:
+	jam HCI_BLE_UPDATE_PHY_EVENT,mem_module_uart_opcode
+	setarg 2
+	call module_hci_prepare_tx
+	fetch 2,mem_context+coffset_le_rx_phy
+	istore 2,contwu
+	branch module_hci_transmit_tx
+
+ifdef COMPILE_WECHAT
+//event opcode 0x41
+module_wechat_rx_push_data:
+module_hci_event_ble_wechat_receive_push_data:
+	call wechat_air_sync_check_push_data_struct
+	nrtn user
+	jam HCI_BLE_WECHAT_RECEIVE_PUSH_DATA,mem_module_uart_opcode
+	copy loopcnt,pdata
+	call module_hci_prepare_tx
+	copy regc,contr
+	call uart_copy_tx_bytes_fast
+	branch module_hci_transmit_tx
+endif
+	
+
+//****************************************************************//
+	//module_hci_prepare_tx
+	//function:write hci packet header
+	//input: pdata-----packet length  (1byte)
+	//input: mem_uart_opcode------opcode (1byte)
+	//output:contwu --- pointer to packet payload
+	//use reg: contwu,pdata
+//****************************************************************//	
+module_hci_prepare_tx:
+	jam 0x02,mem_module_uart_cmd
+	store 1,mem_module_uart_len
+	storet 8,mem_temp
+	bpatch patch18_0,mem_patch18
+	call module_set_mcu_wake_pin_high_delay
+	fetcht 8,mem_temp
+	call uarta_prepare_tx_register_push
+	fetch 3,mem_module_uart_cmd
+	istore 3,contwu
+	rtn
+
+module_hci_transmit_tx:
+	bpatch patch18_1,mem_patch18
+	branch uarta_send_register_pop
+
+module_set_mcu_wake_pin_high_delay:
+	call module_check_mcu_wake_pin_high
+	rtn true
+module_set_mcu_wake_pin_h_delay:
+	call module_set_mcu_wake_pin_high
+	fetch 4,mem_module_mcu_wake_delay_us
+	rshift2 pdata,pdata
+	rtn blank
+	branch delay
+
+module_set_mcu_wake_pin_high:
+	fetcht 1,mem_module_mcu_wake_pin
+	branch gpio_out_active
+
+module_check_mcu_wake_pin_high:
+	fetcht 1,mem_module_mcu_wake_pin
+	branch gpio_check_active
+
+module_set_mcu_wake_pin_low:
+	fetcht 1,mem_module_mcu_wake_pin
+	branch gpio_out_inactive
+
+
+
+/*********************hci command end*********************/
+
+/*********************hci ble receive data start*********************/
+
+//rega is le rx data address
+//regb is le rx data length
+//mem_le_att_handle is write handle
+module_le_receive_data:
+	storer rega,2,mem_module_le_rx_data_address
+	storer regb,2,mem_module_le_rx_data_len
+	fetch 2,mem_le_att_handle
+	store 2,mem_module_le_rx_data_handle
+	call module_check_ble_encrypt_state
+	rtn user
+	
+module_le_receive_data_ok:	
+	fetcht 2,mem_module_le_rx_data_len
+	fetch 1,mem_module_ble_data_uart_max_length
+	call not_greater_than
+	copy pdata,loopcnt
+	copy temp,pdata
+	isub loopcnt,pdata
+	store 2,mem_module_le_rx_data_len
+	call module_hci_event_receive_le_data
+	fetch 2,mem_module_le_rx_data_len
+	rtn blank
+	branch module_le_receive_data_ok
+
+/*********************hci ble receive data end*********************/
+
+module_exit_sniff:
+	fetch 2,mem_module_flag
+	rtnbit1 MOUDLE_TASK_UNSNIFF
+	call module_set_unsniff_task_flag	
+	branch app_bt_sniff_exit
+
+
+module_set_lpm_mult_2:
+	jam 2,mem_lpm_mult
+	rtn
+
+
+
+module_bb_event_timer:
+//	branch module_read_vdd_timer
+
+module_read_vdd_timer:
+	fetch 1,mem_module_read_vdd_flag
+	rtn blank
+	fetch 1,mem_module_read_vdd_count
+	rtn blank
+	increase -1,pdata
+	store 1,mem_module_read_vdd_count
+	nrtn blank
+	jam FLAG_MODULE_READ_VDD_COUNT,mem_module_read_vdd_count
+	call enable_adc
+	call vdd_calculate_by_mode
+	div pdata,0x64
+	call get_div_result
+	remainder temp
+	store 1,mem_module_vdd_quotient
+	storet 1,mem_module_vdd_remainder
+	rtn	
+	
+
+module_control_air_flow:
+	call check_uart_tx_buff
+	branch app_l2cap_flow_control_enable,positive
+	branch app_l2cap_flow_control_disable
+
+
+/**************module state *******************/
+module_set_sniff_task_flag:
+	arg MOUDLE_TASK_SNIFF,queue
+	branch module_set_state
+
+module_clear_sniff_task_flag:
+	arg MOUDLE_TASK_SNIFF,queue
+	branch module_clr_state
+
+module_set_unsniff_task_flag:
+	arg MOUDLE_TASK_UNSNIFF,queue
+	branch module_set_state
+
+module_clear_unsniff_task_flag:
+	arg MOUDLE_TASK_UNSNIFF,queue
+	branch module_clr_state
+
+module_set_le_tx_data_flag:
+	arg MODULE_FLAG_BLE_DATA_FINISH,queue
+	branch module_set_state
+	
+module_clear_le_tx_data_flag:
+	arg MODULE_FLAG_BLE_DATA_FINISH,queue
+	branch module_clr_state
+
+module_clr_state:
+	fetch 2,mem_module_flag
+	qset0 pdata
+	store 2,mem_module_flag
+	rtn
+
+module_set_state:
+	fetch 2,mem_module_flag
+	qset1 pdata
+	store 2,mem_module_flag
+	rtn
+	
+/**************module state end*******************/
+
+endif
Index: mouse_public_3mode_usb/program/app_mouse.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_mouse.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_mouse.prog	(working copy)
@@ -0,0 +1,4775 @@
+
+ifdef COMPILE_MOUSE
+mouse_init:
+	call enable_authrom
+	call mouse_setting_config
+	call mouse_init_sunt
+	call mouse_dpi_config
+	rtn wake
+	call mouse_drawing_optima_init
+	call mouse_cb_fuction
+	call mouse_sensor_powerdown
+	fetch 1,mem_usb_addr
+	rtnbit1 7
+mouse_init_wireless:	
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BTN_DOWN,mouse_start_discovery
+	call mouse_check_select_device_by_switch
+	branch mouse_start_work
+
+
+mouse_cb_fuction:
+	setarg mouse_24g_before_lpm_sleep
+	store 2,mem_cb_before_lpm_sleep
+	setarg mouse_24g_package_data
+	store 2,mem_cb_24g_transmit_data
+	setarg mouse_24g_search_dongle
+	store 2,mem_cb_24g_search_receiver
+	setarg mouse_lpm_before_common
+	store 2,mem_cb_24g_lpm_before
+	setarg mouse_le
+	store 2,mem_cb_le_process
+	setarg mouse_bt
+	store 2,mem_cb_bt_process
+	setarg mouse_process_lpm_before
+	store 2,mem_cb_before_lpm
+	setarg mouse_priority_bb_event
+	store 2,mem_cb_bb_event_process
+	setarg mouse_idle
+	store 2,mem_cb_idle_process
+	setarg mouse_before_hibernate
+	store 2,mem_cb_before_hibernate
+	setarg mouse_le_bb_event_connect_complete
+	store 2,mem_cb_att_write	
+	setarg mouse_bb_event_timer
+	store 2,mem_cb_event_timer
+	setarg mouse_spi_write_flash_cb
+	store 2,mem_cb_spi_flash_write_complate
+	setarg mouse_lpm_check_wake_lock
+	store 2,mem_cb_check_wakelock
+	setarg mouse_le_transmit
+	store 2,mem_cb_ble_transmit
+	setarg mouse_bt_slave_match
+	store 2,mem_cb_bt_slave_match
+	setarg mouse_set_lpm_mult
+	store 2,mem_cb_bt_set_mult
+	rtn
+
+
+mouse_setting_config:
+	rtn wake
+	call g24_transmit_init
+	call g24_chmap_param_init
+	call mouse_gpio_init
+	call mouse_param_init
+	call le_set_config_fixed_ltk
+	call le_set_justwork
+	call le_set_fixed_ltk
+	call le_set_config_read_authentication
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_EEPROM,mouse_load_eeprom_info_check
+	bbit1 MOUSE_ENABLE_FLASH,mouse_load_flash_info_check
+	rtn
+	
+mouse_xtal_init:
+	jam 0x08,mem_fcomp_div		// 0x08--16M 
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_16M
+	jam 0x18,mem_fcomp_div		// 0x18--24M
+	rtn
+
+mouse_default_init:
+	jam 0xff,mem_usb_offline_check_gpio
+	jam 0xff,mem_ui_button_gpio
+	jam 0x1e,mem_ui_button_timeout
+	jam 5,mem_store_information_delay_timer_init
+
+	setarg mem_mouse_led_type
+	store 2,mem_ui_led_struct_ptr
+	jam 1,mem_ui_led_struct_num
+
+	setarg mem_mouse_rssi_signal_buf
+	store 2,mem_rssi_signal_buf_ptr
+
+	jam 1,mem_24g_data_type
+	
+	fetch 2,mem_mouse_discovery_timeout
+	store 2,mem_discovery_timeout
+
+	fetch 2,mem_mouse_24g_pair_timeout_init
+	store 2,mem_24g_pair_timeout_init
+
+	fetch 1,mem_mouse_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout_init
+
+	fetch 5,mem_rssi_dis_min_24g_init
+	store 5,mem_rssi_dis_min_24g
+
+	fetch 1,mem_mouse_24g_pair_tx_power
+	store 1,mem_24g_pair_tx_power
+
+
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	nrtn blank
+
+	
+// mouse.dat no configuration parameters
+	setarg 0x020800					//enable poweron direct  & 24g
+	store 3,mem_mouse_flag			
+	setarg 0x800700					// adc led use mode led
+	istore 3,contw
+	setarg 0x0300
+	istore 2,contw
+ 
+	jam 1,mem_lpm_mode
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_ADC_ENABLE,pdata
+	call mouse_adc_read_enable,true
+
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_24G_250HZ_ENABLE,pdata
+	call mouse_24g_set_250Hz,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_SEARCH_DONGLE_ENABLE,pdata
+	call mouse_24g_search_dongle_enable,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_CLK_16M_ENABLE,pdata
+	call mouse_16M_enable,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_DPI_4_LEVEL_ENABLE,pdata
+	call mouse_dpi_4level_enable,true
+	fetch 1,mem_mouse_enable_flag
+	isolate1 MOUSE_KEYBOARD_ENABLE,pdata
+	call mouse_customer_key_enable,true
+	
+	fetch 1,mem_24g_ch_map_update
+	ncall g24_chamap_param_update,blank
+
+	call mouse_xtal_init
+
+	fetch 1,mem_mouse_global_setup
+	and pdata,0x07,temp
+	storet 1,mem_adc_channel
+	rshift3 pdata,pdata
+	and pdata,0x01,temp
+	storet 1,mem_24g_ch_map_update
+	rshift pdata,pdata
+	and pdata,0x03,temp
+	storet 1,mem_adc_config_flag_init
+	rshift2 pdata,pdata
+	and pdata,0x03,pdata
+	call mouse_24g_long_sleep_set
+
+	fetch 1,mem_mouse_global_setup1
+	and pdata,0x03,temp
+	storet 1,mem_sensor_angle_default
+	rshift2 pdata,pdata
+	and pdata,0x03,temp
+	storet 1,mem_sensor_angle_switch
+	rshift2 pdata,pdata
+	and pdata,0x01,temp
+	storet 1,mem_config_sensor_dpi
+	storet 1,mem_mouse_dpi
+	rshift pdata,pdata
+	and pdata,0x01,temp
+	storet 1,mem_24g_disable_fec1
+	rshift pdata,pdata
+	and pdata,0x03,pdata
+	store 1,mem_device_number
+
+	bpatch patch18_2,mem_patch18
+	setarg 0x0b0c0a
+	store 3,mem_lbutton_gpio
+	setarg 0xffffff
+	istore 3,contw
+	setarg 0x0607ff			// clk-07  sdio--06
+	istore 3,contw
+	setarg 0xffffff
+	istore 3,contw
+
+	
+/* adc*/
+	jam 0x0a,mem_adc_read_time_init
+	setarg 0x0064
+	store 2,mem_adc_low_volatage_led_blink_timer
+	call mouse_adc_vol_init	
+/****/
+	setarg 0x1770
+	store 2,mem_mouse_no_data_timeout				// 10min
+	jam 0x14,mem_mouse_device_poweron_timer_count_init	// 2s
+	setarg 0x0190
+	store 2,mem_mouse_low_v_led_blink_time			// 200ms on,200ms off
+	store 2,mem_mouse_dpi_led_blink_time
+	setarg 0x03e8
+	store 2,mem_mouse_disconvey_led_blink_time
+	jam 0x07,mem_rssi_buff_index
+	jam 125,mem_power_ctrl_pac_succ_cnt_init
+	jam TX_POWER_0DB,mem_tx_power
+
+	jam 0x01,mem_24g_fast_conn_enable
+	setarg 0x0f0f
+	store 2,mem_24g_fast_conn_addr
+	store 2,mem_24g_fast_conn_addr+2
+	
+//ble
+	fetch 2,mem_lap
+	store 2,mem_lap+4
+
+	arg mem_le_lap,contw
+	arg mem_lap,contr
+	arg 0x06,loopcnt
+	call reverse_byte
+	
+	jam 0x20,mem_lpm_mult_init
+	jam 0x34,mem_device1_type
+	fetch 6,mem_le_lap
+	store 6,mem_device1_locall_addr
+	jam 0x02,mem_mouse_bluetooth_type
+
+	jam 0x1f,mem_le_adv_data_len
+	
+	setarg 0x050102
+	store 3,mem_le_adv_data
+	setarg 0x120303
+	istore 3,contw
+	setarg 0x190318
+	istore 3,contw
+	setarg 0x03c2
+	istore 2,contw
+
+	setarg 0x06ff06
+	store 3,mem_le_adv_swift_pair
+	setarg 0x000300
+	istore 3,contw
+	setarg 0x090c80
+	istore 3,contw
+
+	setarg 0x355442		// BT5.2 Mouse
+	istore 3,contw
+	setarg 0x20322e
+	istore 3,contw
+	setarg 0x756f4d
+	istore 3,contw
+	setarg 0x6573
+	istore 2,contw
+
+	jam 0x1f,mem_le_scan_data_len
+	arg mem_le_adv_swift_pair+7,contr
+	arg mem_le_scan_data,contw
+	arg 13,loopcnt
+	call memcpy
+
+	fetch 1,mem_le_scan_data
+	increase -1,pdata
+	store 1,mem_le_name_len
+
+	arg mem_le_scan_data+2,contr
+	arg mem_le_name_len+1,contw
+	arg 11,loopcnt
+	call memcpy
+
+	setarg 0x070007
+	store 3,mem_le_interval_min
+	setarg 0x002000
+	istore 3,contw
+	setarg 0x012c
+	istore 2,contw
+
+	setarg 0x181203
+	store 3,mem_le_adv_ind
+
+	setarg 0x0000ff
+	store 3,mem_le_adv_direct_ind
+
+	setsect 0,0xfb
+	setsect 1,0x2c212
+	setsect 2,0x800f
+	setsect 3,0x21
+	store 8,mem_local_rx_max_octets
+
+	jam 0x07,mem_le_adv_channel_map
+
+	setarg 0x0015
+	store 2,mem_le_keyboard_handle
+	setarg 0x0019
+	store 2,mem_le_notify_handle
+	setarg 0x001d
+	store 2,mem_le_multimedia_handle
+	setarg 0x0021
+	store 2,mem_le_systemctrl_handle
+	setarg 0x0030
+	store 2,mem_le_battery_level_handle
+	setarg 0x0022
+	store 2,mem_le_pairing_handle
+
+	jam 0x96,mem_le_battery_level_updata_timer_init
+
+// 24g
+	jam MODE_24G_DEVICE,mem_device_flag
+	call g24_enable_1M
+	call g24_pair_param_init
+	
+	setarg 0x604800
+	store 3,mem_24g_enter_hibernate
+	setarg 0x012c
+	store 2,mem_24g_long_sleep_param_update_timer_init
+	setarg 0x0050
+	store 2,mem_24g_transmit_by_interrupt_exit_count_init
+	setarg 0x05
+	store 2,mem_mouse_24g_power_on_fast_conn_timer	// 200ms
+	setarg 0x0708									//search dongle 3min
+	store 2,mem_mouse_24g_search_dongle_time_init
+
+	
+// sensor
+	setarg 0x010403
+	store 3,mem_mouse_dpi_seting
+	setarg 0x2a2002
+	istore 3,contw
+	setarg 0x22153f
+	istore 3,contw
+	setarg 0x114433
+	istore 3,contw
+
+	setarg 0x265a09
+	store 3,mem_sensor_3212_init
+	setarg 0x041934
+	istore 3,contw
+	setarg 0x0009
+	istore 2,contw
+	setarg 0xffff
+	istore 2,contw
+
+	setarg 0x0d5a09
+	store 3,mem_sensor_3205_init
+	setarg 0xed1d10
+	istore 3,contw
+	setarg 0x807d
+	istore 2,contw
+	setarg 0xffff
+	istore 2,contw
+
+	setarg 0xff5a09
+	store 3,mem_sensor_8650_init
+	setarg 0x40ab27
+	istore 3,contw
+	setarg 0x9b56b3
+	istore 3,contw
+	setarg 0x12a8e6
+	istore 3,contw
+	setarg 0xbec0a9
+	istore 3,contw
+	setarg 0xafa5e6
+	istore 3,contw
+	setarg 0xa121a0
+	istore 3,contw
+	setarg 0x10b802
+	istore 3,contw
+	setarg 0xa70bb9
+	istore 3,contw
+	setarg 0xd0b5ff
+	istore 3,contw
+	setarg 0xff00b6
+	istore 3,contw
+	setarg 0x000900
+	istore 3,contw
+	setarg 0xffff
+	istore 2,contw
+
+	setarg 0x0d5a09
+	store 3,mem_sensor_ka8ul_init
+	setarg 0xc50e10
+	istore 3,contw
+	setarg 0x109a5b
+	istore 3,contw
+	setarg 0x421138
+	istore 3,contw
+	setarg 0x412828
+	istore 3,contw
+	setarg 0x394923
+	istore 3,contw
+	setarg 0x4bb04a
+	istore 3,contw
+	setarg 0x904ca0
+	istore 3,contw
+	setarg 0x09704d
+	istore 3,contw
+	setarg 0xffff00
+	istore 3,contw
+
+	setarg 0x46a509
+	store 3,mem_sensor_ka8g2_init
+	setarg 0x101934
+	istore 3,contw
+	setarg 0x690760
+	istore 3,contw
+	setarg 0x207d04
+	istore 3,contw
+	setarg 0x09007e
+	istore 3,contw
+	setarg 0x220d00
+	istore 3,contw
+	setarg 0xff220e
+	istore 3,contw
+	jam 0xff,mem_sensor_ka8g2_init+21
+		
+	setarg 0x0b5a09
+	store 3,mem_sensor_poweron_init
+	setarg 0x0009f3
+	istore 3,contw
+	setarg 0xffff
+	istore 2,contw
+
+	//sys init
+	branch app_sys_param_init
+	
+
+mouse_param_init:
+	setarg MOUSE_BT_SDP_ADDR				//bt sdp start address
+	store 2,mem_ui_uuid_table
+	setarg MOUSE_BLE_ATT_LIST_ADDR				//ble attlist start address
+	store 2,mem_ui_le_uuid_table
+	setarg 0x2580
+	store 3,mem_class
+	jam 3,mem_lpm_mult_timeout
+	jam 8,mem_lpm_overhead
+	jam DPI_BUTTON_STATE_UP,mem_select_device_button_statue
+	jam PB_BUTTON_STATE_UP,mem_select_device_button_statue
+	jam COMMBINATION_KEY_STATE_UP,mem_commbination_key_statue	
+	setarg 0x0200
+	store 2,mem_lpm_interval
+	jam 0x17,mem_le_local_mtu
+	jam 0x17,mem_le_remote_mtu
+//===========init spi param==============================
+	setarg 0x0a77
+	store 2,mem_spi_init_clk
+//===========all 16bit uuid==================================
+	setsect 0,0x306
+	setsect 1,0x4440
+	setsect 2,0x10000
+	setsect 3,0x4408
+	store 9,mem_all_uuid_16bits
+	setsect 0,0x1224
+	setsect 1,0x4000
+	setsect 2,0x0
+	istore 5,contw
+//===========features=====================================
+	setsect 0,0x3ffff
+	setsect 1,0x2fe23
+	setsect 2,0x199d9
+	setsect 3,0x20d
+	store 8,mem_features
+//======================================================	
+	setarg mem_le_tx_buffer0_omemalloc
+	store 2,mem_ble_l2cap_tx_buff0_ptr
+	setarg MOUSE_BLE_L2CAP_TXBUFF_SIZE
+	store 2,mem_ble_l2cap_tx_buff_size_ptr
+	
+	call mouse_device_led_all_off
+	call mouse_device_poweron_timer_init
+	call mouse_adc_gpio_mux_init
+
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_BT_125Hz,mouse_param_init_intervl_end
+	jam CLASSIC_INTERVAL_7_5MS,mem_sniff_param_interval
+	setarg LE_INTERVAL_7_5MS
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+mouse_param_init_intervl_end:
+	call g24_interval_param_8ms
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G_250Hz,mouse_24g_short_sleep_set_end
+	call g24_interval_param_4ms
+mouse_24g_short_sleep_set_end:
+	fetch 1,mem_device_flag
+	store 1,mem_device_flag_temp
+	fetch 3,mem_le_lap+3
+	store 3,mem_mouse_le_lap_temp
+	fetch 1,mem_adc_config_flag_init
+	and pdata,0xfe,pdata		// hvin = vinlpm
+	store 1,mem_adc_config_flag_init
+	store 1,mem_adc_config_flag
+	setarg 0
+	store 7,mem_mouse_key
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_bt_discovery_count
+	store 1,mem_select_device_count
+	call le_modified_name
+	branch mouse_sensor_set_angle
+
+
+mouse_start_work:
+	bpatch patch18_3,mem_patch18
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING, mouse_24g_first_start_auto_pair_mode
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_start_mode
+	call mouse_wakeup_from_power_check	// wake from hibernate :enble user
+	nbranch mouse_buletooth_fast_conn_init,user
+mouse_start_reconnect_device:
+	bpatch patch18_4,mem_patch18
+	arg mem_device1_type,rega
+	fetch 1,mem_device_flag
+	increase -1,pdata
+	mul32 pdata,29,pdata
+	iadd rega,rega
+	ifetch 1,rega
+	store 1,mem_xrecord_mode
+mouse_start_reconnect:	
+	fetch 1,mem_xrecord_mode
+	beq REC_3_MODE,mouse3_0_check_reconn_target
+	beq REC_4_MODE,mouse4_0_check_reconn_target
+	branch mouse_start_discovery
+
+
+mouse_wakeup_from_power_check:
+	bpatch patch18_5,mem_patch18
+	disable user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_WAKEUP_FROM_POWER,mouse_wakeup_from_power
+	fetch 1,mem_wakup_from_power_flag
+	bbit0 BIT_POWER_ON,mouse_wakeup_from_power
+	enable user		// mouse power on
+mouse_wakeup_from_power:
+	fetch 1,mem_reconn_times_init
+	store 1,mem_reconn_times
+	rtn
+
+
+mouse3_0_check_reconn_target:
+	fetcht 2,mem_mouse_fast_page_to
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse3_0_check_reconn_target_next
+	fetcht 2,mem_mouse_page_to
+mouse3_0_check_reconn_target_next:	
+	storet 2,mem_page_to
+	fetch 6,mem_hci_plap
+	branch app_bt_start_discovery_short,blank
+	jam 0x17,mem_app_connection_options  //ssp
+	fetch 1,mem_ssp_enable
+	nbranch app_bt_start_reconnect,blank
+	jam 0x04,mem_app_connection_options  //no ssp
+	branch app_bt_start_reconnect
+	
+mouse4_0_check_reconn_target:
+	jam 1,mem_mouse_le_reconnect_flag
+	fetcht 1,mem_mouse_fast_direct_timeout
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse4_0_check_reconn_target_next
+	fetcht 1,mem_mouse_direct_timeout
+mouse4_0_check_reconn_target_next:	
+	storet 1,mem_mouse_direct_timer
+	call app_lpm_mult_disable
+	fetch 3,mem_le_adv_direct_ind
+	store 3,mem_le_adv_data+4
+	call mouse_le_check_adv_flag
+	setarg ADV_FLAG_BREDR_NOT_SUPPORTED
+	istore 1,contr
+	arg mem_le_scan_data,contr
+	call mouse_le_adv_data_update
+	branch check_51cmd_adv
+
+
+/*****************system clk***********************************/
+mouse_lpm_check_wake_lock:
+	bmark1 mark_24g,app_get_lpm_wake_lock
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	branch app_get_lpm_wake_lock,blank
+	fetch 1,mem_mouse_le_conn_param_reject
+	beq LE_LPM_DISABLE,app_get_lpm_wake_lock
+	fetch 2,mem_sdp_remote_cid
+	nbranch app_get_lpm_wake_lock,blank
+	fetch 1,mem_mouse_wheel_trigger
+	nbranch app_get_lpm_wake_lock,blank
+	branch app_put_lpm_wake_lock
+
+mouse_delay_enter_hibernata:
+	fetch 1,mem_mouse_direct_timeout
+	store 1,mem_mouse_bluetooth_reconnect_timeout
+	rtn
+
+
+mouse_app_enter_hibernate:
+	bpatch patch18_6,mem_patch18
+	call mouse_sensor_reset
+	call mouse_sensor_powerdown
+	branch app_enter_hibernate
+
+	
+mouse_before_hibernate:
+	bpatch patch18_7,mem_patch18
+	fetch 4,core_lpm_ctrl
+	set1 26,pdata
+	store 4,core_lpm_reg
+	call lpm_write_ctrl
+	call disable_authrom
+	call mouse_device_led_all_off
+	call mouse_before_hibernate_wheel_gpio_set
+	call mouse_setgpio_hibernate
+	call mouse_flash_power_down
+	fetcht 1,mem_sensor_motion_gpio
+	branch gpio_clr_wake
+
+
+mouse_setgpio_hibernate:
+	bpatch patch19_0,mem_patch19
+	call mouse_set_sdio_high
+	call clear_wake
+	call mouse_lpm_before_common
+	call mouse_gpio_pu_idle
+	fetcht 1,mem_mouse_reuse_2ice_gpio
+	call mouse_gpio_config_input_pu
+	branch mouse_gpio_set_high_impedance
+
+//set all unused gpio to pull up mode to save power	
+mouse_gpio_pu_idle:
+	arg core_gpio_conf,contr
+	arg 19,loopcnt
+mouse_gpio_pu_idle_loop:
+	ifetch 1,contr
+	nbranch mouse_gpio_pu_idle_configured,blank
+	setarg 0x40
+	add contr,-1,contw
+	istore 1,contw
+mouse_gpio_pu_idle_configured:
+	loop mouse_gpio_pu_idle_loop
+	rtn
+	
+mouse_process_lpm_before:
+	rtnmark1 mark_24g
+	call mouse_lpm_before_common
+	fetch 1,mem_lpm_current_mult
+	nrtn blank					// 7.5ms, no gpio wakeup
+	branch gpio_clr_wake
+
+mouse_lpm_before_common:
+	bpatch patch19_1,mem_patch19
+	
+	call mouse_wheel_check
+	fetch 1,mem_mouse_sensor_sclk_gpio		//set sdio high
+ 	arg gpcfg_output_high,temp
+ 	call gpio_config_function_int	
+	call twspi_disable
+	
+	fetcht 1,mem_lbutton_gpio
+	call gpio_set_wake
+	fetcht 1,mem_rbutton_gpio
+	call gpio_set_wake
+	fetcht 1,mem_mbutton_gpio
+	call gpio_set_wake
+
+	fetcht 1,mem_bk_button_gpio
+	call gpio_set_wake
+	fetcht 1,mem_fw_button_gpio
+	call gpio_set_wake
+	fetcht 1,mem_dpi_button_gpio
+	call gpio_set_wake
+	fetcht 1,mem_config_select_device_button_gpio
+	call gpio_set_wake
+
+	fetcht 1,mem_customer_key_gpio
+	call gpio_set_wake
+	
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_ta_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_tb_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_sensor_motion_gpio
+	branch gpio_set_wake
+
+
+//short mult: no key 
+mouse_set_mult:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,mouse_set_ble_mult
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_CONNECTED,mouse_set_bt_mult
+	rtn
+mouse_set_ble_mult:
+	copy rega,pdata
+	nbranch le_set_config_short_mult,blank
+	branch le_clr_config_short_mult
+mouse_set_bt_mult:
+	copy rega,pdata
+	nbranch classic_bt_set_mult_short_flag,blank
+	branch classic_bt_clr_mult_short_flag
+
+/*****************system clk***********************************/
+	
+	
+/****************************adc**************************************/	
+mouse_adc_gpio_set:
+	fetch 1,mem_adc_config_flag
+	rtnne ADC_CONFIG_GPIO
+mouse_adc_gpio_check_output:
+	bpatch patch19_2,mem_patch19
+	fetcht 1,mem_adc_channel
+	sub temp,3,null
+	branch mouse_adc_gpio_4_7_set,positive
+	increase 5,temp
+	storet 1,mem_adc_channel_gpio
+mouse_adc_gpio_set_next:
+	copy temp,rega
+	call gpio_get_config
+	beq gpcfg_output_high,mouse_set_24g_led_statue
+	call mouse_clear_24g_led_statue
+	copy rega,temp
+	branch gpio_set_high_impedance
+
+mouse_adc_gpio_4_7_set:
+	increase 4,temp
+	storet 1,mem_adc_channel_gpio
+	branch mouse_adc_gpio_set_next
+
+mouse_adc_vol_init:
+	fetch 1,mem_adc_config_flag_init
+	beq ADC_CONFIG_GPIO,mouse_adc_gpio_vol_init
+	beq ADC_CONFIG_VINLPM,mouse_adc_gpio_vinlpm_init
+	jam ADC_CONFIG_VINLPM,mem_adc_config_flag_init
+	setarg 0x2c0172		// 0x0172--3.7V  0x012c--3.0V  0x0140--3.2V  0x014a--3.3V
+	store 3,mem_mouse_vdd_full_vol
+	setarg 0x014001
+	istore 3,contw
+	rtn
+mouse_adc_gpio_vol_init:	
+	setarg 0x5d0099		// 0x0099--1.5V   0x005d--0.9V  0x0068--1.0V  0x0071--1.1V
+	store 3,mem_mouse_vdd_full_vol
+	setarg 0x007100
+	istore 3,contw
+	rtn
+mouse_adc_gpio_vinlpm_init:
+	setarg 0xc8012c		// 0x012c--3.0V  0x00c8--2.0V  0x00dc--2.2V
+	store 3,mem_mouse_vdd_full_vol
+	setarg 0x00dc00
+	istore 3,contw
+	rtn
+	
+
+
+mouse_adc_gpio_mux_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_ADC
+	jam MOUSE_ADC_CHECK_MULTIPLE,mem_adc_mux_status
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+	rtnbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC
+	jam MOUSE_ADC_CHECK_BATTERY_ONLY,mem_adc_mux_status
+	rtn
+
+mouse_adc_read_interval:	
+	fetch 1,mem_adc_read_timer
+	increase 1,pdata
+	store 1,mem_adc_read_timer
+	fetcht 1,mem_adc_read_time_init	//1s read adc
+	isub temp,null
+	rtn
+
+
+mouse_adc_read:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_ADC
+	call mouse_adc_gpio_set
+	fetch 1,mem_adc_mux_status
+	branch mouse_adc_read_battery,blank
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_GPIO,mouse_adc_read_gpio_mux_start	// gpio + dpi/switch
+	jam MOUSE_ADC_CHECK_VINLPM_MULTIPLE,mem_adc_mux_status
+	call mouse_adc_read_interval					// vinlpm + dpi/switch
+	branch  mouse_adc_read_gpio, positive
+	call mouse_adc_read_vinlpm
+	branch mouse_adc_read_start
+
+mouse_adc_read_gpio_mux_start:
+	jam MOUSE_ADC_CHECK_GPIO_MULTIPLE,mem_adc_mux_status
+	branch mouse_adc_read_start
+
+mouse_adc_read_gpio:
+	call mouse_adc_gpio_check_output
+	jam ADC_CONFIG_GPIO,mem_adc_config_flag
+	fetch 1,mem_24g_device_led_status
+	ncall mouse_adc_read_vinlpm,blank
+	branch mouse_adc_read_start
+	
+mouse_adc_read_vinlpm:
+	jam 0,mem_adc_read_timer
+	fetch 1,mem_adc_config_flag_init
+	store 1,mem_adc_config_flag
+	rtn	
+	
+mouse_adc_read_battery:		// only get battery
+	fetch 1,mem_adc_config_flag
+	bne ADC_CONFIG_GPIO,mouse_adc_read_battery_start
+	fetch 1,mem_24g_device_led_status
+	nrtn blank
+mouse_adc_read_battery_start:
+	call mouse_adc_read_interval
+	nrtn positive
+mouse_adc_read_start:
+	bpatch patch19_3,mem_patch19
+	fetch 1,mem_24g_device_led_status
+	nrtn blank
+	jam 0,mem_adc_read_timer
+	call enable_adc
+	call vdd_calculate_by_mode
+	store 2,mem_mouse_vdd_now_vol
+	fetch 1,mem_adc_config_flag
+	bne ADC_CONFIG_GPIO, mouse_adc_data_process
+	fetcht 2,mem_mouse_vdd_now_vol	// BAT= 1.5V, R = 200k, a = a*1.8
+	mul32 temp,8,pdata
+	div pdata,10
+	call get_div_result
+	iadd temp,pdata
+	store 2,mem_mouse_vdd_now_vol
+mouse_adc_data_process:	
+	arg mem_mouse_vdd_calculate_set,rega
+	call mouse_adc_bat_percent_lowpower_out
+	fetch 1,mem_adc_power_flag
+	bbit1 2,mouse_adc_button_press
+	bbit1 1,mouse_power_down
+	bbit0 0,mouse_adc_no_low_voltage
+	jam 1,mem_mouse_adc_last_low_voltage_flag
+	branch mouse_adc_low_voltage
+	
+mouse_adc_low_voltage:
+	arg MOUSE_LOW_VOLTAGE_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_adc_no_low_voltage:
+	arg MOUSE_LOW_VOLTAGE_FLAG,queue
+	call mouse_disable_function_flag
+	jam 12,mem_adc_low_volatage_led_timer_count
+	fetch 1,mem_mouse_adc_last_low_voltage_flag
+	rtn blank
+	jam 0,mem_mouse_adc_last_low_voltage_flag
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	branch mouse_led_off
+
+
+
+mouse_adc_bat_percent_lowpower_out:
+	bpatch patch19_4,mem_patch19
+	ifetch 8,rega
+	store 8,mem_pdatatemp
+	fetch 1,mem_adc_mux_status
+	beq MOUSE_ADC_CHECK_BATTERY_ONLY,mouse_adc_bat_percent_lowpower_out_battery
+	beq MOUSE_ADC_CHECK_GPIO_MULTIPLE,mouse_adc_bat_percent_lowpower_out_gpio_multiple
+	beq MOUSE_ADC_CHECK_VINLPM_MULTIPLE,mouse_adc_bat_percent_lowpower_out_vinlpm_multiple
+mouse_adc_bat_percent_lowpower_out_gpio_multiple:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC,mouse_adc_bat_percent_lowpower_out_gpio_switch
+	fetch 2,mem_pdatatemp+6		               	//now voltage
+	fetcht 2,mem_mouse_vdd_button_press_vol	// button press check
+	isub temp,null
+	nbranch mouse_adc_set_button_press_flag,positive
+	
+mouse_adc_bat_percent_lowpower_out_gpio_switch:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC,mouse_adc_bat_percent_lowpower_out_battery
+	jam 0,mem_mouse_adc_button_press_flag
+	fetch 2,mem_pdatatemp+6				    	        //now voltage	
+	fetcht 2,mem_mouse_vdd_switch_gnd_24g_vol	// switch mode check
+	isub temp,null
+	nbranch mouse_select_24gdevice,positive
+	call mouse_select_btdevice
+	branch mouse_adc_bat_percent_lowpower_out_battery
+
+mouse_select_24gdevice:
+	call mouse_check_select_24gdevice
+	branch mouse_adc_bat_percent_lowpower_out_battery
+
+
+mouse_adc_bat_percent_lowpower_out_battery:	
+	call mouse_adc_clear_button_press_flag
+	call adc_clear_no_power_flag
+	call adc_clear_low_power_flag
+	fetch 2,mem_pdatatemp+6
+	fetcht 2,mem_pdatatemp+2	        //shutdown voltage
+	isub temp,null
+	ncall adc_set_no_power_flag,positive
+
+	fetcht 2,mem_pdatatemp+4		//low voltage
+	isub temp,null
+	ncall adc_set_low_power_flag,positive
+
+mouse_adc_bat_level_set:
+	fetch 2,mem_pdatatemp+6		//now voltage	
+	fetcht 2,mem_pdatatemp		//full voltage
+	isub temp,null
+	branch mouse_adc_bat_level_100_percent,positive		// now >= full
+	fetcht 2,mem_pdatatemp+2	        //shutdown voltage
+	isub temp,pdata
+	nbranch mouse_adc_bat_level_0_percent,positive		// now < shutdown
+	branch mouse_adc_bat_level_0_percent,blank			// now = shutdown
+	mul32 pdata,100,rega								// (now - shutdown)*100 /(full - shutdown)
+	fetch 2,mem_pdatatemp
+	fetcht 2,mem_pdatatemp+2
+	isub temp,temp
+	copy rega,pdata
+	idiv temp
+	call get_div_result
+	store 1,mem_le_battery_level_percentage
+	rtn
+
+mouse_adc_bat_level_100_percent:
+	jam 100,mem_le_battery_level_percentage
+	rtn
+mouse_adc_bat_level_0_percent:	
+	jam 0,mem_le_battery_level_percentage
+	rtn
+
+	
+mouse_adc_bat_percent_lowpower_out_vinlpm_multiple:
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_GPIO,mouse_adc_bat_percent_lowpower_out_gpio_multiple
+	branch mouse_adc_bat_percent_lowpower_out_battery
+	
+
+mouse_adc_set_button_press_flag:
+	fetcht 1,mem_adc_power_flag
+	set1 2,temp
+	storet 1,mem_adc_power_flag
+	rtn	
+
+mouse_adc_clear_button_press_flag:
+	fetcht 1,mem_adc_power_flag
+	set0 2,temp
+	storet 1,mem_adc_power_flag
+	rtn		
+
+mouse_adc_button_press:
+	jam 1,mem_mouse_adc_button_press_flag
+	rtn
+
+mouse_power_down:
+	call mouse_device_led_all_off
+	branch mouse_app_enter_hibernate
+	
+/****************************adc**************************************/	
+
+/****************************gpio******************************************/
+mouse_gpio_init:
+	fetcht 1,mem_eeprom_wp_gpio
+	call gpio_config_output
+	call usb_offline_check_init
+	fetcht 1,mem_lbutton_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_rbutton_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_mbutton_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_bk_button_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_fw_button_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_dpi_button_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_matrix_public_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_customer_key_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_whee_a_data_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_whee_b_data_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_whee_ta_data_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_whee_tb_data_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_sensor_motion_gpio
+	call mouse_gpio_config_input_pu
+
+	fetcht 1,mem_device_switch_gpio
+	call mouse_gpio_config_input_pu
+	
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_config_device_24g_led_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_config_device_bt1_led_gpio
+	call gpio_config_output
+	
+	fetcht 1,mem_config_device_bt2_led_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_dpi_led_gpio
+	call gpio_config_output
+
+	fetcht 1,mem_select_sensor_angle_gpio
+	branch mouse_gpio_config_input_pu
+
+
+mouse_gpio_set_pupd_by_input:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	and temp,0x7f,queue
+	fetch 4,core_gpio_in
+	qisolate1 pdata
+	branch mouse_gpio_config_input_pu,true
+	branch mouse_gpio_config_input_pd
+
+	
+mouse_gpio_config_input_pd:
+	set1 gpio_active_bit,temp
+	branch gpio_config_input
+
+mouse_gpio_config_input_pu:
+	set0 gpio_active_bit,temp
+	branch gpio_config_input
+
+mouse_gpio_set_high_impedance:
+	fetch 3,mem_mouse_set_high_impedance_bit_set
+	store 3,mem_pdatatemp
+	arg 20,loopcnt
+	arg 0,temp
+mouse_gpio_set_high_impedance_bit_loop:	
+	fetch 3,mem_pdatatemp
+	isolate1 0,pdata
+	call gpio_set_high_impedance,true
+	fetch 3,mem_pdatatemp
+	lshift pdata,pdata
+	store 3,mem_pdatatemp
+	increase 1,temp
+	loop mouse_gpio_set_high_impedance_bit_loop
+	rtn
+
+
+
+/****************************gpio******************************************/
+
+/*******************spi*****************************/
+mouse_sensor_spi_init:
+	call mouse_spid_init_pin
+	jam 0x73,mem_spi_init_clk
+//	jam 0x1e,mem_spi_init_delay_time
+	call mouse_spi_init
+	branch twspi_enable
+	
+mouse_spi_write_flash_cb:
+mouse_spi_init:
+	branch spid_init
+	
+mouse_spid_init_pin:
+	fetch 1,mem_mouse_sensor_sclk_gpio
+ 	arg gpcfg_spid_sck,temp
+ 	call gpio_config_function_int
+ 	fetch 1,mem_mouse_sensor_sdio_gpio
+ 	arg gpcfg_spid_sdio,temp
+ 	branch gpio_config_function_int
+
+
+/*******************spi*****************************/
+
+
+
+
+mouse_motion:
+	bpatch patch19_5,mem_patch19
+	disable user
+	setarg 0
+	store 6,mem_mouse_x
+	call mouse_check_sensor_data
+	call mouse_zwheel
+	call mouse_t_zwheel
+	call mouse_key
+	fetch 1,mem_mouse_key
+	and_into 0x1f,pdata
+	store 1,mem_mouse_key
+	nbranch mouse_drawing_optima_init,user
+	call mouse_drawing_optima
+	branch mouse_no_data_timer_init
+
+	
+
+/*******************wheel*************************/
+mouse_zwheel:
+	fetch 1,mem_mouse_z_data
+	rtn blank	
+	store 1,mem_mouse_z
+	jam 0,mem_mouse_z_data
+	branch enable_user
+	
+mouse_t_zwheel:
+	fetch 1,mem_mouse_tz_data
+	rtn blank	
+	store 1,mem_mouse_tz
+	jam 0,mem_mouse_tz_data
+	branch enable_user
+
+mouse_wheel_check:
+	call mouse_t_wheel_scan
+	call mouse_wheel_scan
+	fetch 1,mem_wheel_tb_new_pinlevel
+	fetcht 1,mem_wheel_tb_old_pinlevel
+	store 1,mem_wheel_tb_old_pinlevel
+	isub temp,null
+	nbranch app_lpm_wake_auto_lock,zero
+	fetch 1,mem_mwheel_b_new_pinlevel
+	fetcht 1,mem_mwheel_b_old_pinlevel
+	store 1,mem_mwheel_b_old_pinlevel
+	isub temp,null
+	nbranch app_lpm_wake_auto_lock,zero
+	rtn
+mouse_t_wheel_scan:
+	fetch 1,mem_whee_ta_data_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	fetcht 1,mem_whee_ta_data_gpio
+	call gpio_get_bit
+	setflag true,0,rega
+	fetcht 1,mem_whee_tb_data_gpio
+	call gpio_get_bit
+	setflag true,1,rega
+	copy rega,pdata
+	store 1,mem_wheel_tb_new_pinlevel
+	beq 0x01,mouse_t_wheel_scan_judge1
+	beq 0x02,mouse_t_wheel_scan_judge2
+	fetch 1,mem_wheel_tog
+	bbit1 7,mouse_t_wheel_scan_judge3
+	rtn
+
+mouse_t_wheel_scan_judge1:
+	fetch 1,mem_wheel_tb_old_pinlevel
+	beq 0,mouse_t_wheel_scan_judge11
+	beq 3,mouse_t_wheel_scan_judge12
+	rtn
+mouse_t_wheel_scan_judge2:
+	fetch 1,mem_wheel_tb_old_pinlevel
+	beq 0,mouse_t_wheel_scan_judge21
+	beq 3,mouse_t_wheel_scan_judge22
+	rtn
+mouse_t_wheel_scan_judge11:
+	jam 0x82,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge12:
+	jam 0x81,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge21:
+	jam 0x80,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge22:
+	jam 0x83,mem_wheel_tog
+	rtn
+mouse_t_wheel_scan_judge3:
+	fetch 1,mem_wheel_tog
+	set0 7,pdata
+	store 1,mem_wheel_tog
+	beq 0,mouse_t_wheel_scan_judge30
+	beq 1,mouse_t_wheel_scan_judge31
+	beq 2,mouse_t_wheel_scan_judge32
+	beq 3,mouse_t_wheel_scan_judge33
+	rtn
+mouse_t_wheel_scan_judge30:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 3,mouse_wheel_t_forward
+	rtn
+mouse_t_wheel_scan_judge31:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 0,mouse_wheel_t_forward
+	rtn
+mouse_t_wheel_scan_judge32:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 3,mouse_wheel_t_back
+	rtn
+mouse_t_wheel_scan_judge33:
+	fetch 1,mem_wheel_tb_new_pinlevel
+	beq 0,mouse_wheel_t_back
+	rtn
+mouse_wheel_t_forward:
+	fetch 1,mem_mouse_tz_data
+	increase 1,pdata
+	store 1,mem_mouse_tz_data
+	rtn
+mouse_wheel_t_back:
+	fetch 1,mem_mouse_tz_data
+	increase -1,pdata
+	store 1,mem_mouse_tz_data
+	rtn
+
+
+mouse_wheel_scan:
+	fetch 1,mem_whee_a_data_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_get_bit
+	setflag true,0,rega
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_get_bit
+	setflag true,1,rega
+	copy rega,pdata
+	store 1,mem_mwheel_b_new_pinlevel
+	beq 0x01,mouse_wheel_scan_judge1
+	beq 0x02,mouse_wheel_scan_judge2
+	fetch 1,mem_mwheel_tog
+	bbit1 7,mouse_wheel_scan_judge3
+	rtn
+
+mouse_wheel_scan_judge1:
+	fetch 1,mem_mwheel_b_old_pinlevel
+	beq 0,mouse_wheel_scan_judge11
+	beq 3,mouse_wheel_scan_judge12
+	rtn
+mouse_wheel_scan_judge2:
+	fetch 1,mem_mwheel_b_old_pinlevel
+	beq 0,mouse_wheel_scan_judge21
+	beq 3,mouse_wheel_scan_judge22
+	rtn
+mouse_wheel_scan_judge11:
+	jam 0x82,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge12:
+	jam 0x81,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge21:
+	jam 0x80,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge22:
+	jam 0x83,mem_mwheel_tog
+	rtn
+mouse_wheel_scan_judge3:
+	fetch 1,mem_mwheel_tog
+	set0 7,pdata
+	store 1,mem_mwheel_tog
+	beq 0,mouse_wheel_scan_judge30
+	beq 1,mouse_wheel_scan_judge31
+	beq 2,mouse_wheel_scan_judge32
+	beq 3,mouse_wheel_scan_judge33
+	rtn
+mouse_wheel_scan_judge30:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 3,mouse_wheel_forward
+	rtn
+mouse_wheel_scan_judge31:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 0,mouse_wheel_forward
+	rtn
+mouse_wheel_scan_judge32:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 3,mouse_wheel_back
+	rtn
+mouse_wheel_scan_judge33:
+	fetch 1,mem_mwheel_b_new_pinlevel
+	beq 0,mouse_wheel_back
+	rtn
+mouse_wheel_forward:
+	fetch 1,mem_mouse_z_data
+	increase 1,pdata
+	store 1,mem_mouse_z_data
+	rtn
+mouse_wheel_back:
+	fetch 1,mem_mouse_z_data
+	increase -1,pdata
+	store 1,mem_mouse_z_data
+	rtn
+
+
+mouse_wheel_gpio_set_wake:
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_ta_data_gpio
+	call gpio_set_wake_by_current_state
+	fetcht 1,mem_whee_tb_data_gpio
+	branch gpio_set_wake_by_current_state
+	
+mouse_before_hibernate_wheel_gpio_set:
+	fetcht 1,mem_whee_a_data_gpio
+	call mouse_gpio_set_pupd_by_input
+	fetcht 1,mem_whee_b_data_gpio
+	call mouse_gpio_set_pupd_by_input
+	fetcht 1,mem_whee_ta_data_gpio
+	call mouse_gpio_set_pupd_by_input
+	fetcht 1,mem_whee_tb_data_gpio
+	branch mouse_gpio_set_pupd_by_input
+
+mouse_wheel_trigger:
+	fetch 2,mem_mouse_z
+	rtn blank
+	jam 1,mem_mouse_wheel_trigger
+	jam 10,mem_mouse_wheel_trigger_timer
+	rtn
+
+mouse_wheel_trigger_timer:
+	arg mem_mouse_wheel_trigger_timer,regc
+	arg mouse_wheel_trigger_disable,regb
+	branch timer_single_step
+mouse_wheel_trigger_disable:
+	jam 0,mem_mouse_wheel_trigger
+	rtn
+
+
+/*
+mouse_set_qdecoder_x:
+	arg MOUSE_DEFAULT_XA_GPIO,temp
+	call mouse_gpio_config_input_pu
+	arg MOUSE_DEFAULT_XA_GPIO,temp
+	call gpio_get_bit
+	rtn true
+	fetch 1,core_qdec_cntx
+	set1 4,pdata
+	store 1,core_qdec_cntx
+	rtn
+*/	
+	
+/*******************wheel*************************/
+
+
+
+/********************dpi******************************/
+mouse_dpi_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC,mouse_dpi_check_connect_adc
+	fetch 1,mem_dpi_button_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	jam MOUSE_DPI_KEY,mem_mouse_key_temp
+	fetcht 1,mem_dpi_button_gpio
+	call mouse_dpi_key_check
+mouse_dpi_check_next:
+	store 1,mem_mouse_dpikey_press_status
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_dpi_check_end
+	call mouse_matrix_public_gpio_reset
+mouse_dpi_check_exit:	
+	copy rega,pdata
+	bbit1 MOUSE_DPI_KEY,mouse_dpi_down
+	branch mouse_dpi_up
+
+mouse_dpi_check_connect_adc:
+	fetch 1,mem_mouse_adc_button_press_flag
+	branch mouse_dpi_up,blank
+	branch mouse_dpi_down
+	
+mouse_dpi_key_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_GND,mouse_dpi_key_connect_gnd
+	fetch 1,mem_mouse_dpikey_press_status
+	copy pdata,regc
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_check
+mouse_dpi_key_check_next:
+	fetch 1,mem_mouse_ghost_flag
+	nbranch mouse_dpi_check_end,blank
+	branch mouse_dpi_key_connect_matrix	
+
+mouse_3io6key_dpi_check_end:
+	fetcht 1,mem_dpi_button_gpio
+	call mouse_gpio_config_input_pu
+	branch mouse_dpi_check_exit
+
+mouse_dpi_check_end:
+	jam DPI_BUTTON_STATE_UP,mem_mouse_dpi_button_state
+	jam 0,mem_mouse_dpikey_press_status
+	rtn
+
+mouse_dpi_key_connect_gnd:
+	fetch 1,mem_mouse_dpikey_press_status
+	branch mouse_check_key_connect_gnd
+
+mouse_dpi_key_connect_matrix:
+	call gpio_get_bit
+	fetcht 1,mem_matrix_public_gpio
+	branch mouse_dpi_key_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_dpi_button_gpio
+	fetch 1,mem_mouse_dpikey_press_status
+	branch mouse_check_key_connect_gnd
+
+
+mouse_dpi_down:
+	fetch 1,mem_mouse_dpi_button_state
+	rtneq DPI_BUTTON_STATE_DOWN
+	jam DPI_BUTTON_STATE_DOWN,mem_mouse_dpi_button_state
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY
+	branch mouse_dpi_process
+
+mouse_dpi_up:
+	fetch 1,mem_mouse_dpi_button_state
+	rtneq DPI_BUTTON_STATE_UP
+	jam DPI_BUTTON_STATE_UP,mem_mouse_dpi_button_state
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON,mouse_dpi_up_next
+	bbit1 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY,mouse_dpi_up_next
+	rtn
+mouse_dpi_up_next:	
+	fetch 1,mem_mouse_dpi_long_press_flag
+	nbranch mouse_dpi_up_after_long_press,blank
+	fetch 1,mem_select_device_count
+	ncall mouse_dpi_process,blank
+mouse_dpi_up_after_long_press:	
+	jam 0,mem_mouse_dpi_long_press_flag
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_select_device_count	
+	store 1,mem_bt_discovery_count	
+	rtn
+	
+mouse_dpi_process:	
+	bpatch patch19_6,mem_patch19
+	call mouse_dpi_ghost_check
+	rtn user
+	fetch 1,mem_mouse_dpi
+	increase 1,pdata
+	and pdata,0x03,pdata
+	store 1,mem_mouse_dpi
+	call mouse_seting_dpi
+	branch mouse_store_device_info_delay
+
+mouse_dpi_ghost_check:
+	disable user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_GND
+	rtnbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+	fetch 1,mem_mouse_lkey_press_status
+	rtn blank
+	fetch 1,mem_mouse_rkey_press_status
+	rtn blank
+	enable user
+	rtn
+	
+
+mouse_dpi_key_check_long_press:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON,mouse_select_device_by_dpi_button
+	bbit1 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY,mouse_discovery_by_dpi_button
+	rtn
+
+
+mouse_select_device_by_dpi_button:
+	fetch 1,mem_mouse_dpi_button_state
+	rtnne DPI_BUTTON_STATE_DOWN	
+	arg mem_select_device_count,regc
+	arg mouse_ready_reconnection_by_dpi_button,regb
+	branch timer_single_step
+
+mouse_ready_reconnection_by_dpi_button:
+	jam 1,mem_mouse_dpi_long_press_flag
+	branch mouse_ready_reconnection_by_button
+
+mouse_discovery_by_dpi_button:
+	fetch 1,mem_mouse_dpi_button_state
+	rtnne DPI_BUTTON_STATE_DOWN	
+	arg mem_bt_discovery_count,regc
+	arg mouse_long_dpi_button_bt_discovery,regb
+	branch timer_single_step
+
+mouse_long_dpi_button_bt_discovery:
+	jam 1,mem_mouse_dpi_long_press_flag
+	branch mouse_long_button_bt_discovery
+
+
+
+mouse_dpi_config:
+	branch mouse_seting_sensor_type
+
+
+mouse_setting_dpi_4_level:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_DPI_LEVEL_4
+	fetch 1,mem_mouse_dpi
+	rtnne MOUSE_DPI_LEVEL4
+	jam MOUSE_DPI_LEVEL1,mem_mouse_dpi
+	rtn
+	
+
+mouse_seting_dpi:
+	bpatch patch19_7,mem_patch19
+	call mouse_setting_dpi_4_level
+	call mouse_dpi_led_blink_delay
+mouse_seting_sensor_type:
+	fetch 1,mem_config_sensor_type
+	beq P3212,mouse_seting_3212_dpi
+	beq KA8G2,mouse_seting_ka8g2_dpi
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,mouse_set_cpi0		//1200
+	beq MOUSE_DPI_LEVEL2,mouse_set_cpi1		//1600
+	beq MOUSE_DPI_LEVEL3,mouse_set_cpi2		//800
+	beq MOUSE_DPI_LEVEL4,mouse_set_cpi3		//1000
+mouse_set_cpi1:	//320x+8009
+	fetcht 1,mem_320x_dpi_1
+	branch mouse_dpi_store
+mouse_set_cpi0:
+	fetcht 1,mem_320x_dpi_0
+	branch mouse_dpi_store
+mouse_set_cpi2:
+	fetcht 1,mem_320x_dpi_2
+	branch mouse_dpi_store
+mouse_set_cpi3:
+	fetcht 1,mem_320x_dpi_3
+	branch mouse_dpi_store
+
+mouse_dpi_store:
+	fetch 1,mem_config_sensor_type
+	beq P3065_XY,mouse_3065xy_set_dpi
+	beq MX8650,mouse_3065xy_set_dpi
+	beq KA8,mouse_ka8_set_dpi
+	beq P6520,mouse_ka8_set_dpi
+	beq P8009,mouse_3065xy_set_dpi
+mouse_dpi_write:		// 3205  1  2  3  4
+	storet 1,mem_mouse_cpi_count
+	setarg MOUSE_DPI_ADDRESS
+	call twspi_read
+	and pdata,0xf8,temp
+	fetch 1,mem_mouse_cpi_count
+	iadd temp,pdata
+	lshift8 pdata,pdata
+	add pdata,MOUSE_DPI_ADDRESS,pdata
+	branch twspi_write
+
+mouse_3065xy_set_dpi:	// 0 1 2 3
+	increase -1,temp
+	branch mouse_dpi_write
+
+mouse_ka8_set_dpi:	// 3 4 5 6
+	increase 2,temp
+	branch mouse_dpi_write
+
+mouse_seting_3212_dpi:
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,mouse_set_p3212_cpi0	//1200
+	beq MOUSE_DPI_LEVEL2,mouse_set_p3212_cpi1	//1600
+	beq MOUSE_DPI_LEVEL3,mouse_set_p3212_cpi2	//2400
+	beq MOUSE_DPI_LEVEL4,mouse_set_p3212_cpi3	//800
+mouse_set_p3212_cpi1:
+	fetch 1,mem_3212_dpi_1
+	branch mouse_p3212_dpi
+mouse_set_p3212_cpi0:
+	fetch 1,mem_3212_dpi_0
+	branch mouse_p3212_dpi
+mouse_set_p3212_cpi2:
+	fetch 1,mem_3212_dpi_2
+	branch mouse_p3212_dpi
+mouse_set_p3212_cpi3:
+	fetch 1,mem_3212_dpi_3
+mouse_p3212_dpi:
+	store 1,mem_mouse_cpi_count
+	lshift8 pdata,pdata
+	copy pdata,rega
+	add pdata,MOUSE_P3212_DPI_XADDRESS,pdata
+  	call twspi_write
+ 	copy rega,pdata
+  	add pdata,MOUSE_P3212_DPI_YADDRESS,pdata
+	branch twspi_write
+
+mouse_seting_ka8g2_dpi:
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,mouse_set_pka8g2_cpi0		//1600
+	beq MOUSE_DPI_LEVEL2,mouse_set_pka8g2_cpi1		//2400
+	beq MOUSE_DPI_LEVEL3,mouse_set_pka8g2_cpi2		//3200
+	beq MOUSE_DPI_LEVEL4,mouse_set_pka8g2_cpi3		//800
+mouse_set_pka8g2_cpi1:
+	fetch 1,mem_ka8g2_dpi_1
+	branch mouse_p3212_dpi
+
+mouse_set_pka8g2_cpi0:
+	fetch 1,mem_ka8g2_dpi_0
+	branch mouse_p3212_dpi
+	
+mouse_set_pka8g2_cpi2:
+	fetch 1,mem_ka8g2_dpi_2
+	branch mouse_p3212_dpi
+
+mouse_set_pka8g2_cpi3:
+	fetch 1,mem_ka8g2_dpi_3
+	branch mouse_p3212_dpi
+
+		
+/********************dpi******************************/		
+
+
+/***********************key******************************/
+
+mouse_key:
+	call mouse_check_key_gpio
+	call mouse_ghost_key_check
+	call mouse_set_mult
+	call mouse_24g_key
+	copy rega,pdata
+	fetcht 1,mem_mouse_key_last
+	store 1,mem_mouse_key_last
+	store 1,mem_mouse_key
+	ixor temp,pdata
+	sub pdata,0,null
+	rtn zero
+	branch enable_user
+
+mouse_24g_key:
+	rtnmark0 mark_24g
+	copy rega,pdata
+	rtn blank
+	store 1,mem_mouse_key
+	branch enable_user
+
+mouse_ghost_key_check:
+	jam 0,mem_mouse_matrix_key_cow_count
+	jam 0,mem_mouse_matrix_key_row_count
+	jam 0,mem_mouse_ghost_flag
+	copy pdata,temp
+	call mouse_ghost_key_check_L_BK
+	call mouse_ghost_key_check_M_FW
+	call mouse_ghost_key_check_BK_FW
+	call mouse_ghost_key_check_LMR
+	fetch 1,mem_mouse_matrix_key_row_count
+	rtn blank
+	fetch 1,mem_mouse_matrix_key_cow_count
+	rtn blank
+	jam 1,mem_mouse_ghost_flag
+	fetch 1,mem_mouse_key_last		// matrix have ghost key
+	copy pdata,rega
+	rtn
+
+mouse_ghost_key_check_L_BK:
+	and temp,MOUSE_L_BK_BUTTON,pdata
+	beq MOUSE_L_BK_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+mouse_ghost_key_check_M_FW:
+	and temp,MOUSE_M_FW_BUTTON,pdata
+	beq MOUSE_M_FW_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+mouse_ghost_key_check_BK_FW:
+	and temp,MOUSE_BK_FW_BUTTON,pdata
+	beq MOUSE_BK_FW_BUTTON,mouse_matrix_row_more_than_one_key
+	rtn	
+
+mouse_ghost_key_check_LMR:
+	and temp,MOUSE_LMR_BUTTON,pdata	// key LMR press
+	beq MOUSE_LR_BUTTON,mouse_matrix_row_more_than_one_key
+	beq MOUSE_LM_BUTTON,mouse_matrix_row_more_than_one_key
+	beq MOUSE_RM_BUTTON,mouse_matrix_row_more_than_one_key
+	beq MOUSE_LMR_BUTTON,mouse_matrix_row_more_than_one_key
+	rtn
+
+
+mouse_matrix_row_more_than_one_key:
+	jam 1,mem_mouse_matrix_key_row_count
+	rtn
+
+mouse_matrix_cow_more_than_one_key:
+	jam 1,mem_mouse_matrix_key_cow_count
+	rtn
+
+mouse_key_check_once:
+	call mouse_check_key_gpio_once
+	call mouse_check_key_gpio
+	setarg 0x00
+	store 3,mem_mouse_lkey_press_status
+	rtn
+	
+mouse_check_key_gpio:
+	bpatch patch1a_0,mem_patch1a
+	fetch 1,mem_sensor_shutdown_flag
+	ncall mouse_check_key_gpio_once,blank
+	arg 0,rega
+	call mouse_check_lkey_gpio
+	call mouse_check_rkey_gpio
+	call mouse_check_mkey_gpio
+	call mouse_check_bkkey_gpio
+	call mouse_check_fwkey_gpio
+mouse_check_key_gpio_next:
+	call mouse_check_customerkey_gpio
+	copy rega,pdata
+	rtn
+
+mouse_check_key_gpio_once:
+	setarg 0x030303
+	store 3,mem_mouse_lkey_press_status
+	rtn
+
+mouse_check_lkey_gpio:
+	jam MOUSE_L_KEY,mem_mouse_key_temp
+	fetcht 1,mem_lbutton_gpio
+	fetch 1,mem_mouse_lkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_lkey_press_status
+	rtn
+
+mouse_check_rkey_gpio:
+	jam MOUSE_R_KEY,mem_mouse_key_temp
+	fetcht 1,mem_rbutton_gpio
+	fetch 1,mem_mouse_rkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_rkey_press_status
+	rtn
+	
+mouse_check_mkey_gpio:
+	jam MOUSE_M_KEY,mem_mouse_key_temp
+	fetcht 1,mem_mbutton_gpio
+	fetch 1,mem_mouse_mkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_mkey_press_status
+	rtn
+
+mouse_check_bkkey_gpio:
+	fetch 1,mem_bk_button_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_BK_KEY,mem_mouse_key_temp
+	fetch 1,mem_mouse_bkkey_press_status
+	copy pdata,regc
+	fetcht 1,mem_bk_button_gpio
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_bk_check
+mouse_check_bkkey_gpio_next:
+	call gpio_get_bit
+	branch mouse_check_bk_button_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_bk_button_gpio
+	fetch 1,mem_mouse_bkkey_press_status
+	call mouse_check_key_connect_gnd
+mouse_check_bkkey_gpio_end:	
+	store 1,mem_mouse_bkkey_press_status
+	branch mouse_matrix_public_gpio_reset
+
+mouse_check_bk_button_connect_gnd:
+	fetcht 1,mem_matrix_public_gpio
+	fetch 1,mem_mouse_bkkey_press_status
+	call mouse_check_key_connect_gnd
+	branch mouse_check_bkkey_gpio_end
+
+mouse_3io6key_bk_check:
+	call mouse_3io6key_check
+	store 1,mem_mouse_bkkey_press_status
+	fetcht 1,mem_bk_button_gpio
+	branch mouse_gpio_config_input_pu
+
+
+mouse_check_fwkey_gpio:
+	fetch 1,mem_fw_button_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_FW_KEY,mem_mouse_key_temp
+	fetch 1,mem_mouse_fwkey_press_status
+	copy pdata,regc
+	fetcht 1,mem_fw_button_gpio
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_fw_check
+mouse_check_fwkey_gpio_next:
+	call gpio_get_bit
+	branch mouse_check_fw_button_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_fw_button_gpio
+	fetch 1,mem_mouse_fwkey_press_status
+	call mouse_check_key_connect_gnd
+mouse_check_fwkey_gpio_end:	
+	store 1,mem_mouse_fwkey_press_status
+	branch mouse_matrix_public_gpio_reset
+
+mouse_check_fw_button_connect_gnd:
+	fetcht 1,mem_matrix_public_gpio
+	fetch 1,mem_mouse_fwkey_press_status
+	call mouse_check_key_connect_gnd
+	branch mouse_check_fwkey_gpio_end	
+
+mouse_3io6key_fw_check:
+	call mouse_3io6key_check
+	store 1,mem_mouse_fwkey_press_status
+	fetcht 1,mem_fw_button_gpio
+	branch mouse_gpio_config_input_pu
+
+
+mouse_matrix_public_gpio_reset:	
+	fetcht 1,mem_matrix_public_gpio
+	branch mouse_gpio_config_input_pu
+
+mouse_check_customerkey_gpio:
+	jam 0,mem_customer_key
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_KEYBOARD
+	fetch 1,mem_customer_key_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_CUSTOMER_KEY,mem_mouse_key_temp
+	fetcht 1,mem_customer_key_gpio
+	fetch 1,mem_mouse_customerkey_press_status
+	call mouse_check_key_connect_gnd
+	store 1,mem_mouse_customerkey_press_status
+	copy rega,pdata
+	bbit1 MOUSE_CUSTOMER_KEY,mouse_customerkey_press
+	call mouse_customerkey_release
+mouse_check_customerkey_gpio_exit:
+	fetch 1,mem_customer_data_trigger
+	store 1,mem_customer_data_trigger_last
+	rtn
+
+
+mouse_customerkey_press:
+	jam 1,mem_customer_data_trigger
+	call mouse_customer_key_need_send
+	branch mouse_check_customerkey_gpio_exit
+
+mouse_customerkey_release:
+	jam 0,mem_customer_data_trigger
+	fetch 1,mem_customer_data_trigger_last
+	rtn blank
+mouse_customer_key_need_send:	
+	jam 1,mem_customer_key
+	rtn	
+
+
+mouse_check_matrix_button_connect_gnd:	
+	call gpio_get_bit
+	fetcht 1,mem_mouse_key_temp
+	copy temp,queue	
+	branch  mouse_key_press,true
+	branch mouse_key_release
+
+mouse_check_key_connect_gnd:	
+	lshift pdata,pdata
+	copy pdata,regb
+	call gpio_get_bit
+	setflag true,0,regb
+	and regb,0x07,pdata
+	fetcht 1,mem_mouse_key_temp
+	copy temp,queue
+	beq 0x07,mouse_key_press		//  about 17~22ms three times
+	beq 0x00,mouse_key_release
+	rtn
+
+mouse_key_release:
+	qset0 rega
+	rtn		
+
+mouse_key_press:
+	qset1 rega
+	rtn
+
+mouse_3io6key_check:
+	bpatch patch1a_1,mem_patch1a
+	copy regc,pdata
+	store 1,mem_mouse_key_status
+	lshift pdata,pdata
+	copy pdata,regb
+	copy temp,regc
+	call mouse_gpio_config_input_pd
+	copy regc,temp
+	call gpio_get_bit
+	nsetflag true,0,regb
+	call mouse_check_press
+	branch mouse_check_key_connect_gnd+4
+
+mouse_check_press:
+	fetcht 1,mem_mouse_key_status
+	and_into 0x01,temp
+	and regb,0x01,pdata
+	isub temp,null
+	nbranch mouse_current_mult_update,zero
+	rtn
+	
+/*************************key***************************************/
+
+/**********************sensor******************************/	
+mouse_init_sunt:
+	bpatch patch1a_2,mem_patch1a
+	call mouse_sensor_spi_init
+	rtn wake
+mouse_init_sensor_wakeup:	
+	call mouse_sensor_poweron
+mouse_init_sensor:
+	call mouse_read_sensor_id
+	beq P32XX_ID1,mouse_init_p32xx_id2_judge
+	beq P3065_ID1,mouse_init_p3065
+	beq PKA8G2_ID1,mouse_ka8g2_id2_judge
+	call mouse_twspi_reset
+	nop 6900
+	branch mouse_init_sensor
+mouse_twspi_reset:
+	fetch 1,mem_mouse_sensor_sclk_gpio
+	call twspi_reset 
+	branch mouse_spid_init_pin
+
+mouse_read_sensor_id:
+	setarg PAN_REG_PID_H
+	call twspi_read
+	store 1,mem_sensor_id2
+	setarg PAN_REG_PID_L
+	call twspi_read
+	store 1,mem_sensor_id1
+	rtn
+
+	
+
+mouse_init_p32xx_id2_judge:
+	fetch 1,mem_sensor_id2
+	beq P_MX8650,mouse_mx8650_init_param
+	beq P8009_ID2,mouse_8009_init_param
+	beq P3205_TJ3T_ID2,mouse_3205_3t_init_param
+	beq P3204_TJ3L_ID2,mouse_3204_3l_init_param
+	beq P3212_ID2,mouse_3212_init_param
+	beq PKA8_ID2,mouse_ka8_init_param_check
+	beq P6520A_ID2,mouse_p6520_init_param
+	branch mouse_init_sensor
+	
+mouse_mx8650_init_param:
+	jam MX8650,mem_config_sensor_type
+	call mouse_sensor_reset
+	call delay_10ms
+	arg mem_sensor_8650_init,regc
+	call mouse_sensor_wr_seq
+	branch mouse_dpi_config
+
+mouse_8009_init_param:
+	setarg 0x16
+	call twspi_read
+	sub pdata,0xbd,null 
+	nbranch mouse_init_sunt,zero
+	setarg 0x19
+	call twspi_read
+	sub pdata,0x55,null 
+	nbranch mouse_init_sunt,zero
+	setarg 0x1b
+	call twspi_read
+	sub pdata,0x1d,null 
+	nbranch mouse_init_sunt,zero
+	jam P8009,mem_config_sensor_type
+	arg mem_sensor_8009_init,regc
+	branch mouse_sensor_wr_seq
+
+mouse_3205_3t_init_param:
+	jam P3205,mem_config_sensor_type
+	arg mem_sensor_3205_init,regc
+	call mouse_sensor_wr_seq
+	arg mem_sensor_32xx_init,regc
+	call mouse_sensor_wr_seq
+	setarg 0x0943
+	call twspi_write
+	arg mem_sensor_32xx_init_1,regc
+	branch mouse_sensor_wr_seq	
+
+mouse_3204_3l_init_param:
+	jam P3204,mem_config_sensor_type
+	arg mem_sensor_3204_init,regc
+	call mouse_sensor_wr_seq
+	arg mem_sensor_32xx_init,regc
+	call mouse_sensor_wr_seq
+	arg mem_sensor_32xx_init_1,regc
+	branch mouse_sensor_wr_seq	
+
+mouse_3212_init_param:
+	jam P3212,mem_config_sensor_type
+	arg mem_sensor_3212_init,regc
+	branch mouse_sensor_wr_seq
+
+mouse_ka8_init_param_check:	
+	call mouse_sensor_disable_wp
+	setarg 0x9a5b
+	call twspi_write
+	setarg 0x0d
+	call twspi_read
+	sub pdata,0x12,null
+	branch mouse_ka8ul_init_param,zero
+	sub pdata,0x0a,null
+	nbranch mouse_ka8hd_sensor_judge,zero
+	setarg 0x0e
+	call twspi_read
+	sub pdata,0xe5,null
+	nbranch mouse_init_sensor,zero
+	setarg 0x10
+	call twspi_read
+	sub pdata,0xa5,null
+	branch mouse_ka8ul_init_param,zero
+	call mouse_enable_ka8_sensor_wp
+mouse_ka8_init_param:
+	jam KA8,mem_config_sensor_type	
+	rtn
+mouse_ka8ul_init_param:
+	jam KA8_UL,mem_config_sensor_type	
+	arg mem_sensor_ka8ul_init,regc
+	branch mouse_sensor_wr_seq
+mouse_ka8hd_sensor_judge:
+	sub pdata,0x10,null
+	nbranch mouse_init_sensor,zero
+	setarg 0x0e
+	call twspi_read
+	sub pdata,0xc5,null
+	nbranch mouse_init_sensor,zero
+	setarg 0x10
+	call twspi_read
+	sub pdata,0x38,null
+	nbranch mouse_init_sensor,zero
+mouse_ka8hd_init_param:
+	call mouse_enable_ka8_sensor_wp
+	jam KA8_HD,mem_config_sensor_type
+	rtn
+mouse_enable_ka8_sensor_wp:
+	setarg 0x005b
+	call twspi_write
+	branch mouse_sensor_enable_wp
+	
+mouse_p6520_init_param:
+	jam P6520,mem_config_sensor_type
+	arg mem_sensor_p6520_init,regc
+	branch mouse_sensor_wr_seq
+	
+mouse_init_p3065:
+	call mouse_sensor_poweron
+	fetch 1,mem_sensor_id2
+	beq P3065_XY_ID2,mouse_p3065xy_init_param
+	beq P3065_ID2,mouse_p3065_init_param
+	branch mouse_init_sensor
+	
+mouse_p3065_init_param:	
+	jam P3065,mem_config_sensor_type
+	rtn
+
+mouse_p3065xy_init_param:
+	jam P3065_XY,mem_config_sensor_type
+	rtn
+	
+mouse_ka8g2_id2_judge:
+	call mouse_sensor_poweron
+	fetch 1,mem_sensor_id2
+	beq PKA8G2_ID2,mouse_ka8g2_init_param
+	branch mouse_init_p32xx_id2_judge
+mouse_ka8g2_init_param:
+	jam KA8G2,mem_config_sensor_type
+	arg mem_sensor_ka8g2_init,regc
+	branch mouse_sensor_wr_seq
+	
+mouse_sensor_enable_wp:
+	setarg 0x0009
+	branch twspi_write
+mouse_sensor_disable_wp:
+	setarg 0x5a09
+	branch twspi_write
+
+mouse_sensor_wr_seq:
+	ifetch 2,regc
+	arg 0xffff,temp
+	isub temp,null
+	rtn zero
+	call twspi_write
+	increase 2,regc
+	branch mouse_sensor_wr_seq
+
+mouse_sensor_reset:
+	setarg 0x8006		// reset to factory settings
+mouse_sensor_reset_end:
+	call twspi_write
+	nop 12000
+	rtn
+	
+mouse_sensor_poweron:
+	bpatch patch1a_3,mem_patch1a
+	call mouse_sensor_spi_init
+mouse_sensor_poweron_next:
+	call mouse_sensor_reset
+	arg mem_sensor_poweron_init,regc
+mouse_sensor_poweron_end:
+	call mouse_sensor_wr_seq
+	branch mouse_dpi_config
+
+mouse_sensor_powerdown:
+	call mouse_init_sunt
+	call mouse_sensor_spi_init
+mouse_sensor_powerdown_end:
+	setarg 0x0806
+	branch twspi_write
+/*********sensor init*************/	
+
+
+
+/*********sensor motion*************/
+mouse_check_sensor_data:
+	fetch 1,mem_spi_write_flash_sm
+	rtnne FLASH_SM_NO_BUYS
+	fetch 1,mem_config_sensor_type
+	beq P3205,mouse_p32xx_sensor_motion
+	beq P3065,mouse_p32xx_sensor_motion
+	beq KA8,mouse_p32xx_sensor_motion
+	beq P3204,mouse_p32xx_sensor_motion
+	beq P3212,mouse_p3212_sensor_motion
+	beq P3065_xy,mouse_p32xx_sensor_motion
+	beq P8009,mouse_p8009_sensor_motion	
+	beq KA8G2,mouse_pka8g2_sensor_motion
+	branch mouse_p32xx_sensor_motion
+
+
+mouse_p32xx_sensor_motion:
+	call mouse_clear_sensor_data
+	disable user
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,mouse_p32xx_sensor_motion_2
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+mouse_p32xx_sensor_motion_2:
+	setarg PAN_REG_PID_L
+	call twspi_read
+	bne P32XX_ID1,mouse_p3065_judge   
+mouse_p32xx_sensor_motion_1:
+	setarg PAN_REG_MOTION_STAUS
+	call twspi_read
+	rtnbit0 7
+	call mouse_read_sensor_common
+	fetch 1,mem_mouse_x
+	call mouse_data_extsign
+	store 2,mem_mouse_x
+	fetch 1,mem_mouse_y
+	call mouse_data_extsign
+	store 2,mem_mouse_y
+mouse_set_sensor_angle:
+	fetch 1,mem_config_sensor_angle
+	beq MOUSE_6CLK_ANGLE,mouse_motion32xx_6clk_direction_selection
+	beq MOUSE_9CLK_ANGLE,mouse_motion32xx_9clk_direction_selection
+	beq MOUSE_12CLK_ANGLE,mouse_motion32xx_12clk_direction_selection
+	beq MOUSE_3CLK_ANGLE,mouse_motion32xx_3clk_direction_selection
+	rtn
+
+mouse_p3065_judge:
+	beq P3065_ID1,mouse_p32xx_sensor_motion_1
+	branch mouse_twspi_reset
+	
+mouse_motion32xx_6clk_direction_selection:
+	call mouse_motion_6clk_direction_dispose
+	branch mouse_sensor_sdio_low
+mouse_motion32xx_9clk_direction_selection:
+	call mouse_motion_9clk_direction_dispose
+	branch mouse_sensor_sdio_low
+mouse_motion32xx_12clk_direction_selection:
+	call mouse_motion_12clk_direction_dispose
+	branch mouse_sensor_sdio_low
+mouse_motion32xx_3clk_direction_selection:
+	call mouse_motion_3clk_direction_dispose
+	branch mouse_sensor_sdio_low
+
+
+	
+mouse_p3212_sensor_motion:
+	call mouse_clear_sensor_data
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,mouse_p3212_sensor_motion_1
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+mouse_p3212_sensor_motion_1:	
+	setarg PAN_REG_PID_L
+	call twspi_read
+	bne P32XX_ID1,mouse_twspi_reset
+mouse_p3212_sensor_motion_2:
+	setarg PAN_REG_MOTION_STAUS
+	call twspi_read
+	rtnbit0 7
+	call mouse_read_sensor_common
+	call mouse_read_3212sensor_xy_high
+	store 1,mem_mouse_xy_h
+	rshift4 pdata,pdata
+	call mouse_data_extsign_bit3
+	store 1,mem_mouse_x+1
+	fetch 1,mem_mouse_xy_h
+	and pdata,0x0f,pdata
+	call mouse_data_extsign_bit3
+	store 1,mem_mouse_y+1
+	fetch 1,mem_config_sensor_angle
+	beq MOUSE_6CLK_ANGLE,mouse_motion_6clk_direction_dispose
+	beq MOUSE_9CLK_ANGLE,mouse_motion_9clk_direction_dispose
+	beq MOUSE_12CLK_ANGLE,mouse_motion_12clk_direction_dispose
+	beq MOUSE_3CLK_ANGLE,mouse_motion_3clk_direction_dispose
+	rtn
+
+mouse_read_3212sensor_xy_high:
+	setarg 0x12
+	branch twspi_read
+
+mouse_pka8g2_sensor_motion:
+	call mouse_clear_sensor_data
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,mouse_pka8g2_sensor_motion_1
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+mouse_pka8g2_sensor_motion_1:
+	branch mouse_p3212_sensor_motion_2
+
+
+mouse_p8009_sensor_motion:
+	call mouse_clear_sensor_data
+	disable user
+	setarg PAN_REG_MOTION_STAUS
+	call twspi_read
+	rtnbit0 7
+	setarg PAN_REG_OPRATION_STATE
+	call twspi_read
+	branch mouse_p32xx_sensor_motion_1+3,blank
+	setarg 0
+	store 6,mem_mouse_x
+	rtn
+
+
+
+mouse_sensor_set_angle:
+	fetch 1,mem_sensor_angle_default
+	store 1,mem_config_sensor_angle
+	fetch 1,mem_select_sensor_angle_gpio
+	rtneq GPIO_DISABLE
+	fetcht 1,mem_select_sensor_angle_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_select_sensor_angle_gpio
+	call gpio_get_bit
+	call mouse_sensor_switch_angle,true
+	branch mouse_gpio_config_input_pd
+mouse_sensor_switch_angle:
+	fetch 1,mem_sensor_angle_switch
+	store 1,mem_config_sensor_angle
+	rtn
+	
+mouse_motion_6clk_direction_dispose:
+	fetch 2,mem_mouse_x
+	sub pdata,0,pdata
+	store 2,mem_mouse_x
+	branch enable_user
+mouse_motion_12clk_direction_dispose:
+	fetch 2,mem_mouse_y
+	sub pdata,0,pdata
+	store 2,mem_mouse_y
+	branch enable_user
+mouse_motion_9clk_direction_dispose:
+	fetch 2,mem_mouse_y
+	sub pdata,0,pdata
+	store 2,mem_mouse_y
+	fetch 2,mem_mouse_x
+	sub pdata,0,pdata
+	store 2,mem_mouse_x
+	call mouse_sensor_data_swap_places
+	branch enable_user
+mouse_motion_3clk_direction_dispose:
+	call mouse_sensor_data_swap_places
+	branch enable_user
+
+mouse_sensor_data_swap_places:
+	fetch 2, mem_mouse_y
+	fetcht 2,mem_mouse_x
+	store 2,mem_mouse_x
+	storet 2,mem_mouse_y
+	rtn
+
+	
+mouse_clear_sensor_data:
+	fetch 1,mem_mouse_move_flag
+	call mouse_read_sensor_common,blank
+	jam 1,mem_mouse_move_flag
+	rtn
+
+mouse_clear_sensor_data_by_reset:
+	jam 1,mem_mouse_clear_sensor_data_flag
+	call le_set_config_more_data
+mouse_init_sensor_reset:
+	branch mouse_init_sunt
+
+mouse_data_xy_release:
+	fetch 1,mem_sensor_motion_gpio
+	rtnne GPIO_DISABLE
+	fetch 1,mem_mouse_long_mult_flag
+	rtnne 1
+	setarg 0
+	store 1,mem_mouse_long_mult_flag
+	store 4,mem_mouse_x
+	branch mouse_init_sensor_reset
+
+mouse_data_extsign:
+	rtnbit0 7
+	arg 0xff00,temp
+	ior temp,pdata
+	rtn
+
+mouse_data_extsign_bit3:
+	rtnbit0 3
+	arg 0xf0,temp
+	ior temp,pdata
+	rtn
+
+mouse_read_sensor_common:
+	arg PAN_REG_DELTA_X,pdata
+	call twspi_read
+	store 2,mem_mouse_x
+	arg PAN_REG_DELTA_Y,pdata
+	call twspi_read
+	store 2,mem_mouse_y
+	rtn
+
+	/* sdio high will cost extra 9mA */
+mouse_sensor_sdio_low:
+	fetcht 1,mem_mouse_sensor_sdio_gpio
+	call gpio_get_bit
+	rtn true
+	setarg 0x0a
+	call twspi_read
+	nop 1000
+	branch mouse_sensor_sdio_low
+
+mouse_set_sdio_high:		// make sdio high to make 100uA less
+	setarg 0x8100
+	branch twspi_write
+	
+/****************************sensor*************************/
+
+/*******************mouse fast connect******************/
+mouse_buletooth_fast_conn_init:
+	jam 0xff,mem_mouse_bluetooth_fast_conn_flag
+	fetch 1,mem_mouse_bluetooth_type
+	bbit1 MODE_4_MOUSE,mouse_ble_fast_conn_init
+	bbit1 MODE_3_MOUSE,mouse_bt_fast_conn_init
+mouse_ble_fast_conn_init:	
+	jam 0x34,mem_xrecord_mode
+	setarg 0x0f0f0f
+	store 3,mem_le_lap
+	store 3,mem_le_lap+3
+	branch mouse_start_reconnect
+
+mouse_bt_fast_conn_init:
+	jam 0x33,mem_xrecord_mode
+	arg mem_mouse_compare_addr_ff,contr
+	call mouse_load_bt_device
+	branch mouse_start_reconnect
+
+mouse_buletooth_fast_conn_end:
+	bpatch patch1a_4,mem_patch1a
+	call mouse_select_reconn_device
+	call mouse_bluetooth_fast_conn_disable
+	fetch 1,mem_device_flag
+	beq MODE_BT_DEVICE1,mouse_device1_check_auto_discover
+	beq MODE_BT_DEVICE2,mouse_device2_check_auto_discover
+	rtn
+mouse_device1_check_auto_discover:
+	fetch 6,mem_device1_addr
+	branch mouse_device_check_auto_discover
+mouse_device2_check_auto_discover:
+	fetch 6,mem_device2_addr
+mouse_device_check_auto_discover:	
+	fetcht 6,mem_mouse_compare_addr_ff
+	isub temp,null
+	branch mouse_start_discovery ,zero
+	branch mouse_start_reconnect_device
+
+mouse_bt_fast_conn_send_device_name:
+	call mouse_bluetooth_fast_conn_disable
+	fetch 1,mem_local_name_length
+	increase 3,pdata
+	copy pdata,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0x04a1		// report id = 4
+	istore 2,contw
+	fetch 1,mem_local_name_length
+	increase 1,pdata
+	copy pdata,loopcnt
+	arg mem_local_name_length,contr
+	branch memcpy
+
+mouse_bluetooth_fast_conn_disable:
+	jam 0x5a,mem_mouse_bluetooth_fast_conn_flag
+	rtn	
+/*******************mouse fast connect******************/
+
+mouse_stop_bluetooth_mode:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_RECONNECT,mouse_cancel_reconnect
+	bbit1 UI_STATE_BLE_CONNECTED,app_ble_disconnect
+	bbit1 UI_STATE_BT_CONNECTED,app_bt_disconnect
+	branch mouse_stop_discovery
+
+mouse_disconnect:
+	setarg 0
+	store 2,mem_mouse_no_data_timer
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,app_ble_disconnect
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_CONNECTED,app_bt_disconnect
+	rtn
+	
+mouse_cancel_reconnect:
+	call mouse_bt_cannel_reconn_enable
+	branch check_51cmd_bb_reconn_cancel
+
+mouse_check_125Hz:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_BT_125Hz
+mouse_bluetooth_125Hz:
+	nbranch mouse_bluetooth_125hz_clear,user
+	fetch 1,mem_bluetooth_125hz_cnt
+	increase 1,pdata
+	and_into 0x0f,pdata
+	store 1,mem_bluetooth_125hz_cnt
+	nrtn blank
+mouse_bluetooth_125hz_clear:
+	jam 0,mem_bluetooth_125hz_cnt
+	disable user
+	rtn
+
+
+mouse_current_mult_update:
+	fetch 1,mem_sensor_motion_gpio
+	rtnne GPIO_DISABLE
+	jam 0,mem_lpm_mult
+	jam 30,mem_mouse_current_mult_timer
+	rtn
+
+
+mouse_priority_bb_event:	
+	bpatch patch1a_5,mem_patch1a
+	copy regc,pdata
+	beq BT_EVT_LE_CONNECTED,mouse_le_bb_event_connected
+	beq BT_EVT_BB_CONNECTED,mouse_bb_event_connected
+	beq BT_EVT_LE_DISCONNECTED,mouse_le_bb_disconnected
+	beq BT_EVT_BB_DISCONNECTED,mouse_bb_disconnected
+	beq BT_EVT_SETUP_COMPLETE,mouse_bt_event_setup_complete
+	beq BT_EVT_BUTTON_LONG_PRESSED,mouse_bb_event_discovery_btn
+	beq BT_EVT_HID_HANDSHAKE,mouse_bt_hid_handshake
+	beq BT_EVT_HID_CONNECTED,app_hid_connected
+	beq BT_EVT_RECONN_FAILED,mouse_bb_event_reconn_failed
+	beq BT_EVT_RECONN_PAGE_TIMEOUT,mouse_bb_event_reconn_timeout
+	beq BT_EVT_SWITCH_NOT_ACCEPT,app_bt_role_switch	
+	beq BT_EVT_SWITCH_SUCCESS_MASTER,mouse_enter_sniff_check
+	beq BT_EVT_SNIFF_NOT_ACCEPT,mouse_sniff_not_accept
+	beq BT_EVT_PINCODE_REQ,mouse_bb_event_pincode
+	beq BT_EVT_REMOTE_UNSNIFF,app_start_auto_sniff
+	beq BT_EVT_LE_PAIRING_SUCCESS,mouse_le_pairing_success
+	beq BT_EVT_LE_ENC_INFO,mouse_le_enc_info
+	beq BT_EVT_LE_START_ENC,mouse_le_ll_start_encryt
+	beq BT_EVT_LE_PAIRING_COMPLETE,mouse_le_pairing_complete
+	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,mouse_le_conn_param_update_rsp_recieved
+	beq BT_EVT_VIRTUAL_CABLE_UNPLUG,mouse_irtual_cable_unplug
+	beq BT_EVT_24G_PAIRING_COMPLETE,mouse_24g_pairing_complete
+	beq BT_EVT_24G_ATTEMPT_FAIL,mouse_24g_attempt_fail
+	beq BT_EVT_24G_ATTEMPT_SUCCESS,mouse_24g_attempt_success
+	beq BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED,mouse_le_parse_conn_param_accepted
+	rtn
+
+/***************************le*************************/
+mouse_le_bb_event_connected:
+	jam 0,mem_mouse_long_mult_flag
+	call mouse_init_sensor_reset
+	jam 1,mem_mouse_le_bb_connected_flag
+	call mouse_24g_first_store_reconn_info
+	fetch 1,mem_mouse_le_reconnect_flag
+	nbranch mouse_le_bb_event_connected_next,blank
+	jam 0x14,mem_mouse_send_secutiry_request_timer
+mouse_le_bb_event_connected_next:
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	set0 APP_DISC_BY_BUTTON ,pdata
+	store APP_DISC_RSN_SIZE,mem_app_disconn_reason_flag
+	jam 0,mem_mouse_direct_timer
+	fetch 2,mem_le_battery_level_updata_timer_init
+	store 2,mem_le_battery_level_updata_timer
+	call mouse_no_data_timer_init
+	branch mouse_stop_discovery
+
+mouse_le_bb_disconnected:
+	jam 0,mem_mouse_le_bb_connected_flag
+	setarg LE_INTERVAL_7_5MS
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_BT_125Hz,mouse_le_bb_disconnected_next
+	setarg LE_INTERVAL_8_75MS
+mouse_le_bb_disconnected_next:	
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
+	jam 0,mem_mouse_clear_sensor_data_flag
+	call le_clr_config_more_data
+	branch mouse_bb_disconnected
+
+mouse_le_pairing_success:
+	arg LL_PAIRING_SUCCESS_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_le_enc_info:
+mouse_updata_le_param:
+	jam BT_CMD_LE_UPDATE_CONN,mem_fifo_temp
+	branch ui_ipc_send_cmd
+	
+mouse_le_ll_start_encryt:
+	fetch 1,mem_mouse_le_reconnect_flag
+	beq 1,mouse_le_ll_reconn_start_encryt
+	branch mouse_le_ll_enable_start_enc_flag
+mouse_le_ll_reconn_start_encryt:
+	call mouse_updata_le_param
+	jam 20,mem_le_start_encrypt_timer
+mouse_le_ll_enable_start_enc_flag:
+	arg LL_START_ENC_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_le_enable_connect_flag:
+	fetch 1,mem_le_connect_status_flag
+	qset1 pdata
+	store 1,mem_le_connect_status_flag
+	rtn
+
+mouse_le_pairing_complete:
+	branch app_ble_store_reconn_info
+
+mouse_le_conn_param_update_rsp_recieved:
+	fetch 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	rtneq BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
+	fetch 1,mem_le_tsniff
+	rshift2 pdata,pdata
+	sub pdata,LE_INTERVAL_15MS,null
+	rtn positive
+	setarg LE_INTERVAL_11_25MS
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+	call mouse_updata_le_param
+mouse_le_conn_param_lpm_disable:
+	jam LE_LPM_DISABLE,mem_mouse_le_conn_param_reject
+	rtn
+
+mouse_le_conn_param_lpm_enable:
+	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
+	rtn
+
+mouse_le_bb_event_connect_complete:
+	fetch 1,mem_mouse_le_reconnect_flag
+	nrtn blank
+	fetch 1,mem_le_att_handle
+	sub pdata,34,pdata
+	nrtn zero
+	jam 0,mem_le_start_encrypt_timer
+mouse_le_write_enable:	
+	arg WRITE_REQ_ENABLE_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_le_parse_conn_param_accepted:
+	fetch 1,mem_le_new_conninterval
+	sub pdata,LE_INTERVAL_15MS,null
+	nbranch mouse_le_conn_param_lpm_disable,positive
+	fetch 1,mem_le_new_connslavelatency
+	fetcht 1,mem_lpm_mult_init
+	isub temp,null
+	branch mouse_le_lpm_mult_reinit,positive
+	fetch 1,mem_le_new_connslavelatency
+	store 1,mem_lpm_mult
+	branch mouse_le_conn_param_lpm_enable
+mouse_le_lpm_mult_reinit:
+	fetch 1,mem_lpm_mult_init
+	store 1,mem_lpm_mult
+	branch mouse_le_conn_param_lpm_enable
+	
+/*
+mouse_le_disable_connect_flag:
+	fetch 1,mem_le_connect_status_flag
+	qset0 pdata
+	store 1,mem_le_connect_status_flag
+	rtn
+*/
+mouse_le_clean_connect_flag:
+	jam 0,mem_le_connect_status_flag
+	rtn
+
+/*
+mouse_le_reconn_write_enable_timer_reinit:
+	fetch 1,mem_mouse_le_reconnect_flag
+	rtn blank
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	rtneq 0x03
+	jam 2,mem_le_start_encrypt_timer
+	rtn
+*/
+mouse_le:
+	bpatch patch1a_6,mem_patch1a
+	call le_fifo_check_nearly_full
+	nrtn blank
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse_le_next
+	fetch 1,mem_le_connect_status_flag
+	and pdata,0x03,pdata
+	rtnne 0x03
+mouse_le_next:	
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	call mouse_clear_sensor_data_by_reset,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_24G_PAIRING_FLAG,mouse_le_send_empty_packet
+	bbit1 MOUSE_SELECT_DEVICE_FLAG,mouse_le_send_empty_packet
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,mouse_le_send_empty_packet
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,mouse_le_send_empty_packet
+	call mouse_motion
+	call mouse_check_125Hz
+	nrtn user
+	call mouse_current_mult_update
+	call mouse_data_xy_release
+	call mouse_wheel_trigger
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,mouse_le_send_mouse_data
+	fetch 1,mem_customer_key
+	beq 1,mouse_le_send_keyboard_package_data		
+mouse_le_send_mouse_data:
+	branch mouse_fill_mouse_data_le
+
+
+mouse_le_send_keyboard_package_data:
+	fetch 1,mem_customer_data_trigger
+	branch mouse_le_release_keyboard_data,blank
+	fetch 8,mem_customer_key_press+1
+mouse_fill_keyboard_package_data_le:
+	store 8,mem_pdatatemp
+	fetch 1,mem_customer_key_press
+	beq KB_MULTIKEY_REPORT_ID,mouse_fill_multimedia_key_data_le
+	beq KB_SYSTEM_CONCTRL_REPORT_ID,mouse_fill_systemctrl_key_data_le
+	jam 8,mem_le_data_len
+	fetcht 2,mem_le_keyboard_handle
+	branch mouse_fill_data_le
+	
+
+mouse_le_release_keyboard_data:
+	fetch 8,mem_customer_key_release+1
+	branch mouse_fill_keyboard_package_data_le
+
+mouse_fill_multimedia_key_data_le:
+	jam 3,mem_le_data_len
+	fetcht 2,mem_le_multimedia_handle
+	branch mouse_fill_data_le
+
+mouse_fill_systemctrl_key_data_le:
+	jam 2,mem_le_data_len
+	fetcht 2,mem_le_systemctrl_handle
+	branch mouse_fill_data_le
+
+mouse_fill_battery_level_le:
+	arg 1,rega
+	fetcht 2,mem_le_battery_level_handle
+	call le_att_malloc_tx_notify
+	fetch 1,mem_le_battery_level_percentage
+	istore 1,contw
+	rtn
+
+
+mouse_le_send_empty_packet:
+	setarg 0
+	store 7,mem_mouse_key
+mouse_fill_mouse_data_le:
+	jam 7,mem_le_data_len
+	fetch 7,mem_mouse_key
+	store 7,mem_pdatatemp
+	fetcht 2,mem_le_notify_handle
+	branch mouse_fill_data_le
+
+mouse_fill_data_le:
+	fetch 1,mem_le_data_len
+	copy pdata,rega
+	call le_att_malloc_tx_notify
+	fetcht 1,mem_le_data_len
+	copy temp,loopcnt
+	arg mem_pdatatemp,contr
+	branch memcpy	
+
+mouse_check_51cmd_adv:
+	jam 0,mem_mouse_le_reconnect_flag
+	fetch 3,mem_le_adv_ind
+	store 3,mem_le_adv_data+4
+	call mouse_le_check_adv_flag
+	setarg ADV_FLAG_BREDR_NOT_SUPPORTED |ADV_FLAG_LIMITED_DISCOVERABLE
+	istore 1,contr
+	arg mem_le_adv_swift_pair,contr
+	call mouse_le_adv_data_update
+	branch check_51cmd_adv
+
+mouse_le_check_adv_flag:
+	arg mem_le_adv_data,rega
+mouse_le_check_adv_flag_loop:
+	ifetch 1,rega	//length
+	rtn blank
+	iadd contr,rega
+	ifetch 1,contr	//type
+	rtneq 0x01
+	branch mouse_le_check_adv_flag_loop
+	
+mouse_le_adv_data_update:
+	arg mem_le_adv_data+11,contw
+	arg 19,loopcnt
+	call memcpy
+	branch le_modified_name_adv
+	
+/***************************le*************************/
+
+
+/***********************bt****************************/	
+mouse_bt_sniff_param_interval_setup:
+	setarg CLASSIC_INTERVAL_7_5MS
+	store 2,mem_sniff_param_interval
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_BT_125Hz
+	setarg CLASSIC_INTERVAL_8_75MS
+	store 2,mem_sniff_param_interval
+	rtn
+
+mouse_bb_event_connected:
+	jam 0,mem_mouse_long_mult_flag
+	call mouse_init_sensor_reset
+	call mouse_24g_first_store_reconn_info
+	branch mouse_stop_discovery
+
+mouse_bb_disconnected:
+	jam 0,mem_mouse_enter_sniff_count
+	jam 0,mem_mouse_bt_send_first_package_flag
+	call mouse_bt_sniff_param_interval_setup
+	call mouse_bb_discon_clear_stack
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	bbit1 APP_DISC_BLE,mouse4_0_event_bb_disconn
+	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
+	bbit1 APP_DISC_AFTER_PAIRING,mouse_event_light_state_pairing
+	bbit1 APP_DISC_AFTER_RECONN,mouse_event_light_state_hibernate
+	bbit1 APP_DISC_AFTER_SNIFF,mouse_event_light_state_hibernate
+	branch mouse_start_discovery
+mouse_bb_discon_clear_stack:
+	setarg 0
+	store 8,mem_wheel_tb_old_pinlevel
+	istore 4,contw             //clean wheel statue
+	jam 0,mem_mouse_move_flag
+	jam APP_HANDSHAKE_NULL,mem_app_handshake_flag
+	jam 0,mem_ltk_exists
+	rtn
+
+mouse4_0_event_bb_disconn:
+	call mouse_le_clean_connect_flag
+	fetch APP_DISC_RSN_SIZE,mem_app_disconn_reason
+	bbit1 APP_DISC_BY_BUTTON,app_disconn_reason_clear
+	branch mouse_app_enter_hibernate
+
+
+mouse_event_light_state_pairing:
+	bbit1 APP_DISC_AFTER_HANDSHAKE,mouse_event_light_state_hibernate
+	bbit1 APP_DISC_AFTER_SNIFF,mouse_event_light_state_hibernate
+	branch mouse_start_discovery
+mouse_event_light_state_hibernate:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BTN_DOWN,mouse_start_discovery
+	call app_disconn_reason_clear
+
+	call mouse_key_check_once	//mult_key pair
+	call mouse_commbination_key_process
+	fetch 1,mem_commbination_key_statue
+	beq COMMBINATION_KEY_STATE_DOWN,mouse_delay_enter_hibernata
+	
+	fetch 1,mem_mouse_bluetooth_reconnect_timeout
+	nrtn blank
+	branch mouse_app_enter_hibernate
+
+
+mouse_bt_event_setup_complete:
+	rtn
+
+mouse_bt_send_first_package_timer_init:
+	jam 4,mem_mouse_bt_send_first_package_timer
+	rtn
+
+mouse_bt_hid_handshake:
+	jam APP_HANDSHAKE_DONE,mem_app_handshake_flag
+	call app_lpm_mult_enable
+	call app_bt_store_reconn_info
+	setarg 0
+	store 2,mem_discovery_timeout_timer_count
+	store 1,mem_hid_handshake_timer_count
+	call mouse_bt_send_first_package_timer_init
+	branch app_bt_enter_sniff
+
+mouse_bt_hid_handshake_boot_check:	
+	jam 0,mem_mouse_bt_boot_mode
+	fetch 1,mem_l2cap_rcv_hidtype
+	isolate1 0,pdata
+	rtn true
+	jam 1,mem_mouse_bt_boot_mode	//boot mode
+	rtn
+
+	
+mouse_bb_event_reconn_timeout:
+mouse_bb_event_reconn_failed:
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse_buletooth_fast_conn_end
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+	rtnbit1 UI_STATE_BT_DISCOVERY
+	rtnbit1 UI_STATE_BLE_ADV
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG
+	bbit1 MOUSE_ENABLE_BT_RECONNECT_TIMEOUT_ENTER_DISCOVERY,mouse_start_discovery
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_first_bb_event_reconn_timeout
+	branch mouse_app_enter_hibernate
+
+mouse_enter_sniff_check:
+	fetch 1,mem_mouse_enter_sniff_count
+	rtnne 2
+	jam 0,mem_mouse_enter_sniff_count
+	call mouse_bt_sniff_param_interval_setup
+	call mouse_bt_send_first_package_timer_init
+	branch app_bt_enter_sniff
+
+mouse_sniff_not_accept:
+	fetch 1,mem_mouse_enter_sniff_count
+	rtneq 2
+	increase 1,pdata
+	store 1,mem_mouse_enter_sniff_count
+	jam 0x12,mem_sniff_param_interval	//89Hz
+	call mouse_bt_send_first_package_timer_init
+	branch app_bt_enter_sniff
+
+mouse_bb_event_pincode:
+	call pincode_reinit
+	branch app_bt_set_pincode
+
+mouse_irtual_cable_unplug:
+	setarg 0x01
+	store 6,mem_plap
+	jam REC_3_MODE,mem_record_bt_mode
+	branch mouse_unplug_clean_bdaddr
+
+mouse_irtual_cable_unplug1:
+	setarg -1
+	store 6,mem_plap
+	jam REC_3_MODE,mem_record_bt_mode
+	jam 0xff,mem_mouse_bluetooth_fast_conn_flag
+	call mouse_before_store_reconn_info
+	jam 0xff,mem_device1_type
+	branch mouse_store_device_info_delay
+
+mouse_bt:
+	bpatch patch1a_7,mem_patch1a
+	rtn attempt
+	fetch 1,mem_app_handshake_flag
+	rtn blank
+	call l2cap_malloc_is_fifo_nearly_full
+	nrtn blank
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse_bt_fast_conn_send_device_name	
+	fetch 1,mem_mouse_clear_sensor_data_flag
+	call mouse_clear_sensor_data_by_reset,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_24G_PAIRING_FLAG,mouse_send_empty_data
+	bbit1 MOUSE_SELECT_DEVICE_FLAG,mouse_send_empty_data
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,mouse_send_empty_data
+	bbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,mouse_send_empty_data
+	call mouse_motion
+	call mouse_check_125Hz
+	nrtn user
+	call mouse_current_mult_update
+	call mouse_data_xy_release
+	call mouse_wheel_trigger
+	fetch 1,mem_mouse_bt_boot_mode
+	beq 1,mouse_send_data_boot_mode	//boot
+	fetch 1,mem_mouse_bt_send_first_package_flag
+	rtn blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,mouse_send_data
+	fetch 1,mem_customer_key
+	beq 1,mouse_bt_send_keyboard_packet
+mouse_send_data:
+	arg 9,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0x02a1
+	istore 2,contw
+	fetch 7,mem_mouse_key
+	istore 7,contw
+	rtn
+
+mouse_send_data_boot_mode:
+	fetch 1,mem_mouse_key
+	store 1,mem_mouse_bt_boot_data
+	fetch 1,mem_mouse_x
+	istore 1,contw
+	fetch 1,mem_mouse_y
+	istore 1,contw
+	fetch 2,mem_mouse_z
+	istore 2,contw
+	arg 7,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0x02a1		// pid:02  mouse
+	istore 2,contw
+	fetch 5,mem_mouse_bt_boot_data
+	istore 5,contw
+	rtn
+
+mouse_send_empty_data:
+	setarg 0
+	store 7,mem_mouse_key
+	branch mouse_send_data
+
+
+mouse_bt_send_keyboard_packet:
+	fetch 1,mem_customer_data_trigger
+	branch mouse_bt_release_keyboard_data,blank
+	fetch 8,mem_customer_key_press+1
+mouse_bt_send_keyboard_data:
+	store 8,mem_pdatatemp
+	fetch 1,mem_customer_key_press
+	beq KB_MULTIKEY_REPORT_ID,mouse_bt_send_multimedia_key_data
+	beq KB_SYSTEM_CONCTRL_REPORT_ID,mouse_bt_send_systemctrl_key_data
+	arg 10,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0x01a1		// pid:01  standard key
+	istore 2,contw
+	fetch 8,mem_pdatatemp
+	istore 8,contw
+	rtn
+
+mouse_bt_send_multimedia_key_data:
+	arg 4,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0x03a1		// pid:03  multimedia key
+	istore 2,contw
+	fetch 2,mem_pdatatemp
+	istore 2,contw
+	rtn	
+
+mouse_bt_send_systemctrl_key_data:
+	arg 3,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0x04a1		// pid:04  systemctrl key	
+	istore 2,contw
+	fetch 1,mem_pdatatemp
+	istore 1,contw
+	rtn		
+
+mouse_bt_release_keyboard_data:
+	fetch 8,mem_customer_key_release+1
+	branch mouse_bt_send_keyboard_data	
+/*******************bt****************************/
+
+
+
+/********************mouse 100ms timer*****************/
+mouse_bb_event_timer:
+	bpatch patch1b_0,mem_patch1b
+	call mouse_adc_read
+	call mouse_low_voltage_led_timer
+	//24g
+	call g24_pair_timeout_timer
+	call g24_reconn_timeout_timer
+	call mouse_24g_long_sleep_param_update_timer
+	//led
+	call mouse_device_poweron_timer
+	call mouse_dpi_led_blink_delay_timer
+	//poll
+	call mouse_dpi_key_check_long_press
+	call mouse_bt_discovery_check
+	call mouse_commbination_key_process
+	call mouse_check_discovery_timeout_timer
+	//ble
+	call mouse_check_direct_timeout_timer
+	call mouse_le_enable_att_list_timer
+	call mouse_le_battery_updata_timer
+	call mouse_le_send_smp_security_request_timer
+	//bt
+	call mouse_check_hid_handshake_timer
+	call mouse_bt_check_sniff_req_timeout_timer
+	call mouse_check_reconnect_delay_long_sleep		//delete 3.0,reconnect fail
+	call mouse_current_mult_update_timer
+	call mouse_wheel_trigger_timer
+	call mouse_store_information_delay_timer
+	branch mouse_check_no_data_timeout_timer
+
+
+
+
+mouse_bt_discovery_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY,mouse_bt_discovery_by_pb_button
+	rtn
+
+mouse_bt_discovery_by_pb_button:
+	fetch 1,mem_select_device_button_statue
+	rtnne PB_BUTTON_STATE_DOWN
+	arg mem_bt_discovery_count,regc
+	arg mouse_long_button_bt_discovery,regb
+	branch timer_single_step
+		
+mouse_long_button_bt_discovery:
+	fetch 1,mem_device_flag
+	rtneq MODE_24G_DEVICE
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG
+	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
+	call mouse_enable_function_flag
+	call app_evt_button_long_pressed
+	branch mouse_bb_event_discovery_btn
+
+		
+mouse_commbination_key_process:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_commbination_key_process
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_COMMBINATION_KEY_BY_BT_DISCOVERY
+	fetcht 1,mem_mouse_commbination_key_bt
+	branch mouse_commbination_key_start
+
+mouse_24g_commbination_key_process:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_COMMBINATION_KEY_BY_24G_PAIRING
+	fetcht 1,mem_mouse_commbination_key_24g
+mouse_commbination_key_start:
+	storet 1,mem_mouse_commbination_key
+	call mouse_check_key_gpio
+	and pdata,0x07,pdata
+	fetcht 1,mem_mouse_commbination_key
+	isub temp,null
+	branch mouse_commbination_key_down,zero
+mouse_commbination_key_up:
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_combination_ui_button_count	//combination key timer init 
+	fetch 1,mem_commbination_key_statue
+	rtneq COMMBINATION_KEY_STATE_UP
+	jam COMMBINATION_KEY_STATE_UP,mem_commbination_key_statue	
+	rtn
+		
+mouse_commbination_key_down:
+	call mouse_combination_ui_timer
+	fetch 1,mem_commbination_key_statue
+	rtneq COMMBINATION_KEY_STATE_DOWN
+	jam COMMBINATION_KEY_STATE_DOWN,mem_commbination_key_statue
+	branch check_51cmd_bb_reconn_cancel
+
+
+mouse_combination_ui_timer:
+	arg mouse_24g_start_pair_mode,regb
+	arg mem_combination_ui_button_count,regc
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,timer_single_step
+	arg mouse_long_button_bt_discovery,regb
+	call timer_single_step
+	fetch 1,mem_combination_ui_button_count
+	beq 1,mouse_bt_discovery_button_down_enable	// ble release key press
+	rtn
+
+
+
+mouse_check_discovery_timeout_timer:	
+	arg mem_mouse_discovery_timer,regc
+	arg mouse_check_discovery_timeout,regb
+	branch timer_single_step_2B
+
+mouse_check_discovery_timeout:
+	call mouse_stop_discovery
+	branch mouse_app_enter_hibernate
+
+
+mouse_check_direct_timeout_timer:	
+	arg mem_mouse_direct_timer,regc
+	arg mouse_check_direct_timeout,regb
+	call timer_single_step_2B
+	fetch 1,mem_mouse_direct_timer
+	beq 1,app_ble_stop_direct_adv
+	rtn
+
+mouse_check_direct_timeout:
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,mouse_buletooth_fast_conn_end
+	fetch 1,mem_reconn_times
+	nbranch mouse_polling_device,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_BT_RECONNECT_TIMEOUT_ENTER_DISCOVERY,mouse_start_discovery
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_first_bb_event_reconn_timeout
+	branch mouse_app_enter_hibernate
+	
+mouse_le_enable_att_list_timer:
+	arg mem_le_start_encrypt_timer,regc
+	arg mouse_le_write_enable,regb
+	branch timer_single_step
+
+mouse_le_send_smp_security_request_timer:
+	fetch 1,mem_mouse_le_bb_connected_flag
+	rtn blank
+	arg mem_mouse_send_secutiry_request_timer,regc
+	arg mouse_le_pairing_sm_start_check,regb
+	branch timer_single_step
+mouse_le_pairing_sm_start_check:
+	fetch 1,mem_mouse_le_reconnect_flag
+	nrtn blank
+	fetch 1,mem_le_pairing_state
+	rtnne FLAG_LE_PAIRING_NULL
+	branch le_pairing_sm_start
+
+mouse_le_battery_updata_timer:
+	arg mem_le_battery_level_updata_timer,regc
+	arg mouse_le_battery_level_updata,regb
+	branch timer_single_step
+
+mouse_le_battery_level_updata:
+	fetch 2,mem_le_battery_level_updata_timer_init
+	store 2,mem_le_battery_level_updata_timer
+	branch mouse_fill_battery_level_le
+	
+mouse_le_enable_att_list:	
+	fetch 1,mem_le_connect_status_flag
+	rtnbit1 LL_PAIRING_SUCCESS_FLAG
+	call mouse_updata_le_param
+	arg WRITE_REQ_ENABLE_FLAG,queue
+	branch mouse_le_enable_connect_flag
+
+mouse_check_hid_handshake_timer:
+	arg mem_hid_handshake_timer_count,regc
+	arg mouse_bt_hid_handshake,regb
+	branch timer_single_step
+	
+mouse_bt_check_sniff_req_timeout_timer:
+	arg mem_mouse_bt_send_first_package_timer,regc
+	arg mouse_bt_send_first_package,regb
+	branch timer_single_step
+mouse_bt_send_first_package:
+	jam 1,mem_mouse_bt_send_first_package_flag
+	rtn
+
+mouse_check_reconnect_delay_long_sleep:
+	arg mem_mouse_bluetooth_reconnect_timeout,regc
+	arg mouse_app_enter_hibernate,regb
+	branch timer_single_step
+
+
+mouse_current_mult_update_timer:
+	arg mem_mouse_current_mult_timer,regc
+	arg mouse_current_mult_reinit,regb
+	branch timer_single_step
+mouse_current_mult_reinit:
+	fetch 1,mem_lpm_mult_init
+	store 1,mem_lpm_mult
+	jam 1,mem_mouse_long_mult_flag
+	rtn
+
+
+mouse_check_no_data_timeout_timer:	
+	fetch 1,mem_usb_addr
+	rtnbit1 7
+	arg mem_mouse_no_data_timer,regc
+	arg mouse_check_no_data_timeout,regb
+	branch timer_single_step_2B
+
+mouse_check_no_data_timeout:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_hibernate_set
+	branch mouse_disconnect
+	
+mouse_no_data_timer_init:
+	fetch 2,mem_mouse_no_data_timeout
+	store 2,mem_mouse_no_data_timer
+	rtn
+
+mouse_store_information_delay_timer:
+	arg mem_store_information_delay_timer,regc
+	arg mouse_store_device_info_check,regb
+	branch timer_single_step
+
+mouse_store_device_info_check:
+	call mouse_store_device_info
+	fetch 1,mem_mouse_need_soft_reset
+	nbranch mouse_soft_reset,blank
+	rtn
+
+mouse_bb_event_discovery_btn:
+	isolate1 mark_24g,mark
+	call mouse_24g_stop,true
+	call mouse_disconnect
+	call mouse_le_clean_connect_flag
+	branch mouse_start_discovery
+	
+mouse_start_discovery:
+	bpatch patch1b_1,mem_patch1b
+	call mouse_bluetooth_fast_conn_disable
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_ADV,mouse_start_discovery_norandom
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_BLE_RANDOM_ADDRE,mouse_start_discovery_norandom
+	fetcht 2,mem_random_addr_increase_count
+	increase 1,temp
+	storet 2,mem_random_addr_increase_count
+	storet 2,mem_le_lap+1
+	random pdata					//random ble addr
+	store 1,mem_le_lap
+mouse_start_discovery_norandom:
+	fetch 3,mem_mouse_le_lap_temp
+	store 3,mem_le_lap+3
+	call app_lpm_mult_disable
+	fetch 2,mem_discovery_timeout
+	store 2,mem_mouse_discovery_timer
+	jam 6,mem_connection_options
+	setarg 0
+	store 2,mem_mouse_no_data_timer
+	store 1,mem_mouse_direct_timer
+	store 1,mem_mouse_bluetooth_reconnect_timeout
+	store 1,mem_mouse_device_poweron_timer_count
+	store 1,mem_mouse_clear_sensor_data_flag
+	arg MOUSE_STORE_EEPROM_FLAG,queue
+	call mouse_enable_function_flag
+	call mouse_bt_discovery_button_down_disable
+	fetch 1,mem_mouse_bluetooth_type
+	isolate1 MODE_4_MOUSE,pdata
+	call mouse_check_51cmd_adv,true
+	fetch 1,mem_mouse_bluetooth_type
+	isolate1 MODE_3_MOUSE,pdata
+	call check_51cmd_start_discovery,true
+	call mouse_low_voltage_led_blink_disable
+	branch mouse_discover_setting_led_gpio
+
+
+mouse_stop_discovery:
+	bpatch patch1b_2,mem_patch1b
+	arg MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG,queue
+	call mouse_disable_function_flag
+	jam 0,mem_mouse_bluetooth_reconnect_timeout
+	fetch 1,mem_mouse_bluetooth_type
+	isolate1 MODE_4_MOUSE,pdata
+	call mouse_stop_le_adv,true
+	fetch 1,mem_mouse_bluetooth_type
+	isolate1 MODE_3_MOUSE,pdata
+	call mouse_stop_bt3_discovery,true
+	branch mouse_device_led_off
+mouse_stop_le_adv:
+	jam 0,mem_mouse_direct_timer
+	branch check_51cmd_stop_adv
+mouse_stop_bt3_discovery:
+	setarg 0
+	store 2,mem_mouse_discovery_timer
+	branch check_51cmd_stop_discovery
+
+mouse_store_remote_bdaddr:
+	bpatch patch1b_3,mem_patch1b
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_STORE_EEPROM_FLAG
+	call mouse_device_poweron_timer_init
+	arg MOUSE_STORE_EEPROM_FLAG,queue
+	call mouse_disable_function_flag
+	call mouse_check_device_addr
+mouse_unplug_clean_bdaddr:
+	call mouse_before_store_reconn_info
+	branch mouse_store_device_info_delay
+
+	
+mouse_check_device_addr:
+	fetch 1,mem_record_bt_mode
+	beq REC_4_MODE,mouse_check_le_device_addr
+	beq REC_3_MODE,mouse_check_bt_device_addr
+	rtn
+mouse_check_le_device_addr:
+	store 1,mem_device_addr_temp
+	fetch 6,mem_le_plap
+	branch mouse_check_bt_device_addr_common
+mouse_check_bt_device_addr:
+	store 1,mem_device_addr_temp
+	fetch 6,mem_plap
+mouse_check_bt_device_addr_common:
+	store 6,mem_device_addr_temp+1
+	fetch 7,mem_device_addr_temp
+	arg mem_device1_type,contr
+	arg 3,loopcnt
+mouse_check_device_addr_end:
+	ifetcht 7,contr
+	isub temp,null
+	branch mouse_clean_addr,zero
+	increase 22,contr
+	loop mouse_check_device_addr_end
+	rtn
+mouse_before_store_reconn_info:
+	arg mem_device1_type,rega
+	fetch 1,mem_device_flag
+	increase -1,pdata
+	mul32 pdata,29,pdata
+	iadd rega,rega
+	fetch 1,mem_record_bt_mode
+	istore 1,rega
+	beq REC_4_MODE,mouse_store_le_device
+	beq REC_3_MODE,mouse_store_bt_device
+	rtn
+	
+mouse_store_le_device:
+	fetch 6,mem_le_plap
+	istore 6,contw
+	arg mem_le_ltk,contr
+	call memcpy16
+	fetch 6,mem_le_lap
+	istore 6,contw
+	rtn
+mouse_store_bt_device:
+	fetch 6,mem_plap
+	istore 6,contw
+	arg mem_link_key,contr
+	branch memcpy16
+
+mouse_clean_addr:
+	increase -6,contr
+	copy contr,contw
+	fetcht 6,mem_device_addr_temp+1
+	increase 3,temp
+	istoret 6,contw
+	rtn
+	
+mouse_select_reconn_device:
+	arg mem_device1_type,rega
+	fetch 1,mem_device_flag
+	rtneq MODE_24G_DEVICE
+	increase -1,pdata
+	mul32 pdata,29,pdata
+	iadd rega,rega
+	ifetch 1,rega
+	store 1,mem_xrecord_mode
+	beq REC_3_MODE,mouse_load_bt_device
+	beq REC_4_MODE,mouse_load_le_device
+	rtn
+
+mouse_load_bt_device:
+	ifetch 6,contr
+mouse_load_bt_device_end:
+	store 6,mem_hci_plap
+	arg mem_link_key,contw
+	call memcpy16
+	branch check_link_key_load
+
+mouse_load_le_device:
+	ifetch 6,contr
+mouse_load_le_device_end:
+	store 6,mem_hci_plap
+	arg mem_le_ltk,contw
+	call memcpy16
+	ifetch 6,contr
+	store 6,mem_le_lap
+	rtn
+
+
+
+mouse_app_initflag_check:
+	fetch 2,mem_store_flag
+	arg EEPROM_INIT_FLAG,temp
+	isub temp,null
+	branch mouse_load_device_info,zero
+	storet 2,mem_store_flag
+	call mouse_ble_init_address
+	fetch 1,mem_device_flag_temp
+	store 1,mem_device_flag
+	fetch 1,mem_config_sensor_dpi
+	store 1,mem_mouse_dpi
+	fetch 4,mem_24g_fast_conn_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_24g_addr	
+	rtn
+
+mouse_load_device_info:
+	call mouse_select_reconn_device
+	fetch 4,mem_mouse_24g_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_24g_addr
+	rtn
+	
+mouse_ble_init_address:
+	fetch 6,mem_le_lap
+	store 6,mem_device1_locall_addr
+	add pdata,0x0100,pdata
+	store 6,mem_device2_locall_addr
+	add pdata,0x0100,pdata
+	store 6,mem_device3_locall_addr
+	rtn
+	
+
+mouse_store_device_info_delay:	
+	fetch 1,mem_store_information_delay_timer_init
+	store 1,mem_store_information_delay_timer
+	rtn
+
+mouse_store_device_info:
+	bpatch patch1b_4,mem_patch1b
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_EEPROM,mouse_store_eeprom_device_info
+	bbit1 MOUSE_ENABLE_FLASH,mouse_store_flash_device_info
+	rtn
+
+mouse_load_flash_info_check:
+	call spid_init_flash
+	call mouse_spid_flash_release_form_powerdown
+	call mouse_information_flash_parameters
+	call spid_read_flash
+	call mouse_spid_flash_powerdown
+	call mouse_app_initflag_check
+	branch mouse_sensor_spi_init
+
+
+mouse_information_flash_parameters:
+	setarg mem_mouse_information_end
+	arg mem_mouse_information_start,temp
+	isub temp,temp
+	fetch 3,mem_flash_base
+	arg mem_mouse_information_start,rega
+	rtn
+	
+mouse_store_flash_device_info:
+	call spid_init_flash
+	call mouse_spid_flash_release_form_powerdown
+	call mouse_flash_erase_sector
+
+	call mouse_information_flash_parameters
+	call mouse_spid_write_flash
+	call mouse_spid_flash_powerdown
+	branch mouse_sensor_spi_init
+
+mouse_spid_flash_release_form_powerdown:
+	jam FLASH_COMMAND_RELEASE_FROM_POWERDOWN,mem_temp
+mouse_spid_write_flash_cmd:
+	call delay_nop100
+	call spid_unlock_flash
+	arg mem_write_flash_head_temp,rega
+	fetcht 1,mem_temp
+	call mouse_spid_write_flash_cmd_common
+	branch delay_nop100
+
+mouse_spid_flash_powerdown:
+	jam FLASH_COMMAND_POWERDOWN,mem_temp
+	branch mouse_spid_write_flash_cmd
+
+mouse_spid_write_flash_cmd_common:
+	istoret 1,rega
+	rshift16 pdata,temp
+	istoret 1,contw
+	rshift8 pdata,temp
+	istoret 1,contw
+	istore 1,contw
+	deposit rega
+	store 2,core_spid_txaddr
+	setarg 0
+	store 2,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+		
+mouse_flash_erase_sector:
+	fetch 3,mem_flash_base
+	store 3,mem_spi_write_addr
+	branch spid_flash_erase_sector+2
+
+mouse_spid_write_flash:
+	copy pdata,regc
+	copy rega,pdata
+	increase -4,pdata
+	copy pdata,regb
+	ifetch 4,regb
+	store 4,mem_write_flash_head_temp
+	copy regc,pdata
+	call spid_write_flash
+	fetch 4,mem_write_flash_head_temp
+	istore 4,regb
+	rtn
+
+mouse_flash_power_down:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_FLASH
+	call mouse_spid_flash_powerdown
+	call twspi_enable	// 2 wire mode
+	fetcht 1,mem_spi_cs_gpio		//disable flash
+	call gpio_out_inactive
+	fetcht 1,mem_spi_hold_gpio
+	branch mouse_gpio_config_input_pd
+
+mouse_load_eeprom_info_check:
+	call iicd_read_init_pin
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	isolate1 MOUSE_ENABLE_2K_EEPROM,pdata
+	ncall clear_eeprom_size_2k,true
+	call mouse_eeprom_load_recon_info
+	branch mouse_app_initflag_check
+
+mouse_eeprom_load_recon_info:
+	arg 128,temp
+	arg mem_device_flag,rega
+	arg MOUSE_INFO_EEPROM_OFFECT,regb
+	branch iicd_read_eep_data
+
+mouse_store_eeprom_device_info:
+	arg 128,temp
+	arg mem_device_flag,rega
+	arg MOUSE_INFO_EEPROM_OFFECT,regb
+	branch iicd_write_protect_eep_data
+
+
+mouse_store_eerpom_dpi:
+	arg 1,temp
+	arg mem_mouse_dpi,rega
+	arg MOUSE_DPI_EEPROM_OFFECT,regb
+	branch iicd_write_protect_eep_data
+
+mouse_load_eeprom_dpi:
+	arg 1,temp
+	arg mem_mouse_dpi,rega
+	arg MOUSE_DPI_EEPROM_OFFECT,regb
+	branch iicd_read_eep_data
+
+
+
+mouse_idle:
+	bpatch patch1b_5,mem_patch1b
+	call mouse_low_voltage_led_no_enter_lpm
+	call ui_check_paring_button
+	call mouse_dpi_check
+	call mouse_select_device_check
+	call mouse_check_select_device_by_switch
+	call mouse_bt_button_check
+	branch mouse_wheel_check
+	
+mouse_select_device_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_PB_BUTTON,mouse_select_device_by_pb_button
+	bbit1 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY,mouse_select_device_by_pb_button
+	rtn
+
+mouse_select_device_by_pb_button_check_once:
+	jam 0x03,mem_mouse_pbkey_press_status
+mouse_select_device_by_pb_button:	
+	fetch 1,mem_config_select_device_button_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	jam MOUSE_PB_KEY,mem_mouse_key_temp
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_pb_button_check
+	store 1,mem_mouse_pbkey_press_status
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_pb_button_check_end	
+	call mouse_matrix_public_gpio_reset
+mouse_select_device_by_pb_button_exit:	
+	copy rega,pdata
+	bbit1 MOUSE_PB_KEY,mouse_select_device_button_down
+	branch mouse_select_device_button_up
+
+mouse_3io6key_pb_button_check_end:
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_gpio_config_input_pu
+	branch mouse_select_device_by_pb_button_exit
+
+
+mouse_pb_button_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_PB_BUTTON_CONNECT_GND,mouse_pb_button_connect_gnd
+	fetch 1,mem_mouse_pbkey_press_status
+	copy pdata,regc
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,mouse_3io6key_check
+	fetch 1,mem_mouse_ghost_flag
+	nbranch mouse_select_device_by_pb_button_end,blank
+	branch mouse_pb_button_connect_matrix
+
+mouse_select_device_by_pb_button_end:
+	jam PB_BUTTON_STATE_UP,mem_select_device_button_statue
+	jam 0,mem_mouse_pbkey_press_status
+	rtn
+
+mouse_pb_button_connect_gnd:
+	fetch 1,mem_mouse_pbkey_press_status
+	branch mouse_check_key_connect_gnd
+
+mouse_pb_button_connect_matrix:
+	call gpio_get_bit
+	fetcht 1,mem_matrix_public_gpio
+	branch mouse_pb_button_connect_gnd,true
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_out_active
+	fetcht 1,mem_config_select_device_button_gpio
+	fetch 1,mem_mouse_pbkey_press_status
+	branch mouse_check_key_connect_gnd
+	
+mouse_select_device_button_up:
+	fetch 1,mem_select_device_button_statue
+	rtneq PB_BUTTON_STATE_UP
+	jam PB_BUTTON_STATE_UP,mem_select_device_button_statue	
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+	fetch 1,mem_bt_discovery_count
+	sub pdata,20,null
+	ncall mouse_ready_reconnection_by_button,positive		// press button less than 30-20=1000ms
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_bt_discovery_count
+	rtn
+
+mouse_select_device_button_down:
+	call mouse_select_device_ghost_check
+	rtn user
+	fetch 1,mem_select_device_button_statue
+	rtneq PB_BUTTON_STATE_DOWN
+	jam PB_BUTTON_STATE_DOWN,mem_select_device_button_statue
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY,mouse_long_button_bt_discovery
+	fetch 1,mem_mouse_direct_timer
+	rtn blank
+	fetch 1,mem_mouse_direct_timeout
+	store 1,mem_mouse_direct_timer
+	rtn
+
+mouse_select_device_ghost_check:
+	disable user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_PB_BUTTON_CONNECT_GND
+	fetch 1,mem_mouse_lkey_press_status
+	rtn blank
+	fetch 1,mem_mouse_rkey_press_status
+	rtn blank
+	enable user
+	rtn
+	
+
+
+mouse_check_select_device_by_switch:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO,mouse_check_select_device_by_switch_gpio
+	bbit1 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC,mouse_adc_read
+	rtn
+mouse_check_select_device_by_switch_gpio:	
+	fetcht 1,mem_device_switch_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_device_switch_gpio
+	call gpio_get_bit
+	branch mouse_check_select_24gdevice,true
+mouse_select_btdevice:
+	fetch 1,mem_device_flag
+	rtneq MODE_BT_DEVICE1
+	jam MODE_BT_DEVICE1,mem_device_flag
+	branch mouse_stop_bluetooth_mode
+	
+	
+mouse_check_select_24gdevice:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC,mouse_check_select_24g_device
+	fetch 6,mem_mouse_vdd_switch_gnd_full_vol
+	store 6,mem_mouse_vdd_calculate_set
+mouse_check_select_24g_device:	
+	fetch 1,mem_device_flag
+	rtneq MODE_24G_DEVICE
+	jam MODE_24G_DEVICE,mem_device_flag
+	branch mouse_24g_stop
+
+	
+
+mouse_ready_reconnection_by_button:
+	bpatch patch1b_6,mem_patch1b
+	fetch 1,mem_device_number
+	rtneq 1		// 1channel
+	call mouse_select_device_number
+	storet 1,mem_device_flag
+mouse_store_device_number_before_reset:	
+	jam 0,mem_link_key_exists
+	call mouse_select_device_enable
+	call mouse_stop_bluetooth_mode
+	call mouse_select_device_disable
+	jam 1,mem_mouse_need_soft_reset
+	branch mouse_store_device_info_delay
+
+
+mouse_soft_reset:
+	call mouse_select_device_enable
+	branch soft_reset_chip
+
+mouse_select_device_number:
+	fetcht 1,mem_device_flag
+	increase 1,temp
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G,mouse_select_device_number_24g
+	sub temp,2,null
+	ncall mouse_select_device_count_clean_bt,positive
+	rtn
+	
+mouse_select_device_number_24g:	
+	fetch 1,mem_device_number
+	increase -1,pdata
+	isub temp,null
+	ncall mouse_select_device_count_clean_24g,positive
+	rtn
+
+mouse_select_device_count_clean_24g:
+	arg 0,temp
+	rtn
+mouse_select_device_count_clean_bt:
+	arg 1,temp
+	rtn
+
+
+mouse_store_device_number2eeprom:
+	arg 1,temp
+	arg mem_device_flag,rega
+	arg 0,regb
+	branch iicd_write_protect_eep_data
+		
+
+mouse_bt_button_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+	call mouse_select_device_by_pb_button
+	rtn
+
+
+
+
+mouse_select_device_enable:
+	arg MOUSE_SELECT_DEVICE_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_select_device_disable:
+	arg MOUSE_SELECT_DEVICE_FLAG,queue
+	branch mouse_disable_function_flag
+mouse_bt_cannel_reconn_enable:
+	arg MOUSE_BT_CANNEL_RECONN_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_bt_cannel_reconn_disable:
+	arg MOUSE_BT_CANNEL_RECONN_FLAG,queue
+	branch mouse_disable_function_flag
+mouse_bt_discovery_button_down_enable:
+	arg MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,queue
+	branch mouse_enable_function_flag
+mouse_bt_discovery_button_down_disable:
+	arg MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG,queue
+	branch mouse_disable_function_flag
+
+mouse_adc_read_enable:
+	arg MOUSE_ENABLE_ADC,queue
+	branch mouse_enable_function_flag
+
+mouse_24g_set_250Hz:
+	arg MOUSE_ENABLE_24G_250Hz,queue
+	branch mouse_enable_function_flag
+
+mouse_24g_search_dongle_enable:
+	arg MOUSE_ENABLE_24G_SEARCH_DONGLE,queue
+	branch mouse_enable_function_flag
+	
+mouse_16M_enable:
+	arg MOUSE_ENABLE_16M,queue
+	branch mouse_enable_function_flag
+	
+mouse_dpi_4level_enable:
+	arg MOUSE_ENABLE_DPI_LEVEL_4,queue
+	branch mouse_enable_function_flag
+
+
+mouse_enable_function_flag:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	qset1 pdata
+	store MOUSE_FLAG_LEN,mem_mouse_flag
+	rtn
+
+mouse_disable_function_flag:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	qset0 pdata
+	store MOUSE_FLAG_LEN,mem_mouse_flag
+	rtn
+
+mouse_customer_key_enable:
+	arg MOUSE_ENABLE_KEYBOARD,queue
+	call mouse_enable_function_flag
+	setarg 0
+	store 8,mem_customer_key_press
+	store 8,mem_customer_key_release
+	fetch 1,mem_mouse_enable_flag	// 00--win+d     01--ctrl+alt+a    02--AC home    03--play
+	and pdata,0xc0,pdata
+	beq 0x40,mouse_customer_key_ctrl_alt_a
+	beq 0x80,mouse_customer_AC_home
+	beq 0xc0,mouse_customer_key_play
+	setarg 0x070008
+mouse_customer_standrad_key_set:	
+	store 8,mem_customer_key_press+1		// win + d
+	rtn
+
+mouse_customer_key_ctrl_alt_a:
+	setarg 0x040005
+	branch mouse_customer_standrad_key_set
+
+	
+mouse_customer_AC_home:
+	setarg 0x022303
+mouse_customer_media_key_set:	
+	store 8,mem_customer_key_press
+	setarg 0x03
+	store 8,mem_customer_key_release
+	rtn
+	
+mouse_customer_key_play:
+	setarg 0x00cd03
+	branch mouse_customer_media_key_set
+
+	
+
+
+
+	
+mouse_polling_device:
+	bpatch patch1b_7,mem_patch1b
+	fetch 1,mem_reconn_times
+	increase -1,pdata
+	store 1,mem_reconn_times
+	fetcht 1,mem_device_flag
+	sub temp,1,null
+	ncall mouse_select_device_number,zero
+	storet 1,mem_device_flag
+	jam 0,mem_link_key_exists
+	call mouse_store_device_number2eeprom
+	call mouse_before_store_reconn_info
+	branch mouse_start_reconnect_device
+	
+
+
+//notice: need to call p_mouse_drawing_optima_init when waked from mult
+mouse_drawing_optima:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_SMOOTHER
+	fetch 4,mem_mouse_x
+	rtn blank
+	call mouse_data_abs_check
+	setarg 0x03	//asm_flag enable condition
+	call mouse_pdata_greater_than_check
+	call mouse_disable_asm,blank
+	ncall mouse_enable_asm,blank
+	setarg 0x02	//asm_flag disable condition
+	call mouse_data_less_than_check
+	call mouse_disable_asm,blank
+	fetch 1,mem_mouse_asm_flag
+	beq 1,mouse_drawing_optima_modify
+mouse_drawing_optima_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_SMOOTHER
+	arg 5,loopcnt
+	arg mem_mouse_asm_flag,contw
+	branch clear_mem
+
+mouse_drawing_optima_modify:
+	call mouse_drawing_optima_xy_offset_modify
+	fetch 2,mem_mouse_x_pre
+	store 2,mem_data_pre
+	fetch 2,mem_mouse_x
+	store 2,mem_data_current
+	call mouse_drawing_optima_data_x
+	fetch 2,mem_data_pre
+	store 2,mem_mouse_x_pre
+	fetch 2,mem_data_current
+	store 2,mem_mouse_x
+
+	fetch 2,mem_mouse_y_pre
+	store 2,mem_data_pre
+	fetch 2,mem_mouse_y
+	store 2,mem_data_current
+	call mouse_drawing_optima_data_y
+	fetch 2,mem_data_pre
+	store 2,mem_mouse_y_pre
+	fetch 2,mem_data_current
+	store 2,mem_mouse_y
+	rtn
+
+mouse_drawing_optima_xy_offset_modify:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_XY_OFFSET
+	fetch 2,mem_mouse_x_pre
+	store 2,mem_data_value
+	call mouse_pre_xy_data_judge
+	store 2,mem_mouse_x_pre
+	fetch 2,mem_mouse_x
+	store 2,mem_data_value
+	call mouse_current_xy_data_judge
+	store 2,mem_mouse_x
+	fetch 2,mem_mouse_y_pre
+	store 2,mem_data_value
+	call mouse_pre_xy_data_judge
+	store 2,mem_mouse_y_pre
+	fetch 2,mem_mouse_y
+	store 2,mem_data_value
+	call mouse_current_xy_data_judge
+	store 2,mem_mouse_y
+	rtn
+
+mouse_pre_xy_data_judge:	
+	fetch 1,mem_data_value+1
+	branch mouse_pre_xy_pdata_offset,blank
+	branch mouse_pre_xy_ndata_offset
+
+mouse_pre_xy_pdata_offset:
+	fetch 1,mem_data_value
+	call mouse_pre_xy_get_0_4_times
+	store 1,mem_data_value
+mouse_xy_data_offset_new:
+	fetch 2,mem_data_value
+	rtn
+mouse_pre_xy_ndata_offset:
+	fetch 1,mem_data_value
+	call mouse_pdata_invert
+	call mouse_pre_xy_get_0_4_times
+	call disable_blank,blank
+	call mouse_pdata_get_new_value
+	branch mouse_xy_data_offset_new
+	
+mouse_current_xy_data_judge:
+	fetch 1,mem_data_value+1
+	branch mouse_current_xy_pdata_offset,blank
+	branch mouse_current_xy_ndata_offset
+mouse_current_xy_pdata_offset:
+	fetch 1,mem_data_value
+	call mouse_current_xy_get_0_6_times
+	store 1,mem_data_value
+	branch mouse_xy_data_offset_new
+mouse_current_xy_ndata_offset:	
+	fetch 1,mem_data_value
+	call mouse_pdata_invert
+	call mouse_current_xy_get_0_6_times
+	call disable_blank,blank
+	call mouse_pdata_get_new_value
+	branch mouse_xy_data_offset_new
+	
+mouse_pre_xy_get_0_4_times:
+	mul32 pdata,4,pdata
+	div pdata,5
+	call wait_div_end
+	quotient pdata
+	rtn
+mouse_current_xy_get_0_6_times:	//0.6 times
+	mul32 pdata,12,pdata
+	div pdata,10
+	call wait_div_end
+	quotient pdata
+	rtn	
+	
+mouse_drawing_optima_data_x:
+	fetch 2,mem_data_pre
+	fetcht 2,mem_data_current
+	iadd temp,pdata
+	fetcht 1,mem_mouse_data_xtemp
+	iadd temp,pdata
+	and pdata,0x01,temp
+	storet 1,mem_mouse_data_xtemp
+	branch mouse_drawing_optima_data
+
+mouse_drawing_optima_data_y:
+	fetch 2,mem_data_pre
+	fetcht 2,mem_data_current
+	iadd temp,pdata
+	fetcht 1,mem_mouse_data_ytemp
+	iadd temp,pdata
+	and pdata,0x01,temp
+	storet 1,mem_mouse_data_ytemp
+	branch mouse_drawing_optima_data
+
+/**********
+input:data_pre,data_current
+output:data_pre,data_current after optima
+***********/
+mouse_drawing_optima_data:
+	store 3,mem_data_sum
+	isolate1 16,pdata
+	branch mouse_data_sum_overflow,true
+	fetch 1,mem_data_sum+1
+	beq 0xff,mouse_data_sum_n
+	fetch 1,mem_data_sum
+mouse_data_store_pre:
+	rshift pdata,pdata
+	store 2,mem_data_pre
+	store 2,mem_data_current
+	rtn
+mouse_data_sum_overflow:
+	fetch 1,mem_data_sum+1	//sum positive
+	beq 0,mouse_data_sum_overflow_p
+	fetch 3,mem_data_sum	
+	branch mouse_data_store_pre
+mouse_data_sum_overflow_p:
+	jam 0,mem_data_sum+2
+	fetch 1,mem_data_sum
+	branch mouse_data_store_pre
+
+mouse_data_sum_n:
+	fetch 1,mem_data_sum	//sum negetive
+	call mouse_pdata_get_half
+	store 1,mem_data_pre
+	store 1,mem_data_current
+	branch mouse_data_zero,blank
+	setarg 0xff
+mouse_data_set_direction:	
+	store 1,mem_data_pre+1
+	store 1,mem_data_current+1
+	rtn
+mouse_data_zero:
+	setarg 0
+	branch mouse_data_set_direction
+
+mouse_pdata_get_half:
+	call mouse_pdata_invert
+	rshift pdata,pdata
+mouse_pdata_get_new_value:	
+	call mouse_rega_in_out
+	sub pdata,0,pdata
+	store 1,mem_data_value	
+	rtn
+
+mouse_pdata_invert:
+	sub pdata,0,pdata
+mouse_rega_in_out:	
+	store 1,mem_rega
+	fetch 1,mem_rega
+	rtn
+
+mouse_disable_asm:
+	jam 0,mem_mouse_asm_flag
+	rtn
+mouse_enable_asm:
+	jam 1,mem_mouse_asm_flag
+	rtn
+
+//rega mouse_x, regb mouse_y, pdata refer
+mouse_pdata_greater_than_check:
+	isub rega,null
+	nbranch disable_blank,positive
+	isub regb,null
+	nbranch disable_blank,positive
+	branch enable_blank
+mouse_data_less_than_check:
+	isub rega,null
+	nrtn positive
+	isub regb,null
+	nrtn positive
+	branch enable_blank
+
+mouse_data_abs_check:
+	fetch 2,mem_mouse_x
+	call mouse_data_abs
+	copy pdata,rega
+	fetch 2,mem_mouse_y
+	call mouse_data_abs
+	copy pdata,regb
+	rtn
+
+/***********
+input: data_current
+output:pdata,abs
+************/
+mouse_data_abs:
+	store 2,mem_data_current
+	fetch 1,mem_data_current+1
+	beq 0xff,mouse_data_reversal
+	fetch 1,mem_data_current
+mouse_data_abs_store:
+	and_into 0xff,pdata
+	//output:pdata
+	rtn
+mouse_data_reversal:
+	fetch 2,mem_data_current
+	sub pdata,0,pdata
+	branch mouse_data_abs_store
+
+mouse_24g_long_sleep_param_update_timer:
+	arg mem_24g_long_sleep_param_update_timer,regc
+	arg mouse_24g_long_sleep_normal_param,regb
+	branch timer_single_step
+mouse_24g_long_sleep_normal_param:
+	fetch 4,mem_24g_long_sleep_set1
+	store 4,mem_24g_enter_hibernate
+	jam 1,mem_mouse_long_mult_flag
+	rtn
+
+
+mouse_24g_long_sleep_set:
+	fetch 1,mem_24g_long_sleep_set_level
+	beq 0x00,mouse_24g_long_sleep_set_30ms
+	beq 0x01,mouse_24g_long_sleep_set_50ms
+	beq 0x02,mouse_24g_long_sleep_set_80ms
+	beq 0x03,mouse_24g_long_sleep_set_100ms
+mouse_24g_long_sleep_set_80ms:
+	setarg 0x0ea600
+mouse_24g_long_sleep_set_end:	
+	store 4,mem_24g_long_sleep_set1
+	rtn
+mouse_24g_long_sleep_set_30ms:
+	setarg 0x05e740
+	branch mouse_24g_long_sleep_set_end
+mouse_24g_long_sleep_set_50ms:
+	setarg 0x0927c0
+	branch mouse_24g_long_sleep_set_end
+mouse_24g_long_sleep_set_100ms:
+	setarg 0x124f80
+	branch mouse_24g_long_sleep_set_end
+
+	
+
+mouse_24g_hibernate_set:
+	jam 0,mem_24g_attempt_fail_flag
+	call g24_transmit_next_packet
+	setarg -1
+	store 4,mem_24g_enter_hibernate
+	setarg 0
+	store 7,mem_mouse_key
+	jam 1,mem_sensor_shutdown_flag
+	call mouse_sensor_powerdown
+	call mouse_setgpio_hibernate
+	branch g24_long_sleep
+
+mouse_wakeup_24g:
+	fetch 1,mem_sensor_shutdown_flag
+	ncall mouse_init_sensor_wakeup,blank
+	jam 0,mem_sensor_shutdown_flag
+	branch g24_transmit_no_ack
+
+mouse_24g_transmit_start:
+	fetch 1,mem_sensor_shutdown_flag
+	nbranch g24_short_sleep,blank
+	branch g24_transmit_start_next
+
+
+mouse_24g_stop:
+	set0 mark_24g,mark
+	jam STATE_24G_STOP,mem_24g_conn_sm
+	arg MOUSE_24G_PAIRING_FLAG,queue
+	branch mouse_disable_function_flag
+
+
+mouse_24g_start_mode:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G,mouse_24g_mode_setup_error
+	call mouse_wakeup_from_power_check	// wake from hibernate :enble user
+	branch mouse_24g_reconn_dongle_start,user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,mouse_24g_reconn_general_dongle
+	bbit0 MOUSE_ENABLE_24G_POWER_ON_PAIRING,mouse_24g_reconn_general_dongle
+	call mouse_key_check_once
+	and pdata,0x07,pdata
+	fetcht 1,mem_mouse_commbination_key_24g
+	isub temp,null
+	branch mouse_24g_start_pair_mode,zero
+	branch mouse_24g_reconn_general_dongle
+
+mouse_24g_mode_setup_error:
+	fetch 1,mem_reconn_times
+	nbranch mouse_polling_device,blank
+	rtn
+
+mouse_24g_reconn_dongle_start:
+	fetch 2,mem_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout
+	jam RECEIVER_AND_3_0_ADDR,mem_24g_reconn_type
+	branch g24_reconn_start
+
+
+mouse_24g_first_start_auto_pair_mode:
+	call mouse_wakeup_from_power_check
+	branch mouse_24g_first_start_reconn,user  	// wake from hibernate :enble user
+mouse_24g_reconn_general_dongle:	
+	jam MODE_24G_DEVICE,mem_device_flag
+	fetch 2,mem_mouse_24g_power_on_fast_conn_timer
+	store 2,mem_24g_reconn_timeout
+	jam FAST_CONN_AND_3_0_ADDR,mem_24g_reconn_type
+	branch g24_reconn_start
+
+mouse_24g_start_auto_pair:
+	call mouse_discover_setting_led_gpio
+	fetch 2,mem_24g_pair_timeout_init
+	store 2,mem_24g_reconn_timeout
+	jam PAIR_AND_3_0_ADDR,mem_24g_reconn_type
+	branch g24_reconn_start
+
+
+mouse_24g_first_start_reconn:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_24g_reconn_dongle_start
+	call mouse_bluetooth_fast_conn_disable
+	branch mouse_24g_first_bluetooth_reconnect
+	
+mouse_24g_first_bluetooth_reconnect:
+	call mouse_24g_stop
+	call mouse_device_led_all_off
+	jam MODE_BT_DEVICE1,mem_device_flag
+	call mouse_select_reconn_device
+	branch mouse_start_reconnect_device
+
+mouse_24g_first_bb_event_reconn_timeout:
+	call mouse_wakeup_from_power_check
+	branch mouse_app_enter_hibernate,user
+	branch mouse_start_discovery
+
+
+mouse_24g_first_store_reconn_info:
+	call mouse_wakeup_from_power_check
+	rtn user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_store_device_info_delay
+	rtn
+
+mouse_24g_start_pair_mode:
+	arg MOUSE_24G_PAIRING_FLAG,queue
+	call mouse_enable_function_flag
+	setarg 0
+	store 2,mem_24g_reconn_timeout	
+	call mouse_stop_discovery
+	call mouse_low_voltage_led_blink_disable
+	call mouse_discover_setting_led_gpio
+	jam TYPE_MS,mem_24g_data_type
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,g24_pair_start
+	jam TYPE_KB,mem_24g_data_type
+	branch g24_pair_start
+
+	
+mouse_24g_attempt_fail:
+	fetch 1,mem_24g_attempt_fail_flag
+	nbranch mouse_24g_hibernate_set,blank
+	fetch 1,mem_24g_reconn_type
+	beq FAST_CONN_AND_3_0_ADDR,mouse_24g_fast_conn_attempt_fail
+	beq PAIR_AND_3_0_ADDR,mouse_24g_auto_pair_attempt_fail
+	beq RECEIVER_AND_3_0_ADDR,mouse_reconn_dongle_attempt_fail
+mouse_24g_attempt_fail_enter_hibernate:
+	call mouse_device_led_off
+	call mouse_24g_stop
+	fetch 1,mem_reconn_times
+	nbranch mouse_polling_device,blank
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_app_enter_hibernate
+	rtn
+
+mouse_24g_fast_conn_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_start_auto_pair
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,mouse_24g_start_auto_pair
+	branch mouse_24g_reconn_dongle_start
+
+
+mouse_24g_auto_pair_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	bbit0 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_attempt_fail_enter_hibernate
+	fetch 1,mem_device_number
+	beq 1,mouse_24g_attempt_fail_enter_hibernate		//24g first mode and only 2.4g device
+	branch mouse_24g_first_bluetooth_reconnect
+
+mouse_reconn_dongle_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,mouse_24g_attempt_fail_enter_hibernate
+	bbit1 MOUSE_ENABLE_EEPROM,mouse_24g_attempt_fail_enter_hibernate
+	bbit1 MOUSE_ENABLE_FLASH,mouse_24g_attempt_fail_enter_hibernate
+	branch mouse_24g_start_auto_pair+1
+
+		
+mouse_24g_attempt_success:
+	call mouse_init_sensor_reset
+	jam 0,mem_mouse_long_mult_flag
+	jam 0,mem_24g_conn_sm
+	jam 0,mem_24g_reconn_type
+	fetch 4,mem_24g_receiver_addr
+	fetch 4,mem_24g_fast_conn_addr
+	isub temp,null
+	rtn zero
+	branch mouse_24g_first_store_reconn_info
+	
+mouse_24g_pairing_complete:
+	arg MOUSE_24G_PAIRING_FLAG,queue
+	call mouse_disable_function_flag
+	call mouse_device_poweron_timer_init
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	store 2,mem_24g_reconn_timeout
+	store 1,mem_24g_conn_sm
+	store 1,mem_mouse_move_flag
+	store 1,mem_24g_reconn_type
+
+	call mouse_init_sensor_reset
+	call mouse_read_sensor_common
+	fetch 4,mem_24g_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_mouse_24g_addr
+	branch mouse_store_device_info_delay
+
+mouse_24g_package_data:
+	rtnmark0 mark_24g
+	call mouse_motion
+	nrtn user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,mouse_24g_mouse_package_data
+	fetch 1,mem_customer_key
+	nbranch mouse_24g_keyboard_package_data,blank
+mouse_24g_mouse_package_data:
+	call mouse_data_xy_release
+	fetch 1,mem_24g_data_type
+	bbit1 1,mouse_24g_mouse_package_data_now	// last package is keyboard data
+	fetcht 1,mem_24g_txbuf+1
+	fetch 1,mem_mouse_key
+	ior temp,pdata
+	store 1,mem_mouse_key
+	fetcht 1,mem_24g_txbuf+6
+	fetch 1,mem_mouse_z
+	iadd temp,pdata
+	store 1,mem_mouse_z
+	fetcht 1,mem_24g_txbuf+7
+	fetch 1,mem_mouse_tz
+	iadd temp,pdata
+	store 1,mem_mouse_tz	
+mouse_24g_mouse_package_data_now:	
+	jam TYPE_MS,mem_24g_data_type
+	arg 7,rega	//length
+	arg mem_mouse_key,regb //tx buff
+	fetch 2,mem_mouse_z
+	rtn blank
+	branch g24_transmit_by_interrupt_enable
+
+mouse_24g_keyboard_package_data:
+	jam TYPE_KB,mem_24g_data_type
+	arg 9,rega	//length
+	fetch 1,mem_customer_data_trigger
+	nbranch mouse_customer_key_press,blank
+	arg mem_customer_key_release,regb	//tx buff
+	rtn
+mouse_customer_key_press:
+	arg mem_customer_key_press,regb
+	rtn
+
+
+
+/**************************************g24 search receiver*****************************************/
+
+mouse_24g_search_dongle_init:
+	setarg 0
+	store 3,mem_mouse_search_dongle_action
+	rtn
+
+mouse_24g_search_dongle:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_24G_SEARCH_DONGLE
+	fetch 1,mem_mouse_long_mult_flag
+	rtn blank
+	fetch 1,mem_24g_abort_pac
+	rtn blank
+	fetch 1,mem_mouse_search_dongle_interval
+	increase 1,pdata
+	and_into 3,pdata
+	store 1,mem_mouse_search_dongle_interval
+	nrtn blank	//400ms
+	jam 0,mem_mouse_search_dongle_ch
+mouse_24g_search_dongle_loop:
+	fetch 1,mem_mouse_search_dongle_ch
+	increase 1,pdata
+	store 1,mem_mouse_search_dongle_ch
+	sub pdata,G24_CH_NUMBER,null
+	nbranch mouse_24g_search_dongle_loop_end,positive
+	call g24_reconn_data_prep
+	call g24_transmit_receive_ack
+	nbranch mouse_24g_search_dongle_loop_retry,sync
+	nbranch mouse_24g_search_dongle_loop_retry,user3
+	call mouse_g24_ackpayload_parse
+	call mouse_24g_search_dongle_success
+mouse_24g_search_dongle_loop_end:
+	call g24_txbuf_clear
+	fetch 1,mem_mouse_search_dongle_count
+	increase 1,pdata
+	store 1,mem_mouse_search_dongle_count
+	beq G24_CH_POLL_COUNT,mouse_24g_search_dongle_check
+	rtn
+
+mouse_24g_search_dongle_loop_retry:
+	call g24_ch
+	branch mouse_24g_search_dongle_loop
+
+mouse_24g_search_dongle_check:
+	jam 0,mem_mouse_search_dongle_count
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit1 G24_DISCONN_STATE
+	set1 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
+	fetch 2,mem_mouse_24g_search_dongle_time_init		//3min
+//	store 2,mem_mouse_no_data_timer
+//	branch mouse_sensor_powerdown
+	branch mouse_24g_hibernate_set
+
+
+mouse_24g_search_dongle_success:
+	fetch 1,mem_24g_abort_pac
+	branch mouse_24g_search_dongle_init,blank
+	jam 0,mem_mouse_search_dongle_count
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit0 G24_DISCONN_STATE
+	set0 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
+	call mouse_no_data_timer_init
+	branch mouse_init_sensor_wakeup
+
+mouse_g24_ackpayload_parse:
+	call g24_ackpayload_parse
+	fetch 1,mem_24g_rxbuf+1
+	compare 0x08,pdata,0xf8
+	nrtn true
+	fetch 1,mem_24g_rxbuf+2		// pc sleep mouse ackpayload: 01 08 ff
+	beq 0xff,mouse_24g_hibernate_set
+	rtn
+
+/**************************************g24 search receiver*****************************************/
+
+
+/**************************************g24 new process start********************************************/
+mouse_24g_before_lpm_sleep:
+	fetch 1,mem_device_flag
+	bne MODE_24G_DEVICE,lpm_sleep_skip_cb_function
+	fetch 1,mem_24g_disable_fec1
+	rtn blank
+mouse_peripheral_clock_off:
+	jam 2,core_clksel			//use rc clock
+	fetch 1,core_lpm_ctrl		//close xtal en reg
+	and pdata,0xfc,pdata
+	store 1,core_lpm_reg
+	branch lpm_write_ctrl
+
+/**************************************g24 new process end********************************************/
+
+
+/*******************led*************************/
+mouse_device_poweron_timer:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_POWER_ON_LED
+	fetch 1,mem_mouse_device_poweron_timer_count
+	rtn blank
+	increase -1,pdata
+	store 1,mem_mouse_device_poweron_timer_count
+	branch mouse_device_led_off,blank
+	branch mouse_device_led_on
+	
+mouse_device_poweron_timer_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_POWER_ON_LED
+	call mouse_low_voltage_led_blink_disable
+	fetch 1,mem_mouse_device_poweron_timer_count_init
+	store 1,mem_mouse_device_poweron_timer_count
+	rtn	
+
+	
+mouse_discover_setting_led_gpio:
+	jam 0,mem_mouse_device_poweron_timer_count
+	fetch 2,mem_mouse_disconvey_led_blink_time
+	store 2,mem_mouse_on_time
+	store 2,mem_mouse_off_time	
+mouse_setting_led_gpio_comman:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_device_led_24g
+	beq MODE_BT_DEVICE1,mouse_device_led_bt1
+	beq MODE_BT_DEVICE2,mouse_device_led_bt2
+	rtn
+mouse_device_led_24g:
+	fetch 1,mem_config_device_24g_led_gpio
+	branch mouse_led_blink
+mouse_device_led_bt1:
+	fetch 1,mem_config_device_bt1_led_gpio
+	branch mouse_led_blink
+mouse_device_led_bt2:
+	fetch 1,mem_config_device_bt2_led_gpio
+mouse_led_blink:
+	store 1,mem_temp
+	call mouse_device_led_off
+	fetch 1,mem_temp
+	store 1,mem_mouse_struct_led_gpio
+	arg 0,rega
+	jam UI_LED_STATE_BLINK_START,mem_mouse_led_type
+	branch ui_led_blink_start_global
+
+
+mouse_dpi_led_blink_delay:
+	fetch 1,mem_dpi_led_gpio
+	rtneq GPIO_DISABLE
+	fetch 2,mem_mouse_discovery_timer
+	nrtn blank
+	fetch 2,mem_24g_pair_timeout
+	nrtn blank
+	fetch 2,mem_24g_reconn_timeout
+	nrtn blank
+	fetch 1,mem_mouse_device_poweron_timer_count
+	nrtn blank
+	fetch 1,mem_mouse_dpi_led_delay_count_init
+	branch mouse_dpi_led_blink_init,blank
+	store 1,mem_mouse_dpi_led_delay_count  //delay 1s led blink
+	rtn
+
+
+mouse_dpi_led_blink_delay_timer:
+	arg mem_mouse_dpi_led_delay_count,regc
+	arg mouse_dpi_led_blink_init,regb
+	branch timer_single_step	
+	
+mouse_dpi_led_blink_init:
+	fetch 1,mem_dpi_led_gpio
+	store 1,mem_mouse_struct_led_gpio
+	fetch 2,mem_mouse_dpi_led_blink_time
+	store 2,mem_mouse_on_time
+	store 2,mem_mouse_off_time
+	arg 0,rega
+	fetcht 1,mem_mouse_dpi
+	increase 1,temp
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_DPI_LEVEL_4,mouse_dpi_led_blink_init_end
+	increase 1,temp
+	sub temp,4,null
+	ncall mouse_dpi_led_blink_count_clean,positive		// blink count:2 3 4 1
+mouse_dpi_led_blink_init_end:	
+	storet 1,mem_mouse_blink_count
+	jam UI_LED_STATE_BLINK_START,mem_mouse_led_type
+	rtn
+
+mouse_dpi_led_blink_count_clean:
+	arg 1,temp
+	rtn
+
+mouse_check_dpi_blink:
+	disable user
+	fetch 1,mem_dpi_led_gpio
+	fetcht 1,mem_mouse_struct_led_gpio
+	isub temp,null
+	nrtn zero
+	fetch 1,mem_mouse_blink_count
+	rtn blank
+	jam 0,mem_adc_low_volatage_led_blink_enable
+	enable user
+	rtn
+
+mouse_device_led_all_off:
+	call mouse_dpi_led_off
+	call mouse_device_24g_led_off
+	call mouse_device_bt1_led_off
+	branch mouse_device_bt2_led_off
+
+mouse_device_led_off:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_device_24g_led_off
+	beq MODE_BT_DEVICE1,mouse_device_bt1_led_off
+	beq MODE_BT_DEVICE2,mouse_device_bt2_led_off
+	rtn
+
+mouse_device_24g_led_off:
+	jam 0,mem_24g_device_led_status
+	fetcht 1,mem_config_device_24g_led_gpio
+	branch mouse_led_off
+
+mouse_device_bt1_led_off:
+	fetcht 1,mem_config_device_bt1_led_gpio
+	branch mouse_led_off
+	
+mouse_device_bt2_led_off:
+	fetcht 1,mem_config_device_bt2_led_gpio
+	branch mouse_led_off
+
+mouse_dpi_led_off:
+	fetcht 1,mem_dpi_led_gpio
+	branch mouse_led_off
+
+mouse_device_led_on:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,mouse_device_24g_led_on
+	beq MODE_BT_DEVICE1,mouse_device_bt1_led_on
+	beq MODE_BT_DEVICE2,mouse_device_bt2_led_on
+	rtn
+
+mouse_device_24g_led_on:
+	fetcht 1,mem_config_device_24g_led_gpio
+	branch mouse_led_on
+mouse_device_bt1_led_on:
+	fetcht 1,mem_config_device_bt1_led_gpio
+	branch mouse_led_on
+mouse_device_bt2_led_on:
+	fetcht 1,mem_config_device_bt2_led_gpio
+	branch mouse_led_on
+
+mouse_led_off:
+	bpatch patch1c_0,mem_patch1c
+	storet 1,mem_mouse_struct_led_gpio
+	arg 0,rega
+	branch ui_led_off_global
+mouse_led_on:
+	bpatch patch1c_1,mem_patch1c
+	storet 1,mem_mouse_struct_led_gpio
+	arg 0,rega
+	branch ui_led_on_global
+
+mouse_ui_led_off_static:
+	fetch 1,mem_config_device_24g_led_gpio
+	isub temp,null
+	call mouse_clear_24g_led_statue,zero
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_4_LED,gpio_out_inactive
+	call mouse_check_bt2_led_off
+	call mouse_check_dpi_led_off
+	call mouse_check_low_v_led_off
+	fetch 1,mem_mouse_led_off_4_led
+	branch gpio_out_inactive,blank
+	jam 0,mem_mouse_led_off_4_led
+	branch gpio_set_high_impedance
+
+mouse_ui_led_on_static:
+	fetch 1,mem_config_device_24g_led_gpio
+	isub temp,null
+	call mouse_set_24g_led_statue,zero
+	branch gpio_out_active 
+
+
+mouse_check_bt2_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_BT2_FOR_4_LED
+	fetch 1,mem_config_device_bt2_led_gpio
+	branch mouse_check_1gpio_2led_off
+mouse_check_dpi_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_DPI_FOR_4_LED
+	fetch 1,mem_dpi_led_gpio
+	branch mouse_check_1gpio_2led_off
+mouse_check_low_v_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_LOW_V_FOR_4_LED
+	fetch 1,mem_config_low_voltage_alarm_gpio
+mouse_check_1gpio_2led_off:
+	isub temp,null
+	nrtn zero
+	jam 1,mem_mouse_led_off_4_led
+	rtn
+
+mouse_clear_24g_led_statue:
+	jam 0,mem_24g_device_led_status
+	rtn
+
+mouse_set_24g_led_statue:
+	jam 1,mem_24g_device_led_status
+	rtn
+
+mouse_low_voltage_led_timer:
+	fetch 2,mem_mouse_discovery_timer
+	nrtn blank
+	fetch 2,mem_24g_pair_timeout
+	nrtn blank
+	fetch 2,mem_24g_reconn_timeout
+	nrtn blank
+	fetch 1,mem_mouse_device_poweron_timer_count
+	nrtn blank
+	call mouse_check_dpi_blink
+	rtn user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_LOW_VOLTAGE_LED
+	rtnbit0 MOUSE_LOW_VOLTAGE_FLAG
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND,mouse_low_voltage_led_blink_new_data
+	fetch 1,mem_adc_low_volatage_led_timer_count
+	increase 1,pdata
+	store 1,mem_adc_low_volatage_led_timer_count
+	sub pdata,20,null
+	ncall mouse_adc_low_volatage_led_timer_count_clean,positive
+	beq 2,mouse_low_voltage_led_on
+	beq 4,mouse_low_voltage_led_off
+	beq 6,mouse_low_voltage_led_on
+	beq 8,mouse_low_voltage_led_off
+	rtn
+mouse_adc_low_volatage_led_timer_count_clean:
+	jam 1,mem_adc_low_volatage_led_timer_count
+	branch mouse_low_voltage_led_off
+mouse_low_voltage_led_on:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED,mouse_device_led_on
+	fetch 1,mem_config_low_voltage_alarm_gpio
+	rtneq GPIO_DISABLE
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	branch mouse_led_on
+mouse_low_voltage_led_off:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED,mouse_device_led_off
+	fetch 1,mem_config_low_voltage_alarm_gpio
+	rtneq GPIO_DISABLE
+	fetcht 1,mem_config_low_voltage_alarm_gpio
+	branch mouse_led_off
+
+mouse_low_voltage_led_blink_new_data:
+	fetch 2,mem_mouse_no_data_timeout
+	fetcht 2,mem_mouse_no_data_timer
+	isub temp,temp
+	fetch 2,mem_adc_low_volatage_led_blink_timer
+	isub temp,null
+	nbranch mouse_low_voltage_led_blink_disable,positive
+	fetch 1,mem_adc_low_volatage_led_blink_enable
+	nrtn blank
+	jam 1,mem_adc_low_volatage_led_blink_enable
+	branch mouse_low_voltage_led_blink_init
+	
+mouse_low_voltage_led_blink_init:
+	fetch 2,mem_mouse_low_v_led_blink_time
+	store 2,mem_mouse_on_time
+	store 2,mem_mouse_off_time
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED,mouse_setting_led_gpio_comman
+	fetch 1,mem_config_low_voltage_alarm_gpio
+	rtneq GPIO_DISABLE
+	branch mouse_led_blink
+
+mouse_low_voltage_led_blink_disable:
+	jam 0,mem_adc_low_volatage_led_blink_enable
+	branch mouse_low_voltage_led_off
+
+
+mouse_low_voltage_led_no_enter_lpm:	
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_LOW_VOLTAGE_LED
+	rtnbit0 MOUSE_LOW_VOLTAGE_FLAG
+	bbit1 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND,mouse_low_voltage_led_no_enter_lpm_blink
+	fetch 1,mem_adc_low_volatage_led_timer_count
+	sub pdata,10,null
+	branch mouse_lpm_mode_clear,positive
+mouse_low_voltage_led_no_enter_lpm_next:	
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,g24_transmit_by_interrupt_exit_check
+	jam 1,mem_lpm_mode
+	rtn
+
+g24_transmit_by_interrupt_exit_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag	
+	rtnbit1 MOUSE_ENABLE_24G_250Hz	
+	branch g24_transmit_by_interrupt_exit
+
+mouse_lpm_mode_clear:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,g24_transmit_by_interrupt_enable
+	jam 0,mem_lpm_mode
+	rtn
+
+mouse_low_voltage_led_no_enter_lpm_blink:
+	fetch 1,mem_adc_low_volatage_led_blink_enable
+	nbranch mouse_lpm_mode_clear,blank
+	branch mouse_low_voltage_led_no_enter_lpm_next
+	
+	
+/*******************led*************************/	
+mouse_store_signal_rssi:
+	call rssi_hex2dec
+	fetch 1,mem_rssi
+	branch rssi_signal
+
+mouse_le_transmit:
+	call mouse_store_signal_rssi
+	branch power_ctrl_start
+
+mouse_bt_slave_match:
+	call mouse_store_signal_rssi
+	fetch 1,mem_state
+	isolate1 state_inconn,pdata
+	nrtn true
+	fetch 1,mem_arq
+	isolate1 wack,pdata
+	call power_ctrl_pac_succ_decrs,true
+	ncall power_ctrl_pac_succ_incrs,true
+	branch power_ctrl_start
+
+mouse_le_set_lpm_mult:
+	fetch 1,mem_le_connect_status_flag
+	compare 3,pdata,3
+	nbranch disable_blank,true
+	call app_lpm_mult_enable
+	branch enable_blank
+
+mouse_bt_set_lpm_mult:
+	call l2cap_malloc_is_fifo_empty
+	nrtn blank
+	jam 1,mem_current_sniff_attempt
+	jam 0,mem_current_sniff_timeout
+	branch enable_blank
+
+mouse_set_lpm_mult:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,mouse_le_set_lpm_mult
+	branch mouse_bt_set_lpm_mult
+
+endif
+
+
+
Index: mouse_public_3mode_usb/program/app_remote_car.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_remote_car.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_remote_car.prog	(working copy)
@@ -0,0 +1,393 @@
+ifdef COMPILE_REMOTE_CAR
+
+remote_car_init:
+	rtn wake	
+	call keyscan_key_init
+	setarg remote_car_g24_package_data
+	store 2,mem_cb_24g_transmit_data
+
+	setarg remote_car_process_lpm_before
+	store 2,mem_cb_24g_lpm_before
+	
+	setarg remote_car_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+	
+	setarg remote_car_scale_process_idle
+	store 2,mem_cb_idle_process	
+	
+	setarg remote_car_scale_process_bb_event
+	store 2,mem_cb_bb_event_process
+
+	setarg remote_car_event_timer
+	store 2,mem_cb_event_timer
+	
+	setarg remote_car_power_off_signal
+	store 2,mem_remote_car_power_off_cb
+	
+	setarg remote_car_soft_switch_power_on_signal
+	store 2,mem_remote_car_power_standby_cb
+	
+	
+	bpatch patch1c_2,mem_patch1c
+	call set_eeprom_size_2k
+	call remote_car_init_environment
+
+	call queue_init
+	fetch 1,mem_remote_car_config_soft_switch_enable
+	store 1,mem_remote_car_hard_soft_switch
+	beq HARD_SWITCH, remote_car_hard_switch_power_on_signal
+	fetch 1,mem_remote_car_config_soft_switch_gpio
+	store 1,mem_ui_button_gpio
+remote_car_soft_switch_power_on_init:
+	call remote_car_ui_led_init
+	call ui_button_init
+	call ui_button_polling
+	jam POWER_STARTING,mem_remote_car_power_state
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+	branch app_enter_hibernate
+
+
+
+remote_car_hard_switch_power_on_signal:
+	jam POWER_STANDBY,mem_remote_car_power_state
+remote_car_soft_switch_power_on_signal:
+	call remote_car_ui_led_init
+	arg 0,rega
+	call ui_led_blink_start_global
+	call remote_car_set_24g_addr_eeprom
+	call iicd_read_eep_data
+	call g24_factory_check
+	branch g24_pair_start,user
+	fetch 4,mem_24g_addr
+	store 4,mem_24g_receiver_addr
+	fetch 2,mem_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout
+	branch g24_reconn_start
+
+remote_car_set_24g_addr_eeprom:
+	arg 4,temp
+	arg mem_24g_addr,rega
+	arg REMOTE_INFO_EEPROM_OFFECT,regb
+	rtn
+
+
+remote_car_power_off_signal:	
+remote_car_ui_led_init:
+	bpatch patch1c_3,mem_patch1c
+	fetch 1,mem_remote_car_config_connect_led_gpio
+	bne INVALID_PIN_NUM,remote_car_pairing_led_gpio_set
+remote_car_ui_led_init_1:
+	fetcht 1, mem_remote_car_led_map
+	branch gpio_config_output
+remote_car_pairing_led_gpio_set:
+	store 1,mem_remote_car_led_map
+	branch remote_car_ui_led_init_1
+
+
+remote_car_init_environment:
+	call g24_transmit_init
+remote_no_data_timer_init:
+	fetch 2,mem_remote_car_no_data_timeout
+	store 2,mem_remote_car_no_data_timer
+	rtn
+
+remote_car_le_before_hibernate:
+	call remote_car_process_lpm_before
+remote_gpio_set_before_hibernate:
+	fetch 1,mem_remote_style_struct_led_gpio
+	set1 7,pdata
+	arg gpcfg_output_high,temp
+	branch gpio_config_function
+
+remote_car_process_lpm_before:
+	call gpio_set_before_lpm
+	branch keyscan_process_lpm_before
+
+remote_car_key_scan_process:
+	call keyscan_key_process
+	call get_remote_key_state
+	call remote_conn_led_state
+	branch send_data
+
+remote_conn_led_state:
+	fetch 1,mem_remote_car_24g_status
+	rtnne WORK_PAIRED
+	fetch 4,mem_remote_car_motor1_key0_press_state
+	branch remote_car_stop_state,blank
+	jam 0,mem_remote_car_no_data_check
+	enable user
+	branch check_51cmd_led_on
+remote_car_stop_state:
+	fetch 1,mem_remote_car_no_data_check
+	rtneq 0xff
+	pincrease 1
+	store 1,mem_remote_car_no_data_check
+	disable user
+	branch check_51cmd_led_off
+
+	
+get_remote_key_state:
+	fetcht 2,mem_key_value_retention
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor1_key0_press_state
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor1_key1_press_state
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor2_key2_press_state
+	and temp,0x01,pdata
+	rshift temp,temp
+	store 1,mem_remote_car_motor2_key3_press_state
+	rtn
+send_data:
+	bpatch patch1c_4,mem_patch1c
+	call remote_car_fb_check
+	call remote_car_lr_check
+	call remote_car_no_data_timeout_check
+	nrtn user
+	branch remote_car_send_key 
+
+
+remote_car_no_data_timeout_check:
+	fetch 1,mem_remote_car_24g_status
+	rtnne WORK_PAIRED
+	fetch 1,mem_remote_car_no_data_check
+	rtn blank
+	sub pdata,1,null
+	nrtn positive
+	fetch 2,mem_24g_reconn_timeout_init
+	store 2,mem_24g_reconn_timeout
+	enable user
+	rtn
+
+
+	
+remote_car_fb_check:
+	fetch 1,mem_remote_car_motor1_key0_press_state
+	nbranch remote_car_send_motor1_key0_press,blank
+	fetch 1,mem_remote_car_motor1_key1_press_state
+	nbranch remote_car_send_motor1_key1_press,blank
+	branch remote_car_send_motor1_key0_rel
+	
+remote_car_lr_check:
+	fetch 1,mem_remote_car_motor2_key2_press_state
+	nbranch remote_car_send_motor2_key2_press,blank
+	fetch 1,mem_remote_car_motor2_key3_press_state
+	nbranch remote_car_send_motor2_key3_press,blank
+	branch remote_car_send_motor2_key2_rel
+
+
+remote_car_scale_process_idle:
+	call remote_car_24g_status_process
+	branch remote_car_key_scan_process
+
+remote_car_scale_process_bb_event:
+	copy regc,pdata
+	beq BT_EVT_BUTTON_UP,app_event_button_up
+	beq BT_EVT_BUTTON_LONG_PRESSED,app_button_long_pressed
+	beq BT_EVT_24G_PAIRING_COMPLETE,remote_car_24g_pairing_complete
+	beq BT_EVT_24G_ATTEMPT_SUCCESS,remote_car_24g_attempt_success
+	beq BT_EVT_24G_ATTEMPT_FAIL,remote_car_24g_attempt_fail
+	rtn
+
+remote_car_24g_attempt_fail:
+	branch g24_txbuf_clear
+
+remote_car_24g_pairing_complete:
+	call remote_car_set_24g_addr_eeprom
+	call iicd_write_protect_eep_data
+remote_car_24g_attempt_success:
+	jam 0,mem_24g_conn_sm
+	jam WORK_PAIRED,mem_remote_car_24g_auto_work_step
+	jam WORK_PAIRED,mem_remote_car_24g_pair_success_flag
+	rtn
+
+remote_car_24g_status_process:
+	fetch 1,mem_remote_car_24g_auto_work_step
+	rtneq POWER_ON
+	fetch 1,mem_remote_car_24g_status
+	rtneq WORK_PAIRED
+	jam WORK_PAIRED,mem_remote_car_24g_status
+remote_car_scale_process_paired:
+	arg 0,rega
+	branch ui_led_off_global
+remote_car_scale_process_shutdown:
+	arg 0,rega
+	call ui_led_off_global
+	call remote_car_ui_led_init
+	branch app_enter_hibernate
+	
+remote_car_event_timer:
+	call app_power_timer
+	call g24_pair_timeout_timer
+	call g24_reconn_timeout_timer	
+	branch remote_car_no_data_timer
+
+remote_car_no_data_timer:
+	fetch 1,mem_remote_car_config_timeout_shutdown_enable
+	rtn blank
+	fetch 1,mem_key_value_retention
+	nbranch remote_no_data_timer_init,blank
+	arg mem_remote_car_no_data_timer,regc
+	arg remote_car_scale_process_shutdown,regb
+	branch timer_single_step_2B
+
+
+//cross key,control front-back motor layout
+remote_car_send_motor1_key0_press:	//front
+	jam MOTOR_POSITIVE,mem_remote_car_24g_motor1_payload
+	rtn
+remote_car_send_motor1_key1_press:	//back
+	jam MOTOR_NEGATIVE,mem_remote_car_24g_motor1_payload
+	rtn
+remote_car_send_motor2_key2_press:	//left
+	jam MOTOR_POSITIVE,mem_remote_car_24g_motor2_payload
+	rtn
+remote_car_send_motor2_key3_press:	//right
+	jam MOTOR_NEGATIVE,mem_remote_car_24g_motor2_payload
+	rtn
+
+
+remote_car_send_motor1_key0_rel:
+remote_car_send_motor1_key1_rel:
+	jam MOTOR_STOP,mem_remote_car_24g_motor1_payload
+	rtn
+remote_car_send_motor2_key2_rel:
+remote_car_send_motor2_key3_rel:
+	jam MOTOR_STOP,mem_remote_car_24g_motor2_payload
+	rtn
+	
+remote_car_send_key:
+	arg mem_remote_car_24g_motor_packet,rega
+	branch queue_push
+remote_car_send_attack:
+	arg mem_remote_car_24g_fire_packet,rega
+	branch queue_push
+
+remote_car_g24_package_data:
+	fetch 1,mem_remote_car_24g_pair_success_flag
+	beq WORK_PAIRED,remote_car_g24_send_empty
+	arg mem_remote_car_24g_tx_temp,rega
+	call queue_pop
+	nbranch remote_car_moto_data,user
+remote_car_g24_package_data_continue:
+	arg mem_remote_car_24g_tx_temp,contr
+	ifetch 1,contr
+	copy pdata,rega
+	arg mem_remote_car_24g_tx_temp+1,regb
+	//rega: length
+	//regb: tx buffer
+	rtn
+	
+remote_car_g24_send_empty:
+	jam 0,mem_remote_car_24g_pair_success_flag
+	enable user
+	arg 1,rega
+	arg mem_remote_car_empty_packet,regb
+	rtn
+	
+remote_car_moto_data:
+	fetch 1,mem_remote_car_24g_tx_temp+3	//cmd
+	beq CAR_CMD_L_R_MOTOR_CONTROL,remote_car_moto_data_next
+	beq CAR_CMD_F_B_MOTOR_CONTROL,remote_car_moto_data_next
+	rtn
+remote_car_moto_data_next:
+	fetch 1,mem_remote_car_24g_tx_temp+6	//data moto1
+	nbranch remote_car_moto_data_enable_user,blank
+	fetch 1,mem_remote_car_24g_tx_temp+8	//data moto2
+	nbranch remote_car_moto_data_enable_user,blank
+	fetch 1,mem_remote_car_24g_tx_temp+10	//data moto3
+	nbranch remote_car_moto_data_enable_user,blank
+	rtn
+remote_car_moto_data_enable_user:
+	enable user
+	branch remote_car_g24_package_data_continue
+
+
+
+/*************remote car default_init starting*********************/
+remote_car_default_init:
+	jam 0x14,mem_ui_button_timeout
+	jam 0x01,mem_ui_button_last_state
+	setarg 0x060f
+	store 2,mem_remote_car_queue_each_size
+	setarg mem_remote_car_queue_each_size
+	store 2,mem_queue_ptr
+	jam 0x01,mem_lpm_mode
+	jam 0x06,mem_lpm_overhead
+	jam 0x02,mem_lpm_mult_timeout
+	jam 0x00,mem_remote_car_hard_soft_switch
+	setarg mem_remote_style_led_type
+	store 2,mem_ui_led_struct_ptr
+	jam 0x01,mem_ui_led_struct_num
+	jam 0xff,mem_remote_style_blink_count
+	setarg 0x0296
+	store 2,mem_remote_style_on_time
+	setarg 0x073a
+	store 2,mem_remote_style_off_time
+	setarg mem_remote_car_soft_power
+	store 2,mem_power_param_ptr
+	setarg 0x0c0c
+	store 2,mem_remote_car_power_off_timeout
+	setarg mem_remote_car_keyscan
+	store 2,mem_keyscan_ptr
+	jam 0x00,mem_remote_car_config_soft_switch_enable
+	jam 0xff,mem_remote_car_config_connect_led_gpio
+	jam 0xff,mem_remote_car_config_soft_switch_gpio
+	jam 0x00,mem_remote_car_config_key_map
+	jam 0x00,mem_remote_car_config_layout
+	jam 0x00,mem_remote_car_config_check_way
+	jam 0x01,mem_remote_car_config_timeout_shutdown_enable
+	setarg 0x4e55
+	store 2,mem_current_vdd_value_default_mid_x
+	store 2,mem_current_vdd_value_default_mid_y
+	setarg 0x0007
+	store 2,mem_current_vdd_default_range
+	jam 0x02,mem_adc_config_flag
+	setsect 0,0x35a0c
+	setsect 1,0x11a
+	setsect 2,0x60
+	setsect 3,0x28
+	store 9,mem_remote_car_24g_motor_packet
+	setsect 0,0x2000a
+	setsect 1,0x02
+	istore 4,contw
+	setsect 0,0x35a08
+	setsect 1,0x19a
+	setsect 2,0x00
+	setsect 3,0x00
+	store 9,mem_remote_car_24g_fire_packet
+	setarg 0x0064
+	store 2,mem_remote_car_no_data_timeout
+	jam TX_POWER_0DB,mem_tx_power
+	jam 0x01,mem_24g_data_type		//24g init
+	jam 0x06,mem_24g_max_retry
+	jam 0x01,mem_24g_pair_switch
+	jam 0x00,mem_24g_fast_conn_enable
+	call g24_rx_window_init
+	call g24_interval_param_8ms
+	call g24_chmap_param_init
+	call g24_pair_param_init
+	setarg 0x0708
+	store 2,mem_24g_pair_timeout_init
+	setarg 0x0050
+	store 2,mem_24g_reconn_timeout_init
+	setarg 0x0a7700
+	store 3,mem_24g_long_sleep_set
+	setarg 0x604800
+	store 3,mem_24g_enter_hibernate
+	branch app_sys_param_init
+
+/*************remote car default_init ending*********************/
+
+else
+remote_car_init:
+	rtn
+endif
+
+
+
+
Index: mouse_public_3mode_usb/program/app_shutter.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_shutter.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/app_shutter.prog	(working copy)
@@ -0,0 +1,1026 @@
+
+ifdef COMPILE_SHUTTER
+
+//define CLASSIC_SHUTTER_FUCTION
+
+shutter_init:
+	call enable_authrom
+	rtn wake
+	setarg shutter_le_before_hibernate
+	store 2,mem_cb_before_hibernate
+
+	setarg shutter_process_lpm_before
+	store 2,mem_cb_before_lpm
+	
+	setarg app_enter_hibernate
+	store 2,mem_cb_discovry_timeout
+	
+	setarg shutter_process_idle
+	store 2,mem_cb_idle_process
+		
+	setarg shutter_process_bb_event 
+	store 2,mem_cb_bb_event_process
+
+	setarg shutter_le_scale_lpm_lock
+	store 2,mem_cb_check_wakelock
+	
+	setarg ble_shutter_receive_data
+	store 2,mem_cb_att_write
+
+	setarg shutter_le_bb_event_timer
+	store 2,mem_cb_event_timer
+
+	setarg shutter_key_change
+	store 2,mem_cb_shutter_keycan
+
+	setarg shutter_soft_swtich_power_on
+	store 2,mem_shutter_soft_switch_poweron_callback_function
+	setarg shutter_soft_swtich_power_off
+	store 2,mem_shutter_soft_switch_poweroff_callback_function
+
+	call shutter_set_ble_version
+	call le_modified_name
+	call shutter_init_param	
+	call keyscan_key_init
+	call queue_init
+	call ui_led_init_global
+	
+	bpatch patch1c_5,mem_patch1c
+	call shutter_load_buffer_config_form_DataRom
+ifdef CLASSIC_SHUTTER_FUCTION
+	call shutter_load_bluetooth_config_by_eeprom
+	call shutter_random_mac_addr
+	call classic_shutter_load_reconn_info
+endif
+	fetch 1, mem_shutter_hard_soft_switch_case
+	beq HARD_SWITCH, shutter_hart_swtich_power_on
+	fetch 1,mem_shutter_soft_switch_button_gpio
+	store 1,mem_ui_button_gpio
+	branch ui_soft_swtich_init
+
+shutter_set_ble_version:
+	//set ble version  4.1 
+	jam 7,mem_lmp_version
+	rtn
+
+/**************hard swtich function**************/
+shutter_hart_swtich_power_on:
+	jam UI_BUTTON_GPIO_DISABLE,mem_ui_button_gpio
+	jam SS_STATE_POWER_ON,mem_shutter_soft_switch_power_state
+	branch shutter_start_reconnect
+/****************************/
+
+/**************lpm lock callback function**************/
+shutter_le_scale_lpm_lock:
+	fetch 1,mem_shutter_soft_switch_power_state
+	beq SS_STATE_POWER_OFF,app_get_lpm_wake_lock
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	nbranch app_get_lpm_wake_lock,blank
+	branch app_put_lpm_wake_lock
+/****************************/
+
+/**************c512bt event callback function*************/
+shutter_process_bb_event:
+	copy regc,pdata
+	
+ifdef CLASSIC_SHUTTER_FUCTION
+/**************classic shutter event*****************/
+	beq BT_EVT_BB_CONNECTED,classic_shutter_process_baseband_connect
+	beq BT_EVT_BB_DISCONNECTED,classic_shutter_process_baseband_disconnect
+	beq BT_EVT_RECONN_FAILED,classic_shutter_process_reconnect_failed
+	beq BT_EVT_SETUP_COMPLETE,classic_shutter_process_setup_complete
+	beq BT_EVT_HID_CONNECTED,app_hid_connected
+	beq BT_EVT_HID_DISCONNECTED,classic_shutter_process_hid_disconnect
+	beq BT_EVT_HID_HANDSHAKE,classic_shutter_process_hid_handshake
+	beq BT_EVT_RECONN_PAGE_TIMEOUT,classic_shutter_process_reconnect_page_timeout
+	beq BT_EVT_VIRTUAL_CABLE_UNPLUG,classic_shutter_process_virtual_cable_unplug
+	beq BT_EVT_REMOTE_UNSNIFF,classic_shutter_process_remote_unsniff
+	beq BT_EVT_STORE_NVRAM,classic_shutter_process_store_reconnect_information
+endif
+/**************ble shutter event*****************/
+	beq BT_EVT_LE_CONNECTED,ble_shutter_process_baseband_connect
+	beq BT_EVT_LE_DISCONNECTED,ble_shutter_process_baseband_disconnect
+	beq BT_EVT_LE_RECONNECT_COMPLETE,ble_shutter_process_reconnect_complete
+	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,ble_shutter_process_parse_connect_parameter_update_response
+/***************soft swtich event****************/
+	beq BT_EVT_BUTTON_LONG_PRESSED,shutter_process_soft_swtich_button_long_press
+	beq BT_EVT_BUTTON_DOWN,shutter_process_soft_swtich_button_down
+	beq BT_EVT_BUTTON_UP,shutter_process_soft_swtich_button_up
+	rtn
+/****************************/
+
+ifdef CLASSIC_SHUTTER_FUCTION
+/******************classic shutter event**********************/
+classic_shutter_process_baseband_connect:
+	jam 0,mem_classic_shutter_hid_disconn_count
+	jam 0,mem_classic_shutter_cable_unplug_conut	
+	rtn
+
+
+classic_shutter_process_baseband_disconnect:
+	call classic_shutter_disconnect_clear_flag
+	branch classic_shutter_process_reconnect_failed
+
+classic_shutter_disconnect_clear_flag:
+	jam APP_HANDSHAKE_NULL,mem_app_handshake_flag
+	jam 0,mem_hid_handshake_timer_count
+	jam 0,mem_unsniff2sniff_timer_count
+	jam 0,mem_classic_shutter_cable_unplug_conut
+	jam 0,mem_classic_shutter_hid_disconn_count
+	branch queue_init
+
+
+classic_shutter_process_reconnect_failed:
+	call app_disconn_reason_clear
+	branch shutter_start_bluetooth_discovery
+
+
+classic_shutter_process_setup_complete:
+	call shutter_stop_bluetooth_discovery
+	branch app_led_stop_blink
+
+
+classic_shutter_process_hid_disconnect:
+	jam 0,mem_classic_shutter_cable_unplug_conut	
+	setarg FLAG_SHUTTER_HID_DISCONN_TIMEOUT
+	store 1,mem_classic_shutter_hid_disconn_count
+	rtn
+
+
+classic_shutter_process_hid_handshake:
+	fetch 1,mem_app_handshake_flag
+	rtneq APP_HANDSHAKE_DONE
+	jam APP_HANDSHAKE_DONE,mem_app_handshake_flag
+	call app_lpm_mult_enable
+	call app_store_reconn_info
+	call shutter_stop_bluetooth_discovery
+	call app_led_off
+	branch app_bt_enter_sniff
+
+
+classic_shutter_process_reconnect_page_timeout:
+	branch classic_shutter_process_reconnect_failed
+
+
+classic_shutter_process_virtual_cable_unplug:
+	setarg FLAG_SHUTTER_CABLE_UNPLUG_TIMEOUT
+	store 1,mem_classic_shutter_cable_unplug_conut
+	rtn
+
+
+classic_shutter_process_remote_unsniff:
+	branch app_start_auto_sniff
+
+
+/***************classic shutter store reconn info***********************/
+classic_shutter_process_store_reconnect_information:
+	arg NVRAM_EEPROM_OFFSET,regb
+	fetch 1,mem_nv_data_number
+	mul32 pdata,34,temp
+	fetch 2,mem_nv_data_ptr
+	copy pdata,rega
+	branch iicd_write_eep_data
+
+classic_shutter_load_reconn_info:
+	arg NVRAM_EEPROM_OFFSET,regb
+	fetch 1,mem_shutter_bluetooth_type
+	rtnbit0 CLASSIC_SHUTTER
+	fetch 1,mem_nv_data_number
+	rtn blank
+	mul32 pdata,34,temp
+	fetch 2,mem_nv_data_ptr
+	copy pdata,rega
+	branch iicd_read_eep_data
+/**************************************/
+endif
+/******************ble shutter event**********************/
+ble_shutter_process_baseband_connect:
+	call shutter_stop_bluetooth_discovery
+	setarg 0
+	store 2,mem_ble_shutter_reconn_timer
+	branch app_led_off
+
+
+ble_shutter_process_baseband_disconnect:
+	call queue_init
+	jam 0,mem_ble_shutter_enable_notify
+	branch shutter_start_reconnect
+
+
+ble_shutter_process_reconnect_complete:
+	call queue_init
+	jam 1,mem_ble_shutter_enable_notify
+	fetch 8,mem_ble_shutter_interval_min
+	store 8,mem_le_interval_min
+	call app_lpm_mult_enable
+	branch le_l2cap_tx_update_req
+
+
+ble_shutter_process_parse_connect_parameter_update_response:
+	fetch 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	rtneq BLE_SIGNALING_CONNECT_PARAMETER_UPDATE_ACCEPTED
+	fetch 8,mem_ble_shutter_interval_min_new
+	rtn blank
+	store 8,mem_le_interval_min
+	branch le_l2cap_tx_update_req
+/**************************************/
+
+/******************soft swtich event**********************/
+shutter_process_soft_swtich_button_long_press:
+	branch ui_soft_switch_botton_long_press
+
+shutter_process_soft_swtich_button_down:
+	fetch 1,mem_shutter_hard_soft_switch_case
+	rtneq HARD_SWITCH
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	call shutter_store_currenct_led_state
+	branch app_led_on
+	
+shutter_store_currenct_led_state:
+	jam 1,mem_shutter_soft_swtich_botton_down
+	arg 11,loopcnt
+	arg mem_shutter_soft_swtich_led_struct_temp,contw
+	arg mem_shutter_led_struct_app_led,contr
+	branch memcpy
+	
+shutter_process_soft_swtich_button_up:
+	fetch 1,mem_shutter_hard_soft_switch_case
+	rtneq HARD_SWITCH
+	fetch 1,mem_shutter_soft_switch_power_state
+	beq SS_STATE_POWER_ON,shutter_load_currenct_led_state
+	branch ui_soft_switch_botton_up
+
+shutter_load_currenct_led_state:
+	fetch 1,mem_shutter_soft_swtich_botton_down
+	rtnne 1
+	jam 0,mem_shutter_soft_swtich_botton_down
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_CONNECTED,app_led_off
+	bbit1 UI_STATE_BLE_CONNECTED,app_led_off
+	arg 11,loopcnt
+	arg mem_shutter_soft_swtich_led_struct_temp,contr
+	arg mem_shutter_led_struct_app_led,contw
+	branch memcpy
+	
+/**************************************/
+
+
+shutter_le_bb_event_timer:
+/**************shutter check sleep timer**********************/
+	call shutter_check_sleep_timer
+/************************************/
+/**************soft reset power off timer**********************/
+	call shutter_check_power_off_timer
+/************************************/
+
+ifdef CLASSIC_SHUTTER_FUCTION
+/**************classic shutter timer**********************/
+	call classic_shutter_check_unplug_timer
+	call classic_shutter_hid_handshake_timer
+	call classic_shutter_hid_disconn_timer
+/************************************/
+endif
+/**************ble shutter timer**********************/
+	branch ble_shutter_reconn_timer
+/************************************/
+
+/**************shutter check sleep timer**********************/
+shutter_check_sleep_timer:
+	arg mem_shutter_sleep_timer,regc
+	arg shutter_sleep_timeout,regb
+	branch timer_single_step_2B
+shutter_sleep_timeout:
+	jam SS_STATE_POWER_OFF,mem_shutter_soft_switch_power_state
+	call app_led_off
+	call shutter_disconnect_current_connection
+	branch shutter_wait_power_off
+
+/**************soft reset power off timer**********************/
+shutter_check_power_off_timer:
+	arg mem_shutter_power_off_timer,regc
+	arg shutter_check_power_off_timeout,regb
+	branch timer_single_step
+
+shutter_check_power_off_timeout:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,shutter_wait_power_off
+	bbit1 UI_STATE_BT_CONNECTED,shutter_wait_power_off
+	fetch 1,mem_shutter_led_struct_app_led_type
+	beq UI_LED_STATE_BLINK_START,shutter_wait_power_off
+	beq UI_LED_STATE_BLINK_LIGHTING,shutter_wait_power_off
+	beq UI_LED_STATE_BLINK_DARKING,shutter_wait_power_off
+	branch app_enter_hibernate
+/************************************/
+ifdef CLASSIC_SHUTTER_FUCTION
+/**************classic shutter timer**********************/
+classic_shutter_check_unplug_timer:
+	arg mem_classic_shutter_cable_unplug_conut,regc
+	arg classic_shutter_unplug_timeout,regb
+	branch timer_single_step
+	
+classic_shutter_unplug_timeout:
+	fetch 1,mem_CONTROL_tasks
+	set1  L2CAP_DISCONNECT_INTERRUPT, pdata
+	set1  L2CAP_DISCONNECT_CONTROL, pdata
+	store 1,mem_CONTROL_tasks	
+	rtn
+
+classic_shutter_hid_handshake_timer:
+	arg mem_hid_handshake_timer_count,regc
+	arg classic_shutter_process_hid_handshake,regb
+	branch timer_single_step
+
+classic_shutter_hid_disconn_timer:
+	arg mem_classic_shutter_hid_disconn_count,regc
+	arg app_bt_disconnect,regb
+	branch timer_single_step
+
+/************************************/
+endif
+/**************ble shutter timer**********************/
+ble_shutter_reconn_timer:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	arg mem_ble_shutter_reconn_timer,regc
+	arg shutter_start_bluetooth_discovery,regb
+	branch timer_single_step_2B
+/************************************/
+
+shutter_process_idle:
+	call shutter_send_data_to_master
+	branch keyscan_key_process
+
+
+shutter_process_lpm_before:
+	call gpio_set_before_lpm
+	branch keyscan_process_lpm_before
+
+shutter_le_before_hibernate:
+	call gpio_set_before_lpm
+	branch disable_authrom
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+
+/****************shutter bluetooth control**********************/
+shutter_stop_bluetooth_discovery:
+	fetch 1,mem_shutter_bluetooth_type
+ifdef CLASSIC_SHUTTER_FUCTION	
+	bbit1 CLASSIC_SHUTTER,classic_shutter_stop_bluetooth_discovery
+endif	
+	bbit1 BLE_SHUTTER,ble_shutter_stop_bluetooth_discovery
+	rtn
+
+ble_shutter_stop_bluetooth_discovery:
+	fetch 2,mem_ble_shutter_connect_timeout
+	store 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+	branch app_ble_stop_adv
+	
+ifdef CLASSIC_SHUTTER_FUCTION	
+classic_shutter_stop_bluetooth_discovery:
+	fetch 2,mem_classic_shutter_connect_timeout
+	store 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+	branch app_bt_stop_discovery
+endif
+
+shutter_start_bluetooth_discovery:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	fetch 1,mem_shutter_bluetooth_type
+ifdef CLASSIC_SHUTTER_FUCTION	
+	bbit1 CLASSIC_SHUTTER,classic_shutter_start_discovery
+endif
+	bbit1 BLE_SHUTTER,ble_shutter_start_discovery
+	rtn
+ifdef CLASSIC_SHUTTER_FUCTION
+classic_shutter_start_discovery:
+	fetch 2,mem_classic_shutter_discovery_timeout,
+	store 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+	branch app_bt_start_discovery_short
+endif
+ble_shutter_start_discovery:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	fetch 2,mem_ble_shutter_discovery_timeout
+	store 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+	fetch 2,mem_ble_shutter_discovery_adv_interval
+	call shutter_ble_adv_interval_set
+	call app_led_start_blink
+	fetch 4,mem_ble_shutter_discovery_blink_on_time
+	store 4,mem_shutter_led_struct_app_led_on_time
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	branch app_ble_start_adv
+
+
+shutter_start_reconnect:
+	fetch 1,mem_shutter_soft_switch_power_state
+	rtnne SS_STATE_POWER_ON
+	fetch 1,mem_shutter_bluetooth_type
+ifdef CLASSIC_SHUTTER_FUCTION	
+	bbit1 CLASSIC_SHUTTER,classic_shutter_start_reconnect
+endif
+	bbit1 BLE_SHUTTER,ble_shutter_start_reconnect
+	rtn
+ifdef CLASSIC_SHUTTER_FUCTION
+classic_shutter_start_reconnect:
+	call app_check_reconn_target
+	branch shutter_start_bluetooth_discovery,blank
+	call app_led_on	
+	call app_bt_stop_discovery
+	branch app_bt_start_reconnect	
+endif
+ble_shutter_start_reconnect:
+	fetch 2,mem_ble_shutter_reconn_timer
+	fetcht 2,mem_ble_shutter_reconn_timeout
+	storet 2,mem_ble_shutter_reconn_timer
+	nrtn blank
+	fetch 2,mem_ble_shutter_reconn_adv_interval
+	call shutter_ble_adv_interval_set
+	call app_led_start_blink
+	fetch 4,mem_ble_shutter_reconn_blink_on_time
+	store 4,mem_shutter_led_struct_app_led_on_time
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	branch app_ble_start_adv
+
+shutter_disconnect_current_connection:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,app_ble_disconnect
+ifdef CLASSIC_SHUTTER_FUCTION
+	bbit1 UI_STATE_BT_CONNECTED,app_bt_disconnect
+endif
+	branch shutter_stop_bluetooth_discovery
+/**************************************/
+ifdef CLASSIC_SHUTTER_FUCTION
+/******************classic shutter load reconnect*********************/
+app_check_reconn_target:
+	fetch 1,mem_nv_data_number
+	copy pdata,loopcnt
+	fetch 2,mem_nv_data_ptr
+	copy pdata,rega
+app_check_reconn_target_loop:
+	ifetch 2,rega
+	beq 0,found_reconn_device
+	increase NV_DATA_LEN,rega
+	loop app_check_reconn_target_loop
+	branch enable_blank
+
+found_reconn_device:
+	ifetch 6,contr
+	store 6,mem_hci_plap
+	increase 10,contr
+	arg mem_link_key,contw
+	call  memcpy16
+	call check_link_key_load
+	branch disable_blank
+	
+/**************************************/
+endif
+/////////////////////////////////////////////////////////////////////////
+//output:if user is enable,mean,can send data
+shutter_check_data_enable:
+	call disable_user
+	fetch 2,mem_ui_state_map
+ifdef CLASSIC_SHUTTER_FUCTION
+	bbit1 UI_STATE_BT_CONNECTED,shutter_check_bt_data_enable
+endif
+	bbit1 UI_STATE_BLE_CONNECTED,shutter_check_ble_data_enable
+	rtn
+
+ifdef CLASSIC_SHUTTER_FUCTION
+shutter_check_bt_data_enable:
+	fetch 1,mem_hid_interrupt_state
+	rtnne 0x3f	
+	branch enable_user
+endif	
+
+shutter_check_ble_data_enable:
+	fetch 1,mem_ble_shutter_enable_notify
+	rtn blank
+	branch enable_user
+/////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////
+//output:if user is enable,mean,bluetooth disconnect
+shutter_check_bluetooth_conn:
+	call disable_user
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BT_CONNECTED
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	branch enable_user
+/////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////
+shutter_change_bluetooth_status_bt_disconn:
+	fetch 1,mem_shutter_bluetooth_type
+ifdef CLASSIC_SHUTTER_FUCTION
+	bbit1 CLASSIC_SHUTTER,classic_shutter_change_bluetooth_status_bt_disconn
+endif
+	bbit1 BLE_SHUTTER,ble_shutter_change_bluetooth_status_bt_disconn
+	rtn
+ifdef CLASSIC_SHUTTER_FUCTION	
+classic_shutter_change_bluetooth_status_bt_disconn:
+	fetch 1,mem_scan_mode
+	rtnne 0x03
+	branch shutter_start_reconnect
+endif
+ble_shutter_change_bluetooth_status_bt_disconn:
+	branch shutter_start_reconnect
+
+/////////////////////////////////////////////////////////////////////////
+
+shutter_check_send_data:
+	disable user2
+	fetch 2,mem_shutter_sleep_timeout
+	store 2,mem_shutter_sleep_timer
+
+	call shutter_check_bluetooth_conn
+	branch shutter_change_bluetooth_status_bt_disconn,user
+	
+	call shutter_check_data_enable
+	nrtn user
+	enable user2
+	rtn
+
+//queue = key index
+//rega =1 press, =0 release
+shutter_key_change:
+	call shutter_check_send_data
+	nrtn user2
+	deposit rega
+	branch shutter_key_release,blank
+shutter_key_press:
+	call app_led_on
+	arg mem_key0_press,regc
+	branch push_queue_press_or_release
+
+shutter_key_release:
+	call app_led_off
+	arg mem_key0_release,regc
+
+push_queue_press_or_release:
+	arg MAX_QUEUE_NUM,pdata
+	imul32 queue,pdata
+	iadd regc,regc
+	
+//input:regc the address that want push to queue buffer
+push_buffer_in_queue:
+	ifetch 1,regc
+	rtn blank
+	call queue_push_one_byte
+	increase 1,regc
+	branch push_buffer_in_queue
+
+
+shutter_send_data_to_master:
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BLE_CONNECTED,pop_queue_to_ble_data
+ifdef CLASSIC_SHUTTER_FUCTION	
+	bbit1 UI_STATE_BT_CONNECTED,pop_queue_to_classic_data
+endif
+	rtn
+
+pop_queue_to_ble_data:
+	call le_fifo_check_nearly_full
+	nrtn blank
+	call queue_pop_one_byte
+	nrtn user
+	pincrease -1
+	mul32 pdata,SHUTTER_BLE_DATA_BUFFER,pdata
+	arg mem_ble_data_buffer1,temp
+	iadd temp,contr
+	branch le_send_notify_from_list
+
+ifdef CLASSIC_SHUTTER_FUCTION
+pop_queue_to_classic_data:
+	call l2cap_malloc_is_fifo_nearly_full
+	nrtn blank
+	call queue_pop_one_byte
+	nrtn user
+	pincrease -1
+	mul32 pdata,SHUTTER_CLASSIC_DATA_BUFFER,pdata
+	arg mem_classic_data_buffer1,temp
+	iadd temp,contr
+	ifetch 5,contr
+	store 5,mem_classic_data_buffer
+classic_send_hid_data:
+	fetch 1,mem_classic_data_buffer
+	copy pdata,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_int_remote_cid
+	istore 2,contw
+	setarg 0xa1
+	istore 1,contw
+	fetch 4,mem_classic_data_buffer + 1
+	istore 9,contw
+	rtn
+endif
+///////////queue function////////////
+//input:pdata is data that want push
+queue_push_one_byte:
+	store 1,mem_pdatatemp
+	arg mem_pdatatemp,rega
+	branch queue_push
+
+queue_pop_one_byte:
+	arg mem_pdatatemp,rega
+	call queue_pop
+	nrtn user
+	fetch 1,mem_pdatatemp
+	rtn
+
+///////////queue function ending////////////
+ble_shutter_receive_data:
+	fetch 2,mem_le_att_handle
+	beq GATT_KEYBOARD_WRITE_HANDLE,ble_shutter_process_reconnect_complete
+	rtn
+
+shutter_init_param:
+	setarg 0x02
+	store 1,mem_shutter_power_off_timeout
+/////////////ble connect interval//////////////
+	setarg 0x00200008
+	store 4,mem_ble_shutter_interval_min		//set min interval is 10ms,set max interval is 40ms
+	setarg 0x012c0005
+	istore 4,contw
+///////////////////////////////////////
+//////////////////MTU/////////////
+	jam 0x17,mem_le_local_mtu
+///////////////////////////////////////
+////////////////justwork/////////
+	setarg 0x1b
+ 	store 2,mem_le_pairing_handle
+ 	call le_set_config_fixed_ltk
+	call le_set_fixed_ltk
+	call le_set_justwork
+	branch le_set_config_read_authentication
+///////////////////////////////////////
+
+shutter_load_buffer_config_form_DataRom:
+///////load data Rom/////////
+ifdef CLASSIC_SHUTTER_FUCTION	
+	arg BT_KEY_VALUE_LIST_SIZE,loopcnt
+	arg mem_classic_data_buffer1,contw
+	arg CLASSIC_SHUTTER_KEY_VALUE_LIST,contr
+	call memcpy_fast
+endif
+	arg BLE_KEY_VALUE_LIST_SIZE,loopcnt
+	arg mem_ble_data_buffer1,contw
+	arg BLE_SHUTTER_KEY_VALUE_LIST,contr
+	branch memcpy_fast
+
+shutter_load_ble_gatt_form_DataRom:
+	arg BLE_GATT_LIST_SIZE,loopcnt
+	arg BLE_SHUTTER_GATT_LIST,contr
+	branch memcpy_fast
+
+ifdef CLASSIC_SHUTTER_FUCTION
+shutter_load_bt_sdp_form_DataRom:
+	arg BT_SDP_LIST_SIZE,loopcnt
+	arg CLASSIC_SHUTTER_SDP_LIST,contr
+	branch memcpy_fast
+
+shutter_load_bluetooth_config_store_name:
+	fetch 1,mem_shutter_config_data_temp
+	copy pdata,loopcnt
+	store 1,mem_le_name_len
+	call memcpy_fast
+	fetch 1,mem_shutter_config_data_temp
+	copy pdata,loopcnt
+	store 1,mem_local_name_length
+	call memcpy_fast
+	ifetch 1,contr
+	store 1,mem_shutter_key_num
+	ifetch 1,contr
+	store 1,mem_shutter_hard_soft_switch_case
+	rtn
+
+shutter_load_bluetooth_config_by_eeprom:
+	fetch 1,mem_shutter_bluetooth_type
+	rtnbit0 CLASSIC_SHUTTER
+	arg 3,temp
+	fetch 2,mem_shutter_config_eeprom_offset_addr
+	copy pdata,regb
+	arg mem_shutter_config_eeprom_start_flag,rega
+	call iicd_read_eep_data
+	fetcht 2,mem_shutter_config_eeprom_start_flag
+	setarg SHUTTER_EEPROM_CONFIG_CRC
+	isub temp,null
+	nrtn zero
+	fetch 1,mem_shutter_config_user_size
+	rtn blank
+	copy pdata,temp
+	fetch 2,mem_shutter_config_eeprom_offset_addr
+	add pdata,3,regb
+	arg mem_shutter_config_data_temp,rega
+	call iicd_read_eep_data
+	branch shutter_store_config
+
+shutter_store_config:
+	call shutter_load_bluetooth_config_store_name
+shutter_load_bluetooth_config_custom:
+	ifetch 2,contr
+	rtn blank
+	copy pdata,contw
+	ifetcht 1,contr
+	copy temp,loopcnt
+	call memcpy
+	branch shutter_load_bluetooth_config_custom
+///////////////////////////////////////////////////////////////////
+
+//////////////////////////random mac address//////////////////////////////
+shutter_random_mac_addr:
+	fetch 1,mem_shutter_bluetooth_type
+	rtnbit0 CLASSIC_SHUTTER
+	fetch 2,mem_classic_shutter_random_mac_offset_addr
+	rtn blank
+	copy pdata,regb
+	arg 4,temp
+	arg mem_shutter_random_mac_data_temp,rega
+	call iicd_read_eep_data
+	fetch 1,mem_shutter_random_mac_data_temp
+	bne 1,shutter_write_random_mac_addr_to_eeprom
+	branch shutter_write_random_mac_addr
+shutter_write_random_mac_addr_to_eeprom:
+	setarg 1
+	store 1,mem_shutter_random_mac_data_temp
+	force 3,loopcnt
+	call generate_random_loop
+	fetch 2,mem_classic_shutter_random_mac_offset_addr
+	copy pdata,regb
+	arg 4,temp
+	arg mem_shutter_random_mac_data_temp,rega
+	call iicd_write_eep_data
+shutter_write_random_mac_addr:
+	fetch 3,mem_shutter_random_mac_data_temp + 1
+	store 3,mem_lap
+	store 3,mem_le_lap
+	rtn
+endif
+	
+/////////////////////////////////////////////////////////////////
+shutter_soft_swtich_power_on:
+	branch shutter_start_reconnect
+
+
+shutter_soft_swtich_power_off:
+	arg 0,rega
+	arg mem_shutter_power_off_led_style,regc
+	call ui_led_set_style_global
+	call shutter_disconnect_current_connection
+shutter_wait_power_off:
+	fetch 1,mem_shutter_power_off_timeout
+	store 1,mem_shutter_power_off_timer
+	rtn
+	
+
+/*************soft swtich ui config*********************/
+ui_soft_swtich_init:
+	setarg SS_STATE_POWER_UP
+	call ui_soft_swtich_init_power_on_time
+	jam UI_BUTTON_STATE_UP,mem_ui_button_last_state
+	call ui_button_init
+	call ui_button_polling
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BTN_DOWN
+	branch app_enter_hibernate
+
+ui_soft_swtich_init_power_on_time:
+	fetcht 2,mem_power_param_ptr
+	istore 1,temp		//init power state 
+	ifetch 1,contw		//power on time
+	store 1,mem_ui_button_timeout
+	rtn
+
+
+ui_soft_switch_botton_up:
+	fetch 2,mem_power_param_ptr
+	ifetch 1,pdata
+	rtnne SS_STATE_POWER_UP
+	branch app_enter_hibernate
+
+
+ui_soft_switch_botton_long_press:
+	fetcht 2,mem_power_param_ptr
+	ifetch 1,temp
+	beq SS_STATE_POWER_ON,ui_soft_switch_power_off
+ui_soft_switch_power_on:
+	setarg SS_STATE_POWER_ON
+	fetcht 2,mem_power_param_ptr
+	istore 1,temp		//init power state 
+	add temp,SS_POWER_OFF_TIME,contr
+	ifetch 1,contr
+	istore 1,mem_ui_button_timeout
+	ifetch 2,contr
+	branch callback_func
+
+ui_soft_switch_power_off:
+	setarg SS_STATE_POWER_OFF
+	call ui_soft_swtich_init_power_on_time
+	add temp,SS_POWER_OFF_CB,contr
+	ifetch 2,contr
+	branch app_enter_hibernate,blank		//no call back function , just enter hibernate
+	branch callback_func
+	
+/*************soft swtich ui config ending*********************/
+
+//pdata:adv interval value
+shutter_ble_adv_interval_set:
+	store 2,mem_lpm_interval
+	increase -4,pdata
+	store 2,mem_le_adv_interval
+	rtn
+
+le_send_notify_from_list:
+	ifetch 1,contr	//length 
+	copy pdata,rega
+	ifetcht 2,contr	//handle
+	call store_contr
+	call le_att_malloc_tx_notify
+	copy rega,loopcnt
+	call get_contr
+	branch memcpy
+
+/*************shutter default_init starting*********************/
+shutter_default_init:
+	fetch 2,mem_shutter_key_conf0_temp
+	store 2,mem_shutter_key_conf0
+	fetch 1,mem_shutter_led_struct_app_led_gpio_temp
+	store 1,mem_shutter_led_struct_app_led_gpio
+	store 1,mem_shutter_power_off_led_style_gpio
+	fetch 1,mem_shutter_hard_soft_switch_case_temp
+	store 1,mem_shutter_hard_soft_switch_case
+	fetch 1,mem_shutter_soft_switch_button_gpio_temp
+	store 1,mem_shutter_soft_switch_button_gpio
+	jam 0x01,mem_shutter_bluetooth_type
+	setarg 0x0030
+	store 2,mem_classic_shutter_random_mac_offset_addr
+	setarg 0x0000
+	store 2,mem_shutter_config_eeprom_offset_addr
+	setarg 0x0001
+	store 2,mem_key0_press
+	store 2,mem_key1_press
+	setarg 0x0006
+	store 2,mem_key0_release
+	store 2,mem_key1_release
+	setarg 0x0007
+	store 2,mem_key2_press
+	setarg 0x0008
+	store 2,mem_key2_release
+	setarg mem_shutter_soft_switch_power_state
+	store 2,mem_power_param_ptr
+	setarg 0x201400
+	store 3,mem_shutter_soft_switch_power_state
+	jam 0x01,mem_lpm_mode
+	setarg 0x0100
+	store 2,mem_lpm_interval
+	jam 0x08,mem_lpm_overhead
+	jam 0x05,mem_lpm_mult
+	jam 0x02,mem_lpm_mult_timeout
+	setarg 0x0030
+	store 2,mem_sniff_param_interval
+	setarg 0x0001
+	istore 2,contw
+	jam 0x0a,mem_unsniff2sniff_timer
+	setarg 0x0096
+	store 2,mem_ble_shutter_reconn_blink_on_time
+	istore 2,contw
+	setarg 0x0296
+	store 2,mem_ble_shutter_discovery_blink_on_time
+	istore 2,contw
+	setsect 0,0x10
+	setsect 1,0x8008
+	setsect 2,0x2c000
+	setsect 3,0x04
+	store 8,mem_ble_shutter_interval_min_new
+	jam 0x01,mem_ui_led_struct_num
+	setarg mem_shutter_led_struct_app_led
+	store 2,mem_ui_led_struct_ptr
+	setarg 0x0000
+	store 2,mem_shutter_led_struct_app_led
+	setsect 0,0x1a0
+	setsect 1,0x68
+	setsect 2,0x00
+	setsect 3,0x00
+	store 8,mem_shutter_led_struct_app_led_on_time
+	setarg 0x0301
+	store 2,mem_shutter_power_off_led_style
+	setsect 0,0x1a0
+	setsect 1,0xe8
+	setsect 2,0x00
+	setsect 3,0x00
+	store 8,mem_shutter_power_off_led_style_on_time
+	setarg 0x000e
+	store 2,mem_ble_shutter_reconn_adv_interval
+	setarg 0x0140
+	store 2,mem_ble_shutter_discovery_adv_interval
+	store 2,mem_le_adv_interval
+	setarg 0x0050
+	store 2,mem_ble_shutter_reconn_timeout
+	jam 0x07,mem_le_adv_channel_map
+	jam 0x00,mem_le_adv_enable
+	setsect 0,0xfb
+	setsect 1,0x2c212
+	setsect 2,0x800f
+	setsect 3,0x21
+	store 8,mem_local_rx_max_octets
+	setsect 0,0x0bb8
+	setsect 1,0x02ee
+	store 4,mem_ble_shutter_discovery_timeout
+	setarg mem_queue_each_size
+	store 2,mem_queue_ptr
+	setarg 0x2001
+	store 2,mem_queue_each_size
+	jam 0x1f,mem_le_adv_data_len
+	setsect 0,0x10102
+	setsect 1,0x80c1
+	setsect 2,0x18120
+	setsect 3,0x640c
+	store 9,mem_le_adv_data
+	setsect 0,0x3c1
+	istore 2,contw
+	jam 0x1f,mem_le_scan_data_len
+	setsect 0,0x2090d
+	setsect 1,0x34c15
+	setsect 2,0x28532
+	setsect 3,0x1d1d5
+	store 9,mem_le_scan_data
+	setsect 0,0x26574
+	setsect 1,0x1c
+	istore 3,contw
+	setarg mem_shutter_keyscan
+	store 2,mem_keyscan_ptr
+	jam 0x02,mem_shutter_key_num
+	jam 0x17,mem_app_connection_options		//NVRAM CONFIG
+	setarg mem_shutter_nv_data
+	store 2,mem_nv_data_ptr
+	jam 0x05,mem_nv_data_number
+	setarg 0x2540
+	store 2,mem_class
+	setarg 0x040003
+	store 3,mem_lmp_io_cap_payload_iocap
+	jam 0x03,mem_ssp_mode_flag
+	jam 0x01,mem_ssp_enable
+	jam 0x01,mem_ui_profile_supported
+	jam 0x00,mem_ptt
+	setsect 0,0x3ffff
+	setsect 1,0x2fe23
+	setsect 2,0x199d9
+	setsect 3,0x20d
+	store 8,mem_features		//NVRAM CONFIG END
+	setarg 0x9af2	//BLE ATT LIST 
+	store 2,mem_ui_le_uuid_table	//BLE ATT LIST END
+	jam 0x01,mem_eir_enable	//BT SDP LIST
+	setsect 0,0x10306
+	setsect 1,0x4
+	setsect 2,0x2010
+	setsect 3,0x9040
+	store 9,mem_all_uuid_16bits
+	setsect 0,0x20011
+	setsect 1,0x44
+	istore 5,contw
+	jam 0x00,mem_all_uuid_128bits
+	setarg 0x9c70
+	store 2,mem_ui_uuid_table	//BT SDP LIST END
+	jam 0x18,mem_fcomp_div		//24M XTAL
+	call app_sys_param_init
+
+	//default name:AB Shutter3
+	arg 30,loopcnt
+	arg mem_le_name,contw
+	call clear_mem
+	jam 0x0b,mem_le_name_len
+	setarg 0x204241
+	store 3,mem_le_name
+	setarg 0x756853
+	istore 3,contw
+	setarg 0x657474
+	istore 3,contw
+	setarg 0x3372
+	istore 2,contw
+	fetch 1,mem_shutter_le_name_len
+	rtn blank
+	store 1,mem_le_name_len
+	copy pdata,loopcnt
+	arg mem_shutter_le_name,contr
+	arg mem_le_name,contw
+	branch memcpy
+	
+
+/*************shutter default_init ending*********************/
+
+
+
+
+
+else
+	branch assert
+	
+endif
Index: mouse_public_3mode_usb/program/ble_protocol_stack/le.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le.prog	(working copy)
@@ -0,0 +1,2003 @@
+ifdef COMPILE_LE
+//******************************************//
+//*************LE INIT ****************//
+//******************************************//
+
+le_init_conn:
+	bpatchx patch33_1,mem_patch33
+	disable wake
+	jam 1,mem_le_conn_handle
+	jam 3,mem_le_state
+	jam 1,mem_le_arq
+	setarg -1
+	store 2,mem_le_event_count
+	force 0,pdata
+	store 1,mem_le_ch
+	store 1,mem_le_op
+	store 3,mem_sniff_rcv
+	store 3,mem_sniff_lost
+	call le_clear_enc
+	jam 1,mem_le_txheader
+	jam 0,mem_le_txlen
+	jam FUN_RX_LL_1M_PHY,mem_le_rx_phy
+	jam FUN_TX_LL_1M_PHY,mem_le_tx_phy
+	jam 0,mem_le_l2cap_att_states
+	branch le_supervision_flush
+
+le_init_master:
+	bpatchx patch33_2,mem_patch33
+	enable master
+	jam lemode_master,mem_le_mode
+	jam 1,mem_le_att_handle
+	jam 1,mem_le_search_handle_start
+	setarg 0xffff
+	store 2,mem_le_search_handle_end
+	force 0,pdata
+	store 5,mem_ccm_pcnt_rx
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_tx	
+	branch le_init_conn
+
+
+le_init_slave:
+	bpatchx patch33_3,mem_patch33
+	disable master
+ 	setarg 0x17
+ 	store 2,mem_le_remote_mtu
+	increase 4,pdata
+	store 2,mem_remote_rx_max_octets
+	jam lemode_slave,mem_le_mode
+	jam 0,mem_le_adv_enable
+	jam 0,mem_lpm_current_mult
+	call le_clear_pairing_state
+	fetch 2,mem_le_superto
+	store 2,mem_le_init_superto
+	fetch 2,mem_le_tsniff
+	mul32 pdata,5,pdata
+	rshift4 pdata,pdata
+	store 2,mem_le_superto			// vol.6 part B 4.5.2 only 6*conninterval before establish
+	branch le_init_conn
+	
+
+//******************************************//
+//*************LE main process*********//
+//******************************************//
+
+le_conn_dispatch:
+	bpatchx patch33_4,mem_patch33
+	call le_enable
+ 	fetch 1,mem_le_state
+ 	isolate1 lestate_encryption,pdata
+ 	setflag true,mark_ble_encryption,mark
+	call app_process_ble
+	fetch 1,mem_le_mode
+	bbit1 mode_master,le_master_dispatch
+	branch le_slave_dispatch
+	
+//******************************************//
+//***********LE master process*********//
+//******************************************//
+	
+le_master_dispatch:
+	bpatchx patch33_5,mem_patch33
+	enable master
+	call le_supervision_update
+	branch le_master_disconn,positive
+	call le_setup
+	call le_prepare_tx
+	disable match
+	call le_transmit_receive_sifs
+	nrtn match
+	fetch 1,mem_le_conn_rcv
+	increase 1,pdata
+	store 1,mem_le_conn_rcv
+	call le_acknowledge
+	disable master
+	rtn
+	
+le_master_disconn:
+	call le_disconnect
+	disable master
+	rtn
+	
+//******************************************//
+//***********LE slave process***********//
+//******************************************//
+le_slave_dispatch:
+	bpatchx patch33_6,mem_patch33
+	jam 0,mem_le_md_count
+	set0 mark_ble_crc_fail,mark
+ifdef SECURE_CONNECTION
+	call sp_calc_sequence_256
+	call le_secure_connect_sm
+endif
+	disable attempt
+	call le_supervision_update
+	branch le_slave_disconn,positive
+	fetch 1,mem_le_rx_phy
+	call le_enable_phy_by_pdata
+	call le_setup
+	call le_receive_slave
+	nbranch le_slave_unsync,sync	// vol.6 part B 4.5.1 respond even crc error
+	call le_got_first_packet
+	branch le_slave_match,match
+	bmark1 mark_ble_crc_fail,le_slave_crc_fail
+	branch le_slave_cont
+	
+
+le_slave_crc_fail:
+le_slave_match:
+	bpatchx patch33_7,mem_patch33
+	fetch 1,mem_le_md_count
+	pincrease 1
+	store 1,mem_le_md_count
+	beq LE_MD_MAX_COUNT,le_slave_cont
+	call le_acknowledge
+	call le_prepare_tx
+	fetch 1,mem_le_tx_phy
+	call le_enable_phy_by_pdata
+	call le_transmit_norx
+	call le_parse
+	fetch 2,mem_cb_ble_transmit
+	call callback_func
+	call le_check_md
+	branch le_slave_more_data,user
+le_slave_cont:
+	bpatchx patch34_0,mem_patch34
+	call le_pairing_sm
+ 	call le_check_paring_time
+	call check_51cmd
+	fetch 1,mem_le_op
+	bbit1 op_disconn,le_slave_disconn
+le_slave_unsync:
+	bpatchx patch34_1,mem_patch34
+	call le_lpm_set_mult
+	branch calc_clke_offset
+
+
+le_check_md:
+	disable user
+	bmark1 mark_ble_rx_md,enable_user
+	bmark1 mark_ble_tx_md,enable_user
+	bmark1 mark_ble_crc_fail,enable_user
+	rtn
+
+
+le_slave_more_data:
+	bpatchx patch34_2,mem_patch34
+	enable attempt
+	call le_transmit_receive_sifs_notx
+	branch le_slave_match,match
+	bmark1 mark_ble_crc_fail,le_slave_crc_fail
+	branch le_slave_cont
+
+le_slave_disconn:
+
+	//fall through
+le_disconnect:
+	bpatchx patch34_3,mem_patch34
+	call le_clear_connection_info
+	call app_disconn_reason_collect_ble
+ifdef SECURE_CONNECTION
+	call le_clear_pairing_state
+	call le_sc_state_clear
+endif
+	jam BT_EVT_LE_DISCONNECTED,mem_fifo_temp
+	branch ui_ipc_send_event
+
+le_clear_connection_info:
+	arg mem_used_map,contw
+	call memset0_16
+	jam 0,mem_le_conn_handle
+	jam lemode_idle,mem_le_mode
+	jam 0,mem_le_state
+le_clear_pairing_state:
+	bpatchx patch34_4,mem_patch34
+	jam FLAG_LE_ENC_NULL,mem_le_enc_state
+	jam FLAG_LE_PAIRING_NULL,mem_le_pairing_state
+	branch sp_clear_flags
+	
+le_got_first_packet:
+	bpatchx patch34_5,mem_patch34
+	fetch 1,mem_le_conn_rcv
+	increase 1,pdata
+	store 1,mem_le_conn_rcv
+	fetch 1,mem_le_state
+	rtnbit1 lestate_got_first_packet
+	set1 lestate_got_first_packet,pdata
+	store 1,mem_le_state
+	fetch 2,mem_le_init_superto
+	store 2,mem_le_superto
+	setarg 0
+	store 4,mem_le_transmit_window
+	rtn
+
+
+//input: pdata is phy mode
+//bit0 is le 1M phy
+//bit1 is le 2M phy
+//bit2 is le coded phy s2
+//bit7 is le coded phy s8
+le_enable_phy_by_pdata:
+	copy pdata,temp
+	bpatchx patch34_6,mem_patch34
+	copy temp,pdata
+	bbit1 BIT_LE_1M_PHY,le_enable
+	bbit1 BIT_LE_2M_PHY,le_enable_2M
+	bbit0 BIT_LE_CODED_PHY,le_enable
+	bbit1 BIT_LE_CODED_PHY_S8,le_enable_coded_s8
+	bbit1 BIT_LE_CODED_PHY_S2,le_enable_coded_s2
+	branch le_enable
+
+le_enable_2M:
+	call le_enable
+	set1 mark_ble_2M,mark
+	set0 mark_ble_lr,mark
+	jam 0x03,0x8901
+	jam 0x84,0x8920
+	rtn
+
+le_enable_coded_s2:
+le_enable_coded:
+	call le_enable
+	set1 mark_ble_lr,mark
+	set0 mark_ble_lr_s8,mark
+	jam 0x05,0x8901
+	jam 0x80,0x8920
+	jam 0x20,0x8930
+	jam 0x0a,0x8934
+	rtn
+
+le_enable_coded_s8:
+	call le_enable_coded
+	set1 mark_ble_lr_s8,mark
+	rtn
+
+le_enable:
+	bpatchx patch34_7,mem_patch34
+	enable le
+	set0 mark_ble_2M,mark
+	set0 mark_ble_lr,mark
+	jam 0x01,0x8901
+	jam 0x80,0x8920
+	jam 0xa7,0x8925
+	jam 0x03,0x8930
+	jam 0x58,0x8933
+	jam 0x0a,0x8934
+	jam 0x40,0x8937
+	jam 9,core_rx_bq_cfg0
+	rtn
+
+
+le_disable:
+	bpatchx patch35_0,mem_patch35
+	disable le
+	set0 mark_ble_encryption,mark
+	jam 0x00,0x8901
+	jam 0x80,0x8920
+	jam 0xa3,0x8925
+	jam 0x03,0x8930
+	jam 0x68,0x8933
+	jam 0x09,0x8934
+	jam 0x28,0x8937
+	jam 9,core_rx_bq_cfg0
+	rtn
+	
+le_prep:
+	disable enable_crc
+	disable enable_white
+	fetch 3,mem_le_crcinit
+	iforce crc24_init
+	fetch 1,mem_le_ch_mapped
+	reverse pdata,temp
+	set1 1,temp
+	rshift temp,white_init
+	rtn
+	
+
+le_rx_setfreq:
+	call le_setfreq
+le_rf_rx_enable:	
+	call set_freq_rx
+	fetch 2,mem_param_pll_setup
+	call sleep
+	branch rf_rx_enable
+
+le_tx_setfreq:
+	branch txon,match
+	bmark1 mark_ble_crc_fail,txon
+le_tx_setfreq0:
+	call le_setfreq
+	branch set_freq_tx
+le_setfreq:
+	bpatchx patch35_1,mem_patch35
+	call set_sync_on
+	fetch 1, mem_le_testtype
+	nbranch le_ctf_test,blank
+	fetch 1,mem_le_ch_mapped
+	sub pdata,36,null
+	branch le_ctf_normal,positive
+	force 0,temp
+	rtneq 37
+	force 24,temp
+	rtneq 38
+	force 78,temp
+	rtn
+	
+le_ctf_normal:
+	sub pdata,10,null
+	branch le_ctf_low,positive
+	increase 1,pdata
+	
+le_ctf_low:	
+	lshift pdata,pdata
+	add pdata,2,temp
+	rtn
+	
+le_ctf_test:
+	fetch 1,mem_le_ch_mapped
+	lshift pdata,temp
+	rtn
+
+le_sca_map:
+	arg 500,temp
+	rtn blank
+	arg 250,temp
+	rtneq 1
+	arg 150,temp
+	rtneq 2
+	arg 100,temp
+	rtneq 3
+	arg 75,temp
+	rtneq 4
+	arg 50,temp
+	rtneq 5
+	arg 40,temp
+	rtneq 6
+	arg 20,temp
+	rtn
+
+
+	
+le_setup:
+	bpatchx patch35_2,mem_patch35
+	enable swfine
+	fetch 4,mem_le_access
+	iforce access
+	call calc_mod_value_scale_le
+	call le_map_channel
+	setarg 0x200
+	branch le_setup_master,master
+	fetch 2,mem_le_receive_window
+	rshift pdata,pdata
+le_setup_master:
+	fetcht 2,mem_param_pll_setup
+	iadd temp,pdata
+	call ahead_window
+	deposit clke
+	rtn
+
+
+le_context_nextevent:
+	bpatchx patch35_3,mem_patch35
+	call push_stack_rega_b_c
+	storer loopcnt ,2,mem_loopcnt
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	rtnbit0 mode_le
+	add rega,coffset_le_event_cnt,contw
+	ifetch 2,contw
+	increase 1,pdata
+	istore 2,contw
+	call le_update_param
+	call le_update_channel_map
+	call le_update_phy	
+	call le_context_nexthop
+	call pop_stack_rega_b_c
+	fetchr loopcnt ,2,mem_loopcnt
+	rtn
+	
+le_context_nexthop:	
+	add rega,coffset_le_hop,contr
+	ifetch 1,contr
+	add rega,coffset_le_ch,contw
+	ifetcht 1,contw
+	iadd temp,pdata
+	sub pdata,36,null
+	branch le_nexthop_nowrap,positive
+	increase -37,pdata
+le_nexthop_nowrap:
+	istore 1,contw
+	rtn
+
+//input rega
+le_calc_channel_map:
+	add rega,coffset_le_channel_map,contr
+	ifetch 5,contr
+	force 0,temp
+	force 37,loopcnt
+le_count_channels_loop:
+	bbit0 0,le_count_channels_notused
+	increase 1,temp
+le_count_channels_notused:
+	rshift pdata,pdata
+	loop le_count_channels_loop
+	add temp,-1,pdata
+	add rega,coffset_le_channels,contw
+	istore 1,contw
+	rtn
+
+le_map_channel:
+	bpatchx patch35_4,mem_patch35
+	fetch 1,mem_le_ch
+	iforce queue
+	fetcht 5,mem_le_channel_map
+	qisolate1 temp
+	branch le_map_channel_end,true
+le_map_channel_next:
+	fetch 1,mem_le_channels
+	isub queue,pdata
+	branch le_map_channel_cont,positive
+	sub pdata,-1,queue
+	branch le_map_channel_next
+le_map_channel_cont:
+	copy queue,loopcnt
+	force 0,queue
+le_map_channel_loop:
+	qisolate1 temp
+	branch le_map_channel_skip,true
+	increase 1,loopcnt
+le_map_channel_skip:
+	deposit loopcnt
+	branch le_map_channel_end,blank
+	increase 1,queue
+	increase -1,loopcnt
+	branch le_map_channel_loop
+le_map_channel_end:
+	deposit queue
+	store 1,mem_le_ch_mapped
+	rtn
+
+
+le_wait_tx:
+	branch le_wait_master,master
+	until null,timeout
+	rtn
+	
+le_wait_master:
+	arg 0xea0,timeup
+	until clkn_rt,meet
+	rtn
+
+le_receive_adv:
+	disable swfine
+	fetch 2,mem_le_scan_window
+	copy pdata,timeup
+	branch le_receive_packet
+
+
+le_receive_slave:
+	bpatchx patch35_5,mem_patch35
+ 	call le_dec_init
+	enable swfine
+	fetch 2,mem_le_receive_window
+	fetcht 4,mem_le_transmit_window
+	iadd temp,timeup
+le_receive_packet:
+	call le_rx_setfreq
+le_receive_rxon:
+	bpatchx patch35_6,mem_patch35
+	call le_prep
+	bmark0 mark_ble_lr,le_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call le_prep
+	lshift3 timeup,timeup
+le_receive_nolr:
+	disable match
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	copy timeup,stop_watch
+	correlate null,timeout
+	branch le_receive_on_attempt,attempt
+	copy clke,temp
+	storet 6,mem_sync_clke
+le_receive_on_attempt:
+	nbranch le_unsync_end,sync
+	bpatchx patch35_7,mem_patch35
+	enable swfine
+	arg PARAM_T_IFS_150US+PARAM_20MS_INIT+PARAM_SYNC_TIME_DIFFERENCE,temp
+	fetch 1,mem_system_clk
+	imul32 temp,stop_watch
+	call rf_debug_rx_sync_line	//L-H
+	branch le_receive_skip,attempt
+	call calc_clke_all_modem
+	fetch 1,mem_le_state
+	bbit0 lestate_got_first_packet,le_receive_skip
+	fetcht 6,mem_sync_clke
+	call lpm_adjust_clk,wake
+le_receive_skip:
+	call save_rssi
+	enable enable_white
+	enable enable_crc
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_le_rxbuf_data_header
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	store 1,mem_le_rxbuf_data_length
+ 	copy pdata,loopcnt
+	branch le_rx_nopayload,zero
+
+	bmark1 mark_ble_encryption,le_rx_dec
+
+le_rx_loop:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	loop le_rx_loop
+	branch le_rx_nopayload
+
+le_rx_dec: 
+	copy contw,regb
+	call le_check_retransmit	
+//	bmark1 mark_old_packet,le_retransmit_end_of_packet
+	fetchr rega, 1,mem_le_rxbuf_data_length
+	increase -4,rega
+	nbranch le_mic_error,positive
+//	storer rega, 1,mem_le_rxbuf_data_length
+	call le_dec_start	
+	copy regb,contw
+	arg 0,temp
+	fetchr loopcnt, 1,mem_le_rxbuf_data_length
+	increase -4,loopcnt
+	branch le_rx_dec_loop_end,zero
+le_rx_dec_loop:
+	
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	increase 1,temp
+	and temp,0xf,null
+	call le_dec,zero
+	loop le_rx_dec_loop
+le_rx_dec_loop_end:
+	call le_dec_end	
+	copy regb,contw
+	
+
+le_rx_nopayload:
+	bpatchx patch36_0,mem_patch36
+	parse demod,bucket,24	
+	rshift32 pdata,pdata
+	rshift16 pdata,pdata
+	istore 3,contw
+	enable swfine
+	call le_set_until_tx_timer
+	branch le_crc_fail,crc_failed
+	bmark0 mark_ble_encryption,le_rx_match
+	fetch 1,mem_le_rxbuf_data_length
+	branch le_rx_match,blank
+	increase -4,pdata
+	store 1,mem_le_rxbuf_data_length
+	call wait_ccm_done
+ 	fetch 1,core_misc_status
+	bbit0 7, le_mic_error
+ 	force regidx_result,regext_index
+	storer regext, 4,mem_le_peer_mic
+le_rx_match:
+	call rf_debug_rx_crc_line	//L
+	enable match
+	set0 mark_ble_crc_fail,mark
+le_crc_fail_tx:
+	call ccm_ctrl_clr
+	fetch 1,mem_le_rx_phy
+	nsetflag ble_coded_info,BIT_LE_CODED_PHY_S8,pdata
+	store 1,mem_le_rx_phy
+le_match_set_txfreq:
+	bpatchx patch36_1,mem_patch36
+	fetcht 1,mem_last_freq
+	add temp,2,rega
+	bmark1 mark_ble_2M,le_match_set_txfreq_offset
+	add temp,2,rega
+le_match_set_txfreq_offset:
+	disable decode_fec0
+	call set_sync_on	
+	branch rf_tx_write_freq				/* set frequency to tx mode freq */
+	
+
+le_dec_init:
+	rtnmark0 mark_ble_encryption
+	call load_sk
+	force regidx_result,regext_index
+	call aes_clear
+	branch aes_clear_data
+	
+	
+le_dec_start:
+	jam 0,core_ccm_aad0 
+	jam 1,core_ccm_aad1
+	fetch 1,mem_le_rxbuf_data_header
+	and_into 0x3,pdata
+	store 1,core_ccm_aad2
+	
+	setarg mem_le_rxbuf_data_payload
+	store 2,core_ccm_input_playload_addr
+	store 2,core_ccm_output_playload_addr
+
+	fetchr rega, 1,mem_le_rxbuf_data_length
+	increase -4,rega
+
+	fetcht 5,mem_ccm_pcnt_rx	
+	isolate1 mark_old_packet,mark
+	call le_pcnt_rx_sub1,true
+	call ccm_b0
+	setarg 0
+	store 2,core_ccm_inptr
+	jam 6,core_ccm_ctrl
+	jam 7,core_ccm_ctrl	
+	rtn	
+
+le_pcnt_rx_sub1:
+	sub temp,0,null
+	branch le_pcnt_rx_sub1_0,zero
+	increase -1,temp
+	set1 LE_CCM_DIRECTIONBIT,temp
+	rtn
+
+le_pcnt_rx_sub1_0:
+	setarg 0xffffff
+	lshift16 pdata,pdata
+	arg 0xffff,temp
+	ior temp,temp
+	rtn
+
+le_dec:
+	copy contw,regb
+	fetch 1,mem_le_rxbuf_data_length
+	increase -4,pdata
+	isub temp,null
+	rtn zero
+	storet 2,core_ccm_inptr
+	copy regb,contw
+	rtn
+	
+le_dec_end://mic
+	parse demod,bucket,32
+	rshift32 pdata,pdata
+	rshift8 pdata,pdata
+	istore 4,contw
+	copy contw,regb
+//	store 4,mem_le_peer_mic
+	force regidx_data,regext_index
+	copy  pdata,regext
+	storet 2,core_ccm_inptr
+	rtn
+
+le_mic_error:
+	branch le_end_of_packet
+
+le_retransmit_end_of_packet:
+	call le_set_until_tx_timer	// start SIFS timer after last bit of crc
+	call end_of_packet
+	branch le_rx_match
+
+le_crc_fail:
+	call rf_debug_rx_crc_fail_line
+	bmark1 mark_ble_crc_fail,le_crc_fail_consecutive //two consecutive packets received with an invalid CRC match within a connection event shall close the event
+	set1 mark_ble_crc_fail,mark
+	branch le_crc_fail_tx
+	
+le_unsync_end:	
+le_crc_fail_consecutive:
+	set0 mark_ble_crc_fail,mark
+	branch le_end_of_packet
+
+le_end_of_packet:
+	call ccm_ctrl_clr
+	branch end_of_packet
+	
+calc_clke_all_modem:
+	bmark1 mark_ble_lr,calc_clke_modem_coded
+	bmark1 mark_ble_2M,calc_clke_modem_2M
+	fetch 2,mem_param_clke_cal_le_1m
+	copy pdata,clke_rt
+	copy bt_clk,clke_bt
+	rtn
+
+
+calc_clke_modem_coded:
+	fetch 2,mem_param_clke_cal_le_coded
+	copy pdata,clke_rt
+	add bt_clk,1,clke_bt
+	rtn
+
+calc_clke_modem_2M:
+	fetch 2,mem_param_clke_cal_le_2m
+	copy pdata,clke_rt
+	copy bt_clk,clke_bt
+	rtn
+
+
+le_set_until_tx_timer:
+	fetch 1,mem_le_rxbuf_data_length
+	add pdata,5,temp	//PDU Length
+	lshift3 temp,temp	//PDU bit size
+	fetch 1,mem_le_rx_phy
+	bmark1 mark_ble_lr,le_set_until_tx_timer_rx_lr
+	bbit1 BIT_LE_1M_PHY,le_set_until_tx_timer_rx_1M
+	bbit1 BIT_LE_2M_PHY,le_set_until_tx_timer_rx_2M
+le_set_until_tx_timer_rx_lr:
+	branch le_set_until_tx_timer_rx_coded_s2,ble_coded_info
+	branch le_set_until_tx_timer_rx_coded_s8
+
+le_set_until_tx_timer_rx_1M:
+	branch le_calc_stop_watch
+
+le_set_until_tx_timer_rx_2M:
+	rshift temp,temp
+	branch le_calc_stop_watch
+
+le_set_until_tx_timer_rx_coded_s2:
+	add temp,3,temp	//term2
+	lshift temp,temp
+	branch le_set_until_tx_timer_rx_coded
+
+le_set_until_tx_timer_rx_coded_s8:
+	add temp,3,temp	//term2
+	lshift3 temp,temp
+le_set_until_tx_timer_rx_coded:
+	setarg PARAM_CODED_C1_TERM1_TIME_40US
+	iadd temp,temp
+	branch le_calc_stop_watch
+
+le_calc_stop_watch:
+	fetch 1,mem_system_clk
+	imul32 temp,temp		//mips cpu
+	arg PARAM_20MS_INIT,rega
+	imul32 rega,pdata
+	isub temp,temp
+	copy stop_watch,pdata
+	isub temp,stop_watch
+	rtn
+
+le_transmit_receive_sifs_without_change_mode:
+	call le_transmit
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	enable swfine
+	arg 5500,timeup
+	branch le_receive_rxon
+
+
+le_transmit_receive_sifs:
+	bpatchx patch36_2,mem_patch36
+	fetch 1,mem_le_tx_phy
+	call le_enable_phy_by_pdata
+	call le_transmit
+le_transmit_receive_sifs_notx:
+	fetch 1,mem_le_rx_phy
+	call le_enable_phy_by_pdata
+
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	enable swfine
+	arg 5500,timeup
+	bmark0 mark_ble_lr,le_receive_rxon
+	arg 8500,timeup
+	branch le_receive_rxon
+
+le_transmit_norx:
+	call le_transmit
+	branch end_of_packet
+	
+le_transmit:
+	bpatchx patch36_3,mem_patch36
+	call le_prep
+	call le_tx_setfreq
+	call rf_debug_tx_on_line	//H
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call le_wait_tx
+	disable lr_s2en
+	bmark1 mark_ble_lr,le_transmit_lr
+	bmark1 mark_ble_2M,le_transmit_2M
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+le_transmit_packet:
+	enable enable_white
+	enable enable_crc
+	bpatchx patch36_4,mem_patch36
+	fetch 1,mem_le_txheader
+	inject mod,8
+	ifetch 1,contr
+	copy pdata,loopcnt
+	inject mod,8
+	sub loopcnt,0,null
+	branch le_tr_nopayload,zero
+
+	fetch 1,core_ccm_ctrl
+	branch le_transmit_packet_not_enc,blank 
+	bmark1 mark_ble_encryption,le_transmit_packet_enc
+le_transmit_packet_not_enc:	
+	arg mem_le_txpayload,contr
+le_tr_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop le_tr_loop
+	
+le_tr_nopayload:
+	enable enable_parity
+	inject mod,24
+	disable enable_parity
+	bmark0 mark_ble_lr,le_transmit_skip
+	disable enable_white
+	setarg 0
+	inject mod,3
+le_transmit_skip:
+	until null,tx_clear
+	nop 100          /* flush out the last bit */
+	disable encode_fec0
+	disable encode_fec3
+	call set_sync_on
+	call rf_debug_tx_off_line	//L
+le_check_start_pause_enc:
+	fetch 1,mem_le_txheader
+	and pdata,LLID_LE_LL,pdata
+	rtnne LLID_LE_LL
+	fetch 1,mem_le_enc_state
+	beq  FLAG_LE_ENC_PAUSE,le_clear_enc
+	rtnne FLAG_LE_SEND_START_ENC_REQ
+	fetch 1,mem_le_txpayload
+	beq LL_START_ENC_REQ,le_set_enc
+	rtn
+	
+
+le_transmit_packet_enc:
+	increase -4,loopcnt
+	copy loopcnt,temp	
+	call ccm_wait_enc	
+	arg mem_le_txpayload,contr
+le_transmit_packet_enc_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop le_transmit_packet_enc_loop
+	call ccm_check_enc_done
+	copy regext,pdata
+	inject mod,32
+	branch le_tr_nopayload
+
+le_transmit_lr:
+	arg 10,loopcnt
+le_transmit_lr_preamble_loop:
+	setarg 0x3c
+	inject mod,8
+	loop le_transmit_lr_preamble_loop
+	disable encode_fec0
+	enable encode_fec3
+	rshift16 access,pdata
+	rshift16 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,32
+	bmark1 mark_ble_lr_s8,le_transmit_lr_s8
+le_transmit_lr_s2:
+	setarg 1
+	inject mod,5
+	enable lr_s2en
+	branch le_transmit_packet
+
+le_transmit_lr_s8:
+	setarg 0
+	inject mod,5
+	branch le_transmit_packet
+
+le_transmit_2M:
+	fetch 1,mem_system_clk
+	rshift pdata,loopcnt
+le_transmit_2M_dealy:
+	nop 2
+	loop le_transmit_2M_dealy
+//	nop 36	//2M 前端发送比1M快3us左右
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,temp
+	copy temp,pdata
+	inject mod,8
+	copy temp,pdata
+	inject mod,40
+	branch le_transmit_packet
+	
+
+le_update_param:
+	arg le_update_param_ahead1_cb,regc
+	arg le_update_param_cb,regb
+	arg lestate_update_param,queue
+	branch le_check_update_flag
+
+le_update_param_ahead1_cb:
+	add rega,coffset_sniff_anchor,contr
+	ifetcht 4,contr
+	add rega,coffest_le_new_transmitwindowsize,contr
+	ifetch 1,contr
+	add rega,coffset_le_window_size,contw
+	istore 1,contw
+	ifetch 2,contr
+	lshift2 pdata,pdata
+	iadd temp,timeup	//add windowsize
+	add rega,coffset_sniff_anchor,contw  
+	deposit timeup
+	istore 4,contw
+	ifetch 2,contr
+	lshift2 pdata,pdata
+	add rega,coffset_tsniff,contw
+	istore 2,contw
+	ifetch 4,contr
+	add rega,coffset_le_slave_latency,contw
+	istore 4,contw
+	branch le_receive_window_size
+
+le_update_param_cb:
+	ifetch 1,rega
+	set0 lestate_got_first_packet,pdata
+	istore 1,rega
+	fetch 2,mem_le_superto
+	store 2,mem_le_init_superto
+	storer rega,2,mem_rega
+	jam BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED,mem_fifo_temp
+	call ui_ipc_send_event
+	fetchr rega,2,mem_rega
+	add rega,coffset_le_slave_superto,contr
+	ifetch 2,contr
+	store 2,mem_le_init_superto
+	rtn	
+
+le_update_channel_map:
+	arg 0,regc
+	arg le_update_channel_map_cb,regb
+	arg lestate_update_map,queue
+	branch le_check_update_flag
+	
+le_update_channel_map_cb:
+	add rega,coffset_le_new_map,contr
+	ifetch 5,contr
+	add rega,coffset_le_channel_map,contw
+	istore 5,contw
+	branch le_calc_channel_map
+	
+
+le_update_phy:
+	arg 0,regc
+	arg le_update_phy_cb,regb
+	arg lestate_update_phy,queue
+	branch le_check_update_flag
+	
+le_update_phy_cb:
+	add rega,coffset_le_new_m2s_phy,contr
+	ifetch 1,contr
+	call le_update_phy_cb_m2s
+	istore 1,contw
+	add rega,coffset_le_new_s2m_phy,contr
+	ifetch 1,contr
+	call le_update_phy_cb_s2m
+	istore 1,contw
+	storer rega,2,mem_rega
+	jam BT_EVT_LE_UPDATE_PHY,mem_fifo_temp
+	call ui_ipc_send_event
+	fetchr rega,2,mem_rega
+	rtn	
+
+le_update_phy_cb_m2s:
+	call le_update_phy_cb_m2s_no_change,blank
+	add rega,coffset_le_rx_phy,contw
+	nrtn master
+	fetcht 1,mem_le_tx_phys
+	isolate1 BIT_LE_CODED_PHY_S8,temp
+	setflag true,BIT_LE_CODED_PHY_S8,pdata
+	add rega,coffset_le_tx_phy,contw
+	rtn
+
+le_update_phy_cb_m2s_no_change:
+	add rega,coffset_le_rx_phy,contr
+	ifetch 1,contr
+	nrtn master
+	add rega,coffset_le_tx_phy,contr
+	ifetch 1,contr
+	rtn
+
+le_update_phy_cb_s2m:
+	call le_update_phy_cb_s2m_no_change,blank
+	fetcht 1,mem_le_tx_phys
+	isolate1 BIT_LE_CODED_PHY_S8,temp
+	setflag true,BIT_LE_CODED_PHY_S8,pdata
+	add rega,coffset_le_tx_phy,contw
+	nrtn master
+	set0 BIT_LE_CODED_PHY_S8,pdata
+	add rega,coffset_le_rx_phy,contw
+	rtn
+
+le_update_phy_cb_s2m_no_change:
+	add rega,coffset_le_tx_phy,contr
+	ifetch 1,contr
+	nrtn master
+	add rega,coffset_le_rx_phy,contr
+	ifetch 1,contr
+	rtn
+	
+
+//regb regc is cb function
+//queue is state flag
+le_check_update_flag:
+	ifetch 1,rega
+	qisolate0 pdata
+	rtn true
+	add rega,coffset_le_event_cnt,contr
+	ifetcht 2,contr
+	add rega,coffset_le_instant,contr
+	ifetch 2,contr
+	
+	isub temp,pdata
+	branch le_update,zero
+	nbranch le_check_update_small,positive
+	sub pdata,1,null
+	branch le_update_ahead1,zero
+	rtn
+	
+le_update_ahead1:
+	copy regc,pdata
+	branch callback_func
+
+le_update:
+	ifetch 1,rega
+	qset0 pdata
+	istore 1,rega
+	copy regb,pdata
+	branch callback_func
+	
+le_check_update_small:
+	add rega,coffset_le_event_cnt,contr
+	ifetch 2,contr
+	add rega,coffset_le_instant,contr
+	ifetch 2,contr
+	isub temp,pdata
+	arg 0xffff,temp
+	isub temp,null
+	branch le_update,zero
+	arg 0xf000,temp
+	isub temp,null
+	nbranch le_update,positive
+	rtn
+	
+
+le_check_retransmit:
+	fetcht 1,mem_le_arq
+	fetch 1,mem_le_rxbuf_data_header
+//	isolate1 md,pdata
+//	setflag true,mark_ble_rx_md,mark
+	rshift pdata,pdata
+	ixor temp,pdata
+	isolate1 nesn,pdata
+	setflag true,mark_old_packet,mark	/* retransmit */
+	rtn
+
+
+le_acknowledge:
+	bpatchx patch36_5,mem_patch36
+	call le_supervision_flush
+	rtnmark1 mark_ble_crc_fail
+	call le_check_wak
+	fetch 1,mem_le_rxbuf_data_header
+	isolate1 md,pdata
+	setflag true,mark_ble_rx_md,mark
+	rshift pdata,pdata
+	ixor temp,pdata
+	isolate1 nesn,pdata
+	setflag true,mark_old_packet,mark	/* retransmit */
+	rtnmark1 mark_old_packet
+	fetch 1,mem_le_rxbuf_data_length
+	branch le_ack_unenc,blank		/* empty packet, no decryption */
+	fetch 1,mem_le_state
+	bbit0 lestate_encryption,le_ack_unenc
+	fetcht 4,mem_le_peer_mic
+	fetch 4,mem_ccm_last_mic			
+	isub temp,null
+	branch assert,zero
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	
+le_ack_unenc:
+	fetcht 1,mem_le_arq
+	setflip nesn,temp
+	storet 1,mem_le_arq
+	fetch 1,mem_le_configuration
+	rtnbit0 BIT_BLE_DEAL_BB_PACKET
+	bpatchx patch36_6,mem_patch36
+	fetch 1,mem_le_rxbuf_data_length
+	rtn blank		//empty packet
+	fetch 1,mem_le_rxbuf_data_header
+	compare LLID_CONTINUE,pdata,3
+	branch le_parse_writing_attribute_continue,true //ACL-U continue
+	compare LLID_START,pdata,3
+	branch le_parse_writing_attribute_start,true
+	rtn
+
+	
+le_check_wak:
+	bpatchx patch36_7,mem_patch36
+	fetcht 1,mem_le_arq
+	isolate0 wak,temp
+	rtn true
+	fetch 1,mem_le_rxbuf_data_header
+	lshift pdata,pdata
+	ixor temp,pdata
+	rtnbit0 sn			/* received NESN is same as SN, NAK */
+	set0 wak,temp
+	setflip sn,temp
+	storet 1,mem_le_arq
+	compare 3,temp,3
+	nrtn true
+	rtn
+	
+
+le_set_enc:
+	fetch 1,mem_le_state
+	set1 lestate_encryption,pdata
+	store 1,mem_le_state
+	set1 mark_ble_encryption,mark
+	rtn	
+	
+le_clear_enc:
+	bpatchx patch37_0,mem_patch37
+	jam FLAG_LE_ENC_NULL,mem_le_enc_state
+	arg 0,pdata
+	store 4,mem_ccm_last_mic
+	store 5,mem_ccm_pcnt_tx
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	fetch 1,mem_le_state
+	set0 lestate_encryption,pdata
+	store 1,mem_le_state
+	set0 mark_ble_encryption,mark
+	rtn
+
+
+
+
+le_scan_check_sender_addr_type:
+	arg 1,rega// sender_addr_type
+	fetch 1,mem_le_rxbuf_adv_connect_ind_header
+	rtnbit1 LE_SENDER_ADDR_BIT
+	arg 0,rega
+	rtn
+
+
+le_get_master_rx_max:
+	copy contr,contw
+	fetcht 2,mem_remote_rx_max_octets
+	copy contw,contr
+	rtn
+
+
+le_prepare_tx:
+	bpatchx patch37_1,mem_patch37
+	fetch 1,mem_le_arq
+	rtnbit1 wak
+	call le_check_tx_md
+	call le_fifo_get_first_tx_ptr	//no packet to send
+	branch le_send_empty,blank
+	ifetch 2,contr
+	ifetcht 2,contr
+	copy temp,rega
+	isub rega,pdata
+	call le_get_master_rx_max
+	call not_greater_than
+	copy pdata,temp
+	ifetchr type,1,contr
+	copy rega,pdata
+	iadd contr,pdata
+	store 2,mem_contr
+	call le_update_tx_type
+	call le_send_packet
+	
+	call le_fifo_get_first_tx_ptr
+	ifetch 2,contr
+	copy pdata,rega	//rega:total length
+	copy contr,regc
+	ifetcht 2,contr
+	copy temp,regb	//temp&regb is offset
+	isub regb,pdata
+	call le_get_master_rx_max
+	call not_greater_than
+	iadd regb,pdata
+	istore 2,regc
+	isub rega,null
+	nrtn zero
+	branch le_fifo_release_first_node
+
+	
+le_check_tx_md:
+	call le_check_continue
+	rtnmark1 mark_ble_tx_md
+	fetch 1,mem_le_configuration
+	bbit0 BIT_BLE_TRANSMIT_PACKET_BY_MD,le_clear_md
+	call le_fifo_get_second_tx_ptr	//no packet to send
+	branch le_clear_md,blank
+	branch le_set_md
+
+	
+le_check_continue:
+	call le_fifo_get_first_tx_ptr	//no packet to send
+	branch le_clear_md,blank
+	ifetch 2,contr				//pdata:length
+	ifetcht 2,contr				//temp:offest
+	isub temp,rega			//pdata:length - offset
+	call le_get_master_rx_max
+	copy temp,pdata
+	isub rega,null
+	branch le_clear_md,positive				//27 > length -offset
+le_set_md:
+	set1 mark_ble_tx_md,mark
+	rtn
+
+le_clear_md:
+	set0 mark_ble_tx_md,mark
+	rtn
+
+le_update_tx_type:
+	copy rega,pdata
+	rtn blank
+	arg LLID_CONTINUE,type
+	rtn
+
+
+le_att_check_notification_enable: // temp ->handle,output-> pdata,output :contr->rega
+	bpatchx patch37_2,mem_patch37
+	increase 1,temp
+	call le_att_get_handle_ptr
+	increase -2,contr
+	ifetch 2,contr
+	arg CLIENT_CHARACTERTIC_CONFIGURATION,temp
+	isub temp,null
+	nrtn zero
+	increase 1,contr
+	copy contr,rega
+	ifetch 1,contr
+	rtn
+	
+
+le_send_empty:
+	force 0,temp
+	force 1,type
+	
+le_send_packet:
+	bpatchx patch37_3,mem_patch37
+	storet 1,mem_le_txlen
+	fetcht 1,mem_le_arq
+	set1 wak,temp
+	and temp,0xfc,pdata
+	ior type,pdata
+	store 1,mem_le_arq
+	and_into 0x1f,pdata
+	isolate1 mark_ble_tx_md,mark
+	setflag true,md,pdata
+	store 1,mem_le_txheader
+
+	fetch 1,mem_le_txheader
+	compare 1,type,3
+	nbranch le_send_no_txlen,true
+	fetch 1,mem_le_txlen
+	rtn blank
+	
+le_send_no_txlen:	
+	bmark1 mark_ble_encryption,le_send_packet_enc
+	fetchr loopcnt,1,mem_le_txlen
+	fetch 2,mem_contr
+	copy pdata,contr
+	arg mem_le_txpayload,contw
+	branch memcpy_fast
+	
+le_send_packet_enc:
+	call load_sk
+	branch le_encrypt_new_start
+
+get_lpm_wake_ble_rx_lock:
+	arg wake_lock_ble_rx,queue
+	branch lpm_get_wake_lock
+
+put_lpm_wake_ble_rx_lock:
+	arg wake_lock_ble_rx,queue
+	branch lpm_put_wake_lock
+
+
+le_parse:
+	bpatchx patch37_4,mem_patch37
+	rtnmark1 mark_old_packet
+	rtnmark1 mark_ble_crc_fail
+	fetch 1,mem_le_rxbuf_data_header
+	and pdata,0x3,pdata
+	store 1,mem_le_packet_llid
+	fetch 1,mem_le_rxbuf_data_length
+	rtn blank							//empty rtn
+	setarg mem_le_rxbuf_data_payload
+	store 2,mem_le_payload_ptr
+	bpatchx patch37_5,mem_patch37
+	fetch 1,mem_le_packet_llid
+	beq LLID_LE_LL,le_parse_ll
+le_parse_l2cap:
+	call le_check_l2cap_complete
+	nbranch get_lpm_wake_ble_rx_lock,user
+	call put_lpm_wake_ble_rx_lock
+	setarg 0
+	store 2,mem_le_packet_len_recved
+	fetch 2,mem_le_payload_ptr
+	add pdata,2,contr	//l2cap length
+	bpatchx patch37_6,mem_patch37
+	ifetch 2,contr
+	beq LE_L2CAP_CID_ATT,le_parse_att
+	beq LE_L2CAP_CID_SMP,le_parse_smp
+	beq LE_L2CAP_CID_SIGNAL,le_parse_signaling
+	rtn
+
+
+le_check_l2cap_complete:
+	fetch 1,mem_le_packet_llid
+	beq LLID_START,le_check_l2cap_llid_start
+	beq LLID_CONTINUE,le_check_l2cap_llid_continue
+	rtn
+
+//input: pdata is CID number
+//output: 	if CID is legal ,enable user
+//		if ICD is illegal,disable user 
+le_check_l2cap_CID_legal:
+	call enable_user
+	arg LE_L2CAP_CID_ATT,temp
+	isub pdata,null
+	rtn zero
+	arg LE_L2CAP_CID_SIGNAL,temp
+	isub pdata,null
+	rtn zero
+	arg LE_L2CAP_CID_SMP,temp
+	isub pdata,null
+	rtn zero
+	branch disable_user
+
+	
+le_check_l2cap_llid_start:
+	fetch 2,mem_le_payload_ptr
+	copy pdata,contr
+	ifetch 2,contr
+	store 2,mem_le_l2cap_size
+	ifetch 2,contr			//CID
+	call le_check_l2cap_CID_legal
+	nrtn user		//CID error
+	fetcht 1,mem_le_rxbuf_data_length
+	storet 2,mem_le_packet_len_recved
+	fetch 2,mem_le_l2cap_size
+	increase 4,pdata		//CID:2 L2cap length 2
+	isub temp,null
+	branch enable_user,zero
+	fetchr loopcnt,1,mem_le_rxbuf_data_length
+	arg mem_le_l2cap_buf,contw
+	fetch 2,mem_le_payload_ptr
+	copy pdata,contr
+	call memcpy_fast
+	branch disable_user
+
+//no input
+//output: 	if CID is legal ,enable user
+//		if ICD is illegal,disable user 
+le_check_l2cap_continue_legal:
+	call enable_user
+	fetch 2,mem_le_packet_len_recved
+	nrtn blank
+	branch disable_user
+
+le_check_l2cap_llid_continue:
+	call le_check_l2cap_continue_legal
+	nrtn user		//check receive start packet
+	fetch 2,mem_le_packet_len_recved
+	arg mem_le_l2cap_buf,contw
+	iadd contw,rega
+	fetcht 1,mem_le_rxbuf_data_length
+	iadd temp,pdata
+	store 2,mem_le_packet_len_recved
+	fetchr loopcnt,1,mem_le_rxbuf_data_length
+	copy rega,contw
+	fetch 2,mem_le_payload_ptr
+	copy pdata,contr
+	call memcpy_fast
+	setarg mem_le_l2cap_buf
+	store 2,mem_le_payload_ptr		//update ptr->mem_le_l2capbuff
+	fetch 2,mem_le_l2cap_size
+	increase 4,pdata
+	fetcht 2,mem_le_packet_len_recved
+	isub temp,null
+	branch enable_user,zero
+	branch disable_user
+
+
+
+
+
+le_get_search_att_uuid:
+	call store_contr
+	arg mem_le_search_uuid_length,contw
+	branch le_get_search_common
+
+
+	/* rega pointers to data, regb is length */
+le_writeatt_cb:
+	fetch 2,mem_cb_att_write
+	branch callback_func
+	
+le_supervision_update:
+	fetcht 4,mem_le_supervision_timer
+	call get_clkbt
+	isub temp,timeup					/* and to 28 bits */
+	deposit timeup
+	fetcht 2,mem_le_superto
+	lshift4 temp,temp
+	lshift temp,temp
+	isub temp,pdata
+	rtn
+	
+le_supervision_flush:
+	call get_clkbt
+	store 4,mem_le_supervision_timer
+	rtn
+
+	
+//input rega
+le_receive_window_size:
+	bpatchx patch37_7,mem_patch37
+	add rega, coffset_le_peer_sca,contr
+	ifetch 1,contr
+	call le_sca_map
+	add rega, coffset_tsniff,contr
+	ifetch 2,contr
+	imul32 temp,pdata
+	fetcht 2,mem_param_rt_rthalfslot
+	imul32 temp,pdata
+	arg 1000000,temp
+	idiv temp
+	arg PARAM_WINDOWN_SIZE,temp
+	fetch 1,mem_system_clk
+	imul32 temp,temp
+	add rega, coffset_le_window_size,contr
+	ifetch 1,contr
+	imul32 temp,pdata
+	iadd temp,pdata
+	store 4,mem_le_transmit_window	
+	fetch 2,mem_rx_window_sniff
+	call wait_div_end
+	quotient temp
+	iadd temp,pdata
+	add rega, coffset_rx_window,contw
+	istore 2,contw
+	rtn
+
+	
+
+le_init_attlist_search:
+	bpatchx patch38_0,mem_patch38
+	fetch 2,mem_le_search_handle_start
+	iforce regb
+	fetch 2,mem_le_search_handle_end
+	iforce regc
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+	enable user
+	rtn
+
+	/* return handle in pdata, blank:end of list, positive:in range */
+le_att_handle_inrange:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	rtn blank
+	isub regb,null			/* less than start ? */
+	nrtn positive
+	isub regc,null			/* greater than end ? */
+	rtn zero
+	branch le_att_handle_blank,positive
+	force 1,null
+	rtn
+le_att_handle_blank:
+	force 0,pdata
+	rtn
+
+
+	/* handle in temp, return pointer in contr to length, blank not found */
+le_att_get_handle_ptr:
+	call le_att_get_handle_ptr2
+	branch le_att_get_handle_ptr_found,zero
+	rtn
+	
+le_att_get_handle_ptr2:
+	bpatchx patch38_1,mem_patch38
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+le_att_get_handle_loop1:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	rtn blank
+	isub temp,null
+	rtn zero
+	ifetch 1,contr
+	iadd contr,contr	
+	ifetch 1,contr			// length  
+	iadd contr,contr
+	branch le_att_get_handle_loop1
+le_att_get_handle_ptr_found:
+	ifetch 1,contr
+	iadd contr,contr	
+	rtn	
+
+
+
+le_att_get_short_uuid_ptr:
+	bpatchx patch38_2,mem_patch38
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+le_att_get_short_uuid_loop:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	rtn blank
+	ifetch 1,contr
+	iadd contr,contr
+	increase -2,contr
+	ifetch 2,contr
+	isub temp,null
+	rtn zero
+	ifetch 1,contr			 
+	iadd contr,contr
+	branch le_att_get_short_uuid_loop	
+
+
+//output:temp:new handle num
+//contr:address write data
+le_att_get_last_handle:
+	fetch 2,mem_ui_le_uuid_table
+	iforce contr
+le_att_get_last_handle_loop:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	rtn blank
+	add pdata,1,temp
+	ifetch 1,contr
+	iadd contr,contr	
+	ifetch 1,contr			// length
+	iadd contr,contr
+	copy contr,contw
+	branch le_att_get_last_handle_loop
+
+
+le_att_get_handle_info_from_ptr:
+	fetch 2, mem_le_cur_attlist_start_ptr
+	branch le_att_get_handle_info_fast
+
+le_att_get_handle_info:
+	bpatchx patch38_3,mem_patch38
+	fetch 2,mem_ui_le_uuid_table
+le_att_get_handle_info_fast:
+	iforce contr
+le_att_get_handle_loop:
+	ifetch 2,contr
+	and_into 0xff,pdata
+	branch le_att_unfind_handle,blank
+	isub temp,null
+	branch le_att_finded_handle, zero
+	ifetch 1,contr			// length  
+	iadd contr,contr	
+	ifetch 1,contr			//length 
+	iadd contr,contr
+	branch le_att_get_handle_loop
+le_att_unfind_handle:
+	branch disable_blank
+
+le_att_finded_handle:
+	ifetch 1,contr
+	store 1,mem_le_cur_uuid_length
+	copy pdata,loopcnt
+	arg mem_le_cur_uuid,contw
+	call memcpy_fast
+	ifetch 1,contr
+	store 1,mem_le_curr_att_len
+	call store_contr
+	branch enable_blank
+
+	
+le_modified_name:
+	bpatchx patch38_4,mem_patch38
+	call le_modified_name_att_list
+	branch le_modified_name_adv
+
+le_modified_name_att_list:
+	arg UUID_CHRCTR_DEVICE_NAME,temp
+	call le_att_get_short_uuid_ptr
+	rtn blank
+	ifetch 1,contr						// attribute length
+	copy contr,contw
+	fetcht 1,mem_le_name_len
+	copy temp,loopcnt
+	isub temp,null
+	nbranch le_name_length_longer_than_att,positive
+	isub temp,temp
+	arg mem_le_name,contr
+	call memcpy_fast
+	copy temp,loopcnt
+	ncall memcpy_empty,zero
+	rtn
+le_name_length_longer_than_att:
+	copy pdata,loopcnt
+	arg mem_le_name,contr
+	branch memcpy_fast
+
+
+le_modified_name_adv:
+	arg mem_le_adv_data_len+32,regc
+	arg mem_le_adv_data,rega
+	call le_modified_name_adv_and_scan
+	setarg 0
+	setflag user,0,pdata
+	store 1,mem_pdatatemp
+	arg mem_le_scan_data_len+32,regc
+	arg mem_le_scan_data,rega
+	call le_modified_name_adv_and_scan
+	rtn user
+	fetch 1,mem_pdatatemp
+	branch assert,blank
+	rtn
+
+
+le_modified_name_adv_and_scan:
+	bpatchx patch38_5,mem_patch38
+	call enable_user
+	call clear_temp_block
+	arg 0,regb	//current length
+	arg mem_le_data_temp,contw
+	call le_modified_name_adv_loop
+	fetch 1,mem_le_name_len
+	add pdata,1,temp
+	iadd regb,rega	
+	increase 2,rega
+	sub rega,0x1f,null
+	nbranch le_modified_name_adv_and_scan_name_overflow,positive
+	istoret 1,contw		//store ble name length
+	arg GAP_ADTYPE_LOCAL_NAME_COMPLETE,temp
+	istoret 1,contw		//store ble name type
+	iforce loopcnt
+	call memcpy_fast
+	copy rega,regb
+le_modified_name_adv_and_scan_store_data:
+	deposit regb
+	store 1,mem_le_data_len_temp
+	arg mem_le_data_len_temp,contr
+	setarg -32
+	iadd regc,contw
+	branch memcpy32
+
+le_modified_name_adv_and_scan_name_overflow:
+	call disable_user
+	branch le_modified_name_adv_and_scan_store_data
+	
+le_modified_name_adv_loop:
+	ifetch 1,rega		//pdata:length
+	rtn blank			//length is zero,ending find
+	pincrease 1		//length += 1
+	ifetcht 1,contr		//pdata:type
+	sub temp,GAP_ADTYPE_LOCAL_NAME_COMPLETE,null
+	branch le_modified_name_adv_found_name,zero
+	iadd regb,regb	
+	copy rega,contr
+	iforce loopcnt
+	call memcpy_fast
+	copy contr,rega
+le_modified_name_adv_loop2:
+	deposit rega
+	isub regc,null
+	rtn positive
+	branch le_modified_name_adv_loop
+
+le_modified_name_adv_found_name:
+	iadd rega,rega
+	branch le_modified_name_adv_loop2
+
+
+memcpy_empty:
+	setarg SPACE
+	istore 1,contw
+	loop memcpy_empty
+	rtn
+
+	
+le_lpm_set_mult:
+	bpatchx patch38_6,mem_patch38
+	disable wake
+	branch le_lpm_set_mult_attempt,attempt
+	nbranch le_lpm_lost,match
+le_lpm_set_mult_attempt:
+	call lpm_match
+	fetch 2,mem_rx_window_sniff
+	store 2,mem_le_receive_window
+le_lpm_set_mult_attempt_match:
+	nbranch lpm_mult_short,match
+	bmark1 mark_old_packet,lpm_mult_short
+
+	fetch 1,mem_le_rxbuf_data_length
+	nbranch lpm_mult_short,blank		// rx not empty, short interval
+	fetch 1,mem_le_txlen
+	nbranch lpm_mult_short,blank		// tx not empty, short interval
+	
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_SHORT_MULT,lpm_mult_short	//check flag,if flag is 1,always short mult
+	
+	fetch 1,mem_le_state
+	bbit1 lestate_update_param,lpm_mult_short
+	branch lpm_mult_wait_timeout
+	
+le_lpm_lost:
+	fetcht 2,mem_rx_window_sniff
+	rshift temp,temp
+	fetch 2,mem_le_receive_window
+	iadd temp,pdata
+	store 2,mem_le_receive_window
+	branch lpm_lost
+
+///////////////////////////////BLE CONFIG//////////////////////////////////////////
+le_set_config_fixed_tk:
+	arg BIT_BLE_PASSKEY_FIXED_KEY,queue
+	branch le_set_config
+
+le_clr_config_fixed_tk:
+	arg BIT_BLE_PASSKEY_FIXED_KEY,queue
+	branch le_clr_config
+
+le_set_config_fixed_ltk:
+	arg BIT_BLE_PAIRING_FIXED_LTK,queue
+	branch le_set_config
+
+le_clr_config_fixed_ltk:
+	arg BIT_BLE_PAIRING_FIXED_LTK,queue
+	branch le_clr_config
+
+le_set_config_more_data:
+	arg BIT_BLE_TRANSMIT_PACKET_BY_MD,queue
+	branch le_set_config
+
+le_clr_config_more_data:
+	arg BIT_BLE_TRANSMIT_PACKET_BY_MD,queue
+	branch le_clr_config
+
+le_set_config_read_authentication:
+	arg BIT_BLE_READ_AUTH,queue
+	branch le_set_config
+
+le_clr_config_read_authentication:
+	arg BIT_BLE_READ_AUTH,queue
+	branch le_clr_config
+
+le_set_config_write_authentication:
+	arg BIT_BLE_WRITE_AUTH,queue
+	branch le_set_config
+
+le_clr_config_write_authentication:
+	arg BIT_BLE_WRITE_AUTH,queue
+	branch le_clr_config
+
+le_set_config_short_mult:
+	arg BIT_BLE_SHORT_MULT,queue
+	branch le_set_config
+
+le_clr_config_short_mult:
+	arg BIT_BLE_SHORT_MULT,queue
+	branch le_clr_config
+
+
+le_set_config:
+	fetch 1,mem_le_configuration
+	qset1 pdata
+	store 1,mem_le_configuration
+	rtn
+
+le_clr_config:
+	fetch 1,mem_le_configuration
+	qset0 pdata
+	store 1,mem_le_configuration
+	rtn
+
+le_set_fixed_ltk:
+	setarg 0x112233
+	store 3,mem_le_fixed_ltk
+	setarg 0x445566
+	istore 3,contw
+	setarg 0x778899
+	istore 3,contw
+	setarg 0x001122
+	istore 3,contw
+	setarg 0x334455
+	istore 3,contw
+	setarg 0x66
+	istore 1,contw
+	rtn
+
+
+le_set_justwork:
+	setarg 0x01000302
+	store 4,mem_le_pres
+	setarg 0x010010
+	store 3,mem_le_pres_max_keysize
+	jam 1,mem_le_pairing_mode
+	rtn
+
+/////////////////////////////////////////////////////////////////////////
+
+le_fifo_malloc_tx_empty:
+	arg 0,rega
+	arg LLID_EMPTY,type
+	branch le_fifo_malloc_tx
+
+
+//rega:len regb:ll opcode
+le_fifo_malloc_tx_ll:
+	arg LLID_LE_LL,type
+	call le_fifo_malloc_tx
+	copy regb,pdata
+	istore 1,contw
+	rtn
+	
+
+//rega:len regb:cid
+le_fifo_malloc_tx_l2cap:
+	force LLID_START,type
+	increase 4,rega
+	call le_fifo_malloc_tx
+	increase -4,rega
+	copy rega,pdata
+	istore 2,contw
+	copy regb,pdata
+	istore 2,contw
+	rtn
+
+
+//rega:len type:llid
+le_fifo_malloc_tx:
+	bpatchx patch38_7,mem_patch38
+	increase 5,rega
+	call ble_l2cap_malloc
+	increase -5,rega
+	copy rega,pdata
+	istore 2,contw				//lengh
+	setarg 0
+	istore 2,contw				//offset
+	copy type,pdata
+	istore 1,contw				//LLID
+	rtn
+
+
+le_fifo_get_first_tx_ptr:
+	call l2cap_malloc_fifo_out
+	copy pdata,contr
+	rtn
+
+le_fifo_get_second_tx_ptr:
+	fetch 2,mem_tx_fifo2_ptr
+	rtn
+
+le_fifo_get_last_tx_ptr:
+	call le_fifo_get_last_tx_ptr0
+	copy pdata,contr
+	rtn
+
+
+le_fifo_get_last_tx_ptr0:
+	fetch 2,mem_tx_fifo3_ptr
+	rtn
+
+
+le_fifo_get_first_l2cap_ptr:
+	call le_fifo_get_first_tx_ptr
+	increase 5,contr
+	rtn
+
+le_fifo_get_first_att_ptr:
+	call le_fifo_get_first_tx_ptr
+	increase 9,contr
+	rtn
+
+le_fifo_get_last_att_ptr:
+	call le_fifo_get_last_tx_ptr
+	increase 9,contr
+	rtn
+
+le_fifo_get_last_l2cap_ptr:
+	call le_fifo_get_last_tx_ptr
+	increase 5,contr
+	rtn
+
+
+le_fifo_check_full:
+	branch l2cap_malloc_is_fifo_full
+
+
+le_fifo_check_nearly_full:
+	branch l2cap_malloc_is_fifo_nearly_full
+
+	
+le_fifo_check_empty:
+	branch l2cap_malloc_is_fifo_empty
+
+
+le_fifo_release_first_node:
+	branch l2cap_malloc_free
+
+
+/*
+	function name:le_set_dle (data packet length extension)
+	input:pdata is dle params
+	bit0~bit15 max rx octets
+	bit16~bit31 max rx time
+	bit32~bit47 max tx octets
+	bit48~bit63 max tx time
+*/
+le_set_dle:
+	store 8,mem_local_rx_max_octets
+	branch le_set_feature_data_packet_length_extension
+
+
+/*
+	function name:le_set_phys
+	input:temp is tx & rx phys
+	bit0~bit7 is tx phys
+	bit8~bit15 is rx phys
+*/
+le_set_phys:
+	and temp,0xff,rega
+	call le_set_tx_phy
+	rshift8 temp,rega
+	branch le_set_rx_phy
+
+le_set_tx_phy:
+	storer rega,1,mem_le_tx_phys
+	isolate1 BIT_LE_2M_PHY,rega
+	call le_set_feature_2M_phy,true
+	isolate1 BIT_LE_CODED_PHY,rega
+	call le_set_feature_coded_phy,true
+	rtn
+
+le_set_rx_phy:
+	storer rega,1,mem_le_rx_phys
+	branch le_set_tx_phy+1
+
+
+le_set_feature_2M_phy:
+	arg BIT_LL_FEATURE_LE_2M_PHY,queue
+	branch le_set_feature
+
+
+le_set_feature_coded_phy:
+	arg BIT_LL_FEATURE_LE_CODED_PHY,queue
+	branch le_set_feature
+
+
+le_set_feature_data_packet_length_extension:
+	arg BIT_LL_FEATURE_LE_DATA_PACKET_LENGTH_EXTENSION,queue
+	branch le_set_feature
+
+
+le_set_feature:
+	fetch 8,mem_le_local_feature
+	qset1 pdata
+	store 8,mem_le_local_feature
+	rtn
+
+
+
Index: mouse_public_3mode_usb/program/ble_protocol_stack/le_advertising.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_advertising.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_advertising.prog	(working copy)
@@ -0,0 +1,381 @@
+
+/*
+ble core spec advertising
+*/
+
+le_advertising_dispatch:
+	jam FUN_RX_LL_1M_PHY,mem_le_rx_phy
+	jam FUN_TX_LL_1M_PHY,mem_le_tx_phy
+	call le_enable
+	call le_scan
+	call le_adv
+	branch le_disable
+
+le_scan:
+	bpatchx patch39_0,mem_patch39
+	fetch 1,mem_le_scan_enable
+	rtnne LE_SCAN_ENABLE
+	arg le_scan_interval_timer,queue
+	call timer_check
+	nrtn blank
+	fetch 2,mem_le_scan_interval
+	fetcht 2,mem_le_scan_window
+	isub temp,pdata
+	arg le_scan_interval_timer,queue
+	call timer_init
+	disable master
+	call le_init_adv
+	call le_wait_adv
+	nrtn match
+	bpatchx patch39_1,mem_patch39
+	fetch 6,mem_le_rxbuf+2
+	store 6,mem_le_plap
+//	call le_scan_dongle
+
+	fetch 1,mem_le_adv_rcv
+	increase 1,pdata
+	store 1,mem_le_adv_rcv
+	call le_create_conn
+	rtn master
+	call le_send_scan_request
+	nrtn match
+	fetch 1,mem_le_scanrsp_rcv
+	increase 1,pdata
+	store 1,mem_le_scanrsp_rcv
+	fetch 9,mem_le_rxbuf+8
+	store 9,mem_tmp_buffer
+	rtn
+
+
+le_wait_adv:
+	bpatchx patch39_2,mem_patch39
+	call le_next_adv_channel
+	call le_receive_adv
+	fetch 1,mem_le_adv_waitcnt
+	increase 1,pdata
+	store 1,mem_le_adv_waitcnt
+	rtn
+
+
+le_create_conn:
+	bpatchx patch39_3,mem_patch39
+	fetch 1,mem_cmd_le_create_conn
+	rtnne hci_cmd_le_create_conn
+	fetch 6,mem_le_plap
+	fetcht 6,mem_le_conn_peer_addr
+	isub temp,null
+	nrtn zero
+	call context_new
+	nrtn zero
+	call le_connect_request
+	call le_init_master
+	jam 0,mem_hci_cmd
+	jam 0,mem_le_peer_sca
+	jam 0,mem_le_scan_enable
+	jam 0,mem_cmd_le_create_conn
+	branch context_save
+
+le_connect_request:
+	bpatchx patch39_4,mem_patch39
+	force -1,pdata
+	setsect 2,1
+	store 5,mem_le_channel_map
+	arg mem_le_state,rega	
+	call le_calc_channel_map	
+	force 4,loopcnt
+	arg mem_le_access,contw
+	call generate_random_loop	
+	fetch 2,mem_le_timeout
+	store 2,mem_le_superto
+le_con_req_hop_retry:
+	random pdata
+	and_into 0xf,pdata
+	sub pdata,4,null
+	branch le_con_req_hop_retry,positive
+	store 1,mem_le_hop
+	store 1,mem_tmp1
+	bpatchx patch39_5,mem_patch39
+	fetcht 2,mem_le_conn_interval
+	storet 2,mem_le_tsniff	
+	copy temp,regc			// tsniff in regc
+	add clkn_bt,7,pdata			// leave space for offset
+	idiv regc
+	call wait_div_end
+	remainder rega
+	isub rega,pdata
+	iadd regc,pdata
+	fetcht 2,mem_le_dsniff
+	iadd temp,pdata
+	store 4,mem_le_anchor
+	isub clkn_bt,rega
+	increase -6,rega			// window offset
+	arg 0x2205,regb			// length & CONN_REQ PDU
+	fetch 1,mem_le_conn_own_addr_type
+	nsetflag blank,LE_SENDER_ADDR_BIT,regb
+	fetch 1,mem_le_conn_peer_addr_type
+	nsetflag blank,LE_RECEIVER_ADDR_BIT,regb
+	copy regb,pdata
+	store 2,mem_le_txheader
+	fetch 6,mem_le_lap
+	istore 6,contw//own addr
+	fetch 6,mem_le_plap
+	istore 6,contw// peer addr
+	fetch 4,mem_le_access
+	istore 4,contw
+	random pdata
+	istore 2,contw				/* crc init */
+	random pdata
+	istore 1,contw
+	force 2,pdata				/* window size */	
+	istore 1,contw
+	rshift2 rega,pdata
+	istore 2,contw				/* window offset */
+	rshift2 regc,pdata			
+	istore 2,contw				/* conn Interval */
+	bpatchx patch39_6,mem_patch39
+	setarg 0					/* slave latency */
+	istore 2,contw
+	fetch 2,mem_le_timeout
+	istore 2,contw
+	fetch 5,mem_le_channel_map
+	istore 5,contw				/* channel map */
+	fetch 1,mem_le_hop
+	arg param_le_sca,temp
+	ior temp,pdata
+	istore 1,contw
+	call le_transmit_norx
+	setarg mem_le_txheader
+	add pdata,18,contr
+	ifetch 3,contr
+	store 3,mem_le_crcinit
+	rtn
+		
+
+
+le_adv:
+	jam 36,mem_le_ch_mapped
+	jam 0,mem_le_adv_channel_map_temp
+le_adv_loop:
+	fetch 1,mem_le_adv_enable
+	rtn blank
+	arg le_adv_interval_timer,queue
+	call timer_check
+	nrtn blank
+	bpatchx patch39_7,mem_patch39
+le_adv_loop_tx:
+	enable swfine
+	call le_init_adv
+	call le_next_adv_channel
+	call le_send_adv_ind
+	nbranch le_adv_not_match,match
+	fetch 1,mem_le_req_rcv
+	increase 1,pdata
+	store 1,mem_le_req_rcv
+	fetch 1,mem_le_rxbuf_adv_header
+	and pdata,0x0f,pdata
+	beq SCAN_REQ,le_send_scan_response
+	beq CONNECT_REQ,le_parse_connect_req
+le_adv_not_match:
+	bpatchx patch3a_0,mem_patch3a
+	fetch 1,mem_le_adv_channel_map_temp
+	fetcht 1,mem_le_adv_channel_map
+	isub temp,null
+	nbranch le_adv_loop,zero
+	random pdata 
+	arg 0x1ff,temp
+	iand temp,pdata
+	add pdata,250,pdata
+	call delay
+	arg le_adv_interval_timer,queue
+	fetch 2,mem_le_adv_interval
+	branch timer_init
+
+
+le_init_adv:
+	bpatchx patch3a_1,mem_patch3a
+	disable master
+le_adv_access:
+	setarg 0x8e89be
+	lshift8 pdata,pdata
+	or_into 0xd6,pdata
+	iforce access
+	setarg 0x555555
+	store 3,mem_le_crcinit
+	branch calc_mod_value_scale_le
+
+
+
+le_send_adv_ind:
+	bpatchx patch3a_2,mem_patch3a
+	fetch 1,mem_le_adv_type
+	fetcht 1,mem_le_adv_own_addr_type
+	lshift4 temp,temp
+	lshift2 temp,temp
+	iadd temp,temp
+	storet 1,mem_le_txheader
+	beq ADV_DIRECT_IND,le_send_adv_direct_ind
+	fetcht 1,mem_le_adv_data_len
+	add temp,6,pdata
+	store 1,mem_le_txlen
+	fetch 6,mem_le_lap
+	store 6,mem_le_txpayload
+	copy temp,loopcnt
+	arg mem_le_adv_data,contr
+	call memcpy_fast
+	branch le_send_adv_transmit
+
+le_send_adv_direct_ind:
+	setarg 12
+	store 1,mem_le_txlen
+	fetch 6,mem_le_lap
+	store 6,mem_le_txpayload
+	fetch 6,mem_hci_plap
+	istore 6,contw
+le_send_adv_transmit:
+	bpatchx patch3a_3,mem_patch3a
+	fetch 1,mem_le_adv_transmit
+	increase 1,pdata
+	store 1,mem_le_adv_transmit
+	arg 1800,stop_watch
+	disable match
+	branch le_transmit_receive_sifs_without_change_mode
+
+
+le_send_scan_request:
+	bpatchx patch3a_4,mem_patch3a
+	fetch 1,mem_le_scan_type
+	rtnne LE_SCAN_TYPE_ACTIVE
+	fetch 1,mem_le_adv_transmit
+	increase 1,pdata
+	store 1,mem_le_adv_transmit
+	arg 0x0c03,temp// length + SCAN_REQ PDU
+	fetch 1,mem_le_scan_own_addr_type
+	nsetflag blank,LE_SENDER_ADDR_BIT,temp
+	copy rega,pdata
+	nsetflag blank,LE_RECEIVER_ADDR_BIT,temp	
+	storet 2,mem_le_txheader
+	fetch 6,mem_le_lap
+	istore 6,contw
+	fetch 6,mem_le_plap
+	istore 6,contw
+	branch le_transmit_receive_sifs_without_change_mode
+
+le_send_scan_response:
+	fetch 6,mem_le_rxbuf_adv_scan_req_adv_address
+	fetcht 6,mem_le_lap
+	isub temp,null
+	nrtn zero
+	arg SCAN_RSP,temp
+	fetch 1,mem_le_adv_own_addr_type
+	nsetflag blank,LE_SENDER_ADDR_BIT,temp
+	storet 1,mem_le_txheader
+	fetcht 1,mem_le_scan_data_len
+	add temp,6,pdata
+	store 1,mem_le_txlen
+	fetch 6,mem_le_lap
+	store 6,mem_le_txpayload
+	arg mem_le_scan_data,contr
+	copy temp,loopcnt
+	call memcpy_fast
+	call le_transmit_norx
+	branch le_adv_not_match
+
+le_parse_connect_req:
+	fetch 6,mem_le_rxbuf_adv_connect_ind_adv_address
+	fetcht 6,mem_le_lap
+	isub temp,null
+	nrtn zero
+	call le_scan_check_sender_addr_type
+	storer rega,1,mem_le_conn_peer_addr_type
+	fetch 6,mem_le_rxbuf_adv_connect_ind_init_address
+	store 6,mem_le_plap
+	fetch 8,mem_le_rxbuf_adv_connect_ind_access_address
+	store 8,mem_le_access 	// and crcinit & window size
+	fetcht 2,mem_le_rxbuf_adv_connect_ind_win_offset	// transmit offset
+	bpatchx patch3a_5,mem_patch3a
+	lshift2 temp,temp
+	fetch 2,mem_le_rxbuf_adv_connect_ind_interval	// connInterval
+	lshift2 pdata,pdata
+	store 2,mem_le_tsniff
+	store 4,mem_le_anchor
+	isub temp,pdata
+	add pdata,-2,clke_bt
+	fetch 9,mem_le_rxbuf_adv_connect_ind_latency
+	store 9,mem_le_slave_latency// and super to & channel map
+	fetch 1,mem_le_rxbuf_adv_connect_ind_hop_and_sca
+	and pdata,0x1f,temp
+	storet 1,mem_le_hop
+	rshift4 pdata,temp
+	rshift temp,temp
+	storet 1,mem_le_peer_sca
+	arg mem_le_state,rega
+	call le_receive_window_size
+	arg mem_le_state,rega	
+	call le_calc_channel_map
+	call le_init_slave
+	call context_new
+	nrtn zero
+	bpatchx patch3a_6,mem_patch3a
+	call calc_clke_offset
+	call le_l2cap_reset_signaling_identifier
+	jam BT_EVT_LE_CONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+	branch context_save
+
+
+le_next_adv_channel:
+	bpatchx patch3a_7,mem_patch3a
+	fetch 1,mem_le_ch_mapped
+	beq 37,le_next_adv_channel_curr_channel_37
+	beq 38,le_next_adv_channel_curr_channel_38
+	beq 39,le_next_adv_channel_curr_channel_39
+	branch le_next_adv_channel_curr_channel_39
+
+le_next_adv_channel_curr_channel_37:
+	fetcht 1,mem_le_adv_channel_map
+	isolate1 BIT_ADV_CHANNEL_MAP_38,temp		//check 38 channel enable
+	branch set_le_next_adv_channel_38,true
+	isolate1 BIT_ADV_CHANNEL_MAP_39,temp		//check 39 channel enable
+	branch set_le_next_adv_channel_39,true
+	branch set_le_next_adv_channel_37
+
+
+le_next_adv_channel_curr_channel_38:
+	fetcht 1,mem_le_adv_channel_map
+	isolate1 BIT_ADV_CHANNEL_MAP_39,temp		//check 39 channel enable
+	branch set_le_next_adv_channel_39,true
+	isolate1 BIT_ADV_CHANNEL_MAP_37,temp		//check 37 channel enable
+	branch set_le_next_adv_channel_37,true
+	branch set_le_next_adv_channel_38
+
+
+le_next_adv_channel_curr_channel_39:
+	fetcht 1,mem_le_adv_channel_map
+	isolate1 BIT_ADV_CHANNEL_MAP_37,temp		//check 37 channel enable
+	branch set_le_next_adv_channel_37,true
+	isolate1 BIT_ADV_CHANNEL_MAP_38,temp		//check 38 channel enable
+	branch set_le_next_adv_channel_38,true
+	branch set_le_next_adv_channel_39
+
+set_le_next_adv_channel_37:
+	jam 37,mem_le_ch_mapped
+	fetch 1,mem_le_adv_channel_map_temp
+	set1 BIT_ADV_CHANNEL_MAP_37,pdata
+	store 1,mem_le_adv_channel_map_temp
+	rtn
+
+set_le_next_adv_channel_38:
+	jam 38,mem_le_ch_mapped
+	fetch 1,mem_le_adv_channel_map_temp
+	set1 BIT_ADV_CHANNEL_MAP_38,pdata
+	store 1,mem_le_adv_channel_map_temp
+	rtn
+
+set_le_next_adv_channel_39:
+	jam 39,mem_le_ch_mapped
+	fetch 1,mem_le_adv_channel_map_temp
+	set1 BIT_ADV_CHANNEL_MAP_39,pdata
+	store 1,mem_le_adv_channel_map_temp
+	rtn
+
+
Index: mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_att.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_att.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_att.prog	(working copy)
@@ -0,0 +1,874 @@
+
+
+le_parse_att:
+	ifetch 3,contr
+	store 3,mem_le_att_opcode
+	beq ATTOP_EXCHANGE_MTU_REQUEST,le_parse_att_exchange_mtu_request
+	beq ATTOP_EXCHANGE_MTU_RESPONSE,le_parse_att_exchange_mtu_response
+	beq ATTOP_FIND_INFORMATION_REQUEST,le_parse_att_find_information_request
+	beq ATTOP_FIND_BY_TYPE_VALUE_REQUEST,le_parse_att_find_by_type_value_request
+	beq ATTOP_READ_BY_TYPE_REQUEST,le_parse_att_read_by_type_request
+	beq ATTOP_READ_REQUEST,le_parse_att_read_request
+	beq ATTOP_READ_BLOB_REQUEST,le_parse_att_read_blob_request
+	beq ATTOP_READ_BY_GROUP_TYPE_REQUEST,le_parse_att_read_by_group_type_request
+	beq ATTOP_WRITE_REQUEST,le_parse_att_write_request
+	beq ATTOP_PREPARE_WRITE_REQUEST,le_parse_att_prepare_write_request
+	beq ATTOP_EXECUTE_WRITE_REQUEST,le_parse_att_execute_write_request
+	beq ATTOP_HANDLE_VALUE_CONFIRMATION,le_parse_handle_value_confirmation
+	beq ATTOP_WRITE_COMMAND,le_parse_att_write_command
+	rtn
+
+
+le_send_att_exchange_mtu_requset:
+	force 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_EXCHANGE_MTU_REQUEST
+	istore 1,contw
+	fetch 2,mem_le_local_mtu
+	istore 2,contw
+	rtn
+
+
+le_parse_att_exchange_mtu_request:
+	call le_parse_att_exchange_mtu_response
+le_send_att_exchange_mtu_response:
+	force 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_EXCHANGE_MTU_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_local_mtu
+	istore 2,contw
+	rtn
+
+le_parse_att_exchange_mtu_response:
+	rshift8 pdata,pdata
+	store 2,mem_le_remote_mtu
+	rtn
+
+le_parse_att_find_information_request:
+	call le_get_search_handle_start_end_common
+	call enable_user
+	branch le_send_att_find_information_response
+	
+le_send_att_find_information_response:
+	arg 3,timeup
+	call le_init_attlist_search
+le_send_att_find_information_res_loop:
+	call le_att_handle_inrange
+	branch le_send_att_find_information_res_end,blank
+	nbranch le_send_att_find_information_res_next,positive
+	increase -2,contr
+	call store_contr
+	call get_contw
+	nbranch le_send_att_find_information_res_store_info,user
+	call push_stack_rega_b_c
+	call disable_user
+	storer timeup,4,mem_timeup
+	force 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	fetchr timeup,4,mem_timeup
+	call pop_stack_rega_b_c
+	setarg ATTOP_FIND_INFORMATION_RESPONSE
+	istore 1,contw
+	setarg UUID_SIZE_16BIT
+	istore 1,contw
+le_send_att_find_information_res_store_info:
+	call get_contr
+	ifetch 2,contr
+	and_into 0xff,pdata
+	istore 2,contw
+	ifetch 1,contr
+	copy pdata,loopcnt
+	call memcpy
+	call store_contw
+	increase -1,timeup
+	branch le_send_att_find_information_res_end,zero
+le_send_att_find_information_res_cont:
+	ifetch 1,contr
+	iadd contr,contr
+	branch le_send_att_find_information_res_loop
+le_send_att_find_information_res_next:
+	ifetch 1,contr
+	iadd contr,contr
+	branch le_send_att_find_information_res_cont
+le_send_att_find_information_res_end:
+	branch le_send_att_error_response_notfound,user
+	branch le_send_auto_len_by_mem
+
+
+le_parse_att_find_by_type_value_request:
+	call le_get_search_handle_start_end_common
+	ifetch 2,contr
+	store 2,mem_le_search_uuid
+	call store_contr
+	arg mem_le_search_att_type_length,contw
+	fetch 2,mem_le_l2cap_size
+	increase -7,pdata
+	call le_get_search_common2
+	branch le_send_att_find_by_type_value_response
+
+
+le_start_end_handle_check_1:
+	disable user
+	fetcht 2,mem_le_search_handle_start
+	fetch 2,mem_le_search_handle_end
+	isub temp,null
+	nbranch le_start_end_handle_check_1_fail,positive
+	deposit temp
+	rtnne 0
+le_start_end_handle_check_1_fail:
+	enable user
+	jam ATT_ERR_INVALID_HANDLE,mem_le_err_code
+	branch le_send_att_error_response
+
+
+le_send_att_find_by_type_value_response:
+	call le_start_end_handle_check_1
+	rtn user
+	fetcht 2,mem_le_search_uuid
+	setarg UUID_GATT_PRIMARY_SERVICE
+	isub temp,null
+	branch le_send_att_find_by_type_value_res_primary,zero
+	branch le_send_att_error_response_notfound
+	
+
+le_send_att_find_by_type_value_res_primary:
+	jam LE_FIND_BY_TYPE_VAL_RES_NOT_FOUND,mem_le_search_res
+	fetcht 2,mem_le_search_handle_start
+	storet 2,mem_temp
+	call le_att_get_handle_info
+	nbranch le_send_att_error_response_notfound,blank
+le_send_att_find_primary_search_loop:
+	fetcht 2,mem_temp
+	call le_att_get_handle_info
+	nbranch le_send_att_error_response_notfound2,blank	
+	copy contr,rega
+	fetch 1,mem_le_curr_att_len
+	copy pdata,loopcnt
+	fetcht 1,mem_le_search_att_type_length
+	isub temp,null
+	nbranch le_send_att_find_primary_search_loop1,zero
+	arg mem_le_search_att_type,regb
+	call string_compare
+
+	branch le_send_att_find_primary_search_end_start_handle_found,zero
+
+	fetch 2,mem_le_cur_uuid
+	fetcht 2,mem_le_search_uuid
+	isub temp,null
+	branch le_send_att_find_primary_search_end_ending_handle_found,zero
+le_send_att_find_primary_search_loop1:
+	fetch 2,mem_temp
+	increase 1,pdata
+	store 2,mem_temp
+	branch le_send_att_find_primary_search_loop
+
+le_send_att_error_response_notfound2:
+	fetch 1,mem_le_search_res
+	beq LE_FIND_BY_TYPE_VAL_RES_FOUND_STARTING_HANDLE,le_send_att_find_primary_search_end_ending_handle_found
+	branch le_send_att_error_response_notfound
+
+	
+le_send_att_find_primary_search_end_start_handle_found:
+	fetch 2,mem_le_cur_uuid
+	fetcht 2,mem_le_search_uuid
+	isub temp,null
+	nbranch  le_send_att_find_primary_search_loop1,zero
+	jam LE_FIND_BY_TYPE_VAL_RES_FOUND_STARTING_HANDLE,mem_le_search_res
+//	copy rega,temp
+	fetcht 2,mem_temp
+	storet 2,mem_le_cur_handle_start
+	branch le_send_att_find_primary_search_loop1
+
+le_send_att_find_primary_search_end_ending_handle_found:
+	fetch 1,mem_le_search_res
+	beq LE_FIND_BY_TYPE_VAL_RES_NOT_FOUND,le_send_att_find_primary_search_loop1
+	jam LE_FIND_BY_TYPE_VAL_RES_FOUND_ENDING_HANDLE,mem_le_search_res
+	fetcht 2,mem_temp
+	increase -1,temp
+	storet 2,mem_le_cur_handle_end
+	
+le_send_att_find_primary_search_end:
+	arg 5,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_FIND_BY_TYPE_VALUE_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_cur_handle_start
+	istore 2,contw
+	fetch 2,mem_le_cur_handle_end
+	istore 2,contw
+	rtn
+
+
+
+le_parse_att_read_by_type_request:
+	call le_get_search_handle_start_end_common
+	call le_get_search_att_type
+	branch le_send_att_read_by_type_response
+	
+le_send_att_read_by_type_response:
+	fetcht 2,mem_le_search_handle_start
+	storet 2,mem_temp
+	call le_init_attlist_search
+	call le_att_get_handle_ptr2
+	increase -2,contr
+	copy contr,pdata
+	store 2,mem_le_cur_attlist_start_ptr
+
+	fetcht 2,mem_le_search_att_type
+	setarg UUID_CHRCTR_DEVICE_NAME
+	isub temp,null
+	branch le_send_att_read_by_type_res_device_name,zero
+	setarg UUID_GATT_CHARACTERISTIC
+	isub temp,null
+	nbranch le_send_att_read_by_type_res_not_characteristic,zero
+	arg 2,timeup
+le_send_att_read_by_type_response_loop:
+	call le_att_check_handle_end
+	nbranch le_send_att_read_by_type_response_end,positive
+	fetcht 2,mem_temp
+	call le_att_get_handle_info_from_ptr
+	nbranch le_send_att_read_by_type_response_end,blank
+	call le_att_same_type
+	nbranch le_send_att_read_by_type_response_next_handle,zero
+	nbranch le_send_att_read_by_type_res_found_next,user
+	disable user
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_TYPE_RESPONSE
+	istore 1,contw
+	copy contw,alarm
+	increase 1,contw
+	
+	call le_send_att_read_by_type_write_properties
+	call le_att_next_handle
+	call le_att_get_handle_info_from_ptr
+	call le_send_att_read_by_type_write_uuid
+	fetch 1,mem_le_cur_uuid_length
+	add pdata,5,rega
+	istorer rega,1,alarm
+	
+	sub rega,7,null
+	ncall enable_user2,zero
+	call disable_user2,zero
+ 	call le_get_search_max_mtu_data
+	idiv rega
+	call wait_div_end
+	quotient timeup
+	increase -1,timeup
+	branch le_send_att_read_by_type_response_end,zero
+le_send_att_read_by_type_response_next_handle:
+	call le_att_next_handle
+	branch le_send_att_read_by_type_response_loop
+le_send_att_read_by_type_response_end:
+	branch le_send_att_error_response_notfound,user
+	branch le_send_auto_len_by_mem
+
+le_send_att_read_by_type_res_found_next:
+	call le_store_att_record
+	call le_att_next_handle
+	call le_att_get_handle_info_from_ptr
+	call le_send_att_read_by_type_res_check_pair_length_type
+	nbranch le_send_att_read_by_type_response_end,blank
+
+	call get_contw
+	fetch 2,mem_temp
+	increase -1,pdata
+	istore 2,contw
+	call le_write_att_record_common
+	call le_send_att_read_by_type_write_uuid
+	increase -1,timeup
+	branch le_send_att_read_by_type_response_end,zero
+	branch le_send_att_read_by_type_response_next_handle
+
+	
+le_send_att_read_by_type_write_properties:
+	fetch 2,mem_temp
+	istore 2,contw
+	
+	fetch 1,mem_le_curr_att_len
+	copy pdata,loopcnt
+	call get_contr
+	call memcpy_fast
+	branch store_contw
+le_send_att_read_by_type_write_uuid:
+	call get_contw
+	fetch 2,mem_temp
+	istore 2,contw
+	call store_contw
+	fetch 1,mem_le_cur_uuid_length
+	copy pdata,loopcnt
+	call get_contw	
+	call get_contr
+	isub loopcnt,contr
+	increase -1,contr
+	call memcpy_fast
+	branch store_contw
+
+
+
+le_send_att_read_by_type_res_not_characteristic:
+	call le_att_get_short_uuid_ptr
+	branch le_send_att_error_response_notfound,blank
+	copy contr,regc
+	increase -5,contr // point to handle
+	ifetch 2,contr
+	store 2,mem_temp
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_TYPE_RESPONSE
+	istore 1,contw
+	ifetch 1,regc
+	copy pdata,loopcnt
+	increase 2,pdata
+	istore 1,contw
+	fetch 2,mem_temp
+	istore 2,contw
+	add regc,1,contr
+	call memcpy_fast
+	call store_contw
+	branch le_send_auto_len_by_mem
+
+	
+
+le_send_att_read_by_type_res_device_name:
+	arg UUID_CHRCTR_DEVICE_NAME,temp
+	call le_att_get_short_uuid_ptr
+	rtn blank
+	increase -5,contr // point to handle
+	ifetch 2,contr		
+	store 2,mem_temp
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_TYPE_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_name_len
+	copy pdata,loopcnt
+	increase 2,pdata
+	istore 1,contw
+	fetch 2,mem_temp
+	istore 2,contw
+	arg mem_le_name,contr
+	call memcpy_fast
+	call store_contw
+	branch le_send_auto_len_by_mem
+
+
+
+le_parse_att_read_request:
+	call le_check_encrypt_state
+	fetcht 2,mem_le_att_handle
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_READ_AUTH,le_send_att_read_response_check_auth
+
+//input:temp is handle
+le_send_att_read_response:
+	call le_att_get_handle_ptr2
+	nbranch le_send_att_error_response_notfound,zero
+	call le_send_att_read_response_check_handle,user
+	rtn user
+	call le_att_get_handle_ptr_found
+	increase -2,contr
+	ifetch 2,contr
+	arg UUID_CHRCTR_DEVICE_NAME,temp
+	isub temp,null
+	branch le_send_device_name,zero
+	ifetch 1,contr
+	sub pdata,22,null
+	branch le_send_att_read_response_less,positive
+	force 22,pdata
+le_send_att_read_response_less:
+	copy pdata,regc
+	call store_contr
+	add regc,1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_RESPONSE
+	istore 1,contw
+	copy regc,loopcnt
+	call get_contr
+	branch memcpy
+
+le_send_device_name:
+	call store_contr
+	fetch 1,mem_le_name_len
+	add pdata,1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_name_len
+	copy pdata,loopcnt
+	arg mem_le_name,contr
+	branch memcpy
+	
+	
+le_send_att_read_response_check_auth:
+	fetch 2,mem_le_pairing_handle
+	isub temp,null
+	nbranch le_send_att_read_response,zero
+	nbranch le_send_att_read_response,user
+le_send_att_read_response_error_insufficient_auth:
+	jam ATT_ERR_INSUFFICIENT_AUTHENTICATION,mem_le_err_code
+	branch le_send_att_error_response
+
+le_send_att_read_response_check_handle:
+	increase -2,contr
+	ifetch 2,contr
+	bbit1 BIT_OF_ATT_HANDLE_READ_AUTHENTICATED,le_send_att_read_response_error_insufficient_auth
+	branch disable_user
+
+le_parse_att_read_blob_request:
+	ifetch 2,contr
+	store 2,mem_le_att_offset
+le_send_att_read_blob_response:
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BLOB_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_att_offset
+	iforce rega
+	fetcht 2,mem_le_att_handle
+	call le_att_get_handle_ptr 
+	branch le_send_att_error_response_notfound,blank
+	ifetch 1,contr
+	isub rega,loopcnt
+	nbranch le_send_att_error_response_notfound,positive
+	sub loopcnt,22,null
+	branch le_send_att_read_blob_response_less,positive
+	force 22,loopcnt
+le_send_att_read_blob_response_less:
+	deposit rega
+	iadd contr,contr
+	call memcpy_fast
+	call store_contw
+	branch le_send_auto_len_by_mem
+
+
+//查询server
+le_parse_att_read_by_group_type_request:
+	call le_get_search_handle_start_end_common
+ 	call le_get_search_att_type
+	branch le_send_att_read_by_group_type_response
+
+
+//mem_le_search_att_type
+//mem_le_search_handle_start
+//mem_le_search_handle_end
+le_send_att_read_by_group_type_response:
+	arg 2,timeup
+	fetcht 2,mem_le_search_handle_start
+	storet 2,mem_temp
+	call le_att_get_handle_ptr2
+	increase -2,contr
+	copy contr,pdata
+	store 2,mem_le_cur_attlist_start_ptr
+le_send_att_read_by_group_type_response_loop:
+	call le_att_check_handle_end		//check current handle >= ending handle
+	nbranch le_send_att_read_by_group_type_end0,positive
+	fetcht 2,mem_temp
+	call le_att_get_handle_info_from_ptr	//get current handle info
+	nbranch le_send_att_read_by_group_type_end1,blank
+
+	call le_att_same_type				//compair attr group type
+	nbranch le_send_att_read_by_group_type_next_handle,zero
+	copy timeup,pdata
+	beq 0,le_send_att_read_by_group_type_end1	//loop count
+	nbranch le_send_att_read_by_group_type_store_write_record,user		//un first
+	disable user
+	//first att uuid
+	arg 20,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_READ_BY_GROUP_TYPE_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_curr_att_len
+	add pdata,4,rega
+	istorer rega,1,contw
+	call store_contw
+	sub rega,6,null
+	ncall enable_user2,zero
+	call disable_user2,zero
+ 	call le_get_search_max_mtu_data
+	idiv rega
+	call wait_div_end
+	quotient timeup
+	branch le_send_att_read_by_group_type_store_record
+le_send_att_read_by_group_type_store_write_record:
+	call le_send_att_read_by_group_type_check_pair_length_type
+	nbranch le_send_att_read_by_group_type_end1,blank
+	fetch 2,mem_temp
+	increase -1,pdata
+	store 2,mem_le_cur_handle_end
+	call le_write_att_record
+le_send_att_read_by_group_type_store_record:
+	fetch 2,mem_temp
+	store 2,mem_le_cur_handle_start
+	call le_store_att_record
+	increase -1,timeup
+//	branch le_send_att_read_by_group_type_last_find,zero		
+le_send_att_read_by_group_type_next_handle:
+	call le_att_next_handle
+	branch le_send_att_read_by_group_type_response_loop
+
+le_send_att_read_by_type_res_check_pair_length_type:
+	fetch 1,mem_le_cur_uuid_length
+	branch le_send_att_read_by_group_type_check_pair_length_type+1
+
+//output:blank is same
+le_send_att_read_by_group_type_check_pair_length_type:
+	fetch 1,mem_le_curr_att_len
+	branch le_send_att_read_by_group_type_check_pair_length_type_16byte,user2
+	increase -2,pdata
+	rtn
+
+le_send_att_read_by_group_type_check_pair_length_type_16byte:
+	increase -16,pdata
+	rtn
+
+le_send_att_read_by_group_type_end0:	//> att handle end
+	fetch 2,mem_temp
+	store 2,mem_le_cur_handle_end
+	branch le_send_att_read_by_group_type_end_common
+le_send_att_read_by_group_type_end1:	//>att max list handle or diff len 
+	fetch 2,mem_temp
+	increase -1,pdata
+	store 2,mem_le_cur_handle_end
+	branch le_send_att_read_by_group_type_end_common
+le_send_att_read_by_group_type_end_common:
+	branch le_send_att_error_response_notfound,user
+	call le_write_att_record
+	branch le_send_auto_len_by_mem
+
+
+
+
+le_parse_att_write_request:
+	copy contr,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-3,regb
+	call le_writeatt_cb
+le_send_att_write_response_check_auth:
+	call le_check_encrypt_state
+	fetcht 2,mem_le_att_handle
+	call le_att_get_handle_ptr2
+	nbranch le_send_att_write_response_error_invalid_handle,zero
+	call le_send_att_write_response_check_handle,user
+	rtn user
+
+	fetch 1,mem_le_configuration
+	bbit0 BIT_BLE_WRITE_AUTH,le_send_att_write_response
+
+	fetcht 2,mem_le_att_handle
+	fetch 2,mem_le_pairing_handle
+	isub temp,null
+	nbranch le_send_att_write_response,zero
+	call le_check_encrypt_state
+	nbranch le_send_att_write_response,user
+	branch le_send_att_read_response_error_insufficient_auth
+
+
+le_send_att_write_response:
+	force 1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_WRITE_RESPONSE
+	istore 1,contw
+	rtn
+
+le_send_att_write_response_check_handle:
+	increase -2,contr
+	ifetch 2,contr
+	bbit1 BIT_OF_ATT_HANDLE_WRITE_AUTHENTICATED,le_send_att_read_response_error_insufficient_auth
+	branch disable_user
+
+le_send_att_write_response_error_invalid_handle:
+	jam ATT_ERR_INVALID_HANDLE,mem_le_err_code
+	branch le_send_att_error_response
+
+
+le_check_encrypt_state:
+	call disable_user
+	fetch 1,mem_le_pairing_mode
+	rtneq LE_PAIRING_MODE_NONE
+	fetch 1,mem_context
+	rtnbit1 lestate_encryption
+	branch enable_user
+
+
+le_parse_att_prepare_write_request:
+	add contr,2,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-5,regb
+	call le_writeatt_cb
+	branch le_send_att_prepare_write_response
+
+
+le_send_att_prepare_write_response:
+	fetch 2,mem_le_l2cap_size
+	copy pdata,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_PREPARE_WRITE_RESPONSE
+	istore 1,contw
+	fetch 2,mem_le_att_handle
+	istore 2,contw
+	fetch 2,mem_le_l2cap_size
+	add pdata,-5,loopcnt	
+	fetch 2,mem_le_payload_ptr
+	add pdata,7,contr
+	ifetch 2,contr		//offset
+	istore 2,contw
+	branch memcpy_fast
+
+
+
+le_parse_att_execute_write_request:
+
+le_send_att_execute_write_response:
+	force 1,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_EXECUTE_WRITE_RESPONSE
+	istore 1,contw
+	rtn
+
+le_parse_handle_value_confirmation:
+	fetch 1,mem_le_l2cap_att_states
+	set0 BLE_L2CAP_RECV_CONFIRMATION_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	rtn
+
+le_parse_att_write_command:
+	copy contr,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-3,regb
+	branch le_writeatt_cb
+
+
+
+//rga:len temp:handle;rgea,regb,regc already used
+le_att_malloc_tx_notify:
+	copy temp,regc
+	increase 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	increase -3,rega
+	setarg ATTOP_HANDLE_VALUE_NOTIFICATION
+	istore 1,contw
+	copy regc,temp
+	istoret 2,contw
+	rtn
+
+//rga:len temp:handle;rgea,regb,regc already used
+le_att_malloc_tx_indication:
+	fetch 1,mem_le_l2cap_att_states
+	set1 BLE_L2CAP_SEND_INDICATION_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	copy temp,regc
+	increase 3,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	increase -3,rega
+	setarg ATTOP_HANDLE_VALUE_INDICATION
+	istore 1,contw
+	copy regc,temp
+	istoret 2,contw
+	rtn
+
+
+///////////////////////////ATT common function////////////////////////////////////
+
+le_send_att_error_response_notfound:	
+	jam ATT_ERR_ATTRIBUTE_NOT_FOUND,mem_le_err_code
+le_send_att_error_response:	
+	force 5,rega
+	call le_fifo_malloc_tx_l2cap_gatt
+	setarg ATTOP_ERROR_RESPONSE
+	istore 1,contw
+	fetch 1,mem_le_att_opcode
+	istore 1,contw
+	fetch 2,mem_le_att_handle
+	istore 2,contw
+	fetch 1,mem_le_err_code
+	istore 1,contw
+	rtn
+
+
+le_fifo_malloc_tx_l2cap_gatt:
+	force LE_L2CAP_CID_ATT,regb
+	branch le_fifo_malloc_tx_l2cap
+
+
+le_att_next_handle:
+	fetcht 2,mem_temp
+	increase 1,temp
+	storet 2,mem_temp
+	rtn
+
+le_att_check_handle_end:
+	fetcht 2,mem_temp
+	fetch 2,mem_le_search_handle_end
+	isub temp,null
+	rtn
+
+
+le_att_same_type:
+	fetcht 1,mem_le_search_att_type_length
+	arg mem_le_search_att_type,rega
+le_att_check_same_common:
+	fetch 1,mem_le_cur_uuid_length
+	copy pdata,loopcnt
+	isub temp,null
+	nrtn zero
+	arg mem_le_cur_uuid ,regb
+	branch string_compare
+
+le_att_same_uuid:
+	fetcht 1,mem_le_search_uuid_length
+	arg mem_le_search_uuid,rega
+	branch le_att_check_same_common
+
+
+le_store_att_record:
+	fetch 1,mem_le_curr_att_len
+	store 1, mem_tmp_buffer
+	copy pdata,loopcnt
+	call get_contr
+	branch memcpy_fast
+
+
+le_write_att_record:
+	call get_contw
+	fetch 2,mem_le_cur_handle_start
+	istore 2,contw
+	fetch 2,mem_le_cur_handle_end
+	istore 2,contw
+le_write_att_record_common:
+	fetch 1,mem_tmp_buffer
+	copy pdata,loopcnt
+	call memcpy_fast
+	branch store_contw
+
+
+
+le_send_auto_len_by_mem:
+	bpatchx patch3b_0,mem_patch3b
+	call get_contw
+	call le_fifo_get_last_att_ptr
+	copy contw,pdata
+	isub contr,rega
+	call le_fifo_get_last_l2cap_ptr
+	copy rega,pdata
+	istore 2,contr
+	increase 4,rega
+	call le_fifo_get_last_tx_ptr
+	copy rega,pdata
+	istore 1,contr
+	rtn
+
+
+le_get_search_handle_start_end_common:
+	rshift8 pdata,pdata
+	store 2,mem_le_search_handle_start
+	ifetch 2,contr
+	store 2,mem_le_search_handle_end
+	rtn
+
+le_get_search_max_mtu_data:
+	fetch 2,mem_le_remote_mtu
+	increase -2,pdata
+	//-2原因
+	//uint8_t attribute opcode
+	//uint8_t length
+	fetcht 2,mem_le_local_mtu
+	increase -2,temp
+	call not_greater_than
+	arg 240,temp
+	call not_greater_than
+	//pdata is max mtu size
+	rtn
+
+le_get_search_att_type:
+	call store_contr
+	arg mem_le_search_att_type_length,contw
+le_get_search_common:	
+	fetch 2,mem_le_l2cap_size
+	increase -5,pdata
+le_get_search_common2:		
+	istore 1,contw
+	copy pdata,loopcnt
+	call get_contr
+	branch memcpy_fast	
+
+
+
+le_parse_writing_attribute_start:
+	fetch 2,mem_le_rxbuf_data_att_cid//CID
+	rtnne LE_L2CAP_CID_ATT
+	fetch 1,mem_le_l2cap_att_states
+	set1 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	fetch 3,mem_le_rxbuf_data_att_opcode
+	store 3,mem_le_att_opcode
+	set1 mark_old_packet,mark
+	beq ATTOP_WRITE_REQUEST,le_parse_attribute_write_request
+	beq ATTOP_WRITE_COMMAND,le_parse_attribute_write_command
+	beq ATTOP_EXECUTE_WRITE_REQUEST,le_parse_att_execute_write_request
+	beq ATTOP_EXCHANGE_MTU_REQUEST,le_parse_att_exchange_mtu_request
+	beq ATTOP_HANDLE_VALUE_CONFIRMATION,le_parse_handle_value_confirmation
+	set0 mark_old_packet,mark
+le_clear_l2cap_att_states_deal_with_contiune_packet:
+	fetch 1,mem_le_l2cap_att_states
+	set0 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET,pdata
+	store 1,mem_le_l2cap_att_states
+	rtn
+
+le_parse_writing_attribute_continue:
+	fetch 1,mem_le_l2cap_att_states
+	rtnbit0 BLE_L2CAP_DEAL_WITH_CONTINUE_PACKET
+	set1 mark_old_packet,mark
+	call le_parse_l2cap_continue_common
+	call le_parse_attribute_check_complete_packet
+	call le_clear_l2cap_att_states_deal_with_contiune_packet,user
+	fetch 1,mem_le_att_opcode
+	beq ATTOP_WRITE_REQUEST,le_send_att_write_response_check_auth
+	rtn
+
+
+le_parse_attribute_write_request:
+	call le_parse_attribute_write_command
+	branch le_send_attribute_write_response_check_auth
+
+le_send_attribute_write_response_check_auth:
+	call le_parse_attribute_check_complete_packet
+	nrtn user
+	branch le_send_att_write_response_check_auth
+
+
+le_parse_attribute_write_command:
+	call le_parse_attribute_check_complete_packet_init
+	arg mem_le_rxbuf_data_att_write_payload,rega
+	branch le_writeatt_cb
+
+
+le_parse_attribute_check_complete_packet_init:
+	fetch 1,mem_le_rxbuf_data_att_write_length
+	add pdata,-7,regb
+	increase -4,pdata
+	store 2,mem_le_packet_len_recved	//payload length
+	fetcht 2,mem_le_rxbuf_data_att_write_l2cap_length	//l2cap length
+	storet 2,mem_le_l2cap_size
+	rtn
+
+
+le_parse_l2cap_continue_common:
+	fetchr regb,1,mem_le_rxbuf_data_continue_length
+	fetch 2,mem_le_packet_len_recved
+	iadd regb,temp
+	storet 2,mem_le_packet_len_recved
+	arg mem_le_rxbuf_data_continue_payload,rega
+	branch le_writeatt_cb
+
+
+//enable user,recevie complete packet
+le_parse_attribute_check_complete_packet:
+	call disable_user
+	fetch 2,mem_le_packet_len_recved
+	fetcht 2,mem_le_l2cap_size
+	isub temp,null
+	nrtn zero
+	branch enable_user
+
Index: mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_att_wechat.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_att_wechat.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_att_wechat.prog	(working copy)
@@ -0,0 +1,276 @@
+
+ifdef COMPILE_WECHAT
+
+/*
+	function name:le_l2cap_att_receive_data_check_wechat_air_sync_protocol
+	依据微信蓝牙外设协议1.0.4
+	输入:
+		rega is le rx data address
+		regb is le rx data length
+		mem_le_att_handle is write handle
+	输出:
+		user enable 是微信协议
+		disable不是微信协议
+*/
+le_l2cap_att_receive_data_check_wechat_air_sync_protocol:
+	call enable_user
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	arg le_l2cap_att_receive_data_deal_wechat_air_sync_protocol,regc
+	branch wechat_air_sync_calc_function
+le_l2cap_att_receive_data_deal_wechat_air_sync_protocol:
+	fetcht 2,mem_le_att_handle
+	fetch 1,mem_wechat_indication_handle
+	pincrease 1
+	isub temp,null
+	branch wechat_air_sync_enable_indicate_chara,zero
+	fetch 1,mem_wechat_write_handle
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data,zero
+	branch disable_user
+	
+wechat_air_sync_enable_indicate_chara:
+	call wechat_air_sync_reset_nSeq
+wechat_air_sync_send_request_auth:
+	call wechat_air_sync_init_authreq_base_request
+	arg mem_wechat_authreq_base_request,rega
+	arg ECI_REQ_AUTH_MESSAGE_LENGTH,loopcnt
+	arg ECI_REQ_AUTH,temp
+	branch wechat_air_sync_send_message
+
+wechat_air_sync_receive_wechat_data:
+	fetch 1,mem_wechat_receive_push_data
+	beq 1,wechat_air_sync_receive_wechat_data_contiune_packet
+	ifetch 2,rega
+	arg WECHAT_RX_HEAD,temp
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data_head_packet,zero
+wechat_air_sync_receive_wechat_data_contiune_packet:
+	fetch 2,mem_wechat_rx_len
+	iadd regb,pdata
+	store 2,mem_wechat_rx_len	
+	fetch 2,mem_wechat_rx_address
+	copy pdata,contw
+	copy rega,contr
+	copy regb,loopcnt
+	call memcpy_fast
+	copy contw,pdata
+	store 2,mem_wechat_rx_address
+	branch wechat_air_sync_receive_wechat_packet_complete
+
+
+wechat_air_sync_receive_wechat_data_head_packet:
+	fetch 2,mem_wechat_rx_buffer_ptr
+	copy pdata,contw
+	copy rega,contr
+	copy regb,loopcnt
+	call memcpy_fast
+	copy contw,pdata
+	store 2,mem_wechat_rx_address
+	storer regb,2,mem_wechat_rx_len
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_N_CMD_ID,contr
+	ifetch 2,contr
+	arg ECI_PUSH_RECEIVE_DATA,temp
+	isub temp,null
+	call wechat_air_sync_receive_wechat_push_data,zero
+	branch wechat_air_sync_receive_wechat_packet_complete
+
+wechat_air_sync_receive_wechat_push_data:
+	jam 1,mem_wechat_receive_push_data
+	rtn
+
+wechat_air_sync_receive_wechat_packet_complete:
+	fetch 2,mem_wechat_rx_len
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_N_LENGTH,contr
+	ifetcht 2,contr
+	byteswap temp,temp
+	isub temp,null
+	nrtn positive
+	jam 0,mem_wechat_receive_push_data
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_N_CMD_ID,contr
+	ifetch 2,contr
+	arg ECI_RESPONSE_AUTH,temp
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data_auth_respone,zero
+	arg ECI_PUSH_RECEIVE_DATA,temp
+	isub temp,null
+	branch wechat_air_sync_receive_wechat_data_push_receive_data,zero
+	rtn
+
+wechat_air_sync_receive_wechat_data_auth_respone:
+wechat_air_sync_wechat_send_request_init:
+	call wechat_air_sync_init_authreq_base_request
+	arg mem_wechat_initreq_base_request,rega
+	arg ECI_REQ_INIT_MESSAGE_LENGTH,loopcnt
+	arg ECI_REQ_INIT,temp
+	branch wechat_air_sync_send_message
+
+
+//接收数据的回调，可以使用wechat_air_sync_check_push_data_struct解析函数
+wechat_air_sync_receive_wechat_data_push_receive_data:
+
+	fetch 2,mem_wechat_rx_push_data_cb
+	branch callback_func
+
+/*
+数据解析默认函数，不能保证全部数据格式都能解析
+输出:disable user is no data
+	loopcnt is data length
+	contr is data ptr
+*/
+wechat_air_sync_check_push_data_struct:
+	call disable_user
+	fetchr regc,2,mem_wechat_rx_buffer_ptr
+	add regc,WECHAT_PROTOCOL_MESSAGE_PAYLOAD,contr
+	ifetch 2,contr
+	rtnne TAG_RecvDataPush_BasePush
+	ifetch 1,contr
+	rtnne TAG_RecvDataPush_Data
+	ifetch 1,contr
+	rtn blank
+	copy pdata,loopcnt
+	copy contr,regc
+	branch enable_user
+
+
+wechat_air_sync_send_message:
+	call enable_user2
+wechat_air_sync_send_message_without_payload:
+	fetch 2,mem_wechat_tx_buffer_ptr
+	store 2,mem_wechat_tx_address
+	copy pdata,contw
+	setarg WECHAT_HEAD_MAGIC_NUMBER
+	istore 1,contw			//bMagicNumber
+	setarg WECAHT_HEAD_VERSION
+	istore 1,contw			//bVer
+	add loopcnt,8,regd	//nLength
+	byteswap regd,pdata
+	istore 2,contw			//nLength
+	istoret 2,contw			//nCmdId
+	fetcht 2,mem_wechat_tx_nSeq
+	istoret 2,contw			//Tx nSeq
+	copy contw,regc
+	copy rega,contr
+	call memcpy_fast,user2
+	storer regd,2,mem_wechat_tx_len
+	branch wechat_air_sync_update_nSeq
+	
+wechat_air_sync_update_nSeq:
+	byteswap temp,pdata
+	pincrease 1
+	byteswap pdata,pdata
+	nbranch wechat_air_sync_store_nSeq,blank
+wechat_air_sync_reset_nSeq:
+	setarg 0x0100
+wechat_air_sync_store_nSeq:
+	store 2,mem_wechat_tx_nSeq
+	rtn
+
+
+wechat_air_sync_init_authreq_base_request:
+	setarg 0x000a
+	store 2,mem_wechat_authreq_base_request
+	setarg 0x048084
+	lshift8 pdata,pdata
+	or pdata,0x18,pdata
+	store 4,mem_wechat_authreq_protocol_version
+	setarg 0x0120
+	store 2,mem_wechat_authreq_auth_protocol
+	setarg 0x0228
+	store 2,mem_wechat_authreq_eam_mac_no_encrypt
+	setarg 0x063a
+	store 2,mem_wechat_authreq_mac_address
+	fetch 6,mem_le_lap
+	call inverse_data_6Byte
+	store 6,mem_wechat_authreq_device_address
+	rtn
+
+wechat_air_sync_ble_transmit_wechat_message:
+	fetch 1,mem_le_l2cap_att_states
+	rtnbit1 BLE_L2CAP_RECV_CONFIRMATION_PACKET
+	call le_fifo_check_nearly_full
+	nrtn blank				//no fifo
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	arg wechat_air_sync_ble_send_wechat_message,regc
+	branch wechat_air_sync_calc_function
+
+wechat_air_sync_ble_send_wechat_message:
+	call module_get_le_remote_mtu
+	fetch 2,mem_wechat_tx_len
+	rtn blank
+	add temp,-3,pdata		//sub handle and opcode
+	fetcht 2,mem_wechat_tx_len
+	call not_greater_than
+	copy pdata,rega
+	copy temp,pdata
+	isub rega,pdata
+	store 2,mem_wechat_tx_len
+	fetcht 1,mem_wechat_indication_handle
+	call le_att_malloc_tx_indication
+	fetch 2,mem_wechat_tx_address
+	copy pdata,contr
+	copy rega,loopcnt
+	call memcpy_fast
+	copy contr,pdata
+	store 2,mem_wechat_tx_address
+	rtn
+
+
+wechat_air_sync_calc_function:
+	call wechat_air_sync_load_in_local_buffer
+	copy regc,pdata
+	call callback_func
+	branch wechat_air_sync_store_in_global_buffer
+
+
+wechat_air_sync_load_in_local_buffer:
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	copy pdata,contr
+	arg WECHAT_AIR_SYNC_STRUCT_SIZE,loopcnt
+	arg mem_wechat_indication_handle,contw
+	branch memcpy_fast
+
+wechat_air_sync_store_in_global_buffer:
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	copy pdata,contw
+	arg WECHAT_AIR_SYNC_STRUCT_SIZE,loopcnt
+	arg mem_wechat_indication_handle,contr
+	branch memcpy_fast
+
+
+//input:rega is data ptr
+//regb is data length
+wechat_air_sync_send_wechat_packet:
+	call enable_user
+	fetch 2,mem_le_wechat_air_sync_ptr
+	rtn blank
+	arg wechat_air_sync_send_wechat_packet_cb,regc
+	branch wechat_air_sync_calc_function
+
+wechat_air_sync_send_wechat_packet_cb:
+	fetch 2,mem_wechat_tx_len
+	nrtn blank
+	call disable_user
+	call disable_user2
+	add regb,6,loopcnt
+	arg ECI_REQ_SEND_DATA,temp
+	call wechat_air_sync_send_message_without_payload
+	copy regc,contw
+	setarg 0x12000a
+	istore 3,contw
+	istorer regb,1,contw
+	copy rega,contr
+	copy regb,loopcnt
+	call memcpy_fast
+	setarg 0x0018
+	istore 2,contw
+	rtn
+
+endif
+
Index: mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_signalling.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_signalling.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_signalling.prog	(working copy)
@@ -0,0 +1,54 @@
+
+
+le_parse_signaling:
+	ifetch 1,contr
+	ifetcht 1,contr //id
+	ifetcht 2,contr //length
+	beq L2CAP_CONNECTION_PARAMETER_UPDATE_RESPONSE,le_l2cap_parse_conn_parameter_update_rsp
+	rtn
+le_l2cap_parse_conn_parameter_update_rsp:
+	ifetch 2,contr	//result
+	store 2,mem_le_l2cap_signaling_conn_param_update_rsp_result
+	jam BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+//mem_le_interval_min:the ptr that connection parameter,
+//include 	ConnIntervalMin,ConnIntervalMax,
+//		ConnSlaveLatency,ConnSupervisionTimeout
+le_l2cap_tx_update_req:
+	arg 0x0c,rega
+	arg L2CAP_CONNECTION_PARAMETER_UPDATE_REQUEST,regc
+	call le_fifo_malloc_tx_l2cap_signaling
+	setarg 0x08
+	istore 2,contw
+	fetch 8,mem_le_interval_min
+	istore 8,contw
+	rtn
+
+
+//rega:len regc:signaling opcode
+le_fifo_malloc_tx_l2cap_signaling:
+	call le_l2cap_update_signaling_identifier
+	arg LE_L2CAP_CID_SIGNAL,regb
+	call le_fifo_malloc_tx_l2cap
+	copy regc,pdata
+	istore 1,contw
+	fetch 1,mem_le_signaling_identifier
+	istore 1,contw
+	rtn
+
+
+le_l2cap_update_signaling_identifier:
+	fetch 1,mem_le_signaling_identifier
+	//beq 0xff,le_l2cap_signaling_identifier_set_1
+	pincrease 1
+	store 1,mem_le_signaling_identifier
+	rtnne 0
+	
+le_l2cap_reset_signaling_identifier:
+	jam 1,mem_le_signaling_identifier
+	rtn
+
+
+
Index: mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_smp.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_smp.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_l2cap_smp.prog	(working copy)
@@ -0,0 +1,611 @@
+
+le_pairing_mode_init:
+	fetch  1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_NONE, le_set_no_pairing
+	beq LE_PAIRING_MODE_LAGACY_JUSTWORK,le_set_pairing_mode_lagacy_just_work
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY,le_set_pairing_mode_lagacy_passkey
+ifdef SECURE_CONNECTION
+	beq LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK,le_set_pairing_mode_secure_justwork
+	beq LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC,le_set_pairing_mode_secure_numeric
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_set_pairing_mode_secure_passkey
+endif
+	rtn
+
+ifdef SECURE_CONNECTION	
+le_set_pairing_mode_secure_justwork:
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch le_set_noinputnooutput
+le_set_pairing_mode_secure_numeric:
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	jam FLAG_IOCAP_DISPLAYYESNO,mem_le_pres_iocap
+	rtn
+le_set_pairing_mode_secure_passkey:	
+	jam FLAG_LE_BONDING_MITM_SECURE,mem_le_pres_auth
+	branch le_set_displayonly
+endif
+le_set_no_pairing:
+	jam FLAG_LE_NO_BONDING_NO_MITM,mem_le_pres_auth
+le_set_noinputnooutput:	
+	jam FLAG_IOCAP_NOINPUTNOOUTPUT,mem_le_pres_iocap
+	rtn
+le_set_pairing_mode_lagacy_just_work:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+	branch le_set_noinputnooutput
+le_set_pairing_mode_lagacy_passkey:
+	jam FLAG_LE_BONDING_MITM,mem_le_pres_auth
+le_set_displayonly:	
+	jam FLAG_IOCAP_DISPLAYONLY,mem_le_pres_iocap
+	rtn
+
+	
+le_secure_connection_enable:
+	fetch 1,mem_secure_connections_enable
+	set1 SECURE_CONNECTIONS_LE_BIT,pdata
+	store 1,mem_secure_connections_enable
+	rtn
+	
+le_secure_connection_disable:
+	fetch 1,mem_secure_connections_enable
+	set0 SECURE_CONNECTIONS_LE_BIT,pdata
+	store 1,mem_secure_connections_enable
+	rtn
+
+le_parse_smp:
+	ifetch 1,contr
+	beq SMP_PAIRING_REQUEST,le_parse_smp_pairing_request
+//	beq SMP_PAIRING_RESPONSE,le_parse_smp_pairing_response
+	beq SMP_PAIRING_CONFIRM,le_parse_smp_pairing_confirm
+	beq SMP_PAIRING_RANDOM,le_parse_smp_pairing_random
+	beq SMP_PAIRING_FAILED,le_parse_smp_pairing_failed
+//	beq SMP_ENCRYPTION_INFORMATION,le_parse_smp_encryption_information
+	beq SMP_MASTER_IDENTIFICATION,le_parse_smp_master_identification
+	beq SMP_IDENTITY_INFORMATION,le_parse_smp_identity_information
+	beq SMP_IDENTITY_ADDRESS_INFORMATION,le_parse_smp_identity_address_information
+	beq SMP_SIGNING_INFORMATION,le_parse_smp_signing_information
+	beq SMP_SECURITY_REQUEST,le_parse_smp_security_request
+ifdef SECURE_CONNECTION
+	beq SMP_PAIRING_PUBLIC_KEY,le_parse_smp_public_key
+	beq SMP_PAIRING_DHKEY_CHECK,le_parse_smp_dhkey_check
+endif
+	rtn
+
+
+
+le_send_smp_security_request:
+	force 2,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_SECURITY_REQUEST
+	istore 1,contw
+	fetch 1,mem_le_pres_auth
+	istore 1,contw
+	rtn
+		
+le_parse_smp_pairing_request:
+	store 1,mem_le_preq
+	ifetch 6,contr
+	istore 6,contw
+	fetch 1,mem_le_pairing_mode
+	beq  LE_PAIRING_MODE_NONE,le_smp_pairing_fail_reason_not_support_pairing
+	call le_send_smp_pairing_response
+	fetch 1,mem_sc_only_mode
+	branch le_parse_smp_pairing_request2, blank
+	fetch 1,mem_le_preq_auth
+	bbit0  LE_AUTH_SECURE_CONNECTION_PAIRING_BIT,app_ble_disconnect
+	fetch 1,mem_le_pairing_mode
+	bbit0 LE_PAIRING_MODE_SECURE_CONNECT_BIT,app_ble_disconnect
+le_parse_smp_pairing_request2:	
+	jam FLAG_LE_PAIRING_RCV_PAIRING_REQ,mem_le_pairing_state
+	fetch 1,mem_le_preq_iocap
+	beq  FLAG_IOCAP_DISPlAYONLY,le_set_tk_0
+	beq  FLAG_IOCAP_DISPLAYYESNO,le_set_tk_0
+	beq  FLAG_IOCAP_NOINPUTNOOUTPUT,le_set_tk_0
+	fetch 1,mem_le_pairing_mode	
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY,le_parse_smp_pairing_req_passkey
+	rtneq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY
+le_set_tk_0:
+	arg 0,pdata
+	store 4,mem_le_tk
+	rtn
+
+le_parse_smp_pairing_req_passkey:
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_PASSKEY_FIXED_KEY,le_parse_smp_pairing_req_fixed_passkey
+le_genernate_tk:
+	arg mem_le_tk,rega
+	copy rega,contw
+	arg 3,loopcnt
+	call generate_random_loop
+	fetch 2,mem_le_tk + 2
+	and_into 0x7,pdata
+	store 2,mem_le_tk + 2
+le_parse_smp_pairing_req_fixed_passkey:
+	jam BT_EVT_LE_TK_GENERATE,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+
+le_send_smp_pairing_response:
+	force 7,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	fetch 7,mem_le_pres
+	istore 7,contw
+	rtn
+		
+
+le_parse_smp_pairing_confirm:
+ifdef SECURE_CONNECTION
+	jam FLAG_LE_PAIRING_RECEIVE_PAIRING_CONFIRM,mem_le_pairing_state
+	arg mem_le_rconfirm,contw
+	call memcpy16
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_parse_smp_pairing_confirm_secure_passkey
+	beq LE_PAIRING_MODE_LAGACY_PASSKEY_RES_INPUT,le_parse_smp_pairing_confirm_passkey_res_input
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,le_parse_smp_pairing_confirm_sc_passkey_res_input
+endif
+	branch le_send_smp_pairing_confirm
+ifdef SECURE_CONNECTION
+le_parse_smp_pairing_confirm_secure_passkey:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_PASSKEY_WAIT_CONFIRM,mem_le_secure_connect_state	
+	rtn
+endif
+
+
+le_parse_smp_pairing_confirm_passkey_res_input:
+	jam BT_EVT_LE_GET_PASSKEY,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+le_parse_smp_pairing_confirm_sc_passkey_res_input:
+	fetch 4,mem_le_tk
+	branch le_parse_smp_pairing_confirm_passkey_res_input,blank
+	branch le_parse_smp_pairing_confirm_secure_passkey
+
+
+le_send_smp_pairing_confirm:
+	jam FLAG_LE_PAIRING_SEND_PAIRING_CONFIRM,mem_le_pairing_state
+ifdef SECURE_CONNECTION
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,le_send_smp_pairing_confirm_sc
+endif
+	call generate_confirm
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_CONFIRM
+	istore 1,contw
+	branch  store_aes_result
+
+	
+ifdef SECURE_CONNECTION
+le_send_smp_pairing_confirm_sc:
+	arg mem_le_srand,contw	
+	call generate_random
+	call function_f4_cb
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_CONFIRM
+	istore 1,contw
+	branch  load_inverse_result
+
+endif
+
+	
+le_parse_smp_pairing_random:	
+ifdef SECURE_CONNECTION
+	copy contr,rega
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,le_parse_smp_pairing_random_sc
+	copy rega,contr
+endif
+	call authenticate_rconfirm
+	branch le_parse_smp_pairing_random_success,zero
+le_send_pairing_confirm_value_failed:
+	jam PAIRING_FAILED_CONFIRM_VALUE_FAILED,mem_le_ll_pairing_fail_reason
+le_send_pairing_failed:
+	force 2,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_FAILED
+	istore 1,contw
+	fetch 1,mem_le_ll_pairing_fail_reason
+	istore 1,contw	
+le_parse_smp_pairing_failed:
+	force smp_pairing_timer,queue
+	call timer_stop
+	jam FLAG_LE_PAIRING_NULL,mem_le_pairing_state
+	jam BT_EVT_LE_PAIRING_FAIL,mem_fifo_temp
+	branch ui_ipc_send_event
+
+le_smp_pairing_fail_reason_not_support_pairing:
+	jam PAIRING_FAILED_PAIRING_NOT_SUPPORTED,mem_le_ll_pairing_fail_reason
+	branch le_send_pairing_failed
+	
+	
+ifdef SECURE_CONNECTION	
+le_parse_smp_pairing_random_sc:
+	arg mem_le_mrand,contw
+	copy rega,contr
+	call memcpy16	
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_parse_smp_pairing_random_sc_passkey
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,le_parse_smp_pairing_random_sc_passkey
+	call function_g2
+	call le_send_smp_pairing_random
+	fetch 1,mem_le_pairing_mode
+	rtnne LE_PAIRING_MODE_SECURE_CONNECT_NUMERIC
+	jam BT_EVT_LE_GKEY_GENERATE,mem_fifo_temp
+	branch ui_ipc_send_event	
+	
+le_parse_smp_pairing_random_sc_passkey:
+	call function_f4_ca
+	arg mem_AES_CMAC_temp,contw
+	call load_inverse_result	
+	arg mem_AES_CMAC_temp,rega
+	arg mem_le_rconfirm ,regb
+	arg 16,loopcnt
+	call string_compare
+	nbranch le_send_pairing_confirm_value_failed,zero
+	branch le_send_smp_pairing_random
+endif
+	
+le_parse_smp_pairing_random_success:
+	call generate_stk
+	jam BT_EVT_LE_PAIRING_SUCCESS,mem_fifo_temp
+	call ui_ipc_send_event
+	jam 1,mem_ltk_exists
+	jam FLAG_LE_PAIRING_AFTER_AUTH,mem_le_pairing_state
+	
+le_send_smp_pairing_random:
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_RANDOM
+	istore 1,contw
+	arg mem_le_srand,contr
+	branch memcpy16
+
+le_send_smp_encryption_information:
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_ENCRYPTION_INFORMATION
+	istore 1,contw
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_PAIRING_FIXED_LTK,le_send_fixed_ltk
+	arg mem_le_ltk,contr
+	branch memcpy16
+
+le_send_fixed_ltk:
+	arg mem_le_fixed_ltk,contr
+	branch memcpy16
+
+
+le_send_smp_master_identification:
+	arg mem_le_ediv,contw
+	force 10,loopcnt
+	call generate_random_loop
+	force 11,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_MASTER_IDENTIFICATION
+	istore 1,contw
+	fetch 2,mem_le_ediv
+	istore 2,contw
+	fetch 8,mem_le_rand
+	istore 8,contw
+	rtn
+
+le_send_smp_identity_information:
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_IDENTITY_INFORMATION
+	istore 1,contw
+	setarg 0
+	istore 8,contw
+	istore 8,contw
+	rtn
+	
+
+le_send_smp_identity_address_information:
+	force 8,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_IDENTITY_ADDRESS_INFORMATION
+	istore 1,contw
+	fetch 1,mem_le_conn_own_addr_type
+	istore 1,contw
+	fetch 6,mem_le_lap	
+	istore 6,contw
+	rtn	
+
+
+le_send_pairing_fail_unspecified_reason:
+	jam PAIRING_FAILED_UNSPECIFIED_REASON,mem_le_ll_pairing_fail_reason
+	branch le_send_pairing_failed
+
+le_check_init_key_distribution:
+	fetch 1,mem_le_pres_init_key_distribution
+	fetcht 1,mem_le_pres_init_key_distribution
+	iand temp,pdata
+	rtn	
+
+le_parse_smp_identity_information:
+	arg mem_le_irk,contw
+	call memcpy16
+	call le_check_init_key_distribution
+	isolate0 LE_INITATOR_IRK_BIT,pdata
+	branch le_send_pairing_fail_unspecified_reason,true
+	fetch 1,mem_device_option
+	rtnne dvc_op_module
+	call le_check_master_addr_type
+	nrtn user
+	branch app_ble_store_reconn_info
+
+//output:user is enable ,random addr type
+le_check_master_addr_type:
+	call disable_user
+	fetch 1,mem_le_conn_peer_addr_type
+	rtneq MASTER_PUBLIC_ADDR
+	fetch 1,mem_le_preq_init_key_distribution
+	rtnbit0 LE_INITATOR_IRK_BIT
+	branch enable_user
+
+le_parse_smp_identity_address_information:
+	call le_check_init_key_distribution
+	isolate0 LE_INITATOR_IRK_BIT,pdata
+	branch le_send_pairing_fail_unspecified_reason,true
+	rtn
+
+le_parse_smp_master_identification:
+le_parse_smp_signing_information:	
+le_parse_smp_security_request:
+	rtn
+	
+ifdef SECURE_CONNECTION
+le_parse_smp_public_key:
+	arg mem_le_pubkey_remote_x_256,contw	
+	call memcpy64
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_RECEIVE_PUBLIC_KEY,mem_le_secure_connect_state
+	rtn
+
+le_parse_smp_dhkey_check:
+	arg mem_sp_confirm_remote,contw
+	call memcpy16	
+	jam LE_SC_STAT_RECEIVE_DHKEY,mem_le_secure_connect_state
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	rtn	
+
+le_send_smp_pairing_public_key:
+	force 65,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_PUBLIC_KEY
+	istore 1,contw	
+	arg mem_sc_pubkey_local_x_256,contr
+	branch memcpy64
+	
+le_send_smp_pairing_dhkey_check:
+	call function_f6_eb	
+	force 17,rega
+	call le_fifo_malloc_tx_l2cap_smp
+	setarg SMP_PAIRING_DHKEY_CHECK
+	istore 1,contw
+	branch load_inverse_result
+	
+endif
+
+le_check_paring_time:
+	fetch 1,mem_le_pairing_state
+	rtneq FLAG_LE_PAIRING_END
+	arg FLAG_LE_PAIRING_RCV_PAIRING_REQ,temp
+	isub temp,null
+	nrtn positive
+	arg smp_pairing_timer,queue
+	call timer_check
+	nrtn blank
+	branch le_send_pairing_fail_unspecified_reason
+
+le_pairing_sm:
+	bpatchx patch3b_1,mem_patch3b
+	call le_fifo_check_nearly_full
+	nrtn blank	
+	fetch 1,mem_le_pairing_state
+	beq FLAG_LE_PAIRING_NULL,le_pairing_sm_null
+	beq FLAG_LE_PAIRING_START,le_pairing_sm_start
+	beq FLAG_LE_PAIRING_SEND_RECURITY_REQ,le_pairing_sm_send_sec_req
+	beq FLAG_LE_PAIRING_RCV_PAIRING_REQ,le_pairing_sm_rcv_pairing_req
+	beq FLAG_LE_PAIRING_AFTER_AUTH,le_pairing_sm_after_auth
+	beq FLAG_LE_PARING_SEND_ENC_INFORMATION,le_pairng_sm_send_enc_information
+	beq FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION,le_pairng_sm_send_master_indentification
+	beq FLAG_LE_PARING_SEND_INDENTITY_INFORMATION,le_pairng_sm_send_indentity_information
+	rtn
+
+le_pairing_sm_null:
+le_pairing_sm_send_sec_req:
+	fetch 1,mem_le_enc_state
+	rtnne FLAG_LE_SEND_START_ENC_RSP
+	jam FLAG_LE_ENC_END,mem_le_enc_state
+	jam FLAG_LE_PAIRING_END,mem_le_pairing_state
+	jam BT_EVT_LE_RECONNECT_COMPLETE ,mem_fifo_temp
+	branch ui_ipc_send_event	
+	
+	
+le_pairing_sm_start:
+	jam FLAG_LE_PAIRING_SEND_RECURITY_REQ,mem_le_pairing_state
+	branch le_send_smp_security_request
+
+le_pairing_sm_rcv_pairing_req:
+	jam FLAG_LE_PAIRING_WAIT_STK_GENERATION,mem_le_pairing_state
+	setarg TIMER_SMP_PAIRING_TIMEOUT
+	arg smp_pairing_timer,queue
+	branch timer_init
+	
+le_pairing_sm_after_auth:
+	fetch 1,mem_le_enc_state
+	beq FLAG_LE_SEND_START_ENC_RSP,le_pairing_sm_after_auth_start_enc
+	rtn
+	
+le_pairing_sm_after_auth_start_enc:
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,le_pairing_sm_after_auth_start_enc_sc
+
+	jam FLAG_LE_PARING_SEND_ENC_INFORMATION,mem_le_pairing_state
+	call le_send_smp_encryption_information
+le_pairing_sm_after_auth_start_enc_common:
+	jam BT_EVT_LE_ENC_INFO,mem_fifo_temp
+	call ui_ipc_send_event
+	fetch 1,mem_device_option
+	rtnne dvc_op_module
+	call le_check_master_addr_type
+	rtn user
+	branch app_ble_store_reconn_info
+
+le_pairing_sm_after_auth_start_enc_sc:
+	jam FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION,mem_le_pairing_state
+	branch le_pairing_sm_after_auth_start_enc_common
+
+le_pairng_sm_send_enc_information:	
+	jam FLAG_LE_PARING_SEND_MASTER_IDENTIFICATION,mem_le_pairing_state
+	branch le_send_smp_master_identification
+
+le_pairng_sm_send_master_indentification:	
+	fetch 1,mem_le_preq_resp_key_distribution
+	fetcht 1,mem_le_pres_resp_key_distribution
+	iand temp,pdata
+	isolate0 LE_INITATOR_IRK_BIT,pdata
+	branch le_parse_start_enc_rsp_after_auth_end,true
+	jam FLAG_LE_PARING_SEND_INDENTITY_INFORMATION,mem_le_pairing_state
+	branch le_send_smp_identity_information
+
+le_pairng_sm_send_indentity_information:		
+	call le_send_smp_identity_address_information
+	branch le_parse_start_enc_rsp_after_auth_end
+
+
+le_parse_start_enc_rsp_after_auth_end:
+	force smp_pairing_timer,queue
+	call timer_stop
+	jam FLAG_LE_ENC_END,mem_le_enc_state
+	jam FLAG_LE_PAIRING_END,mem_le_pairing_state
+	jam BT_EVT_LE_PAIRING_COMPLETE ,mem_fifo_temp
+	branch ui_ipc_send_event	
+	
+
+ifdef SECURE_CONNECTION
+
+le_secure_connect_sm:
+	bpatchx patch3b_2,mem_patch3b
+	fetch 1,mem_le_pairing_mode
+	rtnbit0 LE_PAIRING_MODE_SECURE_CONNECT_BIT
+	fetch 1,mem_le_secure_connect_flag
+	rtnne LE_SP_FLAG_COMMIT_256
+	jam SP_FLAG_STANDBY,mem_le_secure_connect_flag
+	fetch 1,mem_le_secure_connect_state
+	beq  LE_SC_STAT_RECEIVE_PUBLIC_KEY,le_sc_sm_receive_public_key
+	beq LE_SC_STAT_WAIT_SEND_PUBLIC_KEY,le_sc_sm_wait_send_public_key
+	beq LE_SC_STAT_SEND_PUBLIC_KEY,le_sc_sm_send_public_key
+	beq LE_SC_STAT_RECEIVE_DHKEY,le_sc_sm_receive_dhkey
+	beq LE_SC_STAT_WAIT_CONFIRM_GKEY,le_sc_sm_wait_confirm_gkey
+	beq  LE_SC_STAT_PASSKEY_WAIT_CONFIRM,le_sc_sm_passkey_wait_confirm
+	rtn	
+
+le_sc_state_clear:
+	jam SP_FLAG_STANDBY,mem_le_secure_connect_flag
+	jam LE_SC_STAT_NULL,mem_le_secure_connect_state
+	jam FLAG_LE_SC_CONFRIM_NULL,mem_le_sc_confirm_gkey_flag
+	rtn
+	
+le_sc_sm_passkey_wait_confirm:
+	fetch 1,mem_authentication_passkey_times
+	copy pdata,queue
+	increase 1,pdata
+	store 1,mem_authentication_passkey_times
+	fetch 4,mem_le_tk
+	qisolate1 pdata
+	setarg 0x80
+	setflag true,0,pdata
+	store 1,mem_passkey_1bit
+	branch le_sc_sm_ready_send_pairing_confirm
+	
+le_sc_sm_wait_confirm_gkey:
+	fetch 1,mem_le_sc_confirm_gkey_flag
+	jam FLAG_LE_SC_CONFRIM_NULL,mem_le_sc_confirm_gkey_flag
+	beq FLAG_LE_SC_CONFRIM_GKEY_OK,le_sc_confirm_gkey_ok
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	rtn
+	
+le_sc_confirm_gkey_ok:
+	jam BT_EVT_LE_PAIRING_SUCCESS,mem_fifo_temp
+	call ui_ipc_send_event	
+	jam FLAG_LE_PAIRING_AFTER_AUTH,mem_le_pairing_state
+	branch le_send_smp_pairing_dhkey_check
+
+le_sc_sm_receive_dhkey:
+	fetch 1,mem_sp_dhkey_invalid
+	beq SP_KEY_VALID_256,le_dhkey_ready
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	rtn
+
+le_dhkey_ready:
+	call function_f5
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY ,le_dhkey_ready_common
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT ,le_dhkey_ready_common
+	call le_set_tk_0 
+le_dhkey_ready_common:
+	call function_f6_ea
+	arg mem_AES_CMAC_temp,rega
+	arg mem_sp_confirm_remote ,regb
+	arg 16,loopcnt
+	call string_compare
+	branch le_dhkey_check_ok,zero
+le_dhkey_check_fail:	
+	jam PAIRING_FAILED_DHKEY_CHECK_FAILED,mem_le_ll_pairing_fail_reason
+	branch le_send_pairing_failed
+
+	
+le_dhkey_check_ok:
+	call sp_calc_check_publickey_256
+	nbranch le_dhkey_check_fail,zero
+	jam 1,mem_ltk_exists
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_JUSTWORK,le_sc_confirm_gkey_ok
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY ,le_sc_confirm_gkey_ok	
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT ,le_sc_confirm_gkey_ok	
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_WAIT_CONFIRM_GKEY,mem_le_secure_connect_state	
+	rtn	
+
+le_sc_sm_send_public_key:
+	fetch 1,mem_le_pairing_mode
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY,le_sc_sm_send_public_key_passkey
+	beq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT,le_sc_sm_send_public_key_passkey
+	jam 0,mem_passkey_1bit
+le_sc_sm_ready_send_pairing_confirm:
+	branch le_send_smp_pairing_confirm
+
+le_sc_sm_send_public_key_passkey:
+	jam 0,mem_authentication_passkey_times
+	rtneq LE_PAIRING_MODE_SECURE_CONNECT_PASSKEY_RES_INPUT
+	branch le_parse_smp_pairing_req_passkey
+
+	
+le_sc_sm_receive_public_key:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	fetch 1,mem_sc_local_key_invalid
+	beq SP_KEY_VALID_256,le_public_key_ready
+	rtn
+	
+le_public_key_ready:
+	jam LE_SC_STAT_WAIT_SEND_PUBLIC_KEY,mem_le_secure_connect_state	
+	jam SP_KEY_INVALID,mem_sp_dhkey_invalid
+	branch sp_dhkey_calc_256	
+
+le_sc_sm_wait_send_public_key:
+	jam LE_SP_FLAG_COMMIT_256,mem_le_secure_connect_flag
+	jam LE_SC_STAT_SEND_PUBLIC_KEY,mem_le_secure_connect_state
+	branch le_send_smp_pairing_public_key
+
+endif
+
+
+le_fifo_malloc_tx_l2cap_smp:
+	force LE_L2CAP_CID_SMP,regb
+	branch le_fifo_malloc_tx_l2cap
+
+
Index: mouse_public_3mode_usb/program/ble_protocol_stack/le_ll.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_ll.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ble_protocol_stack/le_ll.prog	(working copy)
@@ -0,0 +1,339 @@
+
+le_parse_ll:
+	fetch 1,mem_le_rxbuf_data_ll_opcode
+	beq LL_CONNECTION_UPDATE_IND,le_parse_connection_update_ind
+	beq LL_CHANNEL_MAP_IND,le_parse_channel_map_ind
+	beq LL_TERMINATE_IND,le_parse_terminate_ind
+	beq LL_ENC_REQ,le_parse_enc_req
+	beq LL_ENC_RSP,le_parse_enc_rsp
+	beq LL_START_ENC_REQ,le_parse_start_enc_req
+	beq LL_START_ENC_RSP,le_parse_start_enc_rsp
+	beq LL_UNKNOWN_RSP,le_parse_unknown_rsp
+	beq LL_FEATURE_REQ,le_parse_feature_req
+	beq LL_FEATURE_RSP,le_parse_feature_rsp
+	beq LL_PAUSE_ENC_REQ,le_parse_pause_enc_req
+	beq LL_PAUSE_ENC_RSP,le_parse_pause_enc_rsp
+	beq LL_VERSION_IND,le_parse_version_ind
+	beq LL_REJECT_IND,le_parse_reject_ind
+	beq LL_PING_REQ,le_parse_ping_req
+	beq LL_PING_RSP,le_parse_ping_rsp
+	beq LL_LENGTH_REQ,le_parse_length_req
+	beq LL_LENGTH_RSP,le_parse_length_rsp
+	beq LL_PHY_REQ,le_parse_phy_req
+	beq LL_PHY_UPDATE_IND,le_parse_phy_update_ind
+	fetchr regc,1,mem_le_rxbuf_data_ll_opcode
+	branch le_send_unknown_rsp
+
+
+//LL Opcode:0x00
+le_parse_connection_update_ind:
+	ifetch 9,contr
+	store 9,mem_le_new_param
+	ifetch 2,contr
+	store 2,mem_le_instant
+	fetch 1,mem_le_state
+	set1 lestate_update_param,pdata
+	store 1,mem_le_state
+	rtn
+
+
+//LL Opcode:0x01
+le_parse_channel_map_ind:
+	ifetch 5,contr
+	store 5,mem_le_new_map
+	ifetch 2,contr
+	store 2,mem_le_instant
+le_update_map_enable:
+	fetch 1,mem_le_state
+	set1 lestate_update_map,pdata
+	store 1,mem_le_state
+	rtn
+
+
+//LL Opcode:0x02
+le_parse_terminate_ind:
+	setarg 20 // 200ms
+	store 2,mem_le_superto
+	store 2,mem_le_init_superto
+	rtn
+
+
+//LL Opcode:0x03
+le_parse_enc_req:
+	ifetch 8,contr
+	store 8,mem_le_rand
+	ifetch 2,contr
+	store 2,mem_le_ediv
+	ifetch 8,contr
+	store 8,mem_le_skdm
+	ifetch 4,contr
+	store 4,mem_ccm_ivm
+	call le_send_enc_rsp
+	bpatchx patch3b_3,mem_patch3b
+	fetch 1,mem_le_pairing_state
+	beq FLAG_LE_PAIRING_AFTER_AUTH,le_parse_enc_req_after_auth
+	fetch 1,mem_le_configuration
+	bbit1  BIT_BLE_PAIRING_FIXED_LTK,le_parse_enc_req_fixed_ltk
+	fetch 1,mem_nv_data_number
+	ncall load_device_list_mode_4,blank
+	fetch 1,mem_ltk_exists
+	beq 0,le_ltk_lost
+le_parse_enc_req_after_auth:
+	jam FLAG_LE_RCV_ENC_START,mem_le_enc_state
+	call  le_send_start_enc_req
+	branch generate_sk
+le_parse_enc_req_fixed_ltk:
+	jam 1,mem_ltk_exists
+	arg mem_le_fixed_ltk,contr
+	arg mem_le_ltk,contw
+	call memcpy16
+	branch le_parse_enc_req_after_auth
+le_ltk_lost:
+	bpatchx patch3b_4,mem_patch3b
+	jam FLAG_LE_ENC_NULL,mem_le_enc_state
+	jam FLAG_LE_ENC_NULL,mem_le_pairing_state
+	jam BT_EVT_LE_LTK_LOST,mem_fifo_temp
+	branch ui_ipc_send_event
+
+//LL Opcode:0x04
+le_parse_enc_rsp:
+	ifetch 8,contr
+	store 8,mem_le_skds
+	ifetch 4,contr
+	store 4,mem_ccm_ivs
+	branch generate_sk
+
+
+//LL Opcode:0x05
+le_parse_start_enc_req:
+	fetch 1,mem_le_state
+	set1 lestate_encryption,pdata
+	store 1,mem_le_state
+	rtn
+
+//LL Opcode:0x06
+le_parse_start_enc_rsp:
+	rtn master
+	jam BT_EVT_LE_START_ENC,mem_fifo_temp
+	call ui_ipc_send_event	
+	jam FLAG_LE_SEND_START_ENC_RSP,mem_le_enc_state
+	branch le_send_start_enc_rsp
+
+
+//LL Opcode:0x07
+le_parse_unknown_rsp:
+	rtn
+
+
+//LL Opcode:0x08
+le_parse_feature_req:
+	branch le_send_feature_rsp
+
+
+//LL Opcode:0x09
+le_parse_feature_rsp:
+	rtn
+
+
+//LL Opcode:0x0a
+le_parse_pause_enc_req:
+	jam FLAG_LE_ENC_PAUSE,mem_le_enc_state
+	call le_send_pause_enc_rsp	
+	jam BT_EVT_LE_PAUSE_ENC,mem_fifo_temp
+	branch ui_ipc_send_event	
+
+
+//LL Opcode:0x0b
+le_parse_pause_enc_rsp:
+	rtn
+
+
+//LL Opcode:0x0c
+le_parse_version_ind:
+	rtn master
+	branch le_send_version_ind
+
+
+//LL Opcode:0x0d
+le_parse_reject_ind:
+	rtn
+
+
+//LL Opcode:0x13
+le_parse_ping_req:
+	branch le_send_ping_rsp
+
+
+//LL Opcode:0x14
+le_parse_ping_rsp:
+	rtn
+
+
+le_parse_length_req:
+	call le_parse_length_rsp
+	branch le_send_data_length_res
+
+le_parse_length_rsp:
+	ifetch 8,contr
+	store 8,mem_remote_rx_max_octets
+	fetch 2,mem_remote_rx_max_octets
+	fetcht 2,mem_local_tx_max_octets
+	call not_greater_than
+	store 2,mem_remote_rx_max_octets
+	
+	fetch 2,mem_remote_tx_max_octets
+	fetcht 2,mem_local_rx_max_octets
+	call not_greater_than
+	store 2,mem_remote_tx_max_octets
+	rtn
+
+
+//LL Opcode:0x16
+le_parse_phy_req:
+	branch le_send_phy_rsp
+
+
+//LL Opcode:0x18
+le_parse_phy_update_ind:
+	ifetch 2,contr
+	store 2,mem_le_new_m2s_phy
+	ifetch 2,contr
+	store 2,mem_le_instant
+	rtn blank
+	fetch 1,mem_le_state
+	set1 lestate_update_phy,pdata
+	store 1,mem_le_state	
+	rtn
+
+
+///////////////////send ll packet//////////////
+//LL Opcode:0x02
+le_send_terminate_ind_user_terminated:
+	arg ERROR_REMOTE_USER_TERMINATED_CONNECTION,regc
+
+//regc:The ErrorCode field shall be set to inform the remote device why the connection is about to be terminated.
+le_send_terminate_ind:
+	arg 2,rega
+	arg LL_TERMINATE_IND,regb
+	call le_fifo_malloc_tx_ll
+	copy regc,pdata
+	istore 1,contw
+	rtn
+
+
+//LL Opcode:0x04
+le_send_enc_rsp:
+	arg mem_le_skds,contw
+	force 8,loopcnt
+	call generate_random_loop
+	arg mem_ccm_ivs,contw
+	force 4,loopcnt
+	call generate_random_loop
+	arg 13,rega
+	arg LL_ENC_RSP,regb
+	call le_fifo_malloc_tx_ll
+	fetch 8,mem_le_skds
+	istore 8,contw
+	fetch 4,mem_ccm_ivs
+	istore 4,contw
+	rtn
+
+
+//LL Opcode:0x05
+le_send_start_enc_req:
+	jam FLAG_LE_SEND_START_ENC_REQ,mem_le_enc_state
+	arg LL_START_ENC_REQ,regb
+	branch le_send_ll_one_lenth
+
+
+//LL Opcode:0x06
+le_send_start_enc_rsp:
+	arg LL_START_ENC_RSP,regb
+	branch le_send_ll_one_lenth
+
+
+//LL Opcode:0x07
+//input:regc is receive ll opcode
+le_send_unknown_rsp:
+	arg 2,rega
+	arg LL_UNKNOWN_RSP,regb
+	call le_fifo_malloc_tx_ll
+	istorer regc,1,contw
+	rtn	
+
+
+//LL Opcode:0x09
+le_send_feature_rsp:
+	arg 9,rega
+	arg LL_FEATURE_RSP,regb
+	call le_fifo_malloc_tx_ll
+	fetch 8,mem_le_local_feature
+	or pdata,FUN_LL_FEATURE_LE_ENCRYPTION,pdata
+	istore 8,contw
+	rtn
+
+
+//LL Opcode:0x0B
+le_send_pause_enc_rsp:
+	arg LL_PAUSE_ENC_RSP,regb
+	branch le_send_ll_one_lenth
+
+
+//LL Opcode:0x0C
+le_send_version_ind:
+	arg 6,rega
+	arg LL_VERSION_IND,regb
+	call le_fifo_malloc_tx_ll
+	fetch 5,mem_lmp_version
+	istore 5,contw
+	rtn
+
+//LL Opcode:0x0D
+le_send_reject_ind:
+	arg 2,rega
+	arg LL_REJECT_IND,regb
+	call le_fifo_malloc_tx_ll
+	setarg LE_ERR_PIN_OR_KEY_MISSING
+	istore 1,contw
+	rtn		
+
+
+//LL Opcode:0x13
+le_send_ping_rsp:
+	arg LL_PING_RSP,regb
+	branch le_send_ll_one_lenth
+	
+le_send_data_length_req:
+	arg LL_LENGTH_REQ,regb
+	branch le_send_data_length
+
+le_send_data_length_res:
+	arg LL_LENGTH_RSP,regb
+le_send_data_length:
+	arg 9,rega
+	call le_fifo_malloc_tx_ll
+	fetch 8,mem_local_rx_max_octets
+	istore 8,contw
+	rtn
+
+
+//LL Opcode:0x17
+le_send_phy_rsp:
+	arg 3,rega
+	arg LL_PHY_RSP,regb
+	call le_fifo_malloc_tx_ll
+	fetch 1,mem_le_tx_phys
+	and pdata,0x07,pdata
+	istore 1,contw
+	fetch 1,mem_le_rx_phys
+	and pdata,0x07,pdata
+	istore 1,contw
+	rtn		
+
+
+//regb:ll opcode
+le_send_ll_one_lenth:
+	arg 1,rega
+	branch le_fifo_malloc_tx_ll
+
+
Index: mouse_public_3mode_usb/program/bt.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/bt.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/bt.prog	(working copy)
@@ -0,0 +1,4606 @@
+define FPGA
+define ROMCODE
+define PATCH
+//define RAM_VERSION
+//define CLK24M
+//define ACL_DEBUG
+define SECURE_CONNECTION
+define DEBUG_RF_INIT
+
+define SIMPLE_PAIRING
+define COMPILE_RFCOMM
+define COMPILE_SHUTTER
+define COMPILE_ANTILOST
+define COMPILE_MOUSE
+define COMPILE_MODULE
+define COMPILE_USB
+define COMPILE_DONGLE
+define COMPILE_LE
+define COMPILE_24G
+define COMPILE_CAR
+define COMPILE_REMOTE_CAR
+//define COMPILE_SIM_API
+//define COMPILE_ESL
+//define COMPILE_WECHAT
+//define COMPLIE_TEST
+//define COMPLIE_TEST_CODE
+INCLUDE "bt_format"
+
+org 0x0000		// start from patch ram address start
+ifdef SIM
+include sim.prog
+else
+include patch.prog
+endif
+
+/******************************************/
+/***********   ROM Start   ***************/
+/******************************************/
+
+org 0x800		// start from rom address start
+start:
+	call lpmstate
+
+soft_reset:
+	bpatch patch00_0,mem_patch00
+	clear_stack
+	call app_param_init
+	call initialize_radio
+	call iic_init_360khz
+	call init_param
+	call l2cap_init
+	bpatch patch00_1,mem_patch00
+	call rfcomm_init
+	call init_lmp
+	call ui_init
+	call app_init
+	bpatch patch00_2,mem_patch00
+	call app_lpm_init,wake
+ifdef SIMPLE_PAIRING
+	call publickey_init
+	call sp_wait_pubkey_calc_done
+else
+	call sp_reset
+ifdef SECURE_CONNECTION
+	call publickey_init
+endif
+endif
+	call lpm_recover_clk,wake
+main_loop:	
+	bpatch patch00_3,mem_patch00
+ifdef SIMPLE_PAIRING
+	call sp_calc_sequence
+endif
+ifdef SECURE_CONNECTION
+	call sp_calc_sequence_256
+endif
+ifdef SIMPLE_PAIRING
+ifdef SECURE_CONNECTION
+	call sp_calc_sequence_256_check
+endif
+endif
+	call le_advertising_dispatch
+	call idle_dispatch
+	call app_process_idle
+	bpatch patch00_4,mem_patch00
+	call inquiry_dispatch
+	call inquiry_scan_dispatch
+	call page_scan_dispatch
+	call connection_dispatch
+	call g24_dispatch
+	call lpm_dispatch
+	branch main_loop
+
+connection_dispatch:
+	call connection_incontext
+	rtnmark0 mark_context
+	set0 mark_context,mark
+	call context_save
+	branch le_disable
+	
+connection_incontext:
+	bpatch patch00_5,mem_patch00
+	call context_search_insniff
+	nbranch connection_nosniff,zero
+	call context_load
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	bbit1 mode_le,le_conn_dispatch
+	bbit1 mode_master, master_dispatch
+	branch slave_dispatch
+connection_nosniff:
+	call context_get_next
+	copy loopcnt,null
+	rtn zero
+	call context_load
+	fetch 1,mem_state
+	bbit1 state_inpage,master_page
+	fetch 1,mem_mode
+	bbit1 mode_master, master_dispatch
+	branch slave_dispatch
+
+
+
+/**************************************/
+/**************idle dispatch*********/
+/**************************************/
+	
+idle_dispatch:
+	fetch 1,mem_hci_cmd
+	rtn blank
+	beq hci_cmd_inquiry,idle_inquiry
+	beq hci_cmd_inquiry_cancel,idle_inquiry_cancel
+	beq hci_cmd_remote_name_req,idle_remote_name_req
+	beq hci_cmd_create_conn,idle_create_conn
+	beq hci_cmd_le_create_conn,idle_le_create_conn
+	call context_search_conn_handle
+	rtn zero
+	call context_search_plap
+	rtn zero
+idle_exit:
+	jam 0,mem_hci_cmd
+	rtn
+
+idle_le_create_conn:
+	jam hci_cmd_le_create_conn,mem_cmd_le_create_conn
+	jam 0,mem_hci_cmd
+	rtn
+	
+idle_inquiry:
+	set1 mark_inquiry_on,mark
+	set0 mark_inquiry_trainb,mark
+	jam param_ninquiry,mem_ninqy_index
+	jam 31,mem_nfreq_index_inq
+	branch idle_exit
+
+idle_inquiry_cancel:
+	set0 mark_inquiry_on,mark
+	force 0,stop_watch
+	branch idle_exit
+
+idle_remote_name_req:
+	call context_search_plap
+	rtn zero
+	force LMP_NAME_REQ,temp
+	jam 5,mem_nameres_cnt
+	branch idle_start_page
+
+idle_create_conn:
+	bpatch patch00_6,mem_patch00
+idle_create_conn_device:
+	fetch 6,mem_hci_plap
+//	branch idle_exit,blank
+	nop 1
+	jam RECONNECT_HID,memui_reconnect_mode
+	//jam HS_INIT_CALL,mem_hs_mode //init as master
+	jam CONN_SM_WAIT_FEATURES_RES,mem_conn_sm
+	branch idle_create_conn_cont
+	
+idle_create_conn_cont:
+	force LMP_VERSION_REQ,temp
+idle_start_page:
+	bpatch patch00_7,mem_patch00
+	fetch 1,mem_page_mode
+	branch idle_page_mode_r0,blank
+	lshift3 pdata,pdata
+	lshift4 pdata,pdata
+	increase -1,pdata
+idle_page_mode_r0:
+	store 1,mem_npage
+	store 1,mem_npage_index
+	jam 31,mem_nfreq_index_page
+	set0 mark_page_trainb,mark
+	call context_new
+	nbranch idle_page_fail,zero
+	call get_free_amaddr
+	store 1,mem_amaddr
+	storet 1,mem_lmo_opcode2
+	fetch 6,mem_hci_plap
+	store 6,mem_plap
+	bpatch patch01_0,mem_patch01
+	call timer_reinit
+	fetcht 1,mem_lmo_opcode2
+	force 0,pdata
+	compare LMP_NAME_REQ,temp,0xff
+	nsetflag true,state_init_seq,pdata
+	set1 state_inpage,pdata
+	store 1,mem_state
+	jam BT_EVT_RECONN_STARTED,mem_fifo_temp
+	call ui_ipc_send_event
+	force 0,pdata
+	setflag true,smap_name_req,pdata
+	store 1,mem_state_map
+	setarg 0
+	set1 mode_master,pdata
+	store 1,mem_mode
+	enable master
+	call context_save
+	disable master
+	force page_length_timer,queue
+	fetch 2,mem_page_to
+	call timer_init
+	branch idle_exit
+idle_page_fail:
+	bpatch patch01_1,mem_patch01
+	fetch 6,mem_hci_plap
+	store 6,mem_plap
+	compare LMP_NAME_REQ,temp,0xff
+	branch idle_name_fail,true
+	branch idle_exit
+idle_name_fail:
+	arg mem_tmp_buffer,contw
+	arg 8,loopcnt
+	call memset0
+	jam BT_EVT_RECONN_FAILED,mem_fifo_temp
+	call ui_ipc_send_event
+	branch idle_exit
+	
+
+/******************************************/
+/**************  Inquiry  *****************/
+/******************************************/
+
+inquiry_dispatch:
+	rtnmark0 mark_inquiry_on
+	force inquiry_length_timer,queue
+	call timer_check
+	nsetflag blank,mark_inquiry_on,mark
+	nbranch inquiry_start,blank
+	rtn
+	
+
+
+inquiry_start:
+	bpatch patch01_2,mem_patch01
+	fetcht 2,mem_inq_window
+	force 4,queue
+	call sniff_check_window
+	rtn user
+	call afh_clear
+	force 0,freq_mode
+inquiry_restart:
+	rtn timeout
+	set0 mark_fhs_already_good,mark
+	set0 mark_fhs_eir,mark
+inquiry_rx_restart:
+	add clkn_bt,1,bt_clk
+	isolate1 mark_inquiry_trainb,mark
+	setflag true,2,freq_mode
+	compare 0x00,bt_clk,0x02      /* see if this is even slot */
+	nbranch inquiry_receive,true
+
+inquiry_transmit:
+	bpatch patch01_3,mem_patch01
+	fetch 1,mem_inquiry_transmit
+	increase 1,pdata
+	store 1,mem_inquiry_transmit
+	call fetch_giac
+	call tx_radio_freq
+	call fetch_diac
+	call start_transmitter	/* get ready for that id packet */
+	call start_tx_native
+	call send_access_word
+	call end_of_packet
+	call inquiry_check_train
+	branch inquiry_restart
+
+inquiry_check_train:
+	bpatch patch01_4,mem_patch01
+	fetch 1,mem_nfreq_index_inq
+	increase -1,pdata
+	store 1,mem_nfreq_index_inq
+	rtn positive  /* if it's time to incremnt N */
+	jam 31,mem_nfreq_index_inq
+	fetch 1,mem_ninqy_index
+	increase -1,pdata
+	store 1,mem_ninqy_index
+	rtn positive      /* if it's time to change train */
+	setflip mark_inquiry_trainb,mark
+	jam param_ninquiry,mem_ninqy_index
+	rtn
+
+inquiry_receive:
+	bpatch patch01_5,mem_patch01
+	call fetch_giac
+	call rx_radio_freq
+	call fetch_diac
+	call start_rx_native
+	call start_receiver	/* get ready for that id packet */
+	call wait_access_clkn_rt
+	branch inquiry_sync,sync   /* try look for id packet again if not found */
+	call inquiry_check_train
+	branch inquiry_rx_restart
+inquiry_sync:
+	bpatch patch01_6,mem_patch01
+	call save_rssi
+	call scan_mode_whiten
+	call receive_packet_whitened
+	set0 mark_rxbuf_inuse,mark
+	rtnmark0 mark_fhs_already_good
+inquiry_receive_rtn:
+inquiry_receive_eir_rtn:
+	fetch 1,mem_inquiry_rcv
+	increase 1,pdata
+	store 1,mem_inquiry_rcv
+	rtn
+		
+/******************************************/
+/**************  Master Dispatch  *************/
+/******************************************/
+
+
+
+master_page:
+	bpatch patch01_7,mem_patch01
+	enable master
+	enable clknt
+	fetch 2,mem_page_interval
+	branch master_page_no_interval,blank
+	force page_interval_timer,queue
+	call timer_check               
+	nrtn blank
+master_page_no_interval:
+	bpatch patch02_0,mem_patch02
+	fetcht 2,mem_page_window
+	force 40,queue
+	call sniff_check_window
+	branch page_exit,user
+	force page_length_timer,queue
+	call timer_check
+	nbranch page_start,blank
+	fetch 1,mem_state_map
+	bbit1 smap_name_req,master_npage_timeout
+	branch master_page_timeout
+master_npage_timeout:
+	arg mem_tmp_buffer,contw
+	arg 8,loopcnt
+	call memset0
+master_page_timeout:
+	bpatch patch02_1,mem_patch02
+	jam 0,mem_state
+	call init_lmp_work
+	jam 0,memui_reconnect_mode
+	jam BT_EVT_RECONN_PAGE_TIMEOUT,mem_fifo_temp
+	call ui_ipc_send_event	
+	branch page_exit
+
+page_start:
+	bpatch patch02_2,mem_patch02
+	force 0,timeup
+	until clkn_rt,meet
+	fetch 1,mem_page_clk
+	increase -1,pdata
+	ixor clkn_bt,pdata
+	compare 0,pdata,3
+	nbranch page_start,true
+	deposit am_addr
+	store 1,mem_fhs_am_addr
+	force 0,N_tx_slot
+	force 0,freq_mode
+
+page_restart:
+	bpatch patch02_3,mem_patch02
+	branch page_exit,timeout
+	call fetch_page_bt_adr
+	fetchr timeup,2,mem_param_rf_setup
+	until clkn_rt,meet         /* wait for the start_receiver time against native real clk  */
+page_rx_restart:
+	bpatch patch02_4,mem_patch02
+	fetch 4,mem_page_clk    /* deposit clk_estimate */
+	iforce bt_clk
+	increase 1,pdata
+	store 4,mem_page_clk
+	isolate1 mark_page_trainb,mark
+	setflag true,2,freq_mode
+	compare 0x00,bt_clk,0x02      /* see if this is even slot */
+	nbranch page_receive,true
+	fetch 1, mem_page_transmit
+	increase 1,pdata
+	store 1, mem_page_transmit
+	call tx_radio_freq
+	call start_transmitter	/* get ready for that id packet */
+	call start_tx_native
+	call send_access_word
+	call end_of_packet
+	call page_check_train
+	branch page_restart	
+page_exit:
+	bpatch patch02_5,mem_patch02
+	disable master
+	fetch 2,mem_page_interval      
+	rtn blank
+	force page_interval_timer,queue
+	branch timer_init              
+
+page_check_train:
+	bpatch patch02_6,mem_patch02
+	fetch 1,mem_nfreq_index_page
+	increase -1,pdata
+	store 1,mem_nfreq_index_page
+	rtn positive
+	jam 31,mem_nfreq_index_page
+	fetch 1,mem_npage_index
+	increase -1,pdata                 /* increment N */
+	store 1,mem_npage_index
+	rtn positive      			/* if it's time to change train */
+	setflip mark_page_trainb,mark             /* change train */
+	fetch 1,mem_npage
+	store 1,mem_npage_index
+	rtn
+	
+page_receive:
+	bpatch patch02_7,mem_patch02
+	call rx_radio_freq
+	call start_rx_native
+	call start_receiver	/* get ready for that id packet */
+	call wait_access_clkn_rt	/* try id look for id packet again */
+	branch page_sync,sync         /* restart if didn't receive anything */
+	call page_check_train
+	branch page_rx_restart
+page_sync:
+	call end_of_packet
+	fetch 1, mem_page_rcv
+	increase 1,pdata
+	store 1, mem_page_rcv
+	force 0,stop_watch
+	fetch 4,mem_page_clk
+page_send_fhs:
+	bpatch patch03_0,mem_patch03
+	call rf_setup_time_master_slot
+	call fetch_page_bt_adr
+	increase 1,N_tx_slot
+page_send_fhs_continue:
+	and_into 0x1fd,bt_clk
+	and_into 0x1fc,freq_mode               /* master response = x00, even_train settin must remain the same */
+	call tx_radio_freq
+	call start_transmitter	/* get ready for that id packet */
+	call start_tx_native
+	call send_access_word
+	deposit clkn_bt
+	store 4,mem_clkn_bt
+	force 0,am_addr
+	force type_fhs,type
+	call scan_mode_whiten
+	call transmit_packet_whitened
+page_wait_fhs_reply:
+	bpatch patch03_1,mem_patch03
+	call rf_setup_time_slave_slot
+	or_into 0x02,bt_clk
+	and_into 0x1fc,freq_mode               /* master response sequence = x00, even train setting must be preserved */
+	call rx_radio_freq
+	call start_rx_native
+	call start_receiver	/* get ready for that id packet */
+	call wait_access_clkn_rt	/* look for that reply */
+	call end_of_packet,sync              /* id reply is enough */
+	branch page_wait_fhs_reply_ok,sync           /* no reply then send fhs again */
+	fetch 1,mem_fhs_wait_counter
+	branch page_restart,blank
+	increase -1,pdata
+	store 1,mem_fhs_wait_counter
+	branch page_send_fhs
+	
+page_wait_fhs_reply_ok:
+	bpatch patch03_2,mem_patch03
+	fetch 1, mem_page_rcv_fhs
+	increase 1,pdata
+	store 1, mem_page_rcv_fhs
+	call prepare_newconn
+master_newconn_loop:
+	set1 mark_first_packet,mark
+	call master_newconn_once
+	branch newconn_poll_responded,sync
+	set0 mark_first_packet,mark
+	call new_conn_timeout
+	nbranch master_newconn_loop,blank
+	branch page_restart
+
+newconn_poll_responded:
+	bpatch patch03_3,mem_patch03
+	set0 mark_first_packet,mark
+	fetch 1,mem_state
+	set0 state_inpage,pdata
+	store 1,mem_state
+	call newconn_init
+	disable master
+	rtn
+	
+
+master_dispatch:
+	bpatch patch03_4,mem_patch03
+	enable master
+	enable clknt
+	call role_switch_master
+	rtn user
+	call rf_setup_time_master_slot
+	add clkn_bt,1,bt_clk
+	call fetch_self_bt_adr
+	force 0x03,freq_mode
+	call scheduler_tx_l2cap_pkt
+	call prepare_tx
+	call tx_radio_freq
+	call start_transmitter
+	call start_tx_native
+	call send_access_word
+	call transmit_packet
+master_loop:
+	bpatch patch03_5,mem_patch03
+	call parse_lmp
+	call master_conn_recv_packet
+	nbranch master_notmatch,match
+	call supervision_flush
+	call parse_l2cap
+	fetch 1,mem_master_rcvcnt
+	increase 1,pdata
+	store 1,mem_master_rcvcnt
+master_notmatch:
+	bpatch patch03_6,mem_patch03
+	call scheduler_process
+	call check_master_disconnect
+	nrtn master					/* disconnected */
+	call check_attempt
+	nbranch master_attempt,blank
+master_exit:
+	disable master
+	rtn
+
+master_attempt:
+	call prepare_tx
+	call master_conn_send_packet
+	branch master_loop
+
+
+check_master_disconnect:
+	branch check_master_match,match
+	call supervision_update
+	branch master_disconnect,positive
+check_master_match:
+	call check_disconnect_timeout
+	nbranch master_disconnect,user
+	fetch 1,mem_state_map
+	rtnbit0 smap_name_req
+	rtnbit1 smap_name_res
+	fetch 1,mem_op
+	rtnbit1 op_disconn
+	call conn_timer_expired
+	nrtn blank
+	fetch 1,mem_nameres_cnt
+	increase -1,pdata
+	store 1,mem_nameres_cnt
+	nrtn blank
+	branch lmp_disconnect
+
+master_disconnect:
+	bpatch patch03_7,mem_patch03
+	call quit_connection
+	disable master
+	fetch 1,mem_state_map
+	bbit1 smap_name_req,master_name_disconnect
+	rtn
+	
+master_name_disconnect:
+	fetch 1,mem_state_map
+	rtnbit1 smap_name_res
+master_name_error:
+	arg mem_tmp_buffer,contw
+	arg 8,loopcnt
+	branch memset0
+	
+check_disconnect_timeout:
+	bpatch patch04_0,mem_patch04
+	enable user
+	fetch 1,mem_op
+	rtnbit0 op_disconn
+	call conn_timer_expired
+	nrtn blank
+	branch disable_user
+
+conn_timer_expired:
+	fetch 1,mem_conn_timer
+	increase -1,pdata
+	store 1,mem_conn_timer
+	rtn
+
+linkkey_ready:
+	bpatch patch04_1,mem_patch04
+	fetch 1,mem_state
+	bbit1 state_linkkey,linkkey_set
+	fetch 1,mem_pairing_auth
+	branch linkkey_set,blank
+	jam DEFALT_PAIRING_AUTH,mem_pairing_auth
+	jam BT_EVT_LINKKEY_GENERATE,mem_fifo_temp
+	call ui_ipc_send_event
+	branch linkkey_set
+linkkey_set:
+	bpatch patch04_2,mem_patch04
+	call context_traverse_linkkey
+	fetch 1,mem_state
+	set1 state_linkkey,pdata
+	store 1,mem_state
+	jam 1,mem_link_key_exists
+	fetch 1,mem_conn_sm
+	bne CONN_SM_PAIRING,linkkey_set_continue
+linkkey_set_continue:
+	rtn
+
+generate_linkkey_continue:
+	jam PAIRING_AUTH,mem_pairing_auth
+clear_linkstate:
+	fetch 1,mem_state
+	set0 state_linkkey,pdata
+	store 1,mem_state
+	rtn
+	
+
+	/* rtn user if switch */
+role_switch_check:
+	bpatch patch04_3,mem_patch04
+	disable user
+	fetch 2,mem_tsniff
+	arg 0xffff,temp
+	isub temp,null
+	nrtn zero
+	fetch 4,mem_sniff_anchor
+	branch role_switch_clkn,clknt
+	isub clke_bt,pdata
+	branch role_switch_clke
+role_switch_clkn:
+	isub clkn_bt,pdata
+role_switch_clke:
+	sub pdata,4,null
+	nrtn positive
+	force 0,pdata
+	store 2,mem_tsniff
+	branch enable_user
+
+
+	/* pdata: switch instant, set tsniff=0 for special sniff */	
+role_switch_prepare:
+	copy pdata,temp
+	storet 4,mem_sniff_anchor
+role_switch_prepare0:
+	bpatch patch04_4,mem_patch04
+	jam SWITCH_FLAG_ACCEPT,mem_switch_flag
+	setarg 0xffff
+	store 2,mem_tsniff
+	jam 1,mem_sniff_attempt
+	rtn
+
+
+role_switch_master:
+	bpatch patch04_5,mem_patch04
+	call role_switch_check
+	nrtn user
+	disable user
+	jam param_newconnto,mem_newconnto_counter
+	set0 mark_fhs_already_good,mark
+	set0 mark_role_switch_receive_fhs,mark
+roles_waitfhs_loop:
+	call rf_setup_time_master_slot
+	call master_recv_packet
+	bmark1 mark_fhs_already_good,roles_replyto_fhs
+	call new_conn_timeout
+	nbranch roles_waitfhs_loop,blank
+	bmark1 mark_role_switch_receive_fhs,roles_replyto_fhs_rcvd
+role_switch_fail_master:
+	bpatch patch04_6,mem_patch04
+	disable user
+	deposit clkn_bt
+	store 4,mem_next_btclk
+	enable clknt
+	enable master
+	jam BT_EVT_SWITCH_FAIL_MASTER,mem_fifo_temp
+	branch ui_ipc_send_event
+	
+roles_replyto_fhs:
+	bpatch patch04_7,mem_patch04
+	call rf_setup_time_slave_slot
+	arg type_id,type
+	call master_send_packet
+	set1 mark_role_switch_receive_fhs,mark
+	set0 mark_fhs_already_good,mark
+	fetch 1,mem_amaddr
+	iforce am_addr	//use current LT_ADDR
+	jam 2,mem_newconnto_counter
+	branch roles_waitfhs_loop
+
+roles_replyto_fhs_rcvd:
+	fetch 4,mem_clke_bt		//wait for 2 fhs,need 2.5ms
+	pincrease 8
+	store 4,mem_clke_bt
+	disable clknt
+	disable master
+	call apply_switch_clke
+	call prepare_newconn
+roles_newconns_loop:
+	bpatch patch05_0,mem_patch05
+	call slave_newconn_once
+	branch roles_newconns_responded,match
+	call new_conn_timeout
+	nbranch roles_newconns_loop,blank
+	branch role_switch_fail_master
+roles_newconns_responded:
+	fetch 1,mem_mode
+	set0 mode_master,pdata
+	store 1,mem_mode
+	call supervision_flush
+	call calc_clke_offset
+	enable user
+	jam BT_EVT_SWITCH_SUCCESS_MASTER,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+
+
+context_load:
+	bpatch patch05_1,mem_patch05
+	set1 mark_context,mark
+	deposit rega
+	store 2,mem_context_ptr
+	force context_size,loopcnt
+	arg mem_le_state,contw
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	copy rega,contr
+	bbit1 mode_le,memcpy
+	arg mem_state,contw
+	call memcpy
+	disable attempt
+	fetch 1,mem_amaddr
+	iforce am_addr
+	jam 1,mem_current_sniff_attempt
+	branch context_load_master,master
+	jam 1,mem_current_sniff_attempt
+context_load_master:
+	fetch 1,mem_state
+	rtnbit0 state_insniff
+	fetch 1,mem_sniff_attempt
+	store 1,mem_current_sniff_attempt
+	fetch 1,mem_sniff_timeout
+	store 1,mem_current_sniff_timeout
+	rtn
+	
+context_save:
+	bpatch patch05_2,mem_patch05
+	fetch 2,mem_context_ptr
+	iforce contw
+	force context_size,loopcnt
+	arg mem_le_state,contr
+	branch memcpy,le
+	arg mem_state,contr
+	branch memcpy
+
+	
+
+context_get_next:
+	arg context_num,loopcnt
+	fetcht 1,mem_current_context
+context_get_next_loop:
+	increase 1,temp
+	compare context_num,temp,0xff
+	nbranch context_get_next_cont,true
+	arg 0,temp
+context_get_next_cont:
+	storet 1,mem_current_context
+	mul32 temp,context_size,pdata
+	arg mem_context,rega
+	iadd rega,rega
+	ifetch 1,rega
+	bbit1 state_insniff,context_get_next_sniff
+	rtnbit1 state_inconn
+	rtnbit1 state_inpage
+context_get_next_sniff:
+	loop context_get_next_loop
+	rtn
+	
+context_new:
+	bpatch patch05_3,mem_patch05
+	arg context_search_empty,regc
+	call context_search
+	nrtn zero					// all occupied
+	deposit rega
+	store 2,mem_context_ptr
+	force 0,null
+	rtn
+	
+	//return zero if anyone's wack is 1.
+	//return nzero if all wack is 0
+context_check_all_wack:
+	call check_esco_amaddr
+	branch context_check_esco_wack,true
+	fetch 2,mem_context_ptr
+	add pdata,coffset_arq,contw
+	fetch 1,mem_arq
+	istore 1,contw
+	arg context_check_a_wack,regc
+	branch context_search
+
+context_check_esco_wack:
+	fetch 1,mem_arq
+	isolate1 wack,pdata
+	branch context_esco_wack,true
+	force 1,null
+	rtn
+context_esco_wack:
+	force 0,null
+	rtn
+	
+	//rtn nzero if idle(no conn)
+context_check_idle:
+	arg context_check_inconn,regc
+	branch context_search
+	
+context_traverse_linkkey:
+	fetcht 2,mem_context_ptr
+	arg context_traverse_clearkey,regc
+	branch context_search
+	
+	
+	/* return zero if conn handle is found */
+context_search_conn_handle:
+	fetcht 1,mem_hci_conn_handle
+context_search_conn_handle2:
+	arg context_search_handle,regc
+	branch context_search
+	/* return zero if plap is found */
+context_search_plap:
+	bpatch patch05_4,mem_patch05
+	fetcht 6,mem_hci_plap
+context_search_plap2:
+	arg context_search_lap,regc
+	branch context_search
+	/* return zero if sniff anchor is meet and rega pointers to context */
+context_search_insniff:
+	arg context_search_sniff,regc
+	branch context_search
+	/* return zero if sniff window is in content with current transaction */
+context_search_sniff_window:
+	arg context_search_window,regc
+context_search:
+	bpatch patch05_5,mem_patch05
+	arg mem_context,rega
+	arg context_num,loopcnt
+context_search_loop:
+	ifetch 1,rega
+	copy regc,pc
+context_search_next:
+	increase context_size,rega
+	loop context_search_loop
+	force 1,null
+	rtn
+
+context_search_empty:
+	bbit1 state_inconn,context_search_next
+	bbit1 state_inpage,context_search_next
+	force 0,null
+	rtn
+	
+context_search_lap:
+	bbit1 state_inpage,context_search_lap_cont
+	bbit0 state_inconn,context_search_next
+context_search_lap_cont:
+	add rega,coffset_plap,contr
+	ifetch 6,contr
+	isub temp,null
+	rtn zero
+	branch context_search_next
+
+context_search_handle:
+	bbit0 state_inconn,context_search_next
+	add rega,coffset_conn_handle,contr
+	ifetch 1,contr
+	isub temp,null
+	rtn zero
+	branch context_search_next
+
+context_search_sniff:
+	bbit0 state_insniff,context_search_next
+context_search_sniff_loop:
+	call context_get_anchor
+	call sign_pdata_temp
+	isub temp,pdata
+	increase 1,pdata
+	branch context_search_sniff_miss,positive
+	copy contr,regb
+	store 9,mem_temp
+	fetch 1,mem_sc_calc
+	nbranch context_search_sniff_sc,blank
+	fetch 9,mem_temp
+	copy regb,contr
+	increase 5,pdata  
+	branch context_search_meet1
+context_search_sniff_sc:
+	fetch 9,mem_temp
+	copy regb,contr	
+	increase 20,pdata  
+context_search_meet1:
+	nbranch context_search_next,positive
+context_search_meet:
+	copy temp,bt_clk
+	call context_next_anchor
+	force 0,null
+	rtn
+	
+	
+context_search_sniff_miss:
+	iforce regb
+	add rega,coffset_tsniff,contr
+	ifetch 2,contr
+	branch context_search_meet,blank
+	call context_next_anchor
+	branch context_search_sniff_loop
+
+sign_pdata_temp:
+	rshift16 pdata,timeup    
+	rshift8 timeup,timeup    
+	branch sign_pdata_temp_p0,zero    
+	compare 0xf,timeup,0xf    
+	nrtn true    
+	rshift16 temp,timeup    
+	rshift8 timeup,timeup    
+	nrtn zero    
+	set1 28,temp    
+	rtn
+sign_pdata_temp_p0:    
+	rshift16 temp,timeup    
+	rshift8 timeup,timeup    
+	compare 0xf,timeup,0xf    
+	nrtn true    
+	set1 28,pdata    
+	rtn
+
+context_check_inconn:
+	bbit0 state_inconn,context_search_next
+	force 0,null 				// found
+	rtn
+	
+context_check_a_wack:
+	bbit0 state_inconn,context_search_next
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	bbit1 mode_le,context_search_next
+	add rega,coffset_arq,contr
+	ifetch 1,contr
+	bbit0 wack,context_search_next
+	force 0,null 				// found
+	rtn
+
+context_get_anchor:
+	add rega,coffset_mode,contr
+	ifetcht 1,contr
+	deposit clkn_bt
+	isolate1 mode_master,temp
+	add rega,coffset_sniff_anchor,contr
+	ifetcht 4,contr
+	rtn true
+	add rega,coffset_clk_offset,contr
+	ifetch 6,contr
+	call calc_clke2
+	deposit clke_bt
+	rtn
+
+context_next_anchor:
+	add rega,coffset_tsniff,contr
+	add rega,coffset_sniff_anchor,contw
+	ifetch 2,contr
+	iadd temp,timeup			/* wrap to 28 bits */
+	deposit timeup
+	istore 4,contw
+	branch le_context_nextevent
+	
+
+context_search_window:
+	bbit0 state_insniff,context_search_next
+	call context_get_anchor
+	iadd stop_watch,pdata
+	iadd stop_watch,pdata
+	iadd queue,pdata
+	isub temp,null
+	nbranch context_search_next,positive
+	force 0,null
+	rtn
+
+context_traverse_clearkey:
+	bbit0 state_inconn,context_search_next
+	deposit temp
+	isub rega,null
+	branch context_search_next,null
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	bbit1 mode_le,context_search_next
+	ifetch 1,rega
+	set0 state_linkkey,pdata
+	istore 1,rega
+	branch context_search_next
+
+	
+master_conn_send_packet:
+	bpatch patch05_6,mem_patch05
+	call rf_setup_time_master_slot
+master_send_packet:
+	add clkn_bt,1,bt_clk          /* master start to use native clock */
+	call fetch_self_bt_adr
+	force 0x03,freq_mode          /* we are in connection!! */
+	call tx_radio_freq
+	call start_transmitter
+	call start_tx_native
+	call send_access_word
+	branch transmit_packet
+
+master_conn_recv_packet:
+	bpatch patch05_7,mem_patch05
+	call rf_setup_time_slave_slot
+master_recv_packet:
+	add clkn_bt,1,bt_clk          /* master start to use native clock */
+	call fetch_self_bt_adr
+	force 0x03,freq_mode          /* we are in connection!! */
+	call rx_radio_freq
+	call init_rx_packet_flags
+	call prep_crypt
+	call start_rx_native	/* start listening at start_rx time */
+	call start_receiver
+master_rx_conn_finish_packet:
+	call wait_access_clkn_rt	/* master use native clock */
+	nrtn sync
+	call save_rssi
+	branch receive_packet
+	
+	
+
+master_newconn_once:
+	bpatch patch06_0,mem_patch06
+	fetch 1,mem_fhs_am_addr
+	iforce am_addr			//review
+	force type_poll,type
+	call master_conn_send_packet
+	branch master_conn_recv_packet
+
+
+
+
+
+
+/******************************************/
+/************* Inquiry Scan ***************/
+/******************************************/
+
+inquiry_scan_dispatch:
+	fetch 1,mem_scan_mode
+	rtnbit0 inq_scan_mode
+	force iscan_interval_timer,queue
+	call timer_check
+	nrtn blank
+	fetcht 2,mem_iscan_window
+	force 4,queue
+	call sniff_check_window
+	rtn user
+	call inquiry_scan_start
+	force iscan_interval_timer,queue
+	fetch 2,mem_iscan_interval
+	nbranch timer_init,sync
+	random pdata				/* inquiry scan backoff */
+	iand mask3ff,pdata
+	branch timer_init
+	
+
+inquiry_scan_start:
+	bpatch patch06_1,mem_patch06
+	jam 0,mem_fhs_am_addr
+	disable clknt
+	disable attempt
+	call afh_clear
+	and clkn_bt,0x1fc,bt_clk      /* freeze the clock, set bit[1] 0, this is version 1.1 */
+	force 0x01,freq_mode     /* slave in inquiry scan, kind of same as inquriy_response, this is version 1.1 */
+	call fetch_giac
+	call rx_radio_freq
+	setflip mark_inquiry_state,mark
+	fetch 1,mem_inquiryscan_waitcnt
+	increase 1,pdata
+	store 1,mem_inquiryscan_waitcnt
+	call fetch_diac
+	call start_receiver	/* get ready for that id packet */
+	call wait_access_forever	/* until there is timeout, or matched (true) */
+	nrtn sync
+	bpatch patch06_2,mem_patch06
+	force 0,stop_watch
+	call shutdown_radio	/* must have heard */
+	fetch 1,mem_inquiryscan_rcvcnt
+	increase 1,pdata
+	store 1,mem_inquiryscan_rcvcnt
+	call fetch_giac
+	call rf_setup_time_slave_slot
+	or_into 0x002,bt_clk               /* put clk(1) to 1 */
+	force 0x01,freq_mode               /* slave in inquriy and page, response only */
+	call tx_radio_freq
+	call fetch_diac
+	call start_transmitter	/* get ready for that id packet */
+	call start_tx_external
+	deposit clkn_bt
+	store 4,mem_clkn_bt
+	call send_access_word
+	force type_fhs,type
+	force 0,am_addr                       /* put 0 into am_addr field for fhs */
+	call scan_mode_whiten
+	call transmit_packet_whitened
+	call send_eir
+	and_into 0x1fd,bt_clk                 /* put clk(1) back to 0 */
+	increase 1,N_tx_slot
+	rtn
+
+send_eir:
+	bpatch patch06_3,mem_patch06
+	fetch 1,mem_eir_enable
+	rtn blank
+	arg mem_eir,contw
+	fetch 1,mem_local_name_length
+	copy pdata,loopcnt
+	increase 1,pdata
+	istore 1,contw	
+	copy contw,temp
+	increase 1,pdata
+	store 2,mem_tx_len	
+	copy temp,contw
+	setarg 0x09  //type:name
+	istore 1,contw		
+	arg  mem_local_name,contr
+	call memcpy       //name
+
+	arg mem_all_uuid_128bits,regc
+	arg 4,loopcnt
+	call get_all_uuid
+	arg mem_all_uuid_16bits,regc
+	arg 1,loopcnt
+	call get_all_uuid
+
+	force type_dm3,type		/* DM3 */
+	jam 2,mem_tx_lch
+	setarg mem_eir
+	store 2,mem_txptr
+	call rf_setup_time_slave_slot
+	call tx_radio_freq
+	call start_transmitter	/* get ready for that id packet */
+	call start_tx_external
+	call send_access_word
+	call scan_mode_whiten
+	call transmit_packet_whitened
+	rtn
+
+
+get_all_uuid:
+	copy contw,temp
+	copy regc,contr
+	ifetch 1,contr
+	rtn blank
+lshift_loop:
+	lshift pdata,pdata
+	loop lshift_loop
+	copy pdata,rega
+	increase 2,pdata
+	copy pdata,queue
+	fetch 2,mem_tx_len
+	iadd queue,pdata
+	store 2,mem_tx_len
+	copy temp,contw
+	copy rega,pdata
+	increase 1,pdata
+	istore 1,contw
+	copy regc,contr
+	ifetch 1,contr
+	ifetch 1,contr	//fetch type
+	istore 1,contw
+	copy rega,loopcnt
+	branch memcpy  //copy uuid
+	
+/******************************************/
+/******** Slave dispatch ***********/
+/******************************************/
+
+page_scan_dispatch:	
+	fetch 1,mem_scan_mode
+	rtnbit0 page_scan_mode
+	force pscan_interval_timer,queue
+	call timer_check
+	nrtn blank
+	fetcht 2,mem_pscan_window
+	force 40,queue
+	call sniff_check_window
+	rtn user
+	force 0,am_addr
+	jam param_pagerespto,mem_fhs_wait_counter
+	set0 mark_fhs_already_good,mark
+	call page_scan_start
+	force pscan_interval_timer,queue
+	fetch 2,mem_pscan_interval
+	branch timer_init
+	
+
+page_scan_start:
+	bpatch patch06_4,mem_patch06
+	disable clknt
+	call afh_clear
+	fetch 1,mem_pagescan_waitcnt
+	increase 1,pdata
+	store 1,mem_pagescan_waitcnt
+	force 0,N_tx_slot
+	call fetch_self_bt_adr
+	add clkn_bt,1,bt_clk      /* freeze the clock on native clock until scan window is up */
+	force 0x02, freq_mode     /* slave in inquiry and page, not response */
+	bpatch patch06_5,mem_patch06
+	call rx_radio_freq
+	call start_receiver	/* wait for that id packet from master */
+	call wait_access_forever
+	nrtn sync                          /* pscan window timeout occured, back to dispatch */
+	call shutdown_radio	/* got the id packet */
+	fetch 1,mem_pagescan_rcvcnt
+	increase 1,pdata
+	store 1,mem_pagescan_rcvcnt
+	force 0,stop_watch
+	call rf_setup_time_slave_slot
+	or_into 0x002,bt_clk               /* put clk(1) to 1 */
+	force 0x01,freq_mode               /* slave in inquriy and page, response only */
+	call tx_radio_freq
+	call start_transmitter
+	call start_tx_external
+	call send_access_word
+	call end_of_packet
+	force 0,am_addr
+	fetchr timeup,2,mem_param_rf_setup
+	until clke_rt,meet
+	or_into 0x03,clke_bt
+	and_into 0x1fd,bt_clk
+page_scan_wait_fhs_restart:
+	bpatch patch06_6,mem_patch06
+	increase 1,N_tx_slot
+	call rx_radio_freq
+	call start_receiver
+	call wait_access_mhalfbnd
+	nbranch page_scan_wait_fhs_again,sync	/* go back if didn't find access code */
+	call scan_mode_whiten
+	call receive_packet_whitened
+	bmark1 mark_fhs_already_good,page_scan_reply_to_fhs
+page_scan_wait_fhs_again:
+	bpatch patch06_7,mem_patch06
+	fetch 1,mem_fhs_wait_counter
+	rtn blank
+	increase -1,pdata
+	store 1,mem_fhs_wait_counter
+	call rf_setup_time_master_slot	/* set up expiration time */
+	branch page_scan_wait_fhs_restart
+
+
+page_scan_reply_to_fhs:
+	bpatch patch07_0,mem_patch07
+	set0 1,clke_bt
+	set1 0,clke_bt
+	fetch 1,mem_pagescan_rcvfhscnt
+	increase 1,pdata
+	store 1,mem_pagescan_rcvfhscnt
+	call rf_setup_time_slave_slot
+	or_into 0x02,bt_clk
+	call tx_radio_freq
+	call start_transmitter
+	call start_tx_external
+	call send_access_word
+	call end_of_packet
+slave_apply_clke_bt:
+	compare 0x03,clke_bt,0x03
+	branch slave_apply_clke_bt_now,true
+	until null,mhalfbnd
+	branch slave_apply_clke_bt
+slave_apply_clke_bt_now:
+	fetch 4,mem_clke_bt
+	or_into 0x03,pdata
+	icopy clke_bt
+
+start_slave_connection:
+	bpatch patch07_1,mem_patch07
+	fetch 6,extm_lap
+	store 6,mem_plap
+	call prepare_newconn
+slave_newconn_loop:
+	call slave_newconn_once
+	branch sconn_successful,match     /* we were talked to */
+	call new_conn_timeout
+	nbranch slave_newconn_loop,blank
+	rtn
+
+	
+sconn_successful:
+	bpatch patch07_2,mem_patch07
+	call newconn_init
+	call context_new
+	nrtn zero
+	jam 0,mem_mode
+	call calc_clke_offset
+	branch context_save
+
+
+
+
+slave_dispatch:
+	bpatch patch07_3,mem_patch07
+	call calc_clke
+	call role_switch_slave
+	rtn user
+slave_loop:
+	bpatch patch07_4,mem_patch07
+	call scheduler_process
+	call slave_conn_recv_packet	/* go listen for a packet */
+	nbranch slave_notmatch,match
+	fetch 2,mem_cb_bt_slave_match
+	call callback_func
+	call supervision_flush
+	call scheduler_tx_l2cap_pkt
+	call prepare_tx
+	call slave_conn_send_packet
+	call parse_l2cap
+	call parse_lmp
+	fetch 1,mem_slave_rcvcnt
+	increase 1,pdata
+	store 1,mem_slave_rcvcnt
+	call calc_clke_offset
+slave_notmatch:
+	bpatch patch07_5,mem_patch07
+	call lpm_set_mult
+	call supervision_update
+	branch slave_disconnect,positive
+	call check_disconnect_timeout
+	nbranch slave_disconnect,user
+	call check_attempt
+	nbranch slave_loop,blank
+	rtn
+
+slave_disconnect:
+	bpatch patch07_6,mem_patch07
+	jam 0,mem_tester_emulate
+	jam 0,mem_debug_config
+	call quit_connection
+	set0 mark_testmode,mark
+	call test_enable_white
+	fetch 1,mem_state
+	rtn
+
+
+role_switch_slave:
+	call role_switch_check
+	nrtn user
+	copy am_addr,temp
+	call get_free_amaddr
+	store 1,mem_fhs_am_addr
+	copy temp,am_addr
+	jam param_newconnto,mem_newconnto_counter
+roles_sendfhs_loop:
+	bpatch patch07_7,mem_patch07
+	call rf_setup_time_master_slot
+	force type_fhs,type
+	call slave_send_access
+	deposit clkn_bt
+	store 4,mem_clkn_bt
+	call transmit_packet
+	call rf_setup_time_slave_slot
+	enable user3
+	call slave_receive_access
+	branch roles_got_fhs_reply,sync
+	call shutdown_radio
+	call new_conn_timeout
+	nbranch roles_sendfhs_loop,blank
+	rtnmark0 mark_accept_switch
+	jam LMP_SLOT_OFFSET,mem_lmo_opcode2
+	set1 mark_switch_initiated,mark
+	rtn
+roles_got_fhs_reply:
+	enable clknt
+	call prepare_newconn
+	call afh_clear
+roles_newconn_loop:
+	bpatch patch08_0,mem_patch08
+	call master_newconn_once
+	branch roles_newconn_responded,sync
+	call new_conn_timeout
+	nbranch roles_newconn_loop,blank
+	disable clknt
+	deposit clke_bt
+	store 4,mem_next_btclk
+	rtn
+roles_newconn_responded:
+	enable master
+	bmark0 mark_accept_switch,roles_newconn_nolmp
+	set0 mark_accept_switch,mark
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_HOST_CONNECTION_REQ,mem_lmi_opcode2
+	call tid_set_reply
+roles_newconn_nolmp:
+	deposit am_addr
+	store 1,mem_amaddr
+	force 0,pdata
+	store 6,mem_clk_offset
+	fetch 1,mem_mode
+	set1 mode_master,pdata
+	store 1,mem_mode
+	call supervision_flush
+	disable master
+	enable user
+	rtn
+
+	
+
+init_rx_packet_flags:
+	bpatch patch08_1,mem_patch08
+	disable match
+	set0 mark_loopback,mark
+	set0 mark_am_addr_broadcast,mark          /* initialize slave flags */
+	set0 mark_longpacket,mark
+	set0 mark_old_packet,mark
+	fetch 1,mem_arq    /* mem_arq + am_addr */
+	set0 arqnx,pdata
+	set1 flowx,pdata
+	store 1,mem_arq
+	rtn
+
+prepare_newconn:
+	bpatch patch08_2,mem_patch08
+	jam param_newconnto,mem_newconnto_counter
+	jam param_newconn_arq,mem_arq
+	fetch 2,mem_rx_window_init
+	store 2,mem_rx_window
+	deposit clkn_bt
+	store 4,mem_next_btclk
+	rtn clknt
+	deposit clke_bt
+	store 4,mem_next_btclk
+	rtn
+
+newconn_init:
+	bpatch patch08_3,mem_patch08
+	call init_lmp_reinit
+	call new_conn_handle
+	store 1,mem_conn_handle
+	setarg 0
+	store 2,mem_l2cap_rxbuff1_len
+	setarg param_supervision_to
+	store 2,mem_supervision_to
+	fetch 1,mem_state
+	set1 state_inconn,pdata
+	store 1,mem_state
+	jam 0,mem_op
+	jam 0,mem_state_map
+	jam 0,mem_lpm_current_mult
+	branch supervision_flush
+	
+
+clear_linkkey:
+	bpatch patch08_4,mem_patch08
+	force 0,pdata
+	store 8,mem_link_key
+	istore 8,contw
+	call clear_linkstate
+	branch context_traverse_linkkey
+	
+new_conn_timeout:
+	fetch 1,mem_newconnto_counter
+	increase -1,pdata
+	store 1,mem_newconnto_counter
+	rtn
+
+new_conn_handle:
+	fetch 1,mem_handle_num
+	increase 1,pdata
+	store 1,mem_handle_num
+	rtn
+
+
+quit_connection:
+	bpatch patch08_5,mem_patch08
+	fetch 1,mem_hci_cmd
+	beq hci_cmd_remote_name_req,quit_connection_name
+	fetch 1,mem_lmp_to_send
+	bne LMP_NAME_REQ,quit_connection_cont
+quit_connection_name:
+	call cmd_check_plap
+	nbranch quit_connection_cont,zero
+	call master_name_error
+	jam 0,mem_hci_cmd
+quit_connection_cont:
+	bpatch patch08_6,mem_patch08
+	call app_disconn_reason_collect_bt
+	call sniff_exit
+	jam BT_EVT_BB_DISCONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+	call init_lmp_work
+	call l2cap_init_work
+ifdef SIMPLE_PAIRING
+	call sp_clear_flags
+endif
+	fetch 1,mem_state
+	set0 state_inconn,pdata
+	store 1,mem_state
+	jam 0,memui_reconnect_mode
+
+	fetch 1,mem_state_map
+	compare 0x0,pdata,0xc0
+	branch quit_connection_not_clear_mark,true
+	set0 mark_rxbuf_inuse,mark
+quit_connection_not_clear_mark:
+	fetch 1,mem_arq
+	bbit0 wack,quit_connection_not_clear_tx
+quit_connection_not_clear_tx:
+	fetch 1,mem_op
+	rtnbit0 op_txl2cap
+	set0 mark_tx_l2cap,mark
+	rtn
+
+slave_newconn_once:
+	bpatch patch08_7,mem_patch08
+	fetch 1,extm_newconn_am_addr
+	rtn blank     
+	icopy am_addr
+	call slave_conn_recv_packet
+	nrtn match
+	force type_null,type
+	call slave_conn_send_packet
+	deposit am_addr
+	store 1,mem_amaddr                 /* now the new am_addr is official */
+	force 0,pdata
+	store 1,extm_newconn_am_addr
+	rtn
+
+
+/******************************************/
+/********  Time consuming task  ***********/
+/******************************************/
+prepare_tx:
+	bpatch patch09_0,mem_patch09
+	fetch 1,mem_state
+	bbit0 state_insco,prepare_tx_not_sco
+	force type_hv3,type
+	bmark0 mark_esco,prepare_tx_not_esco
+	call check_esco_amaddr
+	nbranch prepare_tx_not_sco,true
+	branch prepare_tx_not_sco,attempt	
+	call set_wait_ack					/* send esco only at the first attempt */
+	setarg 2		/* esco only has 1 retry */
+	store 2,mem_retransmission_cnt
+	rtn
+
+prepare_tx_not_esco:
+	nrtn attempt						/* send sco only at the first attempt */
+prepare_tx_not_sco:
+	bpatch patch09_1,mem_patch09
+	call context_check_all_wack			 //abandon mark_retransmit, use context_check_all_wack instead.
+	nbranch prepare_tx_no_retransmit,zero
+	fetch 1,mem_arq
+	bbit0 wack,prepare_tx_pollnull		/* other wack, tx buffer in use, but not me */
+prepare_tx_retransmit:
+	bmark1 mark_loopback,prepare_tx_loopback
+	fetch 1,mem_debug_config
+	bbit1 debug_tx_pattern,prepare_tx_txpat
+	fetch 2,mem_retransmission_cnt
+	increase -1,pdata
+	store 2,mem_retransmission_cnt
+	branch prepare_tx_nomore_retransmit,blank
+	fetch 1,mem_last_type
+	iforce type
+	rtn
+
+prepare_tx_nomore_retransmit:
+	bpatch patch09_2,mem_patch09
+	call clear_got_tx
+prepare_tx_no_retransmit:
+	call check_esco_amaddr
+	branch prepare_tx_pollnull,true
+	call send_lmp
+	branch prepare_tx_sendlmp,user
+	fetch 1,mem_op
+	bbit1 op_txl2cap,prepare_tx_sendl2cap
+	bmark1 mark_loopback,prepare_tx_loopback
+	fetch 1,mem_debug_config
+	bbit1 debug_tx_pattern,prepare_tx_txpat
+prepare_tx_pollnull:
+	force type_poll,type				/* POLL for master */
+	rtn master
+	force type_null,type				/* default is NULL */
+	rtn
+prepare_tx_loopback:
+	bpatch patch09_3,mem_patch09
+	fetch 1,mem_rx_type
+	iforce type
+	rtnne 1
+	force type_null,type
+	rtn
+prepare_tx_txpat:
+	fetch 1,test_mode_packet_type
+	and pdata,0xf,type
+	set1 mark_loopback,mark
+	rtn
+prepare_tx_sendlmp:
+	force type_lmp,type
+	call set_wait_ack
+prepare_tx_ccm_edr_lmp:
+	call check_enc_ccm
+	rtn blank		
+	jam 3,mem_llid
+	fetch 1,mem_lmo_header_length
+	and pdata,0x1f8,pdata
+	rshift3 pdata,pdata
+	store 2,mem_ccm_len
+	copy pdata,rega
+	arg mem_lmo_header_opcode,regc
+	branch ccm_br_enc_new	
+
+	
+prepare_tx_sendl2cap:
+	call tx_l2cap_type
+	call set_wait_ack
+prepare_tx_ccm_edr:
+	call check_enc_ccm
+	rtn blank		
+	fetch 1,mem_tx_lch
+	and_into 3,pdata
+	store 1,mem_llid
+	fetch 2,mem_tx_len
+	copy pdata,rega
+	store 2,mem_ccm_len
+	fetch 2,mem_txptr
+	copy pdata,regc
+	branch ccm_br_enc_new
+	
+	
+set_wait_ack:
+	bpatch patch09_4,mem_patch09
+	fetcht 1,mem_arq
+	set1 wack,temp
+	storet 1,mem_arq
+	deposit type
+	store 1,mem_last_type
+	setarg 0xffff
+	store 2,mem_retransmission_cnt
+	rtn
+
+tx_l2cap_type:
+	bpatch patch09_5,mem_patch09
+	fetch 1,mem_state_map
+	isolate1 smap_edr,pdata
+	fetch 2,mem_tx_len
+	branch tx_l2cap_type_edr,true
+	force type_dm1,type		/* DM1 */
+	sub pdata,17,null			
+	rtn positive
+	force type_dh1,type		/* DH1 */
+	sub pdata,27,null				
+	rtn positive
+	force type_dm3,type		/* DM3 */
+	sub pdata,121,null
+	rtn positive
+	force type_dh3,type		/* DH3 */
+	sub pdata,183,null
+	rtn positive	
+	force type_dm5,type		/* DM5 */
+	sub pdata,224,null
+	rtn positive
+	force type_dh5,type		/* DH5 */
+	rtn
+tx_l2cap_type_edr:
+	force type_dm1,type
+	sub pdata,17,null
+	rtn positive
+	force type_dh1,type		/*2-DH1*/
+	sub pdata,54,null
+	rtn positive
+	force type_dm3,type		/*2-DH3*/
+	arg 367,temp
+	isub temp,null
+	nrtn positive
+	force type_dm5,type		/*2-DH5*/
+	arg 679,temp
+	isub temp,null
+	nrtn positive
+	force type_dh5,type		/*3-DH5*/
+	rtn
+
+
+/******************************************/
+/***********  Receive Packet  *************/
+/******************************************/
+
+
+
+slave_receive_master_slot:
+	fetch 1,mem_state
+	bbit0 state_insniff,slave_receive_notsniff
+	fetch 2,mem_tsniff
+	branch slave_receive_notsniff,blank		/* role switch */
+	nbranch slave_receive_sniff,attempt
+slave_receive_notsniff:
+	call rf_setup_time_master_slot
+slave_receive_access:
+	add clke_bt,1,bt_clk
+slave_receive_sniff:
+	enable swfine
+	fetch 2,mem_rx_window
+	rshift pdata,pdata
+	fetcht 2,mem_param_pll_setup
+	iadd temp,pdata
+	call ahead_window
+	call fetch_extm_bt_adr
+	force 0x03,freq_mode          /* connection hop */
+	call rx_radio_freq
+	call init_rx_packet_flags
+	call prep_crypt
+	bpatch patch09_6,mem_patch09
+	fetch 2,mem_rx_window
+	rshift pdata,pdata
+	call ahead_window
+	call start_receiver
+	enable decode_fec0
+	fetch 2,mem_rx_window
+	fetcht 2,mem_param_clke_cal
+	iadd temp,stop_watch
+	correlate null,timeout
+	copy clke,temp
+	storet 6,mem_sync_clke
+	disable decode_fec0
+	nrtn sync
+	fetch 2,mem_param_clke_cal
+	copy pdata,clke_rt
+	copy bt_clk,clke_bt
+	branch lpm_adjust_clk,wake
+	rtn
+
+
+slave_conn_recv_packet:
+	bpatch patch09_7,mem_patch09
+	call slave_receive_master_slot
+	nbranch shutdown_radio,sync
+	call save_rssi
+	bmark0 mark_testmode,receive_packet
+	fetch 2,mem_tst_pktcnt_sync
+	increase 1,pdata
+	store 2,mem_tst_pktcnt_sync
+receive_packet:
+	call rf_debug_rx_sync_line	//L-H
+	rshift bt_clk,temp
+	or temp,0x40,white_init
+receive_packet_whitened:
+	bpatch patch0a_0,mem_patch0a
+	enable enable_white
+	enable enable_hec
+	enable decode_fec1
+	parse demod,bucket,3  /* get am_addr */
+	rshift8 pwindow,pdata
+	store 1,mem_temp_am_addr
+	parse demod,bucket,4  /* get type */
+	inject bucket,7       /* align up to pwindow */
+	copy pwindow,pdata
+	store 1,mem_rx_type
+	parse demod,bucket,3  /* get arq */
+	rshift8 pwindow,pdata
+	store 1,mem_temp_arq
+	fetch 1,mem_rx_type
+	sub pdata,3,null
+	branch receive_packet_noedr,positive
+	beq 7,receive_packet_noedr		/* esco packet */
+	fetch 1,mem_state_map
+	isolate1 smap_edr,pdata
+	setflag true,PSK,radio_ctrl
+receive_packet_noedr:
+	bpatch patch0a_1,mem_patch0a
+	parse demod,bucket,8   /* cycle thru hec */
+	disable decode_fec1
+	disable enable_hec   /* at this moment, 1 seqn + 8 hec is in shift */
+	branch error_header,crc_failed  /* if hec error, nothing is valid */
+	bmark0 mark_testmode,receive_packet_amchk
+	fetch 2,mem_tst_pktcnt_hec
+	increase 1,pdata
+	store 2,mem_tst_pktcnt_hec
+receive_packet_amchk:	
+	bpatch patch0a_2,mem_patch0a
+	fetch 1,mem_temp_am_addr
+	compare 0,pdata,0x07           /* check for broadcast */
+	setflag true,mark_am_addr_broadcast,mark   /* received a broadcast message, can fire ar_addr if during unpark_req */
+	branch am_addr_ok,true
+	icompare 0x07,am_addr
+	branch am_addr_match,true
+	bmark0 mark_esco,end_of_packet
+	fetch 1,mem_arq    /* mem_arq + am_addr */
+	set0 arqnx,pdata
+	set1 flowx,pdata
+	store 1,mem_arq
+am_addr_match:
+	call rf_debug_rx_match_line	//L
+	enable match
+am_addr_ok:
+	bpatch patch0a_3,mem_patch0a
+	fetch 1,mem_rx_type
+	icopy type
+	bmark1 mark_am_addr_broadcast,arqn_bypass        /* arqn doesn't make sense */
+	fetcht 1,mem_temp_arq
+	fetch 1,mem_arq
+	set0 flow,pdata
+	isolate1 flow,temp
+	setflag true,flow,pdata
+	isolate1 arqn,temp
+	setflag true,arqn,pdata
+	store 1,mem_arq
+	isolate0 arqn,temp
+	branch arqn_bypass,true
+	call clear_got_tx
+arqn_bypass:
+	bpatch patch0a_4,mem_patch0a
+	arg 0,temp
+	call reserve_slot
+	and type,0xf,pdata
+	beq type_poll,process_poll
+	beq type_null,end_of_packet	/* null */
+	beq type_fhs,process_fhs
+	fetcht 1,mem_temp_arq
+	fetch 1,mem_arq
+	icompare 0x04,temp    /* bit 2 is seqn */
+	nbranch rx_type_dispatch,true   /* different then it's new */
+	bmark0 mark_am_addr_broadcast,failed_seqn         /* seqn failed, and not broadcast */
+	bbit0 bcast1,rx_type_dispatch           /* first broadcast never fail seqn */
+failed_seqn:
+	set1 mark_old_packet,mark
+rx_type_dispatch:
+	bpatch patch0a_5,mem_patch0a
+	deposit type
+	beq type_dm1, process_dm1
+	beq type_dh1, process_dh1
+	beq type_3dh1, process_3dh1
+	arg 4,temp
+	call reserve_slot
+	beq type_dm3, process_dm3
+	beq type_dh3, process_dh3
+	arg 8,temp
+	call reserve_slot
+	beq type_dm5, process_dm5
+	beq type_dh5, process_dh5
+	rtn
+
+
+
+
+process_poll:
+	branch end_of_packet
+
+process_dm3:
+process_dm5:
+	set1 mark_longpacket,mark
+process_dm1:
+	enable decode_fec2
+	branch process_dmh
+	
+process_dh3:
+process_dh5:
+	set1 mark_longpacket,mark
+process_3dh1:
+	set1 PSK3M,radio_ctrl
+process_dh1:
+	enable decode_fec0
+process_dmh:
+	bpatch patch0a_6,mem_patch0a
+	bmark1 mark_first_packet,end_of_packet
+	bmark1 mark_rxbuf_inuse,end_of_packet			/* buffer in use, nack */
+	isolate0 PSK,radio_ctrl
+	branch process_dmh_noedr,true
+	disable enable_white
+	enable decode_fec0
+	disable decode_fec2
+	add clkn_bt,2,timeup
+	correlate clkn_bt,meet
+	nbranch error_payload,sync
+	set1 mark_longpacket,mark
+	enable enable_white
+process_dmh_noedr:
+	bpatch patch0a_7,mem_patch0a
+	enable encrypt
+	enable enable_crc
+	parse demod,bucket,3  /* parse in lch+l2cap flow */
+	rshift8 pwindow,pdata
+	store 1,mem_lch_code		/* for loopback */
+	parse demod,bucket,5  /* parse in 5 bit packetlength */
+	bmark1 mark_longpacket,process_dmh_long
+	rshift3 pwindow,loopcnt
+	rshift3 loopcnt,loopcnt
+	branch process_dmh_common
+process_dmh_long:
+	parse demod,bucket,5		/* multi slot packet length of dh3 dh5 dm3 dm5 */
+	rshift pwindow,loopcnt
+	parse demod,bucket,3  /* undefined+bit 9 of length */
+process_dmh_common:	
+	bpatch patch0b_0,mem_patch0b
+	deposit loopcnt
+	store 2,mem_len
+	branch process_dmh_data_0,blank
+	call check_enc_ccm
+	branch process_dmh_common2,blank
+process_dmh_common2_ccm:
+	increase 4,loopcnt
+	deposit loopcnt
+process_dmh_common2:	
+	isub mask3ff,null
+	branch error_payload,positive	/* packet too large, discard */
+	bpatch patch0b_1,mem_patch0b
+	set0 mark_fhs_eir,mark
+	fetch 1,mem_lch_code
+	and_into 0x03,pdata
+	arg mem_rxbuf,contw //lmp_data or test packet
+	beq LLID_LMP,process_lmp
+	bmark1 mark_testmode,process_dmh_common2_testmode
+	//non-HCI mode
+	fetch 1,mem_lch_code
+	and_into 0x03,pdata
+	beq LLID_L2CAP_START,process_dmh_data_l2cap_start_pkt
+	beq LLID_L2CAP_CONT,process_dmh_data_l2cap_continue_pkt
+	branch error_payload
+	
+process_dmh_common2_testmode:	
+	arg mem_l2cap_rxbuff1,contw
+	branch process_dmh_data	
+
+process_dmh_data_0:
+	call check_enc_ccm
+	branch process_dmh_data_end,blank
+	setarg 0
+	store 2,mem_ccm_len
+	parse demod,bucket,32
+	rshift32 pdata,pdata
+	rshift8 pdata,pdata
+	store 4,mem_le_peer_mic
+	branch process_dmh_data_end
+	
+//blank not enc_ccm
+check_enc_ccm:
+	fetch 1,mem_state_map
+	bbit0 smap_encryption,enable_blank
+	fetch 1,mem_encapsulated_minor_type
+	bne ENCAPSULATED_MINOR_TYPE_P256,enable_blank
+	branch disable_blank
+	
+process_lmp:
+	fetch 2,mem_len
+	sub pdata,17,null		//lmp buffer size
+	nbranch error_payload,positive
+	bmark1 mark_old_packet,ack_payload
+	branch process_dmh_data
+
+	
+process_dmh_data_l2cap_start_pkt:
+	bpatch patch0b_2,mem_patch0b
+	bmark1 mark_old_packet,ack_payload
+	fetch 2,mem_len
+	arg 0x2e0,temp //l2cap buffer size
+	isub temp,null
+	branch error_payload,positive
+	fetch 1,mem_l2cap_rxbuff_inuse
+	bbit0 L2CAP_INUSE_BUFF1,process_dmh_data_into_buff1
+	bbit0 L2CAP_INUSE_BUFF2,process_dmh_data_into_buff2
+	branch end_of_packet
+process_dmh_data_into_buff1:
+	jam 1,mem_l2cap_rxbuff_new //new data in buff 1
+	fetch 2,mem_l2cap_rxbuff1_len
+	bne 0,end_of_packet			//baseband head error
+	arg mem_l2cap_rxbuff1,contw
+	branch process_dmh_data
+process_dmh_data_into_buff2:
+	jam 2,mem_l2cap_rxbuff_new //new data in buff 2
+	fetch 2,mem_l2cap_rxbuff2_len
+	bne 0,end_of_packet
+	arg mem_l2cap_rxbuff2,contw
+	branch process_dmh_data
+	
+process_dmh_data_l2cap_continue_pkt:
+	bpatch patch0b_3,mem_patch0b
+	bmark1 mark_old_packet,ack_payload
+	fetch 2,mem_len
+	arg 0x2e0,temp //l2cap buffer size
+	isub temp,null
+	branch error_payload,positive
+	fetch 1,mem_l2cap_rxbuff_new
+	beq 1,process_dmh_data_l2cap_continue_pkt1
+	beq 2,process_dmh_data_l2cap_continue_pkt2
+	branch end_of_packet
+process_dmh_data_l2cap_continue_pkt1:
+	arg mem_l2cap_rxbuff1,contw
+	fetch 2,mem_l2cap_rxbuff1_len
+	iadd contw,contw
+	branch process_dmh_data
+process_dmh_data_l2cap_continue_pkt2:
+	arg mem_l2cap_rxbuff2,contw
+	fetch 2,mem_l2cap_rxbuff2_len
+	iadd contw,contw
+process_dmh_data:	
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	istore 1,contw
+	loop process_dmh_data
+process_dmh_data_end:	
+	bpatch patch0b_4,mem_patch0b
+	parse demod,bucket,16  /* cycle through the crc */
+	branch error_payload_crc,crc_failed
+	call check_enc_ccm
+	call enable_user2
+	ncall ccm_br_decrypt_new,blank
+	nbranch error_mic_error,user2
+	call rf_debug_rx_crc_line	//L
+
+	fetch 1,mem_l2cap_flow_ctrl_flag
+	beq L2CAP_FLOW_CTRL_ENABLE,flow_ctrl
+
+	bmark1 mark_testmode,process_dmh_cont
+	bmark1 mark_old_packet,redundant_payload
+	fetch 1,mem_lch_code
+	compare 3,pdata,3
+	branch process_dmh_cont,true
+	fetch 2,mem_len
+	branch process_dmh_cont,blank
+	bpatch patch0b_5,mem_patch0b
+	fetch 1,mem_l2cap_rxbuff_new
+	beq 1,process_l2cap_pass_crc_buff1
+	beq 2,process_l2cap_pass_crc_buff2
+	branch assert
+process_l2cap_pass_crc_buff1:
+	fetch 2,mem_l2cap_rxbuff1_len
+	fetcht 2,mem_len
+	iadd temp,pdata
+	store 2,mem_l2cap_rxbuff1_len
+	rtn blank
+	fetcht 2,mem_l2cap_rxbuff1// l2cap payload length
+	increase 4,temp
+	isub temp,null
+	call l2cap_buff1_inuse,zero //l2cap pkts not ended
+	branch process_dmh_cont
+process_l2cap_pass_crc_buff2:
+	fetch 2,mem_l2cap_rxbuff2_len
+	fetcht 2,mem_len
+	iadd temp,pdata
+	store 2,mem_l2cap_rxbuff2_len
+	rtn blank
+	fetcht 2,mem_l2cap_rxbuff2// l2cap payload length 
+	add temp,4,temp
+	isub temp,null
+	call l2cap_buff2_inuse,zero //l2cap pkts not ended
+//	branch process_dmh_cont
+process_dmh_cont:
+	bpatch patch0b_6,mem_patch0b
+	fetcht 1,mem_state_map
+	fetch 1,mem_lch_code
+	compare 3,pdata,0x03
+	setflag true,smap_rxlmp,temp
+	nsetflag true,smap_rxl2cap,temp
+	storet 1,mem_state_map
+	nbranch process_dmh_cont_rxbuf_not_use,true
+	set1 mark_rxbuf_inuse,mark
+process_dmh_cont_rxbuf_not_use:
+	bmark0 mark_testmode,ack_payload
+	isolate1 smap_rxlmp,temp
+	branch ack_payload,true
+	fetch 2,mem_tst_pktcnt_crc
+	increase 1,pdata
+	store 2,mem_tst_pktcnt_crc
+	set1 mark_loopback,mark
+	set0 smap_rxl2cap,temp
+	set0 mark_rxbuf_inuse,mark
+	storet 1,mem_state_map
+ack_payload:
+	bpatch patch0b_7,mem_patch0b
+	call check_enc_ccm
+	ncall ccm_br_pcnt_rx_add,blank
+	fetcht 1,mem_temp_arq
+	fetch 1,mem_arq
+	set1 arqnx,pdata
+	isolate1 seqn,temp            /* if accept, seqn always copies from the header */
+	setflag true,seqn,pdata
+	isolate1 mark_am_addr_broadcast,mark
+	setflag true,bcast1,pdata
+	store 1,mem_arq
+	fetch 2,mem_len
+	nbranch end_of_packet,blank
+	fetch 1,mem_state_map
+	set0 smap_rxl2cap,pdata//better to do this in l2cap_flow_ctrl_stop
+	store 1,mem_state_map
+	fetch 1,mem_lch_code
+	compare 0x01,pdata,0x07
+	//call l2cap_flow_ctrl_stop,true
+	branch end_of_packet
+	
+error_header:
+	bpatch patch0c_0,mem_patch0c
+	disable match
+	fetch 2,mem_rx_hec_err
+	increase 1,pdata
+	store 2,mem_rx_hec_err
+	branch end_of_packet
+error_payload_crc:
+	fetch 2,mem_rx_crc_err
+	increase 1,pdata
+	store 2,mem_rx_crc_err
+	call discard_pkt
+	bmark0 mark_testmode,error_payload
+	set1 mark_loopback,mark
+error_payload:
+	branch end_of_packet
+
+flow_ctrl:
+error_mic_error:
+	branch error_payload_crc
+
+	
+discard_pkt:
+	bpatch patch0c_1,mem_patch0c
+	fetch 1,mem_lch_code
+	compare 3,pdata,0x03
+	nbranch discard_pkt_l2cap,true
+discard_pkt_lmp:	
+	fetcht 1,mem_state_map
+	set0 smap_rxlmp,temp
+	storet 1,mem_state_map
+	rtn
+discard_pkt_l2cap:
+//	isolate1 mark_testmode,mark
+//	setflag true,mark_loopback,mark
+	fetcht 1,mem_state_map
+	set0 smap_rxl2cap,temp
+	storet 1,mem_state_map
+	rtn
+
+redundant_payload:
+	fetch 1,mem_arq
+	set1 arqnx,pdata
+	store 1,mem_arq
+end_of_packet:
+	bpatch patch0c_2,mem_patch0c
+	disable encode_fec0
+	disable encode_fec2
+	disable decode_fec0
+	disable decode_fec2
+	disable enable_crc
+	disable encrypt
+	disable enable_white
+	branch shutdown_radio,is_rx
+	until null,tx_clear
+	nop 100          /* flush out the last bit */
+	branch shutdown_radio
+	
+process_fhs:
+	bpatch patch0c_3,mem_patch0c
+	enable enable_crc
+	enable decode_fec2
+	parse demod,bucket,72
+	isolate1 58,pdata
+	setflag true,mark_fhs_eir,mark
+	copy bt_adr,temp             /* save current address to aside */
+	ialigned bt_adr            /* send it to access gen */
+	ialigned fhs0			/* get fhs_misc */
+	pulse recalc                /* calc the lap just received from the other guy */
+	setsect 2,0xfffff             /* preset ms of shift reg as big mask */
+	setsect 3,0x0ffff             /* preset ms of shift reg as big mask */
+	nop 32                       /* 30 cycles after recalc */
+	iverify fhs_parity             /* check fhs_parity against ls 34 bits at shift reg, with msb 36 bits as mask */
+	deposit lap
+	store 3,extm_lap
+	deposit uap
+	store 1,extm_uap
+	copy temp,bt_adr             /* put the address back */
+	branch fhs_parity_ok,true     /* fhs parity failed */
+	branch error_payload
+fhs_parity_ok:
+	bpatch patch0c_4,mem_patch0c
+	parse demod,bucket,72
+	ialigned fhs1                   /* give host the information on class and fhs_misc */
+	ialigned am_addr                /* store the am_addr the master assigned us */
+	ialigned nap
+	ialigned regb                   /* store external clock in regb according to clock format */
+	force 0,pdata
+	parse demod,bucket,16  /* cycle through the crc */
+	branch error_payload,crc_failed
+	call rf_debug_rx_crc_line	//L
+	setarg 0x0ffffffc
+	iand regb,pdata
+	store 4,mem_clke_bt
+	deposit fhs_class
+	store 3,extm_class
+	deposit fhs_misc
+	store 1,extm_fhs_misc
+	deposit am_addr
+	store 1,extm_newconn_am_addr
+	deposit nap
+	store 2,extm_nap
+	deposit bt_clk
+	inject rxf,32
+	compare type_fhs,type,0x0f         /* see if this was fhs packet */
+	setflag true,mark_fhs_already_good,mark
+	branch end_of_packet
+
+clear_got_tx:
+	bpatch patch0c_5,mem_patch0c
+	fetch 1,mem_arq
+	rtnbit0 wack
+	set0 wack,pdata
+	setflip seqnx,pdata
+	store 1,mem_arq
+	call check_enc_ccm
+	ncall ccm_br_pcnt_tx_add,blank
+	fetch 1,mem_last_type
+	beq type_lmp,clear_got_txlmp
+	rtneq type_hv3
+	fetch 1,mem_op
+	rtnbit0 op_txl2cap,pdata
+	set0 op_txl2cap,pdata
+	set1 op_pkt_comp,pdata
+	store 1,mem_op
+	set0 mark_tx_l2cap,mark
+	fetch 2,mem_l2cap_tx_multi_offset
+	nrtn blank
+	fetch 1,mem_op
+	set0 op_pkt_comp,pdata
+	store 1,mem_op
+	branch l2cap_malloc_free
+
+clear_got_txlmp:
+	bpatch patch0c_6,mem_patch0c
+	fetch 1,mem_lmo_header_opcode_x
+	rshift pdata,pdata
+	beq LMP_START_ENCRYPTION_REQ,start_encryption
+	beq LMP_STOP_ENCRYPTION_REQ,stop_encryption
+	beq LMP_UNSNIFF_REQ, sniff_exit
+	beq LMP_ESCAPE,clear_lmp_escape
+	rtnne LMP_ACCEPTED
+	fetch 1,mem_lmo_payload
+	beq LMP_START_ENCRYPTION_REQ,clear_send_setup_complete
+	rtn
+
+clear_lmp_escape:
+	fetch 1,mem_lmo_payload
+	set1 7,pdata
+	rtn
+clear_send_setup_complete:
+	rtn master
+	fetch 1,mem_state
+	rtnbit1 state_conn_comp
+	jam LMP_SETUP_COMPLETE,mem_lmo_opcode2
+	rtn
+	
+	
+start_encryption:
+	bpatch patch0c_7,mem_patch0c
+	fetch 1,mem_state_map
+	set1 smap_encryption,pdata
+	store 1,mem_state_map
+	jam 1,core_encrypt
+	force 0,pdata
+	store 5,mem_ccm_pcnt_rx
+	set1 BR_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_tx	
+	rtn	
+
+stop_encryption:
+	bpatch patch0d_0,mem_patch0d
+	fetch 1,mem_state_map
+	set0 smap_encryption,pdata
+	store 1,mem_state_map
+	jam 0,core_encrypt
+	rtn
+
+
+sniff_init:
+	bpatch patch0d_1,mem_patch0d
+	add clkn_bt,3,rega
+	branch sniff_init_master,master
+	add clke_bt,3,rega
+sniff_init_master:
+	fetcht 2,mem_tsniff
+	deposit rega
+	set0 27,pdata
+	idiv temp
+	fetch 2,mem_dsniff
+	call wait_div_end
+	remainder regc
+	isub regc,pdata
+	branch sniff_init_nowrap,positive
+	iadd temp,pdata
+sniff_init_nowrap:
+	iadd rega,pdata
+	store 4,mem_sniff_anchor
+	jam SWITCH_FLAG_INIT,mem_switch_flag
+	fetch 1,mem_state
+	set1 state_insniff,pdata
+	store 1,mem_state
+	fetch 1,mem_sniff_attempt
+	store 1,mem_current_sniff_attempt
+	setarg 0
+	store 3,mem_sniff_rcv
+	store 3,mem_sniff_lost
+	store 1,mem_sniff_unint_lost
+	jam BT_EVT_ENTER_SNIFF,mem_fifo_temp
+	call ui_ipc_send_event
+	fetch 2,mem_rx_window_sniff
+	store 2,mem_rx_window
+	nrtn master
+	add am_addr,-1,queue
+	rtn
+
+sniff_exit:
+	bpatch patch0d_2,mem_patch0d
+	fetch 1,mem_state
+	rtnbit0 state_insniff
+	set0 state_insniff,pdata
+	store 1,mem_state
+	fetch 2,mem_rx_window_init
+	store 2,mem_rx_window
+	disable wake
+	jam BT_EVT_EXIT_SNIFF,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+check_attempt:
+	bpatch patch0d_3,mem_patch0d
+	enable attempt
+	fetch 1,mem_state
+	bbit1 state_insniff,check_attempt_sniff
+	rtnmark1 mark_testmode						/* pdata won't be blank now, try attempt */
+	fetch 1,mem_arq
+	rtnbit1 wack
+	fetch 1,mem_lmp_to_send
+	nrtn blank
+	fetch 1,mem_op
+	rtnbit1 op_txl2cap
+check_attempt_nomore:
+	force 0,pdata
+	rtn
+
+check_attempt_sniff:
+	bbit0 state_insco,check_attempt_not_sco
+	fetch 1,mem_current_sniff_attempt
+	beq 2,check_attempt_sniff_restore_sco
+	fetch 1,mem_arq
+	bbit1 wack,check_attempt_notimeout
+	bmark0 mark_esco_rxok,check_attempt_notimeout
+check_attempt_sniff_restore_sco:
+	nbranch check_attempt_notimeout,master
+	fetch 1,mem_lmp_to_send
+	nbranch check_attempt_notimeout,blank
+check_attempt_sco_master:
+	branch check_attempt_nomore
+
+
+
+
+
+	
+check_attempt_not_sco:
+	fetch 1,mem_current_sniff_attempt
+	bne 1,check_attempt_notimeout
+	fetch 1,mem_current_sniff_timeout
+	branch check_attempt_notimeout,blank
+	increase -1,pdata
+	store 1,mem_current_sniff_timeout
+	fetch 1,mem_arq
+	rtnbit1 wack						// waiting for next ack
+	nrtn match						// waiting for next poll
+check_attempt_notimeout:
+	fetch 1,mem_current_sniff_attempt
+	increase -1,pdata
+	store 1,mem_current_sniff_attempt
+	rtn
+
+
+
+
+
+
+
+
+
+	/* enable user if sniff window vialation, queue is extra overhead */
+sniff_check_window:
+	bpatch patch0d_4,mem_patch0d
+	disable swfine
+	copy temp,stop_watch
+	call context_search_sniff_window
+	disable user
+	nrtn zero
+	force 0,stop_watch
+	enable user
+	rtn
+
+	//return true if it is esco context
+check_esco_amaddr:
+	fetch 1,mem_esco_addr
+	icompare 0xff,am_addr
+	rtn
+	
+
+parse_l2cap:	
+	bpatch patch0d_5,mem_patch0d
+	set0 mark_rxbuf_inuse,mark 
+parse_l2cap_cont:
+	jam L2CAP_RX_CLEAR,mem_l2cap_rx_done
+	fetch 1,mem_l2cap_rxbuff_inuse
+	rtn blank
+	isolate1 L2CAP_INUSE_BUFF1,pdata
+	arg mem_l2cap_rxbuff1,contr
+	call process_rx_l2cap_pkt,true
+	bpatch patch0d_6,mem_patch0d
+	fetch 1,mem_l2cap_rx_done
+	beq L2CAP_RX_DONE,parse_l2cap_release_buff1
+	
+	jam L2CAP_RX_CLEAR,mem_l2cap_rx_done
+	fetch 1,mem_l2cap_rxbuff_inuse
+	rtnbit0 L2CAP_INUSE_BUFF2
+	arg mem_l2cap_rxbuff2,contr	
+	call process_rx_l2cap_pkt
+	fetch 1,mem_l2cap_rx_done
+	beq L2CAP_RX_DONE,parse_l2cap_release_buff2
+	rtn
+		
+parse_l2cap_release_buff1:
+	fetch 1,mem_l2cap_rxbuff_inuse
+	set0 L2CAP_INUSE_BUFF1,pdata
+	store 1,mem_l2cap_rxbuff_inuse
+	setarg 0
+	store 2,mem_l2cap_rxbuff1_len
+	rtn
+parse_l2cap_release_buff2:
+	fetch 1,mem_l2cap_rxbuff_inuse
+	set0 L2CAP_INUSE_BUFF2,pdata
+	store 1,mem_l2cap_rxbuff_inuse
+	setarg 0
+	store 2,mem_l2cap_rxbuff2_len
+	rtn
+
+l2cap_buff1_inuse:
+	fetch 1,mem_l2cap_rxbuff_inuse
+	set1 L2CAP_INUSE_BUFF1,pdata
+	store 1,mem_l2cap_rxbuff_inuse
+	rtn
+
+l2cap_buff2_inuse:
+	fetch 1,mem_l2cap_rxbuff_inuse
+	set1 L2CAP_INUSE_BUFF2,pdata
+	store 1,mem_l2cap_rxbuff_inuse
+	rtn
+
+/******************************************/
+/**********  Transmit Packet  *************/
+/******************************************/
+
+slave_send_access:
+	bpatch patch0d_7,mem_patch0d
+	add clke_bt,1,bt_clk          /* slave start to use native clock */
+	call fetch_extm_bt_adr
+	force 0x03,freq_mode          /* connection frequency */
+	call tx_radio_freq
+	call start_transmitter
+	call start_tx_external
+	branch send_access_word
+	
+
+slave_conn_send_packet:
+	bpatch patch0e_0,mem_patch0e
+	call rf_setup_time_slave_slot
+	deposit clke_bt
+	fetcht 4,mem_next_btclk
+	isub temp,pdata
+	rtnne 1					/* missed slave slot */
+	compare type_null,type,0x1f
+	nbranch slave_conn_send_access,true
+	fetch 1,mem_rx_type
+	rtn blank					/* null packet, do nothing */
+slave_conn_send_access:
+	call slave_send_access
+transmit_packet:
+	compare type_id,type,0x1f        /* is this id only ? */
+	branch end_of_packet,true
+	rshift bt_clk,temp
+	or temp,0x40,white_init
+transmit_packet_whitened:
+	bpatch patch0e_1,mem_patch0e
+	enable enable_white
+	enable enable_hec
+	enable encode_fec1
+	set0 mark_longpacket,mark
+	deposit am_addr
+	inject mod,3             /* am_addr, temp is disabled */
+	deposit type
+	inject mod,4
+	fetch 1,mem_arq   /* aka mem_arq */
+	inject bucket,4  /* align up to flowx, arqnx, seqnx */
+	inject mod,3
+	enable enable_parity
+	inject mod,8   /* transmit parity */
+	disable encode_fec1
+	disable enable_parity
+	disable enable_hec
+	set0 PSK3M,radio_ctrl
+	arg 0,temp
+	call reserve_slot
+	bpatch patch0e_2,mem_patch0e
+	and type,0x1f,pdata
+	beq type_lmp, transmit_lmp
+	beq type_null, end_of_packet
+	beq type_poll, end_of_packet
+	beq type_fhs, transmit_fhs  /* master mode fhs need got_tx and ack */
+	beq type_dm1, transmit_dm1
+	beq type_dh1, transmit_dh1
+	beq type_3dh1, transmit_3dh1
+	arg 4,temp
+	call reserve_slot
+	beq type_dm3, transmit_dm3
+	beq type_dh3, transmit_dh3
+	arg 8,temp
+	call reserve_slot
+	beq type_dh5, transmit_dh5
+	branch transmit_dm5	/* must be 14, dm5 */
+
+
+	
+transmit_fhs:
+	bpatch patch0e_3,mem_patch0e
+	fetch 1,mem_fhs_am_addr            /* this is the am_addr to assign to slave */
+	icopy am_addr
+	fetch 1,mem_fhs_misc
+	icopy fhs_misc    /* [7:6]SR [5:4]SP [3:1]PS [0]undef  */
+	fetch 3,mem_class   /* store away class */
+	icopy fhs_class
+	fetch 2,mem_nap
+	icopy nap
+	enable enable_crc
+	enable encode_fec2
+	copy bt_adr,rega
+	call fetch_self_bt_adr
+	pulse recalc
+	nop 32                    /* 30 cycles after recalc for sync word generation */
+	copy bt_clk,timeup
+	fetch 4,mem_clkn_bt
+	icopy bt_clk
+	preload fhs0
+	set1 58,pdata		/* eir */
+	inject mod,72
+	preload fhs1
+	inject mod,72
+	copy timeup,bt_clk
+	copy rega,bt_adr
+	enable enable_parity
+	inject mod,16   /* generate CRC */
+	disable enable_parity
+	branch end_of_packet
+
+transmit_lmp_ccm:
+	disable encrypt
+	branch transmit_lmp_common
+	
+transmit_lmp:
+	bpatch patch0e_4,mem_patch0e
+	call check_enc_ccm
+	nbranch transmit_lmp_ccm,blank
+	enable encrypt
+transmit_lmp_common:
+	enable enable_crc
+	enable encode_fec2
+	fetch 1,mem_lmo_header_length   /* this is the payload header */
+	and pdata,0x1f8,temp       /* temp is number of bits, check payload header format */
+	arg mem_lmo_header_length,contr
+	increase 8,temp   /* temp is in bits */
+	rshift3 temp,loopcnt
+transmit_lmp_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop  transmit_lmp_loop
+	branch transmit_end
+
+
+transmit_dm1:
+	enable encode_fec2
+	branch transmit_dmh
+transmit_dm3:
+transmit_dm5:
+	enable encode_fec2
+	set1 mark_longpacket,mark
+	branch transmit_dmh
+
+transmit_3dh1:
+	set1 PSK3M,radio_ctrl
+transmit_dh1:
+	enable encode_fec0
+	branch transmit_dmh
+	
+transmit_dh3:
+transmit_dh5:
+	set1 PSK3M,radio_ctrl
+	enable encode_fec0
+	set1 mark_longpacket,mark
+
+transmit_dmh:
+	bpatch patch0e_5,mem_patch0e
+	fetch 1,mem_state_map
+	bbit0 smap_edr,transmit_noedr
+	sub type,3,null
+	branch transmit_noedr,positive
+	disable encrypt
+	disable encode_fec2
+	enable encode_fec0
+	disable enable_white
+	set1 PSK,radio_ctrl
+	isolate1 PSK3M,radio_ctrl
+	branch transmit_edr3m,true
+	setarg 0xabeee
+	inject mod,20
+	branch transmit_edr_sync_end
+transmit_edr3m:
+	setarg 0x5faeba
+	inject mod,24
+	setarg 0x12
+	inject mod,6
+transmit_edr_sync_end:	
+	enable enable_white
+	set1 mark_longpacket,mark
+transmit_noedr:
+	enable encrypt
+	enable enable_crc
+	bmark1 mark_loopback,transmit_loopback
+	fetch 1,mem_tx_lch
+	inject mod,3
+	fetch 2,mem_tx_len
+	iforce loopcnt
+	bmark1 mark_longpacket,transmit_long
+	inject mod,5
+	branch transmit_stuff
+transmit_long:	
+	inject mod,13
+transmit_stuff:
+	deposit loopcnt
+	branch transmit_end,blank
+	fetch 2,mem_txptr
+	iforce contr
+transmit_stuff_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop transmit_stuff_loop
+//	branch transmit_end
+
+transmit_end:
+	bpatch patch0e_6,mem_patch0e
+	call check_enc_ccm
+	branch transmit_end2,blank
+	fetch 4,mem_le_mic  
+	inject mod,32
+transmit_end2:	
+	enable enable_parity
+	inject mod,16
+	disable enable_parity
+	call set_wait_ack
+	fetch 1,mem_state_map
+	bbit0 smap_edr,end_of_packet
+	force 0,pdata
+	inject mod,6				/* edr trailer */
+	branch end_of_packet
+
+
+transmit_loopback:
+	bpatch patch0e_7,mem_patch0e
+	bmark1 mark_longpacket,transmit_loopback_long
+transmit_loopback_short:
+	fetch 1,mem_lch_code
+	inject mod,3						/* LLID and FLOW */
+	fetch 1,mem_len	/* take packet length */
+	iforce regc
+	inject mod,5
+	branch transmit_loopback_cont
+transmit_loopback_long:
+	fetch 1,mem_lch_code
+	inject mod,3						/* LLID and FLOW */
+	fetch 2,mem_len	/* take packet length */
+	iforce regc
+	inject mod,13
+transmit_loopback_cont:
+	arg mem_l2cap_rxbuff1,contr
+transmit_loopback_loop:	
+	copy regc,null
+	branch transmit_loopback_end,zero
+	ifetch 1,contr
+	inject mod,8
+	increase -1,regc
+	branch transmit_loopback_loop
+transmit_loopback_end:
+	fetch 2,mem_tst_pktcnt_dmh
+	increase 1,pdata
+	store 2,mem_tst_pktcnt_dmh
+	branch transmit_end
+	
+
+apply_switch_clke:
+	fetch 4,mem_clke_bt
+	add pdata,7,rega
+	fetch 2,mem_slot_offset
+	nbranch apply_switch_nozero,blank
+	increase -3,rega
+	branch apply_switch_wait_loop
+apply_switch_nozero:
+	mul32 pdata,12,pdata
+	fetcht 2,core_halfslot
+	increase 1,temp
+apply_switch_loop:
+	isub temp,pdata
+	nbranch apply_switch_bt,positive
+	increase -1,rega
+	branch apply_switch_loop
+apply_switch_bt:
+	sub pdata,0,pdata
+apply_switch_wait_loop:
+	until null,oneslot
+	compare 0,clkn_bt,3
+	nbranch apply_switch_wait_loop,true
+	iforce clke_rt
+	copy rega,clke_bt
+	iforce clke_rt
+	rtn
+	
+
+calc_slot_offset:
+	bpatch patch0f_0,mem_patch0f
+	until null,halfslot
+	deposit clke
+	iforce contr
+	rshift16,pdata,pdata
+	isub clkn_bt,loopcnt
+	and_into 3,loopcnt			/* bt portion */
+	nbranch calc_bt_portion,zero
+	force 0,pdata
+	branch calc_skip_bt
+calc_bt_portion:
+	fetcht 2,mem_param_rt_rthalfslot
+	force 0,pdata
+calc_slot_offset_loop:
+	iadd temp,pdata
+	loop calc_slot_offset_loop
+calc_skip_bt:
+	iadd contr,pdata			/* add rt portion */
+	div pdata,12
+	call get_div_result
+	store 2,mem_slot_offset
+	rtn
+
+calc_clke_offset:
+	bpatch patch0f_1,mem_patch0f
+	deposit clke
+	copy clkn,temp
+	isub temp,null
+	nsetflag positive,44,pdata
+	isub temp,temp
+	fetch 2,mem_param_rt_rthalfslot
+	isolate0 15,temp
+	branch calc_clke_pos,true
+	copy temp,alarm
+	arg 0x10000,temp
+	fetch 2,mem_param_rt_rthalfslot
+	isub temp,pdata
+	iadd alarm,temp
+	
+calc_clke_pos:
+	storet 6,mem_le_clk_offset
+	rtn le
+	storet 6,mem_clk_offset
+	rtn
+
+calc_clke:
+	disable clknt
+	fetch 6,mem_le_clk_offset
+	branch calc_clke2,le
+	fetch 6,mem_clk_offset
+calc_clke2:
+	iadd clkn,alarm
+	increase 10,alarm
+	fetch 2,mem_param_rt_rthalfslot
+	isub alarm,pdata
+	isolate0 15,pdata
+	branch calc_clke_pos_adj,true
+	setarg 0x10000
+	fetchr regd,2,mem_param_rt_rthalfslot
+	isub regd,pdata
+	iadd alarm,alarm
+calc_clke_pos2:
+	copy alarm,clke
+	rtn
+calc_clke_pos_adj:		/* add 2 clock */
+	force 0,null
+	branch calc_clke_pos2
+	
+/******************************************/
+/********* RF related functions ***********/
+/******************************************/
+
+calc_mod_value_scale:
+	branch calc_mod_value_scale_le2,le
+	setarg 0x402c17
+	store 3,mem_scale_ratio
+	rshift16 access,pdata
+	rshift3 pdata,temp
+	arg 48,loopcnt
+calc_mod_value_scale_do:
+	setarg 0
+	store 3,mem_xcnt
+calc_mod_vs_loop:
+	rshift temp,pdata
+	ixor temp,pdata
+	and_into 3,pdata
+	bbit0 1,calc_mod_vs01
+	pincrease -1
+calc_mod_vs01:
+	arg mem_xcnt,contw
+	iadd contw,contw
+	ifetch 1,contw
+	pincrease 1
+	istore 1,contw
+	rshift temp,temp
+	loop calc_mod_vs_loop
+	arg mem_xcnt+2,rega
+	arg mem_scale_ratio,regb
+	arg 0,regc
+	arg 3,loopcnt
+calc_mod_vs_loop2:
+	ifetch 1,rega
+	ifetcht 1,regb
+	imul32 temp,pdata
+	iadd regc,regc
+	increase -1,rega
+	increase 1,regb
+	loop calc_mod_vs_loop2
+	fetch 1,mem_scale_ratio+1
+	lshift8 pdata,pdata
+	lshift4 pdata,pdata
+	idiv regc
+	call wait_div_end
+	quotient pdata
+	store 2,mod_value_scale1
+	store 2,mem_scale_ratio_temp
+	rtn
+
+calc_mod_value_scale_le2:
+	fetch 2,mem_scale_ratio_temp
+	store 2,mod_value_scale1
+	rtn
+
+calc_mod_value_scale_le:
+	setarg 0x402d19
+	store 3,mem_scale_ratio
+	rshift32 access,pdata
+	rshift3 pdata,temp
+	arg 32,loopcnt
+	branch calc_mod_value_scale_do
+
+calc_radio_freq:
+	bpatch patch0f_2,mem_patch0f
+	call set_sync_on
+	copy bt_clk,pdata
+	and_into 0x180,pdata
+	compare 3,freq_mode,0x07
+	nbranch freq_not_connection,true    /* don't do the hack if not in connection */
+	rshift3 pdata,pdata
+	iadd freq_index,pdata
+	branch do_hop_mod_now
+freq_not_connection:	
+	copy freq_index,pdata
+do_hop_mod_now:
+	div pdata,79
+	pulse recalc         /* now is good time to recalc id */
+	call wait_div_end
+	remainder rega
+	add rega,-40,temp
+	branch odd_half,positive
+	lshift rega,temp
+	branch freq_result
+odd_half:
+	lshift temp,temp
+	increase 1,temp
+freq_result:	
+	bpatch patch0f_3,mem_patch0f
+	fetch 1,mem_mode
+	bbit0 afh_change,afh_process_con
+afh_process_0:	
+	fetch 4, mem_afh_instant   
+	isub bt_clk, null
+	branch afh_process_con,positive
+	call afh_clear
+	fetch 1,mem_afh_new_mod
+	rtn blank
+	fetch 1,mem_mode
+	set1 afh_enable,pdata
+	store 1,mem_mode
+	fetch 5,mem_afh_map_new
+	store 5,mem_afh_map_lo
+	ifetch 5,contr
+	store 5,mem_afh_map_hi
+	call afh_process_freq_map
+afh_process_con:
+	fetch 1,mem_mode
+	rtnbit0 afh_enable
+	isolate1 1,bt_clk
+	branch afh_same_channel,true	/* at odd slot, use the same as last even */
+	rshift3 temp,rega
+	and temp,7,queue
+	setarg mem_afh_map_lo  
+	iadd rega, rega
+	ifetch 1, rega
+	qisolate0 pdata
+	branch afh_process_1,true		/* not in map, do afh */
+	deposit temp
+	branch afh_process_end
+afh_process_1:
+	fetch 1, mem_afh_used
+	iforce regb                     
+	deposit bt_clk
+	and_into 0x180, pdata
+	rshift3 pdata,pdata
+	iadd freq_index,pdata
+	idiv regb
+	setarg mem_afh_map     
+	call wait_div_end
+	remainder rega
+	iadd rega,contr
+	ifetch 1,contr
+afh_process_end:	
+	store 1,mem_afh_index
+	iforce temp  
+  	rtn
+
+afh_same_channel:
+	fetch 1, mem_afh_index           /* last afh index  */
+	iforce temp
+	rtn
+
+afh_clear:
+	fetch 1,mem_mode
+	set0 afh_enable,pdata
+	set0 afh_change,pdata
+	store 1,mem_mode
+	rtn
+/*
+fixed_frequency:
+	fetcht 1,mem_fixed_freq
+	rtn
+*/
+afh_process_freq_map:
+	bpatch patch0f_4,mem_patch0f
+	arg mem_afh_map,contw
+	force 10,loopcnt
+	call memset0
+	arg mem_afh_map,contw
+	force 0,regc
+	force 2,queue
+process_freq_3:	
+	fetch 5,mem_afh_map_lo
+	iforce temp
+	compare 2,queue,0xff
+	branch process_freq_1,true
+	rshift temp,temp
+process_freq_1:	
+	isolate0 0,temp
+	branch process_freq_0,true
+	deposit regc
+	istore 1,contw
+process_freq_0:
+	rshift2 temp,temp
+	increase 2,regc
+	compare 40,regc,0xfe
+	nbranch process_freq_2,true
+	fetch 5,mem_afh_map_hi
+	iforce temp
+	compare 2,queue,0xff
+	branch process_freq_2,true
+	rshift temp,temp
+process_freq_2:	
+	sub regc,78,null
+	branch process_freq_1,positive
+	force 1,regc
+	increase -1,queue
+	nbranch process_freq_3,zero
+	arg mem_afh_map,rega
+	deposit contw
+	isub rega,pdata
+	store 1,mem_afh_used
+	rtn
+
+rx_radio_freq:
+	bpatch patch0f_5,mem_patch0f
+	call calc_radio_freq
+	fetch 1,mem_debug_config
+	bbit0 debug_rx_fixed_freq,rx_radio_freq_now
+	fetcht 1,mem_rx_fixed_freq
+rx_radio_freq_now:
+	branch set_freq_rx
+	
+
+tx_radio_freq:
+	bpatch patch0f_6,mem_patch0f
+	call calc_radio_freq
+	fetch 1,mem_debug_config
+	bbit0 debug_tx_fixed_freq,tx_radio_freq_now
+	fetcht 1,mem_tx_fixed_freq
+tx_radio_freq_now:
+	branch set_freq_tx
+	
+
+fetch_giac:
+	force 0,uap
+	fetch 3,mem_glap
+	iforce lap
+	rtn
+
+fetch_page_bt_adr:
+	bpatch patch0f_7,mem_patch0f
+	fetch 1,mem_hci_puap
+	icopy uap
+	fetch 3,mem_hci_plap
+	icopy lap
+	rtn
+
+fetch_self_bt_adr:
+	bpatch patch10_0,mem_patch10
+	fetch 2,mem_nap
+	icopy nap
+	fetch 1,mem_uap
+	icopy uap
+	fetch 3,mem_lap
+	icopy lap                 /* copy self_adr,bt_adr */      /* use own address */
+	rtn
+
+fetch_extm_bt_adr:
+	bpatch patch10_1,mem_patch10
+	fetch 2,mem_pnap
+	icopy nap
+	fetch 1,mem_puap
+	icopy uap
+	fetch 3,mem_plap
+	icopy lap         
+	rtn
+
+
+fetch_diac:
+	bmark1 mark_all_diac,fetch_diac_do
+	rtnmark0 mark_inquiry_state
+	rtnmark0 mark_periodical_diac
+fetch_diac_do:
+	and_into -256,lap
+	pulse recalc
+	nop 32
+	rtn
+
+
+shutdown_radio:
+	bpatch patch10_2,mem_patch10
+	call rf_debug_shutdown_radio_line	//L-H-L
+	force 0x08,radio_ctrl
+	force 0,radio_ctrl
+	disable is_rx
+	disable is_tx
+	pulse packet_end
+	jam 0x5,modem_en
+	nop 2
+	jam 0x0,modem_en
+	call set_sync_on
+	jam 0,core_syn_en
+	jam 0x10,core_rf_ldo_en0
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0,core_rf_ldo_en1
+	branch gain_control
+
+
+
+set_sync_on:
+	bpatch patch10_3,mem_patch10
+	jam 0x5,modem_en
+	nop 2
+	jam 0x0,modem_en					/* if called from tx or rx */
+	fetch 1,mem_fcomp_div
+	beq XTAL_24M,set_sync_on_24m
+	beq XTAL_16M,set_sync_on_16m
+set_sync_on_24m:
+	jam 0xaa,core_rf_ldo_cfg4
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x15,core_rf_ldo_cfg6
+	
+	jam 0x78,core_rf_ldo_en0 //ldo en
+	fetch 1,core_clkpll_cfg6
+	set1 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x04,core_rf_ldo_en1
+	nop 60
+	jam 0x7a,core_syn_en //module en
+	jam 0,core_rx_en0
+	jam 0,core_rx_en1    
+	jam 0,core_tx_en0
+	jam 0,core_tx_en1
+
+	jam 0x2a,core_rf_ldo_cfg5  //ldo bleeding current disable
+	jam 0x78,core_rf_ldo_en0
+set_sync_on_next:
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0,core_syn_cal_ctrl
+	rtn
+
+set_sync_on_16m:
+	jam 0xe6,core_syn_aac_cfg1
+
+	jam 0xaa,core_rf_ldo_cfg4
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x15,core_rf_ldo_cfg6
+	
+	jam 0x78,core_rf_ldo_en0 //ldo en
+	fetch 1,core_clkpll_cfg6
+	set1 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x04,core_rf_ldo_en1
+	nop 60
+	jam 0x3a,core_syn_en //module en
+	jam 0,core_rx_en0                 
+	jam 0,core_rx_en1       
+	jam 0,core_tx_en0
+	jam 0,core_tx_en1
+
+	jam 0x2a,core_rf_ldo_cfg5  //ldo bleeding current disable
+	jam 0x38,core_rf_ldo_en0
+	branch set_sync_on_next
+
+set_freq_rx:
+	bpatch patch10_4,mem_patch10
+	
+	fetch 1,mem_fcomp_div
+	sub pdata,XTAL_24M,null
+	call rf_rx_write_freq_24m,zero
+	ncall rf_rx_write_freq_16m,zero
+
+	storet 1,mem_last_freq
+	add temp,0,pdata
+	bmark1 mark_ble_2M,set_rxfreq_2M_offset
+	add temp,1,pdata
+set_rxfreq_2M_offset:
+	call rf_rx_write_freq
+	branch calc_mod_value_scale
+
+
+rf_rx_write_freq_24m:
+	jam 0,core_syn_cal_ctrl
+	jam 0x04,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x03,core_syn_cp_lpf_cfg
+	jam 0x40,core_syn_afc_cfg3
+	rtn
+rf_rx_write_freq_16m:
+	jam 0x30,core_syn_cal_ctrl
+	jam 0x06,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x20,core_syn_cp_lpf_cfg
+	jam 0x15,core_syn_afc_cfg3
+	rtn
+
+rf_rx_enable:
+	bpatch patch10_5,mem_patch10
+	call rf_debug_rx_gpio_high
+	
+	fetch 1,mem_gain_fix
+	beq 0xff,rf_rx_enable_no_soft_agc 
+	arg mem_gain_table,contr
+	iadd contr,contr
+	ifetch 1,contr
+	store 1,core_rf_rx_gain_fix
+	jam 0x27,core_rf_rx_agc_ctrl
+	
+rf_rx_enable_no_soft_agc:
+	fetcht 1,mem_gain_second_agc_en	//0x00 or 0x08
+	fetch 1,core_rf_rx_agc_ctrl
+	ior temp,pdata
+	store 1,core_rf_rx_agc_ctrl
+rf_rx_enable_no_soft_agc_next:
+	jam 0xaa,core_rf_ldo_cfg4 //ldo config set
+	jam 0x2a,core_rf_ldo_cfg5
+	jam 0x13,core_rf_ldo_cfg6
+	jam 0x7f,core_rf_ldo_en0
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	nop 60
+	jam 0x1f,core_rx_en0
+	jam 0xf8,core_rx_en1
+	jam 0x18,core_tx_en0
+	jam 0x00,core_rf_ldo_cfg4
+	jam 0x20,core_rf_ldo_cfg5
+	nop 10
+	jam 0x04,modem_en
+	nop 2
+	jam 0x0c,modem_en
+	rtn
+
+
+	/* pdata is frequency, 00=2400Mhz */
+rf_rx_write_freq:
+	bpatch patch10_6,mem_patch10
+	arg 2400,contr
+	iadd contr,pdata
+	fetcht 1,mem_fcomp_div
+	branch rf_write_freq_calc
+
+	/* rega is frequency, 00=2400Mhz */
+rf_tx_write_freq:
+	bpatch patch10_7,mem_patch10
+	fetch 1,mem_fcomp_div
+	sub pdata,XTAL_24M,null
+	call rf_tx_write_freq_24m,zero
+	ncall rf_tx_write_freq_16m,zero
+	
+	setarg 2400
+	iadd rega,pdata
+	lshift pdata,pdata
+	fetcht 1,mem_fcomp_div
+	mul32 temp,0x03,temp
+rf_write_freq_calc:	
+	lshift temp,temp
+	idiv temp
+	call wait_div_end
+	quotient pdata
+	store 1,core_syn_divr_int
+	remainder pdata		
+	lshift16 pdata,pdata
+	lshift8 pdata,pdata
+	idiv temp
+	call wait_div_end
+	quotient pdata
+	store 1,core_syn_divr_int+3
+	rshift8 pdata,pdata
+	store 1,core_syn_divr_int+2
+	rshift8 pdata,pdata
+	store 1,core_syn_divr_int+1
+	fetcht 1,core_syn_cal_ctrl		//reg syn_cal_ctrl[3:0] = 2??￥b0000, reset
+	and_into 0xf0,temp
+	storet 1,core_syn_cal_ctrl
+	nop 12
+	fetch 1,mem_fcomp_div
+	beq XTAL_24M,rf_write_freq_calc_24m
+	beq XTAL_16M,rf_write_freq_calc_16m
+rf_write_freq_calc_24m:	
+	or_into 0x0c,temp
+	storet 1,core_syn_cal_ctrl
+	nop 12
+	or_into 0x03,temp
+	storet 1,core_syn_cal_ctrl
+	rtn
+
+rf_write_freq_calc_16m:
+	or_into 0x3c,temp
+	storet 1,core_syn_cal_ctrl
+	nop 12
+	or_into 0x33,temp
+	storet 1,core_syn_cal_ctrl
+	rtn
+
+
+rf_tx_write_freq_24m:
+	jam 0,core_syn_cal_ctrl
+	jam 0x12,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x03,core_syn_cp_lpf_cfg
+	jam 0xa6,core_syn_aac_cfg1
+	jam 0x40,core_syn_afc_cfg3
+	rtn
+
+rf_tx_write_freq_16m:
+	jam 0x30,core_syn_cal_ctrl
+	jam 0x15,core_syn_top_ctrl
+	jam 0,core_syn_mmd_cp_ctrl
+	jam 0x20,core_syn_cp_lpf_cfg
+	jam 0xa6,core_syn_aac_cfg1
+	jam 0x15,core_syn_afc_cfg3
+	rtn
+
+
+set_freq_tx:
+	bpatch patch11_0,mem_patch11
+
+	jam 0x12,core_syn_top_ctrl
+	storet 1,mem_last_freq
+	add temp,2,rega
+	call rf_tx_write_freq
+	nop 0x3c0
+
+txon:
+	bpatch patch11_1,mem_patch11
+	
+	jam 0xaa,core_rf_ldo_cfg4 //ldo config set
+	jam 0x2a,core_rf_ldo_cfg5
+	jam 0x10,core_rf_ldo_cfg6
+	
+	jam 0x7f,core_rf_ldo_en0	//ldo en
+	fetch 1,core_clkpll_cfg6
+	set0 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x07,core_rf_ldo_en1 
+	nop 60
+
+	jam 0x0d,core_tx_en0
+	jam 0xf9,core_tx_en1		// reg tx_en1[7:0] = 8??￥b11011001
+	jam 0x00,core_rf_ldo_cfg4
+	jam 0x20,core_rf_ldo_cfg5
+	nop 10
+	jam 0x01, modem_en
+	nop 2
+	jam 0x03, modem_en
+txon_next:	
+	bpatch patch11_2,mem_patch11
+	fetch 1,mem_tx_power
+	beq TX_POWER_3DB,set_tx_power_3db
+	beq TX_POWER_5DB,set_tx_power_5db
+	beq TX_POWER_6DB,set_tx_power_6db
+	beq TX_POWER_7DB,set_tx_power_7db
+	beq TX_POWER_10DB,set_tx_power_10db
+	beq TX_POWER_F3DB,set_tx_power_f3db
+	beq TX_POWER_F5DB,set_tx_power_f5db
+	beq TX_POWER_F20DB,set_tx_power_f20db
+	beq TX_POWER_F30DB,set_tx_power_f30db
+set_tx_power_0db:
+	jam 0x6a,core_tx_pwr_ctrl0
+	jam 0x07,core_tx_pwr_ctrl1
+set_rf_ldo_cfg89:
+	jam 0xa3,core_rf_ldo_cfg8
+	jam 0x07,core_rf_ldo_cfg9
+	rtn
+
+set_tx_power_3db:
+	jam 0x66,core_tx_pwr_ctrl0
+	jam 0x0b,core_tx_pwr_ctrl1
+set_rf_ldo_cfg89_2:
+	jam 0xaa,core_rf_ldo_cfg8
+	jam 0x0a,core_rf_ldo_cfg9
+	rtn
+
+set_tx_power_5db:
+	jam 0x6c,core_tx_pwr_ctrl0
+	jam 0x0d,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_6db:
+	jam 0x6b,core_tx_pwr_ctrl0
+	jam 0x0f,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_7db:
+	jam 0xa7,core_tx_pwr_ctrl0
+	jam 0x0f,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_10db:
+	jam 0xb6,core_tx_pwr_ctrl0
+	jam 0x0f,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89_2
+
+set_tx_power_f3db:
+	jam 0x68,core_tx_pwr_ctrl0
+	jam 0x05,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+	
+set_tx_power_f5db:
+	jam 0x60,core_tx_pwr_ctrl0
+	jam 0x05,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+set_tx_power_f20db:
+	jam 0x53,core_tx_pwr_ctrl0
+	jam 0x01,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+set_tx_power_f30db:
+	jam 0x4c,core_tx_pwr_ctrl0
+	jam 0x00,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+
+initialize_radio:
+	jam clksel_rc,core_clksel
+initialize_radio_wait:
+	fetch 2,mem_rf_init_ptr
+	bbit0 14,initialize_radio_wait
+	iforce contr
+	arg 0x8a00,temp
+initialize_radio_loop:
+	ifetch 1,contr
+	beq 0xff,initialize_radio_cont
+	ior temp,contw
+	ifetch 1,contr
+	istore 1,contw
+	branch initialize_radio_loop
+	
+initialize_radio_cont:
+	bpatch patch11_3,mem_patch11
+	jam 0x05,core_clkpll_cfg0
+	jam 0x94,core_rx_iqadc_cfg
+	call initialize_rc_cal
+	call initialize_rf_ldo_cfg1
+	call initialize_syn_afc_cfg1
+	jam 0xe6,core_syn_aac_cfg1
+
+	//optimize RX SX pn
+	jam 0x90,core_syn_pfd_lkd_cfg
+	jam 0x0b,core_rf_ldo_cfg2
+	jam 0x05,core_rf_ldo_cfg3
+
+	//Improve auto agc
+	jam 0x76,core_agc_wb_sat_th
+	jam 0x76,core_agc_nb_sat_th
+
+	fetch 1,mem_fcomp_div
+	bne XTAL_16M,initialize_radio_cont_next
+	jam 0x34,core_clkpll_cfg5		//16M XTAL
+initialize_radio_cont_next:
+	jam 0xff,core_clkpll_ctrl1
+	nop 100
+	jam 0x0e,core_clkpll_ctrl2
+	jam 0x03,core_clkpll_ctrl0
+	
+	call set_tx_power_0db
+	
+	jam 0x2b,core_tx_mixer_cfg1
+	jam 0x13,core_tx_mixer_cfg2
+
+	call init_lpm_ctrl
+	nop 10
+	jam clksel_dpll,core_clksel
+	jam SYSTEM_CLK_12M,mem_system_clk
+	branch le_disable
+
+
+initialize_syn_afc_cfg1:
+	fetch 1,mem_syn_afc_cfg1
+	branch initialize_syn_afc_cfg1_default,blank
+	or_into 0x20,pdata
+	store 1,core_syn_afc_cfg1
+	rtn
+initialize_syn_afc_cfg1_default:
+	jam 0x29,core_syn_afc_cfg1
+	rtn
+
+initialize_rf_ldo_cfg1:
+	fetch 1,mem_rf_ldo_cfg1
+	branch initialize_rf_ldo_cfg1_default,blank
+	store 1,core_rf_ldo_cfg1
+	rtn
+initialize_rf_ldo_cfg1_default:
+	jam 0x00,core_rf_ldo_cfg1
+	rtn
+
+initialize_rc_cal:
+	fetch 1,mem_rc_cal
+	branch initialize_rc_cal_default,blank
+	store 1,core_rx_bq_bw_cal
+	rtn
+initialize_rc_cal_default:
+	jam 0xd3,core_rx_bq_bw_cal
+	rtn
+
+
+
+	
+	
+save_rssi:
+	bpatch patch11_4,mem_patch11
+	jam 0x20,mem_rssi_hex
+	fetch 1,modem_rssi
+	store 1,mem_modem_rssi
+	sub pdata,0xfc,null
+	nrtn positive
+	sub pdata,0x7f,null
+	rtn positive
+
+	fetch 1,modem_gain
+	and pdata,0x0f,temp
+	lshift temp,temp
+	rshift4 pdata,pdata
+	iadd temp,temp
+	mul32 temp,3,temp
+	fetch 1,mem_modem_rssi
+	sub pdata,0xff,pdata
+	iadd temp,pdata 
+	increase -5,pdata
+	store 1,mem_rssi_hex
+	rtn
+
+rssi_hex2dec:
+	fetch 1,mem_rssi_hex
+	call bcd
+	store 1,mem_rssi			/* bcd value */
+	rtn
+
+bcd:
+	and_into 0xff,pdata
+	div pdata,10
+	call get_div_result
+	lshift4 pdata,pdata
+	remainder temp
+	ior temp,pdata
+	rtn
+
+gain_control:
+	fetch 1,mem_gain_fix
+	rtneq 0xff
+	nbranch  gain_increase,sync
+	fetch 1,mem_modem_rssi
+	sub pdata,0xf0,null
+	nbranch gain_descend,positive
+	sub pdata,0x7f,null
+	branch gain_descend,positive
+	
+	fetchr rega, 1,core_rf_rx_gain_fix
+	fetch 1,mem_gain_fix
+	rtneq 0	
+	arg mem_gain_table,contr
+	iadd contr,contr
+	ifetch 1,contr
+	isub rega,null
+	nrtn zero
+	increase -2,contr
+	ifetcht  1,contr
+	rshift4 temp,pdata
+	rshift4 rega,regb
+	isub regb,regb
+	and temp,0xf,pdata
+	and rega,0xf,rega
+	isub rega,rega
+	lshift rega,pdata
+	iadd regb,regb
+	mul32 regb,3,regb
+	fetcht 1,mem_modem_rssi
+	and temp,0x80,pdata
+	rtn blank
+add_negative:
+	setarg 0x100
+	isub temp,temp
+	copy regb,pdata
+	isub temp,pdata
+	rtn positive
+	and pdata,0xff,pdata
+	rtneq 0xff
+	rtneq 0xfe
+	
+gain_increase:	
+	fetch 1,mem_gain_fix
+	beq 1,set_rx_gain0
+	beq 2,set_rx_gain1
+//	beq 0,set_rx_gain0
+	branch set_rx_gain0
+	
+gain_descend:
+	fetch 1,mem_gain_fix
+	beq 0,set_rx_gain1
+	beq 1,set_rx_gain2
+//	beq 2,set_rx_gain2
+set_rx_gain2:
+	jam 2,mem_gain_fix
+	rtn
+
+set_rx_gain0:
+	jam 0,mem_gain_fix
+	rtn
+	
+set_rx_gain1:
+	jam 1,mem_gain_fix
+	rtn
+
+	
+xtal_fast_wake:
+	setarg 0xf0f
+	branch lpm_write_config
+
+init_lpm_ctrl:
+	setarg 0x80f
+	branch lpm_write_config
+
+
+
+start_receiver:
+	bpatch patch11_5,mem_patch11
+	disable is_tx
+	enable is_rx
+	pulse init_encrypt
+	branch rf_rx_enable
+
+prep_crypt:
+	bpatch patch11_6,mem_patch11
+	call check_enc_ccm
+	nbranch prep_crypt_ccm, blank	
+	fetch 1,mem_state_map
+	isolate1 smap_encryption,pdata
+	setflag true,0,pdata
+	store 1,core_encrypt
+	arg mem_kc,contr
+	ifetch 9,contr
+	iforce kc_ls
+	ifetch 7,contr
+	iforce kc_ms
+	fetch 1,mem_key_size
+	add pdata,-1,g1l
+	pulse kc_p_activate               /* immediately start calculating primary Key */
+	rtn
+
+prep_crypt_ccm:
+	jam 0,core_encrypt
+	rtn
+	
+wait_access_end:
+	deposit clke
+	store 6,mem_sync_clke
+	disable decode_fec0
+	nbranch shutdown_radio,sync
+	fetch 2,mem_param_clke_cal
+	copy pdata,clke_rt
+	increase 1,clke_bt
+	and_into 0x1fc,clke_bt
+	rtn
+
+
+
+wait_access_mhalfbnd:
+	enable decode_fec0
+wait_access_mhalfbnd_correlate:
+	correlate null,mhalfbnd    /* keep correlating until sync is found, or clke half */
+	branch wait_access_end,sync
+	compare 0x02,clke_bt,0x02
+	nbranch wait_access_mhalfbnd_correlate,true
+	branch wait_access_end
+
+wait_access_clkn_rt:
+	bpatch patch11_7,mem_patch11
+	fetchr timeup,2,mem_param_conn_access	/* found sync must occur within this time */
+	enable decode_fec0
+	correlate clkn_rt,meet    /* keep correlating until sync is found, or until clkn_rt timeup */
+	disable decode_fec0
+	nbranch shutdown_radio,sync
+	rtn
+
+wait_access_forever:
+	bpatch patch12_0,mem_patch12
+	enable decode_fec0
+	correlate null,timeout    /* keep correlating until sync is found, or timeout */
+	disable decode_fec0
+	nbranch shutdown_radio,sync
+	fetch 2,mem_param_clke_cal
+	copy pdata,clke_rt
+	and_into 0x1fc,clke_bt
+	rtn
+
+	/* reserve slots for mult-slot packet */
+reserve_slot:
+	bpatch patch12_1,mem_patch12
+	iforce rega
+	deposit bt_clk
+	iadd temp,timeup
+	copy timeup,pdata
+	store 4,mem_next_btclk
+	deposit rega
+	rtn
+
+	/* pdata = clks ahead of bt_clk */
+ahead_window:
+	copy pdata,temp
+	bpatch patch12_2,mem_patch12
+	copy temp,pdata
+	call clk2bt
+	lshift16 bt_clk,pdata
+	set1 44,pdata
+	call clk_diff
+	set0 44,pdata
+	call get_clk
+	call clk_diff
+	rtn user
+	call clk2rt
+	iforce stop_watch
+	until null,timeout
+	rtn
+
+
+setup_clk:
+	bpatch patch12_3,mem_patch12
+	branch setup_clkn,clknt
+	until clke_rt,meet
+skip_setup_clke:
+	copy clke_bt,temp
+	branch setup_clknbt
+setup_clkn:
+	branch skip_setup_clkn,attempt
+	until clkn_rt,meet
+skip_setup_clkn:
+	copy clkn_bt,temp
+setup_clknbt:
+	branch setup_clk11,user
+	compare 1,temp,3
+	nbranch setup_clk,true
+setup_complete:
+	bpatch patch12_4,mem_patch12
+	fetch 1,mem_state
+	rtnbit0 state_inconn
+	fetch 4,mem_next_btclk
+	isub temp,pdata
+	nrtn positive
+	sub pdata,0xff,null
+	branch setup_clk,positive
+	rtn
+setup_clk11:
+	compare 3,temp,3
+	nbranch setup_clk,true
+	branch setup_complete
+
+rf_setup_time:
+	bpatch patch12_5,mem_patch12
+	fetchr timeup,2,mem_param_rf_setup
+	branch setup_clk
+	
+rf_setup_time_slave_slot:
+	disable user
+	branch rf_setup_time
+
+rf_setup_time_master_slot:
+	enable user
+	branch rf_setup_time
+	
+start_transmitter:
+	bpatch patch12_6,mem_patch12
+	call prep_crypt
+	disable is_rx
+	enable is_tx
+	rtn
+
+
+
+start_tx_native:
+	bpatch patch12_7,mem_patch12
+	fetchr timeup,2,mem_param_tx_setup
+	until clkn_rt,meet         /* wait until start_tx time */
+	pulse init_encrypt
+	rtn
+
+start_rx_native:
+	bpatch patch13_0,mem_patch13
+	fetchr timeup,2,mem_param_rx_setup
+	until clkn_rt,meet
+	rtn
+
+
+start_tx_external:
+	bpatch patch13_1,mem_patch13
+	fetchr timeup,2,mem_param_tx_setup
+	until clke_rt,meet         /* wait until start_tx time */
+	pulse init_encrypt
+	rtn
+
+send_access_word:
+	bpatch patch13_2,mem_patch13
+	call rf_debug_tx_on_line	//H
+	preload access          /* load in access word ready to be sent */
+	enable encode_fec0
+	set1 TXGFSK,radio_ctrl
+	inject mod,72
+	disable encode_fec0
+	rtn
+
+
+scan_mode_whiten:
+	copy xin,temp
+	or_into 0x60,temp                /* extend xin with 5->1, 6->1 */
+	copy temp,white_init
+	rtn
+
+
+
+	/* return blank if free amaddr is found */
+get_free_amaddr:
+	bpatch patch13_3,mem_patch13
+	fetch 1,mem_current_amaddr
+	increase 1,pdata
+	bne param_esco_addr,get_free_amaddr_cont
+	force 1,pdata
+get_free_amaddr_cont:
+	store 1,mem_current_amaddr
+	iforce am_addr
+	rtn
+
+get_clk:
+	copy clkn,temp
+	rtn master
+	copy clke,temp
+	rtn
+
+get_clkbt:
+	deposit clkn_bt
+	rtn master
+	deposit clke_bt
+	rtn
+
+
+supervision_update:
+	bpatch patch13_4,mem_patch13
+	fetcht 4,mem_supervision_timer
+	call get_clkbt
+	isub temp,timeup					/* and to 28 bits */
+	deposit timeup
+	fetcht 2,mem_supervision_to
+	lshift temp,temp
+	isub temp,pdata
+	rtn
+	
+supervision_flush:
+	bpatch patch13_5,mem_patch13
+	call get_clkbt
+	store 4,mem_supervision_timer
+	rtn
+
+assert:
+	bpatch patch13_6,mem_patch13
+	branch assert
+	
+loop:
+	branch loop
+
+sleep:	
+	rtn blank
+	/* sleep pdata clocks, only even clocks are accurate */
+	rshift pdata,pdata
+	increase -3,pdata
+sleep_loop:	
+	increase -1,pdata
+	nbranch sleep_loop,zero
+	force 0,pdata
+	rtn
+
+
+
+init_param:
+	/* clear specified sched ram */
+	arg 0x10,loopcnt
+	arg 0,contw
+	call memset0
+	arg mem_le_state,contw
+	arg 10,loopcnt
+	call memset0
+	jam 0,mem_sp_calc
+	jam 0,mem_fifo_temp
+	jam 0,mem_le_testtype
+	jam 0,mem_debug_config
+	jam 0,mem_lmp_conn_state
+	jam 0,mem_connection_options
+	jam 0,mem_tester_emulate
+	jam 0,mem_tester_cnt
+	setarg param_glap
+	store 3,mem_glap
+	jam 0x60,mem_fhs_misc		/* R1 for 1.28s ps interval,P2 */
+	jam param_max_slot,mem_max_slot
+	jam 0x02,mem_fw_ver		/* set firmware version */
+
+	setarg param_tx_setup
+	store 2,mem_param_tx_setup
+	setarg param_rf_setup
+	store 2,mem_param_rf_setup
+	setarg param_conn_access
+	store 2,mem_param_conn_access
+	setarg param_rx_setup
+	store 2,mem_param_rx_setup
+	setarg param_clke_cal
+	store 2,mem_param_clke_cal
+	setarg param_pll_setup
+	store 2,mem_param_pll_setup
+	setarg param_dpll_start_delay
+	store 2,mem_param_dpll_start_delay
+	setarg param_rt_rthalfslot
+	store 2,mem_param_rt_rthalfslot
+	setarg param_clke_cal_le_1m
+	store 2,mem_param_clke_cal_le_1m
+	setarg param_clke_cal_le_2m
+	store 2,mem_param_clke_cal_le_2m
+	setarg param_clke_cal_le_coded
+	store 2,mem_param_clke_cal_le_coded
+	setarg mem_ble_tx_buff0
+	store 2,mem_ble_l2cap_tx_buff0_ptr
+	setarg mem_ble_l2cap_tx_buff_size
+	store 2,mem_ble_l2cap_tx_buff_size_ptr
+	
+	call init_memp	
+	setarg mem_sp_state_end
+	arg mem_sp_state_start,contw
+	isub contw,loopcnt
+	call clear_mem
+
+init_param_next:
+	bpatch patch13_7,mem_patch13
+	rtn wake
+	jam BLUETOOTH_CORE_SPECIFICATION_5_0,mem_lmp_version
+	setarg COMPANY_ID_YICHIP
+	store 2,mem_lmp_compid
+	setarg 0x08
+	store 2,mem_lmp_subversion	
+	jam 0x7f ,mem_seqi
+	
+	setarg 0x24
+	store 2,mem_iscan_window
+	store 2,mem_pscan_window
+	setarg 0x200
+	store 2,mem_iscan_interval
+	store 2,mem_pscan_interval
+	setarg 0x20
+	store 2,mem_inq_window
+	store 2,mem_page_window
+	setarg 0x2000
+	store 2,mem_page_to
+	setarg 0x480
+	store 2,mem_rx_window_init
+	setarg 0xc00
+	store 2,mem_rx_window_sniff
+
+	setarg 0xc3f
+	store 2,mem_lpm_xtalcnt+1
+	setarg 0x333
+	istore 2,contw
+	setarg 0x24109d
+	store 3,mem_lpm_ctrl3+1
+	
+	call clear_wake
+	setarg 0
+	store 2,mem_tx_len
+	rshift clkn_bt,pdata
+	store 4,mem_last_clkn
+	rtn
+
+clk24m_init:
+	jam 6,core_clksel
+	jam 1,core_clksel
+	nop 10
+	setarg 7498
+	store 2,core_halfslot
+	rtn
+
+
+ifdef COMPLIE_TEST_CODE
+
+test_init:
+	setarg test_proc
+	store 2,mem_cb_bt_process
+	setarg test_proc
+	store 2,mem_cb_idle_process
+	rtn
+
+test_proc:
+	fetch 1,mem_state
+	bbit0 state_insniff,check_test_cond
+	set1 mark_lpm_mult_enable,mark
+	fetch 6,mem_sniff_rcv
+	store 6,mem_local_name
+	rtn
+
+check_test_cond:
+	fetch 1,mem_tester_emulate
+	rtnbit0 tester_change
+	fetch 1,mem_tester_cnt
+	increase 1,pdata
+	store 1,mem_tester_cnt
+	rtnne 5
+	jam 0,mem_tester_cnt
+	fetch 1,mem_tester_emulate
+	set0 tester_change,pdata
+	store 1,mem_tester_emulate
+	bbit1 tester_exit,check_test_exit
+	isolate1 tester_no_whitening,pdata
+	call test_no_white,true
+	ncall test_enable_white,true
+	fetch 1,test_mode_packet_type
+	compare 0x20,pdata,0x30
+	fetch 1,mem_state_map
+	setflag true,smap_edr,pdata
+	store 1,mem_state_map
+	fetch 1,mem_tester_emulate
+	fetcht 1,mem_debug_config
+	isolate1 tester_pattern_test,pdata
+	setflag true,debug_tx_pattern,temp
+	isolate1 tester_fixed_freq,pdata
+	setflag true,debug_tx_fixed_freq,temp
+	setflag true,debug_rx_fixed_freq,temp
+	storet 1,mem_debug_config
+	fetch 1,test_mode_tx_freq
+	store 1,mem_tx_fixed_freq
+	fetch 1,test_mode_rx_freq
+	store 1,mem_rx_fixed_freq
+	set1 mark_testmode,mark
+	rtn
+	
+check_test_exit:
+	set0 mark_testmode,mark
+	jam 0,mem_tester_emulate
+	fetch 1,mem_test_mode_old_debug_config
+	store 1,mem_debug_config
+	branch test_enable_white
+
+endif
+
+/*****************************************LPO************************************************/
+
+lpmstate:
+	setarg 0xee21
+	store 2,core_clkoff			// disable unused peripherals
+	fetch 4,core_gpio_in
+	store 4,mem_saved_gpio_in
+	fetch 1,core_lpm_ctrl+3
+	store 1,mem_wakup_from_power_flag	//power up bit2 = 0
+	fetch 1,core_lpm_ldocnt
+	bbit0 gpio_latch,loadcode		// power up boot
+	enable wake
+	bbit0 cold_wake,lpmwake		
+	disable wake
+	deposit auxcnt
+	nbranch lpmwake,blank		// sleep interrupted, wakeup
+	fetch 1,core_lpm_ctrl+3
+	bbit1 reload_code,lpmwake
+	arg param_hibernate_clks,temp
+	branch lpm_enter_sleep
+lpmwake:
+	fetch 4,core_lpm_ctrl2
+	store 4,core_lpm_reg
+	fetch 1,core_lpm_ctrl2+1
+	and_into 0xe0,pdata			//digital aon ldo vout sel: 1.2v
+	store 1,core_lpm_reg+1
+	call lpm_write_ctrl3
+	fetch 3,core_lpm_xtalcnt
+	store 3,core_lpm_reg
+	ifetch 1,contr
+	or_into isogate_mask,pdata		// open all isolation gate&power switch
+	istore 1,contw
+	call lpm_write_ctrl2
+	fetch 1,core_lpm_isogate
+	set1 enable_retmem,pdata
+	store 1,core_lpm_isogate
+	call lpm_write_ctrl2
+	call lpm_load_context,wake
+	fetch 1,core_lpm_reg+2
+	set0 gpio_latch,pdata			// enable gpio fuction
+	store 1,core_lpm_reg+2
+	call lpm_write_ctrl2
+	nbranch loadcode,wake		// wakeup from hibernate
+	call lpm_save_mpu_lock
+	rtnmark0 mark_otp_encrypt
+	jam lock_otp,core_misc_ctrl	// disable further read/write of key
+	rtn 
+
+lpm_save_mpu_lock:
+	fetch 3,mem_efuse_header
+	rtn blank
+	store 3,mem_tmp_buffer
+	branch app_lpm_peripheral_lock_check
+
+lpm_ctrl3_cfg_dig_vsel:
+	fetch 1,mem_dig_aon_vsel
+	beq 1,lpm_ctrl3_cfg_vsel_108
+	beq 2,lpm_ctrl3_cfg_vsel_096
+	beq 3,lpm_ctrl3_cfg_vsel_084
+lpm_ctrl3_cfg_vsel_120:
+	fetch 1,mem_lpm_ctrl3+1
+	and_into 0xe0,pdata
+lpm_ctrl3_cfg_vsel_store:	
+	store 1,mem_lpm_ctrl3+1
+	rtn
+lpm_ctrl3_cfg_vsel_108:
+	fetch 1,mem_lpm_ctrl3+1
+	and_into 0xe0,pdata
+	or_into 0x1d,pdata
+	branch lpm_ctrl3_cfg_vsel_store
+lpm_ctrl3_cfg_vsel_096:
+	fetch 1,mem_lpm_ctrl3+1
+	and_into 0xe0,pdata
+	or_into 0x1b,pdata
+	branch lpm_ctrl3_cfg_vsel_store
+lpm_ctrl3_cfg_vsel_084:
+	fetch 1,mem_lpm_ctrl3+1
+	and_into 0xe0,pdata
+	or_into 0x17,pdata
+	branch lpm_ctrl3_cfg_vsel_store
+
+lpm_load_context:
+	fetch 1,mem_saved_spidctrl
+	store 1,core_spid_ctrl
+	arg mem_saved_gpio,contr
+	arg core_gpio_conf,contw
+	call memcpy20
+	fetch 8,mem_saved_mark
+	iforce mark
+	fetch 8,core_gpio_wakeup_low
+	store 8,mem_gpio_wakeup_low
+	branch load_ucode
+
+lpm_save_context:
+	deposit mark
+	store 8,mem_saved_mark
+	arg core_gpio_conf,contr
+	arg mem_saved_gpio,contw
+	call memcpy20
+	fetch 1,core_spid_ctrl
+	store 1,mem_saved_spidctrl
+	branch lpm_write_gpio_wakeup
+
+lpo_calibration:
+	fetch 1,core_aes_en
+	rshift4 pdata,pdata
+	nbranch lpo_cal_inited,blank
+	fetch 3,mem_clks_per_lpo
+	nrtn blank
+	fetch 1,core_aes_en
+	or_into 0xc0,pdata
+	store 1,core_aes_en
+	jam ccnt_start,core_misc_ctrl
+lpo_cal_inited:
+	fetch 1,core_perf_status
+	rtnbit0 1
+	fetch 3,core_clk_counter
+	store 3,mem_clks_per_lpo
+	rtn
+
+
+	/* temp is synced clke */
+lpm_adjust_clk:
+	bpatch patch14_0,mem_patch14
+	deposit clke
+	call clk_diff_rt
+	fetcht 4,mem_sleep_counter_all
+	sub temp,0xff,null
+	rtn positive				// interval too small
+	lshift8 pdata,pdata
+	lshift4 pdata,pdata
+	idiv temp
+	call get_div_result
+	arg param_lpm_adjmax,temp
+	call ceiling
+	store 1,mem_lpm_adjust
+	nbranch lpm_adjust_positive,user
+	sub pdata,0,pdata
+lpm_adjust_positive:
+	fetcht 3,mem_clks_per_lpo
+	iadd temp,pdata
+	store 3,mem_clks_per_lpo
+lpm_clear_counter:
+	setarg 0
+	store 4,mem_sleep_counter_all
+	rtn
+
+
+	/* temp is lpo counter for doze */
+//lpm_doze:
+//	fetch 1,mem_lpm_config+2
+//	set1 reload_code,pdata
+//	store 1,mem_lpm_config+2
+//	branch lpm_hibernate_normal
+	
+
+	/* no retention memory at all */
+lpm_hibernate:
+	arg param_hibernate_clks,temp
+	fetch 1,mem_lpm_config+1
+	set0 7,pdata					/* lowest lpo */
+	store 1,mem_lpm_config+1
+lpm_hibernate_normal:
+	bpatch patch14_1,mem_patch14
+	call lpm_write_gpio_wakeup
+	fetch 1,mem_lpm_hibernate_switch
+	store 1,mem_lpm_xtalcnt + 4
+	fetch 1,mem_lpm_xtalcnt + 2
+	set1 cold_wake,pdata
+	store 1,mem_lpm_xtalcnt + 2
+
+	/* temp is lpo clocks to sleep */
+lpm_sleep:
+	bpatch patch14_2,mem_patch14
+	call xtal_fast_wake
+	fetch 2,mem_cb_before_lpm_sleep
+	call callback_func
+lpm_sleep_skip_cb_function:
+	fetch 4,mem_sleep_counter_all
+	iadd temp,pdata
+	store 4,mem_sleep_counter_all
+	call lpm_save_context
+	call lpm_ctrl3_cfg_dig_vsel
+lpm_sleep_next:
+	fetch 4,mem_lpm_ctrl3
+	copy pdata,regb
+	fetch 5,mem_lpm_xtalcnt
+	store 4,core_lpm_reg
+	rshift32 pdata,rega
+	until null,lpo_edge
+	deposit clkn
+	store 6,mem_sleep_clkn
+	jam lpmreg_sel_ctrl2,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	deposit rega
+	store 1,core_lpm_isogate
+	jam lpmreg_sel_ctrl2,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	storer regb,4,core_lpm_reg
+	jam lpmreg_sel_ctrl3,core_lpm_wr
+lpm_enter_sleep:
+	until null,lpo_edge
+	until null,lpo_edge
+	storet 4,core_lpm_reg
+	jam lpmreg_sel_counter,core_lpm_wr
+	until null,never
+
+
+
+
+lpm_recover_clk:
+	bpatch patch14_3,mem_patch14
+	setarg 0
+	copy auxcnt,null
+	branch lpm_recover_timeout,zero
+	fetch 1,core_lpm_xtalcnt
+	fetcht 1,core_lpm_buckcnt
+	isub temp,null
+	branch lpm_recover_xtal,positive
+	deposit temp
+lpm_recover_xtal:
+	isub auxcnt,pdata
+	increase 1,pdata
+lpm_recover_timeout:
+	increase 10,pdata
+	until null,lpo_edge
+	iadd lpo_time,pdata
+	fetcht 4,mem_sleep_counter
+	iadd temp,pdata
+	fetcht 3,mem_clks_per_lpo
+	imul32 temp,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	increase param_lpm_fix,pdata
+	fetcht 2,mem_param_rt_rthalfslot
+	idiv temp
+	call get_div_result
+	lshift16 pdata,pdata
+	remainder temp
+	ior temp,pdata
+	fetcht 6,mem_sleep_clkn
+	call clk_add
+	copy temp,clkn
+	fetch 6,mem_context + coffset_clk_offset
+	call calc_clke2
+	deposit clke
+	store 6,mem_pdatatemp
+	deposit auxcnt
+	istore 1,contw
+	fetch 1,core_gpio_in1
+	or_into 0xf0,pdata
+	istore 1,contw
+	rtn
+	
+lpm_dispatch:
+	bpatch patch14_4,mem_patch14
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	rtn blank
+	fetch 1,mem_lpm_mode
+	rtn blank
+	fetch 1,mem_ssp_enable
+	branch lpm_dispatch_next,blank
+	fetch 1,mem_sp_local_key_invalid	// simple pairing is not ready
+	rtn blank
+lpm_dispatch_next:
+	fetch 1,mem_sc_calc
+	nrtn blank	
+	arg context_check_a_wack,regc
+	call context_search
+	rtn zero
+	call lpm_check_wake_lock
+	nrtn blank
+	fetch 1,mem_context
+	compare 3,pdata,0x7							/* sco won't sleep */
+	nbranch lpm_dispatch_unconn,true
+	fetch 2,mem_context + coffset_tsniff		/* role switch */
+	rtn blank																
+	rtn wake
+	bpatch patch14_5,mem_patch14
+lpm_dispatch_next2:
+	fetcht 1,mem_lpm_current_mult
+	fetch 2,mem_context + coffset_tsniff
+	imul32 temp,pdata
+	rshift4 temp,temp
+	rshift2 temp,temp
+	isub temp,pdata
+	fetcht 4,mem_context + coffset_sniff_anchor
+	iadd temp,pdata
+	fetcht 1,mem_lpm_overhead
+	isub temp,pdata
+	lshift16 pdata,alarm
+	bpatch patch14_6,mem_patch14
+	fetch 2,mem_context + coffset_rx_window
+	rshift pdata,pdata
+	call clk2bt
+	deposit alarm
+	call clk_diff
+	copy clke,temp
+	call clk_diff_rt
+	rtn user
+lpm_dispatch_sleep:
+	call clk2lpo
+lpm_dispatch_lpo:
+	bpatch patch14_7,mem_patch14
+	fetch 1,mem_lpm_xtalcnt
+	isub temp,null
+	branch lpm_clear_counter,positive
+	storet 4,mem_sleep_counter
+	call app_will_enter_lpm
+	call l2cap_lpm_save_txbuf
+	fetcht 4,mem_sleep_counter
+	branch lpm_sleep
+	
+lpm_dispatch_unconn:
+	bpatch patch15_0,mem_patch15
+	fetch 1,mem_context
+	rtnbit1 state_inconn					// wont sleep in connection
+	rtnbit1 state_inpage					// wont sleep when paging
+	fetch 1,mem_ssp_enable
+	branch lpm_unconn_nossp,blank
+	fetch 1,mem_sp_local_key_invalid	// simple pairing is not ready
+	rtn blank
+lpm_unconn_nossp:
+	fetch 1,mem_le_adv_enable
+	nbranch lpm_unconn_cont,blank
+	fetch 1,mem_scan_mode
+	rtn blank
+lpm_unconn_cont:
+	fetch 2,mem_lpm_interval
+	rtn blank
+lpm_sleep_btclk:
+	fetcht 1,mem_lpm_overhead
+	isub temp,pdata
+	arg 7500,temp				/* 1.25ms */
+	imul32 temp,pdata
+	branch lpm_dispatch_sleep
+
+lpm_set_mult:
+	bpatch patch15_1,mem_patch15
+	disable wake
+	fetch 1,mem_state
+	rtnbit0 state_insniff
+	nbranch lpm_not_match,match
+	call lpm_match
+	fetch 2,mem_rx_window_sniff
+	store 2,mem_rx_window
+	fetch 1,mem_arq
+	bbit1 wack,lpm_mult_short
+	bmark0 mark_lpm_mult_enable,lpm_mult_short
+	call l2cap_malloc_is_fifo_empty
+	nbranch lpm_mult_short,blank
+	fetch 1,mem_classic_bt_flag
+	bbit1 SHORT_MULT_FLAG,lpm_mult_short
+lpm_mult_wait_timeout:
+	fetch 2,mem_cb_bt_set_mult
+	call callback_func
+	nbranch lpm_mult_short,blank
+	jam 0,mem_lpm_current_mult
+	bmark0 mark_lpm_mult_enable,lpm_mult_short
+	fetch 1,mem_lpm_mult_cnt
+	branch lpm_mult_long,blank
+	increase -1,pdata
+	store 1,mem_lpm_mult_cnt
+	rtn
+
+
+classic_bt_set_mult_short_flag:
+	arg SHORT_MULT_FLAG,queue
+	branch classic_bluetooth_set_flag
+	
+classic_bt_clr_mult_short_flag:
+	arg SHORT_MULT_FLAG,queue
+	branch classic_bluetooth_clr_flag
+
+
+
+lpm_match:
+	jam 0,mem_sniff_unint_lost
+	fetch 3,mem_sniff_rcv
+	increase 1,pdata
+	store 3,mem_sniff_rcv
+	rtn
+
+lpm_not_match:
+	bpatch patch15_2,mem_patch15
+	fetcht 2,mem_rx_window_sniff
+	rshift temp,temp
+	fetch 2,mem_rx_window
+	iadd temp,pdata
+	store 2,mem_rx_window
+lpm_lost:
+	jam 0,mem_lpm_current_mult
+	fetch 3,mem_sniff_lost
+	increase 1,pdata
+	store 3,mem_sniff_lost
+	fetch 1,mem_sniff_unint_lost
+	increase 1,pdata
+	store 1,mem_sniff_unint_lost
+	rtn
+
+lpm_mult_short:
+	jam 0,mem_lpm_current_mult
+	fetch 1,mem_lpm_mult_timeout
+	store 1,mem_lpm_mult_cnt
+	rtn
+
+lpm_mult_long:
+	fetcht 1,mem_lpm_mult
+	storet 1,mem_lpm_current_mult
+	rtn
+
+lpm_cal_xtal_startup:
+	fetch 1,mem_lpm_xtalcnt
+	nrtn blank
+	jam clksel_rc,core_clksel
+	setarg 0xf0c
+	call lpm_write_config
+	setarg 200000
+	call sleep
+	until null,lpo_edge
+	copy lpo_time,alarm
+	call xtal_fast_wake
+	jam clksel_xtal,core_clksel
+	nop 10
+	until null,lpo_edge
+	deposit lpo_time
+	isub alarm,pdata
+	increase 0x30,pdata
+	arg 0xff,temp
+	call ceiling
+	store 1,mem_lpm_xtalcnt
+	nop 30000
+	nop 30000
+	nop 30000
+	rtn
+
+//lpm_cal_xtal_startup_by_snooze:
+//	fetch 1,mem_lpm_xtalcnt
+//	nrtn blank
+//	jam 0xff,core_xtal_stable_time
+//	jam clksel_rc,core_clksel
+//	call xtal_fast_wake
+//	setarg 1000
+//	iadd lpo_time,alarm
+//	snooze
+//	deposit lpo_time
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	nop 12000	//delay about 1ms
+//	isub alarm,pdata
+//	add pdata,0x30,pdata
+//	arg 0xff,temp
+//	call ceiling
+//	store 1,mem_lpm_xtalcnt
+//	nop 30000
+//	nop 30000
+//	nop 30000	//delay 90000 nop
+//	rtn
+
+
+
+	/* pdata is lpm_reg[11:0] */
+lpm_write_config:
+	arg 0xfff,contw
+	iand contw,contw
+	fetch 1,mem_lpm_config
+	and_into 0xf0,pdata
+	lshift8 pdata,pdata
+	ior contw,pdata
+	store 2,core_lpm_reg
+	ifetch 2,contr
+	istore 2,contw
+
+lpm_write_ctrl:
+	setarg lpmreg_sel_ctrl
+	branch lpm_write
+
+lpm_write_ctrl2:
+	setarg lpmreg_sel_ctrl2
+lpm_write:
+	until null,lpo_edge
+	store 1,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	rtn
+
+lpm_write_sel_vdd:
+	fetch 4,core_lpm_ctrl2
+	store 4,core_lpm_reg
+	fetch 1,core_lpm_ctrl2
+	and_into 0x41,pdata
+	fetcht 1,mem_lpm_ctrl3
+	ior temp,pdata
+	store 1,core_lpm_reg
+lpm_write_ctrl3:
+	setarg lpmreg_sel_ctrl3
+	branch lpm_write
+
+
+lpm_write_gpio_wakeup:
+	bpatch patch15_3,mem_patch15
+	fetch 4,mem_gpio_wakeup_low
+	store 4,core_lpm_reg
+	setarg lpmreg_sel_gpiolow
+	call lpm_write
+	fetch 4,mem_gpio_wakeup_high
+	store 4,core_lpm_reg
+	setarg lpmreg_sel_gpiohigh
+	branch lpm_write
+
+lpm_get_wake_lock:
+	fetch 2,mem_lpm_wake_lock
+	qset1 pdata
+	store 2,mem_lpm_wake_lock
+	rtn
+
+lpm_put_wake_lock:
+	fetch 2,mem_lpm_wake_lock
+	qset0 pdata
+	store 2,mem_lpm_wake_lock
+	rtn
+
+
+
+lpm_check_wake_lock:
+	bpatch patch15_4,mem_patch15
+	call app_check_wake_lock
+	fetch 2,mem_lpm_wake_lock
+	copy pdata,rega
+	fetch 1,mem_state_map
+	isolate1 smap_rxlmp,pdata
+	setflag true,wake_lock_lmp_rx,rega
+	fetch 1,mem_lmo_opcode1
+	fetcht 1,mem_lmo_opcode2
+	iadd temp,pdata
+	fetcht 1,mem_lmp_to_send
+	iadd temp,pdata
+	nsetflag blank,wake_lock_lmp_tx,rega
+	fetch 3,mem_tx_fifo3
+	nsetflag blank,wake_lock_ble_tx,rega
+	fetch 2,mem_l2cap_rxbuff1_len
+	fetcht 2,mem_l2cap_rxbuff2_len
+	iadd temp,pdata
+	nsetflag blank,wake_lock_l2cap_rx,rega
+	fetch UTIL_FIFO_LEN,mem_ipc_fifo_bt2c51
+	nsetflag blank,wake_lock_ipc_bt2c51,rega
+	fetch UTIL_FIFO_LEN,mem_ipc_fifo_c512bt
+	nsetflag blank,wake_lock_ipc_c512bt,rega
+	fetch 1,mem_hci_cmd
+	nsetflag blank,wake_lock_cmd,rega
+	fetch 1,mem_device_option
+	compare dvc_op_module,pdata,0xff
+	call lpm_uart_wake_lock,true
+	copy rega,pdata
+	store 2,mem_lpm_wake_lock
+	rtn
+
+lpm_uart_wake_lock:
+	fetch 2,core_uart_rxitems
+	nsetflag blank,wake_lock_uart_rx ,rega
+	fetch 2,core_uart_txitems
+	nsetflag blank,wake_lock_uart_tx ,rega
+	rtn
+
+lpm_shut_down:
+	fetch 4,core_lpm_ctrl
+	set0 27,pdata
+	store 4,core_lpm_reg
+	call lpm_write_ctrl
+	branch assert
+	
+lpm_disable_exen_output:
+	fetch 4,core_lpm_xtalcnt
+	set0 20,pdata
+	store 4,core_lpm_reg
+	branch lpm_write_ctrl2
+
+
Index: mouse_public_3mode_usb/program/debug.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/debug.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/debug.prog	(working copy)
@@ -0,0 +1,66 @@
+
+// Rf debug
+
+/*****************************************************************************************************************************************************************************************
+    txon     txoff       rxon		      sync             crc pass    shutdown radio          match
+     _________          ______________    _________________     ___        ___                     
+    |         |        |              |  |                 |   |   |      |   |                   
+    |	      |        |              |  |                 |   |   |      |   |                   
+____|tx data  |________|   rx window  |__| rx data         |___|   |______|   |_______       __________
+
+*****************************************************************************************************************************************************************************************/
+
+rf_debug_rx_gpio_low:
+	fetch 1,mem_rf_debug_rx_gpio
+rf_debug_gpio_low:
+	arg gpcfg_output_low,temp
+	branch gpio_config_function
+
+rf_debug_rx_on_line:
+rf_debug_rx_gpio_high:
+	fetch 1,mem_rf_debug_rx_gpio
+rf_debug_gpio_high:
+	arg gpcfg_output_high,temp
+	branch gpio_config_function
+
+rf_debug_rx_gpio_h_l_h:
+	call rf_debug_rx_gpio_high
+rf_debug_rx_gpio_l_h:
+	call rf_debug_rx_gpio_low
+	branch rf_debug_rx_gpio_high
+
+rf_debug_rx_gpio_l_h_l:
+rf_debug_shutdown_radio_line:
+	call rf_debug_rx_gpio_l_h
+rf_debug_rx_crc_line:
+	branch rf_debug_rx_gpio_low
+
+rf_debug_rx_sync_line:
+	branch rf_debug_rx_gpio_l_h
+
+rf_debug_rx_crc_fail_line:
+	call rf_debug_rx_gpio_l_h
+	branch rf_debug_rx_gpio_l_h_l
+
+rf_debug_rx_match_line:
+rf_debug_rx_crc_error_line:
+rf_debug_rx_sync_timeout_line:
+	branch rf_debug_rx_gpio_low
+
+
+rf_debug_tx_off_line:
+rf_debug_tx_gpio_low:
+	fetch 1,mem_rf_debug_tx_gpio
+	branch rf_debug_gpio_low
+
+rf_debug_tx_on_line:
+rf_debug_tx_gpio_high:
+	fetch 1,mem_rf_debug_tx_gpio
+	branch rf_debug_gpio_high
+
+rf_debug_tx_gpio_l_h_l:
+	call rf_debug_tx_gpio_low
+	call rf_debug_tx_gpio_high
+	branch rf_debug_tx_gpio_low
+
+	
Index: mouse_public_3mode_usb/program/g24_protocol_stack/24g.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g.prog	(working copy)
@@ -0,0 +1,530 @@
+
+
+g24_dispatch:
+	bpatchx patch3b_5,mem_patch3b
+	bmark1 mark_24g_rxmode,g24_receive_dispatch
+	branch g24_transmit_dispatch
+
+
+/****************************g24 base transceiver start********************************/
+
+g24_prep:
+	disable enable_crc
+	disable enable_white
+	setarg 0x555555
+	iforce crc24_init
+	fetch 1,mem_24g_ch
+	branch le_prep+5	
+
+g24_receive_packet:
+	bpatchx patch3b_6,mem_patch3b
+	fetch 1,mem_24g_rx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call calc_mod_value_scale_le
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	call le_rf_rx_enable
+g24_receive_rxon:
+	call g24_prep
+	bmark0 mark_ble_lr,g24_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call g24_prep
+g24_receive_nolr:
+	disable user3
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	enable swfine
+	fetch 2,mem_24g_rx_window
+	iforce stop_watch
+	correlate null,timeout
+	nbranch g24_sync_timeout,sync
+	call rf_debug_rx_sync_line
+	bmark1 mark_ble_lr,g24_receive_skip_fec1
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_receive_skip_fec1,blank
+	disable decode_fec0	
+	enable decode_fec1	//lr do not use fec1
+g24_receive_skip_fec1:
+	enable enable_white
+	enable enable_crc
+	call g24_receive_byte
+	store 1,mem_24g_get_syncword_crc8
+	fetcht 1,mem_24g_syncword_crc8
+	isub temp,null
+	nbranch g24_end_of_packet,zero
+	bpatchx patch3b_7,mem_patch3b
+	disable user7
+	isolate1 mark_ble_lr,mark
+	call g24_lr_receive_pdu_len,true
+	branch g24_end_of_packet,user7
+	call g24_receive_byte
+	store 1,mem_24g_rxbuf	//device id
+	bmark1 mark_24g_rxmode,g24_receive_skip
+	fetch 1,mem_24g_rxbuf
+	fetcht 1,mem_24g_data_type
+	icompare bits_data,temp
+	nbranch g24_end_of_packet,true
+g24_receive_skip:
+	call g24_receive_byte
+	isolate1 mark_ble_lr,mark
+	call g24_lr_receive_payload_len,true
+	istore 1,contw
+	rshift3 pdata,pdata
+	sub pdata,0x1f,null
+	nbranch g24_end_of_packet,positive	//max payload: 32bytes
+	copy pdata,loopcnt
+	branch g24rx_nopayload,zero
+g24rx_loop:
+	call g24_receive_byte
+	istore 1,contw
+	loop g24rx_loop
+g24rx_nopayload:
+	bmark1 mark_24g_rxmode,g24_receive_skip_rssi
+	copy contw,rega
+	call g24_receive_byte
+	store 1,mem_rssi_hex_received	//receive rssi hex
+	copy rega,contw
+g24_receive_skip_rssi:
+	parse demod,bucket,24
+	rshift32 pdata,pdata
+	rshift16 pdata,pdata
+	istore 3,contw
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_receive_skip_disable_fec1,blank
+	disable decode_fec1
+g24_receive_skip_next:
+	isolate1 mark_24g_rxmode,mark
+	call save_rssi_dec,true
+	branch g24_end_of_packet,crc_failed
+	call rf_debug_rx_crc_line	//L
+	enable user3
+	call le_match_set_txfreq
+	bpatchx patch3c_0,mem_patch3c
+	rtnmark1 mark_24g_rxmode
+	fetch 1,mem_rssi_hex_received
+	fetcht 1,mem_rssi_hex_received_max_value
+	isub temp,null
+	call copy_temp2pdata,positive
+	branch rssi_signal
+
+g24_receive_skip_disable_fec1:
+	disable decode_fec0
+	branch g24_receive_skip_next
+	
+
+g24_lr_receive_pdu_len:
+	call g24_receive_byte
+	sub pdata,1,null
+	branch enable_user7,positive
+	increase -2,pdata	//minus hec and pdu length
+	bmark1 mark_24g_rxmode,g24_lr_receive_pdu_norssi
+	branch enable_user7,blank
+	increase -1,pdata	//minus rssi_hex length
+g24_lr_receive_pdu_norssi:
+	store 1,mem_temp	//payload length
+	rtn
+
+g24_lr_receive_payload_len:
+	and_into 0x07,pdata	//pdata[7:3]:length
+	fetcht 1,mem_temp	//payload length
+	lshift3 temp,temp
+	ior temp,pdata
+	rtn
+	
+g24_receive_byte:
+	parse demod,bucket,8
+	rshift3 pwindow,pdata
+	rtn
+
+g24_sync_timeout:
+	isolate1 mark_24g_rxmode,mark
+	call rssi_noise,true
+g24_end_of_packet:
+	call le_disable
+	disable encode_fec1
+	disable decode_fec1
+	branch end_of_packet
+
+g24_set_freq_tx:
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	branch set_freq_tx
+
+g24_transmit:
+	bpatchx patch3c_1,mem_patch3c
+	fetch 1,mem_24g_tx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call g24_prep
+	call g24_set_freq_tx
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call rf_debug_tx_on_line
+	disable lr_s2en
+	bmark1 mark_ble_lr,g24_transmit_lr
+	bmark1 mark_ble_2M,g24_transmit_2M
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+g24_transmit_packet:
+	bmark1 mark_ble_lr,g24_transmit_nolr
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_transmit_nolr,blank
+	disable encode_fec0	
+	enable encode_fec1	////lr use encode_fec3
+g24_transmit_nolr:
+	enable enable_white
+	enable enable_crc
+	fetch 1,mem_24g_txlen
+	iforce loopcnt
+	arg mem_24g_txpayload,contr
+g24tr_loop:
+	ifetch 1,contr
+	inject mod,8
+	loop g24tr_loop
+	enable enable_parity
+	inject mod,24	//crc
+	disable enable_parity
+	bmark0 mark_ble_lr,g24_transmit_skip
+	disable enable_white
+	setarg 0
+	inject mod,3
+g24_transmit_skip:	
+	until null,tx_clear
+	nop 100
+	disable lr_s2en
+	disable encode_fec0
+	fetch 1,mem_24g_disable_fec1
+	nbranch g24_transmit_skip_disable_fec1,blank
+	disable encode_fec1
+g24_transmit_skip_disable_fec1:
+	disable encode_fec3
+	call set_sync_on
+	branch rf_debug_tx_off_line
+
+g24_transmit_lr:
+	arg 10,loopcnt
+g24_transmit_lr_preamble_loop:
+	setarg 0x3c
+	inject mod,8
+	loop g24_transmit_lr_preamble_loop
+	disable encode_fec0
+	enable encode_fec3
+	rshift16 access,pdata
+	rshift16 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,32
+	bmark1 mark_ble_lr_s8,g24_transmit_lr_s8
+g24_transmit_lr_s2:
+	setarg 1
+	inject mod,5
+	enable lr_s2en
+	branch g24_transmit_packet
+
+g24_transmit_lr_s8:
+	setarg 0
+	inject mod,5
+	branch g24_transmit_packet
+
+g24_transmit_2M:
+	fetch 1,mem_system_clk
+	rshift pdata,loopcnt
+g24_transmit_2M_dealy:
+	nop 2
+	loop g24_transmit_2M_dealy
+//	nop 36	//2M 前端发送比1M快3us左右
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,temp
+	copy temp,pdata
+	inject mod,8
+	copy temp,pdata
+	inject mod,40
+	branch g24_transmit_packet
+
+/****************************g24 base transceiver end********************************/
+
+
+
+/****************************g24 general func start********************************/
+
+g24_transmit_prep:
+	fetch 1,mem_24g_tx_phy
+	bbit1 BIT_LE_CODED_PHY,g24_lr_transmit_prep
+// total length
+	fetch 1,mem_24g_datalen
+	increase 3,pdata	//hec/type/control
+	store 1,mem_24g_txlen
+//hec
+	fetch 1,mem_24g_syncword_crc8
+	store 1,mem_24g_txpayload
+// data type
+	fetch 1,mem_24g_data_type
+	istore 1,contw
+//prepare 5bit payload length, 2bit PID, 1bit NO_ACK
+	fetch 1,mem_24g_datalen
+g24_transmit_prep_pdu:
+	lshift3 pdata,pdata
+	fetcht 1,mem_24g_pid
+	and temp,0x03,temp
+	lshift temp,temp
+	ior temp,pdata
+	fetcht 1,mem_24g_no_ack
+	iadd temp,pdata
+	istore 1,contw
+//prepare payload data
+	fetch 1,mem_24g_datalen
+	iforce loopcnt
+	arg mem_24g_txbuf,contr
+	call memcpy
+//rssi hex	
+	rtnmark0 mark_24g_rxmode
+	fetch 1,mem_rssi_hex
+	istore 1,contw
+	fetch 1,mem_24g_tx_phy
+	rtnbit1 BIT_LE_CODED_PHY
+	fetch 1,mem_24g_txlen
+	increase 1,pdata	//plus rssi_hex length
+	store 1,mem_24g_txlen
+	rtn
+	
+g24_lr_transmit_prep:
+// total length
+	fetch 1,mem_24g_datalen
+	increase 4,pdata	//hec/pdu/type/control
+	bmark0 mark_24g_rxmode,g24_lr_transmit_prep_skip
+	increase 1,pdata	//mem_rssi_hex
+g24_lr_transmit_prep_skip:
+	store 1,mem_24g_txlen
+//hec
+	fetch 1,mem_24g_syncword_crc8
+	store 1,mem_24g_txpayload
+// pdu length
+	fetch 1,mem_24g_txlen
+	increase -2,pdata	//minus hec and pdu length
+	istore 1,contw
+// data type
+	fetch 1,mem_24g_data_type
+	istore 1,contw
+	setarg 0
+	branch g24_transmit_prep_pdu
+
+g24_read_len_pid_crc:
+//read control
+	fetch 1,mem_24g_rxbuf+1
+	rshift3 pdata,pdata
+	store 1,mem_24g_rxdata_length
+//get crc
+	increase 1,pdata
+	arg mem_24g_rxbuf+1,contr
+	iadd contr,contr
+	ifetch 3,contr
+	store 3,mem_24g_sta_crc
+//read pid
+	fetch 1,mem_24g_rxbuf+1
+	rshift pdata,pdata
+	and pdata,0x03,pdata
+	store 1,mem_24g_sta_pid
+	rtn
+
+	
+g24_ch:
+	fetcht 1,mem_24g_current_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_current_ch_number
+	rtn
+
+g24_ch_map_size:
+	call g24_ch_calc
+	increase 1,temp
+	and_into 3,temp //map size =4
+	rtn
+	
+g24_ch_calc:
+	fetch 1,mem_24g_addr	
+	and_into 0x03,pdata
+	mul32 pdata,4,rega			//24addr low bit0 bit1 ,00-map1,01-map2,10-map3,11-map4
+	setarg mem_24g_ch_map1
+	iadd rega,pdata
+	iadd temp,contr
+	ifetch 1,contr
+	store 1,mem_24g_ch
+	rtn
+
+
+g24_update_addr_and_synccrc8:
+	store 4,mem_24g_addr
+//output: 1BYTE crc8
+g24_syncword_crc8:
+	arg 0,rega
+	arg 4,loopcnt
+	arg mem_24g_addr,contr
+g24_syncword_crc8_loop:
+	ifetch 1,contr
+	iadd rega,rega
+	loop g24_syncword_crc8_loop
+	copy rega,pdata
+	store 2,mem_24g_syncword
+	fetch 1,mem_24g_syncword
+	fetcht 1,mem_24g_syncword+1
+	iadd temp,pdata
+	store 1,mem_24g_syncword_crc8
+	rtn
+
+
+g24_timer_check:
+	call disable_user
+	fetcht 4,mem_24g_tx_btclk
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall g24_timer_timeout,positive
+	copy pdata,regb
+	fetch 4,mem_24g_tx_btclk
+	fetcht 1,mem_24g_interval
+	iadd temp,temp
+	copy regb,pdata
+	isub temp,null
+	nrtn positive
+	set0 28,pdata
+	store 4,mem_24g_tx_btclk
+	branch enable_user
+g24_timer_timeout:
+	rtn zero
+	set1 28,pdata
+	rtn
+g24_timer_init:
+	setarg 0
+	store 4,mem_24g_tx_btclk
+	rtn
+
+
+
+//mem_24g_ch_map1:00 13 2c 42
+//mem_24g_ch_map2:06 15 36 48
+//mem_24g_ch_map3:0f 1a 3a 4c
+//mem_24g_ch_map4:11 23 31 4d
+g24_chmap_param_init:
+	setsect 0,0x1300
+	setsect 1,0x1908b
+	setsect 2,0x36150
+	setsect 3,0x3d20
+	store 9,mem_24g_ch_map1
+	setsect 0,0x3a1a
+	setsect 1,0xc453
+	setsect 2,0xd312
+	setsect 3,0x1
+	istore 7,contw
+	fetch 1,mem_24g_ch_map_update
+	rtn blank
+	arg mem_24g_ch_update_map1,contr
+	arg mem_24g_ch_map1,contw
+	branch memcpy16
+
+
+
+//mem_24g_ch_update_map1:00 1e 00 4e
+//mem_24g_ch_update_map2:03 23 03 42
+//mem_24g_ch_update_map3:06 25 06 4c
+//mem_24g_ch_update_map4:09 27 09 3c
+g24_chamap_param_update:
+	setarg 0x4e001e
+	store 3,mem_24g_ch_update_map1+1
+	setarg 0x032303
+	istore 3,contw
+	setarg 0x250642
+	istore 3,contw
+	setarg 0x094c06
+	istore 3,contw
+	setarg 0x3c0927
+	istore 3,contw
+	jam 1,mem_24g_ch_map_update
+	rtn
+
+
+g24_rx_window_init:
+	arg 0x6978,temp
+	bmark1 mark_24g_rxmode,g24_rx_window_store
+	arg 0x12c0,temp
+	fetch 1,mem_24g_rx_phy
+	bbit0 2,g24_rx_window_store	//uncoded phy
+	arg 0x2ee0,temp
+g24_rx_window_store:	
+	storet 2,mem_24g_rx_window
+	rtn
+
+g24_enable_1M:
+	jam 0x01,mem_24g_rx_phy
+	jam 0x01,mem_24g_tx_phy
+	rtn
+
+//g24_enable_2M:
+//	jam 0x02,mem_24g_rx_phy
+//	jam 0x02,mem_24g_tx_phy
+//	rtn
+//	
+//g24_enable_coded_s2:
+//	jam 0x04,mem_24g_rx_phy
+//	jam 0x04,mem_24g_tx_phy
+//	rtn
+
+//g24_enable_coded_s8:
+//	jam 0x84,mem_24g_rx_phy
+//	jam 0x84,mem_24g_tx_phy
+//	rtn
+
+
+/****************************g24 general func end********************************/
+
+
+
+/****************************g24 sim start********************************/
+/*
+g24_sim_rx:
+	set1 mark_24g_rxmode,mark
+	jam 1,mem_24g_rx_phy	//0x01:1M/0x02:2M/0x04:S2/0x84:S8
+	fetch 1,mem_24g_rx_phy
+	call le_enable_phy_by_pdata
+	jam 0,mem_24g_ch
+	setarg 0x123456
+	store 3,mem_24g_addr
+	istore 1,contw
+	call g24_syncword_crc8
+	setarg 0x3000
+	store 2,mem_24g_rx_window
+g24_sim_rx_loop:
+	call g24_receive_packet
+	call g24_read_len_pid_crc
+	call g24_end_of_packet
+	branch g24_sim_rx_loop
+
+g24_sim_tx:
+	jam 1,mem_24g_tx_phy
+	fetch 1,mem_24g_tx_phy
+	call le_enable_phy_by_pdata
+	jam 0,mem_24g_ch
+	setarg 0x123456
+	store 3,mem_24g_addr
+	istore 1,contw
+	call g24_syncword_crc8
+	jam 1,mem_24g_datalen
+	jam 1,mem_24g_txbuf
+	jam 0x88,mem_rssi_hex
+	call g24_transmit_prep
+g24_sim_tx_loop:
+	call g24_transmit
+	call g24_end_of_packet
+	branch g24_sim_tx_loop
+
+*/
+
+/****************************g24 sim end********************************/
+
+	
Index: mouse_public_3mode_usb/program/g24_protocol_stack/24g_pair.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_pair.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_pair.prog	(working copy)
@@ -0,0 +1,399 @@
+
+
+g24_pair_param_init:
+	jam 0x4e,mem_24g_pair_ch
+	setarg 0x101520
+	store 3,mem_24g_pair_addr
+	setarg 0x05
+	istore 1,contw
+	rtn
+
+
+
+/****************************g24 pair transmitter start********************************/
+
+g24_pair_timeout_timer:
+	arg mem_24g_pair_timeout,regc
+	arg g24_stop_24g_mode,regb
+	branch timer_single_step_2B
+
+g24_pair_start:
+	set1 mark_24g,mark
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_RECONN,pdata
+	set1 STATE_24G_PAIR,pdata
+	store 1,mem_24g_conn_sm
+	setarg 0
+	store 2,mem_24g_reconn_timeout
+	fetch 2,mem_24g_pair_timeout_init
+	store 2,mem_24g_pair_timeout
+	jam 0,mem_24g_pair_no_ack
+	call g24_pair_sm_reinit
+g24_pair_init_param:
+	jam 0,mem_24g_pid
+	fetch 1,mem_24g_pair_ch
+	store 1,mem_24g_ch
+	fetch 1,mem_24g_pair_tx_power
+	store 1,mem_tx_power
+	fetch 4,mem_24g_pair_addr
+	branch g24_update_addr_and_synccrc8
+
+
+g24_pair_dispatch:
+	bpatchx patch3c_2,mem_patch3c
+	fetch 1,mem_24g_pair_sm
+	beq STATE_24G_PAIRING_SUCCESS,g24_pair_exit
+	beq STATE_24G_PAIRING_1,g24_pair_sm_1
+	beq STATE_24G_PAIRING_2,g24_pair_sm_2
+	beq STATE_24G_PAIRING_3,g24_pair_sm_3
+	beq STATE_24G_PAIRING_4,g24_pair_sm_4
+	rtn
+
+g24_pair_sm_1:
+	jam DATATYPE_ATTEMP,mem_24g_txbuf
+	branch g24_pair_sm_prep
+
+g24_pair_sm_2:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_2_skip,blank
+	fetch 4,mem_24g_device_addr
+	call g24_update_addr_and_synccrc8	//use transmitter addr
+g24_pair_sm_2_skip:
+	jam DATATYPE_BIND,mem_24g_txbuf	
+	branch g24_pair_sm_prep
+
+g24_pair_sm_3:
+	jam DATATYPE_CONFIG,mem_24g_txbuf	
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_prep,blank
+	fetch 4,mem_24g_receiver_addr		//prep receiver addr
+	store 4,mem_24g_txbuf+2
+	branch g24_pair_sm_common
+
+g24_pair_sm_4:
+	jam DATATYPE_OK,mem_24g_txbuf
+g24_pair_sm_prep:
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+2
+g24_pair_sm_common:
+	fetch 1,mem_24g_data_type
+	and_into bits_data,pdata
+	store 1,mem_24g_txbuf+1
+	jam 0,mem_24g_txbuf+6
+	jam 7,mem_24g_datalen
+	call g24_transmit_prep
+	call g24_transmit_receive_ack
+	nrtn sync
+	nrtn user3
+	call g24_txbuf_clear
+	call g24_ackpayload_parse
+	bpatchx patch3c_3,mem_patch3c
+g24_pair_sm_common_next:
+	fetch 1,mem_24g_pair_sm
+	rtneq STATE_24G_PAIRING_SUCCESS
+	beq STATE_24G_PAIRING_1,g24_pair_sm_1_waiting_ack
+	beq STATE_24G_PAIRING_2,g24_pair_sm_2_waiting_ack
+	beq STATE_24G_PAIRING_3,g24_pair_sm_3_waiting_ack
+	beq STATE_24G_PAIRING_4,g24_pair_sm_4_waiting_ack
+	rtn
+
+g24_pair_sm_reinit:	
+	jam STATE_24G_PAIRING_2,mem_24g_pair_sm
+	fetch 1,mem_24g_pair_switch
+	rtn blank
+	jam STATE_24G_PAIRING_1,mem_24g_pair_sm
+	rtn
+
+g24_pair_sm_1_waiting_ack:
+	jam STATE_24G_PAIRING_2,mem_24g_pair_sm
+	branch g24_transmit_abandon
+	
+g24_pair_sm_2_waiting_ack:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_2_waiting_ack_skip,blank
+	fetch 4,mem_24g_rxpayload+2
+	store 4,mem_24g_receiver_addr
+g24_pair_sm_2_waiting_ack_skip:	
+	jam STATE_24G_PAIRING_3,mem_24g_pair_sm
+	branch g24_transmit_abandon
+
+g24_pair_sm_3_waiting_ack:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_3_waiting_ack_skip,blank
+	fetch 4,mem_24g_rxpayload+2
+	fetcht 4,mem_24g_device_addr
+	isub temp,null
+	nrtn zero
+g24_pair_sm_3_waiting_ack_skip:	
+	jam STATE_24G_PAIRING_4,mem_24g_pair_sm
+	branch g24_transmit_abandon	
+	
+g24_pair_sm_4_waiting_ack:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_4_waiting_ack_skip,blank
+	fetch 4,mem_24g_rxpayload+2
+	fetcht 4,mem_24g_receiver_addr
+	isub temp,null
+	nrtn zero
+g24_pair_sm_4_waiting_ack_skip:	
+	jam STATE_24G_PAIRING_SUCCESS,mem_24g_pair_sm
+	jam BT_EVT_24G_PAIRING_COMPLETE,mem_fifo_temp
+	call ui_ipc_send_event
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	fetch 4,mem_24g_rxpayload+2
+	call g24_update_addr_and_synccrc8
+g24_pair_exit:
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_PAIR,pdata
+	store 1,mem_24g_conn_sm
+	branch g24_transmit_abandon
+
+
+
+
+/****************************g24 pair transmitter end********************************/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/****************************g24 pair receiver start********************************/
+
+
+g24_bind_mode_enable:
+	jam DONGLE_BIND,mem_24g_work_mode
+	jam CLEAR_INIT,mem_24g_mode_init
+	rtn
+
+g24_bind_init:
+	fetch 1,mem_24g_mode_init
+	rtnbit1 DONGLE_BIND
+	set1 DONGLE_BIND,pdata
+	store 1,mem_24g_mode_init
+	setarg 0
+	store 3,mem_24g_device1_bind_step
+	store 4,mem_24g_transmitter_addr
+	jam 1,mem_24g_ackpayload_enable
+	branch g24_pair_init_param
+
+
+g24_bind_ackpayload_prep:
+	jam 1,mem_24g_ackpayload_enable
+	jam 0x08,mem_24g_datalen
+	arg mem_24g_bind_payload,contr
+	arg mem_24g_txbuf,contw
+	branch memcpy8
+
+
+g24_bind_data_process:
+	call g24_rx_interrupt_clear
+	call g24_receive_packet
+	nbranch g24_rx_interrupt_clear,user3
+	call g24_bind_data_parse
+	call g24_transmit_ack
+	call g24_bind_device_status_check
+	call dongle_kb_bind_soft_reset	
+	fetch 1,mem_24g_pair_switch
+	rtn blank
+	fetch 4,mem_24g_transmitter_addr
+	rtn blank
+	branch g24_update_addr_and_synccrc8
+
+g24_bind_data_error:
+	call g24_rx_interrupt_clear
+	branch g24_end_of_packet
+
+g24_bind_data_parse:
+	jam BIND_MODE_CONTINUE,mem_24g_bind_mode_continue	//about 400ms
+	arg mem_24g_rxbuf,contr
+	arg mem_24g_rxdata_temp,contw
+	call memcpy8
+	bpatchx patch3c_4,mem_patch3c
+	fetch 1,mem_24g_rxdata_temp+2
+	beq DATATYPE_BIND,g24_bind_first_step	//bind step 1
+	beq DATATYPE_CONFIG,g24_bind_second_step
+	beq DATATYPE_OK,g24_bind_third_step
+	beq DATATYPE_ATTEMP,g24_data_attemp
+	rtn
+
+
+g24_bind_first_step:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_bind_first_step_device1
+	beq DATATYPE_DEVICE2,g24_bind_first_step_device2
+	rtn
+
+g24_bind_first_step_device1:
+	jam 1,mem_24g_device1_bind_step
+g24_bind_dvc1_payload_cfg:
+	jam DATATYPE_DEVICE1,mem_24g_bind_payload
+g24_bind_payload_cfg:
+	jam 0x80,mem_24g_bind_payload+1
+	fetch 6,mem_lap
+	store 6,mem_24g_bind_payload+2
+	rtn
+
+g24_bind_first_step_device2:
+	jam 1,mem_24g_device2_bind_step
+g24_bind_dvc2_payload_cfg:
+	jam DATATYPE_DEVICE2,mem_24g_bind_payload
+	branch g24_bind_payload_cfg
+
+
+g24_bind_second_step:
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_second_step_skip,blank
+	fetch 4,mem_24g_rxdata_temp+4
+	fetcht 4,mem_lap
+	isub temp,null
+	nrtn zero
+g24_bind_second_step_skip:	
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_bind_second_step_device1
+	beq DATATYPE_DEVICE2,g24_bind_second_step_device2
+	rtn
+
+g24_bind_second_step_device1:
+	fetch 1,mem_24g_device1_bind_step
+	beq 1,g24_bind_dvc1_step_set2
+	rtn
+g24_bind_dvc1_step_set2:
+	jam 2,mem_24g_device1_bind_step
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_dvc1_payload_cfg,blank
+g24_bind_dvc1_payload_cfg_transmitter_addr:
+	jam DATATYPE_DEVICE1,mem_24g_bind_payload
+g24_bind_payload_cfg_transmitter_addr:
+	jam 0x80,mem_24g_bind_payload+1
+	fetch 4,mem_24g_transmitter_addr
+	store 4,mem_24g_bind_payload+2
+	branch enable_user
+
+g24_bind_second_step_device2:
+	fetch 1,mem_24g_device2_bind_step
+	beq 1,g24_bind_dvc2_step_set2
+	rtn
+g24_bind_dvc2_step_set2:
+	jam 2,mem_24g_device2_bind_step
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_dvc2_payload_cfg,blank	
+	jam DATATYPE_DEVICE2,mem_24g_bind_payload
+	branch g24_bind_payload_cfg_transmitter_addr
+
+
+g24_bind_third_step:
+	fetch 1,mem_24g_pair_switch
+	branch g24_bind_third_step_skip,blank
+	fetch 4,mem_24g_rxdata_temp+4
+	fetcht 4,mem_24g_transmitter_addr
+	isub temp,null
+	nrtn zero
+g24_bind_third_step_skip:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_bind_third_step_device1
+	beq DATATYPE_DEVICE2,g24_bind_third_step_device2
+	rtn
+
+g24_bind_third_step_device1:
+	fetch 1,mem_24g_device1_bind_step
+	beq 2,g24_bind_dvc1_step_success
+	rtn
+g24_bind_dvc1_step_success:
+	call g24_binding_dvc1_living	//works on auto pair only
+	call g24_bind_dvc1_payload_cfg
+	fetch 1,mem_24g_bind_device_status
+	or_into 0x01,pdata
+	store 1,mem_24g_bind_device_status
+g24_bind_exit:
+	setarg 0
+	store 2,mem_24g_device1_bind_step
+	rtn
+	
+g24_bind_third_step_device2:
+	fetch 1,mem_24g_device2_bind_step
+	bne 0,g24_bind_dvc2_step_success
+	rtn
+g24_bind_dvc2_step_success:
+	call g24_binding_dvc2_living	//works on auto pair only
+	call g24_bind_dvc2_payload_cfg
+	fetch 1,mem_24g_bind_device_status
+	or_into 0x02,pdata
+	store 1,mem_24g_bind_device_status
+	call g24_bind_exit
+	branch dongle_g24_store_dvc2_bind_flag
+
+g24_binding_device_check:	//works on auto pair
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_rxbuf+3
+	beq DATATYPE_DEVICE1,g24_binding_dvc1_status	//bit0
+	beq DATATYPE_DEVICE2,g24_binding_dvc2_status	//bit1
+	rtn
+g24_binding_dvc1_status:
+	fetch 1,mem_24g_bind_device_living
+	rtnbit0 0
+disable_user3:
+	disable user3
+	rtn 
+g24_binding_dvc2_status:
+	fetch 1,mem_24g_bind_device_living
+	rtnbit0 1
+	branch disable_user3
+
+g24_binding_dvc1_living:
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_bind_device_living
+	or_into 0x01,pdata
+	store 1,mem_24g_bind_device_living
+	rtn
+
+g24_binding_dvc2_living:
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_bind_device_living
+	or_into 0x02,pdata
+	store 1,mem_24g_bind_device_living
+	rtn
+
+
+g24_bind_device_status_check:
+	fetch 1,mem_24g_bind_device_status
+	rtn blank
+g24_bind_device_status:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_binding_dvc1_living
+	beq DATATYPE_DEVICE2,g24_binding_dvc2_living
+	rtn
+
+
+
+/****************************g24 pair receiver end********************************/
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: mouse_public_3mode_usb/program/g24_protocol_stack/24g_receiver.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_receiver.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_receiver.prog	(working copy)
@@ -0,0 +1,555 @@
+
+g24_receive_init:
+	set1 mark_24g_rxmode,mark
+	fetch 1,mem_tx_power
+	store 1,mem_tx_power_temp
+	call g24_rx_window_init
+	branch rssi_receiver_buff_init
+
+g24_receive_dispatch:
+	fetch 2,mem_cb_24g_receive_process
+	branch callback_func
+
+g24_ackpayload_prep:
+	jam 0,mem_24g_datalen
+	fetch 1,mem_24g_ackpayload_enable
+	rtn blank
+	fetch 2,mem_cb_24g_ackpayload
+	branch callback_func
+
+
+g24_receive_packet_start:
+	call g24_receive_transmit_ack
+	nbranch g24_rx_interrupt_clear,user3
+g24_receive_packet_parse:
+	call g24_receive_packet_parse_pid_crc
+	nbranch g24_rx_interrupt_clear,user
+	fetch 1,mem_24g_rxdata_length
+	branch g24_rx_interrupt_clear,blank
+	increase 2,pdata
+	iforce loopcnt
+	arg mem_24g_rxbuf,contr
+	arg mem_24g_rxdata_temp,contw
+	call memcpy
+	jam 0,mem_24g_mode_switch
+	fetch 1,mem_24g_pair_mode
+	call g24_enable_nodata_timer,blank
+	fetch 1,mem_24g_rxdata_temp+2
+	beq DATATYPE_DEVICE1,g24_data_device1	//mouse
+	beq DATATYPE_DEVICE2,g24_data_device2	//keyboard
+	beq DATATYPE_ATTEMP,g24_data_receive_attemp	//reconn packet
+g24_rx_interrupt_clear:
+	arg mem_24g_rxbuf,contw
+	arg 66,loopcnt
+	branch clear_mem
+
+g24_data_receive_attemp:
+	call g24_bind_device_status		//works on auto pair only
+	branch g24_data_attemp
+
+g24_data_device1:
+	call g24_binding_dvc1_living	//works on auto pair only
+	call g24_ch_timer_reinit
+	fetch 1,mem_24g_abort_packet
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_abort,temp
+	setflag true,0,pdata
+	store 1,mem_24g_abort_packet
+	beq 1,g24_data_attemp_device1_abort
+	fetch 1,mem_24g_hop_packet
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_hop,temp
+	setflag true,0,pdata
+	store 1,mem_24g_hop_packet
+	fetch 2,mem_cb_24g_data_device1
+	branch callback_func
+
+g24_data_device2:
+	call g24_binding_dvc2_living	//works on auto pair only
+	fetcht 1,mem_24g_rxdata_temp
+	isolate1 bit_abort,temp
+	branch g24_data_attemp_device2_abort,true
+	fetch 2,mem_cb_24g_data_device2
+	branch callback_func
+
+g24_data_attemp_device1_abort:
+	fetch 1,mem_device_option
+	sub pdata,dvc_op_car,null
+	call car_stop_blink,zero
+	fetch 4,mem_24g_rxdata_temp+10
+	branch g24_store_device1_addr
+g24_data_attemp_device2_abort:
+	fetch 4,mem_24g_rxdata_temp+10
+	branch g24_store_device2_addr	
+
+
+g24_receive_packet_parse_pid_crc:
+	call disable_user
+	fetch 1,mem_24g_sta_pid
+	fetcht 1,mem_24g_last_pid
+	isub temp,null
+	ncall enable_user,zero
+	fetch 1,mem_24g_sta_pid
+	store 1,mem_24g_last_pid
+	fetch 3,mem_24g_sta_crc
+	fetcht 3,mem_24g_last_crc
+	isub temp,null
+	ncall enable_user,zero
+	fetch 3,mem_24g_sta_crc
+	store 3,mem_24g_last_crc
+	rtn
+
+g24_receive_transmit_ack:
+	call g24_rx_interrupt_clear
+	call g24_receive_packet
+	nrtn user3
+g24_transmit_ack:
+//data type
+	fetch 1,mem_24g_rxbuf
+	store 1,mem_24g_data_type
+//read len pid crc
+	call g24_read_len_pid_crc
+//read ack
+	fetch 1,mem_24g_rxbuf+1
+	isolate1 bit_ack_24g,pdata
+	branch g24tx_no_ack,true
+g24tx_with_ack:
+	call g24_ackpayload_prep
+	call g24_transmit_prep
+	call g24_transmit
+g24tx_no_ack:
+	branch g24_end_of_packet
+
+
+g24_enable_nodata_timer:
+	jam 1,mem_24g_nodata_timer_enable
+g24_enable_nodata_timer_init:
+	setarg TIMER_NODATA_DELAY
+	arg TIMER_NODATA,queue
+	branch timer_init
+
+
+
+/****************************g24 receiver mode switch start********************************/
+
+g24_mode_switch_init:
+	jam 1,mem_24g_mode_switch
+	jam 0,mem_24g_time_slice
+	jam 0xff,mem_24g_interval
+	branch g24_timer_init
+	
+g24_mode_switch_bind_work:
+	bpatchx patch3c_5,mem_patch3c
+	fetch 1,mem_24g_mode_switch
+	rtn blank
+	call g24_timer_check
+	nrtn user	//80ms
+	call g24_bind_mode_continue
+	fetch 1,mem_24g_time_slice
+	increase 1,pdata
+	and_into 1,pdata
+	store 1,mem_24g_time_slice
+	beq 0,g24_work_mode_switch
+	beq 1,g24_bind_mode_switch
+	rtn
+
+g24_bind_mode_continue:
+	fetch 1,mem_24g_bind_mode_continue
+	rtn blank
+	increase -1,pdata
+	store 1,mem_24g_bind_mode_continue
+	rtn
+
+g24_work_mode_switch:
+	fetch 1,mem_24g_bind_mode_continue
+	nrtn blank
+	branch g24_switch_work_mode
+
+g24_bind_mode_switch:
+	fetch 1,mem_24g_bind_mode_continue
+	nrtn blank
+	branch g24_bind_mode_enable
+
+
+g24_mode_B_S_switch_init:	//bind and search
+	fetch 1,mem_24g_B_S_mode_switch_disable
+	nrtn blank
+	fetch 1,mem_24g_mode_B_S_switch_exit
+	call g24_mode_B_S_switch_start,blank
+	fetch 1,mem_24g_mode_B_S_switch_init
+	rtnbit1 0
+	set1 0,pdata
+	store 1,mem_24g_mode_B_S_switch_init
+	jam 1,mem_24g_mode_B_S_switch
+	jam 0,mem_24g_B_S_time_slice
+	setarg 0
+	store 2,mem_24g_mode_B_S_switch_cnt
+	jam 0x60,mem_24g_interval	//30ms
+	branch g24_timer_init
+
+g24_mode_switch_bind_search:
+	fetch 1,mem_24g_work_mode
+	rtneq DONGLE_WORK
+	fetch 1,mem_24g_B_S_mode_switch_disable
+	nrtn blank
+	fetch 1,mem_24g_mode_B_S_switch_exit
+	nrtn blank
+	fetch 1,mem_24g_mode_B_S_switch
+	rtn blank
+	call g24_timer_check
+	nrtn user
+	fetch 2,mem_24g_mode_B_S_switch_cnt
+	increase 1,pdata
+	store 2,mem_24g_mode_B_S_switch_cnt
+	arg 0x7d0,temp	//1min
+	isub temp,null
+	branch g24_mode_B_S_switch_exit,positive
+	call g24_bind_mode_continue
+	fetch 1,mem_24g_B_S_time_slice
+	increase 1,pdata
+	and_into 1,pdata
+	store 1,mem_24g_B_S_time_slice
+	beq 0,g24_mode_switch_search
+	beq 1,g24_bind_mode_enable
+	rtn
+
+g24_mode_switch_search:
+	fetch 1,mem_24g_bind_mode_continue
+	nbranch g24_bind_mode_enable,blank
+	branch g24_search_mode_enable
+
+g24_mode_B_S_switch_exit:
+	jam 1,mem_24g_mode_B_S_switch_exit
+	branch g24_search_mode_enable
+
+g24_mode_B_S_switch_stop:
+	jam 0,mem_24g_mode_B_S_switch
+	rtn
+g24_mode_B_S_switch_start:
+	jam 1,mem_24g_mode_B_S_switch
+	rtn
+
+
+
+/****************************g24 receiver mode switch end********************************/
+
+
+
+
+/****************************g24 receiver work mode start********************************/
+
+g24_work_init:
+	fetch 1,mem_24g_mode_init
+	rtnbit1 DONGLE_WORK
+	set1 DONGLE_WORK,pdata
+	store 1,mem_24g_mode_init
+	fetch 1,mem_tx_power_temp
+	store 1,mem_tx_power
+	jam 0,mem_24g_ackpayload_enable
+	jam 0,mem_usb_tx_enable
+	jam 1,mem_24g_abort_packet
+	jam 0,mem_24g_pid
+	fetch 4,mem_lap
+	call g24_update_addr_and_synccrc8
+	call g24_ch
+	branch g24_rx_interrupt_clear
+
+
+g24_switch_work_mode:
+	jam 0,mem_24g_ackpayload_enable
+g24_work_mode_enable:
+	jam DONGLE_WORK,mem_24g_work_mode
+	jam CLEAR_INIT,mem_24g_mode_init	
+	rtn
+
+
+g24_work_mode_start:
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_WORK
+	call g24_work_init
+	call g24_ch_process
+	branch g24_receive_packet_start
+
+
+
+/****************************g24 receiver work mode end********************************/
+
+
+
+
+
+
+/****************************g24 receiver bind mode start********************************/
+
+g24_bind_mode_auto:
+	bpatchx patch3c_6,mem_patch3c
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_BIND
+	call g24_bind_init
+	call g24_bind_data_process
+	fetch 1,mem_24g_pair_mode
+	nrtn blank
+	fetch 1,mem_24g_bind_device_status
+	rtn blank
+	jam 0,mem_24g_mode_switch
+	call g24_switch_work_mode
+	call g24_enable_nodata_timer
+	branch g24_timer_init
+
+
+/****************************g24 receiver bind mode end********************************/
+
+
+
+
+
+
+/****************************g24 receiver search mode start********************************/
+
+g24_search_mode_init:
+	fetch 1,mem_24g_mode_init
+	rtnbit1 DONGLE_SEARCH
+	set1 DONGLE_SEARCH,pdata
+	store 1,mem_24g_mode_init
+	jam 0,mem_24g_time_slice
+	jam 1,mem_24g_ackpayload_enable
+	setarg 0
+	store 3,mem_rssi_noise_self_index
+	store 7,mem_24g_self_config_ch_once
+	call g24_receiver_addr_check
+	nrtn zero
+	fetch 1,mem_24g_current_ch_number
+	store 1,mem_24g_self_ch_number
+	fetch 1,mem_24g_ch
+	store 1,mem_24g_self_last_ch
+	rtn
+
+
+g24_search_mode_auto:
+	bpatchx patch3c_7,mem_patch3c
+	fetch 1,mem_24g_work_mode
+	rtnne DONGLE_SEARCH
+	call g24_search_mode_init
+	call g24_auto_addr_ch_search
+	call g24_receive_transmit_ack
+	nbranch g24_rx_interrupt_clear,user3
+	//dongle addr,then parse rxdata
+	call g24_receiver_addr_check
+	call g24_receive_packet_parse,zero
+
+	fetch 1,mem_24g_abort_packet
+	call g24_mode_B_S_switch_stop,blank	//works on auto pair only
+	
+	//receive data,then go to paired
+	jam DONGLE_WORK,mem_24g_work_mode
+	fetch 1,mem_24g_mode_init
+	set1 DONGLE_WORK,pdata
+	store 1,mem_24g_mode_init
+
+	fetch 1,mem_24g_ackpayload_enable
+	sub pdata,2,null
+	ncall g24_ackpayload_disable,zero
+
+	call g24_rx_interrupt_clear
+	call g24_enable_nodata_timer
+	call g24_receiver_addr_check
+	branch g24_self_ch_num_reinit,zero
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_device2_addr
+	isub temp,null
+	branch g24_device2_ch_num_reinit,zero		
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_24g_device1_addr
+	isub temp,null
+	branch g24_device1_ch_num_reinit,zero
+	rtn
+
+
+g24_self_ch_num_reinit:
+	fetch 1,mem_24g_self_ch_number
+g24_current_ch_num_reinit:
+	store 1,mem_24g_current_ch_number
+	rtn
+
+g24_device2_ch_num_reinit:
+	fetch 1,mem_24g_device2_ch_number
+	branch g24_current_ch_num_reinit
+
+g24_device1_ch_num_reinit:
+	fetch 1,mem_24g_device1_ch_number
+	branch g24_current_ch_num_reinit
+
+
+g24_auto_addr_ch_search:
+	fetch 1,mem_24g_time_slice
+	increase 1,pdata
+	and_into 3,pdata
+	store 1,mem_24g_time_slice
+	//pairing address and channel come first
+	beq 0,g24_auto_bind_config_device2
+	beq 1,g24_auto_bind_config_self
+	beq 2,g24_auto_bind_config_device1
+	beq 3,g24_auto_bind_config_self
+	rtn
+
+g24_auto_bind_config_device1:
+	call g24_bind_dvc1_payload_cfg
+	fetch 4,mem_24g_device1_addr
+	branch g24_auto_addr_ch_search,blank
+	call g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_device1_config_ch_once
+	call g24_device1_config_ch_once,blank
+	fetch 1,mem_24g_device1_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_device1_index
+	fetchr rega,2,mem_rssi_noise_device1_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_device1_index
+	call rssi_average
+	storet 1,mem_rssi_noise_device1_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_device1_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_device1_ch_number
+	store 1,mem_24g_device1_last_ch
+	rtn
+
+g24_device1_config_ch_once:
+	jam 1,mem_24g_device1_config_ch_once
+	arg 0,temp
+	call g24_ch_calc
+	store 1,mem_24g_device1_last_ch
+	rtn
+	
+g24_auto_bind_config_device2:
+	call g24_bind_dvc2_payload_cfg
+	fetch 4,mem_24g_device2_addr
+	branch g24_auto_addr_ch_search,blank
+	call g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_device2_config_ch_once
+	call g24_device2_config_ch_once,blank
+	fetch 1,mem_24g_device2_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_device2_index
+	fetchr rega,2,mem_rssi_noise_device2_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_device2_index
+	call rssi_average
+	storet 1,mem_rssi_noise_device2_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_device2_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_device2_ch_number
+	store 1,mem_24g_device2_last_ch
+	rtn
+
+g24_device2_config_ch_once:
+	jam 1,mem_24g_device2_config_ch_once
+	arg 0,temp
+	call g24_ch_calc
+	store 1,mem_24g_device2_last_ch
+	rtn	
+
+g24_auto_bind_config_self:
+	call g24_bind_dvc1_payload_cfg
+	fetch 4,mem_lap
+	call g24_update_addr_and_synccrc8
+	fetch 1,mem_24g_self_config_ch_once
+	call g24_self_config_ch_once,blank
+	fetch 1,mem_24g_self_last_ch
+	store 1,mem_24g_ch
+	fetcht 1,mem_rssi_noise_self_index
+	fetchr rega,2,mem_rssi_noise_self_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_self_index
+	call rssi_average
+	storet 1,mem_rssi_noise_self_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	fetcht 1,mem_24g_self_ch_number
+	call g24_ch_map_size
+	storet 1,mem_24g_self_ch_number
+	store 1,mem_24g_self_last_ch
+	rtn
+
+g24_self_config_ch_once:
+	jam 1,mem_24g_self_config_ch_once
+	fetch 1,mem_24g_self_last_ch
+	store 1,mem_24g_ch
+	rtn
+
+
+g24_ackpayload_disable:
+	jam 0,mem_24g_ackpayload_enable
+	rtn
+
+
+g24_receiver_addr_check:
+	fetch 4,mem_24g_addr
+	fetcht 4,mem_lap
+	isub temp,null
+	rtn
+
+/****************************g24 receiver search mode end********************************/
+
+
+
+
+
+
+/****************************g24 receiver nodata process start********************************/
+
+
+g24_nodata_process:
+	fetch 1,mem_24g_ackpayload_enable
+	rtneq 2
+	fetch 1,mem_24g_nodata_timer_enable
+	rtn blank
+	arg TIMER_NODATA,queue
+	call timer_check
+	nrtn blank
+	jam 0,mem_24g_nodata_timer_enable
+	jam 0,mem_24g_bind_mode_continue
+	call g24_mode_B_S_switch_init	//works on auto pair only	
+	//no data for more than 100ms,then go to search
+g24_search_mode_enable:	
+	jam DONGLE_SEARCH,mem_24g_work_mode
+	jam CLEAR_INIT,mem_24g_mode_init
+	branch g24_rx_interrupt_clear
+
+
+/****************************g24 receiver nodata process end********************************/
+
+
+g24_ch_process:
+	fetch 1,mem_24g_abort_packet
+	beq 1,rssi_noise_monitor
+	fetch 1,mem_24g_hop_packet
+	beq 1,g24_ch_receive_hop_pac
+	fetcht 4,mem_24g_hop_btclk
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall g24_timer_timeout,positive
+	copy pdata,regb
+	fetch 4,mem_24g_hop_btclk
+	fetcht 1,mem_24g_hop_interval
+	iadd temp,temp
+	copy regb,pdata
+	isub temp,null
+	nrtn positive
+	set0 28,pdata
+	store 4,mem_24g_hop_btclk
+	jam 1,mem_24g_abort_packet
+	branch g24_ch
+
+g24_ch_receive_hop_pac:
+	jam 0,mem_24g_hop_packet
+	branch g24_ch
+
+g24_ch_timer_reinit:
+	copy clkn_bt,pdata
+	store 4,mem_24g_hop_btclk
+	rtn
+
Index: mouse_public_3mode_usb/program/g24_protocol_stack/24g_reconn.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_reconn.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_reconn.prog	(working copy)
@@ -0,0 +1,162 @@
+
+/****************************g24 reconn transmitter start********************************/
+
+g24_reconn_timeout_timer:
+	arg mem_24g_reconn_timeout,regc
+	arg g24_stop_24g_mode,regb
+	branch timer_single_step_2B
+
+
+g24_reconn_start:
+	bpatchx patch3d_0,mem_patch3d
+	set1 mark_24g,mark
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_PAIR,pdata
+	set1 STATE_24G_RECONN,pdata
+	store 1,mem_24g_conn_sm
+	fetch 1,mem_24g_fast_conn_enable
+	branch g24_reconn_receiver_addr,blank
+	fetch 1,mem_24g_reconn_type
+	beq FAST_CONN_AND_RECEIVER,g24_reconn_fast_conn
+	beq FAST_CONN_AND_3_0_ADDR,g24_reconn_fast_conn
+	beq RECEIVER_AND_3_0_ADDR,g24_reconn_device_3_0_addr
+	beq PAIR_AND_3_0_ADDR,g24_reconn_device_3_0_addr
+g24_reconn_fast_conn:
+	fetch 1,mem_24g_pair_tx_power
+	store 1,mem_tx_power
+	fetcht 1,mem_24g_fast_conn_temp_ch
+	storet 1,mem_24g_current_ch_number
+	fetch 4,mem_24g_fast_conn_addr
+	call g24_ch_syncword_crc8_init
+	storet 1,mem_24g_fast_conn_temp_ch
+	rtn
+	 
+g24_reconn_receiver_addr:
+	jam TX_POWER_3DB,mem_tx_power
+	fetcht 1,mem_24g_receiver_temp_ch
+	storet 1,mem_24g_current_ch_number
+	fetch 4,mem_24g_receiver_addr
+	call g24_ch_syncword_crc8_init
+	storet 1,mem_24g_receiver_temp_ch
+	rtn
+
+g24_reconn_device_3_0_addr:
+	jam TX_POWER_3DB,mem_tx_power
+	fetcht 1,mem_24g_device_temp_ch
+	storet 1,mem_24g_current_ch_number
+	fetch 4,mem_24g_device_addr
+	call g24_ch_syncword_crc8_init
+	storet 1,mem_24g_device_temp_ch
+	rtn	
+
+g24_store_receiver_addr:
+	fetch 4,mem_24g_rxpayload+2
+	store 4,mem_24g_receiver_addr	
+g24_ch_syncword_crc8_init:	
+	call g24_update_addr_and_synccrc8
+	branch g24_ch
+
+
+g24_reconn_dispatch:
+	bpatchx patch3d_1,mem_patch3d
+	call g24_reconn_data_prep
+	call g24_transmit_receive_ack
+	nbranch g24_reconn_device_fail,sync
+	nbranch g24_reconn_device_fail,user3
+	call g24_ackpayload_parse
+g24_reconn_receiver_succ:
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_RECONN,pdata
+	store 1,mem_24g_conn_sm
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	store 2,mem_24g_reconn_count
+	store 2,mem_24g_reconn_timeout	
+	fetch 4,mem_24g_pair_addr
+	fetcht 4,mem_24g_addr
+	isub temp,null
+	branch g24_pair_start,zero
+	fetch 4,mem_24g_device_addr
+	fetcht 4,mem_24g_addr
+	isub temp,null
+	call g24_store_receiver_addr,zero
+g24_reconn_attempt_success:
+	jam BT_EVT_24G_ATTEMPT_SUCCESS,mem_fifo_temp
+	call ui_ipc_send_event
+g24_txbuf_clear:
+	arg 4,loopcnt
+	arg mem_24g_txbuf,contw
+	branch memset0
+
+g24_reconn_data_prep:
+	jam DATATYPE_ATTEMP,mem_24g_txbuf
+	fetch 1,mem_24g_data_type
+	store 1,mem_24g_txbuf+1
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+2
+	jam 6,mem_24g_datalen
+	branch g24_transmit_prep
+
+g24_reconn_device_fail:
+	fetch 1,mem_24g_fast_conn_enable
+	branch g24_ch,blank
+	fetch 2,mem_24g_reconn_count
+	increase 1,pdata
+	store 2,mem_24g_reconn_count
+	isolate1 3,pdata	// each 8 times switch
+	fetch 1,mem_24g_reconn_type
+	beq FAST_CONN_AND_RECEIVER,g24_reconn_fast_conn_and_receiver
+	beq FAST_CONN_AND_3_0_ADDR,g24_reconn_fast_conn_and_3_0
+	beq RECEIVER_AND_3_0_ADDR,g24_reconn_receiver_and_3_0
+	beq PAIR_AND_3_0_ADDR,g24_reconn_pair_and_3_0
+	branch g24_reconn_receiver_addr
+
+
+g24_reconn_fast_conn_and_receiver:
+	branch g24_reconn_receiver_addr,true
+	branch g24_reconn_fast_conn
+
+g24_reconn_fast_conn_and_3_0:
+	branch g24_reconn_device_3_0_addr,true
+	branch g24_reconn_fast_conn
+	
+g24_reconn_receiver_and_3_0:
+	branch g24_reconn_device_3_0_addr,true
+	branch g24_reconn_receiver_addr
+
+g24_reconn_pair_and_3_0:
+	branch g24_pair_init_param,true
+	branch g24_reconn_device_3_0_addr
+
+
+/****************************g24 reconn transmitter end********************************/
+
+
+
+
+
+/****************************g24 reconn receiver start********************************/
+
+g24_data_attemp:
+	fetch 1,mem_24g_rxdata_temp+3
+	beq DATATYPE_DEVICE1,g24_data_attemp_device1
+	beq DATATYPE_DEVICE2,g24_data_attemp_device2
+	rtn
+g24_data_attemp_device1:
+	fetch 4,mem_24g_rxdata_temp+4
+	store 4,mem_24g_transmitter_addr
+g24_store_device1_addr:
+	store 4,mem_24g_device1_addr
+	rtn
+g24_data_attemp_device2:
+	fetch 4,mem_24g_rxdata_temp+4
+	store 4,mem_24g_transmitter_addr	
+g24_store_device2_addr:
+	store 4,mem_24g_device2_addr
+	rtn
+
+/****************************g24 reconn receiver end********************************/
+
+
+
+
Index: mouse_public_3mode_usb/program/g24_protocol_stack/24g_rssi.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_rssi.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_rssi.prog	(working copy)
@@ -0,0 +1,109 @@
+
+/****************************g24 rssi general start********************************/
+
+rssi_store:
+	copy rega,pdata
+	iadd temp,contw
+	fetch 1,mem_rssi
+	istore 1,contw
+	increase 1,temp
+	fetch 1,mem_rssi_buff_index	//buff len minus 1
+	iand temp,temp
+	rtn
+rssi_average:
+	fetch 1,mem_rssi_buff_index
+	increase 1,pdata
+	store 2,mem_loopcnt
+	copy pdata,loopcnt
+	copy rega,contr
+	arg 0,pdata
+rssi_average_loop:
+	ifetcht 1,contr
+	iadd temp,pdata
+	loop rssi_average_loop
+	fetcht 2,mem_loopcnt
+	idiv temp
+	call wait_div_end
+	quotient temp
+	rtnmark1 mark_24g_rxmode
+	copy temp,pdata
+	rtnmark0 mark_24g
+	call bcd
+	copy pdata,temp
+	rtn
+
+save_rssi_dec:
+	call save_rssi
+	branch rssi_hex2dec
+
+/****************************g24 rssi general end********************************/
+
+
+
+
+
+/****************************g24 transmitter rssi start********************************/
+rssi_transmitter_buff_init:
+	fetch 2,mem_rssi_signal_buf_ptr
+	branch rssi_buff_clear
+
+rssi_signal:
+	copy pdata,rega
+	fetcht 1,mem_rssi_signal_index
+	fetch 2,mem_rssi_signal_buf_ptr
+	iadd temp,contw
+	copy rega,pdata
+	istore 1,contw
+	increase 1,temp
+	fetch 1,mem_rssi_buff_index	//buff len minus 1
+	iand temp,temp
+	storet 1,mem_rssi_signal_index
+	rtn
+
+/****************************g24 transmitter rssi end********************************/
+
+
+
+
+
+/****************************g24 receiver rssi start********************************/
+
+rssi_receiver_buff_init:
+	fetch 2,mem_rssi_noise_buffer_ptr
+	call rssi_buff_clear
+	fetch 2,mem_rssi_noise_self_buffer_ptr
+	call rssi_buff_clear
+	fetch 2,mem_rssi_noise_device1_buffer_ptr
+	call rssi_buff_clear
+	fetch 2,mem_rssi_noise_device2_buffer_ptr
+rssi_buff_clear:
+	rtn blank
+	copy pdata,contw
+	fetch 1,mem_rssi_buff_index
+	increase 1,pdata
+	copy pdata,loopcnt
+	branch clear_mem
+
+
+rssi_noise:
+	call save_rssi_dec
+	rtn blank
+	fetcht 1,mem_rssi_noise_index
+	fetchr rega,2,mem_rssi_noise_buffer_ptr
+	call rssi_store
+	storet 1,mem_rssi_noise_index
+	rtn
+
+
+rssi_noise_monitor:
+	fetchr rega,2,mem_rssi_noise_buffer_ptr
+	call rssi_average
+	storet 1,mem_rssi_noise_avg
+	sub temp,RSSI_THRESH_NOISE,null
+	nrtn positive
+	branch g24_ch
+
+
+/****************************g24 receiver rssi end********************************/
+
+	
Index: mouse_public_3mode_usb/program/g24_protocol_stack/24g_transmitter.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_transmitter.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_transmitter.prog	(working copy)
@@ -0,0 +1,380 @@
+
+
+g24_transmit_init:
+	fetch 4,mem_lap		//need to roll this address
+	store 4,mem_24g_device_addr
+	call g24_rx_window_init
+	branch rssi_transmitter_buff_init
+
+g24_interval_param_4ms:
+	setarg G24_4MS_INTERVAL_PARAM
+	store 3,mem_24g_short_sleep_set
+	setarg 0x100c0c
+	store 3,mem_24g_interval
+	setarg 0x00bb80
+	store 3,mem_24g_long_sleep_set
+	jam 5,mem_24g_fast_hop_count
+	rtn
+
+g24_interval_param_8ms:
+	setarg G24_8MS_INTERVAL_PARAM
+	store 3,mem_24g_short_sleep_set
+	setarg 0x1c1919
+	store 3,mem_24g_interval
+	setarg 0x017700
+	store 3,mem_24g_long_sleep_set
+	jam 11,mem_24g_fast_hop_count
+	rtn
+
+
+g24_transmit_dispatch:
+	rtnmark0 mark_24g
+	fetch 1,mem_24g_conn_sm
+	bbit1 STATE_24G_PAIR,g24_pair_dispatch
+	bbit1 STATE_24G_RECONN,g24_reconn_dispatch
+	fetch 1,mem_24g_transmit_by_interrupt
+	beq G24_TX_TIMER_INT_ENABLE,g24_transmit_by_interrupt
+g24_transmit_no_interrupt:
+	bpatchx patch3d_2,mem_patch3d
+	call g24_txdata_prep
+	nbranch g24_nodata_transmit,user
+g24_transmit_start:
+	call g24_transmit_process
+	call power_ctrl_start
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_24g_transmit_start
+g24_transmit_start_next:	
+	fetch 8,mem_24g_long_sleep_set
+	store 8,mem_24g_enter_hibernate
+	fetch 2,mem_24g_long_sleep_param_update_timer_init
+	store 2,mem_24g_long_sleep_param_update_timer
+g24_short_sleep:
+	call g24_lpm_wait
+	nrtn user
+	call clear_wake
+	fetch 3,mem_24g_short_sleep_set
+	branch g24_long_seep2
+
+
+
+
+/****************************g24 transmitter data prep start********************************/
+
+g24_txdata_prep:
+	call g24_package_data
+	nrtn user
+	branch g24_transmit_prep
+
+
+g24_package_data:
+	fetch 2,mem_cb_24g_transmit_data
+	call callback_func
+	branch g24_accumulate_data,user
+	fetch 7,mem_24g_txbuf+1	//mouse data
+	rtn blank
+	branch enable_user	// retransmit
+	
+g24_accumulate_data:
+	jam 0,mem_24g_abort_pac
+	add rega,1,pdata
+	store 1,mem_24g_datalen
+	call g24_transmit_rf_ctrl_clear
+	store 1,mem_24g_txbuf
+	copy regb,contr
+	copy rega,loopcnt
+	branch memcpy
+
+g24_transmit_rf_ctrl_clear:	
+	fetch 1,mem_24g_data_type
+	and_into bits_data,pdata
+	store 1,mem_24g_data_type
+	rtn
+
+/****************************g24 transmitter data prep end********************************/
+
+
+
+
+/****************************g24 transmitter data transmit start********************************/
+
+g24_transmit_process:
+	jam 0,mem_24g_retry
+g24_transmit_loop:
+	fetchr timeup,2,mem_param_rx_setup
+	until clkn_rt,meet
+	call g24_transmit_receive_ack
+	fetch 1,mem_24g_no_ack	//tx noack
+	beq no_ack_24g,g24_transmit_no_ack
+	nbranch g24_retransmit,sync
+	nbranch g24_retransmit,user3
+	call g24_ackpayload_parse
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_wakeup_24g
+g24_transmit_no_ack:
+	call power_ctrl_pac_succ_incrs
+g24_transmit_next_packet:
+	call g24_txbuf_clear
+	fetch 1,mem_24g_pid
+	increase 1,pdata
+	store 1,mem_24g_pid
+	call g24_hop_enable_packet
+g24_transmit_abandon:
+	setarg 0
+	store 1,mem_24g_ensure
+	store 2,mem_24g_txfail_cnt
+	rtn
+
+g24_transmit_receive_ack:
+	disable user3
+	call g24_transmit
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,g24_end_of_packet
+	force 0,radio_ctrl
+	fetch 4,mem_24g_addr
+	iforce access
+	call calc_mod_value_scale_le	
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	call rf_rx_enable
+	call g24_receive_rxon
+	call g24_end_of_packet,user3
+	rtn
+
+g24_retransmit:
+	fetch 1,mem_24g_abort_pac
+	nrtn blank
+	fetch 2,mem_24g_txfail_cnt
+	increase 1,pdata
+	store 2,mem_24g_txfail_cnt	
+	fetch 1,mem_24g_txfail_cnt+1
+	bbit1 4,g24_tx_attempt_fail
+	call g24_transmit_hop_process
+	branch g24_transmit_loop
+
+
+g24_ackpayload_parse:
+	call g24_read_len_pid_crc
+	fetch 1,mem_24g_rxdata_length	//ack payload length 
+	rtn blank
+	iforce loopcnt
+	arg mem_24g_rxbuf+2,contr
+	arg mem_24g_rxpayload,contw	//ack payload buffer 
+	branch memcpy
+
+
+g24_tx_attempt_fail:
+	setarg 0
+	store 2,mem_24g_txfail_cnt
+	jam 1,mem_24g_attempt_fail_flag
+g24_stop_24g_mode:	
+	jam BT_EVT_24G_ATTEMPT_FAIL,mem_fifo_temp
+	branch ui_ipc_send_event
+
+/****************************g24 transmitter data transmit end********************************/
+
+
+
+
+
+/****************************g24 transmitter hop start********************************/
+
+g24_transmit_hop_process:
+	bpatchx patch3d_3,mem_patch3d
+	fetcht 1,mem_24g_retry
+	fetch 1,mem_24g_fast_hop_count			// 125Hz=11  250Hz=5
+	isub temp,null
+	nbranch g24_tx_fast_hop,positive		// >= (6+6)or(3+3) hop fast    fail packet count >= 2
+	increase 1,temp
+	storet 1,mem_24g_retry
+	fetch 1,mem_24g_fast_hop_count
+	beq 5,g24_transmit_hop_process_4ms
+	fetch 1,mem_24g_retry
+	beq 6,g24_hop_ch_disable
+	beq 12,g24_hop_ch_disable
+	rtn	
+
+
+g24_transmit_hop_process_4ms:
+	fetch 1,mem_24g_retry
+	beq 3,g24_hop_ch_disable
+	beq 6,g24_hop_ch_disable
+	rtn	
+
+
+
+g24_hop_ch_enable:
+	//fetch 1,mem_24g_data_type
+	//set1 bit_hop,pdata
+	//store 1,mem_24g_data_type
+	//update txpayload
+g24_txpayload_type_update:	
+	bmark1 mark_ble_lr,g24_lr_type_update
+	store 1,mem_24g_txpayload+OFFSET_DATA_TYPE
+	rtn
+g24_lr_type_update:
+	store 1,mem_24g_txpayload+OFFSET_LR_DATA_TYPE
+	rtn
+
+g24_hop_enable_packet:
+	fetch 1,mem_24g_data_type
+	rtnbit0 bit_hop
+g24_hop_ch_disable:
+	fetch 1,mem_24g_data_type
+	set0 bit_hop,pdata
+	store 1,mem_24g_data_type
+	call g24_txpayload_type_update
+	call power_ctrl_pac_succ_decrs
+	branch g24_ch
+
+g24_tx_fast_hop:
+	call power_ctrl_txpower_incrs
+	call power_ctrl_pac_succ_decrs
+	branch g24_ch
+	
+/****************************g24 transmitter hop end********************************/
+
+
+
+
+
+
+
+
+
+
+
+
+
+/****************************g24 transmitter long lpm prep start********************************/
+
+g24_search_receiver:
+	fetch 2,mem_cb_24g_search_receiver
+	branch callback_func
+
+g24_nodata_transmit:
+	fetch 1,mem_24g_abort_pac
+	call g24_send_abort_packet,blank
+	fetch 1,mem_24g_transmit_by_interrupt
+	rtneq G24_TX_TIMER_INT_ENABLE
+	call g24_search_receiver
+	branch g24_long_sleep
+
+g24_send_abort_packet:
+	jam TYPE_MS,mem_24g_data_type
+	jam 1,mem_24g_abort_pac
+	call g24_transmit_rf_ctrl_clear
+	store 1,mem_24g_txbuf
+	setarg 0
+	store 7,mem_24g_txbuf+1
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+8
+	jam 12,mem_24g_datalen
+	fetch 1,mem_24g_data_type
+	set1 bit_abort,pdata
+	store 1,mem_24g_data_type
+	call g24_transmit_prep
+	branch g24_transmit_start
+	
+g24_long_sleep:
+	call g24_lpm_wait
+	nrtn user
+	fetch 8,mem_24g_enter_hibernate
+g24_long_seep2:
+	call clk2lpo
+	storet 4,mem_sleep_counter
+	branch lpm_sleep
+
+g24_lpm_wait:
+	bpatchx patch3d_4,mem_patch3d
+	enable user
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	branch disable_user,blank
+	fetch 1,mem_lpm_mode
+	branch disable_user,blank
+	fetch 1,mem_24g_transmit_by_interrupt
+	beq G24_TX_TIMER_INT_ENABLE,disable_user
+g24_setgpio_lpm_before:
+	fetch 2,mem_cb_24g_lpm_before
+	branch callback_func
+
+
+/****************************g24 transmitter long lpm prep end********************************/
+
+
+
+
+
+
+
+/****************************g24 transmit by interrupt start********************************/
+
+g24_transmit_by_interrupt:
+	call g24_timer_check
+	nrtn user
+	call g24_interval_calibrate
+	fetch 2,mem_24g_transmit_by_interrupt_exit_count
+	increase 1,pdata
+	store 2,mem_24g_transmit_by_interrupt_exit_count
+	fetcht 2,mem_24g_transmit_by_interrupt_exit_count_init
+	isub temp,null
+	call g24_transmit_by_interrupt_exit,zero
+	branch g24_transmit_no_interrupt
+
+	
+g24_transmit_by_interrupt_exit:
+	jam G24_TX_TIMER_INT_DISABLE,mem_24g_transmit_by_interrupt
+	setarg 0
+	store 2,mem_24g_transmit_by_interrupt_exit_count
+	setarg 100
+	store 2,mem_24g_transmit_by_interrupt_exit_count_init
+g24_interval_min:
+	jam 0,mem_24g_pac_index
+	fetch 1,mem_24g_interval_min
+g24_interval_store:
+	store 1,mem_24g_interval
+	rtn
+g24_interval_max:
+	fetch 1,mem_24g_interval_max
+	branch g24_interval_store
+	
+g24_interval_calibrate:
+	fetch 1,mem_24g_pac_index
+	increase 1,pdata
+	store 1,mem_24g_pac_index
+	beq 4,g24_interval_max
+	beq 5,g24_interval_min
+	rtn
+
+g24_transmit_by_interrupt_enable:
+	jam G24_TX_TIMER_INT_ENABLE,mem_24g_transmit_by_interrupt
+	setarg 0
+	store 2,mem_24g_transmit_by_interrupt_exit_count
+	rtn
+
+
+/****************************g24 transmit by interrupt end********************************/
+
+
+
+
+/****************************g24 transmitter fac check start********************************/
+
+g24_factory_check:
+	arg 2,loopcnt
+	arg mem_24g_addr,contr
+pdata_0xff_check:
+	call enable_user
+	setarg 0xffff
+pdata_0xff_check_loop:
+	ifetcht 2,contr
+	isub temp,null
+	ncall disable_user,zero
+	loop pdata_0xff_check_loop
+	rtn
+
+/****************************g24 transmitter fac check end********************************/
+
+
+
+	
Index: mouse_public_3mode_usb/program/g24_protocol_stack/24g_txpower_ctrl.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_txpower_ctrl.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/g24_protocol_stack/24g_txpower_ctrl.prog	(working copy)
@@ -0,0 +1,96 @@
+
+/****************************g24 transmitter tx power start********************************/
+
+power_ctrl_start:
+	bpatchx patch3d_5,mem_patch3d
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	rtnbit1 UI_STATE_BT_RECONNECT
+	rtnbit1 UI_STATE_BT_DISCOVERY
+	fetchr rega,2,mem_rssi_signal_buf_ptr
+	call rssi_average
+	storet 1,mem_rssi_avg_received
+power_ctrl_rssi_avg_compare:
+	fetch 1,mem_rssi_dis_max_24g
+	bmark1 mark_24g,power_ctrl_start_next
+	fetch 1,mem_rssi_dis_max_ble
+power_ctrl_start_next:
+	isub temp,null
+	nbranch power_ctrl_txpower_incrs_force,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	sub pdata,2,null
+	nbranch power_ctrl_txpower_decrs_check,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	beq 0,power_ctrl_txpower_incrs
+	rtn
+
+power_ctrl_txpower_decrs_check:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	fetcht 1,mem_power_ctrl_pac_succ_cnt_init
+	isub temp,null
+	nrtn zero
+	jam 0,mem_power_ctrl_pac_succ_cnt
+power_ctrl_txpower_decrs:
+	fetcht 1,mem_rssi_avg_received
+	fetch 1,mem_rssi_dis_min_24g
+	bmark1 mark_24g,power_ctrl_txpower_decrs_next
+	fetch 1,mem_rssi_dis_min_ble
+power_ctrl_txpower_decrs_next:	
+	isub temp,null
+	nrtn positive
+	fetch 1,mem_power_ctrl_level
+	beq 0,power_ctrl_decrs_level0
+	increase -1,pdata
+	store 1,mem_power_ctrl_level
+	beq 0,power_ctrl_decrs_level0
+power_ctrl_decrs_level1:
+power_ctrl_incrs_level1:	//0dBm
+	jam TX_POWER_0DB,mem_tx_power
+	rtn
+
+power_ctrl_txpower_incrs_force:
+	jam 0,mem_power_ctrl_pac_succ_cnt
+power_ctrl_txpower_incrs:
+	fetch 1,mem_power_ctrl_level
+	beq 2,power_ctrl_incrs_level2
+	increase 1,pdata
+	store 1,mem_power_ctrl_level
+	beq 1,power_ctrl_incrs_level1
+power_ctrl_incrs_level2:	//+6dBm
+	jam TX_POWER_6DB,mem_tx_power
+	rtn
+	
+power_ctrl_decrs_level0: //-5dBm
+	jam TX_POWER_f5DB,mem_tx_power
+	rtn
+
+power_ctrl_pac_succ_cnt_init:
+	jam 1,mem_power_ctrl_level
+	jam 0,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+power_ctrl_pac_succ_incrs:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	increase 1,pdata
+	store 1,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+power_ctrl_pac_succ_decrs:
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	sub pdata,2,null
+	ncall power_ctrl_pac_succ_cnt_reinit,positive
+	fetch 1,mem_power_ctrl_pac_succ_cnt
+	rtneq 0
+	increase -1,pdata
+	store 1,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+power_ctrl_pac_succ_cnt_reinit:
+	jam 3,mem_power_ctrl_pac_succ_cnt
+	rtn
+
+/****************************g24 transmitter tx power end********************************/
+
+
+
+
Index: mouse_public_3mode_usb/program/hci_main.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/hci_main.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/hci_main.prog	(working copy)
@@ -0,0 +1,320 @@
+/*********************************/
+/**********   HCI  *****************/
+/*********************************/
+
+hci_init:
+	clear_stack		//清空堆栈
+	call hci_init_clksel
+	call hci_init_uart_default_config
+	call hci_init_uart_config
+	call hci_init_pwm_default_config
+	call hci_init_pwm
+
+	jam 1,mem_hci_command_complete_num_hci_command_packet
+	jam HCI_H4_TYPE_EVENT,mem_hci_event_head_type
+
+hci_process_loop:
+	call hci_process_check_uart_rx
+	branch hci_process_loop
+
+
+hci_init_clksel:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_HCI_BOOT_CLKSEL
+	bbit1 7,hci_init_clksel_xtal
+hci_init_clksel_dpll:
+	jam 0xff,core_clkpll_ctrl1
+	nop 100
+	jam 0x0e,core_clkpll_ctrl2
+	jam 0x03,core_clkpll_ctrl0
+	jam clksel_dpll,core_clksel
+	rtn
+	
+hci_init_clksel_xtal:
+	jam clksel_xtal,core_clksel
+	rtn
+
+hci_init_uart_default_config:
+	call hci_init_uart_default_config_tx
+	call hci_init_uart_default_config_rx
+	call hci_init_uart_default_config_rts
+	branch hci_init_uart_default_config_cts
+
+hci_init_uart_default_config_tx:
+	fetch 1,mem_hci_uart_tx_gpio
+	nrtn blank
+	jam HCI_UART_TX_GPIO_NUM,mem_hci_uart_tx_gpio
+	rtn	
+
+hci_init_uart_default_config_rx:
+	fetch 1,mem_hci_uart_rx_gpio
+	nrtn blank
+	jam HCI_UART_RX_GPIO_NUM,mem_hci_uart_rx_gpio
+	rtn	
+hci_init_uart_default_config_rts:
+	fetch 1,mem_hci_uart_rts_gpio
+	nrtn blank
+	jam HCI_UART_RTS_GPIO_NUM,mem_hci_uart_rts_gpio
+	rtn	
+hci_init_uart_default_config_cts:
+	fetch 1,mem_hci_uart_cts_gpio
+	nrtn blank
+	jam HCI_UART_CTS_GPIO_NUM,mem_hci_uart_cts_gpio
+	rtn	
+
+
+hci_init_uart_config:
+	setarg mem_h5rx_buf
+	store 2,mem_pdatatemp
+	setarg mem_h5rx_buf_end
+	istore 2,contw
+	setarg mem_h5tx_buf
+	istore 2,contw
+	setarg mem_h5tx_buf_end
+	istore 2,contw	
+	fetch 8,mem_pdatatemp
+	call uarta_init_dma_mem
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_HCI_BOOT_CLKSEL
+	isolate1 7,pdata
+	call uart_clock_select_main_freq_crystal,true
+	ncall uart_clock_select_main_freq_dpll,true
+	arg 115200,temp
+	call uarta_calc_baud_rate_config
+	fetch 1,mem_hci_uart_tx_gpio
+	arg gpcfg_uart_txd,temp
+	call gpio_config_function_int
+	fetch 1,mem_hci_uart_rx_gpio
+	arg gpcfg_uart_rxd|gpcfg_pullup,temp
+	call gpio_config_function_int
+	fetch 1,mem_hci_uart_rts_gpio
+	arg gpcfg_uart_rts,temp
+	call gpio_config_function_int
+	fetch 1,mem_hci_uart_cts_gpio
+	arg gpcfg_uart_cts,temp
+	call gpio_config_function_int
+
+	arg FUN_UART_CONTROL_ENABLE|FUN_UART_CONTROL_SETTING_RATE_BAUD,temp
+	storet 1,core_uart_ctrl
+	branch clean_mem
+
+hci_init_pwm_default_config:
+	fetch 1,mem_hci_pwm_12mhz_gpio
+	nrtn blank
+	jam HCI_PMW_12MHZ_GPIO_NUM,mem_hci_pwm_12mhz_gpio
+	rtn	
+
+hci_init_pwm:
+	fetch 1,mem_hci_pwm_12mhz_gpio
+	arg gpcfg_pwm_out0,temp
+	call gpio_config_function_int
+	arg 0x40,rega
+	call pwm_init
+	arg 0,rega
+	arg 0,regb
+	setarg 0
+	call pwm_duty_cycle_set
+	arg 0,queue
+	branch pwm_set_select
+
+
+hci_process_check_uart_rx:
+	fetch 2,core_uart_rxitems
+	add pdata,-4,rega
+	nrtn positive
+	call uarta_prepare_rx
+	ifetch 1,contru
+	beq HCI_H4_TYPE_CMD,hci_parse_packet_cmd
+//	beq HCI_H4_TYPE_ACL,hci_parse_packet_acl
+	call delay_10ms
+	branch uarta_clear_current_rx
+
+//hci_parse_packet_acl:
+//	rtn
+hci_parse_packet_cmd:
+	ifetch 2,contru	// Opcode
+	store 2,mem_hci_opcode
+	arg 0x3ff,temp
+	iand temp,temp	//low 10bit
+	storet 2,mem_hci_opcode_ocf
+	rshift2 pdata,pdata
+	rshift8 pdata,pdata	//high 6bit
+	store 1,mem_hci_opcode_ogf
+	ifetch 1,contru	// parameter total length
+	pincrease -1		//大于等于
+	isub rega,null
+	rtn positive
+	call hci_parse_complete_packet
+	branch hci_drop_current_packet
+
+hci_parse_complete_packet:
+	fetch 1,mem_hci_opcode_ogf
+//	beq HCI_OGF_LINK_CONTROL,hci_parse_packet_cmd_ogf_link_control
+//	beq HCI_OGF_LINK_POLICY,hci_parse_packet_cmd_ogf_link_policy
+//	beq HCI_OGF_CONTROLLER_AND_BASEBAND,hci_parse_packet_cmd_ogf_controller_and_baseband
+//	beq HCI_OGF_INFOMATIONAL_PARAM,hci_parse_packet_cmd_ogf_infomational_parameters
+//	beq HCI_OGF_STATUS_PARAM,hci_parse_packet_cmd_ogf_status_parameters
+//	beq HCI_OGF_TEST,hci_parse_packet_cmd_ogf_testing
+//	beq HCI_OGF_LE_CONTROLLER,hci_parse_packet_cmd_ogf_le_controller
+	beq HCI_OGF_VENDOR_SPECIFIC_DEBUG,hci_parse_packet_cmd_ogf_vendorspecific_debug
+	branch hci_send_event_command_complete_error_command_nuknown
+
+//hci_parse_packet_cmd_ogf_link_control:
+//hci_parse_packet_cmd_ogf_link_policy:
+//hci_parse_packet_cmd_ogf_controller_and_baseband:
+//hci_parse_packet_cmd_ogf_infomational_parameters:
+//hci_parse_packet_cmd_ogf_status_parameters:
+//hci_parse_packet_cmd_ogf_testing:
+//hci_parse_packet_cmd_ogf_le_controller:
+
+hci_parse_packet_cmd_ogf_vendorspecific_debug:
+	bpatch patch1c_6,mem_patch1c
+	fetch 1,mem_hci_opcode_ocf
+	beq HCI_VENDOR_CMD_RESET,hci_normal_reply
+	beq HCI_VENDOR_CMD_CHIPID,phci_grp_vendor_chipid
+	beq HCI_VENDOR_CMD_BAUD,phci_grp_vendor_baud
+	beq HCI_VENDOR_CMD_PATCH,phci_grp_vendor_patch
+	beq HCI_VENDOR_CMD_PATCH_DONE,phci_grp_vendor_done
+	beq HCI_VENDOR_CMD_ECHO,hci_normal_reply
+	beq HCI_VENDOR_CMD_MEM,phci_grp_vendor_mem
+	beq HCI_VENDOR_CMD_SET_FLOW_CONTROL,phci_grp_vendor_flow_control
+	branch hci_normal_reply
+
+	
+phci_grp_vendor_chipid:
+	jam COMMAND_SUCCEEDED,mem_hci_command_complete_return_parameter
+	fetch 2,core_chipid
+	store 2,mem_hci_command_complete_return_parameter_chip_id
+	arg 3,loopcnt
+	branch hci_send_event_command_complete
+	
+phci_grp_vendor_baud:
+	ifetch 2,contu
+	store 2,core_uart_baud
+	rtn
+
+
+phci_grp_vendor_patch_common:
+	ifetch 1,contu
+	copy pdata,temp //check sum via temp
+	store 1,core_ucode_low
+	ifetch 1,contu
+	iadd temp,temp
+	set1 7,pdata
+	store 1,core_ucode_ctrl
+	ifetch 1,contu
+	iadd temp,temp
+	copy pdata,loopcnt
+	rtn
+	
+phci_grp_vendor_patch:
+	call phci_grp_vendor_patch_common
+phci_grp_vendor_patch_loop:
+	ifetch 1,contu
+	store 1,core_ucode_data
+	iadd temp,temp
+	loop phci_grp_vendor_patch_loop
+phci_grp_vendor_patch_check_sum:	
+	and temp,0xff,temp
+	ifetch 1,contu
+	isub temp,null
+	nbranch phci_grp_vendor_patch_bad,zero
+	branch hci_normal_reply
+
+phci_grp_vendor_done:
+	arg 0x20,loopcnt    //patch switch length
+	arg mem_patch00,contw
+	arg 0,temp //checksum
+phci_grp_vendor_done_loop:
+	ifetch 1,contu
+	istore 1,contw
+	iadd temp,temp
+	loop phci_grp_vendor_done_loop
+	and temp,0xff,temp
+	ifetch 1,contu
+	isub temp,null
+	nbranch phci_grp_vendor_patch_bad,zero
+	jam 0,core_ucode_ctrl
+	call hci_normal_reply
+	call wait_uarttx
+	branch soft_reset
+
+phci_grp_vendor_patch_bad:
+	jam 0,core_ucode_ctrl
+	branch hci_send_event_command_complete_error_command_nuknown
+	
+
+phci_grp_vendor_mem:
+	ifetch 1,contu
+	copy pdata,loopcnt
+	ifetch 2,contu
+	copy pdata,contw
+	call uart_copy_rx_bytes
+	branch hci_normal_reply
+
+phci_grp_vendor_flow_control:
+	fetch 1,core_uart_ctrl
+	set1 BIT_UART_CONTROL_FLOW_CONTROL,pdata
+	store 1,core_uart_ctrl
+	branch hci_normal_reply
+
+	
+hci_normal_reply:
+	branch hci_send_event_command_complete_without_payload
+
+hci_send_event_command_complete_error_command_nuknown:
+	jam COMMAND_UNKNOWN,mem_hci_command_complete_return_parameter
+	branch hci_send_event_command_complete_without_payload+1
+hci_send_event_command_complete_error_command_disallowed:
+	jam COMMAND_DISALLOWED,mem_hci_command_complete_return_parameter
+	branch hci_send_event_command_complete_without_payload+1
+hci_send_event_command_complete_without_payload:
+	jam COMMAND_SUCCEEDED,mem_hci_command_complete_return_parameter
+	arg 1,loopcnt
+	branch hci_send_event_command_complete
+
+/***************
+function:send command complete event to host
+input:
+mem_mesh_command_complete_num_hci_command_packet:
+Num Hci Command Packet Commonly used 1
+mem_mesh_hci_opcode:command opcode ,OCF & OGF
+loopcnt:return parameters data length
+mem_mesh_command_complete_return_parameter
+:return parameters data point
+***************/
+hci_send_event_command_complete:
+	jam HCI_EVENT_COMMAND_COMPLETE,mem_hci_event_head_event_code
+	add loopcnt,3,pdata
+	store 1,mem_hci_event_para_total_length
+	call hci_prepare_send_event
+	fetch 3,mem_hci_command_complete_num_hci_command_packet
+	istore 3,contwu
+//	copy rega,contr
+	arg mem_hci_command_complete_return_parameter,contr
+	call uart_copy_tx_bytes
+	branch uarta_send_register_pop
+
+//mem_mesh_event_head_event_code:event code
+//mem_mesh_event_para_total_length:parameter total length
+hci_prepare_send_event:
+	call uarta_prepare_tx_register_push
+	fetch 3,mem_hci_event_head_type
+	istore 3,contwu
+	rtn
+
+hci_drop_current_packet:
+	call uarta_prepare_rx
+	increase 3,contru
+	ifetch 1,contru
+	iadd contru,contru
+	branch uarta_rxdone
+
+cmd_exit:
+	jam 0,mem_hci_cmd
+	rtn
+
+cmd_check_plap:
+	fetch 6,mem_hci_plap
+	fetcht 6,mem_plap
+	isub temp,null
+	rtn
+
Index: mouse_public_3mode_usb/program/hid.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/hid.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/hid.prog	(working copy)
@@ -0,0 +1,89 @@
+/**
+* the following API is to send the HID data
+* 
+*/
+
+/**
+* the following API is to process the hid  rx data
+* 
+*/
+//handle the hid data
+
+hid_rx_process:
+	bpatch patch1c_7,mem_patch1c
+	fetch 2,mem_l2cap_payload_ptr
+	copy pdata,contr
+	ifetch 1,contr
+	store 1,mem_l2cap_rcv_hidtype
+	and pdata,0x0f,temp
+	rshift4 pdata,pdata //hidtype
+	beq hid_type_set_idle,hid_rx_process_handshake
+	beq hid_type_set_protocol,hid_rx_process_handshake
+	beq hid_type_data,hid_rx_process_data
+	beq HID_TYPE_SET_REPORT,hid_rx_process_set_report
+	beq HID_TYPE_CONTROL,hid_rx_process_hid_control
+	rtn
+
+hid_rx_process_hid_control:
+	copy temp,pdata
+	beq HID_CONTROL_P_VIRTUALCABLEUNPLUG,hid_rx_process_virtual_cable_unplug
+	beq HID_CONTROL_P_SUSPEND,hid_rx_process_suspend
+	rtn
+	
+hid_rx_process_virtual_cable_unplug:
+	jam BT_EVT_VIRTUAL_CABLE_UNPLUG,mem_fifo_temp
+	call ui_ipc_send_event
+	fetch 1,mem_device_option
+	rtnne dvc_op_mouse
+	copy temp,pdata
+	beq HID_CONTROL_P_VIRTUALCABLEUNPLUG,mouse_irtual_cable_unplug
+	rtn
+hid_rx_process_suspend:
+	rtn
+
+hid_rx_process_set_report:
+	call hid_rx_process_data
+	arg 0x01,rega
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_ctrl_remote_cid
+	istore 2,contw
+	setarg 0x00
+	istore 1,contw
+	rtn
+
+hid_rx_process_handshake:
+	arg 1,rega//payload length
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_ctrl_remote_cid
+	istore 2,contw
+	setarg 0
+	istore 1,contw
+	jam 1,mem_ui_data_txbuff_length
+	fetch 1,mem_hid_control_state
+	set1 l2cap_channel_hid_handshake_done,pdata
+	store 1,mem_hid_control_state
+	jam BT_EVT_HID_HANDSHAKE,mem_fifo_temp
+	call ui_ipc_send_event
+	fetch 1,mem_device_option
+	rtnne dvc_op_mouse
+	branch mouse_bt_hid_handshake_boot_check
+	
+
+hid_rx_process_data:
+	ifetch 1,contr
+	beq HID_REPORT_ID_KB,hid_rx_process_data_hid_kb
+	rtn
+
+hid_rx_process_data_hid_kb:
+	rtn
+
+	
+hid_malloc_tx_buff:
+	call l2cap_malloc
+	copy rega,temp
+	storet 1,mem_ui_data_txbuff_length
+	copy pdata,contw
+	copy rega,pdata
+	istore 2,contw //hid payload length
+	rtn
+
Index: mouse_public_3mode_usb/program/kscan_peipherals.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/kscan_peipherals.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/kscan_peipherals.prog	(working copy)
@@ -0,0 +1,152 @@
+
+
+
+ifdef COMPILE_KEYSCAN
+/****************************************key scan***************************************/
+/******the key_scan use explain******
+
+* First:call kscan_init
+* Second:call kscan_main
+* Finally: the key scanning reault is mem_kscan_value.
+
+******
+***************************************************************************************
+*/
+kscan_init:  
+	fetch 2,mem_kscan_ptr
+	copy pdata,regc
+	call kscan_row_num_select
+	branch kscan_col_num_select
+
+kscan_col_init:
+	setarg 0
+	add regc,KEYSCAN_OFFECT_SHIFT_COUNT,rega
+	istore 1,rega
+	add regc,KEYSCAN_OFFECT_COL_NUM,rega
+	ifetch 1,rega
+	branch kscan_value_init,blank
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_COL_CONF_PIN,regb
+kscan_col_loop: 
+	ifetcht 1, regb
+	call gpio_config_output
+	ifetcht 1, regb
+	call gpio_out_active
+	call kscan_value_init             
+	ifetcht 1,regb
+	call gpio_config_input
+	increase 1,regb
+	loop kscan_col_loop
+	rtn  
+kscan_row_num_select:          
+	add regc,KEYSCAN_OFFECT_ROW_NUM,contw
+	ifetch 1,contw 
+	rtn blank
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_ROW_CONF_PIN,rega
+	branch kscan_ioselect_input   
+kscan_col_num_select:           
+	add regc,KEYSCAN_OFFECT_COL_NUM,contw
+	ifetch 1,contw 
+	rtn blank
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_COL_CONF_PIN,rega
+	branch kscan_ioselect_input
+kscan_ioselect_input: 
+	ifetcht 1,rega
+	call gpio_config_input 
+	increase 1,rega
+	loop kscan_ioselect_input
+	rtn
+kscan_value_init:
+	setarg 0
+	add regc,KEYSCAN_OFFECT_ROW_COUNT,rega
+	istore 1,rega
+	add regc,KEYSCAN_OFFECT_ROW_CONF_PIN,rega
+kscan_save_vaule:
+	ifetcht 1,rega       
+	call gpio_get_bit   
+	add regc,KEYSCAN_OFFECT_VALUE_TEMP,temp
+	ifetch 2,temp
+ 	add regc,KEYSCAN_OFFECT_SHIFT_COUNT,contr
+	ifetcht 1,contr
+	copy temp,queue
+	qsetflag true,pdata
+
+	add regc,KEYSCAN_OFFECT_VALUE_TEMP,temp
+ 	istore 2,temp
+	increase 1,rega
+    
+	add regc,KEYSCAN_OFFECT_SHIFT_COUNT,contw
+	ifetch 1,contw 
+	increase 1,pdata
+	istore 1,contw
+    
+	add regc,KEYSCAN_OFFECT_ROW_COUNT,contw
+	ifetcht 1,contw 
+	increase 1,temp
+	istoret 1,contw
+	add regc,KEYSCAN_OFFECT_ROW_NUM,contw
+	ifetch 1,contw 
+	ixor temp,null  
+	nbranch kscan_save_vaule,zero
+	rtn       
+	
+	
+kscan_lpm_berfore:
+	fetch 2,mem_kscan_ptr
+	copy pdata,regc
+ 	add regc,KEYSCAN_OFFECT_ROW_NUM,contw
+ 	ifetch 1,contw 
+	copy pdata,loopcnt
+	add regc,KEYSCAN_OFFECT_COL_CONF_PIN,rega
+kscan_select_wake:    
+	ifetcht 1,rega
+	call gpio_set_wake   
+	increase 1,rega
+	loop kscan_select_wake
+	rtn
+
+kscan_clkn_bt_timer_check:
+	ifetcht 4,rega
+	copy clkn_bt,pdata
+	isub temp,null
+	rtn positive
+	setarg 0
+	istore 4,rega
+	rtn
+
+kscan_process:
+	fetch 2,mem_kscan_ptr
+	copy pdata,regc
+	add regc,KEYSCAN_OFFECT_BTCLK,rega
+	call kscan_clkn_bt_timer_check
+	ifetch 4,rega
+	add regc,KEYSCAN_OFFECT_BTCLK_INTERVAL,regb
+	ifetcht 1,regb
+	iadd temp,temp
+	copy clkn_bt,pdata
+	isub temp,null
+	nrtn positive
+	istore 4,rega
+	call kscan_col_init  
+	add regc,KEYSCAN_OFFECT_VALUE_TEMP,rega
+	ifetch 2,rega
+	add regc,KEYSCAN_OFFECT_LASVALUE,rega
+	ifetcht 2,rega
+	istore 2,rega
+	iand temp,pdata
+	add regc,KEYSCAN_OFFECT_VALUE,rega    
+	istore 2,rega 
+	rtn  
+
+endif
+	
+	
+
+
+
+	
+    
+	
+
Index: mouse_public_3mode_usb/program/l2cap.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/l2cap.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/l2cap.prog	(working copy)
@@ -0,0 +1,1901 @@
+/************************************/
+/*initialize L2CAP related variables*/
+/************************************/
+l2cap_init:
+	branch l2cap_init_wake,wake
+l2cap_init_work:
+	setarg mem_l2cap_xmem_end
+	arg mem_l2cap_xmem_start,contw
+	isub contw,loopcnt
+	call clear_mem
+l2cap_init_wake:	
+	bpatch patch1d_0,mem_patch1d
+	setarg mem_sdp_mem_end
+	arg mem_sdp_mem_start,contw
+	isub contw,loopcnt
+	call clear_mem
+	setarg mem_l2cap_mem_end
+	arg mem_l2cap_mem_start,contw
+	isub contw,loopcnt
+	call clear_mem
+	branch l2cap_lpm_load_txbuf
+	
+process_rx_l2cap_pkt:
+	bpatch patch1d_1,mem_patch1d
+	copy contr,temp
+	//call l2cap_malloc_is_fifo_full
+	//nrtn blank
+	copy temp,contr
+	ifetch 2,contr
+	store 2,mem_l2cap_rx_pkt_length
+	ifetch 2,contr
+	store 2,mem_l2cap_rx_cid
+	deposit contr
+	store 2,mem_l2cap_payload_ptr
+	fetch 1,memui_reconnect_mode
+	beq NO_RECONNECTION,l2cap_rx_multiplexing
+	branch ml2cap_rx_multiplexing
+
+l2cap_rx_multiplexing:
+	fetch 2, mem_l2cap_rx_pkt_length
+	branch l2cap_rx_reset_state,blank
+	bpatch patch1d_2,mem_patch1d
+	fetch 1,mem_l2cap_rx_cid
+	beq L2CAP_signal_channel,l2cap_call_proc_signal
+l2cap_rx_multiplexing0:
+	beq L2CAP_SDP_channel,l2cap_call_proc_sdp
+	beq L2CAP_RFCOMM_channel,l2cap_call_proc_rfcomm
+	beq L2CAP_HID_Control_channel,l2cap_call_proc_hid
+	beq L2CAP_HID_Interrupt_channel,l2cap_call_proc_hid
+	branch l2cap_rx_reset_state
+
+l2cap_check_map:
+//	call l2cap_malloc_is_fifo_full
+//	nrtn blank
+	bpatch patch1d_3,mem_patch1d
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	beq 0,set_pdata_0
+	beq 1,set_pdata_0
+	beq 2,set_pdata_0
+	beq 3,set_pdata_0
+	beq 0x81,set_pdata_0
+	beq 0xc0,set_pdata_0
+	beq 0x80,set_pdata_0
+	beq 0x40,set_pdata_0
+	rtn
+
+l2cap_call_proc_signal:
+	call l2cap_check_map
+	nrtn blank
+l2cap_call_proc_signal0:
+	call l2cap_malloc_signal_channel
+	call l2cap_process_signal_pkt
+	fetcht 2,mem_l2cap_signal_tx_length
+	branch l2cap_call_proc_no_reply,blank
+	call l2cap_get_signal_tx_buff
+	fetch 2,mem_l2cap_signal_tx_length
+	istore 2,contw
+	force L2CAP_signal_channel,pdata
+	istore 2,contw
+	branch l2cap_rx_reset_state
+	
+l2cap_call_proc_sigal_pending:
+	fetch 1,mem_l2cap_pending_item
+	rtn blank
+	copy pdata,rega
+	bpatch patch1d_4,mem_patch1d
+	fetch 4,mem_l2cap_sdpres_delay_time
+	arg 0x100,temp
+	iadd temp,temp
+	copy clkn_bt,pdata
+	isub temp,null
+	nrtn positive
+	jam 0,mem_l2cap_pending_item
+	copy rega,pdata
+	beq L2CAP_SDP_channel,l2cap_sdp_conn_succ
+	branch assert
+l2cap_sdp_conn_succ:
+	arg 0,debug
+	call l2cap_malloc_signal_channel
+	call restore_l2cap_req_param
+	call l2cap_get_signal_tx_payload
+	call save_cont_pointers
+	call send_connection_sdp_res
+	call l2cap_get_signal_tx_buff
+	//fetch 2,mem_l2cap_signal_tx_length
+	setarg 0x000c
+	istore 2,contw
+	force L2CAP_signal_channel,pdata
+	istore 2,contw
+	branch l2cap_rx_reset_state
+
+
+
+l2cap_reset_sdp_map:
+	bpatch patch1d_5,mem_patch1d
+	fetch 2,mem_sdp_tx_pkt_length
+	increase 4,pdata
+	call rshift7
+	add pdata,1,temp ///temp: how many128
+	arg mem_tx_fifo3,contr
+	ifetch 3,contr
+	rtn blank
+	store 3,mem_tx_fifo_map_temp
+	fetch 1,mem_tx_fifo_map_temp
+	copy pdata,rega
+	call check_l2cap_map
+	copy regb,pdata
+	store 1,mem_tx_fifo3
+	rtn
+
+check_l2cap_map:
+	arg 0,queue
+	arg 0,regb
+
+check_l2cap_map_loop:
+	sub queue,7,null
+	nrtn positive
+	qisolate1 rega
+	branch check_l2cap_map_used,true
+	branch check_l2cap_map_used2
+
+check_l2cap_map_used:
+	copy temp,pdata
+	branch check_l2cap_map_used2,blank
+	qset1 regb
+	increase -1,temp
+
+check_l2cap_map_used2:
+	increase 1,queue
+	branch check_l2cap_map_loop
+
+l2cap_call_proc_sdp:
+	call l2cap_malloc_is_fifo_empty
+	nrtn blank// not process this packet until fifo empty
+	call l2cap_check_map
+	nrtn blank
+	call l2cap_malloc_sdp_channel
+	call enable_authrom
+	call sdp_process
+	call disable_authrom
+	call l2cap_reset_sdp_map
+	branch l2cap_call_proc_sdp_common
+
+	
+ml2cap_call_proc_sdp:
+	call l2cap_malloc_is_fifo_empty
+	nrtn blank// not process this packet until fifo empty
+	call l2cap_malloc_sdp_channel
+	call enable_authrom
+	call sdp_process
+	call disable_authrom
+l2cap_call_proc_sdp_common:
+	call l2cap_get_sdp_tx_buff
+	fetch 2,mem_sdp_tx_pkt_length
+	branch l2cap_call_proc_no_reply,blank
+	istore 2,contw
+	fetch 2,mem_sdp_remote_cid
+	istore 2,contw
+	branch l2cap_rx_reset_state
+
+l2cap_call_proc_hid:
+	call hid_rx_process
+	branch l2cap_rx_reset_state
+
+l2cap_call_proc_rfcomm:
+	bpatch patch1d_6,mem_patch1d
+	jam RFCOMM_MALLOC_SUCCEED,mem_rfcomm_malloc_fail_flag
+	call rfcomm_rx_process
+	fetch 1,mem_rfcomm_malloc_fail_flag
+	rtneq RFCOMM_MALLOC_FAIL
+	branch l2cap_rx_reset_state
+l2cap_call_proc_no_reply:
+	call l2cap_malloc_discard
+	//fall through
+l2cap_rx_reset_state:
+	setarg 0
+	store 2,mem_l2cap_rx_pkt_length
+	store 2,mem_l2cap_rx_cid
+	jam L2CAP_RX_DONE,mem_l2cap_rx_done
+	rtn
+/* To process one L2CAP signalling pkt consisting of 1 or more signalling commands.	*/
+l2cap_process_signal_pkt:
+	bpatch patch1d_7,mem_patch1d
+	call l2cap_get_signal_tx_payload
+	force 0,regb
+	fetch 2,mem_l2cap_rx_pkt_length
+	copy pdata,regc
+	fetch 2,mem_l2cap_payload_ptr
+	iforce contr
+l2cap_process_signal_pkt_loop:
+	call l2cap_process_one_signal
+	deposit regc
+	increase -4,regc
+	increase -4,pdata
+	nbranch l2cap_process_signal_pkt_loop,blank
+	copy regb,pdata
+	store 2,mem_l2cap_signal_tx_length
+	rtn
+
+l2cap_process_one_signal:
+	bpatch patch1e_0,mem_patch1e
+	ifetch 1,contr
+	beq signal_cmd_reject,l2cap_proc_signal_cmd_reject
+	beq signal_connect_req,l2cap_proc_signal_connect_req
+	beq signal_connect_rsp,l2cap_proc_signal_connect_rsp
+	beq signal_config_req,l2cap_proc_signal_config_req
+	beq signal_config_rsp,l2cap_proc_signal_config_rsp
+	beq signal_disconnect_req,l2cap_proc_signal_disconnect_req
+	beq signal_disconnect_rsp,l2cap_proc_signal_disconnect_rsp
+	beq signal_echo_req,l2cap_proc_signal_echo_req
+	beq signal_echo_rsp,l2cap_proc_signal_echo_rsp
+	beq signal_info_req,l2cap_proc_signal_info_req
+	beq signal_info_rsp,l2cap_proc_signal_info_rsp
+	call l2cap_reject_command
+l2cap_process_one_signal_rtn:
+	rtn
+
+l2cap_proc_signal_info_req:
+	ifetch 1,contr //IDs
+	copy pdata,queue
+	ifetch 2,contr //length
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	setarg signal_info_rsp
+	istore 1,contw
+	copy queue,pdata
+	istore 1, contw
+	ifetch 2,contr 
+l2cap_proc_signal_info_req_reply:
+	beq L2CAP_SIG_EXT_FEATRUE,l2cap_proc_signal_info_req_ext
+	beq L2CAP_SIG_FIX_FEATRUE,l2cap_proc_signal_info_req_fix
+	rtn
+l2cap_proc_signal_info_req_ext:
+	setarg 0x020008
+	istore 6, contw
+	setarg 0x0280
+	istore 4, contw
+	force 12,pdata
+	branch l2cap_proc_signal_info_req_common
+l2cap_proc_signal_info_req_fix:
+	setarg 0x3000c
+	istore 6, contw
+	setarg 0x0006
+	istore 8, contw
+	force 16,pdata
+l2cap_proc_signal_info_req_common:
+	iadd regb,regb
+	branch l2cap_process_one_signal_rtn
+	
+ml2cap_proc_signal_info_req:
+	ifetch 1,contr //IDs
+	copy pdata,queue
+	ifetch 2,contr //length
+	copy pdata,rega
+	ifetch 2,contr
+	store 2,mem_temp
+	copy regc,pdata
+	isub rega,regc 
+	call l2cap_get_signal_tx_payload
+	setarg signal_info_rsp
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw 
+	fetch 2,mem_temp
+	branch l2cap_proc_signal_info_req_reply
+
+
+/*  Respond to the command reject signal sent from the remote BD.   */
+l2cap_proc_signal_cmd_reject:
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	iadd contr,contr
+	copy regc,pdata
+	isub rega,regc
+l2cap_proc_signal_cmd_reject_rtn:
+	branch l2cap_process_one_signal_rtn
+/* Respond to an L2CAP connection request from remote BD. (generate a connection_rsp)	*/
+l2cap_proc_signal_connect_req:
+	call save_cont_pointers
+	//fetch 6,mem_inquiry_bd_addr
+  	//store 6,mem_master_paged_bd_addr
+  	call load_cont_pointers
+	arg 0,debug
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	ifetch 2,contr
+	copy pdata,temp //PSM
+	ifetch 2,contr
+	copy pdata,timeup
+	bpatch patch1e_1,mem_patch1e
+	copy temp,pdata
+	beq PSM_SDP,l2cap_proc_signal_connect_req_sdp
+	beq PSM_RFCOMM,l2cap_proc_signal_connect_req_rfcomm
+	beq PSM_HID_control,l2cap_proc_signal_connect_req_hid_ctrl
+	beq PSM_HID_interrupt,l2cap_proc_signal_connect_req_hid_int
+	call l2cap_reject_command
+	branch l2cap_proc_signal_connect_req_rtn
+
+l2cap_proc_signal_connect_req_sdp:
+	call save_cont_pointers
+	arg L2CAP_SDP_channel,temp
+	fetch 2,mem_sdp_remote_cid
+	nbranch already_connected,blank
+	copy timeup,pdata
+	store 2,mem_sdp_remote_cid
+	copy clkn_bt,pdata
+	store 4,mem_l2cap_sdpres_delay_time
+	call store_l2cap_req_param
+	branch  send_connection_pending
+
+store_l2cap_req_param:
+	storet 2,mem_psm
+	deposit timeup
+	store 2,mem_scid
+	deposit rega
+	store 2,mem_cmd_length
+	deposit regb
+	store 2,mem_tt2
+	deposit regc
+	store 2,mem_tt3
+	deposit queue
+	store 2,mem_id
+	rtn
+
+restore_l2cap_req_param:
+	fetcht 2,mem_psm
+	fetch 2,mem_scid
+	copy pdata,timeup
+	fetch 2,mem_cmd_length
+	copy pdata,rega
+	fetch 2,mem_tt2
+	copy pdata,regb
+	fetch 2,mem_tt3
+	copy pdata,regc
+	fetch 2,mem_id
+	copy pdata,queue
+	rtn
+
+l2cap_proc_signal_connect_req_rfcomm:
+	call save_cont_pointers
+	setarg L2CAP_RFCOMM_channel
+	arg L2CAP_RFCOMM_channel,temp
+	fetch 2,mem_RFCOMM_remote_CID
+	nbranch already_connected,blank
+	copy timeup,pdata
+	store 2,mem_RFCOMM_remote_CID
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_rfcomm_state
+	branch send_connection_res
+l2cap_proc_signal_connect_req_hid_ctrl:
+	call save_cont_pointers
+	arg L2CAP_HID_Control_channel,temp
+	fetch 2,mem_hid_ctrl_remote_cid
+	nbranch already_connected,blank
+	copy timeup,pdata
+	store 2,mem_hid_ctrl_remote_cid
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_hid_control_state
+	branch send_connection_res
+l2cap_proc_signal_connect_req_hid_int:
+	call save_cont_pointers
+	deposit clke
+	arg L2CAP_HID_Interrupt_channel,temp
+	fetch 2,mem_hid_int_remote_cid
+	nbranch already_connected,blank
+	copy timeup,pdata
+	store 2,mem_hid_int_remote_cid
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_hid_interrupt_state
+	branch send_connection_res
+
+send_connection_pending:
+	setarg L2CAP_connect_pending
+	store 2,memL2CAP_T1
+	jam L2CAP_SDP_channel,mem_l2cap_pending_item
+	branch send_connection_res0
+send_connection_sdp_res:
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_sdp_state
+send_connection_res:
+	setarg L2CAP_connect_successful
+	store 2,memL2CAP_T1
+send_connection_res0:
+	bpatch patch1e_2,mem_patch1e
+	call load_cont_pointers
+	setarg signal_connect_rsp
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw
+	setarg 0x0008
+	istore 2,contw
+	copy temp,pdata
+	istore 2,contw
+	copy timeup,pdata
+	istore 2,contw
+	fetch 2,memL2CAP_T1
+	beq L2CAP_connect_pending,connect_pending
+	isolate0 0,debug
+	branch connect_suc,true
+	setarg L2CAP_connect_refused_no_resources
+connect_suc:
+	istore 2,contw
+	force 0x0000,pdata
+	istore 2,contw
+	setarg 12
+	branch connect_req_update_byte_counts
+connect_pending:
+	istore 2,contw
+	force 0x0002,pdata
+	istore 2,contw
+	setarg 12
+	branch connect_req_update_byte_counts
+	
+already_connected:
+	set1 0,debug
+	branch send_connection_res
+connect_req_update_byte_counts:
+	iadd regb,regb
+	copy regc,pdata
+	isub rega,regc
+	branch l2cap_proc_signal_connect_req_rtn
+l2cap_proc_signal_connect_req_rtn:
+	branch l2cap_process_one_signal_rtn
+
+l2cap_proc_signal_connect_rsp:
+	ifetch 1,contr //identifier
+	copy pdata,queue
+	ifetch 2,contr //length
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	ifetch 2,contr //remote cid
+	copy pdata,timeup
+	ifetch 2,contr //local cid
+	copy pdata,temp
+	bpatch patch1e_3,mem_patch1e
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch l2cap_proc_signal_connect_rsp_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch l2cap_proc_signal_connect_rsp_rfcomm,zero
+	setarg L2CAP_HID_Control_channel
+	isub temp,null
+	branch l2cap_proc_signal_connect_rsp_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub temp,null
+	branch l2cap_proc_signal_connect_rsp_hid_int,zero
+	rtn
+
+l2cap_proc_signal_connect_rsp_sdp:
+	copy timeup,pdata
+	store 2,mem_sdp_remote_cid
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_sdp_state
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_connect_rsp_rfcomm:
+	copy timeup,pdata
+	store 2,mem_rfcomm_remote_CID
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_rfcomm_state
+	rtn
+l2cap_proc_signal_connect_rsp_hid_int:
+	copy timeup,pdata
+	store 2,mem_hid_ctrl_remote_cid
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_hid_interrupt_state
+	rtn
+l2cap_proc_signal_connect_rsp_hid_ctrl:
+	copy timeup,pdata
+	store 2,mem_hid_int_remote_cid
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_hid_control_state
+	rtn
+
+l2cap_proc_signal_config_req:
+	ifetch 1,contr//identifier
+	copy pdata,queue
+	ifetch 2,contr//length
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	ifetch 2,contr//dest cid
+	copy pdata,temp
+	copy temp,rega
+	bpatch patch1e_4,mem_patch1e
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch l2cap_proc_signal_config_req_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch l2cap_proc_signal_config_req_rfcomm,zero
+	setarg L2CAP_HID_Control_channel
+	isub temp,null
+	branch l2cap_proc_signal_config_req_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub temp,null
+	branch l2cap_proc_signal_config_req_hid_int,zero
+	branch l2cap_reject_command
+	//branch L2CAP_proc_signal_config_req_rtn
+l2cap_proc_signal_config_req_sdp:
+	copy contw, timeup
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	//set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_sdp_state
+	copy timeup,contw
+	arg L2CAP_SDP_channel,timeup
+	fetch 2,mem_sdp_remote_cid
+	copy pdata,temp
+	branch l2cap_send_config_rsp
+l2cap_proc_signal_config_req_hid_ctrl:
+	copy contw, timeup
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	//set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_hid_control_state
+	copy timeup,contw
+	arg L2CAP_HID_Control_channel,timeup
+	fetch 2,mem_hid_ctrl_remote_cid
+	copy pdata,temp
+	branch l2cap_send_config_rsp
+l2cap_proc_signal_config_req_hid_int:
+	copy contw, timeup
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	//set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_hid_interrupt_state
+	copy timeup,contw
+	arg L2CAP_HID_Interrupt_channel,timeup
+	fetch 2,mem_hid_int_remote_cid
+	copy pdata,temp
+	branch l2cap_send_config_rsp
+l2cap_proc_signal_config_req_rfcomm:
+	copy contw, timeup
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	//set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_rfcomm_state
+//	jam UPPERSM_RP_SDP_CONN,mem_upper_sm_remote_page
+	copy timeup,contw
+	arg L2CAP_RFCOMM_channel,timeup
+	fetch 2,mem_RFCOMM_remote_CID
+	copy pdata,temp
+l2cap_send_config_rsp:
+	bpatch patch1e_5,mem_patch1e
+	setarg  signal_config_rsp
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw
+	setarg 0x0006
+	istore 2,contw
+	copy temp,pdata
+	istore 2,contw
+	force 0x00,pdata
+	istore 2,contw
+	force L2CAP_config_success,pdata
+	istore 2,contw
+	force 10,pdata
+	iadd regb,regb
+	//copy temp,pdata
+	storet 2,mem_config_req_dest_CID
+	copy queue,pdata
+	store 1,mem_config_identifier
+	force L2CAP_SDP_channel,pdata
+	icompare 0xff,timeup
+	branch l2cap_send_config_rsp_is_sdp,true
+	increase 1,pdata
+l2cap_send_config_rsp_is_sdp:
+	//store 1,mem_send_config_req
+	rtn
+l2cap_check_channel_state:
+	disable user
+	rtnbit1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	rtnbit0 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	rtnbit0 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	copy contr,contw
+	increase -1,contw
+	istore 1,contw
+	enable user
+	rtn
+l2cap_send_config_req:
+l2cap_send_config_req_sdp:
+	fetch 1,mem_sdp_state
+	call l2cap_check_channel_state
+	nbranch l2cap_send_config_req_rfcomm,user
+	jam L2CAP_SDP_channel,mem_send_config_req
+	fetch 2,mem_sdp_remote_cid
+	store 2,mem_config_req_dest_CID
+	branch l2cap_generate_config_req
+l2cap_send_config_req_rfcomm:
+	fetch 1,mem_rfcomm_state
+	call l2cap_check_channel_state
+	nbranch l2cap_send_config_req_hid_ctrl,user
+	jam L2CAP_RFCOMM_channel,mem_send_config_req
+	fetch 2,mem_RFCOMM_remote_CID
+	store 2,mem_config_req_dest_CID
+	branch l2cap_generate_config_req
+l2cap_send_config_req_hid_ctrl:
+	fetch 1,mem_hid_control_state
+	call l2cap_check_channel_state
+	nbranch l2cap_send_config_req_hid_int,user
+	jam L2CAP_HID_Control_channel,mem_send_config_req
+	fetch 2,mem_hid_ctrl_remote_cid
+	store 2,mem_config_req_dest_CID
+	branch l2cap_generate_config_req
+l2cap_send_config_req_hid_int:
+	fetch 1,mem_hid_interrupt_state
+	call l2cap_check_channel_state
+	nrtn user//End of sending config req
+	jam L2CAP_HID_Interrupt_channel,mem_send_config_req
+	fetch 2,mem_hid_int_remote_cid
+	store 2,mem_config_req_dest_CID
+	//branch L2CAP_generate_config_req
+
+l2cap_generate_config_req:
+	bpatch patch1e_6,mem_patch1e
+	call l2cap_get_req_id
+	call l2cap_malloc_signal_channel
+	force 0,regb
+	call l2cap_get_signal_tx_payload
+	force signal_config_req,pdata
+	istore 1,contw
+	fetch 1,mem_ML2CAP_comm_id
+	istore 1,contw
+	setarg 0x0008
+	istore 2,contw
+	fetch 2,mem_config_req_dest_CID
+	istore 2,contw
+	setarg 0x0000
+	istore 2,contw
+	force 1,pdata
+	istore 1,contw
+	force 2,pdata
+	istore 1,contw
+	fetch 1,mem_send_config_req
+	beq L2CAP_RFCOMM_channel,l2cap_generate_config_req_rfcomm
+	setarg L2CAP_config_MTU_SDP
+	istore 2,contw
+	branch l2cap_generate_config_req_done
+l2cap_generate_config_req_rfcomm:
+	setarg L2CAP_config_MTU_RFCOMM
+	istore 2,contw
+l2cap_generate_config_req_done:
+	arg 0x0c,temp
+	storet 2,mem_l2cap_signal_tx_length
+	call l2cap_get_signal_tx_buff
+	fetch 2,mem_l2cap_signal_tx_length
+	istore 2,contw
+	force L2CAP_signal_channel,pdata
+	istore 2,contw
+	jam 0,mem_send_config_req
+l2cap_proc_signal_config_req_rtn:
+	branch l2cap_process_one_signal_rtn
+
+l2cap_proc_signal_config_rsp:
+	increase 1,contr
+	ifetch 2,contr
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	ifetch 2,contr //source cid
+	copy pdata,rega
+	bpatch patch1e_7,mem_patch1e
+	setarg L2CAP_SDP_channel
+	isub rega,null
+	branch l2cap_proc_signal_config_rsp_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub rega,null
+	branch l2cap_proc_signal_config_rsp_rfcomm,zero
+	setarg L2CAP_HID_Control_channel
+	isub rega,null
+	branch l2cap_proc_signal_config_rsp_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub rega,null
+	branch l2cap_proc_signal_config_rsp_hid_int,zero
+	increase 2,contr
+	ifetch 2,contr
+	iforce null
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_config_rsp_sdp:
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_sdp_state
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_config_rsp_rfcomm:
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_rfcomm_state
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_config_rsp_hid_ctrl:
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_hid_control_state
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_config_rsp_hid_int:
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_hid_interrupt_state
+	jam BT_EVT_HID_CONNECTED,mem_fifo_temp
+	branch ui_ipc_send_event
+	
+
+
+l2cap_proc_signal_disconnect_req:
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	ifetch 2,contr
+	copy pdata,rega
+	ifetch 2,contr
+	copy pdata,timeup
+	copy rega,temp
+	call save_cont_pointers
+	bpatch patch1f_0,mem_patch1f
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_req_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_req_rfcomm,zero
+	setarg L2CAP_HID_Control_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_req_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_req_hid_int,zero
+	call l2cap_reject_command
+	branch l2cap_proc_signal_disconnect_req_err_rtn
+l2cap_proc_signal_disconnect_req_hid_ctrl:
+	copy timeup,temp
+	fetch 2,mem_hid_ctrl_remote_cid
+	isub temp,null
+	branch l2cap_disconnect_hid_control_now,zero
+	call l2cap_reject_command
+	branch l2cap_proc_signal_disconnect_req_err_rtn
+l2cap_proc_signal_disconnect_req_hid_int:
+	copy timeup,temp
+	fetch 2,mem_hid_int_remote_cid
+	isub temp,null
+	branch l2cap_disconnect_hid_interrupt_now,zero
+	call l2cap_reject_command
+	branch l2cap_proc_signal_disconnect_req_err_rtn
+
+l2cap_proc_signal_disconnect_req_sdp:
+	copy timeup,temp
+	fetch 2,mem_sdp_remote_cid
+	isub temp,null
+	branch l2cap_disconnect_sdp_now,zero
+	call l2cap_reject_command
+	branch l2cap_proc_signal_disconnect_req_err_rtn
+l2cap_disconnect_hid_control_now:
+	call l2cap_reset_hid_ctrl_state
+	branch l2cap_send_disconnect_rsp_pkt
+l2cap_disconnect_hid_interrupt_now:
+	call l2cap_reset_hid_int_state
+	fetch 2, mem_hid_ctrl_remote_cid
+	branch l2cap_send_disconnect_rsp_pkt, blank
+	//set the flag,hid channel close
+	//should we set here?
+	//call HID_mem_lock
+	//fetch 1, mem_hid_cb1
+	//set1 HID_CB_APP_HID_DISCONNECTED,pdata
+	//store 1, mem_hid_cb1
+	//call HID_mem_unlock
+	branch l2cap_send_disconnect_rsp_pkt
+
+l2cap_disconnect_sdp_now:
+	call l2cap_reset_sdp_channel_state
+	fetch 1,mem_upper_sm_ss
+	nbranch l2cap_send_disconnect_rsp_pkt,blank
+	//jam LMP_ENCRYPTION_MODE_REQ,mem_lmo_opcode2
+	//jam UPPERSM_RP_SDP_CONN,mem_upper_sm_remote_page
+	branch l2cap_send_disconnect_rsp_pkt
+l2cap_proc_signal_disconnect_req_rfcomm:
+	copy timeup,temp
+	fetch 2, mem_RFCOMM_remote_CID
+	isub temp,null
+	branch l2cap_disconnect_rfcomm_now,zero
+	call l2cap_reject_command
+	branch l2cap_proc_signal_disconnect_req_err_rtn
+l2cap_disconnect_rfcomm_now:
+	call l2cap_reset_rfcomm_channel_state
+	branch l2cap_send_disconnect_rsp_pkt
+l2cap_send_disconnect_rsp_pkt:
+	call load_cont_pointers
+	setarg signal_disconnect_rsp
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw
+	setarg 0x0004
+	istore 2,contw
+	copy rega,pdata
+	istore 2,contw
+	copy timeup,pdata
+	istore 2,contw
+	force 8,pdata
+	branch l2cap_proc_signal_disconnect_req_rtn
+l2cap_proc_signal_disconnect_req_err_rtn:
+	call load_cont_pointers
+	branch l2cap_proc_signal_disconnect_req_rtn
+l2cap_proc_signal_disconnect_req_rtn:
+	iadd regb,regb
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_disconnect_rsp:
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	ifetch 2,contr
+	copy pdata,timeup
+	ifetch 2,contr
+	copy pdata,temp
+	call save_cont_pointers
+	bpatch patch1f_1,mem_patch1f
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_rsp_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_rsp_rfcomm,zero
+	setarg L2CAP_HID_Control_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_rsp_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub temp,null
+	branch l2cap_proc_signal_disconnect_rsp_hid_int,zero
+	call l2cap_reject_command
+	branch l2cap_proc_signal_disconnect_rsp_err_rtn
+l2cap_proc_signal_disconnect_rsp_sdp:
+	copy temp,rega
+	copy timeup,temp
+	fetch 2,mem_sdp_remote_cid
+	isub temp,null
+	call l2cap_reset_sdp_channel_state,zero
+	branch l2cap_proc_signal_disconnect_rsp_rtn
+l2cap_proc_signal_disconnect_rsp_rfcomm:
+	copy temp,rega
+	copy timeup,temp
+	fetch 2,mem_rfcomm_remote_CID
+	isub temp,null
+	call l2cap_reset_rfcomm_channel_state,zero
+	branch l2cap_proc_signal_disconnect_rsp_rtn
+l2cap_proc_signal_disconnect_rsp_hid_ctrl:
+	copy temp,rega
+	copy timeup,temp
+	fetch 2,mem_hid_ctrl_remote_cid
+	isub temp,null
+	call  l2cap_reset_hid_ctrl_state,zero
+	branch l2cap_proc_signal_disconnect_rsp_rtn
+l2cap_proc_signal_disconnect_rsp_hid_int:
+	copy temp,rega
+	copy timeup,temp
+	fetch 2,mem_hid_int_remote_cid
+	isub temp,null
+	call l2cap_reset_hid_int_state,zero
+	branch l2cap_proc_signal_disconnect_rsp_rtn
+l2cap_proc_signal_disconnect_rsp_rtn:
+	call load_cont_pointers
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_disconnect_rsp_err_rtn:
+	branch l2cap_process_one_signal_rtn
+
+/* received an echo request from remote BD.  Will echo the 1st 1 byte back,		*/
+l2cap_proc_signal_echo_req:
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	iadd contr,contr
+	setarg 9
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw
+	force 0x0000,pdata
+	istore 2,contw
+	force 4,pdata
+	iadd regb,regb
+	copy regc,pdata
+	isub rega,regc
+	branch l2cap_process_one_signal_rtn
+l2cap_proc_signal_echo_rsp:
+	branch l2cap_process_one_signal_rtn
+
+l2cap_proc_signal_info_rsp:
+	branch l2cap_process_one_signal_rtn
+l2cap_reject_command:
+	force 0,regb
+	call l2cap_get_signal_tx_payload
+	setarg signal_cmd_reject
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw
+	setarg 2
+	istore 2,contw
+	setarg cmd_not_understood
+	istore 2,contw
+	increase 6,regb
+	arg 4,regc
+	branch l2cap_process_one_signal_rtn
+
+
+
+l2cap_reset_rfcomm_channel_state:
+	setarg 0
+	store 2,mem_RFCOMM_Tx_pkt_length
+	store 2,mem_RFCOMM_remote_CID
+	jam 0,mem_rfcomm_state
+	rtn
+l2cap_reset_sdp_channel_state:
+	setarg 0
+	store 2,mem_sdp_tx_pkt_length
+	store 2,mem_sdp_remote_cid
+	jam 0,mem_sdp_state
+	rtn
+l2cap_reset_hid_ctrl_state:
+	setarg 0
+	store 2,mem_hid_ctrl_remote_cid
+	jam 0,mem_hid_control_state
+	fetch 1,mem_hid_interrupt_state
+	beq 0,l2cap_reset_hid_disconnected
+	rtn
+
+l2cap_reset_hid_int_state:
+	setarg 0
+	store 2,mem_hid_int_remote_cid
+	jam 0,mem_hid_interrupt_state
+	fetch 1,mem_hid_control_state
+	beq 0,l2cap_reset_hid_disconnected
+	rtn
+	
+l2cap_reset_hid_disconnected:
+	jam BT_EVT_HID_DISCONNECTED,mem_fifo_temp
+	branch ui_ipc_send_event	
+
+l2cap_disconnect_interrupt_req:
+	fetch 1,mem_CONTROL_tasks
+	set0  L2CAP_DISCONNECT_INTERRUPT, pdata
+	store 1,mem_CONTROL_tasks
+	fetch 2, mem_hid_int_remote_cid
+	rtn blank
+	call l2cap_malloc_signal_channel
+	fetch 2, mem_hid_int_remote_cid
+	copy pdata,rega
+	force L2CAP_HID_Interrupt_channel,regb
+	branch l2cap_generate_disconnect_req
+l2cap_disconnect_control_req:
+	fetch 1,mem_CONTROL_tasks
+	set0  L2CAP_DISCONNECT_CONTROL, pdata
+	store 1,mem_CONTROL_tasks
+	fetch 2, mem_hid_ctrl_remote_cid
+	rtn blank
+	call l2cap_malloc_signal_channel
+	fetch 2, mem_hid_ctrl_remote_cid
+	copy pdata,rega
+	force L2CAP_HID_Control_channel,regb
+l2cap_generate_disconnect_req:
+	call l2cap_get_req_id
+	call l2cap_get_signal_tx_payload
+	force signal_disconnect_req,pdata
+	istore 1,contw
+	fetch  1,mem_ML2CAP_comm_id
+	istore 1,contw
+	setarg 0x0004
+	istore 2,contw
+	copy rega,pdata
+	istore 2,contw
+	copy regb,pdata
+	istore 2,contw
+	force 0x08,temp //signal tx length in temp
+	branch ml2cap_send_signal
+
+ml2cap_send_signal_connect_req:
+	bpatch patch1f_2,mem_patch1f
+	call l2cap_get_req_id
+	call l2cap_get_signal_tx_payload
+	setarg signal_connect_req
+	istore 1,contw
+	fetch 1,mem_ML2CAP_comm_id
+	istore 1,contw
+	setarg 0x0004
+	istore 2,contw
+	copy temp,pdata	 //PSM
+	istore 2,contw
+	copy timeup,pdata
+	istore 2,contw
+	arg 8,temp
+	branch ml2cap_send_signal
+ml2cap_send_signal_config_req:
+	bpatch patch1f_3,mem_patch1f
+	call l2cap_get_req_id
+	call l2cap_get_signal_tx_payload
+	setarg signal_config_req
+	istore 1,contw
+	fetch 1,mem_ML2CAP_comm_id
+	istore 1,contw
+	setarg 0x0008
+	istore 2,contw
+	/****modigy for nokia*****/
+	copy temp,pdata
+	/*setarg 0x0040*/
+	istore 2,contw
+	setarg 0x0000
+	istore 2,contw
+	setarg 0x01
+	istore 1,contw
+	setarg 0x02
+	istore 1,contw
+	setarg L2CAP_config_MTU_RFCOMM
+	istore 2,contw
+	arg 0xc,temp
+	branch ml2cap_send_signal
+ml2cap_send_signal_disconn_req:
+	bpatch patch1f_4,mem_patch1f
+	call l2cap_get_req_id
+	call l2cap_get_signal_tx_payload
+	setarg signal_disconnect_req
+	istore 1,contw
+	fetch 1,mem_ML2CAP_comm_id
+	increase 1,pdata
+	copy contw,rega
+	store 1,mem_ML2CAP_comm_id
+	copy rega,contw
+	istore 1,contw
+	setarg 0x0004
+	istore 2,contw
+	copy temp,pdata
+	istore 2,contw
+	copy timeup,pdata
+	istore 2,contw
+	arg 0x8,temp
+	//branch ml2cap_send_signal
+	//Fall through
+ml2cap_send_signal:
+	storet 2,mem_l2cap_signal_tx_length
+	copy temp,pdata
+	branch l2cap_malloc_discard,blank
+	call l2cap_get_signal_tx_buff
+	fetch 2,mem_l2cap_signal_tx_length
+	istore 2,contw //make sure that length is still in temp!
+	force L2CAP_signal_channel,pdata
+	istore 2,contw
+	rtn
+
+msdp_send_req_done:
+	fetch 2,mem_sdp_tx_pkt_length
+	branch assert,blank
+	call l2cap_get_sdp_tx_buff
+	fetch 2,mem_sdp_tx_pkt_length
+	istore 2,contw
+	fetch 2,mem_sdp_remote_cid
+	istore 2,contw
+	rtn
+ml2cap_rx_multiplexing:
+	fetch 2, mem_l2cap_rx_pkt_length
+	branch l2cap_rx_reset_state,blank
+	bpatch patch1f_5,mem_patch1f
+	fetch 1,mem_l2cap_rx_cid
+	beq L2CAP_signal_channel,ml2cap_call_proc_signal
+	beq L2CAP_SDP_channel,ml2cap_call_proc_sdp
+	beq L2CAP_RFCOMM_channel,l2cap_call_proc_rfcomm
+	beq L2CAP_HID_Control_channel,l2cap_call_proc_hid
+	beq L2CAP_HID_Interrupt_channel,l2cap_call_proc_hid
+	branch l2cap_rx_reset_state
+
+ml2cap_call_proc_signal:
+	call l2cap_malloc_signal_channel
+	force 0,regb
+	call l2cap_get_signal_tx_payload
+	copy pdata,contw
+	fetch 2,mem_l2cap_rx_pkt_length
+	copy pdata,regc
+	fetch 2,mem_l2cap_payload_ptr
+	iforce contr
+ml2cap_proc_one_comm_loop:
+	call ml2cap_proc_one_comm
+	increase -4,regc
+	nbranch ml2cap_proc_one_comm_loop,zero
+	copy regb,temp
+	call ml2cap_send_signal
+	branch l2cap_rx_reset_state
+	
+ml2cap_proc_one_comm:
+	ifetch 1,contr
+	beq signal_connect_req,ml2cap_proc_signal_connect_req
+	beq signal_cmd_reject,ml2cap_proc_signal_cmd_reject
+	beq signal_connect_rsp,ml2cap_proc_signal_connect_rsp
+	beq signal_config_rsp,ml2cap_proc_signal_config_rsp
+	beq signal_config_req,ml2cap_proc_signal_config_req
+	beq signal_disconnect_rsp,ml2cap_proc_signal_disconn_rsp
+	beq signal_disconnect_req,ml2cap_proc_signal_disconn_req
+	beq signal_echo_req,l2cap_proc_signal_echo_req
+	beq signal_info_req,ml2cap_proc_signal_info_req
+	branch ml2cap_proc_send_reject
+
+ml2cap_proc_signal_connect_req:
+	call save_cont_pointers
+	//jam NO_RECONNECTION,memui_reconnect_mode
+	call load_cont_pointers
+	branch l2cap_proc_signal_connect_req
+ml2cap_proc_signal_cmd_reject:
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+mvptr:
+	ifetch 1,contr
+	increase -1,rega
+	nbranch mvptr,zero
+	rtn
+ml2cap_proc_signal_connect_rsp:
+	ifetch 1,contr //id
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega	//length
+	ifetch 2,contr
+	copy pdata,timeup	//destination	cid
+	ifetch 2,contr
+	copy pdata,temp	//source	cid
+	ifetch 2,contr 		// result
+	sub pdata,0,null
+	branch ml2cap_proc_signal_connect_rsp_sucessful,zero
+	beq L2CAP_connect_refused_PSM_unsupported,ml2cap_proc_signal_connect_refused_result
+	beq L2CAP_connect_refused_no_resources,ml2cap_proc_signal_connect_refused_result
+	branch ml2cap_proc_signal_connect_rsp_mnosucc
+ml2cap_proc_signal_connect_refused_result:
+	jam BT_EVT_ML2CAP_CONN_REFUSED,mem_fifo_temp
+	call ui_ipc_send_event
+ml2cap_proc_signal_connect_rsp_mnosucc:
+	ifetch 2,contr //reason
+	branch mnosucc
+ml2cap_proc_signal_connect_rsp_sucessful:
+	call save_cont_pointers
+	//fetch 1,mem_ML2CAP_comm_id
+	//icompare 0xff,queue
+	//nbranch mnosucc1,true
+	bpatch patch1f_6,mem_patch1f
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch ml2cap_proc_signal_connect_rsp_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch ml2cap_proc_signal_connect_rsp_rfcomm,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub temp,null
+	branch ml2cap_proc_signal_connect_rsp_hid_int,zero
+	setarg L2CAP_HID_Control_channel
+	isub temp,null
+	branch ml2cap_proc_signal_connect_rsp_hid_ctrl,zero
+	branch mnosucc
+ml2cap_proc_signal_connect_rsp_sdp:
+	copy timeup,pdata
+	store 2,mem_sdp_remote_cid
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_sdp_state
+	branch mnosucc1
+ml2cap_proc_signal_connect_rsp_rfcomm:
+	copy timeup,pdata
+	store 2,mem_RFCOMM_remote_CID
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_rfcomm_state
+	branch mnosucc1
+ml2cap_proc_signal_connect_rsp_hid_ctrl:
+	copy timeup,pdata
+	store 2,mem_hid_ctrl_remote_cid
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_hid_control_state
+	branch mnosucc1
+ml2cap_proc_signal_connect_rsp_hid_int:
+	copy timeup,pdata
+	store 2,mem_hid_int_remote_cid
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_CONN_RES,pdata
+	store 1,mem_hid_interrupt_state
+	//branch mnosucc1
+
+mnosucc1:
+	call load_cont_pointers
+mnosucc:
+	copy regc,pdata
+	isub rega,regc
+	rtn
+
+ml2cap_proc_signal_config_rsp:
+	ifetch 1,contr		//	Ident
+	copy pdata,queue
+	ifetch 2,contr		//	SigLen
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	ifetch 2,contr		//	DestnCID
+	copy pdata,timeup
+	ifetch 2,contr
+	ifetch 2,contr		//	Get the result value, check success
+	nbranch mcrsdone1,blank
+	call save_cont_pointers
+	//fetch 1,mem_ML2CAP_comm_id
+	//icompare 0xff,queue
+	//nbranch mcfrsdone,true
+	copy timeup,temp
+	bpatch patch1f_7,mem_patch1f
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_rsp_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_rsp_rfcomm,zero
+	setarg L2CAP_HID_Control_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_rsp_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_rsp_hid_int,zero
+ml2cap_proc_signal_config_rsp_sdp:
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_sdp_state
+	rtn
+ml2cap_proc_signal_config_rsp_rfcomm:
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_rfcomm_state
+	rtn
+ml2cap_proc_signal_config_rsp_hid_ctrl:
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_hid_control_state
+	rtn
+ml2cap_proc_signal_config_rsp_hid_int:
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_RES,pdata
+	store 1,mem_hid_interrupt_state
+	jam BT_EVT_HID_CONNECTED,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+mcfrsdone:
+	call load_cont_pointers
+mcrsdone1:
+	increase -6,rega
+mloop2:
+	branch mcrsdone,zero
+	increase 1,contr
+	increase -1,rega
+	branch mloop2
+mcrsdone:
+	rtn
+ml2cap_proc_signal_config_req:
+	ifetch 1,contr		//	Ident
+	copy pdata,queue
+	ifetch 2,contr		//	SigLen
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+	ifetch 2,contr		//	DestnCID
+	increase 2,contr
+	copy pdata,temp
+	setarg  signal_config_rsp
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw
+	increase 2,rega
+	copy rega,pdata
+	istore 2,contw
+	call save_cont_pointers
+	bpatchx patch20_0,mem_patch20
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_req_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_req_rfcomm,zero
+	setarg L2CAP_HID_Control_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_req_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	isub temp,null
+	branch ml2cap_proc_signal_config_req_hid_int,zero
+	branch mcfgrq_done
+ml2cap_proc_signal_config_req_sdp:
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	store 1,mem_sdp_state
+	bbit1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,ml2cap_proc_signal_config_req_sdp_nsndreq
+	fetcht 1,mem_CONTROL_tasks
+	set1 L2CAP_init_Config_Req,temp
+	storet 1,mem_CONTROL_tasks
+	copy queue,pdata
+	increase 1,pdata
+	store 1,mem_config_identifier
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_sdp_state
+ml2cap_proc_signal_config_req_sdp_nsndreq:
+	fetch 2,mem_sdp_remote_cid
+	store 2,mem_config_req_dest_CID
+	branch mcfgrq_done
+ml2cap_proc_signal_config_req_rfcomm:
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	store 1,mem_rfcomm_state
+	fetch 2,mem_RFCOMM_remote_CID
+	branch mcfgrq_done
+ml2cap_proc_signal_config_req_hid_ctrl:
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	store 1,mem_hid_control_state
+	fetch 2,mem_hid_ctrl_remote_cid
+	branch mcfgrq_done
+ml2cap_proc_signal_config_req_hid_int:
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_RCV_CFG_REQ,pdata
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_RES,pdata
+	store 1,mem_hid_interrupt_state
+	fetch 2,mem_hid_int_remote_cid
+	//branch mcfgrq_done
+
+mcfgrq_done:
+	copy pdata,timeup
+	call load_cont_pointers
+/*******for Nokia**************/
+	copy timeup,pdata
+	/*setarg 0x0040*/
+	istore 2,contw
+	force 0x0000,pdata
+	istore 2,contw
+	force 0x0000,pdata
+	istore 2,contw
+	force 10,pdata
+	iadd regb,regb
+	increase -6,rega
+mloop1:
+	branch mcrqdone,zero
+	ifetch 1,contr
+	istore 1,contw
+	increase 1,regb
+	increase -1,rega
+	branch mloop1
+mcrqdone:
+	rtn
+ml2cap_proc_signal_disconn_req:
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	copy regc,pdata
+	isub rega,regc
+
+	ifetch 2,contr
+	copy pdata,rega
+	ifetch 2,contr
+	copy pdata,timeup
+	call save_cont_pointers
+	bpatchx patch20_1,mem_patch20
+	setarg L2CAP_SDP_channel
+	copy rega,temp
+	isub temp,null
+	branch ml2cap_proc_signal_disconn_sdp,zero
+	setarg L2CAP_HID_Control_channel
+	copy rega,temp
+	isub temp,null
+	branch ml2cap_proc_signal_disconn_hid_ctrl,zero
+	setarg L2CAP_HID_Interrupt_channel
+	copy rega,temp
+	isub temp,null
+	branch ml2cap_proc_signal_disconn_hid_int,zero
+	branch mclsrfc
+ml2cap_proc_signal_disconn_sdp:
+	setarg 0x0000
+	store 2,mem_sdp_tx_pkt_length
+	store 2,mem_sdp_remote_cid
+	store 1,mem_sdp_state
+	branch mclssdp
+ml2cap_proc_signal_disconn_hid_ctrl:
+	call l2cap_reset_hid_ctrl_state
+	branch mclssdp
+ml2cap_proc_signal_disconn_hid_int:
+	call l2cap_reset_hid_int_state
+	//call HID_mem_lock
+	//fetch 1, mem_hid_cb1
+	//set1 HID_CB_APP_HID_DISCONNECTED,pdata
+	//store 1, mem_hid_cb1
+	//call HID_mem_unlock
+	branch mclssdp
+mclsrfc:
+	setarg 0x0000
+	store 2,mem_RFCOMM_Tx_pkt_length
+mclssdp:
+	call load_cont_pointers
+	setarg signal_disconnect_rsp
+	istore 1,contw
+	copy queue,pdata
+	istore 1,contw
+	setarg 0x0004
+	istore 2,contw
+	copy rega,pdata
+	istore 2,contw
+	copy timeup,pdata
+	istore 2,contw
+	force 8,pdata
+	iadd regb,regb
+	rtn
+
+ml2cap_proc_signal_disconn_rsp:
+	ifetch 1,contr
+	copy pdata,queue
+	ifetch 2,contr
+	copy pdata,rega
+	ifetch 2,contr
+	copy pdata,timeup
+	ifetch 2,contr
+	copy pdata,temp
+	call save_cont_pointers
+	bpatchx patch20_2,mem_patch20
+	fetch 1,mem_ML2CAP_comm_id
+	icompare 0xff,queue
+	nbranch mdisdone,true
+	setarg L2CAP_SDP_channel
+	isub temp,null
+	branch ml2cap_proc_signal_disconn_rsp_sdp,zero
+	setarg L2CAP_RFCOMM_channel
+	isub temp,null
+	branch ml2cap_proc_signal_disconn_rsp_rfcomm,zero
+	branch mdisdone
+ml2cap_proc_signal_disconn_rsp_sdp:
+	jam 0,mem_sdp_remote_cid
+	jam 0,mem_sdp_state
+	branch mdisdone
+ml2cap_proc_signal_disconn_rsp_rfcomm:
+	//
+	//
+mdisdone:
+	call load_cont_pointers
+	copy regc,pdata
+	isub rega,regc
+	rtn
+
+ml2cap_proc_send_reject:
+	setarg signal_cmd_reject
+	istore 1,contw
+	ifetch 1,contr
+	istore 1,contw
+	setarg 0x0002
+	istore 2,contw
+	setarg 0x0000
+	istore 2,contw
+	setarg 0x0006
+	iadd regb,regb
+	force 4,regc
+	rtn
+	
+//l2cap command id, 0 is not allowed
+l2cap_get_req_id:
+	fetch 1,mem_ML2CAP_comm_id
+	increase 1,pdata
+	bne 0,l2cap_get_req_id_ok
+	increase 1,pdata
+l2cap_get_req_id_ok:
+	store 1,mem_ML2CAP_comm_id
+	rtn
+
+
+/*********************************************************/
+//char* malloc(short len)
+//input: rega -> len
+//rtn: regb -> pbuff;return from pdata
+//val: queue -> i
+//val: timeup -> buff_cnt
+/*********************************************************/
+l2cap_malloc:
+bt_l2cap_malloc:
+	arg mem_tx_buff0,regd
+	arg mem_bt_l2cap_tx_buff_size,rege
+	call enable_user
+	branch host_l2cap_malloc
+
+ble_l2cap_malloc:
+	fetchr regd,2,mem_ble_l2cap_tx_buff0_ptr
+	fetchr rege,2,mem_ble_l2cap_tx_buff_size_ptr
+	call disable_user
+	branch host_l2cap_malloc
+
+/*
+	malloc l2cap buffer
+	input:
+	BT is enable user
+	BLE is disable user
+	rega is want malloc buffer size
+	regd is l2cap buffer start ptr
+	rege is l2cap buffer size
+	output:
+	pdata & contw is buffer ptr
+*/
+host_l2cap_malloc:
+	bpatchx patch20_3,mem_patch20
+	call l2cap_malloc_is_fifo_full
+	nbranch assert,blank//assert when fifo full
+	call l2cap_malloc_get_full_map
+	arg 8,loopcnt
+host_l2cap_malloc_loop:
+	fetcht 1,mem_used_map
+	sub loopcnt,8,queue
+	qisolate1 temp
+	branch host_l2cap_malloc_next_buffer,true//if(1 == (used_map & (1 << i)))goto next;
+	call host_l2cap_malloc_check_buffer_enough
+	nbranch host_l2cap_malloc_next_buffer,positive//if(buff_cnt <= 0)goto next;
+	call host_l2cap_malloc_into_fifo
+	branch host_l2cap_malloc_succ//return (pbuff);
+host_l2cap_malloc_next_buffer:
+	copy rege,pdata
+	iadd regd,regd		//pbuff += BUFF_SIZE;//point to next buff
+	loop host_l2cap_malloc_loop
+	branch assert	//return NULL
+host_l2cap_malloc_succ:
+	copy regd,pdata
+	copy regd,contw
+	rtn//return pointer via pdata
+
+/*********************************************************/
+//char is_size_enough(char buff_index, short len)
+//input: rega -> len
+//input: loopcnt -> 8-buff_index
+//rtn: positive is diable mean no buffer
+//positive is enable mean get buffer
+/*********************************************************/
+host_l2cap_malloc_check_buffer_enough:
+	bpatchx patch20_4,mem_patch20
+	sub loopcnt,8,queue
+	arg 0,temp
+	arg 0,timeup
+host_l2cap_malloc_check_buffer_enough_loop:
+	copy queue,pdata
+	beq 8,host_l2cap_malloc_check_buffer_enough_end
+	fetch 1,mem_used_map
+	qisolate1 pdata		//the buffer is used
+	branch host_l2cap_malloc_check_buffer_enough_end,true
+	qset1 timeup
+	copy rege,pdata
+	iadd temp,temp
+	increase 1,queue
+	copy rega,pdata
+	isub temp,null
+	branch host_l2cap_malloc_check_buffer_enough_end,zero//(max_size_fom_buff_index ==  len)
+	branch host_l2cap_malloc_check_buffer_enough_loop,positive//(max_size_fom_buff_index <  len)
+host_l2cap_malloc_check_buffer_enough_end:
+	copy temp,pdata
+	isub rega,null
+	nrtn zero
+	qset1 timeup
+	rtn
+
+/*********************************************************/
+//void buff_into_fifo(char buff_index, char buff_cnt, short len)
+//input: rega -> len
+//input: regc -> buff_index
+//input: timeup -> buff_cnt
+//val:temp ->   (fifo->map)
+/*********************************************************/
+host_l2cap_malloc_into_fifo:
+	bpatchx patch20_5,mem_patch20
+	call l2cap_malloc_is_fifo_full
+	nbranch assert,blank //fifo full
+	call l2cap_malloc_is_fifo_empty
+	branch host_l2cap_malloc_into_fifo_no_push,blank//fifo empty, no need to push
+	fetch 9,mem_tx_fifo1
+	store 9,mem_tx_fifo0
+	setarg 0
+	istore 3,contw//mem_tx_fifo3
+host_l2cap_malloc_into_fifo_no_push:
+	storer timeup,1,mem_tx_fifo3_map
+	storer regd,2,mem_tx_fifo3_ptr
+	rtn
+
+
+/*********************************************************/
+//void* l2cap_malloc_fifo_out(void)
+//output:len -> temp
+//output:ptr ->pdata
+//only get ptr,not free
+/*********************************************************/
+l2cap_malloc_fifo_out:
+	bpatchx patch20_6,mem_patch20
+	call l2cap_malloc_fifo_get_first_ptr
+	increase 1,contr
+	ifetch 2,contr //ptr ->pdata
+	rtn
+
+
+/*********************************************************/
+//void free_first_buff_in_fifo(void)
+//only free the first one
+/*********************************************************/
+l2cap_malloc_free:
+	bpatchx patch20_7,mem_patch20
+	call l2cap_malloc_fifo_get_first_ptr
+	copy contr,contw
+	copy contr,temp
+	setarg 0
+	istore 3,contw
+	rtn
+
+
+/*********************************************************/
+//void l2cap_malloc_discard(void)
+//discard the latest malloc
+/*********************************************************/
+l2cap_malloc_discard:
+	bpatchx patch21_0,mem_patch21
+	call l2cap_malloc_is_fifo_empty
+	branch assert,blank
+	fetch 3,mem_tx_fifo2
+	store 3,mem_tx_fifo3
+	fetch 3,mem_tx_fifo1
+	store 3,mem_tx_fifo2
+	fetch 3,mem_tx_fifo0
+	store 3,mem_tx_fifo1
+	rtn
+
+
+/*********************************************************/
+//bool fifo_is_full(void)
+//blank == 1: not full
+//blank == 0: full
+/*********************************************************/
+l2cap_malloc_is_fifo_full:
+	bpatchx patch21_1,mem_patch21
+	fetch 3,mem_tx_fifo0
+	rtn
+
+
+/*********************************************************/
+//bool fifo_nearly_full(void)
+//blank == 1: nearly full
+//blank == 0: not nearly full
+/*********************************************************/
+l2cap_malloc_is_fifo_nearly_full:
+	bpatchx patch21_2,mem_patch21
+	fetch 3,mem_tx_fifo1
+	rtn
+
+
+/*********************************************************/
+//bool fifo_is_empty(void)
+//blank == 1: empty
+//blank == 0: not empty
+/*********************************************************/
+l2cap_malloc_is_fifo_empty:
+	bpatchx patch21_3,mem_patch21
+	fetch 3,mem_tx_fifo3
+	rtn
+
+
+/*********************************************************/
+//char* l2cap_malloc_fifo_get_first_ptr(void)
+//output:contr  -->ptr
+/*********************************************************/	
+l2cap_malloc_fifo_get_first_ptr:
+	call l2cap_malloc_is_fifo_empty
+	branch l2cap_malloc_fifo_get_first_ptr_empty,blank // fifo is empty
+	arg mem_tx_fifo0,contr
+l2cap_malloc_free_loop:
+	ifetch 3,contr
+	branch l2cap_malloc_free_loop,blank
+l2cap_malloc_fifo_get_first_ptr_empty:
+	increase -3,contr
+	rtn
+
+
+/*********************************************************/
+//char* l2cap_malloc_get_full_map(void)
+//output:mem_used_map  -->full_map
+//add all maps into one
+/*********************************************************/	
+l2cap_malloc_get_full_map:
+	bpatchx patch21_4,mem_patch21
+	arg 4,loopcnt
+	arg mem_tx_fifo0_map,contr
+	arg 0,temp
+l2cap_malloc_get_full_map_loop:	
+	ifetch 3,contr
+	and pdata,0xff,pdata
+	ior temp,temp
+	loop l2cap_malloc_get_full_map_loop
+	storet 1,mem_used_map
+	rtn
+
+
+l2cap_malloc_signal_channel:
+	bpatchx patch21_5,mem_patch21
+	arg L2CAP_SIGNAL_MALLOC_SIZE,rega
+	call l2cap_malloc
+	store 2,mem_l2cap_signal_tx_buff_ptr
+	increase 4,pdata
+	store 2,mem_l2cap_signal_tx_payload_ptr
+	setarg 0
+	store 2,mem_l2cap_signal_tx_length
+	rtn
+
+l2cap_get_signal_tx_buff:
+	fetch 2,mem_l2cap_signal_tx_buff_ptr
+	branch l2cap_util_pdata_to_contw
+
+l2cap_get_signal_tx_payload:
+	fetch 2,mem_l2cap_signal_tx_payload_ptr
+	branch l2cap_util_pdata_to_contw
+
+
+l2cap_malloc_sdp_channel:
+	bpatchx patch21_6,mem_patch21
+	arg SDP_MALLOC_SIZE,rega
+	call l2cap_malloc
+	store 2,mem_sdp_tx_buff_ptr
+	increase 4,pdata
+	store 2,mem_sdp_tx_payload_ptr
+	setarg 0
+	store 2,mem_sdp_tx_pkt_length
+	rtn
+
+l2cap_get_sdp_tx_buff:
+	fetch 2,mem_sdp_tx_buff_ptr
+	branch l2cap_util_pdata_to_contw
+
+l2cap_get_sdp_tx_payload:
+	fetch 2,mem_sdp_tx_payload_ptr
+	branch l2cap_util_pdata_to_contw
+
+
+l2cap_malloc_rfcomm_channel:
+	bpatchx patch21_7,mem_patch21
+	call push_stack
+	jam RFCOMM_MALLOC_FAIL,mem_rfcomm_malloc_fail_flag
+	call l2cap_malloc_is_fifo_full
+	nrtn blank
+	arg RFCOMM_MALLOC_SIZE,rega
+	call l2cap_malloc
+	store 2,mem_rfcomm_tx_buff_ptr
+	increase 4,pdata
+	store 2,mem_rfcomm_tx_payload_ptr
+	setarg 0
+	store 2,mem_rfcomm_tx_pkt_length
+	jam RFCOMM_MALLOC_SUCCEED,mem_rfcomm_malloc_fail_flag
+	branch pop_stack
+
+l2cap_get_rfcomm_tx_buff:
+	fetch 2,mem_rfcomm_tx_buff_ptr
+	branch l2cap_util_pdata_to_contw
+	
+l2cap_util_pdata_to_contw:
+	branch assert,blank
+	copy pdata,contw
+	rtn
+	
+
+l2cap_lpm_save_calc_len:
+	bpatchx patch22_0,mem_patch22
+	arg 0,regb
+	arg mem_tx_fifo0_map,rega
+	increase -2,rega
+l2cap_lpm_save_calc_len_loop:
+	increase 2,rega
+	setarg mem_tx_fifo_end
+	isub rega,null
+	branch l2cap_lpm_save_calc_len_end,zero //end of 2lcap tx fifo
+	ifetch 1,rega
+	increase 1,rega
+	branch l2cap_lpm_save_calc_len_loop,blank
+	ifetcht 2,rega
+	ifetch 2,temp
+	iadd regb,regb
+	increase 4,regb //l2cap header len
+	branch l2cap_lpm_save_calc_len_loop
+l2cap_lpm_save_calc_len_end:
+	copy regb,pdata
+	rtn
+
+
+l2cap_lpm_get_wake_lock:
+	arg wake_lock_l2cap_tx,queue
+	branch lpm_get_wake_lock
+
+l2cap_lpm_put_wake_lock:
+	arg wake_lock_l2cap_tx,queue
+	branch lpm_put_wake_lock
+	
+l2cap_lpm_save_txbuf:
+	bpatchx patch22_1,mem_patch22
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	rtn blank
+	call l2cap_lpm_save_calc_len
+	arg l2cap_lpm_txbuf_len,temp
+	isub temp,null
+	branch l2cap_lpm_get_wake_lock,positive //no enougth space to save l2cap tx data
+	call l2cap_lpm_put_wake_lock
+	arg mem_l2cap_lpm_txbuf,contw
+	arg mem_tx_fifo0,rega
+l2cap_lpm_save_txbuf_loop:
+	setarg mem_tx_fifo_end
+	isub rega,null
+	rtn zero //end of 2lcap tx fifo
+	ifetch 1,rega  //mem_tx_fifoX_map
+	increase 1,rega
+	nbranch l2cap_lpm_save_txbuf_nempty,blank
+	istore 2,contw // length = 0
+	increase 2,rega
+	branch l2cap_lpm_save_txbuf_loop
+l2cap_lpm_save_txbuf_nempty:
+	ifetch 2,rega //ptr
+	increase 2,rega
+	copy pdata,contr
+	ifetch 2,contr  //l2cap len
+	istore 2,contw
+	copy pdata,loopcnt
+	increase 2,loopcnt //add CID len
+	call memcpy
+	branch l2cap_lpm_save_txbuf_loop
+	
+l2cap_lpm_load_txbuf:
+	bpatchx patch22_2,mem_patch22
+	call l2cap_malloc_get_full_map
+	fetch 1,mem_used_map
+	rtn blank
+	arg mem_tx_fifo0_ptr,rega
+	increase -3,rega //mem_tx_fifo0_ptr -3
+	arg mem_l2cap_lpm_txbuf,contr
+l2cap_lpm_load_txbuf_loop:
+	increase 3,rega //mem_tx_fifoX_ptr
+	setarg mem_tx_fifo_end+1
+	isub rega,null
+	rtn zero //end of 2lcap tx fifo
+	ifetch 2,contr
+	branch l2cap_lpm_load_txbuf_loop,blank
+	increase 4,pdata //l2cap header len
+	copy pdata,loopcnt
+	copy contr,regb
+	ifetch 2,rega //ptr
+	copy pdata,contw
+	copy regb,contr
+	increase -2,contr
+	call memcpy
+	branch l2cap_lpm_load_txbuf_loop
+	
+
+
+	
Index: mouse_public_3mode_usb/program/lmp.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/lmp.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/lmp.prog	(working copy)
@@ -0,0 +1,2744 @@
+	
+/******************************************/
+/*************   LMP Parse   **************/
+/******************************************/
+init_lmp:
+	rtn wake
+init_lmp_work:
+	bpatchx patch22_3,mem_patch22
+	setarg 0
+	store 1,mem_lmp_to_send
+	store 1,mem_conn_sm
+	store 1,mem_lmo_opcode1
+	store 1,mem_lmo_opcode2
+	store 1,mem_esco_addr
+	store 1,mem_connection_options
+	store 1,mem_pairing_auth
+	store 3,mem_encapsulated_major_type
+	store 1,mem_remote_br_sc_support
+	jam SWITCH_FLAG_INIT,mem_switch_flag
+	jam 0,mem_switch_fail_master_count
+	jam NULL_ENCRYP,mem_wait_encryption
+init_lmp_reinit:	
+	jam 0,mem_pairing_auth
+	jam 0,mem_sp_localsm
+	jam 0,mem_lmp_conn_state
+	//fall through
+parse_rx_done:
+	rtn
+
+parse_lmp:
+	bpatchx patch22_4,mem_patch22
+	call setlocalsm_master,master	//use this flag in hci
+	ncall setlocalsm_slave,master
+	call lmo_fifo_check
+	nrtn blank
+	fetch 1,mem_state_map
+	rtnbit0 smap_rxlmp
+	set0 smap_rxlmp,pdata
+	set0 mark_rxbuf_inuse,mark
+	store 1,mem_state_map
+	fetch 1,mem_rxbuf
+	fetcht 1,mem_state_map
+	isolate1 smap_lmptidinit,pdata
+	setflag true,smap_lmptid,temp
+	storet 1,mem_state_map
+	and_into 0x2,temp //smap_lmptid only
+	storet 1,mem_lmo_tid2
+	fetcht 1,mem_state_map
+	rshift pdata,pdata			/* align lmp_opcode */
+  	store 1,mem_lmi_opcode2
+	bpatchx patch22_5,mem_patch22
+  	fetch 1,mem_lmi_opcode2
+  	beq LMP_ESCAPE,parse_lmp_escape//multi
+  	beq LMP_ACCEPTED,parse_lmp_accepted//multi
+	beq LMP_NOT_ACCEPTED,parse_lmp_not_accepted//multi
+  	beq LMP_SET_AFH, parse_lmp_set_afh
+  	beq LMP_CLKOFFSET_REQ, parse_lmp_clkoffset_req
+ 	beq LMP_ENCRYPTION_MODE_REQ, parse_lmp_encryption_mode_req
+ 	beq LMP_ENCRYPTION_KEY_SIZE_REQ,parse_lmp_crypt_key
+	beq LMP_AUTO_RATE,parse_lmp_auto_rate
+	beq LMP_TEST_CONTROL,parse_lmp_test_control//multi
+	beq LMP_TEST_ACTIVATE,parse_lmp_test_activate
+	beq LMP_SETUP_COMPLETE,parse_lmp_setup_complete
+	beq LMP_SUPERVISION_TIMEOUT,parse_lmp_supervision_timeout
+	beq LMP_FEATURES_REQ,parse_lmp_features_req
+	beq LMP_HOST_CONNECTION_REQ,parse_lmp_conn_req
+	beq LMP_VERSION_REQ,parse_lmp_version_req
+	beq LMP_VERSION_RES,parse_lmp_version_res
+	beq LMP_DETACH,parse_lmp_detach
+	beq LMP_MAX_SLOT,parse_lmp_max_slot
+	beq LMP_MAX_SLOT_REQ,parse_lmp_max_slot_req
+	beq LMP_NAME_REQ,parse_lmp_name_req
+	beq LMP_NAME_RES,parse_lmp_name_res
+	beq LMP_FEATURES_RES,parse_lmp_features_res
+	beq LMP_COMB_KEY,parse_lmp_comb_key
+	beq LMP_AU_RAND, parse_lmp_au_rand
+	beq LMP_IN_RAND,parse_lmp_in_rand
+	beq LMP_SRES,parse_lmp_sres
+	beq LMP_INCR_POWER_REQ,parse_lmp_incr_power
+	beq LMP_DECR_POWER_REQ,parse_lmp_decr_power
+	beq LMP_MAX_POWER, parse_lmp_max_power
+	beq LMP_MIN_POWER, parse_lmp_min_power
+	beq LMP_PAGE_MODE_REQ, parse_lmp_page_mode_req
+	beq LMP_PAGE_SCAN_MODE_REQ, parse_lmp_page_scan_mode_req
+	beq LMP_PREFERRED_RATE, parse_lmp_preferred_rate
+	beq LMP_SLOT_OFFSET, parse_lmp_slot_offset
+	beq LMP_SNIFF_REQ, parse_lmp_sniff_req
+	beq LMP_START_ENCRYPTION_REQ, parse_lmp_start_encryption_req
+	beq LMP_STOP_ENCRYPTION_REQ, parse_lmp_stop_encryption_req
+	beq LMP_SWITCH_REQ, parse_lmp_switch_req
+	beq LMP_TEMP_RAND, parse_lmp_temp_rand
+	beq LMP_TEMP_KEY, parse_lmp_temp_key
+	beq LMP_TIMING_ACCURACY_REQ, parse_lmp_timing_accuracy_req
+	beq LMP_TIMING_ACCURACY_RES, parse_lmp_timing_accuracy_res
+	beq LMP_UNIT_KEY, parse_lmp_unit_key
+	beq LMP_UNSNIFF_REQ, parse_lmp_unsniff_req
+	beq LMP_USE_SEMI_PERMANENT_KEY, parse_lmp_use_semi_permanend_key
+	beq LMP_ENCAPSULATED_HEADER,parse_lmp_encapsulated_header
+	beq LMP_ENCAPSULATED_PAYLOAD,parse_lmp_encapsulated_payload
+	beq LMP_SIMPLE_PAIRING_CONFIRM,parse_simple_pairing_confirm
+	beq LMP_SIMPLE_PAIRING_NUMBER,parse_lmp_simple_pairing_number
+	beq LMP_DHKEY_CHECK,parse_dhkey_check
+	beq LMP_CLKOFFSET_RES, parse_lmp_clkoffset_res
+	beq LMP_ENC_KEY_SIZE_MASK_REQ,parse_enc_key_size_mask_req
+	beq LMP_QUALITY_OF_SERVICE_REQ,parse_quality_of_server_req
+	beq LMP_QUALITY_OF_SERVICE,parse_quality_of_server
+/* lmp is not recognized, check to see if we respond to all messages */ 
+/* rejecting the unrecognized message with PDU not recognized */
+reject_unknown_packet:
+	jam UNKNOWN_LMP_PDU,mem_lmo_reason2
+reject_lmp_packet:
+	jam LMP_NOT_ACCEPTED,mem_lmo_opcode2
+	rtn
+
+parse_quality_of_server_req:
+	branch accept_lmp_msg
+
+parse_quality_of_server:
+	rtn
+
+parse_lmp_clkoffset_req:
+	jam LMP_CLKOFFSET_RES,mem_lmo_opcode2
+	rtn	
+
+parse_enc_key_size_mask_req:
+	jam LMP_ENC_KEY_SIZE_MASK_RES,mem_lmo_opcode2
+	rtn
+	
+parse_lmp_set_afh:
+	fetch 4,mem_rxbuf+1
+	lshift pdata,pdata
+	store 4,mem_afh_instant
+	fetch 1,mem_rxbuf+5
+	store 1,mem_afh_new_mod
+	fetch 5,mem_rxbuf+6
+	store 5,mem_afh_map_new
+	fetch 5,mem_rxbuf+11
+	istore 5,contw
+	fetch 1,mem_mode
+	set1 afh_change,pdata
+	store 1,mem_mode
+	rtn
+parse_lmp_escape:
+	bpatchx patch22_6,mem_patch22
+	fetch 1,mem_rxbuf+1
+	set1 7,pdata
+	store 1,mem_lmi_opcode2
+	beq LMP_EXT_ACCEPTED,parse_lmpext_accepted
+	beq LMP_NOT_ACCEPTED_EXT,parse_lmpext_not_accepted
+	beq LMP_SNIFF_SUBRATING_REQ, parse_lmp_sniff_subrating_req
+	beq LMP_SNIFF_SUBRATING_RES, parse_lmp_sniff_subrating_res
+	beq LMP_PACKET_TYPE_TABLE_REQ,parse_lmpext_packet_type_table_req
+	beq LMP_EXT_FEATURES_REQ,parse_lmpext_features_req
+	beq LMP_EXT_FEATURES_RES,parse_lmpext_features_res
+	beq LMP_EXT_CHN_CLASSIFICATION_REQ,parse_lmpext_chn_classification_req
+	beq LMP_PAUSE_ENCRYPTION_REQ,parse_lmpext_pause_encrypt
+	beq LMP_RESUME_ENCRYPTION_REQ,parse_lmpext_resume_encrypt
+	beq LMP_IO_CAP_REQ,parse_lmpext_iocap_req
+	beq LMP_IO_CAP_RES,parse_lmpext_iocap_res
+	beq LMP_PING_REQ,parse_lmpext_ping_req
+	rtneq LMP_EXT_FEATURES_RES
+
+reject_unknown_ext_packet:
+	jam LMP_NOT_ACCEPTED_EXT,mem_lmo_opcode2
+	jam UNKNOWN_LMP_PDU,mem_lmo_reason2
+	rtn
+
+parse_lmpext_ping_req:
+	jam LMP_PING_RES,mem_lmo_opcode2
+	rtn
+	
+parse_lmpext_chn_classification_req:
+	jam LMP_NOT_ACCEPTED_EXT,mem_lmo_opcode2
+	jam NOT_SUPPORT_CHN_CLASSIFICATION,mem_lmo_reason2
+	rtn
+	
+parse_lmpext_iocap_req:
+	call iocap_lmpext_load
+	jam LMP_IO_CAP_RES,mem_lmo_opcode2
+	rtn
+
+parse_lmpext_iocap_res:
+	call iocap_lmpext_load
+	branch iocap_lmpext_common
+	
+iocap_lmpext_load:
+	arg      mem_sp_iocap_remote,contw
+	fetch 3, mem_rxbuf+2
+	istore    3,contw
+	rtn
+	
+iocap_lmpext_common:
+ifdef SIMPLE_PAIRING
+	branch master_set_mem_master_sp_flag,true//is un very ok to use master flag,but we have to add many codes if wo don't
+endif
+	rtn
+parse_lmpext_accepted:
+	fetch 1,mem_rxbuf+3
+	set1 7,pdata
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_PACKET_TYPE_TABLE_REQ,parse_lmpext_accepted_ptt
+	rtn
+
+	
+parse_lmpext_not_accepted:
+	fetch 1,mem_rxbuf+3
+	set1 7,pdata
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_PACKET_TYPE_TABLE_REQ,parse_lmpext_not_accepted_ptt
+	rtn
+
+parse_lmpext_accepted_ptt:
+	fetch 1,mem_ptt
+	fetcht 1,mem_state_map
+	nsetflag blank,smap_edr,temp
+	storet 1,mem_state_map
+parse_lmpext_not_accepted_ptt:
+	fetch 1,mem_state
+	rtnbit0 state_init_seq
+	set0 state_init_seq,pdata
+	store 1,mem_state
+	jam LMP_SETUP_COMPLETE,mem_lmo_opcode2
+	rtn
+
+parse_lmpext_pause_encrypt:
+	nbranch parse_lmpext_pause_encrypt_slave, master
+	jam LMP_STOP_ENCRYPTION_REQ,mem_lmo_opcode2
+	branch tid_reply
+
+parse_lmpext_pause_encrypt_slave:	
+	jam LMP_PAUSE_ENCRYPTION_REQ, mem_lmo_opcode2
+	rtn
+
+parse_lmpext_resume_encrypt:
+//trans file to pc may cause pause/resume encrypt
+//if ms is conn_sm_wait_end the controllor won't send ack after recieved start_encypt_accept
+	call tid_reply
+	branch lmp_start_encryption
+
+parse_lmpext_features_req:
+	ifetch 1,contr
+	store 1,mem_ext_features_page
+	beq 1,parse_lmpext_features_req_page1
+	beq 2,parse_lmpext_features_req_page2	
+	rtn
+	
+parse_lmpext_features_req_page1:
+	jam LMP_EXT_FEATURES_RES,mem_lmo_opcode2
+	increase 1,contr
+	ifetch 1,contr
+	bbit1 LMP_FEATURES_EXT_PAGE1_SC_HOST_BIT,remote_support_br_sc_host
+	branch remote_not_support_br_sc_host
+	
+parse_lmpext_features_req_page2:
+	jam LMP_EXT_FEATURES_RES,mem_lmo_opcode2
+	increase 1,contr
+	ifetch 2,contr
+	bbit1 LMP_FEATURES_EXT_PAGE2_SC_CONTROLLER_BIT,remote_support_br_sc_controller
+	branch remote_not_support_br_sc_controller
+	
+remote_support_br_sc_controller:
+	fetch 1,mem_remote_br_sc_support
+	set1 REMOTE_BR_SC_CONTROLLER_BIT,pdata
+	call set_remote_br_sc_support
+	
+	fetch 1,mem_remote_br_sc_support
+	rtnne 3
+	fetch 1,mem_secure_connections_enable
+	rtnbit0 SECURE_CONNECTIONS_BR_BIT
+ 	jam ENCAPSULATED_MINOR_TYPE_P256,mem_encapsulated_minor_type
+ 	rtn
+ 	
+remote_not_support_br_sc_controller:
+	fetch 1,mem_remote_br_sc_support
+	set0 REMOTE_BR_SC_CONTROLLER_BIT,pdata
+set_remote_br_sc_support:	
+	store  1,mem_remote_br_sc_support
+	rtn
+	 
+remote_support_br_sc_host:
+	fetch 1,mem_remote_br_sc_support
+	set1 REMOTE_BR_SC_HOST_BIT,pdata
+	branch set_remote_br_sc_support	
+	
+remote_not_support_br_sc_host:
+	fetch 1,mem_remote_br_sc_support
+	set0 REMOTE_BR_SC_HOST_BIT,pdata
+	branch set_remote_br_sc_support	
+	
+parse_lmpext_features_res:
+	fetcht 1,mem_rxbuf+4
+	and temp,0x1,temp
+	storet 1,mem_remote_sppcap
+	fetch 1,mem_hci_cmd
+	bne hci_cmd_wait_remote_ext_feature,parse_lmpext_features_res_not_hci
+	jam 0,mem_hci_cmd
+parse_lmpext_features_res_not_hci:
+	fetch 1,mem_conn_sm
+	rtnne CONN_SM_WAIT_FEATURES_EXT
+	jam CONN_SM_SEND_CONN_REQ,mem_conn_sm
+	branch process_conn_sm
+
+parse_lmp_accepted:
+	bpatchx patch22_7,mem_patch22
+	fetch 1,mem_rxbuf+1
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_HOST_CONNECTION_REQ,parse_lmp_accepted_hostconn//ok
+	beq LMP_IN_RAND,parse_lmp_accepted_inrand//ok
+	beq LMP_ENCRYPTION_MODE_REQ,parse_lmp_accepted_enc_mode//ok
+	beq LMP_ENCRYPTION_KEY_SIZE_REQ,parse_lmp_accepted_enc_keysize//ok
+	beq LMP_START_ENCRYPTION_REQ,parse_lmp_accepted_start_enc//ok
+	beq LMP_STOP_ENCRYPTION_REQ,parse_lmp_accepted_stop_enc//ok
+	beq LMP_UNSNIFF_REQ,parse_lmp_accepted_unsniff_req//ok
+	beq LMP_SNIFF_REQ,parse_lmp_accepted_sniff_req//ok
+	beq LMP_SWITCH_REQ,parse_lmp_accepted_switch
+	// simple pairing 
+	beq LMP_ENCAPSULATED_HEADER,parse_lmp_accepted_encapsulated_header//ok
+	beq LMP_ENCAPSULATED_PAYLOAD,parse_lmp_accepted_encapsulated_payload//ok
+	beq LMP_SIMPLE_PAIRING_NUMBER,parse_lmp_accepted_simple_pairing_number//ok
+	beq LMP_DHKEY_CHECK,parse_lmp_accepted_dhkey_check//ok
+	rtn
+	
+parse_lmp_not_accepted:
+	bpatchx patch23_0,mem_patch23
+	fetch 1,mem_rxbuf+1
+	store 1,mem_lmi_accepted_opcode
+	beq LMP_NAME_REQ,parse_lmp_not_accepted_name_req//ok
+	beq LMP_HOST_CONNECTION_REQ,parse_lmp_not_accepted_hostconn//ok
+	beq LMP_AU_RAND,parse_lmp_not_accepted_aurand//ok
+	beq LMP_IN_RAND,parse_lmp_not_accepted_inrand//ok
+	beq LMP_SWITCH_REQ,parse_lmp_not_accepted_switch//ok
+	/* simple pairing support */
+	beq  LMP_SIMPLE_PAIRING_NUMBER,parse_lmp_not_accepted_simple_pairing_number//ok
+	beq  LMP_DHKEY_CHECK,parse_lmp_not_accepted_dhkey_check//ok
+	beq LMP_UNSNIFF_REQ,parse_lmp_not_accepted_unsniff_req
+	beq LMP_SNIFF_REQ,parse_lmp_not_acdcept_sniff_req
+	rtn
+
+parse_lmp_accepted_switch:
+	jam BT_EVT_SWITCH_ACCEPT,mem_fifo_temp
+	call ui_ipc_send_event
+	branch role_switch_prepare0
+	
+parse_lmp_not_accepted_switch:
+	jam BT_EVT_SWITCH_NOT_ACCEPT,mem_fifo_temp
+	call ui_ipc_send_event
+	jam SWITCH_FLAG_NOT_ACCEPT,mem_switch_flag
+	setarg TIMER_SWITCH_WAITE
+	arg switch_wait_timer,queue
+	branch timer_init
+
+
+parse_lmp_accepted_hostconn:
+	//fetch 1,mem_state
+	//rtnbit0 state_init_seq
+	fetch 1,mem_lmp_conn_state
+	set1 RECEIVED_CONN_REQ,pdata
+	store 1,mem_lmp_conn_state
+	jam BT_EVT_BB_CONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+	jam LMP_PACKET_TYPE_TABLE_REQ,mem_lmo_opcode2
+	//nbranch parse_lmp_accepted_hostconn_ctn,master
+parse_lmp_accepted_hostconn_ctn:
+	/* checking to see if we requested host connection */
+	fetch 1,mem_conn_sm
+	bne CONN_SM_WAIT_CONN_ACCEPT, parse_rx_done
+	//branch parse_lmp_accepted_hostconn_master,master
+	/* continuing on with host connection state machine */
+	jam CONN_SM_AUTH_PAIR,mem_conn_sm
+	rtn
+	//branch host_create_conn_auth_pair
+
+	/* we need to move fast and send au_rand...jumping to next part of state machine for conn */
+//parse_lmp_accepted_hostconn_master:
+	//jam CONN_SM_AUTH_PAIR ,mem_conn_sm
+//	rtn
+
+parse_lmp_not_accepted_hostconn:
+	jam ACL_CONNECTION_ALREADY_EXISTS,mem_disconn_reason_send
+	jam LMP_DETACH,mem_lmo_opcode2
+	/* clearing connection state machine */
+	jam CONN_SM_STANDBY,mem_conn_sm
+	/* sending error message to host */
+	branch parse_rx_done,true
+	rtn
+
+parse_lmp_accepted_inrand:
+	fetch 1,mem_link_key_exists
+	nrtn blank
+	call clear_linkkey
+	call  lmp_generate_key
+	rtn master
+	set1 mark_slave_in_rand_accepted,mark
+	rtn
+
+parse_lmp_accepted_enc_mode:
+	nrtn master
+	jam LMP_ENCRYPTION_KEY_SIZE_REQ,mem_lmo_opcode2
+	fetch 1,mem_state_map
+	rtnbit0 smap_encryption
+	jam LMP_STOP_ENCRYPTION_REQ,mem_lmo_opcode2
+	rtn
+
+parse_lmp_accepted_enc_keysize:
+	branch lmp_start_encryption
+	
+parse_lmp_accepted_start_enc:
+	call send_create_conn_start_l2cap_timer_sm
+	fetch 1,mem_state
+	rtnbit1 state_conn_comp
+	jam LMP_SETUP_COMPLETE,mem_lmo_opcode2
+	fetch 1,mem_conn_sm
+	rtnne CONN_SM_ENCRYPT_WAIT
+	jam CONN_SM_ENCRYPT_WAIT_CLEAR,mem_conn_sm
+	rtn
+	
+parse_lmp_accepted_stop_enc:
+	/* again this won't work with multipoint. keep track of anyone else encrypting */
+	//jam HOST_STOP_ENCRYPTION,message_queue_B0
+	//jam 1,message_queue_B1
+	//jam HOST_RETURN_SUCCESS,message_queue_B2
+	//fetch 1,mem_lmp_state2
+	//set1 MESSAGE_QUEUE,pdata
+	//store 1,mem_lmp_state2
+	rtn
+
+parse_lmp_not_accepted_aurand:	
+parse_lmp_not_accepted_aurand_send_detach:	
+	fetch 1,mem_device_option
+	sub pdata,dvc_op_mouse,null
+	call mouse_delay_enter_hibernata,zero
+	jam LMP_DETACH,mem_lmo_opcode2
+	jam OTHER_END_TERMINATED,mem_disconn_reason_send
+	rtn
+/*in pair remote cancel the pair*/
+parse_lmp_not_accepted_inrand:
+	fetch 1,mem_rxbuf+2
+	beq KEY_MISSING,parse_lmp_inrand_key_missing
+	rtnne PAIRING_NOT_ALLOWED
+	jam PAIRING_NOT_ALLOWED,mem_disconn_reason_send
+	jam LMP_DETACH,mem_lmo_opcode2
+	rtn	
+parse_lmp_inrand_key_missing:
+	jam KEY_MISSING,mem_disconn_reason_send
+	jam LMP_DETACH,mem_lmo_opcode2
+	rtn
+	
+parse_lmp_not_accepted_name_req:
+	rtn
+	
+parse_lmp_not_accepted_simple_pairing_number:
+	jam SP_STAT_NULL,mem_sp_state
+	jam LMP_DETACH,mem_lmo_opcode2
+	branch parse_rx_done
+	
+parse_lmp_not_accepted_dhkey_check:
+	jam SP_STAT_NULL,mem_sp_state
+	jam LMP_DETACH,mem_lmo_opcode2
+	branch parse_rx_done
+parse_lmp_not_accepted_unsniff_req:
+	jam BT_EVT_UNSNIFF_NOT_ACCEPT,mem_fifo_temp
+	branch ui_ipc_send_event
+	
+parse_lmp_accepted_unsniff_req:
+	jam BT_EVT_UNSNIFF_ACCEPT,mem_fifo_temp
+	call ui_ipc_send_event
+	branch sniff_exit
+	
+parse_lmp_accepted_sniff_req:
+	jam BT_EVT_SNIFF_ACCEPT,mem_fifo_temp
+	call ui_ipc_send_event
+	setarg 0
+	store 2,mem_dsniff
+	fetch 2,mem_sniff_param_interval
+	lshift pdata,pdata
+	store 2,mem_tsniff
+	fetch 1,mem_sniff_param_attempt
+	store 1,mem_sniff_attempt
+	fetch 1,mem_sniff_param_timeout
+	store 1,mem_sniff_timeout
+	branch sniff_init
+	
+parse_lmp_not_acdcept_sniff_req:
+	jam BT_EVT_SNIFF_NOT_ACCEPT,mem_fifo_temp
+	branch ui_ipc_send_event
+	
+parse_lmp_crypt_key:
+	fetcht 1,mem_rxbuf+1
+	sub temp,6,null
+	branch lmp_reject_pdu_not_allowed,positive
+	storet 1,mem_key_size
+	branch accept_lmp_msg
+	
+parse_lmp_setup_complete:
+	fetch 1,mem_lmp_conn_state
+	set1 RECEIVED_SETUP_COMPLETE,pdata
+	store 1,mem_lmp_conn_state
+	rtnbit1 SENT_SETUP_COMPLETE
+	jam LMP_SETUP_COMPLETE,mem_lmo_opcode2
+	branch parse_rx_done
+	
+parse_lmp_max_slot:
+	//jam LMP_MAX_SLOT,mem_lmi_opcode2
+	//branch accept_lmp_msg
+	rtn
+	
+parse_lmp_max_slot_req:
+	fetch 1,mem_max_slot
+	fetcht 1,mem_rxbuf+1
+	isub temp,null
+	//jam LMP_MAX_SLOT_REQ,mem_lmi_opcode2
+	branch accept_lmp_msg,positive
+	jam LMP_NOT_ACCEPTED,mem_lmo_opcode2
+	jam UNSPECIFIED_ERROR,mem_lmo_reason2
+	jam LMP_MAX_SLOT_REQ,mem_lmi_opcode2
+	rtn
+	
+parse_lmp_detach:
+	branch prepare_disconnect
+	
+accept_lmp_msg:
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	rtn
+
+parse_lmp_incr_power:
+	jam LMP_MAX_POWER,mem_lmo_opcode2
+	rtn
+
+parse_lmp_decr_power:
+	jam LMP_MIN_POWER,mem_lmo_opcode2
+	rtn
+	
+parse_lmp_version_res:
+	fetch 1,mem_conn_sm
+	rtneq CONN_SM_WAIT_VERSION
+	/* continuing on with host connection state machine */
+	jam CONN_SM_SEND_FEATURES ,mem_conn_sm
+	/* we need to move fast and send au_rand...jumping to next part of state machine for conn */
+	rtn
+
+
+parse_lmp_auto_rate:
+	rtn	
+
+parse_lmp_in_rand:
+	fetch 1,mem_sc_only_mode
+	nbranch parse_lmp_in_rand_not_accept,blank
+	
+	call lmp_copy_rand
+	jam pincode_state_wait_pincode,mem_pincode_state
+	jam BT_EVT_PINCODE_REQ,mem_fifo_temp
+	call ui_ipc_send_event
+
+	call tid_check
+	nbranch lmp_accept_inrand,true
+	nbranch parse_lmp_inrand_res,master // ignore this because of not ssp temporary
+parse_lmp_in_rand_not_accept:
+	jam LMP_NOT_ACCEPTED,mem_lmo_opcode2
+	jam LMP_IN_RAND,mem_lmi_opcode2
+	jam TRANSACTION_COLLISION,mem_lmo_reason2
+	rtn
+	
+parse_lmp_inrand_res:
+	fetch 1,mem_op
+	set1 op_inrand_req,pdata
+	store 1,mem_op
+	rtn
+
+//store current tid
+pop_tid_follow:
+	fetcht 1,mem_state_map
+	nsetflag blank,smap_lmptid,temp
+	storet 1,mem_state_map
+	rtn
+	
+//restore current tid
+push_tid_follow:
+	fetch 1,mem_lmo_tid2
+	rshift pdata,pdata
+	and_into 1,pdata
+	rtn
+
+parse_lmp_au_rand_moudle:
+	fetch 1,mem_nv_data_number
+	rtn blank
+	fetch 1,mem_pairing_auth
+	call load_device_list,blank
+	rtn	
+
+parse_lmp_au_rand:
+	call parse_lmp_au_rand_moudle
+	call push_tid_follow
+	store 1,mem_sres_tid
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,parse_lmp_au_rand_256
+	call lmp_copy_rand
+	jam LMP_SRES,mem_lmo_opcode2
+parse_lmp_au_rand_common:	
+	fetch 1,mem_link_key_exists
+	nrtn blank
+	fetch 1,mem_state
+	rtnbit1 state_combkey		/* we have comb key, but not verified */
+	jam KEY_MISSING,mem_lmo_reason2
+	branch reject_lmp_packet
+	
+parse_lmp_au_rand_256:
+	jam LMP_AU_RAND,mem_lmo_opcode2
+	arg mem_sp_random_remote,contw
+	arg mem_rxbuf+1,contr
+	call memcpy16	
+	branch parse_lmp_au_rand_common
+
+	
+parse_lmp_sres:	
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,parse_lmp_sres_256
+
+	arg mem_plap,rega
+	call function_e1
+	fetcht 4,mem_input_store
+	fetch 4,mem_rxbuf+1
+	isub temp,null
+	branch authentication_ok,zero
+authentication_fail:	
+	jam LMP_DETACH,mem_lmo_opcode2
+	jam AUTHENTICATION_FAILURE_ERROR,mem_disconn_reason_send	
+	rtn
+	
+authentication_ok:
+	call copy_aco
+	call authentication_ok_common
+	fetch 1,mem_ssp_enable
+	branch  pairing_success,blank
+	rtn
+
+parse_lmp_sres_256:
+	fetch 4,mem_rxbuf+1
+	fetcht 4,mema
+	isub temp,null
+	branch authentication_ok_256,zero
+	branch authentication_fail
+	
+authentication_ok_256:
+	call authentication_ok_common
+	fetch 1,mem_secure_connections_enable
+	bbit1  SECURE_CONNECTIONS_BR_BIT,pairing_success
+	rtn
+	
+	
+authentication_ok_common:
+	call linkkey_ready///save link key
+	fetch 1,mem_op
+	isolate1 op_auth_req,pdata
+	set0 op_auth_req,pdata
+	store 1,mem_op
+	fetch 1,mem_conn_sm
+	beq CONN_SM_AUTH_WAIT,authentication_ok_conn_sm
+	beq CONN_SM_PAIRING_WAIT,authentication_ok_conn_sm
+	rtn
+authentication_ok_conn_sm:
+	fetch 1,mem_pairing_auth
+	rtnne DEFALT_PAIRING_AUTH
+	fetch 1,mem_state_map
+	rtnbit1 smap_encryption
+	branch host_create_conn_encrypt
+
+parse_lmp_comb_key:
+	arg mem_rxbuf+1,rega
+	arg mem_kinit,regb
+	arg mem_random_number,contw
+	call xor16
+	arg mem_plap,rega
+	call generate_linkkey
+	jam LMP_AU_RAND,mem_lmo_opcode2
+	fetch 1,mem_state
+	bbit0 state_combkey,lmp_generate_key
+	rtn
+	
+parse_lmp_name_res:
+	fetch 2,mem_len
+	add pdata,-3,loopcnt	//for remote name length error
+	fetcht 1,mem_rxbuf+1
+	setarg mem_tmp_buffer
+	iadd temp,contw
+	arg mem_rxbuf+3,contr
+	call memcpy
+	fetcht 1,mem_name_offset
+	fetch 1,mem_rxbuf+2
+	isub temp,pdata
+	sub pdata,14,null
+	branch parse_lmp_name_res_end,positive
+	add temp,14,pdata
+	store 1,mem_name_offset
+	jam LMP_NAME_REQ,mem_lmo_opcode2
+	rtn
+parse_lmp_name_res_end:
+	fetch 1,mem_state_map
+	set1 smap_name_res,pdata
+	store 1,mem_state_map
+	bbit1 smap_name_req,lmp_disconnect
+	rtn
+parse_lmp_name_req:
+	fetch 1,mem_rxbuf+1
+	store 1,mem_lmi_opcode2 //offset 
+	jam LMP_NAME_RES,mem_lmo_opcode2
+	rtn
+
+parse_lmp_conn_req:
+	branch accept_lmp_msg
+
+parse_lmp_timing_accuracy_req:
+	jam LMP_TIMING_ACCURACY_RES,mem_lmo_opcode2
+	rtn
+
+parse_lmp_features_req:
+	jam LMP_FEATURES_RES,mem_lmo_opcode2
+	rtn
+
+parse_lmp_version_req:
+	jam LMP_VERSION_RES,mem_lmo_opcode2
+	rtn
+
+parse_lmp_supervision_timeout:
+//	fetch 2,mem_rxbuf+1
+//	store 2,mem_supervision_to
+	rtn
+	
+
+
+parse_lmp_sniff_subrating_req:
+	fetch 2,mem_tsniff
+	iforce temp
+	fetch 1,mem_rxbuf+2
+	store 1,mem_subsniff_rate
+	imul32 temp,temp
+	fetch 2,mem_rxbuf+3
+	lshift pdata,pdata
+	store 2,mem_subsniff_tcmax
+	fetch 4,mem_rxbuf+5
+	lshift pdata,pdata
+ 	store 4,mem_subsniff_instant
+	//product pdata
+	deposit temp
+	store 2,mem_subsniff_tsniff
+	rtn
+parse_lmpext_packet_type_table_req:
+	fetcht 1,mem_ptt
+	fetch 1,mem_rxbuf+2
+	ixor temp,null
+	nbranch reject_unknown_ext_packet,zero
+	isolate1 0,pdata
+	fetch 1,mem_state_map
+	setflag true,smap_edr,pdata
+	store 1,mem_state_map
+	jam LMP_EXT_ACCEPTED,mem_lmo_opcode2
+	jam LMP_PACKET_TYPE_TABLE_REQ,mem_lmi_opcode2
+	rtn
+
+	
+parse_lmp_sniff_subrating_res:
+parse_lmp_preferred_rate:
+parse_lmp_max_power:
+parse_lmp_min_power:
+	rtn
+parse_lmp_page_mode_req:
+	//jam LMP_PAGE_MODE_REQ,mem_lmi_opcode2
+	branch accept_lmp_msg
+parse_lmp_page_scan_mode_req:
+	//this can influence connection. need accepted
+	//jam LMP_PAGE_SCAN_MODE_REQ,mem_lmi_opcode2
+	branch accept_lmp_msg
+
+
+	
+parse_lmp_slot_offset:
+	fetch 2,mem_rxbuf+1
+	store 2,mem_slot_offset
+	rtn
+
+parse_lmp_sniff_req_check_sniff_para:
+	fetch 2,mem_rxbuf+4 /* tsniff */
+	fetcht 1,mem_lpm_mult
+	imul32 temp,pdata
+	arg 0x640,temp
+	isub temp,null
+//	branch lmp_reject_pdu_not_allowed,positive
+	rtn
+	
+parse_lmp_sniff_req:
+	fetch 2,mem_rxbuf+6
+	branch lmp_reject_pdu_not_allowed,blank
+	call parse_lmp_sniff_req_check_sniff_para
+	branch lmp_reject_pdu_not_allowed,positive
+	fetch 1,mem_device_option
+	sub pdata,dvc_op_module,null
+	call module_set_lpm_mult_2,zero
+	fetch 1,mem_state
+	bbit1 state_insniff,lmp_reject_pdu_not_allowed
+	fetch 2,mem_rxbuf+2 /* dsniff */
+	lshift pdata,pdata
+	store 2,mem_dsniff	
+	fetch 2,mem_rxbuf+4 /* tsniff */
+	lshift pdata,pdata
+	store 2,mem_tsniff
+	fetch 2,mem_rxbuf+6 /* sniff attempt */
+	store 1,mem_sniff_attempt
+	iforce temp
+	fetch 2,mem_rxbuf+8 /* sniff timeout */
+	store 1,mem_sniff_timeout
+	isub temp,null
+	nbranch set_big_value_to_attempt,positive
+	store 1,mem_sniff_attempt
+set_big_value_to_attempt:	
+	//call sniff_init
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_SNIFF_REQ,mem_lmi_opcode2
+	rtn
+
+parse_lmp_start_encryption_req:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,parse_lmp_start_encryption_req_256
+	call accept_lmp_msg
+	call lmp_copy_rand
+	call function_e3
+	branch start_encryption
+
+parse_lmp_start_encryption_req_256:
+	call accept_lmp_msg
+//	call lmp_copy_rand
+	call start_encryption
+calc_kc:	
+	call function_h3
+	arg mem_kc,contw
+	arg mem_sp_calc_result_high,contr
+	arg 0x10,loopcnt
+	branch reverse_byte
+	
+parse_lmp_stop_encryption_req:
+	call accept_lmp_msg
+	branch stop_encryption
+	
+
+parse_lmp_switch_req:
+	fetch 4,mem_rxbuf+1
+	lshift pdata,pdata
+	//branch parse_lmp_switch_req_not_accept
+	branch parse_lmp_switch_accept,master
+	fetcht 1,mem_link_key_exists
+	nbranch parse_lmp_switch_req_clear_mark,blank
+parse_lmp_switch_req_not_accept:
+	jam LMP_SWITCH_REQ,mem_lmi_opcode2
+	branch lmp_reject_pdu_not_allowed
+	
+parse_lmp_switch_req_clear_mark:
+	jam LMP_SLOT_OFFSET,mem_lmo_opcode2
+	jam 0,mem_conn_sm
+	branch role_switch_prepare
+
+parse_lmp_switch_accept:
+	call role_switch_prepare
+	set1 mark_reconn_recieve_switch,mark
+	fetch 1,mem_connection_options
+	set0 CONNECTION_SWITCH,pdata
+	store 1,mem_connection_options
+	branch accept_lmp_msg
+
+	
+
+parse_lmp_temp_rand:
+parse_lmp_temp_key:
+parse_lmp_timing_accuracy_res:	
+parse_lmp_unit_key:	
+parse_lmp_use_semi_permanend_key:
+	rtn
+
+	
+parse_lmp_unsniff_req:
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_UNSNIFF_REQ,mem_lmi_opcode2
+	jam BT_EVT_REMOTE_UNSNIFF,mem_fifo_temp
+	call ui_ipc_send_event
+	branch sniff_exit
+	
+parse_lmp_encapsulated_header:
+	jam 0,mem_sp_remote_key_recv_count
+	fetch 1,mem_rxbuf+1
+	store 1,mem_encapsulated_major_type
+	bne ENCAPSULATED_MAJOR_TYPE,lmp_reject_pdu_not_allowed
+	fetcht 1,mem_rxbuf+2
+	storet 1,mem_encapsulated_minor_type
+	
+	fetch 1,mem_sc_only_mode
+	branch parse_lmp_encapsulated_header2,blank
+	sub temp,ENCAPSULATED_MINOR_TYPE_P256,null
+	nbranch authentication_fail,zero
+parse_lmp_encapsulated_header2:
+	fetch 1,mem_rxbuf+3
+	beq ENCAPSULATED_LEN_P256,parse_lmp_encapsulated_header3
+	beq ENCAPSULATED_LEN_P192,parse_lmp_encapsulated_header3
+	branch lmp_reject_pdu_not_allowed
+
+parse_lmp_encapsulated_header3:
+	store 1,mem_encapsulated_len	
+	call check_localsm
+	branch parse_lmp_encapsulated_header_master,true
+	jam SP_STAT_KEY_RECV,mem_sp_state
+parse_lmp_encapsulated_header_master:
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_ENCAPSULATED_HEADER,mem_lmi_opcode2
+	branch parse_rx_done
+	
+	
+parse_lmp_accepted_encapsulated_header:
+	//jam LMP_ENCAPSULATED_PAYLOAD,mem_lmi_opcode2
+	//branch   accept_lmp_msg  	
+	jam LMP_ENCAPSULATED_PAYLOAD,mem_lmo_opcode2
+      //   branch   accept_lmp_msg  	
+         rtn
+parse_lmp_accepted_simple_pairing_number:
+	fetch 1,mem_ssp_mode_flag
+	beq SSP_MODE_SSP_PIN_FLAG,parse_lmp_accepted_simple_pairing_number_ssp_pin
+	beq SSP_MODE_PASSKEY_ENTRY_FLAG,parse_lmp_accepted_simple_pairing_number_passkey
+parse_lmp_accepted_simple_pairing_number_common:
+	call check_localsm
+	rtn true
+	jam SP_STAT_CONFIRM_RECV,mem_sp_state
+	rtn
+
+parse_lmp_accepted_simple_pairing_number_ssp_pin:
+	call g_noninit_number_confirm
+	jam BT_EVT_BT_GKEY_GENERATE,mem_fifo_temp
+	call ui_ipc_send_event
+	branch parse_lmp_accepted_simple_pairing_number_common
+
+
+parse_lmp_accepted_simple_pairing_number_passkey:
+	call check_localsm
+	rtn true
+	fetch 1,mem_authentication_passkey_times
+	beq 19,authentication_passkey_end
+	increase 1,pdata
+	store 1,mem_authentication_passkey_times
+//	branch p_authentication_passkey
+
+authentication_passkey:
+	jam SP_FLAG_COMMIT,mem_sp_flag
+	jam SP_STAT_COMMIT_CALC,mem_sp_state 
+	fetch 1,mem_authentication_passkey_times
+	copy pdata,queue
+	fetch 6,mem_pin
+	qisolate1 pdata
+	setarg 0x80
+	setflag true,0,pdata
+	store 1,mem_passkey_1bit
+	rtn
+
+authentication_passkey_end:	
+	jam SP_STAT_CONFIRM_RECV,mem_sp_state
+	rtn
+
+parse_lmp_accepted_dhkey_check:
+	call parse_lmp_accepted_dhkey_check_common
+pairing_success:
+	fetch 1,mem_flag_pairing_state
+	rtn blank
+	jam FLAG_PAIRING_STATE_NOT_PAIRING,mem_flag_pairing_state
+	jam BT_EVT_BT_PAIRING_SUCCESS,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+parse_lmp_accepted_dhkey_check_common:
+	call check_localsm
+ifdef SIMPLE_PAIRING
+	ncall g_noninit_192,true	//when be master  call g_init
+	call g_init_192,true
+endif
+	call check_localsm
+	rtn true
+	jam SP_STAT_LINK_KEY_CALC,mem_sp_state
+	jam SP_FLAG_COMMIT,mem_sp_flag
+	rtn
+
+parse_simple_pairing_confirm:
+	arg mem_sp_confirm_remote,contw
+	arg mem_rxbuf+1,contr
+	call memcpy16
+	fetch 1,mem_ssp_mode_flag
+	rtneq  SSP_MODE_PASSKEY_ENTRY_FLAG
+ifdef SIMPLE_PAIRING
+	branch master_set_mem_master_sp_flag
+endif
+	rtn
+	
+parse_lmp_encapsulated_payload:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P192,parse_lmp_encapsulated_payload_192
+	beq ENCAPSULATED_MINOR_TYPE_P256,parse_lmp_encapsulated_payload_256
+	branch lmp_reject_pdu_not_allowed
+
+parse_lmp_encapsulated_payload_256:
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_RANDOM_SEND,parse_encapsulated_payload_256_master
+	fetch    1,mem_sp_state
+	bne SP_STAT_KEY_RECV,lmp_reject_pdu_not_allowed
+parse_encapsulated_payload_256_master:
+	fetch    1,mem_sp_remote_key_recv_count
+	sub      pdata,0x30,contw
+	nbranch  lmp_reject_pdu_not_allowed,positive
+	arg      mem_le_pubkey_remote_x_256,contw
+	iadd     contw,contw
+	fetch 8,mem_rxbuf+1
+	istore   8,contw
+	fetch 8,mem_rxbuf+9
+	istore   8,contw
+	fetch    1,mem_sp_remote_key_recv_count
+	increase 16,pdata
+	store    1,mem_sp_remote_key_recv_count
+	bne ENCAPSULATED_LEN_P256,accept_lmp_msg
+	branch parse_lmp_encapsulated_payload_completed
+
+parse_lmp_encapsulated_payload_192:
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_RANDOM_SEND,parse_encapsulated_payload_192_master
+	fetch    1,mem_sp_state
+	bne SP_STAT_KEY_RECV,lmp_reject_pdu_not_allowed
+parse_encapsulated_payload_192_master:
+	fetch    1,mem_sp_remote_key_recv_count
+	sub      pdata,0x20,contw
+	nbranch  lmp_reject_pdu_not_allowed,positive
+	arg      mem_sp_pubkey_remote,contw
+	iadd     contw,contw
+	fetch 8,mem_rxbuf+1
+	istore   8,contw
+	fetch 8,mem_rxbuf+9
+	istore   8,contw
+	fetch    1,mem_sp_remote_key_recv_count
+	increase 16,pdata
+	store    1,mem_sp_remote_key_recv_count
+	bne ENCAPSULATED_LEN_P192,accept_lmp_msg
+parse_lmp_encapsulated_payload_completed:
+	call check_localsm
+	branch accept_lmp_msg,true
+	jam      SP_KEY_VALID,mem_sp_remote_key_invalid
+	jam      SP_STAT_KEY_GENERATE,mem_sp_state
+	jam      SP_FLAG_COMMIT,mem_sp_flag  
+	branch   accept_lmp_msg
+	
+	
+parse_lmp_accepted_encapsulated_payload: 
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P192,parse_lmp_accepted_encapsulated_payload_192
+	beq ENCAPSULATED_MINOR_TYPE_P256,parse_lmp_accepted_encapsulated_payload_256
+	rtn
+	
+parse_lmp_accepted_encapsulated_payload_192:
+	fetch 1,mem_sp_local_key_send_count
+	beq	ENCAPSULATED_LEN_P192,parse_lmp_encapsulated_payload_all_accepted
+	jam LMP_ENCAPSULATED_PAYLOAD,mem_lmo_opcode2
+	rtn    
+	
+parse_lmp_accepted_encapsulated_payload_256:
+	fetch 1,mem_sp_local_key_send_count
+	beq	ENCAPSULATED_LEN_P256,parse_lmp_encapsulated_payload_all_accepted
+	jam LMP_ENCAPSULATED_PAYLOAD,mem_lmo_opcode2
+	rtn    
+	
+parse_lmp_encapsulated_payload_all_accepted:   
+	call check_localsm
+	branch parse_lmp_encapsulated_payload_all_accepted_master,true
+	fetch 1,mem_ssp_mode_flag
+	beq SSP_MODE_PASSKEY_ENTRY_FLAG,parse_lmp_encapsulated_payload_all_accepted_get_passkey
+	jam      SP_FLAG_COMMIT,mem_sp_flag
+	jam      SP_STAT_COMMIT_CALC,mem_sp_state 
+	branch   parse_rx_done
+
+parse_lmp_encapsulated_payload_all_accepted_get_passkey:
+	jam BT_EVT_BT_GET_PASSKEY,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+parse_lmp_encapsulated_payload_all_accepted_master:
+	//call sp_master_generate_local_key
+	branch   parse_rx_done   
+
+parse_lmp_simple_pairing_number:
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_RANDOM_SEND,parse_lmp_simple_pairing_number_master
+	fetch    1,mem_sp_state
+	bne SP_STAT_RANDOM_RECV,lmp_reject_pdu_not_allowed
+parse_lmp_simple_pairing_number_master:
+	arg      mem_sp_random_remote,contw
+	fetch 8,mem_rxbuf+1
+	istore   8,contw
+	fetch 8,mem_rxbuf+9
+	istore   8,contw
+	call check_localsm
+	branch parse_lmp_simple_pairing_number_master0,true
+	jam      SP_STAT_RANDOM_SEND,mem_sp_state
+	jam      SP_FLAG_COMMIT,mem_sp_flag
+	branch accept_lmp_msg  
+parse_lmp_simple_pairing_number_master0:
+	jam SP_STAT_COMMIT_CALC,mem_master_sp_state
+ifdef SIMPLE_PAIRING
+	branch master_set_mem_master_sp_flag
+endif
+	branch lmp_reject_pdu_not_allowed	
+	
+parse_dhkey_check:
+	fetch    1,mem_master_sp_state
+	beq SP_STAT_CONFIRM_SEND,parse_dhkey_check_master
+	fetch    1,mem_sp_state
+	bne SP_STAT_CONFIRM_RECV,lmp_reject_pdu_not_allowed
+parse_dhkey_check_master:
+	arg mem_sp_check_result,contw
+	arg mem_rxbuf+1,contr
+	call memcpy16
+	call check_localsm
+	branch parse_dhkey_check_master0,true
+	fetch 1,mem_ssp_mode_flag
+	beq SSP_MODE_SSP_PIN_FLAG,number_comparison_mode
+number_comparison_successed:
+	jam 0,mem_flag_mode_ssp_pin
+	jam SP_STAT_CONFIRM_CHECK,mem_sp_state
+	jam SP_FLAG_COMMIT,mem_sp_flag
+	jam LMP_DHKey_Check,mem_lmi_opcode2
+	branch   parse_rx_done
+	
+parse_dhkey_check_master0:
+	jam      SP_STAT_CONFIRM_CHECK,mem_master_sp_state
+	jam      SP_FLAG_COMMIT,mem_master_sp_flag
+	branch   parse_rx_done
+	
+lmp_reject_pdu_not_allowed:
+	jam PDU_NOT_ALLOWED,mem_lmo_reason2
+	branch reject_lmp_packet
+
+number_comparison_mode:
+	fetch 1,mem_flag_mode_ssp_pin
+	bbit1 FLAG_MODE_SSP_PIN_REVICEVE_COMPARISON_BIT ,comparison_result
+	set1 FLAG_MODE_SSP_PIN_RECIEVE_DHKEY_BIT,pdata
+	store 1,mem_flag_mode_ssp_pin
+	rtn
+	
+comparison_result:
+	bbit1 FLAG_MODE_SSP_PIN_COMPARISON_RESULT_BIT,number_comparison_successed
+	jam 0,mem_flag_mode_ssp_pin
+	branch lmp_reject_pdu_not_allowed
+
+	
+parse_lmp_clkoffset_res:
+	branch parse_rx_done
+		
+parse_lmp_encryption_mode_req:
+	fetch 1,mem_connection_options
+	set0 CONNECTION_ENCRYPT,pdata
+	store 1,mem_connection_options
+	call accept_lmp_msg
+	nrtn master					/* do sth only if we're master */
+	fetch 1,mem_rxbuf+1
+	fetcht 1,mem_op
+	setflag blank,op_stop_enc,temp
+	nsetflag blank,op_start_enc,temp
+	storet 1,mem_op
+	rtn 
+	
+parse_lmp_features_res:
+	fetcht 8,mem_rxbuf+1		/*fix bcp(baoshijie) err*/
+parse_lmp_features_res_not_hci:	
+	fetch 1,mem_conn_sm
+	rtnne CONN_SM_WAIT_FEATURES_RES
+
+	fetch 1,mem_connection_options
+	bbit0 CONNECTION_FEATURE_EXT,parse_lmp_send_conn
+
+	jam CONN_SM_SEND_FEATURES_EXT,mem_conn_sm
+	rtn
+parse_lmp_send_conn:
+	jam CONN_SM_SEND_CONN_REQ,mem_conn_sm
+	rtn
+parse_lmp_test_activate:
+	fetch 1,mem_debug_config
+	store 1,mem_test_mode_old_debug_config
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_TEST_ACTIVATE,mem_lmi_opcode2
+	rtn
+parse_lmp_test_control:
+	/* the 9 test control parameters are XORed with 0x55 */
+	/* doing the XOR here and storing in mem_temp_payload */
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_TEST_CONTROL,mem_lmi_opcode2
+	force 9,loopcnt
+	arg mem_rxbuf+1,contr
+	arg mem_temp_payload,contw
+parse_lmp_test_xor:
+	ifetch 1,contr
+	xor_into 0x55,pdata
+	istore 1,contw
+	loop parse_lmp_test_xor
+	fetch 1,test_mode_scenario
+	fetcht 1,mem_tester_emulate
+	set0 tester_no_whitening,temp
+	set0 tester_pattern_test,temp
+	beq EXIT_TEST_MODE,	 parse_lmp_test_control_exit
+	beq PAUSE_TEST_MODE,	 parse_lmp_test_control_pause
+	beq CLOSED_LOOP_BACK_ACL,	 parse_lmp_test_control_loopback
+	beq ACL_WITHOUT_WHITENING,	 parse_lmp_test_control_loopback_nowhite
+	beq CLOSED_LOOP_BACK_SCO,	 parse_lmp_test_control_loopback
+	beq SCO_WITHOUT_WHITENING,	 parse_lmp_test_control_loopback_nowhite
+	beq ZERO_PATTERN,	 parse_lmp_test_control_pattern
+	beq ONE_PATTERN,	 parse_lmp_test_control_pattern
+	beq ALT_PATTERN,	 parse_lmp_test_control_pattern
+	beq ALT2_PATTERN,	 parse_lmp_test_control_pattern
+	beq PSEUDORANDOM,	 parse_lmp_test_control_pattern
+	rtn
+parse_lmp_test_control_exit:
+	/* restoring old parameters */
+	fetch 1,mem_tester_emulate
+	set1 tester_exit,pdata
+	set1 tester_change,pdata
+	store 1,mem_tester_emulate
+	rtn
+parse_lmp_test_control_pattern:
+	set1 tester_pattern_test,temp
+	jam 5,mem_lch_code
+	fetch 2,test_mode_data_length
+	iforce loopcnt
+	store 2,mem_len
+	arg mem_rxbuf,contw
+	call pn9
+parse_lmp_test_control_loopback_nowhite:
+	set1 tester_no_whitening,temp
+parse_lmp_test_control_loopback:
+	set1 tester_change,temp
+	force 0,pdata
+	store 1,mem_slave_rcvcnt
+	store 2,mem_tst_pktcnt_crc
+	store 2,mem_tst_pktcnt_dmh
+	store 2,mem_tst_pktcnt_hec
+	store 2,mem_tst_pktcnt_sync
+	fetch 1,test_mode_hopping_mode
+	compare FIXED_FREQ,pdata,0xff
+	setflag true,tester_fixed_freq,temp
+	storet 1,mem_tester_emulate
+	rtn
+
+parse_lmp_test_control_pause:
+	set0 mark_testmode,mark
+	jam 0,mem_tester_emulate
+	fetch 1,mem_debug_config
+	set0 debug_tx_pattern,pdata
+	store 1,mem_debug_config
+	rtn
+
+
+	
+	
+
+lmp_copy_rand:	
+	arg mem_rxbuf+1,contr
+	arg mem_random_number,contw
+	branch memcpy16
+
+lmp_generate_key:
+	jam LMP_COMB_KEY,mem_lmo_opcode2
+	rtn
+
+lmp_start_encryption:
+	nrtn master
+	jam LMP_START_ENCRYPTION_REQ,mem_lmo_opcode2
+	rtn
+	
+lmp_accept_inrand:
+	arg mem_lap,rega
+	call generate_kinit
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_IN_RAND,mem_lmi_opcode2
+	rtn
+
+lmp_disconnect:
+	jam 10,mem_conn_timer
+	jam LMP_DETACH,mem_lmo_opcode2
+	jam LOCAL_HOST,mem_disconn_reason_send	
+	rtn
+
+/*********************************/
+/*********lmp send*************/
+/********************************/
+	/* enable user if a lmp packet is to send */
+send_lmp:
+	bpatchx patch23_1,mem_patch23
+	disable user
+	call lmo_fifo_process
+	fetch 1,mem_lmp_to_send
+	rtn blank
+/* lmp message to be processed. this will either be because host??? */
+/* wants to send a lmp message or because one resulted from the LMP */
+/* processing section */
+/********* outgoing lmp lookup table *************/
+	bbit1 7,send_lmp_escape
+send_lmp0:
+	beq LMP_NAME_REQ,	 send_lmp_name_req
+	beq LMP_NAME_RES,	 send_lmp_name_res
+	beq LMP_ACCEPTED,	 send_lmp_accepted
+	beq LMP_NOT_ACCEPTED,	 send_lmp_not_accepted
+	beq LMP_FEATURES_REQ,	 send_lmp_features_req
+	beq LMP_FEATURES_RES,	 send_lmp_features_res
+	beq LMP_TIMING_ACCURACY_RES,	 send_lmp_timing_accuracy_res
+	beq LMP_VERSION_REQ,	 send_lmp_version_req
+	beq LMP_VERSION_RES,	 send_lmp_version_res
+	beq LMP_SETUP_COMPLETE,	 send_lmp_setup_complete
+	beq LMP_SUPERVISION_TIMEOUT,	 send_lmp_superto
+	beq LMP_HOST_CONNECTION_REQ,send_lmp_no_payload
+	beq LMP_IN_RAND,send_lmp_inrand
+	beq LMP_COMB_KEY,send_lmp_comb_key
+	beq LMP_AU_RAND,send_lmp_aurand
+	beq LMP_SRES,send_lmp_sres
+	beq LMP_ENCRYPTION_MODE_REQ,send_lmp_encryption_mode_req
+	beq LMP_ENCRYPTION_KEY_SIZE_REQ,send_lmp_encryption_key_size_req
+	beq LMP_START_ENCRYPTION_REQ,send_lmp_start_encryption
+	beq LMP_DETACH,send_lmp_detach
+	beq LMP_QUALITY_OF_SERVICE_REQ, send_lmp_quality_of_service_req
+	beq LMP_UNIT_KEY,send_lmp_unit_key
+	//Optional (O)
+	beq LMP_INCR_POWER_REQ,send_lmp_inc_power	
+	beq LMP_CLKOFFSET_RES, send_lmp_clkoffset_res	
+	beq LMP_MAX_POWER,send_lmp_nopayload_reply
+	beq LMP_MAX_SLOT, send_lmp_max_slot
+	beq LMP_MAX_SLOT_REQ, send_lmp_max_slot_req
+	beq LMP_MIN_POWER,send_lmp_nopayload_reply
+	beq LMP_SLOT_OFFSET, send_lmp_slot_offset
+	beq LMP_SWITCH_REQ, send_lmp_switch_req
+	beq LMP_SNIFF_REQ, send_lmp_sniff_req
+	beq LMP_STOP_ENCRYPTION_REQ, send_lmp_stop_encryption_req	
+	beq LMP_TIMING_ACCURACY_REQ, send_lmp_timing_accuracy_req
+	beq LMP_UNSNIFF_REQ, send_lmp_unsniff_req
+	beq LMP_ENCAPSULATED_HEADER,send_lmp_encapsulated_header
+	beq LMP_ENCAPSULATED_PAYLOAD,send_lmp_encapsulated_payload
+	beq LMP_SIMPLE_PAIRING_CONFIRM,send_lmp_simple_pairing_comfirm
+	beq LMP_SIMPLE_PAIRING_NUMBER,send_lmp_simple_pairing_number
+	beq LMP_DHKEY_CHECK,send_lmp_dhkey_check
+	beq LMP_AUTO_RATE,send_lmp_auto_rate
+	beq LMP_ENC_KEY_SIZE_MASK_RES,send_lmp_enc_key_size_mask_res
+	//master only must(M)
+	beq LMP_CLKOFFSET_REQ, send_lmp_clkoffset_req
+	beq LMP_QUALITY_OF_SERVICE, send_lmp_quality_of_service
+	beq LMP_TEST_ACTIVATE, send_lmp_test_activate
+	beq LMP_TEST_CONTROL, send_lmp_test_control
+send_lmp_error:
+	branch assert
+	rtn
+send_lmp_escape:
+	beq LMP_EXT_ACCEPTED,send_lmpext_accepted
+	beq LMP_EXT_FEATURES_REQ,send_lmpext_features_req
+	beq LMP_EXT_FEATURES_RES,send_lmpext_features_res
+	beq LMP_NOT_ACCEPTED_EXT,send_lmpext_not_accepted
+	beq LMP_PACKET_TYPE_TABLE_REQ,send_lmpext_packet_type_table_req
+	beq LMP_PAUSE_ENCRYPTION_REQ,send_lmpext_pause_encryption_req
+	beq LMP_IO_CAP_REQ,send_lmp_io_cap_req
+	beq LMP_IO_CAP_RES,send_lmpext_io_cap_res
+	beq LMP_SNIFF_SUBRATING_REQ,send_lmpext_sniff_subrating_req
+	beq LMP_SNIFF_SUBRATING_RES,send_lmpext_sniff_subrating_res
+	beq LMP_PING_RES,send_lmpext_ping_res
+	branch assert
+
+
+/******** LMP follow messages **********/
+/****** TID follow received packet  *******/
+
+send_lmp_accepted:
+	force 2,pdata
+	call msg_send_lmp
+	fetch 1,mem_lmi_opcode
+	istore 1,contw
+	call send_lmp_follow
+	bpatchx patch23_2,mem_patch23
+	fetch 1,mem_lmi_opcode
+	beq LMP_IN_RAND,send_lmp_accepted_inrand
+	beq LMP_ENCRYPTION_MODE_REQ,send_lmp_accepted_enc_mode
+	beq LMP_ENCRYPTION_KEY_SIZE_REQ,send_lmp_accepted_enc_key
+	beq LMP_SNIFF_REQ,send_lmp_accept_sniff_req
+	beq LMP_HOST_CONNECTION_REQ,send_lmp_accepted_connection
+	beq LMP_DHKEY_CHECK,send_lmp_accept_dhkey_check
+	beq LMP_START_ENCRYPTION_REQ,send_create_conn_start_l2cap_timer_sm  
+	rtn	
+		
+send_create_conn_start_l2cap_timer_sm:
+	fetch 1,mem_conn_sm
+	rtn blank
+	jam CONN_SM_WAIT_DONE,mem_conn_sm
+	setarg TIMER_ENPT_WAITE
+	arg enpt_delay_timer,queue
+	branch timer_init
+	
+send_lmp_accept_sniff_req:
+	branch sniff_init
+send_lmp_not_accepted:
+	force 3,pdata
+	call msg_send_lmp
+	fetch 1,mem_lmi_opcode
+	beq LMP_AU_RAND,send_not_accept_aurand
+	istore 1,contw
+	fetch 1,mem_lmo_reason
+	istore 1,contw
+	branch send_lmp_follow
+
+send_not_accept_aurand:
+	istore 1,contw
+	fetch 1,mem_lmo_reason
+	istore 1,contw
+	arg mem_sres_tid,temp
+	branch special_tid_store
+
+send_lmpext_accepted:	
+	force 4,queue
+	call send_lmpext
+	setarg LMP_ESCAPE
+	istore 1,contw
+	fetch 1,mem_lmi_opcode
+	set0 7,pdata
+	istore 1,contw
+	fetch 1,mem_lmi_opcode
+	branch send_lmp_follow
+
+send_lmpext_not_accepted:
+	force 5,queue
+	call send_lmpext
+	setarg LMP_ESCAPE
+	istore 1,contw
+	fetch 1,mem_lmi_opcode
+	set0 7,pdata
+	istore 1,contw
+	fetch 1,mem_lmo_reason
+	istore 1,contw
+	branch send_lmp_follow
+	
+
+send_lmp_accepted_inrand:
+	call clear_linkkey
+	call tid_check	
+	rtn true
+	branch lmp_generate_key
+
+send_lmp_accepted_enc_mode:
+	fetch 1,mem_op
+	bbit1 op_start_enc,send_lmp_accepted_enc_start
+	rtnbit0 op_stop_enc
+	jam LMP_STOP_ENCRYPTION_REQ,mem_lmo_opcode2
+	set0 op_stop_enc,pdata
+	call tid_reply
+	branch send_lmp_accepted_enc_exit
+send_lmp_accepted_enc_start:
+	jam LMP_ENCRYPTION_KEY_SIZE_REQ,mem_lmo_opcode2
+	set0 op_start_enc,pdata
+send_lmp_accepted_enc_exit:
+	store 1,mem_op
+	rtn
+
+send_lmp_accepted_enc_key:
+	call check_localsm
+	branch lmp_start_encryption,true
+	rtn
+
+send_lmp_accepted_connection:
+	jam LMP_PACKET_TYPE_TABLE_REQ,mem_lmo_opcode2
+	//jam LMP_SETUP_COMPLETE,mem_lmo_opcode2
+	fetch 1,mem_lmp_conn_state
+	set1 RECEIVED_CONN_REQ,pdata
+	store 1,mem_lmp_conn_state
+	jam BT_EVT_BB_CONNECTED,mem_fifo_temp
+	branch ui_ipc_send_event
+
+
+send_lmp_accept_dhkey_check:
+	rtn
+/******** LMP reply messages **********/
+/****** TID always set to remote  *******/
+
+
+send_lmpext_ping_res:
+	force 2,queue
+	call send_lmpext
+	branch send_lmp_reply	
+
+send_lmpext_features_res:
+	copy pdata,rega
+	call check_ssp_enable
+	fetch 1,mem_ext_features_page
+	beq 1,send_lmpext_features_res1
+	beq 2,send_lmpext_features_res2
+	rtn
+	
+send_lmpext_features_res1:	
+	copy rega,pdata
+	force 12,queue
+	call send_lmpext
+	setarg 0x01
+	istore 1,contw
+	fetch 2,mem_lmpext_ssp_enable
+	istore 9,contw
+	branch send_lmp_reply
+
+send_lmpext_features_res2:
+	copy rega,pdata
+	force 12,queue
+	call send_lmpext
+	setarg 0x02
+	istore 1,contw
+	setarg 0x010002
+	istore 9,contw
+	branch send_lmp_reply
+
+check_ssp_enable:
+	fetch 1,mem_ssp_enable 
+	branch ssp_disable, blank
+	call  ssp_enable
+	branch check_br_sc_enable
+
+ssp_disable:
+	fetch 1,mem_features+6
+	set0 param_featrue_ssp,pdata
+	store 1,mem_features+6
+	setarg 0x1
+	store 2,mem_lmpext_ssp_enable
+	branch sp_clear_flags
+	
+//default:featrue is enable,extfeature is disable
+ssp_enable:
+	bpatchx patch23_3,mem_patch23
+	fetch 1,mem_features+6
+	set1 param_featrue_ssp,pdata
+	store 1,mem_features+6
+	setarg param_lmpext_ssp_enable
+	store 2,mem_lmpext_ssp_enable
+	rtn
+	
+check_br_sc_enable:
+	fetch 1,mem_secure_connections_enable
+	bbit1  SECURE_CONNECTIONS_BR_BIT,br_sc_enable
+	rtn
+	
+br_sc_enable:
+	setarg 0x0902 //0x0902
+	store 2,mem_lmpext_ssp_enable
+	rtn
+
+send_lmpext_io_cap_res:     
+	force 5,queue
+         call send_lmpext
+       	fetch 3,mem_lmp_io_cap_payload_iocap
+         istore 3,contw
+	call send_lmp_reply
+	jam FLAG_PAIRING_STATE_PAIRING,mem_flag_pairing_state
+	fetch 1,mem_lmp_io_cap_payload_iocap
+	beq IO_CAPABILITY_DISPLAY_YESNO,responder_iocap_display_yesno
+	beq IO_CAPABILITY_KEYBOARD_ONLY,responder_iocap_keyboard_only
+	beq IO_CAPABILITY_NO_INPUT_NO_OUTPUT,responder_iocap_no_input_no_output
+	rtn
+
+responder_iocap_keyboard_only:
+	fetch 1,mem_sp_iocap_remote
+	beq IO_CAPABILITY_DISPLAY_ONLY,responder_iocap_keyboard_only_initiator_iocap_display_only
+	beq IO_CAPABILITY_DISPLAY_YESNO,responder_iocap_keyboard_only_initiator_iocap_display_yesno
+	beq IO_CAPABILITY_KEYBOARD_ONLY,responder_iocap_keyboard_only_initiator_iocap_keyboard_only
+	beq IO_CAPABILITY_NO_INPUT_NO_OUTPUT,responder_iocap_keyboard_only_initiator_iocap_no_input_no_output
+	rtn
+
+
+responder_iocap_display_yesno:
+	fetch 1,mem_sp_iocap_remote
+	beq IO_CAPABILITY_DISPLAY_ONLY,responder_iocap_display_yesno_initiator_iocap_display_only
+	beq IO_CAPABILITY_DISPLAY_YESNO,responder_iocap_display_yesno_initiator_iocap_display_yesno
+	beq IO_CAPABILITY_KEYBOARD_ONLY,responder_iocap_display_yesno_initiator_iocap_keyboard_only
+	beq IO_CAPABILITY_NO_INPUT_NO_OUTPUT,responder_iocap_display_yesno_initiator_iocap_no_input_no_output
+	rtn
+
+	
+responder_iocap_no_input_no_output:
+	fetch 1,mem_sp_iocap_remote
+	beq IO_CAPABILITY_DISPLAY_ONLY,responder_iocap_no_input_no_output_initiator_iocap_display_only
+	beq IO_CAPABILITY_DISPLAY_YESNO,responder_iocap_no_input_no_output_initiator_iocap_display_yesno
+	beq IO_CAPABILITY_KEYBOARD_ONLY,responder_iocap_no_input_no_output_initiator_iocap_keyboard_only
+	beq IO_CAPABILITY_NO_INPUT_NO_OUTPUT,responder_iocap_no_input_no_output_initiator_iocap_no_input_no_output
+	rtn
+
+responder_iocap_keyboard_only_initiator_iocap_no_input_no_output:
+responder_iocap_display_yesno_initiator_iocap_no_input_no_output:
+responder_iocap_display_yesno_initiator_iocap_display_only:
+responder_iocap_no_input_no_output_initiator_iocap_display_only:
+responder_iocap_no_input_no_output_initiator_iocap_display_yesno:
+responder_iocap_no_input_no_output_initiator_iocap_keyboard_only:
+responder_iocap_no_input_no_output_initiator_iocap_no_input_no_output:
+set_ssp_mode_justwork: 
+	jam SSP_MODE_JUST_WORK_FLAG,mem_ssp_mode_flag
+	fetch 1,mem_classic_bt_flag
+	bbit1 FLAG_SSP_REJECT_JUSTWORK,app_bt_disconnect
+	rtn
+
+responder_iocap_display_yesno_initiator_iocap_display_yesno:
+set_ssp_mode_numeric_comparison: 
+	jam SSP_MODE_SSP_PIN_FLAG,mem_ssp_mode_flag
+	rtn
+
+responder_iocap_keyboard_only_initiator_iocap_display_yesno:
+responder_iocap_keyboard_only_initiator_iocap_keyboard_only:	
+responder_iocap_keyboard_only_initiator_iocap_display_only:	
+responder_iocap_display_yesno_initiator_iocap_keyboard_only:
+set_ssp_mode_passkey: 
+	jam SSP_MODE_PASSKEY_ENTRY_FLAG,mem_ssp_mode_flag
+	rtn
+
+
+classic_bt_set_reject_justwork_flag:
+	arg FLAG_SSP_REJECT_JUSTWORK,queue
+	branch classic_bluetooth_set_flag
+
+classic_bt_clr_reject_justwork_flag:
+	arg FLAG_SSP_REJECT_JUSTWORK,queue
+	branch classic_bluetooth_clr_flag
+
+classic_bluetooth_set_flag:
+	fetch 1,mem_classic_bt_flag
+	qset1 pdata
+	store 1,mem_classic_bt_flag
+	rtn
+
+classic_bluetooth_clr_flag:
+	fetch 1,mem_classic_bt_flag
+	qset0 pdata
+	store 1,mem_classic_bt_flag
+	rtn
+
+         
+send_lmp_io_cap_req:
+	force 5,queue
+	call send_lmpext
+	fetch 3,mem_lmp_io_cap_payload_iocap
+	istore 3,contw
+	branch send_lmp_request
+	
+
+send_lmpext_sniff_subrating_req: 
+
+	rtn
+send_lmpext_sniff_subrating_res: 
+         force 9,queue
+         call send_lmpext
+         fetch 1,mem_subsniff_rate
+         istore 1,contw
+         fetch 2,mem_subsniff_tcmax
+         istore 2,contw
+         fetch 4,mem_subsniff_instant
+         istore 4,contw
+	branch send_lmp_reply
+
+send_lmp_name_res:
+	force 17,pdata
+	call msg_send_lmp
+	fetch 1,mem_lmi_opcode  /* loading name offset */
+	copy pdata,temp
+	beq 0x00,send_lmp_name_res_offset_ok
+	beq 0x0e,send_lmp_name_res_offset_ok
+	beq 0x1c,send_lmp_name_res_offset_ok
+	rtn
+send_lmp_name_res_offset_ok:
+	istore 1,contw	/* writing name offset */
+	fetch 1,mem_local_name_length
+	istore 1,contw	/* writing name length */
+	arg 14,loopcnt
+	setarg mem_local_name
+	iadd temp,contr	/* setting read location */
+	call memcpy
+	branch send_lmp_reply
+
+
+send_lmp_timing_accuracy_res:
+	force 3,pdata
+	call msg_send_lmp
+	setarg 0x0114
+	istore 2,contw
+	branch send_lmp_reply
+
+send_lmp_clkoffset_res:
+	// dopod s505 must wait for this res
+	force 3,pdata
+	call msg_send_lmp
+	fetch 4,mem_clke_bt
+	isub clkn_bt,pdata
+	branch send_lmp_clkoffset_res_master,master
+	sub pdata,0,pdata		/* our role is slave */
+send_lmp_clkoffset_res_master:	
+	// bit 16-2 of clkslave-clkmaster
+	rshift2 pdata,pdata
+	set0 15,pdata
+	istore 2,contw
+	branch send_lmp_reply
+
+send_lmp_version_res:
+	force 6,pdata
+	call msg_send_lmp
+	fetch 5,mem_lmp_version
+	istore 5,contw
+	branch send_lmp_reply
+
+send_lmp_features_res:
+	force 9,pdata
+	call msg_send_lmp
+	fetch 8,mem_features
+	istore 8,contw
+	branch send_lmp_reply  
+
+
+/******** LMP request messages **********/
+/****** TID always set to local initiated *******/
+	
+
+send_lmpext_features_req:
+	call check_ssp_enable
+	fetch 1,mem_lmp_to_send
+	force 12,queue
+	call send_lmpext
+	setarg 0x01
+	istore 1,contw
+	fetch 2,mem_lmpext_ssp_enable
+	istore 2,contw
+	setarg 0
+	istore 3,contw
+	setarg 0x00
+	istore 4,contw
+	branch send_lmp_request
+
+send_lmpext_packet_type_table_req:
+	force 3,queue
+	call send_lmpext
+	fetch 1,mem_ptt
+	istore 1,contw
+	disable user
+	call send_lmp_request
+	nrtn user
+	nrtn master
+	fetch 1,mem_afh_cfg
+	rtnbit0 AFH_CFG_ON
+	call afh_init
+	branch afh_open_all_channels
+	
+
+afh_init:
+	jam 0x3,mem_afh_cfg
+	setarg 0
+	store 4,mem_afh_timer
+	arg mem_afh_map_lo,contw
+	call afh_reset_map
+	arg mem_afh_map_new,contw
+	call afh_reset_map
+	arg mem_afh_classify_channel_map,contw
+	call afh_reset_map
+	branch afh_clear_error_counter
+afh_open_all_channels:
+	arg mem_afh_map_new,contw
+	call afh_reset_map
+	call afh_clear_error_counter
+	branch afh_set_send_flag
+
+
+afh_reset_map:
+	setarg 0xffffff
+	istore 3,contw
+	istore 3,contw
+	istore 3,contw
+	setarg 0x7f
+	istore 1,contw
+	rtn
+afh_clear_error_counter:
+	setarg 0
+	store 2,mem_afh_error_total
+	rtn
+afh_set_send_flag:
+	fetch 1,mem_afh_cfg
+	set1 send_lmp_set_afh,pdata
+	store 1,mem_afh_cfg
+	rtn
+
+
+send_lmpext_pause_encryption_req:
+	force 2,queue
+	call send_lmpext
+	nbranch send_lmp_reply,master
+	// assume slave will not send pause req firstly???
+	branch send_lmp_request
+
+
+	
+send_lmp_detach:
+	force 2,pdata
+	call msg_send_lmp
+	fetch 1,mem_disconn_reason_send
+	istore 1,contw
+	call send_lmp_request
+prepare_disconnect:
+	fetch 1,mem_op
+	set1 op_disconn,pdata
+	store 1,mem_op
+	jam 50,mem_conn_timer
+	rtn
+	
+
+send_lmp_no_payload:
+	force 1,pdata
+	call msg_send_lmp
+	branch send_lmp_request
+send_lmp_nopayload_reply:
+	force 1,pdata
+	call msg_send_lmp
+	branch send_lmp_reply
+	
+	
+send_lmp_encryption_mode_req:
+	force 2,pdata
+	call msg_send_lmp
+	fetch 1,mem_state_map
+	isolate0 smap_encryption,pdata
+	setflag true,0,pdata
+	and_into 1,pdata
+	istore 1,contw
+	branch send_lmp_request
+
+
+send_lmp_superto:
+	force 3,pdata
+	call msg_send_lmp
+	fetch 2,mem_supervision_to
+	istore 2,contw
+	branch send_lmp_request
+
+send_lmp_name_req:
+	jam 250,mem_conn_timer
+	force 2,pdata
+	call msg_send_lmp
+	fetch 1,mem_name_offset
+	istore 1,contw
+	branch send_lmp_request
+
+send_lmp_test_control:
+	force 10,pdata
+	call msg_send_lmp
+	arg mem_temp_payload,contr
+	force 9,loopcnt
+send_lmp_test_control_loop:	
+	ifetch 1,contr
+	xor_into 0x55,pdata
+	istore 1,contw
+	loop send_lmp_test_control_loop
+	branch send_lmp_request  
+
+send_lmp_quality_of_service_req:
+	branch send_lmp_request
+send_lmp_unit_key:
+	branch send_lmp_request
+
+send_lmp_slot_offset:
+	rtn master
+	call calc_slot_offset
+	force 9,pdata
+	call msg_send_lmp
+	fetch 2,mem_slot_offset
+	istore 2,contw
+	fetch 3,mem_lap
+	istore 3,contw
+	fetch 1,mem_uap
+	istore 1,contw
+	fetch 2,mem_nap
+	istore 2,contw
+	bmark0 mark_switch_initiated,send_lmp_slot_offset_reply
+	set0 mark_switch_initiated,mark
+	call send_lmp_request
+	jam LMP_SWITCH_REQ,mem_lmo_opcode2
+	rtn
+send_lmp_slot_offset_reply:
+	call send_lmp_reply
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam LMP_SWITCH_REQ,mem_lmi_opcode2
+	rtn
+	
+send_lmp_switch_req:
+	arg 0x200,temp
+	branch switch_on_native,master
+	deposit clke_bt
+	branch switch_slack
+switch_on_native:
+	deposit clkn_bt
+switch_slack:
+	deposit bt_clk
+	iadd temp,pdata
+	and_into 0x1fc,pdata
+	store 4,mem_sniff_anchor
+	force 5,pdata
+	call msg_send_lmp
+	fetch 4,mem_sniff_anchor		/* reused as switch instant */
+	rshift pdata,pdata
+	istore 4,contw
+	branch send_lmp_request
+
+send_lmp_sniff_req:
+	force 10,pdata
+	call msg_send_lmp
+	arg mem_sniff_payload,contr
+	ifetch 9,contr
+	istore 9,contw
+	branch send_lmp_request
+
+	
+send_lmp_timing_accuracy_req:
+/* default to TID_NORM_SEND */
+	force 3,pdata
+	call msg_send_lmp
+	setarg 0x0114
+	istore 2,contw
+	branch send_lmp_request
+	
+send_lmp_unsniff_req:
+//--------------------need to completa
+	force 1,pdata
+	call msg_send_lmp
+	//fetch 1,mem_unsniff_pending
+	//nbranch send_msg_done,blank
+	//jam 1,mem_unsniff_pending
+	//fetch 2,mem_sniff_attempt
+	//fetch 2,mem_nsniff_attempt
+	//lshift3 pdata,pdata
+	//lshift pdata,pdata
+	//store 1,mem_unsniff_cnt
+	branch send_lmp_request
+
+	
+send_lmp_max_slot:
+	force 2,pdata
+	call msg_send_lmp
+	fetch 1,mem_max_slot
+	istore 1,contw
+	branch send_lmp_request
+	
+	
+send_lmp_max_slot_req:
+	force 2,pdata
+	call msg_send_lmp
+	setarg 0x05		/*5 slot*/
+	istore 1,contw
+	branch send_lmp_request
+
+
+send_lmp_inc_power:
+	force 2,pdata
+	call msg_send_lmp
+	setarg 0x00		/*5 slot*/
+	istore 1,contw
+	branch send_lmp_request
+
+
+send_lmp_setup_complete_by_module:
+	jam LMP_MAX_SLOT_REQ,mem_lmo_opcode2
+	rtn
+send_lmp_setup_complete:
+	fetch 1,mem_device_option
+	sub pdata,dvc_op_module,null
+	call send_lmp_setup_complete_by_module,zero
+	fetch 1,mem_state
+	set1 state_conn_comp,pdata
+	store 1,mem_state
+	copy clkn_bt,pdata
+	store 4,mem_aurand_send_delay_time
+	fetch 1,mem_lmp_conn_state
+	bbit1 SENT_SETUP_COMPLETE,send_lmp_setup_complete_has_sent
+	set1 SENT_SETUP_COMPLETE,pdata
+	store 1,mem_lmp_conn_state
+	jam BT_EVT_SETUP_COMPLETE,mem_fifo_temp
+	call ui_ipc_send_event
+	force 1,pdata
+	call msg_send_lmp
+	branch send_lmp_request
+send_lmp_setup_complete_has_sent:
+	jam 0,mem_lmp_to_send
+	rtn
+	
+send_lmp_version_req:
+	force 6,pdata
+	call msg_send_lmp
+	fetch 5,mem_lmp_version
+	istore 5,contw
+	branch send_lmp_request
+
+send_lmp_features_req:
+	force 9,pdata
+	call msg_send_lmp
+	fetch 8,mem_features
+	istore 8,contw
+	branch send_lmp_request  
+
+sp_master_send_io_cap_get:
+	jam SP_FLAG_COMMIT,mem_master_sp_flag
+	fetch 1,mem_sp_local_key_invalid
+	rtnne SP_KEY_VALID
+	jam SP_MASTER_STAT_START_DONE,mem_master_sp_state
+	rtn
+
+sp_master_send_io_cap_send:
+	call tid_initiate
+	jam LMP_IO_CAP_REQ,mem_lmo_opcode2
+	jam SP_STAT_KEY_SEND,mem_master_sp_state
+	rtn
+	
+	
+sp_master_send_LMP_ENCAPSULATED_HEADER:
+	call tid_initiate
+	jam      LMP_ENCAPSULATED_HEADER,mem_lmo_opcode2
+	jam SP_STAT_RANDOM_SEND,mem_master_sp_state
+	rtn
+	
+sp_master_commitment_compare:
+	arg mem_sp_calc_result_high,rega
+	arg mem_sp_confirm_remote,regb
+	arg 16,loopcnt
+	call string_compare
+	branch sp_master_commitment_compare_success,zero
+	jam SP_STAT_NULL,mem_master_sp_state
+ifdef SIMPLE_PAIRING
+	call master_clear_mem_master_sp_flag
+endif
+	jam LMP_SIMPLE_PAIRING_NUMBER,mem_lmi_opcode2 
+	branch lmp_reject_pdu_not_allowed
+	
+sp_master_commitment_compare_success:
+	jam SP_STAT_CONFIRM_CALC,mem_master_sp_state
+ifdef SIMPLE_PAIRING
+	call master_set_mem_master_sp_flag
+endif
+	jam LMP_SIMPLE_PAIRING_NUMBER,mem_lmi_opcode2
+	branch accept_lmp_msg  
+	
+
+	
+sp_master_send_lmp_simple_pairing_number:
+	jam LMP_SIMPLE_PAIRING_NUMBER,mem_lmo_opcode2
+	rtn
+	
+
+
+sp_send_lmp_encapsulated_header:
+	// calculate the private & public key here
+	//jam      LMP_ENCAPSULATED_HEADER,mem_lmp_to_send
+	jam      LMP_ENCAPSULATED_HEADER,mem_lmo_opcode2
+	//jam      TID_PAIRING,mem_lmp_tid
+	rtn
+	//fetch 1,mem_tid_table
+	//set1 TID_PAIRING,pdata
+	//store 1,mem_tid_table
+     
+    
+send_lmp_encapsulated_header: 
+	jam 0,mem_sp_local_key_send_count
+	force 4,pdata
+	call msg_send_lmp
+	fetch 3,mem_encapsulated_major_type
+	istore 3,contw 
+	call check_localsm
+	branch send_lmp_request,true
+	branch send_lmp_reply
+
+
+send_lmp_encapsulated_payload:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,send_lmp_encapsulated_payload_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,send_lmp_encapsulated_payload_192
+	rtn
+	
+send_lmp_encapsulated_payload_256:
+	 force 17,pdata
+	call msg_send_lmp
+	fetch 1,mem_sp_local_key_send_count
+	arg mem_sc_pubkey_local_x_256,contr
+	branch send_lmp_encapsulated_payload_common
+
+send_lmp_encapsulated_payload_192:
+	 force 17,pdata
+	call msg_send_lmp
+	fetch 1,mem_sp_local_key_send_count
+	arg mem_sp_pubkey_local,contr
+send_lmp_encapsulated_payload_common:
+	iadd contr,contr    
+	ifetch   8,contr
+	istore   8,contw
+	ifetch   8,contr
+	istore   8,contw
+	fetch    1,mem_sp_local_key_send_count
+	increase 16,pdata
+	store    1,mem_sp_local_key_send_count
+	call check_localsm
+	branch send_lmp_request,true
+	branch send_lmp_reply
+	//branch send_lmp_request
+	
+sp_send_lmp_simple_pairing_comfirm:
+        jam      SP_STAT_RANDOM_RECV,mem_sp_state
+        jam      LMP_SIMPLE_PAIRING_CONFIRM,mem_lmo_opcode2
+        rtn
+send_lmp_simple_pairing_comfirm:
+        //jam      SP_STAT_RANDOM_RECV,mem_sp_state
+        //jam      TID_PAIRING,mem_lmp_tid
+        force    17,pdata
+        call msg_send_lmp   
+        arg      mem_sp_calc_result_high,contr
+        ifetch   8,contr
+        istore   8,contw
+        ifetch   8,contr
+        istore   8,contw 
+        branch send_lmp_reply
+
+sp_send_lmp_simple_pairing_number:
+	jam      LMP_SIMPLE_PAIRING_NUMBER,mem_lmo_opcode2
+	rtn
+
+send_lmp_simple_pairing_number:
+	//jam      TID_PAIRING,mem_lmp_tid
+	call check_localsm
+ifdef SIMPLE_PAIRING
+	call sp_local_random_key_generator,true
+endif
+	force    17,pdata
+	call msg_send_lmp
+	arg      mem_sp_random_local,contr
+	ifetch   8,contr
+	istore   8,contw
+	ifetch   8,contr
+	istore   8,contw
+	call check_localsm
+	nbranch send_lmp_reply,true
+	branch send_lmp_request,true
+
+master_sp_sm_end:
+	//jam DEFAULT_STATEMACHINE,mem_sp_localsm
+	jam SP_STAT_DONE,mem_master_sp_state
+sp_aurand_send:
+	call tid_initiate
+	jam LMP_AU_RAND,mem_lmo_opcode2
+	call check_localsm_master
+ifdef SIMPLE_PAIRING
+	branch sp_master_key_prarm_push,true
+	branch sp_link_key_prarm_push
+endif
+master_sp_send_lmp_dhkey_check:
+	call tid_reply
+sp_send_lmp_dhkey_check: 
+	jam      LMP_DHKEY_CHECK,mem_lmo_opcode2
+	rtn
+send_lmp_dhkey_check: 
+	//jam      TID_PAIRING,mem_lmp_tid
+	force    17,pdata
+	call     msg_send_lmp
+	arg      mem_sp_calc_result_high,contr
+	ifetch   8,contr
+	istore   8,contw
+	ifetch   8,contr
+	istore   8,contw 
+	call check_localsm
+	nbranch send_lmp_reply,true
+	branch send_lmp_request,true
+
+send_lmp_enc_key_size_mask_res:
+	force 3,pdata
+	call msg_send_lmp   
+	setarg 0xfffe //enc key size mask
+	istore 2,contw
+	branch send_lmp_reply
+
+send_lmp_auto_rate:
+	branch send_lmp_request
+send_lmp_clkoffset_req:
+	branch send_lmp_request
+send_lmp_quality_of_service:
+	branch send_lmp_request
+send_lmp_test_activate:
+	branch send_lmp_request
+
+/******** LMP request/reply messages **********/
+/****** TID transaction specific *******/
+
+send_lmp_comb_key:
+	call generate_random_number
+	arg mem_lap,rega
+	call generate_linkkey
+	force 17,pdata
+	call msg_send_lmp
+	arg mem_kinit,rega
+	arg mem_random_number,regb
+	call xor16
+	nbranch send_lmp_follow,master
+	branch send_lmp_tid
+
+send_lmp_inrand:
+	call generate_random_number
+	arg mem_plap,rega
+	call generate_kinit
+send_lmp_rand:	/* used by in_rand,au_rand,start_encrypt */
+	force 17,pdata
+	call msg_send_lmp
+	arg mem_random_number,contr
+	call memcpy16
+	fetch 1,mem_conn_sm 
+	beq CONN_SM_AUTH_WAIT,send_lmp_request
+	beq CONN_SM_PAIRING_WAIT,send_lmp_request
+	branch send_lmp_tid
+
+send_lmp_aurand:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,send_lmp_aurand_256
+
+	fetch 1,mem_pairing_auth
+	branch send_lmp_aurand_notpairing,blank
+send_lmp_aurand2:
+	call check_localsm
+	call tid_initiate,true
+	ncall tid_reply,true
+	branch send_lmp_aurand_common
+send_lmp_aurand_notpairing:
+	call tid_initiate
+send_lmp_aurand_common:
+	call generate_random_number
+	branch send_lmp_rand
+
+send_lmp_aurand_256:
+	jam LMP_SRES,mem_lmo_opcode2
+	branch send_lmp_aurand2
+
+send_lmp_sres:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,send_lmp_sres_256
+
+	arg mem_lap,rega
+	call function_e1
+	force 5,pdata
+	call msg_send_lmp
+	fetch 4,mem_input_store
+	istore 4,contw
+	arg mem_sres_tid,temp
+	call special_tid_store
+	call copy_aco
+	call check_localsm
+	branch send_lmp_sres_master,true
+	jam DONE_ENCRYP,mem_wait_encryption
+	fetch 1,mem_pairing_auth
+	rtn blank
+	jam LMP_AU_RAND,mem_lmo_opcode2
+send_lmp_sres_master:
+	fetch 1,mem_link_key_exists
+	rtn blank
+send_lmp_sres_startenc:
+	call check_localsm
+	nbranch send_lmp_sres_startenc_slave,true
+	rtn
+	
+send_lmp_sres_startenc_slave:
+	rtnmark0 mark_slave_in_rand_accepted
+	set0 mark_slave_in_rand_accepted,mark
+	jam LMP_ENCRYPTION_MODE_REQ, mem_lmo_opcode2
+	rtn
+	
+send_lmp_sres_256:
+	call function_h4
+	call function_h5
+	force 5,pdata
+	call msg_send_lmp
+	fetch 4,memb
+	istore 4,contw
+	arg mem_sres_tid,temp
+	call special_tid_store
+	call copy_aco_256
+	call check_localsm
+	branch send_lmp_sres_master,true
+	jam DONE_ENCRYP,mem_wait_encryption
+	fetch 1,mem_pairing_auth
+	rtn blank
+	branch send_lmp_sres_master
+	
+copy_aco_256:
+	fetch 8,mem_sp_calc_result_high
+	store 8,mem_ccm_iv
+	rtn
+	
+send_lmp_start_encryption:
+	call generate_random_number
+	call function_e3
+	force 17,pdata
+	call msg_send_lmp
+	arg mem_random_number,contr
+	call memcpy16
+	branch send_lmp_tid
+
+send_lmp_stop_encryption_req:
+	force 1,pdata
+	call msg_send_lmp
+	branch send_lmp_tid
+
+send_lmp_encryption_key_size_req:
+	force 2,pdata
+	call msg_send_lmp
+	force 16,pdata
+	istore 1,contw
+	store 1,mem_key_size
+	branch send_lmp_tid
+
+msg_send_lmp:
+/* FLOW is set high and LMP is indicated */
+	lshift3 pdata,pdata
+	or_into 0x07,pdata
+	store 1,mem_lmo_header_length
+	arg 17,loopcnt
+	arg mem_lmo_payload,contw
+	call clear_mem
+	arg mem_lmo_payload,contw
+	rtn
+
+send_lmpext:
+	and pdata,0x7f,rega
+	jam LMP_ESCAPE,mem_lmp_to_send
+	deposit queue
+	call msg_send_lmp
+	deposit rega
+	istore 1,contw
+	rtn
+
+send_lmp_follow:
+	fetch 1,mem_lmp_to_send
+	lshift pdata,pdata
+	fetcht 1,mem_state_map
+	isolate1 smap_lmptid,temp
+	setflag true,0,pdata
+	branch send_lmp_exit
+
+
+send_lmp_tid:
+	fetcht 1,mem_state_map
+	and_into 1,temp
+	branch send_lmp_end
+
+send_lmp_reply:
+	force 0,temp
+	branch send_lmp_end
+	
+send_lmp_request:
+	force 1,temp
+send_lmp_end:
+	fetch 1,mem_lmp_to_send
+	lshift pdata,pdata
+	setflag master,0,pdata
+	ixor temp,pdata
+send_lmp_exit:
+	store 1,mem_lmo_header_opcode
+	store 1,mem_lmo_header_opcode_x
+	jam 0,mem_lmp_to_send
+	call lmo_fifo_process_lmo0empty
+	enable user
+	rtn
+
+//blank : not full 
+lmo_fifo_check:
+	fetch 1,mem_lmo_opcode2
+	rtn blank
+	call lmo_fifo_process
+	fetch 1,mem_lmo_opcode2
+	rtn
+
+lmo_fifo_process:
+	bpatchx patch23_4,mem_patch23
+	fetch 1,mem_lmp_to_send
+	branch lmo_fifo_process_lmo0empty,blank
+	fetch 1,mem_lmo_opcode1
+	nrtn blank
+	branch lmo_fifo_process_lmo2to1
+lmo_fifo_process_lmo0empty:
+	fetch 1,mem_lmo_opcode1
+	branch lmo_fifo_process_lmo1_empty,blank
+	fetch 3,mem_lmo_opcode1
+	store 3,mem_lmp_to_send//1=>0
+	fetcht 1,mem_lmo_tid1
+	fetch 1,mem_state_map
+	set0 smap_lmptid,pdata
+	ior temp,pdata
+	store 1,mem_state_map
+	jam 0,mem_lmo_opcode1
+lmo_fifo_process_lmo2to1:
+	fetch 1,mem_lmo_opcode2
+	rtn blank
+	fetch 4,mem_lmo_opcode2
+	store 4,mem_lmo_opcode1//2=>1
+	jam 0,mem_lmo_opcode2
+	rtn
+lmo_fifo_process_lmo1_empty:
+	fetch 1,mem_lmo_opcode2
+	rtn blank
+	fetch 3,mem_lmo_opcode2
+	store 3,mem_lmp_to_send//2=>0	
+	fetcht 1,mem_lmo_tid2
+	fetch 1,mem_state_map
+	set0 smap_lmptid,pdata
+	ior temp,pdata
+	store 1,mem_state_map
+	jam 0,mem_lmo_opcode2
+	rtn
+	
+//input:temp
+special_tid_store:
+	bpatchx patch23_5,mem_patch23
+	fetch 1,mem_state_map
+	copy pdata,regc
+	ifetch 1,temp
+	call pop_tid_follow
+	call send_lmp_follow
+	copy regc,pdata
+	store 1,mem_state_map
+	rtn
+	
+tid_reply:
+	fetcht 1,mem_state_map
+	set0 smap_lmptidinit,temp
+	storet 1,mem_state_map
+	rtn
+	
+tid_initiate:
+	fetcht 1,mem_state_map
+	set1 smap_lmptidinit,temp
+	storet 1,mem_state_map
+	rtn
+	
+	/* true if transaction from remote */
+tid_check:
+	nsetflag master,smap_lmptid,pdata //it is ok
+	fetcht 1,mem_state_map
+	ixor temp,pdata
+	isolate1 smap_lmptid,pdata
+	rtn	
+
+	/* set to remote */
+tid_set_reply:
+	fetch 1,mem_state_map
+	setflag master,smap_lmptid,pdata //it is ok
+	store 1,mem_state_map
+	rtn
+
+	/*rtn true when we lead lmp*/
+check_localsm:
+	fetch 1,mem_sp_localsm
+	compare 	LOCAL_STATEMACHINE,pdata,0x7f
+	rtn
+setlocalsm_master:
+	fetch 1,mem_sp_localsm
+	set1 7,pdata
+	store 1,mem_sp_localsm
+	rtn
+setlocalsm_slave:
+	fetch 1,mem_sp_localsm
+	set0 7,pdata
+	store 1,mem_sp_localsm
+	rtn
+check_localsm_master:
+	fetch 1,mem_sp_localsm
+	isolate1 7,pdata
+	store 1,mem_sp_localsm
+	rtn
+	
+generate_random_number:
+	/* generating a 16 byte random number,storing in ape_random_number */
+	arg mem_random_number,contw
+generate_random:
+	force 16,loopcnt
+generate_random_another:
+generate_random_loop:
+	random pdata
+	istore 1,contw
+	loop generate_random_another
+	rtn
+
+generate_linkkey:
+	call function_e21
+	arg mem_link_key,rega
+	arg mem_input_store,regb
+	ifetch 8,rega					/* check if already got comb key */
+	fetcht 1,mem_state
+	nsetflag blank,state_combkey,temp
+	storet 1,mem_state
+	copy rega,contw
+	call  xor16
+	branch generate_linkkey_continue
+
+/*********************************/
+/*********lmp send*************/
+/********************************/
+
+process_conn_sm:
+	//nrtn master
+	bpatchx patch23_6,mem_patch23
+
+	call lmo_fifo_check
+	nrtn blank
+process_conn_sm_continue:
+	fetch 1,mem_conn_sm
+	rtn blank
+	/* state machine begins in standby */
+	//beq CONN_SM_STANDBY, host_create_conn_begin
+	//beq CONN_SM_WAIT_PAGE, host_create_conn_wait_page
+	beq CONN_SM_SEND_CONN_REQ, host_create_conn_send_conn_req
+	beq CONN_SM_WAIT_CONN_ACCEPT, host_create_conn_wait_accept
+	beq CONN_SM_SEND_FEATURES, host_create_conn_send_features
+	beq CONN_SM_WAIT_FEATURES_RES, host_create_conn_waiting
+	beq CONN_SM_SEND_SWITCH,host_create_conn_send_switch
+	beq CONN_SM_AUTH_PAIR, host_create_conn_auth_pair
+	beq CONN_SM_AUTH_PAIR_WAIT, host_create_conn_auth_pair_wait
+	beq CONN_SM_ENCRYPT, host_create_conn_encrypt
+	beq CONN_SM_ENCRYPT_WAIT, host_create_conn_encrypt_wait
+	beq CONN_SM_ENCRYPT_WAIT_CLEAR, host_create_conn_encrypt_wait_clear
+	beq CONN_SM_SEND_SETUP_COMPLETE, host_create_conn_send_setup_complete
+	beq CONN_SM_WAIT_SETUP_COMPLETE, host_create_conn_wait_setup_complete
+	beq CONN_SM_DETACH_DELAY,host_create_conn_master_detach
+	beq CONN_SM_SEND_VERSION, host_create_conn_send_version
+	beq CONN_SM_WAIT_VERSION, host_create_conn_waiting
+	beq CONN_SM_WAIT_SWITCH_AFTER_HOST_CONNECTION, host_creat_conn_wait_switch
+	beq CONN_SM_SEND_FEATURES_EXT,host_creat_conn_send_feat_ext
+	beq CONN_SM_WAIT_FEATURES_EXT,host_create_conn_waiting
+	beq CONN_SM_PAIRING,host_create_conn_pairing
+	beq CONN_SM_PAIRING_WAIT,host_create_conn_pairing_wait
+	beq CONN_SM_AUTH,host_create_conn_auth
+	beq CONN_SM_AUTH_WAIT,host_create_conn_auth_wait
+	beq CONN_SM_DONE,host_create_conn_done
+	beq CONN_SM_WAIT_DONE,host_create_conn_done_wait
+	jam CONN_SM_STANDBY,mem_conn_sm
+	/* sending error message to host */
+	rtn
+host_create_conn_done:
+	fetch 1,mem_lmp_conn_state		
+	rtnbit0 RECEIVED_SETUP_COMPLETE
+	rtnbit0 SENT_SETUP_COMPLETE
+	jam CONN_SM_STANDBY,mem_conn_sm
+	call host_conn_judge_encrypt
+	branch scheduler_start_upper_sm
+	
+host_conn_judge_encrypt:
+	fetch 1,mem_connection_options
+	rtnbit0 CONNECTION_ENCRYPT
+	jam CONN_SM_ENCRYPT_WAIT,mem_conn_sm
+	rtn
+
+host_create_conn_done_wait:
+	arg enpt_delay_timer,queue
+	call timer_check
+	nrtn blank
+	jam CONN_SM_DONE,mem_conn_sm
+	rtn
+	
+host_create_conn_auth:
+	fetch 1,mem_connection_options
+	set0 CONNECTION_AUTH,pdata
+	store 1,mem_connection_options
+	jam CONN_SM_AUTH_WAIT,mem_conn_sm
+	jam LMP_AU_RAND,mem_lmo_opcode2
+	rtn 
+host_create_conn_auth_wait:
+	rtn
+host_create_conn_pairing:
+	fetch 1,mem_pincode_state
+	rtnne pincode_state_pincode_ready //wait for pincode
+	call host_auth
+	jam CONN_SM_PAIRING_WAIT,mem_conn_sm
+	rtn
+
+host_create_conn_pairing_wait:
+	rtn
+host_creat_conn_send_feat_ext:
+	jam CONN_SM_WAIT_FEATURES_EXT,mem_conn_sm
+	jam LMP_EXT_FEATURES_REQ,mem_lmo_opcode2
+	rtn
+host_create_conn_send_version:
+	jam CONN_SM_WAIT_VERSION,mem_conn_sm
+	jam LMP_VERSION_REQ,mem_lmo_opcode2
+	rtn 
+	
+host_creat_conn_wait_switch:
+	fetch 1,mem_switch_flag
+	rtneq SWITCH_FLAG_INIT
+	beq SWITCH_FLAG_ACCEPT,host_create_conn_switch_accept
+	arg switch_wait_timer,queue
+	call timer_check
+	nrtn blank
+	jam SWITCH_FLAG_INIT,mem_switch_flag
+	branch host_create_conn_switch
+host_create_conn_switch_accept:
+	rtn master
+	branch host_create_conn_auth_pair
+
+host_create_conn_send_features:
+	jam CONN_SM_WAIT_FEATURES_RES,mem_conn_sm
+	jam LMP_FEATURES_REQ,mem_lmo_opcode2
+	rtn 
+host_create_conn_send_switch:
+	jam LMP_SWITCH_REQ,mem_lmo_opcode2
+	set1 mark_switch_initiated,mark
+	jam CONN_SM_WAIT_CONN_ACCEPT,mem_conn_sm
+	setarg 0x1ff
+	store 2, mem_soft_timer
+	rtn
+
+host_create_conn_send_conn_req:
+	jam CONN_SM_WAIT_CONN_ACCEPT,mem_conn_sm
+	setarg 0xff
+	store 2,mem_soft_timer
+	set0 mark_reconn_recieve_switch,mark
+	jam LMP_HOST_CONNECTION_REQ,mem_lmo_opcode2
+	branch init_lmp_reinit
+host_create_conn_wait_accept:
+	rtnmark1 mark_reconn_recieve_switch
+	fetch 2,mem_soft_timer
+	increase -1,pdata
+	branch host_create_conn_resend,zero
+	store 2, mem_soft_timer
+	rtn
+host_create_conn_resend:
+	jam CONN_SM_SEND_SWITCH,mem_conn_sm
+	rtn
+host_create_conn_waiting:
+	/* we will exit waiting for connection request accepted, features res, or other commands to finish */
+	rtn 
+
+host_create_conn_switch:
+	fetch 1,mem_lmp_conn_state
+	rtnbit0 SENT_SETUP_COMPLETE
+	rtnbit0 RECEIVED_SETUP_COMPLETE
+	fetch 1,mem_connection_options
+	set0 CONNECTION_SWITCH,pdata
+	store 1,mem_connection_options
+	jam LMP_SWITCH_REQ,mem_lmo_opcode2
+	jam CONN_SM_WAIT_SWITCH_AFTER_HOST_CONNECTION,mem_conn_sm
+	rtn 
+
+host_create_conn_send_setup_complete:
+	jam CONN_SM_WAIT_SETUP_COMPLETE,mem_conn_sm	
+	jam LMP_SETUP_COMPLETE,mem_lmo_opcode2
+	rtn 
+
+host_create_conn_wait_setup_complete:
+	fetch 1,mem_lmp_conn_state
+	rtnbit0 RECEIVED_SETUP_COMPLETE
+	jam CONN_SM_STANDBY,mem_conn_sm	
+
+	rtn
+host_create_conn_wait_setup_complete_rtn:	
+	jam CONN_SM_AUTH_PAIR ,mem_conn_sm
+	rtn
+
+host_create_conn_master_detach:
+	fetch 2, mem_soft_timer
+	increase -1,pdata
+	branch host_create_conn_send_detach,blank//detach
+	store 2, mem_soft_timer
+	rtn 
+host_create_conn_send_detach:
+	jam LMP_DETACH,mem_lmo_opcode2
+	jam LOCAL_HOST,mem_disconn_reason_send
+	jam 0,mem_conn_sm
+	rtn
+host_create_conn_auth_pair:
+	/* checking whether or not to do m/s switch */
+	fetch 1,mem_connection_options
+	bbit1 CONNECTION_SWITCH,host_create_conn_switch
+	bbit1 CONNECTION_AUTH,host_create_conn_auth_pair_true
+host_create_conn_sm_done:
+	jam CONN_SM_DONE,mem_conn_sm
+	rtn
+host_create_conn_auth_pair_true:
+	fetch 1,mem_link_key_exists
+	branch host_create_conn_auth_pair_nokey,blank
+	fetch 1,mem_lmp_conn_state
+	rtnbit0 SENT_SETUP_COMPLETE
+	rtnbit0 RECEIVED_SETUP_COMPLETE
+	fetch 4,mem_aurand_send_delay_time
+	arg 100,temp
+	iadd temp,temp
+	copy clkn_bt,pdata
+	isub temp,null
+	nrtn positive
+	branch host_create_conn_auth
+
+host_create_conn_auth_pair_nokey:
+	jam CONN_SM_PAIRING,mem_conn_sm
+	jam 4,mem_pin_length
+	setarg 0x3030
+	store 2,mem_pin
+	istore 2,contw
+	jam pincode_state_pincode_ready,mem_pincode_state
+	branch host_create_conn_pairing
+
+host_create_conn_auth_pair_wait:
+	rtn
+host_create_conn_encrypt:
+	fetch 1,mem_connection_options
+	bbit1 CONNECTION_ENCRYPT,host_create_conn_encrypt_start
+	jam CONN_SM_DONE,mem_conn_sm
+	rtn 
+
+host_create_conn_encrypt_start:
+	fetch 1,mem_connection_options
+	set0 CONNECTION_ENCRYPT,pdata
+	store 1,mem_connection_options
+	jam LMP_ENCRYPTION_MODE_REQ,mem_lmo_opcode2  
+	rtn
+
+host_create_conn_encrypt_wait:
+	fetch 1, mem_wait_encryption
+	rtn blank
+	jam CONN_SM_STANDBY,mem_conn_sm
+	branch host_create_conn_encrypt_start 
+
+host_create_conn_encrypt_wait_clear:
+	jam CONN_SM_SEND_SETUP_COMPLETE,mem_conn_sm
+	rtn 
+
+host_auth:
+	fetch 1,mem_op
+	bbit1 op_inrand_req,remote_auth
+	call tid_initiate
+	jam LMP_IN_RAND,mem_lmo_opcode2
+	branch cmd_exit
+remote_auth:
+	fetch 1,mem_op
+	set0 op_inrand_req,pdata
+	store 1,mem_op
+	call lmp_accept_inrand
+	call tid_set_reply
+	branch cmd_exit
+
+pincode_reinit:
+	setarg 4
+	store 1,mem_pin_length
+	setarg 0x3030
+	istore 2,contw
+	istore 2,contw
+	rtn
+	
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_access_layer.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_access_layer.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_access_layer.prog	(working copy)
@@ -0,0 +1,143 @@
+
+/*
+	mesh协议中access layer
+	主要是负责mesh中access layer数据的解析
+*/
+
+/*
+	access layer解析指令集
+*/
+//input:alarm is upper transport access ptr
+ali_mesh_access_layer_resolve_message:
+	fetch 1,mem_ccm_data_len
+	store 1,mem_mesh_receive_model_message_payload_len
+	copy alarm,contr
+	call memcpy24
+	call logging_tx_info_receive_access_message
+	fetch 2,mem_mesh_cb_receive_access_message
+	branch callback_func
+
+ali_mesh_access_layer_check_access_message_opcode:
+	fetch 1,mem_mesh_receive_model_message_payload_opcode
+	beq MESH_MESSAGE_OPCODE_CONFIG_APPKEY_ADD,ali_mesh_access_layer_message_opcode_config_AppKey_Add
+	beq MESH_CONFIGURATION_AND_HEALTH_MESSAGE_OPCODE_HEADER,ali_mesh_access_layer_config_or_health_message_opcode
+	beq MESH_MODULE_MESSAGE_OPCODE_HEADER,ali_mesh_model_layer_check_model_message_opcode
+	beq VENDOR_MESSAGE_ATTR_SET,ali_mesh_ali_vendor_message_attribute_set
+	beq VENDOR_MESSAGE_ATTR_GET,ali_mesh_ali_vendor_message_opcode_attr_get
+	beq VENDOR_MESSAGE_ATTR_CONFIRMATION,ali_mesh_ali_vendor_message_opcode_attr_confrimation
+	rtn
+
+
+/*
+	接收到config AppKey Add指令
+*/
+ali_mesh_access_layer_message_opcode_config_AppKey_Add:
+	arg mem_mesh_receive_application_key,contr
+	arg mem_mesh_application_key,contw
+	call memcpy16
+	jam PAIRED_STATUS,mem_mesh_provisioned_flag
+	call ali_mesh_encrypt_base_function_k3
+	call ali_mesh_encrypt_base_function_k4
+	call ali_mesh_access_layer_finish_pairing_init_subscription_list
+	call ali_mesh_accesss_layer_check_message_type
+	call ali_mesh_access_layer_send_config_AppKey_status
+	jam PAIRED_STATUS,mem_mesh_provisioned_flag
+	fetch 2,mem_mesh_cb_receive_config_appkey_add
+	branch callback_func
+
+ali_mesh_accesss_layer_check_message_type:
+	fetch 1,mem_mesh_network_packet_type
+	jam RECEIVED_CONFIG_APPKEY_ADD,mem_mesh_provisioned_flag		//中间状态 APP配网时，需要回复数量多
+	rtneq MESH_MESSAGE_APP
+	jam PAIRED_STATUS,mem_mesh_provisioned_flag					//tmall配网不需要重传多次
+	rtn
+
+ali_mesh_access_layer_send_config_AppKey_status:
+	setarg MESH_CONFIGURATION_AND_HEALTH_MESSAGE_OPCODE_HEADER
+	store 1,mem_mesh_access_layer_payload
+	setarg MESH_MESSAGE_OPCODE_CONFIG_CONFIG_MODEL_PUBLICATION_SET
+	istore 1,contw
+	setarg STATUS_CODE_SUCCESS
+	istore 1,contw
+	fetch 3,mem_mesh_NETKeyindex_and_APPKeyindex
+	istore 3,contw
+	jam 6,mem_mesh_access_layer_payload_len
+	branch ali_mesh_upper_transport_layer_send_access_message
+
+
+ali_mesh_access_layer_finish_pairing_init_subscription_list:
+	fetch 2,mem_mesh_core_feature
+	rtnbit1 MESH_FEATURE_DISABLE_SUBSCRIPTION
+	call mesh_get_element_info_config
+ali_mesh_access_layer_finish_pairing_init_subscription_list_loop:
+	add rega,ELEMENT_DEVICE_SUBSCRIPTION_LABEL,regc
+	setarg -1
+	istore SUBSCRIPTION_MAX_COUNT,regc
+	istore SUBSCRIPTION_MAX_COUNT,contw
+	ifetch 2,rega		//read group address
+	istore 2,regc
+	copy regb,pdata
+	iadd rega,rega
+	loop ali_mesh_access_layer_finish_pairing_init_subscription_list_loop
+	fetch 2,mem_mesh_cb_subscriptuion_list_changed
+	branch callback_func
+
+
+/*
+	generic onoff status
+*/
+ali_mesh_access_layer_send_generic_onoff_status:
+	setarg MESH_MODULE_MESSAGE_OPCODE_HEADER
+	store 1,mem_mesh_access_layer_payload
+	setarg MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONOFF_STATUS_NO_HEAD
+	istore 1,contw
+	fetch 1,mem_mesh_generic_onoff_set_payload_OnOff
+	istore 1,contw
+	jam 3,mem_mesh_access_layer_payload_len
+	branch ali_mesh_upper_transport_layer_send_access_message
+
+
+/*
+	light lightness status
+*/
+ali_mesh_access_layer_send_light_lightness_status:
+	setarg MESH_MODULE_MESSAGE_OPCODE_HEADER
+	store 1,mem_mesh_access_layer_payload
+	setarg MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_STATUS_NO_HEAD
+	istore 1,contw
+	fetch 2,mem_mesh_light_lightness_set_payload_lightness
+	istore 2,contw
+	jam 4,mem_mesh_access_layer_payload_len
+	branch ali_mesh_upper_transport_layer_send_access_message
+
+
+ali_mesh_access_layer_send_light_ctl_stauts:
+	setarg MESH_MODULE_MESSAGE_OPCODE_HEADER
+	store 1,mem_mesh_access_layer_payload
+	setarg MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_STATUS_NO_HEAD
+	istore 1,contw
+	fetch 4,mem_mesh_CTL_Lightness
+	istore 4,contw
+	jam 6,mem_mesh_access_layer_payload_len
+	branch ali_mesh_upper_transport_layer_send_access_message
+
+
+
+ali_mesh_access_layer_send_scene_status:
+	setarg MESH_MODULE_MESSAGE_OPCODE_SCENE_STATUS
+	store 1,mem_mesh_access_layer_payload
+	setarg MESH_SUCCESS
+	istore 1,contw
+	fetch 2,mem_mesh_scene_recall_payload_scene_number
+	istore 2,contw
+	jam 4,mem_mesh_access_layer_payload_len
+	branch ali_mesh_upper_transport_layer_send_access_message
+
+
+
+logging_tx_info_receive_access_message:
+	fetchr loopcnt,1,mem_ccm_data_len
+	copy alarm,rega
+	arg MESH_ACCESS_RECEIVE_MESSAGE,regb
+	branch logging_tx_info
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_ali_vendor_message.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_ali_vendor_message.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_ali_vendor_message.prog	(working copy)
@@ -0,0 +1,504 @@
+
+/*
+	mesh协议中ali vendor message resolve
+	主要是阿里自定义attribute set 指令设置
+*/
+
+
+/*
+	主要是阿里定时设置模块指令解析
+	其他非标的指令设置
+*/
+ali_mesh_ali_vendor_message_attribute_set:
+	call ali_mesh_ali_vendor_message_attrbute_check_company_id_and_tid
+	nrtn user
+	fetch 2,mem_mesh_vendor_message_attr_type
+	arg VENDOR_MESSAGE_ATTR_TYPE_TIME,temp
+	isub temp,null	//设置设备的时间
+	branch ali_mesh_ali_vendor_message_opcode_timer_set_curr_time,zero
+	arg VENDOR_MESSAGE_ATTR_TYPE_TIMING,temp
+	isub temp,null
+	branch ali_mesh_ali_vendor_message_opcode_timer_set_timing,zero
+	arg VENDOR_MESSAGE_ATTR_TYPE_CYCLE_TIMING, temp
+	isub temp, null
+	branch ali_mesh_ali_vendor_message_opcode_timer_set_timing_cyclically, zero
+	arg VENDOR_MESSAGE_ATTR_TYPE_DELETE_TIMING,temp
+	isub temp,null
+	branch ali_mesh_ali_vendor_message_opcode_timer_delete_timing,zero
+	arg VENDOR_MESSAGE_ATTR_TYPE_MAIN_LIGHT,temp
+	isub temp,null	//主灯控制
+	branch ali_mesh_ali_vendor_message_attribute_set_main_light,zero
+	arg VENDOR_MESSAGE_ATTR_TYPE_BACKGROUND_LIGHT,temp
+	isub temp,null	//背光灯控制
+	branch ali_mesh_ali_vendor_message_attribute_set_background_light,zero
+	arg VENDOR_MESSAGE_ATTR_TYPE_COLOR,temp
+	isub temp,null	//颜色控制
+	branch ali_mesh_ali_vendor_message_attribute_set_color,zero
+	fetch 2,mem_mesh_cb_recv_vendor
+	branch callback_func
+
+ali_mesh_ali_vendor_message_opcode_attr_get:
+ali_mesh_ali_vendor_message_opcode_attr_confrimation:
+	rtn
+
+ali_mesh_ali_vendor_message_attrbute_check_company_id_and_tid:
+	call disable_user
+	fetch 2,mem_mesh_vendor_message_cid
+	arg VENDOR_MESSAGE_OPCODE_COMPANY_ID,temp
+	isub temp,null
+	nrtn zero
+	fetcht 1,mem_mesh_vendor_mesh_receive_tid
+	fetch 1,mem_mesh_vendor_message_tid
+	isub temp,null
+	rtn zero
+	store 1,mem_mesh_vendor_mesh_receive_tid
+	branch enable_user
+
+ali_mesh_ali_vendor_message_attribute_set_main_light:
+	call ali_mesh_ali_vendor_message_ack_attr_status_uint8
+	fetch 2,mem_mesh_cb_main_light_onoff_set
+	branch callback_func
+
+
+ali_mesh_ali_vendor_message_attribute_set_background_light:
+	call ali_mesh_ali_vendor_message_ack_attr_status_uint8
+	fetch 2,mem_mesh_cb_background_onoff_set
+	branch callback_func
+
+ali_mesh_ali_vendor_message_attribute_set_color:
+	call ali_mesh_ali_vendor_message_ack_attr_status_uint48
+	fetch 2,mem_mesh_cb_color_set
+	branch callback_func
+
+
+/*
+	阿里定时模块代码
+*/
+ali_mesh_ali_vendor_message_opcode_timer_set_curr_time:
+	call ali_mesh_ali_vendor_message_ack_attr_status_uint32
+
+	fetch 4,mem_mesh_vendor_message_current_time
+	store 4,mem_mesh_vendor_timer_current_time
+	branch ali_mesh_time_init_system_time
+
+
+ali_mesh_ali_vendor_message_opcode_timer_set_timing:
+	call ali_mesh_ali_vendor_message_ack_attr_status_uint64
+	call ali_mesh_ali_vendor_message_calc_timing_address
+	rtn blank
+	fetch 1,mem_mesh_vendor_timer_timing_index
+	call ali_mesh_vendor_timer_buffer_offset_cal
+	fetcht 8,mem_mesh_vendor_timer_timing_index
+	istoret 8,contw
+ali_mesh_ali_vendor_message_cb_timing_changed:
+	fetch 2,mem_mesh_cb_vendor_timing_changed
+	branch callback_func
+
+ali_mesh_ali_vendor_message_opcode_timer_set_timing_cyclically:
+	call ali_mesh_ali_vendor_message_ack_attr_status_uint56
+	call ali_mesh_ali_vendor_message_calc_timing_address
+	rtn blank
+	jam TIMER_CYCLICAL_FALG,mem_mesh_vendor_timer_timing_cyclic_flag
+	fetch 1,mem_mesh_vendor_timer_timing_index_cyclic
+	call ali_mesh_vendor_timer_buffer_offset_cal
+	fetch 8,mem_mesh_vendor_timer_timing_index_cyclic    //取8个Bytes，包括标识周期定时的flag
+	istore 8,contw
+	branch ali_mesh_ali_vendor_message_cb_timing_changed
+
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing:
+	call ali_mesh_ali_vendor_message_opcode_timer_delete_timing_ack
+	call ali_mesh_ali_vendor_message_calc_timing_address
+	rtn blank
+	fetch 1,mem_mesh_vendor_timer_timing_index
+	rtn blank
+	call ali_mesh_vendor_timer_buffer_offset_cal
+	arg 0, temp
+	istoret 1, contw
+	fetch 1,mem_mesh_receive_model_message_payload_len
+	sub pdata,8,null
+	call ali_mesh_ali_vendor_message_opcode_timer_delete_timing_delete_second,zero
+	branch ali_mesh_ali_vendor_message_cb_timing_changed
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing_delete_second:
+	call ali_mesh_ali_vendor_message_calc_timing_address
+	fetch 1,mem_mesh_vendor_timer_timing_index1
+	call ali_mesh_vendor_timer_buffer_offset_cal
+	arg 0, temp
+	istoret 1, contw
+	rtn
+
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing_ack:
+	fetch 1,mem_mesh_receive_model_message_payload_len
+	beq 7,ali_mesh_ali_vendor_message_ack_attr_status_uint8
+	branch ali_mesh_ali_vendor_message_ack_attr_status_uint16
+
+ali_mesh_vendor_timer_buffer_offset_cal:
+	pincrease -1
+	lshift3 pdata,pdata
+	iadd contw,contw
+	rtn
+
+
+ali_mesh_ali_vendor_message_calc_timing_address:
+	call mesh_get_element_info_config
+	add rega,ELEMENT_DEVICE_VENDOR_TIME_PTR,rega
+	fetch 1,mem_mesh_receive_element_number
+	imul32 regb,pdata
+	iadd rega,rega
+	ifetch 2,rega
+	copy pdata,contw
+	rtn
+
+
+
+/*
+	阿里mesh自定义status,被动回复SET或者GET状态
+*/
+
+ali_mesh_ali_vendor_message_status_add_head:
+	setarg VENDOR_MESSAGE_ATTR_STATUS
+	store 1,mem_mesh_access_layer_payload
+	setarg VENDOR_MESSAGE_OPCODE_COMPANY_ID
+	istore 2,contw
+	fetch 1,mem_mesh_vendor_mesh_receive_tid
+	istore 1,contw
+	istoret 2,contw
+	rtn
+
+
+/*
+	阿里mesh自定义indication，主动上报状态给天猫精灵
+	DST:0x00f0
+*/
+//开关上电
+ali_mesh_ali_vendor_message_opcode_device_power_on:
+	arg 0,queue
+	arg VENDOR_MESSAGE_EVENT_DEVICE_POWER_ON,temp
+	arg VENDOR_ATTR_TYPE_EVENT_TRIGGER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint8
+
+
+//上报开关状态
+//input:temp is generic onoff status
+//0 GENERIC_ONOFF_CMD_OFF
+//1 GENERIC_ONOFF_CMD_ON
+//input:queue is element number
+//e.g 灯queue0
+//风扇灯中灯0，风扇1
+//风扇:0
+ali_mesh_ali_vendor_message_opcode_generic_OnOff:
+	arg VENDOR_ATTR_GENERIC_ONOFF_SERVER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint8
+
+//上报模式给天猫精灵
+//input: temp is scene server mode
+ali_mesh_ali_vendor_message_opcode_scene_server_first_element:
+	arg 0,queue
+//上报模式给天猫精灵
+//input: temp is scene server mode
+//queue is element_number
+ali_mesh_ali_vendor_message_opcode_scene_server:
+	arg VENDOR_ATTR_SCENE_SERVER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint16
+
+
+ali_mesh_ali_vendor_message_opcode_main_light_OnOff_first_element:
+	arg 0,queue
+//上报主灯开关状态
+//input:temp is generic onoff status
+//0 GENERIC_ONOFF_CMD_OFF
+//1 GENERIC_ONOFF_CMD_ON
+//input:queue is element number
+ali_mesh_ali_vendor_message_opcode_main_light_OnOff:
+	arg VENDOR_ATTR_MAIN_LIGHT_SERVER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint8
+
+ali_mesh_ali_vendor_message_opcode_background_light_OnOff_first_element:
+	arg 0,queue
+//上报背光灯开关状态
+//input:temp is generic onoff status
+//0 GENERIC_ONOFF_CMD_OFF
+//1 GENERIC_ONOFF_CMD_ON
+//input:queue is element number
+ali_mesh_ali_vendor_message_opcode_background_light_OnOff:
+	arg VENDOR_ATTR_BACKGROUND_LIGHT_ONOFF_SERVER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint8
+
+ali_mesh_ali_vendor_message_opcode_brightness_first_element:
+	arg 0,queue
+//上报灯的亮度
+//input:temp is bright ness 0-100
+ali_mesh_ali_vendor_message_opcode_brightness:
+	call ali_mesh_model_layer_message_calc_actual_lightness
+	arg VENDOR_ATTR_LIGHTNESS_LEVEL_SERVER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint16
+
+ali_mesh_ali_vendor_message_opcode_color_temperature_first_element:
+	arg 0,queue
+//上报灯的亮度
+//input:temp is bright ness 0-100
+ali_mesh_ali_vendor_message_opcode_color_temperature:
+	call ali_mesh_model_layer_message_calc_actual_temperature
+	arg VENDOR_ATTR_COLOR_TEMPERATURE_SERVER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint16
+
+
+//input:temp is timing index number
+ali_mesh_ali_vendor_message_opcode_timing_finish:
+	lshift temp,temp
+	or temp,VENDOR_MESSAGE_EVENT_FINISH_TIMING,temp
+	arg VENDOR_ATTR_TYPE_EVENT_TRIGGER,rega
+	branch ali_mesh_ali_vendor_message_opcode_para_uint16
+
+
+ali_mesh_ali_vendor_message_indication_info_add_head_event_trigger:
+	call ali_mesh_ali_vendor_message_indication_info_add_head
+	setarg VENDOR_ATTR_TYPE_EVENT_TRIGGER
+	istore 2,contw
+	rtn
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint64:
+	arg 8,loopcnt
+	branch ali_mesh_ali_vendor_message_ack_attr_status
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint56:
+	arg 8,loopcnt
+	branch ali_mesh_ali_vendor_message_ack_attr_status
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint48:
+	arg 6,loopcnt
+	branch ali_mesh_ali_vendor_message_ack_attr_status
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint32:
+	arg 4,loopcnt
+	branch ali_mesh_ali_vendor_message_ack_attr_status
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint16:
+	arg 2,loopcnt
+	branch ali_mesh_ali_vendor_message_ack_attr_status
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint8:
+	arg 1,loopcnt
+	branch ali_mesh_ali_vendor_message_ack_attr_status
+
+//input:loopcnt is attr length
+ali_mesh_ali_vendor_message_ack_attr_status:
+	add loopcnt,6,pdata
+	store 1,mem_mesh_access_layer_payload_len
+	call ali_mesh_ali_vendor_message_status_add_head
+	arg mem_mesh_vendor_attr_parameter,contr
+	call memcpy
+	branch ali_mesh_upper_transport_layer_send_access_message
+	
+
+
+//input:queue is element number
+//rega is vendor model attr
+//temp is vendor model attr parameter 
+ali_mesh_ali_vendor_message_opcode_para_uint8:
+	call ali_mesh_ali_vendor_message_indication_info_add_head
+	istorer rega,2,contw
+	istoret 1,contw
+	jam 7,mem_mesh_access_layer_payload_len
+	branch ali_mesh_ali_vendor_message_send_message
+
+
+//input:queue is element number
+//rega is vendor model attr
+//temp is vendor model attr parameter 
+ali_mesh_ali_vendor_message_opcode_para_uint16:
+	call ali_mesh_ali_vendor_message_indication_info_add_head
+	istorer rega,2,contw
+	istoret 2,contw
+	jam 8,mem_mesh_access_layer_payload_len
+	branch ali_mesh_ali_vendor_message_send_message
+
+
+//input:queue is element number
+ali_mesh_ali_vendor_message_send_message:
+	call ali_mesh_more_element_calc_queue_address
+	branch ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer
+
+
+ali_mesh_ali_vendor_message_indication_info_add_head:
+	fetch 1,mem_mesh_transport_AID
+	store 1,mem_mesh_message_Transport_Head
+	setarg VENDOR_MESSAGE_TMALL_DST
+	store 2,mem_mesh_send_message_DST
+	fetch 1,mem_mesh_vendor_mesh_send_tid
+	pincrease 1
+	store 1,mem_mesh_vendor_mesh_send_tid
+	beq VENDOR_MESSAGE_SEND_TID_MAX,ali_mesh_ali_vendor_message_indication_info_reset_tid
+	setarg VENDOR_MESSAGE_ATTR_INDICATION
+	store 1,mem_mesh_access_layer_payload
+	setarg VENDOR_MESSAGE_OPCODE_COMPANY_ID
+	istore 2,contw
+	fetch 1,mem_mesh_vendor_mesh_send_tid
+	istore 1,contw
+	rtn
+
+ali_mesh_ali_vendor_message_indication_info_reset_tid:
+	jam VENDOR_MESSAGE_SEND_TID_MIN,mem_mesh_vendor_mesh_send_tid
+	rtn
+
+/*
+	阿里定时函数
+*/
+ali_mesh_time_function:
+	copy clkn_bt,temp
+	fetch 4,mem_system_time
+	isub temp,null
+	call ali_mesh_timer_timeout,positive
+	call ali_mesh_clkn_bt_add_1s
+	isub temp,null	
+	rtn positive
+	call ali_mesh_time_init_system_time_without_clk
+	fetch 4,mem_mesh_vendor_timer_current_time
+	pincrease 1
+	store 4,mem_mesh_vendor_timer_current_time
+	branch ali_mesh_ali_vendor_check_time
+
+
+ali_mesh_time_init_system_time:
+	copy clkn_bt,pdata
+ali_mesh_time_init_system_time_without_clk:
+	store 4,mem_system_time
+	fetch 1,mem_system_time+3
+	and_into 0x0f,pdata
+	store 1,mem_system_time+3
+	rtn
+
+ali_mesh_timer_timeout:
+	rtn zero
+	copy pdata,regb
+	setarg 0x100000
+	lshift8 pdata,pdata
+	iadd temp,temp
+	copy regb,pdata
+	rtn
+
+ali_mesh_clkn_bt_add_1s:
+	arg 20,loopcnt
+ali_mesh_time_loop:	
+	pincrease 160
+	loop ali_mesh_time_loop	
+	rtn
+
+ali_mesh_ali_vendor_check_time:
+	call mesh_get_element_info_config
+	add rega,ELEMENT_DEVICE_VENDOR_TIME_PTR,rega
+	jam 0,mem_mesh_receive_element_number
+
+ali_mesh_ali_vendor_check_time_loop:
+	call ali_mesh_more_element_push_stack
+	ifetch 2,rega
+	branch ali_mesh_ali_vendor_check_time_next_element,blank
+	copy pdata,alarm
+	call ali_mesh_ali_vendor_check_time_one_element
+ali_mesh_ali_vendor_check_time_next_element:
+	call ali_mesh_more_element_pop_stack
+	fetch 1,mem_mesh_receive_element_number
+	pincrease 1
+	store 1,mem_mesh_receive_element_number
+	fetcht 1,mem_mesh_element_number
+	isub temp,pdata
+	rtn zero	//check all
+	copy regb,pdata
+	iadd rega,rega
+	branch ali_mesh_ali_vendor_check_time_loop
+
+ali_mesh_ali_vendor_check_time_one_element:
+	arg 40,loopcnt
+//timer loop:input loopcnt timer count
+//alarm timer address
+//mem_mesh_receive_element_number:element number
+ali_mesh_ali_vendor_check_time_one_element_loop:
+	copy loopcnt,pdata
+	store 1,mem_mesh_loopcnt_tmep
+	ifetch 1,alarm
+	ncall ali_mesh_ali_vendor_had_timing,blank 
+	increase 8,alarm
+	fetch 1,mem_mesh_loopcnt_tmep
+	copy pdata,loopcnt
+	loop ali_mesh_ali_vendor_check_time_one_element_loop
+	rtn
+
+ali_mesh_ali_vendor_had_timing:
+	ifetcht 8, alarm
+	storet 8, mem_mesh_vendor_timer_timing_index_cyclic    //作为每次检测的临时存储
+	fetch 1,mem_mesh_vendor_timer_timing_attr_para
+	beq TIMER_CYCLICAL_FALG, ali_mesh_ali_vendor_had_timing_cyclically
+	fetcht 4,mem_mesh_vendor_timer_current_time
+	fetch 4, mem_mesh_vendor_timer_timing_time
+	isub temp,null
+	fetch 1, mem_mesh_vendor_timer_timing_attr_para
+	branch ali_mesh_ali_vendor_time_timeout,zero
+	rtn
+
+ali_mesh_ali_vendor_time_timeout:
+	store 1,mem_mesh_generic_onoff_set_payload_OnOff
+	
+	fetch 2,mem_mesh_cb_generic_onoff_set
+	call callback_func
+
+	copy alarm,pdata
+	store 2,mem_mesh_alarm_temp
+
+	fetchr queue,1,mem_mesh_receive_element_number
+	ifetcht 1,alarm
+	call ali_mesh_ali_vendor_message_opcode_timing_finish
+
+	fetcht 1,mem_mesh_generic_onoff_set_payload_OnOff
+	fetchr queue,1,mem_mesh_receive_element_number
+	call ali_mesh_ali_vendor_message_opcode_generic_OnOff
+
+	fetch 2,mem_mesh_alarm_temp
+	copy pdata,alarm
+	setarg 0
+	istore 1,alarm
+	branch ali_mesh_ali_vendor_message_cb_timing_changed
+
+
+ali_mesh_ali_vendor_had_timing_cyclically:
+	fetch 4, mem_mesh_vendor_timer_current_time
+	arg SECONDS_OF_MIN, temp
+	idiv temp
+	call wait_div_end
+	remainder pdata
+	nrtn blank
+
+	fetch 4, mem_mesh_vendor_timer_current_time
+	arg SECONDS_OF_FOUR_DAYS, temp
+	isub temp, pdata      //格林威治时间1970年01月01日为周四,  这里减去四天，为了与周一对齐
+
+	arg SECONDS_OF_WEEK, temp
+	idiv temp
+	call wait_div_end
+	remainder pdata     //pdata:本周走过的秒数
+	arg SECONDS_OF_DAY, temp
+	idiv temp
+	call wait_div_end
+	remainder rega     //rega:当天走过的秒数
+	quotient queue    //queue:当前是周几；0:周一；1:周二；... ...6:周日
+	
+	setarg 0    //clear pdata
+	qset1 pdata
+	fetcht 1, mem_mesh_vendor_timer_timing_weekdays_cyclic
+	iand temp, pdata
+	rtn blank
+	deposit rega
+	arg SECONDS_OF_MIN, temp
+	idiv temp
+	call wait_div_end
+	quotient temp
+	setarg EIGHT_HOURS_TIME_ZONE_OFFSET
+	iadd temp, temp
+	fetch 2, mem_mesh_vendor_timer_timing_time_cyclic
+	isub temp, null
+	nrtn zero
+	fetch 1, mem_mesh_vendor_timer_timing_attr_para_cyclic
+	branch ali_mesh_ali_vendor_time_timeout
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_bearer_layer.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_bearer_layer.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_bearer_layer.prog	(working copy)
@@ -0,0 +1,109 @@
+
+/*
+	mesh协议中bearer layer
+	主要是负责mesh中实际发送数据包内容
+*/
+
+ali_mesh_bearer_layer_send_packet_by_network_layer:
+	bpatchx patch3d_6,mem_patch3d
+	jam ADV_PAIRING_MESH_MESSAGE_DURATION,mem_mesh_queue_ele_duration
+	fetch 1,mem_mesh_gatt_package_send_msg_id
+	store 1,mem_mesh_queue_ele_gatt_msg_id
+
+	fetch 1,mem_mesh_lower_transport_layer_payload_len
+	pincrease 11
+	add pdata,-2,loopcnt
+	//长度+11的原因
+	//uint8_t AD length
+	//uint8_t AD type:GAP_ADTYPE_MESH_MESSAGE
+	//uint8_t IVI & NID
+	//uint8_t CTL & TTL
+	//uint24_t SEQ
+	//uint16_t SRC
+	//uint16_t DST
+	store 1,mem_mesh_queue_ele_len
+	pincrease -1
+	//-1的原因
+	//uint8_t AD length
+	istore 1,contw
+	setarg GAP_ADTYPE_MESH_MESSAGE
+	istore 1,contw
+	arg mem_mesh_send_upper_layer_IVI_and_NID,contr
+	call memcpy_fast
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BLE_CONNECTED,pdata
+	call ali_mesh_send_ble_data,true
+	fetchr rega,2,mem_mesh_rega_temp
+	call ali_mesh_advertising_bearer_layer_init_queue_param
+	branch queue_push
+
+ali_mesh_advertising_bearer_layer_init_queue_param:
+	add rega,ELEMENT_DEVICE_QUEUE_BUFFER_PTR,contr
+	ifetch 2,contr
+	store 2,mem_queue_ptr
+	arg mem_mesh_queue_ele_temp,rega
+	rtn
+
+ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue:
+	arg ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue_deal,regc
+	branch ali_mesh_check_all_element_info
+
+ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue_deal:
+	add rega,ELEMENT_DEVICE_UPPER_ADV_FLAG,contr
+	ifetch 1,contr
+	rtnne PACKET_IN_BEARER
+	setarg PACKET_IN_ADVERTING
+	add rega,ELEMENT_DEVICE_UPPER_ADV_FLAG,contw
+	istore 1,contw
+	branch ali_mesh_control_ble_advertising_on_advertising
+
+
+/*
+	app 回复的发包拆包逻辑
+*/
+ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer:
+	call ali_mesh_advertising_bearer_layer_generate_header
+	add temp,13,pdata
+	store 1,mem_mesh_adv_data_len
+	call ali_mesh_advertising_add_adtype_flags
+	add temp,9,pdata
+	istore 1,contw
+	setarg GAP_ADTYPE_MANUFACTURER_SPECIFIC
+	istore 1,contw
+	fetch 8,mem_mesh_receive_service_uuid_ios_data_company_id
+	istore 8,contw
+	copy rega,contr
+	copy temp,loopcnt
+	call memcpy
+	branch mesh_le_send_adv
+
+ali_mesh_advertising_bearer_layer_generate_header:
+	setarg COMPANY_ID_ALIBABA_AND_VID_GATT
+	store 3,mem_mesh_receive_service_uuid_ios_data_company_id
+	setarg PROVISIONING_SEND_IOS_DATA
+	store 1,mem_mesh_receive_service_uuid_ios_data_provisioning_type
+	fetch 1,mem_k2_NID
+	store 1,mem_mesh_receive_service_uuid_ios_data_NID
+	fetch 1,mem_mesh_queue_ele_gatt_msg_id
+	store 1,mem_mesh_receive_service_uuid_ios_data_msg_id
+	
+	fetch 1,mem_mesh_queue_ele_duration
+	isolate1 BIT_OF_APP_PACKAGE_NUM,pdata
+	call ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer_calc_param
+	store 1,mem_mesh_receive_service_uuid_ios_data_package_num
+	storet 1,mem_mesh_receive_service_uuid_ios_data_length
+	rtn
+
+
+ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer_calc_param:
+	arg mem_mesh_queue_ele_payload+2,rega
+	arg MAX_APP_MSSAGE_PAYLOAD_LENGTH,temp
+	setarg 0x21		//
+	nrtn true
+	arg mem_mesh_queue_ele_payload+20,rega		//MAX_APP_MSSAGE_PAYLOAD_LENGTH+2
+	fetcht 1,mem_mesh_queue_ele_len
+	increase -18,temp		//MAX_APP_MSSAGE_PAYLOAD_LENGTH
+	setarg 0x22
+	rtn
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_ble_core_advertising.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_ble_core_advertising.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_ble_core_advertising.prog	(working copy)
@@ -0,0 +1,155 @@
+
+
+
+//0x01 GAP_ADTYPE_FLAGS
+//input:no default write mem_mesh_adv_data
+ali_mesh_advertising_add_adtype_flags:
+	arg mem_mesh_adv_data,contw
+	setarg 0x02
+	istore 1,contw
+	setarg GAP_ADTYPE_FLAGS
+	istore 1,contw
+	setarg 0x02
+	istore 1,contw
+	rtn
+
+//0x01 GAP_ADTYPE_FLAGS
+//input:no default write mem_mesh_adv_data
+ali_mesh_advertising_add_adtype_16bit_complete:
+	arg MESH_PROVISIONING_UUID,temp
+	setarg 0x03
+	istore 1,contw
+	setarg GAP_ADTYPE_16BIT_COMPLETE
+	istore 1,contw
+	istoret 2,contw
+	rtn
+
+/*
+	mesh 硬件接收scan 扫描包
+*/
+mesh_receive_advertising:
+	branch mesh_le_scan_adv
+
+mesh_le_scan_adv:
+	call le_enable
+	call le_init_adv
+	call mesh_le_wait_adv
+	nrtn match
+	fetch 1,mem_le_adv_rcv
+	pincrease 1
+	store 1,mem_le_adv_rcv
+	fetch 2,mem_mesh_cb_receive_advertising
+	call callback_func
+	branch le_disable
+
+mesh_le_wait_adv:
+	fetch 2,mem_mesh_scan_selete_next_ch
+	branch callback_func
+
+mesh_le_wait_adv_cb:
+	call mesh_le_calc_next_scan_channel
+	branch le_receive_adv
+
+mesh_le_calc_next_scan_channel:
+	fetch 1,mem_mesh_adv_scan_channel
+	pincrease 1
+	store 1,mem_mesh_adv_scan_channel
+	store 1,mem_le_ch_mapped
+	rtnne 40
+	jam 37,mem_mesh_adv_scan_channel
+	jam 37,mem_le_ch_mapped
+	rtn
+
+
+/*
+	mesh 解析标准广播数据
+	只分析ADV_IND/ADV_NONCONN_IND两种广播包
+*/
+mesh_check_ble_rx_packet:
+	fetch 1,mem_le_rxbuf
+	and pdata,0x0f,pdata
+	beq ADV_IND,ali_mesh_match_advertising_packet
+	beq ADV_NONCONN_IND,ali_mesh_match_advertising_packet
+	rtn
+
+ali_mesh_match_advertising_packet:
+	ifetcht 1,contr	//length
+	sub temp,ADV_PACKET_MIN_LENGTH,null
+	rtn positive	//过滤短包，包长度太短导致解析错误
+	sub temp,ADV_PACKET_MAX_LENGTH,null
+	nrtn positive	//过滤长包，包长度太长导致内存覆盖
+	add temp,-6,rega	//rega:减去address length
+	add contr,6,regb	//regb:指针偏移到regb
+
+ali_mesh_find_adv_ind_packet:
+	ifetcht 1,regb //length
+	sub temp,AD_TYPE_MIN_LENGTH,null
+	rtn positive	//过滤短包，包长度太短导致解析错误
+	sub temp,AD_TYPE_MAX_LENGTH,null
+	nrtn positive	//过滤长包，包长度太长导致内存覆盖
+	copy temp,pdata
+	rtn blank
+	bpatchx patch3d_7,mem_patch3d
+	ifetch 1,contr
+	beq GAP_ADTYPE_MANUFACTURER_SPECIFIC,ali_mesh_receive_adtype_manufacturer_specific
+	beq GAP_ADTYPE_MESH_MESSAGE,ali_mesh_receive_adtype_mesh_message
+	beq GAP_ADTYPE_128BIT_COMPLETE,ali_mesh_receive_adtype_128bit_uuid_complete
+//按照广播格式查询所有扫描到的广播数据
+	add temp,1,pdata
+	isub rega,null
+	rtn positive
+	iadd regb,regb
+	sub temp,-1,pdata
+	iadd rega,rega
+	copy rega,pdata
+	rtn blank
+	branch ali_mesh_find_adv_ind_packet
+
+
+mesh_le_send_adv:
+	fetch 1,mem_le_adv_transmit
+	pincrease 1
+	store 1,mem_le_adv_transmit
+	bpatchx patch3e_0,mem_patch3e
+	call le_enable
+	arg 39,loopcnt
+	arg mem_le_txheader,contr
+	arg mem_le_txheader_mesh_temp,contw
+	call memcpy_fast
+	jam 37,mem_le_ch_mapped
+	arg 1800,stop_watch
+	disable match
+
+mesh_le_send_adv_loop:
+	call le_init_adv
+	call mesh_le_send_adv_nonconn_ind
+	random pdata 
+	arg 0x1ff,temp
+	iand temp,pdata
+	add pdata,100,pdata
+	call delay
+	fetch 1,mem_le_ch_mapped
+	pincrease 1
+	store 1,mem_le_ch_mapped
+	bne 40,mesh_le_send_adv_loop
+	
+	arg 39,loopcnt
+	arg mem_le_txheader,contw
+	arg mem_le_txheader_mesh_temp,contr
+	call memcpy_fast
+	branch le_disable
+
+mesh_le_send_adv_nonconn_ind:
+	arg ADV_NONCONN_IND,temp
+	storet 1,mem_le_txheader
+	fetcht 1,mem_mesh_adv_data_len
+	add temp,6,pdata
+	store 1,mem_le_txlen
+	fetch 6,mem_le_lap
+	store 6,mem_le_txpayload
+	copy temp,loopcnt
+	arg mem_mesh_adv_data,contr
+	call memcpy_fast
+	branch le_transmit_norx
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_chip_peripherals.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_chip_peripherals.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_chip_peripherals.prog	(working copy)
@@ -0,0 +1,260 @@
+
+//input:mem_mesh_mic_cache_ptr is cache buffer ptr
+//data ptr is store mem_ccm_data_ptr
+//data length is store mem_ccm_data_len
+//cache space size is TRANSPORT_MIC_CACHE_SPACE_SIZE
+//cache space num is TRANSPORT_MIC_CACHE_SPACE_NUM
+//output:user is enable ,mean new packet
+ali_mesh_base_adt_cache:
+	bpatchx patch3e_1,mem_patch3e
+	fetcht 2,mem_ccm_data_ptr
+	fetch 1,mem_ccm_data_len
+	copy temp,contr
+	arg mem_k4_SALT,rega
+	arg mem_k4_T,alarm
+	call ali_mesh_encrypt_base_function_AES_CMAC
+	call disable_user
+	copy regc,pdata
+	iadd alarm,contr
+	fetcht 4,mem_k4_T
+	fetch 2,mem_mesh_mic_cache_ptr
+	copy pdata,rega
+//	arg mem_mesh_access_message_mic_cache,rega
+	arg TRANSPORT_MIC_CACHE_SPACE_NUM,loopcnt
+ali_mesh_base_adt_cache_loop:
+	ifetch 4,rega
+	branch ali_mesh_base_adt_cache_empty_space,blank
+	isub temp,null
+	rtn zero
+	increase TRANSPORT_MIC_CACHE_SPACE_SIZE,rega
+	loop ali_mesh_base_adt_cache_loop
+	fetch 2,mem_mesh_mic_cache_ptr
+	copy pdata,contw
+	add pdata,TRANSPORT_MIC_CACHE_SPACE_SIZE,contr
+//	arg mem_mesh_access_message_mic_cache,contw
+//	arg mem_mesh_access_message_mic_cache+TRANSPORT_MIC_CACHE_SPACE_SIZE,contr
+	arg TRANSPORT_MIC_CACHE_TOTAL_SIZE,loopcnt
+	call memcpy_fast
+	istoret 4,contw
+	branch enable_user
+ali_mesh_base_adt_cache_empty_space:
+	istoret 4,rega
+	branch enable_user
+
+/*
+	iic 读写eeprom接口
+	三元组、network key、aapplication key、device key、reset count
+	SEQ
+*/
+ali_mesh_chip_peripherals_load_data_from_eep:
+	call ali_mesh_chip_peripherals_load_three_tuple_from_eep
+	call ali_mesh_chip_peripherals_load_network_key_from_eep
+	call ali_mesh_chip_peripherals_load_application_key_from_eep
+	call ali_mesh_chip_peripherals_load_device_key_from_eep
+	call ali_mesh_chip_peripherals_load_reset_count_from_eep
+	call ali_mesh_chip_peripherals_load_seq_from_eep
+	branch ali_mesh_chip_peripherals_load_subscription_from_eep
+
+ali_mesh_chip_peripherals_load_three_tuple_from_eep:
+	arg MESH_EEP_THREE_TUPLE_LENGTH,temp
+	arg mem_mesh_three_tuple_ProductID,rega
+	arg MESH_EEP_THREE_TUPLE_OFFSET,regb
+	branch iicd_read_eep_data
+
+ali_mesh_chip_peripherals_load_network_key_from_eep:
+	arg MESH_EEP_NETWORK_KEY_LENGTH,temp
+	arg mem_mesh_Network_Key,rega
+	arg MESH_EEP_NETWORK_KEY_OFFSET,regb
+	call iicd_read_eep_data
+	fetch 1,mem_mesh_last_IV_Index_byte
+	store 1,mem_mesh_IV_Index+3
+	rtn
+
+ali_mesh_chip_peripherals_load_application_key_from_eep:
+	arg MESH_EEP_APPLICATION_KEY_LENGTH,temp
+	arg mem_mesh_application_key,rega
+	arg MESH_EEP_APPLICATION_KEY_OFFSET,regb
+	branch iicd_read_eep_data
+
+ali_mesh_chip_peripherals_load_device_key_from_eep:
+	arg MESH_EEP_DEVICE_KEY_LENGTH,temp
+	arg mem_mesh_Device_Key,rega
+	arg MESH_EEP_DEVICE_KEY_OFFSET,regb
+	branch iicd_read_eep_data
+
+ali_mesh_chip_peripherals_load_reset_count_from_eep:
+	rtn
+
+ali_mesh_chip_peripherals_load_seq_from_eep:
+	arg MESH_EEP_SEQ_LENGTH,temp
+	arg mem_mesh_send_message_SEQ,rega
+	arg MESH_EEP_SEQ_OFFSET,regb
+	branch iicd_read_eep_data
+
+ali_mesh_chip_peripherals_load_subscription_from_eep:
+	fetch 2,mem_mesh_core_feature
+	rtnbit1 MESH_FEATURE_DISABLE_SUBSCRIPTION
+	arg MESH_EEP_SUBSCRIPTION_TOTAL_LENGTH,temp
+	arg mem_mesh_subscription_eep_temp,rega
+	arg MESH_EEP_SUBSCRIPTION_OFFSET,regb
+	call iicd_read_eep_data
+	call mesh_get_element_info_config
+	arg mem_mesh_subscription_eep_temp,contr
+	add rega,ELEMENT_DEVICE_SUBSCRIPTION_LABEL,rega
+ali_mesh_chip_peripherals_load_subscription_from_eep_loop:
+	copy rega,contw
+	call memcpy16
+	copy regb,pdata
+	iadd rega,rega
+	loop ali_mesh_chip_peripherals_load_subscription_from_eep_loop
+	rtn
+
+mesh_receive_config_appkey_add_cb:
+	call ali_mesh_chip_peripherals_save_network_key_from_eep
+	call ali_mesh_chip_peripherals_save_application_key_from_eep
+	branch ali_mesh_chip_peripherals_save_device_key_from_eep
+
+ali_mesh_chip_peripherals_save_network_key_from_eep:
+	arg MESH_EEP_NETWORK_KEY_LENGTH,temp
+	arg mem_mesh_Network_Key,rega
+	arg MESH_EEP_NETWORK_KEY_OFFSET,regb
+	branch iicd_write_protect_eep_data
+
+ali_mesh_chip_peripherals_save_application_key_from_eep:
+	arg MESH_EEP_APPLICATION_KEY_LENGTH,temp
+	arg mem_mesh_application_key,rega
+	arg MESH_EEP_APPLICATION_KEY_OFFSET,regb
+	branch iicd_write_protect_eep_data
+
+ali_mesh_chip_peripherals_save_device_key_from_eep:
+	arg MESH_EEP_DEVICE_KEY_LENGTH,temp
+	arg mem_mesh_Device_Key,rega
+	arg MESH_EEP_DEVICE_KEY_OFFSET,regb
+	branch iicd_write_protect_eep_data
+
+mesh_store_new_seq_data:
+ali_mesh_chip_peripherals_save_seq_from_eep:
+	arg MESH_EEP_SEQ_LENGTH,temp
+	arg mem_mesh_send_message_SEQ,rega
+	arg MESH_EEP_SEQ_OFFSET,regb
+	branch iicd_write_protect_eep_data
+
+mesh_store_new_subscriptuion_list_data:
+	call ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep
+	arg MESH_EEP_SUBSCRIPTION_TOTAL_LENGTH,temp
+	arg mem_mesh_subscription_eep_temp,rega
+	arg MESH_EEP_SUBSCRIPTION_OFFSET,regb
+	branch iicd_write_protect_eep_data
+
+ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep:
+	call mesh_get_element_info_config
+	arg mem_mesh_subscription_eep_temp,contw
+	add rega,ELEMENT_DEVICE_SUBSCRIPTION_LABEL,rega
+ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep_loop:
+	copy rega,contr
+	call memcpy16
+	copy regb,pdata
+	iadd rega,rega
+	loop ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep_loop
+	rtn
+
+//input:rega is tx data ptr
+//loopcnt is tx data length
+//regb is logging type
+logging_tx_debug:
+	arg LOGGING_DEBUG,temp
+	branch logging_tx_common
+
+
+//input:rega is tx data ptr
+//loopcnt is tx data length
+//regb is logging type
+logging_tx_info:
+	arg LOGGING_INFO,temp
+	branch logging_tx_common
+
+
+//input:rega is tx data ptr
+//loopcnt is tx data length
+//regb is logging type
+logging_tx_warning:
+	arg LOGGING_WARNING,temp
+	branch logging_tx_common
+
+
+//input:rega is tx data ptr
+//loopcnt is tx data length
+//regb is logging type
+logging_tx_error:
+	arg LOGGING_ERROR,temp
+	branch logging_tx_common
+
+
+//input:rega is tx data ptr
+//loopcnt is tx data length
+//regb is logging type
+logging_tx_critical:
+	arg LOGGING_CRITICAL,temp
+	branch logging_tx_common
+
+
+//input:rega is tx data ptr
+//loopcnt is tx data length
+//regb is logging type
+//temp is logging level
+logging_tx_common:
+	bpatchx patch3e_2,mem_patch3e
+	call push_stack
+	fetch 1,mem_mesh_core_feature
+	bbit1 MESH_FEATURE_DISABLE_LOG,pop_stack
+	call uartb_prepare_tx_register_push
+	setarg LUA_LOG_PACKET_HEADER
+	istore 1,contwu
+	setarg LUA_LOG_PAKCET_TYPE
+	istore 1,contwu
+	add loopcnt,4,pdata
+	istore 1,contwu
+	istorer temp,2,contwu
+	istorer regb,2,contwu
+	copy rega,contr
+	call uart_copy_tx_bytes_fast
+	setarg LUA_LOG_PACKET_TRAIL
+	istore 1,contwu
+	call uartb_send_register_pop
+	branch pop_stack
+
+/*
+	function name:uart init by mem
+	input:
+		mem_module_uart_rx_buffer、mem_module_uart_rx_buffer_end
+		mem_module_uart_tx_buffer、mem_module_uart_tx_buffer_end
+		mem_module_uarta_baud_rate
+		bit0 of mem_module_flag
+*/
+mesh_uart_init:
+	fetch 1,mem_mesh_core_feature
+	rtnbit1 MESH_FEATURE_DISABLE_LOG
+	jam gpcfg_uartb_txd,core_gpio_conf+11
+	jam gpcfg_uartb_rxd|gpcfg_pullup,core_gpio_conf+12
+	call mesh_uart_init_buffer
+	arg 921600,temp
+	call uartb_calc_baud_rate_config
+	call uart_clock_select_main_freq_crystal
+	arg FUN_UART_CONTROL_ENABLE|FUN_UART_CONTROL_SETTING_RATE_BAUD,temp
+	storet 1,core_uartb_ctrl
+	rtn
+
+mesh_uart_init_buffer:
+	setarg mem_mesh_uart_log_rx_buff
+	store 2,mem_pdatatemp
+	setarg mem_mesh_uart_log_rx_buff_end
+	istore 2,contw
+	setarg mem_mesh_uart_log_tx_buff
+	istore 2,contw
+	setarg mem_mesh_uart_log_tx_buff_end
+	istore 2,contw
+	fetch 8,mem_pdatatemp
+	branch uartb_init_dma_mem
+
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_control_ble_advertising.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_control_ble_advertising.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_control_ble_advertising.prog	(working copy)
@@ -0,0 +1,240 @@
+
+//
+//mesh控制ble advertising广播逻辑的主流程
+ali_mesh_control_ble_adv_process:
+	call ali_mesh_control_ble_adv_tmall_packet
+	branch ali_mesh_control_ble_adv_app_packet
+
+//mesh 控制ble advertising 广播timer流程
+ali_mesh_control_ble_adv_timer_process:
+	call ali_mesh_advertising_unprovisioned_timer_interval_timer
+	branch ali_mesh_advertising_unprovisioned_timer
+
+//mesh打开ble advertising
+ali_mesh_control_ble_advertising_on_advertising:
+	jam DEVICE_BEACON_ON,mem_mesh_advertising_unprovisioned_device_beacon_switch
+	rtn
+
+//mesh关闭ble advertising
+ali_mesh_control_ble_advertising_off_advertising:
+	jam DEVICE_BEACON_OFF,mem_mesh_advertising_unprovisioned_device_beacon_switch
+	rtn
+
+
+//下面为static function
+
+/*
+	mesh app控制包回复
+*/
+ali_mesh_control_ble_adv_app_packet:
+	arg ali_mesh_control_ble_adv_app_packet_paired,regb
+	arg MESH_ADV_APP_MESSAGE_INTERVAL,rega
+	arg mesh_ble_adv_app,queue
+	branch ali_mesh_chip_timer_check_with_random_timer
+
+ali_mesh_control_ble_adv_app_packet_paired:
+	fetch 1,mem_mesh_provisioned_flag
+	rtnne PAIRED_STATUS					//非配网状态，不需要发送
+	arg ali_mesh_control_ble_adv_app_packet_paired_deal,regc
+	branch ali_mesh_check_all_element_info
+
+
+/*
+	mesh控制发送unprovisioned device beacon advertising
+	配网阶段包已经配网后tmall回复包
+*/
+ali_mesh_control_ble_adv_tmall_packet:
+	arg ali_mesh_control_ble_adv_tmall_packet_send_package,regb
+	arg MESH_ADV_TMALL_MESSAGE_INTERVAL,rega
+	arg mesh_ble_adv_tmall,queue
+	branch ali_mesh_chip_timer_check_with_random_timer
+
+//app 回复包的格式
+ali_mesh_control_ble_adv_app_packet_paired_deal:
+	add rega,ELEMENT_DEVICE_TRAN_PACKAGE_TYPE,contr
+	ifetch 1,contr
+	rtnbit0 BIT_UPPER_TRAN_APP_MESSAGE
+	call ali_mesh_advertising_bearer_layer_init_queue_param
+	call queue_get_new_ele
+	nrtn user
+	fetch 1,mem_mesh_queue_ele_len
+	pincrease -2	//uint8_t AD length & uint8_t AD type:GAP_ADTYPE_MESH_MESSAGE
+	store 1,mem_mesh_queue_ele_len	
+	//不会小于一包数据
+	fetch 1,mem_mesh_queue_ele_duration
+	//生命周期不减少
+	setflip BIT_OF_APP_PACKAGE_NUM,pdata
+	istore 1,regb
+	branch ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer
+
+
+//控制不同状态发包情况
+ali_mesh_control_ble_adv_tmall_packet_send_package:
+	fetch 1,mem_mesh_provisioned_flag
+	beq PAIRED_STATUS,ali_mesh_control_ble_advertising_send_paired_packet
+	beq PAIRING_STATUS,ali_mesh_control_ble_advertising_send_pairing_packet
+	branch ali_mesh_control_ble_advertising_send_device_beacon_packet
+
+
+ali_mesh_control_ble_advertising_send_paired_packet:
+	arg ali_mesh_control_ble_advertising_send_paired_packet_deal,regc
+	branch ali_mesh_check_all_element_info
+
+ali_mesh_control_ble_advertising_send_paired_packet_deal:
+	call ali_mesh_advertising_bearer_layer_init_queue_param
+	call queue_get_new_ele
+	nrtn user
+	fetch 1,mem_mesh_queue_ele_duration
+	pincrease -1
+	istore 1,regb
+	bbit1 BIT_OF_ADV_IN_OFF,ali_mesh_control_ble_advertising_send_paired_packet_adv_in_off
+	and pdata,0x3f,pdata	//不判断最高位
+	call ali_mesh_control_ble_advertising_send_paired_packet_end_duration,blank	//周期到丢弃
+	fetchr rega,2,mem_mesh_rega_temp
+	add rega,ELEMENT_DEVICE_TRAN_PACKAGE_TYPE,contr
+	ifetch 1,contr
+	bbit1 BIT_UUPER_TRAN_PROXY_MESSAGE,ali_mesh_control_ble_advertising_send_paired_packet_end_duration_proxy
+	rtnbit0 BIT_UPPER_TRAN_TMALL_MESSAGE
+	arg mem_mesh_adv_data_len,contw
+	arg mem_mesh_queue_ele_len,contr
+	call memcpy32
+	branch mesh_le_send_adv
+
+ali_mesh_control_ble_advertising_send_paired_packet_end_duration_proxy:
+	arg mem_mesh_queue_ele_duration,rega
+	call queue_pop
+	call queue_empty
+	nrtn blank
+	fetchr rega,2,mem_mesh_rega_temp
+	add rega,ELEMENT_DEVICE_UPPER_ADV_FLAG,contw
+	setarg NULL_PACKET_ADVERTISING
+	istore 1,contw
+	branch ali_mesh_control_ble_advertising_off_advertising
+
+
+ali_mesh_control_ble_advertising_send_paired_packet_adv_in_off:
+	and pdata,0x3f,pdata	//不判断最高位
+	nrtn blank
+	fetchr rega,2,mem_mesh_rega_temp
+	add rega,ELEMENT_DEVICE_UPPER_ADV_FLAG,contw
+	setarg NULL_PACKET_ADVERTISING
+	istore 1,contw
+	branch queue_init
+	
+
+ali_mesh_control_ble_advertising_send_paired_packet_end_duration:
+	arg mem_mesh_queue_ele_duration,rega
+	call queue_pop
+	call queue_empty
+	nrtn blank
+	//传入不广播数据
+	jam ADV_PAIRING_MESH_MESSAGE_INTERVAL,mem_mesh_queue_ele_duration
+	branch queue_push
+
+
+ali_mesh_control_ble_advertising_send_device_beacon_packet:
+	call ali_mesh_config_device_uuid_by_three_tuple
+	call ali_mesh_send_Unprovisioned_Beacons_tmall
+	call ali_mesh_advertising_send_Unprovisioned_Beacons_Gatt
+	call ali_mesh_control_ble_advertising_device_beacon_check_duration
+	nrtn zero			//in advertising beacon duration
+	fetch 1,mem_mesh_provisioned_flag
+	beq SILENCE_BEACON_STATUS,ali_mesh_end_advertising_silence_device_beacon_packet
+	beq UNPROVISIONED_BEACON_STATUS,ali_mesh_end_advertising_unprovisioned_device_beacon_packet
+	rtn
+
+//广播一次生存周期减1
+//output:zero is end of duration
+ali_mesh_control_ble_advertising_device_beacon_check_duration:
+	fetch 1,mem_mesh_advertising_unprovisioned_device_beacon_duration
+	add pdata,-1,pdata
+	store 1,mem_mesh_advertising_unprovisioned_device_beacon_duration
+	rtn
+
+//静默广播生存周期完成关闭广播
+ali_mesh_end_advertising_silence_device_beacon_packet:
+	jam ADV_SILENCE_DEVICE_BEACON_INTERVAL,mem_mesh_advertising_unprovisioned_device_beacon_interval
+	branch ali_mesh_control_ble_advertising_off_advertising
+	
+//未配网广播生存周期完成关闭广播
+ali_mesh_end_advertising_unprovisioned_device_beacon_packet:
+	jam ADV_UNPROVISIONED_DEVICE_BEACON_DURATION,mem_mesh_advertising_unprovisioned_device_beacon_interval
+	branch ali_mesh_control_ble_advertising_off_advertising
+
+
+ali_mesh_control_ble_advertising_send_pairing_packet:
+	call ali_mesh_advertising_timer
+	branch mesh_le_send_adv
+
+
+/*
+	注册定时器功能
+*/
+ali_mesh_chip_timer_check_with_random_timer:
+	random pdata
+	and pdata,0x07,pdata
+	iadd rega,rega
+//input:queue is timer id
+//rega is timer count
+//regb is cb ptr
+ali_mesh_chip_timer_check:
+	fetch 1,mem_mesh_advertising_unprovisioned_device_beacon_switch
+	rtnne DEVICE_BEACON_ON
+	call timer_check
+	nrtn blank
+	copy rega,pdata
+	call timer_init
+	copy regb,pdata
+	branch callback_func
+
+
+//静默广播定时器10min后进入静默广播状态
+ali_mesh_advertising_unprovisioned_timer:
+	arg mem_mesh_advertising_unprovisioned_device_beacon_timer,regc
+	arg ali_mesh_advertising_unprovisioned_timeout, regb
+	branch timer_single_step_2B
+
+//定时器超时如果当前处于未配网广播状态，进入静默广播
+ali_mesh_advertising_unprovisioned_timeout:
+	fetch 1,mem_mesh_provisioned_flag
+	rtnne UNPROVISIONED_BEACON_STATUS
+	fetch 1,mem_mesh_UUID_FeatureFlag
+	set1 BIT_SILENCE_ADV_FLAG,pdata
+	store 1,mem_mesh_UUID_FeatureFlag
+	jam SILENCE_BEACON_STATUS,mem_mesh_provisioned_flag
+	branch ali_mesh_send_silence_device_beacon_init_advertising
+
+
+//控制广播发送间隙的timer
+//不同状态广播间隔不一样
+ali_mesh_advertising_unprovisioned_timer_interval_timer:
+	arg mem_mesh_advertising_unprovisioned_device_beacon_interval,regc
+	arg ali_mesh_advertising_unprovisioned_timer_interval_timeout,regb
+	branch timer_single_step
+
+//控制广播发送超时
+//处于未配网广播或者静默广播状态，进入下一次广播
+//处于配网状态，清除配网状态
+ali_mesh_advertising_unprovisioned_timer_interval_timeout:
+	fetch 1,mem_mesh_provisioned_flag
+	beq SILENCE_BEACON_STATUS,ali_mesh_send_silence_device_beacon_init_advertising
+	beq UNPROVISIONED_BEACON_STATUS,ali_mesh_send_unprovisioned_device_beacon_init_advertising
+//	beq PAIRED_STATUS,ali_mesh_send_paired_packet_init_advertising
+	rtn
+
+//ali_mesh_send_paired_packet_init_advertising:
+//	jam NULL_PACKET_ADVERTISING,mem_mesh_upper_tran_layer_packet_advertising
+//	rtn
+
+//进入下一次未配网广播广播周期
+ali_mesh_send_unprovisioned_device_beacon_init_advertising:
+	jam ADV_UNPROVISIONED_DEVICE_BEACON_DURATION,mem_mesh_advertising_unprovisioned_device_beacon_duration
+	branch ali_mesh_control_ble_advertising_on_advertising
+
+//进入下一次静默广播广播周期
+ali_mesh_send_silence_device_beacon_init_advertising:
+	jam ADV_SILENCE_DEVICE_BEACON_DURATION,mem_mesh_advertising_unprovisioned_device_beacon_duration
+	branch ali_mesh_control_ble_advertising_on_advertising
+
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_encrypt_function.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_encrypt_function.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_encrypt_function.prog	(working copy)
@@ -0,0 +1,626 @@
+/*
+	mesh加密算法层，包含配网阶段的算法和配网后的算法
+*/
+
+
+/*
+	provision random输入，计算出provision confirmation等参数
+*/
+
+ali_mesh_encrypt_calc_random_data:
+	call ali_mesh_encrypt_calc_random_data_calc_ConfirmationKey
+	call ali_mesh_encrypt_calc_random_data_calc_AuthValueProv
+	call ali_mesh_encrypt_calc_random_data_calc_AuthValueDevice
+	call ali_mesh_encrypt_calc_random_data_calc_ConfirmationCloud
+	call ali_mesh_encrypt_calc_random_data_calc_ConfirmationDevice
+	branch ali_mesh_encrypt_calc_random_data_calc_DeviceKey
+
+//calc confirmation key
+//ConfirmationKey=SHA256(Random A||RandomB||"ConfirmationKey")[0:15]
+ali_mesh_encrypt_calc_random_data_calc_ConfirmationKey:
+	call ali_mesh_encrypt_load_randomAB_to_sha256
+	arg mem_mesh_sha256_ConfirmationKey_ascii,contr
+	arg 0xf,loopcnt
+	call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii
+	call ali_mesh_encrypt_base_function_sha256_calc
+	arg memresult,contr
+	arg mem_mesh_Confirmationkey,contw
+	branch memcpy16
+
+
+//calc Auth value prov
+//AuthValueProv = SHA256(PID,MAC,Secret,random B||random A)[0:15]
+ali_mesh_encrypt_calc_random_data_calc_AuthValueProv:
+	call ali_mesh_encrypt_load_three_tuple_to_sha256
+ifdef V1_2
+	call ali_mesh_encrypt_load_randomBA_to_sha256
+endif
+	call ali_mesh_encrypt_base_function_sha256_calc
+	arg memresult,contr
+	arg mem_mesh_AuthValueProv,contw
+	branch memcpy16
+
+//calc Auth Value Device
+//AuthValueDevice= SHA256(PID,MAC,Secret,random B||random A)[0:15]
+ali_mesh_encrypt_calc_random_data_calc_AuthValueDevice:
+	call ali_mesh_encrypt_load_three_tuple_to_sha256
+ifdef V1_2
+	call ali_mesh_encrypt_load_randomAB_to_sha256
+endif
+	call ali_mesh_encrypt_base_function_sha256_calc
+	arg memresult,contr
+	arg mem_mesh_AuthValueDevice,contw
+	branch memcpy16
+
+// calc Confirmation Cloud
+//Confirmation Cloud=AES-CMAC(Random B || Random A || AuthValueProv)
+//k=ConfirmationKey
+ali_mesh_encrypt_calc_random_data_calc_ConfirmationCloud:
+	fetch 8,mem_mesh_provisioning_random_A
+	store 8,mem_mesh_ConfirmationCloud_RandomA
+	fetch 8,mem_mesh_provisioning_random_B
+	store 8,mem_mesh_ConfirmationCloud_RandomB
+	
+	arg mem_mesh_calc_ConfirmationCloud_data,contr
+	arg mem_mesh_Confirmationkey,rega
+	arg mem_mesh_ConfirmationCloud,alarm
+	branch ali_mesh_encrypt_base_function_AES_CMAC_32Byte
+
+
+// calc confirmation Device
+//Confirmation Device=AES-CMAC(Random A || Random B || AuthValueDevice)
+//k=ConfirmationKey
+ali_mesh_encrypt_calc_random_data_calc_ConfirmationDevice:
+	arg mem_mesh_calc_ConfirmationDevice_data,contr
+	arg mem_mesh_Confirmationkey,rega
+	arg mem_mesh_ConfirmationDevice,alarm
+	branch ali_mesh_encrypt_base_function_AES_CMAC_32Byte
+
+
+//calc Device Key
+//DeviceKey = SHA256(ConfirmationCloud||"DeviceKey")[0:15]
+ali_mesh_encrypt_calc_random_data_calc_DeviceKey:
+	arg mem_mesh_ConfirmationCloud,contr
+	arg 0x10,loopcnt
+	call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii
+	arg mem_mesh_sha256_DeviceKey_ascii,contr
+	arg 9,loopcnt
+	call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii
+	call ali_mesh_encrypt_base_function_sha256_calc
+	arg memresult,contr
+	arg mem_mesh_Device_Key,contw
+	branch memcpy16
+
+
+ali_mesh_encrypt_load_randomBA_to_sha256:
+	call ali_mesh_encrypt_load_randomB_to_sha256
+ali_mesh_encrypt_load_randomA_to_sha256:
+	arg mem_mesh_provisioning_random_A,contr
+	branch ali_mesh_encrypt_base_function_sha256_load_data_64bit
+
+ali_mesh_encrypt_load_randomAB_to_sha256:
+	call ali_mesh_encrypt_load_randomA_to_sha256
+ali_mesh_encrypt_load_randomB_to_sha256:
+	arg mem_mesh_provisioning_random_B,contr
+	branch ali_mesh_encrypt_base_function_sha256_load_data_64bit
+
+
+ali_mesh_encrypt_load_three_tuple_to_sha256:
+	arg mem_mesh_three_tuple_ProductID,contr
+	arg 4,loopcnt
+	call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma
+	arg mem_mesh_three_tuple_MAC,contr
+	arg 6,loopcnt
+	call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma
+	arg mem_mesh_three_tuple_secret,contr
+	arg 0x10,loopcnt
+ifdef V1_2
+	branch ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma
+else
+	branch ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii
+endif
+
+
+//calc provisioning data
+//Encrupted provisioning data = prov_data XOR SessionKey
+ali_mesh_encrypt_calc_provisioning_data:
+	call ali_mesh_encrypt_calc_provisioning_data_calc_SessionKey
+//	branch ali_mesh_encrypt_calc_provisioning_data_xor_prov_data
+ali_mesh_encrypt_calc_provisioning_data_xor_prov_data:
+	arg mem_mesh_Encrypt_Provisioning_Data,rega
+	arg memresult,regb
+	arg 0xb,loopcnt
+ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop:
+	ifetch 2,rega
+	ifetcht 2,regb
+	ixor temp,pdata
+	istore 2,rega
+	increase 2,rega
+	increase 2,regb
+	loop ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop
+	rtn
+
+
+//calc SessionKey
+//SessionKey = SHA256(ConfirmationCloud||"SessionKey")[0:15]
+//output:sessionKey in memresult
+ali_mesh_encrypt_calc_provisioning_data_calc_SessionKey:
+	arg mem_mesh_ConfirmationCloud,contr
+	arg 0x10,loopcnt
+	call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii
+	arg mem_mesh_sha256_SessionKey_ascii,contr
+	arg 0xa,loopcnt
+	call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii
+	branch ali_mesh_encrypt_base_function_sha256_calc
+
+
+
+ali_mesh_encrypt_calc_network_key_by_k2:
+	arg mem_mesh_Network_Key,contr
+	arg mem_k2_N,contw
+	call memcpy16
+
+/************k2 function*************/
+//input:mem_k2_N N data
+ali_mesh_encrypt_base_function_k2:
+/*******************generate T*************************/
+	arg mem_k2_N,contr
+	arg mem_k2_SALT,rega
+	arg mem_k2_T,alarm
+	call ali_mesh_encrypt_base_function_AES_CMAC_16Byte
+/*******************generate T1************************/
+	arg mem_k2_T1,alarm
+	arg 0x01,regb
+	setarg 0
+	call ali_mesh_encrypt_base_function_k2_AES_CMAC_T
+	fetch 1,mem_k2_T1+15
+	and pdata,0x7f,pdata
+	store 1,mem_k2_NID
+/*******************generate T2************************/
+	arg mem_k2_T2,alarm
+	arg 0x02,regb
+	setarg 0x10
+	arg mem_k2_T1,rega
+	call ali_mesh_encrypt_base_function_k2_AES_CMAC_T
+/*******************generate T3************************/
+	arg mem_k2_T3,alarm
+	arg 0x03,regb
+	setarg 0x10
+	arg mem_k2_T2,rega
+	branch ali_mesh_encrypt_base_function_k2_AES_CMAC_T
+
+ali_mesh_encrypt_base_function_k4:
+/*******************generate T*************************/
+	arg mem_mesh_application_key,contr
+	arg mem_k4_SALT,rega
+	arg mem_k4_T,alarm
+	call ali_mesh_encrypt_base_function_AES_CMAC_16Byte
+	arg mem_k4_id6_01,contr
+	arg mem_k4_T,rega
+	arg mem_k4_k4N,alarm
+	setarg 4
+	call ali_mesh_encrypt_base_function_AES_CMAC
+	fetch 1,mem_k4_k4N+15
+	and pdata,0x3f,pdata
+	set1 TRANSPORT_HEAD_BIT_AKF,pdata
+	store 1,mem_mesh_transport_AID
+	rtn
+
+ali_mesh_encrypt_base_function_k3:
+/*******************generate T*************************/
+	arg mem_mesh_Network_Key,contr
+	arg mem_k3_SALT,rega
+	arg mem_k3_T,alarm
+	call ali_mesh_encrypt_base_function_AES_CMAC_16Byte
+	arg mem_k3_id64_01,contr
+	arg mem_k3_T,rega
+	arg mem_k3_k4N,alarm
+	setarg 5
+	call ali_mesh_encrypt_base_function_AES_CMAC
+
+	call ali_mesh_proxy_init_adv
+	
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_CONNECTED
+	jam 1,mem_le_adv_enable
+	rtn
+
+
+//********* network PDU header obfuscation *********//
+ali_mesh_encrypt_obfuscation_deceypt_send_message:
+	arg mem_mesh_send_upper_layer_CTL_and_TTL,rega
+	fetch 7,mem_mesh_send_upper_layer_DST	
+	branch ali_mesh_encrypt_obfuscation_deceypt
+ali_mesh_encrypt_obfuscation_deceypt_recevie_message:
+	arg mem_mesh_message_TTL,rega
+	fetch 7,mem_mesh_message_DST
+ali_mesh_encrypt_obfuscation_deceypt:
+	store 7,mem_mesh_Privacy_Plaintext_Privacy_Random
+	setarg 0
+	store 5,mem_mesh_Privacy_Plaintext_Zero_String
+	call ali_mesh_encrypt_generate_PECB
+	fetch 6,mem_mesh_PECB
+	ifetcht 6,rega
+	ixor temp,pdata
+	istore 6,rega
+	rtn
+
+ali_mesh_encrypt_generate_PECB:
+ali_mesh_encrypt_generate_privacy_random:
+	fetch 4,mem_mesh_IV_Index
+	store 4,mem_mesh_Privacy_Plaintext_IV_Index
+// generate PECB with AES-128/ function e
+ali_mesh_encrypt_base_function_generate_PECB:
+	arg mem_k2_PrivacyKey,contr
+	call load_key
+	arg mem_mesh_Privacy_Plaintext,contr
+	call load_data128
+	call do_aes_ocb
+	arg mem_mesh_PECB,contw
+	branch store_aes_result
+
+
+/************sha256 function*************/
+//input  : (big endian)
+// data addr : contr
+// point : call clear_sha256_chunk
+ali_mesh_encrypt_base_function_sha256_load_data_64bit:
+	arg 8,loopcnt
+//input  : (big endian)
+// data addr : contr
+// data len : loopcnt
+// point : call clear_sha256_chunk
+ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii:
+	call ali_mesh_encrypt_base_function_sha256_check_first_load_data
+	call ali_mesh_encrypt_base_function_hex2ascii
+	branch ali_mesh_encrypt_base_function_sha256_store_dataptr
+ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii:
+	call ali_mesh_encrypt_base_function_sha256_check_first_load_data
+	call memcpy
+	branch ali_mesh_encrypt_base_function_sha256_store_dataptr
+ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma:
+	call ali_mesh_encrypt_base_function_sha256_check_first_load_data
+	call ali_mesh_encrypt_base_function_hex2ascii
+	setarg COMMA
+	istore 1,contw
+ali_mesh_encrypt_base_function_sha256_store_dataptr:
+	copy contw,pdata
+	store 2,mem_mesh_sha256_data_end_addr
+	rtn
+ali_mesh_encrypt_base_function_sha256_check_first_load_data:
+	copy contr,temp
+	copy loopcnt,rega
+	fetch 2,mem_mesh_sha256_data_end_addr
+	copy pdata,contw
+	fetch 1,mem_mesh_sha256_load_first_data_flag
+	call ali_mesh_encrypt_base_function_sha256_first_load_data,blank
+	copy temp,contr
+	copy rega,loopcnt
+	rtn
+ali_mesh_encrypt_base_function_sha256_first_load_data:
+	jam 1,mem_mesh_sha256_load_first_data_flag
+	call ali_mesh_encrypt_base_function_sha256_clear_data_chunk				//初始化sha256
+	arg mem_mesh_sha256_chunk_start,contw
+	rtn
+
+ali_mesh_encrypt_base_function_sha256_clear_data_chunk:
+	arg 0x20,loopcnt
+	arg mem_mesh_sha256_chunk_start,contw
+	branch memset0
+
+ // output :
+ // sha256 result : memresult(big endian)
+ali_mesh_encrypt_base_function_sha256_calc:
+ 	call ali_mesh_encrypt_base_function_sha256_load_data_end
+ 	arg MESH_ENCRYPT_SHA256_FUNCTION_INPUT,regb
+	arg mem_mesh_sha256_chunk_start,rega
+	fetchr loopcnt,8,mem_mesh_sha256_data_len_byte
+	call logging_tx_debug
+	call ali_mesh_encrypt_base_function_sha256_input_data_init_inverse
+
+	setarg mem_mesh_sha256_chunk_start
+	store 2,mem_mesh_sha256_chunk_ptr
+	call sha_init
+ali_mesh_encrypt_base_function_sha256_calc_loop:
+	fetch 2,mem_mesh_sha256_chunk_ptr
+	copy pdata,contr
+	arg memdat,contw
+	call memcpy64
+	call sha
+	fetch 2,mem_mesh_sha256_chunk_ptr
+	pincrease 64
+	store 2,mem_mesh_sha256_chunk_ptr
+	fetch 1,mem_mesh_sha256_chunk_count
+	pincrease -1
+	store 1,mem_mesh_sha256_chunk_count
+	nbranch ali_mesh_encrypt_base_function_sha256_calc_loop,blank
+	call sha_result
+	arg memresult,rega
+	arg 0x20,loopcnt
+	call inverse_data
+ 	arg MESH_ENCRYPT_SHA256_FUNCTION_RESULT,regb
+	arg memresult,rega
+	arg 0x20,loopcnt
+	branch logging_tx_debug
+
+
+ali_mesh_encrypt_base_function_sha256_load_data_end:
+	jam 0,mem_mesh_sha256_load_first_data_flag
+	fetch 2,mem_mesh_sha256_data_end_addr
+	copy pdata,contw
+	arg 0x80,temp	//第一个bit补1，后面补0
+	istoret 1,contw
+	arg mem_mesh_sha256_chunk_start,temp
+	isub temp,pdata
+	store 8,mem_mesh_sha256_data_len_byte
+	//计算bit数
+	lshift3 pdata,temp
+	storet 8,mem_mesh_sha256_data_len_bit
+	rshift4 pdata,regc
+	rshift2 regc,regc
+	and pdata,0x3f,pdata
+	sub pdata,55,null
+//55-(len mod 63)<0,内存填充448以后的，需要填充到第二块
+	ncall ali_mesh_encrypt_base_function_sha256_add_chunk,positive
+	add regc,1,pdata
+	store 1,mem_mesh_sha256_chunk_count
+	mul32 pdata,64,rega		//计算块的数量地址
+	lshift4 pdata,regc			//计算4byte包的数量
+	increase -1,regc			//最好一个包长度不交换
+	setarg mem_mesh_sha256_chunk_start + DECREASED_FOUR
+	iadd rega,rega
+	fetch 4,mem_mesh_sha256_data_len_bit
+	istore 4,rega
+	rtn
+
+
+//增加块数量
+ali_mesh_encrypt_base_function_sha256_add_chunk:
+	increase 1,regc
+	rtn
+	
+ali_mesh_encrypt_base_function_sha256_input_data_init_inverse:
+	arg mem_mesh_sha256_chunk_start,rega
+
+//每4个字节，需要高低位交换一下
+//input :
+// data addr : rega
+ali_mesh_encrypt_base_function_sha256_data_inverse_4Byte:
+	arg 4,loopcnt
+	call inverse_data
+	increase 2,rega	//下一块
+	add regc,-1,regc
+	nbranch ali_mesh_encrypt_base_function_sha256_data_inverse_4Byte,zero
+	rtn
+
+
+// input : 
+// data ptr : contr
+// data save ptr : contw 
+// data len : loopcnt
+ali_mesh_encrypt_base_function_hex2ascii:
+	ifetch 1,contr
+	rshift4 pdata,temp
+	call ali_mesh_encrypt_base_function_dialog2uchar
+	istoret 1,contw
+	and pdata,0x0f,temp
+	call ali_mesh_encrypt_base_function_dialog2uchar
+	istoret 1,contw
+	loop ali_mesh_encrypt_base_function_hex2ascii
+	rtn
+ali_mesh_encrypt_base_function_dialog2uchar:
+	sub temp,9,null
+	branch ali_mesh_encrypt_base_function_dialog2uchar_num,positive
+	add temp,87,temp
+	rtn
+ali_mesh_encrypt_base_function_dialog2uchar_num:	
+	add temp,48,temp
+	rtn
+
+
+ali_mesh_encrypt_base_function_AES_CMAC_32Byte:
+	setarg 0x20 
+	branch ali_mesh_encrypt_base_function_AES_CMAC
+
+ali_mesh_encrypt_base_function_AES_CMAC_16Byte:
+	setarg 0x10
+	branch ali_mesh_encrypt_base_function_AES_CMAC
+
+
+//pdata:data length
+//regb:last data
+ali_mesh_encrypt_base_function_k2_AES_CMAC_T:
+	fetcht 1,mem_k2_P_len
+	increase 1,temp
+	iadd temp,temp
+	storet 1,mem_AES_CMAC_data_length
+	copy rega,contr
+	copy pdata,loopcnt
+	call memcpy_fast
+	fetcht 1,mem_k2_P_len
+	copy temp,loopcnt
+	call memcpy
+	copy regb,pdata
+	istore 1,contw
+	arg mem_k2_T,rega
+	branch ali_mesh_encrypt_base_function_AES_CMAC + 3
+
+
+//input:
+//pdata:data length
+//contr:data prt
+//rega:key ptr
+//output:
+//alarm:output prt
+ali_mesh_encrypt_base_function_AES_CMAC:
+	store 1,mem_AES_CMAC_data_length
+	copy pdata,loopcnt
+	call memcpy_fast
+	copy rega,contr
+	arg mem_AES_CMAC_k,contw
+	call memcpy16
+ 	arg MESH_ENCRYPT_AES_CMAC_FUNCTION_INPUT_M,regb
+	arg memdat,rega
+	fetchr loopcnt,1,mem_AES_CMAC_data_length
+	call logging_tx_debug
+ 	arg MESH_ENCRYPT_AES_CMAC_FUNCTION_INPUT_K,regb
+	arg mem_AES_CMAC_k,rega
+	arg 16,loopcnt
+	call logging_tx_debug
+	call function_AES_CMAC
+	copy alarm,contw
+	call store_aes_result
+ 	arg MESH_ENCRYPT_AES_CMAC_FUNCTION_RESULT,regb
+	copy alarm,rega
+	arg 16,loopcnt
+	branch logging_tx_debug
+
+
+//////**AES-CCM**////////
+ali_B0_block_generate:
+ 	fetcht 1,mem_ccm_type
+ 	branch  ali_block_generate
+ali_A_block_generate:
+	force 0x01,temp
+ali_block_generate:
+	force regidx_data,regext_index
+	fetch 2,mem_nonce_ptr
+	copy pdata,contr
+	ifetch 3,contr
+	lshift8 pdata,pdata
+	ior temp, regext
+	increase 1,regext_index
+	ifetch 4,contr
+	copy pdata,regext
+	increase 1,regext_index
+	ifetch 4,contr
+	copy pdata,regext
+	increase 1,regext_index
+	byteswap rega,regext
+	lshift16 regext,regext
+	ifetch 2,contr
+	ior regext,regext
+	rtn
+ali_generate_mic:
+	fetch 1,mem_ccm_data_len
+	copy pdata,rega
+	call ali_B0_block_generate
+	call do_aes_ocb
+	force regidx_result,regext_index
+	deposit regext
+	copy rega,loopcnt
+	fetcht 2,mem_ccm_data_ptr
+	copy temp,contr
+	call padding_data
+	branch generate_mic_loop
+/*
+function name:ali_CCM_encrypt
+input:pdata is the encrypt data length
+temp is encrypt data ptr
+*/
+ali_CCM_encrypt_64Bit:
+	jam MIC_SIZE_64BIT,mem_ccm_type
+	branch ali_CCM_encrypt_function
+ali_CCM_encrypt:
+	jam MIC_SIZE_32BIT,mem_ccm_type
+	branch ali_CCM_encrypt_function
+ali_CCM_encrypt_function:
+	store 1,mem_ccm_data_len
+	storet 2,mem_ccm_data_ptr
+	bpatchx patch3e_3,mem_patch3e
+	call ali_generate_mic
+	force regidx_xor,regext_index
+	iforce regext
+	force regidx_result+1,regext_index
+	copy regext,pdata
+	force regidx_xor+1,regext_index
+	iforce regext
+	force 0,rega
+	copy temp,regc
+	call ali_A_block_generate
+	call do_aes_ctr
+	call ali_fetcht_ccm_mic
+	storet 8,mem_ccm_mic
+	fetch 1,mem_ccm_data_len
+	copy pdata,regb
+	call ali_aes_crypt_data
+	fetcht 1,mem_ccm_data_len
+	fetch 2,mem_ccm_data_ptr
+	iadd temp,rega
+	fetcht 8,mem_ccm_mic
+	istoret 4,rega
+	fetch 1,mem_ccm_type
+	sub pdata,MIC_SIZE_32BIT,pdata
+	rtn blank
+	istoret 8,rega
+	rtn
+/*
+function name:ali_CCM_decrypt_function
+input:pdata is the encrypt data length
+temp is encrypt data ptr
+*/
+ali_CCM_decrypt_64Bit:
+	jam MIC_SIZE_64BIT,mem_ccm_type
+	branch ali_CCM_decrypt_function
+ali_CCM_decrypt:
+	jam MIC_SIZE_32BIT,mem_ccm_type
+	branch ali_CCM_decrypt_function
+ali_CCM_decrypt_function:
+	store 1,mem_ccm_data_len
+	storet 2,mem_ccm_data_ptr
+	copy temp,regc
+	copy pdata,regb
+	iadd regc,contr
+	bpatchx patch3e_4,mem_patch3e
+	ifetch 8,contr
+	force regidx_xor,regext_index
+	iforce regext
+	force regidx_xor+1,regext_index
+	rshift32 pdata,pdata
+	iforce regext
+	force 0,rega
+	call ali_A_block_generate
+	call do_aes_ctr
+	call ali_fetcht_ccm_mic
+	storet 8,mem_ccm_mic
+	call ali_aes_crypt_data
+	call ali_generate_mic
+	call ali_fetcht_ccm_mic
+	fetch 1,mem_ccm_type
+	beq MIC_SIZE_64BIT,ali_CCM_decrypt_function_check_mic64
+	storet 4,mem_ccm_mic+4
+	fetch 4,mem_ccm_mic
+	fetcht 4,mem_ccm_mic+4
+	isub temp,pdata
+	rtn
+
+ali_CCM_decrypt_function_check_mic64:
+	fetch 8,mem_ccm_mic
+	isub temp,pdata
+	rtn
+
+ali_fetcht_ccm_mic:
+	force regidx_result,regext_index
+	deposit regext
+	force regidx_result+1,regext_index
+	copy regext,temp
+	lshift16 temp,temp
+	lshift16 temp,temp
+	ior temp,temp
+   	rtn
+ali_aes_crypt_data: 
+	increase 1,rega
+	call ali_A_block_generate
+	copy regc,contr
+	call aes_load_xor
+	call do_aes_ctr
+	call store_enc_data
+	increase 16,regc
+	increase -16,regb
+	branch ali_aes_crypt_data,positive
+	rtn
+//////**AES-CCM**////////
+
+
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_fast_pairing.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_fast_pairing.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_fast_pairing.prog	(working copy)
@@ -0,0 +1,530 @@
+
+
+/*
+	阿里极速配网协议配网阶段包的解析与组包
+*/
+
+
+/*
+	function name mesh_send_Unprovisioned_Beacons
+	input:three tuple data 
+	mem_mesh_three_tuple_ProductID
+	mem_mesh_three_tuple_MAC
+	mem_mesh_three_tuple_secret
+*/
+mesh_send_Unprovisioned_Beacons:
+	jam UNPROVISIONED_BEACON_STATUS,mem_mesh_provisioned_flag
+	jam 0x00,mem_mesh_Provisioning_State_Flag
+	jam 1,mem_mesh_advertising_unprovisioned_device_beacon_switch
+	setarg ADV_UNPROVISIONED_DEVICE_BEACON_TIMEOUT
+	store 2, mem_mesh_advertising_unprovisioned_device_beacon_timer
+	rtn
+
+//初始化UUID 三元组参数和feature Flag
+ali_mesh_config_device_uuid_by_three_tuple:
+	setarg COMPANY_IDENTIFIERS_ALIBABA
+	store 2,mem_mesh_Device_UUID
+	fetch 1,mem_mesh_Device_PID
+	istore 1,contw
+	fetch 4,mem_mesh_three_tuple_ProductID
+	call inverse_data_4Byte
+	istore 4,contw
+	fetch 6,mem_le_lap
+	istore 6,contw
+	fetch 3,mem_mesh_UUID_FeatureFlag
+	istore 3,contw
+	rtn
+
+ali_mesh_send_Unprovisioned_Beacons_tmall:
+	call ali_mesh_init_adv_data_tmall_Unprovisioned_beacons_package
+	branch mesh_le_send_adv
+
+ali_mesh_init_adv_data_tmall_Unprovisioned_beacons_package:
+//mem Beacon Tmall Length
+	jam 0x15,mem_mesh_adv_data_len
+	setarg 0x14
+	store 1,mem_mesh_adv_data
+	setarg GAP_ADTYPE_MESH_BEACON
+	istore 1,contw
+	setarg UNPROVISIONED_DEVICE_BEACON
+	istore 1,contw
+ali_mesh_advertising_send_Unprovisioned_Beacons_store_device_uuid:
+	arg mem_mesh_Device_UUID,contr
+	call memcpy16
+	fetch 2,mem_mesh_OOB_information
+	istore 2,contw
+	rtn
+
+
+ali_mesh_advertising_send_Unprovisioned_Beacons_Gatt:
+	fetch 1,mem_mesh_core_feature
+	rtnbit1 MESH_FEATURE_DISABLE_APP_PAIRING
+	call ali_mesh_init_adv_data_gatt_Unprovisioned_beacons_package
+	branch mesh_le_send_adv
+
+ali_mesh_init_adv_data_gatt_Unprovisioned_beacons_package:
+	jam 0x1d,mem_mesh_adv_data_len
+	call ali_mesh_advertising_add_adtype_flags
+	call ali_mesh_advertising_add_adtype_16bit_complete
+	call ali_mesh_advertising_add_adtype_service_data
+	branch ali_mesh_advertising_send_Unprovisioned_Beacons_store_device_uuid
+
+//input:temp is uuid MESH_PROVISIONING_UUID
+ali_mesh_advertising_add_adtype_service_data:
+	setarg 0x15
+	istore 1,contw
+	setarg GAP_ADTYPE_SERVICE_DATA
+	istore 1,contw
+	istoret 2,contw
+	rtn
+
+/*
+
+input:
+	temp is len
+	contr is read ptr
+*/
+
+ali_mesh_receive_adtype_manufacturer_specific:
+	add temp,-1,loopcnt
+	call ali_mesh_receive_provisioning_package_check_header
+	nrtn user
+	ifetch 1,contr	//provisioning type
+	beq PROVISIONING_RANDOM,ali_mesh_advertising_receive_Privisioning_Random
+	beq PROVISIONING_DATA,ali_mesh_advertising_receive_Privisioning_Data
+	beq PROVISIONING_IOS_DATA,ali_mesh_advertising_receive_Privisioning_ios_Data
+	rtn
+
+
+//receive provisioning random
+ali_mesh_advertising_receive_Privisioning_Random:
+	call ali_mesh_advertising_receive_Privisioning_Random_check_states
+	nrtn user
+ali_mesh_advertising_calc_encrypt_random_data:
+	call ali_mesh_encrypt_calc_random_data
+//	call mesh_reset_adv_timer
+	call ali_mesh_advertising_send_Provisioning_Confirmation
+	branch loggint_tx_info_send_confirmation_packet
+//send provisioning confirmation
+ali_mesh_advertising_send_Provisioning_Confirmation:
+	arg PROVISIONING_PACKET_CONFIRMATION_MAC+PROVISIONING_PACKET_CONFIRMATION_DEVICE,temp
+	call ali_mesh_advertising_send_packet_common
+	setarg PROVISIONING_CONFIRMATION
+	istore 1,contw
+	fetch 2,mem_mesh_three_tuple_MAC+4
+	istore 2,contw
+	arg mem_mesh_ConfirmationDevice,contr
+	branch memcpy16
+
+//output:disable user mean is cannot true package
+ali_mesh_advertising_receive_Privisioning_Random_check_states:
+	call disable_user
+	ifetcht 2,contr
+	arg mem_mesh_provisioning_random_A,contw
+	call memcpy16
+	fetch 2,mem_mesh_three_tuple_MAC+4
+	isub temp,null
+	nrtn zero									//MAC地址不对
+
+	//ios APP 配网会先发送config
+//	fetch 1,mem_mesh_provisioned_flag
+//	rtnne UNPROVISIONED_BEACON_STATUS	//不处于静默广播状态
+		
+	fetch 1,mem_mesh_Provisioning_State_Flag
+	rtnbit1 RECEIVE_PROVISIONING_RANDOM
+	set1 RECEIVE_PROVISIONING_RANDOM,pdata			// FLAG bit1:Provisioning Confirmation
+	store 1,mem_mesh_Provisioning_State_Flag
+
+	jam PAIRING_STATUS,mem_mesh_provisioned_flag		//
+
+	call loggint_tx_info_receive_random_packet
+	branch enable_user
+
+//receive provisioning data
+ali_mesh_advertising_receive_Privisioning_Data:
+	copy contr,rega
+	fetch 1,mem_mesh_provisioned_flag
+	rtneq PAIRED_STATUS	//不处于已配网状态
+	fetch 1,mem_mesh_Provisioning_State_Flag
+	rtnbit0 RECEIVE_PROVISIONING_RANDOM
+	rtnbit1 RECEIVE_PROVISIONING_DATA
+	copy rega,contr
+	arg 0x16,loopcnt
+	arg mem_mesh_Encrypt_Provisioning_Data,contw
+	call memcpy
+	//没有收到random，重复收到data
+	call ali_mesh_encrypt_calc_provisioning_data
+	
+	fetcht 2,mem_mesh_provisioning_data_Mac_addr
+	fetch 2,mem_mesh_three_tuple_MAC+4
+	isub temp,null
+	nrtn zero
+ali_mesh_resolve_Privisioning_Data_package:
+	call loggint_tx_info_receive_data_packet
+	fetch 1,mem_mesh_Provisioning_State_Flag
+	set1 RECEIVE_PROVISIONING_DATA,pdata
+	store 1,mem_mesh_Provisioning_State_Flag
+
+	call ali_mesh_encrypt_calc_network_key_by_k2
+
+	fetch 1,mem_mesh_last_IV_Index_byte
+	store 1,mem_mesh_IV_Index+3
+	call ali_mesh_advertising_send_Provisioning_Complete
+	branch loggint_tx_info_send_complete_packet
+
+
+//send provisioning complete
+ali_mesh_advertising_send_Provisioning_Complete:
+	arg PROVISIONING_PACKET_COMPLETE_MAC,temp
+	call ali_mesh_advertising_send_packet_common
+	setarg PROVISIONING_COMPLETE
+	istore 1, contw
+	fetch 6,mem_mesh_three_tuple_MAC
+	istore 6,contw
+	rtn
+
+ali_mesh_advertising_receive_Privisioning_ios_Data:
+	arg MAX_LENGTH_PRIVISIONING_CONTROL_MSG_ANDROID,regb
+	branch ali_mesh_resolve_app_control_msg_package
+
+//tmall send provisioning packet head
+//input:temp is data lenth,不包括type字节
+ali_mesh_advertising_send_packet_common:
+	bpatchx patch3e_5,mem_patch3e
+	call ali_mesh_advertising_reset_adv_timer
+	setarg 0x8fff		//about 11s
+	store 2,mem_mesh_send_packet_timeout
+	call ali_mesh_control_ble_advertising_on_advertising
+	add temp,PROVISIONING_PACKET_LENGTH_AD_TYPE_COMPANY_ID_VID_PROVISIONING_TYPE+PROVISIONING_PACKET_LENGTH_FLAGS,pdata
+	store 1,mem_mesh_adv_data_len
+	call ali_mesh_advertising_add_adtype_flags
+	add temp,PROVISIONING_PACKET_AD_TYPE_COMPANY_ID_VID_PROVISIONING_TYPE,pdata
+	istore 1,contw
+	setarg GAP_ADTYPE_MANUFACTURER_SPECIFIC
+	istore 1,contw
+	setarg COMPANY_IDENTIFIERS_ALIBABA
+	byteswap pdata,pdata
+	istore 2,contw
+	fetch 1,mem_mesh_receive_VID
+	istore 1,contw
+	rtn
+
+
+//压力测试时，成功率比较高的时间
+//mesh广播超时11s左右，一个包最多发送11s
+ali_mesh_advertising_timer:
+//未配网设备，不开启定时器
+	fetch 4,mem_mesh_adv_last_time
+	nbranch ali_mesh_advertising_check_adv_timer,blank
+	branch ali_mesh_advertising_reset_adv_timer
+
+/*
+	if(newTime - lastTime)>8fff(about 11s)
+		stop adv
+*/
+ali_mesh_advertising_check_adv_timer:
+	deposit clkn_bt
+	fetcht 4,mem_mesh_adv_last_time
+	isub temp,temp
+	fetch 2,mem_mesh_send_packet_timeout
+	isub temp,null
+	rtn positive
+ali_mesh_advertising_adv_timer_timeout:
+	call ali_mesh_control_ble_advertising_off_advertising
+	fetch 2,mem_mesh_cb_pairing_fail
+	branch callback_func
+ali_mesh_advertising_reset_adv_timer:
+	deposit  clkn_bt
+	store 4,mem_mesh_adv_last_time
+	rtn
+
+
+logging_tx_debug_receive_provisioning_packet:
+	add contr,-3,rega
+	arg MESH_RECEIVE_PROVISIONING_PACKET,regb
+	branch logging_tx_debug
+
+loggint_tx_info_receive_random_packet:
+	arg 1,loopcnt
+	arg MESH_RECEIVE_PROVISIONING_RANDOM_PACKET,regb
+	arg mem_mesh_Provisioning_State_Flag,rega
+	branch logging_tx_info
+
+loggint_tx_info_send_confirmation_packet:
+	fetchr loopcnt,1,mem_mesh_adv_data_len
+	arg MESH_SEND_PROVISIONING_CONFIRMATION_PACKET,regb
+	arg mem_mesh_adv_data,rega
+	branch logging_tx_info
+
+loggint_tx_info_receive_data_packet:
+	arg 1,loopcnt
+	arg MESH_RECEIVE_PROVISIONING_DATA_PACKET,regb
+	arg mem_mesh_Provisioning_State_Flag,rega
+	branch logging_tx_info
+
+
+loggint_tx_info_send_complete_packet:
+	fetchr loopcnt,1,mem_mesh_adv_data_len
+	arg MESH_SEND_PROVISIONING_COMPLETE_PACKET,regb
+	arg mem_mesh_adv_data,rega
+	branch logging_tx_info
+
+
+
+ali_mesh_receive_adtype_128bit_uuid_complete:
+	call ali_mesh_receive_adtype_128bit_uuid_complete_store_uuid
+	nrtn user		//check compand ID & VID
+	fetch 1,mem_mesh_receive_service_uuid_ios_data_provisioning_type
+	beq PROVISIONING_IOS_DATA,ali_mesh_ios_gatt_packet_parse_provisioning_app_control
+ali_mesh_ios_gatt_packet_pairing_type:
+	fetch 1,mem_mesh_provisioned_flag
+	rtneq PAIRED_STATUS		//pairing status
+	rtneq SILENCE_BEACON_STATUS	//silence beacon status
+	fetch 2,mem_mesh_receive_service_uuid_mac
+	fetcht 2,mem_mesh_three_tuple_MAC+4
+	isub temp,null
+	nrtn zero						//check Mac legel
+	arg mem_mesh_receive_service_uuid_msg_id,rega
+	arg MAX_LENGTH_PRIVISIONING_PAIRING_MSG_IOS,regb
+	call ali_mesh_app_control_package_check_integrity
+	rtn user
+	bpatchx patch3e_6,mem_patch3e
+	fetch 1,mem_mesh_receive_service_uuid_provisioning_type
+	beq PROVISIONING_RANDOM,ali_mesh_ios_gatt_packet_parse_provisioning_random
+	beq PROVISIONING_DATA,ali_mesh_ios_gatt_packet_parse_provisioning_data
+	beq PROVISIONING_CONFIG,ali_mesh_ios_gatt_packet_parse_provisioning_config
+	rtn
+
+
+ali_mesh_ios_gatt_packet_parse_provisioning_random:
+	fetch 2,mem_mesh_three_tuple_MAC+4
+	store 2,mem_mesh_gatt_package_receive_MAC
+	arg mem_mesh_gatt_package_receive_MAC,contr
+	branch ali_mesh_advertising_receive_Privisioning_Random
+
+
+ali_mesh_ios_gatt_packet_parse_provisioning_data:
+//后期看能不能复用优化代码
+	fetch 1,mem_mesh_provisioned_flag
+	rtneq PAIRED_STATUS	//不处于已配网状态	
+	fetch 1,mem_mesh_Provisioning_State_Flag
+	rtnbit0 RECEIVE_PROVISIONING_RANDOM
+	rtnbit1 RECEIVE_PROVISIONING_DATA
+	arg mem_mesh_gatt_package_receive_msg_payload,contr
+	arg 0x14,loopcnt
+	arg mem_mesh_KeyFresh_and_Update_flag,contw
+	call memcpy
+	call ali_mesh_encrypt_calc_provisioning_data_calc_SessionKey
+	arg mem_mesh_KeyFresh_and_Update_flag,rega
+	arg memresult,regb
+	arg 0x0a,loopcnt
+	call ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop
+	branch ali_mesh_resolve_Privisioning_Data_package
+
+
+ali_mesh_ios_gatt_packet_parse_provisioning_config:
+	fetch 1,mem_mesh_provisioned_flag
+	rtnne UNPROVISIONED_BEACON_STATUS
+	jam PAIRING_STATUS,mem_mesh_provisioned_flag
+
+ali_mesh_ios_gatt_packet_send_provisioning_config_ack:
+	arg PROVISIONING_CONFIG_ACK_MAC+PROVISIONING_CONFIG_ACK_FIELD,temp
+	call ali_mesh_advertising_send_packet_common
+	setarg PROVISIONING_CONFIG_ACK
+	istore 1,contw
+	fetch 2,mem_mesh_three_tuple_MAC+4
+	istore 2,contw
+	setarg PROVISIONING_CONFIG_ACK_NOTE
+	istore 1,contw
+	rtn
+
+ali_mesh_ios_gatt_packet_parse_provisioning_app_control:
+//	fetch 1,mem_mesh_provisioned_flag
+//	rtnne PAIRED_STATUS		//not pairing status
+	arg mem_mesh_receive_service_uuid_ios_data_NID,contr
+	arg MAX_LENGTH_PRIVISIONING_CONTROL_MSG_IOS,regb
+ali_mesh_resolve_app_control_msg_package:
+	bpatchx patch3e_7,mem_patch3e
+	ifetch 1,contr
+	copy contr,rega
+	fetcht 1,mem_k2_NID
+	isub temp,null
+	nrtn zero
+	call ali_mesh_advertising_reset_adv_timer				//接收到正确的APP包，reset timer
+	call ali_mesh_app_control_package_check_integrity
+	rtn user
+	jam MESH_MESSAGE_APP,mem_mesh_network_packet_type
+	fetcht 1,mem_mesh_gatt_package_receive_msg_total_length
+	increase 1,temp
+	arg mem_mesh_gatt_package_receive_msg_payload,contr
+	branch ali_mesh_network_layer_recevice_network_pdu
+
+
+ali_mesh_receive_adtype_128bit_uuid_complete_store_uuid:
+	arg mem_mesh_receive_service_uuid_company_id,contw
+	call memcpy16
+	arg mem_mesh_receive_service_uuid_company_id,rega
+	arg 16,loopcnt
+	call inverse_data
+	arg 16,loopcnt
+	arg mem_mesh_receive_service_uuid_company_id,contr
+	branch ali_mesh_receive_provisioning_package_check_header
+
+ali_mesh_receive_provisioning_package_check_header:
+	call disable_user
+	ifetcht 2,contr
+	setarg COMPANY_IDENTIFIERS_ALIBABA
+	byteswap pdata,pdata
+	isub temp,null
+	nrtn zero	//判断company id和VID是否正确
+	ifetch 1,contr
+	store 1,mem_mesh_receive_VID
+	call enable_user
+	branch logging_tx_debug_receive_provisioning_packet
+
+
+/*
+input:
+	regb max payload data size
+	rega is packet ptr
+output:
+	enable user is mean old packet
+	mem_mesh_fast_gatt_ios_msg_payload is output payload ptr
+*/
+ali_mesh_app_control_package_check_integrity:
+	bpatchx patch3f_0,mem_patch3f
+	call ali_mesh_app_control_package_check_MsgId_legal
+	branch ali_mesh_app_control_package_check_rev_complete
+
+
+ali_mesh_app_control_package_check_rev_complete:
+	add rega,GATT_PACKAGE_PACKAGE_NUM,contr
+	ifetcht 1,contr
+	rshift4 temp,pdata
+	beq 1,ali_mesh_gatt_package_check_integrity_unsegment
+ali_mesh_gatt_package_check_integrity_segment:
+	sub pdata,MAX_GATT_PACKAGE_NUM,null
+	nbranch enable_user,positive	//分段过多,包接收错误，不解析
+	copy pdata,loopcnt
+	call ali_mesh_gatt_package_check_integrity_segment_expect_package_num
+	and temp,0x0f,queue
+	isub queue,null		//是否为最后一包
+	call ali_mesh_gatt_package_check_integrity_segment_calc_total_length,zero
+	increase -1,queue
+	fetch 1,mem_mesh_gatt_package_receive_msg_num
+	qisolate1 pdata
+	branch enable_user,true		//小包重传
+	qset1 pdata
+	store 1,mem_mesh_gatt_package_receive_msg_num
+	add rega,GATT_PACKAGE_LENGTH,contr
+	ifetch 1,contr
+	copy pdata,loopcnt
+	copy regb,pdata
+	imul32 queue,pdata
+	arg mem_mesh_gatt_package_receive_msg_payload,contw
+	iadd contw,contw
+	call memcpy_fast
+	fetch 1,mem_mesh_gatt_package_receive_msg_num
+	isub regc,null
+	ncall enable_user,zero
+	nbranch ali_mesh_gatt_package_store_receive_msg_buffer,zero		//没有接收完整
+ali_mesh_gatt_package_check_integrity_segment_complete:
+	call ali_mesh_gatt_package_clear_receive_msg_buffer				//complete packet 
+	branch disable_user
+
+//计算包长度regb*(总包数-1)+最后一包长度
+ali_mesh_gatt_package_check_integrity_segment_calc_total_length:
+	pincrease -1
+	imul32 regb,pdata
+	add rega,GATT_PACKAGE_LENGTH,contr
+	ifetcht 1,contr
+	iadd temp,pdata
+	store 1,mem_mesh_gatt_package_receive_msg_total_length
+	rtn
+
+ali_mesh_gatt_package_check_integrity_segment_expect_package_num:
+	arg 0,regc
+ali_mesh_gatt_package_check_integrity_segment_expect_package_num_loop:
+	add loopcnt,-1,queue
+	qset1 regc
+	loop ali_mesh_gatt_package_check_integrity_segment_expect_package_num_loop
+	rtn
+
+
+ali_mesh_gatt_package_store_receive_msg_buffer:
+	fetch 2,mem_mesh_gatt_package_receive_msg_buffer_ptr
+	copy pdata,contw
+	arg mem_mesh_gatt_package_receive_msg_buffer_temp,contr
+	arg 33,loopcnt
+	branch memcpy_fast
+
+//单包不保存，每次上报接收到数据
+ali_mesh_gatt_package_check_integrity_unsegment:
+	ifetch 1,contr
+	copy pdata,loopcnt
+	store 1,mem_mesh_gatt_package_receive_msg_total_length
+	arg mem_mesh_gatt_package_receive_msg_payload,contw
+	call memcpy
+	branch disable_user
+
+
+//检测MSG ID是否合法
+ali_mesh_app_control_package_check_MsgId_legal:
+	jam GATT_RECEIVE_TIMEOUT,mem_mesh_gatt_receive_msg_timer
+	call ali_mesh_gatt_package_get_MsgId
+	//检查第一块buffer的id
+	fetcht 2,mem_mesh_gatt_packet_receive_msg_buffer1
+	isub temp,null
+	//与接收到的id相等
+	branch ali_mesh_gatt_package_load_receive_msg_buffer1,zero
+	sub temp,0,null
+	//id=0 意味为空
+	branch ali_mesh_gatt_package_load_receive_msg_buffer1,zero
+	//检查第二块buffer的id
+	fetcht 2,mem_mesh_gatt_packet_receive_msg_buffer2
+	isub temp,null
+	//与接收到的id相等
+	branch ali_mesh_gatt_package_load_receive_msg_buffer2,zero
+	sub temp,0,null
+	//id=0 意味为空
+	branch ali_mesh_gatt_package_load_receive_msg_buffer2,zero
+	//last package not receive complete, new package receive ,discard last package
+	call ali_mesh_gatt_package_clear_receive_msg_buffer
+	call ali_mesh_gatt_package_get_MsgId
+	branch ali_mesh_gatt_package_load_receive_msg_buffer1
+
+//if MsgId=0,set MsgId=0x100
+ali_mesh_gatt_package_get_MsgId:
+	ifetch 1,rega
+	rtn blank
+	set1 8,pdata
+	rtn
+
+ali_mesh_gatt_package_load_receive_msg_buffer1:
+	store 2,mem_mesh_gatt_packet_receive_msg_buffer1
+	setarg mem_mesh_gatt_packet_receive_msg_buffer1
+	branch ali_mesh_gatt_package_load_receive_msg_buffer
+ali_mesh_gatt_package_load_receive_msg_buffer2:
+	store 2,mem_mesh_gatt_packet_receive_msg_buffer2
+	setarg mem_mesh_gatt_packet_receive_msg_buffer2
+	branch ali_mesh_gatt_package_load_receive_msg_buffer
+ali_mesh_gatt_package_load_receive_msg_buffer:
+	store 2,mem_mesh_gatt_package_receive_msg_buffer_ptr
+	copy pdata,contr
+	arg mem_mesh_gatt_package_receive_msg_buffer_temp,contw
+	arg GATT_RECEIVE_MSG_BUFFER_SIZE,loopcnt
+	branch memcpy_fast
+
+
+ali_mesh_gatt_package_receive_timer:
+	arg mem_mesh_gatt_receive_msg_timer,regc
+	arg ali_mesh_gatt_package_clear_receive_msg_buffer, regb
+	branch timer_single_step
+
+ali_mesh_gatt_package_clear_receive_msg_buffer:
+	arg mem_mesh_gatt_packet_receive_msg_buffer1,contw
+	arg GATT_RECEIVE_MSG_BUFFER_SIZE+GATT_RECEIVE_MSG_BUFFER_SIZE,loopcnt
+	branch clear_mem
+
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_health_message.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_health_message.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_health_message.prog	(working copy)
@@ -0,0 +1,118 @@
+
+/*
+	mesh里面configuration和health指令的解析
+*/
+
+ali_mesh_access_layer_config_or_health_message_opcode:
+	fetch 1,mem_mesh_configuration_health_message_opcode
+	beq MESH_MESSAGE_OPCODE_CONFIG_NODE_RESET_NO_HEAD,ali_mesh_access_layer_config_or_health_message_opcode_node_reset
+	beq MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_ADD_NO_HEAD,ali_mesh_message_config_modle_subscription_add
+	beq MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_DELETE_NO_HEAD,ali_mesh_message_config_modle_subscription_delete
+	rtn
+
+
+ali_mesh_access_layer_config_or_health_message_opcode_node_reset:
+	call ali_mesh_access_layer_send_config_node_reset_status
+	fetch 2,mem_mesh_cb_receive_node_reset
+	branch callback_func
+ali_mesh_access_layer_send_config_node_reset_status:
+	setarg MESH_CONFIGURATION_AND_HEALTH_MESSAGE_OPCODE_HEADER
+	store 1,mem_mesh_access_layer_payload
+	setarg MESH_MESSAGE_OPCODE_CONFIG_NODE_RESET_STATUS_NO_HEAD
+	istore 1,contw
+	jam 2,mem_mesh_access_layer_payload_len
+	branch ali_mesh_upper_transport_layer_send_access_message
+
+
+ali_mesh_message_config_modle_subscription_add:
+	call ali_mesh_message_config_modle_subscription_status
+	fetch 2,mem_mesh_core_feature
+	rtnbit1 MESH_FEATURE_DISABLE_SUBSCRIPTION
+	call ali_mesh_message_config_modle_subscription_check_element
+	call ali_mesh_message_config_modle_subscription_add_value_address
+	fetch 2,mem_mesh_cb_subscriptuion_list_changed
+	branch callback_func
+
+	
+ali_mesh_message_config_modle_subscription_delete:
+	call ali_mesh_message_config_modle_subscription_status
+	fetch 2,mem_mesh_core_feature
+	rtnbit1 MESH_FEATURE_DISABLE_SUBSCRIPTION
+	call ali_mesh_message_config_modle_subscription_check_element
+	fetcht 2,mem_mesh_subscription_value_address
+	rshift8 temp,pdata
+	rshift4 pdata,pdata
+	beq 0x0c,ali_mesh_message_config_modle_subscription_delete_group_addr
+	call ali_mesh_message_config_modle_subscription_check_value_address
+	nrtn user
+	setarg 0
+	istore 2,rega
+	fetch 2,mem_mesh_cb_subscriptuion_list_changed
+	branch callback_func
+
+ali_mesh_message_config_modle_subscription_delete_group_addr:
+	setarg -1
+	istore SUBSCRIPTION_MAX_COUNT,rega
+	istore SUBSCRIPTION_MAX_COUNT,contw
+	fetch 2,mem_mesh_cb_subscriptuion_list_changed
+	branch callback_func
+
+ali_mesh_message_config_modle_subscription_check_value_address:
+	arg SUBSCRIPTION_MAX_COUNT,loopcnt
+ali_mesh_message_config_modle_subscription_check_value_address_loop:
+	ifetch 2,rega
+	arg 0xffff,regb
+	isub regb,null
+	branch enable_user,zero
+	isub temp,null
+	branch enable_user,zero
+ali_mesh_message_config_modle_subscription_check_value_address_loop_empty:
+	increase 2,rega
+	loop ali_mesh_message_config_modle_subscription_check_value_address_loop
+	call disable_user
+	rtn
+
+
+ali_mesh_message_config_modle_subscription_status:
+	setarg MESH_CONFIGURATION_AND_HEALTH_MESSAGE_OPCODE_HEADER
+	store 1,mem_mesh_access_layer_payload
+	setarg MESH_MESSAGE_OPCODE_CONFIG_MODEL_SUBSCRIPTION_STATUS_NO_HEAD
+	istore 1,contw
+	setarg MESH_SUCCESS
+	istore 1,contw
+	fetch 6,mem_mesh_subscription_element_address
+	istore 6,contw
+	jam 9,mem_mesh_access_layer_payload_len
+	branch ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer
+
+ali_mesh_message_config_modle_subscription_check_element:
+	call mesh_get_element_info_config
+	add rega,ELEMENT_DEVICE_SUBSCRIPTION_LABEL,rega
+	fetch 2,mem_mesh_subscription_element_address
+	fetcht 2,mem_mesh_Unicast_Address
+	byteswap temp,temp
+	isub temp,pdata
+	imul32 regb,pdata
+	iadd rega,rega
+	rtn
+
+ali_mesh_message_config_modle_subscription_add_value_address:
+	fetcht 2,mem_mesh_subscription_value_address
+	arg SUBSCRIPTION_MAX_COUNT,loopcnt
+ali_mesh_message_config_modle_subscription_add_value_address_loop:
+	ifetch 2,rega
+	branch ali_mesh_message_config_modle_subscription_add_value_address_in,blank
+	arg 0xffff,regb
+	isub regb,null
+	branch ali_mesh_message_config_modle_subscription_add_value_address_in,zero
+	increase 2,rega
+	loop ali_mesh_message_config_modle_subscription_add_value_address_loop
+	rtn
+
+ali_mesh_message_config_modle_subscription_add_value_address_in:
+	byteswap temp,temp	//地址高低位交换后存入eeprom
+	istoret 2,rega
+	rtn
+
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_init_function.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_init_function.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_init_function.prog	(working copy)
@@ -0,0 +1,108 @@
+
+/*
+	mesh init 函数操作
+*/
+ali_mesh_init:
+	call init_memp
+
+	setarg mesh_check_ble_rx_packet
+	store 2,mem_mesh_cb_receive_advertising
+
+	setarg mesh_idle_process
+	store 2,mem_cb_idle_process
+
+	setarg ali_mesh_network_layer_relay_access_message
+	store 2,mem_mesh_cb_network_relay
+
+	setarg mesh_receive_config_appkey_add_cb
+	store 2,mem_mesh_cb_receive_config_appkey_add
+
+	setarg mesh_store_new_subscriptuion_list_data
+	store 2,mem_mesh_cb_subscriptuion_list_changed
+
+	setarg mesh_store_new_seq_data
+	store 2,mem_mesh_cb_seq_changed
+
+	setarg mesh_cb_event_timer
+	store 2,mem_cb_event_timer
+
+	setarg ali_mesh_access_layer_check_access_message_opcode
+	store 2,mem_mesh_cb_receive_access_message
+
+	setarg mesh_le_wait_adv_cb
+	store 2,mem_mesh_scan_selete_next_ch
+
+	setarg mesh_le_receive_data
+	store 2,mem_cb_att_write
+
+	setarg ali_mesh_proxy_process_bb_event
+	store 2,mem_cb_bb_event_process
+
+	jam 36,mem_mesh_adv_scan_channel
+	call ali_mesh_ali_vendor_message_indication_info_reset_tid
+
+	bpatchx patch3f_1,mem_patch3f
+	call mesh_uart_init
+	call mesh_iic_init
+	arg mem_mesh_Network_Key,rega
+	arg MESH_CODE_INIT,regb
+	arg 1,loopcnt
+	call logging_tx_info
+
+	call ali_mesh_chip_peripherals_load_data_from_eep
+	call mesh_inverse_three_tuple_MAC
+	fetch 1,mem_mesh_Network_Key
+	beq 0xff,mesh_send_Unprovisioned_Beacons
+
+	call ali_mesh_encrypt_base_function_k3
+	call ali_mesh_encrypt_base_function_k4
+	call ali_mesh_encrypt_calc_network_key_by_k2
+	branch ali_mesh_ali_vendor_message_opcode_device_power_on
+
+
+mesh_inverse_three_tuple_MAC:
+	fetch 6,mem_mesh_three_tuple_MAC
+	call inverse_data_6Byte
+	store 6,mem_le_lap
+	rtn
+
+mesh_get_element_info_config:
+	fetchr loopcnt,1,mem_mesh_element_number
+	fetchr rega,2,mem_mesh_element_device_ptr
+	fetchr regb,2,mem_mesh_element_device_length
+	rtn
+
+
+mesh_idle_process:
+	call ali_mesh_time_function
+	call ali_mesh_control_ble_adv_process
+	call ali_mesh_upper_transport_layer_control_packet
+	call ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue
+	branch mesh_receive_advertising
+
+
+mesh_cb_event_timer:
+	call ali_mesh_control_ble_adv_timer_process
+	branch ali_mesh_gatt_package_receive_timer
+
+
+ali_mesh_check_all_element_info:
+	call mesh_get_element_info_config
+ali_mesh_check_all_element_info_loop:
+	call ali_mesh_more_element_push_stack
+	copy regc,pdata
+	call callback_func
+	call ali_mesh_more_element_pop_stack
+	copy regb,pdata
+	iadd rega,rega
+	loop ali_mesh_check_all_element_info_loop
+	rtn
+
+
+mesh_iic_init:
+//	jam 0,0x8081
+	jam gpcfg_output_high,core_gpio_conf+2
+	jam gpcfg_iic_scl|gpcfg_pullup,core_gpio_conf+1
+	jam gpcfg_iic_sda|gpcfg_pullup,core_gpio_conf+0
+	branch clear_eeprom_size_2k
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_lower_transport_layer.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_lower_transport_layer.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_lower_transport_layer.prog	(working copy)
@@ -0,0 +1,150 @@
+/*
+	mesh中接收到lower transport包判断
+	是Unsegmented包，直接上传到upper transport layer
+	是Segmented包，重组后上传到upper transport layer
+*/
+
+ali_mesh_lower_transport_layer_receive_lower_transport_PDU:
+	bpatchx patch3f_2,mem_patch3f
+	fetch 1,mem_mesh_message_Transport_Head
+	bbit1 TRANSPORT_HEAD_BIT_SEG,ali_mesh_lower_transport_layer_receive_lower_transport_PDU_segmented_message
+	jam 0,mem_mesh_ASZMIC
+	branch ali_mesh_upper_transport_layer_receive_unsegmented_access_message
+
+//segmented message reassembly
+ali_mesh_lower_transport_layer_receive_lower_transport_PDU_segmented_message:
+	call ali_mesh_lower_transport_layer_receive_SegAccMess_resolve_SZMIC_SeqZero_SegON
+	rtn user
+	call ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockAck
+	rtn user
+	call ali_mesh_lower_transport_layer_receive_segmented_access_message_store_segment
+	branch ali_mesh_lower_transport_layer_receive_segmented_access_message_decrypt_segment
+
+//提取SZMIC/SeqZero/SegO/SegN
+//分别存储到SZMIC、SegO、SegN、SeqZero
+ali_mesh_lower_transport_layer_receive_SegAccMess_resolve_SZMIC_SeqZero_SegON:
+	call disable_user
+	arg 3,loopcnt
+	arg mem_mesh_message_segment_access_SZMIC_SeqZero_SegO_SegN,rega
+	call inverse_data
+	fetchr rega, 3,mem_mesh_message_segment_access_SZMIC_SeqZero_SegO_SegN
+	and rega,0x1f,temp
+	storet 1,mem_mesh_segmented_access_message_SegN
+	fetch 1, mem_mesh_segmented_access_message_SegN_upper_limit
+	isub temp, null
+	nbranch enable_user, positive
+	
+	rshift4 rega,pdata
+	rshift pdata,pdata
+	and pdata,0x1f,temp
+	storet 1,mem_mesh_segmented_access_message_SegO
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	arg 0x1fff,rega
+	iand rega,temp
+	copy pdata,regb
+	fetch 2,mem_mesh_segmented_access_message_SeqZero
+	isub temp,null
+	ncall ali_mesh_lower_transport_layer_receive_segmented_access_message_recover_SeqZero,zero
+	storet 2,mem_mesh_segmented_access_message_SeqZero
+	rshift8 regb,pdata
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	store 1,mem_mesh_segmented_access_message_SZMIC
+	store 1,mem_mesh_ASZMIC
+	rtn
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_recover_SeqZero:
+	setarg 0
+	store 4,mem_mesh_segmented_access_message_BlockAck
+	jam 0,mem_mesh_segmented_access_message_current_length
+	rtn
+
+
+//检查blockAck标志,返回值mem_mesh_segmented_access_message_receive_finish
+//1表示收到成功
+ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockAck:
+	call disable_user
+	fetch 1,mem_mesh_segmented_access_message_SegO
+	copy pdata,queue
+	fetch 4,mem_mesh_segmented_access_message_BlockAck
+	qisolate1 pdata
+	branch enable_user,true
+	qset1 pdata
+	store 4,mem_mesh_segmented_access_message_BlockAck
+	fetcht 1,mem_mesh_segmented_access_message_SegN
+	add temp,1,loopcnt
+ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockAck_loop:
+	add loopcnt,-1,queue
+	qisolate1 pdata
+	nrtn true
+	loop ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockAck_loop
+	jam 1,mem_mesh_segmented_access_message_receive_finish
+	rtn
+
+
+//存储segment m内容，放到mem_mesh_segmented_access_message_SegO
+ali_mesh_lower_transport_layer_receive_segmented_access_message_store_segment:
+	fetch 1,mem_mesh_message_Transport_NetMIC_length
+	pincrease -6	//DST(2) Head(1) SZMIC_SeqZero_SegO_SegN(3)
+	copy pdata,loopcnt 
+	fetcht 1,mem_mesh_segmented_access_message_current_length
+	iadd temp,temp
+	storet 1,mem_mesh_segmented_access_message_current_length
+	fetch 2, mem_mesh_segmented_access_message_Segment_ptr
+	iforce contw
+	fetch 1,mem_mesh_segmented_access_message_SegO
+	mul32 pdata,12,pdata
+	iadd contw,contw
+	arg mem_mesh_message_Transport_segmented_access_messagePDU_Segment,contr
+	branch memcpy
+
+//判断是否收完包，收完包，clear中间标志
+ali_mesh_lower_transport_layer_receive_segmented_access_message_decrypt_segment:
+	fetch 1,mem_mesh_segmented_access_message_receive_finish
+	rtneq 0
+	setarg 0
+	store 5,mem_mesh_segmented_access_message_BlockAck
+	fetcht 2,mem_mesh_message_SEQ+1
+	byteswap temp,temp
+	setarg 0xe000
+	iand temp,temp
+	fetch 2,mem_mesh_segmented_access_message_SeqZero
+	ior temp,pdata
+	byteswap pdata,pdata
+	store 2,mem_mesh_message_SEQ+1	//计算Application Nonce需要使用到初始的SEQ
+	branch ali_mesh_upper_transport_layer_receive_segmented_access_message
+
+
+/*
+	mesh中发送lower transport layer判断
+	是Unsegmented message，直接下发到network transport layer
+//	是Segmented message，拆分后上传到network transport layer
+*/
+//Unsegmented access message写入SEG、AKF、AID
+ali_mesh_lower_transport_layer_send_unsegmented_access_message:
+	fetch 1,mem_mesh_upper_transport_layer_payload_len
+	add pdata,1,temp
+	copy pdata,loopcnt
+	storet 1,mem_mesh_lower_transport_layer_payload_len
+	fetch 1,mem_mesh_message_Transport_Head
+	set0 TRANSPORT_HEAD_BIT_SEG,pdata
+	store 1,mem_mesh_unsegmented_access_lower_transport_layer_head
+	arg mem_mesh_access_layer_payload,contr
+	call memcpy_fast
+	branch ali_mesh_network_layer_send_access_message
+
+//segmented access message写入SEG、AKF、AID
+//input:rega is current segment payload length
+//contr is current segment payload ptr
+ali_mesh_lower_transport_layer_send_segmented_access_message:
+	add rega,4,temp
+	copy rega,loopcnt
+	storet 1,mem_mesh_lower_transport_layer_payload_len
+	arg mem_mesh_segmented_access_lower_transport_layer_parameters,contw
+	call memcpy_fast
+	fetch 1,mem_mesh_message_Transport_Head
+	set1 TRANSPORT_HEAD_BIT_SEG,pdata
+	store 1,mem_mesh_segmented_access_lower_transport_layer_head
+	branch ali_mesh_network_layer_send_access_message
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_model_layer.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_model_layer.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_model_layer.prog	(working copy)
@@ -0,0 +1,136 @@
+
+
+/*
+	mesh model层指令解析总函数
+*/
+
+ali_mesh_model_layer_check_model_message_opcode:
+	fetch 1,mem_mesh_module_message_opcode
+ali_mesh_model_layer_check_generic_OnOff_message_opcde:
+	beq MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONOFF_GET_NO_HEAD,ali_mesh_model_layer_message_opcode_generic_onoff_get
+	beq MESH_MODULE_MESSAGE_OPCODE_GENERIC_ONOFF_SET_NO_HEAD,ali_mesh_model_layer_message_opcde_generic_onoff_set
+	beq MESH_MODULE_MESSAGE_OPCODE_SCENE_RECALL_NO_HEAD,ali_mesh_model_layer_message_opcde_scene_recall
+	beq MESH_MODULE_MESSAGE_OPCODE_LIGHT_LIGHTNESS_SET_NO_HEAD,ali_mesh_model_layer_message_opcde_light_lightness_set
+	beq MESH_MODULE_MESSAGE_OPCODE_LIGHT_CTL_SET_NO_HEAD,ali_mesh_model_layer_message_opcde_light_ctl_set
+	rtn
+
+
+ali_mesh_model_layer_message_opcode_generic_onoff_get:
+	arg ali_mesh_model_layer_message_opcode_generic_onoff_get_cb,regc
+	branch ali_mesh_more_element_check_element_address
+ali_mesh_model_layer_message_opcode_generic_onoff_get_cb:
+	//input queue is element number
+	//output pdata is element generic OnOff status
+	fetch 2,mem_mesh_cb_generic_onoff_get
+	call callback_func
+	store 1,mem_mesh_generic_onoff_set_payload_OnOff
+	branch ali_mesh_access_layer_send_generic_onoff_status
+
+
+ali_mesh_model_layer_message_opcde_generic_onoff_set:
+	arg ali_mesh_model_layer_message_opcde_generic_onoff_set_cb,regc
+	branch ali_mesh_more_element_check_element_address
+ali_mesh_model_layer_message_opcde_generic_onoff_set_cb:
+	call ali_mesh_access_layer_send_generic_onoff_status
+	fetch 2,mem_mesh_cb_generic_onoff_set
+	branch callback_func
+
+
+//模式设置
+ali_mesh_model_layer_message_opcde_scene_recall:
+	call ali_mesh_access_layer_send_scene_status
+	fetch 2,mem_mesh_cb_scene_recall
+	branch callback_func
+
+
+ali_mesh_model_layer_message_opcde_light_lightness_set:
+	fetch 2,mem_mesh_light_lightness_set_payload_lightness
+	call ali_mesh_model_layer_message_calc_lightness
+	store 1,mem_mesh_light_lightness_calc_lightness
+	call ali_mesh_access_layer_send_light_lightness_status
+	fetch 2,mem_mesh_cb_light_lightness_set
+	branch callback_func
+
+
+ali_mesh_model_layer_message_opcde_light_ctl_set:
+	fetch 2,mem_mesh_last_CTL_Temperature
+	fetcht 2,mem_mesh_CTL_Temperature
+	isub temp,null
+	rtn zero
+
+	fetch 2,mem_mesh_CTL_Temperature
+	call ali_mesh_model_layer_message_calc_temperature
+	store 1,mem_mesh_CTL_calc_temperature
+
+	fetch 2,mem_mesh_CTL_Temperature
+	store 2,mem_mesh_last_CTL_Temperature
+	fetch 2,mem_mesh_cb_light_lightness_get
+	call callback_func
+	storet 2,mem_mesh_CTL_Lightness
+	call ali_mesh_access_layer_send_light_ctl_stauts
+	fetch 2,mem_mesh_cb_light_ctl_set
+	branch callback_func
+
+
+//input: pdata is lightness set by ali
+//output: pdata is lightness 0-100
+ali_mesh_model_layer_message_calc_lightness:
+	rtn blank
+	mul32 pdata,ALI_MESH_LIGHTNESS_LEVEL,pdata
+	arg ALI_MESH_LIGHTNESS_MAX,temp
+	idiv temp
+	call wait_div_end
+	remainder temp
+	rshift8 temp,temp
+	quotient pdata
+	sub temp,0xff,null
+	nrtn zero
+	pincrease 1
+	rtn
+
+
+//input: temp is lightness 0-100
+//output: temp is lightness set by ali
+ali_mesh_model_layer_message_calc_actual_lightness:
+	arg ALI_MESH_LIGHTNESS_MAX,pdata
+	imul32 temp,pdata
+	div pdata,ALI_MESH_LIGHTNESS_LEVEL
+	call wait_div_end
+	quotient temp
+	rtn
+
+//input: pdata is temperature set by ali
+//output: pdata is temperature 0-100
+ali_mesh_model_layer_message_calc_temperature:
+	arg ALI_MESH_TEMPERATURE_MIN,temp
+	isub temp,rega
+	call ali_mesh_model_layer_message_calc_temperature_k
+	copy rega,pdata
+	idiv temp
+	call wait_div_end
+	quotient pdata
+	rtn
+
+
+//input: temp is temperature 0-100
+//output: temp is temperature set by ali
+ali_mesh_model_layer_message_calc_actual_temperature:
+	copy temp,rega
+	call ali_mesh_model_layer_message_calc_temperature_k
+	copy rega,pdata
+	imul32 temp,pdata
+	arg ALI_MESH_TEMPERATURE_MIN,temp
+	iadd temp,temp
+	rtn
+
+ali_mesh_model_layer_message_calc_temperature_k:
+	setarg ALI_MESH_TEMPERATURE_MAX
+	arg ALI_MESH_TEMPERATURE_MIN,temp
+	isub temp,pdata
+	div pdata,ALI_MESH_TEMPERATURE_LEVEL
+	call wait_div_end
+	quotient temp
+	rtn
+
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_more_element_check.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_more_element_check.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_more_element_check.prog	(working copy)
@@ -0,0 +1,138 @@
+
+/*
+	多元素设置，检查是否发送给子元素的信息
+	输入:
+		temp is 包的DST地址
+*/
+ali_mesh_more_element_check_unicast_address:
+	arg 0,queue
+	fetchr loopcnt,1,mem_mesh_element_number
+	call disable_user
+	fetch 2,mem_mesh_Unicast_Address
+ali_mesh_more_element_check_unicast_address_loop:
+	isub temp,null
+	branch ali_mesh_more_element_found_unicast_address_element,zero
+	byteswap pdata,pdata
+	pincrease 1
+	byteswap pdata,pdata
+	increase 1,queue
+	loop ali_mesh_more_element_check_unicast_address_loop
+	rtn
+
+ali_mesh_more_element_found_unicast_address_element:
+	jam 0,mem_mesh_receive_group_address
+	storer queue,1,mem_mesh_receive_element_number
+	call ali_mesh_more_element_calc_queue_address
+	branch enable_user
+
+
+/*
+	多元素设置，检查是否发送给子元素组播的信息
+	输入:
+		temp is 包的DST地址
+*/
+ali_mesh_more_element_check_group_address:
+	arg 0,queue
+	arg 0,regc
+	call mesh_get_element_info_config
+	call disable_user
+ali_mesh_more_element_check_group_address_loop:
+	fetch 2,mem_mesh_core_feature
+	bbit0 MESH_FEATURE_DISABLE_SUBSCRIPTION,ali_mesh_more_element_check_subscription_address
+	ifetch 2,rega
+	isub temp,null
+	call ali_mesh_more_element_found_group_address_element,zero
+ali_mesh_more_element_check_address_common:
+	copy regb,pdata
+	iadd rega,rega
+	increase 1,queue
+	loop ali_mesh_more_element_check_group_address_loop
+	copy regc,pdata
+	rtn blank
+	store 1,mem_mesh_receive_group_address
+	branch enable_user
+
+ali_mesh_more_element_found_group_address_element:
+	qset1 regc
+	rtn
+
+ali_mesh_more_element_check_subscription_address:
+	add rega,ELEMENT_DEVICE_SUBSCRIPTION_LABEL,contr
+	arg SUBSCRIPTION_MAX_COUNT,alarm
+ali_mesh_more_element_check_subscription_address_loop:
+	ifetch 2,contr
+	isub temp,null
+	branch ali_mesh_more_element_found_subscription_address_element,zero
+	increase -1,alarm
+	branch ali_mesh_more_element_check_address_common,zero
+	branch ali_mesh_more_element_check_subscription_address_loop
+
+ali_mesh_more_element_found_subscription_address_element:
+	call ali_mesh_more_element_found_group_address_element
+	branch ali_mesh_more_element_check_address_common
+
+/*
+	多元素设置，检查哪些元素需要执行的操作
+	输入:
+		regc:对应的回调
+*/
+ali_mesh_more_element_check_element_address:
+	arg 0,queue
+	fetch 1,mem_mesh_receive_group_address
+	branch ali_mesh_more_element_check_element_address_no_group_address,blank
+	copy pdata,regb
+	fetchr loopcnt,1,mem_mesh_element_number
+ali_mesh_more_element_check_element_address_loop:
+	storer queue,1,mem_mesh_receive_element_number
+
+	qisolate1 regb
+	call ali_mesh_more_element_check_element_address_no_group_address,true
+	fetchr queue,1,mem_mesh_receive_element_number
+	increase 1,queue
+	loop ali_mesh_more_element_check_element_address_loop
+	rtn
+
+ali_mesh_more_element_check_element_address_no_group_address:
+	call ali_mesh_more_element_push_stack
+	call ali_mesh_more_element_calc_queue_address
+	copy regc,pdata
+	call callback_func
+	branch ali_mesh_more_element_pop_stack
+
+ali_mesh_more_element_push_stack:
+	storer loopcnt,2,mem_mesh_loopcnt_tmep
+	storer rega,2,mem_mesh_rega_temp
+	storer regb,2,mem_mesh_regb_temp
+	storer regc,2,mem_mesh_regc_temp
+	rtn
+
+ali_mesh_more_element_pop_stack:
+	fetchr loopcnt,2,mem_mesh_loopcnt_tmep
+	fetchr rega,2,mem_mesh_rega_temp
+	fetchr regb,2,mem_mesh_regb_temp
+	fetchr regc,2,mem_mesh_regc_temp
+	rtn
+
+
+/*
+	多元素设置，计算队列的指令长度
+	输入:
+		queue当前数据编号
+*/
+ali_mesh_more_element_calc_queue_address:
+	bpatchx patch3f_3,mem_patch3f
+	fetch 2,mem_mesh_Unicast_Address
+	byteswap pdata,pdata
+	iadd queue,pdata
+	byteswap pdata,pdata
+	store 2,mem_mesh_send_message_SRC
+	call mesh_get_element_info_config
+	copy queue,pdata
+	imul32 regb,pdata
+	iadd rega,rega
+	add rega,ELEMENT_DEVICE_UPPER_QUEUE_PTR,contr
+	ifetch 2,contr
+	store,2,mem_queue_ptr
+	rtn
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_network_layer.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_network_layer.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_network_layer.prog	(working copy)
@@ -0,0 +1,294 @@
+
+/*
+	mesh协议中network layer
+	主要是负责mesh中Network PDU内容合法性和解密
+*/
+
+ali_mesh_receive_adtype_mesh_message:
+	jam MESH_MESSAGE_TMALL,mem_mesh_network_packet_type
+
+/*
+	mesh中接收到network包处理函数
+*/
+//contr is read ptr
+//input:temp is len
+ali_mesh_network_layer_recevice_network_pdu:
+	sub temp,MESH_NETWORK_PACKET_MIN_LENGTH,null
+	rtn positive	//过滤短包，包长度太短导致解析错误
+	sub temp,MESH_NETWORK_PACKET_MAX_LENGTH,null
+	nrtn positive	//过滤长包，包长度太长导致内存覆盖
+	bpatchx patch3f_4,mem_patch3f
+	call ali_mesh_network_store_in_mem
+ali_mesh_network_layer_recevice_network_pdu_check_NID:
+	call ali_mesh_network_layer_check_NID_IVI
+	nrtn user
+ali_mesh_network_layer_recevice_network_pdu_deceypt_obfuscation:
+	call ali_mesh_encrypt_obfuscation_deceypt_recevie_message
+	//fetch 1,mem_mesh_message_TTL
+	//rtnbit1 BIT_CTL
+//	fetch 1,mem_mesh_message_TTL
+//	nrtn blank
+ali_mesh_network_layer_recevice_network_pdu_decrypt_NetMIC32:
+	call ali_mesh_network_load_network_nonce_and_EncryptionKey
+	fetch 1,mem_mesh_message_Transport_NetMIC_length
+	arg mem_mesh_message_DST,temp
+	call ali_CCM_decrypt
+	nrtn zero	//NetMIC error
+
+
+ali_mesh_network_layer_recevice_network_pdu_check_DST:
+	bpatchx patch3f_5,mem_patch3f
+	fetcht 2,mem_mesh_message_DST
+	call ali_mesh_more_element_check_unicast_address	//检查所有子元素的单播地址
+	branch ali_mesh_network_layer_recevice_network_pdu_check_SRC_and_SEQ,user
+	arg 29,loopcnt
+	arg mem_mesh_message_NID_temp,contw
+	arg mem_mesh_message_NID,contr
+	call memcpy
+	call ali_mesh_network_layer_recevice_network_pdu_check_DST_group_address
+	arg 29,loopcnt
+	arg mem_mesh_message_NID_temp,contr
+	arg mem_mesh_message_NID,contw
+	call memcpy
+	fetch 2,mem_mesh_cb_network_relay
+	branch callback_func
+
+ali_mesh_network_layer_recevice_network_pdu_check_DST_group_address:
+	call ali_mesh_more_element_check_group_address	//检查所有子元素的组播地址
+	branch ali_mesh_network_layer_recevice_network_pdu_check_SRC_and_SEQ,user
+	jam 0xff,mem_mesh_receive_group_address
+	setarg GROUP_ADDRESS_0XCFFF_little_endian
+	isub temp,null	//DST==0xCFFF Tmall规定的灯model的组播地址2
+	branch ali_mesh_network_layer_recevice_network_pdu_check_SRC_and_SEQ,zero
+	setarg GROUP_ADDRESS_0XFFFF_little_endian
+	isub temp,null	//DST==0xCFFF Tmall规定的82 01指令的组播地址，在线检测
+	branch ali_mesh_network_layer_recevice_network_pdu_check_SRC_and_SEQ,zero
+	rtn
+
+
+ali_mesh_network_layer_check_NID_IVI:
+	call disable_user
+	fetcht 1,mem_mesh_message_NID
+	rshift4 temp,pdata
+	rshift3 pdata,pdata
+	fetchr rega,1,mem_mesh_IV_Index+3
+	and rega,0x01,rega
+	isub rega,null
+	nrtn zero
+	and temp,0x7f,temp
+	fetch 1,mem_k2_NID
+	isub temp,null
+	nrtn zero	//判断NID是否相等;相等说明是同一个网络的包
+	branch enable_user
+
+//检查SRC和SEQ存储cache，是否有当前SRC设备信息
+ali_mesh_network_layer_recevice_network_pdu_check_SRC_and_SEQ:
+	arg mem_mesh_TMALL_cache_start,rega
+	arg CACHE_SPACE_NUM,loopcnt
+ali_mesh_network_layer_raverse_SRC_SEQ_cache:
+	fetcht 2,mem_mesh_message_SRC
+	ifetch 2,rega
+//cache存在空的空间,将SRC、SEQ存储到这个空间
+	branch ali_mesh_network_layer_find_empty_space,blank
+	
+	isub temp,null
+//cache已经存有该SRC的信息，导出SEQ信息
+	branch ali_mesh_network_layer_find_SRC_space,zero
+	increase CACHE_SPACE_SIZE,rega
+	loop ali_mesh_network_layer_raverse_SRC_SEQ_cache
+	arg mem_mesh_TMALL_cache_start,rega
+
+ali_mesh_network_layer_find_empty_space:
+	istoret 2,rega
+ali_mesh_network_layer_find_SRC_space:
+	storet 2,mem_mesh_send_message_DST
+	//接收时的SRC是发送时候的DST
+	add rega,2,regc
+	ifetch 3,regc
+	store 3,mem_mesh_last_message_SEQ
+	branch ali_mesh_network_layer_recevice_network_pdu_check_SEQ_legal
+
+
+//检查SEQ的合法性，过滤重复包
+ali_mesh_network_layer_recevice_network_pdu_check_SEQ_legal:
+//check SEQ
+	call ali_mesh_inverse_SEQ
+	//高低位交换
+	fetch 3,mem_mesh_last_message_SEQ
+	fetcht 3,mem_mesh_message_SEQ
+	isub temp,null
+	rtn positive	//lastMessageSEQ-currMessageSEQ>=0,返回
+	istoret 3,regc	
+	call ali_mesh_inverse_SEQ	//application nonce和Device nonce都需要用到SEQ
+	call logging_tx_debug_network_receive_packet
+	branch ali_mesh_lower_transport_layer_receive_lower_transport_PDU
+
+ali_mesh_inverse_SEQ:
+	arg mem_mesh_message_SEQ,rega
+	arg 3,loopcnt
+	branch inverse_data
+
+
+
+ali_mesh_network_load_network_nonce_and_EncryptionKey:
+	call ali_mesh_network_layer_load_network_nonce
+ali_mesh_upper_transport_layer_load_EncryptionKey:
+	arg mem_k2_EncryptionKey,contr
+	branch load_key
+ali_mesh_network_layer_load_network_nonce:
+	arg mem_mesh_Network_Nonce,contw
+	setarg NETWORK_NONCE
+	istore 1,contw
+	fetch 6,mem_mesh_message_TTL
+	istore 8,contw
+	branch mesh_generate_nonce
+
+
+ali_mesh_network_store_in_mem:
+	add temp,-12,pdata
+	//长度-12的原因
+	//uint8_t AD type:GAP_ADTYPE_MESH_MESSAGE
+	//uint8_t IVI & NID
+	//uint8_t CTL & TTL
+	//uint24_t SEQ
+	//uint16_t SRC
+	//uint32_t MIC
+	//AD_len减去上面内容，是实际DST & Transport PDU的长度
+	//问题:没有考虑MIC长度是64bit 的情况，目前不支持，后期支持需要修改
+	store 1,mem_mesh_message_Transport_NetMIC_length
+	arg 29,loopcnt
+	arg mem_mesh_message_NID,contw
+	call clear_mem
+	add temp,-1,loopcnt
+	arg mem_mesh_message_NID,contw
+	branch memcpy_fast
+	//统一copy到mem_mesh_message_NID
+
+ali_mesh_network_layer_relay_access_message:
+	call ali_mesh_network_layer_check_relay_states
+	nrtn user
+	call ali_mesh_network_layer_encrypt_relay_package
+	jam ADV_RELAY_MESH_MESSAGE_DURATION,mem_mesh_queue_ele_duration
+	fetch 1,mem_mesh_message_Transport_NetMIC_length
+	add pdata,13,temp
+	storet 1,mem_mesh_queue_ele_len
+	increase -1,temp
+	istoret 1,contw
+	setarg GAP_ADTYPE_MESH_MESSAGE
+	istore 1,contw
+	add temp,-1,loopcnt
+	fetch 7,mem_mesh_message_NID
+	arg mem_mesh_message_NID,contr
+	call memcpy
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BLE_CONNECTED,pdata
+	call ali_mesh_send_ble_data_relay_package,true
+	arg mem_mesh_queue_ele_temp,rega
+	branch queue_push
+
+ali_mesh_send_ble_data_relay_package:
+	fetch 1,mem_mesh_network_packet_type
+	rtneq MESH_MESSAGE_PROXY
+	branch ali_mesh_send_ble_data
+
+//output:enable user is mean can relay packet
+ali_mesh_network_layer_check_relay_states:
+	call disable_user
+	fetch 1,mem_mesh_network_packet_type
+	rtneq MESH_MESSAGE_APP	//不relay APP的控制包
+	fetch 2,mem_mesh_core_feature
+	rtnbit1 MESH_FEATURE_DISABLE_RELAY
+	fetch 1,mem_mesh_provisioned_flag
+	rtnne PAIRED_STATUS	//无配网状态，不relay 接收到random就能解析数据
+	fetcht 2,mem_mesh_message_SRC
+	call ali_mesh_more_element_check_unicast_address
+	nrtn user					//不relay 元素的包的数据包
+	call ali_mesh_network_layer_check_network_mic_cache
+	nrtn user
+	call ali_mesh_network_layer_logging_tx_relay_info
+	fetch 1,mem_mesh_message_TTL
+	rtn blank
+	pincrease -1
+	rtn blank
+	store 1,mem_mesh_message_TTL
+	setarg mem_mesh_network_relay_queue
+	store 2,mem_queue_ptr
+	branch enable_user
+
+ali_mesh_network_layer_encrypt_relay_package:
+ 	call ali_mesh_network_load_network_nonce_and_EncryptionKey
+	fetch 1,mem_mesh_message_Transport_NetMIC_length
+	arg mem_mesh_message_DST,temp
+	call ali_CCM_encrypt
+	branch ali_mesh_encrypt_obfuscation_deceypt_recevie_message
+
+
+//user is enable ,mean new packet
+ali_mesh_network_layer_check_network_mic_cache:
+	setarg mem_mesh_transport_message_mic_cache
+	store 2,mem_mesh_mic_cache_ptr
+	branch ali_mesh_base_adt_cache
+
+
+ali_mesh_network_layer_logging_tx_relay_info:
+	arg 2,loopcnt
+	arg mem_mesh_message_DST,rega
+	arg MESH_NETWORK_RELAY_PACKET,regb
+	call logging_tx_info
+	fetchr loopcnt,1,mem_ccm_data_len
+	fetchr rega,2,mem_ccm_data_ptr
+	arg MESH_NETWORK_RELAY_PACKET,regb
+	branch logging_tx_debug
+
+
+/*
+	mesh中发送到network layer处理函数
+	不区分Unsegmented access message和Segmented access message
+	统一处理函数接口
+*/
+
+ali_mesh_network_layer_send_access_message:
+	bpatchx patch3f_6,mem_patch3f
+	call ali_mesh_network_layer_send_access_message_encrypt_NetMIC
+	call ali_mesh_network_layer_send_access_message_encrypt_obfuscation
+	branch ali_mesh_bearer_layer_send_packet_by_network_layer
+
+
+//DST在接收包时，已经写入mem_mesh_unsegmented_lower_transport_layer_DST
+//计算Netwrork MIC的值
+ali_mesh_network_layer_send_access_message_encrypt_NetMIC:
+	fetch 1,mem_mesh_lower_transport_layer_payload_len
+	add pdata,2,rega	//DST size
+	pincrease 4
+	store 1,mem_mesh_lower_transport_layer_payload_len
+	arg mem_mesh_send_upper_layer_DST,temp
+	branch ali_mesh_network_layer_encrypt_by_network_nonce
+
+//********* generate network nonce *********//
+//input:temp is encrypt ptr
+//rega is encrypt length
+ali_mesh_network_layer_encrypt_by_network_nonce:
+	call ali_mesh_network_load_network_nonce_and_EncryptionKey
+	copy rega,pdata
+	branch ali_CCM_encrypt
+
+
+ali_mesh_network_layer_send_access_message_encrypt_obfuscation:
+	branch ali_mesh_encrypt_obfuscation_deceypt_send_message
+
+
+
+mesh_generate_nonce:
+	fetch 4,mem_mesh_IV_Index
+	istore 4,contw
+	add contw,-13,pdata
+	store 2,mem_nonce_ptr
+	rtn
+
+logging_tx_debug_network_receive_packet:
+	fetch 1,mem_mesh_message_Transport_NetMIC_length
+	add pdata,11,loopcnt
+	arg mem_mesh_message_NID,rega
+	arg MESH_NETWORK_RECEIVE_PACKET,regb
+	branch logging_tx_debug
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_proxy_layer.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_proxy_layer.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_proxy_layer.prog	(working copy)
@@ -0,0 +1,81 @@
+
+
+/*
+	阿里 mesh proxy 层控制
+*/
+ali_mesh_proxy_init_adv:
+	jam 0x14,mem_le_adv_data_len
+	setarg 0x02
+	store 1,mem_le_adv_data
+	setarg GAP_ADTYPE_FLAGS
+	istore 1,contw
+	setarg 0x06
+	istore 1,contw
+	setarg 0x03
+	istore 1,contw
+	setarg GAP_ADTYPE_16BIT_COMPLETE
+	istore 1,contw
+	setarg MESH_PROXY_SERVICE
+	istore 2,contw
+	setarg 0x0c
+	istore 1,contw
+	setarg GAP_ADTYPE_SERVICE_DATA
+	istore 1,contw
+	setarg MESH_PROXY_SERVICE
+	istore 2,contw
+	setarg MESH_PROXY_SERVICE_DATA_ID_TYPE_NETWORK_ID
+	istore 1,contw
+	fetch 8,mem_mesh_network_id
+	istore 8,contw
+	rtn
+
+//rega is le rx data address
+//regb is le rx data length
+//mem_le_att_handle is write handle
+mesh_le_receive_data:
+/*	call uartb_prepare_tx
+	setarg 0x5555
+	istore 2,contwu
+	fetch 2,mem_le_att_handle
+	istore 2,contwu
+	copy regb,pdata
+	istore 2,contwu
+	copy rega,contr
+	copy regb,loopcnt
+	call uart_copy_tx_bytes
+	call uartb_send
+*/
+	fetch 2,mem_le_att_handle
+	beq MESH_PROXY_DATA_IN_HANDLE,ali_mesh_receive_ble_data_proxy_data_in
+	rtn
+
+ali_mesh_receive_ble_data_proxy_data_in:
+	copy regb,temp
+	ifetch 1,rega
+	beq MESH_PROXY_MESSAGE_TYPE_NETWORK_PDU,ali_mesh_network_layer_recevice_network_pdu_proxy_control
+	rtn
+
+ali_mesh_network_layer_recevice_network_pdu_proxy_control:
+	jam MESH_MESSAGE_PROXY,mem_mesh_network_packet_type_temp
+	branch ali_mesh_network_layer_recevice_network_pdu
+
+
+ali_mesh_proxy_process_bb_event:
+	copy regc,pdata
+	beq BT_EVT_LE_DISCONNECTED,app_ble_start_adv
+	rtn
+
+
+ali_mesh_send_ble_data:
+	call le_fifo_check_nearly_full
+	nrtn blank
+	fetch 1,mem_mesh_queue_ele_len
+	add pdata,-1,rega
+	arg MESH_PROXY_DATA_OUT_HANDLE,temp
+	call le_att_malloc_tx_notify
+	setarg MESH_PROXY_MESSAGE_TYPE_NETWORK_PDU
+	istore 1,contw
+	arg mem_mesh_queue_ele_payload+2,contr
+	branch memcpy32
+
+
Index: mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_upper_transport_layer.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_upper_transport_layer.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/mesh_protocol_stack/mesh_upper_transport_layer.prog	(working copy)
@@ -0,0 +1,456 @@
+
+/*
+	mesh协议中upper transport layer
+	主要是负责mesh中upper transport layer数据的解密
+	Unsegmented access message和segmented access message
+	Control message
+*/
+
+/*
+	mesh中接收到unsegmented按照AKF标志，使用application nonce或者device nonce解密Unsegmented access message
+*/
+
+ali_mesh_upper_transport_layer_receive_unsegmented_access_message:
+	bbit0 TRANSPORT_HEAD_BIT_AKF,ali_mesh_uuper_transport_layer_decrypt_unsegment_access_by_device_key
+//application key和application nonce解密Unsegmented access message
+ali_mesh_uuper_transport_layer_decrypt_unsegment_access_by_application_key:
+	call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key
+	branch ali_mesh_upper_transport_layer_decrypt_unsegmented_message
+//device key和device nonce解密Unsegmented access message
+ali_mesh_uuper_transport_layer_decrypt_unsegment_access_by_device_key:
+	call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key
+	branch ali_mesh_upper_transport_layer_decrypt_unsegmented_message
+
+
+ali_mesh_upper_transport_layer_decrypt_unsegmented_message:
+	fetch 1,mem_mesh_message_Transport_NetMIC_length
+	pincrease -7	
+	//DST 16bit
+	//Head8bit (SEG 1bit /AKF 1bit/AID 6bit)
+	//Transport MIC 32bit
+	arg mem_mesh_message_Transport_unsegmented_access_messagePDU,alarm
+	call disable_user
+	branch ali_mesh_upper_transport_layer_decrypt_message
+
+
+/*
+	mesh中接收到segmented按照AKF标志，使用application nonce或者device nonce解密segmented access message
+*/
+ali_mesh_upper_transport_layer_receive_segmented_access_message:
+	fetch 1,mem_mesh_message_Transport_Head
+	bbit0 TRANSPORT_HEAD_BIT_AKF,ali_mesh_uuper_transport_layer_decrypt_segment_access_by_device_key
+ali_mesh_uuper_transport_layer_decrypt_segment_access_by_application_key:
+	call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key
+	branch ali_mesh_upper_transport_layer_decrypt_segmented_message
+ali_mesh_uuper_transport_layer_decrypt_segment_access_by_device_key:
+	call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key
+	branch ali_mesh_upper_transport_layer_decrypt_segmented_message
+
+
+ali_mesh_upper_transport_layer_decrypt_segmented_message:
+	fetch 1,mem_mesh_ASZMIC
+	ncall enable_user,blank
+	call disable_user,blank
+	fetch 1,mem_mesh_segmented_access_message_current_length
+	pincrease -4	//Transport MIC
+	jam 0,mem_mesh_segmented_access_message_current_length
+	arg mem_mesh_segmented_access_message_Segment,alarm
+
+//input:alarm:decrypt message ptr
+//pdata:decrypt message length
+ali_mesh_upper_transport_layer_decrypt_message:
+	copy alarm,temp
+	call ali_mesh_upper_transport_layer_decrypt_message_decrypt_transMIC
+	nrtn zero
+	arg 1,loopcnt
+	arg mem_ccm_data_len,rega
+	arg MESH_UPPER_RECEIVE_PACKET,regb
+	call logging_tx_info
+	call ali_mesh_upper_transport_layer_check_transport_mic_cache
+	nrtn user
+	fetch 2,mem_ccm_data_ptr
+	copy pdata,alarm
+	branch ali_mesh_access_layer_resolve_message
+
+ali_mesh_upper_transport_layer_decrypt_message_decrypt_transMIC:
+	nbranch ali_CCM_decrypt,user
+	pincrease -4
+	branch ali_CCM_decrypt_64Bit
+
+//user is enable ,mean new packet
+ali_mesh_upper_transport_layer_check_transport_mic_cache:
+	setarg mem_mesh_access_message_mic_cache
+	store 2,mem_mesh_mic_cache_ptr
+	branch ali_mesh_base_adt_cache
+
+
+//********* generate application nonce *********//
+ali_mesh_upper_transport_layer_load_application_nonce_and_application_key:
+	call ali_mesh_upper_transport_layer_load_application_nonce
+ali_mesh_upper_transport_layer_load_application_key:
+	arg mem_mesh_application_key,contr
+	branch load_key
+ali_mesh_upper_transport_layer_load_application_nonce:
+	arg mem_mesh_Application_Nonce,contw
+	setarg APPLICATION_NONCE
+	istore 1,contw
+	fetch 1,mem_mesh_ASZMIC
+	arg 0,temp
+	nsetflag blank,7,temp
+	istoret 1,contw
+	fetch 7,mem_mesh_message_SEQ
+	istore 7,contw
+	branch mesh_generate_nonce
+
+
+//********* generate device nonce *********//
+ali_mesh_upper_transport_layer_load_device_nonce_and_device_key:
+	call ali_mesh_upper_transport_layer_load_device_nonce
+ali_mesh_upper_transport_layer_load_device_key:
+	arg mem_mesh_Device_Key,contr
+	branch load_key
+ali_mesh_upper_transport_layer_load_device_nonce:
+	arg mem_mesh_Device_Nonce,contw
+	setarg DEVICE_NONCE
+	branch ali_mesh_upper_transport_layer_load_application_nonce + 2
+
+
+/*
+	mesh中upper transport layer，发送access layer传入的access  PDU
+*/
+// write data to // mem_mesh_access_layer_payload //
+// write data len to //mem_mesh_access_layer_payload_len //
+//upper层发送access mess，主要是计算transport MIC
+ali_mesh_upper_transport_layer_send_access_message:
+ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer:
+	bpatchx patch3f_7,mem_patch3f
+	call ali_mesh_upper_transport_layer_clear_tx_buffer
+	call ali_mesh_loggint_tx_info_upper_send_packet
+	call ali_mesh_upper_transport_layer_send_access_message_add_NID_SRC_TTL_SEQ_DST
+
+	//queue control
+	call ali_mesh_upper_transport_layer_store_packet_header
+	rtn user
+	call ali_mesh_upper_transport_layer_store_unsegment_msg_original_access_pdu
+
+	arg mem_mesh_upper_tran_layer_queue_temp,rega
+	branch queue_push
+
+
+//output:user is enable mean send Attr Indication packet,but no in paired status
+ali_mesh_upper_transport_layer_store_packet_header:
+	call disable_user
+	arg UPPER_RETRY_COUNT_STATUS,temp
+	fetch 1,mem_mesh_provisioned_flag
+	iadd temp,temp		//APP 配网包，增加重传次数保证成功率
+	fetch 1,mem_mesh_network_packet_type
+	sub pdata,MESH_MESSAGE_PROXY,null
+	setflag zero,BIT_UPPER_FLAG_PROXY_CONTROL,temp
+	fetch 1,mem_mesh_network_packet_type
+	sub pdata,MESH_MESSAGE_APP,null
+	setflag zero,BIT_UPPER_FLAG_APP_CONTROL,temp
+	storet 1,mem_mesh_upper_tran_layer_temp_packet_flag
+	fetch 9,mem_mesh_send_upper_layer_IVI_and_NID
+	store 9,mem_mesh_upper_tran_layer_temp_packet_header_IVI_NID
+	fetch 1,mem_mesh_access_layer_payload_vendor_command
+	rtnne VENDOR_MESSAGE_ATTR_INDICATION
+	fetch 1,mem_mesh_provisioned_flag
+	bne PAIRED_STATUS,enable_user
+	fetch 1,mem_mesh_access_layer_payload_vendor_tid
+	store 1,mem_mesh_upper_tran_layer_temp_packet_TID
+	fetch 1,mem_mesh_upper_tran_layer_temp_packet_flag
+	pincrease UPPER_RETRY_COUNT_INDICATION
+	set1 BIT_UPPER_FLAG_VENDOR_INDICATION,pdata
+	store 1,mem_mesh_upper_tran_layer_temp_packet_flag
+	rtn
+
+
+ali_mesh_upper_transport_layer_store_unsegment_msg_original_access_pdu:
+	fetch 1,mem_mesh_access_layer_payload_len
+	copy pdata,loopcnt
+	store 1,mem_mesh_upper_tran_layer_temp_packet_length
+	fetch 1,mem_mesh_message_Transport_Head
+	store 1,mem_mesh_upper_tran_layer_temp_pakcet_AKF_AID
+	arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu,contw
+	arg mem_mesh_access_layer_payload,contr
+	branch memcpy
+
+
+/*
+	mesh中upper transport layer，控制包的发送和重传等
+*/
+ali_mesh_upper_transport_layer_control_packet:
+	arg ali_mesh_upper_transport_layer_control_packet_deal,regc
+	branch ali_mesh_check_all_element_info
+
+
+ali_mesh_upper_transport_layer_control_packet_deal:
+	add rega,ELEMENT_DEVICE_UPPER_ADV_FLAG,contr
+	ifetch 1,contr
+	nrtn blank
+	ifetch 2,contr
+	store 2,mem_queue_ptr
+	arg mem_mesh_upper_tran_layer_queue_temp,rega
+	call queue_get_new_ele
+	nrtn user													//查看发送队列有无数据
+	fetchr rega,2,mem_mesh_rega_temp
+
+	fetcht 1,mem_mesh_upper_tran_layer_temp_packet_flag
+	and temp,DATA_UPPER_FLAG_MAX_RETRY_COUNT,pdata
+	branch ali_mesh_upper_transport_layer_queue_pop,blank		//重传超时丢弃该包
+	add rega,ELEMENT_DEVICE_UPPER_ADV_FLAG,contw
+	setarg PACKET_IN_BEARER
+	istore 1,contw		//状态未丢弃
+
+	call ali_mesh_upper_transport_layer_control_packet_load_header	//加载packet header，message header
+
+	fetcht 1,mem_mesh_upper_tran_layer_temp_packet_flag
+	call ali_mesh_upper_transport_layer_control_packet_load_app_control	//APP控制还是tmall控制
+	add rega,ELEMENT_DEVICE_TRAN_PACKAGE_TID,contw
+	istore 1,contw
+
+	add rega,ELEMENT_DEVICE_TRAN_PACKAGE_TYPE,contr
+	ifetch 1,contr
+	isolate1 BIT_UPPER_FLAG_PROXY_CONTROL,temp
+	setflag true,BIT_UUPER_TRAN_PROXY_MESSAGE,pdata
+	add rega,ELEMENT_DEVICE_TRAN_PACKAGE_TYPE,contw
+	istore 1,contw
+
+	set1 BIT_UPPER_FLAG_RETRANSMIT,temp						//重传标志
+
+	increase -1,temp		//重传次数-1
+	istoret 1,regb			//存入队列位置
+	
+	fetcht 1,mem_mesh_upper_tran_layer_temp_packet_flag
+	isolate1 BIT_UPPER_FLAG_RETRANSMIT,temp
+	nbranch ali_mesh_upper_transport_layer_control_packet_encrypt_access,true
+	fetcht 1,mem_mesh_upper_tran_layer_temp_packet_length
+	storet 1,mem_mesh_upper_transport_layer_payload_len
+	copy temp,loopcnt
+	arg mem_mesh_access_layer_payload,contw
+	arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu,contr
+	call memcpy
+	sub temp,UNSEGMENTED_ACCESS_MESSAGE_MAX_UPPER_TRANSPORT_ACCESS_PDU_LEN,null
+	nbranch ali_mesh_upper_transport_layer_control_packet_segment_msg,positive
+ali_mesh_upper_transport_layer_control_packet_unsegment_msg:
+	branch ali_mesh_lower_transport_layer_send_unsegmented_access_message
+
+
+ali_mesh_upper_transport_layer_control_packet_segment_msg:
+	fetch 4,mem_mesh_upper_tran_layer_temp_segmented_pakcet_SeqZero
+	store 4,mem_mesh_segmented_lower_transport_layer_SegZero
+	branch ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer
+
+
+ali_mesh_upper_transport_layer_control_packet_load_header:
+	fetch 1,mem_mesh_upper_tran_layer_temp_pakcet_AKF_AID
+	store 1,mem_mesh_message_Transport_Head
+
+	fetch 9,mem_mesh_upper_tran_layer_temp_packet_header_IVI_NID
+	store 9,mem_mesh_send_upper_layer_IVI_and_NID
+	store 9,mem_mesh_message_NID
+	rtn
+
+
+ali_mesh_upper_transport_layer_control_packet_load_app_control:
+	setarg UPPER_TRAN_TMALL_AND_APP
+	call ali_mesh_store_tran_package_type
+	fetch 1,mem_mesh_upper_tran_layer_temp_packet_TID
+	isolate1 BIT_UPPER_FLAG_VENDOR_INDICATION,temp
+	rtn true		//indication packet send app & tmall
+	setarg UPPER_TRAN_TMALL_MESSAGE
+	call ali_mesh_store_tran_package_type
+	setarg 0
+	isolate1 BIT_UPPER_FLAG_APP_CONTROL,temp
+	nrtn true
+	setarg UPPER_TRAN_APP_MESSAGE
+	call ali_mesh_store_tran_package_type
+	branch enable_blank
+
+ali_mesh_store_tran_package_type:
+	add rega,ELEMENT_DEVICE_TRAN_PACKAGE_TYPE,contw
+	istore 1,contw
+	rtn
+
+
+ali_mesh_upper_transport_layer_queue_pop:
+	setarg 0
+	add rega,ELEMENT_DEVICE_TRAN_PACKAGE_TID,contw
+	istore 1,contw
+	arg mem_mesh_upper_tran_layer_queue_temp,rega
+	branch queue_pop
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access:
+	call ali_mesh_upper_transport_layer_send_access_message_calc_SEQ
+	call ali_mesh_upper_transport_layer_send_access_message_add_SEQ
+	fetch 9,mem_mesh_send_upper_layer_IVI_and_NID
+	store 9,mem_mesh_upper_tran_layer_temp_packet_header_IVI_NID
+	call ali_mesh_upper_transport_layer_control_packet_encrypt_access_load_payload
+	setarg 0
+	store 1,mem_mesh_ASZMIC
+	call ali_mesh_upper_transport_layer_calc_transport_mic
+
+	fetcht 1,mem_mesh_upper_transport_layer_payload_len
+	storet 1,mem_mesh_upper_tran_layer_temp_packet_length
+	copy temp,loopcnt
+	arg mem_mesh_access_layer_payload,contr
+	arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu,contw
+	call memcpy
+	
+	sub temp,UNSEGMENTED_ACCESS_MESSAGE_MAX_UPPER_TRANSPORT_ACCESS_PDU_LEN,null
+	nbranch ali_mesh_upper_transport_layer_control_packet_encrypt_access_segment_msg,positive
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_unsegment_msg:
+//upper层发送unsegmented access mess，主要是计算transport MIC
+	arg mem_mesh_upper_tran_layer_temp_packet_transmit_delay,rega
+	call queue_store_new_ele
+	branch ali_mesh_lower_transport_layer_send_unsegmented_access_message
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_segment_msg:
+	call ali_mesh_upper_transport_layer_send_segmented_access_message_get_SeqZero_SegON
+	fetch 4,mem_mesh_segmented_lower_transport_layer_SegZero
+	store 4,mem_mesh_upper_tran_layer_temp_segmented_pakcet_SeqZero
+	arg mem_mesh_upper_tran_layer_temp_packet_transmit_delay,rega
+	call queue_store_new_ele
+	branch ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_load_payload:
+	fetch 1,mem_mesh_upper_tran_layer_temp_packet_length
+	copy pdata,loopcnt
+	store 1,mem_mesh_access_layer_payload_len
+	fetch 1,mem_mesh_upper_tran_layer_temp_pakcet_AKF_AID
+	store 1,mem_mesh_message_Transport_Head
+	arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu,contr
+	arg mem_mesh_access_layer_payload,contw
+	branch memcpy
+
+ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer:
+	call ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header
+	setarg mem_mesh_access_payload
+	store 2,mem_mesh_upper_transport_layer_payload_ptr
+ali_mesh_upper_transport_layer_send_segmented_access_message_loop:
+	call ali_mesh_upper_transport_layer_control_packet_load_header
+	call ali_mesh_upper_transport_layer_send_access_message_calc_SEQ
+	call ali_mesh_upper_transport_layer_send_access_message_add_SEQ
+
+	fetcht 1,mem_mesh_access_layer_payload_len
+	setarg SEGMENTED_ACCESS_MESSAGE_UNINT_PDU_LEN
+	call not_greater_than
+	copy pdata,rega
+	copy temp,pdata
+	isub rega,pdata
+	store 1,mem_mesh_access_layer_payload_len
+	fetch 2,mem_mesh_upper_transport_layer_payload_ptr
+	copy pdata,contr
+	iadd rega,temp
+	storet 2,mem_mesh_upper_transport_layer_payload_ptr
+	call ali_mesh_lower_transport_layer_send_segmented_access_message
+	fetch 1,mem_mesh_access_layer_payload_len
+	rtn blank
+	fetch 1,mem_mesh_segmented_lower_transport_layer_SegO
+	pincrease 1
+	store 1,mem_mesh_segmented_lower_transport_layer_SegO
+	call ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header
+	branch ali_mesh_upper_transport_layer_send_segmented_access_message_loop
+
+
+
+//upper层计算transport mic值
+ali_mesh_upper_transport_layer_calc_transport_mic:
+	fetch 1,mem_mesh_message_Transport_Head
+	bbit0 TRANSPORT_HEAD_BIT_AKF,ali_mesh_upper_transport_layer_calc_transport_mic_by_DeviceKey
+ali_mesh_upper_transport_layer_calc_transport_mic_by_AppKey:
+	call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key
+	branch ali_mesh_upper_transport_layer_calc_transport_mic_encrypt_AESCCM
+ali_mesh_upper_transport_layer_calc_transport_mic_by_DeviceKey:
+	call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key
+ali_mesh_upper_transport_layer_calc_transport_mic_encrypt_AESCCM:
+	fetch 1,mem_mesh_access_layer_payload_len
+	add pdata,4,temp
+	storet 1,mem_mesh_upper_transport_layer_payload_len
+	arg mem_mesh_access_layer_payload,temp
+	branch ali_CCM_encrypt
+
+
+
+//累加SEQ的值
+ali_mesh_upper_transport_layer_send_access_message_calc_SEQ:
+	fetch 3,mem_mesh_send_message_SEQ
+	pincrease 1
+	store 3,mem_mesh_send_message_SEQ
+	fetch 1,mem_mesh_gatt_package_send_msg_id
+	pincrease 1
+	store 1,mem_mesh_gatt_package_send_msg_id
+	fetch 2,mem_mesh_cb_seq_changed
+	branch callback_func
+
+
+//存NID,TTL,SEQ,SRC,其中SEQ需要高低位交换
+ali_mesh_upper_transport_layer_send_access_message_add_NID_SRC_TTL_SEQ_DST:
+	fetch 1,mem_mesh_IV_Index+3
+	lshift4 pdata,pdata
+	lshift3 pdata,pdata
+	fetcht 1,mem_k2_NID
+	ior temp,pdata
+	store 1,mem_mesh_send_upper_layer_IVI_and_NID
+	fetch 1,mem_mesh_send_message_TTL
+	store 1,mem_mesh_send_upper_layer_CTL_and_TTL
+	fetch 2,mem_mesh_send_message_SRC
+	store 2,mem_mesh_send_upper_layer_SRC
+	fetch 2,mem_mesh_send_message_DST
+	store 2,mem_mesh_send_upper_layer_DST
+
+ali_mesh_upper_transport_layer_send_access_message_add_SEQ:
+	fetch 3,mem_mesh_send_message_SEQ
+	store 3,mem_mesh_send_upper_layer_SEQ
+	arg mem_mesh_send_upper_layer_SEQ,rega
+	arg 3,loopcnt
+	call inverse_data
+	fetch 8,mem_mesh_send_upper_layer_CTL_and_TTL
+	store 8,mem_mesh_message_TTL
+	rtn
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_get_SeqZero_SegON:
+	fetch 1,mem_mesh_upper_transport_layer_payload_len
+	div pdata,SEGMENTED_ACCESS_MESSAGE_UNINT_PDU_LEN
+	call wait_div_end
+	quotient temp
+	remainder pdata
+	call ali_mesh_upper_transport_layer_send_segmented_access_message_sub_SegN_one,blank
+	storet 1,mem_mesh_segmented_lower_transport_layer_SegN
+	jam 0,mem_mesh_segmented_lower_transport_layer_SegO
+	fetch 3,mem_mesh_send_message_SEQ
+	arg 0x1fff,temp
+	iand temp,pdata
+	store 2,mem_mesh_segmented_lower_transport_layer_SegZero
+	rtn
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header:
+	fetch 2,mem_mesh_segmented_lower_transport_layer_SegZero
+	lshift4 pdata,pdata
+	lshift pdata,pdata
+	fetcht 1,mem_mesh_segmented_lower_transport_layer_SegO
+	ior temp,pdata
+	lshift4 pdata,pdata
+	lshift pdata,pdata
+	fetcht 1,mem_mesh_segmented_lower_transport_layer_SegN
+	ior temp,pdata
+	store 3,mem_mesh_segmented_access_lower_transport_layer_SZMIC_SeqZero_SegO_SegN
+	arg 3,loopcnt
+	arg mem_mesh_segmented_access_lower_transport_layer_SZMIC_SeqZero_SegO_SegN,rega
+	branch inverse_data
+
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_sub_SegN_one:
+	increase -1,temp
+	rtn
+
+ali_mesh_upper_transport_layer_clear_tx_buffer:
+	rtn
+
+
+ali_mesh_loggint_tx_info_upper_send_packet:
+	arg mem_mesh_access_layer_payload,rega
+	fetchr loopcnt,1,mem_mesh_access_layer_payload_len
+	arg MESH_UPPER_SEND_PACKET,regb
+	branch logging_tx_info
+
Index: mouse_public_3mode_usb/program/patch.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/patch.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/patch.prog	(working copy)
@@ -0,0 +1,3006 @@
+define BLE
+//define CLASSIC
+//define PW_CTRL
+//define UART_LOG
+//define RSSI_PATCH
+//define RSSI_SORT
+//define LOGO_LED
+//define SEARCH_DONGLE
+//define USB
+//define AUTO_SEND
+
+p_start:
+	branch p_patch_array
+
+// zcode start
+p_zcode:
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+	nop 1
+
+
+p_patch_array:
+	bbit1 8,pf_patch_ext
+	beq patch00_0,p_soft_reset
+	beq patch0c_2,p_end_of_packet
+	beq patch10_2,p_shutdown_radio
+	beq patch10_3,p_set_sync_on
+	beq patch11_2,p_txon_next
+	beq patch11_3,p_initialize_radio_cont
+ifdef RSSI_PATCH
+	beq patch11_4,p_save_rssi			/**RSSI PATCH**/
+endif
+	beq patch15_5,p_app_init
+	beq patch18_3,p_mouse_start_work
+	beq patch18_6,p_mouse_app_enter_hibernate
+	beq patch19_0,p_mouse_setgpio_hibernate
+	beq patch19_1,p_mouse_lpm_before_common
+	beq patch19_3,p_mouse_adc_read_start
+	beq patch19_5,p_mouse_motion
+	beq patch19_6,p_mouse_dpi_process
+	beq patch19_7,p_mouse_seting_dpi
+	beq patch1a_0,p_mouse_check_key_gpio
+	beq patch1a_2,p_mouse_init_sunt
+	beq patch1a_3,p_mouse_sensor_poweron
+	beq patch1a_5,p_mouse_priority_bb_event
+	beq patch1b_0,p_mouse_bb_event_timer
+	beq patch1b_5,p_mouse_idle	
+	beq patch1b_6,p_mouse_ready_reconnection_by_button
+	beq patch1c_0,p_mouse_led_off
+	beq patch1c_1,p_mouse_led_on
+ifdef BLE
+	beq patch1b_1,p_mouse_start_discovery	/**BT PATCH,APPLY TO 3.0/4.0**/
+	beq patch1b_2,p_mouse_stop_discovery	/**BT PATCH,APPLY TO 3.0/4.0**/
+endif
+	beq patch1b_4,p_mouse_store_device_info
+ifdef CLASSIC
+	beq patch13_7,p_init_param				/**CLASSIC PATCH**/
+	beq patch1c_7,p_hid_rx_process		/**CLASSIC PATCH**/
+endif
+	branch loop
+
+pf_patch_ext:
+	beq patch23_7,p_twspi_reset
+	beq patch30_5,p_ui_timer_check
+ifdef USB
+	beq patch31_6,p_usb_class_type	/**USB PATCH**/
+	beq patch32_3,p_usb_tx			/**USB PATCH**/
+endif
+	beq patch34_6,p_le_enable_phy_by_pdata
+	beq patch3b_5,p_g24_dispatch
+	beq patch3b_6,p_g24_receive_packet
+	beq patch3c_1,p_g24_transmit
+	beq patch3c_2,p_g24_pair_dispatch
+	beq patch3c_3,p_g24_pair_sm_common_next
+	beq patch3d_1,p_g24_reconn_dispatch
+	beq patch3d_2,p_g24_transmit_no_interrupt
+	beq patch3d_4,p_g24_lpm_wait
+ifdef CLASSIC
+	beq patch23_1,p_send_lmp			/**CLASSIC PATCH**/
+endif
+ifdef BLE
+	beq patch33_7,p_le_slave_match	/**BLE PATCH**/
+	beq patch34_1,p_le_slave_unsync	/**BLE PATCH**/
+	beq patch37_6,p_le_parse_l2cap		/**BLE PATCH**/
+endif
+ifdef PW_CTRL
+	beq patch3d_5,p_power_ctrl_start	/**PWR PATCH**/
+endif
+	branch loop
+
+
+p_mouse_led_on:
+	copy temp,pdata
+	rtneq GPIO_DISABLE
+	copy pdata,temp
+	branch mouse_led_on+1
+
+p_mouse_led_off:
+	copy temp,pdata
+	rtneq GPIO_DISABLE
+	copy pdata,temp
+	branch mouse_led_off+1
+
+p_led_num_check:		
+	fetch 1,mem_mouse_flag+4
+	nrtn blank
+	jam 0,mem_ui_led_struct_num
+	rtn
+
+p_g24_dispatch:
+	bmark1 mark_24g_rxmode,g24_receive_dispatch
+	rtnmark0 mark_24g
+	fetch 1,mem_24g_conn_sm
+	bbit1 STATE_24G_PAIR,g24_pair_dispatch
+	bbit1 STATE_24G_RECONN,g24_reconn_dispatch
+	fetch 1,mem_24g_transmit_by_interrupt
+	beq G24_TX_TIMER_INT_ENABLE,p_g24_transmit_by_interrupt_check
+	branch p_g24_transmit_no_interrupt
+
+p_g24_transmit_by_interrupt_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_1000,p_g24_transmit_by_interrupt_high_reoport_set
+	bbit1 MOUSE_ENABLE_24G_500Hz,p_g24_transmit_by_interrupt_high_reoport_set
+	branch g24_transmit_by_interrupt
+	
+p_g24_transmit_by_interrupt_high_reoport_set:
+	call g24_timer_check
+	nrtn user
+	call g24_interval_calibrate
+	branch g24_transmit_no_interrupt
+
+p_mouse_ready_reconnection_by_button:	
+	fetch 1,mem_device_number
+	rtneq 1		// 1channel
+	call p_mouse_multi_led_blink_disable
+	call mouse_select_device_number
+	storet 1,mem_device_flag
+p_mouse_store_device_number_before_reset:	
+	jam 0,mem_link_key_exists
+	call mouse_select_device_enable
+	call p_mouse_stop_bluetooth_mode
+	call app_evt_button_long_pressed //fixed le disconneted,enter hibernate
+	branch mouse_store_device_number_before_reset+3
+
+p_mouse_stop_bluetooth_mode:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BT_RECONNECT
+	branch mouse_stop_bluetooth_mode+2
+
+p_set_mem_xtal_cache:
+	fetch 1,mem_lpm_config+1
+	store 1,mem_xtal_cache
+	rtn
+p_soft_reset:
+	clear_stack
+	jam 0x73,core_spid_ctrl
+	ncall p_set_mem_xtal_cache,wake
+	call app_param_init
+	ncall p_led_num_check,wake
+	setarg mem_mouse_rssi_signal_buf_patch
+	store 2,mem_rssi_signal_buf_ptr	
+	call mouse_xtal_init		// 16M / 24M
+	call initialize_radio
+	jam clksel_xtal,core_clksel
+	fetch 1,mem_fcomp_div
+	beq XTAL_24M,p_soft_reset_next
+	jam clksel_dpll,core_clksel
+p_soft_reset_next:	
+	fetch 1,mem_xtal_cache
+	store 1,mem_lpm_config+1
+	setarg 0xf0f
+	arg 0xfff,contw
+	iand contw,contw
+	fetch 1,mem_lpm_config
+	and_into 0xf0,pdata
+	lshift8 pdata,pdata
+	ior contw,pdata
+	set0 2,pdata
+	store 2,core_lpm_reg
+	ifetch 2,contr
+	istore 2,contw
+	setarg lpmreg_sel_ctrl
+	until null,lpo_edge
+	store 1,core_lpm_wr
+	jam 0x08,mem_lpm_config+1	
+	branch soft_reset+4
+
+p_enable_rc_clock:
+	fetch 4,core_lpm_ctrl
+	set1 2,pdata
+	store 4,core_lpm_reg
+
+	setarg lpmreg_sel_ctrl
+	until null,lpo_edge
+	store 1,core_lpm_wr
+	until null,lpo_edge
+	until null,lpo_edge
+	until null,lpo_edge
+	nop 10000
+	rtn
+
+p_shutdown_radio:
+	fetch 1,mem_gain_fix	//filter gain_control
+	store 1,mem_temp
+	call shutdown_radio+1
+	jam 0,core_rf_ldo_en0	//RFPLL vco_LDO disable
+	fetch 1,mem_temp
+	store 1,mem_gain_fix
+	rtn
+
+p_set_sync_on:
+	jam 0x5,modem_en
+	nop 2
+	jam 0x0,modem_en					/* if called from tx or rx */
+	fetch 1,mem_fcomp_div
+	beq XTAL_24M,set_sync_on_24m
+p_set_sync_on_16m:
+	jam 0x29,core_syn_afc_cfg1
+	branch set_sync_on_16m	
+
+
+//fixed lpm abnormal current
+p_rf_da_ldo_abb_en_init:
+	fetch 1,core_rf_ldo_en0
+	set1 3,pdata
+	store 1,core_rf_ldo_en0
+	nop 240	//20us,waiting ldo steady
+	set0 3,pdata
+	store 1,core_rf_ldo_en0
+	rtn
+
+p_initialize_radio_cont:
+	//hw agc
+	jam 0xff,mem_gain_fix
+
+	jam 0x00,core_syn_loopdiv_dsm_cfg
+	jam 0x40,core_rx_ctrl1
+	
+	call p_rf_da_ldo_abb_en_init
+	branch initialize_radio_cont+1
+
+ifdef CLASSIC
+p_init_param:
+	jam 0,mem_lmo_tid2			// classic can't reconnect
+	branch init_param_next+1
+endif
+
+p_txon_next:
+	fetch 1,mem_tx_power
+	beq TX_POWER_FAST_CONN,p_set_tx_power_f17db	//fast conn
+	beq TX_POWER_PAIR,p_set_tx_power_pair	//pair mode
+	branch set_tx_power_10db	//others
+
+p_set_tx_power_f17db:	//F17dbm
+	jam 0x0a,core_tx_pwr_ctrl0		
+	jam 0x00,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+p_set_tx_power_pair:
+	jam 0x0a,core_tx_pwr_ctrl0
+	jam 0x00,core_tx_pwr_ctrl1
+	branch set_rf_ldo_cfg89
+
+
+ifdef RSSI_PATCH
+p_save_rssi:
+	// bit6 is signed bit. 
+	fetch 1,modem_nb_pow 
+	isolate1 6,pdata 
+	setflag true,7,pdata 
+	store 1,mem_modem_rssi 
+	
+	fetch 1,modem_gain 
+	and pdata,0x0f,temp 
+	lshift temp,temp 
+	rshift4 pdata,pdata 
+	iadd temp,temp 
+	mul32 temp,3,rega // (abb_gain + lna_gain*2)*3 
+
+	fetch 1,mem_modem_rssi 
+	call p_byte_sign_extern 
+	sub pdata,0,pdata //-modem_nb_pow 
+	iadd rega,pdata // (abb_gain + lna_gain*2)*3 + (-modem_nb_pow) 
+	increase -9,pdata // (abb_gain + lna_gain*2)*3 + (-modem_nb_pow) - 9 
+	and pdata,0x1ff,pdata 
+	isolate1 8,pdata 
+	nbranch p_save_rssi_store,true 
+	setarg 0 
+p_save_rssi_store:
+	store 1,mem_rssi_hex
+	rtn
+p_byte_sign_extern:
+	isolate1 7,pdata
+	nrtn true
+	arg 0xff00,temp
+	ior temp,pdata
+	rtn
+
+endif
+
+	
+p_app_init:
+p_mouse_init:
+ifdef UART_LOG
+	call p_device_hardware_init
+endif	
+	call enable_authrom
+ifdef USB
+	fetch 1,mem_usb_offline_gpio_retention
+	store 1,mem_usb_offline_check_gpio
+endif
+	call p_mouse_setting_config
+	call mouse_init_sunt
+	rtn wake
+	call p_mouse_seting_sensor_type
+ifdef USB
+	call p_mouse_usb_check_enable
+endif
+	call mouse_drawing_optima_init
+	call p_mouse_cb_fuction
+	call p_mouse_sensor_powerdown
+	branch mouse_init_wireless
+
+p_twspi_reset:
+	fetch 1,mem_mouse_sensor_sclk_gpio
+	branch twspi_reset+1
+
+ifdef BLE
+p_mouse_le_name_load:
+	fetch 1,mem_le_name_patch_len
+	rtn blank
+	add pdata,1,loopcnt
+	arg mem_le_name_patch_len,contr
+	arg mem_le_name_len,contw
+	branch memcpy
+endif
+
+///////////////////////////////////////////g24 report rate start///////////////////////////////////////
+p_mouse_g24_report_setting:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_1000,p_mouse_g24_report_1000hz
+	bbit1 MOUSE_ENABLE_24G_500Hz,p_mouse_g24_report_500hz
+	bbit1 MOUSE_ENABLE_24G_250Hz,p_mouse_g24_report_250hz
+	branch p_mouse_g24_report_125hz
+	
+p_mouse_g24_report_1000hz:
+	jam 5,mem_24g_fast_hop_count
+	setarg 0x010101
+	store 3,mem_24g_interval
+	setarg 0x2ee0		//standard:0x5dc0
+	store 3,mem_24g_tsniff
+	branch g24_transmit_by_interrupt_enable
+
+p_mouse_g24_report_500hz:
+	jam 9,mem_24g_fast_hop_count
+	setarg 0x080606
+	store 3,mem_24g_interval
+	setarg 0x5c1c		//standard:0x5dc0
+	store 3,mem_24g_tsniff
+	branch g24_transmit_by_interrupt_enable
+/*
+p_mouse_report_500hz_clk_init:
+	setarg 0
+	store 6,mem_mouse_24g_now_rtclk
+	store 6,mem_mouse_24g_last_rtclk
+	rtn
+*/
+
+p_mouse_g24_report_250hz:
+	setarg 0xbb80
+	store 3,mem_24g_tsniff
+	jam 15,mem_24g_fast_hop_count
+	setarg 0x6000
+	branch p_mouse_24g_short_sleep_set
+
+p_mouse_g24_report_125hz:
+	setarg 0x17700
+	store 3,mem_24g_tsniff	
+	jam 30,mem_24g_fast_hop_count
+	setarg 0x11760
+p_mouse_24g_short_sleep_set:
+	store 3,mem_24g_short_sleep_set
+	store 3,mem_24g_short_sleep_set_init		
+	rtn
+
+p_send_time_long_wake:
+	setarg 0
+	store 1,mem_tx_count
+	store 5,mem_tx_time_sum
+	rtn
+///////////////////////////////////////////g24 report rate end///////////////////////////////////////
+
+p_mouse_setting_config:
+	rtn wake
+	call g24_transmit_init
+	arg 0x358,temp
+	storet 2,mem_24g_rx_window
+	call g24_chmap_param_init
+	call p_send_time_long_wake
+	call mouse_gpio_init
+ifdef BLE	
+	call p_mouse_le_name_load
+endif
+	call mouse_param_init
+	call p_mouse_led_multi_parm_init
+	call p_mouse_g24_report_setting
+	call p_mouse_store_normal_tx_power
+	branch mouse_setting_config+5
+
+p_mouse_store_normal_tx_power:
+	fetch 1,mem_tx_power
+	store 1,mem_normal_tx_power
+	rtn
+
+p_mouse_fetch_normal_tx_power:
+	fetch 1,mem_normal_tx_power
+	store 1,mem_tx_power
+	rtn
+
+	
+p_mouse_cb_fuction:
+	setarg mouse_24g_before_lpm_sleep
+	store 2,mem_cb_before_lpm_sleep
+	setarg p_mouse_24g_package_data
+	store 2,mem_cb_24g_transmit_data
+ifdef SEARCH_DONGLE
+	setarg p_mouse_24g_search_dongle
+	store 2,mem_cb_24g_search_receiver
+endif
+	branch mouse_cb_fuction+6
+
+p_mouse_24g_package_data:		// 250Hz
+	rtnmark0 mark_24g
+	call mouse_motion
+	nrtn user
+	fetch 1,mem_long_sleep_flag
+	jam 0,mem_long_sleep_flag
+	ncall p_mouse_short_sleep_clear_wake,blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,p_mouse_24g_mouse_package_data
+	fetch 1,mem_customer_key
+	nbranch mouse_24g_keyboard_package_data,blank
+p_mouse_24g_mouse_package_data:
+	call p_mouse_data_xy_release
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_500Hz,p_mouse_24g_mouse_package_data_by_interrupt
+	bbit1 MOUSE_ENABLE_24G_1000,p_mouse_24g_mouse_package_data_by_interrupt
+	branch mouse_24g_mouse_package_data
+
+p_mouse_24g_mouse_package_data_by_interrupt:
+	fetch 1,mem_24g_data_type
+	bbit1 1,p_mouse_24g_mouse_package_data_now	// last package is keyboard data
+	fetcht 1,mem_24g_txbuf+1
+	fetch 1,mem_mouse_key
+	ior temp,pdata
+	store 1,mem_mouse_key
+	fetcht 1,mem_24g_txbuf+6
+	fetch 1,mem_mouse_z
+	iadd temp,pdata
+	store 1,mem_mouse_z
+	fetcht 1,mem_24g_txbuf+7
+	fetch 1,mem_mouse_tz
+	iadd temp,pdata
+	store 1,mem_mouse_tz	
+p_mouse_24g_mouse_package_data_now:	
+	jam TYPE_MS,mem_24g_data_type
+	arg 7,rega	//length
+	arg mem_mouse_key,regb //tx buff
+//	fetch 2,mem_mouse_z
+//	rtn blank
+	branch g24_transmit_by_interrupt_enable
+
+p_mouse_data_xy_release:
+	fetch 1,mem_sensor_motion_gpio
+	rtnne GPIO_DISABLE
+	fetch 1,mem_mouse_24g_clear_sensor_data_flag
+	nbranch p_mouse_data_xy_release_before,blank
+	branch mouse_data_xy_release+2
+p_mouse_data_xy_release_before:
+	jam 0,mem_mouse_24g_clear_sensor_data_flag
+	branch mouse_data_xy_release+4
+	
+ifdef SEARCH_DONGLE
+p_mouse_24g_search_dongle:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_24G_SEARCH_DONGLE
+	fetch 1,mem_mouse_long_mult_flag
+	rtn blank
+	fetch 1,mem_24g_abort_pac
+	rtn blank
+	fetch 1,mem_mouse_search_dongle_interval
+	increase 1,pdata
+	and_into 3,pdata
+	store 1,mem_mouse_search_dongle_interval
+	nrtn blank	//400ms
+	jam 0,mem_mouse_search_dongle_ch
+p_mouse_24g_search_dongle_loop:
+	fetch 1,mem_mouse_search_dongle_ch
+	increase 1,pdata
+	store 1,mem_mouse_search_dongle_ch
+	sub pdata,G24_CH_NUMBER,null
+	nbranch p_mouse_24g_search_dongle_loop_end,positive
+	call g24_reconn_data_prep
+	call p_g24_transmit_receive_ack
+	nbranch p_mouse_24g_search_dongle_loop_retry,sync
+	nbranch p_mouse_24g_search_dongle_loop_retry,user3
+	call p_mouse_24g_search_dongle_success
+p_mouse_24g_search_dongle_loop_end:
+	call g24_txbuf_clear
+	fetch 1,mem_mouse_search_dongle_count
+	increase 1,pdata
+	store 1,mem_mouse_search_dongle_count
+	beq G24_CH_POLL_COUNT,p_mouse_24g_search_dongle_check
+	rtn	
+
+p_mouse_24g_search_dongle_loop_retry:
+	call g24_ch
+	branch p_mouse_24g_search_dongle_loop
+
+p_mouse_24g_search_dongle_check:
+	jam 0,mem_mouse_search_dongle_count
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit1 G24_DISCONN_STATE
+	set1 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
+	fetch 2,mem_mouse_24g_search_dongle_time_init		
+	store 2,mem_mouse_no_data_timer
+	branch p_mouse_sensor_powerdown
+
+p_mouse_24g_search_dongle_success:
+	fetch 1,mem_24g_abort_pac
+	branch mouse_24g_search_dongle_init,blank
+	jam 0,mem_mouse_search_dongle_count
+	fetch 1,mem_mouse_search_dongle_action
+	rtnbit0 G24_DISCONN_STATE
+	set0 G24_DISCONN_STATE,pdata
+	store 1,mem_mouse_search_dongle_action
+	call mouse_no_data_timer_init
+	branch p_mouse_init_sensor_wakeup
+endif
+	
+p_mouse_24g_fast_conn_mode_check:
+	fetch 4,mem_24g_receiver_addr
+	fetcht 4,mem_24g_fast_conn_addr
+	isub temp,null
+	branch p_mouse_soft_agc_enable,zero
+p_mouse_soft_agc_disable:
+	jam 0xff,mem_gain_fix
+	rtn
+
+p_mouse_soft_agc_enable:
+	jam 0,mem_gain_fix
+	jam TX_POWER_FAST_CONN,mem_tx_power
+	rtn
+
+
+p_g24_transmit_no_interrupt:
+	call g24_txdata_prep
+	nbranch p_g24_nodata_transmit,user
+p_g24_transmit_start:
+	call p_g24_transmit_process
+ifdef PW_CTRL
+	call power_ctrl_start
+endif
+	call p_mouse_24g_fast_conn_mode_check
+	fetch 1,mem_sensor_shutdown_flag
+	nbranch p_g24_short_sleep,blank
+	fetch 8,mem_24g_long_sleep_set
+	store 8,mem_24g_enter_hibernate
+	fetch 2,mem_24g_long_sleep_param_update_timer_init
+	store 2,mem_24g_long_sleep_param_update_timer
+p_g24_short_sleep:
+	call g24_lpm_wait
+	nrtn user	
+	fetch 1,mem_sleep_miss
+	jam 0,mem_sleep_miss
+	sub pdata,0,null
+	nbranch p_g24_short_sleep_last_miss,zero
+	fetcht 2,mem_retransmit
+	sub temp,0,null
+	branch p_g24_short_sleep_default,zero
+	fetch 4,mem_tx_time_last_delt
+	branch p_g24_short_sleep_default,blank
+p_g24_short_sleep_last_miss:
+	fetcht 4,mem_sleep_miss_temp
+	isolate1 31,temp
+	branch p_sub_miss_temp,true
+	fetch 4,mem_tx_time_last_delt
+	iadd temp,pdata	
+p_g24_short_sleep_notify:
+	fetcht 4,mem_24g_tsniff
+	isub temp,temp
+	storet 4,mem_sleep_miss_temp
+	nbranch p_g24_short_sleep_long,positive
+	fetch 3,mem_24g_short_sleep_set
+	isub temp,pdata
+	nbranch p_g24_short_sleep_2,positive	
+	arg 0x600,temp
+	isub temp,null
+	nbranch p_g24_short_sleep_2,positive
+p_g24_short_sleep2:
+	fetch 3,mem_24g_short_sleep_set
+	call clk2lpo
+	storet 4,mem_sleep_counter
+p_lpm_short_sleep:	
+	fetch 1,mem_fcomp_div
+	beq XTAL_16M,p_lpm_short_sleep_skip_pll_set
+	setarg 0
+	store 3,core_clkpll_ctrl0// close pll
+p_lpm_short_sleep_skip_pll_set:
+	jam 250,mem_tx_time_offset
+	call xtal_fast_wake
+	fetch 4,mem_sleep_counter_all
+	iadd temp,pdata
+	store 4,mem_sleep_counter_all
+	deposit mark
+	store 8,mem_saved_mark
+	arg core_gpio_conf,contr
+	arg mem_saved_gpio,contw
+	call memcpy20
+	fetch 1,core_spid_ctrl
+	store 1,mem_saved_spidctrl
+	call lpm_ctrl3_cfg_dig_vsel
+	fetch 1,core_clksel
+	or_into 0x14,pdata
+	store 1,core_clksel
+	branch lpm_sleep_next
+
+p_sub_miss_temp:
+	arg -1,pdata
+	isub temp,regext
+	fetch 4,mem_tx_time_last_delt
+	isub  regext,pdata	
+	branch p_g24_short_sleep_notify
+
+p_g24_short_sleep_default:
+	call p_g24_miss_temp_clear
+	fetch 3,mem_24g_short_sleep_set
+	branch p_g24_short_sleep2
+
+p_g24_short_sleep_long:
+	sub temp,0,temp
+	fetch 3,mem_24g_short_sleep_set
+	iadd temp,pdata
+	branch p_g24_short_sleep2
+
+p_g24_miss_temp_clear:
+	setarg 0
+	store 4,mem_sleep_miss_temp
+	rtn
+
+p_g24_short_sleep_2:
+	jam 1,mem_sleep_miss
+	rtn
+
+p_send_time_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_24G_500Hz
+	rtnbit1 MOUSE_ENABLE_24G_1000
+	fetch 1,mem_24g_transmit_by_interrupt
+	beq G24_TX_TIMER_INT_ENABLE,p_send_timer_first
+	fetch 1,mem_tx_count
+	branch p_send_timer_first,blank
+	copy clkn,pdata
+	fetcht 6,mem_tx_time_last
+	store 6,mem_tx_time_last
+	call clk_diff_rt
+	store 4,mem_tx_time_last_delt			//unit: 312.5us
+	fetch 1,mem_sleep_miss
+	nrtn blank
+	fetch 2,mem_retransmit
+	nrtn blank
+	fetch 4,mem_sleep_miss_temp
+	nrtn blank
+	fetch 4,mem_tx_time_last_delt
+	fetcht 4,mem_24g_tsniff
+	lshift temp,temp
+	isub temp,null
+	branch p_send_time_long_wake,positive		//losed two package 
+	fetcht 5,mem_tx_time_sum
+	iadd temp,pdata
+	store 5,mem_tx_time_sum	
+	fetcht 1,mem_tx_count
+	fetch 1,mem_tx_time_sum_count
+	isub temp,null
+	branch p_send_time_check_average,zero
+	increase 1,temp
+	storet 1,mem_tx_count
+	rtn
+
+p_send_time_check_average:
+	jam 1,mem_tx_count
+	arg 0,temp
+	fetch 5,mem_tx_time_sum
+	storet 5,mem_tx_time_sum
+	fetcht 1,mem_tx_time_sum_count
+	idiv temp
+	call wait_div_end
+  	quotient rega
+
+	fetch 4,mem_24g_tsniff
+	fetcht 1,mem_tx_time_offset
+	isub temp,temp
+	
+	copy rega,pdata
+	isub temp,pdata
+	branch p_send_time_check_average_late,positive		//averg interval>4ms
+	sub pdata,0,pdata					//averg interval<4ms	
+
+	rshift2 pdata,pdata
+	fetcht 3,mem_24g_short_sleep_set
+	iadd temp,temp
+	fetch 3,mem_24g_short_sleep_set_init
+	arg 0x1800,rega
+	iadd rega,pdata
+	isub temp,null
+	nbranch p_send_time_check_average_min,positive
+	storet 3,mem_24g_short_sleep_set
+	rtn
+
+p_send_time_check_average_late:
+	rshift2 pdata,temp
+	fetch 3,mem_24g_short_sleep_set
+	isub temp,temp
+	fetch 3,mem_24g_short_sleep_set_init
+	arg 0x1800,rega
+	isub rega,pdata
+	isub temp,null
+	branch p_send_time_check_average_min,positive
+	storet 3,mem_24g_short_sleep_set
+	rtn
+
+p_send_time_check_average_min:
+	store 3,mem_24g_short_sleep_set
+	rtn
+
+p_send_timer_first:
+	jam 1,mem_tx_count
+	copy clkn,pdata
+	store 6,mem_tx_time_last
+	rtn
+
+p_g24_transmit_process:
+	setarg 0
+	store 1,mem_24g_retry
+	store 2,mem_retransmit
+p_g24_transmit_loop:
+	call p_g24_transmit_receive_ack
+//	fetch 1,mem_24g_no_ack	//tx noack
+//	beq no_ack_24g,g24_transmit_no_ack
+	nbranch p_g24_retransmit,sync
+	nbranch p_g24_retransmit,user3
+	call p_send_time_check
+	call g24_ackpayload_parse		
+	call p_mouse_wakeup_24g
+	branch g24_transmit_no_ack
+
+p_g24_transmit_receive_ack:
+	disable user3
+	call g24_transmit
+	fetch 1,mem_24g_no_ack
+	beq no_ack_24g,g24_end_of_packet
+	force 0,radio_ctrl
+	fetch 4,mem_24g_addr
+	iforce access
+	call calc_mod_value_scale_le	
+	fetcht 1,mem_last_freq
+	call set_freq_rx
+	nop 300
+	call rf_rx_enable
+	call p_g24_receive_rxon
+	call g24_end_of_packet,user3
+ifdef UART_LOG
+	call p_g24_txbuf_data_print
+endif 
+	rtn
+
+p_g24_receive_packet:
+	fetch 1,mem_24g_rx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call calc_mod_value_scale_le
+	call set_sync_on
+	fetcht 1,mem_24g_ch
+	call le_rf_rx_enable
+p_g24_receive_rxon:
+	call g24_prep
+	bmark0 mark_ble_lr,p_g24_receive_nolr
+	pulse dewhiten_code_calc
+	nop 30
+	call g24_prep
+p_g24_receive_nolr:
+	disable user3
+	enable decode_fec0
+	enable is_rx
+	disable is_tx
+	enable swfine
+	fetch 2,mem_24g_rx_window
+	iforce stop_watch
+	correlate null,timeout
+	nbranch g24_sync_timeout,sync
+	call rf_debug_rx_sync_line
+	bmark1 mark_ble_lr,g24_receive_skip_fec1
+	branch g24_receive_skip_fec1
+
+p_g24_retransmit:
+	fetch 1,mem_mouse_need_soft_reset
+	nrtn blank
+	call p_mouse_select_device_by_pb_button
+	fetch 1,mem_24g_abort_pac
+	nrtn  blank
+	fetch 2,mem_24g_txfail_cnt
+	increase 1,pdata
+	store 2,mem_24g_txfail_cnt	
+	fetch 2,mem_24g_txfail_cnt
+	bbit1 8,g24_tx_attempt_fail
+	call p_g24_transmit_hop_process
+	fetch 2,mem_retransmit
+	increase 1,pdata
+	store 2,mem_retransmit
+//	call p_delay_40ms
+	branch p_g24_transmit_loop
+p_g24_transmit_hop_process:
+	fetcht 1,mem_24g_retry
+	fetch 1,mem_24g_fast_hop_count		// 125Hz=30  250Hz=15
+	isub temp,null
+	nbranch p_g24_tx_fast_hop,positive		// >= (6+6)or(3+3) hop fast    fail packet count >= 2
+	increase 1,temp
+	storet 1,mem_24g_retry
+	fetch 1,mem_24g_fast_hop_count
+	beq 5,p_g24_transmit_hop_process_1ms
+	beq 8,p_g24_transmit_hop_process_2ms
+	beq 15,p_g24_transmit_hop_process_4ms
+	fetch 1,mem_24g_retry
+	beq 20,g24_hop_ch_disable
+	beq 30,g24_hop_ch_disable
+	rtn		
+p_g24_transmit_hop_process_4ms:
+	fetch 1,mem_24g_retry
+	beq 10,g24_hop_ch_disable
+	beq 15,g24_hop_ch_disable
+	rtn
+
+p_g24_transmit_hop_process_2ms:
+	fetch 1,mem_24g_retry
+	beq 6,g24_hop_ch_disable
+	beq 9,g24_hop_ch_disable
+	rtn
+
+p_g24_transmit_hop_process_1ms:
+	fetch 1,mem_24g_retry
+	beq 3,g24_hop_ch_disable
+	beq 5,g24_hop_ch_disable
+	rtn
+
+p_g24_tx_fast_hop:
+ifdef PW_CTRL
+	call power_ctrl_txpower_incrs
+	call power_ctrl_pac_succ_decrs
+endif
+	call p_delay_40ms
+	branch g24_ch
+
+p_delay_40ms:
+	fetch 1,mem_24g_txfail_cnt
+	sub pdata,0x80,null
+	rtn positive
+	jam 1,mem_mouse_24g_clear_sensor_data_flag
+	arg 40,loopcnt
+	branch delay_ms_wait
+
+p_mouse_select_device_by_pb_button:
+	fetch 1,mem_config_select_device_button_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	jam MOUSE_PB_KEY,mem_mouse_key_temp
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_pb_button_check
+	store 1,mem_mouse_pbkey_press_status
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,p_mouse_3io6key_pb_button_check_end	
+	call mouse_matrix_public_gpio_reset
+p_mouse_select_device_by_pb_button_exit:	
+	copy rega,pdata
+	bbit1 MOUSE_PB_KEY,mouse_select_device_button_down+2
+	branch mouse_select_device_button_up
+
+p_mouse_3io6key_pb_button_check_end:
+	fetcht 1,mem_config_select_device_button_gpio
+	call mouse_gpio_config_input_pu
+	branch p_mouse_select_device_by_pb_button_exit
+
+p_mouse_wakeup_24g:
+	fetch 1,mem_sensor_shutdown_flag
+	ncall p_mouse_wakeup_24g_from_long_sleep,blank
+	jam 0,mem_sensor_shutdown_flag
+	rtn	
+
+p_mouse_wakeup_24g_from_long_sleep:
+	call p_mouse_init_sensor_wakeup
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+p_mouse_wheel_set_wakeup:
+	fetch 1,mem_whee_a_data_gpio
+	call mouse_gpio_config_input_pu
+	fetch 1,mem_whee_b_data_gpio
+	branch mouse_gpio_config_input_pu
+
+p_mouse_start_work:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_ADC,p_mouse_start_work_next
+	call enable_adc
+	call vdd_calculate_by_mode
+	store 2,mem_mouse_vdd_now_vol
+	fetcht 2,mem_2v_adc_vinlpm_data
+	fetch 2,mem_adc_current_value
+	isub temp,null
+	branch p_mouse_start_work,positive
+	arg mem_mouse_vdd_calculate_set,rega
+	call mouse_adc_bat_percent_lowpower_out
+	fetch 1,mem_adc_power_flag
+	bbit1 1,mouse_app_enter_hibernate
+p_mouse_start_work_next:	
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,p_mouse_24g_first_start_auto_pair_mode
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,p_mouse_24g_start_mode
+p_mouse_le_fast_conn_judge:
+	call p_mouse_device_le_reconn_led_config
+	call mouse_bluetooth_fast_conn_disable
+	fetch 1,mem_device_flag
+	beq MODE_BT_DEVICE1,p_mouse_le_device1_judge
+	beq MODE_BT_DEVICE2,p_mouse_le_device2_judge
+	rtn
+
+p_mouse_le_device1_judge:
+	fetch 6,mem_device1_addr
+	fetcht 6,mem_mouse_compare_addr_ff
+	isub temp,null
+	branch mouse_buletooth_fast_conn_init,zero
+	branch mouse_start_reconnect_device
+
+p_mouse_le_device2_judge:
+	fetch 6,mem_device2_addr
+	fetcht 6,mem_mouse_compare_addr_ff
+	isub temp,null
+	branch mouse_buletooth_fast_conn_init,zero
+	branch mouse_start_reconnect_device
+
+p_mouse_24g_first_start_auto_pair_mode:
+	call mouse_wakeup_from_power_check
+	branch mouse_24g_first_start_reconn,user  	// wake from hibernate :enble user
+p_mouse_24g_reconn_general_dongle:
+	jam MODE_24G_DEVICE,mem_device_flag
+	fetch 2,mem_mouse_24g_power_on_fast_conn_timer
+	store 2,mem_24g_reconn_timeout
+	jam FAST_CONN_AND_RECEIVER,mem_24g_reconn_type
+	branch g24_reconn_start
+
+p_mouse_24g_start_mode:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G,mouse_24g_mode_setup_error
+	call p_mouse_device_pair_led_config
+	call mouse_wakeup_from_power_check	// wake from hibernate :enble user
+	branch mouse_24g_reconn_dongle_start,user
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,p_mouse_24g_reconn_general_dongle
+	bbit0 MOUSE_ENABLE_24G_POWER_ON_PAIRING,mouse_24g_reconn_general_dongle
+	call mouse_key_check_once		// pdata output:00
+	and rega,0x07,pdata
+	fetcht 1,mem_mouse_commbination_key_24g
+	isub temp,null
+	branch p_mouse_24g_start_pair_mode,zero
+	branch mouse_24g_reconn_general_dongle
+
+p_g24_transmit:
+	fetch 1,mem_24g_tx_phy
+	call le_enable_phy_by_pdata
+	fetch 4,mem_24g_addr
+	iforce access
+	call g24_prep
+	call g24_set_freq_tx
+	set1 TXGFSK,radio_ctrl
+	enable encode_fec0
+	enable is_tx
+	disable is_rx
+	call rf_debug_tx_on_line
+	disable lr_s2en
+	bmark1 mark_ble_lr,g24_transmit_lr
+	bmark1 mark_ble_2M,p_g24_transmit_2M
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,pdata
+	inject mod,40
+p_g24_transmit_packet:
+	bmark1 mark_ble_lr,g24_transmit_nolr
+	branch g24_transmit_nolr
+
+p_g24_transmit_2M:
+	fetch 1,mem_system_clk
+	rshift pdata,loopcnt
+p_g24_transmit_2M_dealy:
+	nop 2
+	loop p_g24_transmit_2M_dealy
+//	nop 36	
+	rshift16 access,pdata
+	rshift8 pdata,pdata
+	rshift4 pdata,temp
+	copy temp,pdata
+	inject mod,8
+	copy temp,pdata
+	inject mod,40
+	branch p_g24_transmit_packet	
+
+////////////////////////////////////////////////led multi start////////////////////////////////////////////////
+
+
+p_mouse_bb_event_timer:	
+	call mouse_adc_read
+	call p_mouse_low_voltage_led_timer
+	//24g
+	call g24_pair_timeout_timer
+	call g24_reconn_timeout_timer
+	call p_mouse_24g_long_sleep_param_update_timer
+	//led
+	call p_mouse_led_multi_timer
+	call p_mouse_dpi_led_timer
+	call mouse_dpi_key_check_long_press
+	call p_mouse_bt_discovery_check
+	call p_mouse_commbination_key_process
+	call mouse_check_discovery_timeout_timer
+ifdef BLE
+	//ble
+	call p_mouse_check_direct_timeout_timer
+	call mouse_le_enable_att_list_timer
+	call p_mouse_le_battery_updata_timer
+	call mouse_le_send_smp_security_request_timer
+	call p_mouse_le_send_conn_param_update_timer
+endif
+ifdef CLASSIC
+	//bt
+	call mouse_check_hid_handshake_timer
+	call mouse_bt_check_sniff_req_timeout_timer
+	call mouse_check_reconnect_delay_long_sleep		//delete 3.0,reconnect fail
+endif
+	call mouse_current_mult_update_timer
+	call mouse_wheel_trigger_timer
+	call p_mouse_store_information_delay_timer
+ifdef LOGO_LED
+	call p_mouse_logo_led_on_timer
+endif
+	branch p_mouse_check_no_data_timeout_timer
+
+p_mouse_24g_long_sleep_param_update_timer:
+	arg mem_24g_long_sleep_param_update_timer,regc
+	arg p_mouse_24g_long_sleep_normal_param,regb
+	branch timer_single_step
+
+p_mouse_24g_long_sleep_normal_param:
+	call p_mouse_24g_hibernate_set_check
+	branch mouse_24g_long_sleep_normal_param
+	
+//-------------------------dpi led fuction--------------------------//
+p_mouse_dpi_led_timer:
+	fetch 1,mem_mouse_dpi_led_blink_enable
+	rtn blank
+	fetch 1,mem_mouse_dpi_blink_time
+	pincrease 1
+	store 1,mem_mouse_dpi_blink_time
+	beq 3,p_mouse_dpi_led_on
+	beq 6,p_mouse_dpi_led_off_check
+	rtn
+p_mouse_dpi_led_on:
+	fetch 1,mem_mouse_led_multi_type
+	bbit1 LED_MULTI_DPI,p_mouse_device_multi_led_on
+	fetcht 1,mem_mouse_1io2led_dpi_led
+	branch gpio_out_active
+
+p_mouse_dpi_led_off_check:
+	jam 0,mem_mouse_dpi_blink_time
+	fetch 1,mem_mouse_dpi_blink_count
+	increase -1,pdata
+	store 1,mem_mouse_dpi_blink_count
+	nbranch p_mouse_dpi_led_off,blank
+	jam 0,mem_mouse_dpi_led_blink_enable
+p_mouse_dpi_led_off:
+	fetch 1,mem_mouse_led_multi_type
+	bbit1 LED_MULTI_DPI,p_mouse_device_multi_led_off
+	fetcht 1,mem_mouse_1io2led_dpi_led
+	branch gpio_out_inactive
+
+//-------------------------adc fuction--------------------------//
+p_mouse_adc_read_start:
+	jam 0,mem_adc_read_timer
+	call enable_adc
+	call vdd_calculate_by_mode
+	store 2,mem_mouse_vdd_now_vol
+	fetch 1,mem_adc_config_flag
+	bne ADC_CONFIG_GPIO, p_mouse_adc_data_process
+	fetcht 2,mem_mouse_vdd_now_vol	// BAT= 1.5V, R = 200k, a = a*1.8
+	mul32 temp,8,pdata
+	div pdata,10
+	call get_div_result
+	iadd temp,pdata
+	store 2,mem_mouse_vdd_now_vol
+p_mouse_adc_data_process:	
+	arg mem_mouse_vdd_calculate_set,rega
+	call mouse_adc_bat_percent_lowpower_out
+	fetch 1,mem_adc_power_flag
+	bbit1 1,mouse_power_down
+	bbit0 0,p_mouse_adc_no_low_voltage
+	jam 1,mem_mouse_adc_last_low_voltage_flag
+	branch mouse_adc_low_voltage
+
+p_mouse_adc_no_low_voltage:
+	arg MOUSE_LOW_VOLTAGE_FLAG,queue
+	call mouse_disable_function_flag
+	jam 12,mem_adc_low_volatage_led_timer_count
+	fetch 1,mem_mouse_adc_last_low_voltage_flag
+	rtn blank
+	jam 0,mem_mouse_adc_last_low_voltage_flag
+p_mouse_low_voltage_led_off:
+	fetch 1,mem_mouse_led_multi_type
+	bbit1 LED_MULTI_LOW,p_mouse_device_multi_led_off
+	fetcht 1,mem_mouse_1io2led_low_led
+	branch gpio_out_inactive
+
+//-------------------------low voltage led fuction--------------------------//
+p_mouse_low_voltage_led_timer:
+	fetch 1,mem_mouse_pair_success
+	rtn blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_LOW_VOLTAGE_FLAG
+	fetch 1,mem_adc_low_volatage_led_timer_count
+	increase 1,pdata
+	store 1,mem_adc_low_volatage_led_timer_count
+	sub pdata,20,null
+	ncall p_mouse_low_volatage_led_timer_count_clean,positive
+	sub pdata,10,null
+	branch p_mouse_low_voltage_led_off,positive
+p_mouse_low_voltage_led_on:
+	fetch 1,mem_mouse_led_multi_type
+	bbit1 LED_MULTI_LOW,p_mouse_device_multi_led_on
+	fetcht 1,mem_mouse_1io2led_low_led
+	branch gpio_out_active
+	
+p_mouse_low_volatage_led_timer_count_clean:
+	jam 1,mem_adc_low_volatage_led_timer_count
+	rtn
+
+//----------------------------------led function start--------------------------------//
+p_mouse_led_multi_parm_init:
+	jam 0,mem_mouse_multi_led_blink_enable		//led new interface init
+	jam 0,mem_mouse_dpi_led_blink_enable
+	jam 0,mem_mouse_dpi_blink_time
+p_mouse_device_led_all_off:
+	call p_mouse_device_24g_led_off
+	call p_mouse_device_bt1_led_off
+	call p_mouse_device_bt2_led_off
+	call p_mouse_dpi_led_off
+	branch p_mouse_low_voltage_led_off
+
+p_mouse_led_multi_timer:
+	fetch 1,mem_mouse_multi_led_blink_enable
+	rtn blank
+	fetch 1,mem_mouse_multi_led_type
+	beq MULTI_LED_BLINK,p_mouse_multi_led_type_blink
+p_mouse_device_multi_led_type_on:
+	fetch 1,mem_mouse_multi_led_powon_timer
+	branch p_mouse_device_poweron_led_off,blank
+	increase -1,pdata
+	store 1,mem_mouse_multi_led_powon_timer
+	branch p_mouse_device_multi_led_on
+
+p_mouse_device_poweron_led_off:
+	jam 1,mem_mouse_pair_success
+	jam 0,mem_mouse_multi_led_powon_timer
+p_mouse_multi_led_blink_disable:
+	jam 0,mem_mouse_multi_led_blink_enable
+	branch p_mouse_device_multi_led_off
+
+p_mouse_multi_led_type_blink:
+	arg mem_mouse_multi_led_blink_timer,regc
+	arg p_mouse_multi_led_blink_start,regb
+	branch timer_single_step
+
+p_mouse_multi_led_blink_start:
+	call p_mouse_multi_led_blink_timer_init
+	fetch 1,mem_mouse_multi_led_state
+	beq ON,p_mouse_device_multi_led_off
+p_mouse_device_multi_led_on:
+	jam ON,mem_mouse_multi_led_state
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,p_mouse_device_24g_led_on
+	beq MODE_BT_DEVICE1,p_mouse_device_bt1_led_on
+	beq MODE_BT_DEVICE2,p_mouse_device_bt2_led_on
+	rtn
+p_mouse_device_multi_led_off:
+	jam OFF,mem_mouse_multi_led_state
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,p_mouse_device_24g_led_off
+	beq MODE_BT_DEVICE1,p_mouse_device_bt1_led_off
+	beq MODE_BT_DEVICE2,p_mouse_device_bt2_led_off
+	rtn
+
+p_mouse_device_24g_led_on:
+	fetcht 1,mem_mouse_1io2led_multi_24gled
+	branch gpio_out_active
+p_mouse_device_bt1_led_on:
+	fetcht 1,mem_mouse_1io2led_multi_bt1led
+	branch gpio_out_active
+p_mouse_device_bt2_led_on:
+	fetcht 1,mem_mouse_1io2led_multi_bt2led
+	branch gpio_out_active
+
+p_mouse_device_24g_led_off:
+	fetcht 1,mem_mouse_1io2led_multi_24gled
+	branch gpio_out_inactive
+p_mouse_device_bt1_led_off:
+	fetcht 1,mem_mouse_1io2led_multi_bt1led
+	branch gpio_out_inactive
+p_mouse_device_bt2_led_off:
+	fetcht 1,mem_mouse_1io2led_multi_bt2led
+	branch gpio_out_inactive
+
+p_mouse_multi_led_blink_timer_init:
+	fetch 1,mem_mouse_multi_led_blink_timer_init
+	store 1,mem_mouse_multi_led_blink_timer
+	rtn
+
+//-----led enable confuction-----//
+p_mouse_device_poweron_led_config:		//power on
+	fetch 1,mem_mouse_led_new_interface_enable
+	rtn blank
+	jam 20,mem_mouse_multi_led_powon_timer
+	jam MULTI_LED_ON,mem_mouse_multi_led_type
+	jam ON,mem_mouse_multi_led_blink_enable
+	rtn
+
+p_mouse_device_pair_led_config:				//24g pair led config
+	fetch 1,mem_mouse_led_new_interface_enable
+	rtn blank
+	jam 2,mem_mouse_multi_led_blink_timer_init
+p_mouse_multi_led_blink_enable:
+	jam OFF,mem_mouse_multi_led_state
+	jam 3,mem_mouse_multi_led_blink_timer
+	jam ON,mem_mouse_multi_led_blink_enable
+	jam MULTI_LED_BLINK,mem_mouse_multi_led_type
+	branch p_mouse_device_multi_led_on
+
+p_mouse_device_discovery_led_config:		//ble discovery led config
+	fetch 1,mem_mouse_led_new_interface_enable
+	rtn blank
+	jam 2,mem_mouse_multi_led_blink_timer_init
+	branch p_mouse_multi_led_blink_enable
+
+p_mouse_device_le_reconn_led_config:		//le recon led config
+	fetch 1,mem_mouse_led_new_interface_enable
+	rtn blank
+	fetch 1,mem_mouse_le_reconn_led_fuction_enable
+	rtn blank
+	jam 5,mem_mouse_multi_led_blink_timer_init
+	branch p_mouse_multi_led_blink_enable
+
+//---------------------------------led function end--------------------------------//
+
+
+p_mouse_commbination_key_process:
+	fetch 1,mem_device_flag
+	beq MODE_24G_DEVICE,p_mouse_24g_commbination_key_process
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_COMMBINATION_KEY_BY_BT_DISCOVERY
+	fetcht 1,mem_mouse_commbination_key_bt
+	branch p_mouse_commbination_key_start
+
+p_mouse_24g_commbination_key_process:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_COMMBINATION_KEY_BY_24G_PAIRING
+	fetcht 1,mem_mouse_commbination_key_24g
+p_mouse_commbination_key_start:
+	storet 1,mem_mouse_commbination_key
+	call mouse_check_key_gpio
+	and pdata,0x07,pdata
+	fetcht 1,mem_mouse_commbination_key
+	isub temp,null
+	branch p_mouse_commbination_key_down,zero
+	branch mouse_commbination_key_up
+
+p_mouse_commbination_key_down:		// enter hibernate when reconnect
+	call p_mouse_combination_ui_timer
+	fetch 1,mem_commbination_key_statue
+	rtneq COMMBINATION_KEY_STATE_DOWN
+	jam COMMBINATION_KEY_STATE_DOWN,mem_commbination_key_statue
+	rtn
+
+p_mouse_combination_ui_timer:
+	arg p_mouse_24g_start_pair_mode,regb
+	branch mouse_combination_ui_timer+1
+
+ifdef BLE
+p_mouse_check_direct_timeout_timer:
+	arg mem_mouse_direct_timer,regc
+	arg mouse_check_direct_timeout,regb
+	call timer_single_step
+	branch mouse_check_direct_timeout_timer+3
+
+p_mouse_le_battery_updata_timer:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+	branch mouse_le_battery_updata_timer
+
+p_mouse_le_send_conn_param_update_timer:
+	arg mem_mouse_le_send_conn_param_update_timer,regc
+	arg mouse_updata_le_param,regb
+	branch timer_single_step
+endif
+
+p_mouse_check_no_data_timeout_timer:
+	arg mem_mouse_no_data_timer,regc
+	arg p_mouse_check_no_data_timeout,regb
+	branch timer_single_step_2B
+
+p_mouse_check_no_data_timeout:
+	fetch 1,mem_usb_addr
+	rtnbit1 7
+	fetch 1,mem_device_flag
+	bne MODE_24G_DEVICE,mouse_disconnect
+p_mouse_24g_hibernate_set:
+	jam 0,mem_24g_attempt_fail_flag
+	call g24_transmit_next_packet
+	setarg -1
+	store 4,mem_24g_enter_hibernate
+	setarg 0
+	store 7,mem_mouse_key
+	jam 1,mem_sensor_shutdown_flag
+	call p_mouse_sensor_powerdown
+	call p_mouse_24g_hibernate_set_check
+	branch p_g24_long_sleep
+
+p_mouse_24g_hibernate_set_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_500Hz,g24_transmit_by_interrupt_exit
+	bbit1 MOUSE_ENABLE_24G_1000,g24_transmit_by_interrupt_exit
+	rtn
+	
+p_mouse_store_information_delay_timer:
+	arg mem_store_information_delay_timer,regc
+	arg p_mouse_store_device_info_check,regb
+	branch timer_single_step
+p_mouse_store_device_info_check:
+	call p_mouse_sensor_spi_clr
+	call mouse_store_device_info
+	call p_mouse_flash_spi_clr
+	fetch 1,mem_mouse_need_soft_reset
+	rtn blank
+p_mouse_soft_reset:
+	call p_enable_rc_clock
+	branch mouse_soft_reset
+
+p_mouse_sensor_spi_clr:
+	fetcht 1,mem_mouse_sensor_sclk_gpio
+ 	call mouse_gpio_config_input_pu
+ 	fetcht 1,mem_mouse_sensor_sdio_gpio
+ 	branch mouse_gpio_config_input_pu
+
+p_mouse_flash_spi_clr:
+	fetcht 1,mem_spi_cs_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_spi_sclk_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_spi_si_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_spi_so_gpio
+	branch mouse_gpio_config_input_pu
+
+p_mouse_store_device_info:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_EEPROM,mouse_store_eeprom_device_info
+	call spid_init_flash
+	call mouse_spid_flash_release_form_powerdown
+	call mouse_flash_erase_sector
+	call spid_unlock_flash
+	branch mouse_store_flash_device_info+3
+
+	
+ifdef LOGO_LED
+p_mouse_logo_led_on_timer:
+	fetch 1,mem_mouse_logo_led_gpio
+	rtneq GPIO_DISABLE
+	fetch 2,mem_mouse_no_data_timer
+	rtn blank
+	fetch 2,mem_mouse_no_data_timeout
+	fetcht 2,mem_mouse_no_data_timer
+	isub temp,temp
+	fetch 2,mem_mouse_logo_led_on_time_init
+	isub temp,pdata
+	branch p_mouse_logo_led_on,positive
+p_mouse_logo_led_off:
+	fetcht 1,mem_mouse_logo_led_gpio
+	branch gpio_out_inactive
+
+p_mouse_logo_led_on:
+	fetcht 1,mem_mouse_logo_led_gpio
+	branch gpio_out_active	
+endif
+
+////////////////////////////////////////////////led multi end////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////sensor init start////////////////////////////////////////////
+p_mouse_init_sunt:
+	call mouse_sensor_spi_init
+	rtn wake
+p_mouse_init_sensor_wakeup:	
+	call mouse_sensor_poweron
+p_mouse_init_sensor:
+	call mouse_read_sensor_id
+	beq P32XX_ID1,p_mouse_init_p32xx_id2_judge
+	beq P3065_ID1,mouse_init_p3065
+	beq PKA8G2_ID1,p_mouse_ka8g2_id2_judge
+	call mouse_twspi_reset
+	nop 6900
+	branch p_mouse_init_sensor
+
+p_mouse_init_p32xx_id2_judge:
+	fetch 1,mem_sensor_id2
+	and_into 0xf0,pdata
+	beq P3204_TJDM_ID2,mouse_p3065xy_init_param
+	branch mouse_init_p32xx_id2_judge
+
+
+p_mouse_ka8g2_id2_judge:
+	fetch 1,mem_sensor_id2
+	beq KA5857_ID2,p_mouse_ka5857_init_param
+	beq PKA8G2_ID2,mouse_ka8g2_init_param
+	branch p_mouse_init_sensor
+
+p_mouse_ka5857_init_param:
+	jam KA5857,mem_config_sensor_type
+	arg mem_sensor_ka5857_init,regc
+	branch p_mouse_sensor_poweron_end
+
+p_mouse_sensor_poweron:
+	call mouse_sensor_spi_init
+	fetch 1,mem_config_sensor_type
+	beq KA8G2,p_mouse_ka8g2_sensor_init
+p_mouse_sensor_poweron_next:
+	call mouse_sensor_reset
+	arg mem_sensor_poweron_init,regc
+p_mouse_sensor_poweron_end:
+	call mouse_sensor_wr_seq
+	branch p_mouse_seting_sensor_type
+	
+p_mouse_ka8g2_sensor_init:
+	call p_mouse_ka8g2_sensor_reset
+	arg mem_ka8g2_sensor_poweron_init,regc
+	branch p_mouse_sensor_poweron_end
+	
+p_mouse_sensor_powerdown:
+	call mouse_init_sunt
+	call mouse_sensor_spi_init
+	fetch 1,mem_config_sensor_type
+	beq KA8G2,p_mouse_ka8g2_sensor_powerdown
+	branch mouse_sensor_powerdown_end
+p_mouse_ka8g2_sensor_powerdown:
+	setarg 0x1f06		
+	branch twspi_write
+
+p_mouse_app_enter_hibernate:	// 1.3mA hibernate after sensroe reset
+	setarg PAN_REG_CONFIG
+	call twspi_read
+	bbit1 3,mouse_app_enter_hibernate+3
+	call p_mouse_sensor_reset
+	call p_mouse_sensor_powerdown
+	branch mouse_app_enter_hibernate+3
+
+p_mouse_sensor_reset:
+	fetch 1,mem_config_sensor_type
+	beq KA8G2,p_mouse_ka8g2_sensor_reset
+	branch mouse_sensor_reset
+p_mouse_ka8g2_sensor_reset:
+	setarg 0x9706		// reset to factory settings
+	branch mouse_sensor_reset_end
+
+
+////////////////////////////////////////////////sensor init end////////////////////////////////////////////
+	
+	
+p_mouse_setgpio_hibernate:
+	call mouse_set_sdio_high
+	call clear_wake
+ifdef LOGO_LED
+	call p_mouse_logo_led_off
+endif
+	call mouse_before_hibernate_wheel_gpio_set
+	fetcht 1,mem_matrix_public_gpio		// enable b4/b5/dpi wakeup
+	call gpio_out_active
+	fetcht 1,mem_matrix_public_gpio
+	call gpio_clr_wake
+	fetch 1,mem_mouse_sensor_sdio_gpio
+	call p_mouse_gpio_config_output_high
+	call mouse_lpm_before_common
+	call mouse_gpio_pu_idle
+	arg 0x01,temp
+	call gpio_config_output
+	arg 19,temp
+	call mouse_gpio_config_input_pu
+	call p_mouse_device_led_all_off
+//	call p_mouse_gpio_set_high_impedance
+	call p_mouse_device_switch_gpio_high_impedance
+//	call p_mouse_adc_gpio_set_before_hibernate
+	call p_mouse_wheel_gpio_set_before_hibernate
+	arg 0x00,temp
+	branch gpio_clr_wake
+/*
+p_mouse_gpio_set_high_impedance:
+	fetch 3,mem_mouse_set_high_impedance_bit_set
+	store 3,mem_pdatatemp
+	arg 20,loopcnt
+	arg 0,temp
+p_mouse_gpio_set_high_impedance_bit_loop:	
+	fetch 3,mem_pdatatemp
+	isolate1 0,pdata
+	call gpio_set_high_impedance,true
+	fetch 3,mem_pdatatemp
+	rshift pdata,pdata
+	store 3,mem_pdatatemp
+	increase 1,temp
+	loop p_mouse_gpio_set_high_impedance_bit_loop
+	rtn
+*/
+p_mouse_device_switch_gpio_high_impedance:
+	fetch 1,mem_device_switch_gpio
+	rtneq GPIO_DISABLE
+	fetcht 1,mem_device_switch_gpio
+	branch gpio_set_high_impedance
+	
+/*
+p_mouse_adc_gpio_set_before_hibernate:	
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_ADC
+//	fetch 1,mem_adc_config_flag_init
+//	rtnne ADC_CONFIG_GPIO
+//	fetch 1,mem_adc_channel_gpio	
+	arg 0x0a,pdata
+	arg gpcfg_no_ie,temp
+ 	branch gpio_config_function_int
+*/
+p_mouse_wheel_gpio_set_before_hibernate:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+p_mouse_wheel_clr_wakeup:
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_clr_wake
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_clr_wake
+		
+	fetcht 1,mem_whee_a_data_gpio
+	call mouse_gpio_config_input_pd
+	fetcht 1,mem_whee_b_data_gpio
+	branch mouse_gpio_config_input_pd
+
+p_mouse_short_sleep_clear_wake:
+	call clear_wake
+	branch lpm_write_gpio_wakeup
+
+p_mouse_lpm_before_common:
+	fetcht 1,mem_whee_a_data_gpio		//reinit gpio pu after disable wheel wakeup
+	call gpio_config_input
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_config_input
+	branch mouse_lpm_before_common+1
+	
+
+/////////////////////////////////////////////////dpi process start////////////////////////////////////////////
+p_mouse_idle:
+	call mouse_low_voltage_led_no_enter_lpm
+	call ui_check_paring_button
+	call p_mouse_dpi_check
+	call p_mouse_select_device_check
+	call p_mouse_check_select_device_by_switch
+	call mouse_bt_button_check
+	call mouse_wheel_check
+ifdef USB
+	call p_mouse_usb_isr
+	call p_mouse_usb_mode
+	call p_mouse_usb_mode_flag_check
+endif
+	rtn
+
+p_mouse_select_device_check:
+	fetch 1,mem_usb_mode_enable
+	nrtn blank
+	branch mouse_select_device_check
+
+p_mouse_check_select_device_by_switch:
+	fetch 1,mem_usb_mode_enable
+	nrtn blank
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO	
+	fetcht 1,mem_device_switch_gpio
+	call mouse_gpio_config_input_pu
+	fetcht 1,mem_device_switch_gpio
+	call gpio_get_bit
+	branch mouse_check_select_24g_device,true
+p_mouse_select_btdevice:
+	fetch 1,mem_device_flag
+	rtneq MODE_BT_DEVICE1
+	jam MODE_BT_DEVICE1,mem_device_flag
+	branch mouse_soft_reset
+	
+p_mouse_check_select_24g_device:	
+	fetch 1,mem_device_flag
+	rtneq MODE_24G_DEVICE
+	jam MODE_24G_DEVICE,mem_device_flag
+	branch mouse_soft_reset
+	
+p_mouse_bt_discovery_check:
+	fetch 1,mem_usb_mode_enable
+	nrtn blank
+	branch mouse_bt_discovery_check
+
+
+p_mouse_dpi_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC,mouse_dpi_check_connect_adc
+	fetch 1,mem_dpi_button_gpio
+	rtneq GPIO_DISABLE
+	arg 0,rega
+	jam MOUSE_DPI_KEY,mem_mouse_key_temp
+	fetcht 1,mem_dpi_button_gpio
+	call p_mouse_dpi_key_check
+	branch mouse_dpi_check_next
+
+p_mouse_dpi_key_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_DPI_KEY_CONNECT_GND,mouse_dpi_key_connect_gnd
+	fetch 1,mem_mouse_dpikey_press_status
+	copy pdata,regc
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,p_mouse_3io6key_dpi_check
+	branch mouse_dpi_key_check_next
+p_mouse_3io6key_dpi_check:
+	fetch 1,mem_dpi_button_gpio
+	call p_mouse_gpio_config_output_low
+	fetcht 1,mem_dpi_button_gpio
+	branch mouse_3io6key_check
+
+p_mouse_dpi_process:
+	call mouse_dpi_ghost_check
+	rtn user
+	fetch 1,mem_mouse_dpi
+	increase 1,pdata
+	and pdata,0x03,pdata
+	store 1,mem_mouse_dpi
+	call p_mouse_seting_dpi
+	call p_mouse_dpi_led_blink_init
+	branch mouse_store_device_info_delay
+
+p_mouse_seting_dpi:
+	call mouse_setting_dpi_4_level
+p_mouse_seting_sensor_type:
+	fetch 1,mem_config_sensor_type
+	beq KA5857,mouse_seting_3212_dpi
+	branch mouse_seting_sensor_type
+
+p_mouse_dpi_led_blink_init:
+	fetch 1,mem_mouse_pair_success
+	rtn blank
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,p_mouse_dpi_level_2
+	beq MOUSE_DPI_LEVEL2,p_mouse_dpi_level_3
+	beq MOUSE_DPI_LEVEL3,p_mouse_dpi_level_1
+	rtn
+
+p_mouse_dpi_level_1:
+	setarg 1
+	branch p_mouse_dpi_blink_count_init
+p_mouse_dpi_level_2:
+	setarg 2
+	branch p_mouse_dpi_blink_count_init
+p_mouse_dpi_level_3:
+	setarg 3	
+p_mouse_dpi_blink_count_init:
+	store 1,mem_mouse_dpi_blink_count
+	jam 1,mem_mouse_dpi_led_blink_enable
+	rtn
+
+/////////////////////////////////////////////////dpi process end////////////////////////////////////////////
+
+
+////////////////////////////////////////////////bb event start///////////////////////////////////////////////
+p_mouse_priority_bb_event:	
+	copy regc,pdata
+	beq BT_EVT_24G_ATTEMPT_SUCCESS,p_mouse_24g_attempt_success
+	beq BT_EVT_24G_PAIRING_COMPLETE,p_mouse_24g_pairing_complete
+	beq BT_EVT_24G_ATTEMPT_FAIL,p_mouse_24g_attempt_fail
+ifdef BLE	
+	beq BT_EVT_LE_START_ENC,p_mouse_le_ll_start_encryt
+	beq BT_EVT_LE_DISCONNECTED,p_mouse_le_bb_disconnected
+	beq BT_EVT_LE_CONNECTED,p_mouse_le_bb_event_connected
+	beq BT_EVT_LE_PARSE_CONN_PAPA_UPDATE_RSP,p_mouse_le_conn_param_update_rsp_recieved	
+endif
+	beq BT_EVT_BB_DISCONNECTED,p_mouse_bb_disconnected
+ifdef CLASSIC
+	beq BT_EVT_BB_CONNECTED,p_mouse_bb_event_connected
+	beq BT_EVT_HID_HANDSHAKE,p_mouse_bt_hid_handshake
+	beq BT_EVT_HID_CONNECTED,p_app_hid_connected
+endif
+	branch mouse_priority_bb_event+2
+
+ifdef CLASSIC	
+p_mouse_bt_hid_handshake:
+	jam APP_HANDSHAKE_DONE,mem_app_handshake_flag
+	call app_lpm_mult_enable
+	branch mouse_bt_hid_handshake+3
+
+p_app_hid_connected:
+	call mouse_no_data_timer_init
+	call mouse_init_sensor_reset
+	call p_mouse_device_poweron_led_config
+	branch app_hid_connected
+
+p_mouse_bb_event_connected:
+	jam 0,mem_mouse_long_mult_flag
+	branch mouse_bb_event_connected+2
+endif
+
+p_mouse_bb_disconnected:
+	jam 0,mem_mouse_enter_sniff_count	
+	jam 0,mem_mouse_bt_send_first_package_flag
+	call mouse_bt_sniff_param_interval_setup
+	call mouse_bb_discon_clear_stack
+	fetch 1,mem_usb_mode_enable
+	nrtn blank
+	branch mouse_bb_disconnected+4
+
+p_mouse_agc_disable_nomal_power:
+	call p_mouse_soft_agc_disable
+	branch p_mouse_fetch_normal_tx_power
+
+p_mouse_24g_pairing_complete:
+	call p_mouse_agc_disable_nomal_power
+	call mouse_no_data_timer_init
+	call p_mouse_device_poweron_led_config
+	branch mouse_24g_pairing_complete
+	
+p_mouse_24g_attempt_success:
+	fetch 4,mem_24g_addr
+	store 4,mem_24g_receiver_addr
+	store 4,mem_mouse_24g_addr		// if need store 24g address to eeprom/flash,need get mem_24g_addr
+	call g24_ch_syncword_crc8_init
+	call mouse_no_data_timer_init
+	call mouse_init_sensor_reset
+	jam 0,mem_mouse_long_mult_flag
+	jam 0,mem_24g_conn_sm
+	jam 0,mem_24g_reconn_type
+	fetch 4,mem_24g_receiver_addr
+	fetcht 4,mem_24g_fast_conn_addr
+	isub temp,null
+	rtn zero
+	call p_mouse_device_poweron_led_config
+	call p_mouse_agc_disable_nomal_power
+	branch mouse_24g_first_store_reconn_info
+
+p_mouse_24g_attempt_fail:
+	jam 0,mem_mouse_pair_success
+	call p_mouse_agc_disable_nomal_power
+	fetch 1,mem_24g_attempt_fail_flag
+	nbranch p_mouse_24g_hibernate_set,blank
+	fetch 1,mem_24g_reconn_type
+	beq FAST_CONN_AND_3_0_ADDR,p_mouse_24g_fast_conn_attempt_fail
+	beq FAST_CONN_AND_RECEIVER,p_mouse_24g_fast_conn_attempt_fail
+	beq PAIR_AND_RECEIVER,mouse_24g_auto_pair_attempt_fail
+	branch mouse_24g_attempt_fail+4
+
+p_g24_nodata_transmit:
+	fetch 1,mem_24g_abort_pac
+	call p_g24_send_abort_packet,blank
+	fetch 1,mem_24g_transmit_by_interrupt
+	rtneq G24_TX_TIMER_INT_ENABLE
+	call g24_search_receiver
+p_g24_long_sleep:
+	call g24_lpm_wait
+	nrtn user
+	call g24_setgpio_lpm_before
+	jam 0,mem_sleep_miss
+	jam 1,mem_long_sleep_flag
+	call p_send_time_long_wake
+	fetch 1,mem_sensor_shutdown_flag
+	ncall mouse_setgpio_hibernate,blank
+	fetch 4,mem_24g_enter_hibernate
+	branch g24_long_seep2
+
+p_g24_send_abort_packet:
+	jam TYPE_MS,mem_24g_data_type
+	jam 1,mem_24g_abort_pac
+	call g24_transmit_rf_ctrl_clear
+	store 1,mem_24g_txbuf
+	setarg 0
+	store 7,mem_24g_txbuf+1
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+8
+	jam 12,mem_24g_datalen
+	fetch 1,mem_24g_data_type
+	set1 bit_abort,pdata
+	store 1,mem_24g_data_type
+	call g24_transmit_prep
+	branch p_g24_transmit_start
+
+p_mouse_24g_fast_conn_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	bbit1 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,p_mouse_24g_start_auto_pair
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,p_mouse_24g_start_auto_pair
+	bbit0 MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED,mouse_24g_reconn_dongle_start
+	fetch 4,mem_mouse_24g_addr		// auto pair first time
+	fetcht 4,mem_mouse_compare_addr_ff
+	isub temp,null
+	branch p_mouse_24g_start_pair_mode,zero
+	branch mouse_24g_reconn_dongle_start
+
+p_mouse_24g_start_auto_pair:
+	fetch 2,mem_24g_pair_timeout_init
+	store 2,mem_24g_reconn_timeout
+	jam PAIR_AND_RECEIVER,mem_24g_reconn_type
+	branch g24_reconn_start
+
+p_mouse_24g_start_pair_mode:
+	jam 0,mem_24g_reconn_type
+	call p_mouse_device_pair_led_config
+	branch mouse_24g_start_pair_mode
+
+ifdef BLE
+p_mouse_le_ll_start_encryt:
+	fetch 1,mem_mouse_le_reconnect_flag
+	beq 1,p_mouse_le_ll_reconn_start_encryt
+	jam 20,mem_le_start_encrypt_timer
+	branch mouse_le_ll_enable_start_enc_flag
+p_mouse_le_ll_reconn_start_encryt:
+	call mouse_updata_le_param
+	jam 10,mem_le_start_encrypt_timer
+	branch mouse_le_ll_enable_start_enc_flag
+
+p_mouse_le_conn_param_update_rsp_recieved:
+	fetch 1,mem_mouse_le_send_conn_param_update
+	nrtn blank
+	jam 1,mem_mouse_le_send_conn_param_update
+	jam 30,mem_mouse_le_send_conn_param_update_timer
+	rtn
+
+p_mouse_le_bb_disconnected:
+	setarg 0
+	store 2,mem_le_battery_level_updata_timer
+	store 1,mem_mouse_le_send_conn_param_update
+	store 1,mem_mouse_le_send_conn_param_update_timer
+	store 1,mem_mouse_le_bb_connected_flag
+
+	jam LE_LPM_ENABLE,mem_mouse_le_conn_param_reject
+	jam 0,mem_mouse_clear_sensor_data_flag
+	call le_clr_config_more_data
+	branch p_mouse_bb_disconnected
+
+p_mouse_le_bb_event_connected:
+	call p_mouse_device_poweron_led_config
+	branch mouse_le_bb_event_connected
+endif
+
+////////////////////////////////////////////////bb event end///////////////////////////////////////////////
+
+p_g24_pair_dispatch:
+	jam DEFAULT_24G_DEVICE,mem_24g_reconn_type
+	fetch 2,mem_24g_pair_count
+	increase 1,pdata
+	store 2,mem_24g_pair_count
+	fetch 1,mem_24g_pair_count
+	and pdata,0xff,pdata
+	beq 0,p_g24_pair_dispatch2
+	rtn
+
+p_g24_pair_dispatch2:
+	fetch 1,mem_24g_pair_sm
+	beq STATE_24G_PAIRING_SUCCESS,g24_pair_exit
+	beq STATE_24G_PAIRING_1,p_g24_pair_sm_1
+	beq STATE_24G_PAIRING_2,p_g24_pair_sm_2
+	beq STATE_24G_PAIRING_3,p_g24_pair_sm_3
+	beq STATE_24G_PAIRING_4,p_g24_pair_sm_4
+	rtn
+
+p_g24_pair_sm_1:
+	jam DATATYPE_ATTEMP,mem_24g_txbuf
+	branch p_g24_pair_sm_prep
+
+p_g24_pair_sm_2:
+	fetch 1,mem_24g_pair_switch
+	branch p_g24_pair_sm_2_skip,blank
+	fetch 4,mem_24g_device_addr
+	call g24_update_addr_and_synccrc8	//use transmitter addr
+p_g24_pair_sm_2_skip:
+	jam DATATYPE_BIND,mem_24g_txbuf	
+	branch p_g24_pair_sm_prep
+
+p_g24_pair_sm_3:
+	jam DATATYPE_CONFIG,mem_24g_txbuf	
+	fetch 1,mem_24g_pair_switch
+	branch p_g24_pair_sm_prep,blank
+	fetch 4,mem_24g_receiver_addr		//prep receiver addr
+	store 4,mem_24g_txbuf+2
+	branch p_g24_pair_sm_common
+
+p_g24_pair_sm_4:
+	jam DATATYPE_OK,mem_24g_txbuf
+p_g24_pair_sm_prep:
+	fetch 4,mem_24g_device_addr
+	store 4,mem_24g_txbuf+2
+p_g24_pair_sm_common:
+	fetch 1,mem_24g_data_type
+	and_into bits_data,pdata
+	store 1,mem_24g_txbuf+1
+	jam 0,mem_24g_txbuf+6
+	jam 7,mem_24g_datalen
+	call g24_transmit_prep
+	call p_g24_transmit_receive_ack
+	branch g24_pair_sm_common+7
+
+p_g24_pair_sm_common_next:
+	fetch 1,mem_24g_pair_sm
+	rtneq STATE_24G_PAIRING_SUCCESS
+	beq STATE_24G_PAIRING_2,p_g24_pair_sm_2_waiting_ack
+	branch g24_pair_sm_common_next+2
+	
+p_g24_pair_sm_2_waiting_ack:
+	fetch 1,mem_24g_pair_switch
+	branch g24_pair_sm_2_waiting_ack_skip,blank
+	fetch 4,mem_24g_rxpayload+2
+	rtn blank
+	store 4,mem_24g_receiver_addr
+	branch g24_pair_sm_2_waiting_ack_skip
+	
+
+p_g24_reconn_dispatch:
+	fetch 2,mem_24g_reconn_count
+	arg 0x01f8,temp
+	iand temp,pdata
+	branch p_g24_reconn_dispatch_next,blank
+	fetch 2,mem_24g_reconn_count
+	increase 1,pdata
+	store 2,mem_24g_reconn_count
+	rtn
+
+p_g24_reconn_mode_judge:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_AUTO_24G_PARING,g24_pair_start
+	branch g24_reconn_receiver_addr
+	
+p_g24_reconn_dispatch_next:
+	call g24_reconn_data_prep
+	call p_g24_transmit_receive_ack
+	nbranch p_g24_reconn_device_fail,sync
+	nbranch p_g24_reconn_device_fail,user3
+	call g24_ackpayload_parse
+	fetch 1,mem_24g_rxdata_length	//ack payload length 
+	branch p_receiver_addr_zero_handle,blank
+p_g24_reconn_receiver_addr_handle:
+	fetch 4,mem_24g_pair_addr
+	fetcht 4,mem_24g_addr
+	isub temp,null
+	branch p_g24_reconn_mode_judge,zero
+	fetch 4,mem_24g_device_addr
+	fetcht 4,mem_24g_addr
+	isub temp,null
+	call p_g24_store_receiver_addr,zero
+	fetch 1,mem_24g_conn_sm
+	set0 STATE_24G_RECONN,pdata
+	store 1,mem_24g_conn_sm
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	store 2,mem_24g_reconn_count
+	store 2,mem_24g_reconn_timeout	
+	branch g24_reconn_attempt_success
+
+p_receiver_addr_zero_handle:
+	fetch 4,mem_24g_rxpayload+2
+	rtn blank
+	branch p_g24_reconn_receiver_addr_handle
+	
+p_g24_store_receiver_addr:
+	fetch 4,mem_24g_rxpayload+2
+	rtn blank
+	store 4,mem_24g_receiver_addr	
+	branch g24_ch_syncword_crc8_init
+
+p_g24_reconn_device_fail:
+	fetch 1,mem_24g_fast_conn_enable
+	branch g24_ch,blank
+	fetch 2,mem_24g_reconn_count
+	increase 1,pdata
+	store 2,mem_24g_reconn_count
+	isolate1 9,pdata	
+	fetch 1,mem_24g_reconn_type
+	beq PAIR_AND_RECEIVER,p_g24_reconn_pair_receiver
+	beq PAIR_AND_3_0_ADDR,p_g24_reconn_pair_and_3_0
+	beq FAST_CONN_AND_3_0_ADDR,p_g24_reconn_fast_conn_and_3_0
+	branch g24_reconn_device_fail+7
+
+p_g24_reconn_pair_receiver:
+	branch g24_reconn_receiver_addr,true
+	branch g24_pair_init_param
+
+p_g24_reconn_fast_conn_and_receiver:
+	branch g24_reconn_receiver_addr,true
+	branch g24_reconn_fast_conn
+
+p_g24_reconn_pair_and_receiver:
+	branch g24_reconn_receiver_addr,true
+	branch g24_pair_init_param
+
+p_g24_reconn_fast_conn_and_3_0:
+	branch g24_reconn_device_3_0_addr,true
+	jam TX_POWER_FAST_CONN,mem_tx_power
+	branch g24_reconn_fast_conn+2
+	
+p_g24_reconn_pair_and_3_0:
+	branch g24_reconn_device_3_0_addr,true
+	branch g24_pair_init_param
+
+p_g24_lpm_wait:			// ice connect led
+	fetch 1,mem_24g_device_led_status
+	nbranch disable_user,blank
+	enable user
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	branch disable_user,blank
+	fetch 1,mem_lpm_mode
+	branch disable_user,blank
+	fetch 1,mem_24g_transmit_by_interrupt
+	beq G24_TX_TIMER_INT_ENABLE,disable_user
+	rtn
+
+ifdef BLE
+p_mouse_start_discovery:
+	call p_mouse_device_discovery_led_config
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BLE_ADV,pdata
+	call mouse_stop_le_adv,true		//reconnect adv
+	fetch 2,mem_ui_state_map
+	isolate1 UI_STATE_BT_RECONNECT,pdata
+	call mouse_cancel_reconnect,true
+	setarg 0
+	store 2,mem_le_battery_level_updata_timer
+	branch mouse_start_discovery+1
+
+p_mouse_stop_discovery:
+	setarg 0
+	store 2,mem_mouse_discovery_timer
+	branch mouse_stop_discovery+1
+endif
+
+p_ui_timer_check:		// 100ms timer will return 4 or 5 times when power on
+	fetch 1,mem_power_on_flag
+	ncall ui_timer_init,blank
+	jam 0,mem_power_on_flag
+	branch ui_timer_check+1
+
+p_le_enable_phy_by_pdata:
+	copy temp,pdata
+	bbit1 BIT_LE_1M_PHY,le_enable
+	bbit1 BIT_LE_2M_PHY,p_le_enable_2M
+	branch le_enable_phy_by_pdata+5
+
+p_le_enable_2M:
+	call le_enable_2M
+	call p_mouse_le_config_check_set
+	jam 0x89,core_rx_bq_cfg0	//bit7 set1,improve 2M rx sensitivity
+	rtn
+
+p_end_of_packet:
+	call p_mouse_le_config_check_set
+	branch end_of_packet+1
+
+p_mouse_le_config_check_set:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_500Hz,p_mouse_le_register_set
+	bbit1 MOUSE_ENABLE_24G_1000,p_mouse_le_register_set
+	rtn
+	
+p_mouse_le_register_set:
+	jam 0x02,0x8930
+	rtn
+
+ifdef CLASSIC
+p_hid_rx_process:
+	fetch 2,mem_l2cap_payload_ptr
+	copy pdata,contr
+	ifetch 1,contr
+	store 1,mem_l2cap_rcv_hidtype
+	and pdata,0x0f,temp
+	rshift4 pdata,pdata //hidtype
+	beq hid_type_set_idle,p_hid_rx_process_handshake
+	branch hid_rx_process+7
+
+p_hid_rx_process_handshake:
+	arg 1,rega//payload length
+	call hid_malloc_tx_buff
+	fetch 2,mem_hid_ctrl_remote_cid
+	istore 2,contw
+	setarg 0
+	istore 1,contw
+	jam 1,mem_ui_data_txbuff_length
+	fetch 1,mem_hid_control_state
+	set1 l2cap_channel_hid_handshake_done,pdata
+	store 1,mem_hid_control_state
+	jam BT_EVT_HID_HANDSHAKE,mem_fifo_temp
+	branch ui_ipc_send_event
+
+p_send_lmp:
+	disable user
+	call lmo_fifo_process
+	fetch 1,mem_lmp_to_send
+	rtn blank
+/* lmp message to be processed. this will either be because host??? */
+/* wants to send a lmp message or because one resulted from the LMP */
+/* processing section */
+/********* outgoing lmp lookup table *************/
+	bbit1 7,send_lmp_escape
+p_send_lmp0:
+	beq LMP_DETACH,p_send_lmp_detach
+	branch send_lmp0
+
+p_send_lmp_detach:
+	call send_lmp_detach
+	jam 120,mem_conn_timer
+	rtn
+endif
+	
+
+ifdef BLE
+p_le_slave_match:
+	fetch 1,mem_le_md_count
+	pincrease 1
+	store 1,mem_le_md_count
+	beq LE_MD_MAX_COUNT,le_slave_cont
+	call le_acknowledge
+	call le_prepare_tx
+	fetch 1,mem_le_tx_phy
+	call le_enable_phy_by_pdata
+	call le_transmit
+	branch le_slave_match+10
+
+p_le_slave_unsync:
+	call end_of_packet
+	branch le_slave_unsync+1
+
+p_le_parse_l2cap:
+	ifetch 2,contr
+	beq LE_L2CAP_CID_ATT,p_le_parse_att
+	branch le_parse_l2cap+10
+p_le_parse_att:
+	ifetch 3,contr
+	store 3,mem_le_att_opcode
+	beq ATTOP_READ_REQUEST,p_le_parse_att_read_request
+	beq ATTOP_WRITE_REQUEST,p_le_parse_att_write_request	
+	branch le_parse_att+2
+
+p_le_parse_att_read_request:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL,le_parse_att_read_request
+	call le_check_encrypt_state
+	fetcht 2,mem_le_att_handle
+	fetch 1,mem_le_configuration
+	bbit1 BIT_BLE_READ_AUTH,p_le_send_att_read_response_check_auth
+//input:temp is handle
+p_le_send_att_read_response:
+	fetch 2,mem_le_att_handle
+	beq 0x30,le_send_att_error_response_notfound
+	fetcht 2,mem_le_att_handle
+	branch le_send_att_read_response
+
+p_le_send_att_read_response_check_auth:
+	fetch 2,mem_le_pairing_handle
+	isub temp,null
+	nbranch p_le_send_att_read_response,zero
+	nbranch p_le_send_att_read_response,user
+	branch le_send_att_read_response_error_insufficient_auth
+
+p_le_parse_att_write_request:		// mac os 10.9.5 reconnect can't move
+	copy contr,rega
+	fetch 2,mem_le_l2cap_size
+	add pdata,-3,regb
+	call le_writeatt_cb
+	fetch 1,mem_mouse_bluetooth_fast_conn_flag
+	beq 0xff,le_send_att_write_response_check_auth	
+	fetch 1,mem_mouse_le_reconnect_flag
+	branch le_send_att_write_response_check_auth,blank
+	fetch 1,mem_le_connect_status_flag
+	bbit1 LL_START_ENC_FLAG,le_send_att_write_response_check_auth
+	setarg 0x001a		
+	fetcht 2,mem_le_att_handle
+	isub temp,null
+	nbranch le_send_att_write_response_check_auth,zero
+	branch le_send_att_read_response_error_insufficient_auth
+endif
+
+
+ifdef PW_CTRL	
+p_power_ctrl_start:
+	fetch 2,mem_ui_state_map
+	rtnbit1 UI_STATE_BLE_ADV
+	rtnbit1 UI_STATE_BT_RECONNECT
+	rtnbit1 UI_STATE_BT_DISCOVERY	
+ifdef RSSI_SORT
+	call p_rssi_sort	
+	call p_rssi_average
+else
+	fetchr rega,2,mem_rssi_signal_buf_ptr
+	call rssi_average
+endif
+	storet 1,mem_rssi_avg_received
+	branch power_ctrl_rssi_avg_compare
+
+ifdef RSSI_SORT
+p_rssi_average:
+	arg mem_mouse_rssi_signal_buf_temp+6,rega
+	arg 10,pdata
+	branch rssi_average+2
+
+p_rssi_sort:
+	call p_memcpy16
+	arg mem_mouse_rssi_signal_buf_temp,regb
+	fetch 1,mem_rssi_buff_index
+	increase 1,pdata
+	copy pdata,loopcnt
+	branch p_bubble_sort
+
+p_memcpy16:
+	arg mem_mouse_rssi_signal_buf_patch,contr
+	arg mem_mouse_rssi_signal_buf_temp,contw
+	branch memcpy16	
+
+//input:regb buff ptr,pdata buff length
+p_bubble_sort:
+	increase -1,loopcnt
+	deposit loopcnt
+	rtn blank
+p_external_loop:
+	copy loopcnt,rega
+	increase -1,rega
+	copy regb,contr
+p_internal_loop:
+	ifetch 1,contr
+	copy contr,contw
+	ifetcht 1,contr
+	isub temp,null
+	call p_sort_up
+	increase -1,contr
+	increase -1,rega
+	branch p_internal_loop,positive
+	loop p_external_loop
+	rtn
+p_sort_up:
+	call p_exchange_data,positive
+	rtn
+p_exchange_data:
+	increase -1,contw
+	istoret 1,contw
+	istore 1,contw
+	rtn
+endif
+
+endif
+
+p_mouse_motion:
+ifdef AUTO_SEND
+	branch p_mouse_motion_auto
+endif
+	disable user
+	setarg 0
+	store 6,mem_mouse_x
+	call p_mouse_check_sensor_data
+	setarg 0x0089			
+	call twspi_write
+	call p_mouse_seting_sensor_type
+	call mouse_zwheel
+	call mouse_t_zwheel
+	call p_mouse_key
+	fetch 1,mem_mouse_key
+	and_into 0x1f,pdata
+	store 1,mem_mouse_key
+	nbranch mouse_drawing_optima_init,user
+	call p_mouse_drawing_optima
+	branch mouse_no_data_timer_init
+
+p_mouse_check_sensor_data:
+	fetch 1,mem_spi_write_flash_sm
+	rtnne FLASH_SM_NO_BUYS
+	fetch 1,mem_config_sensor_type
+	beq KA5857,p_mouse_ka5857_sensor_motion
+	beq KA8G2,p_mouse_ka5857_sensor_motion
+	branch mouse_check_sensor_data+3
+
+p_mouse_ka5857_sensor_motion:
+	call mouse_clear_sensor_data
+	fetch 1,mem_sensor_motion_gpio
+	beq GPIO_DISABLE,p_mouse_ka5857_sensor_motion_1
+	fetcht 1,mem_sensor_motion_gpio
+	call gpio_get_bit
+	nrtn true
+p_mouse_ka5857_sensor_motion_1:	
+	setarg PAN_REG_PID_L
+	call twspi_read
+	bne PKA8G2_ID1,mouse_twspi_reset
+	branch mouse_p3212_sensor_motion_2
+	
+p_mouse_drawing_optima:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit1 MOUSE_ENABLE_24G_500Hz
+	rtnbit1 MOUSE_ENABLE_24G_1000
+	rtnbit1 MOUSE_ENABLE_USB_1000
+	fetch 1,mem_config_sensor_type
+	rtneq P3212
+	rtneq KA8G2
+ifdef USB
+	call p_usb_store_mem
+endif
+	call mouse_drawing_optima
+ifdef USB
+	call p_usb_get_mem
+endif
+	rtn
+
+p_mouse_key:
+	call p_mouse_check_key_gpio
+	call mouse_ghost_key_check
+	branch mouse_key+2
+
+p_mouse_check_key_gpio:
+	fetch 1,mem_sensor_shutdown_flag
+	ncall mouse_check_key_gpio_once,blank
+	arg 0,rega
+	call p_mouse_check_lkey_gpio
+	//call p_mouse_check_rkey_gpio
+	//call p_mouse_check_mkey_gpio
+	call p_mouse_check_bkkey_gpio
+	call p_mouse_check_fwkey_gpio
+	branch mouse_check_key_gpio_next	
+
+p_mouse_check_lkey_gpio:
+	fetch 1,mem_lbutton_gpio
+	call p_mouse_gpio_config_output_high
+	call mouse_check_lkey_gpio
+	fetcht 1,mem_lbutton_gpio
+	call mouse_gpio_config_input_pu
+p_mouse_check_rkey_gpio:
+	fetch 1,mem_rbutton_gpio
+	call p_mouse_gpio_config_output_high
+	call mouse_check_rkey_gpio
+	fetcht 1,mem_rbutton_gpio
+	call mouse_gpio_config_input_pu
+p_mouse_check_mkey_gpio:
+	fetch 1,mem_mbutton_gpio
+	call p_mouse_gpio_config_output_high
+	call mouse_check_mkey_gpio
+	fetcht 1,mem_mbutton_gpio
+	branch mouse_gpio_config_input_pu	
+
+p_mouse_check_bkkey_gpio:
+	fetch 1,mem_bk_button_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_BK_KEY,mem_mouse_key_temp
+	fetch 1,mem_mouse_bkkey_press_status
+	copy pdata,regc
+	fetcht 1,mem_bk_button_gpio
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,p_mouse_3io6key_bk_check
+	branch mouse_check_bkkey_gpio_next
+p_mouse_3io6key_bk_check:
+	fetch 1,mem_bk_button_gpio
+	call p_mouse_gpio_config_output_low
+	fetcht 1,mem_bk_button_gpio
+	branch mouse_3io6key_bk_check	
+
+p_mouse_check_fwkey_gpio:
+	fetch 1,mem_fw_button_gpio
+	rtneq GPIO_DISABLE
+	jam MOUSE_FW_KEY,mem_mouse_key_temp
+	fetch 1,mem_mouse_fwkey_press_status
+	copy pdata,regc
+	fetcht 1,mem_fw_button_gpio
+	fetch 1,mem_matrix_public_gpio
+	beq GPIO_DISABLE,p_mouse_3io6key_fw_check
+	branch mouse_check_fwkey_gpio_next
+p_mouse_3io6key_fw_check:
+	fetch 1,mem_fw_button_gpio
+	call p_mouse_gpio_config_output_low
+	fetcht 1,mem_fw_button_gpio
+	branch mouse_3io6key_fw_check
+
+//input:pdata gpio number
+p_mouse_gpio_config_output_high:
+	rtneq GPIO_DISABLE
+	arg gpcfg_output_high,temp
+	branch gpio_config_function_int
+		
+//input:pdata gpio number
+p_mouse_gpio_config_output_low:
+	rtneq GPIO_DISABLE
+	arg gpcfg_output_low,temp
+	branch gpio_config_function_int
+/*
+p_mouse_ghost_key_check:
+	jam 0,mem_mouse_matrix_key_cow_count
+	jam 0,mem_mouse_matrix_key_row_count
+	jam 0,mem_mouse_ghost_flag
+	copy pdata,temp
+	call p_mouse_ghost_key_check_L_FW
+	call p_mouse_ghost_key_check_R_BK
+	branch mouse_ghost_key_check+6
+
+p_mouse_ghost_key_check_L_FW:
+	and temp,MOUSE_L_FW_BUTTON,pdata
+	beq MOUSE_L_FW_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+
+p_mouse_ghost_key_check_R_BK:
+	and temp,MOUSE_R_BK_BUTTON,pdata
+	beq MOUSE_R_BK_BUTTON,mouse_matrix_cow_more_than_one_key
+	rtn
+*/
+
+ifdef USB
+
+/************************set report patch************************/
+p_usb_class_type:
+	set0 mark_isstr,mark
+	fetch 1,mem_usb_setup_bmRequestType
+	and_into 0x80,pdata
+	beq OUT_DEVICE,p_usb_out_device
+	branch usb_class_type+4
+
+p_usb_out_device:
+	fetch 1,mem_usb_setup_bmRequestType
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	and_into 0x03,pdata
+	beq STANDARD_REQ,usb_out_standard_req
+	beq CLASS_REQ,p_usb_out_class_req
+	branch usb_out_device+4
+
+p_usb_out_class_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq SET_REPORT,p_usb_set_report
+	branch usb_out_class_req+1
+
+p_usb_set_report:
+	nop 15000	//delay 1ms
+	branch usb_set_report
+
+/************************usb mac wakeup patch************************/
+p_usb_tx:
+	fetch 1,mem_usb_tx_enable
+	rtn blank
+	fetch 1,core_usb_txbusy
+	and_into 0x0f,pdata
+	nbranch usb_inwake_state_tx_dispose,blank
+	branch usb_tx+3
+
+
+/************************usb and mouse memalloc conflict patch************************/
+//0x09f6 mem_usb_status
+//0x09f6 mem_init_cnt
+p_usb_store_mem:
+	arg mem_usb_status,contr
+	arg mem_usb_mem_temp,contw
+	branch memcpy16
+	
+p_usb_get_mem:
+	arg mem_usb_status,contw
+	arg mem_usb_mem_temp,contr
+	branch memcpy16
+
+
+/************************add usb name patch************************/
+p_mouse_usb_check_enable:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_USB
+	jam MOUSE_USB_INTERFACE_REMOVE,mem_mouse_usb_vdd_status
+	rtn
+
+p_mouse_usb_config_param:
+	call p_mouse_usb_config_kb_check
+	call p_mouse_usb_report_rate_set
+	call p_mouse_usb_config_param_setup
+p_mouse_usb_device_name_config:
+	fetch 1,mem_usb_device_name_retention
+	rtn blank
+	arg mem_usb_device_name_retention,contr
+	arg mem_string2,contw
+	arg 30,loopcnt
+	branch memcpy
+
+p_mouse_usb_config_kb_check:
+	jam DONGLE_KB_BIND_EEPROM_OFFECT,mem_mouse_usb_keyboard_flag
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_KEYBOARD
+	jam DONGLE_KB_BIND_SUCCESS,mem_mouse_usb_keyboard_flag
+	rtn
+
+p_mouse_usb_config_param_setup:
+	call usb_tx_interval_config
+	call p_mouse_usb_vid_pid_config
+p_mouse_usb_hid_icon_config:
+	fetch 1,mem_mouse_usb_keyboard_flag
+	branch dongle_usb_hid_icon_config+1
+	
+p_mouse_usb_vid_pid_config:
+	fetch 1,mem_usb_vid_pid
+	rtn blank
+	fetch 1,mem_mouse_usb_keyboard_flag
+	beq DONGLE_KB_BIND_SUCCESS,dongle_usb_vid_pid_for_suit
+	branch dongle_usb_vid_pid_for_mouse_only_auto_pair
+
+p_usb_timer_check:
+	call disable_user
+	fetcht 4,mem_btclk_sensor
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall p_usb_timer_timeout,positive
+	copy pdata,regb
+	fetch 4,mem_btclk_sensor
+	fetcht 1,mem_wire_usb_interval
+	iadd temp,temp
+	copy regb,pdata
+	isub temp,null		
+	nrtn positive
+	set0 28,pdata
+	store 4,mem_btclk_sensor
+	branch enable_user
+
+p_usb_timer_timeout:
+	rtn zero
+	set1 28,pdata
+	rtn
+p_usb_timer_init:
+	setarg 0
+	store 4,mem_btclk_sensor
+	rtn
+
+
+p_select_system_clk_24M_dpll:
+	jam SYSTEM_CLK_24M,mem_system_clk
+	jam clksel_dpll_24M,core_clksel
+	setarg 5999
+	store 2,core_halfslot	//about 250us
+	branch calc_new_param
+
+p_mouse_usb_report_rate_set:
+	call p_usb_timer_init
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_USB_250,p_usb_report_rate_set_250hz
+	bbit1 MOUSE_ENABLE_USB_500,p_usb_report_rate_set_500hz
+	bbit1 MOUSE_ENABLE_USB_1000,p_usb_report_rate_set_1000hz
+p_usb_report_rate_set_125hz:
+	jam 32,mem_wire_usb_interval
+	rtn
+p_usb_report_rate_set_250hz:
+	jam 16,mem_wire_usb_interval
+	rtn
+p_usb_report_rate_set_500hz:
+	jam 8,mem_wire_usb_interval
+	rtn
+p_usb_report_rate_set_1000hz:
+	jam 4,mem_wire_usb_interval
+	rtn
+	
+p_mouse_usb_isr:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_USB
+	call p_mouse_usb_interface_check
+	fetch 1,mem_mouse_usb_vdd_status
+	rtnne MOUSE_USB_INTERFACE_INSERT
+	branch usb_isr
+
+
+p_mouse_usb_interface_check:
+	fetcht 1,mem_usb_offline_check_gpio
+	call gpio_get_bit
+	nbranch p_mouse_usb_gpio_low,true
+	branch p_mouse_usb_gpio_high
+
+p_mouse_usb_gpio_low:
+	fetch 1,mem_mouse_usb_vdd_status
+	rtneq MOUSE_USB_INTERFACE_REMOVE
+	jam MOUSE_USB_INTERFACE_REMOVE,mem_mouse_usb_vdd_status
+	jam 0,mem_usb_mode_enable		//enable select device
+	jam 0,mem_usb_device_enumeration_endflag
+	jam 0,mem_usb_status
+	jam 0,mem_usb_state
+	fetch 2,core_clkoff
+	set1 CLOCK_OFF_USB,pdata
+	store 2,core_clkoff
+	jam 1,mem_lpm_mode
+	call select_system_clk_12M_dpll
+	branch p_mouse_soft_reset
+//	call mouse_drawing_optima_init	
+//	call p_mouse_sensor_powerdown
+//	disable wake	//using for mouse_init_sensor_reset	
+//	branch mouse_init_wireless
+
+p_mouse_usb_gpio_high:
+	fetch 1,mem_mouse_usb_vdd_status
+	rtneq MOUSE_USB_INTERFACE_INSERT
+	jam MOUSE_USB_INTERFACE_INSERT,mem_mouse_usb_vdd_status
+	jam 1,mem_usb_mode_enable		//disabl select device
+	setarg 0
+	store 2,mem_24g_pair_timeout
+	store 2,mem_24g_reconn_timeout
+	call p_mouse_multi_led_blink_disable
+	jam 0,mem_lpm_mode
+	call p_select_system_clk_24M_dpll
+	call mouse_24g_stop
+	call p_mouse_stop_bluetooth_mode
+	disable wake
+	call mouse_init_sensor_reset
+
+	setarg p_mouse_usb_config_param
+	store 2,mem_cb_usb_config
+	fetch 1,mem_usb_tx_interval_retention
+	store 1,mem_usb_tx_interval
+	arg mem_usb_vid_pid_retention,contr
+	arg mem_usb_vid_pid,contw
+	arg 9,loopcnt
+	call memcpy
+	branch usb_init
+
+p_mouse_usb_mode_flag_check:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_USB
+	fetch 1,mem_mouse_usb_vdd_status
+	beq MOUSE_USB_INTERFACE_INSERT,p_mouse_usb_mode_flag_enable
+	beq MOUSE_USB_INTERFACE_REMOVE,p_mouse_usb_mode_flag_disable
+	rtn
+
+p_mouse_usb_mode_flag_enable:
+	fetch 1,mem_usb_mode_enable
+	rtn blank
+	jam 1,mem_mouse_pair_success	
+	rtn
+p_mouse_usb_mode_flag_disable:
+	fetch 1,mem_usb_mode_enable
+	rtn blank
+	jam 0,mem_mouse_pair_success	
+	rtn
+
+p_mouse_usb_mode:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_USB
+	fetch 1,core_usb_addr
+	store 1,mem_usb_addr
+	rtnbit0 7
+	call p_usb_timer_check
+	nrtn user
+	call mouse_motion
+	nrtn user
+	fetch 1,core_usb_txbusy
+	rtnbit1 2
+	branch p_mouse_push_data_to_usb
+
+p_mouse_push_data_to_usb:
+	fetch 1,core_usb_addr
+	rtnbit0 7
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,p_mouse_push_mouse_data_to_usb
+	fetch 1,mem_customer_key
+	beq 1,p_mouse_push_keyboard_data_to_usb
+p_mouse_push_mouse_data_to_usb:
+	call dongle_usb_tx_ms_data
+	setarg MS_REPORT_ID
+	store 1,mem_usb_mouse_data
+	fetch 7,mem_mouse_key
+	istore 7,contw
+	rtn
+
+p_mouse_push_keyboard_data_to_usb:
+	fetch 1,mem_customer_data_trigger
+	branch p_mouse_push_release_keyboard_data_to_usb,blank
+	fetch 8,mem_customer_key_press+1
+p_mouse_push_keyboard_package_data_to_usb:
+	store 8,mem_pdatatemp
+	fetch 1,mem_customer_key_press
+	beq KB_MULTIKEY_REPORT_ID,p_mouse_push_multimedia_key_data_to_usb
+	beq KB_SYSTEM_CONCTRL_REPORT_ID,p_mouse_push_systemctrl_key_data_to_usb
+	call dongle_usb_tx_kb_data
+	fetch 8,mem_pdatatemp
+	store 8,mem_usb_kb_data
+	rtn
+
+p_mouse_push_release_keyboard_data_to_usb:
+	fetch 8,mem_customer_key_release+1
+	branch p_mouse_push_keyboard_package_data_to_usb
+
+p_mouse_push_multimedia_key_data_to_usb:
+	call dongle_usb_tx_enable_ep2
+	jam USB_EP2_MULTIKEY,mem_usb_ep2_data
+	setarg KB_MULTIKEY_REPORT_ID
+	store 1,mem_usb_kb_multikey
+	fetch 2,mem_pdatatemp
+	istore 2,contw
+	rtn
+
+p_mouse_push_systemctrl_key_data_to_usb:
+	call dongle_usb_tx_enable_ep2
+	jam USB_EP2_SYSTEMKEY,mem_usb_ep2_data
+	setarg KB_SYSTEM_CONCTRL_REPORT_ID
+	store 1,mem_usb_kb_system
+	fetch 1,mem_pdatatemp
+	istore 1,contw
+	rtn
+
+endif
+
+//=============================ZCODE PATCH ===================================//
+p_zcode_entrance:
+	fetcht 1,mem_zcode_temp_param0 // zcode number @ high 4bit
+	rshift4 temp,temp
+	fetch 1,mem_zcode_current_number
+	isub temp,null
+	branch p_zcode_run,zero // if this zcode is already loaded, do not load again
+	storet 1,mem_zcode_current_number
+	increase 1,temp
+	setarg ZCODE_BUFF_SIZE
+	imul32 temp,temp
+	fetch 3,mem_xip_flash_offset
+	isub temp,pdata
+	fetcht 3,mem_flash_start_addr
+	iadd temp,pdata
+	store 3,mem_flash_address
+p_zcode_read_loop:
+	call p_zcode_buff_clear
+	call p_mouse_sensor_spi_clr
+	call spi_pin_set
+	fetch 3,mem_flash_address
+	arg ZCODE_BUFF_SIZE,temp
+	arg mem_zcode_buff,rega
+	call spid_read_flash
+
+	call p_zcode_data_check
+	nbranch p_zcode_read_loop,zero
+
+	call p_mouse_flash_spi_clr
+	
+	fetch 4,mem_zcode_buff
+	fetcht 4,mem_zcode_head	//p_start
+	isub temp,null
+	nbranch p_zcode_read_loop,zero	//sometimes we will lost p_start,read flash again
+
+	setarg mem_zcode_buff
+	store 2,mem_patch_ptr
+	jam ZCODE_CODE_SIZE,mem_patch_len
+	call load_ucode
+	setarg 0
+	store 4,mem_patch_ptr
+p_zcode_run:
+	fetch 1,mem_zcode_temp_param0
+	branch p_zcode
+
+p_zcode_buff_clear:
+	arg mem_zcode_buff,contw
+	arg 256,loopcnt
+	branch clear_mem	
+
+p_zcode_data_check:
+	arg mem_zcode_buff,contr
+	arg 0,rega
+	arg 63,loopcnt
+p_zcode_data_loop:
+	ifetch 4,contr
+	iadd rega,rega
+	loop p_zcode_data_loop
+	ifetch 4,contr
+	isub rega,null
+	rtn
+
+
+//=============================ZCODE PATCH ===================================//
+
+ifdef AUTO_SEND
+p_mouse_motion_auto:
+	disable user
+	setarg 0
+	store 6,mem_mouse_x
+	fetch 1,0X4FF0
+	increase 1,pdata
+	store 1,0X4FF0
+	sub pdata,50,null
+	branch p_ms_x_right,positive
+
+	sub pdata,100,null
+	branch p_ms_y_up,positive
+
+	sub pdata,150,null
+	branch p_ms_x_left,positive
+	sub pdata,200,null
+	branch p_ms_y_down,positive
+	rtn
+
+p_ms_x_right:
+	setarg 5
+	store 2,mem_mouse_x
+p_data:
+	enable user
+	branch mouse_no_data_timer_init
+
+p_ms_y_up:
+	setarg 5
+	store 2,mem_mouse_y
+	branch p_data
+
+p_ms_x_left:
+	setarg -5
+	store 2,mem_mouse_x
+	branch p_data
+p_ms_y_down:
+	fetch 1,0X4FF0
+	beq 200,p_mem_usb_data_square_cnt_set0
+	setarg -5
+	store 2,mem_mouse_y
+	branch p_data
+p_mem_usb_data_square_cnt_set0:
+	jam 0,0X4FF0
+	branch p_ms_y_down+2
+endif
+
+
+ifdef UART_LOG
+p_device_hardware_init:
+	fetch 1,core_uart_ctrl
+	set0 BIT_UART_CONTROL_ENABLE,pdata
+	store 1,core_uart_ctrl
+	fetch 8,mem_device_uart_rx_buffer
+	call uarta_init_dma_mem
+	fetch uart_baud_len,mem_device_uart_baud_rate
+	call uarta_init_baud_rate
+	call uart_clock_select_main_freq_crystal
+	fetch 1,mem_device_uart_tx_gpio
+	arg gpcfg_uart_txd,temp
+	call gpio_config_function_int
+	fetch 1,mem_device_uart_rx_gpio
+	arg gpcfg_uart_rxd|gpcfg_pullup,temp
+	call gpio_config_function_int
+	arg FUN_UART_CONTROL_ENABLE|FUN_UART_CONTROL_SETTING_RATE_BAUD,temp
+	storet 1,core_uart_ctrl
+	rtn
+
+p_g24_txbuf_data_print:
+	arg 12,loopcnt
+	arg mem_24g_txbuf,regc
+	call log_bytes
+	branch log_end
+
+
+//input: 1 byte hex @pdata  
+//output: 4 byte  '0','x', ASCII,ASCII, @pdata
+hex2ascii:
+	rshift4 pdata,rega  //high 4bit in rega
+	and_into 0x0f,pdata
+	call hex2ascii_half_byte
+	copy pdata,regb
+	copy rega,pdata
+	call hex2ascii_half_byte
+	lshift8 regb,regb
+	iadd regb,pdata
+//	lshift16 pdata,pdata
+//	arg 0x7830,regb   //0x
+//	iadd regb,pdata
+	rtn
+
+//input: 1 byte hex @pdata  
+//output: 4 byte  '0','x', ASCII,ASCII, @pdata
+hex2ascii_half_byte:
+	arg 0xa,temp
+	isub temp,temp
+	nbranch hex2ascii_half_byte_numberic,positive
+	setarg 0x41  // A
+	iadd temp,pdata
+	rtn
+hex2ascii_half_byte_numberic:
+	arg 0x30,temp
+	iadd temp,pdata
+	rtn
+
+//input: loopcnt--length,regc--data ptr	
+log_bytes:
+	copy loopcnt,pdata
+	branch log_len0,blank
+log_bytes_loop:
+	ifetch 1,regc
+	increase 1,regc
+	call log_byte
+	call log_space
+	loop log_bytes_loop
+uart_wait:
+	fetch 1,core_uart_status
+	bbit1 uart_status_tx_busy,uart_wait
+//	nop 12000
+	rtn
+
+log_len0:
+	call uarta_prepare_tx
+	setarg 0x656c
+	istore 2,contwu
+	setarg 0x306e
+	istore 2,contwu
+	call uarta_send
+	branch log_end
+
+//input 1byte @pdata
+log_byte:
+	call uarta_prepare_tx
+	call hex2ascii
+//	istore 4,contu	//0x
+	istore 2,contwu
+	branch uarta_send
+
+log_space:
+	call uarta_prepare_tx
+	setarg 0x20
+	istore 1,contwu
+	branch uarta_send
+
+log_end:
+	call uarta_prepare_tx
+	setarg 0x0a0d
+	istore 2,contwu
+	branch uarta_send
+
+log_colon:
+	call uarta_prepare_tx
+	setarg 0x3a
+	istore 1,contwu
+	branch uarta_send	
+endif
+
+
Index: mouse_public_3mode_usb/program/peripherals.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals.prog	(working copy)
@@ -0,0 +1,3255 @@
+
+/* ===================== two wire SPI gpio ======================= */
+
+//pdata:gpio number
+twspi_reset:
+	bpatchx patch23_7,mem_patch23
+	and_into 0xff,pdata
+	arg core_gpio_conf,contw
+	iadd contw,contw
+	copy contw,rega
+	arg gpcfg_output_low,temp
+	istoret 1,contw
+	call twspi_disable
+	nop 30
+	copy rega,contw
+	arg gpcfg_output_high,temp
+	istoret 1,contw
+	branch twspi_enable
+
+twspi_disable:
+	fetch 1,core_aes_en
+	and_into 0xfb,pdata
+	store 1,core_aes_en
+	rtn
+
+twspi_enable:
+	fetch 1,core_aes_en
+	or_into 0x04,pdata
+	store 1,core_aes_en
+	rtn
+
+
+ifdef SPI2
+twspi2_reset:
+	and_into 0xff,pdata
+	arg core_gpio_conf,contw
+	iadd contw,contw
+	copy contw,rega
+	arg gpcfg_output_low,temp
+	istoret 1,contw
+	call twspi2_disable
+	nop 30
+	copy rega,contw
+	arg gpcfg_output_high,temp
+	istoret 1,contw
+	branch twspi2_enable
+
+twspi2_disable:
+	fetch 1,core_aes_en
+	and_into 0xf7,pdata
+	store 1,core_aes_en
+	rtn
+
+twspi2_enable:
+	fetch 1,core_aes_en
+	or_into 0x08,pdata
+	store 1,core_aes_en
+	rtn
+
+twspi2_write:
+	branch spid2_write_reg
+
+twspi2_read:
+	branch spid2_read_reg
+endif
+/* ===================== code loading ======================= */
+aes_disable:
+	fetch 1,core_aes_en
+	and_into 0xfd,pdata   	// disable aes
+	store 1,core_aes_en
+	rtn
+
+read_function_aes:
+	nbranch read_function,user
+	fetch 1,core_aes_en
+	or_into 0x2,pdata   	// enable aes 
+	store 1,core_aes_en
+read_function:
+	copy temp,null
+	branch read_fuction_zero,zero
+	copy regc,pc
+read_fuction_zero:
+	isolate0 0,null
+	branch set_ucode_status
+	
+/* return temp = block length */
+get_block_header:
+	force 4,temp
+get_block_header0:
+	arg mem_ucode_buf,rega
+	call aes_disable	// disable aes for header
+	call read_function
+	arg 0x55aa,rega
+	fetch 2,mem_ucode_buf
+	ifetcht 2,contr
+	isub rega,null
+	rtn	
+
+
+read_first_block:
+	arg 2,temp
+	arg mem_ucode_ptr,rega
+	call read_function
+	fetch 2,mem_ucode_ptr
+	store 2,mem_addr_mi
+	call get_iv,user
+	rtn
+	
+get_iv:
+	arg 16,temp
+	arg mem_ucode_keybuf,rega
+	call aes_disable	// disable aes for iv
+	call read_function
+set_iv:
+	arg mem_ucode_keybuf,contr
+	arg 16,loopcnt
+	call aes_load_data
+	call aes_init
+	call aes_clear_data
+	branch do_aes_cbc					/* generate first IV */
+
+load_storage:
+	setarg 0
+	store 2,mem_queue	//data checksum
+	disable match
+	call get_block_header
+	nrtn zero
+	jam 0x80, core_ucode_ctrl
+	jam 0,core_ucode_hi
+	jam 0,core_ucode_low
+	arg core_ucode_data,rega
+	call read_function_aes
+	jam 0x0, core_ucode_ctrl
+load_storage_loop:
+	arg 6,temp
+	call get_block_header0
+	nbranch load_data_checksum_compare,zero
+	ifetch 2,contr
+	iforce rega
+	call read_function
+	call load_data_checksum_calc
+	branch load_storage_loop
+
+load_data_checksum:
+	arg 0xaa55,rega
+	fetch 2,mem_ucode_buf
+	isub rega,null
+	nrtn zero
+	arg 0x55aa,rega
+	fetch 2,mem_ucode_len
+	isub rega,null
+	nrtn zero
+	fetch 2,mem_sched_addr
+	store 2,mem_rega	//data crc
+	rtn
+
+
+load_data_checksum_calc:
+	fetch 2,mem_queue
+	arg 6,loopcnt
+	arg mem_ucode_buf,contr
+	call cal_sum
+	fetchr loopcnt,2,mem_ucode_len
+	copy rega,contr
+	call cal_sum
+	store 2,mem_queue
+	rtn
+
+load_data_checksum_compare:
+	call load_data_checksum
+	branch load_storage_loop,zero
+	fetch 2,mem_rega	//receive crc
+	fetcht 2,mem_queue	//calc crc
+	isub temp,null
+	nrtn zero
+	enable match
+	rtn
+
+
+load_storage_efuse:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_OFFSET
+	arg mem_tmp_buffer,contr
+	iadd contr,contr	//code addr
+	jam 0x80,core_ucode_ctrl
+	jam 0,core_ucode_hi
+	jam 0,core_ucode_low
+	arg core_ucode_data,rega
+	ifetchr loopcnt,1,contr
+	sub loopcnt,0,null
+	ncall load_efuse_read_code,zero
+	jam 0x0,core_ucode_ctrl
+load_storage_efuse_loop:
+	ifetch 1,contr
+	rtn blank
+	copy pdata,loopcnt
+	ifetchr regb,2,contr
+	copy regb,contw
+	call memcpy_loop
+	branch load_storage_efuse_loop
+
+load_efuse_read_code_loop:
+	ifetch 1,contr
+	istore 1,rega
+	loop load_efuse_read_code_loop
+	rtn
+
+
+load_efuse_read_code:
+	call enable_user2
+	copy loopcnt,temp
+	nbranch load_efuse_read_code_loop,user
+load_efuse_read_code_loop_enc:
+	sub temp,0,null
+	rtn zero
+	call load_efuse_store_code
+	call do_aes_cbc
+	add temp,-16,temp
+	branch load_efuse_read_code_loop_enc,positive
+	rtn
+
+
+load_efuse_store_code:
+	force regidx_result,regext_index
+	copy temp,loopcnt
+load_efuse_store_code_loop:
+	ifetch 4,contr
+	ixor regext,pdata
+	copy pdata,regext
+	istore 1,rega
+	rshift8 pdata,pdata
+	istore 1,rega
+	rshift8 pdata,pdata
+	istore 1,rega
+	rshift8 pdata,pdata
+	istore 1,rega	
+	increase 1,regext_index
+	compare 0,regext_index,0x3
+	rtn true
+	add loopcnt,-4,loopcnt
+	rtn zero
+	branch load_efuse_store_code_loop,positive
+	rtn
+	
+
+	/* only load memory data from eeprom */
+//reload_eeprom:
+//	call clean_mem
+//	setarg 0x1000
+//	store 2,mem_addr_mi
+//	arg iicd_read_eep,regc
+//	arg 2,loopcnt
+//reload_eeprom_loop:
+//	call get_block_header
+//	nrtn zero
+//	fetch 2,mem_addr_mi
+//	byteswap pdata,pdata
+//	iadd temp,pdata
+//	byteswap pdata,pdata
+//	store 2,mem_addr_mi
+//	loop reload_eeprom_loop
+//	branch load_storage_loop
+
+run_efuse_code:
+	arg 0,pc
+	rtn
+
+
+loadcode:
+	call clean_mem
+	jam 0x25,core_clkoff			// disable debug uart
+
+	enable user
+	jam 0,mem_loadcode_times
+load_efuse:
+	call loadcode_timeout
+	nbranch loadcode_error,positive
+	setarg 0
+	arg mem_tmp_buffer,rega
+	arg 64,temp
+	call efuse_read_data
+	call loadcode_efuse_check
+	nbranch load_efuse,user
+	call app_read_efuse_app_vsel
+	
+	disable user
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit0 UCODE_FLAG_ENC,loadcode_efuse
+	call regext_clear
+	jam lock_otp,core_misc_ctrl	// disable further read/write of key
+	set1 mark_otp_encrypt,mark	
+	force regidx_key,regext_index
+	call aes_clear
+	force regidx_key,regext_index
+	fetchr regext,4,mem_tmp_buffer+EFUSE_OFFSET_KEY_ADDR
+	setarg 0xf1ab8f //defualt iv
+	store 4,mem_ucode_keybuf
+	lshift2 pdata,pdata
+	istore 4,contw
+	lshift pdata,pdata
+	istore 4,contw
+	lshift2 pdata,pdata
+	istore 4,contw
+	call aes_disable	// disable aes for iv
+	call set_iv
+	enable user					// set user for aes
+loadcode_efuse:
+	fetch 4,mem_tmp_buffer
+	branch loadcode_iic,blank
+	store 3,mem_efuse_header
+	call disable_user2
+	call app_lpm_peripheral_lock_check
+	call load_storage_efuse
+	call run_efuse_code,user2
+loadcode_iic:
+	jam 0,mem_loadcode_times
+loadcode_iic_loop:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit1 UCODE_FLAG_SKIP_EEP,loadcode_spi
+	call loadcode_timeout
+	nbranch loadcode_iic_eeprom_2k,positive
+	call iicd_load_gpio_init
+	call clear_eeprom_size_2k
+	call loadcode_iic_by_eeprom
+	nbranch loadcode_iic_loop,match
+	fetch 1,mem_ucode_status
+	bbit0 0,loadcode_iic_loop			// crc error, try again
+	branch loadcode_hci
+
+loadcode_iic_eeprom_2k:
+	jam 0,mem_loadcode_times
+loadcode_iic_eeprom_2k_loop:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit1 UCODE_FLAG_SKIP_EEP,loadcode_spi
+	call loadcode_timeout
+	nbranch loadcode_spi,positive
+	call iicd_load_gpio_init
+	call set_eeprom_size_2k
+	call loadcode_iic_by_eeprom
+	nbranch loadcode_iic_eeprom_2k_loop,match
+	fetch 1,mem_ucode_status
+	bbit0 0,loadcode_iic_eeprom_2k_loop			// crc error, try again
+	branch loadcode_hci
+
+iicd_load_gpio_init:
+	fetch 1,mem_eeprom_sda_gpio
+	fetcht 1,mem_eeprom_scl_gpio
+	isub temp,null
+	nbranch iicd_read_init_pin,zero
+iicd_load_default_gpio:
+	setarg 0x000102
+	store 3,mem_eeprom_wp_gpio
+	branch iicd_read_init_pin
+	
+loadcode_spi:
+	jam 0,mem_loadcode_times
+loadcode_spi_loop:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit1 UCODE_FLAG_SKIP_FLASH, loadcode_hci
+	call loadcode_timeout
+	nbranch loadcode_hci,positive
+	call spid_init_flash
+	nop 200						// some flash will fail if no delay here
+	call spid_flash_release_form_powerdown
+	nop 100
+	arg spid_load_flash,regc
+	call read_first_block
+	call load_storage
+	nbranch loadcode_spi_loop,match
+	fetch 1,mem_ucode_status
+	bbit0 0,loadcode_spi_loop			// crc error, try again
+
+loadcode_hci:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit0 UCODE_FLAG_HCI,clear_key_buf
+	call clear_key_buf
+	branch hci_init
+	
+clear_key_buf:
+	setarg 0
+	store 4,mem_tmp_buffer+EFUSE_OFFSET_KEY_ADDR
+	store 8,mem_ucode_keybuf
+	istore 8,contw
+	force regidx_key,regext_index
+	call aes_clear
+	jam 0x21,core_clkoff		// enable debug uart
+	rtn
+
+
+//output: positive
+//1:continue load
+//0:load timeout
+loadcode_timeout:
+	call loadcode_error_delay
+	fetch 1,mem_loadcode_times
+	increase 1,pdata
+	sub pdata,3,null
+	store 1,mem_loadcode_times	
+	rtn
+
+loadcode_error_delay:
+	fetch 1,mem_loadcode_times
+	rtn blank
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_LOADCODE_DELAY
+	and_into 0x40,pdata
+	rtn blank
+	branch delay_50ms
+
+
+//input pdata
+//output pdata
+loadcode_efuse_check_xor:
+	rshift4 pdata,temp
+	and pdata,0x0f,pdata
+	ixor temp,pdata
+	rtn
+
+loadcode_efuse_check:
+	fetch 4,mem_tmp_buffer
+	rtn blank
+ 	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	call loadcode_efuse_check_xor
+	bne 0x0f, disable_user
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_DEVICE_LOCK
+	call loadcode_efuse_check_xor
+	bne 0x0f, disable_user
+
+loadcode_efuse_check_sum:
+	fetch 1,mem_tmp_buffer
+	ifetcht 1,contr
+	iadd temp,pdata
+	ifetcht 1,contr
+	iadd temp,pdata
+	ifetcht 1,contr
+	iadd temp,rega
+	arg mem_tmp_buffer,pdata
+	iadd temp,contr
+	copy rega,pdata
+	ifetchr loopcnt,1,contr
+	iadd loopcnt,pdata
+	call cal_sum
+	call loadcode_efuse_check_sum_loop
+	ifetcht 1,contr
+	and pdata,0xff,pdata
+	isub temp,null
+	nbranch disable_user,zero
+	rtn	
+	
+loadcode_efuse_check_sum_loop:	
+	ifetchr loopcnt,1,contr
+	sub loopcnt,0,null
+	rtn zero
+	iadd loopcnt,pdata
+	increase 2,loopcnt
+	call cal_sum
+	branch loadcode_efuse_check_sum_loop
+
+loadcode_iic_by_eeprom:
+	setarg 0x0
+	store 2,mem_addr_mi
+	arg iicd_read_eep,regc
+	call iic_init_600khz
+	call read_first_block
+	branch load_storage
+
+
+//loadcode_check_times:
+//	fetch 1,mem_loadcode_times
+//	increase 1,pdata
+//	sub pdata,3,null
+//	nbranch loadcode_error,positive
+//	store 1,mem_loadcode_times
+//	rtn
+
+loadcode_error:
+	call clear_key_buf
+	branch app_lpm_mpu_lock_br_ble
+
+
+/* true flag is set into status */
+set_ucode_status:
+	fetch 1,mem_ucode_status
+	lshift pdata,pdata
+	setflag true,0,pdata
+	isolate0 15,rega
+	rtn true
+	store 1,mem_ucode_status
+	rtn
+
+	/* queue is bit position of hw done status */
+decrypt_code:
+	fetch 1,core_aes_en
+	rtnbit0 1
+	branch decrypt_code_skip	/* skip to key generation at first for speed */
+decrypt_code_loop:
+	fetch 1,core_dma_status
+	qisolate1 pdata
+	rtn true
+decrypt_code_skip:
+	fetch 1,core_misc_status
+	bbit0 1,decrypt_code_loop
+	call do_aes_cbc
+	branch decrypt_code_loop
+
+	/* loopcnt is ucode instruction count, pdata is buffer ptr */
+//save_ucode:
+//	copy loopcnt,temp
+//	storet 2,mem_patch_len
+//	jam 0x80, core_ucode_ctrl
+//	jam 0,core_ucode_hi
+//	jam 0,core_ucode_low
+//	store 2,mem_patch_ptr
+//	iforce contw
+//	lshift2 loopcnt,loopcnt
+//save_ucode_loop:
+//	fetch 1,core_ucode_data
+//	istore 1,contw
+//	loop save_ucode_loop
+//	jam 0x0, core_ucode_ctrl
+//	rtn
+
+
+load_ucode:
+	fetch 2,mem_patch_ptr
+	rtn blank
+	jam 0x80, core_ucode_ctrl
+	jam 0,core_ucode_hi
+	jam 0,core_ucode_low
+	fetcht 2,mem_patch_len
+	lshift2 temp,loopcnt
+	iforce contr
+load_ucode_loop:
+	ifetch 1,contr
+	store 1,core_ucode_data
+	loop load_ucode_loop
+	jam 0x0, core_ucode_ctrl
+	rtn
+
+
+/* ===================== LOCK ======================= */
+
+app_read_efuse_app_vsel:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_APP_VSEL
+	and_into 0x0f,pdata
+	isolate1 3,pdata
+	setflag true,4,pdata
+	lshift pdata,pdata
+	store 1,mem_lpm_ctrl3
+	branch lpm_write_sel_vdd
+
+app_read_efuse_sys_config:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_DEVICE_OPTION
+	and_into 0x0f,pdata	//bit3-0
+	rtn blank
+	store 1,mem_device_option
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_XTAL_OFFSET
+	store 1,mem_lpm_ctrim
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_XTAL_CNT
+	store 1,mem_lpm_xtalcnt
+	rtn
+
+app_read_efuse_dig_aon_vsel:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_DIG_AON_VSEL
+	and_into 0x30,pdata	//bit5-4
+	rshift4 pdata,pdata
+	rtn blank
+	store 1,mem_dig_aon_vsel
+	rtn
+
+app_read_efuse_syn_afc_cfg1:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_TX_VCO_CURRENT
+	and_into 0x0f,pdata	//bit3-0
+	rtn blank
+	store 1,mem_syn_afc_cfg1
+	rtn
+
+app_read_efuse_rf_ldo_cfg1:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_LDO_CFG1
+	and_into 0x30,pdata	//bit5-4
+	rshift4 pdata,pdata
+	rtn blank
+	store 1,mem_rf_ldo_cfg1
+	rtn
+
+app_read_efuse_rc_cal:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_RC_CAL
+	rtn blank
+	store 1,mem_rc_cal
+	rtn
+
+app_read_efuse_agc:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_AGC_SEL
+	bbit1 7,app_disable_soft_agc	//bit7
+	jam 0x88,mem_gain_table
+	jam 0x66,mem_gain_table+1
+	jam 0x44,mem_gain_table+2
+	fetch 2,mem_tmp_buffer+EFUSE_OFFSET_AGC_TABLE
+	rtn blank
+	store 2,mem_gain_table+1
+	rtn
+
+app_disable_soft_agc:
+	jam 0xff,mem_gain_fix
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_AGC_SEC_EN
+	and_into 0x40,pdata	//bit6
+	rshift3 pdata,pdata
+	store 1,mem_gain_second_agc_en	//0x00 or 0x08
+	rtn 
+
+
+app_lpm_efuse_lock_prep:
+	jam 0x73,0x8002
+	until null,lpo_edge
+	until null,lpo_edge
+	fetch 2,core_ucode_flag
+	set0 13,pdata
+	store 2,core_lpm_reg
+	branch lpm_write2_ctrl_option
+
+/* ===================== LOCK ======================= */
+
+app_lpm_peripheral_lock_check:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_DEVICE_LOCK
+	and pdata,0x0f,pdata
+	beq dvc_op_module,app_lpm_peripheral_lock_module
+	beq dvc_op_hci,app_lpm_peripheral_lock_hci
+	beq dvc_op_dongle,app_lpm_peripheral_lock_dongle
+ifdef COMPLIE_TEST_CODE
+	beq dvc_op_test,app_lpm_peripheral_lock_test
+endif	
+	beq dvc_op_mouse,app_lpm_peripheral_lock_mouse
+	beq dvc_op_shutter,app_lpm_peripheral_lock_shutter
+	beq dvc_op_ali_mesh,app_lpm_peripheral_lock_mesh
+	beq dvc_op_hci_boot,app_lpm_peripheral_lock_hciboot
+	beq dvc_op_remote_car,app_lpm_peripheral_lock_remote_car
+	beq dvc_op_car,app_lpm_peripheral_lock_car
+	beq dvc_op_antilost,app_lpm_peripheral_lock_antilost
+ifdef COMPILE_ESL
+	beq dvc_op_esl,app_lpm_peripheral_lock_esl
+endif	
+	rtn
+	
+app_lpm_peripheral_lock_module:
+app_lpm_peripheral_lock_hci:
+app_lpm_peripheral_lock_hciboot:
+	call app_lpm_efuse_lock_prep
+	call app_lpm_mpu_lock_mesh
+	branch lpm_write_lock
+	
+app_lpm_peripheral_lock_dongle:
+	call app_lpm_efuse_lock_prep
+	arg module_init,pdata //module
+	arg ui_soft_switch_power_off,temp  //shutter
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+
+ifdef COMPLIE_TEST_CODE
+app_lpm_peripheral_lock_test:
+	call app_lpm_efuse_lock_prep
+	branch lpm_write_lock
+endif
+
+app_lpm_peripheral_lock_mouse:
+	call app_lpm_efuse_lock_prep
+	arg antilost_init,pdata //antilost
+	arg module_set_state,temp  //module
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+	
+app_lpm_peripheral_lock_shutter:
+	call app_lpm_efuse_lock_prep
+	arg antilost_init,pdata  //antilost
+	arg remote_car_moto_data_enable_user,temp //car remote
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+	
+app_lpm_peripheral_lock_mesh:
+	call app_lpm_efuse_lock_prep
+	call app_lpm_mpu_lock_app
+	branch lpm_write_lock
+	
+app_lpm_peripheral_lock_remote_car:
+	call app_lpm_efuse_lock_prep
+	arg antilost_init,pdata  //antilost
+	arg mouse_low_voltage_led_no_enter_lpm_blink,temp //mouse
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+
+app_lpm_peripheral_lock_car:
+	call app_lpm_efuse_lock_prep
+	arg dongle_init,pdata  //dongle
+	arg ui_soft_switch_power_off,temp //shutter
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+	
+app_lpm_peripheral_lock_antilost:
+	call app_lpm_efuse_lock_prep
+	arg car_init,pdata  //dongle
+	arg ui_soft_switch_power_off,temp //shutter
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+
+app_lpm_mpu_lock_mesh:	
+	arg ali_mesh_access_layer_resolve_message,pdata
+	arg ali_mesh_upper_transport_layer_clear_tx_buffer,temp
+	branch app_mpu_s0_lock
+
+
+ifdef COMPILE_ESL
+app_lpm_peripheral_lock_esl:
+	call app_lpm_efuse_lock_prep
+	arg module_init,pdata //module
+	arg ui_soft_switch_power_off,temp  //shutter
+	call app_mpu_s0_lock
+	branch lpm_write_lock
+endif
+
+app_lpm_mpu_lock_module:
+	call app_lpm_efuse_lock_prep
+	arg module_init,pdata
+	arg module_set_state,temp
+app_mpu_s0_lock:
+	store 2,core_mpu_s0_saddr
+	storet 2,core_mpu_s0_eaddr
+	rtn
+	
+app_lpm_mpu_lock_app:	
+	arg antilost_init,pdata  //antilost
+	arg ui_soft_switch_power_off,temp //shutter
+	branch app_mpu_s0_lock
+
+app_lpm_mpu_lock_br:	
+	arg parse_lmp,pdata
+	arg remote_auth,temp
+	branch app_mpu_s1_lock
+
+app_lpm_mpu_lock_ble:	
+	arg le_parse_att,pdata
+	arg le_send_ll_one_lenth,temp
+app_mpu_s1_lock:
+	store 2,core_mpu_s1_saddr
+	storet 2,core_mpu_s1_eaddr
+	rtn
+	
+app_lpm_mpu_lock_24g:	
+	arg g24_prep,pdata
+	arg power_ctrl_pac_succ_cnt_reinit,temp
+	branch app_mpu_s1_lock
+	
+app_lpm_mpu_lock_br_ble:
+	call app_lpm_mpu_lock_br
+	arg le_parse_att,pdata
+	arg le_send_ll_one_lenth,temp
+	branch app_mpu_s0_lock
+
+app_lpm_mpu_mode_lock:
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_PERIPHERALS_LOCK
+	and pdata,0xc0,pdata
+	beq 0xc0,app_lpm_mpu_lock_br_ble
+	bbit1 EFUSE_LE_LOCK_BIT,app_lpm_mpu_lock_ble
+	bbit1 EFUSE_BR_LOCK_BIT,app_lpm_mpu_lock_br
+	rtn
+
+
+lpm_write_lock:
+	call app_lpm_mpu_mode_lock
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_PERIPHERALS_LOCK
+	and pdata,0x1f,rega
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	and pdata,0x0f,pdata
+	fetcht 1,mem_tmp_buffer+EFUSE_OFFSET_DEVICE_LOCK
+	and temp,0x0f,temp
+	lshift4 temp,temp
+	ior temp,pdata
+	lshift8 rega,rega
+	ior rega,pdata
+	set1 lpmreg_rom_lock_bit,pdata
+	set1 lpmreg_ice_mode_bit,pdata
+	store 4,core_lpm_reg
+	call lpm_write2_ctrl_option
+	jam 8,core_encrypt
+	rtn
+
+//lpm_rom_lock:
+//	fetch 2,core_ucode_flag
+//	set1 lpmreg_rom_lock_bit,pdata
+//	store 4,core_lpm_reg
+lpm_write2_ctrl_option:
+	setarg lpmreg_sel_option
+lpm_write2:
+	until null,lpo_edge
+	store 1,core_lpm_wr2
+	until null,lpo_edge
+	until null,lpo_edge
+	rtn
+
+//lpm_write_ice_disable:
+//	fetch 2,core_ucode_flag
+//	set0 lpmreg_ice_mode_bit,pdata
+//	store 4,core_lpm_reg
+//	branch lpm_write2_ctrl_option
+	
+
+/* ===================== SPI dma ======================= */
+
+spid_init:
+	bpatchx patch24_0,mem_patch24
+spid_init_common:
+	fetch 1,mem_spi_init_clk
+	store 1,core_spid_ctrl	// A7530 should at least 34, or write fail
+	fetch 1,mem_spi_init_delay_time
+	store 1,core_spid_delay	// 4us delay
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	setarg mem_spid_rbuf
+	store 2,core_spid_rxaddr
+	branch twspi_disable
+	
+
+twspi_write:
+/* pdata 6:0 is reg address, 15:8 is data to write */
+spid_write_reg:
+	set1 7,pdata
+	store 2,mem_spid_tbuf
+	bpatchx patch24_1,mem_patch24
+	jam 2,core_spid_txlen
+	jam 0,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+
+
+twspi_read:
+/* pdata 6:0 is reg address, temp is bytes to read */
+spid_read_reg:
+	force 1,temp
+spid_read_regs:	
+	store 1,mem_spid_tbuf
+	bpatchx patch24_2,mem_patch24
+	jam 1,core_spid_txlen
+	storet 2,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	call wait_spid_done
+	fetch 1,mem_spid_rbuf
+	rtn
+
+
+wait_spid_done:
+	fetch 2,mem_afh_error_total
+	increase 1,pdata
+	store 2,mem_afh_error_total
+	fetch 1,core_dma_status
+	bbit0 spid_done,wait_spid_done
+	rtn
+
+	
+
+
+
+
+/**
+ ******************************************************************************
+ ** \brief  write flash
+ **
+ ** \param [in]  rega: 2byte write ptr    
+ **			pdata:3byte flash address  
+ ** 			temp:2byte write data length
+ **
+ ** \retval user  0: flash buys 1:write flash setting complate
+ **
+ ******************************************************************************/
+
+flash_write:
+	disable user
+	copy pdata,regb
+	fetch 1,mem_spi_write_flash_sm
+	rtnne FLASH_SM_NO_BUYS
+	enable user
+	copy regb,pdata
+	branch spid_flash_write_start
+
+
+flash_write_spi_sm_timer:
+	fetch 1,mem_spi_write_flash_sm 	
+	beq FLASH_SM_START,spid_flash_write_start
+	beq FLASH_SM_ERASE_SECTOR,spid_flash_erase_sector
+	beq FLASH_SM_WAIT_ERASE_SECTOR,spid_flash_wait_erase_sector
+	beq FLASH_SM_WRITE_DATA,spid_flash_write_data
+	beq FLASH_SM_WAIT_WRITE_DATA,spid_flash_wait_write_data
+	rtn
+
+spid_flash_write_start:
+	store 3,mem_spi_write_addr
+	copy rega,pdata
+	store 2,mem_spi_write_ptr
+	storet 2,mem_spi_write_len
+	jam FLASH_SM_ERASE_SECTOR,mem_spi_write_flash_sm
+	branch spid_init_flash
+spid_flash_erase_sector:
+	call spid_init_flash
+	jam FLASH_SM_WAIT_ERASE_SECTOR,mem_spi_write_flash_sm
+	call spid_unlock_flash
+	arg mem_spid_tbuf,rega
+	jam 4,core_spid_txlen
+	fetch 3,mem_spi_write_addr
+	arg FLASH_COMMAND_SECTOR_ERASE,temp
+	branch spid_write_flash_common
+	
+spid_flash_wait_erase_sector:
+	call spid_init_flash
+	call wait_spid_flash_done
+	jam FLASH_SM_WRITE_DATA,mem_spi_write_flash_sm
+	rtn
+
+
+spid_flash_write_data:
+	call spid_init_flash
+	jam FLASH_SM_WAIT_WRITE_DATA,mem_spi_write_flash_sm
+	call spid_unlock_flash
+	call spid_flash_data_preserve
+	call spid_write_flash
+	branch spid_flash_data_recover
+spid_flash_wait_write_data:
+	call spid_init_flash
+	call spid_unlock_flash
+	setarg FLASH_READ_SATUS
+	call spid_read_reg
+	rtnbit1 FLASH_STATUS_WIP
+	jam FLASH_SM_NO_BUYS,mem_spi_write_flash_sm
+	fetch 2,mem_cb_spi_flash_write_complate
+	branch callback_func
+spid_flash_data_recover:
+	fetch 4,mem_temp
+	fetcht 2,mem_spi_write_ptr
+spid_flash_data_recover_comm:
+	increase -4,temp
+	istore 4,temp
+	rtn
+spid_flash_data_preserve:
+	fetcht 2,mem_spi_write_ptr
+	copy temp,rega
+	increase -4,temp
+	ifetch 4,temp
+	store 4,mem_temp
+	fetcht 2,mem_spi_write_len
+	fetch 3,mem_spi_write_addr
+	rtn
+
+spid_init_flash:
+	call spi_gpio_init
+	call twspi_disable
+	setarg 0
+	store 4,mem_spid_tbuf
+	rtn
+
+spid_unlock_flash:
+	jam FLASH_COMMAND_WRITE_ENABLE,mem_spid_tbuf
+spid_sendcmd_common:	
+	setarg 0
+	store 2,core_spid_rxlen
+	setarg 1
+	store 2,core_spid_txlen
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+	
+spid_flash_release_form_powerdown:
+	jam FLASH_COMMAND_RELEASE_FROM_POWERDOWN,mem_spid_tbuf
+	branch spid_sendcmd_common
+	
+spid_flash_powerdown:
+	jam FLASH_COMMAND_POWERDOWN,mem_spid_tbuf
+	branch spid_sendcmd_common
+	
+/* pdata is flash address, rega pointers to txdata(4 ahead bytes should be left), temp is length */
+spid_write_flash:
+	increase 4,temp
+	storet 2,core_spid_txlen
+	arg FLASH_COMMAND_WRITE_DATA,temp
+	increase -4,rega
+
+spid_write_flash_common:
+	istoret 1,rega
+	rshift16 pdata,temp
+	istoret 1,contw
+	rshift8 pdata,temp
+	istoret 1,contw
+	istore 1,contw
+	deposit rega
+	store 2,core_spid_txaddr
+	setarg 0
+	store 2,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	call wait_spid_done
+	branch wait_spid_flash_done
+
+
+/* temp is length, rega pointers to buf   */
+spid_read_flash:
+	storet 2,core_spid_rxlen
+	rshift16 pdata,temp
+	storet 1,mem_addr_hi
+	rshift8 pdata,temp
+	storet 1,mem_addr_mi
+	store 1,mem_addr_lo
+	setarg 4
+	store 2,core_spid_txlen
+	jam FLASH_COMMAND_READ_DATA,mem_spid_tbuf
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	deposit rega
+	store 2,core_spid_rxaddr
+	fetch 1,core_spid_ctrl
+	isolate0 15,rega
+	setflag true,6,pdata
+	store 1,core_spid_ctrl
+	jam spid_start,core_misc_ctrl
+spid_read_flash_wait:
+	fetch 1,core_dma_status
+	bbit1 7,spid_read_flash_wait			// waiting for spid write
+	arg spid_done,queue
+	branch wait_spid_done
+
+wait_spid_flash_done:
+	setarg 2000
+	call sleep
+	call spid_unlock_flash
+	setarg mem_spid_rbuf
+	store 2,core_spid_rxaddr
+	setarg FLASH_READ_SATUS
+	call spid_read_reg
+	bbit1 FLASH_STATUS_WIP,wait_spid_flash_done
+	rtn
+
+
+/* temp is length, rega pointers to buf  */
+spid_load_flash:
+	storet 2,core_spid_rxlen
+	setarg 4
+	store 2,core_spid_txlen
+	jam 3,mem_spid_tbuf
+	setarg mem_spid_tbuf
+	store 2,core_spid_txaddr
+	deposit rega
+	store 2,core_spid_rxaddr
+	fetch 1,core_spid_ctrl
+	isolate0 15,rega
+	setflag true,6,pdata
+	store 1,core_spid_ctrl
+	jam spid_start,core_misc_ctrl
+spi_load_flash_wait:
+	fetch 1,core_dma_status
+	bbit1 7,spi_load_flash_wait			// waiting for spid write
+	arg spid_done,queue
+	call decrypt_code
+	call wait_spid_done
+	isolate1 spid_crcok,pdata
+	call set_ucode_status
+	fetch 1,mem_addr_hi
+	lshift16 pdata,regb
+	fetch 1,mem_addr_mi
+	lshift8 pdata,pdata
+	ior regb,regb
+	fetch 1,mem_addr_lo
+	ior regb,pdata
+	iadd temp,pdata
+	store 1,mem_addr_lo
+	rshift8 pdata,pdata
+	store 1,mem_addr_mi
+	rshift8 pdata,pdata
+	store 1,mem_addr_hi
+	rtn
+	
+spi_gpio_init:
+	fetch 1,mem_spi_cs_gpio
+	fetcht 1,mem_spi_so_gpio
+	isub temp,null
+	nbranch spi_pin_set,zero
+	call spi_gpio_default_init
+	
+spi_pin_set:
+	fetch 1,mem_spi_cs_gpio
+	arg gpcfg_spid_ncs,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi_sclk_gpio
+	arg gpcfg_spid_sck,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi_si_gpio
+	arg gpcfg_spid_mosi,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi_so_gpio
+	arg gpcfg_spid_miso,temp
+	branch gpio_config_function_int
+
+spi_gpio_default_init:
+	setarg 0x100d0e
+	store 3,mem_spi_cs_gpio
+	setarg 0x12110f
+	istore 3,contw
+	rtn
+
+
+/* ===================== SPI2 dma ======================= */
+ifdef SPI2
+spid2_init:
+
+spid2_init_common:
+	fetch 1,mem_spi_init_clk
+	store 1,core_spid2_ctrl	// A7530 should at least 34, or write fail
+	fetch 1,mem_spi_init_delay_time
+	store 1,core_spid2_delay	// 4us delay
+	setarg mem_spid2_tbuf
+	store 2,core_spid2_txaddr
+	setarg mem_spid2_rbuf
+	store 2,core_spid2_rxaddr
+	branch twspi2_disable
+	
+/* pdata 6:0 is reg address, 15:8 is data to write */
+spid2_write_reg:
+	set1 7,pdata
+	store 2,mem_spid2_tbuf
+	jam 2,core_spid2_txlen
+	jam 0,core_spid2_rxlen
+	jam spid2_start,core_misc_ctrl
+	branch wait_spid2_done
+	
+/* pdata 6:0 is reg address, temp is bytes to read */
+spid2_read_reg:
+	force 1,temp
+spid2_read_regs:
+	store 1,mem_spid2_tbuf
+	jam 1,core_spid2_txlen
+	storet 2,core_spid2_rxlen
+	jam spid2_start,core_misc_ctrl
+	call wait_spid2_done
+	fetch 1,mem_spid2_rbuf
+	rtn
+	
+wait_spid2_done:
+	fetch 2,mem_afh_error_total
+	increase 1,pdata
+	store 2,mem_afh_error_total
+	fetch 1,core_perf_status
+	bbit0 spid_done,wait_spid2_done
+	rtn
+	
+spid2_init_flash:
+	call spi2_gpio_init
+	setarg 0
+	store 4,mem_spid2_tbuf
+	rtn
+	
+spid2_unlock_flash:
+	setarg 0
+	store 2,core_spid2_rxlen
+	setarg 1
+	store 2,core_spid2_txlen
+	setarg mem_spid2_tbuf
+	store 2,core_spid2_txaddr
+	jam FLASH_COMMAND_WRITE_ENABLE,mem_spid2_tbuf
+	jam spid2_start,core_misc_ctrl
+	branch wait_spid2_done
+	
+flash_write_spi2_sm_timer:
+	fetch 1,mem_spi2_write_flash_sm 	
+	beq FLASH_SM_START,spid2_flash_write_start
+	beq FLASH_SM_ERASE_SECTOR,spid2_flash_erase_sector
+	beq FLASH_SM_WAIT_ERASE_SECTOR,spid2_flash_wait_erase_sector
+	beq FLASH_SM_WRITE_DATA,spid2_flash_write_data
+	beq FLASH_SM_WAIT_WRITE_DATA,spid2_flash_wait_write_data
+	rtn
+	
+spid2_flash_write_start:
+	store 3,mem_spi2_write_addr
+	copy rega,pdata
+	store 2,mem_spi2_write_ptr
+	storet 2,mem_spi2_write_len
+	jam FLASH_SM_ERASE_SECTOR,mem_spi2_write_flash_sm
+	branch spid2_init_flash
+	
+spid2_flash_erase_sector:
+	call spid2_init_flash
+	jam FLASH_SM_WAIT_ERASE_SECTOR,mem_spi2_write_flash_sm
+	call spid2_unlock_flash
+	arg mem_spid2_tbuf,rega
+	jam 4,core_spid2_txlen
+	fetch 3,mem_spi2_write_addr
+	arg FLASH_COMMAND_SECTOR_ERASE,temp
+	branch spid2_write_flash_common
+	
+spid2_flash_wait_erase_sector:
+	call spid2_init_flash
+	call wait_spid2_flash_done
+	jam FLASH_SM_WRITE_DATA,mem_spi2_write_flash_sm
+	rtn
+	
+spid2_flash_write_data:
+	call spid2_init_flash
+	jam FLASH_SM_WAIT_WRITE_DATA,mem_spi2_write_flash_sm
+	call spid2_unlock_flash
+	call spid2_flash_data_preserve
+	call spid2_write_flash
+	branch spid2_flash_data_recover
+	
+spid2_flash_wait_write_data:
+	call spid2_init_flash
+	call spid2_unlock_flash
+	setarg FLASH_READ_SATUS
+	call spid2_read_reg
+	rtnbit1 FLASH_STATUS_WIP
+	jam FLASH_SM_NO_BUYS,mem_spi2_write_flash_sm
+	fetch 2,mem_cb_spi2_flash_write_complate
+	branch callback_func
+	
+spid2_flash_data_recover:
+	fetch 4,mem_temp
+	fetcht 2,mem_spi2_write_ptr
+	branch spid_flash_data_recover_comm
+	
+spid2_flash_data_preserve:
+	fetcht 2,mem_spi2_write_ptr
+	copy temp,rega
+	increase -4,temp
+	ifetch 4,temp
+	store 4,mem_temp
+	fetcht 2,mem_spi2_write_len
+	fetch 3,mem_spi2_write_addr
+	rtn
+	
+spid2_write_flash:
+	increase 4,temp
+	storet 2,core_spid2_txlen
+	arg FLASH_COMMAND_WRITE_DATA,temp
+	increase -4,rega
+spid2_write_flash_common:
+	istoret 1,rega
+	rshift16 pdata,temp
+	istoret 1,contw
+	rshift8 pdata,temp
+	istoret 1,contw
+	istore 1,contw
+	deposit rega
+	store 2,core_spid2_txaddr
+	setarg 0
+	store 2,core_spid2_rxlen
+	jam spid2_start,core_misc_ctrl
+	call wait_spid2_done
+	branch wait_spid2_flash_done
+	
+spid2_read_flash:
+	storet 2,core_spid2_rxlen
+	rshift16 pdata,temp
+	storet 1,mem_addr_hi2
+	rshift8 pdata,temp
+	storet 1,mem_addr_mi2
+	store 1,mem_addr_lo2
+	setarg 4
+	store 2,core_spid2_txlen
+	jam FLASH_COMMAND_READ_DATA,mem_spid2_tbuf
+	setarg mem_spid2_tbuf
+	store 2,core_spid2_txaddr
+	deposit rega
+	store 2,core_spid2_rxaddr
+	fetch 1,core_spid2_ctrl
+	isolate0 15,rega
+	setflag true,6,pdata
+	store 1,core_spid2_ctrl
+	jam spid2_start,core_misc_ctrl
+spid2_read_flash_wait:
+	fetch 1,core_perf_status
+	bbit1 7,spid2_read_flash_wait			// waiting for spid write
+	arg spid_done,queue
+	branch wait_spid2_done
+	
+wait_spid2_flash_done:
+	setarg 2000
+	call sleep
+	call spid2_unlock_flash
+	setarg mem_spid2_rbuf
+	store 2,core_spid2_rxaddr
+	setarg FLASH_READ_SATUS
+	call spid2_read_reg
+	bbit1 FLASH_STATUS_WIP,wait_spid2_flash_done
+	rtn
+	
+spi2_gpio_init:
+	fetch 1,mem_spi2_cs_gpio
+	arg gpcfg_spid2_ncs,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi2_sclk_gpio
+	arg gpcfg_spid2_sck,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi2_si_gpio
+	arg gpcfg_spid2_mosi,temp
+	call gpio_config_function_int
+	fetch 1,mem_spi2_so_gpio
+	arg gpcfg_spid2_miso,temp
+	branch gpio_config_function_int
+	
+endif
+
+/*****************************************************************************
+*soft reset chip
+*****************************************************************************/
+soft_reset_chip:
+	jam 1,core_reset
+	rtn
+
+
+
+/* ===================== I2C dma ======================= */
+
+/* scl high time: scl_high + 2 clks, scl low time:scl_low + 6 clks
+data setup time: data_setup + 2 clks, data hold time: scl_low-setup-hold+4 clks */
+iic_init_600khz:
+	jam 5,core_iicd_scl_low
+ 	jam 7,core_iicd_scl_high
+	jam 7,core_iicd_start_setup
+	jam 7,core_iicd_start_hold
+	jam 7,core_iicd_stop_setup
+	jam 5,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	rtn
+	
+iic_init_360khz:	//360khz
+	jam 12,core_iicd_scl_low
+	jam 13,core_iicd_scl_high
+	jam 13,core_iicd_start_setup
+	jam 13,core_iicd_start_hold
+	jam 13,core_iicd_stop_setup
+	jam 12,core_iicd_data_setup
+	jam 0,core_iicd_data_hold	
+  	rtn
+
+iicd_init_pin:
+	call iicd_eeprom_write_enable
+iicd_init_pin_scl_sda:
+	fetch 1,mem_eeprom_scl_gpio
+	arg gpcfg_iic_scl|gpcfg_pullup,temp
+	call gpio_config_function_int
+	fetch 1,mem_eeprom_sda_gpio
+	arg gpcfg_iic_sda|gpcfg_pullup,temp
+	branch gpio_config_function_int
+
+iicd_read_init_pin:
+	call iicd_eeprom_write_disable
+	branch iicd_init_pin_scl_sda
+
+wait_iicd_done:
+	fetch 1,core_dma_status
+	bbit0 iicd_done,wait_iicd_done
+	rtn
+
+	/* pdata is iic addr, rega points to buf, temp is length */
+iicd_read_data:
+	store 1,mem_iicd_addr
+	setarg mem_iicd_addr
+	store 2,core_iicd_txaddr
+	setarg 1
+	store 2,core_iicd_txlen
+	storet 2,core_iicd_rxlen
+	storer rega,2,core_iicd_rxaddr
+	jam 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	branch wait_iicd_done
+
+	/* rega points to buf, temp is length */
+iic_write_data:
+	setarg 0
+	store 2,core_iicd_rxlen
+	store 2,core_iicd_rxaddr
+	storet 2,core_iicd_txlen
+	storer rega,2,core_iicd_txaddr
+	jam 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	branch wait_iicd_done
+
+set_eeprom_size_2k:
+	set1 mark_eeprom_size,mark
+	jam 0x08,mem_eeprom_block_size
+	rtn
+
+clear_eeprom_size_2k:
+	set0 mark_eeprom_size,mark
+	jam 0x20,mem_eeprom_block_size
+	rtn
+
+
+iicd_read_eep_data_size_2k:
+ 	fetch 1,mem_eeprom_base
+	iadd regb,pdata
+	store 1,mem_addr_mi
+	branch iicd_read_eep_size_2k
+
+iicd_read_eep_size_2k_lcadcode:
+	fetch 2,mem_addr_mi
+	byteswap pdata,pdata
+	store 1,mem_addr_mi
+	
+//length:temp 
+//mem ptr:rega
+//eeprom addr:pdata
+iicd_read_eep_size_2k:
+ 	setarg 3
+	store 2,core_iicd_txlen
+	jam 0xa0,mem_iicd_tbuf
+	jam 0xa1,mem_iicd_tbuf+2
+	branch iicd_read_eep_common
+
+
+//length:temp 
+//mem ptr:rega
+//eeprom addr:regb
+iicd_write_protect_eep_data:
+	storet 2,mem_temp
+	call iicd_eeprom_write_enable
+	fetcht 2,mem_temp
+	call iicd_write_eep_data
+	branch iicd_eeprom_write_disable
+	
+iicd_eeprom_write_enable:
+	fetch 1,mem_eeprom_wp_gpio
+	rtneq GPIO_DISABLE
+	bbit0 6,iicd_wp_gpio_output_low
+	setarg 150000
+	call sleep
+iicd_wp_gpio_output_low:
+	fetcht 1,mem_eeprom_wp_gpio
+	branch gpio_out_active
+	
+iicd_eeprom_write_disable:
+	fetcht 1,mem_eeprom_wp_gpio
+	branch gpio_out_inactive
+	
+//length:temp 
+//mem ptr:rega
+//eeprom addr offset:regb
+iicd_read_eep_data:
+	bpatchx patch24_3,mem_patch24
+	bmark1 mark_eeprom_size,iicd_read_eep_data_size_2k
+	fetch 2,mem_eeprom_base
+	iadd regb,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+
+/* rega pointers to buf, temp is length  */
+iicd_read_eep:
+	bpatchx patch24_4,mem_patch24
+	bmark1 mark_eeprom_size,iicd_read_eep_size_2k_lcadcode
+	setarg 4
+	store 2,core_iicd_txlen
+	jam 0xa0,mem_iicd_tbuf
+	jam 0xa1,mem_iicd_tbuf+3
+iicd_read_eep_common:	
+	setarg mem_iicd_tbuf
+	store 2,core_iicd_txaddr
+	storet 2,core_iicd_rxlen
+	storer rega,2,core_iicd_rxaddr
+	setarg 2
+	isolate0 15,rega
+	setflag true,0,pdata
+	store 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	arg iicd_done,queue
+	call decrypt_code
+	call wait_iicd_done
+	isolate1 iicd_crcok,pdata
+	call set_ucode_status
+	bmark1 mark_eeprom_size,iicd_read_eep_load_code_size_2k
+	fetch 2,mem_addr_mi
+	byteswap pdata,pdata
+	iadd temp,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+	rtn
+
+iicd_read_eep_load_code_size_2k:
+	fetch 1,mem_addr_mi
+	iadd temp,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+	rtn
+	
+
+//length:temp 
+//mem ptr:rega
+//eeprom addr offset:regb
+iicd_write_eep_data:
+	fetch 2,mem_eeprom_base
+	iadd regb,pdata
+
+//cuur ptr:pdata length:temp buf:rega
+iicd_write_ota_data:
+	store 2,mem_pdatatemp //curr ptr
+	bpatchx patch24_5,mem_patch24
+	storet 2,mem_temp	//len
+	storer rega,2,mem_contr
+iicd_write_eep_loop:
+	call iicd_eep_transparency
+
+	fetcht 2,mem_regb
+	fetchr rega,2,mem_contr
+	fetch 2,mem_pdatatemp
+	
+	call iicd_write_eep
+	
+	fetch 2,mem_regb
+	fetcht 2,mem_contr
+	iadd temp,temp
+	storet 2,mem_contr
+	fetcht 2,mem_pdatatemp
+	iadd temp,temp
+	storet 2,mem_pdatatemp
+	fetch 2,mem_temp
+	nbranch iicd_write_eep_loop,blank
+	rtn
+	
+//in:
+//1.size 2.len 3.src 4.des
+//mem_regc page's area
+//mem_pdatatemp curr ptr
+//mem_temp all len      
+//mem_regb curr len
+iicd_eep_transparency:
+	bpatchx patch24_6,mem_patch24
+	fetch 1,mem_eeprom_block_size
+	increase -1,pdata
+	fetcht 2,mem_pdatatemp
+	ior temp,pdata
+	increase 1,pdata
+	store 3,mem_regc
+
+	fetch 2,mem_temp
+	iadd temp,pdata
+
+	fetcht 3,mem_regc
+	isub temp,pdata
+	nbranch iicd_eep_deal_short_packet,positive
+	store 2,mem_temp
+	fetch 3,mem_regc
+	fetcht 2,mem_pdatatemp
+	isub temp,pdata
+	store 2,mem_regb
+	rtn
+iicd_eep_deal_short_packet:
+	fetch 2,mem_temp
+	store 2,mem_regb
+	setarg 0
+	store 2,mem_temp
+	rtn
+
+iicd_write_eep_size_2k:
+	copy regb,pdata
+	increase 2,temp
+	storet 2,core_iicd_txlen
+	increase -2,rega
+	ifetcht 3,rega
+	copy temp,regb
+	arg 0xa0,temp
+	istoret 1,rega
+	istore 1,contw
+	branch iicd_write_eep_common
+
+	/* pdata is eeprom address, rega pointers to txdata(3 ahead bytes should be left), temp is length */
+iicd_write_eep:
+	copy pdata,regb
+	bpatchx patch24_7,mem_patch24
+	bmark1 mark_eeprom_size,iicd_write_eep_size_2k
+	copy regb,pdata
+	increase 3,temp
+	storet 2,core_iicd_txlen
+	increase -3,rega
+	ifetcht 3,rega
+	copy temp,regb
+	arg 0xa0,temp
+	istoret 1,rega
+	byteswap pdata,pdata
+	istore 2,contw
+iicd_write_eep_common:	
+	storer rega,2,core_iicd_txaddr
+	setarg 0
+	store 2,core_iicd_rxlen
+	jam 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	istorer regb,3,rega
+iic_check_eeprom_standby:
+	bpatchx patch25_0,mem_patch25
+	jam 0,mem_iicd_tbuf+3
+iic_check_eeprom_standby_wait:
+	setarg 1
+	store 2,core_iicd_txlen
+	jam 0xa0,mem_iicd_tbuf
+	setarg mem_iicd_tbuf
+	store 2,core_iicd_txaddr
+	setarg 0
+	store 2,core_iicd_rxlen
+	store 2,core_iicd_rxaddr
+	setarg 3
+	store 1,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	fetch 1,core_dma_status
+	rtnbit0 iicd_ack
+	nop 1500
+	fetch 1,mem_iicd_tbuf+3
+	increase 1,pdata
+	store 1,mem_iicd_tbuf+3
+	sub pdata,40,null
+	nrtn positive//polling timeout 6ms
+	branch iic_check_eeprom_standby_wait
+
+/* ===================== efuse ======================= */
+//pdata: efuse address, rega :points to data, temp : count 
+efuse_read_data:
+	copy temp,loopcnt
+	copy pdata,temp
+	bpatchx patch25_1,mem_patch25
+	lshift3 temp,temp
+	call efuse_vdd_on
+	jam 0x80,core_efuse_ctrl
+efuse_read_loop:
+	jam 0x86,core_efuse_ctrl
+	storet 2,core_efuse_addr
+	increase 8,temp
+	jam 0x87,core_efuse_ctrl
+	fetch 1,core_efuse_rdata
+	istore 1,rega
+	increase 1,rega
+	loop efuse_read_loop
+	jam 0x86,core_efuse_ctrl
+	jam 0x80,core_efuse_ctrl
+	jam 0x0,core_efuse_ctrl
+	branch efuse_vdd_off
+
+//temp = efuse address, rega pointers data, loopcnt is count 
+efuse_program:
+	call efuse_vdd_fsource_on
+	jam 0x80,core_efuse_ctrl
+	lshift3 temp,temp
+	copy rega,contr
+efuse_program_loop:
+	ifetch 1,contr
+	arg 8,regb
+efuse_program_bit_loop:
+	and pdata,1,null
+	ncall efuse_program_bit,zero
+	rshift pdata,pdata
+	increase 1,temp
+	increase -1,regb
+	nbranch efuse_program_bit_loop,zero
+	loop efuse_program_loop
+	jam 0x80,core_efuse_ctrl
+	jam 0x0,core_efuse_ctrl
+	branch efuse_vdd_off
+    
+
+efuse_pa_vdd_set:
+	fetch 2,core_rf_ldo_cfg8
+	store 2,mem_pdatatemp
+	jam 0x6a,core_rf_ldo_cfg8
+	jam 0x0b,core_rf_ldo_cfg9
+	rtn
+
+efuse_pa_vdd_recover:
+	fetch 2,mem_pdatatemp
+	store 2,core_rf_ldo_cfg8
+	rtn
+
+efuse_lna_pa_ldo_on:
+	call efuse_pa_vdd_set
+	fetch 1,core_rf_ldo_en0
+	set1 1,pdata
+	store 1,core_rf_ldo_en0
+	nop 200
+	fetch 1,core_rf_ldo_en1
+	set1 0,pdata
+	store 1,core_rf_ldo_en1
+	nop 2000
+	rtn
+
+efuse_vdd_fsource_on:
+	call efuse_lna_pa_ldo_on
+	fetch 1,core_rf_ldo_en1
+	set0 5,pdata
+	set1 4,pdata
+	set1 3,pdata
+	store 1,core_rf_ldo_en1
+	nop 500
+	rtn
+	
+efuse_vdd_on:
+	call efuse_lna_pa_ldo_on
+	fetch 1,core_rf_ldo_en1
+	set1 5,pdata
+	set1 4,pdata
+	set0 3,pdata
+	store 1,core_rf_ldo_en1
+	nop 500
+	rtn
+	
+efuse_vdd_off:
+	bpatchx patch25_2,mem_patch25
+	fetch 1,core_rf_ldo_en1
+	set0 5,pdata
+	set0 4,pdata
+	set0 3,pdata
+	set0 0,pdata	
+	store 1,core_rf_ldo_en1
+	nop 200
+	fetch 1,core_rf_ldo_en0
+	set0 1,pdata
+	store 1,core_rf_ldo_en0
+	branch efuse_pa_vdd_recover
+
+efuse_program_bit:
+	jam 0x80,core_efuse_ctrl
+	nop 10
+	storet 2,core_efuse_addr
+	jam 0x81,core_efuse_ctrl
+	nop 110
+	rtn
+
+/* ===================== uart dma ======================= */
+uarta_init_dma_mem:
+	call enable_user
+	branch uart_init_dma_mem
+uartb_init_dma_mem:
+	call disable_user
+	branch uart_init_dma_mem
+/*
+function name:uart_init_dma_mem
+input:
+	pdata is dma memory config
+	bit[0-15]:rx start memory address
+	bit[16-31]:rx ending memory address
+	bit[32-47]:tx start memory address
+	bit[48-63]:tx ending memory address
+	user is choice uart road
+	enable is mean check uart A
+	disable user is mean check uart B
+*/
+uart_init_dma_mem:
+	rshift16 pdata,temp
+	call uarta_init_rx,user
+	ncall uartb_init_rx,user
+	rshift32 pdata,pdata
+	rshift16 pdata,temp
+	call uarta_init_tx,user
+	ncall uartb_init_tx,user
+	nbranch uartb_init_dma_turn_on_clk,user
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_UART,pdata
+	store 2,core_clkoff
+	rtn
+uartb_init_dma_turn_on_clk:
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_UARTB,pdata
+	store 2,core_clkoff
+	rtn
+
+
+/*
+function name:uarta_init_baud_rate
+input:
+	pdata is uart A baud rate
+*/
+uarta_init_baud_rate:
+	store uart_baud_len,core_uart_baud
+	rtn
+
+
+/*
+function name:uartb_init_baud_rate
+input:
+	uartb_init_baud_rate is uart B baud rate
+*/
+uartb_init_baud_rate:
+	store uart_baud_len,core_uartb_baud
+	rtn
+
+/*
+function name:uarta_calc_baud_rate_config
+input:
+	temp is uart A baud rate,Decimal data
+	E.g:115200 input arg 115200,temp
+*/
+uarta_calc_baud_rate_config:
+	call uart_calc_baud_rate_config
+	branch uarta_init_baud_rate
+
+/*
+function name:uartb_calc_baud_rate_config
+input:
+	temp is uart B baud rate,Decimal data
+	E.g:115200 input arg 115200,temp
+*/
+uartb_calc_baud_rate_config:
+	call uart_calc_baud_rate_config
+	branch uartb_init_baud_rate
+
+/*
+function name:uart_calc_baud_rate_config
+input:
+	temp is uart baud rate,Decimal data
+	E.g:115200 input arg 115200,temp
+output:
+	pdata is CPU config uart baud rate
+*/
+uart_calc_baud_rate_config:
+	call uart_calc_baud_rate_config_choice_uart_clock
+	idiv temp
+	call wait_div_end
+	quotient pdata
+	rtn
+
+uart_calc_baud_rate_config_choice_uart_clock:
+	fetch 1,core_uart_clksel
+	bbit0 UART_CLOCK_SELECT_BIT,uart_calc_baud_rate_config_choice_uart_clock_crystal
+	setarg uart_clock_freq_48M
+	rtn
+uart_calc_baud_rate_config_choice_uart_clock_crystal:
+	setarg uart_clock_freq_24M
+	rtn
+
+uart_clock_select_main_freq_crystal:
+	fetch 1,core_uart_clksel
+	and pdata,UART_CLOCK_SELECT_CRYSTAL,pdata
+	store 1,core_uart_clksel
+	rtn
+
+uart_clock_select_main_freq_dpll:
+	fetch 1,core_uart_clksel
+	or pdata,UART_CLOCK_SELECT_DPLL,pdata
+	store 1,core_uart_clksel
+	rtn
+
+
+	// pdata: tx buffer start, temp: tx buffer end
+uarta_init_tx:
+	store 2,core_uart_tsaddr
+	store 2,core_uart_twptr
+	storet 2,core_uart_teaddr
+	rtn
+
+	// pdata: tx buffer start, temp: tx buffer end
+uartb_init_tx:
+	store 2,core_uartb_tsaddr
+	store 2,core_uartb_twptr
+	storet 2,core_uartb_teaddr
+	rtn
+
+	// pdata: rx buffer start, temp: rx buffer end
+uarta_init_rx:
+	store 2,core_uart_rsaddr
+	store 2,core_uart_rrptr
+	storet 2,core_uart_readdr
+	rtn
+
+	// pdata: rx buffer start, temp: rx buffer end
+uartb_init_rx:
+	store 2,core_uartb_rsaddr
+	store 2,core_uartb_rrptr
+	storet 2,core_uartb_readdr
+	rtn
+
+
+uarta_prepare_tx:
+	fetchr contus,2,core_uart_tsaddr
+	fetchr contue,2,core_uart_teaddr
+	fetchr contu,2,core_uart_twptr
+	rtn
+
+uartb_prepare_tx:
+	fetchr contus,2,core_uartb_tsaddr
+	fetchr contue,2,core_uartb_teaddr
+	fetchr contu,2,core_uartb_twptr
+	rtn
+
+uarta_prepare_rx:
+	fetchr contus,2,core_uart_rsaddr
+	fetchr contue,2,core_uart_readdr
+	fetchr contu,2,core_uart_rrptr
+	rtn
+
+uartb_prepare_rx:
+	fetchr contus,2,core_uartb_rsaddr
+	fetchr contue,2,core_uartb_readdr
+	fetchr contu,2,core_uartb_rrptr
+	rtn
+
+uarta_send:
+	storer contu,2,core_uart_twptr
+	rtn
+
+uartb_send:
+	storer contu,2,core_uartb_twptr
+	rtn
+
+uarta_rxdone:
+	storer contu,2,core_uart_rrptr
+	rtn
+
+uartb_rxdone:
+	storer contu,2,core_uartb_rrptr
+	rtn
+
+uarta_clear_current_rx:
+	call uarta_prepare_rx
+	fetch 2,core_uart_rxitems
+	iadd contu,contu
+	branch uarta_rxdone
+
+uartb_clear_current_rx:
+	call uartb_prepare_rx
+	fetch 2,core_uartb_rxitems
+	iadd contu,contu
+	branch uartb_rxdone
+
+uarta_prepare_tx_register_push:
+	call uart_register_push
+	branch uarta_prepare_tx
+
+uartb_prepare_tx_register_push:
+	call uart_register_push
+	branch uartb_prepare_tx
+
+uarta_send_register_pop:
+	call uarta_send
+	branch uart_register_pop
+
+uartb_send_register_pop:
+	call uartb_send
+	branch uart_register_pop
+
+
+uart_register_push:
+	storer contu,2,mem_contu
+	storer contus,2,mem_contue
+	storer contue,2,mem_contus
+	rtn
+
+uart_register_pop:
+	fetchr contu,2,mem_contu
+	fetchr contus,2,mem_contue
+	fetchr contue,2,mem_contus
+	rtn
+
+
+uart_copy_tx_bytes_fast:
+	deposit loopcnt
+	rtn blank
+uart_copy_tx_bytes_fast_loop:
+	increase -8,loopcnt
+	call uart_tx_8_bytes,positive
+	rtn zero
+	branch uart_copy_tx_bytes_fast_loop,positive
+	increase 8,loopcnt
+uart_copy_tx_bytes_fast_loop_four:
+	increase -4,loopcnt
+	call uart_tx_4_bytes,positive
+	rtn zero
+	branch uart_copy_tx_bytes_fast_loop_four,positive
+	increase 4,loopcnt
+	branch uart_copy_tx_bytes
+
+uart_tx_16_bytes:
+	call uart_tx_8_bytes
+uart_tx_8_bytes:
+	ifetch 8,contr
+	istore 8,contu
+	rtn
+
+uart_tx_4_bytes:
+	ifetch 4,contr
+	istore 4,contu
+	rtn
+
+uart_copy_tx_bytes:
+	deposit loopcnt
+	rtn blank
+uart_copy_tx_bytes_loop:
+	ifetch 1,contr
+	istore 1,contu
+	loop uart_copy_tx_bytes_loop
+	rtn
+
+uart_copy_rx_bytes_fast:
+	deposit loopcnt
+	rtn blank
+uart_copy_rx_bytes_fast_loop:
+	increase -8,loopcnt
+	call uart_rx_8_bytes,positive
+	rtn zero
+	branch uart_copy_rx_bytes_fast_loop,positive
+	increase 8,loopcnt
+uart_copy_rx_bytes_fast_loop_four:
+	increase -4,loopcnt
+	call uart_rx_4_bytes,positive
+	rtn zero
+	branch uart_copy_rx_bytes_fast_loop_four,positive
+	increase 4,loopcnt
+	branch uart_copy_rx_bytes
+
+uart_rx_16_bytes:
+	call uart_rx_8_bytes
+uart_rx_8_bytes:
+	ifetch 8,contu
+	istore 8,contw
+	rtn
+
+uart_rx_4_bytes:
+	ifetch 4,contu
+	istore 4,contw
+	rtn
+
+
+uart_copy_rx_bytes:
+	deposit loopcnt
+	rtn blank
+uart_copy_rx_bytes_loop:
+	ifetch 1,contu
+	istore 1,contw
+	loop uart_copy_rx_bytes_loop
+	rtn
+
+
+/* ===================== eeprom data ======================= */
+
+app_store_nvram_event:
+	jam BT_EVT_STORE_NVRAM,mem_fifo_temp
+	branch ui_ipc_send_event
+
+check_51cmd_store_reconn_info:
+check_51cmd_update_device_record:
+	bpatchx patch25_3,mem_patch25
+	fetch 1,mem_nv_data_number
+	rtn blank		// not nv data
+	call check_nvram
+	call init_device_list,zero
+	call disable_user2
+	call nvram_find_addr_from_bd_list
+write_device_record:
+	fetch 1,mem_nv_data_number
+	icopy regc
+	fetcht 2,mem_nv_data_ptr
+	storet 2,mem_list_item_ptr
+write_device_loop_find:
+	copy regc,pdata
+	branch app_store_nvram_event,blank  //EEPROM
+	increase -1,regc
+	copy temp,rega
+	ifetch 1,rega
+	fetcht 1,mem_select_list_item
+	isub temp,null
+	call set_index_finded_device,zero
+	branch write_device_loop_find0,positive
+	ifetch 1,rega
+	increase 1,pdata
+	istore 1,rega
+write_device_loop_find0:
+	fetcht 2,mem_list_item_ptr
+	increase NV_DATA_LEN,temp
+	storet 2,mem_list_item_ptr
+	branch write_device_loop_find
+
+set_index_finded_device:
+	setarg 0
+	istore 1,rega
+	fetch 1,mem_temp_reconn_record
+	istore 1,contw	
+	bne REC_3_MODE,set_index_finded_device_ble_mode
+	arg mem_link_key,regb
+set_index_find_device_MASTER_ADDR:
+	ifetch 6,contr
+	istore 8,contw
+	setarg 0
+	istore 8,contw
+	copy regb,contr
+store_rec_data_common:
+	call memcpy16
+	force 1,null
+	rtn
+
+set_index_finded_device_ble_mode:
+	beq REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS,set_index_finded_device_IRK
+	beq REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS,set_index_finded_device_EDIV
+	arg mem_le_ltk,regb
+	branch set_index_find_device_MASTER_ADDR
+
+set_index_finded_device_IRK:
+	arg mem_le_irk,contr
+	call memcpy16
+store_ble_rec_data_common:
+	arg mem_le_ltk,contr
+	branch store_rec_data_common
+
+set_index_finded_device_EDIV:
+	arg mem_le_rand,contr
+	call memcpy16
+	branch store_ble_rec_data_common
+
+
+//enable user2 reconnect
+//disable user2 pairing
+nvram_find_addr_from_bd_list:
+	call disable_user
+	fetch 1,mem_nv_data_number
+	rtn blank		// not nv data
+	bpatchx patch25_4,mem_patch25
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_CONNECTED,find_addr_from_bd_list_SPP_mode
+	rtnbit0 UI_STATE_BLE_CONNECTED
+find_addr_from_bd_list_ble_mode:
+	fetch 1,mem_le_conn_peer_addr_type
+	beq MASTER_PUBLIC_ADDR,find_addr_from_bd_list_public_device_addr
+	fetch 1,mem_le_plap+5
+	compare 0xc0,pdata,0xc0
+	branch find_addr_from_bd_list_static_addr,true
+	compare 0x40,pdata,0xc0
+	branch find_addr_from_bd_list_random_addr,true
+	branch find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy
+
+find_addr_from_bd_list_static_addr:
+	branch find_addr_from_bd_list_static_addr_reconnect,user2
+	fetch 1,mem_le_preq_init_key_distribution
+	bbit0 LE_INITATOR_IRK_BIT,find_addr_from_bd_list_public_device_addr
+	branch find_addr_from_bd_list_static_addr_sc_or_legacy
+
+find_addr_from_bd_list_static_addr_reconnect:
+	call find_addr_from_bd_list_public_device_addr
+	rtn user
+	branch find_addr_from_bd_list_static_addr_sc_or_legacy
+
+
+find_addr_from_bd_list_static_addr_sc_or_legacy:
+find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy:
+	fetch 1,mem_le_pairing_mode
+	bbit1 LE_PAIRING_MODE_SECURE_CONNECT_BIT,find_addr_from_bd_list_random_non_resolvable_private_address_sc
+	branch find_addr_from_bd_list_random_non_resolvable_private_address
+
+find_addr_from_bd_list_static_addr_sc:
+find_addr_from_bd_list_random_non_resolvable_private_address_sc:
+	fetch 6,mem_le_plap
+	store 8,mem_le_rand
+	branch find_addr_from_bd_list_random_non_resolvable_private_address
+
+
+find_addr_from_bd_list_public_device_addr:
+	jam REC_4_MODE_STATIC_ADDRESS,mem_temp_reconn_record
+	fetch 6,mem_le_plap
+	branch find_addr_from_bd_list_common
+	
+find_addr_from_bd_list_random_non_resolvable_private_address:	
+	jam REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS,mem_temp_reconn_record
+	branch find_addr_from_bd_list_common
+
+//input :pdata EDIV and rands
+find_addr_from_bd_list_random_addr:
+	jam REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS,mem_temp_reconn_record
+	branch find_addr_from_bd_list_common
+	
+//input :pdata EDIV and rands
+find_addr_from_bd_list_SPP_mode:
+	jam REC_3_MODE,mem_temp_reconn_record
+	fetch 6,mem_plap
+find_addr_from_bd_list_common:
+	store 6,mem_temp_lap
+	fetch 2,mem_nv_data_ptr
+	ifetcht 1,pdata
+	pincrease 1
+	store 2,mem_list_item_ptr
+	storet 1,mem_select_list_item
+	fetch 1,mem_nv_data_number
+	icopy regc
+nvram_find_addr_from_list:
+	fetch 2,mem_list_item_ptr
+	copy pdata,rega
+	call nvram_find_addr_from_list_compare
+	rtn user
+	fetcht 2,mem_list_item_ptr
+	increase NV_DATA_LEN,temp
+	storet 2,mem_list_item_ptr
+	increase -1,temp
+	ifetch 1,temp
+	store 1,mem_select_list_item
+	increase -1,regc
+	nbranch nvram_find_addr_from_list,zero
+	fetch 1,mem_nv_data_number
+	pincrease DECREASED_ONE
+	store 1,mem_select_list_item
+	rtn
+nvram_find_addr_from_list_compare:
+	fetch 1,mem_temp_reconn_record
+	bne REC_3_MODE,find_addr_from_list_compare_ble_mode
+find_master_addr_from_list_compare:
+	arg mem_temp_reconn_record,regb
+	arg 7,loopcnt
+	call string_compare
+	branch enable_user,zero
+	rtn
+
+find_addr_from_list_compare_ble_mode:
+	beq REC_4_MODE_RANDOM_RESOLVABLE_PRIVATE_ADDRESS,find_irk_form_list_compare
+	beq REC_4_MODE_RANDOM_NON_RESOLVABLE_PRIVATE_ADDRESS,find_ediv_form_list_compare
+	branch find_master_addr_from_list_compare
+
+find_irk_form_list_compare:
+	ifetcht 1,rega
+	isub temp,null
+	nrtn zero
+	arg mem_le_prand,contw
+	arg 16,loopcnt
+	call clear_mem
+	fetch 3,mem_le_plap+3
+	store 3,mem_le_prand
+	call genernate_master_MacAddress
+	fetch 2,mem_le_aes_128+13
+	byteswap pdata,pdata
+	lshift8 pdata,temp
+	ifetch 1,contr
+	iadd temp,pdata
+	fetcht 3,mem_le_plap
+	isub temp,null
+	branch enable_user,zero
+	rtn
+
+
+genernate_master_MacAddress:
+	arg mem_le_prand ,contr
+	call load_data128
+//	arg mem_le_irk,contr
+	ifetch 1,rega
+	call load_regext
+	force 0x38,aes_ctrl
+	force 0x0,aes_ctrl
+	call wait_aes
+	arg mem_le_aes_128,contw
+	branch store_aes_result
+
+find_ediv_form_list_compare:
+	ifetcht 1,rega
+	isub temp,null
+	nrtn zero
+	copy contr,rega
+	add contr,8,regc
+	arg mem_le_rand,regb
+	arg 8,loopcnt
+	call string_compare
+	branch enable_user,zero
+	copy regc,rega
+	arg mem_le_irk,regb
+	arg 8,loopcnt
+	call string_compare
+	branch enable_user,zero
+	rtn
+
+check_nvram:
+	fetch 2,mem_nv_data_ptr
+	ifetcht 1,pdata
+	pincrease NV_DATA_LEN
+	ifetch 1,pdata
+	isub temp,null
+	rtn
+
+init_device_list:
+	fetch 1,mem_nv_data_number
+	icopy loopcnt
+	fetcht 2,mem_nv_data_ptr
+	setarg 0
+init_device_list_loop:
+	istore 1,temp
+	increase NV_DATA_LEN,temp
+	pincrease 1
+	loop init_device_list_loop
+	rtn
+
+load_device_list:
+	bpatchx patch25_5,mem_patch25
+	call enable_user2
+	call nvram_find_addr_from_bd_list
+	fetch 1,mem_state
+	setflag user,state_combkey,pdata	/* we have link key */
+	store 1,mem_state
+	nbranch clear_key_exists,user
+	add rega,10,contr
+	arg mem_link_key,contw
+	call  memcpy16
+	branch check_link_key_load
+clear_key_exists:
+	jam 0,mem_link_key_exists
+	rtn
+
+load_device_list_mode_4:
+//	fetch 9,mem_le_ediv
+//	branch clear_ltk_exists,blank
+	call enable_user2
+	call nvram_find_addr_from_bd_list
+	nbranch clear_ltk_exists,user
+	fetch 2,mem_list_item_ptr
+	add pdata,1,contr
+	arg mem_le_irk,contw
+	call  memcpy16
+	arg mem_le_ltk,contw
+	call  memcpy16
+	jam 1,mem_ltk_exists
+	rtn
+
+clear_ltk_exists:
+	jam 0,mem_ltk_exists
+	rtn
+
+
+eeprom_store_le_reconn_info:
+	jam REC_4_MODE,mem_record_bt_mode
+	branch eeprom_store_reconn_info
+eeprom_store_bd_reconn_info:
+	jam REC_3_MODE,mem_record_bt_mode
+eeprom_store_reconn_info:
+	fetch 1,mem_device_option
+	beq dvc_op_module,check_51cmd_update_device_record
+	beq dvc_op_mouse,mouse_store_remote_bdaddr
+	rtn
+	
+
+check_link_key_load:
+	fetch 8,mem_link_key
+	fetcht 8,mem_link_key+8
+	ior temp,pdata
+	rtn blank
+	jam 1,mem_link_key_exists
+	rtn
+	
+
+/* =============== GPIO CONTROL ================= */
+
+
+//temp [4:0]=GPIO number, 0-31, 
+gpio_set_wake_by_current_state:
+	bpatchx patch25_6,mem_patch25
+	set1 gpio_active_bit,temp
+	call gpio_get_bit
+	nsetflag true,gpio_active_bit,temp
+
+//temp [4:0]=GPIO number, 0-31, [7]=0, low active
+gpio_set_wake:
+	bpatchx patch25_7,mem_patch25
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate0 gpio_active_bit,temp
+	and temp,0x1f,queue
+	fetch 4,mem_gpio_wakeup_low
+	qsetflag true,pdata
+	store 4,mem_gpio_wakeup_low
+	fetch 4,mem_gpio_wakeup_high
+	nqsetflag true,pdata
+	store 4,mem_gpio_wakeup_high
+	rtn
+	
+//temp [4:0]=GPIO number, 0-31, [7]=0, low active
+gpio_clr_wake:
+	bpatchx patch26_0,mem_patch26
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate0 gpio_active_bit,temp
+	and temp,0x1f,queue
+	fetch 4,mem_gpio_wakeup_low
+	qset0 pdata
+	store 4,mem_gpio_wakeup_low
+	fetch 4,mem_gpio_wakeup_high
+	qset0 pdata
+	store 4,mem_gpio_wakeup_high
+	rtn
+
+gpio_config_input_nowake:
+	call gpio_clr_wake
+	branch gpio_config_input_without_wake
+
+//temp [4:0]=GPIO number, 0-31, [7]=0, low active
+gpio_config_input:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	ncall gpio_set_wake,wake
+gpio_config_input_without_wake:
+	call gpio_addr
+	setarg 0
+	isolate1 gpio_active_bit,temp
+	nsetflag true,6,pdata
+	setflag true,7,pdata
+	branch gpio_write
+
+//temp is gpio number, return true if gpio active
+gpio_get_bit:
+	arg core_gpio_in,contw
+	and temp,0x07,queue
+	rshift3 temp,pdata
+	and_into 3,pdata
+	iadd contw,contw
+	ifetch 1,contw
+	isolate1 gpio_active_bit,temp
+	branch gpio_get_bit_reverse,true
+	qisolate0 pdata
+	rtn
+gpio_get_bit_reverse:
+	qisolate1 pdata
+	rtn
+
+//temp [5:0]=GPIO number, 0-39, [7]=0, low active. set gpio to inactive state
+gpio_out_inactive:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate1 gpio_active_bit,null
+	branch gpio_out_flag
+
+gpio_config_output:
+gpio_out_active:
+	sub temp,UI_BUTTON_GPIO_DISABLE,null
+	rtn zero
+	isolate0 gpio_active_bit,null
+
+//temp is gpio number,  [7]=1,set out equa true flag if gpio active
+gpio_out_flag:
+	setarg 0
+	nsetflag true,gpio_active_bit,pdata
+	ixor temp,temp
+
+//temp is gpio number,0-31, [7]=out bit value
+gpio_out:
+	call gpio_addr
+	setarg gpcfg_output_high
+	isolate1 gpio_active_bit,temp
+	setflag true,0,pdata
+	branch gpio_write
+
+//check output status
+gpio_check_active:
+	call gpio_addr
+	ifetch 1,contw
+	bbit1 0,gpio_check_active_high
+	isolate0 gpio_active_bit,temp
+	rtn
+gpio_check_active_high:
+	isolate1 gpio_active_bit,temp
+	rtn
+
+//gpio_set_analog:
+//	call gpio_addr
+//	setarg gpcfg_no_ie
+gpio_write:
+	istore 1,contw
+	rtn
+
+gpio_set_high_impedance:
+	call gpio_addr
+	setarg gpcfg_high_impedance
+	branch gpio_write
+
+gpio_addr:
+	and temp,0x3f,pdata
+	arg core_gpio_conf,contw
+	iadd contw,contw
+	rtn
+
+gpio_config_param:
+	and pdata,0xff,temp
+	rshift8 pdata,pdata
+	branch gpio_config_function_int
+
+//pdata: gpio number bit7=1, temp: function type
+gpio_config_function:
+	rtnbit0 gpio_active_bit
+gpio_config_function_int:
+	and_into 0x3f,pdata
+	arg core_gpio_conf,contw
+	iadd contw,contw
+	istoret 1,contw
+	rtn
+
+//temp:gpio num
+gpio_get_config:
+	and_into 0x3f,temp
+	setarg core_gpio_conf
+	iadd temp,contr
+	ifetch 1,contr
+	rtn
+
+
+//The default as shutter and remote
+gpio_set_before_lpm:
+	arg 20,loopcnt
+	arg core_gpio_conf,contr
+setgpio_loop:
+	copy contr,contw
+	ifetch 1,contr
+	beq gpcfg_qspi_ncs,setgpio_pullup
+	beq gpcfg_qspi_sck,setgpio_pullup
+	beq gpcfg_qspi_io0,setgpio_pullup
+	beq gpcfg_qspi_io1,setgpio_pullup
+	beq gpcfg_qspi_io2,setgpio_pullup
+	beq gpcfg_qspi_io3,setgpio_pullup
+	beq gpcfg_spid_miso,setgpio_pullup
+	beq gpcfg_spid_ncs,setgpio_pullup
+	beq gpcfg_spid_sck,setgpio_pullup
+	beq gpcfg_spid_mosi,setgpio_pullup
+	beq gpcfg_spid_sdio,setgpio_pullup
+	beq gpcfg_iic_scl,setgpio_pullup
+	beq gpcfg_iic_sda,setgpio_pullup
+	beq gpcfg_input,setgpio_pullup
+setgpio_loop_end:
+	loop setgpio_loop
+	rtn
+setgpio_pullup:
+	setarg gpcfg_pullup
+	istore 1,contw
+	branch setgpio_loop_end
+setgpio_pulldown:
+	setarg gpcfg_pulldown
+	istore 1,contw	
+	branch setgpio_loop_end
+
+/*************************************ADC*************************************/
+
+
+//mem_adc_config_flag 0:vinlpm 1:Hvin 2: GPIO
+adc_init_data:
+	bpatchx patch26_1,mem_patch26
+adc_init_cal_data:
+	fetch 8,mem_tmp_buffer+EFUSE_OFFSET_ADC
+	branch adc_init_cal_data_default,blank
+	arg mem_tmp_buffer+EFUSE_OFFSET_ADC,contr
+	arg mem_3v_adc_io_data,contw
+	arg 3,loopcnt
+adc_init_cal_data_loop:	
+	ifetch 3,contr	
+	lshift4 pdata,temp
+	istoret 2,contw
+	rshift8 pdata,temp
+	istoret 2,contw
+	loop adc_init_cal_data_loop
+	rtn 
+	
+adc_init_cal_data_default:
+	setarg 0x469a
+	store 2,mem_3v_adc_io_data
+	setarg 0xab77
+	store 2,mem_1v_adc_io_data
+	setarg 0x73d0
+	store 2,mem_3v_adc_vinlpm_data
+	setarg 0x9658
+	store 2,mem_2v_adc_vinlpm_data
+	rtn	
+	
+enable_adc:
+	bpatchx patch26_2,mem_patch26
+	fetchr regb,1,core_rf_ldo_cfg6
+	jam 0x3d,core_rf_ldo_cfg6
+	jam 0xaa,core_rf_ldo_cfg5
+	jam 0x0c,core_rf_ldo_en0
+	fetch 1,core_clkpll_cfg6
+	set1 7,pdata
+	store 1,core_clkpll_cfg6
+	jam 0x04,core_rf_ldo_en1
+	nop 60
+	jam 0,core_syn_en
+	jam 6,core_rx_en0
+	call read_adc_mode
+	store 1,core_gpadc_ctrl
+	jam 0x03,core_sum_ctrl
+	nop 60
+	fetch 1,core_sum_en
+	set1 7,pdata
+	store 1,core_sum_en
+	nop 1000  // 1/24ms
+	fetch 2,core_adc_sum
+	store 2,mem_adc_current_value
+	fetch 1,core_sum_en
+	set0 7,pdata
+	store 1,core_sum_en
+	jam 0,core_gpadc_ctrl
+	storer regb,1,core_rf_ldo_cfg6
+	rtn
+
+	
+read_adc_mode:	
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_VINLPM,adc_mode_vdcdc
+	beq ADC_CONFIG_HVIN,adc_adc_mode_vbat
+//	beq ADC_CONFIG_GPIO,adc_check_gpio
+adc_check_gpio:
+	fetch 1,mem_adc_channel
+	lshift3 pdata,pdata
+	or pdata,7,pdata
+	rtn
+
+adc_mode_vdcdc:
+	setarg 0x57
+	rtn
+	
+adc_adc_mode_vbat:
+	setarg 0x4f
+	rtn
+
+vdd_calculate_by_mode:
+	bpatchx patch26_3,mem_patch26
+	fetch 1,mem_adc_config_flag
+	beq ADC_CONFIG_VINLPM,vdd_calculate_vinlpm
+	beq ADC_CONFIG_HVIN,vdd_calculate_hvin
+	beq ADC_CONFIG_GPIO,vdd_calculate_io
+	rtn
+
+vdd_calculate_vinlpm:
+	setarg 100
+	store 2,mem_reference_voltage //diff
+	fetcht 2,mem_3v_adc_vinlpm_data
+	fetch 2,mem_2v_adc_vinlpm_data
+	arg 300,regc
+	branch vdd_calculate
+
+vdd_calculate_hvin:
+	setarg 100
+	store 2,mem_reference_voltage //diff
+	fetcht 2,mem_3v_adc_hvin_data
+	fetch 2,mem_2v_adc_hvin_data
+	arg 300,regc
+	branch vdd_calculate
+
+vdd_calculate_io:
+	setarg 200
+	store 2,mem_reference_voltage //diff
+	fetcht 2,mem_3v_adc_io_data
+	fetch 2,mem_1v_adc_io_data
+	arg 300,regc //max vol
+	
+vdd_calculate:
+	isub temp,rega
+	fetch 2,mem_adc_current_value
+	isub temp,pdata
+	nbranch vdd_calculate1,positive
+	fetcht 2,mem_reference_voltage
+	imul32 temp,regb
+	copy regc,pdata
+	imul32 rega,pdata
+	isub regb,pdata
+vdd_calculate2:
+	idiv rega
+	call wait_div_end
+	quotient pdata	
+	rtn
+
+vdd_calculate1:
+	copy temp,pdata
+	fetcht 2,mem_adc_current_value
+	isub temp,pdata
+	fetcht 2,mem_reference_voltage
+	imul32 temp,regb
+	copy regc,pdata
+	imul32 rega,pdata
+	iadd regb,pdata
+	branch vdd_calculate2
+
+
+/*	typedef struct
+*	{
+*		uint16 full_vol
+*		uint16 empty_vol
+*		uint16 low_vol
+*		uint16 now_vol
+*	}bat_calculate;
+*/
+//out:	pdata->bat percent
+adc_bat_percent_lowpower_out:
+	ifetch 8,rega
+	store 8,mem_pdatatemp
+	fetch 2,mem_pdatatemp
+	fetcht 2,mem_pdatatemp+2
+	isub temp,rega
+	fetch 2,mem_pdatatemp+6
+	isub temp,regb
+	fetcht 2,mem_pdatatemp+4
+	isub temp,null
+	ncall adc_set_low_power_flag,positive
+	mul32 regb,100,pdata
+	idiv rega
+	call wait_div_end
+	quotient pdata
+	call adc_set_no_power_flag,blank
+	rtn
+adc_set_low_power_flag:
+	fetch 1,mem_adc_power_flag
+	set1 0,pdata
+	store 1,mem_adc_power_flag
+	rtn
+
+adc_clear_low_power_flag:
+	fetch 1,mem_adc_power_flag
+	set0 0,pdata
+	store 1,mem_adc_power_flag
+	rtn	
+	
+adc_set_no_power_flag:
+	fetcht 1,mem_adc_power_flag
+	set1 1,temp
+	storet 1,mem_adc_power_flag
+	rtn
+
+adc_clear_no_power_flag:
+	fetcht 1,mem_adc_power_flag
+	set0 1,temp
+	storet 1,mem_adc_power_flag
+	rtn	
+
+
+
+/****************************************key scan***************************************/
+keyscan_key_init:
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_key_init_next:
+	rtn blank
+	copy pdata,loopcnt
+//	copy contr,rega
+	fetch 2,mem_keyscan_ptr
+	increase 3,pdata	//mem_key_conf0_pin
+	copy pdata,rega
+keyscan_key_init_lp1:
+	ifetcht 1, rega
+	call gpio_config_input
+	increase KEY_CONF_STRUCT_LEN,rega
+	loop keyscan_key_init_lp1
+keyscan_key_init_end:
+	rtn
+	
+keyscan_scan_key:
+	fetch 2,mem_keyscan_ptr
+	increase 3,pdata	//mem_key_conf0_pin
+	copy pdata,rega
+//	arg mem_key_conf0_pin,rega
+	force 0,regb
+	setarg 0
+	store 2,mem_key_value_temp
+keyscan_scan_key_lp1:
+	ifetcht 1, rega
+	call gpio_get_bit
+	bpatchx patch26_4,mem_patch26
+	fetch 2,mem_key_value_temp
+	copy regb,queue
+	qsetflag true,pdata
+	store 2, mem_key_value_temp
+	increase KEY_CONF_STRUCT_LEN,rega
+	increase 1,regb
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_scan_key_lp1_next:
+	ixor regb,null
+	nbranch keyscan_scan_key_lp1,zero
+	fetch 2,mem_key_value_temp
+	fetcht 2,mem_key_value_retention
+	ixor temp,null
+	rtn zero
+	enable user
+	rtn
+
+keyscan_process_lpm_before:
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_process_lpm_before_next:
+	rtn blank
+	copy pdata,loopcnt
+	fetch 2,mem_keyscan_ptr 
+	increase 3,pdata	//mem_key_conf0_pin
+	copy pdata,rega
+keyscan_process_lpm_before_lp1:
+	ifetcht 1, rega
+	call gpio_set_wake_by_current_state
+	increase KEY_CONF_STRUCT_LEN,rega
+	loop keyscan_process_lpm_before_lp1
+keyscan_process_lpm_before_end:
+	rtn
+
+keyscan_key_process:
+	arg key_scan_timer,queue
+	call timer_check
+	nrtn blank
+	setarg 0x20
+	arg key_scan_timer,queue
+	call timer_init
+	disable user
+	call keyscan_process_lpm_before
+	bpatchx patch26_5,mem_patch26
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_key_process_next:
+	rtn blank
+	call keyscan_scan_key
+	nbranch lpm_button_clean_wake_lock,user
+	call lpm_button_get_wake_lock
+	disable user
+	fetch 2,mem_key_value_temp
+	store 2,mem_key_value_temp4
+	jam 0,mem_key_value_temp6
+	force 0,queue
+keyscan_key_lp1:
+	fetch 2, mem_key_value_retention
+	rshift pdata,temp
+	storet 2,mem_key_value_retention
+	and pdata,0x01,pdata
+	fetcht 2, mem_key_value_temp4
+	and temp,0x01,rega
+	rshift temp,temp
+	storet 2,mem_key_value_temp4
+	ixor rega,null
+	ncall keyscan_send_key_data,zero
+	fetch 2,mem_key_num_ptr
+	ifetch 1,pdata
+keyscan_key_lp1_next:
+	fetcht 1, mem_key_value_temp6
+	increase 1,temp
+	storet 1, mem_key_value_temp6
+	copy temp,queue
+	ixor queue,null
+	nbranch keyscan_key_lp1,zero
+	fetch 2,mem_key_value_temp
+	store 2,mem_key_value_retention
+	rtn
+keyscan_send_key_data:
+	bpatchx patch26_6,mem_patch26
+	fetch 2,mem_keyscan_ptr
+	increase 1,pdata
+	ifetch 2,pdata
+	branch callback_func
+
+
+/*************************************pwm*************************************/
+
+//rega:clk select(0:system clk; 1:system clk undivied; 2:lpo)
+/*rega:clk select
+			0x00:select system clock 12M;
+			0x40:select undivied system clock 24M/48M;
+			0x80:select lpo clock:33K
+*/
+pwm_init:
+	fetch 1,core_clksel
+	ior rega,pdata
+	store 1,core_clksel
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_PWM,pdata
+	store 2,core_clkoff
+delay_nop100:
+	nop 100
+	rtn
+
+/*	typedef struct
+*	{
+*		uint8 gpio_num
+*		uint8 pwm_channel
+*		uint24 frequency
+*		uint8 duty_cycle   //0-100
+*	}PWM_Style;
+	addr: mem_pdatatemp
+*/
+pwm_clk_set:
+	fetch 1,core_clksel
+	bbit1 6,pwm_24m_clk_set
+	bbit1 7,pwm_33k_clk_set
+pwm_12m_clk_set:
+	setarg PWM_12MHZ
+	rtn
+pwm_24m_clk_set:
+	setarg PWM_24MHZ
+	rtn
+pwm_33k_clk_set:
+	setarg PWM_33KHZ
+	rtn
+/*
+	mem_pdatatemp+1:
+	bit0~bit2:pwm_channel
+	bit4:pwm_init_value(1:high;0:low)
+*/
+pwm_cont_set:
+	fetch 1,mem_pdatatemp+1
+	bbit1 4,pwm_cont_set1
+	bbit0 4,pwm_cont_set0
+	rtn
+pwm_cont_set1:
+	enable user
+	and pdata,0x0f,queue
+	call pwm_set_value
+	quotient regb
+	copy temp,pdata
+	isub regb,rega
+	rtn
+
+pwm_cont_set0:
+	disable user
+	and pdata,0x0f,queue
+	call pwm_set_value
+	quotient rega
+	copy temp,pdata
+	isub rega,regb
+	rtn
+
+pwm_set_value:
+	fetch 1,core_pwm_init
+   	qsetflag user,pdata
+	store 1,core_pwm_init
+	rtn
+
+pwm_out_set:
+	fetcht 3,mem_pdatatemp+2
+	call pwm_clk_set
+	idiv temp
+	call wait_div_end
+	quotient temp
+	fetch 1,mem_pdatatemp+5
+	imul32 temp,pdata
+	div pdata,100
+	call wait_div_end
+	call pwm_cont_set
+	fetch 1,mem_pdatatemp+1
+	call pwm_duty_cycle_set
+	fetch 1,mem_pdatatemp
+	fetcht 1,mem_pdatatemp+1
+	and_into 0x0f,temp
+	lshift8 temp,temp
+	ior temp,pdata
+	branch pwm_enable
+
+//rega:pcnt ;regb:ncnt ;pdata:pwm channel select
+pwm_duty_cycle_set:
+	and_into 0x0f,pdata
+	arg core_pwm_pcnt0,contw
+	mul32 pdata,4,pdata
+	iadd contw,contw
+	copy rega,pdata
+	istore 2,contw
+	copy regb,pdata
+	istore 2,contw
+	rtn
+
+
+//pdata:gpio select & pwm channel select
+/*********************************************
+setarg 0x0108
+0x01:pwm channel select
+0x08:gpio select
+*********************************************/
+pwm_enable:
+	enable user
+	call pwm_srst_set
+	branch pwm_gpio_set
+pwm_disable:
+	disable user
+	call pwm_select_channel
+pwm_gpio_set:
+	copy temp,pdata
+	lshift8 pdata,pdata
+	add queue,gpcfg_pwm_out0,temp
+	ior temp,pdata
+	call gpio_config_param
+pwm_set_select:
+	fetch 1,core_pwm_en
+	jam 0x00,core_pwm_en
+	nop 1200
+   	qsetflag user,pdata
+   	store 1,core_pwm_en
+	rtn
+pwm_select_channel:
+	copy pdata,temp
+	rshift8 pdata,pdata
+	copy pdata,queue
+	rtn
+	
+//pwm immediately stop set
+pwm_srst_powerdown:
+	disable user
+pwm_srst_set:
+	call pwm_select_channel
+	fetch 1,core_pwm_srst
+   	nqsetflag user,pdata
+   	store 1,core_pwm_srst
+	branch pwm_gpio_set
+
+
+
+/*************WATCH DOG API*************************/
+/*
+	function name:wdt_init_config 
+	input:kick dog time (pdata)
+*/
+wdt_init_config:
+	arg 0x2710,temp
+	imul32 temp,pdata
+	arg 0x1312d,temp
+	idiv temp
+	call wait_div_end
+	quotient temp
+	setarg 2048
+	isub temp,pdata
+	copy pdata,temp
+	and_into 0x0f,temp
+	storet 1,core_write_wdt2
+	copy pdata,temp
+	rshift4 temp,temp
+	storet 1,core_write_wdt
+	rtn
+
+wdt_set_enable:
+	enable user2
+	branch wdt_init_set
+wdt_set_disable:
+	disable user2
+wdt_init_set:
+	fetch 1,core_config
+   	setflag user2,3,pdata
+	store 1,core_config
+	rtn
+
+
+/*************NEC API*************************/
+/*
+	function name:nec_init_config 
+	input:
+		pdata is nec buffer address
+		bit[0-15]:rx start memory address
+		bit[16-31]:rx ending memory address
+		temp is nec control config
+		E.M 0x31 is 12M system clock is 2us temp
+*/
+nec61212_init:
+	arg FUN_NEC_ENABLE|FUN_NEC_CLK_DIVIDE_24,temp
+	
+
+nec_init_config:
+	store 4,core_nec_start_addr
+	store 2,core_nec_rptr
+	storet 1,core_nec_control
+	rtn
+
+//return:pdata is buffer size
+nec_check_rxbuff_size:
+	fetch 2,core_nec_rxitem
+	rtn
+/*	fetcht 2,core_nec_rptr
+	fetch 2,core_nec_wptr
+	isub temp,pdata
+	rtn positive
+	sub pdata,0,rega
+	fetcht 2,core_nec_start_addr
+	fetch 2,core_nec_end_addr
+	pincrease 1
+	isub temp,pdata
+	isub rega,pdata
+	rtn
+*/
+
+nec_prepare_read:
+	fetchr contu,2,core_nec_rptr
+	fetchr contus,2,core_nec_start_addr
+	fetchr contue,2,core_nec_end_addr
+	rtn
+
+nec_read_done:
+	storer contu,2,core_nec_rptr
+	rtn
+
+//regc is callback function
+//output
+//user is disable mean data stop
+//rege is 0 mean repeat
+//rege is no zero mean data
+nec_parse_nec61212:
+	call enable_user
+	arg 0,rege
+	call nec_check_rxbuff_size
+	beq 2,nec_parse_nec61212_check_timeout
+	sub pdata,4,null
+	rtn positive
+	call nec_prepare_read
+	ifetcht 2,contu
+	setarg NEC61212_DATA2REPEAT_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_check_repeat_data,positive
+	copy regd,temp
+	setarg NEC61212_REPEAT2REPEAT_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_check_repeat_data,positive
+	
+	copy regd,temp
+	setarg NEC61212_BOOT_CODE_START_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	ifetcht 2,contu
+	setarg NEC61212_BOOT_CODE_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	call nec_check_rxbuff_size
+	sub pdata,133,null
+	rtn positive
+	arg 32,loopcnt
+nec_parse_nec61212_data:
+	ifetcht 2,contu
+	setarg NEC61212_DATA_BIT_1_START_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	ifetcht 2,contu
+	setarg NEC61212_DATA_BIT_1_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_add_bit1,positive
+	copy regd,temp
+	setarg NEC61212_DATA_BIT_0_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	nbranch nec_parse_nec61212_add_bit0,positive
+
+
+nec_parse_nec61212_error_data:
+	copy regd,temp
+	setarg NEC61212_TIMEOUT_TIME
+	isub temp,null
+	branch nec_parse_nec61212_check_timeout_cb,zero
+	branch nec_read_done
+
+nec_parse_nec61212_add_bit1:
+	set1 32,rege
+nec_parse_nec61212_add_bit0:
+	rshift rege,rege
+	loop nec_parse_nec61212_data
+	branch nec_parse_nec61212_check_stop_bit
+
+nec_parse_nec61212_check_repeat_data:
+	call nec_check_rxbuff_size
+	sub pdata,7,null
+	rtn positive
+	ifetcht 2,contu
+	setarg NEC61212_REPEAT_START_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	ifetcht 2,contu
+	setarg NEC61212_REPEAT_END_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+nec_parse_nec61212_check_stop_bit:
+	ifetcht 2,contu
+	setarg NEC61212_STOP_TIME
+	call nec_check_pulse_range_legal_default_deviation
+	branch nec_parse_nec61212_error_data,positive
+	call nec_read_done
+	copy regc,pdata
+	branch callback_func
+
+nec_parse_nec61212_check_timeout:
+	call nec_prepare_read
+	ifetcht 2,contu
+	setarg NEC61212_TIMEOUT_TIME
+	isub temp,null
+	nrtn zero
+nec_parse_nec61212_check_timeout_cb:
+	call nec_read_done
+	call disable_user
+	copy regc,pdata
+	branch callback_func
+
+
+
+//检查数据是否合法，宽度范围
+//输入:temp 当前实际检查到的时间 2us为单位
+//pdata 理论时间，us为单位
+nec_check_pulse_range_legal_default_deviation:
+	fetchr regb,1,mem_nec_decode_error_value
+
+//检查数据是否合法，宽度范围
+//输入:temp 当前实际检查到的时间 2us为单位
+//pdata 理论时间，us为单位
+//regb允许偏差值，百分比
+// |temp-pdata| / pdata < regb
+//输出:positive is 1 mean error
+//0 mean true
+nec_check_pulse_range_legal:
+	copy temp,regd
+	imul32 regb,regb		//换算成实际偏差
+	lshift temp,temp		//时间单位换算成us
+	isub temp,rega
+	ncall nec_check_pulse_range_legal_data_negative,positive
+	mul32 rega,100,pdata
+	isub regb,null
+	rtn
+
+nec_check_pulse_range_legal_data_negative:
+	sub rega,0,rega
+	rtn
+
+
+
+select_system_clk_24M:
+	jam SYSTEM_CLK_24M,mem_system_clk
+	jam clksel_dpll_24M,core_clksel
+	setarg 7499
+	store 2,core_halfslot
+calc_new_param:
+	arg 11,loopcnt
+	arg mem_param_tx_setup,rega
+calc_new_param_loop:
+	ifetch 2,rega
+	lshift pdata,pdata
+	istore 2,rega
+	increase 2,rega
+	loop calc_new_param_loop
+	rtn
+
+calc_new_le_time:
+	lshift stop_watch,stop_watch
+	rtn
+
+select_system_clk_12M_xtal:
+	jam clksel_xtal,core_clksel
+select_system_clk_12M_common:
+	jam SYSTEM_CLK_12M,mem_system_clk
+	setarg 3749
+	store 2,core_halfslot
+	rtn
+
+select_system_clk_12M_dpll:
+	jam clksel_dpll,core_clksel
+	branch select_system_clk_12M_common
+	
+
+/*****************************50HZ*****************************/
+/*
+(input):
+pdata:ac data buf start address
+temp:ac data buf length
+mem_ac_detect_gpio:choice gpio[0-19]
+mem_ac_detect_control:[7:2]ac detect clk divide number,[15:8]ac detect window (ms)
+
+(output):
+true=1,  50hz single disappear true=0,50hz detected
+
+*/
+ifdef AC_50HZ
+ac_50hz_check:
+	store 2,core_ac_saddr
+	storet 1,core_ac_buf_len
+	fetch 1,mem_ac_detect_gpio
+	arg gpcfg_ac_input,temp
+	call gpio_config_function_int
+	fetch 2,mem_ac_detect_control  
+	set1 0,pdata                 //ac detect enable[0]
+	store 2,core_ac_ctrl
+ac_50hz_check_wait:		
+	fetch 1,core_perf_status
+	isolate1 6,pdata
+	rtn 
+endif
+	
+
+
+
Index: mouse_public_3mode_usb/program/peripherals_test/ac_50hz_test.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/ac_50hz_test.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/ac_50hz_test.prog	(working copy)
@@ -0,0 +1,22 @@
+ifdef COMPLIE_TEST
+
+p_50hz_init: 
+	jam 0x19,core_gpio_conf+2
+	jam 0x3e,core_gpio_conf+3	
+	jam 06,core_ac_buf_len
+	jam 0x00,core_ac_saddr	
+	jam 0x01,core_ac_saddr+1	
+	jam 20,core_ac_ctrl+1
+	jam 0x31,core_ac_ctrl	
+p_50hz_check:
+	fetch 1,core_perf_status
+	isolate1 6,pdata	
+	branch p_50hz_exit,true	
+	jam 0x3e,core_gpio_conf+3	
+	branch p_50hz_check
+p_50hz_exit: 
+	jam 0x3f,core_gpio_conf+3
+	branch p_50hz_check
+	
+endif
+
Index: mouse_public_3mode_usb/program/peripherals_test/gpio_test.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/gpio_test.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/gpio_test.prog	(working copy)
@@ -0,0 +1,28 @@
+
+ifdef COMPLIE_TEST
+
+p_gpio_test:
+	arg 20,loopcnt
+	arg 0,rega
+p_gpio_test_loop:
+	copy rega,pdata
+	increase 1,rega
+	sub rega,20,null
+	call ice_break,zero
+	arg gpcfg_output_high,temp
+	call gpio_config_function_int
+	call delay_10ms
+	loop p_gpio_test_loop
+	branch assert
+	rtn
+
+endif
+
+
+
+
+
+
+
+
+
Index: mouse_public_3mode_usb/program/peripherals_test/iic_test.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/iic_test.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/iic_test.prog	(working copy)
@@ -0,0 +1,577 @@
+
+ifdef COMPLIE_TEST
+
+
+p_iicd_init_25k:
+	jam 236,core_iicd_scl_low
+ 	jam 236,core_iicd_scl_high
+	jam 118,core_iicd_start_setup
+	jam 118,core_iicd_start_hold
+	jam 118,core_iicd_stop_setup
+	jam 118,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+p_iicd_init_50k:
+	jam 116,core_iicd_scl_low
+ 	jam 116,core_iicd_scl_high
+	jam 58,core_iicd_start_setup
+	jam 58,core_iicd_start_hold
+	jam 58,core_iicd_stop_setup
+	jam 58,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+p_iicd_init_100k:
+	jam 56,core_iicd_scl_low
+ 	jam 56,core_iicd_scl_high
+	jam 28,core_iicd_start_setup
+	jam 28,core_iicd_start_hold
+	jam 28,core_iicd_stop_setup
+	jam 28,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+p_iicd_init_200k:
+	jam 26,core_iicd_scl_low
+ 	jam 26,core_iicd_scl_high
+	jam 12,core_iicd_start_setup
+	jam 12,core_iicd_start_hold
+	jam 12,core_iicd_stop_setup
+	jam 24,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+p_iicd_init_400k:
+	jam 11,core_iicd_scl_low
+ 	jam 11,core_iicd_scl_high
+	jam 6,core_iicd_start_setup
+	jam 6,core_iicd_start_hold
+	jam 6,core_iicd_stop_setup
+	jam 11,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+p_iicd_init_600k:
+	jam 6,core_iicd_scl_low
+ 	jam 6,core_iicd_scl_high
+	jam 3,core_iicd_start_setup
+	jam 3,core_iicd_start_hold
+	jam 3,core_iicd_stop_setup
+	jam 6,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+p_iicd_init_750k:
+	jam 4,core_iicd_scl_low
+ 	jam 4,core_iicd_scl_high
+	jam 2,core_iicd_start_setup
+	jam 2,core_iicd_start_hold
+	jam 2,core_iicd_stop_setup
+	jam 4,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+p_iicd_init_860k:
+	jam 3,core_iicd_scl_low
+ 	jam 3,core_iicd_scl_high
+	jam 1,core_iicd_start_setup
+	jam 1,core_iicd_start_hold
+	jam 1,core_iicd_stop_setup
+	jam 3,core_iicd_data_setup
+	jam 0,core_iicd_data_hold
+	branch iicd_init_pin
+
+//2Kb
+p_iic_eeprom_2k_test:
+	setarg 0x20
+	store 2,mem_iic_test_loopcnt
+	setarg 0
+	store 2,mem_iic_test_offset
+	branch p_iic_eeprom_test_loop
+
+//128K
+p_iic_eeprom_128k_test:
+	setarg 0x200
+	store 2,mem_iic_test_loopcnt
+	setarg 0
+	store 2,mem_iic_test_offset
+p_iic_eeprom_test_loop:	
+	arg 32,temp
+	isolate1 mark_eeprom_size,mark
+	call p_iic_2k_page_write,true
+	fetch 2,mem_iic_test_offset
+	copy pdata,regb
+	arg mem_iic_test_txbuf1,rega	//00
+	call iicd_write_eep_data
+	call delay_10ms
+
+	arg 32,temp
+	isolate1 mark_eeprom_size,mark
+	call p_iic_2k_page_write,true
+	fetch 2,mem_iic_test_offset
+	copy pdata,regb
+	arg mem_iic_test_rxbuf,rega
+	call iicd_read_eep_data
+
+	call delay_10ms
+	
+	fetch 3,core_iicd_remain
+	store 3,0x4fd0
+	arg mem_iic_test_rxbuf,contr
+	arg 0x4fe0,contw
+	arg 0x20,loopcnt
+	call memcpy
+
+	arg 32,loopcnt
+	isolate1 mark_eeprom_size,mark
+	call p_iic_2k_page_write_loopcnt,true	
+	arg mem_iic_test_txbuf1,rega
+	arg mem_iic_test_rxbuf,regb
+	call string_compare
+	ncall p_break_00,zero
+
+
+	arg 32,temp
+	isolate1 mark_eeprom_size,mark
+	call p_iic_2k_page_write,true
+	fetch 2,mem_iic_test_offset
+	copy pdata,regb
+	arg mem_iic_test_txbuf2,rega	//ff
+	call iicd_write_eep_data
+	call delay_10ms
+
+	arg 32,temp
+	isolate1 mark_eeprom_size,mark
+	call p_iic_2k_page_write,true
+	fetch 2,mem_iic_test_offset
+	copy pdata,regb
+	arg mem_iic_test_rxbuf,rega
+	call iicd_read_eep_data
+	call delay_10ms
+
+	fetch 3,core_iicd_remain
+	store 3,0x4fd0
+	arg mem_iic_test_rxbuf,contr
+	arg 0x4fe0,contw
+	arg 0x20,loopcnt
+	call memcpy
+
+	arg 32,loopcnt
+	isolate1 mark_eeprom_size,mark
+	call p_iic_2k_page_write_loopcnt,true
+	arg mem_iic_test_txbuf2,rega
+	arg mem_iic_test_rxbuf,regb
+	call string_compare
+	ncall p_break_ff,zero
+	
+	fetch 2,mem_iic_test_offset
+	isolate1 mark_eeprom_size,mark
+	ncall p_iic_128k_offset,true
+	call p_iic_2k_offset,true
+	store 2,mem_iic_test_offset
+
+	fetch 2,mem_iic_test_loopcnt
+	pincrease -1
+	store 2,mem_iic_test_loopcnt
+	nbranch p_iic_eeprom_test_loop,blank
+	rtn
+
+p_iic_2k_page_write:
+	arg 8,temp
+	rtn
+p_iic_2k_page_write_loopcnt:
+	arg 8,loopcnt
+	rtn
+
+p_iic_128k_offset:
+	pincrease 32
+	rtn
+p_iic_2k_offset:
+	pincrease 8
+	rtn	
+
+
+p_savelist2:
+	store 2,mem_pdatatemp
+	fetch 2,mem_seq
+	rtnbit1 9
+	lshift pdata,pdata
+	arg 0x4c00,contw
+	iadd contw,contw
+	fetch 2,mem_pdatatemp
+	istore 2,contw
+	fetch 2,mem_seq
+	increase 1,pdata
+	store 2,mem_seq
+	arg 0x1f0,temp
+	isub temp,null
+	rtn
+
+p_break_00:
+	call ice_break
+	arg 0x0000,temp
+	fetch 1,core_iicd_scl_low
+	ior temp,pdata
+	branch p_savelist2
+
+p_break_ff:
+	call ice_break
+	arg 0xff00,temp
+	fetch 1,core_iicd_scl_low
+	ior temp,pdata
+	branch p_savelist2
+
+
+p_iic_test_128k:		//5*2 = 10
+	setarg 0
+	store 2,mem_eeprom_base
+	call clear_eeprom_size_2k
+	jam gpcfg_output_low,core_gpio_conf
+
+	call p_iicd_init_25k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop25k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop25k,blank
+
+	call p_iicd_init_50k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop50k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop50k,blank
+
+	call p_iicd_init_100k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop100k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop100k,blank
+
+	call p_iicd_init_200k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop200k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop200k,blank
+
+	call p_iicd_init_400k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop400k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop400k,blank
+
+	call p_iicd_init_600k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop600k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop600k,blank
+
+	call p_iicd_init_750k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop750k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop750k,blank
+
+	call p_iicd_init_860k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_128k_loop860k:
+	call p_iic_eeprom_128k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_128k_loop860k,blank
+
+//	call ice_break
+	rtn
+
+p_iic_test_2k:
+	setarg 0
+	store 2,mem_eeprom_base
+	call set_eeprom_size_2k
+	jam gpcfg_output_low,core_gpio_conf
+
+	call p_iicd_init_25k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop25k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop25k,blank
+
+	call p_iicd_init_50k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop50k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop50k,blank
+
+	call p_iicd_init_100k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop100k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop100k,blank
+
+	call p_iicd_init_200k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop200k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop200k,blank
+
+	call p_iicd_init_400k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop400k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop400k,blank
+
+	call p_iicd_init_600k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop600k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop600k,blank
+
+	call p_iicd_init_750k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop750k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop750k,blank
+
+	call p_iicd_init_860k
+	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+p_iic_test_2k_loop860k:
+	call p_iic_eeprom_2k_test
+	fetch 1,mem_iic_test_loopcnt2
+	pincrease -1
+	store 1,mem_iic_test_loopcnt2
+	nbranch p_iic_test_2k_loop860k,blank
+
+//	call ice_break
+	rtn
+
+
+delay_100ms:
+	call delay_10ms
+	call delay_10ms
+	call delay_10ms
+	call delay_10ms
+	call delay_10ms
+delay_50ms:	
+	call delay_10ms
+	call delay_10ms
+	call delay_10ms
+	call delay_10ms
+	branch delay_10ms
+
+/***************iic memory test****************/
+//clear_mem_5a:
+//	deposit loopcnt
+//	rtn blank
+//	setarg 0xa5
+//clear_mem_loop_5a:
+//	istore 1,contw
+//	loop clear_mem_loop_5a
+//	rtn
+
+//p_iic_memory_test:
+//	setarg 0
+//	store 2,mem_eeprom_base
+//	call clear_eeprom_size_2k
+//	jam gpcfg_output_low,core_gpio_conf
+
+//	call p_iicd_init_400k
+//	jam IIC_TEST_CNT,mem_iic_test_loopcnt2
+//p_iic_memory_test_loop:
+//	call p_iic_memory_test_nopatchmem
+//	fetch 1,mem_iic_test_loopcnt2
+//	pincrease -1
+//	store 1,mem_iic_test_loopcnt2
+//	nbranch p_iic_memory_test_loop,blank
+//	call ice_break
+//	rtn
+
+//p_iic_memory_test_nopatchmem:
+//	arg 0xffd,temp
+//	arg 0,regb
+//	arg 0x03,rega	//0x0003-0x0fff --> 0x1003-0x2000
+//	call iicd_write_eep_data
+
+//	call delay_100ms
+
+//	arg 0xffd,temp
+//	arg 0,regb
+//	arg 0x1003,rega
+//	call iicd_read_eep_data
+
+//	call delay_100ms
+
+//	arg 0xffd,loopcnt
+//	arg 0x03,rega
+//	arg 0x1003,regb
+//	call string_compare
+//	ncall ice_break,zero
+
+//	arg 0xffd,temp
+//	arg 0x2000,regb
+//	arg 0x1003,rega	//0x1003-0x2000 --> 0x0003-0x0fff
+//	call iicd_write_eep_data
+//	
+//	call delay_100ms
+
+//	arg 0xffd,temp
+//	arg 0x2000,regb
+//	arg 0x03,rega
+//	call iicd_read_eep_data
+
+//	call delay_100ms
+
+//	arg 0xffd,loopcnt
+//	arg 0x03,rega
+//	arg 0x1003,regb
+//	call string_compare
+//	ncall ice_break,zero
+
+
+//	arg 0x7e0,temp
+//	arg 0,regb
+//	arg 0x4040,rega	//0x4040-0x481f --> 0x4820-0x4fff 
+//	call iicd_write_eep_data
+//	
+//	call delay_100ms
+
+//	arg 0x7e0,temp
+//	arg 0,regb
+//	arg 0x4820,rega
+//	call iicd_read_eep_data
+
+//	call delay_100ms
+
+//	arg 0x7e0,loopcnt
+//	arg 0x4040,rega
+//	arg 0x4820,regb
+//	call string_compare
+//	ncall ice_break,zero
+
+//	arg 0x7e0,temp
+//	arg 0x2000,regb
+//	arg 0x4820,rega	//0x4820-0x4fff --> 0x4040-0x481f 
+//	call iicd_write_eep_data
+//	
+//	call delay_100ms
+
+//	arg 0x7e0,temp
+//	arg 0x2000,regb
+//	arg 0x4040,rega
+//	call iicd_read_eep_data
+
+//	call delay_100ms
+
+//	arg 0x7e0,loopcnt
+//	arg 0x4040,rega
+//	arg 0x4820,regb
+//	call string_compare
+//	ncall ice_break,zero
+
+//	rtn
+
+/***************iic memory test****************/
+
+
+/***************iic camera test****************/
+
+p_camera_mclk_init:
+	jam 0x05,mem_camera_pwm_conf		//pwm gpio5
+	jam 0x01,mem_camera_pwm_conf+1		//pwm channel1
+	jam 0x80,mem_camera_pwm_conf+2		//frequency 3MHz
+	jam 0x8d,mem_camera_pwm_conf+3
+	jam 0x5b,mem_camera_pwm_conf+4
+	jam 0x32,mem_camera_pwm_conf+5		//duty cycle 50%
+	arg 0,rega 							//sys clk 12mhz
+	call pwm_init
+	fetch 6,mem_camera_pwm_conf
+	store 6,mem_pdatatemp
+	branch pwm_out_set
+
+p_camera_RW_test:
+	call p_camera_mclk_init	//master clk:3MHz
+	call p_iicd_init_100k
+	jam 0x3e,0x8073	//gpio_power_down
+	jam 0x3f,0x8074	//gpio_reset
+	call p_camera_read_id
+	call p_camera_write_reg1
+	branch p_camera_read_reg1
+
+p_camera_write_reg1:	
+	jam 0x42,mem_camera_txbuf	//write addr
+	jam 0x01,mem_camera_txbuf+1	//register
+	jam 0xa6,mem_camera_txbuf+2	//data
+	arg mem_camera_txbuf,rega
+	arg 3,temp
+	branch iic_write_data
+
+p_camera_read_reg1:
+	jam 0x42,mem_camera_txbuf	//write addr
+	jam 0x01,mem_camera_txbuf+1	//register
+	jam 0x43,mem_camera_txbuf+2	//read addr
+	arg 1,temp
+	arg mem_camera_rxbuf,rega	//read buf
+	setarg mem_camera_txbuf
+	store 2,core_iicd_txaddr
+	setarg 3
+	store 2,core_iicd_txlen
+	storet 2,core_iicd_rxlen
+	storer rega,2,core_iicd_rxaddr
+	jam 3,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	branch wait_iicd_done
+	
+p_camera_read_id:
+	jam 0x42,mem_camera_txbuf	//write addr
+	jam 0x00,mem_camera_txbuf+1	//register
+	jam 0x43,mem_camera_txbuf+2	//read addr
+	arg 1,temp
+	arg mem_camera_id,rega	//read buf
+	setarg mem_camera_txbuf
+	store 2,core_iicd_txaddr
+	setarg 3
+	store 2,core_iicd_txlen
+	storet 2,core_iicd_rxlen
+	storer rega,2,core_iicd_rxaddr
+	jam 3,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	branch wait_iicd_done
+
+/***************iic camera test****************/
+
+endif
+
+
Index: mouse_public_3mode_usb/program/peripherals_test/nec_test.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/nec_test.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/nec_test.prog	(working copy)
@@ -0,0 +1,61 @@
+
+ifdef COMPLIE_TEST
+
+	call pf_fpga_init
+	call mesh_uart_init
+	arg mem_mesh_Network_Key,rega
+	arg MESH_CODE_INIT,regb
+	arg 1,loopcnt
+	call logging_tx_info
+	setarg 0x1800
+	store 2,mem_pdatatemp
+	setarg 0x1c00
+	istore 2,contw
+	fetch 4,mem_pdatatemp
+	call nec61212_init
+	jam gpcfg_nec_input,core_gpio_conf+2
+	arg 0xff,regb
+	arg 1,loopcnt
+	call logging_tx_debug
+p_nec_loop:
+	arg p_nec_cb_test,regc
+	call nec_parse_nec61212
+	branch p_nec_loop
+
+pf_fpga_init:
+ 	jam clksel_xtal,core_clksel
+	rtn
+
+p_nec_cb_test:
+	nbranch p_nec_stop_packet,user
+	call uartb_prepare_tx
+	copy rege,pdata
+	branch p_nec_cb_test_repeat,blank
+	arg 0x11,temp
+	istoret 1,contwu
+	store 4,mem_nec_receive_data
+	jam 1,mem_nec_receive_flag
+	istore 4,contwu
+	branch uartb_send
+
+p_nec_cb_test_repeat:
+	fetch 1,mem_nec_receive_flag
+	rtn blank
+	arg 0x22,temp
+	istoret 1,contwu
+	fetch 4,mem_nec_receive_data
+	istore 4,contwu
+	branch uartb_send
+	
+
+p_nec_stop_packet:
+	jam 0,mem_nec_receive_flag
+	call uartb_prepare_tx
+	setarg -1
+	istore 4,contwu
+	branch uartb_send
+
+
+endif
+
+
Index: mouse_public_3mode_usb/program/peripherals_test/shutter_zcode.rar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: mouse_public_3mode_usb/program/peripherals_test/shutter_zcode.rar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: mouse_public_3mode_usb/program/peripherals_test/spi_test.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/spi_test.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/spi_test.prog	(working copy)
@@ -0,0 +1,210 @@
+ifdef COMPLIE_TEST
+
+p_param_check_pass:
+	call ice_break
+	branch p_param_check_pass
+
+p_spid_flash_init:
+	call p_generate_spi_test_data_buff
+	fetch 1,core_clkoff+1
+	set0 4,pdata
+	store 1,core_clkoff+1
+	rtn
+p_spid2_flash_init:
+	call p_generate_spi2_test_data_buff
+	fetch 1,core_clkoff+1
+	set0 1,pdata
+	store 1,core_clkoff+1
+	rtn
+
+//spi test code start
+p_spid_flash_rw_test:
+	arg mem_spi_ctrl_test_param_buff,pdata
+	store 2,mem_spi_test_param_buff_addr
+p_spid_flash_rw_test_param_check:
+	fetch 2,mem_spi_test_param_buff_addr
+	copy pdata,rega
+	ifetch 1,rega
+	beq 0xff,p_param_check_pass
+	store 1,core_spid_ctrl
+	setarg 0x64
+	store 1,core_spid_delay
+//	jam 0x04,core_clksel		//clock select:04 ctystal,05 dpll, 06 rc
+p_spid_flash_start:
+	call p_spid_flash_init
+p_spid_flash_rw_test_loop:
+	call p_spid_erase_sector	
+	arg 100,loopcnt
+	copy loopcnt,regc
+p_spid_flash_rw_loop:
+	copy loopcnt,regc
+	call spid_unlock_flash
+	call p_spid_write_flash
+	call p_spid_read_flash
+	call p_spid_flash_base_increase
+	call p_flash_data_compare
+	loop p_spid_flash_rw_loop
+	fetch 2,mem_spi_test_param_buff_addr
+	increase 1,pdata
+	store 2,mem_spi_test_param_buff_addr
+	branch p_spid_flash_rw_test_param_check
+
+p_spid_erase_sector:
+	fetch 1,mem_spi_test_erase_count
+	increase 1,pdata
+	store 1,mem_spi_test_erase_count
+	setarg 0
+	store 3,mem_flash_test_base
+	fetch 3,mem_flash_test_base
+	store 3,mem_spi_write_addr
+	branch spid_flash_erase_sector
+p_spid_write_flash:
+	fetch 1,mem_spi_test_write_count
+	increase 1,pdata
+	store 1,mem_spi_test_write_count
+	arg 64,temp
+	arg mem_spi_test_data_buff,rega
+	fetch 3,mem_flash_test_base
+	branch spid_write_flash
+p_spid_read_flash:
+	fetch 1,mem_spi_test_read_count
+	increase 1,pdata
+	store 1,mem_spi_test_read_count
+	arg 64,temp
+	fetch 3,mem_flash_test_base
+	arg mem_spi_test_read_buff,rega
+	branch spid_read_flash
+p_spid_flash_base_increase:
+	fetch 3,mem_flash_base
+	arg 64,temp
+	iadd temp,pdata
+	store 3,mem_flash_base
+	rtn
+p_generate_spi_test_data_buff:
+	arg mem_spi_test_data_buff,contw
+	arg 32,loopcnt
+p_generate_spi_test_data_buff_loop:
+	fetch 4,mem_spi_test_write_buff
+	istore 4,contw
+	loop p_generate_spi_test_data_buff_loop
+	rtn
+p_flash_data_compare:
+	arg mem_spi_test_data_buff,rega
+	arg mem_spi_test_read_buff,regb
+	arg 64,loopcnt
+	call p_spid_data_compare
+	nbranch p_spid_data_error,blank
+	fetch 3,mem_spi_test_compare_data_count
+	increase 1,pdata
+	store 3,mem_spi_test_compare_data_count
+	copy regc,loopcnt
+	rtn
+p_spid_data_compare:
+	ifetch 1,rega
+	ifetcht 1,regb
+	isub temp,null
+	nrtn zero
+	increase 1,rega
+	increase 1,regb
+	loop p_spid_data_compare
+	force 0,pdata
+	rtn
+p_spid_data_error:
+	call ice_break
+	branch p_spid_data_error
+//spi test code end
+
+//spi2 test code start
+p_spid2_flash_rw_test:
+	arg mem_spi2_ctrl_test_param_buff,pdata
+	store 2,mem_spi2_test_param_buff_addr
+p_spid2_flash_rw_test_param_check:
+	fetch 2,mem_spi2_test_param_buff_addr
+	copy pdata,rega
+	ifetch 1,rega
+	beq 0xff,p_param_check_pass
+	store 1,core_spid2_ctrl
+	jam 0x0a,core_spid2_delay
+//	jam 0x04,core_clksel			//clock select:04 ctystal,05 dpll, 06 rc
+p_spid2_flash_start:
+	call p_spid2_flash_init
+p_spid2_flash_rw_test_loop:
+	call p_spid2_erase_sector	
+	arg 100,loopcnt
+	copy loopcnt,regc
+p_spid2_flash_rw_loop:
+	copy loopcnt,regc
+	call spid2_unlock_flash
+	call p_spid2_write_flash
+	call p_spid2_read_flash
+	call p_spid2_flash_base_increase
+	call p_flash2_data_compare
+	loop p_spid2_flash_rw_loop
+	branch p_spid2_flash_rw_test_param_check
+
+p_spid2_erase_sector:
+	setarg 0
+	store 3,mem_flash_test_base2
+	fetch 3,mem_flash_test_base2
+	store 3,mem_spi2_write_addr
+	branch spid2_flash_erase_sector
+p_spid2_write_flash:
+	fetch 1,mem_spi2_test_write_count
+	increase 1,pdata
+	store 1,mem_spi2_test_write_count
+	arg 64,temp
+	arg mem_spi2_test_data_buff,rega
+	fetch 3,mem_flash_test_base2
+	branch spid2_write_flash
+p_spid2_read_flash:
+	fetch 1,mem_spi2_test_read_count
+	increase 1,pdata
+	store 1,mem_spi2_test_read_count
+	arg 64,temp
+	fetch 3,mem_flash_test_base2
+	arg mem_spi2_test_read_buff,rega
+	branch spid2_read_flash
+p_spid2_flash_base_increase:
+	fetch 3,mem_flash_test_base2
+	arg 64,temp
+	iadd temp,pdata
+	store 3,mem_flash_test_base2
+	rtn
+p_generate_spi2_test_data_buff:
+	arg mem_spi2_test_data_buff,contw
+	arg 16,loopcnt
+p_generate_spi2_test_data_buff_loop:
+	fetch 4,mem_spi2_test_write_buff
+	istore 4,contw
+	loop p_generate_spi2_test_data_buff_loop
+	rtn
+p_flash2_data_compare:
+	arg mem_spi2_test_data_buff,rega
+	arg mem_spi2_test_read_buff,regb
+	arg 64,loopcnt
+	call p_spid2_data_compare
+	nbranch p_spid2_data_error,blank
+	fetch 3,mem_spi2_test_compare_data_count
+	increase 1,pdata
+	store 3,mem_spi2_test_compare_data_count
+	copy regc,loopcnt
+	rtn
+p_spid2_data_error:
+	call ice_break
+	branch p_spid2_data_error
+	
+p_spid2_data_compare:
+p_spid2_string_compare:
+	ifetch 1,rega
+	ifetcht 1,regb
+	isub temp,null
+	nrtn zero
+	increase 1,rega
+	increase 1,regb
+	loop p_spid2_string_compare
+	force 0,pdata
+	rtn
+//spi2 test code end
+
+endif
+
Index: mouse_public_3mode_usb/program/peripherals_test/uart_test.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/uart_test.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/uart_test.prog	(working copy)
@@ -0,0 +1,258 @@
+
+ifdef COMPLIE_TEST
+
+	
+p_uart_test_init:
+
+	call uart_test_init_uart
+
+p_uart_test_main_loop:
+//	arg 100,loopcnt
+//	call delay_ms_wait
+	call p_uarta_test_receive_packet
+	call p_uartb_test_receive_packet
+	branch p_uart_test_main_loop
+	rtn
+
+p_uarta_test_receive_packet:
+	fetch 1,core_uart_status
+	rtnbit1 UART_STATUS_RX_FIFO_EMPTY
+	copy pdata,regb
+	call uarta_prepare_rx
+	ifetch 1,contru
+	bne 0x01,p_uart_test_hci_in_excp
+	fetch 2,core_uart_rxitems
+	sub pdata,2,null
+	rtn positive
+	ifetch 1,contru
+	store 1,mem_uart_test_opcode
+	ifetcht 1,contru
+	copy contru,rega
+	storet 1,mem_uart_test_len
+	add temp,3,temp
+	fetch 2,core_uart_rxitems
+	isub temp,temp
+	nrtn positive
+	call p_uart_test_hci_cmd_control
+	branch p_uart_test_hci_dicard_packet
+
+p_uart_test_hci_in_excp:
+	call delay_10ms
+	call uarta_prepare_tx_register_push
+	setarg 0x000f02
+	istore 3,contwu
+	call uarta_send_register_pop
+	branch p_uart_test_hci_release_except
+
+p_uart_test_hci_release_except:
+	call uarta_prepare_rx
+	fetch 2,core_uart_rxitems
+	iadd contru,contru
+	branch uarta_rxdone
+
+p_uart_test_hci_dicard_packet:
+	call uarta_prepare_rx
+	increase 2,contru
+	ifetch 1,contru
+	iadd contru,contru
+	branch uarta_rxdone
+
+p_uart_test_hci_cmd_control:
+	fetch 1,mem_uart_test_opcode
+	beq 0xfe,p_uart_test_hci_cmd_fe
+	beq 0xfd,p_uart_test_hci_cmd_modify_config
+	beq 0xfc,p_uart_test_hci_cmd_modify_parity
+	beq 0xfb,p_uart_test_hci_cmd_close_parity
+	beq 0xfa,p_uart_test_hci_cmd_set_stop_bit_size
+	rtn
+
+p_uart_test_hci_cmd_set_stop_bit_size:
+	fetch 1,core_uart_ctrl
+	and pdata,0xf7,pdata
+	ifetcht 1,contru
+	ior temp,pdata
+	store 1,core_uart_ctrl
+	rtn
+
+p_uart_test_hci_cmd_modify_parity:
+	fetch 1,core_uart_ctrl
+	and pdata,0xf9,pdata
+	ifetcht 1,contru
+	ior temp,pdata
+	store 1,core_uart_ctrl
+	rtn
+
+p_uart_test_hci_cmd_close_parity:
+	fetch 1,core_uart_ctrl
+	set0 BIT_UART_CONTROL_DATA_LENGTH,pdata
+	store 1,core_uart_ctrl
+	rtn
+
+p_uart_test_hci_cmd_modify_config:
+	fetchr loopcnt,1,mem_uart_test_len
+	call string2dec_from_uart
+	branch uarta_calc_baud_rate_config
+
+p_uart_test_hci_cmd_fe:
+	fetchr loopcnt,1,mem_uart_test_len
+	arg mem_uart_test_rx_buffer,contw
+	call uart_copy_rx_bytes_fast
+	call uarta_prepare_tx_register_push
+	setarg 0xfe01
+	istore 2,contwu
+	fetch 1,mem_uart_test_len
+	istore 1,contwu
+	copy pdata,loopcnt
+	arg mem_uart_test_rx_buffer,contr
+	call uart_copy_tx_bytes_fast
+	call uarta_send_register_pop
+	rtn
+
+
+
+p_uartb_test_receive_packet:
+	fetch 1,core_uart_status
+	rtnbit1 UARTB_STATUS_RX_FIFO_EMPTY
+	copy pdata,regb
+	call uartb_prepare_rx
+	ifetch 1,contru
+	bne 0x01,p_uartb_test_hci_in_excp
+	fetch 2,core_uartb_rxitems
+	sub pdata,2,null
+	rtn positive
+	ifetch 1,contru
+	store 1,mem_uart_test_opcode
+	ifetcht 1,contru
+	copy contru,rega
+	storet 1,mem_uart_test_len
+	add temp,3,temp
+	fetch 2,core_uartb_rxitems
+	isub temp,temp
+	nrtn positive
+	call p_uartb_test_hci_cmd_control
+	branch p_uartb_test_hci_dicard_packet
+
+p_uartb_test_hci_in_excp:
+	call delay_10ms
+	call uartb_prepare_tx_register_push
+	setarg 0x000f02
+	istore 3,contwu
+	call uartb_send_register_pop
+	branch p_uartb_test_hci_release_except
+
+p_uartb_test_hci_release_except:
+	call uartb_prepare_rx
+	fetch 2,core_uartb_rxitems
+	iadd contru,contru
+	branch uartb_rxdone
+
+p_uartb_test_hci_dicard_packet:
+	call uartb_prepare_rx
+	increase 2,contru
+	ifetch 1,contru
+	iadd contru,contru
+	branch uartb_rxdone
+
+p_uartb_test_hci_cmd_control:
+	fetch 1,mem_uart_test_opcode
+	beq 0xfe,p_uartb_test_hci_cmd_fe
+	beq 0xfd,p_uartb_test_hci_cmd_modify_config
+	beq 0xfc,p_uartb_test_hci_cmd_modify_parity
+	beq 0xfb,p_uartb_test_hci_cmd_close_parity
+	beq 0xfa,p_uartb_test_hci_cmd_set_stop_bit_size
+	rtn
+
+p_uartb_test_hci_cmd_set_stop_bit_size:
+	fetch 1,core_uartb_ctrl
+	and pdata,0xf7,pdata
+	ifetcht 1,contru
+	ior temp,pdata
+	store 1,core_uartb_ctrl
+	rtn
+
+p_uartb_test_hci_cmd_modify_parity:
+	fetch 1,core_uartb_ctrl
+	and pdata,0xf9,pdata
+	ifetcht 1,contru
+	ior temp,pdata
+	store 1,core_uartb_ctrl
+	rtn
+
+p_uartb_test_hci_cmd_close_parity:
+	fetch 1,core_uartb_ctrl
+	set0 BIT_UART_CONTROL_DATA_LENGTH,pdata
+	store 1,core_uartb_ctrl
+	rtn
+
+p_uartb_test_hci_cmd_modify_config:
+	fetchr loopcnt,1,mem_uart_test_len
+	call string2dec_from_uart
+	branch uartb_calc_baud_rate_config
+
+p_uartb_test_hci_cmd_fe:
+	fetchr loopcnt,1,mem_uart_test_len
+	arg mem_uart_test_rx_buffer,contw
+	call uart_copy_rx_bytes_fast
+	call uartb_prepare_tx_register_push
+	setarg 0xfe01
+	istore 2,contwu
+	fetch 1,mem_uart_test_len
+	istore 1,contwu
+	copy pdata,loopcnt
+	arg mem_uart_test_rx_buffer,contr
+	call uart_copy_tx_bytes_fast
+	call uartb_send_register_pop
+	rtn
+
+
+
+
+uart_test_init_uart:
+	call uart_test_init_uarta_mem
+	call uart_clock_select_main_freq_crystal
+	arg 115200,temp
+	call uarta_calc_baud_rate_config
+	jam gpcfg_uart_txd,core_gpio_conf
+	jam gpcfg_uart_rxd|gpcfg_pullup,core_gpio_conf+1
+	jam FUN_UART_CONTROL_SETTING_RATE_BAUD| FUN_UART_CONTROL_ENABLE,core_uart_ctrl
+
+	call uart_test_init_uartb_mem
+	call uart_clock_select_main_freq_crystal
+	arg 115200,temp
+	call uartb_calc_baud_rate_config
+	jam gpcfg_uartb_txd,core_gpio_conf+2
+	jam gpcfg_uartb_rxd|gpcfg_pullup,core_gpio_conf+3
+	jam FUN_UART_CONTROL_SETTING_RATE_BAUD| FUN_UART_CONTROL_ENABLE,core_uartb_ctrl
+
+	rtn
+
+uart_test_init_uarta_mem:
+	setarg 0x1c00
+	store 2,mem_uart_test_uarta_rx_start_address
+	setarg 0x1dff
+	istore 2,contw
+	setarg 0x1e00
+	istore 2,contw
+	setarg 0x1fff
+	istore 2,contw
+	call enable_user
+	fetch 8,mem_uart_test_uarta_rx_start_address
+	branch uart_init_dma_mem
+
+uart_test_init_uartb_mem:
+	setarg 0x1800
+	store 2,mem_uart_test_uarta_rx_start_address
+	setarg 0x19ff
+	istore 2,contw
+	setarg 0x1a00
+	istore 2,contw
+	setarg 0x1bff
+	istore 2,contw
+	call disable_user
+	fetch 8,mem_uart_test_uarta_rx_start_address
+	branch uart_init_dma_mem	
+
+
+endif
+
+
Index: mouse_public_3mode_usb/program/peripherals_test/usb_test.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/usb_test.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/peripherals_test/usb_test.prog	(working copy)
@@ -0,0 +1,183 @@
+ifdef COMPLIE_TEST
+
+p_usb_test:
+	call p_usb_init
+	branch usb_loop
+
+p_usb_init:
+	setarg mem_usb_txbuf
+	store 2,core_usb_tx_saddr0
+	setarg mem_usb_txbuf1
+	store 2,core_usb_tx_saddr1
+	setarg mem_usb_txbuf2
+	store 2,core_usb_tx_saddr2
+	branch usb_init+1
+usb_loop:
+	nop 10000
+	nop 10000
+	nop 10000
+	nop 10000
+	call p_usb_test_data
+	call usb_isr
+	branch usb_loop
+p_usb_test_data:
+	fetch 1,mem_usb_state
+	rtnne USB_CONNECTED
+	fetch 1,mem_usb_test_cnt
+	increase 1,pdata
+	store 1,mem_usb_test_cnt
+	sub pdata,50,null
+	branch p_x_right,positive
+	sub pdata,100,null
+	branch p_y_up,positive
+	sub pdata,150,null
+	branch p_x_left,positive
+	sub pdata,200,null
+	branch p_y_down,positive
+	rtn
+	
+p_x_right:
+	fetch 1,mem_usb_tx_enable
+	set1 2,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP2_MS,mem_usb_ep2_data
+	setarg 1	//report id
+	store 1,mem_usb_mouse_data
+	setarg 0	//key
+	store 1,mem_usb_mouse_data+1
+	setarg 0x05	//x low
+	store 1,mem_usb_mouse_data+2
+	setarg 0	//x high
+	store 1,mem_usb_mouse_data+3
+	setarg 0	//y low
+	store 1,mem_usb_mouse_data+4
+	setarg 0	//y high
+	store 1,mem_usb_mouse_data+5
+	setarg 0	//wheel
+	store 1,mem_usb_mouse_data+6
+	setarg 0	//twheel
+	store 1,mem_usb_mouse_data+7
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_test_kb
+	increase 1,pdata
+	store 1,mem_usb_test_kb
+	beq 1,p_q
+	beq 2,p_q_release
+	rtn
+
+p_q:	
+	jam 0x14,mem_usb_kb_data+3
+	rtn
+p_q_release:	
+	jam 0,mem_usb_kb_data+3
+	jam 0,mem_usb_test_kb
+	rtn
+	
+p_y_up:
+	fetch 1,mem_usb_tx_enable
+	set1 2,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP2_MS,mem_usb_ep2_data
+	setarg 1	//report id
+	store 1,mem_usb_mouse_data
+	setarg 0	//key
+	store 1,mem_usb_mouse_data+1
+	setarg 0	//x low
+	store 1,mem_usb_mouse_data+2
+	setarg 0	//x high
+	store 1,mem_usb_mouse_data+3
+	setarg 0x05	//y low
+	store 1,mem_usb_mouse_data+4
+	setarg 0	//y high
+	store 1,mem_usb_mouse_data+5
+	setarg 0	//wheel
+	store 1,mem_usb_mouse_data+6
+	setarg 0	//twheel
+	store 1,mem_usb_mouse_data+7
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_test_kb
+	increase 1,pdata
+	store 1,mem_usb_test_kb
+	beq 1,p_q
+	beq 2,p_q_release
+	rtn
+
+p_x_left:	
+	fetch 1,mem_usb_tx_enable
+	set1 2,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP2_MS,mem_usb_ep2_data
+	setarg 1	//report id
+	store 1,mem_usb_mouse_data
+	setarg 0	//key
+	store 1,mem_usb_mouse_data+1
+	setarg 0xfb	//x
+	store 1,mem_usb_mouse_data+2
+	setarg 0xff	//x
+	store 1,mem_usb_mouse_data+3
+	setarg 0	//y low
+	store 1,mem_usb_mouse_data+4
+	setarg 0	//y high
+	store 1,mem_usb_mouse_data+5
+	setarg 0	//wheel
+	store 1,mem_usb_mouse_data+6
+	setarg 0	//twheel
+	store 1,mem_usb_mouse_data+7
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_test_kb
+	increase 1,pdata
+	store 1,mem_usb_test_kb
+	beq 1,p_q
+	beq 2,p_q_release
+	rtn
+
+p_y_down:
+	fetch 1,mem_usb_test_cnt
+	beq 200,p_mem_set0
+	fetch 1,mem_usb_tx_enable
+	set1 2,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP2_MS,mem_usb_ep2_data
+	setarg 1	//report id
+	store 1,mem_usb_mouse_data
+	setarg 0	//key
+	store 1,mem_usb_mouse_data+1
+	setarg 0	//x low
+	store 1,mem_usb_mouse_data+2
+	setarg 0	//x high
+	store 1,mem_usb_mouse_data+3
+	setarg 0xfb	//y
+	store 1,mem_usb_mouse_data+4
+	setarg 0xff	//y
+	store 1,mem_usb_mouse_data+5
+	setarg 0	//wheel
+	store 1,mem_usb_mouse_data+6
+	setarg 0	//twheel
+	store 1,mem_usb_mouse_data+7
+
+	fetch 1,mem_usb_tx_enable
+	set1 1,pdata
+	store 1,mem_usb_tx_enable
+	jam USB_EP1_KB,mem_usb_ep1_data
+	fetch 1,mem_usb_test_kb
+	increase 1,pdata
+	store 1,mem_usb_test_kb
+	beq 1,p_q
+	beq 2,p_q_release
+	rtn
+p_mem_set0:
+	jam 0,mem_usb_test_cnt
+	branch p_y_down+2
+
+endif
+
+
Index: mouse_public_3mode_usb/program/rfcomm.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/rfcomm.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/rfcomm.prog	(working copy)
@@ -0,0 +1,873 @@
+
+ifdef COMPILE_RFCOMM
+rfcomm_init:
+	rtn wake
+	jam 0,mem_rfcomm_send_more_pkt
+	jam BITS9600,memRemoteRPNBitRate        
+	jam DATABITS8,memRemotePRNDataBits      
+	jam 0x11,memRemotePRNXon
+	jam 0x13,memRemotePRNXoff
+	setarg 0
+	store 3,memRemotePRNStopBit
+	store 1,mem_spp_state                  
+	jam 0,memui_reconnect_mode
+	//branch rfcomm_init_spp
+rfcomm_init_spp:
+	setarg 0
+	store 1,mem_spp_state
+	store 1,mem_remote_spp_channel
+	store 1,mem_pn_dlci
+	fetch 1,mem_rfcomm_credit_flag
+	beq CREDIT_ENABLE,rfcomm_init_spp_with_credit
+	jam 0x50,mem_credit_given
+	rtn
+
+rfcomm_init_spp_with_credit:
+	jam 0x00,mem_credit_given
+	rtn
+
+set_CR_bit:
+	or_into 0x02,temp
+	rtn
+
+
+/*below added by koufan*/
+
+/*rfcomm_send */
+
+
+
+	/*rfcomm_calculate_FCS_sabm*/
+	/*input: address in temp*/
+	/*output: FCS in pdata  */
+rfcomm_calculate_FCS_sabm:
+	copy temp,pdata
+	reverse pdata,pdata //address
+	store 1,memFCStemp3
+	force INI_TX_SABM,pdata
+	reverse pdata,pdata
+	store 1,memFCStemp2
+	force 0x01,pdata                        
+	reverse pdata,pdata
+	store 1,memFCStemp1
+	call caculate_fcs
+	copy temp,pdata                        
+	rtn
+rfcomm_calculate_FCS_ua:
+	reverse pdata,pdata //address
+	store 1,memFCStemp3
+	force   RSP_TX_UA, pdata
+	reverse pdata, pdata
+	store   1, memFCStemp2
+	force   0x01, pdata
+	reverse pdata, pdata
+	store   1, memFCStemp1
+	branch caculate_fcs
+	/* FCS return from temp                */
+rfcomm_calculate_FCS_dlci0:
+	fetch 1,mem_rfcomm_initiator
+	branch rfcomm_calculate_FCS_dlci0_res,blank
+	setarg 0x70 //FCS of initiator
+	rtn
+rfcomm_calculate_FCS_dlci0_res:
+	setarg 0xaa//FCS of responder
+	rtn
+	
+rfcomm_save_FCS_uih:
+	reverse pdata, pdata //address 
+	store 1,memFCStemp3                     /* contw distroided                    */
+	force RSP_RX_UIH,pdata 
+	call caculate_UIHdata_fcs
+	fetcht 2,mem_contw_temp
+	copy temp,contw
+	istore 1,contw                      /* save FCS for later use              */
+	copy contw,temp
+	storet 2,mem_contw_temp
+	force RSP_RX_UIH_WDATA,pdata             /* P/F =1 + RSP_RX_UIH                 */
+	call caculate_UIHdata_fcs
+	fetcht 2,mem_contw_temp
+	copy temp,contw
+	istore 1,contw             /* save FCS for later use              */
+	rtn	
+/**********************************************************************/
+/* This subroutine caculates the FCS for UIH data                     */
+/* Input:                                                             */
+/*        the address byte at memFCStemp3(bit reversed), control byte */
+/*        at pdata (not bit reversed)                                 */
+/* Output:                                                            */
+/*        pdata: the FCS                                              */
+/**********************************************************************/  
+caculate_UIHdata_fcs:
+	reverse pdata,pdata
+	store   1,memFCStemp2
+	fetch   2, memFCStemp2                     
+	lshift8 pdata,pdata
+	store 3,mem_mod2div_temp
+	arg     0x107,rega
+	arg 0xf,regb
+	call mod2div
+	xor_into     0xd7, pdata
+	invert  pdata,pdata
+	reverse pdata,pdata
+	rtn
+	
+/**********************************************************************/
+/* This subroutine caculates the FCS                                  */
+/* Input:                                                             */
+/*        the address byte at memFCStemp3, control byte at memFCStemp2*/  
+/*        lenght at memFCStemp1 (all above data are bit reversed)     */
+/* Output:                                                            */
+/*        temp: the FCS                                               */
+/**********************************************************************/     
+caculate_fcs:
+	fetch 3, memFCStemp1                    /* load 3 bytes start at memFCStemp1   */
+	store 3,mem_mod2div_temp
+	arg 0x107,rega
+	arg 0xf,regb  //24bit(memFCStemp1+..+memFCStemp3) - 9bit(rega) = 15bit
+	call mod2div
+	lshift8 pdata,pdata 
+	arg 0x7, regb  //16bit(lshift8 pdata,pdata ) - 9bit(rega) = 7bit
+	call mod2div
+	xor_into     0x2b, pdata		//0x3d
+	invert  pdata, pdata                        
+	reverse pdata, pdata                      /* FCS at pdata                        */
+	copy    pdata, temp
+	rtn
+
+mod2div:
+	arg 0,regc
+	copy regb,loopcnt
+	call right_shift_n // right shift pdata (regB)bit
+	icopy temp
+mod2div_loop:
+	//jam 1,0x1fff
+//mod2div_loop1:
+	//fetch 1,0x1fff
+	//nbranch mod2div_loop1,blank
+	copy temp,pdata
+	lshift regc,regc//quotient
+	bbit0 8, mod2div_not_enough_reduction//the high bit of 0x107
+	ixor rega,temp// temp----remainer
+	increase 1,regc// quotient
+mod2div_not_enough_reduction: //Minuend smaller than Subtrahend
+	lshift temp,temp
+	fetch 3,mem_mod2div_temp
+	increase -1,regb
+	compare 0xff,regb,0xff
+	branch mod2div_end,true
+	copy regb,loopcnt
+	call right_shift_n // right shift pdata (regb)bit
+	isolate1 0,pdata
+	setflag true,0,temp //move a new bit from Dividend(queue) into Minuend(pdata)
+	branch mod2div_loop
+mod2div_end:
+	//output:remainer in pdata
+	rshift  temp,pdata
+	rtn
+
+get_rfcomm_snd_adss:
+	fetcht 1,mem_pn_dlci
+dlci_to_address_cmd:
+	//input DLCI from temp
+	lshift2 temp,temp
+	set1 RFCOMM_ADDRESS_EXT_LEN,temp
+	fetch 1,mem_rfcomm_initiator
+	ncall set_CR_bit,blank
+	storet 1,mem_rfcomm_send_adss
+	rtn
+
+channel_to_dlci:
+	//input channel from temp
+	lshift temp,temp
+	fetch 1,mem_rfcomm_initiator
+	setflag blank,0,temp //direction in dlci
+	//output dlci to temp
+	rtn
+rfcomm_rx_process_DLCI0_sabm:
+	fetcht 1,mem_current_channel //address
+	jam 0xd7,mem_current_fcs //FCS
+	call rfcomm_send_ua
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_RFCOMM_ONLY_SABM,pdata
+	set1 L2CAP_CHANNEL_RFCOMM_ONLY_UA,pdata
+	store 1,mem_rfcomm_state
+	jam 0,mem_rfcomm_initiator
+	branch rfcomm_rx_process_end
+rfcomm_rx_process_DLCI0_ua:
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_RFCOMM_ONLY_UA,pdata
+	store 1,mem_rfcomm_state
+	branch rfcomm_rx_process_end
+
+	
+rfcomm_rx_process:
+	bpatchx patch26_7,mem_patch26
+	fetch 1,memui_reconnect_mode
+	beq NO_RECONNECTION,rfcomm_rx_process_remote_page
+	branch rfcomm_rx_process_reconn
+
+rfcomm_rx_process_remote_page:
+	fetch 2,mem_l2cap_payload_ptr
+	copy pdata,contr
+	call get_rfcomm_head_struct
+	fetch 1,mem_current_channel
+	beq 0,parse_dlci0_rp
+	branch parse_uih_rp
+parse_dlci0_rp:
+	bpatchx patch27_0,mem_patch27
+	fetch 1,mem_current_frame_type
+	beq RFCOMM_FRAME_TYPE_SABM,rfcomm_rx_process_DLCI0_sabm
+	beq RFCOMM_FRAME_TYPE_UA,rfcomm_rx_process_DLCI0_ua
+	beq RFCOMM_FRAME_TYPE_UIH,parse_DLCI0_rp_uih
+	beq RFCOMM_FRAME_TYPE_DISCONN,parse_uih_rp_spp_disconn_send_event
+	rtn
+
+
+parse_DLCI0_rp_uih:
+	fetch 2,mem_rfcomm_uih_payload_ptr
+	copy pdata,contr
+	call get_rfcomm_uih_head_struct
+	fetch 1,mem_uih_cmd_type
+	beq UIH_PARAM_NEG_CMD,parse_DLCI0_rp_uih_pn_cmd
+	beq UIH_PARAM_NEG_RES,parse_DLCI0_rp_uih_pn_res
+	beq UIH_MODEM_STATUS_CMD,parse_DLCI0_rp_uih_ms_cmd
+	beq UIH_MODEM_STATUS_RES,parse_DLCI0_rp_uih_ms_res
+	beq UIH_PARAM_CMD_REMOVE_PORT,parse_DLCI0_rp_uih_cmd_port	
+	branch rfcomm_rx_process_end
+	
+parse_DLCI0_rp_uih_pn_cmd:
+	call parse_DLCI0_rp_uih_pn_res_common
+
+	branch parse_DLCI0_rp_uih_pn_cmd_spp
+
+parse_DLCI0_rp_uih_pn_cmd_spp:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_PN_CMD,pdata
+	set1 RFCOMM_CHANNEL_STATE_PN_RES,pdata
+	store 1,mem_spp_state
+	call rfcomm_send_param_neg_res
+	branch rfcomm_rx_process_end
+	
+parse_DLCI0_rp_uih_pn_res:
+	call parse_DLCI0_rp_uih_pn_res_common
+	branch rfcomm_rx_process_end
+
+parse_DLCI0_rp_uih_pn_res_common:
+	call get_param_payload_ptr
+	branch  get_rfcomm_prarmer_negotiation
+
+get_rfcomm_param_modem_status:
+	call get_param_payload_ptr
+	ifetch 1,contr
+	rshift3 pdata,pdata
+	store 1,mem_ms_channel
+	ifetch 1,contr
+	store 1,mem_ms_param
+	rtn
+
+
+get_rfcomm_head_struct:
+	ifetch 1,contr
+	store 1,mem_current_adss
+	rshift3 pdata,pdata
+	store 1,mem_current_channel
+	ifetch 1,contr
+	store 1,mem_current_frame_type
+get_rfcomm_current_length:
+	call get_rfcomm_length_common
+	storet 2,mem_current_length
+	copy contr,pdata
+	store 2,mem_rfcomm_uih_payload_ptr
+	rtn
+
+get_rfcomm_uih_head_struct:
+	ifetch 1,contr
+	rshift pdata,pdata
+	store 1,mem_uih_cmd_type
+	call get_rfcomm_length_common
+	storet 2,mem_uih_length
+	copy contr,pdata
+	store 2,mem_param_payload_ptr
+	rtn
+
+
+get_param_payload_ptr:
+	fetch 2,mem_param_payload_ptr
+	copy pdata,contr
+	rtn
+
+get_rfcomm_length_common:
+	ifetch 1,contr
+	copy pdata,temp
+	rshift temp,temp
+	rtnbit1 0
+	ifetch 1,contr
+	lshift3 pdata,pdata
+	lshift4 pdata,pdata
+	iadd temp,temp
+	rtn
+
+get_rfcomm_prarmer_negotiation:
+	ifetch 1,contr
+	store 1,mem_pn_dlci
+	ifetch 1,contr
+	store 1,mem_pn_credit_flow_type_info
+	ifetch 1,contr
+	store 1,mem_pn_priority
+	ifetch 1,contr
+	store 1,mem_pn_acknowledg_timer
+	ifetch 2,contr
+	store 2,mem_pn_max_frame_size
+	ifetch 1,contr
+	store 1,mem_pn_max_retrans
+	ifetch 1,contr
+	store 1,mem_remote_credits
+	rtn
+
+
+parse_DLCI0_rp_uih_ms_cmd:
+	call get_rfcomm_param_modem_status
+
+	branch parse_DLCI0_rp_uih_ms_cmd_spp
+
+parse_DLCI0_rp_uih_ms_cmd_spp:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_RCV_MS_CMD,pdata
+	set1 RFCOMM_CHANNEL_STATE_SND_MS_RES,pdata
+	store 1,mem_spp_state
+	fetcht 1,mem_pn_dlci
+	lshift2 temp,temp
+	or_into 3,temp
+	call rfcomm_send_modem_status_res
+	jam MORE_PKT_MSC_CMD_SPP,mem_rfcomm_send_more_pkt
+	branch rfcomm_rx_process_end
+	
+parse_DLCI0_rp_uih_ms_res:
+	jam BT_EVT_SPP_CONNECTED,mem_fifo_temp
+	call ui_ipc_send_event
+	call get_rfcomm_param_modem_status
+	fetch 1,mem_ms_channel
+	sub pdata,1,null
+	branch parse_DLCI0_rp_uih_MS_RES_spp,zero
+	branch assert
+parse_DLCI0_rp_uih_ms_res_spp:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_RCV_MS_RES,pdata
+	store 1,mem_spp_state
+	branch rfcomm_rx_process_end
+
+parse_DLCI0_rp_uih_cmd_port:
+	call get_param_payload_ptr
+	ifetch 1,contr
+	store 1,mem_rpn_dlci
+	call l2cap_malloc_rfcomm_channel
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x000e
+	istore 2,contw //l2cap len
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw//cid
+	fetch 1,mem_rfcomm_initiator
+	//setarg 5
+	lshift pdata,pdata
+	set1 0,pdata //ext len
+	istore 1,contw //DLCI0 address
+	bpatchx patch27_1,mem_patch27
+	setarg 0x15ef
+	istore 2,contw
+	setarg 0x1191
+	istore 2,contw
+	//fetch 1,mem_pn_dlci
+	//setarg 0x0b
+	fetch 1,mem_rpn_dlci
+	istore 1,contw //DLCI
+	setarg 0x000007
+	istore 5,contw
+//	setarg 0 //max frame size
+//	istore 2,contw 
+	setarg 0x01 //max retrans
+	istore 2,contw
+//	setarg 0x00
+//	istore 1,contw // init credits
+	call rfcomm_calculate_FCS_dlci0
+	istore 1,contw
+	rtn
+
+
+
+parse_uih_rp:
+	branch parse_uih_rp_spp
+
+parse_uih_rp_spp:
+	bpatchx patch27_2,mem_patch27
+	fetch 1,mem_current_frame_type
+	beq RFCOMM_FRAME_TYPE_UA,parse_uih_rp_spp_ua
+	beq RFCOMM_FRAME_TYPE_SABM,parse_uih_rp_spp_sabm
+	beq RFCOMM_FRAME_TYPE_UIH,parse_uih_spp_uih
+	beq RFCOMM_FRAME_TYPE_UIH_CREDITS,parse_uih_spp_uih_credits
+	beq RFCOMM_FRAME_TYPE_DISCONN,parse_uih_rp_spp_disconn
+	rtn
+parse_uih_rp_spp_ua:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_UA,pdata
+	store 1,mem_spp_state
+	branch rfcomm_rx_process_end
+parse_uih_rp_spp_sabm:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_UA,pdata
+	set1 RFCOMM_CHANNEL_STATE_SABM,pdata
+	store 1,mem_spp_state
+	fetch 1,mem_current_adss
+	call rfcomm_calculate_FCS_ua
+	store 1,mem_current_fcs
+	call rfcomm_send_ua
+	fetch 1,mem_current_adss
+	rshift2 pdata,pdata
+	store 1,mem_pn_dlci
+	lshift2 pdata,pdata
+	set0 RFCOMM_ADDRESS_CR,pdata
+	set1 RFCOMM_ADDRESS_EXT_LEN,pdata 
+	arg mem_HIUfcs_spp,temp // mem_HIUfcs_HF_WCredits in regb++
+	storet 2,mem_contw_temp
+	call rfcomm_save_FCS_uih
+	branch rfcomm_rx_process_end
+	
+parse_uih_spp_uih_credits:
+	fetch 2,mem_rfcomm_uih_payload_ptr
+	copy pdata,contr
+	increase 1,pdata
+	store 2,mem_rfcomm_uih_payload_ptr
+	ifetch 1,contr //remote credits
+	fetcht 1,mem_remote_credits
+	iadd temp,pdata
+	store 1,mem_remote_credits
+parse_uih_spp_uih:
+	call rfcomm_increase_credit_given
+parse_uih_spp_uih_cont:
+	call get_rfcomm_snd_adss
+	call rfcomm_send_uih_without_payload
+	call spp_process_rx_data
+	branch rfcomm_rx_process_end
+
+parse_uih_rp_spp_disconn_send_event:
+	jam BT_EVT_SPP_DISCONNECTED,mem_fifo_temp
+	call ui_ipc_send_event	
+parse_uih_rp_spp_disconn:
+	call rfcomm_init_spp
+	fetch 1,mem_current_adss
+	call rfcomm_calculate_FCS_ua
+	store 1,mem_current_fcs
+	call rfcomm_send_ua
+	branch rfcomm_rx_process_end
+	
+///////////////////////////////////////////
+///////////////////////////////////////////
+///////////////////////////////////////////
+rfcomm_rx_process_reconn:
+	fetch 2,mem_l2cap_payload_ptr
+	copy pdata,contr
+	call get_rfcomm_head_struct
+	fetch 1,mem_current_channel
+	beq 0,parse_DLCI0_reconn
+	branch parse_uih_reconn
+		
+parse_DLCI0_reconn:
+	bpatchx patch27_3,mem_patch27
+	fetch 1,mem_current_frame_type
+	beq RFCOMM_FRAME_TYPE_SABM,rfcomm_rx_process_DLCI0_sabm
+	beq RFCOMM_FRAME_TYPE_UA,rfcomm_rx_process_DLCI0_ua
+	beq RFCOMM_FRAME_TYPE_UIH,parse_DLCI0_reconn_uih
+	branch rfcomm_rx_process_end
+parse_DLCI0_reconn_uih:
+	fetch 2,mem_rfcomm_uih_payload_ptr
+	copy pdata,contr
+	call get_rfcomm_uih_head_struct
+	fetch 1,mem_uih_cmd_type
+	beq UIH_PARAM_NEG_CMD,parse_DLCI0_reconn_uih_pn_cmd
+	beq UIH_PARAM_NEG_RES,parse_DLCI0_reconn_uih_pn_cmd
+	beq UIH_MODEM_STATUS_CMD,parse_DLCI0_reconn_uih_ms_cmd
+	beq UIH_MODEM_STATUS_RES,parse_DLCI0_reconn_uih_ms_res
+	branch rfcomm_rx_process_end
+
+parse_DLCI0_reconn_uih_pn_cmd:
+	call parse_DLCI0_rp_uih_pn_res_common
+	fetch 1,mem_pn_dlci
+	rshift pdata,pdata
+	fetcht 1,mem_remote_spp_channel
+	isub temp,null
+	branch parse_DLCI0_reconn_uih_pn_cmd_spp,zero
+	branch assert
+parse_DLCI0_reconn_uih_pn_cmd_spp:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_PN_RES,pdata
+	store 1,mem_spp_state
+	branch rfcomm_rx_process_end
+
+parse_DLCI0_reconn_uih_ms_cmd:
+	call get_rfcomm_param_modem_status
+	fetch 1,mem_ms_channel
+	fetcht 1,mem_remote_spp_channel
+	isub temp,null
+	branch parse_DLCI0_reconn_uih_ms_cmd_spp,zero
+	branch assert
+	branch rfcomm_rx_process_end
+parse_DLCI0_reconn_uih_ms_cmd_spp:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_RCV_MS_CMD,pdata
+	set1 RFCOMM_CHANNEL_STATE_SND_MS_RES,pdata
+	store 1,mem_spp_state
+	fetcht 1,mem_pn_dlci
+	lshift2 temp,temp
+	or_into 3,temp
+	call rfcomm_send_modem_status_res
+	branch rfcomm_rx_process_end
+	
+parse_DLCI0_reconn_uih_ms_res:
+	call get_rfcomm_param_modem_status
+	fetch 1,mem_ms_channel
+	fetcht 1,mem_remote_spp_channel
+	isub temp,null
+	branch parse_DLCI0_reconn_uih_ms_res_spp,zero
+	branch assert
+parse_DLCI0_reconn_uih_ms_res_spp:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_RCV_MS_RES,pdata
+	store 1,mem_spp_state
+	branch rfcomm_rx_process_end
+
+parse_uih_reconn:
+	fetch 1,mem_current_channel
+	fetcht 1,mem_remote_spp_channel
+	isub temp,null
+	branch parse_uih_reconn_spp,zero
+	branch assert
+	branch rfcomm_rx_process_end
+
+parse_uih_reconn_spp:
+	fetch 1,mem_current_frame_type
+	beq RFCOMM_FRAME_TYPE_UA,parse_uih_reconn_spp_ua
+	beq RFCOMM_FRAME_TYPE_UIH,parse_uih_spp_uih
+	beq RFCOMM_FRAME_TYPE_UIH_CREDITS,parse_uih_spp_uih_credits
+	beq RFCOMM_FRAME_TYPE_DISCONN,parse_uih_reconn_spp_disconn
+parse_uih_reconn_spp_ua:
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_UA,pdata
+	store 1,mem_spp_state
+	branch rfcomm_rx_process_end
+parse_uih_reconn_spp_sabm:
+	branch parse_uih_reconn_spp_sabm//loop
+parse_uih_reconn_spp_disconn:
+	branch parse_uih_rp_spp_disconn
+rfcomm_rx_process_end:
+	rtn
+	
+rfcomm_send_more_pkt:
+	fetch 1,mem_rfcomm_send_more_pkt
+	rtn blank
+	beq MORE_PKT_MSC_CMD_SPP,rfcomm_send_more_pkt_msc_cmd_spp
+	branch assert
+	
+rfcomm_send_more_pkt_msc_cmd_spp:
+	jam 0,mem_rfcomm_send_more_pkt
+	call l2cap_malloc_rfcomm_channel
+	arg SPP_SLAVE_CHANNEL,temp
+	fetcht 1,mem_pn_dlci
+	lshift2 temp,temp
+rfcomm_send_more_pkt_msc_cmd_spp0:
+	or_into 0x03,temp
+	arg 0xaa,rega
+	call rfcomm_send_modem_status_cmd
+	call l2cap_get_rfcomm_tx_buff
+	copy contw,contr
+	ifetch 2, contr
+	branch assert,blank
+	rtn
+
+rfcomm_send_sabm:
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x0004
+	istore 2,contw //l2cap len
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw//cid
+	fetch 1,mem_current_adss
+	istore 1,contw //address
+	bpatchx patch27_4,mem_patch27
+	setarg 0x013f
+	istore 2,contw
+	fetch 1,mem_current_fcs
+	istore 1,contw
+	rtn
+rfcomm_send_ua:
+	call l2cap_malloc_rfcomm_channel
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x0004
+	istore 2,contw //l2cap len
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw//cid
+	fetch 1,mem_current_adss
+	istore 1,contw //address
+	bpatchx patch27_5,mem_patch27
+	setarg 0x0173
+	istore 2,contw
+	fetch 1,mem_current_fcs
+	istore 1,contw
+	rtn
+rfcomm_send_param_neg_cmd:
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x000e
+	istore 2,contw //l2cap len
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw//cid
+	fetch 1,mem_rfcomm_initiator
+	lshift pdata,pdata
+	set1 0,pdata //ext len
+	istore 1,contw //DLCI0 address
+	bpatchx patch27_6,mem_patch27
+	setarg 0x15ef
+	istore 2,contw
+	setarg 0x1183
+	istore 2,contw
+	copy temp,pdata //DLCI in temp
+	istore 1,contw
+	setarg 0x0000f0
+	istore 3,contw
+	setarg RFCOMM_MAX_FRAME_SIZE
+	istore 2,contw
+	setarg 0
+	istore 1,contw
+	setarg 0x01		//change here later
+	istore 1,contw
+	call rfcomm_calculate_FCS_dlci0
+	istore 1,contw
+	jam 0x10,mem_credit_given
+	rtn
+rfcomm_send_param_neg_res:
+	call l2cap_malloc_rfcomm_channel
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x000e
+	istore 2,contw //l2cap len
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw//cid
+	fetch 1,mem_rfcomm_initiator
+	lshift pdata,pdata
+	set1 0,pdata //ext len
+	istore 1,contw //DLCI0 address
+	bpatchx patch27_7,mem_patch27
+	setarg 0x15ef
+	istore 2,contw
+	setarg 0x1181
+	istore 2,contw
+	fetch 1,mem_pn_dlci
+	istore 1,contw //DLCI
+	setarg 0x0000e0
+	istore 3,contw
+	fetch 2,mem_rfcomm_max_frame_size
+	istore 2,contw 
+	setarg 0x00 //max retrans
+	istore 1,contw
+	fetch 1,mem_rfcomm_credit_init_data
+	istore 1,contw // init credits
+	call rfcomm_calculate_FCS_dlci0
+	istore 1,contw
+	rtn
+rfcomm_send_modem_status_cmd:
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x0008
+	istore 2,contw //l2cap len
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw//cid
+	fetch 1,mem_rfcomm_initiator
+	lshift pdata,pdata
+	set1 0,pdata //ext len
+	istore 1,contw //DLCI0 address
+	bpatchx patch28_0,mem_patch28
+	setarg 0x09ef
+	istore 2,contw
+	setarg 0x05e3
+	istore 2,contw
+	copy temp,pdata //DLCI adress
+	istore 1,contw
+	setarg 0x8d
+	istore 1,contw
+	call rfcomm_calculate_FCS_dlci0
+	istore 1,contw
+	rtn
+
+rfcomm_send_modem_status_res:
+	call l2cap_malloc_rfcomm_channel
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x0008
+	istore 2,contw //l2cap len
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw//cid
+	copy temp,timeup
+	fetch 1,mem_rfcomm_initiator
+	lshift pdata,pdata
+	set1 0,pdata //ext len
+	istore 1,contw //DLCI0 address
+	bpatchx patch28_1,mem_patch28
+	setarg 0x09ef
+	istore 2,contw
+	setarg 0x05e1
+	istore 2,contw
+	copy timeup,pdata //DLCI address in temp
+	istore 1,contw
+	setarg 0x8d
+	istore 1,contw
+	call rfcomm_calculate_FCS_dlci0
+	istore 1,contw
+	rtn
+
+rfcomm_send_uih_without_payload:
+	bpatchx patch28_2,mem_patch28
+	fetch 1,mem_credit_given
+	rtn blank
+	fetch 2,core_uart_rxitems
+	nrtn blank
+	copy rega,pdata
+	store 1,mem_pdatatemp+1
+	storet 1,mem_pdatatemp
+	call l2cap_malloc_is_fifo_full
+	nrtn blank
+	call l2cap_malloc_rfcomm_channel
+	call l2cap_get_rfcomm_tx_buff
+	setarg 0x05
+	istore 2,contw
+	fetch 2,mem_RFCOMM_remote_CID
+	istore 2,contw
+	fetch 1,mem_rfcomm_send_adss
+	istore 1,contw
+	setarg 0x01ff
+	istore 2,contw
+	fetch 1,mem_credit_given
+	istore 1,contw
+	fetch 1,mem_HIUfcs_SPP_WCredits
+	istore 1,contw
+	jam 0,mem_credit_given
+	rtn
+	
+rfcomm_increase_credit_given:
+	bpatchx patch28_3,mem_patch28
+	fetch 1,mem_rfcomm_credit_flag
+	rtneq CREDIT_ENABLE
+	fetch 2,mem_current_length
+	rtn blank
+	fetch 1,mem_credit_given
+	increase 1,pdata
+	store 1,mem_credit_given
+	rtn
+
+spp_process_rx_data:
+	fetch 2,mem_cb_receive_spp_data
+	branch callback_func
+
+spp_tx_rfcomm_packet:
+	bpatchx patch28_4,mem_patch28
+	//credit
+	fetch 1,mem_remote_credits
+	rtn blank
+	increase -1,pdata
+	store 1,mem_remote_credits
+	fetch 2,mem_pn_max_frame_size
+	fetcht 2,mem_current_packet_length
+	isub temp,null
+	branch ssp_tx_rfcomm_from_uart,positive
+	store 2,mem_current_packet_length
+ssp_tx_rfcomm_from_uart:
+	fetch 1,mem_credit_given
+	branch ssp_tx_rfcomm_from_uart_without_credit,blank
+	jam 1,mem_rfcomm_send_offset
+	fetch 1,mem_HIUfcs_SPP_WCredits
+	store 1,mem_rfcomm_send_fcs
+	setarg RSP_RX_UIH_WDATA
+	store 1,mem_rfcomm_send_frame_type
+	branch ssp_tx_rfcomm_from_uart_common
+ssp_tx_rfcomm_from_uart_without_credit:
+	jam 0,mem_rfcomm_send_offset
+	fetch 1,mem_HIUfcs_SPP
+	store 1,mem_rfcomm_send_fcs
+	setarg RSP_TX_UIH
+	store 1,mem_rfcomm_send_frame_type
+ssp_tx_rfcomm_from_uart_common:
+	bpatchx patch28_5,mem_patch28
+	fetch 2,mem_current_packet_length
+	sub pdata,127,null
+	branch ssp_tx_rfcomm_from_uart_common0,positive
+	fetch 1,mem_rfcomm_send_offset
+	increase 1,pdata
+	store 1,mem_rfcomm_send_offset
+ssp_tx_rfcomm_from_uart_common0:
+	call get_rfcomm_snd_adss
+	fetch 2,mem_current_packet_length
+	increase 8,pdata	//fcs + rfcommhead + l2caphead == 8
+	fetcht 1,mem_rfcomm_send_offset
+	iadd temp,rega
+	//rfcomm payload
+	call l2cap_malloc
+	store 2,mem_rfcomm_tx_buff_ptr
+	increase 4,pdata
+	store 2,mem_rfcomm_tx_payload_ptr
+	copy pdata,contw
+	fetch 1,mem_rfcomm_send_adss
+	istore 1,contw
+	fetch 1,mem_rfcomm_send_frame_type
+	istore 1,contw
+	call ssp_tx_write_length
+	call ssp_tx_write_given_credit
+	bpatchx patch28_6,mem_patch28
+	fetch 2,mem_nl_rx_data_src		//src
+	copy pdata,contu
+	fetch 2,mem_current_packet_length
+	copy pdata,loopcnt
+	call uart_copy_rx_bytes_fast
+	copy contw,temp
+	copy contu,pdata
+	store 2,mem_nl_rx_data_src
+	copy temp,contw	
+	fetch 1,mem_rfcomm_send_fcs
+	istore 1,contw
+	fetch 2,mem_rfcomm_tx_buff_ptr
+	copy pdata,contw
+	fetch 2,mem_current_packet_length
+	fetcht 1,mem_rfcomm_send_offset
+	iadd temp,pdata
+	increase 4,pdata
+	istore 2,contw
+	fetch 2,mem_rfcomm_remote_cid
+	istore 2,contw
+	jam 0,mem_credit_given	//whatever mem_credit_given is set to 0
+	fetch 2,mem_nl_rx_len_all
+	beq 0,module_hci_command_tx_spp_tx_complete
+	jam HCI_NOT_DISCARD_PACKET,mem_module_temp_nl_discard_packet
+	rtn
+
+ssp_tx_write_length:
+	bpatchx patch28_7,mem_patch28
+	fetch 2,mem_current_packet_length
+	sub pdata,0x7f,null
+	nbranch ssp_tx_write_long_packet,positive
+	lshift pdata,pdata
+	set1 0,pdata
+	istore 1,contw
+	rtn
+ssp_tx_write_long_packet:
+	fetch 2,mem_current_packet_length
+	rshift3 pdata,pdata
+	rshift4 pdata,temp
+	and_into 0x7f,pdata
+	lshift pdata,pdata
+	set0 0,pdata
+	istore 1,contw
+	istoret 1,contw
+	rtn
+ssp_tx_write_given_credit:
+	fetch 1,mem_credit_given
+	rtn blank
+	istore 1,contw
+	rtn
+
+	
+
+
+else
+
+endif
Index: mouse_public_3mode_usb/program/scheduler.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/scheduler.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/scheduler.prog	(working copy)
@@ -0,0 +1,460 @@
+scheduler_process:
+	bpatchx patch29_0,mem_patch29
+	call check_51cmd
+	call app_process_bb_event
+	call process_conn_sm
+/* check the connection state sequence byte */
+	bpatchx patch29_1,mem_patch29
+ifdef SIMPLE_PAIRING
+	call sp_calc_sequence
+	call simple_pairing_sequence
+	call master_simple_paring_sequence
+endif
+//return if it is hci mode. 'cause the following is host part.
+//notify BB to tx a l2cap packet
+	call l2cap_malloc_is_fifo_full
+	nrtn blank
+	//for conn to MTK 
+	call l2cap_call_proc_sigal_pending
+	call l2cap_malloc_is_fifo_full
+	nrtn blank
+	bpatchx patch29_2,mem_patch29
+//to generat a new l2cap packet
+	call process_upper_sm
+	call l2cap_send_config_req
+ifdef COMPILE_RFCOMM
+	call rfcomm_send_more_pkt//use this function to send msc_cmd after msc_rep sent
+endif
+scheduler_process0:
+	call scheduler_tx_disconnect_hid //may not used
+	bpatchx patch29_3,mem_patch29
+//	call l2cap_malloc_is_fifo_full
+//	nrtn blank
+	branch app_process_bt
+	
+scheduler_tx_disconnect_hid:
+	fetch 1,mem_CONTROL_tasks		
+	bbit1 L2CAP_DISCONNECT_INTERRUPT,L2CAP_disconnect_interrupt_req
+	bbit1 L2CAP_DISCONNECT_CONTROL,L2CAP_disconnect_control_req
+	rtn
+	
+scheduler_tx_l2cap_pkt:
+	bpatchx patch29_4,mem_patch29
+	call l2cap_malloc_is_fifo_empty
+	rtn blank //empty
+	fetch 1,mem_op
+	rtnbit1 op_txl2cap
+	call l2cap_malloc_fifo_out
+	store 2,mem_txptr
+	copy pdata,contr
+	ifetch 2,contr
+	increase 4,pdata
+	store 2,mem_tx_len
+	jam 6,mem_tx_lch//start pkt
+	bpatchx patch29_5,mem_patch29
+	fetch 2,mem_l2cap_tx_multi_offset
+	branch scheduler_tx_l2cap_start_pkt,blank
+	fetch 1,mem_op
+	rtnbit0 op_pkt_comp
+	set0 op_pkt_comp,pdata
+	store 1,mem_op
+	jam 5,mem_tx_lch//continue pkt
+	fetcht 2,mem_l2cap_tx_multi_offset
+	fetch 2,mem_txptr
+	iadd temp,pdata
+	store 2,mem_txptr
+	fetch 2,mem_tx_len
+	isub temp,pdata
+	store 2,mem_tx_len
+scheduler_tx_l2cap_start_pkt:
+	fetch 2,mem_tx_len
+	branch assert,blank
+	arg l2cap_max_pkt_len,temp //max len of dh3 pkt
+	isub temp,pdata
+	branch scheduler_Tx_l2cap_last_pkt,zero
+	nbranch scheduler_Tx_l2cap_last_pkt,positive
+	storet 2,mem_tx_len //l2cap_max_pkt_len
+	fetch 2,mem_l2cap_tx_multi_offset
+	iadd temp,pdata
+	store 2,mem_l2cap_tx_multi_offset
+	branch scheduler_Tx_l2cap_pkt_end
+scheduler_Tx_l2cap_last_pkt:
+	setarg 0
+	store 2,mem_l2cap_tx_multi_offset
+scheduler_Tx_l2cap_pkt_end:
+	fetch 1,mem_op
+	set1 op_txl2cap,pdata
+	store 1,mem_op
+	rtn
+
+scheduler_start_upper_sm:
+	fetch 1,mem_UI_profile_supported
+	bbit1 support_HID,scheduler_start_upper_sm_hid
+	jam UPPERSM_RECONN_SDP_CONN,mem_upper_sm_reconn
+	rtn
+scheduler_start_upper_sm_hid:
+	jam UPPERSM_RECONN_HID_CTRL_CONN,mem_upper_sm_reconn
+	rtn
+	
+process_upper_sm:
+	fetch 1,memui_reconnect_mode
+	nbranch process_upper_sm_reconn,blank
+process_upper_sm_remote_page:
+	fetch 1,mem_upper_sm_remote_page
+	//beq UPPERSM_RP_IDLE,process_upper_sm_rp_idle
+	rtn blank
+	//nothing to do when remote page to create a connection.
+	jam 0,mem_upper_sm_remote_page
+process_upper_sm_rp_wait:
+	rtn
+
+
+process_upper_sm_reconn:
+	bpatchx patch29_6,mem_patch29
+	fetch 1,mem_upper_sm_reconn
+	rtn blank
+	beq UPPERSM_RECONN_SDP_CONN,process_upper_sm_reconn_sdp_conn
+	beq UPPERSM_RECONN_SDP_CONN_WAIT,process_upper_sm_reconn_sdp_conn_wait
+	beq UPPERSM_RECONN_SDP_CFG,process_upper_sm_reconn_sdp_cfg
+	beq UPPERSM_RECONN_SDP_CFG_WAIT,process_upper_sm_reconn_sdp_cfg_wait
+	beq UPPERSM_RECONN_SS_SPP,process_upper_sm_reconn_ss_spp
+	beq UPPERSM_RECONN_SS_SPP_WAIT,process_upper_sm_reconn_ss_spp_wait
+	beq UPPERSM_RECONN_SDP_DISCONN,process_upper_sm_reconn_sdp_disconn
+	beq UPPERSM_RECONN_SDP_DISCONN_WAIT,process_upper_sm_reconn_sdp_disconn_wait
+	beq UPPERSM_RECONN_HID_CTRL_CONN,process_upper_sm_reconn_hid_ctrl_conn
+	beq UPPERSM_RECONN_HID_CTRL_CONN_WAIT,process_upper_sm_reconn_hid_ctrl_conn_wait
+	beq UPPERSM_RECONN_HID_CTRL_CFG,process_upper_sm_reconn_hid_ctrl_cfg
+	beq UPPERSM_RECONN_HID_CTRL_CFG_WAIT,process_upper_sm_reconn_hid_ctrl_cfg_wait
+	beq UPPERSM_RECONN_HID_INT_CONN,process_upper_sm_reconn_hid_int_conn
+	beq UPPERSM_RECONN_HID_INT_CONN_WAIT,process_upper_sm_reconn_hid_int_conn_wait
+	beq UPPERSM_RECONN_HID_INT_CFG,process_upper_sm_reconn_hid_int_cfg
+	beq UPPERSM_RECONN_HID_INT_CFG_WAIT,process_upper_sm_reconn_hid_int_cfg_wait
+	beq UPPERSM_RECONN_RFCOMM_CONN,process_upper_sm_reconn_rfcomm_conn
+	beq UPPERSM_RECONN_RFCOMM_CONN_WAIT,process_upper_sm_reconn_rfcomm_conn_wait
+	beq UPPERSM_RECONN_RFCOMM_CFG,process_upper_sm_reconn_rfcomm_cfg
+	beq UPPERSM_RECONN_RFCOMM_CFG_WAIT,process_upper_sm_reconn_rfcomm_cfg_wait
+	beq UPPERSM_RECONN_RFCOMM_SABM,process_upper_sm_reconn_rfcomm_sabm
+	beq UPPERSM_RECONN_RFCOMM_SABM_WAIT,process_upper_sm_reconn_rfcomm_sabm_wait
+	beq UPPERSM_RECONN_SPP_CMD_PN,process_upper_sm_reconn_spp_cmd_pn
+	beq UPPERSM_RECONN_SPP_CMD_PN_WAIT,process_upper_sm_reconn_spp_cmd_pn_wait
+	beq UPPERSM_RECONN_SPP_SABM,process_upper_sm_reconn_spp_sabm
+	beq UPPERSM_RECONN_SPP_SABM_WAIT,process_upper_sm_reconn_spp_sabm_wait
+	beq UPPERSM_RECONN_SPP_CMD_MS,process_upper_sm_reconn_spp_cmd_ms
+	beq UPPERSM_RECONN_SPP_CMD_MS_WAIT,process_upper_sm_reconn_spp_cmd_ms_wait
+process_upper_sm_reconn_wait:
+	rtn
+process_upper_sm_reconn_sdp_conn:
+	call upper_sm_send_sdp_conn //return n-user if sending failed
+	jam UPPERSM_RECONN_SDP_CONN_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	store 1,mem_sdp_state
+	rtn
+process_upper_sm_reconn_sdp_cfg:
+	jam UPPERSM_RECONN_SDP_CFG_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_sdp_state
+	rtnbit1 L2CAP_CHANNEL_STATE_SND_CFG_REQ
+	jam UPPERSM_RECONN_SDP_CFG,mem_upper_sm_reconn
+	call upper_sm_send_sdp_cfg //return n-user if sending failed
+	jam UPPERSM_RECONN_SDP_CFG_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_sdp_state
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_sdp_state
+	rtn
+process_upper_sm_reconn_ss_spp:
+	call l2cap_malloc_is_fifo_empty
+	nrtn blank
+	call upper_sm_send_ss_spp
+	jam UPPERSM_RECONN_SS_SPP_WAIT,mem_upper_sm_reconn
+	rtn
+process_upper_sm_reconn_sdp_disconn:
+	call upper_sm_send_sdp_disconn
+	jam UPPERSM_RECONN_SDP_DISCONN_WAIT,mem_upper_sm_reconn
+	rtn
+process_upper_sm_reconn_hid_ctrl_conn:
+	call upper_sm_send_hid_ctrl_conn
+	jam UPPERSM_RECONN_HID_CTRL_CONN_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	store 1,mem_hid_control_state
+	rtn
+process_upper_sm_reconn_hid_ctrl_cfg:    
+	call upper_sm_send_hid_ctrl_cfg
+	jam UPPERSM_RECONN_HID_CTRL_CFG_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_hid_control_state
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_hid_control_state
+	rtn
+process_upper_sm_reconn_hid_int_conn:
+	call upper_sm_send_hid_int_conn
+	jam UPPERSM_RECONN_HID_INT_CONN_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	store 1,mem_hid_interrupt_state
+	rtn
+process_upper_sm_reconn_hid_int_cfg:    
+	call upper_sm_send_hid_int_cfg
+	jam UPPERSM_RECONN_HID_INT_CFG_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_hid_interrupt_state
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_hid_interrupt_state
+	rtn
+process_upper_sm_reconn_rfcomm_conn:
+	call upper_sm_send_rfcomm_conn
+	jam UPPERSM_RECONN_RFCOMM_CONN_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_CONN_REQ,pdata
+	store 1,mem_rfcomm_state
+	rtn
+process_upper_sm_reconn_rfcomm_cfg: 
+	call upper_sm_send_rfcomm_cfg
+	jam UPPERSM_RECONN_RFCOMM_CFG_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_STATE_SND_CFG_REQ,pdata
+	store 1,mem_rfcomm_state
+	rtn
+process_upper_sm_reconn_rfcomm_sabm:
+	call upper_sm_send_rfcomm_sabm
+	jam UPPERSM_RECONN_RFCOMM_SABM_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_rfcomm_state
+	set1 L2CAP_CHANNEL_RFCOMM_ONLY_SABM,pdata
+	store 1,mem_rfcomm_state
+	rtn
+process_upper_sm_reconn_spp_cmd_pn: 
+	call upper_sm_send_spp_cmd_pn
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_PN_CMD,pdata
+	store 1,mem_spp_state
+	jam UPPERSM_RECONN_SPP_CMD_PN_WAIT,mem_upper_sm_reconn
+	rtn
+process_upper_sm_reconn_spp_sabm:   
+	call upper_sm_send_spp_sabm
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_SABM,pdata
+	store 1,mem_spp_state
+	jam UPPERSM_RECONN_SPP_SABM_WAIT,mem_upper_sm_reconn
+	fetch 1,mem_remote_spp_channel //address in pdata
+	lshift3 pdata,pdata
+	or_into 3,pdata
+	arg mem_HIUfcs_SPP,temp // mem_HIUfcs_spp_WCredits in regb++
+	storet 2,mem_contw_temp
+	branch rfcomm_save_FCS_uih
+process_upper_sm_reconn_spp_cmd_ms: 
+	call upper_sm_send_spp_cmd_ms
+	fetch 1,mem_spp_state
+	set1 RFCOMM_CHANNEL_STATE_SND_MS_CMD,pdata
+	store 1,mem_spp_state
+	jam UPPERSM_RECONN_SPP_CMD_MS_WAIT,mem_upper_sm_reconn
+	rtn
+
+process_upper_sm_reconn_sdp_conn_wait:
+	fetch 1,mem_sdp_state
+	rtnbit0 L2CAP_CHANNEL_STATE_CONN_RES
+	jam UPPERSM_RECONN_SDP_CFG,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_sdp_cfg_wait:
+	fetch 1,mem_sdp_state
+	rtnne L2CAP_CHANNEL_SETUP_COMPLETE
+	jam UPPERSM_RECONN_SS_SPP ,mem_upper_sm_reconn
+process_upper_sm_reconn_ss_spp_wait:
+	fetch 1,mem_message_to_uppersm
+	rtnne RECIEVE_SS_REASULT_HF
+	jam 0,mem_message_to_uppersm
+	jam UPPERSM_RECONN_SDP_DISCONN,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_sdp_disconn_wait:
+	fetch 1,mem_sdp_state
+	nrtn blank
+	fetch 1,mem_UI_profile_supported
+	bbit1 support_HID,process_upper_sm_reconn_setup_hid
+	bbit1 support_SPP,process_upper_sm_reconn_setup_rfcomm
+	branch process_upper_sm_reconn_termination
+process_upper_sm_reconn_hid_ctrl_conn_wait:
+	fetch 1,mem_hid_control_state
+	rtnbit0 L2CAP_CHANNEL_STATE_CONN_RES
+	jam UPPERSM_RECONN_HID_CTRL_CFG,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_hid_ctrl_cfg_wait:
+	fetch 1,mem_hid_control_state
+	rtnne L2CAP_CHANNEL_SETUP_COMPLETE
+	jam UPPERSM_RECONN_HID_INT_CONN,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_hid_int_conn_wait:  
+	fetch 1,mem_hid_interrupt_state
+	rtnbit0 L2CAP_CHANNEL_STATE_CONN_RES
+	jam UPPERSM_RECONN_HID_INT_CFG,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_hid_int_cfg_wait:  
+	fetch 1,mem_hid_interrupt_state
+	rtnne L2CAP_CHANNEL_SETUP_COMPLETE
+	fetch 1,mem_UI_profile_supported
+	bbit1 support_SPP,process_upper_sm_reconn_setup_rfcomm
+	branch process_upper_sm_reconn_termination
+process_upper_sm_reconn_rfcomm_conn_wait: 
+	fetch 1,mem_rfcomm_state
+	rtnbit0 L2CAP_CHANNEL_STATE_CONN_RES
+	jam UPPERSM_RECONN_RFCOMM_CFG,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_rfcomm_cfg_wait:
+	fetch 1,mem_rfcomm_state
+	rtnne L2CAP_CHANNEL_SETUP_COMPLETE
+	jam UPPERSM_RECONN_RFCOMM_SABM,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_rfcomm_sabm_wait:  
+	fetch 1,mem_rfcomm_state
+	rtnne L2CAP_CHANNEL_RFCOMM_DLCI0_OPENED
+	fetch 1,mem_UI_profile_supported
+	bbit1 support_SPP,process_upper_sm_reconn_setup_spp
+	branch process_upper_sm_reconn_termination
+process_upper_sm_reconn_spp_cmd_pn_wait:
+	fetch 1,mem_spp_state
+	rtnbit0 RFCOMM_CHANNEL_STATE_PN_RES
+	jam UPPERSM_RECONN_SPP_SABM,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_spp_sabm_wait:
+	fetch 1,mem_spp_state
+	rtnbit0 RFCOMM_CHANNEL_STATE_UA
+	jam UPPERSM_RECONN_SPP_CMD_MS ,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_spp_cmd_ms_wait: 
+	fetch 1,mem_spp_state
+	rtnne RFCOMM_CHANNEL_SETUP_COMPLETE
+	branch process_upper_sm_reconn_termination
+
+process_upper_sm_reconn_setup_hid:
+	jam UPPERSM_RECONN_HID_CTRL_CONN,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+
+process_upper_sm_reconn_setup_rfcomm:
+	jam UPPERSM_RECONN_RFCOMM_CONN,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+process_upper_sm_reconn_setup_spp:
+	jam UPPERSM_RECONN_SPP_CMD_PN,mem_upper_sm_reconn
+	branch process_upper_sm_reconn
+
+
+
+process_upper_sm_reconn_termination:
+	jam 0,mem_upper_sm_reconn
+	rtn
+upper_sm_send_sdp_conn:
+	bpatchx patch29_7,mem_patch29
+	call l2cap_malloc_signal_channel
+	setarg PSM_SDP
+	copy pdata,temp
+	setarg L2CAP_SDP_channel
+	copy pdata,timeup
+	branch ML2CAP_send_signal_connect_req
+	
+upper_sm_send_sdp_cfg:
+	bpatchx patch2a_0,mem_patch2a
+	call l2cap_malloc_signal_channel
+	fetch 2,mem_SDP_remote_CID
+	copy pdata,temp
+	branch ML2CAP_send_signal_config_req
+	
+upper_sm_send_sdp_disconn:
+	bpatchx patch2a_1,mem_patch2a
+	call l2cap_malloc_signal_channel
+	fetch 2,mem_SDP_remote_CID
+	copy pdata,temp
+	arg L2CAP_SDP_channel,timeup
+	call ML2CAP_send_signal_disconn_req
+	fetch 1,mem_sdp_state
+	set0 L2CAP_CHANNEL_STATE_RCV_CFG_RES ,pdata
+	store 1,mem_sdp_state
+	rtn
+//service search
+upper_sm_send_ss_spp:
+	bpatchx patch2a_2,mem_patch2a
+	call l2cap_malloc_sdp_channel
+	call sdp_send_spp_request
+	branch MSDP_send_req_done
+
+upper_sm_send_rfcomm_conn:
+	bpatchx patch2a_3,mem_patch2a
+	call l2cap_malloc_signal_channel
+	setarg PSM_RFCOMM
+	copy pdata,temp
+	setarg L2CAP_RFCOMM_channel
+	copy pdata,timeup
+	branch ML2CAP_send_signal_connect_req
+
+upper_sm_send_rfcomm_cfg:
+	bpatchx patch2a_4,mem_patch2a
+	call l2cap_malloc_signal_channel
+	fetch 2,mem_rfcomm_remote_cid
+	copy pdata,temp
+	branch ML2CAP_send_signal_config_req
+
+upper_sm_send_hid_ctrl_conn:
+	bpatchx patch2a_5,mem_patch2a
+	call l2cap_malloc_signal_channel
+	setarg PSM_HID_control
+	copy pdata,temp
+	setarg L2CAP_HID_Control_channel
+	copy pdata,timeup
+	branch ML2CAP_send_signal_connect_req
+
+upper_sm_send_hid_ctrl_cfg:
+	bpatchx patch2a_6,mem_patch2a
+	call l2cap_malloc_signal_channel
+	fetch 2,mem_hid_ctrl_remote_cid
+	copy pdata,temp
+	branch ML2CAP_send_signal_config_req
+
+upper_sm_send_hid_int_conn:
+	bpatchx patch2a_7,mem_patch2a
+	call l2cap_malloc_signal_channel
+	setarg PSM_HID_interrupt
+	copy pdata,temp
+	setarg L2CAP_HID_interrupt_channel
+	copy pdata,timeup
+	branch ML2CAP_send_signal_connect_req
+	
+upper_sm_send_hid_int_cfg:
+	bpatchx patch2b_0,mem_patch2b
+	call l2cap_malloc_signal_channel
+	fetch 2,mem_hid_int_remote_cid
+	copy pdata,temp
+	branch ML2CAP_send_signal_config_req
+
+upper_sm_send_rfcomm_sabm:
+	bpatchx patch2b_1,mem_patch2b
+	call l2cap_malloc_rfcomm_channel
+	//force 3,temp //address
+	jam 3,mem_current_adss
+	jam 0x1c,mem_current_fcs
+	call rfcomm_send_sabm
+	jam 1,mem_rfcomm_initiator
+	rtn
+
+upper_sm_send_spp_cmd_pn:
+	bpatchx patch2b_2,mem_patch2b
+	call l2cap_malloc_rfcomm_channel
+	fetcht 1,mem_remote_spp_channel
+	call channel_to_dlci
+	storet 1,mem_pn_dlci
+	branch rfcomm_send_param_neg_cmd
+
+upper_sm_send_spp_sabm:
+	bpatchx patch2b_3,mem_patch2b
+	call l2cap_malloc_rfcomm_channel
+	fetcht 1,mem_pn_dlci
+	call dlci_to_address_cmd
+	call rfcomm_calculate_FCS_sabm //sabm fcs use once only,not need to save
+	store 1,mem_current_fcs
+	fetcht 1,mem_pn_dlci
+	call dlci_to_address_cmd
+	storet 1,mem_current_adss
+	branch rfcomm_send_sabm
+
+upper_sm_send_spp_cmd_ms:
+	bpatchx patch2b_4,mem_patch2b
+	call l2cap_malloc_rfcomm_channel
+	fetcht 1,mem_pn_dlci
+	call dlci_to_address_cmd //address in temp
+	branch rfcomm_send_modem_status_cmd
+
+
+
Index: mouse_public_3mode_usb/program/sdp.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/sdp.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/sdp.prog	(working copy)
@@ -0,0 +1,1206 @@
+/**********************************************************************/
+/* Subroutine: sdp_process                                         */
+/* Process Service Discovery Request                                  */
+/* Called from L2CAP, check PDUID, branch to different req processings*/
+/*                                                                    */  
+/* Input:       mem_L2CAP_Rx_payload                                  */
+/* Output:      mem_SDP_Tx_payload, mem_SDP_Tx_pkt_length	      */
+/*                                                                    */
+/**********************************************************************/     
+sdp_process:
+	bpatchx patch2b_5,mem_patch2b
+	fetch 2,mem_l2cap_payload_ptr
+	iforce contr
+//	ifetchr regb,1,contr				/* PDUID */
+//	storer regb,1,mem_sdp_pduid
+	ifetch 1,contr
+	copy pdata,regb
+	store 1,mem_sdp_pduid
+	ifetch 2,contr
+	store 2,mem_sdp_transactionid			/* save transaction id */
+	ifetch 1,contr				/* higher byte of parameter length */
+	lshift8 pdata,timeup				
+	ifetch 1,contr				/* lower byte of parameter length */
+	iadd timeup,timeup				/* parameter length stored in "timeup" */
+	bpatchx patch2b_6,mem_patch2b
+	copy contr,temp
+	arg 4,loopcnt
+	arg mem_sdp_handle_list,contw
+	call memset0
+	copy temp,contr 
+	deposit regb						/* PDUID  */
+	beq SDP_ERROR_RES,sdp_process_error_res
+	beq SDP_SEARCH_REQ,sdp_process_ss_req
+	beq SDP_SEARCH_RES,sdp_process_ss_res
+	beq SDP_ATTRIBUTE_REQ,sdp_process_sa_req
+	beq SDP_ATTRIBUTE_RES,sdp_process_sa_res
+	beq SDP_SEARCHATTRIB_REQ,sdp_process_ssa_req
+	beq SDP_SEARCHATTRIB_RES,sdp_process_ssa_res
+	branch sdp_insufficient_resource
+
+/**********************************************************************/
+/* ss_req			                              */
+/* Processing Service Search Request                                  */
+/* Call: ask_serviceclassid, empty_response                     */
+/*                                                                    */  
+/* Input:       mem_L2CAP_Rx_payload pointer in contr                 */
+/* Output:      mem_SDP_Tx_payload, mem_SDP_Tx_pkt_length	      */
+/*                                                                    */
+/**********************************************************************/     
+sdp_process_ss_req:
+	bpatchx patch2b_7,mem_patch2b
+	call ask_serviceclassid
+	compare 1,temp,0xff
+	branch ss_empty_rsp,true
+	compare 0xff,temp,0xff
+	branch sdp_invalid_request_syntax,true
+
+	ifetch 2,contr				/* max aservice record count */
+	store 2,mem_sdp_record_maxcnt
+	increase -2,timeup
+
+	increase -1,timeup				/* continuation state 1 byte (0) */
+	nbranch sdp_invalid_pdu_size,zero		/* invalid pdu size */
+	arg mem_sdp_uuid_search_ptr,timeup
+	ifetch 2,timeup
+	rtn blank
+	call search_all_uuid
+	call l2cap_get_sdp_tx_payload			/* put the pointer to Tx buffer  */
+	force 3,pdata						/* PDUID 3, Service Search Response */
+	istore 1,contw
+	fetch 2,mem_sdp_transactionid			/* write transaction id */
+	istore 2,contw
+	lshift2 queue,pdata
+	add pdata,5,pdata
+	add pdata,5,regc
+	byteswap pdata,pdata
+	istore 2,contw							/* write parLength */
+	deposit queue
+	byteswap pdata,pdata
+	istore 2,contw							/* write TotSrvRecCount */
+	istore 2,contw							/* write CurSrvRecCount */
+	arg mem_sdp_handle_list,contr
+	copy queue,loopcnt
+	branch ss_req_blank,zero
+ss_req_loop:	
+	ifetch 4,contr
+	istore 4,contw
+	loop ss_req_loop
+ss_req_blank:	
+	force 0,pdata
+	istore 1,contw							/* continuation state */
+	deposit regc
+	store 2,mem_sdp_tx_pkt_length
+//	branch assert,blank
+	rtn
+
+/**********************************************************************/
+/* sa_req			                              */
+/* Processing Service Attribute Request                               */
+/* Call: ask_attributeid, empty_response (if 3 stored attr.     */
+/* not asked) or answer_attributelist                              */  
+/* Input:       mem_L2CAP_Rx_payload pointer in contr                 */
+/* Output:      mem_SDP_Tx_payload, mem_SDP_Tx_pkt_length	      */
+/*                                                                    */
+/**********************************************************************/     
+sdp_process_sa_req:
+	bpatchx patch2c_0,mem_patch2c
+	ifetch 4,contr				/* service record handle */
+	store 4,mem_sdp_record_handle	 
+	increase -4,timeup
+	call sdp_store_maxbyte
+	store 2,mem_sdp_attribute_maxbyte
+	increase -2,timeup
+	call dataelementtype6		/* result: data size stored in rega */
+	branch sdp_invalid_request_syntax,zero
+	compare 5,rega,0xff  // length
+	//branch sa_req_all,true
+	branch sa_judge_wholerange,true
+sa_isnot_wholerange:
+	arg mem_sdp_attrib_list,contw
+	force 0,queue
+	branch sa_req_loop
+sa_judge_wholerange:
+	ifetch 1,contr
+	bne SDP_ATTRIBUTE_RANGE,sdp_invalid_request_syntax
+	ifetch 2,contr
+	nbranch sa_judge_wholerange_false1,blank
+	ifetch 1,contr
+	bne 0xff,sa_judge_wholerange_false2
+	ifetch 1,contr
+	bne 0xff,sa_judge_wholerange_false3		//also exist potential bug because mem_sdp_attrib_list length is only 7f
+	branch sa_req_all
+sa_judge_wholerange_false3:
+	increase -5,contr
+	branch sa_isnot_wholerange
+sa_judge_wholerange_false2:
+	increase -4,contr
+	branch sa_isnot_wholerange
+sa_judge_wholerange_false1:
+	increase -3,contr
+	branch sa_isnot_wholerange
+sa_req_loop:	
+	ifetch 1,contr
+	beq SDP_ATTRIBUTE_ID, sa_req_one_id
+	beq SDP_ATTRIBUTE_RANGE, sa_req_range
+sa_req_range:
+	ifetch 2, contr
+	istore 2, contw
+	increase 1,queue
+	byteswap pdata,regb
+	ifetch 2, contr
+	byteswap pdata,pdata
+sa_req_range_id_increase:	
+	increase 1, regb
+	isub regb, null
+	nbranch sa_req_range_id_finish,positive
+	copy pdata, regc
+	byteswap regb,pdata
+	istore 2, contw
+	increase 1,queue
+	copy regc, pdata
+	branch sa_req_range_id_increase
+sa_req_range_id_finish:
+	increase -5,timeup
+	increase -5,rega
+	branch sa_req_check_next_id
+sa_req_one_id:
+	ifetch 2,contr
+	istore 2,contw //save the attribute id in mem_sdp_attrib_list
+	increase 1,queue
+	increase -3,timeup
+	increase -3,rega
+sa_req_check_next_id:	
+	nbranch sdp_invalid_request_syntax,positive
+	nbranch sa_req_loop,zero //another attribute 
+	increase -1,timeup
+	nbranch sdp_invalid_request_syntax,zero
+	
+	call l2cap_get_sdp_tx_payload
+	increase 10,contw
+	arg mem_sdp_attrib_list,rega
+sa_req_handle_attributelist_next:
+	copy queue,pdata
+	branch sa_req_handle_attributelist_end,blank
+	ifetch 2,rega
+	branch sa_req_handle_attributelist_end,blank
+	iforce regb /* regb is the attribute ID */
+	fetch 4,mem_sdp_record_handle	
+	iforce temp
+	call search_handle_attrib
+	copy contr,pdata
+	branch sa_req_handle_attributelist_notfound,blank
+	increase -3,contr
+	ifetch 3,contr
+	istore 3,contw
+	call sdp_data_len
+	iforce loopcnt	
+	call memcpy
+sa_req_handle_attributelist_notfound:
+	increase 2,rega
+	increase -1, queue
+	branch sa_req_handle_attributelist_next
+
+sa_req_handle_attributelist_end:	
+	arg SDP_ATTRIBUTE_RES,rega
+	call ssa_req_range_lastfreg_common
+	fetch 2,mem_sdp_tx_pkt_length	
+	beq 11,sa_empty_rsp
+	branch  ssa_req_range_attrbutes_length_no_continue
+
+
+sdp_store_continue_common:
+	ifetch 1, contr
+	beq 0, sdp_store_continue_0byte
+	beq 1,sdp_store_continue_1byte
+	beq 2, sdp_store_continue_2byte
+sdp_store_continue_0byte:	
+	increase -1,timeup				/* continuation state byte (0) */
+	branch sdp_store_continue_end
+sdp_store_continue_1byte:
+	ifetch 1, contr
+	increase -2,timeup				/* continuation state byte (1) */
+	branch sdp_store_continue_end
+sdp_store_continue_2byte:
+	ifetch 2, contr
+	byteswap pdata,pdata
+	increase -3,timeup				/* continuation state byte (2) */
+sdp_store_continue_end:
+	store 2, mem_sdp_continue_byte	
+	rtn
+	
+sa_req_all:	
+	increase -5,timeup
+	call sdp_store_continue_common
+	nbranch sdp_invalid_pdu_size,zero
+	fetcht 4,mem_sdp_record_handle		
+	call search_handle
+	nbranch sdp_invalid_service_record_handle,zero
+	copy contr,rega
+	call l2cap_get_sdp_tx_payload
+	copy rega,contr
+	increase 3,contw//arg mem_SDP_Tx_payload+3,contw
+	copy contr,timeup //sdp start pointer
+	call sdp_get_data
+	copy pdata, rega //sdp total length
+//	fetchr regb,2,mem_sdp_continue_byte
+	fetch 2,mem_sdp_continue_byte
+	copy pdata,regb
+	copy rega,pdata
+	isub regb,regb //total_length - continue_byte in regb
+	fetch 2, mem_sdp_attribute_maxbyte
+	isub regb, null
+	nbranch sa_req_all_fragment_sdp, positive
+	// the last fragment
+	disable user
+	fetch 2, mem_sdp_continue_byte
+	branch sa_req_all_fisrt_fragment,blank
+	iadd timeup, contr //set the read pointer
+	increase 3,regb //include the total length field, 3 bytes
+	copy regb, loopcnt
+	copy loopcnt, pdata
+	increase 3, pdata
+	byteswap pdata,pdata
+	istore 2, contw
+	copy loopcnt, pdata
+	byteswap pdata,pdata
+	istore 2, contw
+	branch sa_req_all_answer_attributelist_full_loop
+sa_req_all_fisrt_fragment:
+	add rega,6,loopcnt
+	branch sa_req_all_parlength_continue_byte, user
+	byteswap loopcnt,pdata
+	branch sa_req_all_parlength_continue_byte_end
+sa_req_all_parlength_continue_byte:
+	copy loopcnt, pdata
+	increase 2, pdata
+	byteswap pdata,pdata
+sa_req_all_parlength_continue_byte_end:
+	istore 2,contw				/* ParLength */
+	increase -3,loopcnt
+	byteswap loopcnt,pdata			
+	istore 2,contw				/* AttrListByteCount */
+	copy timeup,contr
+	branch sa_req_all_answer_attributelist_full_loop
+sa_req_all_fragment_sdp:
+	enable user
+//	fetchr rega,2,mem_sdp_attribute_maxbyte
+	fetch 2,mem_sdp_attribute_maxbyte
+	copy pdata,rega
+	copy rega,loopcnt
+	fetch 2, mem_sdp_continue_byte
+	branch sa_req_all_fisrt_fragment,blank
+	iadd timeup, contr
+	copy rega,pdata
+	increase 5,pdata
+	byteswap pdata,pdata	
+	istore 2, contw
+	copy rega,pdata
+	byteswap pdata,pdata
+	istore 2, contw
+sa_req_all_answer_attributelist_full_loop:
+	call memcpy
+	nbranch sa_req_all_last_frag_continue, user
+	force 2,pdata
+	istore 1,contw
+	copy contr, pdata
+	isub timeup, pdata
+	byteswap pdata,pdata
+	istore 2, contw   // continuation length
+	branch sa_req_all_frag_end
+sa_req_all_last_frag_continue:
+	force 0,pdata
+	istore 1,contw
+sa_req_all_frag_end:	
+	arg SDP_ATTRIBUTE_RES,rega
+	branch ssa_req_range_common	
+	
+/**********************************************************************/
+/* ssa_req                          		      */
+/* Processing Service Search Attribute Request                        */
+/* Call: ask_serviceclassid, ask_attributeid, empty_response */
+/*       or answer_attributelist                                   */  
+/* Input:       contr                                                 */
+/* Output:      mem_SDP_Tx_payload, mem_SDP_Tx_pkt_length             */
+/*                                                                    */
+/**********************************************************************/     
+sdp_process_ssa_req:
+	bpatchx patch2c_1,mem_patch2c
+	call ask_serviceclassid
+	compare 0xff,temp,0xff
+	branch sdp_invalid_request_syntax,true
+	call sdp_store_maxbyte
+	store 2,mem_sdp_attribute_maxbyte
+	increase -2,timeup
+	call dataelementtype6
+	arg mem_sdp_attrib_list,contw
+	force 0,queue
+ssa_req_loop:	
+	ifetch 1,contr 
+	beq SDP_ATTRIBUTE_RANGE,ssa_req_range
+	ifetch 2,contr 
+	istore 2,contw //save the attribute id in mem_sdp_attrib_list
+	increase 1,queue
+	increase -3,timeup
+	increase -3,rega
+	nbranch sdp_invalid_request_syntax,positive
+	nbranch ssa_req_loop,zero
+	increase -1,timeup
+	nbranch sdp_invalid_request_syntax,zero
+	call l2cap_get_sdp_tx_payload
+	increase 13,contw//arg mem_SDP_Tx_payload+13,contw
+	fetch 2,mem_sdp_uuid_search_ptr
+	iforce regc
+	arg mem_sdp_attrib_list,rega
+ssa_req_attributelist_next:	
+	ifetch 2,rega
+	branch ssa_req_attributelist_end,blank
+	iforce regb						/* regb is the attribute ID */
+	call search_attrib
+	branch ssa_req_attributelist_notfound,blank
+	increase -3,contr
+	ifetch 3,contr
+	istore 3,contw
+	call sdp_data_len
+	iforce loopcnt	
+  	call memcpy
+ssa_req_attributelist_notfound:
+	increase 2,rega
+	branch ssa_req_attributelist_next
+
+ssa_req_attributelist_end:
+	call ssa_req_range_lastfreg
+	fetch 2,mem_sdp_tx_pkt_length	
+	beq 14,ssa_empty_rsp
+	call ssa_req_range_attrbutes_length_no_continue
+	branch ssa_req_range_attrbutes_length_no_continue
+
+
+sdp_store_maxbyte:	
+	ifetch 2,contr				 
+	byteswap pdata,pdata
+	increase -3,pdata	
+	arg 200,temp
+	isub temp,null
+	nrtn positive
+	setarg 200
+	rtn
+	
+
+ssa_req_range:
+	increase 4,contr
+	increase -5,timeup
+	increase -5,rega
+	nbranch sdp_invalid_request_syntax,zero
+	call 	sdp_store_continue_common
+	nbranch sdp_invalid_pdu_size,zero
+	arg mem_sdp_uuid_search_ptr,timeup
+	call search_all_uuid  
+	deposit queue
+	branch ssa_empty_rsp,blank
+	store 1,mem_handle_humber
+//	storer regb,2,mem_sdp_all_length
+	copy regb,pdata
+	store 2,mem_sdp_all_length
+	arg 0,queue
+	arg 0,rega
+	call l2cap_get_sdp_tx_payload
+	increase 10,contw 
+ssa_req_range_find_handle:
+	call ssa_req_range_get_length	
+	nbranch assert,user
+	copy contr,timeup
+	copy pdata,regc
+	iadd rega,rega
+//	copy pdata,rega 
+//	fetch 2,mem_sdp_all_length
+	fetch 2,mem_sdp_continue_byte
+	copy pdata,regb
+	branch ssa_req_range_first_freg,blank
+ssa_req_range_later_freg_with_continue:
+	copy rega,pdata
+	isub regb,regb //total_length - continue_byte in rega
+	branch ssa_req_range_next_handle,zero
+	nbranch ssa_req_range_next_handle,positive
+	fetch 2, mem_sdp_attribute_maxbyte
+	isub regb, null
+	branch ssa_req_range_maxbyte_with_continue,zero
+	nbranch ssa_req_range_maxbyte_with_continue, positive  
+	
+ // data length < =maxbyte 
+ssa_req_range_send_not_maxbyte:
+ 	copy regb,loopcnt
+	call ssa_req_range_maxbyte_with_continue_cpy
+ 	fetch 1,mem_handle_humber
+	increase 1,queue
+	isub queue,null
+	branch ssa_req_range_lastfreg,zero
+	branch ssa_req_range_freg_with_continue
+	
+ssa_req_range_maxbyte_with_continue:
+ 	copy pdata,loopcnt
+ 	call ssa_req_range_maxbyte_with_continue_cpy
+ 	branch ssa_req_range_freg_with_continue
+ 	
+ssa_req_range_maxbyte_with_continue_cpy:
+	increase -3,contw   
+	copy loopcnt,temp
+ 	copy regc,pdata
+	isub regb,pdata
+	iadd timeup,contr
+ 	branch memcpy
+
+ssa_req_range_next_handle:
+	fetch 1,mem_handle_humber
+	increase 1,queue
+	isub queue,null
+	rtn zero //
+	branch ssa_req_range_find_handle
+
+ssa_req_range_get_length:	
+	call disable_user
+	arg mem_sdp_handle_list,contr
+	lshift2 queue,pdata
+	iadd contr,contr
+	ifetcht 4, contr
+	call search_handle
+	nrtn zero
+	call sdp_data_len
+	branch enable_user
+
+ssa_req_range_first_freg:
+	fetch 2, mem_sdp_attribute_maxbyte
+	isub rega, null
+	nbranch ssa_req_range_firstfreg_maxbyte_with_continue,positive
+	copy rega,loopcnt
+	copy loopcnt,temp
+	copy timeup,contr
+	call memcpy
+	fetch 2,mem_sdp_all_length
+	isub rega,null
+	branch ssa_req_range_freg_no_continue,zero
+ssa_req_range_firstfreg_not_maxbyte_with_continue:
+	call ssa_req_range_freg_with_continue
+	branch ssa_req_range_attrbutes_length
+	
+ssa_req_range_freg_no_continue:
+	call ssa_req_range_lastfreg
+	branch ssa_req_range_attrbutes_length
+	
+ssa_req_range_lastfreg:
+	arg SDP_SEARCHATTRIB_RES,rega  //PUD ID
+ssa_req_range_lastfreg_common:
+	force 0,pdata
+	istore 1,contw
+	call ssa_req_range_common
+	fetcht 2,mem_sdp_tx_pkt_length
+	increase -5,temp
+	byteswap temp,pdata
+	istore 2, contw
+	increase -3,temp
+	byteswap temp,pdata
+	istore 2, contw  //attribute length
+	rtn
+
+ssa_req_range_firstfreg_maxbyte_with_continue:
+	copy pdata,loopcnt
+	copy loopcnt,temp
+	copy timeup,contr
+	call memcpy
+	call ssa_req_range_freg_with_continue
+ssa_req_range_attrbutes_length:	
+	setarg 0x36
+	istore 1,contw
+	fetch 2,mem_sdp_all_length
+	byteswap pdata,pdata
+	istore 2, contw 
+	rtn	
+
+ssa_req_range_attrbutes_length_no_continue:	
+	setarg 0x36
+	istore 1,contw
+	increase -3,temp
+	byteswap temp,pdata
+	istore 2, contw 
+	rtn	
+
+ssa_req_range_freg_with_continue:
+	arg SDP_SEARCHATTRIB_RES,rega  //PUD ID
+	setarg 2
+	istore 1,contw	
+	fetch 2,mem_sdp_continue_byte
+	iadd temp,temp
+	byteswap temp,pdata
+	istore 2,contw
+	call ssa_req_range_common
+	fetcht 2,mem_sdp_tx_pkt_length
+	increase -5,temp
+	byteswap temp,pdata
+	istore 2, contw
+	increase -5,temp
+	byteswap temp,pdata
+	istore 2, contw 
+	rtn	
+
+ssa_req_range_common:
+	fetch 2,mem_sdp_tx_payload_ptr
+	isub contw,pdata
+	sub pdata,0,pdata
+	store 2,mem_sdp_tx_pkt_length
+	call l2cap_get_sdp_tx_payload 
+	copy rega,pdata  //PUD ID
+	istore 1,contw
+	fetch 2,mem_sdp_transactionid
+	istore 2,contw
+	rtn
+
+
+
+
+/**********************************************************************/
+/* ssa_res			                      */
+/* Processing Service Search Attribute Response                       */
+/* Call: dataelementtype6, attribute_reading                    */
+/* Input:       contr                                                 */
+/* Output:      mem_sdp_record_handle,mem_sdp_search_failed           */
+/*                                                                    */
+/**********************************************************************/     
+sdp_process_ssa_res:
+sdp_process_ss_res:
+sdp_process_sa_res:
+sdp_process_error_res:
+	rtn
+/*
+sdp_process_ss_res:
+	bpatchx patch2c_2,mem_patch2c
+	ifetch 2,contr
+	ifetch 2,contr
+	byteswap pdata,pdata
+	bne 1,assert
+	ifetch 4,contr
+	store 4,mem_sdp_record_handle
+	fetchr regc,2,mem_sdp_l2capch_ptr
+	add regc,offset_lc_state,regc
+	ifetch 1,regc
+	set1 L2CAP_CHANNEL_STATE_RECV_SEARCH_RES,pdata
+	istore 1,regc
+	rtn
+	
+sdp_process_sa_res:
+	bpatchx patch2c_3,mem_patch2c
+	fetchr regc,2,mem_sdp_l2capch_ptr
+	add regc,offset_lc_state,regc
+	ifetch 1,regc
+	set1 L2CAP_CHANNEL_STATE_RECV_ATTRIB_RES,pdata
+	istore 1,regc
+	copy temp,contr
+	ifetch 2,contr
+	call search_rfcomm_cn
+	store 1,mem_profile_channel	
+	rtn
+*/
+
+				    
+
+sdp_invalid_service_record_handle:		
+	setarg 0x0200
+	store 2,mem_sdp_error_code
+	branch sdp_error_response
+sdp_invalid_pdu_size:				
+	setarg 0x0400
+	store 2,mem_sdp_error_code
+	branch sdp_error_response
+sdp_insufficient_resource:			
+	setarg 0x0600
+	store 2,mem_sdp_error_code
+	branch sdp_error_response
+sdp_invalid_request_syntax:			
+	setarg 0x0300
+	store 2,mem_sdp_error_code
+sdp_error_response:	
+	call l2cap_get_sdp_tx_payload
+	istore 1,contw
+	fetch 2,mem_sdp_transactionid			
+	istore 2,contw
+	setarg 0x0200					
+	istore 2,contw
+	fetch 2,mem_sdp_error_code			
+	istore 2,contw
+	jam  7,mem_sdp_tx_pkt_length
+	rtn
+
+
+//store uuid in mem_sdp_uuid_search_ptr,
+//return temp 0xff if wrong 
+ask_serviceclassid:  
+	arg 0,regb
+	force 0,temp					/* use "temp" to mark syntax error or to mark 128 bit uuid */
+	arg mem_sdp_uuid_search_ptr,contw
+	call dataelementtype6
+	branch asksrv_error,zero
+classidloop:
+	increase 1,regb
+	ifetch 1,contr
+	increase -1,rega
+	increase -1,timeup
+	compare 0x18,pdata,0xf8			/* 5 MSB: b00011: uuid */
+	nbranch asksrv_error,true
+	compare 0x04,pdata,0x07			/* 3 LSB: b100 128 bits uuid */
+	nbranch cmp032,true
+	force 1,temp					/* mark it as 128 bit uuid */
+skip2bytes:
+	ifetch 1,contr
+	increase -1,rega	
+	increase -1,timeup
+	bne 0x00, frstbwrong
+	ifetch 1,contr
+	increase -1,rega	
+	increase -1,timeup
+	beq 0x00, cmpuuid
+	branch scndbwrong
+frstbwrong:  
+	increase 1,contr
+	increase -1,rega	
+	increase -1,timeup
+scndbwrong:  
+	increase 2,contr				/* skip 2 bytes, first 2 bytes already wrong */
+	increase -2,rega	
+	increase -2,timeup
+	compare 0x00,temp,0xff                        /* 128 bits or 32 bits ? */
+	branch loopornot,true
+	increase 12,contr				/* skip 12 bytes, first 2 bytes already wrong */
+	increase -12,rega	
+	increase -12,timeup
+	branch loopornot
+cmp032:
+	compare 0x02,pdata,0x07			/* 3 LSB: b010 32 bits uuid */
+	nbranch cmp016,true
+	branch skip2bytes			
+cmp016:
+	compare 0x01,pdata,0x07			/* 3 LSB: b001 16 bit uuid */
+	nbranch asksrv_error,true
+cmpuuid:
+	increase -2,rega
+	increase -2,timeup
+	ifetch 2,contr				/* higher order byte */
+	sub regb,4,null
+	branch uuidsize,zero //max store uuids =3 
+	istore 2,contw
+uuidsize:
+	compare 0x00,temp,0xff			/* is this 128 bits uuid */
+	branch loopornot,true
+	copy contr,temp
+	ifetch 1,contr
+	bne 0x00, wrong12b
+	ifetch 1,contr
+	bne 0x00, wrong12b
+	ifetch 1,contr
+	bne 0x10, wrong12b
+	ifetch 1,contr
+	bne 0x00, wrong12b
+	ifetch 1,contr
+	bne 0x80, wrong12b
+	ifetch 1,contr
+	bne 0x00, wrong12b
+	ifetch 1,contr
+	bne 0x00, wrong12b
+	ifetch 1,contr
+	bne 0x80, wrong12b
+	ifetch 1,contr
+	bne 0x5f, wrong12b
+	ifetch 1,contr
+	bne 0x9b, wrong12b
+	ifetch 1,contr
+	bne 0x34, wrong12b
+	ifetch 1,contr
+	beq 0xfb, chck12dn
+wrong12b:
+	copy temp,contr  
+wrong12b1:
+	increase 12,contr				/* skip 12 bytes */
+	force 0x00,queue
+	force 0x00,temp
+	branch chck12dn
+
+chck12dn:
+	increase -12,timeup
+	increase -12,rega
+loopornot:
+	force 0x00,temp
+	compare 0x00,rega,0xff
+	nbranch classidloop,true
+	force 0,pdata
+	istore 2,contw			/* end list with null */
+	rtn
+asksrv_error:
+	arg 0xff,temp
+	rtn
+
+/**********************************************************************/
+/* Subroutine: dataelementtype6                                    */
+/* Parse Data Element Sequence, obtain the data size                  */
+/* Input:  SDP Rx Buf Pointer in contr, parameter count in timeup     */
+/* Output: data length in rega, data pointer in contr             */
+/*         and  parameter count in timeup, return with zero flag set: */
+/*         syntax error                                               */
+/**********************************************************************/     
+dataelementtype6:
+	bpatchx patch2c_4,mem_patch2c
+	ifetch 1,contr
+	increase -1,timeup
+	compare 0x30,pdata,0xf8			/* 5 MSB: b00110: type 6 */
+	nbranch dsize_error,true
+	compare 0x07,pdata,0x07			/* 3 LSB: b111: 32 bits */
+	branch dsize32,true
+	compare 0x06,pdata,0x07			/* 3 LSB: b110: 16 bits */
+	branch dsize16,true
+	compare 0x05,pdata,0x07			/* 3 LSB: b101: 8 bits */
+	nbranch dsize_error,true
+//	ifetchr rega,1,contr				/* data length in reg A */
+	ifetch 1,contr
+	copy pdata,rega
+	increase -1,timeup
+	branch dsize
+dsize32:
+	increase 2,contr				 
+	increase -2,timeup
+dsize16:
+	ifetch 2,contr
+	byteswap pdata,rega
+	increase -2,timeup
+dsize:
+	force 0x01,pdata
+	rtn
+dsize_error:
+	force 0x00,pdata
+	rtn
+
+/**********************************************************************/
+/* Subroutine: sa_empty_rsp                                      */
+/* Send empty response                                                */
+/*                                                                    */
+/* Input:       mem_sdp_pduid, mem_sdp_transactionid                  */
+/* Output:      mem_SDP_Tx_payload, mem_SDP_Tx_pkt_length             */
+/*                                                                    */
+/**********************************************************************/     
+ss_empty_rsp:
+	setarg SDP_SEARCH_RES
+	store 1, mem_sdp_pduid
+	branch empty_response
+sa_empty_rsp:
+	setarg SDP_ATTRIBUTE_RES
+	store 1, mem_sdp_pduid
+	branch empty_response
+ssa_empty_rsp:
+	setarg SDP_SEARCHATTRIB_RES
+	store 1, mem_sdp_pduid
+empty_response:
+	call l2cap_get_sdp_tx_payload			/* empty attribute list */
+//	fetchr regb,1,mem_sdp_pduid				/* PDUID */
+//	istorer regb,1,contw
+	fetch 1,mem_sdp_pduid
+	copy pdata,regb
+	istore 1,contw 
+	fetch 2,mem_sdp_transactionid			/* copy back transaction id */
+	istore 2,contw
+	setarg 0x0500
+	istore 2, contw
+	compare SDP_ATTRIBUTE_RES,regb,0xff			 
+	branch fullsearch,true
+	compare SDP_SEARCHATTRIB_RES,regb,0xff			 
+	branch fullsearch,true
+	setarg 0x000000
+	istore 5,contw
+	branch outempty
+
+fullsearch:					/* pduid must be 5 or 7 */
+	setarg 0x350200
+	istore 5,contw
+outempty:
+	jam 10,mem_sdp_tx_pkt_length
+	rtn
+
+//return length in pdata(whole element ,include header and data ), contr not change
+sdp_data_len:
+	call store_contw
+	call store_contr
+	call sdp_get_data
+	call get_contw
+	call get_contr
+	copy temp,pdata
+	rtn
+
+//return data length in pdata, contr is data pionter,return length in temp(whole element ,include header and data )
+sdp_get_data:
+	ifetch 1,contr
+	and pdata,0x7,loopcnt
+	rshift3 pdata,pdata
+	bne 0,sdp_get_data_type_not0
+sdp_get_data_type0:	
+	force 1,pdata
+	force 1,temp
+	rtn
+	
+sdp_get_data_type_not0_sizeindex01234:
+	call left_shift_n
+	add pdata,1,temp  //add header length
+	rtn
+sdp_get_data_type_not0:
+	deposit loopcnt
+	sub pdata,4,null
+	branch sdp_get_data_type_not0_sizeindex01234,positive
+	beq 5,sdp_get_data_type_not0_sizeindex5
+	beq 6,sdp_get_data_type_not0_sizeindex6
+	beq 7,sdp_get_data_type_not0_sizeindex7
+	rtn
+	
+sdp_get_data_type_not0_sizeindex5:
+	ifetch 1,contr
+	add pdata,2,temp  //add header length
+	rtn
+sdp_get_data_type_not0_sizeindex6:
+	ifetch 2,contr
+	byteswap pdata,pdata
+	add pdata,3,temp  //add header length
+	rtn
+sdp_get_data_type_not0_sizeindex7:
+	ifetch 2,contr	
+	byteswap pdata,pdata
+	ifetcht 2,contr	
+	byteswap temp,temp
+	lshift16 temp,temp
+	iadd temp,pdata
+	add pdata,5,temp  //add header length
+	rtn
+
+/* find with uuids
+input uuids pionter in timeup
+return handles in mem_sdp_handle_list; handles number in queue if found 
+return regb all length*/
+search_all_uuid:
+	bpatchx patch2c_5,mem_patch2c
+	force 0,queue
+	arg 0,regb
+	arg mem_sdp_handle_list,contw
+search_all_uuid_llop:
+	ifetch 2,timeup
+ 	rtn blank
+	call search_uuid
+	copy queue,pdata
+	rtneq SDP_MAX_HANDLE_NUMBER 
+	increase 2,timeup
+ 	branch search_all_uuid_llop
+	
+search_uuid:
+//	arg 0,regb
+	iforce regc
+//	force 0,queue
+	fetch 2, mem_ui_uuid_table
+	iforce contr
+search_uuid_next:
+	copy queue,pdata
+	rtneq SDP_MAX_HANDLE_NUMBER   
+	disable user
+	ifetch 1,contr
+	rtn blank
+	iforce loopcnt
+search_uuid_loop:	
+	ifetch 2,contr
+	isub regc,null
+	nbranch search_uuid_not_found,zero
+	enable user					// uuid match
+search_uuid_not_found:
+	loop search_uuid_loop
+	ifetcht 4,contr					// get handle 
+	copy contr,rega
+	nbranch search_uuid_nomatch,user
+	arg mem_sdp_handle_list,contr
+	arg SDP_MAX_HANDLE_NUMBER,loopcnt 
+search_uuid_check_same_handle:
+	ifetch 4,contr
+	branch search_uuid_store_handle,blank
+	isub temp,null
+	branch search_uuid_nomatch,zero
+	loop search_uuid_check_same_handle
+	rtn 
+search_uuid_store_handle:
+	istoret 4,contw
+	increase 1,queue
+	copy rega,contr
+	call sdp_data_len
+	iadd regb,regb
+	iadd contr,contr		 
+	branch search_uuid_next
+search_uuid_nomatch:	
+	copy rega,contr
+	call sdp_get_data
+	iadd contr,contr			// next paragraph 
+	branch search_uuid_next
+
+/* temp is handle,
+return zero  if found
+return data pointer in contr 
+*/
+search_handle:
+	bpatchx patch2c_6,mem_patch2c
+	fetch 2,mem_ui_uuid_table
+	iforce contr
+search_handle_loop:	
+	ifetch 1,contr
+	branch disable_zero,blank
+	lshift pdata,pdata
+	iadd contr,contr
+	ifetch 4,contr
+	isub temp,null
+	rtn zero
+	deposit contw
+	store 2,mem_contw
+	storet 8,mem_temp
+	call sdp_get_data
+	iadd contr,contr
+	copy contr,pdata
+	fetcht 2,mem_contw
+	copy temp,contw
+	fetcht 8,mem_temp
+	copy pdata,contr
+	branch search_handle_loop
+
+/**
+* input regb and regc.regb is the attribute ID and regc is UUID.
+* set contr if find attribute or 0 if not
+*/
+search_attrib:
+	bpatchx patch2c_7,mem_patch2c
+	fetch 2,mem_ui_uuid_table
+	iforce contr
+search_attrib_next:
+	ifetch 1,contr
+	branch search_attrib_end, blank
+	iforce loopcnt
+search_attrib_loop:	
+	ifetch 2,contr
+	isub regc,null						/* regc is UUID, compare it */
+	branch search_attrib_found_uuid,zero
+	loop search_attrib_loop
+	increase 4,contr
+	call sdp_get_data
+	iadd contr,contr			/* next paragraph */
+	branch search_attrib_next	
+search_attrib_found_uuid:
+	increase -1,loopcnt
+	lshift loopcnt,pdata
+	iadd contr,contr
+	increase 4,contr
+	call sdp_get_data
+	iadd contr,timeup					/* attribute list end */
+search_attrib_loop_attribs:	
+	increase 1,contr
+	ifetch 2,contr
+	isub regb,null
+	//force 0x1,pdata,zero
+//	setflag zero, 0,pdata
+//	copy timeup, timeup
+	branch disable_blank,zero			/* attribute found */
+	call sdp_data_len
+	iadd contr,contr
+	deposit timeup
+	isub contr,null
+	branch search_attrib_end, zero /*attribute end, not found the attribute, return contr = 0*/
+	branch search_attrib_loop_attribs	
+search_attrib_end:
+	force 0,contr
+	force 0,pdata
+	rtn
+	
+
+//search the attribute according the record handle
+//record handle in temp, attribute in regb
+//set the contr to zero if not found
+search_handle_attrib:	
+	bpatchx patch2d_0,mem_patch2d
+	fetch 2,mem_ui_uuid_table
+	iforce contr
+search_handle_attrib_next:
+	ifetch 1,contr
+	branch search_handle_attrib_end, blank
+	lshift pdata,pdata
+	iadd contr, contr
+	ifetch 4,contr
+	isub temp,null						/* regc is UUID, compare it */
+	branch search_handl_attrib_found_handle,zero
+	call sdp_get_data
+	iadd contr,contr			/* next paragraph */
+	branch search_handle_attrib_next	
+search_handl_attrib_found_handle:
+	call sdp_get_data
+	iadd contr,timeup					/* attribute list end */
+search_handle_attrib_loop_attribs:	
+	increase 1,contr
+	ifetch 2,contr
+	isub regb,null
+	rtn zero							/* attribute found */
+	call sdp_data_len
+	iadd contr,contr
+	deposit timeup
+	isub contr,null
+	branch search_handle_attrib_end, zero /*attribute end, not found the attribute, return contr = 0*/
+	branch search_handle_attrib_loop_attribs
+search_handle_attrib_end:
+	force 0,contr
+	rtn	
+
+
+//enable user if find rfcomm channel number, pdata is channel number
+search_rfcomm_cn:
+	arg 0x0400,regb  // attribute protocol edscriptor list
+	call search_handl_attrib_found_handle
+	arg 0x0300,regb  // uuid rfcomm
+	call search_uuid_in_data
+	nrtn user
+	sub rega,3,null
+	branch disable_user,positive
+	ifetch 1,contr
+	bne 0x08,disable_user
+	ifetch 1,contr
+	rtn
+	
+ //input timeup is lenth
+ //input contr is data ptr
+ //return contr is end of uuid; enable user if found uuid
+search_uuid_in_data:
+	bpatchx patch2d_1,mem_patch2d
+	call sdp_get_data
+	copy pdata,rega
+search_uuid_in_data_loop:	
+	ifetch 1,contr
+	and pdata,0x7,loopcnt
+	rshift3 pdata,pdata
+	sub pdata,3,null
+	branch search_uuid_in_data_found_uuid,zero
+	copy loopcnt,pdata
+	beq 5,search_uuid_in_data_found_element_index5
+	beq 6,search_uuid_in_data_found_element_index6
+	beq 7,search_uuid_in_data_found_element_index7
+	increase -1,contr
+	call sdp_get_data
+	iadd contr,contr
+	copy rega,pdata
+	isub temp,rega
+	branch disable_user,zero
+	branch search_uuid_in_data_loop
+	
+search_uuid_in_data_found_element_index5:
+	increase -2,rega
+	increase 1,contr
+	branch search_uuid_in_data_loop
+search_uuid_in_data_found_element_index6:
+	increase -3,rega
+	increase 2,contr
+	branch search_uuid_in_data_loop
+search_uuid_in_data_found_element_index7:
+	increase -5,rega
+	increase 4,contr
+	branch search_uuid_in_data_loop		
+	
+search_uuid_in_data_found_uuid:
+	increase -1,rega
+	copy loopcnt,pdata
+	beq 1,search_uuid_in_data_type_uuid_16
+	beq 2,search_uuid_in_data_type_uuid_32
+	beq 4,search_uuid_in_data_type_uuid_128
+	branch disable_user 
+search_uuid_in_data_type_uuid_128:
+	increase -12,rega
+search_uuid_in_data_type_uuid_32:
+	ifetch 2,contr
+	increase -2,rega
+search_uuid_in_data_type_uuid_16:
+	ifetch 2,contr
+	isub regb,null
+	branch enable_user,zero
+	increase -2,rega
+	branch disable_user,zero
+	branch search_uuid_in_data_loop
+
+/*
+//rega:l2cap len ,mem_search_uuid:uuid to search
+sdp_send_search_req:
+	call l2cap_malloc_sdp_req
+	setarg SDP_SEARCH_REQ
+	istore 1,contw
+	fetch 2,mem_sdp_transactionid_local
+	byteswap pdata,pdata
+	istore 2,contw
+	increase -5,rega
+	byteswap rega,rega
+	//istorer rega,2,contw
+	copy rega,pdata
+	istore 2,contw
+	setarg 0x0335
+	istore 2,contw
+	setarg 0x19
+	istore 1,contw
+	fetch 2,mem_search_uuid
+	istore 2,contw
+	setarg 0x0008
+	istore 2,contw
+	setarg 0
+	istore 1,contw
+	rtn
+
+//rega:l2cap len
+sdp_send_attribute_req:
+	call l2cap_malloc_sdp_req
+	setarg SDP_ATTRIBUTE_REQ
+	istore 1,contw
+	fetch 2,mem_sdp_transactionid_local
+	byteswap pdata,pdata
+	istore 2,contw
+	increase -5,rega
+	byteswap rega,rega
+//	istorer rega,2,contw
+	copy rega,pdata
+	istore 2,contw
+	fetch 4,mem_sdp_record_handle
+	istore 4,contw
+	setarg 0x2c01
+	istore 2,contw
+	setarg 0x0535
+	istore 2,contw
+	setarg 0x0a
+	istore 1,contw
+	setarg 0
+	istore 2,contw
+	setarg -1
+	istore 2,contw
+	setarg 0
+	istore 1,contw
+	rtn
+*/	
+	
+
+sdp_send_spp_request:
+	call l2cap_get_sdp_tx_payload
+	copy pdata,contw
+	setarg 6//Search Attr Req
+	istore 1,contw
+	setarg sdp_tid_spp					
+	istore 2,contw
+	setarg 0x0f00 //length15
+	istore 2,contw
+	setarg 0x1a0535
+	istore 3,contw
+	setarg 0x0111
+	lshift16 pdata,pdata //UUID
+	istore 4,contw
+	setarg 0x2600 //max return len
+	istore 2,contw
+	setarg 0x0335
+	istore 2,contw
+	setarg 0x0009
+	istore 2,contw
+	setarg 0x0004
+	istore 2,contw
+	jam 0x14,mem_sdp_tx_pkt_length
+	rtn
+
Index: mouse_public_3mode_usb/program/security.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/security.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/security.prog	(working copy)
@@ -0,0 +1,2063 @@
+
+ifdef SECURE_CONNECTION
+	
+function_g2:
+	bpatchx patch2d_2,mem_patch2d
+	jam 80,mem_AES_CMAC_data_length
+	arg memdat,contw
+	arg mem_le_srand,contr
+	call memcpy16
+	arg mem_sc_pubkey_local_x_256,contr
+	call memcpy32
+	arg mem_le_pubkey_remote_x_256,contr
+	call memcpy32
+	call inverse_memdat	
+	arg mem_le_mrand,contr
+	call store_inverse_k	
+	call function_AES_CMAC	
+
+	arg mem_AES_CMAC_temp,contw
+	call load_inverse_result
+	setarg 1000000
+	copy pdata,rega
+	fetch 4,mem_AES_CMAC_temp
+	idiv rega
+	call wait_div_end
+	remainder pdata
+	store 4,mem_gkey
+//call ice_break
+	rtn
+
+function_f6_eb:
+	jam 65,mem_AES_CMAC_data_length
+	arg memdat,contw
+	call store_addr_common_a
+	call store_addr_common_b
+	fetch 3,mem_le_pres+1
+	istore 3,contw
+//	arg mem_le_r,contr
+//	call memcpy16	
+	call get_r
+	
+	arg mem_le_mrand,contr
+	call memcpy16
+	arg mem_le_srand,contr
+	call memcpy16
+	call inverse_memdat
+	arg mem_le_mackey ,contr
+	arg mem_AES_CMAC_k,contw
+	call memcpy16
+//	call p_store_inverse_k	
+	branch function_AES_CMAC
+//	arg mem_AES_CMAC_temp,contw
+//	branch p_load_inverse_result
+
+get_r:
+	fetch 4,mem_le_tk
+	istore 4,contw
+	call memset0_4
+	branch memset0_8
+
+function_f6_ea:
+	bpatchx patch2d_3,mem_patch2d
+	jam 65,mem_AES_CMAC_data_length
+	arg memdat,contw
+	call store_addr_common_b
+	call store_addr_common_a
+	fetch 3,mem_le_preq+1
+	istore 3,contw
+//	arg mem_le_r,contr
+//	call memcpy16	
+	call get_r
+	arg mem_le_srand,contr
+	call memcpy16
+	arg mem_le_mrand,contr
+	call memcpy16
+	call inverse_memdat
+	arg mem_le_mackey ,contr
+	arg mem_AES_CMAC_k,contw
+	call memcpy16
+//	call p_store_inverse_k	
+	call function_AES_CMAC
+	arg mem_AES_CMAC_temp,contw
+	branch load_inverse_result
+
+function_f5:
+	jam 32,mem_AES_CMAC_data_length
+	arg mem_le_dhkey_256 ,contr
+	arg memdat,contw
+	call memcpy32
+	call inverse_memdat
+	arg mem_le_slat,contr
+	call store_inverse_k	
+	call function_AES_CMAC
+	arg mem_AES_CMAC_k,contw
+	call store_aes_result
+	arg 1,temp
+	call function_f5_common
+	arg mem_le_ltk,contw
+	call load_inverse_result
+	arg 0,temp
+	call function_f5_common
+	arg mem_le_mackey,contw
+//	branch p_load_inverse_result
+	branch store_aes_result
+
+
+function_f5_common:
+	bpatchx patch2d_4,mem_patch2d
+	jam 53,mem_AES_CMAC_data_length
+	setarg 0x100
+	store 2,memdat
+	call store_addr_common_b
+	call store_addr_common_a
+	arg mem_le_srand,contr
+	call memcpy16
+	arg mem_le_mrand,contr
+	call memcpy16
+//	fetch 4,mem_le_keyid 0x62746c65
+	setarg 0x6c65
+	istore 2,contw
+	setarg 0x6274
+	istore 2,contw
+	istoret 1,contw   //counter
+	call inverse_memdat	
+	branch function_AES_CMAC
+
+store_addr_common_b:
+	fetch 6,mem_le_lap
+	istore 6,contw
+	fetch 1,mem_le_conn_own_addr_type
+	istore 1,contw
+	rtn
+
+store_addr_common_a:
+	fetch 6,mem_le_plap
+	istore 6,contw
+//	setarg 0x2dcfc1
+//	istore 3,contw
+//	setarg 0xa71370
+//	istore 3,contw
+	fetch 1,mem_le_conn_peer_addr_type
+	istore 1,contw
+	rtn
+
+function_f4_ca:
+	jam 65,mem_AES_CMAC_data_length
+	fetch 1,mem_passkey_1bit
+	store 1,memdat
+	arg mem_sc_pubkey_local_x_256,contr
+	call memcpy32
+	arg mem_le_pubkey_remote_x_256,contr
+	call memcpy32
+	call inverse_memdat
+	arg mem_le_mrand,contr
+	call store_inverse_k	
+	branch function_AES_CMAC
+	
+
+function_f4_cb:
+	jam 65,mem_AES_CMAC_data_length
+	fetch 1,mem_passkey_1bit
+	store 1,memdat
+	arg mem_le_pubkey_remote_x_256,contr
+	call memcpy32
+	arg mem_sc_pubkey_local_x_256,contr
+	call memcpy32
+	call inverse_memdat
+	arg mem_le_srand,contr
+	call store_inverse_k	
+	branch function_AES_CMAC
+
+function_AES_CMAC:
+	bpatchx patch2d_5,mem_patch2d
+	call function_AES_CMAC_Generate_Subkey
+//call ice_break
+//	jam 65,mem_AES_CMAC_data_length
+//call ice_break
+	fetch 1,mem_AES_CMAC_data_length
+	copy pdata,temp
+function_ceil16:
+	increase 15,pdata
+	rshift4 pdata,pdata
+	copy pdata,regb
+	branch function_AES_CMAC_set_flag_0_balnk,blank
+	and temp,0x0f,pdata
+	nbranch function_AES_CMAC_set_flag_0,blank
+//	flag =1;
+	arg mem_AES_CMAC_k1,regc
+	arg memdat,pdata
+	increase -16,pdata
+//	iadd temp,pdata
+//	isub rega,rega
+	iadd temp,rega	
+	arg mem_AES_CMAC_M_last,contw
+	arg 4,loopcnt	
+	call xor_loop
+//call ice_break
+//	arg mem_f4_k1,contr
+//	call load_key
+	branch function_AES_CMAC_aes
+
+function_AES_CMAC_set_flag_0_balnk:
+	arg 1,regb
+	arg 0,rega
+//	arg mem_f4_test_data,pdata
+	branch function_AES_CMAC_set_flag_0_common
+//call ice_break
+
+function_AES_CMAC_set_flag_0:
+//	flag = 0;
+	and temp,0x0f,rega
+function_AES_CMAC_set_flag_0_common:
+	arg memdat,pdata
+	iadd temp,pdata
+	isub rega,contr
+//call ice_break
+	arg mem_AES_CMAC_temp,contw
+	call function_AES_CMAC_padding
+//call ice_break
+	arg mem_AES_CMAC_k2,regc
+	arg mem_AES_CMAC_temp,rega
+	arg mem_AES_CMAC_M_last,contw
+	arg 4,loopcnt	
+	call xor_loop	
+//call ice_break
+
+//	arg mem_f4_k2,contr
+//	call load_key
+
+//	branch p_function_f4_aes
+function_AES_CMAC_aes:
+//	arg mem_f4_k,contr
+//	call load_key
+//	arg mem_AES_CMAC_xor,contr
+//	call load_data128
+	call aes_clear_data
+	call aes_init	
+//	arg mem_f4_k,contr
+//	call load_key
+	arg memdat,contr
+function_AES_CMAC_aes_loop:
+//generate_mic_loop:
+	increase -1,regb
+	deposit regb
+	branch function_AES_CMAC_aes_loop_end,blank
+	call load_data128
+	call do_aes_cbc
+	branch function_AES_CMAC_aes_loop
+//generate_mic_end:
+function_AES_CMAC_aes_loop_end:	
+	arg mem_AES_CMAC_temp,contw
+	call store_aes_result
+	arg mem_AES_CMAC_M_last,contr
+	call load_data128
+	call aes_init	
+	arg mem_AES_CMAC_temp,contr
+	call load_data128	
+	branch do_aes_cbc
+
+
+
+load_inverse_result:
+//	arg mem_AES_CMAC_temp,contw
+	copy contw,rega
+	call store_aes_result
+//	arg mem_AES_CMAC_temp,rega
+	arg 16,loopcnt
+	branch inverse_data
+	
+store_inverse_k:
+	arg mem_AES_CMAC_k,contw
+	call memcpy16
+inverse_k:	
+	arg 16,loopcnt
+	arg mem_AES_CMAC_k,rega	
+	branch inverse_data
+	
+inverse_memdat:
+	fetch 1,mem_AES_CMAC_data_length
+	copy pdata,loopcnt
+	arg memdat,rega
+	branch inverse_data
+
+bn_lshift_0_inverse:
+	ifetch 1,rega
+	lshift pdata,pdata
+	isolate1 0,regc
+	setflag true,0,pdata	
+	isolate1 8,pdata
+	setflag true,0,regc	
+	istore 1,rega
+         increase -1,rega
+	loop bn_lshift_0_inverse
+	rtn	
+
+function_AES_CMAC_k1_inverse:
+	arg mem_AES_CMAC_k1,rega
+function_AES_CMAC_inverse_common:
+	increase 15,rega
+	force 16,loopcnt
+	force 0,regc
+	branch  bn_lshift_0_inverse	
+
+function_AES_CMAC_k2_inverse:
+	arg mem_AES_CMAC_k2,rega
+	branch function_AES_CMAC_inverse_common
+	
+
+function_AES_CMAC_Generate_Subkey:
+	arg mem_AES_CMAC_k,contr
+	call load_key
+//	arg mem_AES_CMAC_xor,contr
+//	call aes_load_xor
+	force regidx_xor,regext_index
+	call aes_clear
+	call aes_clear_data
+	call do_aes_ocb
+	
+//	force 0x38,aes_ctrl
+//	force 0x0,aes_ctrl
+//	call wait_aes
+	arg mem_AES_CMAC_k1,contw
+	call store_aes_result
+function_AES_CMAC_k1:
+	bpatchx patch2d_6,mem_patch2d
+	fetch 1,mem_AES_CMAC_k1
+	isolate1 7,pdata
+	nbranch function_AES_CMAC_k1_0,true	
+	call function_AES_CMAC_k1_inverse
+	
+//p_function_f4_k1_xor:
+	arg mem_AES_CMAC_k1,regc
+//	arg mem_AES_CMAC_rb,rega
+	arg mem_AES_CMAC_k1,contw
+//	arg 3,loopcnt
+//	call xor_loop
+	call function_AES_CMAC_xor_rb
+	branch function_AES_CMAC_k2
+function_AES_CMAC_k1_0:	
+	call function_AES_CMAC_k1_inverse
+function_AES_CMAC_k2:
+//call ice_break
+	arg mem_AES_CMAC_k1,contr
+	arg mem_AES_CMAC_k2,contw
+	call memcpy16
+	fetch 1,mem_AES_CMAC_k2
+	isolate1 7,pdata
+	nbranch function_AES_CMAC_k2_inverse,true		
+	call function_AES_CMAC_k2_inverse
+//p_function_f4_k2_xor:
+	arg mem_AES_CMAC_k2,regc
+//	arg mem_AES_CMAC_rb,rega
+	arg mem_AES_CMAC_k2,contw
+//	arg 3,loopcnt
+//	branch xor_loop	
+
+
+//rb:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87 
+function_AES_CMAC_xor_rb:
+	arg 3,loopcnt
+function_AES_CMAC_xor_rb_loop:	
+	arg 0,temp
+	call function_AES_CMAC_xor_loop_common	
+	increase 4,regc
+	loop  function_AES_CMAC_xor_rb_loop
+	arg 0x8700,temp
+	lshift16 temp,temp
+function_AES_CMAC_xor_loop_common:	
+	ifetch   4,regc
+	ixor  temp,pdata
+	istore   4,contw	
+	rtn
+		
+
+
+
+//input rega :length <16	contr,contw
+function_AES_CMAC_padding:
+	bpatchx patch2d_7,mem_patch2d
+	arg 16,loopcnt
+	arg 0,pdata
+function_AES_CMAC_padding_loop:
+	isub rega,null
+	branch function_AES_CMAC_padding_beq_length,zero
+	branch function_AES_CMAC_padding_big_length,positive
+	ifetcht 1,contr
+	istoret 1,contw
+function_AES_CMAC_padding_loop2:	
+	increase 1,pdata
+	loop function_AES_CMAC_padding_loop
+	rtn
+function_AES_CMAC_padding_beq_length:	
+	arg 0x80,temp
+function_AES_CMAC_padding_common:
+	istoret 1,contw
+	branch  function_AES_CMAC_padding_loop2
+
+function_AES_CMAC_padding_big_length:
+	arg 0,temp
+	branch function_AES_CMAC_padding_common
+
+endif
+	
+generate_kinit:
+	call function_e22
+	arg mem_input_store,contr
+	arg mem_kinit,contw		/* Kinit is ready */
+	branch memcpy16
+
+
+function_e21:	/* rega pointers to bdaddr */
+	disable user
+	call function_expand
+	arg mem_random_number,contr
+	arg mem_x,contw
+	force 15,loopcnt
+	call memcpy			
+	ifetch 1,contr
+	xor_into 6,pdata
+	istore 1,contw
+	setarg mem_y
+	store 2,memp_ar_input
+	setarg mem_x
+	store 2,memp_ar_key
+	set1 mark_ar2,mark
+	branch function_ar
+
+
+	
+function_e22:		/* rega pointers to bdaddr */
+	fetcht 1,mem_pin_length
+	force 16,regb			/* total 16 bytes */
+	add temp,6,regc		/* regc is l' */
+	sub regc,16,null		
+	branch function_e22_pin_init,positive 
+	force 16,regc
+function_e22_pin_init:			/* generate x from pin and bdaddr */
+	arg mem_x,contw
+function_e22_genx_pin:
+	arg mem_pin,contr
+	copy temp,loopcnt
+	disable user
+function_e22_genx_loop:
+	ifetch 1,contr
+	istore 1,contw
+	increase -1,regb
+	branch function_e22_genx_end,zero
+	loop function_e22_genx_loop
+	branch function_e22_genx_pin,user
+	enable user
+	force 6,loopcnt
+	copy rega,contr
+	branch function_e22_genx_loop
+function_e22_genx_end:
+	arg mem_random_number,contr
+	arg mem_y,contw
+	call memcpy16
+	fetch 1,mem_y15
+	ixor regc,pdata
+	store 1,mem_y15	/* inpy[15] = rand_num[15]^l'; */
+	setarg mem_y
+	store 2,memp_ar_input
+	setarg mem_x
+	store 2,memp_ar_key
+	set1 mark_ar2,mark
+	branch function_ar
+
+
+
+
+function_e1:	/* rega pointers to bdaddr */
+	disable user
+	call function_expand
+	branch function_hash
+
+function_e3:
+	arg mem_aco,rega
+	enable user
+	call function_expand
+	call function_hash
+	arg mem_input_store,contr
+	arg mem_kc,contw
+	branch memcpy16
+
+	/* costs 41769 clocks */
+function_hash:
+	setarg mem_random_number
+	store 2,memp_ar_input
+	setarg mem_link_key
+	store 2,memp_ar_key
+	set0 mark_ar2,mark
+	call function_ar
+	arg mem_input_store,rega
+	arg mem_random_number,regb
+	arg mem_x,contw
+	call xor16
+	arg mem_x,rega
+	arg mem_y,regb
+	copy regb,contw
+	enable user
+	call add16
+	call key_offset
+	setarg mem_y
+	store 2,memp_ar_input
+	setarg mem_x
+	store 2,memp_ar_key
+	set1 mark_ar2,mark
+	branch function_ar
+	
+
+	/* totally costs 20700 clocks */
+function_ar:
+	jam 0,mem_ar_hround
+	fetch 2,memp_ar_key
+	iforce contr
+	arg mem_key_store,contw
+	call memcpy16
+	fetch 2,memp_ar_input
+	iforce contr
+	arg mem_input_store,contw
+	call memcpy16
+	
+function_ar_loop:
+	call key_scheduling
+	disable user
+	bmark0 mark_ar2,function_ar_original
+	fetch 1,mem_ar_hround
+	bne 4,function_ar_original
+	fetch 2,memp_ar_input
+	iforce regb
+	call xor_mod32_ar2
+function_ar_original:
+	call xor_mod32
+	call el_boxes
+	fetch 1,mem_ar_hround
+	increase 1,pdata
+	store 1,mem_ar_hround
+
+	call key_scheduling
+	enable user
+	call xor_mod32
+	call pht
+	call permute
+	call pht
+	call permute
+	call pht
+	call permute
+	call pht
+	fetch 1,mem_ar_hround
+	increase 1,pdata
+	store 1,mem_ar_hround
+	bne 16,function_ar_loop
+	call key_scheduling
+	disable user
+	branch xor_mod32
+	
+/* input round number and temp key in mem_key_store, and output the next temp key in mem_key_store */
+/* round key is generated and store in mem_round_key */
+key_scheduling:
+	fetch 1,mem_ar_hround
+	arg mem_key_store,contr
+	branch key_sched_zero,blank
+	iforce regb      			/* regb is half round */
+	force 17,loopcnt
+	copy contr,contw
+key_rotateloop:
+	ifetch 1,contr
+	lshift3 pdata,temp
+	rshift2 pdata,pdata
+	rshift3 pdata,pdata
+	ior temp,pdata
+	istore 1,contw
+	loop key_rotateloop
+	setarg mem_key_store
+	iadd regb,contr
+	force 16,loopcnt    
+	arg mem_round_key,contw
+key_select_octet_loop:
+	ifetch 1,contr
+	istore 1,contw
+	compare mem_key_store_end,contr,0xff
+	nbranch key_select_octet_nwrap,true
+	increase -17,contr
+key_select_octet_nwrap:
+	loop key_select_octet_loop
+	force 0,rega         /* rega is index of octet within row */
+	add regb,-1,regc    /* this is the row index, half_round#1 is 0 */
+	lshift2 regc,regc
+	lshift2 regc,regc
+	call enable_authrom
+	setarg mem_b_box
+	iadd regc,regc       /* regc hold the starting address of the row */
+	arg mem_round_key,contw
+	force 16,loopcnt
+bias_round_key_loop:
+	ifetcht 1,regc
+	ifetch 1,contw
+	iadd temp,pdata
+	istore 1,contw
+	increase 1,regc
+	loop bias_round_key_loop
+	branch disable_authrom
+
+key_sched_zero:    /* round 0, key1 */
+	force 16,loopcnt
+	force 0,temp
+create_byte_16_loop:
+	ifetch 1,contr
+	ixor temp,temp
+	loop create_byte_16_loop
+	deposit temp
+	istore 1,contr    	/* store the byte #16 */
+	arg mem_key_store,contr
+	arg mem_round_key,contw
+	branch memcpy16
+
+xor_mod32:     /* xor on 0,3, add on 1,2. if user is set, invert. x in rega and y in regb, out in contw */
+	arg mem_round_key,regb
+xor_mod32_ar2:
+	force 16,loopcnt
+	arg mem_input_store,rega
+	copy rega,contw
+xor_mod32_loop:	
+	ifetcht 1,rega
+	ifetch 1,regb
+	ixor temp,alarm
+	and loopcnt,3,regc
+	nbranch xor_mod32_invert,user
+	xor_into 3,regc
+xor_mod32_invert:
+	sub regc,1,regc
+	branch xor_even,positive
+	iadd temp,alarm
+xor_even:
+	deposit alarm
+	istore 1,contw
+	increase 1,rega
+	increase 1,regb
+	loop xor_mod32_loop
+	rtn
+
+el_boxes:
+	call enable_authrom
+	force 16,loopcnt
+	arg mem_input_store,rega
+el_box_loop:	
+	ifetch 1,rega
+	arg mem_e_box,contr
+	and loopcnt,3,regc
+	sub regc,1,null
+	branch e_boxes,positive
+	arg mem_l_box,contr
+e_boxes:
+	iadd contr,contr
+	ifetch 1,contr
+	istore 1,rega
+	increase 1,rega
+	loop el_box_loop
+	branch disable_authrom
+
+pht:				
+	force 8,loopcnt
+	arg mem_input_store,contr
+	copy contr,contw
+pht_loop:
+	ifetch 1,contr
+	iforce rega
+	ifetch 1,contr
+	iforce regb
+	lshift rega,pdata
+	iadd regb,pdata
+	istore 1,contw
+	deposit rega
+	iadd regb,pdata
+	istore 1,contw
+	loop pht_loop
+	rtn
+
+/* 8 11 12 15 2 1 6 5 10 9 14 13 0 7 4 3 */
+permute:			
+	setarg 0x8ae42c
+	iforce temp
+	force 7,loopcnt
+	call permute_exchange
+	setarg 0xd751b
+	iforce temp
+	force 5,loopcnt
+	call permute_exchange
+	fetch 1,mem_input_store+15
+	iforce rega
+	fetch 1,mem_input_store+3
+	store 1,mem_input_store+15
+	deposit rega
+	store 1,mem_input_store+3
+	rtn
+
+permute_exchange:
+	and temp,0xf,regb
+permute_loop:
+	and temp,0xf,pdata
+	arg mem_input_store,contw
+	iadd contw,contw
+	ifetch 1,contw
+	iforce regc
+	deposit rega
+	istore 1,contw
+	copy regc,rega
+	rshift4 temp,temp
+	loop permute_loop	
+	setarg mem_input_store
+	iadd regb,contw
+	deposit rega
+	istore 1,contw
+	rtn
+
+add16:
+	enable user
+	branch xor_add16
+
+xor16:
+	disable user
+xor_add16:	/* if user is set, do add, else do xor */
+	force 16,loopcnt	/* rega and regb pointers to src, contw is result */
+xoradd_loop:
+	ifetcht 1,rega
+	ifetch 1,regb
+	branch xoradd_add,user
+	ixor temp,pdata
+	branch xoradd_store
+xoradd_add:	
+	iadd temp,pdata
+xoradd_store:	
+	istore 1,contw
+	increase 1,rega
+	increase 1,regb
+	loop xoradd_loop
+	rtn
+
+	
+function_expand:		/* rega pointers to bdaddr, or aco and user is set */
+	arg mem_y,contw
+	ifetch 6,rega
+	istore 6,contw
+	branch expand_12,user
+	ifetch 6,rega
+	branch expand_cont
+expand_12:
+	ifetch 6,contr
+expand_cont:
+	istore 6,contw
+	ifetch 4,rega
+	istore 4,contw
+	rtn
+
+key_offset:
+	arg mem_link_key,contr
+	arg mem_x,contw
+	arg 0,temp
+	setarg 0x8395a7
+	call concatenate_temp24
+	setarg 0xb3c1df
+	call concatenate_temp24
+	setarg 0xe5e9
+	call concatenate_temp16
+	copy temp,regab
+	disable user
+	call key_addxor
+	copy regab,temp
+	enable user
+	branch key_addxor
+
+key_addxor:
+	force 8,loopcnt
+key_addxor_loop:	
+	ifetch 1,contr
+	compare 1,loopcnt,1
+	branch key_high,user
+	branch key_xor,true
+key_add:	
+	iadd temp,pdata
+	branch key_store
+key_high:
+	branch key_add,true
+key_xor:
+	ixor temp,pdata
+key_store:
+	istore 1,contw
+	rshift8 temp,temp
+	loop key_addxor_loop
+	rtn
+
+copy_aco:
+	fetch 6,mem_input_store+4
+	store 6,mem_aco
+	ifetch 6,contr
+	istore 6,contw
+	rtn
+	
+concatenate_temp24:
+	lshift8 temp,temp
+concatenate_temp16:
+	lshift16 temp,temp
+	ior temp,temp
+	rtn
+
+ifdef TESTING
+test_security:
+	fetch 1,0xff
+	branch test_security,blank
+
+	/* inrand */
+	setarg 0x1BC683
+	store 3,0x0
+	setarg 0x122980
+	istore 3,contw
+	setarg 0xD0DB17
+	istore 3,contw
+	setarg 0x2B1D78
+	istore 3,contw
+	setarg 0x2743A6
+	istore 3,contw
+	setarg 0xD8
+	istore 1,contw
+
+	/* comb A */
+	setarg 0xA6D0C9
+	store 3,0x10
+	setarg 0xA9E86C
+	istore 3,contw
+	setarg 0x9E89D5
+	istore 3,contw
+	setarg 0xC61838
+	istore 3,contw
+	setarg 0x6F0318
+	istore 3,contw
+	setarg 0x9F
+	istore 1,contw
+
+	/* comb B */
+	setarg 0x7F6833
+	store 3,0x20
+	setarg 0xE62E1B
+	istore 3,contw
+	setarg 0x9F67FC
+	istore 3,contw
+	setarg 0x8D3712
+	istore 3,contw
+	setarg 0x0B846C
+	istore 3,contw
+	setarg 0x4A
+	istore 1,contw
+
+	/* auth rand A */
+	setarg 0xFBB686
+	store 3,0x30
+	setarg 0x19FE7F
+	istore 3,contw
+	setarg 0x16A439
+	istore 3,contw
+	setarg 0xF4F6A4
+	istore 3,contw
+	setarg 0x10D61D
+	istore 3,contw
+	setarg 0xDE
+	istore 1,contw
+
+	/* auth rand B */
+	setarg 0x735B0C
+	store 3,0x40
+	setarg 0xA7F06B
+	istore 3,contw
+	setarg 0x04625E
+	istore 3,contw
+	setarg 0x3463B0
+	istore 3,contw
+	setarg 0xB8F17A
+	istore 3,contw
+	setarg 0x7C
+	istore 1,contw
+
+	/* address A */
+	setarg 0xf91330
+	store 3,0xb0
+	setarg 0x664c7d
+	istore 3,contw
+
+	/* address B */
+	setarg 0xdc7100
+	store 3,0xb8
+	setarg 0x2ea003
+	istore 3,contw
+
+	/* sres A */
+	setarg 0x2EEE19
+	store 3,0x50
+	setarg 0x7E
+	istore 1,contw
+
+	/* sres B */
+	setarg 0x4231A4
+	store 3,0x58
+	setarg 0xD1
+	istore 1,contw
+
+	/* linkA */
+	setarg 0xa6a026
+	store 3,0x60
+	setarg 0x2569d2
+	istore 3,contw
+	setarg 0xab4a9d
+	istore 3,contw
+	setarg 0x5e87c0
+	istore 3,contw
+	setarg 0x792aa9
+	istore 3,contw
+	setarg 0x4b
+	istore 1,contw
+
+	/* linkB */
+	setarg 0xa1f07d
+	store 3,0x70
+	setarg 0xec97a6
+	istore 3,contw
+	setarg 0xae31eb
+	istore 3,contw
+	setarg 0x6fe3c4
+	istore 3,contw
+	setarg 0xa1ae1a
+	istore 3,contw
+	setarg 0x3a
+	istore 1,contw
+
+	/* linkkey */
+	setarg 0x07505b
+	store 3,0x80
+	setarg 0xc9fe74
+	istore 3,contw
+	setarg 0x057b76
+	istore 3,contw
+	setarg 0x316404
+	istore 3,contw
+	setarg 0xd884b3
+	istore 3,contw
+	setarg 0x71
+	istore 1,contw
+
+	/* K */
+	setarg 0x0c333f
+	store 3,0x90
+	setarg 0x41de70
+	istore 3,contw
+	setarg 0x9b05a2
+	istore 3,contw
+	setarg 0xb954a2
+	istore 3,contw
+	setarg 0xb37516
+	istore 3,contw
+	setarg 0x36
+	istore 1,contw
+
+	/* kinit */
+	setarg 0x5ff91a
+	store 3,0xa0
+	setarg 0x39b5a4
+	istore 3,contw
+	setarg 0x258f2d
+	istore 3,contw
+	setarg 0x5d4a85
+	istore 3,contw
+	setarg 0x656ad3
+	istore 3,contw
+	setarg 0xab
+	istore 1,contw
+
+	arg 0,contr
+	arg mem_random_number,contw
+	call memcpy16
+	setarg 0x3131
+	store 2,mem_pin
+	istore 2,contw
+	jam 4,mem_pin_length
+	arg 0xb8,rega
+	call function_e22
+	arg mem_input_store,contr
+	arg mem_kinit,contw
+	call memcpy16
+	arg 0x10,rega
+	arg mem_kinit,regb
+	arg mem_random_number,contw
+	call xor16
+	arg 0xb0,rega
+	call function_e21
+	arg 0x60,regb
+	call compare16
+error_lka:
+	nbranch error_lka,zero
+	arg mem_input_store,contr
+	arg mem_link_key,contw	
+	call memcpy16
+	arg 0x20,rega
+	arg mem_kinit,regb
+	arg mem_random_number,contw
+	call xor16
+	arg 0xb8,rega
+	call function_e21
+	arg 0x70,regb
+	call compare16
+error_lkb:
+	nbranch error_lkb,zero
+	arg mem_input_store,rega
+	arg mem_link_key,regb
+	arg mem_link_key,contw
+	call xor16
+	arg 0x30,contr
+	arg mem_random_number,contw
+	call memcpy16
+	arg 0xb8,rega
+	call function_e1
+	arg 0x50,regb
+	force 4,loopcnt
+	call compare_key
+error_sresa:
+	nbranch error_sresa,zero
+	arg 0x40,contr
+	arg mem_random_number,contw
+	call memcpy16
+	arg 0xb0,rega
+	call function_e1
+	arg 0x58,regb
+	force 4,loopcnt
+	call compare_key
+error_sresb:
+	nbranch error_sresb,zero
+	branch loop1
+	
+	arg 0,contr
+	arg mem_random_number,contw
+	call memcpy16
+	force 12,loopcnt
+	call memcpy
+	arg 0x1c,contr
+	arg mem_link_key,contw
+	call memcpy16
+	arg 0x10,rega
+	call function_e3
+	branch loop1
+
+compare16:
+	force 16,loopcnt
+compare_key:
+	arg mem_input_store,rega
+	branch compare_loop
+
+compare_loop:
+	ifetch 1,rega
+	ifetcht 1,regb
+	isub temp,null
+	nrtn zero
+	increase 1,rega
+	increase 1,regb
+	loop compare_loop
+	force 0,pdata
+	rtn
+
+endif
+
+
+loop1:	
+	branch loop1
+
+/* ==================== LE security ================= */
+
+generate_stk:
+	bpatchx patch2e_0,mem_patch2e
+	call function_s1
+	arg mem_le_ltk,contw
+	branch store_aes_result
+
+	/* contr = rand pointer */
+authenticate_rconfirm:
+	arg mem_le_srand,contw
+	branch authenticate_mconfirm,master
+	arg mem_le_mrand,contw
+authenticate_mconfirm:
+	copy contr,rega
+	call memcpy16
+	call function_c1
+	arg mem_le_rconfirm,contr
+	branch compare_res
+
+generate_confirm:
+	arg mem_le_mrand,rega
+	branch generate_mrand,master
+	arg mem_le_srand,rega
+generate_mrand:
+	copy rega,contw
+	call generate_random
+	branch function_c1
+
+generate_sk:
+	arg mem_le_skdm,contr
+	call load_data128
+	arg mem_le_ltk,contr
+	call load_regext
+	force 0x38,aes_ctrl
+	force 0x0,aes_ctrl
+	call wait_aes
+	arg mem_le_sk,contw
+	branch store_aes_result
+
+
+//input temp:counter; rega:len	
+ccm_b0:
+	force regidx_xor,regext_index				
+	force 0x49,pdata
+	branch iv_common
+	
+	/* temp=packet counter, rega = length or block counter*/
+first_block_counter:
+	force 0x49,pdata
+	branch first_block
+first_block_data:
+	force 1,pdata
+first_block:
+	force regidx_data,regext_index			
+iv_common:
+	lshift8 temp,regext
+	ior regext,regext
+	increase 1,regext_index
+	rshift8 temp,regext
+	rshift16 regext,regext
+	fetch 2,mem_ccm_iv
+	lshift16 pdata,pdata
+	ior regext,regext				/* octet3&octet4 of counter and low 16 bit of IV */
+	increase 1,regext_index
+	ifetchr regext, 4,contr					/* IV2-IV5 */
+	increase 1,regext_index
+	ifetch 2,contr					/* IV6-IV7 */
+	byteswap rega,regext
+	lshift16 regext,regext
+	ior regext,regext
+	increase 1,regext_index
+	rtn
+
+
+	/* temp=packet counter, regc pointers to data */	
+generate_mic:
+	add regc,1,contr
+	ifetch 1,contr
+	iforce rega
+	call first_block_counter		//B0
+	call do_aes_ocb
+
+	force regidx_data,regext_index			/* B1 */
+	ifetch 1,regc
+	and_into 0x3,pdata
+	lshift16 pdata,regext
+	set1 8,regext
+	call clear_hidata	//B1
+	call do_aes_cbc
+
+	copy rega,loopcnt
+	add regc,2,contr
+	call padding_data	//数据填充
+generate_mic_loop:
+	call aes_load_data
+	call do_aes_cbc
+	deposit loopcnt
+	branch generate_mic_end,blank
+	branch generate_mic_loop
+generate_mic_end:
+	force regidx_result,regext_index
+	deposit regext
+	store 4,mem_le_mic
+	rtn
+
+aes_crypt_data:
+	increase 1,rega
+	call first_block_data
+	copy regc,contr
+	call aes_load_xor
+	call do_aes_ctr
+	call store_enc_data
+	increase 16,regc
+	increase -16,regb
+	branch aes_crypt_data,positive
+	rtn
+
+/*
+ccm_br_enc:
+	arg mem_kc,contr  //mem_kc  key 
+	call load_key
+	
+	fetcht 5,mem_ccm_pcnt_tx
+	call generate_mic_br
+	force regidx_xor,regext_index
+	iforce regext
+	force 0,rega					
+	call first_block_data_br
+	call do_aes_ctr
+
+	fetch 2,mem_ccm_len
+ 	add pdata,-1,regb
+	iadd regc,contw
+	force regidx_result,regext_index
+	deposit regext
+	istore 4,contw	
+	store 4,mem_le_mic
+
+	call aes_crypt_data_br
+//	fetch 2,mem_ccm_len
+//	increase 4,pdata
+//	store 2,mem_ccm_len
+	fetcht 5,mem_ccm_pcnt_tx
+	increase 1,temp
+	storet 5,mem_ccm_pcnt_tx
+	rtn
+
+
+ccm_br_decrypt:
+	call disable_user2
+	copy contw,pdata
+	fetcht 2,mem_len
+	increase 4,temp
+	isub temp,pdata
+	store 2,mem_ccm_rx_ptr
+	
+	arg mem_kc,contr  //mem_kc  key // iv
+	call load_key
+	fetch 2,mem_ccm_rx_ptr
+	copy pdata,regc
+	fetch 2,mem_len
+	iadd regc,contr
+	add pdata,-1,regb	
+	ifetch 4,contr   //mic
+	force regidx_xor,regext_index
+	iforce regext
+	force 0,rega					
+	fetcht 5,mem_ccm_pcnt_rx
+	call first_block_data_br
+	call do_aes_ctr
+	force regidx_result,regext_index
+	deposit regext
+	store 4,mem_le_peer_mic
+	call aes_crypt_data_br
+
+	fetch 1,mem_lch_code
+	and pdata,0x3,pdata
+	store 1,mem_llid
+	fetch 1,mem_rx_type
+	copy pdata,type
+	fetch 2,mem_len
+	copy pdata,rega
+	fetch 2,mem_ccm_rx_ptr
+	copy pdata,regc
+	fetcht 5,mem_ccm_pcnt_rx	
+	call generate_mic_br
+	fetcht 4,mem_le_peer_mic
+	isub temp,pdata				
+	nrtn blank
+	fetch 4,mem_ccm_last_mic			
+	isub temp,pdata
+	rtn blank
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	store 5,mem_ccm_pcnt_rx
+	branch enable_user2
+
+	//temp=packet counter, regc pointers to data, rega len	
+generate_mic_br:
+
+	call first_block_counter_br
+	call do_aes_ocb
+
+	force regidx_data,regext_index			
+	and type,0x0f,pdata
+	lshift3 pdata,pdata
+	ior am_addr,pdata  //lt_addr
+	lshift8 pdata,regext
+	fetch 1,mem_llid
+	lshift16 pdata,pdata
+	ior regext,regext
+	call clear_hidata
+	call do_aes_cbc
+
+	copy rega,loopcnt  //data length
+//	add regc,2,contr    // data ptr
+	copy regc,contr
+	call padding_data
+generate_mic_br_loop:
+	call aes_load_data
+	call do_aes_cbc
+	deposit loopcnt
+	branch generate_mic_br_end,blank
+	branch generate_mic_br_loop
+generate_mic_br_end:
+	force regidx_result,regext_index
+	deposit regext
+	store 4,mem_le_mic  //T
+	rtn	
+	
+aes_crypt_data_br:
+	increase 1,rega
+	call first_block_data_br
+	copy regc,contr
+	call aes_load_xor
+	call do_aes_ctr
+	call store_enc_data
+	increase 16,regc
+	increase -16,regb
+	branch aes_crypt_data_br,positive
+	rtn
+	
+	// temp=packet counter, rega = length or block counter
+first_block_counter_br:
+	force 0x49,pdata
+	branch first_block_br
+	
+first_block_data_br:
+	force 1,pdata
+first_block_br:
+	force regidx_data,regext_index			 
+	lshift8 temp,regext
+	ior regext,regext
+	increase 1,regext_index
+	rshift8 temp,regext
+	rshift16 regext,regext
+	fetch 2,mem_ccm_iv  //iv
+	lshift16,pdata,pdata
+	ior regext,regext				
+	increase 1,regext_index
+	ifetch 4,contr					
+	iforce regext
+	increase 1,regext_index
+	ifetch 2,contr					
+	byteswap rega,regext  
+	lshift16 regext,regext
+	ior regext,regext
+	increase 1,regext_index
+	rtn
+*/
+
+/*
+le_encrypt:
+	arg mem_le_txheader,regc
+	fetcht 5,mem_ccm_pcnt_tx
+	call generate_mic
+	force regidx_xor,regext_index
+	iforce regext
+	force 0,rega					 
+	call first_block_data
+	call do_aes_ctr
+	arg mem_le_txpayload,regc
+	fetch 1,mem_le_txlen
+	add pdata,-1,regb
+	iadd regc,contw
+	force regidx_result,regext_index
+	deposit regext
+	istore 4,contw	
+	call aes_crypt_data
+	fetch 1,mem_le_txlen
+	increase 4,pdata
+	store 1,mem_le_txlen
+	fetcht 5,mem_ccm_pcnt_tx
+	increase 1,temp
+	set0 LE_CCM_DIRECTIONBIT,temp
+	storet 5,mem_ccm_pcnt_tx
+	rtn
+
+le_decrypt:
+	fetch 1,mem_le_rxbuf+1
+	arg mem_le_rxbuf+2,regc
+	add pdata,-1,regb
+	increase -4,pdata				
+	store 1,mem_le_rxbuf+1
+	iadd regc,contr
+	ifetch 4,contr
+	force regidx_xor,regext_index
+	iforce regext
+	force 0,rega					
+	fetcht 5,mem_ccm_pcnt_rx
+	call first_block_data	//generate nonce
+	call do_aes_ctr
+	force regidx_result,regext_index
+	deposit regext
+	store 4,mem_le_peer_mic
+	call aes_crypt_data
+	arg mem_le_rxbuf,regc
+	call generate_mic
+	fetcht 4,mem_le_peer_mic
+	isub temp,pdata				
+	nrtn blank
+	fetch 4,mem_ccm_last_mic			
+	isub temp,pdata
+	rtn blank
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	force 0,pdata
+	rtn
+*/
+
+
+//input regc input playload addr; 
+ccm_br_enc_new:
+	call ccm_init_common
+	bpatchx patch2e_1,mem_patch2e
+	arg mem_kc,contr   
+	call load_key
+	
+	jam 0,core_ccm_aad0 
+	and type,0x0f,pdata
+	lshift3 pdata,pdata
+	ior am_addr,pdata  
+	store 1,core_ccm_aad1
+	fetch 1,mem_llid
+	store 1,core_ccm_aad2
+
+	storer regc,2,core_ccm_input_playload_addr
+	storer regc,2,core_ccm_output_playload_addr
+	
+	fetchr rega,2,mem_ccm_len
+	fetcht 5,mem_ccm_pcnt_tx			
+	call ccm_br_check_0_length_continuation
+	call ccm_b0
+	jam 2,core_ccm_ctrl
+	jam 3,core_ccm_ctrl
+
+	fetch 2,mem_ccm_len
+	store 2,core_ccm_inptr
+	increase 4,pdata
+	store 2,mem_ccm_len
+	copy regc,pdata
+	iadd rega,rega
+	call wait_ccm_done
+	arg regidx_result,regext_index
+	istorer regext, 4 ,rega
+	storer regext, 4,mem_le_mic
+	rtn
+
+ccm_br_pcnt_tx_add:
+	fetch 5,mem_ccm_pcnt_tx
+	increase 1,pdata
+	store 5,mem_ccm_pcnt_tx
+	branch ccm_br_pcnt_tx_set
+
+
+ccm_br_check_0_length_continuation:
+	fetch 1,mem_llid
+	rtnne LLID_L2CAP_CONT
+	fetch 2,mem_ccm_len
+	nrtn blank
+	set1 BR_CCM_0_LENGTH_CONTINUATION,temp
+	rtn
+
+
+ccm_br_pcnt_tx_set:
+	fetch 1,mem_ccm_pcnt_tx+4
+ 	and pdata,0x0f,pdata
+ 	or pdata,0x20,pdata
+ 	store 1,mem_ccm_pcnt_tx+4
+ 	rtn
+ 	
+ccm_br_pcnt_rx_set:
+	fetch 1,mem_ccm_pcnt_rx+4
+ 	and pdata,0x0f,pdata
+ 	store 1,mem_ccm_pcnt_rx+4
+ 	rtn
+ 	
+ccm_br_decrypt_new:
+	copy contw,pdata
+	fetcht 2,mem_len
+	increase 4,temp
+	isub temp,pdata
+	store 2,mem_ccm_rx_ptr
+	store 2,core_ccm_input_playload_addr
+	store 2,core_ccm_output_playload_addr
+
+	call disable_user2
+	call ccm_init_common
+	arg mem_kc,contr 
+	call load_key
+	
+	jam 0,core_ccm_aad0 
+	fetch 1,mem_rx_type
+	and pdata,0x0f,pdata
+	lshift3 pdata,pdata
+	ior am_addr,pdata  
+	store 1,core_ccm_aad1
+	fetch 1,mem_lch_code
+	and pdata,0x3,pdata
+	store 1,mem_llid
+	store 1,core_ccm_aad2
+	
+	fetchr rega, 2,mem_len
+	storer rega,2,mem_ccm_len
+	fetch 2,mem_ccm_rx_ptr
+	iadd rega,contr
+	force regidx_data,regext_index
+	ifetchr regext, 4,contr
+	storer  regext,4,mem_le_peer_mic
+	fetcht 5,mem_ccm_pcnt_rx		
+	call ccm_br_check_0_length_continuation
+	call ccm_b0
+	jam 6,core_ccm_ctrl
+	jam 7,core_ccm_ctrl
+
+	fetch 2,mem_len
+	store 2,core_ccm_inptr
+	call wait_ccm_done
+	fetch 1,core_misc_status
+	rtnbit0 7
+	branch enable_user2
+
+
+ccm_br_pcnt_rx_add:	
+	rtnmark1 mark_old_packet
+	fetcht 4,mem_le_peer_mic
+//	fetch 4,mem_ccm_last_mic			
+//	isub temp,pdata
+///	rtn blank
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	store 5,mem_ccm_pcnt_rx
+	branch ccm_br_pcnt_rx_set
+
+
+ 	
+le_decrypt_new:
+ 	call ccm_init_common
+	jam 0,core_ccm_aad0 
+	jam 1,core_ccm_aad1
+	fetch 1,mem_le_rxbuf_data_header
+	and_into 0x3,pdata
+	store 1,core_ccm_aad2
+	
+	setarg mem_le_rxbuf_data_payload
+	store 2,core_ccm_input_playload_addr
+	store 2,core_ccm_output_playload_addr
+
+	fetchr rega, 1,mem_le_rxbuf_data_length
+	increase -4,rega
+	nbranch disable_blank,positive
+	storer rega, 1,mem_le_rxbuf_data_length
+	setarg mem_le_rxbuf_data_payload
+	iadd rega,contr
+	force regidx_data,regext_index
+	ifetchr regext, 4,contr
+	storer  regext,4,mem_le_peer_mic
+	fetcht 5,mem_ccm_pcnt_rx				
+	call ccm_b0
+	jam 6,core_ccm_ctrl
+	jam 7,core_ccm_ctrl
+	fetch 1,mem_le_rxbuf_data_length
+	store 2,core_ccm_inptr
+	call wait_ccm_done
+	fetch 1,core_misc_status
+	bbit0 7, disable_blank
+	fetcht 4,mem_le_peer_mic
+	fetch 4,mem_ccm_last_mic			/* reduntdant packet? */
+	isub temp,pdata
+	rtn blank
+	storet 4,mem_ccm_last_mic
+	fetch 5,mem_ccm_pcnt_rx
+	increase 1,pdata
+	set1 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_rx
+	force 0,pdata
+	rtn
+
+
+le_encrypt_new:
+	call le_encrypt_new_start
+	setarg mem_le_txpayload
+	iadd rega,rega
+	call wait_ccm_done
+	arg regidx_result,regext_index
+	istorer regext, 4 ,rega
+	rtn
+
+
+le_encrypt_new_start:
+	call ccm_init_common
+	bpatchx patch2e_2,mem_patch2e
+	jam 0,core_ccm_aad0 
+	jam 1,core_ccm_aad1
+	fetch 1,mem_le_txheader
+	and_into 0x3,pdata
+	store 1,core_ccm_aad2
+	fetch 2,mem_contr
+	store 2,core_ccm_input_playload_addr
+	setarg mem_le_txpayload
+	store 2,core_ccm_output_playload_addr
+	
+	fetchr rega,1,mem_le_txlen
+	fetcht 5,mem_ccm_pcnt_tx				
+	call ccm_b0
+	jam 2,core_ccm_ctrl
+	jam 3,core_ccm_ctrl
+	
+	fetch 1,mem_le_txlen
+	store 2,core_ccm_inptr
+	increase 4,pdata
+	store 1,mem_le_txlen
+	fetch 5,mem_ccm_pcnt_tx
+	increase 1,pdata
+ 	set0 LE_CCM_DIRECTIONBIT,pdata
+	store 5,mem_ccm_pcnt_tx
+	rtn
+
+
+ccm_wait_enc:
+	fetch 2,core_ccm_outptr
+	isub temp,null
+	rtn zero 
+	nrtn blank
+//	call assert
+	branch ccm_wait_enc
+
+ccm_check_enc_done:
+	fetch 1,core_misc_status
+	bbit0 6,assert
+ccm_enc_done:
+	setarg mem_le_txpayload
+	iadd temp,contw	
+	arg regidx_result,regext_index
+	istorer regext, 4 ,contw	
+	branch ccm_ctrl_clr
+	
+ccm_init_common:
+	bpatchx patch2e_3,mem_patch2e
+	force regidx_result,regext_index
+	call aes_clear
+	call aes_clear_data
+ 	setarg 0
+	store 2,core_ccm_inptr
+	rtn
+	
+wait_ccm_done:
+	fetch 1,core_misc_status
+	bbit0 6,wait_ccm_done
+ccm_ctrl_clr:
+	jam 0,core_ccm_ctrl
+	rtn
+
+
+wait_aes:
+	nbranch wait_aes,aes_ready
+	rtn
+
+do_aes_ocb:
+	force 0x30,aes_ctrl
+	force 0x0,aes_ctrl
+	branch wait_aes
+
+do_aes_cbc:
+	force 0x32,aes_ctrl
+	force 0x2,aes_ctrl
+	branch wait_aes
+
+do_aes_ctr:
+	force 0x34,aes_ctrl
+	force 0x4,aes_ctrl
+	branch wait_aes
+
+	
+aes_init:
+	force 1,aes_ctrl
+	force 0,aes_ctrl
+	rtn
+function_s1:
+	force regidx_data,regext_index
+	fetch 4,mem_le_mrand
+	iforce regext
+	increase 1,regext_index
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	fetch 4,mem_le_srand
+	iforce regext
+	increase 1,regext_index
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	call aes_clear
+	increase -4,regext_index
+	fetch 4,mem_le_tk
+	copy pdata,regext
+	increase 4,regext_index
+	force 0x38,aes_ctrl
+	force 0x8,aes_ctrl
+	branch wait_aes
+
+	/* rega pointers to random number */
+function_c1:
+	bpatchx patch2e_4,mem_patch2e
+	fetch 6,mem_le_lap
+	fetcht 6,mem_le_plap
+	branch function_c1_master,master
+	fetch 6,mem_le_plap
+	fetcht 6,mem_le_lap
+function_c1_master:
+	force regidx_xor,regext_index
+	copy temp,regext
+	increase 1,regext_index
+	rshift32 temp,regext
+	lshift16 pdata,pdata
+	ior regext,regext
+	increase 1,regext_index
+	rshift32 pdata,regext
+	increase 1,regext_index
+	force 0,regext					/* p2 = ia || ra */
+	force 0,pdata
+	fetch 1,mem_le_conn_peer_addr_type
+	fetcht 1,mem_le_adv_own_addr_type
+	nbranch function_c1_irat,master
+	//conn as master
+	fetch 1,mem_le_conn_own_addr_type
+	fetcht 1,mem_le_conn_peer_addr_type
+function_c1_irat:
+	store 1,mem_le_iat
+	storet 1,mem_le_rat
+	force regidx_data,regext_index
+	arg mem_le_iat,regb
+	force 4,loopcnt
+function_c1_loop1:
+	ifetch 4,rega		
+	ifetcht 4,regb
+	ixor temp,regext
+	increase 1,regext_index
+	increase 4,rega
+	increase 4,regb
+	loop function_c1_loop1		/* p1 ^ r */
+	call aes_clear				/* k = 0 */
+	increase -4,regext_index
+	fetch 4,mem_le_tk
+	copy pdata,regext
+	increase 4,regext_index
+	force 0x38,aes_ctrl
+	force 0xc,aes_ctrl
+	call wait_aes
+
+	call aes_clear_data
+	force 0x3a,aes_ctrl
+	force 0x8,aes_ctrl
+	branch wait_aes
+
+padding_data:
+	compare 0,loopcnt,3
+	rtn true
+	deposit contr
+	iadd loopcnt,contw
+	force 0,pdata
+padding_loop:
+	istore 1,contw
+	increase 1,loopcnt
+	compare 0,loopcnt,3
+	rtn true
+	branch padding_loop
+
+aes_load_data:
+	force regidx_data,regext_index
+load_data_loop:
+	deposit loopcnt
+	branch load_data_padding,blank
+	ifetch 4,contr
+	increase -4,loopcnt
+load_data_padding:
+	iforce regext
+	increase 1,regext_index
+	compare regidx_key,regext_index,0xf
+	rtn true
+	branch load_data_loop
+
+aes_load_xor:
+	force regidx_xor,regext_index
+	branch load_regext
+load_key:
+	force regidx_key,regext_index
+	branch load_regext
+load_data128:
+	force regidx_data,regext_index
+load_regext:
+	force 4,loopcnt
+load_regext_loop:
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	loop load_regext_loop
+	rtn
+
+load_sk:
+	arg mem_le_sk,contr
+	branch load_key
+
+clear_hidata:
+	force 4,loopcnt
+	branch clear_data_rest
+
+regext_clear:
+	force 0,regext_index
+	force 16,loopcnt
+	branch clear_loop
+
+aes_clear_data:
+	force regidx_data,regext_index
+aes_clear:
+	force 4,loopcnt
+clear_loop:
+	force 0,regext
+clear_data_rest:
+	increase 1,regext_index
+	loop clear_loop
+	rtn
+
+store_aes_result:
+	force regidx_result,regext_index
+	force 4,loopcnt
+send_aes_result_loop:
+	deposit regext
+	istore 4,contw
+	increase 1,regext_index
+	loop send_aes_result_loop
+	rtn
+
+store_enc_data:
+	force regidx_result,regext_index
+	copy regc,contw
+	add regb,1,loopcnt
+	sub loopcnt,15,null
+	branch store_enc_loop,positive
+	force 16,loopcnt
+store_enc_loop:
+	deposit regext
+	sub loopcnt,3,null
+	branch store_enc_byte,positive
+	istore 4,contw
+	increase -4,loopcnt
+	rtn zero
+	increase 1,regext_index
+	branch store_enc_loop
+store_enc_byte:
+	istore 1,contw
+	rshift8 pdata,pdata
+	loop store_enc_byte
+	rtn
+	
+	/* contr pointers to value to be compared */
+compare_res:
+	force regidx_result,regext_index
+	force 4,loopcnt
+compare_res_loop:
+	ifetch 4,contr
+	isub regext,null
+	nrtn zero
+	increase 1,regext_index
+	loop compare_res_loop
+	force 0,null
+	rtn
+
+enable_authrom:
+	fetch 1,core_clkoff
+	set0 CLOCK_OFF_AUTH_ROM,pdata
+	store 1,core_clkoff
+	rtn
+
+disable_authrom:
+	fetch 1,core_clkoff
+	set1 CLOCK_OFF_AUTH_ROM,pdata
+	store 1,core_clkoff
+	rtn
+
+//24 mem_p :ff ff ff ff ff ff ff ff fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+//24 mem_a: fc ff ff ff ff ff ff ff fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
+//24 mem_b: b1 b9 46 c1 ec de b8 fe 49 30 24 72 ab e9 a7 0f e7 80 9c e5 19 05 21 64
+//24 mem_gx :12 10 ff 82 fd 0a ff f4 00 88 a1 43 eb 20 bf 7c f6 90 30 b0 0e a8 8d 18
+//24 mem_gy :11 48 79 1e a1 77 f9 73 d5 cd 24 6b ed 11 10 63 78 da c8 ff 95 2b 19 07
+//32 memh0   :19 cd e0 5b ab d9 83 1f 8c 68 05 9b 7f 52 0e 51 3a f5 4f a5 72 f3 6e 3c 85 ae 67 bb 67 e6 09 6a //use for sha
+init_memp:
+	arg mem_p,contw
+	setsect 0,0x3ffff
+	setsect 1,0x3ffff
+	setsect 2,0x3ffff
+	setsect 3,0x3fbff
+	istore 9,contw
+	setsect 0,0x3ffff
+	setsect 1,0x3ffff
+	setsect 2,0x3ffff
+	setsect 3,0x3ffff
+	istore 9,contw
+	setsect 0,0x3ffff
+	setsect 1,0x3ffff
+	setsect 2,0x3cfff
+	setsect 3,0x3ffff
+	istore 9,contw
+	setsect 0,0x3ffff
+	setsect 1,0x3ffff
+	setsect 2,0x3ffef
+	setsect 3,0x3ffff
+	istore 9,contw
+	setsect 0,0x3ffff
+	setsect 1,0x3ffff
+	setsect 2,0x3ffff
+	setsect 3,0x3ffff
+	istore 9,contw
+	setsect 0,0x3ffff
+	setsect 1,0x26c7f
+	setsect 2,0x146b
+	setsect 3,0x37bb3
+	istore 9,contw
+	setsect 0,0x1feb8
+	setsect 1,0x10c12
+	setsect 2,0x2b722
+	setsect 3,0x29fa6
+	istore 9,contw
+	setsect 0,0xe70f
+	setsect 1,0x16720
+	setsect 2,0x519e
+	setsect 3,0x19084
+	istore 9,contw
+	setsect 0,0x31012
+	setsect 1,0x360bf
+	setsect 2,0x3f0af
+	setsect 3,0x3d3
+	istore 9,contw
+	setsect 0,0x3a188
+	setsect 1,0x3ad0
+	setsect 2,0x3cbf2
+	setsect 3,0x243d9
+	istore 9,contw
+	setsect 0,0x2b030
+	setsect 1,0x36a03
+	setsect 2,0x11188
+	setsect 3,0x1e520
+	istore 9,contw
+	setsect 0,0x3a11e
+	setsect 1,0xfe5d
+	setsect 2,0xdd57
+	setsect 3,0x1ac93
+	istore 9,contw
+	setsect 0,0x11ed
+	setsect 1,0x218c4
+	setsect 2,0x8da7
+	setsect 3,0x257ff
+	istore 9,contw
+	setsect 0,0x3192b
+	setsect 1,0x34641
+	setsect 2,0x1be0c
+	setsect 3,0x366ad
+	istore 9,contw
+	setsect 0,0x1f83
+	setsect 1,0x15a23
+	setsect 2,0x3f9b0
+	setsect 3,0x3949
+	istore 9,contw
+	setsect 0,0x13a51
+	setsect 1,0x153fd
+	setsect 2,0x3372a
+	setsect 3,0xf1bb
+	istore 9,contw
+	setsect 0,0x3ae85
+	setsect 1,0x1eed9
+	setsect 2,0x9e66
+	setsect 3,0x1a8
+	istore 8,contw
+	rtn
+	
+ifdef SECURE_CONNECTION
+
+// mem_p_256:ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 ff ff ff ff
+// mem_a_256: fc ff ff ff ff ff ff ff fe ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff b1 b9 46 c1 ec de b8 fe
+// mem_gx_256: 96 c2 98 d8 45 39 a1 f4 a0 33 eb 2d 81 7d 03 77 f2 40 a4 63 e5 e6 bc f8 47 42 2c e1 f2 d1 17 6b
+// mem_gy_256: f5 51 bf 37 68 40 b6 cb ce 5e 31 6b 57 33 ce 2b 16 9e 0f 7c 4a eb e7 8e 9b 7f 1a fe e2 42 e3 4f
+// mem_le_slat :be 83 60 5a db 0b 37 60 38 a5 f5 aa 91 83 88 6c
+init_memp_256:
+ 	arg mem_p_256,contw
+        setsect 0,0x3ffff
+        setsect 1,0x3ffff
+        setsect 2,0x3ffff
+        setsect 3,0x3ffff
+        istore 9,contw
+        setsect 0,0x3ffff
+        setsect 1,0x3f
+        setsect 2,0x0
+        setsect 3,0x0
+        istore 9,contw
+        setsect 0,0x0
+        setsect 1,0x0
+        setsect 2,0x1000
+        setsect 3,0x0
+        istore 9,contw
+        setsect 0,0x3ff00
+        setsect 1,0x3ffff
+        setsect 2,0x3ffcf
+        setsect 3,0x3ffff
+        istore 9,contw
+        setsect 0,0x3ffff
+        setsect 1,0x3ffff
+        setsect 2,0x3ffff
+        setsect 3,0x3ff
+        istore 9,contw
+        setsect 0,0x0
+        setsect 1,0x0
+        setsect 2,0x0
+        setsect 3,0x0
+        istore 9,contw
+        setsect 0,0x10000
+        setsect 1,0x0
+        setsect 2,0x3f000
+        setsect 3,0x3ffff
+        istore 9,contw
+        setsect 0,0x296ff
+        setsect 1,0x22630
+        setsect 2,0x3945d
+        setsect 3,0x3d284
+        istore 9,contw
+        setsect 0,0x333a0
+        setsect 1,0x4b7a
+        setsect 2,0x37d8
+        setsect 3,0x3c9dc
+        istore 9,contw
+        setsect 0,0x3a440
+        setsect 1,0x1b958
+        setsect 2,0x38bce
+        setsect 3,0x1091f
+        istore 9,contw
+        setsect 0,0x2e12c
+        setsect 1,0x1f47c
+        setsect 2,0x356b1
+        setsect 3,0x2fd47
+        istore 9,contw
+        setsect 0,0x6837
+        setsect 1,0x2ed90
+        setsect 2,0x1ecec
+        setsect 3,0x1acc5
+        istore 9,contw
+        setsect 0,0x23357
+        setsect 1,0x18af3
+        setsect 2,0xf9e1
+        setsect 3,0x129f0
+        istore 9,contw
+        setsect 0,0x2e7eb
+        setsect 1,0x3e6e3
+        setsect 2,0x3e1a7
+        setsect 3,0x10b8b
+        istore 9,contw
+        setsect 0,0x24fe3
+        setsect 1,0x20ef
+        setsect 2,0x1b5a6
+        setsect 3,0xdc2f
+        istore 9,contw
+        setsect 0,0x13860
+        setsect 1,0x2bd69
+        setsect 2,0x391a
+        setsect 3,0x1b222
+        istore 9,contw
+        rtn
+endif
+
Index: mouse_public_3mode_usb/program/sim.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/sim.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/sim.prog	(working copy)
@@ -0,0 +1,626 @@
+simstart:
+	force 8,radio_ctrl
+	force 0,radio_ctrl
+	jam 0xff,rfen_ck
+	jam 5,core_clksel
+	jam 0,core_clkoff
+	jam 0,core_clkoff+1
+//	call sim_gpio
+//	jam 0xa0,0x90a
+//	jam 0x8f,0x90d
+//	branch sim_usb
+//	branch sim_iic
+//	branch sim_clk
+//	call sim_cal
+//	call sim_uart
+//	branch sim_c1
+//	branch loop
+//	call sim_spi
+//	call sim_eep
+//	branch test_tx
+	branch sim_le
+//	branch sim_250k
+	branch sim_main
+sim_lpm:
+	fetch 1,0x9ffd
+	beq 1,sim_assert
+	setarg 0
+	store 8,mem_gpio_wakeup_low
+	arg 30,temp
+	branch lpm_sleep
+sim_lpm_sleep:
+	jam 1,mem_context
+	branch sim_lpm_wait,wake
+	jam 0x70,core_bist_ctrl
+	jam ccnt_start,core_misc_ctrl
+sim_lpm_wait:
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	branch sim_lpm_wait,blank
+	call lpm_recover_clk,wake
+	jam 0x1b,mem_lpm_ldocnt
+	arg sim_assert,loopcnt
+	fetch 1,core_gpio_wakeup_low+2
+	bbit0 2,sim_lpm_loop
+	until null,lpo_edge
+	jam 0x20,core_misc_ctrl
+	until null,lpo_edge
+sim_lpm_loop:
+	fetch 1,core_misc_status
+	bbit1 6,sim_lpm_loop
+	fetch 1,core_gpio_in+3
+	compare 0x20,pdata,0x20
+	setarg 0
+	setflag true,29,pdata
+	setflag true,30,pdata
+	store 4,mem_gpio_wakeup_low
+	setarg 0
+	nsetflag true,29,pdata
+	nsetflag true,30,pdata
+	store 4,mem_gpio_wakeup_high
+	arg 300,temp
+	branch lpm_sleep
+
+sim_assert:
+	branch sim_assert
+
+
+sim_main:
+	call init_param
+	setarg 0
+	store 2,core_clkoff
+	setarg 0xff00
+	store 2,core_lpm_reg+2
+	jam lpmreg_sel_ctrl2,core_lpm_wr
+	fetch 1,mem_sim_slave
+	beq 1,sim_slave
+	jam dvc_op_hci,mem_device_option
+	fetch 6,mem_lap
+	store 6,mem_hci_plap
+	setarg 0xbdbdbd
+	store 3,mem_lap
+	istore 3,contw
+	jam hci_cmd_create_conn,mem_hci_cmd
+	force 0x10,pdata
+	add pdata,-2,clkn_bt
+	store 4,mem_page_clk
+	rshift clkn_bt,pdata
+	store 4,mem_last_clkn
+	jam 0,mem_scan_mode
+sim_loop:
+	call idle_dispatch
+	fetch 1,mem_context
+	bbit0 state_inconn,sim_skip
+	set1 mark_tx_l2cap,mark
+	fetch 1,mem_context + coffset_op		
+	set1 op_txl2cap,pdata
+	store 1,mem_context + coffset_op
+	jam 0,mem_context + coffset_lmp_to_send
+	jam 0,mem_lmo_opcode2
+	setarg 300
+	store 2,mem_tx_len
+	setarg mem_tmp_buffer
+	store 2,mem_txptr
+	jam 6,mem_tx_lch
+	jam 1,mem_hci_conn_handle
+sim_skip:
+	call connection_dispatch
+	branch sim_loop		
+
+sim_slave:
+	jam 2,mem_scan_mode
+	call page_scan_dispatch
+	branch sim_skip
+
+sim_le:
+//	jam lemode_2m,mem_le_mode
+//  jam lemode_lr_s2,mem_le_mode
+//  jam lemode_lr_s8,mem_le_mode
+	fetch 1,mem_sim_slave
+	beq 1,sim_le_slave
+	jam 1,mem_le_scan_enable
+sim_le_loop:
+	call le_advertising_dispatch
+	branch sim_le_loop
+
+sim_le_slave:
+	jam 1,mem_le_adv_enable
+	nop 1000
+	branch sim_le_loop
+
+sim_usb:
+	call usb_init
+sim_usb_loop:
+	call usb_isr
+	branch sim_usb_loop
+
+sim_uart:
+	jam 0x67,mem_h5tx_buf
+	setarg mem_h5tx_buf
+	add pdata,0x80,temp
+	call uarta_init_tx
+	increase 0x80,pdata
+	increase 0x80,temp
+	call uartb_init_rx
+	jam gpcfg_uart_txd,core_gpio_conf
+	jam gpcfg_uartb_rxd | gpcfg_pullup,core_gpio_conf + 1
+	jam 0x81,core_uart_ctrl
+	jam 0x81,core_uartb_ctrl
+	setarg 0x30
+	store 2,core_uart_baud
+	store 2,core_uartb_baud
+	fetch 1,mem_sim_slave
+	beq 1,sim_uart_slave
+	call uarta_prepare_tx
+	call sim_uart_wait+3
+	setarg 0x1357d9a
+	istore 4,contu
+	arg 0xaa69,rega
+	istorer rega,2,contu
+	setarg 0xfedcb3
+	istore 3,contu
+	storer contu,2,core_uart_twptr
+sim_uart_wait:
+	fetch 1,core_uart_status
+	bbit1 uart_status_tx_busy,sim_uart_wait
+	nop 200
+	rtn
+
+sim_uart_slave:
+	fetch 1,core_uartb_status
+	bbit1 uart_status_rx_fifo_empty,sim_uart_slave
+	fetch 1,core_uartb_rxitems
+	bne 9,sim_uart_slave
+	fetcht 8,mem_h5tx_buf
+	call uartb_prepare_rx
+	ifetch 8,contu
+	isub temp,null
+	nbranch assert,zero
+	rtn
+
+
+
+sim_cal:
+
+	call tx_iq_precomp
+	fetchr regf,2,mem_omega
+	ifetchr regf,2,contr
+	ifetchr regf,2,contr
+	fetchr regf,2,mem_b1
+	ifetchr regf,2,contr
+	fetchr regf,2,mem_b2
+	ifetchr regf,2,contr
+	arg 0x1000,timeup
+	call tx_iq_cal
+	jam 1,core_ice_ctrl
+
+	arg 0x1000,timeup
+	call rx_iq_comp
+	jam 1,core_ice_ctrl
+	
+
+ifdef NULL
+
+sim_iic:
+	call iicd_init_12m
+	setarg 3
+	store 2,core_iicd_txlen
+	setarg 0x1f051e
+	store 3,mem_iicd_addr
+	setarg mem_iicd_addr
+	store 2,core_iicd_txaddr
+	setarg 1
+	store 2,core_iicd_rxlen
+	jam 3,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	nop 300
+	setarg 0xd321d2
+	store 3,mem_iicd_addr
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+s_loop:
+	branch s_loop
+
+sim_gpio:
+	jam 0xc0,core_gpio_pu3
+	call lpm_disable_exen_output
+	fetch 4,core_gpio_in
+	bbit0 4,sim_gpio + 2
+	nop 3
+	fetch 4,core_gpio_in
+	nop 3
+	fetch 4,core_gpio_in
+	rtn
+
+
+	
+sim_250k:
+	call init_250k
+	fetch 1,0x8001
+	bbit1 7,sim_250k_rx
+	call tx_radio_freq
+	call start_transmitter	/* get ready for that id packet */
+	nop 600
+	enable encode_fec0
+	set1 TXGFSK,radio_ctrl
+	force 0,pdata
+	inject mod,9
+	setarg 0xaa
+	inject mod,8
+	preload access
+	inject mod,32
+	setarg 0x1da861
+	inject mod,24
+	setarg 0x94445b
+	inject mod,24
+	setarg 0x1275f
+	inject mod,24
+	branch loop
+sim_250k_rx:
+	call rx_radio_freq
+	call start_receiver	/* wait for that id packet from master */
+	enable decode_fec0
+	correlate null,never
+	parse demod,bucket,72
+	branch loop
+
+	
+
+
+
+
+sim_spi:
+	call spid_init_flash
+	call spid_unlock_flash
+	call spid_init
+	setarg 0x35
+	call spid_read_reg
+	nop 200
+	force 4,temp
+	setarg 0x42
+	branch spid_read_regs
+
+sim_eep:
+	call iicd_init_12m
+	setarg 3
+	store 2,core_iicd_txlen
+	setarg 0x1f051e
+	store 3,mem_iicd_addr
+	setarg mem_iicd_addr
+	store 2,core_iicd_txaddr
+	setarg 1
+	store 2,core_iicd_rxlen
+	jam 3,core_iicd_ctrl
+	jam iicd_start,core_misc_ctrl
+	call wait_iicd_done
+	nop 200
+	setarg 0x18f7a3b
+	store 4,mem_iicd_addr
+	arg mem_iicd_addr,rega
+	arg 4,temp
+	setarg 0x1235
+	call iicd_write_eep
+	nop 300
+	arg mem_ucode_keybuf,rega
+	arg 1,temp
+	setarg 0x3512
+	store 2,mem_addr_mi
+	call iicd_read_eep
+	arg 1,temp
+	setarg 0x3512
+	store 2,mem_addr_mi
+	call iicd_read_eep
+	nop 200
+	setarg 0xa1
+	arg 3,temp
+	arg mem_ucode_keybuf,rega
+	branch iicd_read_data
+
+sim_otp:
+	setarg 0x123456
+	store 3,0x800
+	setarg 0x10
+	arg 0x800,rega
+	arg 0x10,loopcnt
+	branch otp_write
+
+sim_clk:
+	add lpo_time,12,alarm
+	snooze
+clock_loop:
+	nop 100
+	jam 1,core_config
+	setflag user,0,pdata
+	random pdata
+	and_into 0x1f,pdata
+	store 1,core_clksel
+	nop 70
+	jam 2,core_kick
+	nop 200
+	branch clock_loop
+	jam 2,core_clksel
+	setarg 1500
+	call sleep
+	jam 0x42,core_clksel
+	add lpo_time,200,alarm
+	snooze
+	branch 0x4000
+
+sim_c1:
+	setarg 0xb4b5b6
+	store 3,mem_le_lap
+	setarg 0xb1b2b3
+	istore 3,contw
+	setarg 0xa4a5a6
+	store 3,mem_le_plap
+	setarg 0xa1a2a3
+	istore 3,contw
+	setarg 0x101
+	store 4,mem_le_preq
+	setarg 0x70710
+	istore 3,contw
+	setarg 0x302
+	store 4,mem_le_pres
+	setarg 0x50008
+	istore 3,contw
+
+	arg regidx_key,regext_index
+	arg 4,loopcnt
+sim_clear_key_loop:
+	arg 0,regext
+	increase 1,regext_index
+	loop sim_clear_key_loop
+
+	setarg 0x702EE0
+	store 3,mem_le_rconfirm
+	setarg 0x274EC6
+	istore 3,contw
+	setarg 0x0E6388
+	istore 3,contw
+	setarg 0x56AD6F
+	istore 3,contw
+	setarg 0x83D521
+	istore 3,contw
+	setarg 0x57	
+	istore 1,contw
+	arg mem_le_rconfirm,rega
+	call aes_init
+	call function_c1
+	branch loop
+endif
+
+
+
+
+
+//iic read function
+//function name:sim_iic_read_eep_data
+//input:
+//temp:the length that simulation iic want to read eeprom data
+//rega:the memmory point that simulation iic read data store
+//regb:the eeprom address offset
+//mark_eeprom_size:select 02 or other
+//output:nc
+sim_iic_read_eep_data:
+	fetch 2,mem_eeprom_base
+	iadd regb,pdata
+	byteswap pdata,pdata
+	store 2,mem_addr_mi
+	copy temp,regb
+	
+	call sim_iic_start
+	setarg 0xa0
+	call sim_iic_send_byte
+	fetch 1,mem_addr_mi
+	call sim_iic_send_byte
+	bmark1 mark_eeprom_size,sim_iic_read_eep_data_2k
+	fetch 1,mem_addr_mi + 1
+	call sim_iic_send_byte
+sim_iic_read_eep_data_2k:
+	call sim_iic_stop
+
+	call sim_iic_start
+	setarg 0xa1
+	call sim_iic_send_byte
+
+sim_iic_read_eep_data_loop:
+	call sim_iic_read_byte
+	istore 1,rega
+	increase 1,rega
+	increase -1,regb
+	nbranch sim_iic_read_eep_data_loop,zero
+	branch sim_iic_stop
+
+
+//iic write data function
+//function name:sim_iic_write_eep_data
+//input:
+//temp:the length that simulation iic want to write eeprom data
+//rega:the memmory point that simulation iic write data read
+//regb:the eeprom address
+//mark_eeprom_size:select 02 or other
+//output:nc
+sim_iic_write_eep_data:
+	byteswap regb,pdata
+	store 2,mem_addr_mi
+	copy temp,regb
+
+	call sim_iic_start
+	setarg 0xa0
+	call sim_iic_send_byte
+
+	fetch 1,mem_addr_mi
+	call sim_iic_send_byte
+	bmark1 mark_eeprom_size,sim_iic_write_eep_data_loop
+	fetch 1,mem_addr_mi + 1
+	call sim_iic_send_byte
+sim_iic_write_eep_data_loop:
+	ifetch 1,rega
+	call sim_iic_send_byte
+	increase 1,rega
+	increase -1,regb
+	nbranch sim_iic_write_eep_data_loop,zero
+	branch sim_iic_stop
+//	bmark1 mark_eeprom_size
+
+//use reg:pdata,contr,contw,loopcnt
+sim_iic_wait_ack:
+	arg 10,loopcnt
+	call sim_iic_release_sda
+	call sim_iic_scl_output_high	//scl = 1
+	call sim_iic_delay				//delay 2.5us
+sim_iic_wait_ack_loop:
+	call sim_iic_read_sda_level
+	branch sim_iic_scl_output_low,blank	//scl = 0
+	loop sim_iic_wait_ack_loop
+	branch sim_iic_scl_output_low		//scl = 0	
+
+
+//use reg:pdata,contr,contw,rega,queue
+sim_iic_ack_slave:
+	call sim_iic_scl_output_low		//scl = 0	
+	call sim_iic_sda_output_low		//sda = 0
+	call sim_iic_delay				//delay 2.5us
+	call sim_iic_scl_output_high	//scl = 1
+	call sim_iic_delay				//delay 2.5us
+	branch sim_iic_scl_output_low	//scl = 0	
+
+
+//output:pdata receive byte data
+//use reg:pdata,contr,contw,loopcnt,regc,rega
+sim_iic_read_byte:
+	arg 8,loopcnt
+	arg 0,regc
+	call sim_iic_release_sda
+sim_iic_read_byte_loop:
+	call sim_iic_scl_output_high	//scl = 1
+	call sim_iic_delay				//delay 2.5us
+	lshift regc,regc	
+	call sim_iic_read_sda_level
+	iadd regc,regc
+	call sim_iic_delay				//delay 2.5us
+	call sim_iic_scl_output_low		//scl = 0	
+	loop sim_iic_read_byte_loop
+	call sim_iic_ack_slave
+	copy regc,pdata
+	rtn
+
+//input:pdata send byte data
+//use reg:pdata,contr,contw,loopcnt,regc,rega
+sim_iic_send_byte:
+	arg 8,loopcnt
+	copy pdata,regc
+	call sim_iic_scl_output_low		//scl = 0	
+sim_iic_send_byte_loop:
+	isolate1 7,regc
+	call sim_iic_sda_output_high,true	//sda = 1
+	ncall sim_iic_sda_output_low,true	//sda = 0
+	lshift regc,regc
+	call sim_iic_delay				//delay 2.5us
+	call sim_iic_scl_output_high	//scl = 1
+	call sim_iic_delay				//delay 2.5us
+	call sim_iic_scl_output_low		//scl = 0	
+	call sim_iic_delay				//delay 2.5us
+	loop sim_iic_send_byte_loop
+	branch sim_iic_wait_ack
+
+
+//use reg:pdata,contr,contw,rega
+sim_iic_start:
+	call sim_iic_sda_output_high	//sda = 1
+	call sim_iic_scl_output_high	//scl = 1
+	call sim_iic_delay				//delay 2.5us
+	call sim_iic_sda_output_low		//sda = 0
+	call sim_iic_delay				//delay 2.5us
+	branch sim_iic_scl_output_low		//scl = 0
+
+
+//use reg:pdata,contr,contw,rega
+sim_iic_stop:
+	call sim_iic_sda_output_low		//sda = 0
+	call sim_iic_scl_output_high	//scl = 1
+	call sim_iic_delay				//delay 2.5us
+	call sim_iic_sda_output_high	//sda = 1
+	branch sim_iic_delay				//delay 2.5us
+
+
+//scl = 1
+sim_iic_scl_output_high:
+	enable user
+	fetch 1,SIM_IIC_SCL_GPIO_NUM
+	branch sim_iic_config_gpio
+
+//scl = 0
+sim_iic_scl_output_low:
+	disable user
+	fetch 1,SIM_IIC_SCL_GPIO_NUM
+	branch sim_iic_config_gpio
+
+//sda = 1
+sim_iic_sda_output_high:
+	enable user
+	fetch 1,SIM_IIC_SDA_GPIO_NUM
+	branch sim_iic_config_gpio
+
+//sda = 0
+sim_iic_sda_output_low:
+	disable user
+	fetch 1,SIM_IIC_SDA_GPIO_NUM
+	branch sim_iic_config_gpio
+
+//input:pdata the gpio number
+//input:user flag, if enable user,config gpio output high level; if disable user, config gpio output low level
+//use reg:pdata,contr,contw,queue,rega
+sim_iic_config_gpio:
+	and pdata,0x07,queue
+	rshift3 pdata,pdata
+	arg core_gpio_conf,temp
+	iadd temp,temp
+	ifetch 1,temp
+	qset1 pdata
+	istore 1,temp
+	increase 4,temp
+	ifetch 1,temp
+	qsetflag user,pdata
+	istore 1,temp
+	rtn
+
+
+sim_iic_release_sda:
+	fetch 1,SIM_IIC_SDA_GPIO_NUM
+	and pdata,0x07,queue
+	rshift3 pdata,pdata
+	arg core_gpio_conf,temp
+	iadd temp,temp
+	ifetch 1,temp
+	qset0 pdata
+	istore 1,temp
+	rtn	
+
+//get sda level
+//output:if sda high level ,pdata is 1;if sda low level ,pdata is 0
+//use reg:pdata,contr,contw,queue,rega,temp
+sim_iic_read_sda_level:
+	nop 4
+	fetch 1,SIM_IIC_SDA_GPIO_NUM
+	and pdata,0x07,queue
+	rshift3 pdata,pdata
+	arg core_gpio_in,temp
+	iadd temp,temp
+	setarg 0
+	ifetcht 1,temp
+	qisolate1 temp
+	setflag true,0,pdata
+	rtn	
+
+//delay 2.5us
+sim_iic_delay:
+//	nop 1
+	rtn
+
+/**********************************/
+
+
+
+
Index: mouse_public_3mode_usb/program/simple_pairing.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/simple_pairing.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/simple_pairing.prog	(working copy)
@@ -0,0 +1,2920 @@
+
+publickey_init:
+	fetch 1,mem_ssp_enable
+	nbranch sp_initialize,blank
+	branch sp_initialize_256
+
+sp_calc_sequence_256_check:
+	bpatchx patch2e_5,mem_patch2e
+	fetch 1,mem_ssp_enable
+	rtn blank
+	fetch 1,mem_sp_local_key_invalid
+	rtnne SP_KEY_VALID
+	fetch 1,mem_secure_connections_enable
+	rtn blank
+	fetch 1,mem_sc_local_key_invalid
+	rtneq SP_KEY_VALID_256
+	fetch 2,mem_ui_state_map
+	bbit1 UI_STATE_BT_CONNECTED,stop_publickey_calc_256
+	fetch 1,mem_sc_calc
+	beq SP_CALC_STANDBY,sp_initialize_256
+	rtn
+stop_publickey_calc_256:
+	jam SP_CALC_STANDBY,mem_sc_calc	
+	rtn
+
+
+sp_br_secure_connection_enable:
+	fetch 1,mem_secure_connections_enable
+	set1 SECURE_CONNECTIONS_BR_BIT,pdata
+	store 1,mem_secure_connections_enable
+	rtn
+	
+sp_br_secure_connection_disable:
+	fetch 1,mem_secure_connections_enable
+	set0 SECURE_CONNECTIONS_BR_BIT,pdata
+	store 1,mem_secure_connections_enable
+	rtn
+	
+ifdef SIMPLE_PAIRING
+
+sp_initialize:
+	bpatchx patch2e_6,mem_patch2e
+	fetch 1,mem_ssp_enable 
+	nbranch sp_pubkey_calc, blank
+sp_reset:
+	call sp_clear_flags
+	jam SP_KEY_INVALID,mem_sp_local_key_invalid
+	jam SP_CALC_STANDBY,mem_sp_calc
+	rtn
+	
+sp_wait_pubkey_calc_done:
+	fetch 1,mem_ssp_enable
+	rtn blank
+	fetch 1,mem_sp_local_key_invalid
+	rtneq SP_KEY_VALID
+	call sp_calc_sequence
+	branch sp_wait_pubkey_calc_done
+	
+sp_clear_flags:
+	bpatchx patch2e_7,mem_patch2e
+	setarg mem_sp_state_end
+	arg mem_sp_state_start,contw
+	isub contw,loopcnt
+	call clear_mem
+	setarg mem_sp_state_xmem_end
+	arg mem_sp_state_xmem,contw
+	isub contw,loopcnt
+	branch clear_mem
+
+sp_generate_local_key:
+	jam SP_FLAG_COMMIT,mem_sp_flag  
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,sp_generate_local_key0_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,sp_generate_local_key0_192
+	rtn	
+	
+sp_generate_local_key0_256:
+	fetch 1,mem_sc_local_key_invalid
+	beq SP_KEY_VALID_256,sp_start_send_pubkey_256
+	branch sp_pubkey_calc_256
+sp_start_send_pubkey_256:
+	call sp_dhkey_calc_256
+	fetch 1,mem_master_sp_state
+	nrtn blank
+	jam SP_STAT_KEY_SEND,mem_sp_state
+	rtn
+	
+sp_master_generate_local_key:
+	fetch 1,mem_sp_local_key_invalid
+	beq SP_KEY_VALID,sp_dhkey_calc
+	branch assert
+	
+sp_generate_local_key0_192:
+	fetch 1,mem_sp_local_key_invalid
+	beq SP_KEY_VALID,sp_start_send_pubkey
+	branch sp_pubkey_calc
+    
+sp_start_send_pubkey:
+	call sp_dhkey_calc
+	fetch 1,mem_master_sp_state
+	nrtn blank
+	jam SP_STAT_KEY_SEND,mem_sp_state
+	rtn
+
+
+sp_calc_check_publickey_256:
+	call sp_calc_b256
+	arg mem_le_pubkey_remote_y_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256   
+	arg mem_le_pubkey_remote_x_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256   
+  	arg mem_t2_256,rega
+	arg mem_le_pubkey_remote_x_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256	
+  	arg mem_a_256,rega
+	arg mem_le_pubkey_remote_x_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	
+  	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256	 
+  	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	call bn_addmod_256	 
+	arg 32,loopcnt
+  	arg mem_t7_256,rega
+	arg mem_t0_256,regb
+	branch  string_compare
+	
+sp_calc_b256:
+	arg mem_gy_256,rega
+	arg mem_t0_256,contw
+	call bn_sqrmod_256   
+	arg mem_gx_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256    
+  	arg mem_t2_256,rega
+	arg mem_gx_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256	
+  	arg mem_a_256,rega
+	arg mem_gx_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	 
+  	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256	 
+  	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	branch  bn_submod_256	
+	
+sp_calc_check_publickey:
+	call sp_calc_b
+	arg mem_sp_pubkey_remote_y,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod 
+	arg mem_sp_pubkey_remote_x,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod
+  	arg mem_t2_256,rega
+	arg mem_sp_pubkey_remote_x,regb
+	arg mem_t2_256,contw
+	call bn_mulmod	
+  	arg mem_a,rega
+	arg mem_sp_pubkey_remote_x,regb
+	arg mem_t3_256,contw
+	call bn_mulmod	
+  	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod	 
+  	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	call bn_addmod	 
+ 	arg 24,loopcnt
+ 	arg mem_t7_256,rega
+	arg mem_t0_256,regb
+	branch  string_compare
+	
+sp_calc_b:
+	arg mem_gy,rega
+	arg mem_t0_256,contw
+	call bn_sqrmod   
+	arg mem_gx,rega
+	arg mem_t2_256,contw
+  	call bn_sqrmod
+  	arg mem_t2_256,rega
+	arg mem_gx,regb
+	arg mem_t2_256,contw
+	call bn_mulmod	
+	arg mem_a,rega
+	arg mem_gx,regb
+	arg mem_t3_256,contw
+	call bn_mulmod	 
+  	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod	 
+  	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	branch  bn_submod	
+
+   
+sp_calculate_commitment:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,sp_calculate_commitment_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,sp_calculate_commitment_192
+	rtn
+
+sp_calculate_commitment_256:
+	fetch 1,mem_sc_calc
+	bne SP_CALC_STANDBY,sp_calculate_commitment_wait_dhkey_calc
+	call sp_local_random_key_generator
+	arg mem_sp_prarm_stack,contw
+	setarg mem_sp_random_local_end
+	istore 2,contw
+	setarg mem_sc_pubkey_local_x_256+32
+	istore 2,contw
+	setarg mem_le_pubkey_remote_x_256+32
+	istore 2,contw
+//	branch sp_calculate_commitment0
+sp_calculate_commitment0_256:
+	call function_f1_256
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_COMMIT_CALC,master_sp_calculate_commitment0
+	jam SP_FLAG_COMMIT,mem_sp_flag
+	jam SP_STAT_COMMIT_SEND,mem_sp_state
+	rtn
+	
+sp_calculate_commitment_192:	
+	fetch 1,mem_sp_calc
+	bne SP_CALC_STANDBY,sp_calculate_commitment_wait_dhkey_calc
+	call sp_local_random_key_generator
+	arg mem_sp_prarm_stack,contw
+	setarg mem_sp_random_local_end
+	istore 2,contw
+	setarg mem_sp_pubkey_local_x_end
+	istore 2,contw
+	setarg mem_sp_pubkey_remote_x_end
+	istore 2,contw
+	branch sp_calculate_commitment0
+master_sp_calculate_commitment:
+	arg mem_sp_prarm_stack,contw
+	setarg mem_sp_random_remote_end
+	istore 2,contw
+	setarg mem_sp_pubkey_remote_x_end
+	istore 2,contw
+	setarg mem_sp_pubkey_local_x_end
+	istore 2,contw
+sp_calculate_commitment0:
+	call function_f1_192
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_COMMIT_CALC,master_sp_calculate_commitment0
+	jam SP_FLAG_COMMIT,mem_sp_flag
+	jam SP_STAT_COMMIT_SEND,mem_sp_state
+	rtn
+master_sp_calculate_commitment0:
+	jam SP_STAT_COMMITMENT_COMPARE,mem_master_sp_state
+	call sp_master_generate_local_key
+	branch master_set_mem_master_sp_flag 
+
+sp_local_random_key_generator:
+	arg mem_sp_random_local,contw
+	force 8,queue
+	branch random_generator
+  
+sp_calculate_commitment_wait_dhkey_calc:
+	jam      SP_FLAG_COMMIT,mem_sp_flag
+	rtn
+    
+sp_confirm_check:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,sp_confirm_check_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,sp_confirm_check_192
+sp_confirm_check_wait:
+	jam SP_STAT_CONFIRM_CHECK,mem_sp_state
+	jam SP_FLAG_COMMIT,mem_sp_flag  
+	rtn
+
+sp_confirm_check_256:	
+	fetch 1,mem_sp_dhkey_invalid
+	bne SP_KEY_VALID_256,sp_confirm_check_wait
+	branch sp_confirm_check_common
+	
+sp_confirm_check_192:	
+	fetch 1,mem_sp_dhkey_invalid
+	bne SP_KEY_VALID,sp_confirm_check_wait
+sp_confirm_check_common:	
+	arg      mem_addr_value,contw
+	fetch    6,mem_lap
+	istore   6,contw
+	fetch    6,mem_plap
+	istore   6,contw
+	fetch    3,mem_sp_iocap_remote
+	istore   3,contw 
+
+	call     function_f3a
+
+	arg      mem_sp_calc_result_high,rega
+	arg      mem_sp_check_result,regb    
+	force    4,queue 
+	call     compare4
+	nbranch  sp_confirm_check_failed,true  
+
+	call sp_confirm_check_success
+	jam LMP_DHKey_Check,mem_lmi_opcode2
+	branch tid_set_reply
+    
+sp_confirm_check_success:
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_CONFIRM_CHECK,sp_confirm_check_success_master
+	jam SP_STAT_CONFIRM_CALC,mem_sp_state
+	jam SP_FLAG_COMMIT,mem_sp_flag  
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	rtn
+sp_confirm_check_success_master:
+	jam LMP_ACCEPTED,mem_lmo_opcode2
+	jam SP_STATE_END,mem_master_sp_state
+	branch master_set_mem_master_sp_flag
+	//accept opcode?
+	
+sp_confirm_check_failed:
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_CONFIRM_CHECK,sp_confirm_check_failed_master
+	jam SP_STAT_NULL,mem_sp_state
+	jam LMP_NOT_ACCEPTED,mem_lmo_opcode2
+	//accept opcode?
+	jam      AUTHENTICATION_FAILURE_ERROR,mem_lmo_reason2 
+	rtn
+sp_confirm_check_failed_master:
+	jam LMP_NOT_ACCEPTED,mem_lmo_opcode2
+	jam SP_STAT_NULL,mem_master_sp_state
+	rtn
+    
+sp_confirm_calc:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,sp_confirm_calc_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,sp_confirm_calc_192
+	rtn
+	
+sp_confirm_calc_256:	
+	fetch 1,mem_sp_dhkey_invalid
+	beq SP_KEY_VALID_256,sp_confirm_calc_ready
+	jam 	SP_STAT_CONFIRM_CALC,mem_master_sp_state
+	branch master_set_mem_master_sp_flag
+	
+sp_confirm_calc_192:
+	fetch 1,mem_sp_dh_ready
+	beq SP_FLAG_COMMIT, sp_confirm_calc_ready
+	jam 	SP_STAT_CONFIRM_CALC,mem_master_sp_state
+	branch master_set_mem_master_sp_flag
+	
+sp_confirm_calc_ready:
+	arg      mem_addr_value,contw
+	fetch    6,mem_plap
+	istore   6,contw
+	fetch    6,mem_lap
+	istore   6,contw
+	fetch    3,mem_lmp_io_cap_payload_iocap
+	istore   3,contw 
+
+	call     function_f3b
+	fetch 1,mem_master_sp_state
+	beq SP_STAT_CONFIRM_CALC,sp_confirm_calc_master
+	jam      SP_STAT_CONFIRM_SEND,mem_sp_state
+	jam      SP_FLAG_COMMIT,mem_sp_flag
+	rtn
+sp_confirm_calc_master:
+	jam      SP_STAT_CONFIRM_SEND,mem_master_sp_state
+	jam      SP_FLAG_COMMIT,mem_master_sp_flag
+	rtn   
+
+sp_master_key_prarm_push:
+	arg mem_sp_prarm_stack,contw
+	fetch    6,mem_plap
+	istore   6,contw
+	fetch    6,mem_lap
+	istore   6,contw
+	setarg mem_sp_random_local_end
+	istore 2,contw
+	setarg mem_sp_random_remote_end
+	istore 2,contw
+	branch sp_link_key_calc
+sp_link_key_prarm_push:
+	jam      SP_STAT_DONE,mem_sp_state    
+	arg mem_sp_prarm_stack,contw
+	fetch    6,mem_lap
+	istore   6,contw
+	fetch    6,mem_plap
+	istore   6,contw
+	setarg mem_sp_random_remote_end
+	istore 2,contw
+	setarg mem_sp_random_local_end
+	istore 2,contw
+sp_link_key_calc:
+    /*calculate Link key here */
+	arg      mem_addr_value,contw
+	fetch    6,mem_sp_prarm_stack
+	istore   6,contw
+	fetch    6,mem_sp_prarm_stack+6
+	istore   6,contw
+	
+	call     function_f2    
+
+	/*handle linkkey  */
+	jam 1,mem_link_key_exists
+	arg mem_link_key,contw
+	arg mem_sp_calc_result_high,contr
+	call memcpy16
+	branch  generate_linkkey_continue
+
+//FF18A5F4EFD25E622B140CCFD6F15D0027DC8D91865F9107
+sp_debug_private:
+  	arg mem_sp_private_key,contw
+        setsect 0,0x118ff
+        setsect 1,0x3fd29
+        setsect 2,0x1ed2e
+        setsect 3,0xad89
+        istore 9,contw
+        setsect 0,0x30c14
+        setsect 1,0x75b3
+        setsect 2,0x5df
+        setsect 3,0x3709c
+        istore 9,contw
+        setsect 0,0x2918d
+        setsect 1,0x57e1
+        setsect 2,0x79
+        istore 6,contw
+        rtn
+	
+    
+sp_pubkey_calc:
+	bpatchx patch2f_0,mem_patch2f
+	fetch    1,mem_sp_local_key_invalid
+	rtnne SP_KEY_INVALID
+	fetch    1,mem_sp_calc
+	rtnne  SP_CALC_STANDBY
+//	call init_memp
+	arg      mem_sp_private_key,contw 
+	force    11,queue
+	call     random_generator
+	random   pdata
+	rshift   pdata,pdata
+	istore   2,contw 
+
+	fetch 1,mem_sp_debug_mode
+	ncall sp_debug_private,blank
+	 
+	arg      mem_k,contw
+	arg      mem_sp_private_key,contr	
+	call     memcpy24 //mem_sp_private_key=>mem_k 24BYTES
+
+	arg      mem_ax,contw
+	arg      mem_gx,contr
+	call     memcpy48 //mem_gx=>mem_ax 48bytes
+
+	arg      mem_az,contw
+	call     bn_zero
+	jam      1,mem_az //0=>mem_az 24bytes
+
+	call     eckp_calc_init
+	jam SP_CALC_PUBKEY,mem_sp_calc
+	rtn    
+	
+sp_pubkey_generated:
+	arg      mem_sp_pubkey_local,contw
+	arg      mem_bx,contr
+	call     memcpy48   
+	jam      SP_KEY_VALID,mem_sp_local_key_invalid
+	jam      SP_CALC_STANDBY,mem_sp_calc
+	rtn
+
+sp_dhkey_calc:
+	bpatchx patch2f_1,mem_patch2f
+	fetch    1,mem_sp_dhkey_invalid
+	rtnne  SP_KEY_INVALID
+	fetch    1,mem_sp_calc
+	rtnne  SP_CALC_STANDBY
+
+	arg      mem_k,contw
+	arg      mem_sp_private_key,contr	
+	call     memcpy24
+
+	arg      mem_ax,contw
+	arg      mem_sp_pubkey_remote,contr
+	call     memcpy48
+
+	arg      mem_az,contw
+	call     bn_zero
+	jam      1,mem_az
+
+	call     eckp_calc_init
+	jam      SP_CALC_DHKEY,mem_sp_calc
+	rtn 	
+	
+sp_dhkey_generated:
+	jam SP_FLAG_COMMIT,mem_sp_dh_ready
+	arg mem_sp_dhkey,contw
+	arg mem_bx,contr
+	call memcpy24
+	jam SP_KEY_VALID,mem_sp_dhkey_invalid
+	jam SP_CALC_STANDBY,mem_sp_calc
+	rtn
+
+random_generator:
+	increase -1,queue
+	nrtn     positive
+	random   pdata
+	istore   2,contw  
+	branch   random_generator
+compare4:
+	increase -1,queue
+	nbranch  compare4_success,positive
+	ifetch   4,rega
+	copy     pdata,temp
+	ifetch   4,regb
+	iflip    temp,pdata
+	nbranch  compare4_failed,zero
+	increase 4,rega
+	increase 4,regb
+	branch   compare4
+compare4_failed:
+	disable  true
+	rtn
+compare4_success:
+	enable   true
+	rtn
+
+/*************************************************/
+/** Message state machine routines ***************/
+/*************************************************/
+// simple pairing support 
+
+simple_pairing_sequence:
+	bpatchx patch2f_2,mem_patch2f
+         fetch 1,mem_sp_flag
+         rtn blank
+	call lmo_fifo_check
+	nrtn blank
+	jam      SP_FLAG_STANDBY,mem_sp_flag
+	fetch    1,mem_sp_state
+	beq  SP_STAT_KEY_SEND,sp_send_LMP_ENCAPSULATED_HEADER
+	beq  SP_STAT_COMMIT_SEND,sp_send_LMP_SIMPLE_PAIRING_COMFIRM
+	beq  SP_STAT_RANDOM_SEND,sp_send_LMP_SIMPLE_PAIRING_NUMBER
+	beq  SP_STAT_CONFIRM_SEND,sp_send_LMP_DHKEY_CHECK
+	beq  SP_STAT_KEY_GENERATE,sp_generate_local_key
+	beq  SP_STAT_COMMIT_CALC,sp_calculate_commitment
+	beq  SP_STAT_CONFIRM_CHECK,sp_confirm_check
+	beq  SP_STAT_CONFIRM_CALC,sp_confirm_calc
+	beq  SP_STAT_LINK_KEY_CALC,sp_link_key_prarm_push
+	//beq  SP_STAT_FEATURE_EXT_SEND,send_LMP_FEATURES_REQ_EXT
+	rtn  
+
+master_simple_paring_sequence:
+	bpatchx patch2f_3,mem_patch2f
+	fetch 1,mem_master_sp_flag
+	rtn blank
+	call lmo_fifo_check
+	nrtn blank
+	jam SP_FLAG_STANDBY,mem_master_sp_flag
+	fetch 1,mem_master_sp_state
+	beq SP_MASTER_STAT_START_SKIP,sp_master_send_io_cap_get
+	beq SP_MASTER_STAT_START_DONE,sp_master_send_io_cap_send
+	beq SP_STAT_KEY_SEND,sp_master_send_LMP_ENCAPSULATED_HEADER
+	beq SP_STAT_COMMIT_CALC,master_sp_calculate_commitment
+	beq SP_STAT_COMMITMENT_COMPARE,sp_master_commitment_compare
+	beq SP_STAT_RANDOM_SEND,sp_master_send_LMP_SIMPLE_PAIRING_NUMBER
+	beq SP_STAT_CONFIRM_CALC,sp_confirm_calc
+	beq SP_STAT_CONFIRM_SEND,master_sp_send_lmp_dhkey_check
+	beq SP_STAT_CONFIRM_CHECK,sp_confirm_check
+	beq SP_STATE_END,master_sp_sm_end
+	rtn
+
+master_set_mem_master_sp_flag:
+	jam SP_FLAG_COMMIT,mem_master_sp_flag
+	rtn
+	
+master_clear_mem_master_sp_flag:
+	jam SP_FLAG_STANDBY,mem_master_sp_flag
+	rtn
+sp_calc_sequence:
+	bpatchx patch2f_4,mem_patch2f
+	fetch 1,mem_ssp_enable
+	rtn blank
+	fetch 1,mem_sp_calc
+	rtn blank
+	increase 0x80,pdata
+	store    1,mem_sp_calc
+	rtnbit1 7
+	fetch    1,mem_ec_loopc
+	branch   sp_calc_sequence_done,blank
+	branch   eckp_calc
+
+sp_calc_sequence_done:    
+	call ecunmapz
+	fetch 1,mem_sp_calc
+	beq  SP_CALC_PUBKEY,sp_pubkey_generated
+	beq  SP_CALC_DHKEY,sp_dhkey_generated
+	rtn
+
+
+bn_testbit:
+	and pdata,7,queue
+	rshift3 pdata,pdata
+	iadd contr,contr
+	ifetch 1,contr
+	qisolate0 pdata
+	rtn
+
+
+ec_copy:
+	call memcpy24
+	call memcpy24
+	branch memcpy24
+	
+	
+bn_eq_zero:
+	ifetch 8,contr
+	nrtn blank
+	ifetch 8,contr
+	nrtn blank
+	ifetch 8,contr
+	rtn
+	
+	
+	/* return zero if eq */
+
+bn_eq_0:	
+	ifetch 4,rega
+	iforce temp
+	ifetch 4,regb
+	isub temp,null
+	nrtn zero
+	increase 4,rega
+	increase 4,regb
+	loop bn_eq_0
+	rtn
+
+	/* return positive if A >= B */
+bn_bigeq:
+	force 6,loopcnt
+	increase 20,rega
+	increase 20,regb
+bn_bigeq_0:	
+	ifetch 4,regb
+	iforce temp
+	ifetch 4,rega
+	isub temp,pdata
+	nrtn positive
+	nrtn blank
+	increase -4,rega
+	increase -4,regb
+	loop bn_bigeq_0
+	rtn
+
+bn_add:
+	force 6,loopcnt
+	force 0,regc
+bn_add_0:	
+	ifetch 4,rega
+	iforce temp
+	ifetch 4,regb
+	iadd temp,pdata
+	iadd regc,pdata
+	istore 4,contw
+	isolate1 32,pdata
+	setflag true,0,regc
+	increase 4,rega
+	increase 4,regb
+	loop bn_add_0
+	rtn
+
+bn_sub:
+	force 6,loopcnt
+	force 0,regc
+bn_sub_0:	
+	ifetch 4,regb
+	iforce temp
+	ifetch 4,rega
+	isub temp,pdata
+	isub regc,pdata
+	istore 4,contw
+	isolate1 32,pdata
+	setflag true,0,regc
+	increase 4,rega
+	increase 4,regb
+	loop bn_sub_0
+	rtn
+
+bn_rshift6:
+	force 6,loopcnt
+	increase 20,rega
+bn_rshift:
+	force 0,regc
+bn_rshift_0:	
+	ifetch 4,rega
+	isolate1 0,pdata
+	setflag true,1,regc
+	rshift pdata,pdata
+	isolate1 0,regc
+	setflag true,31,pdata
+	istore 4,rega
+	increase -4,rega
+	rshift regc,regc
+	loop bn_rshift_0
+	rtn
+
+bn_lshift:
+	force 6,loopcnt
+	force 0,regc
+bn_lshift_0:	
+	ifetch 4,rega
+	isolate1 31,pdata
+	setflag true,1,regc
+	lshift pdata,pdata
+	isolate1 0,regc
+	setflag true,0,pdata
+	istore 4,rega
+	increase 4,rega
+	rshift regc,regc
+	loop bn_lshift_0
+	rtn
+	
+bn_lshiftmod:
+	call bn_lshift
+bn_lshiftmod_ismod:	
+	isolate1 0,regc
+	branch bn_lshiftmod_0,true
+	arg mem_p,regb
+	copy rega,regc
+	increase -24,rega
+	call bn_bigeq
+	nrtn positive
+	copy regc,rega
+bn_lshiftmod_0:
+	increase -24,rega
+	arg mem_p,regb
+	copy rega,contw
+	branch bn_sub
+	
+
+bn_addmod:
+	call bn_add
+	copy contw,rega
+	branch bn_lshiftmod_ismod
+	
+bn_submod:
+	call bn_sub
+	isolate0 0,regc
+	rtn true
+	arg mem_p,regb
+	add contw,-24,rega
+	copy rega,contw
+	branch bn_add
+	
+
+bn_p192mod:
+	copy contw,timeup				/* save result ptr */
+	copy rega,alarm				/* temp save rega */
+	arg mem_tmp2,regb
+	copy regb,contw
+	add rega,24,contr
+	ifetch 8,contr
+	istore 8,contw
+	istore 8,contw
+	force 0,pdata
+	istore 8,contw
+	copy timeup,contw
+	call bn_addmod
+	arg mem_tmp2,regb
+	copy regb,contw
+	force 0,pdata
+	istore 8,contw
+	add alarm,32,contr
+	ifetch 8,contr
+	istore 8,contw
+	istore 8,contw
+	copy timeup,rega
+	copy rega,contw
+	call bn_addmod
+	arg mem_tmp2,regb
+	copy regb,contw
+	add alarm,40,contr
+	ifetch 8,contr
+	istore 8,contw
+	istore 8,contw
+	istore 8,contw
+	copy timeup,rega
+	copy rega,contw
+	branch bn_addmod
+		
+
+bn_load:
+	force 6,loopcnt
+bn_load_0:	
+	ifetch 4,contr
+	iforce regext
+	increase 1,regext_index
+	loop bn_load_0
+	rtn
+
+
+	/* cost 1562 clks */	
+bn_mulmod:
+	copy contw,timeup					/* save result ptr */
+	arg mem_tmp1,contw
+	call bn_zero
+	arg mem_tmp1,contw
+	copy rega,contr
+	force 0,regext_index
+	call bn_load
+	copy regb,contr
+	call bn_load
+	force 0,regb
+bn_mulmod_1:	
+	force 0,temp
+	force 6,regc
+bn_mulmod_0:
+	ifetch 4,contw					/* d[i+j] */
+	iforce rega
+	copy regb,regext_index
+	deposit regext
+	copy regc,regext_index
+	imul32 regext,pdata
+	iadd rega,pdata					/* uv = a[i]*b[j] + d[i+j] */
+	iadd temp,pdata					/* uv += u */
+	istore 4,contw					/* ->d[i+j] */
+	rshift32 pdata,temp				/* temp = u = uv >> 32 */
+	increase 1,regc
+	compare 12,regc,0xff
+	nbranch bn_mulmod_0,true
+	deposit temp
+	istore 4,contw					/* d[i + 12] = u */
+	increase -24,contw
+	increase 1,regb
+	compare 6,regb,0xff
+	nbranch bn_mulmod_1,true
+	arg mem_tmp1,rega
+	copy timeup,contw
+	branch bn_p192mod
+
+	
+bn_sqrmod:
+	copy rega,regb
+	branch bn_mulmod
+
+bn_rshifteven:
+	copy rega,alarm
+bn_rshifteven_1:
+	copy alarm,rega
+	ifetch 1,rega
+	isolate1 0,pdata
+	rtn true
+	call bn_rshift6
+	ifetch 1,regb
+	isolate0 0,pdata
+	branch bn_rshifteven_0,true
+	arg mem_p,rega
+	copy regb,contw
+	call bn_add
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb						/* [6] */
+	increase -24,regb
+bn_rshifteven_0:
+	add regb,24,rega
+	force 7,loopcnt
+	call bn_rshift
+	branch bn_rshifteven_1
+
+	/* cost 141910 clks */
+bn_invmod:
+	copy contw,timeup					/* save result ptr */
+	arg mem_tmp0,contw				/* x */
+	call bn_zero
+	force 0,pdata
+	store 4,mem_tmp5
+	store 4,mem_t2
+	jam 1,mem_tmp0
+	arg mem_tmp1,contw				/* y */
+	call bn_zero
+	arg mem_p,contr
+	arg mem_tmp2,contw				/* a */
+	call memcpy24
+	copy rega,contr
+	arg mem_tmp3,contw				/* b */
+	call memcpy24
+bn_invmod_2:	
+	arg mem_tmp3,contr
+	call bn_eq_zero
+	branch bn_invmod_0,blank
+	arg mem_tmp3,rega
+	arg mem_tmp0,regb
+	call bn_rshifteven
+
+	arg mem_tmp2,rega
+	arg mem_tmp1,regb
+	call bn_rshifteven
+	arg mem_tmp3,rega
+	arg mem_tmp2,regb
+	call bn_bigeq
+	branch bn_invmod_1,positive
+	arg mem_tmp2,rega
+	arg mem_tmp3,regb
+	copy rega,contw
+	call bn_sub
+	arg mem_tmp0,rega
+	arg mem_tmp1,regb
+	copy regb,contw
+	call bn_add
+	ifetch 1,rega
+	iadd regc,regc
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb
+	branch bn_invmod_2
+bn_invmod_1:
+	arg mem_tmp3,rega
+	arg mem_tmp2,regb
+	copy rega,contw
+	call bn_sub
+	arg mem_tmp1,rega
+	arg mem_tmp0,regb
+	copy regb,contw
+	call bn_add
+	ifetch 1,rega
+	iadd regc,regc
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb
+	branch bn_invmod_2
+bn_invmod_0:
+	arg mem_tmp0,contw
+	call bn_zero
+	fetch 1,mem_tmp5
+	store 1,mem_tmp0
+	store 1,mem_tmp0a
+	arg mem_tmp0,rega
+	arg mem_tmp1,regb
+	copy regb,contw
+	call bn_addmod
+	arg mem_p,rega
+	arg mem_tmp1,regb
+	copy timeup,contw
+	branch bn_submod
+	
+
+
+	/* cost 64742 clks */
+ecdbl:
+	arg mem_cz,rega
+	arg mem_t2,contw
+	call bn_sqrmod
+	arg mem_t2,rega
+	arg mem_t3,contw
+	call bn_sqrmod
+	arg mem_a,rega
+	arg mem_t3,regb
+	arg mem_t3,contw
+	call bn_mulmod		/* t3=a*z4	*/
+	arg mem_cx,rega
+	arg mem_t2,contw
+	call bn_sqrmod
+	arg mem_t2,contr
+	arg mem_t1,contw
+	call memcpy24
+	arg mem_t1,rega
+	call bn_lshiftmod
+	arg mem_t2,rega
+	arg mem_t1,regb
+	arg mem_t2,contw
+	call bn_addmod
+	arg mem_t2,rega
+	arg mem_t3,regb
+	arg mem_t2,contw
+	call bn_addmod		/* t2=3*x2 + z*z4		D  */
+	arg mem_cx,contr
+	arg mem_t1,contw
+	call memcpy24
+	arg mem_cy,rega
+	arg mem_t3,contw
+	call bn_sqrmod
+	arg mem_t1,rega
+	call bn_lshiftmod
+	arg mem_t1,rega
+	call bn_lshiftmod
+	arg mem_t1,rega		
+	arg mem_t3,regb
+	arg mem_t1,contw
+	call bn_mulmod		/* t1=4x*y2	B	*/
+	arg mem_t3,rega
+	arg mem_t0,contw
+	call bn_sqrmod
+	arg mem_t0,rega
+	call bn_lshiftmod
+	arg mem_t0,rega
+	call bn_lshiftmod		
+	arg mem_t0,rega		
+	call bn_lshiftmod		/* t0=8*y4		C */
+	arg mem_cy,contr
+	arg mem_t3,contw
+	call memcpy24
+	arg mem_t3,rega
+	call bn_lshiftmod
+	arg mem_t3,rega
+	arg mem_cz,regb
+	arg mem_cz,contw
+	call bn_mulmod		
+	arg mem_t2,rega
+	arg mem_t3,contw
+	call bn_sqrmod
+	arg mem_t3,rega
+	arg mem_t1,regb
+	arg mem_t3,contw
+	call bn_submod
+	arg mem_t3,rega
+	arg mem_t1,regb
+	arg mem_cx,contw
+	call bn_submod
+	arg mem_t1,rega
+	arg mem_cx,regb
+	arg mem_t3,contw
+	call bn_submod
+	arg mem_t3,rega
+	arg mem_t2,regb
+	arg mem_t3,contw
+	call bn_mulmod		
+	arg mem_t3,rega
+	arg mem_t0,regb
+	arg mem_cy,contw
+	branch bn_submod
+	
+
+	/* cost 104904	clks */
+ecadd:
+	arg mem_az,rega
+	arg mem_t7,contw
+	call bn_sqrmod
+	arg mem_cx,rega
+	arg mem_t7,regb
+	arg mem_t0,contw
+	call bn_mulmod		/* n1=t0=xa*zb2  */
+	arg mem_az,rega
+	arg mem_t7,regb
+	arg mem_t7,contw
+	call bn_mulmod	
+	arg mem_cy,rega
+	arg mem_t7,regb
+	arg mem_t1,contw
+	call bn_mulmod		/* n2=t1=ya*zb3 */
+	arg mem_cz,rega
+	arg mem_t7,contw
+	call bn_sqrmod
+	arg mem_ax,rega
+	arg mem_t7,regb
+	arg mem_t2,contw
+	call bn_mulmod		/* n3=t2=xb*za2 */
+	arg mem_cz,rega
+	arg mem_t7,regb
+	arg mem_t7,contw
+	call bn_mulmod	
+	arg mem_ay,rega
+	arg mem_t7,regb
+	arg mem_t3,contw
+	call bn_mulmod		/* n4=t3=yb*za3 */
+	arg mem_t0,rega
+	arg mem_t2,regb
+	arg mem_t7,contw
+	call bn_submod		/* n5=t7=n1-n3=t0-t2 */
+	arg mem_t0,rega
+	arg mem_t2,regb
+	arg mem_t0,contw
+	call bn_addmod		/* n7=t0=n1+n3=t0+t2 */
+	arg mem_t1,rega
+	arg mem_t3,regb
+	arg mem_t2,contw
+	call bn_submod		/* n6=t2=n2-n4=t1-t3 */
+	arg mem_t1,rega
+	arg mem_t3,regb
+	arg mem_t1,contw
+	call bn_addmod		/* n8=t1=n2+n4=t1+t3 */
+	arg mem_t1,rega
+	arg mem_t7,regb
+	arg mem_t1,contw
+	call bn_mulmod		/* t1=n8*n5 */
+	arg mem_cz,rega
+	arg mem_az,regb
+	arg mem_t3,contw
+	call bn_mulmod	
+	arg mem_t3,rega
+	arg mem_t7,regb
+	arg mem_cz,contw
+	call bn_mulmod		/* z=za*zb*n5 */
+	arg mem_t7,rega
+	arg mem_t7,contw
+	call bn_sqrmod		/* t7=n5^2 */
+	arg mem_t7,rega
+	arg mem_t0,regb
+	arg mem_t3,contw
+	call bn_mulmod		/* t3=n5^2*n7 */
+	arg mem_t7,rega
+	arg mem_t1,regb
+	arg mem_t1,contw
+	call bn_mulmod		/* t1=n8*n5^3 */
+	arg mem_t2,rega
+	arg mem_cx,contw
+	call bn_sqrmod		
+	arg mem_cx,rega
+	arg mem_t3,regb
+	arg mem_cx,contw
+	call bn_submod		/* x=n6^2-n5^2*n7 */
+	arg mem_cx,contr
+	arg mem_t7,contw
+	call memcpy24
+	arg mem_t7,rega
+	call bn_lshiftmod		/* t7=2*x */
+	arg mem_t3,rega
+	arg mem_t7,regb
+	arg mem_t3,contw
+	call bn_submod		/* t3=n9 */
+	arg mem_t3,rega
+	arg mem_t2,regb
+	arg mem_t2,contw
+	call bn_mulmod		/* t2=n9*n6 */
+	arg mem_t2,rega
+	arg mem_t1,regb
+	arg mem_cy,contw
+	call bn_submod	
+	arg mem_cy,rega
+	arg mem_p,regb
+	arg mem_cy,contw
+	force 0,regc
+	fetch 1,mem_cy
+	isolate1 0,pdata
+	call bn_add,true
+	copy regc,alarm
+	arg mem_cy,rega
+	call bn_rshift6
+	fetch 1,mem_cy5
+	isolate1 0,alarm
+	setflag true,7,pdata
+	store 1,mem_cy5
+	rtn
+
+	/* cost 22276983 clks */
+
+eckp_0:	
+	fetch 1,mem_ec_loopc
+	increase -1,pdata
+	nrtn positive
+	store 1,mem_ec_loopc
+	fetch 1,mem_ec_infinite
+	call ecdbl,blank
+	fetch 1,mem_ec_loopc
+	arg mem_k,contr
+	call bn_testbit
+	branch eckp_0,true
+	fetch 1,mem_ec_infinite
+	nbranch eckp_1,blank
+	call ecadd
+	branch eckp_0
+eckp_1:
+	jam 0,mem_ec_infinite
+	arg mem_ax,contr
+	arg mem_cx,contw
+	call ec_copy
+	branch eckp_0
+
+	/* cost 162522 clks */
+ecunmapz:
+	arg mem_cz,rega
+	arg mem_t3,contw
+	call bn_invmod			/* t3 = 1/z */
+	arg mem_t3,rega
+	arg mem_t1,contw		
+	call bn_sqrmod			/* t1 = 1/z2 */
+	arg mem_cx,rega
+	arg mem_t1,regb
+	arg mem_bx,contw
+	call bn_mulmod
+	arg mem_t3,rega
+	arg mem_t1,regb
+	arg mem_t2,contw			
+	call bn_mulmod			/* t2 = 1/z3 */
+	arg mem_cy,rega
+	arg mem_t2,regb
+	arg mem_by,contw
+	branch bn_mulmod		
+	
+	
+
+sha_endian_swap2:	
+	ifetch 4,contr
+	force 4,rega
+	increase 3,contw
+sha_endian_loop:	
+	istore 1,contw
+	rshift8 pdata,pdata
+	increase -2,contw
+	increase -1,rega
+	nbranch sha_endian_loop,zero
+	increase 5,contw
+	loop sha_endian_swap2
+	rtn	
+
+
+sha_getw:
+	lshift2 queue,pdata
+	iadd timeup,contr
+	ifetch 4,contr
+	rtn
+	
+sha_r:
+	force 16,alarm
+	arg memdat,timeup
+sha_r_loop:	
+	add alarm,-7,queue
+	call sha_getw
+	iforce temp						/* W[t - 7] */
+	add alarm,-16,queue
+	call sha_getw
+	iadd temp,temp					/* W[t-7] + W[t-16] */
+	add alarm,-2,queue
+	call sha_getw
+	shasx pdata,1,pdata
+	iadd temp,temp					/* S1(W[t -  2]) + W[t-7] + W[t-16] */
+	add alarm,-15,queue
+	call sha_getw
+	shasx pdata,0,pdata
+	iadd temp,temp					/* S0(W[t - 15]) + S1(W[t -  2]) + W[t-7] + W[t-16] */
+	lshift2 alarm,pdata
+	iadd timeup,contw
+	istoret 4,contw
+	increase 1,alarm
+	compare 64,alarm,0xff
+	nbranch sha_r_loop,true
+	rtn
+	
+
+sha_init:
+	arg memh0,contr
+	force 7,regext_index
+sha_init_0:	
+	ifetch 4,contr
+	iforce regext
+	increase -1,regext_index
+	branch sha_init_0,positive
+	rtn
+
+sha:
+	bpatchx patch2f_5,mem_patch2f
+	call sha_r		/* preprocessing data into R() */
+	arg memahbak,contw
+	force 0,regext_index
+sha_0:	
+	deposit regext
+	istore 4,contw
+	increase 1,regext_index
+	compare 8,regext_index,0xff
+	nbranch sha_0,true
+	call enable_authrom
+	arg memk,timeup
+	arg memdat,alarm
+	force 64,loopcnt
+sha_loop:	
+	ifetcht 4,alarm
+	ifetch 4,timeup
+	increase 4,timeup
+	increase 4,alarm
+	iadd temp,pdata			/* x+K */
+	force 7,regext_index
+	iadd regext,temp			/* x+K+h */
+	force 4,regext_index
+	shasx regext,3,pdata
+	iadd temp,temp			/* temp = s3(e)+x+K+h */
+	force 5,regext_index
+	deposit regext
+	force 6,regext_index
+	ixor regext,pdata
+	force 4,regext_index
+	iand regext,pdata			/* (e & (f ^ g)) */
+	force 6,regext_index
+	ixor regext,pdata			/* F1(e, f, g) = g ^ (e & (f ^ g)) */
+	iadd temp,temp			/* temp1 = h + S3(e) + F1(e,f,g) + K + x */
+	force 7,regext_index
+	copy temp,regext			/* save to H */
+	force 3,regext_index
+	deposit regext
+	iadd temp,regext			/* save to D */
+	force 0,regext_index
+	deposit regext
+	force 1,regext_index
+	iand regext,temp			/* a & b */
+	ior regext,pdata			/* a | b */			
+	force 2,regext_index
+	iand regext,pdata			/* (c & (a | b)) */
+	ior temp,temp				/* F0:(a & b) | (c & (a | b)) */
+	force 0,regext_index
+	shasx regext,2,pdata
+	iadd temp,pdata			/* temp2 = S2(a) + F0(a,b,c) */
+	force 7,regext_index
+	iadd regext,regext			/* h = temp1 + temp2 */
+	regexrot					/* rotate move h,a-g => a-h */
+	loop sha_loop
+	arg memahbak,contr
+	force 0,regext_index
+sha_1:	
+	ifetch 4,contr
+	iadd regext,regext
+	increase 1,regext_index
+	compare 8,regext_index,0xff
+	nbranch sha_1,true
+	branch disable_authrom
+
+	
+sha_result:
+	arg   memresult,contw
+	force 7,regext_index
+sha_regext_save:
+	deposit regext
+	istore  4,contw 
+	increase -1,regext_index
+	branch   sha_regext_save,positive
+	rtn	
+
+pad_xor:
+//	arg memx_end,contr
+	arg      memdat,contw
+	increase -4,contr
+	sub      loopcnt,16,rega
+pad_xor_0:	    
+	ifetch   4,contr
+	ixor     temp,pdata
+	istore   4,contw	
+	increase -8,contr	
+	loop  pad_xor_0
+	copy     rega,loopcnt
+	deposit  temp
+pad_xor_1:	
+	istore 4,contw
+	loop pad_xor_1
+	rtn
+
+g_noninit_number_confirm:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,g_noninit_number_confirm_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,g_noninit_number_confirm_192
+	rtn
+
+g_noninit_number_confirm_192:	
+	call g_noninit0_192
+	call sha_result
+	branch g_common0
+
+g_noninit_number_confirm_256:	
+	call g_noninit0_256
+	call sha_result
+	branch g_common0
+
+g_noninit_192:
+	call g_noninit0_192
+	branch g_common0
+	
+g_noninit0_192:
+ 	arg      mem_sp_pubkey_remote_x_end,contr
+	arg      memdat,contw
+	force    6,loopcnt
+	call     memcpy_dword_swap
+	arg      mem_sp_pubkey_local_x_end,contr
+	force    6,loopcnt
+	call     memcpy_dword_swap
+	arg      mem_sp_random_remote_end,contr
+	call     memcpy_dword_swap4
+	call     sha_init
+	call     sha	
+ 	arg      mem_sp_random_local_end,contr
+	arg      memdat,contw
+	branch g_common_192
+	
+g_init_192:
+ 	arg      mem_sp_pubkey_local_x_end,contr
+	arg      memdat,contw
+	force    6,loopcnt
+	call     memcpy_dword_swap
+	arg      mem_sp_pubkey_remote_x_end,contr
+	force    6,loopcnt
+	call     memcpy_dword_swap
+	arg      mem_sp_random_local_end,contr
+	call     memcpy_dword_swap4
+	call     sha_init
+	call     sha	
+ 	arg      mem_sp_random_remote_end,contr
+	arg      memdat,contw
+	call g_common_192
+	branch g_common0
+	
+g_common_192:	
+	call     memcpy_dword_swap4
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	force    5,loopcnt
+	call memset0
+	setarg 640
+	istore 4,contw
+	branch sha
+g_common0:
+	fetch 4,memresult
+//	store 4,mem_gkey
+	arg 1000,rega
+	idiv rega
+	call wait_div_end
+	remainder pdata
+	store 4,mem_gkey
+	quotient pdata
+	arg 1000,rega
+	idiv rega
+	call wait_div_end
+	remainder pdata
+	arg 1000,rega
+	imul32 rega,pdata
+	fetcht 4,mem_gkey
+	iadd temp,pdata
+	store 4,mem_gkey
+	rtn
+	
+noninit_number_confirm:
+	call g_noninit0_256
+	call sha_result
+	branch g_common0
+
+	
+g_noninit0_256:
+ 	arg      mem_le_pubkey_remote_x_256+32,contr
+	arg      memdat,contw
+	force    8,loopcnt
+	call     memcpy_dword_swap
+	arg      mem_sc_pubkey_local_x_256+32,contr
+	force    8,loopcnt
+	call     memcpy_dword_swap
+//	arg      mem_sp_random_remote_end,contr
+//	call     memcpy_dword_swap4
+	call     sha_init
+	call     sha	
+ 	arg      mem_sp_random_remote_end,contr
+	arg      memdat,contw
+	call     memcpy_dword_swap4
+	arg      mem_sp_random_local_end,contr
+	branch g_common_256
+	
+g_common_256:	
+	call     memcpy_dword_swap4
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	force    3,loopcnt
+	call memset0
+	setarg 768
+	istore 4,contw
+	branch sha
+
+function_f1_192_no_key:
+	jam 0,mem_passkey_1bit
+	branch function_f1_192_common
+	
+function_f1_192:
+	fetch 1,mem_ssp_mode_flag
+	bne  SSP_MODE_PASSKEY_ENTRY_FLAG,function_f1_192_no_key
+function_f1_192_common:
+	bpatchx patch2f_6,mem_patch2f
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	fetch 2,mem_sp_prarm_stack
+	copy pdata,contr
+	force    4,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	fetch 2,mem_sp_prarm_stack+2
+	copy pdata,contr
+	arg      memdat,contw
+	force    6,loopcnt
+	call     memcpy_dword_swap
+	fetch 2,mem_sp_prarm_stack+4
+	copy pdata,contr
+	force    6,loopcnt
+	call     memcpy_dword_swap
+	setarg   0x800000
+	istore   3,contw
+	
+	fetch 1,mem_passkey_1bit
+	
+	istore   1,contw
+	force    0,pdata
+	istore   8,contw
+	setarg   0x0388
+	istore   4,contw
+function_f1_common2:	
+	call     sha
+	call     sha_result
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	fetch 2,mem_sp_prarm_stack
+	copy pdata,contr
+	force    4,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	arg      memahsave_end,contr
+	arg      memdat,contw
+	force    8,loopcnt
+	call     memcpy_dword_swap
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	call		bn_zero
+	setarg   0x0300
+	istore   4,contw
+	call     sha
+	branch     sha_result
+	
+	
+function_f2_192:
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_sp_dhkey_end,contr
+	force    6,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	fetch 2,mem_sp_prarm_stack+12
+	copy pdata,contr
+	arg      memdat,contw
+	call     memcpy_dword_swap4
+	fetch 2,mem_sp_prarm_stack+14
+	copy pdata,contr
+	call     memcpy_dword_swap4
+
+	setarg   0x62746c
+	lshift8  pdata,pdata
+	or_into       0x6b,pdata       
+	istore   4,contw
+	arg      mem_addr_value_end,contr
+	force    3,loopcnt
+	call     memcpy_dword_swap
+	
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	force    0,pdata
+	istore   8,contw
+	setarg   0x0380
+	istore   4,contw
+	call     sha
+
+	call     sha_result
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	arg      mem_sp_dhkey_end,contr 
+	force    6,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	arg      memahsave_end,contr
+	arg      memdat,contw
+	force    8,loopcnt
+	call     memcpy_dword_swap
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	call bn_zero
+	setarg   0x0300
+	istore   4,contw
+	call     sha
+	branch     sha_result
+	
+
+function_f3a_192:
+	fetch 1,mem_ssp_mode_flag
+	bne  SSP_MODE_PASSKEY_ENTRY_FLAG,function_f3a_no_pin
+function_f3a_common:
+	bpatchx patch2f_7,mem_patch2f
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_sp_dhkey_end,contr
+	force    6,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	arg      mem_sp_random_remote_end,contr
+	arg      memdat,contw
+	call     memcpy_dword_swap4
+	arg      mem_sp_random_local_end,contr
+	call     memcpy_dword_swap4
+	branch function_f3_common
+
+function_f3a_no_pin:
+	setarg 0
+	store 4,mem_pin
+	branch function_f3a_common
+
+function_f3b_no_pin:
+	setarg 0
+	store 4,mem_pin
+	branch function_f3b_common
+
+
+function_f3b_192:
+	fetch 1,mem_ssp_mode_flag
+	bne  SSP_MODE_PASSKEY_ENTRY_FLAG,function_f3b_no_pin
+function_f3b_common:
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_sp_dhkey_end,contr
+	force    6,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+
+	arg      mem_sp_random_local_end,contr
+	arg      memdat,contw
+	call     memcpy_dword_swap4
+	arg      mem_sp_random_remote_end,contr
+	call     memcpy_dword_swap4
+function_f3_common:    
+	setarg   0x0    
+	istore   8,contw
+	istore   4,contw
+	fetch 4,mem_pin
+	istore   4,contw
+	
+	copy     contw,temp
+	jam      0x80,mem_addr_padding
+	copy     temp,contw
+	arg      mem_addr_iocap_end,contr
+	call     memcpy_dword_swap4
+
+	call     sha
+    
+	arg      memdat,contw
+	force 7,loopcnt
+	call memset0
+	istore   4,contw
+	setarg   0x03F8
+	istore   4,contw
+	call     sha
+	call     sha_result
+	
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	arg      mem_sp_dhkey_end,contr 
+	force    6,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	arg      memahsave_end,contr
+	arg      memdat,contw
+	force    8,loopcnt
+	call     memcpy_dword_swap
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	call bn_zero
+	setarg   0x0300
+	istore   4,contw
+	call     sha	
+	branch     sha_result
+		
+/*
+eckp:
+	jam 192,mem_ec_loopc
+	jam 1,mem_ec_infinite
+*/
+eckp_calc_init:
+	jam      192,mem_ec_loopc
+eckp_calc_init_1:    
+	fetch    1,mem_ec_loopc
+	rtn      blank
+	increase -1,pdata
+	store    1,mem_ec_loopc 	
+	arg      mem_k,contr
+	call     bn_testbit
+	branch eckp_calc_init_1,true
+	arg      mem_ax,contr
+	arg      mem_cx,contw
+	branch     ec_copy	
+	
+eckp_calc:
+	call     ecdbl  
+	fetch    1,mem_ec_loopc
+	increase -1,pdata
+	store    1,mem_ec_loopc
+	arg      mem_k,contr
+	call     bn_testbit
+	rtn	true
+	branch     ecadd                
+	             
+memcpy_dword_swap4:
+	force 4,loopcnt
+memcpy_dword_swap:
+	increase -4,contr
+memcpy_dword_swap_loop:
+	ifetch   4,contr
+	istore   4,contw
+	increase -8,contr
+	loop   memcpy_dword_swap_loop 
+    	rtn
+
+
+function_f1_no_key_256:
+	jam 0,mem_passkey_1bit
+	branch function_f1_common_256
+
+function_f1_256:
+	fetch 1,mem_ssp_mode_flag
+	bne  SSP_MODE_PASSKEY_ENTRY_FLAG,function_f1_no_key_256
+function_f1_common_256:
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	fetch 2,mem_sp_prarm_stack
+	copy pdata,contr
+	force    4,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	fetch 2,mem_sp_prarm_stack+2
+	copy pdata,contr
+	arg      memdat,contw
+	force    8,loopcnt
+	call     memcpy_dword_swap
+	fetch 2,mem_sp_prarm_stack+4
+	copy pdata,contr
+	force    8,loopcnt
+	call     memcpy_dword_swap
+	call     sha
+	arg      memdat,contw	
+	setarg   0x800000
+	istore   3,contw
+	fetch 1,mem_passkey_1bit
+	istore   1,contw
+	arg 7,loopcnt
+	call	memset0
+	
+	setarg   0x0408  //len bit
+	istore   4,contw
+	branch function_f1_common2
+
+function_f3a:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,function_f3a_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,function_f3a_192
+	rtn
+	
+function_f3a_256:
+	fetch 1,mem_ssp_mode_flag
+	bne  SSP_MODE_PASSKEY_ENTRY_FLAG,function_f3a_no_pin_256
+function_f3a_common_256:
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_sp_dhkey_end,contr
+	force    8,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	arg      mem_sp_random_remote_end,contr
+	arg      memdat,contw
+	call     memcpy_dword_swap4
+	arg      mem_sp_random_local_end,contr
+	call     memcpy_dword_swap4
+//	branch function_f3_common
+function_f3_common_256:    
+	setarg   0x0    
+	istore   8,contw
+	istore   4,contw
+	fetch 4,mem_pin
+	istore   4,contw
+	
+	copy     contw,temp
+	jam      0x80,mem_addr_padding
+	copy     temp,contw
+	arg      mem_addr_iocap_end,contr
+	call     memcpy_dword_swap4
+
+	call     sha
+    
+	arg      memdat,contw
+	force 7,loopcnt
+	call memset0
+	istore   4,contw
+	setarg   0x03F8
+	istore   4,contw
+	call     sha
+	call     sha_result
+	
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	arg      mem_sp_dhkey_end,contr 
+	force    8,loopcnt
+sha_end_common:
+	call     pad_xor
+	call     sha_init
+	call     sha
+	arg      memahsave_end,contr
+	arg      memdat,contw
+	force    8,loopcnt
+	call     memcpy_dword_swap
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	call bn_zero
+	setarg   0x0300
+	istore   4,contw
+	call     sha	
+	branch     sha_result
+	
+
+function_f3a_no_pin_256:
+	setarg 0
+	store 4,mem_pin
+	branch function_f3a_common_256
+
+function_f3b_no_pin_256:
+	setarg 0
+	store 4,mem_pin
+	branch function_f3b_common_256
+
+function_f3b:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,function_f3b_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,function_f3b_192
+	rtn
+
+function_f3b_256:
+	fetch 1,mem_ssp_mode_flag
+	bne  SSP_MODE_PASSKEY_ENTRY_FLAG,function_f3b_no_pin_256
+function_f3b_common_256:
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_sp_dhkey_end,contr
+	force    8,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+
+	arg      mem_sp_random_local_end,contr
+	arg      memdat,contw
+	call     memcpy_dword_swap4
+	arg      mem_sp_random_remote_end,contr
+	call     memcpy_dword_swap4
+	branch function_f3_common_256
+
+
+function_f2:
+	fetch 1,mem_encapsulated_minor_type
+	beq ENCAPSULATED_MINOR_TYPE_P256,function_f2_256
+	beq ENCAPSULATED_MINOR_TYPE_P192,function_f2_192
+	rtn
+	
+function_f2_256:
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_sp_dhkey_end,contr
+	force    8,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	fetch 2,mem_sp_prarm_stack+12
+	copy pdata,contr
+	arg      memdat,contw
+	call     memcpy_dword_swap4
+	fetch 2,mem_sp_prarm_stack+14
+	copy pdata,contr
+	call     memcpy_dword_swap4
+
+	setarg   0x62746c
+	lshift8  pdata,pdata
+	or_into       0x6b,pdata       
+	istore   4,contw
+	arg      mem_addr_value_end,contr
+	force    3,loopcnt
+	call     memcpy_dword_swap
+	
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	force    0,pdata
+	istore   8,contw
+	setarg   0x0380
+	istore   4,contw
+	call     sha
+
+	call     sha_result
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	arg      mem_sp_dhkey_end,contr 
+	force    8,loopcnt
+	branch sha_end_common
+
+
+function_h3:
+	fetch    6,mem_lap
+	store   6,mem_addr_value
+	fetch    6,mem_plap
+	istore   6,contw
+	
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_link_key+16 ,contr
+	force    4,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	setarg   0x627461
+	lshift8  pdata,pdata
+	or_into       0x6b,pdata       
+	store   4,memdat
+	
+	arg      mem_addr_value+12,contr
+	force    3,loopcnt
+	call     memcpy_dword_swap
+	
+	arg mem_ccm_iv+8,contr
+	arg 2,loopcnt
+	call     memcpy_dword_swap
+	
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	arg 4,loopcnt
+	call memset0
+
+	setarg   704
+	istore   4,contw
+	call     sha
+
+	call     sha_result
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	arg      mem_link_key+16,contr 
+	force    4,loopcnt
+	branch sha_end_common
+
+
+function_h4:
+	fetch    6,mem_lap
+	store   6,mem_addr_value
+	fetch    6,mem_plap
+	istore   6,contw
+	
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_link_key+16 ,contr
+	force    4,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+	setarg   0x627464
+	lshift8  pdata,pdata
+	or_into       0x6b,pdata       
+	store   4,memdat
+	
+	arg      mem_addr_value+12,contr
+	force    3,loopcnt
+	call     memcpy_dword_swap
+	
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	arg 5,loopcnt
+	call memset0
+
+	setarg   640
+	istore   4,contw
+	call     sha
+
+	call     sha_result
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	arg      mem_link_key+16,contr 
+	force    4,loopcnt
+	branch sha_end_common
+
+
+function_h5:
+	arg mem_sp_calc_result_high,contr
+	arg mem_input_store,contw
+	call memcpy16
+	setarg mem_sp_random_remote+16
+	store 2,mem_sp_prarm_stack
+	setarg mem_random_number+16
+	istore 2,contw
+	
+	setarg   0x363636
+	lshift8  pdata,temp
+	or_into       0x36,temp
+	arg      mem_input_store+16 ,contr
+	force    4,loopcnt
+	call     pad_xor
+	call     sha_init
+	call     sha
+
+	arg memdat,contw
+	fetch 2, mem_sp_prarm_stack
+	copy pdata,contr
+	call     memcpy_dword_swap4
+	fetch 2,     mem_sp_prarm_stack+2
+	copy pdata,contr
+	call     memcpy_dword_swap4
+	
+	setarg   0x800000
+	lshift8  pdata,pdata 
+	istore   4,contw
+	
+	arg 3,loopcnt
+	call memset0
+
+	setarg   768
+	istore   4,contw
+	call     sha
+
+	call     sha_result
+	arg      memresult,contr
+	arg      memahsave,contw 
+	call     memcpy32
+    
+	setarg   0x5c5c5c
+	lshift8  pdata,temp
+	or_into       0x5c,temp
+	arg      mem_input_store+16,contr 
+	force    4,loopcnt
+	branch sha_end_common
+
+
+
+
+else
+sp_initialize:
+	rtn
+
+endif
+	
+
+ifdef SECURE_CONNECTION
+
+sp_initialize_256:	
+	bpatchx patch30_0,mem_patch30
+	fetch 1,mem_secure_connections_enable
+	nbranch sp_pubkey_calc_256,blank
+//	call sp_clear_flags
+sc_reset:
+	jam SP_CALC_STANDBY,mem_sc_calc
+	jam SP_KEY_INVALID,mem_sc_local_key_invalid
+	rtn
+	
+	
+    	
+sp_wait_pubkey_calc_256_done:
+	fetch 1,mem_secure_connections_enable
+	rtn blank
+	fetch 1,mem_sc_local_key_invalid
+	rtneq SP_KEY_VALID_256
+	call sp_calc_sequence_256
+	branch sp_wait_pubkey_calc_256_done
+
+
+//BD1A3CCD:A6B89958:99B740EB:7B60FF4A:503F10D2:E3B3C974:385FC5A3:D4F6493F
+sp_debug_private_256:
+	arg mem_sc_private_key_256,contw
+        setsect 0,0x1abd
+        setsect 1,0x1b34f
+        setsect 2,0x19b8a
+        setsect 3,0x26562
+        istore 9,contw
+        setsect 0,0x340b7
+        setsect 1,0x1efa
+        setsect 2,0xaff6
+        setsect 3,0xfd41
+        istore 9,contw
+        setsect 0,0x3d210
+        setsect 1,0x26cf8
+        setsect 2,0x3874c
+        setsect 3,0x3157c
+        istore 9,contw
+        setsect 0,0x2d4a3
+        setsect 1,0x3d27d
+        setsect 2,0x3
+        istore 5,contw
+        rtn
+	
+
+sp_pubkey_calc_256:
+	fetch    1,mem_sc_local_key_invalid
+	rtnne SP_KEY_INVALID
+	fetch    1,mem_sc_calc
+	rtnne  SP_CALC_STANDBY
+	call init_memp_256
+	arg      mem_sc_private_key_256,contw 
+	force    15,queue
+	call     random_generator
+	random   pdata
+	rshift   pdata,pdata
+	istore   2,contw 
+	
+	fetch 1,mem_sp_debug_mode
+	ncall sp_debug_private_256,blank
+	
+	arg      mem_k_256,contw
+	arg      mem_sc_private_key_256,contr	
+	call     memcpy32 //mem_sp_private_key=>mem_k 
+
+	arg      mem_ax_256,contw
+	arg      mem_gx_256,contr
+	call     memcpy64 //mem_gx=>mem_ax 
+	
+	arg      mem_az_256,contw
+	call      clear_mem_256
+	jam      1,mem_az_256 //0=>mem_az 
+
+	call     eckp_calc_init_256
+	jam SP_CALC_PUBKEY_256,mem_sc_calc
+	rtn    
+
+sp_pubkey_generated_256:
+
+	arg      mem_sc_pubkey_local_x_256,contw
+	arg      mem_bx_256,contr
+	call     memcpy64   
+	jam      SP_KEY_VALID_256,mem_sc_local_key_invalid
+	jam      SP_CALC_STANDBY,mem_sc_calc
+	rtn
+	
+
+
+sp_dhkey_calc_256:
+	fetch    1,mem_sp_dhkey_invalid
+	rtnne  SP_KEY_INVALID
+	fetch    1,mem_sc_calc
+	rtnne  SP_CALC_STANDBY
+
+	arg      mem_k_256,contw
+	arg      mem_sc_private_key_256,contr	
+	call     memcpy32
+
+	arg      mem_ax_256,contw
+	arg      mem_le_pubkey_remote_x_256,contr
+	call     memcpy64
+
+	arg      mem_az_256,contw
+	call     clear_mem_256
+	jam      1,mem_az_256 //0=>mem_az 
+
+	call     eckp_calc_init_256
+	jam     SP_CALC_DHKEY_256,mem_sc_calc
+	rtn 
+
+
+sp_dhkey_generated_256:
+//	jam SP_FLAG_COMMIT,mem_sp_dh_ready
+	arg mem_le_dhkey_256,contw
+	arg mem_bx_256,contr
+	call memcpy32
+	jam SP_KEY_VALID_256,mem_sp_dhkey_invalid
+	jam SP_CALC_STANDBY,mem_sc_calc
+	rtn
+
+
+
+sp_calc_sequence_256:
+	fetch 1,mem_secure_connections_enable
+	rtn blank
+	fetch 1,mem_sc_calc
+	rtn blank
+	increase 0x80,pdata
+	store    1,mem_sc_calc
+	rtnbit1 7
+	fetch    2,mem_ec_loopc
+	branch   sp_calc_sequence_done_256,blank
+	branch   eckp_calc_256
+
+sp_calc_sequence_done_256:    
+	bpatchx patch30_1,mem_patch30
+	call ecunmapz_256
+	fetch 1,mem_sc_calc
+	beq  SP_CALC_PUBKEY_256,sp_pubkey_generated_256
+	beq  SP_CALC_DHKEY_256,sp_dhkey_generated_256
+	rtn
+
+
+eckp_calc_256:
+	call     ecdbl_256  
+	fetch    2,mem_ec_loopc
+	increase -1,pdata
+	store    2,mem_ec_loopc
+	arg      mem_k_256,contr
+	call     bn_testbit
+	rtn	true
+	branch     ecadd_256   
+
+eckp_calc_init_256:
+	bpatchx patch30_2,mem_patch30
+	setarg 256
+	store 2,mem_ec_loopc
+eckp_calc_init_256_1:    
+	fetch    2,mem_ec_loopc
+	rtn      blank
+	increase -1,pdata
+	store    2,mem_ec_loopc
+	arg      mem_k_256,contr
+	call     bn_testbit
+	branch eckp_calc_init_256_1,true
+	arg      mem_ax_256,contr
+	arg      mem_cx_256,contw
+	branch     memcpy96	
+
+
+ecunmapz_256:
+	arg mem_cz_256,rega
+	arg mem_t3_256,contw
+	call bn_invmod_256			/* t3 = 1/z */
+	arg mem_t3_256,rega
+	arg mem_t1_256,contw		
+	call bn_sqrmod_256			/* t1 = 1/z2 */
+	arg mem_cx_256,rega
+	arg mem_t1_256,regb
+	arg mem_bx_256,contw
+	call bn_mulmod_256
+	arg mem_t3_256,rega
+	arg mem_t1_256,regb
+	arg mem_t2_256,contw			
+	call bn_mulmod_256			/* t2 = 1/z3 */
+	arg mem_cy_256,rega
+	arg mem_t2_256,regb
+	arg mem_by_256,contw
+	branch bn_mulmod_256	
+	
+ecdbl_256:
+	arg mem_cz_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256
+	arg mem_t2_256,rega
+	arg mem_t3_256,contw
+	call bn_sqrmod_256
+//call ice_break
+	arg mem_a_256,rega
+	arg mem_t3_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256		/* t3=a*z4	*/
+	arg mem_cx_256,rega
+	arg mem_t2_256,contw
+	call bn_sqrmod_256
+//call ice_break
+	arg mem_t2_256,contr
+	arg mem_t1_256,contw
+	call memcpy32
+	arg mem_t1_256,rega
+	call bn_lshiftmod_256
+	arg mem_t2_256,rega
+	arg mem_t1_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256
+//call ice_break
+	arg mem_t2_256,rega
+	arg mem_t3_256,regb
+	arg mem_t2_256,contw
+	call bn_addmod_256		/* t2=3*x2 + z*z4		D  */
+//call ice_break
+	arg mem_cx_256,contr
+	arg mem_t1_256,contw
+	call memcpy32
+	arg mem_cy_256,rega
+	arg mem_t3_256,contw
+	call bn_sqrmod_256
+	arg mem_t1_256,rega
+	call bn_lshiftmod_256
+	arg mem_t1_256,rega
+	call bn_lshiftmod_256
+	arg mem_t1_256,rega		
+	arg mem_t3_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		//S = 4X1Y1^2/* t1=4x*y2	B	*/
+	arg mem_t3_256,rega
+	arg mem_t0_256,contw
+	call bn_sqrmod_256
+	arg mem_t0_256,rega
+	call bn_lshiftmod_256
+	arg mem_t0_256,rega
+	call bn_lshiftmod_256		
+	arg mem_t0_256,rega		
+	call bn_lshiftmod_256	//T = 8Y1^4	/* t0=8*y4		C */
+	arg mem_cy_256,contr
+	arg mem_t3_256,contw
+	call memcpy32
+	arg mem_t3_256,rega
+	call bn_lshiftmod_256
+	arg mem_t3_256,rega
+	arg mem_cz_256,regb
+	arg mem_cz_256,contw
+	call bn_mulmod_256		//z = 2Y1Z1
+
+
+	arg mem_t2_256,rega
+	arg mem_t3_256,contw
+	call bn_sqrmod_256   // M ^2
+//call ice_break
+	arg mem_t3_256,rega
+	arg mem_t1_256,regb
+	arg mem_t3_256,contw
+	call bn_submod_256  // t2^2 - 4*cx *cy^2 
+	arg mem_t3_256,rega
+	arg mem_t1_256,regb
+	arg mem_cx_256,contw
+	call bn_submod_256   //X2
+	arg mem_t1_256,rega
+	arg mem_cx_256,regb
+	arg mem_t3_256,contw
+	call bn_submod_256   //S-X2
+	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	//M(S-X2)	
+	arg mem_t3_256,rega
+	arg mem_t0_256,regb
+	arg mem_cy_256,contw
+	branch bn_submod_256  //M(S-X2)-T Y2	
+
+ecadd_256:
+
+	arg mem_az_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256
+	arg mem_cx_256,rega
+	arg mem_t7_256,regb
+	arg mem_t0_256,contw
+	call bn_mulmod_256		/* n1=t0=xa*zb2 U1 = X1Z0^2*/
+
+
+	arg mem_az_256,rega
+	arg mem_t7_256,regb
+	arg mem_t7_256,contw
+	call bn_mulmod_256	
+	arg mem_cy_256,rega
+	arg mem_t7_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		/* n2=t1=ya*zb3   S1 = Y1Z0^3*/
+
+
+	arg mem_cz_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256
+	arg mem_ax_256,rega
+	arg mem_t7_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256		/* n3=t2=xb*za2  U0 = X0Z1^2*/
+
+	arg mem_cz_256,rega
+	arg mem_t7_256,regb
+	arg mem_t7_256,contw
+	call bn_mulmod_256	
+	arg mem_ay_256,rega
+	arg mem_t7_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256		/* n4=t3=yb*za3 S0 = Y0Z1^3*/
+
+
+//	arg mem_t0_256,rega
+//	arg mem_t2_256,regb
+	arg mem_t0_256,regb
+	arg mem_t2_256,rega
+	arg mem_t7_256,contw
+	call bn_submod_256		/* n5=t7=n1-n3=t0-t2   W=U1-U0*/
+	arg mem_t0_256,rega
+	arg mem_t2_256,regb
+	arg mem_t0_256,contw
+	call bn_addmod_256		/* n7=t0=n1+n3=t0+t2    T=U1+U0 */
+//	arg mem_t1_256,rega
+//	arg mem_t3_256,regb
+	arg mem_t1_256,regb
+	arg mem_t3_256,rega
+	arg mem_t2_256,contw
+	call bn_submod_256		/* n6=t2=n2-n4=t1-t3  S1-S0 */
+	arg mem_t1_256,rega
+	arg mem_t3_256,regb
+	arg mem_t1_256,contw
+	call bn_addmod_256		/* n8=t1=n2+n4=t1+t3 M=S1+S0*/
+	arg mem_t1_256,rega
+	arg mem_t7_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		/* t1=n8*n5     MW */
+	arg mem_cz_256,rega
+	arg mem_az_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256	      //Z0Z1
+	arg mem_t3_256,rega
+	arg mem_t7_256,regb
+	arg mem_cz_256,contw
+	call bn_mulmod_256		/* z=za*zb*n5   Z0Z1W */
+
+	arg mem_t7_256,rega
+	arg mem_t7_256,contw
+	call bn_sqrmod_256		/* t7=n5^2 */
+	arg mem_t7_256,rega
+	arg mem_t0_256,regb
+	arg mem_t3_256,contw
+	call bn_mulmod_256		/* t3=n5^2*n7 */
+	arg mem_t7_256,rega
+	arg mem_t1_256,regb
+	arg mem_t1_256,contw
+	call bn_mulmod_256		/* t1=n8*n5^3 */
+	arg mem_t2_256,rega
+	arg mem_cx_256,contw
+	call bn_sqrmod_256		
+	arg mem_cx_256,rega
+	arg mem_t3_256,regb
+	arg mem_cx_256,contw
+	call bn_submod_256		/* x=n6^2-n5^2*n7 */
+	arg mem_cx_256,contr
+	arg mem_t7_256,contw
+	call memcpy32
+	arg mem_t7_256,rega
+	call bn_lshiftmod_256		/* t7=2*x */
+	arg mem_t3_256,rega
+	arg mem_t7_256,regb
+	arg mem_t3_256,contw
+	call bn_submod_256		/* t3=n9 */
+	arg mem_t3_256,rega
+	arg mem_t2_256,regb
+	arg mem_t2_256,contw
+	call bn_mulmod_256		/* t2=n9*n6 */
+	arg mem_t2_256,rega
+	arg mem_t1_256,regb
+	arg mem_cy_256,contw
+	call bn_submod_256	
+	arg mem_cy_256,rega
+	arg mem_p_256,regb
+	arg mem_cy_256,contw
+	force 0,regc
+	fetch 1,mem_cy_256
+	isolate1 0,pdata
+	call bn_add_256,true
+	copy regc,alarm
+	arg mem_cy_256,rega
+	call bn_rshift_256
+	fetch 1,mem_cy5_256
+	isolate1 0,alarm
+	setflag true,7,pdata
+	store 1,mem_cy5_256
+	rtn	
+
+bn_invmod_256:
+	copy contw,timeup					 
+	arg mem_tmp0_256,contw			 
+	call clear_mem_256
+	force 0,pdata
+//	store 4,mem_tmp52
+	store 4,mem_t2_256
+	jam 1,mem_tmp0_256      //y1
+	arg mem_tmp1_256,contw	//y2			 
+	call clear_mem_512      
+	arg mem_p_256,contr
+	arg mem_tmp2_256,contw		//j		 
+	call memcpy32
+	copy rega,contr
+	arg mem_tmp3_256,contw		//i		 
+	call memcpy32
+	
+//	arg mem_tmp22,rega
+//	arg mem_tmp32,regb
+//	call p_bn_bigeq_256
+//	branch assert,positive
+bn_invmod_256_2:	
+	arg mem_tmp3_256,contr
+	call bn_eq_zero_256
+	branch bn_invmod_256_0,blank
+//call ice_break    	
+//fetch 1,0x4ffe
+//increase 1,pdata
+//store 1,0x4ffe
+	arg mem_tmp3_256,rega
+	arg mem_tmp0_256,regb
+	call bn_rshifteven_256
+	arg mem_tmp2_256,rega
+	arg mem_tmp1_256,regb
+	call bn_rshifteven_256
+	
+	arg mem_tmp3_256,rega
+	arg mem_tmp2_256,regb
+	call bn_bigeq_256
+	branch bn_invmod_256_1,positive
+	arg mem_tmp2_256,rega
+	arg mem_tmp3_256,regb
+	copy rega,contw
+	call bn_sub_256
+	arg mem_tmp0_256,rega
+	arg mem_tmp1_256,regb
+	copy regb,contw
+	call bn_add_256
+	ifetch 1,rega
+	iadd regc,regc
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb
+	branch bn_invmod_256_2
+bn_invmod_256_1:
+	arg mem_tmp3_256,rega
+	arg mem_tmp2_256,regb
+	copy rega,contw
+	call bn_sub_256
+	arg mem_tmp1_256,rega
+	arg mem_tmp0_256,regb
+	copy regb,contw
+	call bn_add_256
+	ifetch 1,rega
+	iadd regc,regc
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb
+	branch bn_invmod_256_2
+bn_invmod_256_0:
+//call ice_break
+	arg mem_tmp1_256,rega
+	copy timeup,contw
+	call  bn_p256mod
+//call ice_break
+	arg mem_p_256,rega
+	copy timeup,regb
+	copy timeup,contw
+	branch bn_submod_256
+
+
+bn_mulmod_256:
+	copy contw,timeup					/* save result ptr */
+	
+	force 0,regext_index
+	
+	arg mem_tmp1_256,contw
+	call clear_mem_512
+	arg mem_regext,contw
+	call clear_mem_512
+//	jam 0,mem_regext_index
+
+//	arg mem_tmp12,contw
+	copy rega,contr
+//	force 0,regext_index
+	jam 0,mem_regext
+	setarg 0
+	call bn_load_mem
+	copy regb,contr
+	call bn_load_256
+//	force 0,regb
+//	jam 0,mem_regb
+	force 0,queue
+	arg mem_tmp1_256,contw	
+bn_mulmod_256_1:	
+//	copy regb,pdata
+//	store 1,
+	arg mem_regext,temp
+	copy queue,regb
+	lshift2 regb,pdata
+//	lshift4 pdata,pdata
+	iadd temp,regb	
+	force 0,temp
+	force 0,regc
+bn_mulmod_256_0:
+//	copy contw,pdata
+//	store 2,mem_contw
+//call ice_break
+//	copy pdata,contw
+	ifetch 4,contw					/* d[i+j] */
+	iforce rega
+//	copy regb,regext_index
+//	deposit regext
+	ifetch 4,regb
+	copy regc,regext_index
+	imul32 regext,pdata
+	iadd rega,pdata					/* uv = a[i]*b[j] + d[i+j] */
+	iadd temp,pdata					/* uv += u */
+	istore 4,contw					/* ->d[i+j] */
+	rshift32 pdata,temp				/* temp = u = uv >> 32 */
+	increase 1,regc
+	compare 8,regc,0xff
+	nbranch bn_mulmod_256_0,true
+//call ice_break
+	deposit temp
+	istore 4,contw					/* d[i + 12] = u */
+	increase -32,contw
+//	fetch 1,mem_regb
+//	copy pdata,regb
+	increase 1,queue
+	compare 8,queue,0xff
+	nbranch bn_mulmod_256_1,true
+	arg mem_tmp1_256,rega
+	copy timeup,contw
+	branch bn_p256mod
+
+bn_p256mod:
+	bpatchx patch30_3,mem_patch30
+	copy contw,timeup				/* save result ptr */
+	copy rega,alarm				/* temp save rega */
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	call memset0_4	
+	istore 8,contw
+	add rega,44,contr
+	call memcpy8
+	call memcpy12
+	copy regb,rega
+	call  bn_lshiftmod_256 //2S1
+	arg mem_tmp2_256,regb
+	copy alarm,rega   
+	copy timeup,contw
+	call bn_addmod_256 //T+2S1
+//call ice_break	
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	call memset0_4	
+	istore 8,contw
+	add alarm,48,contr
+	call memcpy16
+	call memset0_4	
+	copy regb,rega
+	call  bn_lshiftmod_256 //2S2
+//call ice_break	
+//	arg 0,regb
+
+	arg mem_tmp2_256,regb
+	copy timeup,rega   
+	copy rega,contw	
+	call bn_addmod_256  //+2S2
+//call ice_break	
+//	arg 0,regb
+		
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,32,contr
+	call memcpy12
+	call memset0_4	
+	istore 8,contw
+	add alarm,56,contr
+	call memcpy8
+	copy timeup,rega
+	copy rega,contw
+	call bn_addmod_256 //+S3
+//call ice_break	
+//	arg 0,regb
+
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,36,contr
+	call memcpy12
+	add alarm,52,contr	
+	call memcpy12
+	add alarm,52,contr
+	call memcpy4
+	add alarm,32,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_addmod_256 //+S4	
+//call ice_break	
+//	arg 1,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,44,contr
+	call memcpy12
+	call memset0_4	
+	istore 8,contw
+	add alarm,32,contr
+	call memcpy4
+	add alarm,40,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_submod_256 //-D1	
+//call ice_break	
+//	arg 2,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,48,contr
+	call memcpy8
+	call memcpy8
+	force 0,pdata
+	istore 8,contw
+	add alarm,36,contr
+	call memcpy4
+	add alarm,44,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_submod_256 //-D2	
+//call ice_break	
+//	arg 3,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,52,contr
+	call memcpy12
+	add alarm,32,contr
+	call memcpy12
+	call memset0_4	
+	add alarm,48,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	call bn_submod_256 //-D3
+//call ice_break	
+//	arg 4,regb
+	arg mem_tmp2_256,regb
+	copy regb,contw
+	add alarm,56,contr
+	call memcpy8
+	call memset0_4	
+	add alarm,36,contr
+	call memcpy12
+	call memset0_4	
+	add alarm,52,contr
+	call memcpy4
+	copy timeup,rega
+	copy rega,contw
+	branch  bn_submod_256 //-D4	
+
+
+bn_load_mem:
+	force 32,loopcnt
+	arg mem_regext,contw
+	iadd contw,contw
+	branch memcpy
+
+bn_load_256:
+	force 8,loopcnt
+	branch bn_load_0
+
+bn_sqrmod_256:
+	copy rega,regb
+	branch bn_mulmod_256
+
+bn_add_256:
+	force 8,loopcnt
+ 	branch bn_add+1
+
+bn_addmod_256:
+	call bn_add_256
+	copy contw,rega
+	branch bn_lshiftmod_ismod_256
+
+bn_lshiftmod_256:
+	call bn_lshift_256
+bn_lshiftmod_ismod_256:	
+	isolate1 0,regc
+	branch bn_lshiftmod_p_256,true
+	arg mem_p_256,regb
+	copy rega,regc
+	increase -32,rega
+	call bn_bigeq_256
+	nrtn positive
+	copy regc,rega
+	branch sub_p2_256
+	
+bn_lshiftmod_p_256:
+	call sub_p2_256
+//	nrtn true
+	copy rega,regc
+	increase -32,rega
+	arg mem_p_256,regb
+	call bn_bigeq_256
+	nrtn positive
+	copy regc,rega
+	branch sub_p2_256
+		
+	
+sub_p2_256:
+	increase -32,rega
+	arg mem_p_256,regb
+	copy rega,contw
+	branch bn_sub_256
+	
+
+
+	
+bn_submod_256:
+	call bn_sub_256
+//	isolate1 0,regc
+	branch  bn_submod_256_np,true
+//	copy rega,regc
+//	increase -32,rega
+	add contw,-32,rega
+	arg mem_p_256,regb
+	call bn_bigeq_256
+	nrtn positive
+	arg mem_p_256,regb
+	add contw,-32,rega
+//	copy regc,rega
+	copy rega,contw
+	branch  bn_sub_256
+bn_submod_256_np:	
+	add contw,-32,rega
+	arg mem_p_256,regb
+	copy rega,contw
+	call bn_add_256
+//	isolate1 0,regc
+	rtn true
+	add contw,-32,rega
+	arg mem_p_256,regb
+	copy rega,contw
+	branch bn_add_256	
+
+
+ 
+bn_sub_256:
+	force 8,loopcnt
+	branch bn_sub+1
+
+bn_rshift_256:
+	force 8,loopcnt
+	increase 28,rega
+	branch bn_rshift
+
+bn_lshift_256:
+	force 8,loopcnt
+	force 0,regc
+	branch bn_lshift_0
+
+bn_bigeq_256:
+	force 8,loopcnt
+	increase 28,rega
+	increase 28,regb
+	branch bn_bigeq_0
+
+
+bn_eq_zero_256:
+	ifetch 8,contr
+	nrtn blank
+	branch bn_eq_zero
+
+
+
+	
+bn_rshifteven_256:
+	copy rega,alarm
+bn_rshifteven_256_1:
+	copy alarm,rega
+	ifetch 1,rega
+	isolate1 0,pdata
+	rtn true
+	call bn_rshift_256
+	ifetch 1,regb
+	isolate0 0,pdata
+	branch bn_rshifteven_256_0,true
+	arg mem_p_256,rega
+	copy regb,contw
+	call bn_add_256
+	ifetch 1,regb
+	iadd regc,pdata
+	istore 1,regb						 
+	increase -32,regb
+bn_rshifteven_256_0:
+	add regb,32,rega
+	force 9,loopcnt
+	call bn_rshift
+	branch bn_rshifteven_256_1		
+
+else
+sp_initialize_256:
+	rtn
+
+endif
+
+
Index: mouse_public_3mode_usb/program/ui.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ui.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/ui.prog	(working copy)
@@ -0,0 +1,755 @@
+ui_init:
+	call lpm_disable_exen_output
+	rtn wake
+	call ui_button_init
+	call ui_timer_init
+	branch ui_led_init_global
+
+ui_dispatch:
+	call ui_led_dispatch
+	branch ui_timer_check
+	
+ui_button_init:
+	fetch 1,mem_ui_button_gpio
+	rtneq UI_BUTTON_GPIO_DISABLE
+	iforce temp
+	call gpio_config_output
+	fetcht 1,mem_ui_button_gpio
+	call gpio_out_inactive
+	nop 100
+	fetcht 1,mem_ui_button_gpio
+	call gpio_config_input
+	branch ui_button_polling
+
+
+	
+ui_button_polling:
+	bpatchx patch30_4,mem_patch30
+	fetch 1,mem_ui_button_gpio
+	rtneq UI_BUTTON_GPIO_DISABLE
+	copy pdata,temp
+	call gpio_get_bit
+	nbranch ui_button_up,true
+	//fall through
+ui_button_down:
+	call ui_button_check_long_press
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BTN_DOWN,pdata
+	store 2,mem_ui_state_map
+	fetch 1,mem_ui_button_last_state
+	rtneq UI_BUTTON_STATE_DOWN
+	jam UI_BUTTON_STATE_DOWN,mem_ui_button_last_state
+	//Down Edge
+	fetch 1,mem_ui_button_timeout
+	store 1,mem_ui_button_timer //start long press timer
+	call lpm_button_get_wake_lock
+	jam BT_EVT_BUTTON_DOWN,mem_fifo_temp
+	branch ui_ipc_send_event
+ui_button_up:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BTN_DOWN,pdata
+	store 2,mem_ui_state_map
+	fetch 1,mem_ui_button_last_state
+	rtneq UI_BUTTON_STATE_UP
+	jam UI_BUTTON_STATE_UP,mem_ui_button_last_state
+	//Up Edge
+	jam 0,mem_ui_button_timer//stop long press timer
+	call lpm_button_clean_wake_lock
+	jam BT_EVT_BUTTON_UP,mem_fifo_temp
+	branch ui_ipc_send_event
+
+ui_button_check_long_press:
+	fetch 1,mem_ui_button_timer
+	rtn blank
+	increase -1,pdata
+	store 1,mem_ui_button_timer
+	nrtn blank
+	//Long Press
+	jam BT_EVT_BUTTON_LONG_PRESSED,mem_fifo_temp
+	branch ui_ipc_send_event
+
+lpm_button_get_wake_lock:
+	arg wake_lock_button,queue
+	branch lpm_get_wake_lock
+	
+lpm_button_clean_wake_lock:
+	arg wake_lock_button,queue
+	branch lpm_put_wake_lock
+
+
+
+/***********************ui led function****************************/
+/******************
+led function
+
+ui_led_init_global
+ui_led_on_global
+
+ui_led_off_global
+//input:rega :struct number
+ui_led_blink_start_global
+
+//input:rega :struct number
+//contr: the point that want to set led style address
+ui_led_set_style_global
+
+******************/
+//input:rega :struct number
+//output:regb :current strutct starting pointer
+calc_curr_struct_prt:
+	fetch 2,mem_ui_led_struct_ptr
+	mul32 rega,LED_OFFSET_LENGTH,regb
+	iadd regb,regb
+	rtn
+
+
+ui_led_init_global:
+	fetch 1,mem_ui_led_struct_num
+	rtn blank
+	copy pdata,loopcnt
+	fetch 2,mem_ui_led_struct_ptr
+	copy pdata,regb
+ui_led_init_loop:
+	add regb,LED_OFFSET_LED_GPIO,regc
+	ifetcht 1,regc
+	call gpio_config_output
+	call ui_led_off_static
+	increase LED_OFFSET_LENGTH,regb
+	loop ui_led_init_loop
+	rtn
+
+	
+//input:rega :struct number
+ui_led_on_global:
+	call calc_curr_struct_prt
+	setarg UI_LED_STATE_LIGHTING
+	istore 1,regb
+	call ui_led_stop_timer
+	branch ui_led_on_static
+
+	
+//input:rega :struct number
+ui_led_blink_stop_global:
+ui_led_off_global:
+	call calc_curr_struct_prt
+	setarg UI_LED_STATE_DARKING
+	istore 1,regb
+	call ui_led_stop_timer
+	branch ui_led_off_static
+
+
+//input:rega :struct number
+ui_led_blink_start_global:
+	call calc_curr_struct_prt
+	setarg UI_LED_STATE_BLINK_START
+	istore 1,regb
+	setarg LED_INFINITE_FLASH_NUM
+	istore 1,contw
+	branch ui_led_off_static
+
+
+//input:rega :struct number
+//REGC: the point that want to set led style address
+ui_led_set_style_global:
+	call calc_curr_struct_prt
+	arg LED_OFFSET_LENGTH,loopcnt
+	copy regc,contr
+	copy regb,contw
+	branch memcpy_fast
+
+
+
+ui_led_dispatch:
+	fetch 1,mem_ui_led_struct_num
+	rtn blank
+	arg 0,rega
+ui_led_blink_polling:
+	call ui_led_change_style_by_type
+	increase 1,rega
+	fetch 1,mem_ui_led_struct_num
+	isub rega,null
+	rtn zero
+	branch ui_led_blink_polling
+
+
+ui_led_off_static:
+	add regb,LED_OFFSET_LED_GPIO,regc
+	ifetcht 1,regc
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_ui_led_off_static
+	branch gpio_out_inactive
+
+
+ui_led_on_static:
+	add regb,LED_OFFSET_LED_GPIO,regc
+	ifetcht 1,regc
+	fetch 1,mem_device_option
+	beq dvc_op_mouse,mouse_ui_led_on_static
+	branch gpio_out_active
+
+
+//input:rega :struct number
+ui_led_change_style_by_type:
+	add rega,ui_led_blink,queue
+	call timer_check
+	nrtn blank			//timer out
+	
+	call calc_curr_struct_prt
+
+	ifetch 1,regb			//led type
+
+	beq UI_LED_STATE_LIGHTING,ui_led_on_static
+	beq UI_LED_STATE_DARKING,ui_led_off_static
+	beq UI_LED_STATE_BLINK_STOP,ui_led_off_static
+	beq UI_LED_STATE_BLINK_DARKING,ui_led_blink_state_darking
+ui_led_blink_state_lighting:
+	call ui_led_on_static
+	add regb,LED_OFFSET_CB_LEDON,regc
+	call push_stack
+	ifetch 2,regc
+	call callback_func
+	call pop_stack
+	setarg UI_LED_STATE_BLINK_DARKING
+	istore 1,regb
+	add regb,LED_OFFSET_ON_TIME,regc
+	ifetch 2,regc
+	branch ui_led_blink_timer_start
+	
+
+ui_led_blink_state_darking:
+	call ui_led_off_static
+	add regb,LED_OFFSET_CB_LEDOFF,regc
+	call push_stack
+	ifetch 2,regc
+	call callback_func
+	call pop_stack
+	
+	add regb,LED_OFFSET_BLINK_COUNT,regc
+	ifetch 1,regc
+	beq LED_INFINITE_FLASH_NUM,ui_led_blink_infinite
+	increase -1,pdata
+	istore 1,regc
+	branch ui_led_blink_stop_global,blank		//End of flicker
+ui_led_blink_infinite:
+	setarg UI_LED_STATE_BLINK_LIGHTING
+	istore 1,regb
+	add regb,LED_OFFSET_OFF_TIME,regc
+	ifetch 2,regc
+ui_led_blink_timer_start:
+	add rega,ui_led_blink,queue
+	branch timer_init
+
+ui_led_stop_timer:
+	setarg 0
+	branch ui_led_blink_timer_start
+
+/***********************ui led function ending****************************/
+
+
+
+ui_timer_timeout:
+	setarg 0x1000
+	lshift16 pdata,pdata
+	iadd regb,regb
+	rtn
+	
+ui_timer_check:
+	bpatchx patch30_5,mem_patch30
+	arg 0,rega
+	fetcht 4,mem_ui_timer_last_btclk
+	copy clkn_bt,regb
+	copy regb,pdata
+	isub temp,null
+	ncall ui_timer_timeout,positive
+ui_timer_check_loop:
+	copy regb,pdata
+	increase 160,temp    //320btclk = 100ms
+	increase 160,temp
+	isub temp,null
+	nbranch ui_timer_check_end,positive
+	increase 1,rega   //increase 1 every 100ms count
+	and rega,0x0f,pdata
+	nbranch ui_timer_check_loop,blank
+	arg 0,rega  //reset timer if it's longer than 1.5s between 2 checks
+	call ui_timer_check_send_evt
+ui_timer_init:
+	copy clkn_bt,pdata
+	store 4,mem_ui_timer_last_btclk
+	rtn
+ui_timer_check_end:
+	copy rega,pdata
+	rtn blank
+	increase -160,temp    //320btclk = 100ms
+	increase -160,temp
+	set0 28,temp
+	storet 4,mem_ui_timer_last_btclk
+ui_timer_check_send_evt:
+	branch app_evt_timer
+
+	
+
+//**********************************************************//
+//************UI Inter-Processor Communication*******//
+//**********************************************************//
+ui_ipc_get_lock:
+	jam 1,mem_ipc_lock_bt
+ui_ipc_get_lock_wait:
+	fetch 1,mem_ipc_lock_c51
+	nbranch ui_ipc_get_lock_wait,blank
+	rtn
+	
+ui_ipc_put_lock:
+	jam 0,mem_ipc_lock_bt
+	rtn
+	
+
+	
+ui_ipc_send_event:
+	bpatchx patch30_6,mem_patch30
+	call ui_ipc_get_lock
+	copy rega,pdata
+	store 4,mem_ipc_rega_temp
+	arg mem_ipc_fifo_bt2c51,rega
+	call fifo_in
+	fetch 4,mem_ipc_rega_temp
+	copy pdata,rega
+	branch ui_ipc_put_lock
+
+ui_ipc_send_cmd:
+	bpatchx patch30_7,mem_patch30
+	call ui_ipc_get_lock
+	copy rega,pdata
+	store 4,mem_ipc_rega_temp	
+	arg mem_ipc_fifo_c512bt,rega
+	call fifo_in
+	fetch 4,mem_ipc_rega_temp
+	copy pdata,rega	
+	branch ui_ipc_put_lock
+
+ui_ipc_clean_all_fifo:
+	setarg 0
+	store UTIL_FIFO_LEN,mem_ipc_fifo_c512bt
+	store UTIL_FIFO_LEN,mem_ipc_fifo_bt2c51
+	rtn
+	
+check_51cmd:
+	bpatchx patch31_0,mem_patch31
+	fetch 1,mem_hci_cmd
+	nrtn blank
+	arg mem_ipc_fifo_c512bt,rega
+	call fifo_is_empty
+	rtn blank
+	jam IPC_CONTINUE_PROCESS,mem_ipc_skip_continue_proc
+	call check_51cmd_once
+	fetch 1,mem_ipc_skip_continue_proc
+	branch check_51cmd,blank
+	rtn
+
+check_51cmd_once:
+	call ui_ipc_get_lock
+	arg mem_ipc_fifo_c512bt,rega
+	call fifo_out
+	copy pdata,temp
+	call ui_ipc_put_lock
+	bpatchx patch31_1,mem_patch31
+	copy temp,pdata
+	rtn blank
+ 	beq BT_CMD_START_DISCOVERY,check_51cmd_start_discovery
+  	beq BT_CMD_STOP_DISCOVERY,check_51cmd_stop_discovery
+  	beq BT_CMD_RECONNECT,check_51cmd_reconnect
+	beq BT_CMD_START_ADV,check_51cmd_adv
+	beq BT_CMD_STOP_ADV,check_51cmd_stop_adv
+	beq BT_CMD_START_DIRECT_ADV,check_51cmd_direct_adv
+	beq BT_CMD_STOP_DIRECT_ADV,check_51cmd_stop_direct_adv
+	beq BT_CMD_LED_OFF,check_51cmd_led_off
+	beq BT_CMD_LED_ON,check_51cmd_led_on
+	beq BT_CMD_LED_BLINK,check_51cmd_led_start_blink
+	beq BT_CMD_LE_START_CONN,check_51cmd_le_start_con
+	beq BT_CMD_LE_START_SCAN,check_51cmd_start_scan
+	beq BT_CMD_LE_STOP_SCAN,check_51cmd_stop_scan
+	beq BT_CMD_ENTER_HIBERNATE,check_51cmd_hibernate
+	beq BT_CMD_BB_RECONN_CANCEL,check_51cmd_bb_reconn_cancel
+	//context related, process in context
+	store 1,mem_fifo_temp
+	call lmo_fifo_check
+	nbranch check_51cmd_restore,blank  //process this cmd next time while lmo fifo is full
+check_51cmd_once_continue:
+	fetch 1,mem_fifo_temp
+	bmark0 mark_context,check_51cmd_check_idle
+	bpatchx patch31_2,mem_patch31
+	fetch 1,mem_fifo_temp
+	beq BT_CMD_DISCONNECT,check_51cmd_disconnect
+  	beq BT_CMD_ENTER_SNIFF,check_51cmd_enter_sniff
+  	beq BT_CMD_EXIT_SNIFF,check_51cmd_exit_sniff
+  	beq BT_CMD_SET_PIN_CODE,check_51cmd_pincode
+	beq BT_CMD_LE_DISCONNECT,check_51cmd_le_disconnect
+	beq BT_CMD_LE_SMP_SECURITY_REQUEST,check_51cmd_le_smp_sec_req
+	beq BT_CMD_LE_UPDATE_CONN,check_51cmd_ble_update_connect_param
+	beq BT_CMD_ROLE_SWITCH,check_51cmd_role_switch
+	beq BT_CMD_STORE_RECONN_INFO_LE,eeprom_store_le_reconn_info
+	beq BT_CMD_STORE_RECONN_INFO_BT,eeprom_store_bd_reconn_info
+	beq BT_CMD_DHKEY_NOT_ACCEPT,check_51cmd_dhkey_not_accept
+	beq BT_CMD_STORE_RECONN_INFO,check_51cmd_store_reconn_info
+	rtn
+
+check_51cmd_check_idle:
+	store 1,mem_fifo_temp
+  	call context_check_idle
+	branch check_51cmd_restore,zero
+	call context_search_plap
+	nrtn zero
+check_51cmd_restore:
+	jam IPC_SKIP_CONTINUE_PROCESS,mem_ipc_skip_continue_proc
+	branch ui_ipc_send_cmd
+
+  
+ /******************** 51COMMAND*********************/
+//command opcode 0x01	
+check_51cmd_start_discovery:
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BT_DISCOVERY,pdata
+	store 2,mem_ui_state_map
+	jam 3,mem_scan_mode
+	rtn
+
+
+//command opcode 0x02	
+check_51cmd_stop_discovery:
+	jam 0,mem_hid_handshake_timer_count
+	jam 0,mem_scan_mode
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BT_DISCOVERY,pdata
+	store 2,mem_ui_state_map
+	rtn	
+
+
+//command opcode 0x03	
+check_51cmd_reconnect:	
+	jam hci_cmd_create_conn,mem_hci_cmd
+	rtn	
+
+
+//command opcode 0x04
+check_51cmd_disconnect:
+	jam LMP_DETACH,mem_lmo_opcode2
+	jam OTHER_END_TERMINATED,mem_disconn_reason_send
+	rtn
+
+
+//command opcode 0x05
+check_51cmd_enter_sniff:
+	jam LMP_SNIFF_REQ,mem_lmo_opcode2
+	arg mem_sniff_payload,contw
+	setarg 0
+	isolate1 27,clke_bt
+	setflag true,1,pdata		/* use init 2 if bit27 of clke is 1 */
+	istore 1,contw	
+	setarg 0	/* dsniff */
+	istore 2,contw
+	fetch 6,mem_sniff_param_interval
+	istore 6,contw
+	rtn	
+
+
+//command opcode 0x06
+check_51cmd_exit_sniff:
+	jam LMP_UNSNIFF_REQ,mem_lmo_opcode2
+	rtn
+
+
+//command opcode 0x10
+check_51cmd_pincode:
+	jam pincode_state_pincode_ready,mem_pincode_state
+//enable ssp master sm
+	fetch 1,mem_op
+	bbit1 op_inrand_req,check_51cmd_pincode_pair_passive
+	call tid_initiate
+	jam LMP_IN_RAND,mem_lmo_opcode2
+	rtn
+check_51cmd_pincode_pair_passive:
+	set0 op_inrand_req,pdata
+	store 1,mem_op
+	call lmp_accept_inrand
+	setarg 0
+	setflag master,smap_lmptid,pdata		
+	store 1,mem_lmo_tid2
+	rtn
+
+
+//command opcode 0x13
+check_51cmd_adv:
+	jam ON,mem_le_adv_enable
+	jam ADV_IND,mem_le_adv_type
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+
+//command opcode 0x14
+check_51cmd_stop_adv:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	jam OFF,mem_le_adv_enable
+	rtn
+
+
+//command opcode 0x15
+check_51cmd_direct_adv:
+	jam ON,mem_le_adv_enable
+	jam ADV_DIRECT_IND,mem_le_adv_type
+	fetch 2,mem_ui_state_map
+	set1 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	rtn
+
+
+//command opcode 0x16
+check_51cmd_stop_direct_adv:
+	fetch 2,mem_ui_state_map
+	set0 UI_STATE_BLE_ADV,pdata
+	store 2,mem_ui_state_map
+	jam OFF,mem_le_adv_enable
+	rtn
+
+
+//command opcode 0x17
+check_51cmd_le_disconnect:
+	setarg 20 // 100ms
+	store 2,mem_le_superto
+	store 2,mem_le_init_superto
+	branch le_send_terminate_ind_user_terminated
+
+
+//command opcode 0x18
+check_51cmd_ble_update_connect_param:
+	branch le_l2cap_tx_update_req
+
+
+//command opcode 19
+check_51cmd_led_off:
+	arg 0,rega
+	branch ui_led_off_global
+
+
+//command opcode 20
+check_51cmd_led_on:
+	arg 0,rega
+	branch ui_led_on_global
+
+
+//command opcode 21
+check_51cmd_led_start_blink:
+	arg 0,rega
+	call calc_curr_struct_prt
+	ifetch 1,regb
+	beq UI_LED_STATE_BLINK_START,check_51cmd_led_start_blink_in_blink
+	beq UI_LED_STATE_BLINK_LIGHTING,check_51cmd_led_start_blink_in_blink
+	beq UI_LED_STATE_BLINK_DARKING,check_51cmd_led_start_blink_in_blink
+	branch ui_led_blink_start_global
+
+check_51cmd_led_start_blink_in_blink:
+	ifetch 1,contr
+	rtneq LED_INFINITE_FLASH_NUM
+	branch ui_led_blink_start_global
+
+
+//command opcode 0x22
+check_51cmd_le_start_con:
+	jam ON,mem_le_scan_enable
+	jam hci_cmd_le_create_conn,mem_hci_cmd
+//	fetch 6,mem_app_peer_addr
+//	store 6,mem_le_conn_peer_addr
+	rtn
+
+
+//command opcode 0x23
+check_51cmd_start_scan:
+	jam ON,mem_le_scan_enable
+	rtn
+
+
+//command opcode 0x24
+check_51cmd_stop_scan:
+	jam OFF,mem_le_scan_enable
+	jam 0,mem_hci_cmd
+	rtn
+
+
+//command opcode 0x25
+check_51cmd_hibernate:
+	fetch 2,mem_cb_before_hibernate
+	call callback_func
+	fetch 1,mem_ui_button_gpio
+	beq UI_BUTTON_GPIO_DISABLE,check_51cmd_hibernate_btn_disabled
+	copy pdata,temp
+	call gpio_config_input
+check_51cmd_hibernate_btn_disabled:
+	call ui_ipc_clean_all_fifo
+	branch lpm_hibernate	
+
+
+//command opcode 0x27
+check_51cmd_le_smp_sec_req:
+	branch le_send_smp_security_request
+
+
+//command opcode 0x29
+check_51cmd_role_switch:
+  	jam LMP_SLOT_OFFSET,mem_lmo_opcode2
+	set1 mark_switch_initiated,mark
+	nrtn master
+	jam SWITCH_FLAG_INIT,mem_switch_flag
+	jam LMP_SWITCH_REQ ,mem_lmo_opcode2
+	fetch 1,mem_connection_options
+	set0 CONNECTION_SWITCH,pdata
+	store 1,mem_connection_options
+	rtn
+
+
+//command opcode 0x30
+check_51cmd_bb_reconn_cancel:
+	force page_length_timer,queue
+	branch timer_stop
+
+
+//command opcode 0x33
+check_51cmd_dhkey_not_accept:
+	call tid_set_reply
+	jam LMP_DHKey_Check,mem_lmi_opcode2
+	branch lmp_reject_pdu_not_allowed	
+
+
+ui_check_paring_button:
+	fetch 1,mem_ui_state_map
+	rtnbit0 UI_STATE_BTN_DOWN
+	rtnbit0 UI_STATE_BT_RECONNECT
+	branch check_51cmd_bb_reconn_cancel
+
+
+
+///////////queue function////////////
+queue_init:
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,contw
+	setarg 0
+	istore 3,contw
+	rtn
+	
+//input:rega:the address of the data to which you want to input queue
+//output:if user is disable,mean queue no have space
+queue_push:
+	call disable_user
+	call queue_full
+	rtn blank
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,regb
+	ifetcht 1,regb
+	increase 1,temp
+	istoret 1,regb	//number add 
+	
+	ifetcht 1,pdata	//temp:each length
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_WRITE_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contw
+	copy rega,contr
+calc_queue_next_ptr:
+	call memcpy
+	call queue_get_size
+	pincrease -1
+	ifetcht 1,regb
+	increase 1,temp
+	iand temp,temp
+	istoret 1,regb
+	branch enable_user
+
+
+//input:rega:the address of the data to which you want to output queue
+//output:if user is disable,mean queue no have data
+queue_pop:
+	call disable_user
+	call queue_empty
+	rtn blank
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,regb
+	ifetcht 1,regb
+	increase -1,temp
+	istoret 1,regb
+	ifetcht 1,pdata		//each size
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_READ_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contr
+	increase 1,contr
+	copy rega,contw
+	branch calc_queue_next_ptr
+
+
+//function:no pop element,only copy element in rega
+//input:rega:the address of the data to which you want to output queue
+//output:if user is disable,mean queue no have data
+//regb is new ptr
+queue_get_new_ele:
+	call disable_user
+	call queue_empty
+	rtn blank
+	fetch 2,mem_queue_ptr
+	ifetcht 1,pdata		//each size
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_READ_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contr
+	increase 1,contr
+	copy contr,regb
+	copy rega,contw
+	call memcpy
+	branch enable_user
+
+queue_store_new_ele:
+	call disable_user
+	call queue_empty
+	rtn blank
+	fetch 2,mem_queue_ptr
+	ifetcht 1,pdata		//each size
+	copy temp,loopcnt
+	add pdata,QUEUE_OFFSET_READ_PTR,regb
+	ifetch 1,regb
+	imul32 temp,pdata	//offset
+	iadd contr,contr
+	add contr,2,contw
+	copy rega,contr
+	increase -1,loopcnt
+	call memcpy
+	branch enable_user
+
+//output:if blank is 1,mean queue is empty
+queue_empty:
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_CURR_NUM,contr
+	ifetch 1,contr
+	rtn
+
+//output:if blank is 1,mean queue is full
+queue_full:
+	call queue_get_size
+	ifetcht 1,contr
+	isub temp,pdata
+	rtn
+
+//output:pdata is queue size
+queue_get_size:
+	fetch 2,mem_queue_ptr
+	add pdata,QUEUE_OFFSET_LENGTH,contr
+	ifetch 1,contr
+	rtn
+
+///////////queue function end////////////
+
+
+
+
Index: mouse_public_3mode_usb/program/usb.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/usb.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/usb.prog	(working copy)
@@ -0,0 +1,1079 @@
+ ifdef COMPILE_USB
+
+usb_isr:
+	bpatchx patch31_3,mem_patch31
+	fetch 1,core_usb_status
+	isolate1 USB_STATUS_RESET,pdata
+	call usb_init,true
+	fetch 1,core_usb_status
+	store 1,core_usb_status
+	store 1,mem_usb_status
+	call usb_nak_state_judge
+	call usb_rx
+	call usb0_tx
+	call usb_tx
+	branch usb_nak_state
+
+usb_init:
+	bpatchx patch31_4,mem_patch31
+	call enable_authrom
+	call usb_init_param
+	jam 0x00,core_usb_config
+ifdef SIM
+	nop 10
+else
+	nop 10000
+endif
+	jam 0xc0,core_usb_trig
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_USB,pdata
+	store 2,core_clkoff
+	jam 0x0,core_usb_hmode
+	jam 0x3c,core_usb_config
+	setarg mem_usb_rxbuf
+	store 2,core_usb_rx_saddr
+	store 2,core_usb_rxptr
+	setarg mem_usb_rxbuf_end
+	store 2,core_usb_rx_eaddr
+	jam 0x4,core_usb_hmode
+	jam 0,core_usb_addr
+	jam 0xff,core_usb_status
+	setarg mem_usb_clear_mem_end
+	arg mem_usb_clear_mem_start,contw
+	isub contw,loopcnt
+	branch clear_mem
+	
+usb_offline_check_init:
+	fetcht 1,mem_usb_offline_check_gpio
+	branch gpio_config_input
+usb_offline_state:
+	fetch 1,mem_usb_device_enumeration_endflag
+	rtn blank
+	fetcht 1,mem_usb_offline_check_gpio
+	call gpio_get_bit
+	branch usb_init,true
+	rtn
+
+usb_init_param:
+	jam DEV_DEFAULT,mem_usb0_state
+	setarg 0x0
+	store 1,mem_remain
+	store 2,mem_usb_zero_packet
+	pincrease 1
+	store 2,mem_usb_ones_packet
+	pincrease 1
+	store 2,mem_usb_two_packet
+	arg mem_string0,contw
+	setarg 0x030404
+	istore 3,contw
+	setarg 0x0409
+	istore 2,contw
+	arg mem_string1,contw
+	setsect 0,0x15906
+	setsect 1,0x210d2
+	setsect 2,0x10494
+	setsect 3,0x1
+	istore 9,contw
+	arg mem_string2,contw
+	setsect 0,0x1570f
+	setsect 1,0x15c9a
+	setsect 2,0x256c6
+	setsect 3,0x1cdcd
+	istore 9,contw
+	setsect 0,0x14420
+	setsect 1,0x25d99
+	setsect 2,0x25636
+	setsect 3,0x1
+	istore 7,contw
+	arg mem_string3,contw
+	setsect 0,0x1620a
+	setsect 1,0xc8c
+	setsect 2,0x30333
+	setsect 3,0xc0c0
+	istore 9,contw
+	setsect 0,0x3130
+	istore 2,contw
+	setarg USB_KBDATA_VENDOR_DEFINE_ADDR
+	store 2,mem_hidreportdesc_kb
+	setarg USB_MSDATA_ADDR
+	store 2,mem_hidreportdesc_m
+	arg USB_DEVICEDATA_ADDR,contr
+	arg mem_devicedesc,contw
+	arg 19,loopcnt
+	call memcpy	
+	arg USB_CONFDATA_ADDR,contr
+	arg mem_confdesc,contw
+	arg 60,loopcnt
+	call memcpy
+usb_config_cb:
+	fetch 2,mem_cb_usb_config
+	branch callback_func
+
+usb_tx_interval_config:
+	fetch 1,mem_usb_tx_interval
+	rtn blank
+	store 1,mem_confdesc+34
+	store 1,mem_confdesc+59
+	rtn
+
+usb_nak_state:
+	arg TIMER_NAK,queue
+	call timer_check
+	nrtn blank
+	fetch 1 ,mem_usb_wakestate_onetime_flag
+	nrtn blank
+	fetch 1,mem_usb_device_enumeration_endflag
+	ncall usb_mac_wakeup_judge,blank
+	rtn
+
+usb_nak_state_judge:
+	fetch 1,mem_usb_status
+	bbit1 USB_STATUS_NAK,usb_nak_state_timer_init
+	rtn
+	
+usb_nak_state_timer_init:
+	call usb0_attached_state_judge
+	call timer_reinit
+	setarg TIMER_NAK_DELAY
+	arg TIMER_NAK,queue
+	branch timer_init
+	
+usb0_attached_state_judge:
+	fetch 1,mem_usb_state
+	bne USB_CONNECTED,usb_clear_halt_dispose
+	jam 0,mem_usb_wakestate_onetime_flag
+	jam 0,mem_usb_mac_wakeup_trig
+	rtn
+
+usb_clear_halt_dispose:
+	fetch 1,mem_usb_clear_halt
+	rtn blank
+	jam 0,mem_usb_clear_halt
+	jam USB_CONNECTED,mem_usb_state
+	jam 1,mem_usb_device_enumeration_endflag
+	rtn
+
+usb_rx_no_data:
+	fetch 1,mem_usb_status
+	bbit1 USB_STATUS_SETUP,usb_class_type
+	rtn
+
+usb_rx_data:
+	fetch 1,core_usb_txbusy
+	rtnbit1 USB_STATUS_RXEMPTY
+	fetchr contus,2,core_usb_rx_saddr
+	fetchr contue,2,core_usb_rx_eaddr
+	fetchr contu,2,core_usb_rxptr
+	ifetch 2,contu
+	rshift8 pdata,temp
+	rshift4 temp,temp					// temp is endpoint
+	arg 0xfff,contr
+	iand contr,loopcnt
+	copy loopcnt,rega
+usb_rx_read:
+	ifetch 1,contu
+	istore 1,contw
+	loop usb_rx_read
+	storer contu,2,core_usb_rxptr
+	storer rega,2,mem_usb_read_len
+	rtn
+usb_data_rx:
+	rtn 
+
+usb_rx:
+	bpatchx patch31_5,mem_patch31
+	fetch 1,mem_usb_status
+	rtnbit0 USB_STATUS_RXREADY
+	arg mem_usb_setup,contw
+	call usb_rx_data
+	copy temp,pdata
+	beq 0,usb0_rx
+	branch usb_data_rx
+usb0_rx:
+	fetch 1,mem_usb_read_len
+	beq 0x00,usb_rx_no_data
+	beq 0x01,usb_out_one_byte	// HUAWEI pad led status	
+	sub pdata,7,null
+	rtn positive
+usb_class_type:
+	bpatchx patch31_6,mem_patch31
+	set0 mark_isstr,mark
+	fetch 1,mem_usb_setup_bmRequestType
+	and_into 0x80,pdata
+	beq IN_DEVICE,usb_in_device
+	beq OUT_DEVICE,usb_out_device
+	branch assert
+
+usb_out_one_byte:
+	fetch 1,mem_usb_setup
+	rtnbit1 7	// OUT_DEVICE
+	call usb_get_led_status
+	branch usb0_reply_zerolen
+
+
+usb_in_device:
+	fetch 1,mem_usb_setup_bmRequestType
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	and_into 0x03,pdata
+	beq STANDARD_REQ,usb_in_standard_req
+	beq CLASS_REQ,usb_in_class_req
+	beq MANUFACTURER_REQ,usb_in_manufacturer_req
+	branch assert
+
+usb_out_device:
+	fetch 1,mem_usb_setup_bmRequestType
+	rshift4 pdata,pdata
+	rshift pdata,pdata
+	and_into 0x03,pdata
+	beq STANDARD_REQ,usb_out_standard_req
+	beq CLASS_REQ,usb_out_class_req	
+	beq MANUFACTURER_REQ,usb_out_manufacturer_req
+	branch assert
+
+usb_in_standard_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq GET_CONFIGURATION,usb0_request_get_configuration
+	beq GET_DESCRIPTOR,usb0_request_get_descriptor
+	beq GET_INTERFACE,usb0_request_get_interface
+	beq GET_STATUS,usb0_request_get_status
+	branch usb0_force_stall
+
+usb_in_class_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq GET_IDLE,usb_get_idle
+	beq GET_REPORT,usb_get_report
+	beq GET_PROTOCOL,usb_get_protocol_req
+	branch usb0_force_stall
+
+usb_in_manufacturer_req:
+	branch usb0_force_stall
+
+usb_out_standard_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq CLEAR_FEATURE,usb0_request_clear_feature
+	beq SET_FEATURE,usb0_request_set_feature
+	beq SET_ADDRESS,usb0_request_set_address
+	beq SET_CONFIGURATION,usb0_request_set_configuration
+	beq SET_INTERFACE,usb0_request_set_interface
+	beq SET_DESCRIPTOR,usb0_force_stall
+	branch usb0_force_stall
+
+usb_out_class_req:
+	fetch 1,mem_usb_setup_bRequest
+	beq SET_IDLE,usb_set_idle
+	beq SET_REPORT,usb_set_report
+	beq SET_PROTOCOL,usb_set_protocol_req
+	branch usb0_force_stall
+
+usb_out_manufacturer_req:
+	branch usb0_force_stall
+
+usb0_force_stall:
+	fetch 1,core_usb_stall
+	set1 0,pdata
+	store 1,core_usb_stall
+	branch usb0_reply_zerolen
+	
+usb0_reply_zerolen:
+	jam 0x10,core_usb_trig
+	rtn
+
+usb0_request_get_configuration:
+	fetch 1,mem_usb_setup_bmRequestType
+	bne IN_DEVICE,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 1,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb0_state
+	beq DEV_CONFIGURED,usb0_request_get_cfg_dev_cfg
+	beq DEV_ADDRESS,usb0_request_get_cfg_dev_addr
+	branch usb0_force_stall
+//Return current config : 1
+usb0_request_get_cfg_dev_cfg:
+	arg 1,regb
+	branch usb_send_ones_packet
+//Config do not work, return default config : 0
+usb0_request_get_cfg_dev_addr:
+	arg 1,regb
+	branch usb_send_zero_packet
+
+usb0_request_get_descriptor:
+	bpatchx patch31_7,mem_patch31
+//	set0 mark_isstr,mark
+	fetch 1,mem_usb_setup_bValueH
+	beq DSC_DEVICE,dsc_device_info
+	beq DSC_CONFIG,dsc_config_info	
+	beq DSC_STRING,dsc_string_info
+	beq DSC_HID,dsc_hid_info
+	beq DSC_HID_REPORT,dsc_hid_report_info
+	branch usb0_force_stall
+
+dsc_hid_info:
+	jam 0,mem_usb_get_protocol_flag
+	fetch 1,mem_usb_setup_wIndex
+	beq 0,dsc_hid_info_interface0
+	beq 1,dsc_hid_info_interface1
+	branch usb0_force_stall
+//class_descriptor hid_descriptor--keyboard 
+dsc_hid_info_interface0:
+	fetchr regb,1,mem_confdesc+19
+	arg mem_confdesc+19,rega
+	branch usb0_respond
+//class_descriptor hid_descriptor--mouse 
+dsc_hid_info_interface1:
+	fetchr regb,1,mem_confdesc+44
+	arg mem_confdesc+44,rega
+	branch usb0_respond
+
+dsc_device_info:
+//input : pdata : data poniter 
+//input : temp: data len
+//sets the data pointer and len to correct descriptor
+	fetch 1,mem_usb_set_high_addr_flag
+	ncall usb_set_high_addr,blank
+	setarg mem_devicedesc
+	fetcht 1,mem_devicedesc
+dsc_info_set_data_len:
+	store 2,mem_dsc_info_data_pointer
+	storet 1,mem_dsc_info_len
+	fetch 1,mem_usb_setup_bLength
+	isub temp,null
+	nbranch dsc_info_set_current_data_len,positive
+dsc_info_set_initial_data_len:
+	fetch 1,mem_dsc_info_len
+dsc_info_set_data_size_completed:	
+	iforce regb
+	fetch 2,mem_dsc_info_data_pointer
+	add pdata,1,pdata
+	iforce rega
+	branch usb0_respond
+dsc_info_set_current_data_len:
+	fetch 1,mem_usb_setup_bLength
+	branch dsc_info_set_data_size_completed
+
+usb_set_high_addr:
+	fetch 1,core_usb_addr
+	ncall usb0_set_addr,blank
+	jam 0,mem_usb_set_high_addr_flag
+	rtn
+usb0_set_addr:
+	fetch 1,core_usb_addr
+   	set1 7,pdata
+    	store 1,core_usb_addr
+    	rtn
+
+dsc_config_info:
+	setarg mem_confdesc
+	fetcht 1,mem_confdesc
+	branch dsc_info_set_data_len
+
+dsc_string_info:
+	fetch 1,mem_usb_setup_bValue
+	sub pdata,3,null
+	nbranch usb0_force_stall,positive
+	fetch 1,mem_usb_setup_bValue
+	arg mem_string0,rega
+	beq 0,usb0_respond_length	
+	set1 mark_isstr,mark
+	arg mem_string1,rega
+	beq 1,usb0_respond_length
+	arg mem_string2,rega
+	beq 2,usb0_respond_length
+	arg mem_string3,rega
+	beq 3,usb0_respond_length
+	rtn
+
+dsc_hid_report_info:
+	fetch 2,mem_usb_setup_wIndex
+	beq 1,dsc_hid_report_info0
+	fetchr rega,2,mem_hidreportdesc_kb
+	branch usb0_respond_length
+dsc_hid_report_info0:
+	jam 1,mem_usb_device_enumeration_endflag
+	jam USB_GOT_REPORT_REQ,mem_usb_state
+	fetchr rega,2,mem_hidreportdesc_m
+	branch usb0_respond_length
+
+
+usb0_request_get_interface:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall		
+	fetch 1,mem_usb_setup_bmRequestType
+	bne IN_INTERFACE,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 1,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	arg 1,regb
+	branch usb_send_zero_packet
+
+
+usb0_request_get_status:
+	fetch 1,mem_usb0_state
+	beq DEV_DEFAULT,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 2,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	beq IN_DEVICE,usb0_get_status_in_device
+	beq IN_INTERFACE,usb0_get_status_in_interface
+	beq IN_ENDPOINT,usb0_get_status_in_endpoint
+	branch usb0_force_stall
+
+
+Usb0_SDsystem_dispose:
+	jam 1,mem_sdsystem_wakeup_flag
+	branch usb_send_two_packet
+
+usb0_get_status_in_device:
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	arg 2,regb
+	fetch 1,mem_usb_remote_wakeup
+	beq 0x01,Usb0_SDsystem_dispose
+//regb:length
+usb_send_zero_packet:
+	arg mem_usb_zero_packet,rega
+	branch usb0_respond
+usb_send_ones_packet:
+	arg mem_usb_ones_packet,rega
+	branch usb0_respond
+usb_send_two_packet:
+	arg mem_usb_two_packet,rega
+	branch usb0_respond
+
+usb0_get_status_in_interface:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall
+	arg 2,regb
+	branch usb_send_zero_packet
+
+usb0_get_status_in_endpoint:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	beq IN_EP1,usb0_get_status_in_ep_in_ep1
+	beq IN_EP2,usb0_get_status_in_ep_in_ep2
+	beq IN_EP3,usb0_get_status_in_ep_in_ep3
+	and_into 0x7f,pdata
+	beq 0x00,usb0_get_status_in_ep_in_ep0
+	branch usb0_force_stall
+	
+usb0_get_status_in_ep_in_ep0:
+	fetch 1,mem_usb_ep0_stall_status
+usb0_get_status_in_ep_in_ack:
+	arg 2,regb
+	beq 1,usb_send_ones_packet
+	branch usb_send_zero_packet
+usb0_get_status_in_ep_in_ep1:
+	fetch 1,mem_usb_ep1_stall_status
+	branch usb0_get_status_in_ep_in_ack
+usb0_get_status_in_ep_in_ep2:
+	fetch 1,mem_usb_ep2_stall_status
+	branch usb0_get_status_in_ep_in_ack
+usb0_get_status_in_ep_in_ep3:
+	fetch 1,mem_usb_ep3_stall_status
+	branch usb0_get_status_in_ep_in_ack
+
+usb_get_idle:
+	jam 1,mem_usb_idle_flag
+	arg mem_usb_idle_rate,rega
+	arg 1,regb
+	branch usb0_respond
+
+usb_get_report:
+	fetch 2,mem_usb_setup_bValue
+	arg PC_GET_REPORT,temp
+	isub temp,null
+	nbranch usb0_force_stall,zero
+//	set0 mark_isstr,mark
+usb_get_report_dispose:	
+	fetch 1,mem_usb0_data_ready_report
+	nbranch usb_get_report_data_success,blank
+	jam PC_GET_NONDATA,mem_usb0_get_report_data
+usb_get_report_send_data:
+	fetch 1,mem_usb_setup_bLength
+	iforce regb
+	arg mem_usb0_get_report_data,rega
+	call usb0_respond
+usb_get_report_data_release:	
+	arg mem_usb0_get_report_data,contw
+	arg 8,loopcnt
+	branch memset0
+usb_get_report_data_success:
+	jam 0,mem_usb0_data_ready_report
+	jam PC_GET_DATA,mem_usb0_get_report_data
+	branch usb_get_report_send_data
+
+usb_get_protocol_req:
+	fetch 1,mem_usb_setup_bLength
+	bne 1,usb0_force_stall
+	jam 1,mem_usb_get_protocol_flag
+	arg 1,regb //length
+	fetch 1,mem_usb_set_protocol_value
+	beq 0,usb_get_report_protocol
+	beq 1,usb_get_boot_protocol
+	branch usb_send_zero_packet
+usb_get_report_protocol:
+	branch usb_send_ones_packet
+usb_get_boot_protocol:
+	branch usb_send_zero_packet
+
+
+
+//in device
+usb0_request_clear_feature:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	beq OUT_DEVICE,usb0_request_clear_feature_out_device
+	beq OUT_INTERFACE,usb0_request_clear_feature_out_interface
+	beq OUT_ENDPOINT,usb0_request_clear_feature_out_endpoint
+	branch usb0_force_stall
+
+usb0_request_clear_feature_out_device:
+	fetch 1,mem_usb_setup_bValue
+	bne DEVICE_REMOTE_WAKEUP,usb0_force_stall
+	fetch 1,core_usb_config
+	set0 7,pdata
+	store 1,core_usb_config
+	jam 0,mem_usb_remote_wakeup
+	jam 1,mem_usb_clear_remote_wakeup
+	fetch 1,mem_sdsystem_wakeup_flag
+	branch usb0_reply_zerolen,blank
+	jam 0,mem_sdsystem_wakeup_flag
+	jam 0,mem_usb_clear_remote_wakeup
+	jam USB_CONNECTED,mem_usb_state
+	branch usb0_reply_zerolen
+
+usb0_request_clear_feature_out_interface:
+	branch usb0_force_stall
+
+usb0_request_clear_feature_out_endpoint:
+	fetch 1,mem_usb_setup_bValue
+	bne ENDPOINT_HALT,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	beq IN_EP1,usb0_force_stall_ep1_in_off
+	beq IN_EP2,usb0_force_stall_ep2_in_off
+	beq IN_EP3,usb0_force_stall_ep3_in_off
+	and_into 0x7f,pdata
+	beq 0x00,usb0_force_stall_ep0_in_off
+	branch usb0_force_stall
+
+usb0_force_stall_ep0_in_off:
+	jam 0,mem_usb_ep0_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep1_in_off:
+	jam 0,mem_usb_ep1_stall_status
+usb0_force_stall_ep1_in_off_reply:	
+	jam 1,mem_usb_clear_halt
+	branch usb0_reply_zerolen
+usb0_force_stall_ep2_in_off:
+	jam 0,mem_usb_ep2_stall_status
+	branch usb0_force_stall_ep1_in_off_reply
+usb0_force_stall_ep3_in_off:
+	jam 0,mem_usb_ep3_stall_status
+	branch usb0_force_stall_ep1_in_off_reply
+
+
+usb0_request_set_feature:
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	beq OUT_DEVICE,usb0_request_set_feature_out_device
+	beq OUT_INTERFACE,usb0_request_set_feature_out_interface
+	beq OUT_ENDPOINT,usb0_request_set_feature_out_endpoint
+	branch usb0_force_stall
+
+usb0_request_set_feature_out_device:
+	fetch 1,mem_usb_setup_bValue
+	bne DEVICE_REMOTE_WAKEUP,usb0_force_stall
+	call dongle_set_pc_sleep_flag
+	fetch 1,core_usb_config
+	set1 7,pdata
+	store 1,core_usb_config
+	jam 1,mem_usb_remote_wakeup
+	jam USB_SLEEP,mem_usb_state
+	jam 0,mem_usb_tx_win_enable
+	call usb0_reply_zerolen
+usb_wakeup_timer_reinit:
+	call timer_reinit
+	setarg TIMER_WAKEUP_DELAY
+	arg TIMER_WAKEUP,queue
+	branch timer_init
+	
+usb0_request_set_feature_out_interface:
+	branch usb0_force_stall
+
+usb0_request_set_feature_out_endpoint:
+	fetch 1,mem_usb_setup_bValue
+	bne ENDPOINT_HALT,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	beq IN_EP1,usb0_force_stall_ep1_in_on
+	beq IN_EP2,usb0_force_stall_ep2_in_on
+	beq IN_EP3,usb0_force_stall_ep3_in_on
+	and_into 0x7f,pdata
+	beq 0x00,usb0_force_stall_ep0_in_on
+	branch usb0_force_stall
+
+usb0_force_stall_ep0_in_on:
+	jam 1,mem_usb_ep0_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep1_in_on:
+	jam 1,mem_usb_ep1_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep2_in_on:
+	jam 1,mem_usb_ep2_stall_status
+	branch usb0_reply_zerolen
+usb0_force_stall_ep3_in_on:
+	jam 1,mem_usb_ep3_stall_status
+	branch usb0_reply_zerolen
+
+
+usb0_request_set_address:
+	fetch 1,mem_usb_setup_bmRequestType
+	bne OUT_DEVICE,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	and_into 0x80,pdata
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb_usb0_state_set_dev_addr
+usb_usb0_state_set_dev_default:	
+	jam DEV_DEFAULT,mem_usb0_state
+usb0_request_set_wait_address:
+	fetch 1,mem_usb_setup_bValue
+	store 1,core_usb_addr
+	call usb0_reply_zerolen
+	jam 1,mem_usb_set_high_addr_flag
+	rtn
+usb_usb0_state_set_dev_addr:
+	jam DEV_ADDRESS,mem_usb0_state
+	branch usb0_request_set_wait_address
+
+
+usb0_request_set_configuration:
+	fetch 1,mem_usb0_state
+	beq DEV_DEFAULT,usb0_force_stall
+	fetch 1,mem_usb_setup_bmRequestType
+	bne OUT_DEVICE,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue+1
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	sub pdata,USB_MAX_NUM_CFG,null
+	nbranch usb0_force_stall,positive
+	fetch 1,mem_usb0_state
+	beq DEV_ADDRESS,usb0_request_set_cfg_addr_state
+	beq DEV_CONFIGURED,usb0_request_set_cfg_cfg_state
+	branch usb0_force_stall
+ // This software only supports config = 0,1
+usb0_request_set_cfg_addr_state:
+usb0_request_set_cfg_cfg_state:
+	fetch 1,mem_usb_setup_bValue	//1:Configured state   0:Address state
+	beq 0,usb0_request_set_cfg_stay_addr_state
+	jam DEV_CONFIGURED,mem_usb0_state
+	branch usb0_reply_zerolen
+usb0_request_set_cfg_stay_addr_state:
+	jam DEV_ADDRESS,mem_usb0_state
+	branch usb0_reply_zerolen
+
+
+usb0_request_set_interface:
+	fetch 1,mem_usb0_state
+	bne DEV_CONFIGURED,usb0_force_stall		
+	fetch 1,mem_usb_setup_bmRequestType
+	bne OUT_INTERFACE,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValueH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bLengthH
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_wIndex+1
+	bne 0,usb0_force_stall
+	branch usb0_reply_zerolen
+
+
+usb_set_idle:
+	bpatchx patch32_0,mem_patch32
+	jam 1,mem_usb_idle_flag
+	fetch 1,mem_usb_setup_bValueH
+	store 1,mem_usb_idle_rate
+	fetch 1,mem_usb_setup_wIndex
+	sub pdata,1,null
+	call usb_clear_remote_wakeup_set0,zero
+	fetch 1,mem_usb_state
+	bne USB_RESUME,usb0_reply_zerolen
+	jam USB_CONNECTED,mem_usb_state
+	call usb0_reply_zerolen
+	nop 30000
+	nop 30000
+	rtn
+usb_clear_remote_wakeup_set0:
+	jam 1,mem_usb_device_enumeration_endflag
+	jam 0,mem_usb_clear_remote_wakeup
+	jam USB_RESUME,mem_usb_state
+	rtn
+
+
+usb_set_report:
+	arg mem_usb0_set_report_data,contw
+	call usb_rx_data
+	jam 1,mem_usb0_get_set_report
+	call usb_set_report_resume_judge
+	fetch 2,mem_usb_setup_bValue
+	store 2,mem_usb_setup_bValue_temp
+	call usb0_reply_zerolen
+	fetch 1,mem_device_option
+	rtnne dvc_op_dongle
+	fetch 1,mem_usb_tx_win_enable
+	rtn blank
+	fetch 1,mem_usb0_set_report_data
+usb_get_led_status:	
+	store 1,mem_24g_led_status
+	jam 0,mem_usb_tx_win_enable
+	jam KB_LED_ACKPAYLOAD,mem_24g_ackpayload_enable
+	rtn
+
+	
+usb_set_report_resume_judge:
+	fetch 2,mem_usb_setup_bValue
+	arg PC_SET_REPORT_bValue,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_usb_setup_wIndex
+	arg PC_SET_REPORT_wIndex,temp
+	isub temp,null
+	nrtn zero
+	fetch 2,mem_usb_setup_bLength
+	arg PC_SET_REPORT_bLength,temp
+	isub temp,null
+	nrtn zero
+	jam 1,mem_usb_tx_win_enable
+	rtn
+
+
+usb_set_protocol_req:
+	fetch 1,mem_usb_setup_bLength
+	bne 0,usb0_force_stall
+	fetch 1,mem_usb_setup_bValue
+	beq BOOT_PROTOCOL,usb_set_boot_protocol
+	beq REPORT_PROTOCOL,usb_set_report_protocol
+	branch usb0_force_stall
+usb_set_boot_protocol:
+	jam 0,mem_usb_set_protocol_status
+	jam 1,mem_usb_set_protocol_value
+	branch usb0_reply_zerolen
+usb_set_report_protocol:
+	jam 1,mem_usb_tx_mac_enable
+	jam 1,mem_usb_set_protocol_status
+	jam 0,mem_usb_set_protocol_value
+	branch usb0_reply_zerolen
+
+
+usb0_respond_length:
+	ifetchr regb,1,rega
+	increase 1,rega
+//rega=*buff,regb=size
+usb0_respond:
+	bpatchx patch32_1,mem_patch32
+	set1 mark_usb_first_resp,mark
+	bmark0 mark_isstr,usb0_respond_nostr
+	increase 1,regb
+	lshift regb,regb
+usb0_respond_nostr:
+	storer rega,2,mem_bufptr
+	storer regb,1,mem_remain
+	branch usb0_tx
+
+usb_no_respond_data:
+	arg 0,queue
+	branch usb_trig
+
+
+
+//mem_bufptr=*buff,mem_remain=size,loopcnt=i,rega=len
+usb0_tx:
+	bpatchx patch32_2,mem_patch32
+	fetch 1,core_usb_txbusy
+	rtnbit1 0
+	fetch 1,mem_remain
+	rtn blank
+	copy pdata,loopcnt
+	iforce temp
+	fetch 2,mem_usb_setup_bLength
+	sub pdata,EP0_PACKET_SIZE,null
+	branch usb0_tx_short,positive
+	sub loopcnt,EP0_PACKET_SIZE,null
+	branch usb0_tx_info,positive
+	force EP0_PACKET_SIZE,loopcnt
+	branch usb0_tx_info
+usb0_tx_short:
+	isub loopcnt,null
+	branch usb0_tx_info,positive
+	iforce loopcnt
+	store 1,mem_remain
+usb0_tx_info:
+	fetch 1,mem_remain
+	isub loopcnt,pdata
+	store 1,mem_remain
+	add loopcnt,-1,pdata
+	store 1,mem_usb_txbuf
+	bmark0 mark_isstr,usb0_tx_nostr
+	rshift pdata,pdata
+	add loopcnt,-1,pdata
+	store 1,mem_usb_txbuf
+	bmark0 mark_usb_first_resp,usb0_tx_nostr
+	set0 mark_usb_first_resp,mark
+	istoret 1,contw
+	setarg 3
+	istore 1,contw
+	increase -1,loopcnt
+	copy loopcnt,pdata
+	nbranch usb0_tx_nostr,zero
+	increase 1,loopcnt
+usb0_tx_nostr:
+	fetch 2,mem_bufptr
+	copy pdata,contr
+usb0_tx0:
+	ifetch 1,contr
+	istore 1,contw
+	bmark0 mark_isstr,usb0_tx1
+	setarg 0
+	istore 1,contw
+usb0_tx1:
+	loop usb0_tx0
+	copy contr,pdata
+	store 2,mem_bufptr				//mem_bufptr += len
+	setarg mem_usb_txbuf
+	store 2,core_usb_tx_saddr0
+	arg 0,queue
+	call usb_trig
+	fetch 1,mem_remain
+	nrtn blank
+	fetch 1,mem_usb_state
+	rtnne USB_GOT_REPORT_REQ
+	jam USB_CONNECTED,mem_usb_state
+	rtn
+
+
+
+usb_tx_ep1:
+	arg 1,queue
+	arg mem_usb_txbuf1,rega
+	storer rega,2,core_usb_tx_saddr1
+usb_tx_buf:
+	add loopcnt,-1,pdata
+	istore 1,rega
+usb_tx_loop:
+	ifetch 1,contr
+	istore 1,contw
+	loop usb_tx_loop
+usb_trig:
+	setarg 0
+	qset1 pdata
+	store 1,core_usb_trig
+	rtn
+
+usb_tx_ep2:
+	arg 2,queue
+	arg mem_usb_txbuf2,rega
+	storer rega,2,core_usb_tx_saddr2
+	branch usb_tx_buf
+
+usb_tx:
+	bpatchx patch32_3,mem_patch32
+	fetch 1,mem_usb_tx_enable
+	rtn blank
+	fetch 1,mem_usb_device_enumeration_endflag
+	branch usb_tx_fifo_release,blank
+	fetch 1,mem_usb_state
+	beq USB_SLEEP,usb_windows_wakeup
+	bne USB_CONNECTED,usb_tx_fifo_release
+	fetch 1,mem_usb_clear_remote_wakeup
+	nbranch usb_tx_fifo_release,blank
+	call usb_tx_data_ep1
+	branch usb_tx_data_ep2
+
+usb_tx_data_ep1:
+	fetch 1,core_usb_txbusy
+	rtnbit1 1
+	fetch 1,mem_usb_tx_enable
+	rtnbit0 1
+	fetch 1,mem_usb_tx_enable
+	set0 1,pdata
+	store 1,mem_usb_tx_enable
+	fetch 1,mem_usb_ep1_data
+	rtn blank
+	beq USB_EP1_KB,usb_tx_kb_normal_data
+	branch assert
+
+usb_tx_data_ep2:
+	fetch 1,core_usb_txbusy
+	rtnbit1 2
+	fetch 1,mem_usb_tx_enable
+	rtnbit0 2
+	fetch 1,mem_usb_tx_enable
+	set0 2,pdata
+	store 1,mem_usb_tx_enable
+	fetch 1,mem_usb_ep2_data
+	rtn blank
+	beq USB_EP2_MS,usb_tx_ms_data
+	beq USB_EP2_MULTIKEY,usb_tx_kb_multikey_data
+	beq USB_EP2_SYSTEMKEY,usb_tx_kb_systemkey_data
+	branch assert
+
+usb_tx_fifo_release:
+	//clear mem_usb_mouse_data/mem_usb_kb_data/mem_usb_kb_multikey/mem_usb_kb_system
+	arg mem_usb_mouse_data,contw
+	arg 8,loopcnt
+	branch memset0
+	
+usb_tx_ms_data:
+	fetch 1,mem_usb_idle_flag
+	fetcht 1,mem_usb_get_protocol_flag
+	iand temp,pdata
+	branch usb_tx_ms_data_normal_mode,blank
+	fetcht 1,mem_usb_set_protocol_status
+	iadd temp,pdata
+	beq MAC_BOOT_MODE,usb_tx_ms_data_mac_boot_mode
+	branch usb_tx_ms_data_normal_mode
+
+usb_tx_ms_data_mac_boot_mode:
+	jam 0,mem_usb_ep2_data
+usb_tx_ms_data_mac_boot_regroup:
+	fetch 1,mem_usb_mouse_data+1	//key
+	beq R_KEY,usb_tx_mac_boot_ms_regroup_r_or_lrkey
+	beq LR_KEY,usb_tx_mac_boot_ms_regroup_r_or_lrkey
+	fetch 1,mem_usb_mouse_data+1	//key
+	store 1,mem_usb_mouse_data
+	fetch 1,mem_usb_mouse_data+2	//x low
+	istore 1,contw
+	fetch 1,mem_usb_mouse_data+4	//y low
+	istore 1,contw
+	fetch 1,mem_usb_mouse_data+6	//wheel
+	istore 1,contw
+	arg 4,loopcnt
+	arg mem_usb_mouse_data,contr
+	branch usb_tx_ep2
+	
+usb_tx_ms_data_normal_mode:
+	jam 0,mem_usb_ep2_data
+usb_tx_mac_boot_ms_regroup_r_or_lrkey:	
+	arg 8,loopcnt		
+	arg mem_usb_mouse_data,contr
+	branch usb_tx_ep2
+
+usb_tx_kb_multikey_data:
+	jam 0,mem_usb_ep2_data
+	arg 3,loopcnt
+	arg mem_usb_kb_multikey,contr
+	branch usb_tx_ep2
+
+usb_tx_kb_normal_data:
+	jam 0,mem_usb_ep1_data
+	arg 8,loopcnt
+	arg mem_usb_kb_data,contr
+	branch usb_tx_ep1
+
+usb_tx_kb_systemkey_data:
+	jam 0,mem_usb_ep2_data
+	arg 2,loopcnt
+	arg mem_usb_kb_system,contr
+	branch usb_tx_ep2
+
+usb_inwake_state_tx_dispose:
+	fetch 1,mem_usb_state
+	beq USB_CONNECTED,usb_mac_wakeup_trig
+	rtn
+usb_mac_wakeup_trig:
+	fetch 1,core_usb_config
+	set1 7,pdata
+	store 1,core_usb_config
+	jam 1,mem_usb_mac_wakeup_trig
+	rtn
+
+usb_mac_wakeup_judge:
+	fetch 1,mem_usb_state
+	rtneq USB_SLEEP
+	beq USB_CONNECTED,usb_mac_wakeup
+	rtn
+usb_mac_wakeup:
+	fetch 1,mem_usb_mac_wakeup_trig
+	rtn blank
+	jam 1,mem_usb_wakestate_onetime_flag
+	branch usb_wakeup
+
+usb_windows_wakeup:
+	arg TIMER_WAKEUP,queue
+	call timer_check
+	nrtn blank
+usb_wakeup:
+	fetch 1,core_usb_config
+	rtnbit0 7	//endpoint wakeup enable
+	jam 0xfc,core_usb_config
+	nop 30000
+	jam 0x3c,core_usb_config
+	rtn
+
+
+endif
+
Index: mouse_public_3mode_usb/program/utility.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/utility.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/utility.prog	(working copy)
@@ -0,0 +1,1184 @@
+
+right_shift_n: //rshiftN pdata,pdata
+	sub loopcnt,0,null
+	rtn zero
+right_shift_n_loop: 
+	rshift pdata,pdata
+	loop right_shift_n_loop
+	rtn
+
+/* lshift. 0:1 byte; 1:2byte; 2:4byte; 3:8byte; 4:16byte*/
+left_shift_n:
+	force 1,pdata
+	sub loopcnt,0,null
+	rtn zero
+left_shift_n_loop:
+	lshift pdata,pdata
+	loop left_shift_n_loop
+	rtn
+push_stack:
+	storer contw,2, mem_contw
+	storet 8,mem_temp
+	storer timeup,4,mem_timeup
+	call push_stack_rega_b_c
+	storer contr,2, mem_contr
+	storer loopcnt,2, mem_loopcnt
+	storer queue,2,mem_queue
+	rtn
+
+push_stack_rega_b_c:
+	storer rega,4, mem_rega
+	storer regb,4, mem_regb
+	storer regc,3, mem_regc
+	rtn
+
+pop_stack:
+	fetch 2, mem_contw
+	iforce contw
+	fetcht 8,mem_temp
+	fetchr timeup,4,mem_timeup
+	call pop_stack_rega_b_c
+	fetchr loopcnt,2,mem_loopcnt
+	fetchr queue,2,mem_queue
+	fetch 2,mem_contr
+	iforce contr
+	rtn
+
+pop_stack_rega_b_c:
+	fetchr rega,4, mem_rega
+	fetchr regb,4, mem_regb
+	fetchr regc,3,mem_regc
+	rtn
+
+get_contw:
+	fetch 2,mem_contw
+	copy pdata,contw
+	rtn
+get_contr:
+	fetch 2,mem_contr
+	copy pdata,contr
+	rtn
+store_contw:
+	copy contw,pdata
+	store 2,mem_contw
+	rtn
+store_contr:
+	copy contr,pdata
+	store 2,mem_contr
+	rtn	
+	
+
+//
+save_cont_pointers:
+	copy contw,pdata
+	store 2,mem_hold_contw
+	copy contr,pdata
+	store 2,mem_hold_contr
+	rtn
+load_cont_pointers:
+	fetch 2,mem_hold_contw
+	copy pdata,contw
+	fetch 2,mem_hold_contr
+	copy pdata,contr
+	rtn
+
+
+//input pdata,temp 1byte
+//output rega:diff
+get_diff:
+	isub temp,rega
+	rtn positive
+	arg 0x100,rega
+	iadd rega,pdata
+	isub temp,rega
+	rtn	
+
+memcpy96:
+	call memcpy32
+memcpy64:
+	call memcpy32
+	branch memcpy32
+memcpy20:
+	call memcpy8
+memcpy12:
+	call memcpy8
+memcpy4:
+	ifetch 4,contr
+	istore 4,contw
+	rtn	
+memcpy8:
+	ifetch 8,contr
+	istore 8,contw
+	rtn	
+
+memcpy48:
+	call memcpy16
+memcpy32:
+	call memcpy8
+memcpy24:
+	call memcpy8
+memcpy16:
+	call memcpy8
+	branch memcpy8
+
+delay:
+	increase -1,pdata
+	nop 38
+	nbranch delay,blank
+	rtn
+
+
+delay_10ms:
+	arg 10,loopcnt
+delay_ms_wait:
+	nop 12000
+	loop delay_ms_wait
+	rtn
+
+delay_50ms:
+	arg 50,loopcnt
+	branch delay_ms_wait
+
+bn_zero:
+	force 3,loopcnt
+memset0:
+	force 0,pdata
+memset8:
+	istore 8,contw
+	loop memset8
+	rtn
+
+
+memset0_16:
+	call memset0_8
+memset0_8:
+	force 0,pdata
+	istore 8,contw
+	rtn
+memset0_4:
+	force 0,pdata
+	istore 4,contw
+	rtn	
+	
+clear_mem_256:
+	force 4,loopcnt
+	branch memset0 
+clear_mem_512:
+	force 8,loopcnt
+	branch memset0 
+
+clear_mem:
+	deposit loopcnt
+	rtn blank
+	setarg 0
+clear_mem_loop:
+	istore 1,contw
+	loop clear_mem_loop
+	rtn
+	
+
+clear_temp_block:
+	arg 32,loopcnt
+	arg mem_temp_block0,contw
+	branch clear_mem
+	
+xor_loop:
+	ifetch   4,regc
+	ifetcht 4,rega
+	ixor     temp,pdata
+	istore   4,contw	
+	increase 4,rega
+	increase 4,regc
+	loop  xor_loop
+	rtn
+	
+// 11 22 -> 22 11; 11 22 33 -> 33 22 11 
+// rega:data addr ;loopnct:length
+inverse_data:
+	bpatchx patch32_4,mem_patch32
+	copy loopcnt,pdata
+	sub pdata,1,null
+	rtn positive
+	iadd rega,regb	
+	increase -1,regb
+	rshift loopcnt,loopcnt
+inverse_loop:
+	ifetcht 1,rega
+	ifetch 1,regb
+	istore 1,rega
+	istoret 1,regb
+	increase -1,regb
+	increase 1,rega
+	loop inverse_loop
+	rtn
+
+/*
+	function name:inverse_data_6Byte or le2be_6Byte
+	input: pdata is data that want change
+	output:pdata is Converted data
+	used Resources:temp,contr
+*/
+le2be_6Byte:
+inverse_data_6Byte:
+	rshift32 pdata,temp
+	call inverse_data_4Byte
+	byteswap temp,temp
+	lshift16 pdata,pdata
+	ior temp,pdata
+	rtn
+
+
+/*
+	function name:inverse_data_4Byte or le2be_4Byte
+	input: pdata is data that want change
+	output:pdata is Converted data
+	used Resources:contr
+*/
+le2be_4Byte:
+inverse_data_4Byte:
+	rshift16 pdata,contr
+	byteswap contr,contr
+	byteswap pdata,pdata
+	lshift16 pdata,pdata
+	ior contr,pdata
+	rtn
+
+
+memcpy_fast:
+	deposit loopcnt
+	rtn blank
+memcpy_fast_loop:
+	increase -8,loopcnt
+	call memcpy8,positive
+	rtn zero
+	branch memcpy_fast_loop,positive
+	increase 8,loopcnt
+memcpy_fast_loop_four:
+	increase -4,loopcnt
+	call memcpy4,positive
+	rtn zero
+	branch memcpy_fast_loop_four,positive
+	increase 4,loopcnt
+	branch memcpy
+ 
+memcpy:
+	deposit loopcnt
+	rtn blank
+memcpy_loop:
+	ifetch 1,contr
+	istore 1,contw
+	loop memcpy_loop
+	rtn
+
+timer_stop:
+	setarg 0
+timer_init:
+	rshift clkn_bt,temp
+	storet 4,mem_last_clkn
+	arg mem_timers,contw
+	iforce temp
+	lshift queue,pdata
+	iadd contw,contw
+	istoret 2,contw
+	bpatchx patch32_5,mem_patch32
+	rtn
+
+timer_check_timeout:
+	arg 0x800,timeup
+	lshift16 timeup,timeup
+	iadd timeup,pdata
+	rtn
+
+
+timer_reinit:
+	arg 0,queue
+timer_check:
+	bpatchx patch32_6,mem_patch32
+	fetcht 4,mem_last_clkn
+	rshift clkn_bt,pdata
+	store 4,mem_last_clkn	
+	isub temp,null
+	ncall timer_check_timeout,positive	
+	isub temp,timeup
+	copy timeup,temp
+	arg mem_timers,contr
+	copy contr,contw
+	arg 16,loopcnt
+timer_loop:
+	ifetch 2,contr
+	isub temp,pdata
+	branch timer_counting,positive
+	force 0,pdata
+timer_counting:
+	istore 2,contw
+	loop timer_loop	
+	arg mem_timers,contr
+	lshift queue,pdata
+	iadd contr,contr
+	ifetch 2,contr
+	rtn
+
+
+
+	/* pdata 28+16 bit add temp 26+16 bit, result in temp */
+clk_add:
+	iadd temp,temp
+	copy temp, loopcnt
+	fetch 2,mem_param_rt_rthalfslot
+	isub loopcnt,pdata
+	rtn positive
+	sub pdata,0,pdata
+	rshift16 temp,temp
+	increase 1,temp
+	lshift16 temp,temp
+	ior temp,temp
+	rtn
+
+clk_diff_rt:
+	call clk_diff
+	branch clk2rt
+
+/* pdata -temp -> pdata, all are 28+16 bits, set user if negative */
+clk_diff:
+	disable user
+	isub temp,pdata
+	branch clk_diff_pos,positive
+	enable user
+	sub pdata,0,pdata
+clk_diff_pos:
+	rtnbit0 15
+	copy pdata,regab
+	arg 0x10000,temp
+	fetch 2,mem_param_rt_rthalfslot
+	isub temp,pdata
+	iadd regab,pdata
+	set0 64,pdata
+	rtn
+
+	
+
+clk2rt:
+	fetcht 2,mem_param_rt_rthalfslot
+	iforce contr
+	rshift16 pdata,pdata
+	imul32 temp,pdata
+	iadd contr,pdata
+	rtn
+
+	/* pdata = clks in, temp = lpo out */
+clk2lpo:
+	lshift8 pdata,pdata
+	lshift4 pdata,pdata
+	fetcht 3,mem_clks_per_lpo
+	idiv temp
+	call wait_div_end
+	quotient temp
+	rtn
+
+	/* rt clk -> bt+rt clk */
+clk2bt:
+	fetcht 2,mem_param_rt_rthalfslot
+	idiv temp
+	call get_div_result
+	lshift16 pdata,pdata
+	remainder temp
+	ior temp,temp
+	rtn
+
+
+
+//input:contu 
+//output:temp
+//used register: temp regab
+string2dec_from_uart:
+	arg 0,temp
+string2dec_from_uart_done:
+	copy temp,regab
+	ifetch 1,contu
+	call uchar2dialog	
+	copy regab,temp
+	call swap
+	arg 10,regb
+	imul32 regb,pdata
+	iadd temp,pdata
+	copy pdata,temp
+	loop string2dec_from_uart_done
+	rtn
+	
+
+
+uchar2dialog:
+	arg 0x3a,temp
+	isub temp,null
+	nbranch uchar2dialog_number,positive
+	arg 0x61,temp
+	isub temp,null
+	branch uchar2dialog_a2f,positive
+	arg 0x37,temp
+	isub temp,pdata
+	rtn
+uchar2dialog_number:
+	arg 0x30,temp
+	isub temp,pdata
+	rtn
+uchar2dialog_a2f:
+	arg 0x57,temp
+	isub temp,pdata
+	rtn
+
+pn9:
+	copy temp,alarm
+	setarg 0x1ff
+	force 0,regb
+pn9_loop:	
+	rshift3 pdata,rega
+	rshift rega,rega
+	ixor rega,rega
+	isolate1 0,rega
+	setflag true,9,pdata
+	rshift temp,temp
+	isolate1 0,pdata
+	setflag true,7,temp
+	rshift pdata,pdata
+	increase 1,regb
+	compare 0,regb,0x7
+	nbranch pn9_loop,true
+	istoret 1,contw
+	loop pn9_loop
+	copy alarm,temp
+	rtn
+
+	// contr: rxdata, loopcnt is count. result in quotient
+calc_average:
+	setarg 0
+	copy loopcnt,rega
+calc_average_loop:
+	ifetcht 2,contr
+	iadd temp,pdata
+	loop calc_average_loop
+	idiv rega
+
+get_div_result:
+	call wait_div_end
+	quotient pdata
+	rtn
+
+wait_div_end:	
+	rtn modone
+	branch wait_div_end
+
+
+
+//input:
+//	count:loopcnt str1:rega str2:regb
+//output:
+//	same:set flag zero ,diff not set flag zero
+// using:
+//	reg:temp null flag:zero
+compare_loop:
+string_compare:
+	ifetch 1,rega
+	ifetcht 1,regb
+	isub temp,null
+	nrtn zero
+	increase 1,rega
+	increase 1,regb
+	loop string_compare
+	force 0,null
+	rtn
+
+	/* pdata = temp if pdata > temp */
+ceiling:
+	isub temp,null
+	nrtn positive
+	deposit temp
+	rtn
+	
+swap:
+	iadd temp,pdata
+	isub temp,temp
+	isub temp,pdata
+	rtn
+
+clean_mem:
+	arg 0x200,loopcnt
+	arg 0x4000,contw
+	branch memset0				// clear xram at boot
+
+	//cb function ptr in pdata
+callback_func:
+	rtn blank
+	copy pdata,pc	//rtn through cb functon.
+	//branch assert
+
+wait_uarttx:
+	fetch 2,core_uart_txitems
+	nbranch wait_uarttx,blank
+	rtn
+
+ice_break:
+	jam 0x1,core_ice_ctrl
+	rtn
+
+ice_setbp:
+	store 2,core_ice_break0
+	fetch 1,core_ice_ctrl
+	set1 4,pdata
+	store 1,core_ice_ctrl
+	rtn
+ice_setbp2:
+	store 2,core_ice_break1
+	fetch 1,core_ice_ctrl
+	set1 6,pdata
+	store 1,core_ice_ctrl
+	rtn
+	
+ice_set_write_bp:
+	store 2,core_ice_break0
+	jam 0x30,core_ice_ctrl
+	rtn
+
+ifdef COMPLIE_TEST_CODE
+test_no_white:
+	fetch 1,core_config
+	set1 whiteoff_bit,pdata
+	store 1,core_config			/* whitening off */
+	rtn
+endif
+
+test_enable_white:
+	fetch 1,core_config
+	set0 whiteoff_bit,pdata
+	store 1,core_config			/* whitening on */
+	rtn
+
+check_uart_tx_buff:
+	fetch 2,core_uart_txitems
+	arg UART_AIR_CONTROL_THRESHOLD,temp
+pdata_sub_temp:
+	isub temp,null
+	rtn
+
+	//fuction fifo_in
+	//rega pointer to fifo memory , *(rega+len) is the end of fifo
+	//mem_fifo_temp data into fifo
+	//assert if fifo was full
+fifo_in:
+	bpatchx patch32_7,mem_patch32
+	ifetcht UTIL_FIFO_LEN,rega
+	and temp,0xff,pdata
+	nbranch fifo_in_push,blank
+	rshift8 temp,pdata
+	istore UTIL_FIFO_LEN,rega
+fifo_in_push:
+	increase UTIL_FIFO_LEN+UTIL_FIFO_OFFSET,rega
+	ifetch 1,rega
+	nbranch assert,blank //fifo full
+	fetch 1,mem_fifo_temp
+	istore 1,rega
+	rtn
+	
+	//fuction fifo_out
+	//rega pointer to fifo memory
+	//pdata  data from fifo, blank mains fifo empty
+fifo_out:
+	bpatchx patch33_0,mem_patch33
+	arg UTIL_FIFO_LEN,loopcnt
+	ifetch UTIL_FIFO_LEN,rega
+	rtn blank
+fifo_out_loop:
+	ifetch 1,rega
+	nbranch fifo_out_end,blank
+	increase 1,rega
+	loop fifo_out_loop
+	branch assert
+fifo_out_end:
+	arg 0,temp
+	istoret 1,rega
+	rtn
+
+	//fuction fifo_is_empty
+	//rega pointer to fifo memory
+	//blank--- fifo is empty
+fifo_is_empty:
+	ifetch UTIL_FIFO_LEN,rega
+	rtn
+
+	//fuction fifo_is_full
+	//rega pointer to fifo memory
+	//blank--- fifo is NOT full
+fifo_is_full:
+	ifetch 1,rega
+	rtn
+	//rega pointer to fifo memory
+	//blank--- fifo is NOT near full
+fifo_is_near_full:
+	ifetch 2,rega
+	rtn
+
+	//rega pointer to fifo memory
+	//count output via pdata
+fifo_content_count:
+	arg 0,temp
+fifo_content_count_loop:
+	fetch 1,contr
+	loop fifo_content_count_loop,blank
+	increase 1,temp
+	loop fifo_content_count_loop
+	copy temp,pdata
+	rtn
+
+//input pdata, temp, return small in pdata	
+not_greater_than:
+	isub temp,null
+	nrtn positive
+copy_temp2pdata:
+	copy temp,pdata
+	rtn
+
+
+disable_positive:
+	force -1,null
+	rtn
+enable_positive:
+disable_zero:
+	force 1,null
+	rtn
+enable_zero:
+	force 0,null
+	rtn
+
+enable_user:
+	enable user
+	rtn
+	
+disable_user:
+	disable user
+	rtn
+	
+enable_user2:
+	enable user2
+	rtn
+	
+disable_user2:
+	disable user2
+	rtn
+
+enable_user7:
+	enable user7
+	rtn
+
+disable_blank:
+	setarg 1
+	rtn
+
+enable_blank:
+set_pdata_0:
+	setarg 0
+	rtn
+
+//input pdata :sum
+//output pdata :sum
+cal_sum:
+	sub loopcnt,0,null
+	rtn zero
+cal_sum_loop:
+	ifetcht 1,contr
+	iadd temp,pdata
+	loop cal_sum_loop
+	rtn
+
+	
+reverse_byte:
+	copy loopcnt,pdata
+	rtn blank
+	copy contr,pdata
+	iadd loopcnt,pdata
+	increase -1,pdata
+	copy pdata,contr	
+reverse_loop:
+	ifetch 1,contr
+	increase -2,contr
+	istore 1,contw
+	loop reverse_loop
+	rtn
+
+calc_k12:
+	copy timeup,regb
+
+	// regb:rxdata1, enable user for K1, result stored in contw 8 bytes
+calc_k:
+	arg mem_local_sig,regc
+	force 36,loopcnt
+	force 0,rege
+	force 0,regf
+rxcal_k1_loop:
+	call complex_mult16to8
+	preload rega
+	iadd rege,rege
+	preload temp
+	iadd regf,regf
+	increase 4,regb
+	increase 2,regc
+	loop rxcal_k1_loop
+	preload rege
+	arg 36,temp
+	call signed_div
+	istore 4,contw
+	preload regf
+	call signed_div
+	istore 4,contw
+	rtn
+
+	// regb points to 32bit complex, regc points to 16bit complex, result in rega+temp
+complex_mult16to8:
+	ifetchr nap,2,regb
+	ifetchr fhs_misc,1,regc
+	call signed_ext16by8
+	imults temp,rega
+	ifetchr fhs_misc,1,contr
+	branch complex_not_conj,user
+	sub fhs_misc,0,fhs_misc
+complex_not_conj:
+	add regb,2,contr
+	ifetchr nap,2,contr
+	call signed_ext16by8
+	imults temp,regd
+	preload rega
+	isub regd,rega			// ac-bd
+	ifetchr nap,2,regb
+	preload nap
+	imults temp,regd
+	ifetchr nap,2,contr
+	ifetchr fhs_misc,1,regc
+	call signed_ext16by8
+	imults temp,temp
+	preload regd
+	iadd temp,temp
+	rtn
+
+	// regb points to 64bit complex, regc points to 64bit complex, result in rege+regf
+complex_mult32to32:
+	ifetch 4,regb
+	ifetchr rega,4,regc
+	imults rega,rege			// ac
+	ifetchr rega,4,contr
+	aligned rega,regf			// d
+	add regb,4,contr
+	ifetch 4,contr
+	imults rega,temp			// bd
+	preload rege
+	isub temp,rege			// ac-bd
+	ifetch 4,regb
+	imults regf,regf			// ad
+	ifetch 4,contr
+	ifetchr rega,4,regc
+	imults rega,pdata
+	iadd regf,regf				// ad+bc
+	rtn
+
+
+lshift14:
+	lshift16 pdata,pdata
+rshift2:
+	rshift2 pdata,pdata
+	rtn
+
+lshift6:
+	lshift8 pdata,pdata
+	branch rshift2
+
+calc_vok:
+	imul32 pdata,pdata
+rshift7:
+	rshift4 pdata,pdata
+	rshift3 pdata,pdata
+	rtn		
+
+
+	// nap:16bit signed, fhs_misc:8bit signed, output to pdata/temp
+signed_ext16by8:
+	preload nap
+	aligned fhs_misc,temp
+	rtn	
+
+
+abs32:
+	rtnbit0 31
+	force 0,temp
+	set1 32,temp
+	increase -1,temp
+	ixor temp,pdata
+	pincrease 1
+	rtn	
+
+	// pdata 32bit is input, result in regb
+sqrt:
+	iforce rega
+	arg 0,regd
+	set1 30,regd
+	arg 0,regb
+	arg 16,loopcnt
+sqrt_loop:
+	deposit regd
+	iadd regb,pdata
+	rshift regb,regb
+	isub rega,pdata
+	branch sqrt_less,zero
+	branch sqrt_greater,positive
+sqrt_less:
+	sub pdata,0,rega
+	deposit regd
+	ior regb,regb
+sqrt_greater:
+	rshift2 regd,regd
+	loop sqrt_loop
+	rtn	
+	
+	// pdata:dividend, temp:divisor
+signed_div:
+	set0 mark_temp,mark
+	bbit0 63,signed_div_unsigna
+	set1 mark_temp,mark
+	sub pdata,0,pdata
+signed_div_unsigna:
+	isolate0 63,temp
+	branch signed_div_unsignb,true
+	setflip mark_temp,mark
+	sub temp,0,temp
+signed_div_unsignb:
+	idiv temp
+	call get_div_result
+	rtnmark0 mark_temp
+	sub pdata,0,pdata
+	rtn
+
+
+ifdef COMPILE_SIM_API
+	// timeup: rxdata, result in regc(a) and regf(c22)
+rx_iq_comp:
+	call calc_k1
+	call calc_k2
+	call calc_absk12_sqr
+	call calc_g
+	call calc_a
+	branch calc_c22
+
+calc_k1:
+	enable user
+	arg mem_tmp_buffer,contw
+	branch calc_k12
+
+calc_k2:
+	disable user
+	branch calc_k12
+
+calc_absk12_sqr:
+	fetch 4,mem_tmp_buffer
+	fetcht 4,mem_tmp_buffer+8
+	iadd temp,pdata
+	call abs32
+	iforce temp
+	imul32 temp,rege
+	fetch 4,mem_tmp_buffer+4
+	fetcht 4,mem_tmp_buffer+12
+	isub temp,pdata
+	call abs32
+	iforce temp
+	imul32 temp,pdata
+	iadd rege,pdata
+	store 8,mem_tmp_buffer+16			// abs(K1+K2)^2
+	rtn
+
+
+calc_g:
+	arg mem_tmp_buffer,regb
+	arg mem_tmp_buffer+8,regc
+	call complex_mult32to32
+	preload rege
+	sub pdata,0,pdata
+	lshift16 pdata,pdata
+	lshift2 pdata,pdata
+	fetcht 8,mem_tmp_buffer+16
+	idiv48 temp
+	arg 0x10000,rega
+	call get_div_result
+	iadd rega,pdata
+	call sqrt
+	copy regb,rege						// g
+	rtn
+
+calc_a:
+	rshift32 temp,pdata
+	imul32 regb,rega
+	deposit regb							
+	imul32 temp,temp
+	lshift16 rega,pdata
+	lshift16 pdata,pdata
+	iadd temp,temp
+	preload regf
+	sub pdata,0,pdata
+	lshift16 pdata,pdata
+	lshift pdata,pdata
+	idiv48 temp
+	branch get_div_result					// a
+
+calc_c22:
+	rshift pdata,regc						// c21
+	imul32 pdata,temp
+	setarg 0x10000
+	isub temp,pdata
+	call sqrt
+	deposit regb
+	imul32 rege,temp
+	setarg 0
+	set1 28,pdata
+	idiv48 temp
+	call wait_div_end
+	quotient temp
+	setarg 0x1000
+	isub temp,regf						// c22
+	rtn
+
+tx_iq_precomp:
+	call calc_vok1
+	call calc_sumvok
+	call calc_ad_bc
+	call calc_omega
+	call calc_b1
+	branch calc_b2
+
+calc_vok1:	
+	fetch 1,mem_vdk
+	call calc_vok
+	store 1,mem_vok
+	rtn
+
+calc_sumvok:
+	iforce regc						// Vok(1)
+	imul32 pdata,temp
+	ifetch 1,contr
+	call calc_vok
+	istore 1,contw
+	iadd regc,rega					// sum(Vok)
+	rtn
+
+calc_ad_bc:
+	imul32 pdata,pdata
+	iadd temp,regb					// sum(Vok.^2)
+	deposit rega
+	imul32 rega,temp
+	lshift regb,pdata
+	isub temp,temp					// ad-bc
+	rtn
+
+
+calc_omega:
+	setarg 0x400000
+	idiv temp
+	call get_div_result
+	store 2,mem_omega
+	lshift16 rega,pdata
+	rshift2 pdata,pdata
+	idiv temp
+	call get_div_result
+	istore 2,contw
+	lshift8 regb,pdata
+	rshift pdata,pdata
+	idiv temp
+	call get_div_result
+	istore 2,contw
+	rtn
+	
+	
+calc_b1:
+	lshift16 regc,pdata
+	rshift2 pdata,pdata
+	idiv regb
+	call get_div_result
+	store 2,mem_b1
+	fetch 1,mem_vdk
+	call lshift6
+	idiv rega
+	call get_div_result
+	istore 2,contw
+	rtn
+	
+calc_b2:
+	fetch 1,mem_vok+1
+	call lshift14
+	idiv regb
+	call get_div_result
+	store 2,mem_b2
+	fetch 1,mem_vdk+1
+	call lshift6
+	idiv rega
+	call get_div_result
+	istore 2,contw
+	rtn	
+	
+	
+	// timeup: m_k
+tx_iq_cal:
+	arg mem_q,contw
+	arg 2,loopcnt
+	call memset0
+	arg 4,queue
+tx_iq_cal_loop:
+	call calc_mk1
+	call calc_d
+	call calc_c
+	call calc_est1
+	call calc_est2
+	call calc_u1
+	call calc_u2
+	call calc_qest
+	increase 32,timeup
+	increase -1,queue
+	nbranch tx_iq_cal_loop,zero
+
+calc_tx_c22:
+	fetch 4,mem_q
+	arg 0x100,contr
+	iadd contr,rege
+	fetch 4,mem_q+4
+	imults pdata,temp
+	setarg 0x10000
+	isub temp,pdata
+	call sqrt
+	deposit regb
+	imults rege,temp
+	setarg 0
+	set1 28,pdata
+	call signed_div
+	arg 0x1000,temp
+	isub temp,pdata
+	sub pdata,0,pdata						// c22
+	rtn
+	
+calc_mk1:
+	copy timeup,contr
+	arg 8,loopcnt
+ 	branch calc_average
+
+calc_d:
+ 	iforce regb					// M_k(1)
+	arg 8,loopcnt
+ 	branch calc_average
+
+calc_c:
+ 	iadd regb,regc				// D
+ 	fetcht 1,mem_vok+1
+ 	imul32 temp,temp
+ 	fetch 1,mem_vok
+ 	imul32 regb,pdata
+ 	iadd temp,pdata
+	rshift4 pdata,pdata
+	rshift3 pdata,rega				// C
+	rtn
+
+calc_est1:
+	fetch 2,mem_omega+2
+	imul32 regc,temp
+	fetch 2,mem_omega
+	imul32 rega,pdata
+	isub temp,regb				// est(1)
+	rtn
+
+calc_est2:
+	fetch 2,mem_omega+2
+	imul32 rega,temp
+	ifetch 2,contr
+	imul32 regc,pdata
+	isub temp,rega				// est(2)
+	rtn
+
+calc_u1:
+ 	fetch 1,mem_vok
+ 	call mults_rshift7
+	iadd rega,regf					// floor(est(1)*Vok(1)/2^7 + est(2))
+	copy timeup,regc
+	arg mem_u1,contw
+	branch theta_mul
+
+calc_u2:
+ 	fetch 1,mem_vok+1
+ 	call mults_rshift7
+	iadd rega,regf					// floor(est(1)*Vok(2)/2^7 + est(2))
+	add timeup,16,regc
+	arg mem_u2,contw
+	branch theta_mul
+
+calc_qest:
+	aligned regb,regf
+	fetchr regb,2,mem_b1
+	fetchr regc,2,mem_b2
+	arg mem_u1,rega
+	arg mem_u2,nap
+	arg mem_q,contw
+	call calc_q			
+	call calc_q
+	fetchr regb,2,mem_b1+2
+	fetchr regc,2,mem_b2+2
+	call calc_q
+	branch calc_q
+
+calc_q:
+	ifetch 4,rega
+	copy contr,rega
+	imults regb,rege
+	ifetch 4,nap
+	copy contr,nap
+	imults regc,pdata
+	iadd rege,pdata
+	lshift8 pdata,pdata
+	copy regf,temp
+	call signed_div
+	ifetchr rege,4,contw
+	isub rege,pdata
+	sub pdata,0,regd
+	istorer regd,4,contw
+	rtn	
+
+mults_rshift7:
+	imults regb,temp
+	preload temp
+	branch rshift7
+
+
+	
+	// regc points to m_k, contw points to result
+theta_mul:
+	arg 4,debug
+	arg mem_theta,nap
+theta_mul_loop0:
+	arg 0,rege
+	arg 8,loopcnt
+theta_mul_loop1:
+	ifetch 2,regc
+	copy contr,regc
+	isub regf,pdata
+	ifetchr fhs_misc,1,nap
+	copy contr,nap
+	aligned fhs_misc,temp
+	imults temp,pdata
+	iadd rege,rege
+	loop theta_mul_loop1
+	rshift8 rege,pdata
+	rshift pdata,pdata
+	istore 4,contw
+	increase -16,regc
+	increase -1,debug
+	nbranch theta_mul_loop0,zero
+	rtn
+endif
+
+clear_wake:
+	setarg 0
+	set1 19,pdata	//enable ice low wakeup
+	store 8,mem_gpio_wakeup_low
+	rtn
+
+
+
+
Index: mouse_public_3mode_usb/program/z.prog
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/z.prog	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/program/z.prog	(working copy)
@@ -0,0 +1,7 @@
+org 0x10001
+z_entrance0:
+	rtn
+
+org 0x20001
+z_entrance1:
+	rtn
\ No newline at end of file
Index: mouse_public_3mode_usb/sched/mouse.dat
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/sched/mouse.dat	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/sched/mouse.dat	(working copy)
@@ -0,0 +1,556 @@
+mem_device_option:08	#08 mouse
+
+mem_lpm_config:88 12 ce	#4khz
+mem_fcomp_div:18
+
+mem_rf_init_data:ff
+mem_rf_init_ptr:mem_rf_init_data
+mem_lpm_xtalcnt:38
+
+mem_dig_aon_vsel:00
+mem_gain_fix:ff
+mem_gain_table:04 00 00
+mem_gain_second_agc_en:08	#00-disbale,08-enable
+
+mem_mouse_flag:
+#mouse flag byte1
+#bit0 MOUSE_SELECT_DEVICE_FLAG
+#bit1 MOUSE_24G_PAIRING_FLAG
+#bit2 MOUSE_STORE_EEPROM_FLAG
+#bit3 MOUSE_BT_CANNEL_RECONN_FLAG
+#bit4 MOUSE_LOW_VOLTAGE_FLAG
+#bit5 MOUSE_BT_DISCOVERY_BUTTON_DOWN_FLAG
+#bit6 MOUSE_BT_DISCOVERY_BUTTON_LONG_DOWN_FLAG
+04
+
+#mouse flag byte2
+#bit0 MOUSE_ENABLE_BLE_RANDOM_ADDRE
+#bit1 MOUSE_ENABLE_2K_EEPROM
+#bit2 MOUSE_ENABLE_INIT_DELAY
+#bit3 MOUSE_ENABLE_WAKEUP_FROM_POWER
+#bit4 MOUSE_ENABLE_16M
+#bit5 MOUSE_ENABLE_USB
+09
+
+#mouse flag byte3
+#bit0 MOUSE_ENABLE_SPI2
+#bit1 MOUSE_ENABLE_24G
+#bit2 MOUSE_ENABLE_FLASH
+#bit3 MOUSE_ENABLE_EEPROM
+#bit4 MOUSE_ENABLE_ADC
+#bit5 MOUSE_ENABLE_KEYBOARD
+#bit6 MOUSE_ENABLE_24G_SEARCH_DONGLE
+46
+
+#mouse flag byte4
+#bit0 MOUSE_ENABLE_24G_250Hz
+#bit1 MOUSE_ENABLE_24G_500Hz
+#bit2 MOUSE_ENABLE_24G_1000
+#bit3 MOUSE_ENABLE_BT_125Hz
+#bit4 MOUSE_ENABLE_DPI_LEVEL_4
+#bit5 MOUSE_ENABLE_USB_250
+#bit6 MOUSE_ENABLE_USB_500
+#bit7 MOUSE_ENABLE_USB_1000
+02
+
+#mouse flag byte5
+#bit0 MOUSE_ENABLE_POWER_ON_LED
+#bit1 MOUSE_ENABLE_LOW_VOLTAGE_LED
+#bit2 MOUSE_ENABLE_LOW_VOLTAGE_USE_MODE_LED
+#bit3 MOUSE_ENABLE_LOW_VOLTAGE_LED_BLINK_N_SECOND
+#bit4 MOUSE_ENABLE_4_LED
+#bit5 MOUSE_ENABLE_DPI_FOR_4_LED
+#bit6 MOUSE_ENABLE_BT2_FOR_4_LED
+#bit7 MOUSE_ENABLE_LOW_V_FOR_4_LED
+00
+
+#mouse flag byte6 
+#bit0 MOUSE_ENABLE_SELECT_DEVICE_BY_DPI_BUTTON
+#bit1 MOUSE_ENABLE_SELECT_DEVICE_BY_PB_BUTTON
+#bit2 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_GPIO
+#bit3 MOUSE_ENABLE_SELECT_DEVICE_BY_SWITCH_ADC
+#bit4 MOUSE_ENABLE_DPI_KEY_CONNECT_GND
+#bit5 MOUSE_ENABLE_PB_BUTTON_CONNECT_GND
+#bit6 MOUSE_ENABLE_DPI_KEY_CONNECT_ADC
+#bit7 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING
+22
+
+#mouse flag byte7
+#bit0 MOUSE_ENABLE_AUTO_24G_PARING
+#bit1 MOUSE_ENABLE_24G_POWER_ON_PAIRING
+#bit2 MOUSE_ENABLE_COMMBINATION_KEY_BY_24G_PAIRING
+#bit3 MOUSE_ENABLE_BT_RECONNECT_TIMEOUT_ENTER_DISCOVERY
+#bit4 MOUSE_ENABLE_PB_BUTTON_SHORT_PRESS_ENTER_DISCOVERY
+#bit5 MOUSE_ENABLE_COMMBINATION_KEY_BY_BT_DISCOVERY
+#bit6 MOUSE_ENABLE_DPI_KEY_LONG_PRESS_DISCONVERY
+#bit7 MOUSE_ENABLE_PB_BUTTON_LONG_PRESS_DISCONVERY
+01
+
+#mouse flag byte8
+#bit0 MOUSE_ENABLE_SMOOTHER
+#bit1 MOUSE_ENABLE_XY_OFFSET
+#bit2 MOUSE_ENABLE_24G_AUTO_PAIR_NERVER_BEEN_PAIRED
+#bit3 MOUSE_ENABLE_LE_BATTERY_SERVICE_CANCEL
+#bit4 MOUSE_ENABLE_WHEEL_WAKE_UP_CANCEL
+#bit5 MOUSE_ENABLE_DOUBLE_DPI_KEY
+1c
+
+
+mem_mouse_discovery_timeout:b0 04	#2min
+mem_mouse_24g_pair_timeout_init:58 02  #1min    24g reconn timer&pair timer
+mem_mouse_direct_timeout:64  #10s
+mem_mouse_24g_reconn_timeout_init:64 #10s
+
+mem_mouse_24g_pair_tx_power:95 #-20dBm
+mem_rssi_dis_min_24g_init:75
+mem_rssi_dis_max_24g_init:85
+mem_rssi_hex_received_max_value_init:63
+mem_rssi_dis_min_ble_init:75
+mem_rssi_dis_max_ble_init:80
+
+mem_bk_button_gpio:02
+mem_fw_button_gpio:0f
+mem_dpi_button_gpio:0e
+mem_matrix_public_gpio:ff
+mem_sensor_motion_gpio:03
+mem_customer_key_gpio:ff
+mem_whee_a_data_gpio:06
+mem_whee_b_data_gpio:04
+mem_select_sensor_angle_gpio:ff
+mem_mouse_reuse_2ice_gpio:ff
+
+mem_lbutton_gpio:02
+mem_rbutton_gpio:0f
+mem_mbutton_gpio:0e
+mem_config_select_device_button_gpio:00
+mem_whee_ta_data_gpio:ff
+mem_whee_tb_data_gpio:ff
+mem_device_switch_gpio:ff
+mem_mouse_sensor_sclk_gpio:05
+mem_mouse_sensor_sdio_gpio:07
+
+mem_sensor_angle_default:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+mem_sensor_angle_switch:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+mem_config_sensor_dpi:00		#00--1200   01--1600
+
+#new led interface configure
+mem_mouse_led_new_interface_enable:01
+mem_mouse_led_multi_type:00	#bit0=1:led+dpi   bit1=1:led+low
+mem_mouse_le_reconn_led_fuction_enable:01	#01:enable  00:disable
+mem_mouse_1io2led_multi_24gled:8a
+mem_mouse_1io2led_multi_bt1led:8d
+mem_mouse_1io2led_multi_bt2led:ff
+mem_mouse_1io2led_dpi_led:ff
+mem_mouse_1io2led_low_led:81
+
+mem_mouse_logo_led_gpio:ff
+mem_mouse_logo_led_on_time_init:58 02	#1min
+
+
+mem_customer_key_press:
+#03 ea 00 00 00 00 00 00 00 #VOL DOWN
+#02 01 00 00 00 00 00 00 00 #POWERDOWN
+00 05 00 04 00 00 00 00 00#CTRL+ALT+A
+#00 08 00 07 00 00 00 00 00#One-click desktop
+
+mem_customer_key_release:
+#03 00 00 00 00 00 00 00 00 #MEDIA RELEASE
+#02 00 00 00 00 00 00 00 00 #SYSTEM CRTL RELEASE
+00 00 00 00 00 00 00 00 00#STANDARD KEY RELEASE
+#00 00 00 00 00 00 00 00 00#One-click desktop
+
+mem_lpm_mode:01
+
+mem_mouse_bluetooth_type:03	#03 bt3.0+ble   #02 ble   #01 bt3.0
+mem_device_number:02  #max device number   value:01,02,03
+
+mem_device_flag:
+00
+34
+ff ff ff ff ff ff
+mem_device2_type:
+34
+ff ff ff ff ff ff
+mem_device3_type:
+33
+ff ff ff ff ff ff
+ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff	# 3.0 fast  conn
+
+mem_mouse_page_to:00 40		# 16384*0.625ms=10s
+mem_mouse_fast_direct_timeout:0a #1s
+mem_mouse_fast_page_to:60 06	# 1600*0.625ms = 1s
+mem_mouse_24g_power_on_fast_conn_timer:0a 00 #1s
+mem_mouse_24g_search_dongle_time_init: 64 00
+mem_mouse_no_data_timeout:70 17 #10min
+
+#bit0:mouse_key_l    bit1:mouse_key_r  bit2:mouse_key_m
+mem_mouse_commbination_key_bt:07
+mem_mouse_commbination_key_24g:05
+
+mem_store_information_delay_timer_init:01
+
+#adc start
+mem_adc_config_flag_init:02 		#00-vinlpm   01-hvin   02-gpio
+mem_adc_channel:05 		#00-gpio4   01-gpio5   02-gpio6  03-gpio7    04-gpio9  05-gpio10  06-gpio11  07-gpio12
+mem_mouse_vdd_full_vol:0f 01		#1.5V
+a2 00#mem_mouse_vdd_empty_vol  :0.9V
+b4 00#mem_mouse_vdd_low_vol   :1.0V
+#mem_mouse_vdd_full_vol:3c 01		#3.3V
+#1e 01#mem_mouse_vdd_empty_vol  :3.0V
+#30 01#mem_mouse_vdd_low_vol   :3.2V
+
+mem_adc_read_time_init:0a 	#1s
+#adc end
+
+mem_mouse_set_high_impedance_bit_set:00 00  00
+mem_sensor_reset_gpio:ff
+
+mem_power_on_flag:01
+
+mem_lpm_mult:20
+mem_lpm_mult_init:20
+
+mem_app_connection_options:06
+mem_lap:19 36 11 52 08 53
+mem_local_name_length:
+'BT3.0 Mouse
+mem_sniff_param_interval:
+0e 00 
+01 00 ##mem_sniff_param_attempt:01 00
+02##mem_sniff_param_timeout:00 00
+
+
+mem_unsniff2sniff_timer:0a
+mem_ssp_enable:01
+##mem_all_uuid_16bits:
+##06
+##03#Type: Complete list of 16-bit UUIDs
+##0011 0100 1002 1124  1200  0001
+mem_all_uuid_128bits:00
+mem_ptt:00
+
+mem_lmp_io_cap_payload_iocap:03 00 04
+mem_ui_profile_supported:01
+mem_eir_enable:01
+
+mem_le_adv_data_len:1f
+mem_le_adv_data:
+#flag 
+02 01 05
+
+#uuid
+03 03 12 18
+
+#appearance
+03 19 c2 03
+
+mem_le_adv_swift_pair:
+#microsoft swift pair
+06 ff 06 00 03 00 80
+#name
+'\09BT5.2 Mouse
+
+mem_le_scan_data_len:1f
+mem_le_scan_data:
+#name
+'\09BT5.2 Mouse
+
+mem_le_name_len:
+'BT5.2 Mouse
+
+mem_le_name_patch_len:	#max 18bytes
+'BT5.2 Mouse
+
+mem_le_lap:03 b1 2a 4e 8e ed
+
+mem_le_interval_min:
+06 00 #min interval
+09 00 #max interval
+20 00 #latency
+2c 01 #timeout
+
+mem_le_adv_ind:03 12 18
+mem_le_adv_direct_ind:ff 00 00
+
+mem_le_adv_interval:00 00
+mem_le_adv_type:00 
+mem_le_adv_own_addr_type:00
+mem_le_adv_channel_map:07 
+mem_local_rx_max_octets:fb 00 48 08 fb 00 48 08  # 1b
+
+mem_le_keyboard_handle:15 00
+mem_le_notify_handle:19 00
+mem_le_multimedia_handle:1d 00
+mem_le_systemctrl_handle:21 00
+mem_le_battery_level_handle:30 00
+mem_le_pairing_handle:2d 00
+
+mem_le_battery_level_updata_timer_init:96 #15s
+
+mem_spi_ncs_gpio:ff
+
+mem_mouse_dpi_seting:
+03##mem_320x_dpi_0  	1200/1300
+04##mem_320x_dpi_1  	1600
+01##mem_320x_dpi_2   800
+02##mem_320x_dpi_3  	1000
+
+20##mem_3212_dpi_0	1200
+2a##mem_3212_dpi_1	1600
+3f ##mem_3212_dpi_2	2400
+15##mem_3212_dpi_3   800
+
+14##mem_ka8g2_dpi_0	1200
+1b##mem_ka8g2_dpi_1	1600
+11##mem_ka8g2_dpi_2	1000
+0e##mem_ka8g2_dpi_3	800
+
+mem_3212_dpi_new:
+2a##mem_3212_dpi_0_new 1600
+35##mem_3212_dpi_1_new	2000
+3f ##mem_3212_dpi_2_new	2400
+15##mem_3212_dpi_3_new 800
+20##mem_3212_dpi_4_new 1200
+
+
+mem_sensor_3212_init:
+09 5a
+26 34
+19 04
+09 00
+ff ff
+
+mem_sensor_3204_init:
+09 5a
+0d f0
+1d e3
+7d d2
+ff ff
+
+mem_sensor_3205_init:
+09 5a
+0d 10
+1d ed
+7d 80
+ff ff
+
+mem_sensor_32xx_init:
+1b 35
+28 b4
+29 46
+2a 96
+2b 8c
+2c 6e
+2d 64
+38 5f
+39 0f
+3a 32
+3b 47
+42 10
+ff ff
+
+mem_sensor_32xx_init_1:
+54 2e
+55 f2
+61 f4
+63 70
+75 52 
+76 41
+77 ed
+78 23
+79 46
+7a e5
+7c 48
+7e 77
+7f 01
+0b 00
+7f 00
+09 00
+ff ff
+
+mem_sensor_8650_init:
+09 5a
+ff 27
+ab 40
+be d1
+a0 41
+a1 12
+a5 84
+a7 ff
+b5 d0
+b6 00
+ff 00
+09 00
+ff ff
+
+mem_sensor_ka8ul_init:
+09 5a
+0d 10
+0e c5
+5b 9a
+10 38
+11 42
+28 28
+41 23
+49 39
+4a b0
+4b a0
+4c 90
+4d 70
+09 00
+ff ff
+
+mem_sensor_8009_init:
+09 5a
+06 02
+09 69
+0d 48
+0e 9f
+0f ba
+09 00
+ff ff
+
+mem_sensor_ka8g2_init:
+09 a5
+26 34
+19 04
+60 07
+69 04
+7d 20
+7e 00
+09 00
+ff ff
+
+mem_sensor_poweron_init:
+09 5a
+0b f3
+09 00
+ff ff
+
+mem_ka8g2_sensor_poweron_init:
+09 a5
+0b f3
+09 00
+ff ff	
+
+mem_sensor_ka5857_init:
+09 a5
+46 34
+6a c0
+69 24
+09 00
+ff ff	
+
+
+
+#24g init
+mem_24g_disable_fec1:01#0x00:disable/0x01:enable
+mem_24g_tx_phy:02#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+mem_24g_rx_phy:02#0x01:1M/0x02:2M/0x04:S2/0x84:S8
+mem_24g_data_type:01        #mouse 1,kb 2
+mem_24g_max_retry:06#max tx retry
+mem_24g_rx_window:c0 12     #400us  ## e0 2e#1ms #transmitter long range min:520us
+mem_24g_interval:19
+mem_24g_interval_min:19
+mem_24g_interval_max:1c
+#mem_24g_ch_map1:00 13 2c 42
+#mem_24g_ch_map2:06 15 36 48
+#mem_24g_ch_map3:0f 1a 3a 4c
+#mem_24g_ch_map4:11 23 31 4d
+mem_24g_pair_switch:00
+mem_24g_pair_addr:20 15 10 05
+mem_24g_pair_ch:4e
+mem_24g_fast_conn_enable:01
+mem_24g_fast_conn_addr:0f 0f 0f 0f
+mem_24g_short_sleep_set:0c f8 00
+mem_24g_long_sleep_set:00 77 01
+mem_24g_enter_hibernate:00 48 60
+mem_rssi_buff_index:0f
+mem_rssi_signal_buf_ptr:mem_mouse_rssi_signal_buf_patch
+mem_power_ctrl_pac_succ_cnt_init:80
+mem_24g_long_sleep_param_update_timer_init:14 00
+mem_24g_transmit_by_interrupt_exit_count_init:50 00
+
+mem_24g_long_sleep_set1:00 a6 0e
+
+mem_flash_base:00 50 00
+mem_eeprom_base:80 1f
+mem_eeprom_block_size:80
+
+mem_tx_power:0a#10dbm
+
+mem_tx_time_sum_count:10 
+
+#zcode
+mem_zcode_current_number:ff
+mem_xip_flash_offset:00 00 00
+mem_zcode_head:20 20 00 40
+
+########################################
+################USB config begin################
+
+mem_ui_led_struct_ptr:mem_mouse_led_type
+mem_ui_led_struct_num:00
+mem_ui_button_gpio:ff
+mem_ui_button_timeout:1e
+mem_usb_offline_check_gpio:ff
+
+#usb config
+mem_usb_vid_pid_retention:
+01 #enable
+#mouse only#auto pair
+53 31#VID
+30 10#PID
+#mouse & keyboard
+53 31#VID
+30 30#PID
+
+#usb tx interval
+mem_usb_tx_interval_retention:01
+
+#device name
+mem_usb_device_name_retention:
+'wired_mosue_1308
+
+#default value
+mem_usb_addr:00
+
+mem_usb_offline_gpio_retention:ff
+################USB end################
+########################################
+
+
+#log log log log log log log log log log log
+
+#uart config
+#mem_device_uart_tx_gpio:0d	#0d
+#mem_device_uart_rx_gpio:ff
+#mem_device_uart_baud_rate:d0 00	#115200
+#mem_device_uart_rx_buffer:00 1c
+#mem_device_uart_rx_buffer_end:ff 1f
+#mem_device_uart_tx_buffer:00 4f
+#mem_device_uart_tx_buffer_end:ff 4f
+
+
+#mem_rf_debug_rx_gpio:84
+#mem_rf_debug_tx_gpio:84
+
+#=================old led parm========================#
+mem_config_device_24g_led_gpio:ff
+mem_config_device_bt1_led_gpio:ff
+mem_config_device_bt2_led_gpio:ff
+mem_config_low_voltage_alarm_gpio:ff
+mem_dpi_led_gpio:ff
+
+mem_mouse_device_poweron_timer_count_init:14	#2s
+mem_mouse_dpi_led_delay_count_init:0a	#1s
+mem_mouse_dpi_led_blink_time: 90 01		#200ms on,200ms off
+mem_mouse_disconvey_led_blink_time: e8 03	#500ms on,500ms off
+mem_mouse_low_v_led_blink_time:90 01		#200ms on,200ms off
+mem_adc_low_volatage_led_blink_timer:64 00	#10s
+
+mem_mouse_vdd_button_press_vol:10 00
+mem_mouse_vdd_switch_gnd_24g_vol:52 00
+mem_mouse_vdd_switch_gnd_full_vol:35 00
+mem_mouse_vdd_switch_gnd_shutdown_voltage:21 00
+mem_mouse_vdd_switch_gnd_low_voltage:25 00
Index: mouse_public_3mode_usb/util/crc16.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: mouse_public_3mode_usb/util/crc16.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: mouse_public_3mode_usb/util/crc16.pl
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/crc16.pl	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/crc16.pl	(working copy)
@@ -0,0 +1,27 @@
+$debug = 0;
+$crc = 0xffff;
+$i = 0;
+$offset = 0xffff;
+$source_file = $ARGV[0];
+$offset = $ARGV[1];
+
+open(EEP,"$source_file") or die $!;
+
+while (<EEP>) {    
+	$c = hex();
+
+  if($i >= $offset){
+  	if($debug){printf "%02x\t", $c;}
+  	$crc  = ($crc >> 8) | ($crc << 8);
+		$crc ^= $c & 0xff;
+		$crc ^= ($crc & 0xff) >> 4;
+		$crc ^= $crc << 12;
+		$crc ^= ($crc & 0xff) << 5;
+		$crc &= 0xffff;
+  }
+  $i ++;
+  if($debug){printf "%02x\t", $crc;}
+  printf "%02x\n", $c;
+}
+
+printf "%02x\n%02x\n", (($crc >> 8) & 0xff),($crc & 0xff);
Index: mouse_public_3mode_usb/util/eeprom2fulleeprom.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: mouse_public_3mode_usb/util/eeprom2fulleeprom.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: mouse_public_3mode_usb/util/eeprom2fulleeprom.pl
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/eeprom2fulleeprom.pl	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/eeprom2fulleeprom.pl	(working copy)
@@ -0,0 +1,18 @@
+
+
+
+$source_file = $ARGV[0];
+$eeprom_size = $ARGV[1];
+
+open(EEP,"$source_file") or die("cannot open files");
+for ($i = 1 ;$i<=$eeprom_size*128-2;$i++)
+{
+
+    while (<EEP>) { 
+        $c = hex();
+        printf "%02x\n", $c;
+        $i++;
+    }
+
+	printf "FF\n";
+}
Index: mouse_public_3mode_usb/util/mergepatch.pl
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/mergepatch.pl	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/mergepatch.pl	(working copy)
@@ -0,0 +1,335 @@
+#!/usr/bin/perl
+$defs = "";
+
+sub alloc {
+	my($end, %mc) = @_;
+	my(%eadr) = ();
+	my($tstr, $str, $i, $j, $addr);
+	my($tstr) = "";
+	
+	foreach $i (sort keys %mc) {
+		if($i =~ /(.+)_(.+)/ && exists($eadr{$1})) {
+			$addr = $eadr{$1};
+		} else {
+			$addr = $end;
+		}
+		for($j = 0;$j <= $#{$mc{$i}};$j++) {
+			if($mc{$i}[$j] =~ /^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/) {
+				$str = sprintf "0x%04x %s%s\n", $addr, $2, $3;
+				$var{$2} = $addr;
+				$addr += $1;
+				$tstr .= $str;
+			}
+		}
+		$eadr{$i} = $addr;
+	}
+	if($addr > 0x4000) {
+		$xend = $addr if($addr > $xend);
+	} else {
+		$bend = $addr if($addr > $bend);
+	}
+	return $tstr . "\n";
+}
+
+
+sub malloc {
+	$path="output/bt_format.meta";
+	open file, $path;
+	@f = <file>;
+	close file;
+	open file, ">$path";
+	$path =~ s/\/.*//;
+	open file1, ">output/memmap.format";
+	$xaddr = 0x4000;
+	$addr = 0;
+	if($#ARGV == 1) {
+		$addr = hex($ARGV[0]);
+		$xaddr = hex($ARGV[1]);
+	}
+	for($i = 0, $ocnt = 0;$i < @f;$i++) { 
+		$_ = $f[$i];
+		$start = 1 if(/^\s*memalloc\s*\(\s*$/);		# allocate from 0
+		$start = 2 if(/^\s*xmemalloc\s*\(\s*$/);	# allocate from 4000
+		$start = 3 if(/^\s*omemalloc\s*\(\s*$/);	# allocate after all xmemalloc, mutex from each other(obsolete, for compatibility)
+		if(/^\s*([ax]*)memalloc\s+([a-zA-Z_0-9]+)\s*\(\s*$/) {
+			$start = $1 eq 'a' ? 5 : $1 eq 'x' ? 6 : 7;
+			$basev = $2;
+		}
+		if($start) {
+			if(/^\s*([a-zA-Z0-9_]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/ && exists($def2{$1})) {		# macro for size
+				$_ = sprintf("%s %s %s", $def2{$1}, $2, $3);
+			}
+			if(/^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/) {
+				if($start == 1) {
+					$str = sprintf "0x%04x %s%s\n", $addr, $2, $3;
+					$var{$2} = $addr;
+					$addr += $1;
+					$bstr .= $str;
+				} elsif($start == 2) {
+					$str = sprintf "0x%04x %s%s\n", $xaddr, $2, $3;
+					$var{$2} = $xaddr;
+					$xaddr += $1;
+					$xstr .= $str;
+				} else {
+					push @ostr, $_;
+				}
+			}
+			if(/^\s*\)\s*$/) {
+				if(@ostr > 0) {
+					if($start == 3) {
+						push @{$xmalloc{$ocnt}}, @ostr;
+						$ocnt++;
+					} elsif($start == 5) {
+						push @aaddr,$basev;
+						push @amalloc,[@ostr];
+					} elsif($start == 6) {
+						push @{$xmalloc{$basev}}, @ostr;
+					} elsif($start == 7) {
+						push @{$malloc{$basev}}, @ostr;
+					} 
+				}
+				$start = 0;
+				@ostr = ();
+			}
+		} else {
+			$def2{$2} = $1 if(/^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/);
+			$sstr .= $_;
+		}
+	}
+	
+#--------------------- o/x/memalloc process -----------------------
+	$bend = $addr, $xend = $xaddr;
+	$bstr .= alloc($addr, %malloc);
+	$xstr .= alloc($xaddr, %xmalloc);
+
+#--------------------- amemalloc process -----------------------
+	for($i = 0;$i <= $#aaddr;$i++) {
+		for($j = 0, $addr = $aaddr[$i] =~ /^0x([0-9a-f]+)/ ? hex($1) : $var{$aaddr[$i]};$addr != 0 && $j <= $#{$amalloc[$i]};$j++) {
+			if($amalloc[$i][$j] =~ /^\s*([0-9]+)\s+([a-zA-Z0-9_]+)\s*(.*)$/) {
+				$str = sprintf "0x%04x %s%s\n", $addr, $2, $3;
+				$addr += $1;
+				if($addr < 0x4000) {
+					$bstr .= $str;
+				} else  {
+					$xstr .= $str;
+				}
+			}
+		}
+	}
+
+	
+	print file $bstr, $xstr, $sstr;
+	print file1 $bstr, $xstr;
+	close file;
+	close file1;
+	printf "\nLast allocated address is %04x\n", $bend;
+	printf "\nLast allocated xmem address is %04x\n", $xend;
+}
+
+
+sub getdefs {
+	my($def) = @_;
+	my(@ifdefs) = split(/\s*\|\s*/, $def);
+	my $v = 0;
+	foreach (@ifdefs) {
+		s/\s//g;
+		$v = 1 if($defs =~ /(^|\s)$_(\s|$)/);
+	}
+	return $v;
+}
+
+sub parseif {
+	my($fname) = @_;
+	open file, $fname;
+	@f = <file>;
+	close file;
+	open file, ">$fname";
+	@valid = (1);
+	for($i = 0;$i < @f;$i++) { 
+		$_ = $f[$i];
+		s/\/\*.*\*\///g;
+		$comment = 1 if(/\/\*/ && !/\/\//);
+		if($comment) {
+			$comment = 0 if(/\*\//);
+			next;
+		}
+		if(/^\s*ifdef\s+(.+)$/) {
+			$v = getdefs($1) ? 1 : 0;
+			push @valid, $v & $valid[$#valid];
+		} elsif(/^\s*ifndef\s+(.+)$/) {
+			$v = getdefs($1) ? 0 : 1;
+			push @valid, $v & $valid[$#valid];
+		} elsif(/^\s*else/) {
+			printf "%s\nelse without if at line %d\n", $f[$i - 3], $i if($#valid == 0);
+			if($#valid == 0) {
+				for($j = -10;$j < 10;$j++) {
+					print $f[$i + $j];
+				}
+				last;
+ 				$i = $i;
+			}
+			$valid[$#valid] = (1 - $valid[$#valid]) & $valid[$#valid - 1];
+		} elsif(/^\s*endif/) {
+			printf "%s\nendif without if at line %d\n", $_, $i if($#valid == 0);
+			if($#valid == 0) {
+				for($j = -10;$j < 10;$j++) {
+					print $f[$i + $j];
+				}
+				last;
+ 				$i = $i;
+			}
+			pop @valid;
+		} elsif($valid[$#valid]) {
+			if(/^include\s+(.+)\s*/) {
+				open file2, "program/$1";
+				@f2 = <file2>;
+				close file2;
+				splice(@f, $i + 1, 0, @f2);
+			} else {
+			if(/^define\s+(\w+)\s*/) {
+				$defs .= $1 . " " 
+			}
+				print file $_;
+			}
+		}
+	}
+	close file;
+}
+
+sub genpatch
+{
+	print "genpatch\n";
+	$patched = 0;
+	open file,"output/bt_program23.meta";
+	while(<file>) {
+		if(/^\s*beq\s+patch([0-9a-f]+)_([0-7]),/) {
+			$a = hex($1), $b = hex($2);
+			$bits[$a] |= 1 << $b;
+			$patched = 1;
+		}
+	}
+	close file;
+	return if(!$patched);
+	open file,"output/sched.rom";
+	@sched = <file>;
+	close file;
+	for($j = 0;$j < 0x40;$j++) { 
+		$s .= sprintf ("%02x   #mem_patch%02x\n", $bits[$j], $j);
+	}
+	$s .= "\n\n";
+	for($i = $skip = 0;$i < @sched;$i++) {
+		$_ = $sched[$i];
+		if($skip > 0 && /:/) {
+			splice(@sched, $skip, $i - $skip, $s);
+			last;
+		}
+		$skip = $i + 1 if(/^mem_patch00:\s*$/);
+	}
+	if($skip == 0) {
+		$s = "mem_patch00:\n" . $s;
+		splice(@sched, 0, 0, $s);
+	}
+	open file,">output/sched.rom";
+	for($i = 0;$i < @sched;$i++) { print file $sched[$i]; }
+	close file;
+}
+
+sub zcode {
+	open file, "output/bt_program23.meta";
+	@f = <file>;
+	close file;
+	for($i = $label = $line[0] = 0, $z = 1;$i < @f;$i++) {
+		$_ = $f[$i];
+		$line[0] = $i - 1 if(/^org\s+0x([23]000|800)/ && $line[0] == 0);
+		if(/^org z\s*$/) {
+			$line[$z/0x10000 + 1] = $i - 1;
+			$z += 0x10000;
+			$f[$i] = sprintf("org 0x%x\n", $z);
+			$label = 1;
+		}
+		if(/^(\w+):\s*$/ && $label == 1) {
+			$lab{$1} = $z;
+			$label = 2;
+		}
+	}
+	return if($z == 1);
+	$line[$z/0x10000 + 1] = $i - 1;
+	for($i = 0;$i < @f;$i++) {
+		$_ = $f[$i];
+		$label = "";
+		if(/^\s*(branch|nbranch|call|ncall|setarg)\s+(\w+)\s*$/ || /^\s*(branch|nbranch|call|ncall|arg)\s+(\w+)\s*,\s*(\w+)\s*$/) {
+			$label = $2;
+		}
+		if(/^\s*(bmark|beq|bne|bbit[01])\s+(\w+)\s*,\s*(\w+)\s*$/) {
+			$label = $3;
+		}
+		$branch = /^\s+branch\s+$label\s*$/ ? 1 : 0;
+		if(exists($lab{$label})) {
+			$nlabel = "jmpz_" . $label;
+			$f[$i] =~ s/$label/eval "$nlabel"/e;
+			if($lab{$label} > 100) {
+				$z = int($lab{$label}/0x1000);
+				$l = $i < $line[1] ? $line[0] : $line[$z/10 - 1];
+				if($branch && $i >= $line[1]) {
+					$f[$i] = sprintf("\tsetarg 0x%x\n\tbranch p_zcode_entrance_2Bytes_common\n\n", $z);
+				} else {
+					$f[$l] .= sprintf("%s:\n\tsetarg 0x%x\n\tbranch p_zcode_entrance_2Bytes_common\n\n", $nlabel, $z);
+				}
+				$lab{$label} = 1;
+			}
+		}
+	}
+	open file, ">output/bt_program23.meta";
+	for($i = 0;$i < @f;$i++) {
+		if($f[$i] =~ /^\s*bbit1 8,pf_patch_ext\s*$/) {
+			printf file ("p_start:\n\tbranch p_patch_array\n\np_zcode:\n");
+			for($j = 0;$j < 63;$j++) {
+				printf file "\tnop %d\n", $j + 1;
+			}
+			printf file "p_patch_array:\n";
+		}
+		print file $f[$i];
+	}
+	close file;
+}
+
+sub authrom {
+	$addr = 0x9000;
+	foreach $s (@ARGV) {
+		open f, "../sched/" . $s . ".dat" or die "cannot open dat file $s";
+		@ff = <f>;
+		close f;
+		foreach (@ff) { $_ =~ s/\s//g;push @auth, $_ . "\n"; }
+		printf "0x%x %s_ADDR\n", $addr, uc($s);
+		$addr += $#ff + 1;
+	}
+	open f,">auth.rom";
+	print f @auth;
+	close f;
+	open f,"romcode.rom" or return;
+	@rom = <f>;
+	close f;
+	for($i = 0, $j = $#rom - 0x1ff;$i < 0x200;$i++,$j++) {
+		for($k = 0, $l = "";$k < 4;$k++) {
+			$_ = $auth[$i*4 + $k];
+			s/\s//g;
+			$_ = "00" if(/^$/);
+			$l =  $_ . $l;
+		}
+		$rom[$j] = $l . "\n";
+	}
+	open f,">romcode.rom";
+	print f @rom;
+	close f;
+}
+
+if(@ARGV > 0) {
+	authrom();
+	exit;
+}
+
+parseif("output/bt_program23.meta");
+parseif("output/bt_format.meta");
+genpatch() if($defs !~ / SIM /);
+malloc();
+zcode();
Index: mouse_public_3mode_usb/util/patch.pl
===================================================================
--- /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/patch.pl	(nonexistent)
+++ /YC1308AF/branch/mouse/USB_4Mode_Project/RongYuan_Project/mouse_public_3mode_usb/util/patch.pl	(working copy)
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+
+
+
+@dirs = (".");
+while(@dirs){
+   $d = $dirs[0];
+   opendir folder, $d || die "Can not open this directory";
+   @filelist = readdir folder; 
+   closedir folder;
+   foreach (@filelist) {
+      $f = $d . "/" . $_;
+      next if($_ eq "." || $_ eq "..");
+      push(@dirs, $f) if(-d $f) ;
+      push(@files,$f) if(-f $f);
+    }
+   shift @dirs;
+}
+
+for($i = 0;$i < @files;$i++) {
+	if($files[$i] =~ /bt\.prog/) {
+		($files[$i],$files[0]) = ($files[0],$files[$i]);
+		last;
+	}
+}
+
+
+for($i = $byte = $bit = 0;$i < @files;$i++) {
+	next if($files[$i] =~ /patch\.prog|sim\.prog/ || $files[$i] !~ /\.prog/);
+	open(FILE, $files[$i]) or next;
+	@file = <FILE>;
+	close FILE;
+	open(FILE, "> $files[$i]");
+	for($j = 0;$j < @file;$j++) {
+		$_ = $file[$j];
+		if(/bpatch.*,.*/) {
+			printf FILE "\t%s patch%02x_%d,mem_patch%02x\n", $byte > 31 ? "bpatchx" : "bpatch" , $byte, $bit, $byte;
+			if(++$bit > 7)
+			{
+				$bit = 0;
+				$byte++;
+			}
+		} else {
+			print FILE $_;
+		}
+	}
+	close(FILE);
+}
+printf "Total patches : %d, last patch number is:%02x bit %d\n", $byte*8+$bit, $byte, $bit;
