Index: d.bat
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/d.bat	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/d.bat	(working copy)
@@ -0,0 +1,10 @@
+call do.bat eep
+e pu
+e 8070 00000000000000000000
+e 807a 00000000000000000000
+e 8070 3e6c6d   
+e ew 0 ffff
+e er 0 10
+e ep output/eeprom.dat
+e er 0 10
+e ku
Index: do.bat
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/do.bat	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/do.bat	(working copy)
@@ -0,0 +1,95 @@
+@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
+
+)
+
+
+if "%device_option%" equ "module" (
+	perl eeprom2hciimage_1021s.pl
+
+)
+:: perl ..\util\eeprom2hciimage.pl
+:: perl ..\util\bin2array.pl > bt_patch.h
+
+:end
+
Index: format/Hid.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/Hid.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/app.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app.format	(working copy)
@@ -0,0 +1,385 @@
+
+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_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_3v_adc_hvin_data
+2 mem_2v_adc_vinlpm_data
+2 mem_1v_adc_io_data
+2 mem_5v_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
+
+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_APP_VSEL	//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
+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: format/app_antiLost.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_antiLost.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_antiLost.format	(working copy)
@@ -0,0 +1,204 @@
+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
+)
+
+//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: format/app_car.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_car.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/app_dongle.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_dongle.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_dongle.format	(working copy)
@@ -0,0 +1,133 @@
+
+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
+)
+
+
+//eeprom address offset
+(
+0x5B 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
+//bit4-0
+//tx power
+)
+
Index: format/app_esl.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_esl.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/app_module.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_module.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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
+)
+
+
+
+(
+	50 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: format/app_mouse.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_mouse.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_mouse.format	(working copy)
@@ -0,0 +1,642 @@
+
+memalloc mouse(
+2 mem_init_cnt
+2 mem_data_pre
+2 mem_data_current
+3 mem_data_sum
+2 mem_data_value
+
+
+)
+//dpi eeprom addr
+
+
+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_config_device_bt1_led_gpio
+1 mem_select_sensor_angle_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_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
+26 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
+
+//patch area
+1 mem_power_on_flag
+
+1 mem_sensor_angle_connect_gnd
+1 mem_sensor_angle_high_impedance
+1 mem_sensor_angle_connect_vin
+
+38 mem_sensor_8650_init_new
+2 mem_24g_pair_count
+
+8 mem_ka8g2_sensor_poweron_init
+
+//patch led start
+1 mem_mouse_multi_led_blink_enable
+1 mem_mouse_multi_led_gpio
+1 mem_mouse_multi_led_state
+1 mem_mouse_multi_led_type
+1 mem_mouse_multi_led_on_timer
+1 mem_mouse_multi_led_on_timer_init
+1 mem_mouse_multi_led_blink_timer_init
+1 mem_mouse_multi_led_blink_timer
+1 mem_mouse_multi_led_blink_count
+1 mem_mouse_multi_led_blink_count_limited
+1 mem_mouse_multi_led_on_poweron2s_flag
+//patch led end
+
+1 mem_mouse_led_enable_delay_timer
+)
+
+
+(
+//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
+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
+
+//mouse dpi level
+0x00 MOUSE_DPI_LEVEL1
+0x01 MOUSE_DPI_LEVEL2
+0x02 MOUSE_DPI_LEVEL3
+0x03 MOUSE_DPI_LEVEL4
+
+
+//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
+0x58 PKA8G2_ID1
+0x59 PKA8G2_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
+
+
+//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
+)
+
+
+(
+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
+)
+
+(
+0x03 ICE_REUSE_GPIO
+)
+
+(
+0 MULTI_LED_ON
+1 MULTI_LED_BLINK
+)
+
Index: format/app_remote_car.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_remote_car.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/app_shutter.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_shutter.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/app_shutter.format	(working copy)
@@ -0,0 +1,242 @@
+
+
+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
+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
+)
+
+
+
+
+(
+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: format/ble_protocol_stack/le.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ble_protocol_stack/le.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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
+-11 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: format/ble_protocol_stack/le_advertising.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ble_protocol_stack/le_advertising.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/ble_protocol_stack/le_l2cap_att.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ble_protocol_stack/le_l2cap_att.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/ble_protocol_stack/le_l2cap_att_wechat.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ble_protocol_stack/le_l2cap_att_wechat.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/ble_protocol_stack/le_l2cap_signalling.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ble_protocol_stack/le_l2cap_signalling.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/ble_protocol_stack/le_l2cap_smp.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ble_protocol_stack/le_l2cap_smp.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/ble_protocol_stack/le_ll.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ble_protocol_stack/le_ll.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/bt.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/bt.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/bt.format	(working copy)
@@ -0,0 +1,1094 @@
+
+	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_rssi_hex
+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*/
+
+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
+
+
+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
+0x94 TX_POWER_F20DB
+0x9e TX_POWER_F30DB
+)
+
+
+	/* 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
+52 mark_adc_enable
+)
+
+(
+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: format/command.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/command.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/debug.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/debug.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/debug.format	(working copy)
@@ -0,0 +1,6 @@
+xmemalloc(
+
+1 mem_rf_debug_rx_gpio
+1 mem_rf_debug_tx_gpio
+)
+
Index: format/g24_protocol_stack/24g.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g.format	(working copy)
@@ -0,0 +1,65 @@
+
+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
+
+)
+
+
+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: format/g24_protocol_stack/24g_pair.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_pair.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_pair.format	(working copy)
@@ -0,0 +1,50 @@
+
+
+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
+)
+
+(
+5 BIND_MODE_CONTINUE
+)
Index: format/g24_protocol_stack/24g_receiver.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_receiver.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_receiver.format	(working copy)
@@ -0,0 +1,42 @@
+
+
+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
+
+)
+
+
+(
+0 bit_ack_24g
+)
+
+
Index: format/g24_protocol_stack/24g_reconn.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_reconn.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_reconn.format	(working copy)
@@ -0,0 +1,29 @@
+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
+)
+
Index: format/g24_protocol_stack/24g_rssi.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_rssi.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/g24_protocol_stack/24g_transmitter.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_transmitter.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_transmitter.format	(working copy)
@@ -0,0 +1,64 @@
+
+
+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
+)
+
+(//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
+)
+
+
+
Index: format/g24_protocol_stack/24g_txpower_ctrl.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/g24_protocol_stack/24g_txpower_ctrl.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/hci.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/hci.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/kscan_peipherals.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/kscan_peipherals.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/l2cap.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/l2cap.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/lmp.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/lmp.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/memblocks.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/memblocks.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_access_layer.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_access_layer.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_ali_vendor_message.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_ali_vendor_message.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_bearer_layer.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_bearer_layer.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_ble_core_advertising.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_ble_core_advertising.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_chip_peripherals.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_chip_peripherals.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_control_ble_advertising.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_control_ble_advertising.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_encrypt_function.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_encrypt_function.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_encrypt_function.format	(working copy)
@@ -0,0 +1,105 @@
+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
+
+
+)
+
+(
+0x2c COMMA
+-4 DECREASED_FOUR
+
+)
+
+(
+0x19 MIC_SIZE_64BIT
+0x09 MIC_SIZE_32BIT
+)
+
+
Index: format/mesh_protocol_stack/mesh_fast_pairing.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_fast_pairing.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_fast_pairing.format	(working copy)
@@ -0,0 +1,180 @@
+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
+)
+
+// 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: format/mesh_protocol_stack/mesh_health_message.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_health_message.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_init.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_init.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_init.format	(working copy)
@@ -0,0 +1,182 @@
+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
+
+	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
+)
+
+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_LOG
+1 MESH_FEATURE_DISABLE_RELAY
+2 MESH_FEATURE_DISABLE_SUBSCRIPTION
+)
+
+(//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
+
+
+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: format/mesh_protocol_stack/mesh_lower_transport_layer.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_lower_transport_layer.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_lower_transport_layer.format	(working copy)
@@ -0,0 +1,51 @@
+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
+
+
+	36 mem_mesh_segmented_access_message_Segment
+)
+
+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: format/mesh_protocol_stack/mesh_model_layer.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_model_layer.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_more_element_check.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_more_element_check.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/mesh_protocol_stack/mesh_network_layer.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_network_layer.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_network_layer.format	(working copy)
@@ -0,0 +1,112 @@
+
+
+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
+)
+
Index: format/mesh_protocol_stack/mesh_upper_transport_layer.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_upper_transport_layer.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/mesh_protocol_stack/mesh_upper_transport_layer.format	(working copy)
@@ -0,0 +1,129 @@
+
+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
+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
+)
+
+
Index: format/meter.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/meter.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/patch.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/patch.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/regs.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/regs.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/regs.format	(working copy)
@@ -0,0 +1,548 @@
+(
+	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
+	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: format/rfcomm.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/rfcomm.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/sdp.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/sdp.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/security.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/security.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/simple_pairing.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/simple_pairing.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/ui.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/ui.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/usb.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/usb.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/utility.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/utility.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: format/var.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/format/var.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: output/eeprom.dat
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/eeprom.dat	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/eeprom.dat	(working copy)
@@ -0,0 +1,8192 @@
+00
+02
+aa
+55
+8a
+0f
+c2
+84
+00
+19
+c0
+00
+00
+24
+c0
+01
+80
+28
+c0
+41
+80
+4c
+c0
+45
+00
+35
+c0
+45
+80
+81
+c0
+4f
+80
+96
+c0
+57
+00
+98
+c0
+58
+00
+75
+c0
+61
+82
+0b
+c0
+63
+81
+99
+c0
+64
+81
+9f
+c0
+65
+01
+b1
+c0
+66
+03
+5d
+c0
+67
+03
+3d
+c0
+68
+02
+1c
+c0
+68
+83
+94
+c0
+69
+82
+36
+c0
+6a
+02
+4f
+c0
+6b
+01
+c3
+c0
+6c
+82
+69
+c0
+6d
+02
+f3
+c0
+6f
+03
+ca
+c0
+74
+02
+fe
+20
+20
+13
+7c
+c0
+19
+80
+55
+c0
+1a
+00
+5a
+c0
+43
+82
+fa
+c0
+50
+83
+12
+c0
+54
+80
+90
+c0
+6e
+81
+13
+c0
+71
+01
+23
+c0
+74
+81
+2a
+c0
+75
+01
+44
+c0
+76
+03
+33
+20
+20
+13
+7c
+20
+80
+00
+00
+20
+40
+30
+f3
+20
+40
+3b
+fd
+20
+20
+08
+04
+20
+40
+70
+6c
+20
+40
+75
+97
+20
+40
+6e
+a7
+20
+40
+1b
+93
+20
+40
+08
+3a
+20
+40
+31
+08
+20
+40
+08
+92
+20
+40
+0b
+08
+20
+40
+0b
+7b
+20
+40
+08
+23
+20
+40
+21
+d3
+20
+40
+00
+40
+20
+20
+08
+13
+6f
+e0
+c1
+e8
+c0
+01
+92
+2d
+c0
+02
+92
+38
+c0
+03
+12
+3b
+c0
+03
+92
+3b
+c0
+05
+12
+3b
+c0
+41
+92
+3e
+c0
+42
+92
+41
+c0
+4a
+12
+44
+c0
+4f
+12
+47
+20
+20
+12
+28
+20
+40
+14
+65
+6f
+e1
+c1
+74
+20
+7a
+00
+00
+6f
+e0
+c0
+99
+20
+7a
+00
+00
+6f
+e0
+c7
+64
+20
+3a
+00
+49
+6f
+e0
+c6
+b9
+20
+7a
+00
+00
+6f
+e0
+c6
+ba
+24
+7a
+00
+00
+20
+20
+14
+ea
+70
+89
+00
+05
+20
+00
+00
+02
+70
+89
+00
+00
+6f
+e0
+c0
+c5
+c0
+0c
+11
+68
+c0
+04
+00
+53
+20
+20
+11
+68
+70
+8a
+87
+29
+20
+20
+11
+7d
+da
+20
+09
+9e
+d8
+40
+00
+0c
+58
+00
+00
+30
+20
+40
+5e
+63
+20
+20
+60
+bf
+6a
+50
+8a
+12
+70
+8a
+12
+3d
+70
+8a
+11
+aa
+70
+8a
+0a
+0c
+6f
+f0
+8a
+09
+79
+20
+7e
+07
+67
+f0
+8a
+09
+70
+8a
+0b
+04
+20
+00
+00
+3c
+70
+8a
+16
+00
+70
+8a
+17
+06
+20
+40
+61
+1a
+67
+f0
+8a
+97
+70
+80
+dc
+03
+20
+00
+00
+3c
+6f
+f0
+80
+53
+79
+20
+7e
+07
+67
+f0
+80
+53
+20
+00
+03
+e8
+6f
+f1
+01
+50
+67
+e1
+44
+a2
+6f
+f0
+80
+53
+79
+3f
+fe
+07
+67
+f0
+80
+53
+70
+8a
+97
+00
+62
+50
+8a
+12
+20
+60
+00
+00
+6f
+e0
+83
+0d
+20
+7a
+00
+00
+1f
+e0
+ff
+ff
+67
+e0
+83
+0d
+20
+40
+77
+c5
+20
+40
+31
+e3
+20
+40
+31
+a4
+20
+40
+31
+aa
+20
+40
+5c
+dc
+6f
+e1
+44
+6f
+20
+40
+7e
+05
+20
+20
+00
+75
+20
+40
+12
+d1
+20
+00
+00
+64
+70
+8a
+8b
+e6
+20
+40
+12
+6a
+20
+40
+12
+71
+20
+40
+12
+77
+70
+8a
+6d
+09
+70
+8a
+03
+05
+70
+8a
+7a
+94
+70
+8a
+0e
+0b
+70
+8a
+0f
+05
+70
+8a
+83
+90
+70
+8a
+85
+00
+70
+89
+21
+40
+20
+20
+12
+5d
+20
+40
+16
+a6
+70
+8a
+6d
+89
+6f
+f0
+8a
+43
+1f
+e1
+fe
+0f
+67
+f0
+8a
+43
+20
+60
+00
+00
+70
+00
+80
+00
+20
+20
+13
+b7
+20
+40
+6d
+f3
+20
+40
+00
+a9
+20
+40
+41
+a7
+20
+75
+80
+00
+20
+40
+02
+1e
+20
+40
+3d
+8a
+20
+40
+47
+28
+20
+40
+00
+ca
+20
+40
+02
+61
+20
+40
+02
+b3
+20
+20
+3b
+c9
+6f
+e0
+c9
+13
+d8
+40
+00
+40
+20
+40
+60
+93
+6f
+e0
+c9
+14
+d8
+40
+00
+40
+20
+20
+60
+93
+20
+75
+80
+00
+20
+40
+26
+07
+20
+40
+22
+ff
+20
+40
+3f
+1e
+20
+40
+3d
+13
+58
+00
+17
+70
+67
+e1
+c8
+ad
+58
+00
+07
+08
+67
+e1
+48
+85
+d8
+40
+1e
+00
+60
+49
+48
+38
+20
+40
+00
+b6
+20
+20
+3b
+f5
+6f
+e0
+cb
+e3
+67
+e0
+c9
+28
+6f
+e0
+c9
+17
+c1
+7f
+80
+00
+68
+48
+c9
+17
+20
+40
+3f
+56
+68
+48
+c9
+17
+20
+40
+60
+59
+24
+20
+80
+c0
+20
+20
+3f
+54
+6f
+e0
+cb
+e5
+67
+e0
+c9
+28
+20
+40
+3f
+54
+68
+48
+c9
+17
+20
+40
+60
+59
+20
+20
+80
+c7
+20
+20
+3f
+56
+6f
+e0
+cb
+e4
+67
+e0
+c9
+28
+20
+20
+3f
+58
+58
+00
+00
+cf
+67
+e1
+48
+9b
+58
+00
+00
+ed
+67
+e1
+48
+9d
+20
+20
+3b
+d3
+c6
+93
+00
+00
+20
+40
+3f
+70
+24
+74
+00
+00
+6f
+e4
+4b
+ab
+c3
+0a
+80
+d6
+6f
+e0
+cb
+8b
+24
+3a
+48
+84
+20
+40
+42
+cb
+6f
+e0
+c8
+36
+c2
+80
+80
+e5
+68
+48
+c7
+c7
+6f
+e0
+c8
+d0
+98
+41
+fe
+00
+67
+e0
+c8
+d0
+68
+48
+c7
+cc
+6f
+e0
+c8
+d5
+98
+40
+fe
+00
+67
+e0
+c8
+d5
+68
+48
+c7
+cd
+6f
+e0
+c8
+d6
+98
+40
+fe
+00
+67
+e0
+c8
+d6
+70
+48
+36
+01
+da
+20
+00
+07
+da
+40
+48
+d0
+6f
+e4
+4b
+ab
+c2
+8c
+26
+e1
+6f
+e1
+48
+d5
+20
+7a
+00
+00
+20
+20
+26
+e1
+6f
+e4
+4b
+ab
+c4
+0b
+00
+00
+6f
+e0
+ca
+ae
+20
+7a
+00
+00
+6f
+e0
+c8
+a7
+20
+7a
+00
+00
+6f
+e0
+cb
+a1
+1f
+e0
+fe
+01
+1f
+e1
+7e
+03
+67
+e0
+cb
+a1
+24
+7a
+00
+00
+70
+4b
+a2
+00
+6f
+e0
+cb
+a2
+1f
+e0
+fe
+01
+67
+e0
+cb
+a2
+1f
+e6
+7c
+08
+24
+21
+01
+03
+20
+40
+25
+9a
+20
+40
+26
+5b
+24
+2c
+01
+09
+24
+37
+81
+09
+20
+40
+48
+b5
+20
+40
+25
+97
+6f
+e0
+cb
+a3
+1f
+e0
+fe
+01
+67
+e0
+cb
+a3
+c0
+08
+01
+0b
+20
+60
+00
+00
+20
+40
+22
+cb
+20
+20
+00
+f9
+70
+4b
+a3
+00
+6f
+e0
+cb
+a4
+c3
+80
+00
+00
+79
+20
+7e
+00
+67
+e0
+cb
+a4
+6f
+e1
+4b
+bc
+67
+e1
+4a
+b2
+20
+20
+02
+61
+c6
+1a
+00
+00
+c5
+13
+a4
+0e
+c6
+93
+00
+00
+6f
+e0
+c8
+a1
+c2
+80
+a3
+40
+c2
+81
+25
+80
+6f
+e0
+c8
+bd
+c0
+00
+81
+1c
+20
+20
+26
+21
+20
+40
+22
+ea
+24
+34
+01
+15
+20
+40
+26
+db
+6f
+e1
+48
+be
+1f
+e0
+fe
+01
+67
+e1
+48
+be
+20
+20
+26
+21
+6f
+e1
+4c
+0c
+1f
+e0
+fe
+01
+67
+e1
+4c
+0c
+6f
+e0
+cc
+0c
+1f
+e1
+7e
+ff
+c0
+00
+23
+41
+20
+60
+00
+00
+6f
+e1
+48
+89
+1f
+e1
+7e
+ff
+c0
+00
+01
+31
+6f
+e1
+48
+89
+1f
+e0
+fe
+01
+67
+e1
+48
+89
+20
+60
+00
+00
+20
+40
+25
+9a
+20
+40
+26
+5b
+24
+2c
+01
+37
+24
+37
+81
+37
+20
+40
+26
+72
+20
+20
+25
+86
+6f
+e0
+c8
+8c
+20
+3a
+22
+cb
+6f
+e1
+48
+89
+1f
+e0
+fe
+01
+67
+e1
+48
+89
+6f
+e0
+c8
+8a
+2f
+ef
+fe
+00
+6f
+e0
+c8
+8b
+c0
+00
+a5
+ad
+c0
+01
+25
+af
+c0
+01
+a5
+b1
+c0
+02
+25
+b3
+20
+20
+25
+6e
+20
+40
+26
+31
+24
+34
+01
+53
+20
+40
+01
+77
+20
+40
+26
+ee
+6f
+e0
+cb
+e1
+24
+3a
+01
+4e
+6f
+e4
+48
+b0
+67
+e4
+48
+5c
+6f
+e1
+48
+c2
+67
+e1
+48
+c4
+20
+40
+26
+bb
+24
+74
+00
+00
+20
+40
+7f
+dc
+6f
+e1
+c8
+ad
+20
+20
+26
+b8
+6f
+e0
+c8
+a7
+20
+5a
+01
+69
+6f
+e0
+c8
+bd
+c1
+00
+80
+00
+20
+40
+26
+9f
+20
+40
+26
+bb
+24
+74
+00
+00
+6f
+e0
+cb
+e1
+24
+5a
+01
+5e
+6f
+e4
+48
+5c
+20
+20
+26
+b8
+20
+40
+01
+9f
+68
+48
+c9
+13
+20
+40
+60
+42
+68
+48
+c9
+14
+20
+40
+60
+42
+6f
+e0
+c9
+13
+d8
+40
+00
+80
+20
+40
+60
+93
+6f
+e0
+c9
+14
+d8
+40
+00
+80
+20
+20
+60
+93
+70
+48
+36
+01
+70
+48
+a7
+01
+20
+40
+26
+42
+67
+e0
+c7
+c6
+58
+00
+00
+00
+67
+e3
+c7
+c7
+6f
+e2
+48
+a9
+67
+e2
+47
+ce
+70
+48
+35
+0c
+6f
+e0
+c8
+36
+79
+20
+7e
+03
+67
+e0
+c8
+36
+20
+40
+22
+91
+20
+20
+01
+46
+70
+48
+a6
+00
+69
+61
+01
+5f
+34
+73
+02
+00
+20
+40
+26
+5b
+6f
+e0
+c8
+2c
+c0
+00
+a6
+51
+24
+2c
+01
+88
+24
+37
+81
+88
+20
+40
+26
+72
+20
+40
+01
+82
+20
+20
+26
+51
+6f
+e0
+cb
+e1
+24
+5a
+02
+38
+6f
+e0
+cb
+e1
+24
+5a
+00
+a3
+70
+4b
+e1
+00
+20
+60
+00
+00
+6f
+e0
+c8
+a7
+24
+7a
+00
+00
+6f
+e1
+48
+a3
+1f
+e0
+fe
+01
+67
+e1
+48
+a3
+6f
+e0
+c8
+a4
+c2
+80
+a6
+79
+20
+40
+26
+7e
+20
+40
+01
+92
+20
+20
+01
+78
+6f
+e0
+c8
+a4
+1f
+e6
+7c
+00
+20
+61
+00
+00
+df
+20
+00
+28
+20
+00
+2e
+e0
+c2
+00
+7d
+13
+20
+60
+00
+00
+58
+00
+00
+06
+20
+40
+5b
+0d
+c2
+81
+be
+23
+20
+40
+02
+5a
+20
+40
+02
+61
+20
+20
+3e
+23
+20
+40
+42
+e9
+20
+40
+7f
+dc
+20
+40
+40
+15
+68
+48
+c9
+10
+20
+40
+60
+69
+68
+48
+c9
+10
+20
+40
+60
+42
+6f
+e0
+c9
+20
+d8
+40
+00
+3f
+20
+40
+60
+93
+20
+40
+3e
+36
+6f
+e4
+4b
+ab
+c4
+0a
+00
+00
+6f
+e0
+c8
+fd
+c1
+81
+00
+00
+6f
+e0
+c8
+fc
+d8
+40
+00
+c0
+20
+20
+60
+93
+68
+48
+c9
+13
+20
+40
+60
+50
+68
+48
+c9
+14
+20
+40
+60
+50
+20
+40
+3f
+88
+6f
+e0
+c9
+1f
+d8
+40
+00
+3f
+20
+40
+60
+93
+20
+20
+3e
+44
+70
+48
+a5
+00
+20
+40
+26
+52
+5f
+ff
+ff
+ff
+67
+e4
+48
+5c
+58
+00
+00
+00
+67
+e3
+c8
+d0
+70
+4b
+e1
+01
+20
+40
+02
+61
+20
+20
+01
+58
+1a
+62
+7e
+00
+c0
+1c
+81
+dd
+c0
+1e
+01
+df
+c0
+1d
+01
+e5
+c0
+19
+01
+ca
+c0
+22
+01
+d1
+20
+20
+43
+36
+6f
+e0
+ca
+c7
+c0
+00
+81
+ce
+70
+4b
+76
+14
+20
+20
+43
+73
+20
+40
+43
+6c
+70
+4b
+76
+05
+20
+20
+43
+73
+6f
+e0
+82
+c1
+1f
+e6
+7c
+0c
+24
+21
+43
+84
+67
+e1
+43
+72
+67
+e1
+43
+74
+6f
+e0
+82
+c3
+68
+48
+cb
+8a
+98
+46
+7c
+00
+20
+21
+43
+9a
+6f
+e0
+82
+c3
+67
+e0
+cb
+8a
+20
+20
+43
+86
+20
+40
+02
+a5
+20
+20
+48
+57
+20
+40
+02
+a5
+6f
+e2
+48
+3c
+67
+e2
+48
+91
+67
+e2
+49
+93
+20
+40
+48
+c6
+20
+20
+48
+4e
+6f
+e0
+c8
+a5
+24
+3a
+01
+ba
+6f
+e0
+c8
+8b
+c0
+01
+01
+ed
+c0
+02
+01
+ff
+c0
+01
+82
+06
+20
+40
+02
+a5
+20
+20
+48
+3a
+6f
+e4
+4b
+ab
+c2
+97
+81
+fd
+c2
+98
+01
+fd
+6f
+e2
+49
+93
+68
+4a
+49
+74
+98
+46
+7c
+00
+20
+22
+81
+f5
+20
+20
+48
+06
+d8
+e0
+00
+01
+20
+40
+46
+f0
+58
+00
+00
+00
+67
+e1
+48
+87
+20
+40
+45
+76
+20
+40
+49
+8e
+20
+40
+02
+8e
+20
+20
+48
+2e
+20
+40
+02
+8e
+20
+20
+48
+12
+6f
+e4
+4b
+ab
+c3
+17
+82
+04
+6f
+e0
+cb
+b4
+c0
+00
+82
+04
+20
+20
+48
+1a
+20
+40
+02
+a5
+20
+20
+01
+ba
+6f
+e4
+4b
+ab
+c3
+17
+82
+04
+c2
+89
+82
+04
+c2
+89
+02
+04
+20
+20
+48
+12
+6f
+e4
+4b
+ab
+c2
+97
+c8
+0a
+6f
+e0
+c9
+38
+c0
+00
+02
+12
+20
+40
+03
+94
+c0
+02
+82
+12
+20
+20
+3d
+57
+6f
+e4
+4b
+ab
+c3
+08
+c8
+03
+20
+40
+3d
+65
+20
+34
+48
+06
+6f
+e4
+4b
+ab
+c2
+98
+48
+0c
+c3
+18
+c8
+0c
+20
+40
+41
+10
+1a
+21
+7e
+07
+20
+20
+47
+ff
+20
+40
+40
+8f
+20
+40
+02
+2c
+6f
+e0
+c9
+27
+c0
+01
+c0
+bb
+c0
+05
+82
+27
+c0
+00
+40
+9b
+6f
+e0
+c9
+92
+c0
+00
+40
+a2
+c0
+00
+c0
+a0
+c0
+01
+40
+a6
+20
+20
+40
+a0
+6f
+e0
+c9
+92
+c0
+00
+40
+d6
+c0
+00
+c0
+d4
+c0
+01
+40
+d8
+20
+20
+40
+d4
+6f
+e1
+4a
+c2
+24
+7a
+00
+00
+6f
+e1
+48
+83
+24
+7a
+00
+00
+6f
+e1
+48
+87
+24
+7a
+00
+00
+6f
+e0
+cb
+c1
+20
+3a
+02
+cb
+67
+e0
+cb
+a8
+20
+60
+00
+00
+20
+40
+3f
+65
+20
+75
+80
+00
+20
+40
+42
+36
+20
+40
+41
+b5
+c0
+18
+02
+40
+c0
+18
+c2
+17
+c0
+2c
+42
+20
+20
+40
+41
+b2
+20
+00
+1a
+f4
+20
+20
+02
+39
+6f
+e0
+c9
+c2
+c0
+2d
+02
+49
+c0
+6c
+41
+cb
+c0
+68
+c1
+da
+c0
+69
+41
+e3
+c0
+01
+41
+ea
+c0
+2a
+41
+ed
+c0
+28
+42
+14
+20
+20
+02
+39
+70
+49
+27
+05
+20
+40
+42
+32
+20
+40
+7d
+12
+da
+60
+4b
+e6
+20
+40
+42
+2b
+20
+20
+02
+1e
+20
+40
+3f
+65
+6f
+e0
+c9
+27
+c0
+05
+82
+56
+20
+40
+42
+32
+da
+60
+4a
+a3
+20
+40
+42
+2b
+20
+20
+02
+1e
+20
+40
+02
+5d
+da
+60
+4c
+0e
+20
+40
+42
+2b
+20
+20
+02
+1e
+6f
+e0
+c9
+27
+c0
+05
+82
+5d
+20
+20
+42
+32
+58
+00
+97
+06
+20
+40
+5b
+0c
+20
+00
+2e
+e0
+20
+60
+00
+00
+20
+40
+41
+a7
+20
+40
+3f
+65
+6f
+e0
+c9
+27
+c0
+05
+82
+67
+58
+00
+08
+06
+20
+20
+5b
+0c
+58
+00
+1f
+06
+20
+20
+5b
+0c
+20
+40
+3e
+9b
+20
+40
+03
+7e
+20
+40
+23
+2b
+20
+40
+25
+56
+20
+40
+47
+cd
+20
+40
+02
+c8
+20
+40
+02
+80
+20
+40
+02
+ba
+20
+40
+40
+7c
+20
+40
+44
+cc
+20
+40
+02
+de
+20
+40
+44
+ff
+20
+40
+45
+04
+20
+40
+45
+12
+20
+40
+45
+1f
+20
+40
+45
+15
+20
+40
+45
+2a
+20
+40
+45
+2d
+20
+40
+45
+32
+20
+40
+45
+35
+20
+40
+40
+22
+20
+40
+45
+47
+20
+20
+02
+c0
+6f
+e0
+cc
+16
+20
+7a
+00
+00
+6f
+e0
+cc
+19
+c0
+00
+82
+95
+20
+40
+02
+a2
+6f
+e0
+cc
+1a
+1f
+e0
+fe
+01
+67
+e0
+cc
+1a
+68
+48
+cc
+1b
+98
+46
+7c
+00
+20
+42
+82
+8c
+20
+60
+00
+00
+70
+4c
+20
+00
+20
+20
+02
+a7
+70
+4c
+1c
+02
+70
+4c
+1f
+00
+70
+4c
+1e
+01
+70
+4c
+1d
+05
+70
+4c
+16
+01
+70
+4c
+19
+01
+20
+60
+00
+00
+da
+60
+4c
+1d
+da
+40
+02
+98
+20
+20
+31
+8a
+6f
+e0
+cc
+1c
+67
+e0
+cc
+1d
+6f
+e0
+cc
+1f
+20
+3a
+02
+a0
+6f
+e0
+cc
+1e
+20
+3a
+02
+a5
+1f
+e0
+ff
+ff
+67
+e0
+cc
+1e
+6f
+e0
+cc
+18
+c0
+00
+82
+a7
+70
+4c
+18
+01
+68
+48
+cc
+17
+20
+20
+60
+69
+58
+00
+00
+00
+67
+e1
+cc
+1d
+6f
+e0
+cc
+1e
+24
+3a
+02
+ab
+70
+4c
+16
+00
+70
+4c
+19
+00
+70
+4c
+1a
+00
+70
+4c
+18
+00
+6f
+e0
+cc
+17
+c0
+01
+82
+b1
+68
+48
+cc
+17
+20
+20
+60
+65
+68
+48
+cc
+17
+20
+20
+3f
+56
+70
+4c
+21
+03
+20
+60
+00
+00
+70
+4c
+20
+01
+70
+4c
+16
+01
+70
+4c
+19
+00
+70
+4c
+1a
+00
+20
+60
+00
+00
+da
+60
+4c
+21
+da
+40
+02
+b5
+20
+20
+31
+8a
+70
+4c
+1c
+02
+70
+4c
+1f
+01
+20
+20
+02
+91
+6f
+e0
+c9
+2a
+c3
+83
+80
+00
+da
+60
+4a
+b2
+da
+40
+02
+c5
+20
+20
+31
+91
+6f
+e0
+c9
+38
+c0
+00
+01
+ba
+20
+20
+43
+1b
+da
+60
+4b
+a8
+da
+40
+02
+cb
+20
+20
+31
+8a
+6f
+e4
+4b
+ab
+c2
+8e
+02
+d1
+6f
+e0
+c9
+92
+c0
+00
+02
+d8
+c0
+00
+82
+da
+20
+20
+02
+d6
+6f
+e0
+c9
+92
+c0
+00
+02
+da
+c0
+00
+82
+dc
+c0
+01
+02
+d6
+20
+20
+02
+d8
+70
+4c
+1e
+01
+20
+20
+02
+bd
+70
+4c
+1e
+03
+20
+20
+02
+bd
+70
+4c
+1e
+05
+20
+20
+02
+bd
+70
+4c
+1e
+07
+20
+20
+02
+bd
+6f
+e0
+c9
+38
+c0
+00
+02
+e4
+6f
+e4
+4b
+ab
+c4
+1a
+80
+00
+68
+48
+cb
+ca
+20
+20
+02
+e7
+6f
+e4
+4b
+ab
+c4
+19
+00
+00
+68
+48
+cb
+cb
+60
+48
+cb
+9d
+20
+40
+41
+15
+1f
+e1
+7e
+07
+68
+48
+cb
+9d
+98
+46
+7c
+00
+20
+22
+82
+ee
+20
+20
+44
+eb
+20
+40
+44
+f6
+6f
+e0
+cb
+9f
+c1
+00
+80
+00
+70
+4b
+9f
+01
+20
+60
+00
+00
+6f
+e1
+47
+8c
+2f
+ef
+fe
+0b
+20
+40
+c5
+81
+6f
+e1
+47
+8c
+2f
+ef
+fe
+07
+20
+40
+c3
+22
+20
+20
+45
+54
+6f
+e0
+cb
+e2
+24
+5a
+78
+61
+70
+4b
+e2
+00
+20
+20
+78
+51
+6f
+e1
+03
+15
+1f
+e2
+0c
+00
+ef
+e0
+80
+06
+67
+e0
+c5
+f5
+1f
+e1
+04
+0f
+1f
+f1
+fe
+00
+c0
+04
+83
+06
+20
+20
+4d
+93
+da
+20
+00
+01
+20
+40
+4d
+c0
+6f
+e1
+44
+dc
+e7
+e1
+00
+05
+58
+00
+00
+00
+e7
+e0
+80
+05
+70
+09
+50
+01
+6f
+e0
+c4
+e2
+79
+20
+7e
+06
+67
+e0
+c4
+e2
+70
+09
+5b
+12
+20
+20
+78
+71
+6f
+e0
+c3
+dd
+1f
+e0
+fe
+01
+67
+e0
+c3
+dd
+c0
+06
+16
+5a
+20
+40
+19
+1b
+20
+40
+19
+6a
+6f
+e0
+82
+bd
+20
+40
+16
+8b
+20
+40
+18
+38
+20
+20
+16
+55
+ef
+e1
+00
+06
+c0
+02
+03
+1f
+20
+20
+19
+e4
+ef
+e1
+80
+06
+67
+e1
+c4
+36
+c0
+09
+03
+23
+20
+20
+1c
+d3
+18
+c2
+22
+00
+6f
+e1
+43
+d4
+1f
+e0
+a5
+fd
+20
+40
+1a
+25
+6f
+e0
+ca
+c1
+c0
+7f
+9e
+73
+6f
+e0
+ca
+c7
+20
+3a
+1e
+73
+6f
+e0
+cb
+75
+c2
+80
+9e
+73
+58
+00
+00
+1a
+68
+49
+44
+37
+98
+46
+7c
+00
+24
+22
+9e
+73
+70
+02
+d8
+05
+20
+20
+1e
+c9
+6f
+e0
+cb
+aa
+24
+5a
+26
+e1
+78
+34
+7c
+00
+20
+40
+14
+65
+6f
+e1
+c1
+74
+20
+3a
+7e
+56
+6f
+e0
+c0
+99
+20
+3a
+7e
+56
+6f
+e1
+48
+9f
+20
+20
+7e
+05
+78
+54
+7c
+00
+58
+00
+00
+00
+67
+e3
+48
+d1
+20
+40
+42
+40
+20
+40
+02
+1e
+20
+40
+3f
+7e
+20
+40
+3f
+83
+20
+40
+40
+dc
+6f
+e0
+c8
+d0
+1f
+e1
+7e
+1f
+67
+e0
+c8
+d0
+24
+34
+47
+28
+20
+40
+03
+4b
+20
+20
+45
+44
+6f
+e4
+4b
+ab
+c4
+1c
+00
+00
+6f
+e0
+c9
+27
+c1
+01
+80
+00
+c1
+00
+00
+00
+6f
+e2
+48
+d1
+20
+7a
+00
+00
+20
+40
+47
+bd
+58
+00
+00
+06
+20
+40
+47
+b3
+20
+5a
+47
+af
+24
+5a
+47
+b1
+58
+00
+00
+04
+20
+40
+47
+b8
+20
+5a
+47
+af
+6f
+e0
+c9
+c9
+c0
+00
+c7
+2d
+20
+20
+47
+28
+6f
+e0
+cb
+aa
+24
+7a
+00
+00
+20
+40
+00
+5a
+70
+48
+f6
+00
+20
+40
+61
+25
+67
+e1
+48
+e9
+d8
+40
+00
+12
+98
+46
+7c
+00
+24
+21
+03
+76
+6f
+e0
+c4
+a0
+c0
+81
+03
+6e
+68
+49
+48
+e9
+18
+4f
+fe
+08
+1f
+e6
+fc
+0a
+20
+40
+7d
+ec
+98
+40
+fe
+00
+67
+e1
+48
+e9
+da
+20
+48
+e3
+20
+40
+3e
+d8
+6f
+e0
+c4
+a4
+c2
+81
+3f
+1a
+c2
+80
+bf
+1c
+c3
+00
+03
+78
+70
+48
+fa
+01
+20
+20
+3e
+ce
+68
+48
+c8
+fc
+20
+40
+3f
+54
+d8
+e0
+00
+04
+20
+40
+46
+f4
+6f
+e0
+c8
+fa
+20
+7a
+00
+00
+70
+48
+fa
+00
+20
+20
+02
+a7
+6f
+e1
+4a
+c2
+24
+7a
+00
+00
+6f
+e1
+48
+83
+24
+7a
+00
+00
+6f
+e1
+48
+87
+24
+7a
+00
+00
+20
+40
+49
+04
+20
+74
+00
+00
+6f
+e4
+4b
+ab
+c4
+10
+80
+00
+c4
+02
+00
+00
+c2
+91
+c9
+7c
+6f
+e0
+c8
+f8
+1f
+e0
+fe
+01
+67
+e0
+c8
+f8
+1f
+e6
+7c
+32
+24
+41
+03
+92
+c0
+0f
+02
+a2
+c0
+13
+82
+a7
+20
+60
+00
+00
+70
+48
+f8
+01
+20
+20
+02
+a7
+6f
+e0
+cb
+e1
+24
+5a
+41
+21
+da
+20
+00
+00
+20
+40
+03
+9d
+20
+40
+03
+a2
+20
+40
+03
+a7
+20
+40
+03
+ac
+20
+40
+03
+b9
+20
+20
+41
+1e
+6f
+e0
+c9
+18
+20
+40
+03
+c6
+20
+40
+41
+24
+68
+48
+c9
+18
+20
+20
+3f
+56
+6f
+e0
+c9
+19
+20
+40
+03
+c6
+20
+40
+41
+2a
+68
+48
+c9
+19
+20
+20
+3f
+56
+6f
+e0
+c9
+1a
+20
+40
+03
+c6
+20
+40
+41
+30
+68
+48
+c9
+1a
+20
+20
+3f
+56
+6f
+e0
+c9
+0d
+c1
+7f
+80
+00
+70
+4b
+96
+03
+6f
+e0
+cb
+91
+1f
+e2
+26
+00
+68
+48
+c9
+0d
+6f
+e0
+c9
+10
+c0
+7f
+83
+b5
+20
+20
+41
+3e
+6f
+e0
+c9
+0d
+20
+40
+03
+c8
+68
+48
+c9
+0d
+20
+20
+41
+4b
+6f
+e0
+c9
+0e
+c1
+7f
+80
+00
+70
+4b
+96
+04
+6f
+e0
+cb
+92
+1f
+e2
+26
+00
+68
+48
+c9
+0e
+6f
+e0
+c9
+10
+c0
+7f
+83
+c2
+20
+20
+41
+57
+6f
+e0
+c9
+0e
+20
+40
+03
+c8
+68
+48
+c9
+0e
+20
+20
+41
+64
+d8
+40
+00
+3f
+20
+20
+60
+93
+d8
+40
+00
+3e
+20
+20
+60
+93
+20
+40
+49
+90
+20
+40
+79
+36
+20
+40
+03
+ce
+20
+20
+46
+4f
+6f
+e4
+4b
+ab
+c2
+97
+40
+36
+6f
+e0
+c9
+0f
+c1
+7f
+80
+00
+da
+20
+00
+00
+70
+4b
+96
+05
+68
+48
+c9
+0f
+20
+40
+03
+d7
+20
+20
+40
+2f
+6f
+e4
+4b
+ab
+c2
+96
+40
+48
+6f
+e0
+cb
+93
+1f
+e2
+26
+00
+6f
+e0
+c9
+10
+c0
+7f
+83
+de
+20
+20
+40
+3f
+6f
+e0
+c9
+0f
+20
+40
+03
+c8
+68
+48
+c9
+0f
+20
+20
+41
+95
+07
+d8
+aa
+55
+40
+00
+00
+40
+09
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+00
+08
+0c
+00
+80
+00
+40
+01
+00
+88
+56
+5b
+46
+00
+01
+00
+00
+00
+00
+00
+00
+00
+00
+18
+00
+00
+00
+00
+00
+00
+00
+00
+00
+80
+00
+00
+00
+02
+02
+00
+00
+00
+00
+00
+20
+04
+16
+00
+00
+aa
+55
+01
+00
+9a
+40
+08
+aa
+55
+03
+00
+7a
+41
+88
+1c
+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
+70
+aa
+55
+01
+00
+d0
+44
+00
+aa
+55
+01
+00
+ea
+41
+ff
+aa
+55
+01
+00
+ee
+41
+00
+aa
+55
+08
+00
+ab
+4b
+04
+18
+1a
+01
+07
+80
+03
+01
+aa
+55
+0c
+00
+fe
+48
+b0
+04
+08
+07
+64
+ff
+94
+85
+90
+63
+75
+80
+aa
+55
+17
+00
+0d
+49
+0b
+0c
+0d
+ff
+ff
+ff
+05
+04
+ff
+ff
+08
+0b
+0c
+0d
+ff
+ff
+ff
+ff
+07
+06
+ff
+ff
+ff
+aa
+55
+01
+00
+26
+49
+00
+aa
+55
+03
+00
+e3
+4b
+03
+00
+02
+aa
+55
+01
+00
+17
+4c
+03
+aa
+55
+02
+00
+1b
+4c
+14
+05
+aa
+55
+01
+00
+58
+0b
+ff
+aa
+55
+12
+00
+cc
+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
+b3
+4b
+03
+03
+aa
+55
+08
+00
+38
+49
+00
+34
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+07
+00
+56
+49
+34
+ff
+ff
+ff
+ff
+ff
+ff
+aa
+55
+17
+00
+73
+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
+13
+00
+b5
+4b
+00
+40
+0a
+60
+06
+05
+00
+64
+00
+70
+17
+14
+0a
+90
+01
+e8
+03
+90
+01
+aa
+55
+02
+00
+ca
+4b
+07
+05
+aa
+55
+01
+00
+c0
+49
+02
+aa
+55
+01
+00
+fd
+48
+02
+aa
+55
+01
+00
+a1
+44
+05
+aa
+55
+06
+00
+e3
+48
+05
+01
+9f
+00
+b1
+00
+aa
+55
+0a
+00
+eb
+48
+10
+00
+52
+00
+35
+00
+21
+00
+25
+00
+aa
+55
+01
+00
+f7
+48
+0a
+aa
+55
+02
+00
+c8
+4b
+64
+00
+aa
+55
+03
+00
+de
+4b
+00
+00
+00
+aa
+55
+01
+00
+ab
+4a
+ff
+aa
+55
+01
+00
+e2
+4b
+01
+aa
+55
+01
+00
+77
+41
+20
+aa
+55
+01
+00
+8a
+4b
+20
+aa
+55
+01
+00
+7d
+44
+06
+aa
+55
+06
+00
+a8
+40
+15
+a0
+c8
+12
+23
+51
+aa
+55
+14
+00
+fc
+45
+13
+42
+6c
+75
+65
+74
+6f
+6f
+74
+68
+20
+4d
+6f
+75
+73
+65
+20
+33
+2e
+30
+aa
+55
+05
+00
+55
+44
+0e
+00
+01
+00
+02
+aa
+55
+01
+00
+41
+46
+0a
+aa
+55
+01
+00
+64
+47
+01
+aa
+55
+01
+00
+78
+46
+00
+aa
+55
+01
+00
+5f
+41
+00
+aa
+55
+03
+00
+65
+47
+03
+00
+04
+aa
+55
+01
+00
+8e
+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
+d2
+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
+08
+00
+72
+43
+07
+00
+07
+00
+20
+00
+2c
+01
+aa
+55
+06
+00
+cc
+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
+06
+00
+7a
+43
+8e
+b1
+3a
+0e
+8e
+ed
+aa
+55
+02
+00
+e7
+4a
+15
+00
+aa
+55
+02
+00
+57
+43
+19
+00
+aa
+55
+06
+00
+e9
+4a
+1d
+00
+21
+00
+30
+00
+aa
+55
+02
+00
+d1
+43
+2d
+00
+aa
+55
+01
+00
+f0
+4a
+96
+aa
+55
+01
+00
+86
+44
+ff
+aa
+55
+01
+00
+90
+47
+ff
+aa
+55
+01
+00
+8f
+47
+1e
+aa
+55
+0c
+00
+d0
+49
+03
+04
+01
+02
+20
+2a
+3f
+15
+14
+1b
+11
+0e
+aa
+55
+74
+00
+df
+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
+26
+00
+e6
+4b
+09
+5a
+ff
+27
+ab
+40
+b3
+56
+9b
+e6
+a8
+12
+a9
+c0
+be
+e6
+a5
+af
+a0
+21
+a1
+02
+b8
+10
+b9
+0b
+a7
+ff
+b5
+d0
+b6
+00
+ff
+00
+09
+00
+ff
+ff
+aa
+55
+3c
+00
+53
+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
+46
+34
+60
+07
+69
+04
+7d
+20
+7e
+00
+09
+00
+aa
+55
+08
+00
+a3
+4a
+09
+5a
+0b
+f3
+09
+00
+ff
+ff
+aa
+55
+08
+00
+0e
+4c
+09
+a5
+0b
+f3
+09
+00
+ff
+ff
+aa
+55
+02
+00
+8d
+44
+2d
+49
+aa
+55
+01
+00
+8c
+44
+01
+aa
+55
+01
+00
+65
+48
+02
+aa
+55
+01
+00
+64
+48
+02
+aa
+55
+01
+00
+36
+48
+01
+aa
+55
+01
+00
+a8
+48
+06
+aa
+55
+02
+00
+38
+48
+c0
+12
+aa
+55
+03
+00
+54
+48
+19
+19
+1c
+aa
+55
+10
+00
+40
+48
+00
+13
+2c
+42
+06
+15
+36
+48
+0f
+1a
+3a
+4c
+11
+23
+31
+4d
+aa
+55
+01
+00
+5b
+48
+00
+aa
+55
+05
+00
+77
+48
+20
+15
+10
+05
+4e
+aa
+55
+05
+00
+8c
+48
+01
+0f
+0f
+0f
+0f
+aa
+55
+06
+00
+ad
+48
+0c
+f8
+00
+00
+77
+01
+aa
+55
+03
+00
+5c
+48
+00
+48
+60
+aa
+55
+01
+00
+7d
+48
+07
+aa
+55
+02
+00
+99
+48
+b5
+4a
+aa
+55
+01
+00
+ca
+48
+80
+aa
+55
+02
+00
+c2
+48
+14
+00
+aa
+55
+02
+00
+c0
+48
+50
+00
+aa
+55
+03
+00
+b8
+48
+00
+a6
+0e
+aa
+55
+03
+00
+b8
+49
+00
+50
+00
+aa
+55
+02
+00
+79
+44
+80
+1f
+aa
+55
+01
+00
+83
+44
+80
+aa
+55
+01
+00
+e8
+41
+01
+55
+aa
+aa
+55
+fa
+86
+64
+68
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+ff
+0e
+ec
Index: output/memmap.format
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/memmap.format	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/memmap.format	(working copy)
@@ -0,0 +1,2485 @@
+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_rssi_hex
+0x001a mem_rx_type
+0x001b mem_rx_hec_err
+0x001d mem_rx_crc_err
+0x001f mem_context_ptr
+0x0021 mem_display
+0x0029 mem_bcd
+0x0031 mem_state
+0x0032 mem_mode
+0x0033 mem_tsniff
+0x0035 mem_sniff_anchor
+0x0039 mem_clk_offset
+0x003f mem_rx_window
+0x0041 mem_plap
+0x0044 mem_puap
+0x0045 mem_pnap
+0x0047 mem_conn_handle
+0x0048 mem_arq
+0x0049 mem_lmp_to_send
+0x004a mem_lmi_opcode
+0x004b mem_lmo_reason
+0x004c mem_op
+0x004d mem_state_map
+0x004e mem_supervision_timer
+0x0052 mem_supervision_to
+0x0054 mem_name_offset
+0x0055 mem_key_size
+0x0056 mem_conn_sm
+0x0057 mem_aco
+0x0063 mem_kc
+0x0073 mem_conn_timer
+0x0074 mem_sniff_attempt
+0x0075 mem_sniff_timeout
+0x0076 mem_dsniff
+0x0078 mem_amaddr
+0x0079 mem_lmo_opcode1
+0x007a mem_lmi_opcode1
+0x007b mem_lmo_reason1
+0x007c mem_lmo_tid1
+0x007d mem_lmo_opcode2
+0x007e mem_lmi_opcode2
+0x007f mem_lmo_reason2
+0x0080 mem_lmo_tid2
+0x0081 mem_bt_context_reserve
+0x0089 mem_current_sniff_attempt
+0x008a mem_current_sniff_timeout
+0x008b mem_nfreq_index_inq
+0x008c mem_nfreq_index_page
+0x008d mem_ninqy_index
+0x008e mem_fhs_misc
+0x008f mem_subsniff_instant
+0x0093 mem_subsniff_rate
+0x0094 mem_subsniff_tcmax
+0x0096 mem_subsniff_tsniff
+0x0097 mem_lpm_adjust
+0x0098 mem_sync_clke
+0x009e mem_lpm_current_mult
+0x009f mem_gpio_wakeup_low
+0x00a3 mem_gpio_wakeup_high
+0x00a7 mem_npage_index
+0x00a8 mem_page_mode
+0x00a9 mem_page_clk
+0x00ad mem_temp_am_addr
+0x00ae mem_temp_arq
+0x00af mem_len
+0x00b1 mem_clkn_bt
+0x00b5 mem_clke_bt
+0x00b9 mem_dpll_clkn
+0x00bd mem_connection_options
+0x00be mem_nameres_cnt
+0x00bf mem_txptr
+0x00c1 mem_slot_offset
+0x00c3 extm_fhs_misc
+0x00c4 extm_newconn_am_addr
+0x00c5 extm_class
+0x00c8 extm_lap
+0x00cb extm_uap
+0x00cc extm_nap
+0x00cf mem_rxbuf
+0x00e4 mem_debug_config
+0x00e5 mem_lch_code
+0x00e6 mem_fhs_am_addr
+0x00e7 mem_select_list_item
+0x00e8 mem_temp_reconn_record
+0x00e8 mem_record_bt_mode
+0x00e9 mem_temp_lap
+0x00ef mem_list_item_ptr
+0x00f1 mem_eir
+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
+
+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_eeprom_base
+0x447b mem_unsniff2sniff_timer_count
+0x447c mem_wake_up_delay_timer
+0x447d mem_app_connection_options
+0x447e mem_app_disconn_reason
+0x4480 mem_app_disconn_reason_flag
+0x4482 mem_xrecord_mode
+0x4483 mem_eeprom_block_size
+0x4484 mem_spi_init_clk
+0x4485 mem_spi_init_delay_time
+0x4486 mem_spi_ncs_gpio
+0x4487 mem_nv_data_ptr
+0x4489 mem_nv_data_number
+0x448a mem_queue_ptr
+0x448c mem_ui_led_struct_num
+0x448d mem_ui_led_struct_ptr
+0x448f mem_adc_wait_count
+0x4490 mem_3v_adc_io_data
+0x4492 mem_3v_adc_hvin_data
+0x4494 mem_2v_adc_vinlpm_data
+0x4496 mem_1v_adc_io_data
+0x4498 mem_5v_adc_hvin_data
+0x449a mem_3v_adc_vinlpm_data
+0x449c mem_app_adc_read_count
+0x449d mem_start_adc_clkn
+0x449e mem_reference_voltage
+0x44a0 mem_adc_config_flag
+0x44a1 mem_adc_channel
+0x44a2 mem_adc_current_value
+0x44a4 mem_adc_power_flag//bit0:low power falg ; bit1:no power flag
+0x44a5 mem_spi_write_addr
+0x44a8 mem_spi_write_ptr
+0x44aa mem_spi_write_len
+0x44ac mem_spi_write_flash_sm
+0x44ad mem_spi2_write_addr
+0x44b0 mem_spi2_write_ptr
+0x44b2 mem_spi2_write_len
+0x44b4 mem_spi2_write_flash_sm
+0x44b5 mem_spi_cs_gpio
+0x44b6 mem_spi_si_gpio
+0x44b7 mem_spi_so_gpio
+0x44b8 mem_spi_sclk_gpio
+0x44b9 mem_spi_wp_gpio
+0x44ba mem_spi_hold_gpio
+0x44bb mem_spi2_cs_gpio
+0x44bc mem_spi2_si_gpio
+0x44bd mem_spi2_so_gpio
+0x44be mem_spi2_sclk_gpio
+0x44bf mem_spi2_wp_gpio
+0x44c0 mem_spi2_hold_gpio
+0x44c1 mem_eeprom_wp_gpio
+0x44c2 mem_eeprom_scl_gpio
+0x44c3 mem_eeprom_sda_gpio
+0x44c4 mem_kscan_ptr
+0x44c6 mem_key_num_ptr
+0x44c6 mem_keyscan_ptr
+0x44c8 mem_key_value_retention
+0x44ca mem_power_param_ptr
+0x44cc mem_efuse_header
+0x44cf mem_seqi
+0x44d0 mem_dig_aon_vsel
+0x44d1 mem_syn_afc_cfg1
+0x44d2 mem_rf_ldo_cfg1
+0x44d3 mem_rc_cal
+0x44d4 mem_rf_debug_rx_gpio
+0x44d5 mem_rf_debug_tx_gpio
+0x44d6 mem_l2cap_xmem_start
+0x44d6 mem_l2cap_tx_multi_offset//0 means single packet
+0x44d8 mem_sdp_remote_cid
+0x44da mem_rfcomm_remote_cid
+0x44dc mem_hid_ctrl_remote_cid
+0x44de mem_hid_int_remote_cid
+0x44e0 mem_sdp_state
+0x44e1 mem_rfcomm_state
+0x44e2 mem_hid_control_state
+0x44e3 mem_hid_interrupt_state
+0x44e4 mem_spp_state
+0x44e5 mem_ML2CAP_comm_id
+0x44e6 mem_used_map
+0x44e7 mem_tx_fifo0
+0x44e7 mem_tx_fifo0_map
+0x44e8 mem_tx_fifo0_ptr
+0x44ea mem_tx_fifo1
+0x44ea mem_tx_fifo1_map
+0x44eb mem_tx_fifo1_ptr
+0x44ed mem_tx_fifo2
+0x44ed mem_tx_fifo2_map
+0x44ee mem_tx_fifo2_ptr
+0x44f0 mem_tx_fifo3
+0x44f0 mem_tx_fifo3_map
+0x44f1 mem_tx_fifo3_ptr
+0x44f3 mem_tx_fifo_end
+0x44f3 mem_l2cap_lpm_txbuf
+0x45f3 mem_l2cap_flow_ctrl_flag
+0x45f4 mem_l2cap_pending_item
+0x45f5 mem_l2cap_rcv_hidtype
+0x45f6 mem_l2cap_xmem_end
+0x45f6 mem_lmo_header_opcode_x
+0x45f7 mem_lmp_version
+0x45f8 mem_lmp_compid
+0x45fa mem_lmp_subversion
+0x45fc mem_local_name_length
+0x45fd mem_local_name
+0x4600 mem_local_name2
+0x4640 mem_local_name_end
+0x4641 mem_unsniff2sniff_timer
+0x4642 mem_switch_flag
+0x4643 mem_classic_bt_flag
+0x4644 mem_encapsulated_major_type
+0x4645 mem_encapsulated_minor_type
+0x4646 mem_encapsulated_len
+0x4647 mem_remote_br_sc_support
+0x4648 mem_pn_dlci
+0x4649 mem_pn_max_frame_size
+0x464b memFCStemp1
+0x464c memFCStemp2
+0x464d memFCStemp3
+0x464e mem_rfcomm_initiator
+0x464f mem_remote_spp_channel
+0x4650 mem_HIUfcs_SPP
+0x4651 mem_HIUfcs_SPP_WCredits
+0x4652 mem_rfcomm_send_more_pkt
+0x4653 mem_remote_credits
+0x4654 mem_credit_given
+0x4655 mem_ms_channel
+0x4656 mem_rfcomm_credit_flag
+0x4657 mem_rfcomm_max_frame_size
+0x4659 mem_rfcomm_credit_init_data
+0x465a mem_cb_receive_spp_data
+0x465c mem_nl_rx_data_src
+0x465e mem_nl_rx_len_all
+0x4660 mem_ui_uuid_table
+0x4662 mem_all_uuid_16bits
+0x4678 mem_all_uuid_128bits
+0x469a mem_sdp_l2capch_ptr
+0x469c mem_ccm_pcnt_tx
+0x46a1 mem_ccm_pcnt_rx
+0x46a6 mem_ccm_last_mic
+0x46aa mem_ccm_iv
+0x46aa mem_ccm_ivm
+0x46ae mem_ccm_ivs
+0x46b2 mem_ccm_len
+0x46b4 mem_ccm_rx_ptr
+0x46b6 mem_sc_only_mode
+0x46b7 mem_sp_debug_mode
+0x46b8 mem_secure_connections_enable
+0x46b9 mem_sp_local_key_invalid
+0x46ba mem_sc_calc
+0x46bb mem_sc_local_key_invalid
+0x46bc mem_sc_private_key_256
+0x46dc mem_sc_pubkey_local_x_256
+0x46fc mem_sc_pubkey_local_y_256
+0x471c mem_sp_private_key
+0x4734 mem_sp_pubkey_local
+0x4734 mem_sp_pubkey_local_x
+0x474c mem_sp_pubkey_local_x_end
+0x474c mem_sp_pubkey_local_y
+0x4764 mem_ssp_enable
+0x4765 mem_lmp_io_cap_payload_iocap
+0x4766 mem_lmp_io_cap_payload_oob_auth_data
+0x4767 mem_lmp_io_cap_payload_auth_req
+0x4768 mem_sp_state_xmem
+0x4768 mem_sp_iocap_remote
+0x476b mem_flag_mode_ssp_pin
+0x476c mem_ssp_mode_flag
+0x476d mem_authentication_passkey_times
+0x476e mem_passkey_1bit
+0x476f mem_flag_pairing_state
+0x4770 mem_sp_state_xmem_end
+0x4770 mem_ipc_lock_bt
+0x4771 mem_ipc_lock_c51
+0x4772 mem_ipc_fifo_bt2c51
+0x477a mem_ipc_fifo_c512bt
+0x4782 mem_ui_button_timer
+0x4783 mem_ui_button_last_state
+0x4784 mem_ui_timer_last_btclk
+0x4788 mem_discovery_timeout_timer_count
+0x478a mem_hid_handshake_timer_count
+0x478b memui_reconnect_mode
+0x478c mem_ui_state_map
+0x478e mem_ui_profile_supported
+0x478f mem_ui_button_timeout
+0x4790 mem_ui_button_gpio
+0x4791 mem_discovery_timeout
+0x4793 mem_pin_length
+0x4794 mem_pin
+0x47a4 mem_dummy
+0x47a7 mem_seq
+0x47a8 mem_context_cnt
+0x47a9 mem_context_map
+0x47aa mem_context_new
+0x4aaa mem_att_cmd_len
+0x4aab mem_att_cmd
+0x4aba mem_att_resp_handle
+0x4abb mem_att_resp_len
+0x4abc mem_att_resp
+0x4ada mem_meter_att_list
+0x47a4 mem_mesh_vendor_mesh_receive_tid
+0x47a5 mem_mesh_vendor_mesh_send_tid
+0x47a6 mem_mesh_vendor_timer_current_time
+0x47aa mem_system_time
+0x47ae mem_mesh_adv_data_len
+0x47af mem_mesh_adv_data
+0x47ce mem_mesh_adv_scan_channel
+0x47cf mem_mesh_advertising_unprovisioned_device_beacon_switch
+0x47d0 mem_mesh_advertising_unprovisioned_device_beacon_timer
+0x47d2 mem_mesh_advertising_unprovisioned_device_beacon_duration
+0x47d3 mem_mesh_advertising_unprovisioned_device_beacon_interval
+0x47d4 mem_mesh_calc_ConfirmationCloud_data
+0x47d4 mem_mesh_ConfirmationCloud_RandomB
+0x47dc mem_mesh_ConfirmationCloud_RandomA
+0x47e4 mem_mesh_AuthValueProv
+0x47f4 mem_mesh_ConfirmationCloud
+0x4804 mem_mesh_ConfirmationDevice
+0x4804 mem_mesh_calc_ConfirmationDevice_data
+0x4804 mem_mesh_provisioning_random_A
+0x480c mem_mesh_provisioning_random_B
+0x4814 mem_mesh_AuthValueDevice
+0x4824 mem_mesh_Device_Key
+0x4834 mem_mesh_Confirmationkey
+0x4844 mem_mesh_sha256_ConfirmationKey_ascii
+0x4853 mem_mesh_sha256_SessionKey_ascii
+0x485d mem_mesh_sha256_DeviceKey_ascii
+0x4866 mem_mesh_sha256_load_first_data_flag
+0x4867 mem_mesh_sha256_data_len_byte
+0x486f mem_mesh_sha256_data_len_bit
+0x4877 mem_mesh_sha256_data_end_addr
+0x4879 mem_mesh_sha256_data_len_addr
+0x487b mem_mesh_sha256_chunk_count
+0x487c mem_mesh_sha256_chunk_data_ptr
+0x487e mem_mesh_sha256_chunk_ptr
+0x4880 mem_k2_P_len
+0x4881 mem_k2_P
+0x4891 mem_k2_N
+0x48a1 mem_k2_SALT
+0x48b1 mem_k2_T
+0x48c1 mem_k2_T0
+0x48c1 mem_k2_T1
+0x48d1 mem_k2_NID
+0x48d2 mem_k2_T3
+0x48e2 mem_k2_T2
+0x48f2 mem_k4_SALT
+0x4902 mem_k4_T
+0x4912 mem_k4_id6_01
+0x4922 mem_k4_k4N
+0x4932 mem_mesh_transport_AID
+0x4933 mem_mesh_provisioned_flag
+0x4934 mem_mesh_Provisioning_State_Flag
+0x4935 mem_mesh_Device_PID
+0x4936 mem_mesh_UUID_FeatureFlag
+0x4937 mem_mesh_PDU_RFU
+0x4939 mem_mesh_OOB_information
+0x493b mem_mesh_Encrypt_Provisioning_Data
+0x493b mem_mesh_provisioning_data_Mac_addr
+0x493d mem_mesh_KeyFresh_and_Update_flag
+0x493e mem_mesh_Network_Key
+0x494e mem_mesh_last_IV_Index_byte
+0x494f mem_mesh_Unicast_Address
+0x4951 mem_mesh_adv_last_time
+0x4955 mem_mesh_send_packet_timeout
+0x4957 mem_mesh_gatt_package_send_msg_id
+0x4958 mem_mesh_gatt_receive_msg_timer
+0x4959 mem_mesh_gatt_packet_receive_msg_buffer1
+0x497a mem_mesh_gatt_packet_receive_msg_buffer2
+0x499b mem_mesh_three_tuple_ProductID
+0x499f mem_mesh_three_tuple_MAC
+0x49a5 mem_mesh_three_tuple_secret
+0x49b5 mem_mesh_cb_receive_advertising
+0x49b7 mem_mesh_cb_receive_access_message
+0x49b9 mem_mesh_cb_receive_config_appkey_add
+0x49bb mem_mesh_cb_pairing_fail
+0x49bd mem_mesh_cb_generic_onoff_get
+0x49bf mem_mesh_cb_generic_onoff_set
+0x49c1 mem_mesh_cb_scene_recall
+0x49c3 mem_mesh_cb_light_lightness_set
+0x49c5 mem_mesh_cb_light_lightness_get
+0x49c7 mem_mesh_cb_light_ctl_set
+0x49c9 mem_mesh_cb_main_light_onoff_set
+0x49cb mem_mesh_cb_background_onoff_set
+0x49cd mem_mesh_cb_color_set
+0x49cf mem_mesh_cb_network_relay
+0x49d1 mem_mesh_cb_receive_node_reset
+0x49d3 mem_mesh_cb_seq_changed
+0x49d5 mem_mesh_cb_subscriptuion_list_changed
+0x49d7 mem_mesh_cb_vendor_timing_changed
+0x49d9 mem_mesh_core_feature
+0x49db mem_mesh_element_number
+0x49dc mem_mesh_element_device_ptr
+0x49de mem_mesh_element_device_length
+0x49e0 mem_mesh_segmented_access_message_SZMIC
+0x49e1 mem_mesh_segmented_access_message_SeqZero
+0x49e3 mem_mesh_segmented_access_message_SegO
+0x49e4 mem_mesh_segmented_access_message_SegN
+0x49e5 mem_mesh_segmented_access_message_BlockAck
+0x49e9 mem_mesh_segmented_access_message_receive_finish
+0x49ea mem_mesh_segmented_access_message_current_length
+0x49eb mem_mesh_segmented_access_message_Segment
+0x4a0f mem_mesh_last_CTL_Temperature
+0x4a11 mem_mesh_receive_group_address
+0x4a12 mem_mesh_receive_element_number
+0x4a13 mem_mesh_IV_Index
+0x4a17 mem_mesh_TMALL_cache_start
+0x4a17 mem_mesh_TMALL_SRC1
+0x4a19 mem_mesh_TMALL_SEQ1
+0x4a1c mem_mesh_TMALL_cache
+0x4a49 mem_mesh_TMALL_cache_end
+0x4a49 mem_mesh_transport_message_mic_cache
+0x4a49 mem_mesh_transport_message_mic_cache_buff1
+0x4a4d mem_mesh_transport_message_mic_cache_buff2_10
+0x4a71 mem_mesh_network_relay_queue
+0x4a71 mem_mesh_network_relay_queue_each_size
+0x4a72 mem_mesh_network_relay_queue_length
+0x4a73 mem_mesh_network_relay_queue_current_num
+0x4a74 mem_mesh_network_relay_queue_read_ptr
+0x4a75 mem_mesh_network_relay_queue_write_ptr
+0x4a76 mem_mesh_network_relay_queue_ele
+0x4afe mem_mesh_application_key
+0x4b0e mem_mesh_ASZMIC
+0x4b0f mem_mesh_access_message_mic_cache
+0x4b0f mem_mesh_access_message_mic_cache_buff1
+0x4b13 mem_mesh_access_message_mic_cache_buff2_10
+0x4b37 mem_mesh_send_message_SEQ
+0x4b3a mem_mesh_send_message_SRC
+0x4b3c mem_mesh_send_message_TTL
+0x4b3d mem_mesh_send_upper_layer_IVI_and_NID
+0x4b3e mem_mesh_send_upper_layer_CTL_and_TTL
+0x4b3f mem_mesh_send_upper_layer_SEQ
+0x4b42 mem_mesh_send_upper_layer_SRC
+0x4b44 mem_mesh_send_upper_layer_DST
+0x4b46 mem_mesh_send_access_lower_transport_layer
+0x4b56 mem_mesh_send_network_layer_NetMIC
+0x4b5a mem_mesh_element_device
+0x4b5a mem_mesh_element_device_group_addr
+0x4b5c mem_mesh_element_device_queue_buffer_ptr
+0x4b5e mem_mesh_element_device_timing_ptr
+0x4b60 mem_mesh_element_device_element_subscription_label
+0x4b70 mem_mesh_element_upper_adv_flag
+0x4b71 mem_mesh_element_upper_queue_buffer_ptr
+0x4b73 mem_mesh_element_tran_package_tid
+0x4b74 mem_mesh_element_tran_package_type
+0x4b75 mem_mesh_element_device1
+0x4b90 mem_mesh_element_device2
+0x4bab mem_mesh_element_device_queue_each_size
+0x4bac mem_mesh_element_device_queue_length
+0x4bad mem_mesh_element_device_queue_current_num
+0x4bae mem_mesh_element_device_queue_read_ptr
+0x4baf mem_mesh_element_device_queue_write_ptr
+0x4bb0 mem_mesh_element_device_queue_ele
+0x4c38 mem_mesh_element_device_upper_queue_each_size
+0x4c39 mem_mesh_element_device_upper_queue_length
+0x4c3a mem_mesh_element_device_upper_queue_current_num
+0x4c3b mem_mesh_element_device_upper_queue_read_ptr
+0x4c3c mem_mesh_element_device_upper_queue_write_ptr
+0x4c3d mem_mesh_element_device_upper_queue_ele
+0x47a4 mem_antl_lpm_interval
+0x47a6 mem_antl_adv_interval
+0x47a8 mem_antl_slow_adv_lpm_interval
+0x47aa mem_antl_slow_adv_adv_interval
+0x47ac mem_antl_led_style
+0x47ac mem_antl_led_type
+0x47ad mem_antl_led_blink_count
+0x47ae mem_antl_led_gpio
+0x47af mem_antl_led_on_time
+0x47b1 mem_antl_led_off_time
+0x47b3 mem_antl_led_cb_on
+0x47b5 mem_antl_led_cb_off
+0x47b7 mem_antl_buzzer_style
+0x47b7 mem_antl_buzzer_type
+0x47b8 mem_antl_buzzer_blink_count
+0x47b9 mem_antl_buzzer_gpio
+0x47ba mem_antl_buzzer_on_time
+0x47bc mem_antl_buzzer_off_time
+0x47be mem_antl_buzzer_cb_on
+0x47c0 mem_antl_buzzer_cb_off
+0x47c2 mem_antl_fast_adv_led_style
+0x47c2 mem_antl_fast_adv_led_type
+0x47c3 mem_antl_fast_adv_led_blink_count
+0x47c4 mem_antl_fast_adv_led_gpio
+0x47c5 mem_antl_fast_adv_led_on_time
+0x47c7 mem_antl_fast_adv_led_off_time
+0x47c9 mem_antl_slow_adv_led_style
+0x47c9 mem_antl_slow_adv_led_type
+0x47ca mem_antl_slow_adv_led_blink_count
+0x47cb mem_antl_slow_adv_led_gpio
+0x47cc mem_antl_slow_adv_led_on_time
+0x47ce mem_antl_slow_adv_led_off_time
+0x47d0 mem_antl_power_starting_led_style
+0x47d0 mem_antl_power_starting_led_type
+0x47d1 mem_antl_power_starting_led_blink_count
+0x47d2 mem_antl_power_starting_led_gpio
+0x47d3 mem_antl_power_starting_led_on_time
+0x47d5 mem_antl_power_starting_led_off_time
+0x47d7 mem_antl_power_starting_buzzer_style
+0x47de mem_antl_power_off_led_style
+0x47de mem_antl_power_off_led_type
+0x47df mem_antl_power_off_led_link_count
+0x47e0 mem_antl_power_off_led_gpio
+0x47e1 mem_antl_power_off_led_on_time
+0x47e3 mem_antl_power_off_led_off_time
+0x47e5 mem_antl_power_off_buzzer_style
+0x47e5 mem_antl_power_off_buzzer_type
+0x47e6 mem_antl_power_off_buzzer_link_count
+0x47e7 mem_antl_power_off_buzzer_gpio
+0x47e8 mem_antl_power_off_buzzer_on_time
+0x47ea mem_antl_power_off_buzzer_off_time
+0x47ec mem_antl_alert_led_stlye
+0x47f3 mem_antl_alert_buzzer_stlye
+0x47f3 mem_antl_alert_buzzer_type
+0x47f4 mem_antl_alert_buzzer_blink_count
+0x47f5 mem_antl_alert_buzzer_gpio
+0x47f6 mem_antl_alert_buzzer_on_time
+0x47f8 mem_antl_alert_buzzer_off_time
+0x47fa mem_antl_key_led_style
+0x47fa mem_antl_key_led_type
+0x47fb mem_antl_key_led_blink_count
+0x47fc mem_antl_key_led_gpio
+0x47fd mem_antl_key_led_on_time
+0x47ff mem_antl_key_led_off_time
+0x4801 mem_antl_key_buzzer_style
+0x4808 mem_antl_queue_width
+0x4809 mem_antl_queue_depth
+0x480a mem_antl_queue_curr_num
+0x480b mem_antl_queue_read_ptr
+0x480c mem_antl_queue_write_ptr
+0x480d mem_antl_queue_buff
+0x485d mem_antl_key_scan_enable
+0x485e mem_antl_led_num
+0x485f mem_antl_led_gpio_map
+0x4863 mem_antl_power_param
+0x4863 mem_antl_power_state
+0x4864 mem_antl_power_timer
+0x4865 mem_antl_power_off_timeout
+0x4866 mem_antl_power_starting_timeout
+0x4867 mem_antl_power_off_cb
+0x4869 mem_antl_power_starting_cb
+0x486b mem_antl_power_standby_cb
+0x486d mem_event_button_up_cb
+0x486f mem_antl_key_num
+0x4870 mem_cb_antl_key
+0x4872 mem_antl_key_conf0
+0x4876 mem_antl_key0_press
+0x4885 mem_antl_key0_release
+0x4894 mem_antl_conn_updata_procedure_state
+0x4895 mem_client_characteristic_configuration_descriptor
+0x4897 mem_adc_timer
+0x4899 mem_antl_conn_update_timer
+0x489a mem_antl_send_updata_le_param_timer
+0x489b mem_antl_le_sleep_timer
+0x489d mem_antl_fast_adv_timer
+0x489f mem_antl_fast_adv_timeout
+0x48a1 mem_antl_le_sleep_timeout
+0x48a3 mem_double_click_timer
+0x48a4 mem_butten_click_cnt
+0x48a5 mem_antl_led_state
+0x48a6 mem_antl_buzzer_state
+0x48a7 mem_antl_key_state
+0x48a8 mem_antl_lost_mode
+0x48a9 mem_alarm_config
+0x48aa mem_alarm_config_notfy_cnt
+0x48ab mem_buzzer_pwm_conf
+0x48b1 mem_adc_timeout
+0x48b3 mem_voltage_remain_percent
+0x48b4 mem_battery_calculate_set
+0x48b4 mem_battery_full_voltage
+0x48b6 mem_battery_empty_voltage
+0x48b8 mem_battery_low_voltage
+0x48ba mem_battery_current_voltage
+0x48bc mem_rx_window_sniff_inc
+0x48be mem_interval_increment
+0x48c0 mem_antl_le_interval_min
+0x48c2 mem_antl_le_interval_max
+0x48c4 mem_antl_le_latency
+0x48c6 mem_antl_le_timeout
+0x48c8 mem_antl_le_unnormal_interval_min
+0x48ca mem_antl_le_unnormal_interval_max
+0x48cc mem_antl_le_unnormal_latency
+0x48ce mem_antl_le_unnormal_timeout
+0x48d0 mem_AntiLost_le_att_list
+0x4a60 mem_lestate_update_param_flag
+0x4a61 mem_antilost_conn_battery_send_timer
+0x47a4 mem_24g_rxbuf
+0x47c6 mem_24g_txbuf
+0x47e6 mem_24g_txpayload
+0x480a mem_24g_rxpayload
+0x482a mem_24g_rxdata_length
+0x482b mem_24g_pid
+0x482c mem_24g_no_ack
+0x482d mem_24g_sta_crc
+0x4830 mem_24g_last_crc
+0x4833 mem_24g_sta_pid
+0x4834 mem_24g_last_pid
+0x4835 mem_24g_datalen
+0x4836 mem_24g_data_type
+0x4837 mem_24g_txlen
+0x4838 mem_24g_rx_window
+0x483a mem_24g_ch
+0x483b mem_24g_current_ch_number
+0x483c mem_24g_addr
+0x4840 mem_24g_ch_map1
+0x4844 mem_24g_ch_map2
+0x4848 mem_24g_ch_map3
+0x484c mem_24g_ch_map4
+0x4850 mem_24g_tx_btclk
+0x4854 mem_24g_interval
+0x4855 mem_24g_interval_min
+0x4856 mem_24g_interval_max
+0x4857 mem_24g_syncword
+0x4859 mem_24g_syncword_crc8
+0x485a mem_24g_get_syncword_crc8
+0x485b mem_24g_pair_switch
+0x485c mem_24g_enter_hibernate
+0x4864 mem_24g_rx_phy
+0x4865 mem_24g_tx_phy
+0x4866 mem_24g_ch_map_update
+0x4867 mem_24g_ch_update_map1
+0x486b mem_24g_ch_update_map2
+0x486f mem_24g_ch_update_map3
+0x4873 mem_24g_ch_update_map4
+0x4877 mem_24g_pair_addr
+0x487b mem_24g_pair_ch
+0x487c mem_24g_pair_tx_power
+0x487d mem_rssi_buff_index
+0x487e mem_24g_device1_bind_step
+0x487f mem_24g_device2_bind_step
+0x4880 mem_24g_bind_device_status
+0x4881 mem_24g_bind_payload
+0x4889 mem_cb_24g_receive_process
+0x488b mem_cb_24g_ackpayload
+0x488d mem_cb_24g_data_device1
+0x488f mem_cb_24g_data_device2
+0x4891 mem_24g_rxdata_temp
+0x48b3 mem_24g_abort_packet
+0x48b4 mem_24g_hop_btclk
+0x48b8 mem_24g_hop_interval
+0x48b9 mem_24g_pair_mode
+0x48ba mem_24g_ackpayload_enable
+0x48bb mem_24g_hop_packet
+0x48bc mem_24g_mode_switch
+0x48bd mem_24g_nodata_timer_enable
+0x48be mem_24g_mode_init
+0x48bf mem_24g_work_mode
+0x48c0 mem_24g_time_slice
+0x48c1 mem_24g_self_last_ch
+0x48c2 mem_24g_self_ch_number
+0x48c3 mem_24g_self_config_ch_once
+0x48c4 mem_24g_device1_last_ch
+0x48c5 mem_24g_device1_ch_number
+0x48c6 mem_24g_device1_config_ch_once
+0x48c7 mem_24g_device2_last_ch
+0x48c8 mem_24g_device2_ch_number
+0x48c9 mem_24g_device2_config_ch_once
+0x48ca mem_24g_led_status
+0x48cb mem_24g_bind_mode_continue
+0x48cc mem_tx_power_temp
+0x48cd mem_24g_transmitter_addr
+0x48d1 mem_24g_device1_addr
+0x48d5 mem_24g_device2_addr
+0x48d9 mem_rssi_noise_avg
+0x48da mem_rssi_noise_index
+0x48db mem_rssi_noise_self_avg
+0x48dc mem_rssi_noise_device1_avg
+0x48dd mem_rssi_noise_device2_avg
+0x48de mem_rssi_noise_self_index
+0x48df mem_rssi_noise_device1_index
+0x48e0 mem_rssi_noise_device2_index
+0x48e1 mem_rssi_noise_buffer_ptr
+0x48e3 mem_rssi_noise_self_buffer_ptr
+0x48e5 mem_rssi_noise_device1_buffer_ptr
+0x48e7 mem_rssi_noise_device2_buffer_ptr
+0x48e9 mem_car_hard_soft_switch
+0x48ea mem_car_queue_each_size
+0x48eb mem_car__queue_length
+0x48ec mem_car_queue_curr_num
+0x48ed mem_car_queue_read_ptr
+0x48ee mem_car_queue_write_ptr
+0x48ef mem_car_queue_ele
+0x4967 mem_car_pop_queue_buff
+0x497b mem_car_led_num
+0x497c mem_car_led_map
+0x4986 mem_car_style1_led_type
+0x4987 mem_car_style1_blink_count
+0x4988 mem_car_style1_struct_led_gpio
+0x4989 mem_car_style1_on_time
+0x498b mem_car_style1_off_time
+0x498d mem_car_style1_cb_ledon
+0x498f mem_car_style1_cb_ledoff
+0x4991 mem_car_style2_led_type
+0x4992 mem_car_style2_blink_count
+0x4993 mem_car_style2_struct_led_gpio
+0x4994 mem_car_style2_on_time
+0x4996 mem_car_style2_off_time
+0x4998 mem_car_style2_cb_ledon
+0x499a mem_car_style2_cb_ledoff
+0x499c mem_le_receive_data
+0x499c mem_le_receive_packet_head
+0x499e mem_le_receive_cmd
+0x499f mem_le_receive_length
+0x49a1 mem_le_receive_payload
+0x49ab mem_le_receive_checksum
+0x49ac mem_motor1_status
+0x49ad mem_motor1_speed
+0x49ae mem_motor2_status
+0x49af mem_motor2_speed
+0x49b0 mem_motor3_status
+0x49b1 mem_motor3_speed
+0x49b2 mem_motor1_pwm_set
+0x49b2 mem_motor1_pwm_pin1_set
+0x49b3 mem_motor1_pwm_pin2_set
+0x49b4 mem_motor1_pwm_pin_set
+0x49b5 mem_motor1_pwm_channel_set
+0x49b6 mem_motor1_pwm_freq_set
+0x49b9 mem_motor1_pwm_dute_set
+0x49ba mem_motor2_pwm_set
+0x49ba mem_motor2_pwm_pin1_set
+0x49bb mem_motor2_pwm_pin2_set
+0x49bc mem_motor2_pwm_pin_set
+0x49bd mem_motor2_pwm_channel_set
+0x49be mem_motor2_pwm_freq_set
+0x49c1 mem_motor2_pwm_dute_set
+0x49c2 mem_motor3_pwm_set
+0x49c2 mem_motor3_pwm_pin1_set
+0x49c3 mem_motor3_pwm_pin2_set
+0x49c4 mem_motor3_pwm_pin_set
+0x49c5 mem_motor3_pwm_channel_set
+0x49c6 mem_motor3_pwm_freq_set
+0x49c9 mem_motor3_pwm_dute_set
+0x49ca mem_motor_select_p_n
+0x49cb mem_car_motor_status
+0x49cc mem_car_motor_speed
+0x49cd mem_motor_pwm_set
+0x49cd mem_motor_pwm_pin1_set
+0x49ce mem_motor_pwm_pin2_set
+0x49cf mem_motor_pwm_pin_set
+0x49d0 mem_motor_pwm_channel_set
+0x49d1 mem_motor_pwm_freq_set
+0x49d4 mem_motor_pwm_dute_set
+0x49d5 mem_ir_rx_gpio
+0x49d6 mem_ir_data
+0x49d8 mem_ir_rx_buf
+0x49da mem_ir_receive_clkn
+0x49de mem_ir_notify_data
+0x49e1 mem_ir_notify_data_head
+0x49e6 mem_ir_notify_data_payload
+0x49e8 mem_ir_notify_data_check_sum
+0x49e9 mem_car_ir_breakdown_check_timer
+0x49ea mem_car_ir_breakdown_flag
+0x49eb mem_car_led_control
+0x49eb mem_car_led1_status
+0x49ec mem_car_led2_status
+0x49ed mem_car_led3_status
+0x49ee mem_car_led4_status
+0x49ef mem_car_led5_status
+0x49f0 mem_car_led6_status
+0x49f1 mem_car_led7_status
+0x49f2 mem_car_led8_status
+0x49f3 mem_car_led_control_timer
+0x49f4 mem_car_led_blink_status
+0x49f5 mem_car_led_no
+0x49f6 mem_car_info_request
+0x49f9 mem_car_info_request_head
+0x49fe mem_car_info_request_payload
+0x4a06 mem_car_info_request_checksum
+0x4a07 mem_car_config_param
+0x4a07 mem_car_config_setting_flag
+0x4a08 mem_car_config_device_select
+0x4a09 mem_car_config_motor_layout
+0x4a0a mem_car_config_ir_enable
+0x4a0b mem_car_config_ir_rx_gpio
+0x4a0c mem_car_config_pairing_led_conn_status
+0x4a0d mem_car_config_pairing_led_gpio
+0x4a0e mem_car_config_led_num
+0x4a0f mem_car_config_blood_led_gpio
+0x4a0f mem_car_config_blood_led1_gpio
+0x4a10 mem_car_config_blood_led2_gpio
+0x4a11 mem_car_config_blood_led3_gpio
+0x4a12 mem_car_config_blood_led4_gpio
+0x4a13 mem_car_config_blood_led5_gpio
+0x4a14 mem_car_config_blood_led6_gpio
+0x4a15 mem_car_config_blood_led7_gpio
+0x4a16 mem_car_config_blood_led8_gpio
+0x4a17 mem_car_config_bat_notify_enable
+0x4a18 mem_car_config_low_voltage_led_gpio
+0x4a19 mem_car_config_low_voltage_percent
+0x4a1a mem_car_config_soft_switch_enable
+0x4a1b mem_car_config_soft_switch_gpio
+0x4a1c mem_car_notify_vdd_count
+0x4a1d mem_car_notify_vdd_timer
+0x4a1e mem_car_notify_vdd_value_last
+0x4a1f mem_car_notify_vdd_percent
+0x4a20 mem_car_working_flag
+0x4a21 mem_low_bat_flag
+0x4a22 mem_notify_bat_packet
+0x4a25 mem_notify_bat_head
+0x4a2a mem_notify_bat_payload
+0x4a2b mem_notify_bat_check_sum
+0x4a2c mem_vdd_notify_flag
+0x4a2d mem_car_current_vdd_value_temp
+0x4a2f mem_car_last_vdd_value
+0x4a31 mem_vdd_calculate_set
+0x4a31 mem_vdd_full_vol
+0x4a33 mem_vdd_empty_vol
+0x4a35 mem_vdd_low_vol
+0x4a37 mem_vdd_now_vol
+0x4a39 mem_car_24g_status
+0x4a3a mem_car_24g_no_data_timeout_count
+0x4a3c mem_car_24g_no_data_timeout_timer
+0x4a3e mem_car_24g_ir_receive_attack_count
+0x4a3f mem_car_24g_go_die_flag
+0x4a40 mem_car_attack_shake_timer
+0x4a41 mem_car_attack_shake_flag
+0x4a42 mem_car_soft_power
+0x4a42 mem_car_power_state
+0x4a43 mem_car_power_timer
+0x4a44 mem_car_power_off_timeout
+0x4a45 mem_car_power_starting_timeout
+0x4a46 mem_car_power_off_cb
+0x4a48 mem_car_power_starting_cb
+0x4a4a mem_car_power_standby_cb
+0x4a4c mem_car_ui_button_up_cb
+0x4a4e mem_car_le_att_list
+0x4c42 mem_car_moto1_blank_timer
+0x4c43 mem_car_moto2_blank_timer
+0x4c44 mem_car_moto3_blank_timer
+0x4c45 mem_car_motor_gpio_num
+0x4c46 mem_car_motor_gpio_map
+0x4c46 mem_car_motor_left_gpio
+0x4c47 mem_car_motor_right_gpio
+0x4c48 mem_car_motor_front_gpio
+0x4c49 mem_car_motor_back_gpio
+0x4c4a mem_car_gpio
+0x4c4b mem_car_app_send_speed
+0x4c4c mem_rssi_sum
+0x4c4e mem_check_rssi_high_count
+0x4c50 mem_rssi_data
+0x4c58 mem_car_24g_received_pac
+0x4c59 mem_car_24g_bind_enable_delay_count
+0x4c5a mem_car_keyscan
+0x4c5a mem_car_key_num
+0x4c5b mem_cb_car_keyscan
+0x4c5d mem_car_enter_lpm_timer_count
+0x4c5f mem_car_enter_lpm_timer
+0x4c61 mem_car_enter_lpm_flag
+0x4c62 mem_car_24g_ch_polling
+0x4c63 mem_car_rssi_noise_buffer
+0x4c6b mem_car_rssi_noise_car_buffer
+0x4c73 mem_car_rssi_noise_remote_buffer
+0x48e9 mem_dg_kb_bind_flag
+0x48ea mem_dg_kb_data_sta_data
+0x48f2 mem_dg_kb_data_last_data
+0x48fa mem_dg_kb_multikey_sta_data
+0x48fd mem_dg_kb_multikey_last_data
+0x4900 mem_dg_kb_system_sta_data
+0x4903 mem_dg_kb_system_last_data
+0x4906 mem_dg_kb_blank_data_enable
+0x4907 mem_dg_kb_mul_blank_data_enable
+0x4908 mem_dg_ms_blank_data_enable
+0x4909 mem_dg_sys_config
+0x490a mem_dg_usb_vid_pid
+0x4913 mem_dg_usb_tx_interval
+0x4914 mem_dg_usb_device_name
+0x487e mem_rssi_hex_received
+0x487f mem_24g_pair_sm
+0x4880 mem_24g_pair_no_ack
+0x4881 mem_24g_pair_timeout_init
+0x4883 mem_24g_pair_timeout
+0x4885 mem_24g_reconn_timeout_init
+0x4887 mem_24g_reconn_timeout
+0x4889 mem_24g_reconn_count
+0x488b mem_24g_reconn_type
+0x488c mem_24g_fast_conn_enable
+0x488d mem_24g_fast_conn_addr
+0x4891 mem_24g_receiver_addr
+0x4895 mem_24g_fast_conn_temp_ch
+0x4896 mem_24g_receiver_temp_ch
+0x4897 mem_24g_device_temp_ch
+0x4898 mem_rssi_signal_index
+0x4899 mem_rssi_signal_buf_ptr
+0x489b mem_cb_24g_transmit_data
+0x489d mem_cb_24g_search_receiver
+0x489f mem_cb_24g_lpm_before
+0x48a1 mem_24g_conn_sm
+0x48a2 mem_24g_ensure
+0x48a3 mem_24g_txfail_cnt
+0x48a5 mem_24g_attempt_fail_flag
+0x48a6 mem_24g_retry
+0x48a7 mem_24g_abort_pac
+0x48a8 mem_24g_max_retry
+0x48a9 mem_24g_device_addr
+0x48ad mem_24g_short_sleep_set
+0x48b0 mem_24g_long_sleep_set
+0x48b8 mem_24g_long_sleep_set1
+0x48bc mem_24g_pac_index
+0x48bd mem_24g_transmit_by_interrupt
+0x48be mem_24g_transmit_by_interrupt_exit_count
+0x48c0 mem_24g_transmit_by_interrupt_exit_count_init
+0x48c2 mem_24g_long_sleep_param_update_timer_init
+0x48c4 mem_24g_long_sleep_param_update_timer
+0x48c6 mem_24g_fast_hop_count
+0x48c7 mem_rssi_avg_received
+0x48c8 mem_power_ctrl_level
+0x48c9 mem_power_ctrl_pac_succ_cnt
+0x48ca mem_power_ctrl_pac_succ_cnt_init
+0x48cb mem_rssi_dis_min_24g
+0x48cc mem_rssi_dis_max_24g
+0x48cd mem_rssi_hex_received_max_value
+0x48ce mem_rssi_dis_min_ble
+0x48cf mem_rssi_dis_max_ble
+0x48d0 mem_mouse_key
+0x48d1 mem_mouse_x
+0x48d3 mem_mouse_y
+0x48d5 mem_mouse_z
+0x48d6 mem_mouse_tz
+0x48d7 mem_mouse_xy_h
+0x48d8 mem_mouse_key_last
+0x48d9 mem_wheel_tb_old_pinlevel
+0x48da mem_wheel_tb_new_pinlevel
+0x48db mem_wheel_tog
+0x48dc mem_mouse_tz_data
+0x48dd mem_mwheel_b_old_pinlevel
+0x48de mem_mwheel_b_new_pinlevel
+0x48df mem_mwheel_tog
+0x48e0 mem_mouse_z_data
+0x48e1 mem_mouse_wheel_trigger
+0x48e2 mem_mouse_wheel_trigger_timer
+0x48e3 mem_mouse_vdd_calculate_set
+0x48e3 mem_mouse_vdd_full_vol
+0x48e5 mem_mouse_vdd_empty_vol
+0x48e7 mem_mouse_vdd_low_vol
+0x48e9 mem_mouse_vdd_now_vol
+0x48eb mem_mouse_vdd_button_press_vol
+0x48ed mem_mouse_vdd_switch_gnd_24g_vol
+0x48ef mem_mouse_vdd_switch_gnd_full_vol
+0x48f1 mem_mouse_vdd_switch_gnd_shutdown_voltage
+0x48f3 mem_mouse_vdd_switch_gnd_low_voltage
+0x48f5 mem_adc_mux_status
+0x48f6 mem_adc_read_timer
+0x48f7 mem_adc_read_time_init
+0x48f8 mem_adc_low_volatage_led_timer_count
+0x48f9 mem_adc_low_volatage_led_blink_enable
+0x48fa mem_mouse_adc_last_low_voltage_flag
+0x48fb mem_mouse_adc_button_press_flag
+0x48fc mem_adc_channel_gpio
+0x48fd mem_adc_config_flag_init
+0x48fe mem_mouse_discovery_timeout
+0x4900 mem_mouse_24g_pair_timeout_init
+0x4902 mem_mouse_direct_timeout
+0x4903 mem_mouse_24g_reconn_timeout_init
+0x4904 mem_mouse_24g_pair_tx_power
+0x4905 mem_rssi_dis_min_24g_init
+0x4906 mem_rssi_dis_max_24g_init
+0x4907 mem_rssi_hex_received_max_value_init
+0x4908 mem_rssi_dis_min_ble_init
+0x4909 mem_rssi_dis_max_ble_init
+0x490a mem_mouse_enable_flag
+0x490b mem_mouse_global_setup
+0x490c mem_mouse_global_setup1
+0x490d mem_bk_button_gpio
+0x490e mem_fw_button_gpio
+0x490f mem_dpi_button_gpio
+0x4910 mem_matrix_public_gpio
+0x4911 mem_sensor_motion_gpio
+0x4912 mem_customer_key_gpio
+0x4913 mem_whee_a_data_gpio
+0x4914 mem_whee_b_data_gpio
+0x4915 mem_config_device_24g_led_gpio
+0x4916 mem_config_device_bt1_led_gpio
+0x4917 mem_select_sensor_angle_gpio
+0x4918 mem_lbutton_gpio
+0x4919 mem_rbutton_gpio
+0x491a mem_mbutton_gpio
+0x491b mem_config_select_device_button_gpio
+0x491c mem_whee_ta_data_gpio
+0x491d mem_whee_tb_data_gpio
+0x491e mem_device_switch_gpio
+0x491f mem_mouse_sensor_sclk_gpio
+0x4920 mem_mouse_sensor_sdio_gpio
+0x4921 mem_config_low_voltage_alarm_gpio
+0x4922 mem_config_device_bt2_led_gpio
+0x4923 mem_dpi_led_gpio
+0x4924 mem_sensor_angle_default
+0x4925 mem_sensor_angle_switch
+0x4926 mem_config_sensor_dpi
+0x4927 mem_config_sensor_type
+0x4928 mem_config_sensor_angle
+0x4929 mem_wire_usb_interval
+0x492a mem_usb_addr
+0x492b mem_mouse_usb_vdd_status
+0x492c mem_mouse_usb_keyboard_flag
+0x492d mem_mouse_led_type
+0x492e mem_mouse_blink_count
+0x492f mem_mouse_struct_led_gpio
+0x4930 mem_mouse_on_time
+0x4932 mem_mouse_off_time
+0x4934 mem_mouse_cb_ledon
+0x4936 mem_mouse_cb_ledoff
+0x4938 mem_mouse_information_start
+0x4938 mem_device_flag
+0x4939 mem_device1_type
+0x493a mem_device1_addr
+0x4940 mem_device1_link_key
+0x4950 mem_device1_locall_addr
+0x4956 mem_device2_type
+0x4957 mem_device2_addr
+0x495d mem_device2_link_key
+0x496d mem_device2_locall_addr
+0x4973 mem_device3_type
+0x4974 mem_mouse_compare_addr_ff
+0x4974 mem_device3_addr
+0x497a mem_device3_link_key
+0x498a mem_device3_locall_addr
+0x4990 mem_store_flag
+0x4992 mem_mouse_dpi
+0x4993 mem_mouse_24g_addr
+0x4997 mem_random_addr_increase_count
+0x4999 mem_mouse_retention
+0x49b8 mem_mouse_information_end
+0x49b8 mem_flash_base
+0x49bb mem_write_flash_head_temp
+0x49bf mem_store_information_delay_timer
+0x49c0 mem_store_information_delay_timer_init
+0x49c1 mem_sensor_id1
+0x49c2 mem_sensor_id2
+0x49c3 mem_sensor_shutter_hi
+0x49c4 mem_sensor_shutter_lo
+0x49c5 mem_sensor_smart_flag
+0x49c6 mem_sensor_squal_reg
+0x49c7 mem_sensor_iqc
+0x49c8 mem_mouse_move_flag
+0x49c9 mem_mouse_asm_flag
+0x49ca mem_mouse_x_pre
+0x49cc mem_mouse_y_pre
+0x49ce mem_mouse_data_xtemp
+0x49cf mem_mouse_data_ytemp
+0x49d0 mem_mouse_dpi_seting
+0x49d0 mem_320x_dpi_0
+0x49d1 mem_320x_dpi_1
+0x49d2 mem_320x_dpi_2
+0x49d3 mem_320x_dpi_3
+0x49d4 mem_3212_dpi_0
+0x49d5 mem_3212_dpi_1
+0x49d6 mem_3212_dpi_2
+0x49d7 mem_3212_dpi_3
+0x49d8 mem_ka8g2_dpi_0
+0x49d9 mem_ka8g2_dpi_1
+0x49da mem_ka8g2_dpi_2
+0x49db mem_ka8g2_dpi_3
+0x49dc mem_mouse_cpi_count
+0x49dd mem_mouse_dpi_button_state
+0x49de mem_mouse_dpi_long_press_flag
+0x49df mem_sensor_3212_init
+0x49e9 mem_sensor_3204_init
+0x49f3 mem_sensor_3205_init
+0x49fd mem_sensor_32xx_init
+0x4a17 mem_sensor_32xx_init_1
+0x4a39 mem_sensor_8650_init
+0x4a53 mem_sensor_ka8ul_init
+0x4a71 mem_sensor_8009_init
+0x4a81 mem_sensor_ka8g2_init
+0x4a97 mem_sensor_p6520_init
+0x4aa3 mem_sensor_poweron_init
+0x4aab mem_sensor_reset_gpio
+0x4aac mem_mouse_clear_sensor_data_flag
+0x4aad mem_bluetooth_125hz_cnt
+0x4aae mem_mouse_long_mult_flag
+0x4aaf mem_mouse_current_mult_timer
+0x4ab0 mem_reconn_times
+0x4ab1 mem_reconn_times_init
+0x4ab2 mem_mouse_no_data_timer
+0x4ab4 mem_device_flag_temp
+0x4ab5 mem_mouse_rssi_signal_buf
+0x4abd mem_btclk_sensor
+0x4ac1 mem_mouse_bluetooth_fast_conn_flag
+0x4ac2 mem_mouse_discovery_timer
+0x4ac4 mem_mouse_bluetooth_reconnect_timeout
+0x4ac5 mem_mouse_need_soft_reset
+0x4ac6 mem_mouse_le_bb_connected_flag
+0x4ac7 mem_mouse_le_reconnect_flag
+0x4ac8 mem_mouse_send_secutiry_request_timer
+0x4ac9 mem_mouse_le_lap_temp
+0x4acc mem_le_adv_ind
+0x4acf mem_le_adv_direct_ind
+0x4ad2 mem_le_adv_swift_pair
+0x4ae6 mem_le_data_len
+0x4ae7 mem_le_keyboard_handle
+0x4ae9 mem_le_multimedia_handle
+0x4aeb mem_le_systemctrl_handle
+0x4aed mem_le_battery_level_handle
+0x4aef mem_le_battery_level_percentage
+0x4af0 mem_le_battery_level_updata_timer_init
+0x4af2 mem_le_battery_level_updata_timer
+0x4af4 mem_mouse_le_conn_param_reject
+0x4af5 mem_le_tx_buffer0_omemalloc
+0x4b15 mem_le_tx_buffer1_omemalloc
+0x4b35 mem_le_tx_buffer2_omemalloc
+0x4b55 mem_le_tx_buffer3_omemalloc
+0x4b75 mem_le_connect_status_flag
+0x4b76 mem_le_start_encrypt_timer
+0x4b77 mem_mouse_direct_timer
+0x4b78 mem_device_addr_temp
+0x4b7f mem_mouse_enter_sniff_count
+0x4b80 mem_mouse_bt_boot_mode
+0x4b81 mem_mouse_bt_boot_data
+0x4b86 mem_bt_send_max_slot_req_accept_after_switch
+0x4b87 mem_mouse_bt_send_first_package_timer
+0x4b88 mem_mouse_bt_send_first_package_flag
+0x4b89 mem_lmi_opcode_temp
+0x4b8a mem_lpm_mult_init
+0x4b8b mem_customer_key
+0x4b8c mem_customer_data_trigger
+0x4b8d mem_customer_data_trigger_last
+0x4b8e mem_mouse_lkey_press_status
+0x4b8f mem_mouse_rkey_press_status
+0x4b90 mem_mouse_mkey_press_status
+0x4b91 mem_mouse_bkkey_press_status
+0x4b92 mem_mouse_fwkey_press_status
+0x4b93 mem_mouse_dpikey_press_status
+0x4b94 mem_mouse_pbkey_press_status
+0x4b95 mem_mouse_customerkey_press_status
+0x4b96 mem_mouse_key_temp
+0x4b97 mem_mouse_key_status
+0x4b98 mem_mouse_matrix_key_cow_count
+0x4b99 mem_mouse_matrix_key_row_count
+0x4b9a mem_mouse_ghost_flag
+0x4b9b mem_bt_discovery_count
+0x4b9c mem_select_device_count
+0x4b9d mem_mouse_commbination_key
+0x4b9e mem_select_device_button_statue
+0x4b9f mem_commbination_key_statue
+0x4ba0 mem_combination_ui_button_count
+0x4ba1 mem_mouse_search_dongle_interval
+0x4ba2 mem_mouse_search_dongle_ch
+0x4ba3 mem_mouse_search_dongle_count
+0x4ba4 mem_mouse_search_dongle_action
+0x4ba5 mem_24g_enter_lpm_timer
+0x4ba6 mem_mouse_24g_enter_lpm_enable
+0x4ba7 mem_mouse_device_poweron_timer_count
+0x4ba8 mem_mouse_dpi_led_delay_count
+0x4ba9 mem_mouse_led_off_4_led
+0x4baa mem_24g_device_led_status
+0x4bab mem_mouse_flag
+0x4bb3 mem_mouse_bluetooth_type
+0x4bb4 mem_device_number
+0x4bb5 mem_mouse_page_to
+0x4bb7 mem_mouse_fast_direct_timeout
+0x4bb8 mem_mouse_fast_page_to
+0x4bba mem_mouse_24g_power_on_fast_conn_timer
+0x4bbc mem_mouse_24g_search_dongle_time_init
+0x4bbe mem_mouse_no_data_timeout
+0x4bc0 mem_mouse_device_poweron_timer_count_init
+0x4bc1 mem_mouse_dpi_led_delay_count_init
+0x4bc2 mem_mouse_dpi_led_blink_time
+0x4bc4 mem_mouse_disconvey_led_blink_time
+0x4bc6 mem_mouse_low_v_led_blink_time
+0x4bc8 mem_adc_low_volatage_led_blink_timer
+0x4bca mem_mouse_commbination_key_bt
+0x4bcb mem_mouse_commbination_key_24g
+0x4bcc mem_customer_key_press
+0x4bd5 mem_customer_key_release
+0x4bde mem_mouse_set_high_impedance_bit_set
+0x4be1 mem_sensor_shutdown_flag
+0x4be2 mem_power_on_flag
+0x4be3 mem_sensor_angle_connect_gnd
+0x4be4 mem_sensor_angle_high_impedance
+0x4be5 mem_sensor_angle_connect_vin
+0x4be6 mem_sensor_8650_init_new
+0x4c0c mem_24g_pair_count
+0x4c0e mem_ka8g2_sensor_poweron_init
+0x4c16 mem_mouse_multi_led_blink_enable
+0x4c17 mem_mouse_multi_led_gpio
+0x4c18 mem_mouse_multi_led_state
+0x4c19 mem_mouse_multi_led_type
+0x4c1a mem_mouse_multi_led_on_timer
+0x4c1b mem_mouse_multi_led_on_timer_init
+0x4c1c mem_mouse_multi_led_blink_timer_init
+0x4c1d mem_mouse_multi_led_blink_timer
+0x4c1e mem_mouse_multi_led_blink_count
+0x4c1f mem_mouse_multi_led_blink_count_limited
+0x4c20 mem_mouse_multi_led_on_poweron2s_flag
+0x4c21 mem_mouse_led_enable_delay_timer
+0x48d0 mem_remote_car_hard_soft_switch
+0x48d1 mem_remote_car_queue_each_size
+0x48d2 mem_remote_car_queue_length
+0x48d3 mem_remote_car_queue_curr_num
+0x48d4 mem_remote_car_queue_read_ptr
+0x48d5 mem_remote_car_queue_write_ptr
+0x48d6 mem_remote_car_queue_ele
+0x4930 mem_remote_style_led_type
+0x4931 mem_remote_style_blink_count
+0x4932 mem_remote_style_struct_led_gpio
+0x4933 mem_remote_style_on_time
+0x4935 mem_remote_style_off_time
+0x4937 mem_remote_style_cb_ledon
+0x4939 mem_remote_style_cb_ledoff
+0x493b mem_remote_car_led_num
+0x493c mem_remote_car_led_map
+0x4944 mem_remote_car_keyscan
+0x4944 mem_remote_car_key_num
+0x4945 mem_cb_remote_car_keyscan
+0x4947 mem_remote_car_key_conf0
+0x4947 mem_remote_car_key_conf0_pin
+0x4948 mem_remote_car_key_conf1
+0x4948 mem_remote_car_key_conf1_pin
+0x4949 mem_remote_car_key_conf2
+0x4949 mem_remote_car_key_conf2_pin
+0x494a mem_remote_car_key_conf3
+0x494a mem_remote_car_key_conf3_pin
+0x494b mem_remote_car_key_conf4
+0x494b mem_remote_car_key_conf4_pin
+0x494c mem_remote_car_key_conf5
+0x494c mem_remote_car_key_conf5_pin
+0x494d mem_remote_car_key_conf6
+0x494d mem_remote_car_key_conf6_pin
+0x494e mem_rocker_negative_flag
+0x494f mem_rocker_work_status
+0x4950 mem_current_vdd_value_default_mid_x
+0x4952 mem_current_vdd_value_default_mid_y
+0x4954 mem_current_vdd_value_default_mid_temp
+0x4956 mem_current_vdd_default_range
+0x4958 mem_rocker_last_status
+0x495a mem_rocker_status
+0x495a mem_rocker_x_status
+0x495b mem_rocker_y_status
+0x495c mem_remote_car_config_param
+0x495c mem_remote_car_config_setting_flag
+0x495d mem_remote_car_config_key_map
+0x495e mem_remote_car_config_layout
+0x495f mem_remote_car_config_connect_led_gpio
+0x4960 mem_remote_car_config_check_way
+0x4961 mem_remote_car_config_soft_switch_enable
+0x4962 mem_remote_car_config_soft_switch_gpio
+0x4963 mem_remote_car_config_timeout_shutdown_enable
+0x4964 mem_remote_car_24g_motor_packet
+0x4964 mem_remote_car_24g_motor_packet_lenght
+0x4965 mem_remote_car_24g_motor_send_packet_head
+0x4967 mem_remote_car_24g_motor_send_cmd
+0x4968 mem_remote_car_24g_motor_send_length
+0x496a mem_remote_car_24g_motor_send_payload
+0x496a mem_remote_car_24g_motor1_payload
+0x496c mem_remote_car_24g_motor2_payload
+0x496e mem_remote_car_24g_motor3_payload
+0x4970 mem_remote_car_24g_motor_send_checksum
+0x4971 mem_remote_car_24g_fire_packet
+0x4971 mem_remote_car_24g_fire_packet_lenght
+0x4972 mem_remote_car_24g_fire_send_packet_head
+0x4974 mem_remote_car_24g_fire_send_cmd
+0x4975 mem_remote_car_24g_fire_send_length
+0x4977 mem_remote_car_24g_fire_send_payload
+0x4979 mem_remote_car_24g_fire_send_checksum
+0x497a mem_remote_car_24g_tx_temp
+0x4989 mem_remote_car_no_data_timeout
+0x498b mem_remote_car_no_data_timer
+0x498d mem_remote_car_soft_power
+0x498d mem_remote_car_power_state
+0x498e mem_remote_car_power_timer
+0x498f mem_remote_car_power_off_timeout
+0x4990 mem_remote_car_power_starting_timeout
+0x4991 mem_remote_car_power_off_cb
+0x4993 mem_remote_car_power_starting_cb
+0x4995 mem_remote_car_power_standby_cb
+0x4997 mem_remote_key_status
+0x4998 mem_remote_car_24g_status
+0x4999 mem_remote_car_24g_auto_work_step
+0x499a mem_remote_car_24g_pair_success_flag
+0x499b mem_remote_car_empty_packet
+0x499c mem_remote_car_motor1_key0_press_state
+0x499d mem_remote_car_motor1_key1_press_state
+0x499e mem_remote_car_motor2_key2_press_state
+0x499f mem_remote_car_motor2_key3_press_state
+0x49a0 mem_remote_car_motor1_rel_state
+0x49a1 mem_remote_car_motor2_rel_state
+0x49a2 mem_remote_car_no_data_check
+0x47a4 mem_hci_uart_tx_gpio
+0x47a5 mem_hci_uart_rx_gpio
+0x47a6 mem_hci_uart_rts_gpio
+0x47a7 mem_hci_uart_cts_gpio
+0x47a8 mem_hci_pwm_12mhz_gpio
+0x47a4 mem_soft_version_num
+0x47a6 mem_module_wake_up_gpio
+0x47a7 mem_module_state_gpio
+0x47a8 mem_module_connect_state_gpio
+0x47a9 mem_current_packet_length
+0x47ab mem_module_state
+0x47ac mem_module_mcu_wake_pin
+0x47ad mem_module_mcu_wake_delay_us
+0x47b1 mem_module_spp_lpm_mult
+0x47b2 mem_module_le_lpm_mult
+0x47b3 mem_module_bluetooth_stauts_by_command
+0x47b4 mem_module_uart_rx_buffer
+0x47b6 mem_module_uart_rx_buffer_end
+0x47b8 mem_module_uart_tx_buffer
+0x47ba mem_module_uart_tx_buffer_end
+0x47bc mem_module_uarta_baud_rate
+0x47be mem_module_read_vdd_flag
+0x47bf mem_module_read_vdd_count
+0x47c0 mem_module_vdd_quotient
+0x47c1 mem_module_vdd_remainder
+0x47c2 mem_module_ble_data_uart_max_length
+0x47c3 mem_module_flag
+0x47c5 mem_module_hci_notify_len
+0x47c6 mem_module_hci_notify_handle
+0x47c8 mem_module_hci_nofiy_addr
+0x47ca mem_module_hci_notify_type
+0x47cb mem_last_transmite_clock
+0x47cf mem_module_uuid_list
+0x48fb mem_module_uuid_list_end
+0x48fb mem_module_le_att_list
+0x4b53 mem_module_le_att_list_end
+0x4b53 mem_module_nv_data
+0x4b53 mem_module_nv_data0
+0x4b75 mem_module_nv_data1
+0x4b97 mem_module_nv_data2
+0x4bb9 mem_module_nv_data3
+0x4bdb mem_module_nv_data4
+0x4bfd mem_module_nv_data_end
+0x47a4 mem_shutter_bluetooth_type
+0x47a5 mem_shutter_config_eeprom_offset_addr
+0x47a7 mem_shutter_config_eeprom_start_flag
+0x47a9 mem_shutter_config_user_size
+0x47aa mem_shutter_config_label
+0x47ab mem_shutter_config_otp_addr
+0x47ad mem_classic_shutter_cable_unplug_conut
+0x47ae mem_classic_shutter_hid_disconn_count
+0x47af mem_classic_shutter_random_mac_offset_addr
+0x47b1 mem_ble_shutter_enable_notify
+0x47b2 mem_ble_shutter_reconn_adv_interval
+0x47b4 mem_ble_shutter_discovery_adv_interval
+0x47b6 mem_ble_shutter_reconn_timeout
+0x47b8 mem_ble_shutter_reconn_timer
+0x47ba mem_ble_shutter_reconn_blink_on_time
+0x47bc mem_ble_shutter_reconn_blink_off_time
+0x47be mem_ble_shutter_discovery_blink_on_time
+0x47c0 mem_ble_shutter_discovery_blink_off_time
+0x47c2 mem_ble_shutter_interval_min
+0x47c4 mem_ble_shutter_interval_max
+0x47c6 mem_ble_shutter_latency
+0x47c8 mem_ble_shutter_timeout
+0x47ca mem_ble_shutter_interval_min_new
+0x47cc mem_ble_shutter_interval_max_new
+0x47ce mem_ble_shutter_latency_new
+0x47d0 mem_ble_shutter_timeout_new
+0x47d2 mem_classic_shutter_discovery_timeout
+0x47d4 mem_classic_shutter_connect_timeout
+0x47d6 mem_ble_shutter_discovery_timeout
+0x47d8 mem_ble_shutter_connect_timeout
+0x47da mem_shutter_sleep_timeout
+0x47dc mem_shutter_sleep_timer
+0x47de mem_shutter_hard_soft_switch_case
+0x47df mem_shutter_soft_switch_button_gpio
+0x47e0 mem_shutter_soft_switch_power_state
+0x47e1 mem_shutter_soft_switch_poweron_time
+0x47e2 mem_shutter_soft_switch_poweroff_time
+0x47e3 mem_shutter_soft_switch_poweron_callback_function
+0x47e5 mem_shutter_soft_switch_poweroff_callback_function
+0x47e7 mem_shutter_keyscan
+0x47e7 mem_shutter_key_num
+0x47e8 mem_cb_shutter_keycan
+0x47ea mem_shutter_key_conf0
+0x47eb mem_shutter_key_conf1
+0x47ec mem_shutter_key_conf2
+0x47ed mem_shutter_key_conf3
+0x47ee mem_shutter_key_conf4
+0x47ef mem_shutter_key_conf5
+0x47f0 mem_shutter_key_conf6
+0x47f1 mem_shutter_key_conf7
+0x47f2 mem_key0_press
+0x47f7 mem_key1_press
+0x47fc mem_key2_press
+0x4801 mem_key3_press
+0x4806 mem_key4_press
+0x480b mem_key5_press
+0x4810 mem_key6_press
+0x4815 mem_key7_press
+0x481a mem_key0_release
+0x481f mem_key1_release
+0x4824 mem_key2_release
+0x4829 mem_key3_release
+0x482e mem_key4_release
+0x4833 mem_key5_release
+0x4838 mem_key6_release
+0x483d mem_key7_release
+0x4842 mem_ble_data_buffer1
+0x4847 mem_ble_data_buffer2
+0x484c mem_ble_data_buffer3
+0x4851 mem_ble_data_buffer4
+0x4856 mem_ble_data_buffer5
+0x485b mem_ble_data_buffer6
+0x4860 mem_ble_data_buffer7
+0x4865 mem_ble_data_buffer8
+0x486a mem_ble_data_buffer9_58
+0x489c mem_classic_data_buffer
+0x48a1 mem_classic_data_buffer1
+0x48a6 mem_classic_data_buffer2
+0x48ab mem_classic_data_buffer3
+0x48b0 mem_classic_data_buffer4
+0x48b5 mem_classic_data_buffer5
+0x48ba mem_classic_data_buffer6
+0x48bf mem_classic_data_buffer7
+0x48c4 mem_classic_data_buffer8
+0x48c9 mem_classic_data_buffer9_58
+0x48fb mem_queue_each_size
+0x48fc mem_queue_length
+0x48fd mem_queue_curr_num
+0x48fe mem_queue_read_ptr
+0x48ff mem_queue_write_ptr
+0x4900 mem_queue_ele
+0x4920 mem_shutter_nv_data
+0x49ca mem_shutter_led_struct_app_led
+0x49ca mem_shutter_led_struct_app_led_type
+0x49cb mem_shutter_led_struct_app_led_blink_count
+0x49cc mem_shutter_led_struct_app_led_gpio
+0x49cd mem_shutter_led_struct_app_led_on_time
+0x49cf mem_shutter_led_struct_app_led_off_time
+0x49d1 mem_shutter_led_struct_app_led_on_callback
+0x49d3 mem_shutter_led_struct_app_led_off_callback
+0x49d5 mem_shutter_power_off_led_style
+0x49d5 mem_shutter_power_off_led_style_type
+0x49d6 mem_shutter_power_off_led_style_blink_count
+0x49d7 mem_shutter_power_off_led_style_gpio
+0x49d8 mem_shutter_power_off_led_style_on_time
+0x49da mem_shutter_power_off_led_style_off_time
+0x49dc mem_shutter_power_off_led_style_on_callback
+0x49de mem_shutter_power_off_led_style_off_callback
+0x49e0 mem_shutter_soft_swtich_botton_down
+0x49e1 mem_shutter_soft_swtich_led_struct_temp
+0x49ec mem_shutter_power_off_timeout
+0x49ed mem_shutter_power_off_timer
+0x49ee mem_shutter_key_conf0_temp
+0x49f0 mem_shutter_led_struct_app_led_gpio_temp
+0x49f1 mem_shutter_hard_soft_switch_case_temp
+0x49f2 mem_shutter_soft_switch_button_gpio_temp
+
+0x4b46 mem_mesh_unsegmented_access_lower_transport_layer_head
+0x4b47 mem_mesh_unsegmented_access_lower_transport_layer_parameters
+0x4b52 mem_mesh_unsegmented_access_lower_transport_layer_mic
+0x4b46 mem_mesh_segmented_access_lower_transport_layer_head
+0x4b47 mem_mesh_segmented_access_lower_transport_layer_SZMIC_SeqZero_SegO_SegN
+0x4b4a mem_mesh_segmented_access_lower_transport_layer_parameters
+0x4b52 mem_mesh_segmented_access_lower_transport_layer_mic
+0x48e2 mem_k2_EncryptionKey
+0x48d2 mem_k2_PrivacyKey
Index: output/program.lis
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/program.lis	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/program.lis	(working copy)
@@ -0,0 +1,41828 @@
+              include "bt_format "
+              org 0x0000
+0000 c2840019 bbit1 8 ,pf_patch_ext 
+0001 c0000024 beq patch00_0 ,p_soft_reset 
+0002 c0018028 beq patch00_3 ,p_main_loop 
+0003 c041804c beq patch10_3 ,p_set_sync_on 
+0004 c0450035 beq patch11_2 ,p_txon_next 
+0005 c0458081 beq patch11_3 ,p_initialize_radio_cont 
+0006 c04f8096 beq patch13_7 ,p_init_param 
+0007 c0570098 beq patch15_6 ,p_app_init 
+0008 c0580075 beq patch16_0 ,p_app_evt_100ms_loop 
+0009 c061820b beq patch18_3 ,p_mouse_start_work 
+000a c0638199 beq patch18_7 ,p_mouse_app_enter_hibernate 
+000b c064819f beq patch19_1 ,p_mouse_setgpio_hibernate 
+000c c06501b1 beq patch19_2 ,p_mouse_lpm_before_common 
+000d c066035d beq patch19_4 ,p_mouse_adc_read_start 
+000e c067033d beq patch19_6 ,p_mouse_motion 
+000f c068021c beq patch1a_0 ,p_mouse_seting_dpi 
+0010 c0688394 beq patch1a_1 ,p_mouse_check_key_gpio 
+0011 c0698236 beq patch1a_3 ,p_mouse_init_sunt 
+0012 c06a024f beq patch1a_4 ,p_mouse_sensor_poweron 
+0013 c06b01c3 beq patch1a_6 ,p_mouse_priority_bb_event 
+0014 c06c8269 beq patch1b_1 ,p_mouse_bb_event_timer 
+0015 c06d02f3 beq patch1b_2 ,p_mouse_start_discovery 
+0016 c06f03ca beq patch1b_6 ,p_mouse_idle 
+0017 c07402fe beq patch1d_0 ,p_hid_rx_process 
+0018 2020137c branch loop 
+
+pf_patch_ext:
+0019 c0198055 beq patch26_3 ,p_adc_init_data 
+001a c01a005a beq patch26_4 ,p_enable_adc 
+001b c04382fa beq patch30_7 ,p_ui_timer_check 
+001c c0508312 beq patch34_1 ,p_le_slave_match 
+001d c0548090 beq patch35_1 ,p_le_enable 
+001e c06e8113 beq patch3b_5 ,p_g24_dispatch 
+001f c0710123 beq patch3c_2 ,p_g24_pair_dispatch 
+0020 c074812a beq patch3d_1 ,p_g24_reconn_dispatch 
+0021 c0750144 beq patch3d_2 ,p_g24_transmit_no_interrupt 
+0022 c0760333 beq patch3d_4 ,p_g24_lpm_wait 
+0023 2020137c branch loop 
+
+p_soft_reset:
+0024 20800000 clear_stack 
+0025 204030f3 call app_param_init 
+0026 20403bfd call mouse_xtal_init 
+0027 20200804 branch soft_reset + 3 
+
+p_main_loop:
+0028 2040706c call sp_calc_sequence 
+0029 20407597 call sp_calc_sequence_256 
+002a 20406ea7 call sp_calc_sequence_256_check 
+002b 20401b93 call le_advertising_dispatch + 1 
+002c 2040083a call idle_dispatch 
+002d 20403108 call app_process_idle + 1 
+002e 20400892 call inquiry_dispatch + 1 
+002f 20400b08 call inquiry_scan_dispatch + 1 
+0030 20400b7b call page_scan_dispatch + 1 
+0031 20400823 call connection_dispatch + 1 
+0032 204021d3 call g24_dispatch + 2 
+0033 20400040 call p_lpm_dispatch 
+0034 20200813 branch main_loop 
+
+p_txon_next:
+0035 6fe0c1e8 fetch 1 ,mem_tx_power 
+0036 c001922d beq tx_power_3db ,set_tx_power_3db 
+0037 c0029238 beq tx_power_5db ,set_tx_power_7db 
+0038 c003123b beq tx_power_6db ,set_tx_power_10db 
+0039 c003923b beq tx_power_7db ,set_tx_power_10db 
+003a c005123b beq tx_power_10db ,set_tx_power_10db 
+003b c041923e beq tx_power_f3db ,set_tx_power_f3db 
+003c c0429241 beq tx_power_f5db ,set_tx_power_f5db 
+003d c04a1244 beq tx_power_f20db ,set_tx_power_f20db 
+003e c04f1247 beq tx_power_f30db ,set_tx_power_f30db 
+003f 20201228 branch set_tx_power_0db 
+
+p_lpm_dispatch:
+0040 20401465 call lpo_calibration 
+0041 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+0042 207a0000 rtn blank 
+0043 6fe0c099 fetch 1 ,mem_lpm_mode 
+0044 207a0000 rtn blank 
+0045 6fe0c764 fetch 1 ,mem_ssp_enable 
+0046 203a0049 branch p_lpm_dispatch_next ,blank 
+0047 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+0048 207a0000 rtn blank 
+
+p_lpm_dispatch_next:
+0049 6fe0c6ba fetch 1 ,mem_sc_calc 
+004a 247a0000 nrtn blank 
+004b 202014ea branch lpm_dispatch_next + 3 
+
+p_set_sync_on:
+004c 70890005 jam 0x5 ,modem_en 
+004d 20000002 nop 2 
+004e 70890000 jam 0x0 ,modem_en 
+004f 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+0050 c00c1168 beq xtal_24m ,set_sync_on_24m 
+0051 c0040053 beq xtal_16m ,p_set_sync_on_16m 
+0052 20201168 branch set_sync_on_24m 
+
+p_set_sync_on_16m:
+0053 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+0054 2020117d branch set_sync_on_16m 
+
+p_adc_init_data:
+0055 da20099e arg mem_temp_block2 ,rega 
+0056 d840000c arg 12 ,temp 
+0057 58000030 setarg efuse_offset_adc_param 
+0058 20405e63 call efuse_read_data 
+0059 202060bf branch adc_init_data + 6 
+
+p_enable_adc:
+005a 6a508a12 fetchr regb ,1 ,core_rf_ldo_cfg6 
+005b 708a123d jam 0x3d ,core_rf_ldo_cfg6 
+005c 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+005d 708a0a0c jam 0x0c ,core_rf_ldo_en0 
+005e 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+005f 79207e07 set1 7 ,pdata 
+0060 67f08a09 store 1 ,core_clkpll_cfg6 
+0061 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+0062 2000003c nop 60 
+0063 708a1600 jam 0 ,core_syn_en 
+0064 708a1706 jam 6 ,core_rx_en0 
+0065 2040611a call read_adc_mode 
+0066 67f08a97 store 1 ,core_gpadc_ctrl 
+0067 7080dc03 jam 0x03 ,core_sum_ctrl 
+0068 2000003c nop 60 
+0069 6ff08053 fetch 1 ,core_sum_en 
+006a 79207e07 set1 7 ,pdata 
+006b 67f08053 store 1 ,core_sum_en 
+006c 200003e8 nop 1000 
+006d 6ff10150 fetch 2 ,core_adc_sum 
+006e 67e144a2 store 2 ,mem_adc_current_value 
+006f 6ff08053 fetch 1 ,core_sum_en 
+0070 793ffe07 set0 7 ,pdata 
+0071 67f08053 store 1 ,core_sum_en 
+0072 708a9700 jam 0 ,core_gpadc_ctrl 
+0073 62508a12 storer regb ,1 ,core_rf_ldo_cfg6 
+0074 20600000 rtn 
+
+p_app_evt_100ms_loop:
+0075 6fe0830d fetch 1 ,mem_app_evt_timer_count 
+0076 207a0000 rtn blank 
+0077 1fe0ffff increase -1 ,pdata 
+0078 67e0830d store 1 ,mem_app_evt_timer_count 
+0079 204077c5 call ui_button_polling 
+007a 204031e3 call app_lpm_wake_auto_lock_timer 
+007b 204031a4 call app_unsniff_delay_timer 
+007c 204031aa call app_discovery_timer 
+007d 20405cdc call flash_write_spi_sm_timer 
+007e 6fe1446f fetch 2 ,mem_cb_event_timer 
+007f 20407e05 call callback_func 
+0080 20200075 branch p_app_evt_100ms_loop 
+
+p_initialize_radio_cont:
+0081 204012d1 call init_lpm_ctrl 
+0082 20000064 nop 100 
+0083 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+0084 2040126a call initialize_syn_afc_cfg1 
+0085 20401271 call initialize_rf_ldo_cfg1 
+0086 20401277 call initialize_rc_cal 
+0087 708a6d09 jam 0x09 ,core_rx_bq_cfg0 
+0088 708a0305 jam 5 ,core_clkpll_cfg0 
+0089 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+008a 708a0e0b jam 0x0b ,core_rf_ldo_cfg2 
+008b 708a0f05 jam 0x05 ,core_rf_ldo_cfg3 
+008c 708a8390 jam 0x90 ,core_syn_pfd_lkd_cfg 
+008d 708a8500 jam 0x00 ,core_syn_loopdiv_dsm_cfg 
+008e 70892140 jam 0x40 ,core_rx_ctrl1 
+008f 2020125d branch initialize_radio_cont + 8 
+
+p_le_enable:
+0090 204016a6 call le_enable + 1 
+0091 708a6d89 jam 0x89 ,core_rx_bq_cfg0 
+0092 6ff08a43 fetch 1 ,core_syn_cal_ctrl 
+0093 1fe1fe0f or pdata ,0x0f ,pdata 
+0094 67f08a43 store 1 ,core_syn_cal_ctrl 
+0095 20600000 rtn 
+
+p_init_param:
+0096 70008000 jam 0 ,mem_lmo_tid2 
+0097 202013b7 branch init_param_next + 1 
+
+p_app_init:
+
+p_mouse_init:
+0098 20406df3 call enable_authrom 
+0099 204000a9 call p_mouse_setting_config 
+009a 204041a7 call mouse_init_sunt 
+009b 20758000 rtn wake 
+009c 2040021e call p_mouse_dpi_config 
+009d 20403d8a call mouse_usb_check_enable 
+009e 20404728 call mouse_drawing_optima_init 
+009f 204000ca call p_mouse_cb_fuction 
+00a0 20400261 call p_mouse_sensor_powerdown 
+00a1 204002b3 call p_mouse_mode_24g_device_multi_led_on 
+00a2 20203bc9 branch mouse_init + 8 
+
+p_mouse_wheel_set_wakeup:
+00a3 6fe0c913 fetch 1 ,mem_whee_a_data_gpio 
+00a4 d8400040 arg gpcfg_pullup ,temp 
+00a5 20406093 call gpio_config_function_int 
+00a6 6fe0c914 fetch 1 ,mem_whee_b_data_gpio 
+00a7 d8400040 arg gpcfg_pullup ,temp 
+00a8 20206093 branch gpio_config_function_int 
+
+p_mouse_setting_config:
+00a9 20758000 rtn wake 
+00aa 20402607 call g24_transmit_init 
+00ab 204022ff call g24_chmap_param_init 
+00ac 20403f1e call mouse_gpio_init 
+00ad 20403d13 call mouse_param_init 
+00ae 58001770 setarg 6000 
+00af 67e1c8ad store 3 ,mem_24g_short_sleep_set 
+00b0 58000708 setarg 1800 
+00b1 67e14885 store 2 ,mem_24g_reconn_timeout_init 
+00b2 d8401e00 arg 0x1e00 ,temp 
+00b3 60494838 storet 2 ,mem_24g_rx_window 
+00b4 204000b6 call p_mouse_sensor_set_angle 
+00b5 20203bf5 branch mouse_setting_config + 5 
+
+p_mouse_sensor_set_angle:
+00b6 6fe0cbe3 fetch 1 ,mem_sensor_angle_connect_gnd 
+00b7 67e0c928 store 1 ,mem_config_sensor_angle 
+00b8 6fe0c917 fetch 1 ,mem_select_sensor_angle_gpio 
+00b9 c17f8000 rtneq gpio_disable 
+00ba 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
+00bb 20403f56 call mouse_gpio_config_input_pu 
+00bc 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
+00bd 20406059 call gpio_get_bit 
+00be 242080c0 nbranch p_mouse_sensor_switch_angle_next ,true 
+00bf 20203f54 branch mouse_gpio_config_input_pd 
+
+p_mouse_sensor_switch_angle_next:
+00c0 6fe0cbe5 fetch 1 ,mem_sensor_angle_connect_vin 
+00c1 67e0c928 store 1 ,mem_config_sensor_angle 
+00c2 20403f54 call mouse_gpio_config_input_pd 
+00c3 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
+00c4 20406059 call gpio_get_bit 
+00c5 202080c7 branch p_mouse_sensor_switch_angle_impedance ,true 
+00c6 20203f56 branch mouse_gpio_config_input_pu 
+
+p_mouse_sensor_switch_angle_impedance:
+00c7 6fe0cbe4 fetch 1 ,mem_sensor_angle_high_impedance 
+00c8 67e0c928 store 1 ,mem_config_sensor_angle 
+00c9 20203f58 branch mouse_gpio_set_high_impedance 
+
+p_mouse_cb_fuction:
+00ca 580000cf setarg p_mouse_24g_package_data 
+00cb 67e1489b store 2 ,mem_cb_24g_transmit_data 
+00cc 580000ed setarg p_mouse_24g_search_dongle 
+00cd 67e1489d store 2 ,mem_cb_24g_search_receiver 
+00ce 20203bd3 branch mouse_cb_fuction + 4 
+
+p_mouse_24g_package_data:
+00cf c6930000 rtnmark0 mark_24g 
+00d0 20403f70 call mouse_motion 
+00d1 24740000 nrtn user 
+00d2 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+00d3 c30a80d6 bbit0 mouse_enable_keyboard ,p_mouse_24g_mouse_package_data 
+00d4 6fe0cb8b fetch 1 ,mem_customer_key 
+00d5 243a4884 nbranch mouse_24g_keyboard_package_data ,blank 
+
+p_mouse_24g_mouse_package_data:
+00d6 204042cb call mouse_data_xy_release 
+00d7 6fe0c836 fetch 1 ,mem_24g_data_type 
+00d8 c28080e5 bbit1 1 ,p_mouse_24g_mouse_package_data_now 
+00d9 6848c7c7 fetcht 1 ,mem_24g_txbuf + 1 
+00da 6fe0c8d0 fetch 1 ,mem_mouse_key 
+00db 9841fe00 ior temp ,pdata 
+00dc 67e0c8d0 store 1 ,mem_mouse_key 
+00dd 6848c7cc fetcht 1 ,mem_24g_txbuf + 6 
+00de 6fe0c8d5 fetch 1 ,mem_mouse_z 
+00df 9840fe00 iadd temp ,pdata 
+00e0 67e0c8d5 store 1 ,mem_mouse_z 
+00e1 6848c7cd fetcht 1 ,mem_24g_txbuf + 7 
+00e2 6fe0c8d6 fetch 1 ,mem_mouse_tz 
+00e3 9840fe00 iadd temp ,pdata 
+00e4 67e0c8d6 store 1 ,mem_mouse_tz 
+
+p_mouse_24g_mouse_package_data_now:
+00e5 70483601 jam type_ms ,mem_24g_data_type 
+00e6 da200007 arg 7 ,rega 
+00e7 da4048d0 arg mem_mouse_key ,regb 
+00e8 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+00e9 c28c26e1 bbit1 mouse_enable_24g_250hz ,g24_transmit_by_interrupt_enable 
+00ea 6fe148d5 fetch 2 ,mem_mouse_z 
+00eb 207a0000 rtn blank 
+00ec 202026e1 branch g24_transmit_by_interrupt_enable 
+
+p_mouse_24g_search_dongle:
+00ed 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+00ee c40b0000 rtnbit0 mouse_enable_24g_search_dongle 
+00ef 6fe0caae fetch 1 ,mem_mouse_long_mult_flag 
+00f0 207a0000 rtn blank 
+00f1 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+00f2 207a0000 rtn blank 
+00f3 6fe0cba1 fetch 1 ,mem_mouse_search_dongle_interval 
+00f4 1fe0fe01 increase 1 ,pdata 
+00f5 1fe17e03 and_into 3 ,pdata 
+00f6 67e0cba1 store 1 ,mem_mouse_search_dongle_interval 
+00f7 247a0000 nrtn blank 
+00f8 704ba200 jam 0 ,mem_mouse_search_dongle_ch 
+
+p_mouse_24g_search_dongle_loop:
+00f9 6fe0cba2 fetch 1 ,mem_mouse_search_dongle_ch 
+00fa 1fe0fe01 increase 1 ,pdata 
+00fb 67e0cba2 store 1 ,mem_mouse_search_dongle_ch 
+00fc 1fe67c08 sub pdata ,g24_ch_number ,null 
+00fd 24210103 nbranch p_mouse_24g_search_dongle_loop_end ,positive 
+00fe 2040259a call g24_reconn_data_prep 
+00ff 2040265b call g24_transmit_receive_ack 
+0100 242c0109 nbranch p_mouse_24g_search_dongle_loop_retry ,sync 
+0101 24378109 nbranch p_mouse_24g_search_dongle_loop_retry ,user3 
+0102 204048b5 call mouse_24g_search_dongle_success 
+
+p_mouse_24g_search_dongle_loop_end:
+0103 20402597 call g24_txbuf_clear 
+0104 6fe0cba3 fetch 1 ,mem_mouse_search_dongle_count 
+0105 1fe0fe01 increase 1 ,pdata 
+0106 67e0cba3 store 1 ,mem_mouse_search_dongle_count 
+0107 c008010b beq g24_ch_poll_count ,p_mouse_24g_search_dongle_check 
+0108 20600000 rtn 
+
+p_mouse_24g_search_dongle_loop_retry:
+0109 204022cb call g24_ch 
+010a 202000f9 branch p_mouse_24g_search_dongle_loop 
+
+p_mouse_24g_search_dongle_check:
+010b 704ba300 jam 0 ,mem_mouse_search_dongle_count 
+010c 6fe0cba4 fetch 1 ,mem_mouse_search_dongle_action 
+010d c3800000 rtnbit1 g24_disconn_state 
+010e 79207e00 set1 g24_disconn_state ,pdata 
+010f 67e0cba4 store 1 ,mem_mouse_search_dongle_action 
+0110 6fe14bbc fetch 2 ,mem_mouse_24g_search_dongle_time_init 
+0111 67e14ab2 store 2 ,mem_mouse_no_data_timer 
+0112 20200261 branch p_mouse_sensor_powerdown 
+
+p_g24_dispatch:
+0113 c61a0000 rtnmark1 mark_adc_enable 
+0114 c513a40e bmark1 mark_24g_rxmode ,g24_receive_dispatch 
+
+p_g24_transmit_dispatch:
+0115 c6930000 rtnmark0 mark_24g 
+0116 6fe0c8a1 fetch 1 ,mem_24g_conn_sm 
+0117 c280a340 bbit1 state_24g_pair ,g24_pair_dispatch 
+0118 c2812580 bbit1 state_24g_reconn ,g24_reconn_dispatch 
+0119 6fe0c8bd fetch 1 ,mem_24g_transmit_by_interrupt 
+011a c000811c beq g24_tx_timer_int_enable ,p_g24_transmit_by_interrupt 
+011b 20202621 branch g24_transmit_no_interrupt 
+
+p_g24_transmit_by_interrupt:
+011c 204022ea call g24_timer_check 
+011d 24340115 nbranch p_g24_transmit_dispatch ,user 
+011e 204026db call g24_interval_calibrate 
+011f 6fe148be fetch 2 ,mem_24g_transmit_by_interrupt_exit_count 
+0120 1fe0fe01 increase 1 ,pdata 
+0121 67e148be store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+0122 20202621 branch g24_transmit_no_interrupt 
+
+p_g24_pair_dispatch:
+0123 6fe14c0c fetch 2 ,mem_24g_pair_count 
+0124 1fe0fe01 increase 1 ,pdata 
+0125 67e14c0c store 2 ,mem_24g_pair_count 
+0126 6fe0cc0c fetch 1 ,mem_24g_pair_count 
+0127 1fe17eff and pdata ,0xff ,pdata 
+0128 c0002341 beq 0 ,g24_pair_dispatch + 1 
+0129 20600000 rtn 
+
+p_g24_reconn_dispatch:
+012a 6fe14889 fetch 2 ,mem_24g_reconn_count 
+012b 1fe17eff and pdata ,0xff ,pdata 
+012c c0000131 beq 0 ,p_g24_reconn_dispatch_next 
+012d 6fe14889 fetch 2 ,mem_24g_reconn_count 
+012e 1fe0fe01 increase 1 ,pdata 
+012f 67e14889 store 2 ,mem_24g_reconn_count 
+0130 20600000 rtn 
+
+p_g24_reconn_dispatch_next:
+0131 2040259a call g24_reconn_data_prep 
+0132 2040265b call g24_transmit_receive_ack 
+0133 242c0137 nbranch p_g24_reconn_device_fail ,sync 
+0134 24378137 nbranch p_g24_reconn_device_fail ,user3 
+0135 20402672 call g24_ackpayload_parse 
+0136 20202586 branch g24_reconn_receiver_succ 
+
+p_g24_reconn_device_fail:
+0137 6fe0c88c fetch 1 ,mem_24g_fast_conn_enable 
+0138 203a22cb branch g24_ch ,blank 
+0139 6fe14889 fetch 2 ,mem_24g_reconn_count 
+013a 1fe0fe01 increase 1 ,pdata 
+013b 67e14889 store 2 ,mem_24g_reconn_count 
+013c 6fe0c88a fetch 1 ,mem_24g_reconn_count + 1 
+013d 2feffe00 isolate1 0 ,pdata 
+013e 6fe0c88b fetch 1 ,mem_24g_reconn_type 
+013f c000a5ad beq fast_conn_and_receiver ,g24_reconn_fast_conn_and_receiver 
+0140 c00125af beq fast_conn_and_3_0_addr ,g24_reconn_fast_conn_and_3_0 
+0141 c001a5b1 beq receiver_and_3_0_addr ,g24_reconn_receiver_and_3_0 
+0142 c00225b3 beq pair_and_3_0_addr ,g24_reconn_pair_and_3_0 
+0143 2020256e branch g24_reconn_receiver_addr 
+
+p_g24_transmit_no_interrupt:
+0144 20402631 call g24_txdata_prep 
+0145 24340153 nbranch p_g24_nodata_transmit ,user 
+
+p_g24_transmit_start:
+0146 20400177 call p_g24_transmit_process 
+0147 204026ee call power_ctrl_start 
+0148 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+0149 243a014e nbranch p_g24_short_sleep ,blank 
+014a 6fe448b0 fetch 8 ,mem_24g_long_sleep_set 
+014b 67e4485c store 8 ,mem_24g_enter_hibernate 
+014c 6fe148c2 fetch 2 ,mem_24g_long_sleep_param_update_timer_init 
+014d 67e148c4 store 2 ,mem_24g_long_sleep_param_update_timer 
+
+p_g24_short_sleep:
+014e 204026bb call g24_lpm_wait 
+014f 24740000 nrtn user 
+0150 20407fdc call clear_wake 
+0151 6fe1c8ad fetch 3 ,mem_24g_short_sleep_set 
+0152 202026b8 branch g24_long_sleep2 
+
+p_g24_nodata_transmit:
+0153 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+0154 205a0169 call p_g24_send_abort_packet ,blank 
+0155 6fe0c8bd fetch 1 ,mem_24g_transmit_by_interrupt 
+0156 c1008000 rtneq g24_tx_timer_int_enable 
+0157 2040269f call g24_search_receiver 
+
+p_g24_long_sleep:
+0158 204026bb call g24_lpm_wait 
+0159 24740000 nrtn user 
+015a 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+015b 245a015e ncall p_mouse_setgpio_hibernate_new ,blank 
+015c 6fe4485c fetch 8 ,mem_24g_enter_hibernate 
+015d 202026b8 branch g24_long_sleep2 
+
+p_mouse_setgpio_hibernate_new:
+015e 2040019f call p_mouse_setgpio_hibernate 
+015f 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+0160 20406042 call gpio_clr_wake 
+0161 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
+0162 20406042 call gpio_clr_wake 
+0163 6fe0c913 fetch 1 ,mem_whee_a_data_gpio 
+0164 d8400080 arg gpcfg_pulldown ,temp 
+0165 20406093 call gpio_config_function_int 
+0166 6fe0c914 fetch 1 ,mem_whee_b_data_gpio 
+0167 d8400080 arg gpcfg_pulldown ,temp 
+0168 20206093 branch gpio_config_function_int 
+
+p_g24_send_abort_packet:
+0169 70483601 jam type_ms ,mem_24g_data_type 
+016a 7048a701 jam 1 ,mem_24g_abort_pac 
+016b 20402642 call g24_transmit_rf_ctrl_clear 
+016c 67e0c7c6 store 1 ,mem_24g_txbuf 
+016d 58000000 setarg 0 
+016e 67e3c7c7 store 7 ,mem_24g_txbuf + 1 
+016f 6fe248a9 fetch 4 ,mem_24g_device_addr 
+0170 67e247ce store 4 ,mem_24g_txbuf + 8 
+0171 7048350c jam 12 ,mem_24g_datalen 
+0172 6fe0c836 fetch 1 ,mem_24g_data_type 
+0173 79207e03 set1 bit_abort ,pdata 
+0174 67e0c836 store 1 ,mem_24g_data_type 
+0175 20402291 call g24_transmit_prep 
+0176 20200146 branch p_g24_transmit_start 
+
+p_g24_transmit_process:
+0177 7048a600 jam 0 ,mem_24g_retry 
+
+p_g24_transmit_loop:
+0178 6961015f fetchr timeup ,2 ,mem_param_rx_setup 
+0179 34730200 until clkn_rt ,meet 
+017a 2040265b call g24_transmit_receive_ack 
+017b 6fe0c82c fetch 1 ,mem_24g_no_ack 
+017c c000a651 beq no_ack_24g ,g24_transmit_no_ack 
+017d 242c0188 nbranch p_g24_retransmit ,sync 
+017e 24378188 nbranch p_g24_retransmit ,user3 
+017f 20402672 call g24_ackpayload_parse 
+0180 20400182 call p_mouse_wakeup_24g 
+0181 20202651 branch g24_transmit_no_ack 
+
+p_mouse_wakeup_24g:
+0182 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+0183 245a0238 ncall p_mouse_init_sensor_wakeup ,blank 
+0184 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+0185 245a00a3 ncall p_mouse_wheel_set_wakeup ,blank 
+0186 704be100 jam 0 ,mem_sensor_shutdown_flag 
+0187 20600000 rtn 
+
+p_g24_retransmit:
+0188 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+0189 247a0000 nrtn blank 
+018a 6fe148a3 fetch 2 ,mem_24g_txfail_cnt 
+018b 1fe0fe01 increase 1 ,pdata 
+018c 67e148a3 store 2 ,mem_24g_txfail_cnt 
+018d 6fe0c8a4 fetch 1 ,mem_24g_txfail_cnt + 1 
+018e c280a679 bbit1 1 ,g24_tx_attempt_fail 
+018f 2040267e call g24_transmit_hop_process 
+0190 20400192 call p_delay_40ms 
+0191 20200178 branch p_g24_transmit_loop 
+
+p_delay_40ms:
+0192 6fe0c8a4 fetch 1 ,mem_24g_txfail_cnt + 1 
+0193 1fe67c00 sub pdata ,0x00 ,null 
+0194 20610000 rtn positive 
+0195 df200028 arg 40 ,loopcnt 
+
+p_delay_ms_wait:
+0196 20002ee0 nop 12000 
+0197 c2007d13 loop delay_ms_wait 
+0198 20600000 rtn 
+
+p_mouse_app_enter_hibernate:
+0199 58000006 setarg pan_reg_config 
+019a 20405b0d call twspi_read 
+019b c281be23 bbit1 3 ,mouse_app_enter_hibernate + 3 
+019c 2040025a call p_mouse_sensor_reset 
+019d 20400261 call p_mouse_sensor_powerdown 
+019e 20203e23 branch mouse_app_enter_hibernate + 3 
+
+p_mouse_setgpio_hibernate:
+019f 204042e9 call mouse_set_sdio_high 
+01a0 20407fdc call clear_wake 
+01a1 20404015 call mouse_before_hibernate_wheel_gpio_set 
+01a2 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+01a3 20406069 call gpio_out_active 
+01a4 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+01a5 20406042 call gpio_clr_wake 
+01a6 6fe0c920 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+01a7 d840003f arg gpcfg_output_high ,temp 
+01a8 20406093 call gpio_config_function_int 
+01a9 20403e36 call mouse_setgpio_hibernate + 3 
+01aa 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+01ab c40a0000 rtnbit0 mouse_enable_adc 
+01ac 6fe0c8fd fetch 1 ,mem_adc_config_flag_init 
+01ad c1810000 rtnne adc_config_gpio 
+01ae 6fe0c8fc fetch 1 ,mem_adc_channel_gpio 
+01af d84000c0 arg gpcfg_no_ie ,temp 
+01b0 20206093 branch gpio_config_function_int 
+
+p_mouse_lpm_before_common:
+01b1 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+01b2 20406050 call gpio_config_input 
+01b3 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
+01b4 20406050 call gpio_config_input 
+01b5 20403f88 call mouse_wheel_check 
+01b6 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
+01b7 d840003f arg gpcfg_output_high ,temp 
+01b8 20406093 call gpio_config_function_int 
+01b9 20203e44 branch mouse_lpm_before_common_next 
+
+p_mouse_24g_hibernate_set:
+01ba 7048a500 jam 0 ,mem_24g_attempt_fail_flag 
+01bb 20402652 call g24_transmit_next_packet 
+01bc 5fffffff setarg -1 
+01bd 67e4485c store 8 ,mem_24g_enter_hibernate 
+01be 58000000 setarg 0 
+01bf 67e3c8d0 store 7 ,mem_mouse_key 
+01c0 704be101 jam 1 ,mem_sensor_shutdown_flag 
+01c1 20400261 call p_mouse_sensor_powerdown 
+01c2 20200158 branch p_g24_long_sleep 
+
+p_mouse_priority_bb_event:
+01c3 1a627e00 copy regc ,pdata 
+01c4 c01c81dd beq bt_evt_24g_pairing_complete ,p_mouse_24g_pairing_complete 
+01c5 c01e01df beq bt_evt_24g_attempt_success ,p_mouse_24g_attempt_success 
+01c6 c01d01e5 beq bt_evt_24g_attempt_fail ,p_mouse_24g_attempt_fail 
+01c7 c01901ca beq bt_evt_le_start_enc ,p_mouse_le_ll_start_encryt 
+01c8 c02201d1 beq bt_evt_le_parse_conn_param_accepted ,p_mouse_le_parse_conn_param_accepted 
+01c9 20204336 branch mouse_priority_bb_event + 2 
+
+p_mouse_le_ll_start_encryt:
+01ca 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+01cb c00081ce beq 1 ,p_mouse_le_ll_reconn_start_encryt 
+01cc 704b7614 jam 20 ,mem_le_start_encrypt_timer 
+01cd 20204373 branch mouse_le_ll_enable_start_enc_flag 
+
+p_mouse_le_ll_reconn_start_encryt:
+01ce 2040436c call mouse_updata_le_param 
+01cf 704b7605 jam 5 ,mem_le_start_encrypt_timer 
+01d0 20204373 branch mouse_le_ll_enable_start_enc_flag 
+
+p_mouse_le_parse_conn_param_accepted:
+01d1 6fe082c1 fetch 1 ,mem_le_new_conninterval 
+01d2 1fe67c0c sub pdata ,le_interval_15ms ,null 
+01d3 24214384 nbranch mouse_le_conn_param_lpm_disable ,positive 
+01d4 67e14372 store 2 ,mem_le_interval_min 
+01d5 67e14374 store 2 ,mem_le_interval_min + 2 
+01d6 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+01d7 6848cb8a fetcht 1 ,mem_lpm_mult_init 
+01d8 98467c00 isub temp ,null 
+01d9 2021439a branch mouse_le_lpm_mult_reinit ,positive 
+01da 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+01db 67e0cb8a store 1 ,mem_lpm_mult_init 
+01dc 20204386 branch mouse_le_conn_param_lpm_enable 
+
+p_mouse_24g_pairing_complete:
+01dd 204002a5 call p_mouse_discovey_led_blink_off 
+01de 20204857 branch mouse_24g_pairing_complete 
+
+p_mouse_24g_attempt_success:
+01df 204002a5 call p_mouse_discovey_led_blink_off 
+01e0 6fe2483c fetch 4 ,mem_24g_addr 
+01e1 67e24891 store 4 ,mem_24g_receiver_addr 
+01e2 67e24993 store 4 ,mem_mouse_24g_addr 
+01e3 204048c6 call mouse_device_poweron_timer_init 
+01e4 2020484e branch mouse_24g_attempt_success 
+
+p_mouse_24g_attempt_fail:
+01e5 6fe0c8a5 fetch 1 ,mem_24g_attempt_fail_flag 
+01e6 243a01ba nbranch p_mouse_24g_hibernate_set ,blank 
+01e7 6fe0c88b fetch 1 ,mem_24g_reconn_type 
+01e8 c00101ed beq fast_conn_and_3_0_addr ,p_mouse_24g_fast_conn_attempt_fail 
+01e9 c00201ff beq pair_and_3_0_addr ,p_mouse_24g_auto_pair_attempt_fail 
+01ea c0018206 beq receiver_and_3_0_addr ,p_mouse_reconn_dongle_attempt_fail 
+01eb 204002a5 call p_mouse_multi_led_blink_off 
+01ec 2020483a branch mouse_24g_attempt_fail_enter_hibernate + 1 
+
+p_mouse_24g_fast_conn_attempt_fail:
+01ed 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+01ee c29781fd bbit1 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_start_auto_pair 
+01ef c29801fd bbit1 mouse_enable_auto_24g_paring ,p_mouse_24g_start_auto_pair 
+01f0 6fe24993 fetch 4 ,mem_mouse_24g_addr 
+01f1 684a4974 fetcht 4 ,mem_mouse_compare_addr_ff 
+01f2 98467c00 isub temp ,null 
+01f3 202281f5 branch p_mouse_24g_start_pair_mode ,zero 
+01f4 20204806 branch mouse_24g_reconn_dongle_start 
+
+p_mouse_24g_start_pair_mode:
+01f5 d8e00001 arg mouse_24g_pairing_flag ,queue 
+01f6 204046f0 call mouse_enable_function_flag 
+01f7 58000000 setarg 0 
+01f8 67e14887 store 2 ,mem_24g_reconn_timeout 
+01f9 20404576 call mouse_stop_discovery 
+01fa 2040498e call mouse_low_voltage_led_blink_disable 
+01fb 2040028e call p_mouse_discovery_multi_led_blink 
+01fc 2020482e branch mouse_24g_start_pair_mode + 7 
+
+p_mouse_24g_start_auto_pair:
+01fd 2040028e call p_mouse_discovery_multi_led_blink 
+01fe 20204812 branch mouse_24g_start_auto_pair + 1 
+
+p_mouse_24g_auto_pair_attempt_fail:
+01ff 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0200 c3178204 bbit0 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_attempt_fail_enter_hibernate 
+0201 6fe0cbb4 fetch 1 ,mem_device_number 
+0202 c0008204 beq 1 ,p_mouse_24g_attempt_fail_enter_hibernate 
+0203 2020481a branch mouse_24g_first_bluetooth_reconnect 
+
+p_mouse_24g_attempt_fail_enter_hibernate:
+0204 204002a5 call p_mouse_multi_led_blink_off 
+0205 202001ba branch p_mouse_24g_hibernate_set 
+
+p_mouse_reconn_dongle_attempt_fail:
+0206 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0207 c3178204 bbit0 mouse_enable_24g_first_auto_pairing ,p_mouse_24g_attempt_fail_enter_hibernate 
+0208 c2898204 bbit1 mouse_enable_eeprom ,p_mouse_24g_attempt_fail_enter_hibernate 
+0209 c2890204 bbit1 mouse_enable_flash ,p_mouse_24g_attempt_fail_enter_hibernate 
+020a 20204812 branch mouse_24g_start_auto_pair + 1 
+
+p_mouse_start_work:
+020b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+020c c297c80a bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_start_auto_pair_mode 
+020d 6fe0c938 fetch 1 ,mem_device_flag 
+020e c0000212 beq mode_24g_device ,p_mouse_24g_start_mode 
+020f 20400394 call p_mouse_check_key_gpio 
+0210 c0028212 beq mouse_lm_button ,p_mouse_24g_start_mode 
+0211 20203d57 branch mouse_start_work + 5 
+
+p_mouse_24g_start_mode:
+0212 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0213 c308c803 bbit0 mouse_enable_24g ,mouse_24g_mode_setup_error 
+0214 20403d65 call mouse_wakeup_from_power_check 
+0215 20344806 branch mouse_24g_reconn_dongle_start ,user 
+0216 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0217 c298480c bbit1 mouse_enable_auto_24g_paring ,mouse_24g_reconn_general_dongle 
+0218 c318c80c bbit0 mouse_enable_24g_power_on_pairing ,mouse_24g_reconn_general_dongle 
+0219 20404110 call mouse_key_check_once 
+021a 1a217e07 and rega ,0x07 ,pdata 
+021b 202047ff branch mouse_24g_start_mode + 9 
+
+p_mouse_seting_dpi:
+021c 2040408f call mouse_setting_dpi_4_level 
+021d 2040022c call p_mouse_dpi_led_blink_delay 
+
+p_mouse_dpi_config:
+
+p_mouse_seting_sensor_type:
+021e 6fe0c927 fetch 1 ,mem_config_sensor_type 
+021f c001c0bb beq p3212 ,mouse_seting_3212_dpi 
+0220 c0058227 beq ka8g2 ,p_mouse_seting_ka8g2_dpi 
+0221 c000409b beq p3205 ,mouse_seting_sensor_type + 3 
+0222 6fe0c992 fetch 1 ,mem_mouse_dpi 
+0223 c00040a2 beq mouse_dpi_level1 ,mouse_set_cpi0 
+0224 c000c0a0 beq mouse_dpi_level2 ,mouse_set_cpi1 
+0225 c00140a6 beq mouse_dpi_level3 ,mouse_set_cpi3 
+0226 202040a0 branch mouse_set_cpi1 
+
+p_mouse_seting_ka8g2_dpi:
+0227 6fe0c992 fetch 1 ,mem_mouse_dpi 
+0228 c00040d6 beq mouse_dpi_level1 ,mouse_set_pka8g2_cpi0 
+0229 c000c0d4 beq mouse_dpi_level2 ,mouse_set_pka8g2_cpi1 
+022a c00140d8 beq mouse_dpi_level3 ,mouse_set_pka8g2_cpi2 
+022b 202040d4 branch mouse_set_pka8g2_cpi1 
+
+p_mouse_dpi_led_blink_delay:
+022c 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
+022d 247a0000 nrtn blank 
+022e 6fe14883 fetch 2 ,mem_24g_pair_timeout 
+022f 247a0000 nrtn blank 
+0230 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
+0231 247a0000 nrtn blank 
+0232 6fe0cbc1 fetch 1 ,mem_mouse_dpi_led_delay_count_init 
+0233 203a02cb branch p_mouse_dpi_led_blink_init ,blank 
+0234 67e0cba8 store 1 ,mem_mouse_dpi_led_delay_count 
+0235 20600000 rtn 
+
+p_mouse_init_sunt:
+0236 20403f65 call mouse_sensor_spi_init 
+0237 20758000 rtn wake 
+
+p_mouse_init_sensor_wakeup:
+0238 20404236 call mouse_sensor_poweron 
+
+p_mouse_init_sensor:
+0239 204041b5 call mouse_read_sensor_id 
+023a c0180240 beq p32xx_id1 ,p_mouse_init_p32xx_id2_judge 
+023b c018c217 beq p3065_id1 ,mouse_init_p3065 
+023c c02c4220 beq pka8g2_id1 ,mouse_ka8g2_id2_judge 
+023d 204041b2 call mouse_twspi_reset 
+023e 20001af4 nop 6900 
+023f 20200239 branch p_mouse_init_sensor 
+
+p_mouse_init_p32xx_id2_judge:
+0240 6fe0c9c2 fetch 1 ,mem_sensor_id2 
+0241 c02d0249 beq p_mx8650 ,p_mouse_mx8650_init_param 
+0242 c06c41cb beq p8009_id2 ,mouse_8009_init_param 
+0243 c068c1da beq p3205_tj3t_id2 ,mouse_3205_3t_init_param 
+0244 c06941e3 beq p3204_tj3l_id2 ,mouse_3204_3l_init_param 
+0245 c00141ea beq p3212_id2 ,mouse_3212_init_param 
+0246 c02a41ed beq pka8_id2 ,mouse_ka8_init_param_check 
+0247 c0284214 beq p6520a_id2 ,mouse_p6520_init_param 
+0248 20200239 branch p_mouse_init_sensor 
+
+p_mouse_mx8650_init_param:
+0249 70492705 jam mx8650 ,mem_config_sensor_type 
+024a 20404232 call mouse_sensor_reset 
+024b 20407d12 call delay_10ms 
+024c da604be6 arg mem_sensor_8650_init_new ,regc 
+024d 2040422b call mouse_sensor_wr_seq 
+024e 2020021e branch p_mouse_dpi_config 
+
+p_mouse_sensor_poweron:
+024f 20403f65 call mouse_sensor_spi_init 
+0250 6fe0c927 fetch 1 ,mem_config_sensor_type 
+0251 c0058256 beq ka8g2 ,p_mouse_ka8g2_sensor_init 
+0252 20404232 call mouse_sensor_reset 
+0253 da604aa3 arg mem_sensor_poweron_init ,regc 
+0254 2040422b call mouse_sensor_wr_seq 
+0255 2020021e branch p_mouse_dpi_config 
+
+p_mouse_ka8g2_sensor_init:
+0256 2040025d call p_mouse_ka8g2_sensor_reset 
+0257 da604c0e arg mem_ka8g2_sensor_poweron_init ,regc 
+0258 2040422b call mouse_sensor_wr_seq 
+0259 2020021e branch p_mouse_dpi_config 
+
+p_mouse_sensor_reset:
+025a 6fe0c927 fetch 1 ,mem_config_sensor_type 
+025b c005825d beq ka8g2 ,p_mouse_ka8g2_sensor_reset 
+025c 20204232 branch mouse_sensor_reset 
+
+p_mouse_ka8g2_sensor_reset:
+025d 58009706 setarg 0x9706 
+025e 20405b0c call twspi_write 
+025f 20002ee0 nop 12000 
+0260 20600000 rtn 
+
+p_mouse_sensor_powerdown:
+0261 204041a7 call mouse_init_sunt 
+0262 20403f65 call mouse_sensor_spi_init 
+0263 6fe0c927 fetch 1 ,mem_config_sensor_type 
+0264 c0058267 beq ka8g2 ,p_mouse_ka8g2_sensor_powerdown 
+0265 58000806 setarg 0x0806 
+0266 20205b0c branch twspi_write 
+
+p_mouse_ka8g2_sensor_powerdown:
+0267 58001f06 setarg 0x1f06 
+0268 20205b0c branch twspi_write 
+
+p_mouse_bb_event_timer:
+0269 20403e9b call mouse_adc_read 
+026a 2040037e call p_mouse_low_voltage_led_timer 
+026b 2040232b call g24_pair_timeout_timer 
+026c 20402556 call g24_reconn_timeout_timer 
+026d 204047cd call mouse_24g_long_sleep_param_update_timer 
+026e 204002c8 call p_mouse_dpi_led_blink_delay_timer 
+026f 20400280 call p_mouse_multi_led_blink_timer 
+0270 204002ba call p_mouse_multi_led_enable_delay_timer 
+0271 2040407c call mouse_dpi_key_check_long_press 
+0272 204044cc call mouse_bt_discovery_check 
+0273 204002de call p_mouse_commbination_key_process 
+0274 204044ff call mouse_check_discovery_timeout_timer 
+0275 20404504 call mouse_check_direct_timeout_timer 
+0276 20404512 call mouse_le_enable_att_list_timer 
+0277 2040451f call mouse_le_battery_updata_timer 
+0278 20404515 call mouse_le_send_smp_security_request_timer 
+0279 2040452a call mouse_check_hid_handshake_timer 
+027a 2040452d call mouse_bt_check_sniff_req_timeout_timer 
+027b 20404532 call mouse_check_reconnect_delay_long_sleep 
+027c 20404535 call mouse_current_mult_update_timer 
+027d 20404022 call mouse_wheel_trigger_timer 
+027e 20404547 call mouse_store_information_delay_timer 
+027f 202002c0 branch p_mouse_check_no_data_timeout_timer 
+
+p_mouse_multi_led_blink_timer:
+0280 6fe0cc16 fetch 1 ,mem_mouse_multi_led_blink_enable 
+0281 207a0000 rtn blank 
+0282 6fe0cc19 fetch 1 ,mem_mouse_multi_led_type 
+0283 c0008295 beq multi_led_blink ,p_mouse_multi_led_type_blink 
+
+p_mouse_multi_led_type_on:
+0284 204002a2 call p_mouse_multi_led_on 
+0285 6fe0cc1a fetch 1 ,mem_mouse_multi_led_on_timer 
+0286 1fe0fe01 increase 1 ,pdata 
+0287 67e0cc1a store 1 ,mem_mouse_multi_led_on_timer 
+0288 6848cc1b fetcht 1 ,mem_mouse_multi_led_on_timer_init 
+0289 98467c00 isub temp ,null 
+028a 2042828c call p_mouse_multi_led_off_poweron2s ,zero 
+028b 20600000 rtn 
+
+p_mouse_multi_led_off_poweron2s:
+028c 704c2000 jam 0 ,mem_mouse_multi_led_on_poweron2s_flag 
+028d 202002a7 branch p_mouse_multi_led_off 
+
+p_mouse_discovery_multi_led_blink:
+028e 704c1c02 jam 2 ,mem_mouse_multi_led_blink_timer_init 
+
+p_mouse_discovery_multi_led_blink1:
+028f 704c1f00 jam 0 ,mem_mouse_multi_led_blink_count_limited 
+0290 704c1e01 jam 1 ,mem_mouse_multi_led_blink_count 
+
+p_mouse_multi_led_blink_enable:
+0291 704c1d05 jam 5 ,mem_mouse_multi_led_blink_timer 
+0292 704c1601 jam on ,mem_mouse_multi_led_blink_enable 
+0293 704c1901 jam multi_led_blink ,mem_mouse_multi_led_type 
+0294 20600000 rtn 
+
+p_mouse_multi_led_type_blink:
+0295 da604c1d arg mem_mouse_multi_led_blink_timer ,regc 
+0296 da400298 arg p_mouse_multi_led_type_blink_timeout ,regb 
+0297 2020318a branch timer_single_step 
+
+p_mouse_multi_led_type_blink_timeout:
+0298 6fe0cc1c fetch 1 ,mem_mouse_multi_led_blink_timer_init 
+0299 67e0cc1d store 1 ,mem_mouse_multi_led_blink_timer 
+029a 6fe0cc1f fetch 1 ,mem_mouse_multi_led_blink_count_limited 
+029b 203a02a0 branch p_mouse_multi_led_blink_count_no_limited ,blank 
+029c 6fe0cc1e fetch 1 ,mem_mouse_multi_led_blink_count 
+029d 203a02a5 branch p_mouse_multi_led_blink_off ,blank 
+029e 1fe0ffff increase -1 ,pdata 
+029f 67e0cc1e store 1 ,mem_mouse_multi_led_blink_count 
+
+p_mouse_multi_led_blink_count_no_limited:
+02a0 6fe0cc18 fetch 1 ,mem_mouse_multi_led_state 
+02a1 c00082a7 beq on ,p_mouse_multi_led_off 
+
+p_mouse_multi_led_on:
+02a2 704c1801 jam on ,mem_mouse_multi_led_state 
+02a3 6848cc17 fetcht 1 ,mem_mouse_multi_led_gpio 
+02a4 20206069 branch gpio_out_active 
+
+p_mouse_discovey_led_blink_off:
+
+p_mouse_multi_led_blink_off:
+02a5 58000000 setarg 0 
+02a6 67e1cc1d store 3 ,mem_mouse_multi_led_blink_timer 
+
+p_mouse_multi_led_off:
+02a7 6fe0cc1e fetch 1 ,mem_mouse_multi_led_blink_count 
+02a8 243a02ab nbranch p_mouse_multi_led_off_wait_blink_over ,blank 
+02a9 704c1600 jam 0 ,mem_mouse_multi_led_blink_enable 
+02aa 704c1900 jam 0 ,mem_mouse_multi_led_type 
+
+p_mouse_multi_led_off_wait_blink_over:
+02ab 704c1a00 jam 0 ,mem_mouse_multi_led_on_timer 
+02ac 704c1800 jam off ,mem_mouse_multi_led_state 
+
+p_mouse_multi_led_gpio_set_high:
+02ad 6fe0cc17 fetch 1 ,mem_mouse_multi_led_gpio 
+02ae c00182b1 beq ice_reuse_gpio ,p_mouse_multi_led_gpio_config_input 
+02af 6848cc17 fetcht 1 ,mem_mouse_multi_led_gpio 
+02b0 20206065 branch gpio_out_inactive 
+
+p_mouse_multi_led_gpio_config_input:
+02b1 6848cc17 fetcht 1 ,mem_mouse_multi_led_gpio 
+02b2 20203f56 branch mouse_gpio_config_input_pu 
+
+p_mouse_mode_bt_device1_multi_led_on:
+
+p_mouse_mode_24g_device_multi_led_on:
+02b3 704c2103 jam 3 ,mem_mouse_led_enable_delay_timer 
+02b4 20600000 rtn 
+
+p_mouse_mode_24g_device_multi_led_on_enable:
+02b5 704c2001 jam 1 ,mem_mouse_multi_led_on_poweron2s_flag 
+02b6 704c1601 jam on ,mem_mouse_multi_led_blink_enable 
+02b7 704c1900 jam multi_led_on ,mem_mouse_multi_led_type 
+02b8 704c1a00 jam 0 ,mem_mouse_multi_led_on_timer 
+02b9 20600000 rtn 
+
+p_mouse_multi_led_enable_delay_timer:
+02ba da604c21 arg mem_mouse_led_enable_delay_timer ,regc 
+02bb da4002b5 arg p_mouse_mode_24g_device_multi_led_on_enable ,regb 
+02bc 2020318a branch timer_single_step 
+
+p_mouse_dpi_multi_led_blink:
+02bd 704c1c02 jam 2 ,mem_mouse_multi_led_blink_timer_init 
+02be 704c1f01 jam 1 ,mem_mouse_multi_led_blink_count_limited 
+02bf 20200291 branch p_mouse_multi_led_blink_enable 
+
+p_mouse_check_no_data_timeout_timer:
+02c0 6fe0c92a fetch 1 ,mem_usb_addr 
+02c1 c3838000 rtnbit1 7 
+02c2 da604ab2 arg mem_mouse_no_data_timer ,regc 
+02c3 da4002c5 arg p_mouse_check_no_data_timeout ,regb 
+02c4 20203191 branch timer_single_step_2b 
+
+p_mouse_check_no_data_timeout:
+02c5 6fe0c938 fetch 1 ,mem_device_flag 
+02c6 c00001ba beq mode_24g_device ,p_mouse_24g_hibernate_set 
+02c7 2020431b branch mouse_disconnect 
+
+p_mouse_dpi_led_blink_delay_timer:
+02c8 da604ba8 arg mem_mouse_dpi_led_delay_count ,regc 
+02c9 da4002cb arg p_mouse_dpi_led_blink_init ,regb 
+02ca 2020318a branch timer_single_step 
+
+p_mouse_dpi_led_blink_init:
+02cb 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+02cc c28e02d1 bbit1 mouse_enable_dpi_level_4 ,p_mouse_dpi_led_blink_four_level 
+
+p_mouse_dpi_led_blink_three_level:
+02cd 6fe0c992 fetch 1 ,mem_mouse_dpi 
+02ce c00002d8 beq 0 ,p_mouse_dpi_led_blink_twice 
+02cf c00082da beq 1 ,p_mouse_dpi_led_blink_thrice 
+02d0 202002d6 branch p_mouse_dpi_led_blink_once 
+
+p_mouse_dpi_led_blink_four_level:
+02d1 6fe0c992 fetch 1 ,mem_mouse_dpi 
+02d2 c00002da beq 0 ,p_mouse_dpi_led_blink_thrice 
+02d3 c00082dc beq 1 ,p_mouse_dpi_led_blink_quartic 
+02d4 c00102d6 beq 2 ,p_mouse_dpi_led_blink_once 
+02d5 202002d8 branch p_mouse_dpi_led_blink_twice 
+
+p_mouse_dpi_led_blink_once:
+02d6 704c1e01 jam 1 ,mem_mouse_multi_led_blink_count 
+02d7 202002bd branch p_mouse_dpi_multi_led_blink 
+
+p_mouse_dpi_led_blink_twice:
+02d8 704c1e03 jam 3 ,mem_mouse_multi_led_blink_count 
+02d9 202002bd branch p_mouse_dpi_multi_led_blink 
+
+p_mouse_dpi_led_blink_thrice:
+02da 704c1e05 jam 5 ,mem_mouse_multi_led_blink_count 
+02db 202002bd branch p_mouse_dpi_multi_led_blink 
+
+p_mouse_dpi_led_blink_quartic:
+02dc 704c1e07 jam 7 ,mem_mouse_multi_led_blink_count 
+02dd 202002bd branch p_mouse_dpi_multi_led_blink 
+
+p_mouse_commbination_key_process:
+02de 6fe0c938 fetch 1 ,mem_device_flag 
+02df c00002e4 beq mode_24g_device ,p_mouse_24g_commbination_key_process 
+02e0 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+02e1 c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
+02e2 6848cbca fetcht 1 ,mem_mouse_commbination_key_bt 
+02e3 202002e7 branch p_mouse_commbination_key_start 
+
+p_mouse_24g_commbination_key_process:
+02e4 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+02e5 c4190000 rtnbit0 mouse_enable_commbination_key_by_24g_pairing 
+02e6 6848cbcb fetcht 1 ,mem_mouse_commbination_key_24g 
+
+p_mouse_commbination_key_start:
+02e7 6048cb9d storet 1 ,mem_mouse_commbination_key 
+02e8 20404115 call mouse_check_key_gpio 
+02e9 1fe17e07 and pdata ,0x07 ,pdata 
+02ea 6848cb9d fetcht 1 ,mem_mouse_commbination_key 
+02eb 98467c00 isub temp ,null 
+02ec 202282ee branch p_mouse_commbination_key_down ,zero 
+02ed 202044eb branch mouse_commbination_key_up 
+
+p_mouse_commbination_key_down:
+02ee 204044f6 call mouse_combination_ui_timer 
+02ef 6fe0cb9f fetch 1 ,mem_commbination_key_statue 
+02f0 c1008000 rtneq commbination_key_state_down 
+02f1 704b9f01 jam commbination_key_state_down ,mem_commbination_key_statue 
+02f2 20600000 rtn 
+
+p_mouse_start_discovery:
+02f3 6fe1478c fetch 2 ,mem_ui_state_map 
+02f4 2feffe0b isolate1 ui_state_ble_adv ,pdata 
+02f5 2040c581 call mouse_stop_le_adv ,true 
+02f6 6fe1478c fetch 2 ,mem_ui_state_map 
+02f7 2feffe07 isolate1 ui_state_bt_reconnect ,pdata 
+02f8 2040c322 call mouse_cancel_reconnect ,true 
+02f9 20204554 branch mouse_start_discovery + 1 
+
+p_ui_timer_check:
+02fa 6fe0cbe2 fetch 1 ,mem_power_on_flag 
+02fb 245a7861 ncall ui_timer_init ,blank 
+02fc 704be200 jam 0 ,mem_power_on_flag 
+02fd 20207851 branch ui_timer_check + 1 
+
+p_hid_rx_process:
+02fe 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+02ff 1fe20c00 copy pdata ,contr 
+0300 efe08006 ifetch 1 ,contr 
+0301 67e0c5f5 store 1 ,mem_l2cap_rcv_hidtype 
+0302 1fe1040f and pdata ,0x0f ,temp 
+0303 1ff1fe00 rshift4 pdata ,pdata 
+0304 c0048306 beq hid_type_set_idle ,p_hid_rx_process_handshake 
+0305 20204d93 branch hid_rx_process + 7 
+
+p_hid_rx_process_handshake:
+0306 da200001 arg 1 ,rega 
+0307 20404dc0 call hid_malloc_tx_buff 
+0308 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+0309 e7e10005 istore 2 ,contw 
+030a 58000000 setarg 0 
+030b e7e08005 istore 1 ,contw 
+030c 70095001 jam 1 ,mem_ui_data_txbuff_length 
+030d 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+030e 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
+030f 67e0c4e2 store 1 ,mem_hid_control_state 
+0310 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
+0311 20207871 branch ui_ipc_send_event 
+
+p_le_slave_match:
+0312 6fe0c3dd fetch 1 ,mem_le_md_count 
+0313 1fe0fe01 pincrease 1 
+0314 67e0c3dd store 1 ,mem_le_md_count 
+0315 c006165a beq le_md_max_count ,le_slave_cont 
+0316 2040191b call le_acknowledge 
+0317 2040196a call le_prepare_tx 
+0318 6fe082bd fetch 1 ,mem_le_tx_phy 
+0319 2040168b call le_enable_phy_by_pdata 
+031a 20401838 call le_transmit 
+031b 20201655 branch le_slave_match + 10 
+
+p_le_parse_l2cap:
+031c efe10006 ifetch 2 ,contr 
+031d c002031f beq le_l2cap_cid_att ,p_le_parse_att 
+031e 202019e4 branch le_parse_l2cap + 10 
+
+p_le_parse_att:
+031f efe18006 ifetch 3 ,contr 
+0320 67e1c436 store 3 ,mem_le_att_opcode 
+0321 c0090323 beq attop_write_request ,p_le_parse_att_write_request 
+0322 20201cd3 branch le_parse_att + 2 
+
+p_le_parse_att_write_request:
+0323 18c22200 copy contr ,rega 
+0324 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+0325 1fe0a5fd add pdata ,-3 ,regb 
+0326 20401a25 call le_writeatt_cb 
+0327 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+0328 c07f9e73 beq 0xff ,le_send_att_write_response_check_auth 
+0329 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+032a 203a1e73 branch le_send_att_write_response_check_auth ,blank 
+032b 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+032c c2809e73 bbit1 ll_start_enc_flag ,le_send_att_write_response_check_auth 
+032d 5800001a setarg 0x001a 
+032e 68494437 fetcht 2 ,mem_le_att_handle 
+032f 98467c00 isub temp ,null 
+0330 24229e73 nbranch le_send_att_write_response_check_auth ,zero 
+0331 7002d805 jam att_err_insufficient_authentication ,mem_le_err_code 
+0332 20201ec9 branch le_send_att_error_response 
+
+p_g24_lpm_wait:
+0333 6fe0cbaa fetch 1 ,mem_24g_device_led_status 
+0334 245a26e1 ncall g24_transmit_by_interrupt_enable ,blank 
+0335 78347c00 enable user 
+0336 20401465 call lpo_calibration 
+0337 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+0338 203a7e56 branch disable_user ,blank 
+0339 6fe0c099 fetch 1 ,mem_lpm_mode 
+033a 203a7e56 branch disable_user ,blank 
+
+p_g24_setgpio_lpm_before:
+033b 6fe1489f fetch 2 ,mem_cb_24g_lpm_before 
+033c 20207e05 branch callback_func 
+
+p_mouse_motion:
+033d 78547c00 disable user 
+033e 58000000 setarg 0 
+033f 67e348d1 store 6 ,mem_mouse_x 
+0340 20404240 call mouse_check_sensor_data 
+0341 2040021e call p_mouse_dpi_config 
+0342 20403f7e call mouse_zwheel 
+0343 20403f83 call mouse_t_zwheel 
+0344 204040dc call mouse_key 
+0345 6fe0c8d0 fetch 1 ,mem_mouse_key 
+0346 1fe17e1f and_into 0x1f ,pdata 
+0347 67e0c8d0 store 1 ,mem_mouse_key 
+0348 24344728 nbranch mouse_drawing_optima_init ,user 
+0349 2040034b call p_mouse_drawing_optima 
+034a 20204544 branch mouse_no_data_timer_init 
+
+p_mouse_drawing_optima:
+034b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+034c c41c0000 rtnbit0 mouse_enable_smoother 
+034d 6fe0c927 fetch 1 ,mem_config_sensor_type 
+034e c1018000 rtneq p3212 
+034f c1000000 rtneq p3205 
+0350 6fe248d1 fetch 4 ,mem_mouse_x 
+0351 207a0000 rtn blank 
+0352 204047bd call mouse_data_abs_check 
+0353 58000006 setarg 0x06 
+0354 204047b3 call mouse_pdata_greater_than_check 
+0355 205a47af call mouse_disable_asm ,blank 
+0356 245a47b1 ncall mouse_enable_asm ,blank 
+0357 58000004 setarg 0x04 
+0358 204047b8 call mouse_data_less_than_check 
+0359 205a47af call mouse_disable_asm ,blank 
+035a 6fe0c9c9 fetch 1 ,mem_mouse_asm_flag 
+035b c000c72d beq 1 ,mouse_drawing_optima_modify 
+035c 20204728 branch mouse_drawing_optima_init 
+
+p_mouse_adc_read_start:
+035d 6fe0cbaa fetch 1 ,mem_24g_device_led_status 
+035e 247a0000 nrtn blank 
+035f 2040005a call p_enable_adc 
+0360 7048f600 jam 0 ,mem_adc_read_timer 
+0361 20406125 call vdd_calculate_by_mode 
+0362 67e148e9 store 2 ,mem_mouse_vdd_now_vol 
+0363 d8400012 arg 0x0012 ,temp 
+0364 98467c00 isub temp ,null 
+0365 24210376 nbranch p_mouse_adc_gpio_connect_gnd ,positive 
+0366 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+0367 c081036e bne adc_config_gpio ,p_mouse_adc_data_process 
+0368 684948e9 fetcht 2 ,mem_mouse_vdd_now_vol 
+0369 184ffe08 mul32 temp ,8 ,pdata 
+036a 1fe6fc0a div pdata ,10 
+036b 20407dec call get_div_result 
+036c 9840fe00 iadd temp ,pdata 
+036d 67e148e9 store 2 ,mem_mouse_vdd_now_vol 
+
+p_mouse_adc_data_process:
+036e da2048e3 arg mem_mouse_vdd_calculate_set ,rega 
+036f 20403ed8 call mouse_adc_bat_percent_lowpower_out 
+0370 6fe0c4a4 fetch 1 ,mem_adc_power_flag 
+0371 c2813f1a bbit1 2 ,mouse_adc_button_press 
+0372 c280bf1c bbit1 1 ,mouse_power_down 
+0373 c3000378 bbit0 0 ,p_mouse_adc_no_low_voltage 
+0374 7048fa01 jam 1 ,mem_mouse_adc_last_low_voltage_flag 
+0375 20203ece branch mouse_adc_low_voltage 
+
+p_mouse_adc_gpio_connect_gnd:
+0376 6848c8fc fetcht 1 ,mem_adc_channel_gpio 
+0377 20403f54 call mouse_gpio_config_input_pd 
+
+p_mouse_adc_no_low_voltage:
+0378 d8e00004 arg mouse_low_voltage_flag ,queue 
+0379 204046f4 call mouse_disable_function_flag 
+037a 6fe0c8fa fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
+037b 207a0000 rtn blank 
+037c 7048fa00 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
+037d 202002a7 branch p_mouse_multi_led_off 
+
+p_mouse_low_voltage_led_timer:
+037e 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
+037f 247a0000 nrtn blank 
+0380 6fe14883 fetch 2 ,mem_24g_pair_timeout 
+0381 247a0000 nrtn blank 
+0382 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
+0383 247a0000 nrtn blank 
+0384 20404904 call mouse_check_dpi_blink 
+0385 20740000 rtn user 
+0386 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+0387 c4108000 rtnbit0 mouse_enable_low_voltage_led 
+0388 c4020000 rtnbit0 mouse_low_voltage_flag 
+0389 c291c97c bbit1 mouse_enable_low_voltage_led_blink_n_second ,mouse_low_voltage_led_blink_new_data 
+038a 6fe0c8f8 fetch 1 ,mem_adc_low_volatage_led_timer_count 
+038b 1fe0fe01 increase 1 ,pdata 
+038c 67e0c8f8 store 1 ,mem_adc_low_volatage_led_timer_count 
+038d 1fe67c32 sub pdata ,50 ,null 
+038e 24410392 ncall p_mouse_adc_low_volatage_led_timer_count_clean ,positive 
+038f c00f02a2 beq 30 ,p_mouse_multi_led_on 
+0390 c01382a7 beq 39 ,p_mouse_multi_led_off 
+0391 20600000 rtn 
+
+p_mouse_adc_low_volatage_led_timer_count_clean:
+0392 7048f801 jam 1 ,mem_adc_low_volatage_led_timer_count 
+0393 202002a7 branch p_mouse_multi_led_off 
+
+p_mouse_check_key_gpio:
+0394 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+0395 245a4121 ncall mouse_check_key_gpio_once ,blank 
+0396 da200000 arg 0 ,rega 
+0397 2040039d call p_mouse_check_lkey_gpio 
+0398 204003a2 call p_mouse_check_rkey_gpio 
+0399 204003a7 call p_mouse_check_mkey_gpio 
+039a 204003ac call p_mouse_check_bkkey_gpio 
+039b 204003b9 call p_mouse_check_fwkey_gpio 
+039c 2020411e branch mouse_check_key_gpio_next 
+
+p_mouse_check_lkey_gpio:
+039d 6fe0c918 fetch 1 ,mem_lbutton_gpio 
+039e 204003c6 call p_mouse_gpio_config_output_high 
+039f 20404124 call mouse_check_lkey_gpio 
+03a0 6848c918 fetcht 1 ,mem_lbutton_gpio 
+03a1 20203f56 branch mouse_gpio_config_input_pu 
+
+p_mouse_check_rkey_gpio:
+03a2 6fe0c919 fetch 1 ,mem_rbutton_gpio 
+03a3 204003c6 call p_mouse_gpio_config_output_high 
+03a4 2040412a call mouse_check_rkey_gpio 
+03a5 6848c919 fetcht 1 ,mem_rbutton_gpio 
+03a6 20203f56 branch mouse_gpio_config_input_pu 
+
+p_mouse_check_mkey_gpio:
+03a7 6fe0c91a fetch 1 ,mem_mbutton_gpio 
+03a8 204003c6 call p_mouse_gpio_config_output_high 
+03a9 20404130 call mouse_check_mkey_gpio 
+03aa 6848c91a fetcht 1 ,mem_mbutton_gpio 
+03ab 20203f56 branch mouse_gpio_config_input_pu 
+
+p_mouse_check_bkkey_gpio:
+03ac 6fe0c90d fetch 1 ,mem_bk_button_gpio 
+03ad c17f8000 rtneq gpio_disable 
+03ae 704b9603 jam mouse_bk_key ,mem_mouse_key_temp 
+03af 6fe0cb91 fetch 1 ,mem_mouse_bkkey_press_status 
+03b0 1fe22600 copy pdata ,regc 
+03b1 6848c90d fetcht 1 ,mem_bk_button_gpio 
+03b2 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+03b3 c07f83b5 beq gpio_disable ,p_mouse_3io6key_bk_check 
+03b4 2020413e branch mouse_check_bkkey_gpio_next 
+
+p_mouse_3io6key_bk_check:
+03b5 6fe0c90d fetch 1 ,mem_bk_button_gpio 
+03b6 204003c8 call p_mouse_gpio_config_output_low 
+03b7 6848c90d fetcht 1 ,mem_bk_button_gpio 
+03b8 2020414b branch mouse_3io6key_bk_check 
+
+p_mouse_check_fwkey_gpio:
+03b9 6fe0c90e fetch 1 ,mem_fw_button_gpio 
+03ba c17f8000 rtneq gpio_disable 
+03bb 704b9604 jam mouse_fw_key ,mem_mouse_key_temp 
+03bc 6fe0cb92 fetch 1 ,mem_mouse_fwkey_press_status 
+03bd 1fe22600 copy pdata ,regc 
+03be 6848c90e fetcht 1 ,mem_fw_button_gpio 
+03bf 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+03c0 c07f83c2 beq gpio_disable ,p_mouse_3io6key_fw_check 
+03c1 20204157 branch mouse_check_fwkey_gpio_next 
+
+p_mouse_3io6key_fw_check:
+03c2 6fe0c90e fetch 1 ,mem_fw_button_gpio 
+03c3 204003c8 call p_mouse_gpio_config_output_low 
+03c4 6848c90e fetcht 1 ,mem_fw_button_gpio 
+03c5 20204164 branch mouse_3io6key_fw_check 
+
+p_mouse_gpio_config_output_high:
+03c6 d840003f arg gpcfg_output_high ,temp 
+03c7 20206093 branch gpio_config_function_int 
+
+p_mouse_gpio_config_output_low:
+03c8 d840003e arg gpcfg_output_low ,temp 
+03c9 20206093 branch gpio_config_function_int 
+
+p_mouse_idle:
+03ca 20404990 call mouse_low_voltage_led_no_enter_lpm 
+03cb 20407936 call ui_check_paring_button 
+03cc 204003ce call p_mouse_dpi_check 
+03cd 2020464f branch mouse_idle + 4 
+
+p_mouse_dpi_check:
+03ce 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+03cf c2974036 bbit1 mouse_enable_dpi_key_connect_adc ,mouse_dpi_check_connect_adc 
+03d0 6fe0c90f fetch 1 ,mem_dpi_button_gpio 
+03d1 c17f8000 rtneq gpio_disable 
+03d2 da200000 arg 0 ,rega 
+03d3 704b9605 jam mouse_dpi_key ,mem_mouse_key_temp 
+03d4 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+03d5 204003d7 call p_mouse_dpi_key_check 
+03d6 2020402f branch mouse_dpi_check_next 
+
+p_mouse_dpi_key_check:
+03d7 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+03d8 c2964048 bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
+03d9 6fe0cb93 fetch 1 ,mem_mouse_dpikey_press_status 
+03da 1fe22600 copy pdata ,regc 
+03db 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+03dc c07f83de beq gpio_disable ,p_mouse_3io6key_dpi_check 
+03dd 2020403f branch mouse_dpi_key_check_next 
+
+p_mouse_3io6key_dpi_check:
+03de 6fe0c90f fetch 1 ,mem_dpi_button_gpio 
+03df 204003c8 call p_mouse_gpio_config_output_low 
+03e0 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+03e1 20204195 branch mouse_3io6key_check 
+              org 0x800
+
+start:
+0800 20401410 call lpmstate 
+
+soft_reset:
+0801 44804000 bpatch patch00_0 ,mem_patch00 
+0802 20800000 clear_stack 
+0803 204030f3 call app_param_init 
+0804 2040124a call initialize_radio 
+0805 20405d96 call iic_init_360khz 
+0806 20401384 call init_param 
+0807 20404dc7 call l2cap_init 
+0808 4480c000 bpatch patch00_1 ,mem_patch00 
+0809 204062bb call rfcomm_init 
+080a 20405381 call init_lmp 
+080b 204077b4 call ui_init 
+080c 204030dc call app_init 
+080d 2455e0b9 ncall adc_init_data ,wake 
+080e 44814000 bpatch patch00_2 ,mem_patch00 
+080f 2055b0ea call app_lpm_init ,wake 
+0810 20406ea4 call publickey_init 
+0811 20406ec6 call sp_wait_pubkey_calc_done 
+0812 205594b5 call lpm_recover_clk ,wake 
+
+main_loop:
+0813 4481c000 bpatch patch00_3 ,mem_patch00 
+0814 2040706c call sp_calc_sequence 
+0815 20407597 call sp_calc_sequence_256 
+0816 20406ea7 call sp_calc_sequence_256_check 
+0817 20401b92 call le_advertising_dispatch 
+0818 2040083a call idle_dispatch 
+0819 20403107 call app_process_idle 
+081a 44824000 bpatch patch00_4 ,mem_patch00 
+081b 20400891 call inquiry_dispatch 
+081c 20400b07 call inquiry_scan_dispatch 
+081d 20400b7a call page_scan_dispatch 
+081e 20400822 call connection_dispatch 
+081f 204021d1 call g24_dispatch 
+0820 204014dd call lpm_dispatch 
+0821 20200813 branch main_loop 
+
+connection_dispatch:
+0822 c61a0000 rtnmark1 mark_adc_enable 
+0823 20400828 call connection_incontext 
+0824 c6848000 rtnmark0 mark_context 
+0825 793f8009 set0 mark_context ,mark 
+0826 20400a32 call context_save 
+0827 202016b2 branch le_disable 
+
+connection_incontext:
+0828 4482c000 bpatch patch00_5 ,mem_patch00 
+0829 20400a6d call context_search_insniff 
+082a 24228831 nbranch connection_nosniff ,zero 
+082b 20400a19 call context_load 
+082c 1a208c01 add rega ,coffset_mode ,contr 
+082d efe08006 ifetch 1 ,contr 
+082e c280161f bbit1 mode_le ,le_conn_dispatch 
+082f c280896b bbit1 mode_master ,master_dispatch 
+0830 20200be0 branch slave_dispatch 
+
+connection_nosniff:
+0831 20400a3a call context_get_next 
+0832 1f227c00 copy loopcnt ,null 
+0833 20628000 rtn zero 
+0834 20400a19 call context_load 
+0835 6fe08031 fetch 1 ,mem_state 
+0836 c28188d5 bbit1 state_inpage ,master_page 
+0837 6fe08032 fetch 1 ,mem_mode 
+0838 c280896b bbit1 mode_master ,master_dispatch 
+0839 20200be0 branch slave_dispatch 
+
+idle_dispatch:
+083a 6fe0c1db fetch 1 ,mem_hci_cmd 
+083b 207a0000 rtn blank 
+083c c000884a beq hci_cmd_inquiry ,idle_inquiry 
+083d c001084f beq hci_cmd_inquiry_cancel ,idle_inquiry_cancel 
+083e c0018852 beq hci_cmd_remote_name_req ,idle_remote_name_req 
+083f c0028857 beq hci_cmd_create_conn ,idle_create_conn 
+0840 c00d8847 beq hci_cmd_le_create_conn ,idle_le_create_conn 
+0841 20400a66 call context_search_conn_handle 
+0842 20628000 rtn zero 
+0843 20400a69 call context_search_plap 
+0844 20628000 rtn zero 
+
+idle_exit:
+0845 7041db00 jam 0 ,mem_hci_cmd 
+0846 20600000 rtn 
+
+idle_le_create_conn:
+0847 7002e01b jam hci_cmd_le_create_conn ,mem_cmd_le_create_conn 
+0848 7041db00 jam 0 ,mem_hci_cmd 
+0849 20600000 rtn 
+
+idle_inquiry:
+084a 7920001c set1 mark_inquiry_on ,mark 
+084b 793f801e set0 mark_inquiry_trainb ,mark 
+084c 70008dff jam param_ninquiry ,mem_ninqy_index 
+084d 70008b1f jam 31 ,mem_nfreq_index_inq 
+084e 20200845 branch idle_exit 
+
+idle_inquiry_cancel:
+084f 793f801c set0 mark_inquiry_on ,mark 
+0850 18003600 force 0 ,stop_watch 
+0851 20200845 branch idle_exit 
+
+idle_remote_name_req:
+0852 20400a69 call context_search_plap 
+0853 20628000 rtn zero 
+0854 18000401 force lmp_name_req ,temp 
+0855 7000be05 jam 5 ,mem_nameres_cnt 
+0856 2020085e branch idle_start_page 
+
+idle_create_conn:
+0857 44834000 bpatch patch00_6 ,mem_patch00 
+
+idle_create_conn_device:
+0858 6fe341dd fetch 6 ,mem_hci_plap 
+0859 20000001 nop 1 
+085a 70478b01 jam reconnect_hid ,memui_reconnect_mode 
+085b 70005603 jam conn_sm_wait_features_res ,mem_conn_sm 
+085c 2020085d branch idle_create_conn_cont 
+
+idle_create_conn_cont:
+085d 18000425 force lmp_version_req ,temp 
+
+idle_start_page:
+085e 4483c000 bpatch patch00_7 ,mem_patch00 
+085f 6fe080a8 fetch 1 ,mem_page_mode 
+0860 203a0864 branch idle_page_mode_r0 ,blank 
+0861 1fe9fe00 lshift3 pdata ,pdata 
+0862 1ff27e00 lshift4 pdata ,pdata 
+0863 1fe0ffff increase -1 ,pdata 
+
+idle_page_mode_r0:
+0864 67e0c0ae store 1 ,mem_npage 
+0865 67e080a7 store 1 ,mem_npage_index 
+0866 70008c1f jam 31 ,mem_nfreq_index_page 
+0867 793f800c set0 mark_page_trainb ,mark 
+0868 20400a4a call context_new 
+0869 24228885 nbranch idle_page_fail ,zero 
+086a 2040135d call get_free_amaddr 
+086b 67e08078 store 1 ,mem_amaddr 
+086c 6048807d storet 1 ,mem_lmo_opcode2 
+086d 6fe341dd fetch 6 ,mem_hci_plap 
+086e 67e30041 store 6 ,mem_plap 
+086f 44844001 bpatch patch01_0 ,mem_patch01 
+0870 20407d73 call timer_reinit 
+0871 18007e00 force 0 ,pdata 
+0872 2841fe01 compare lmp_name_req ,temp ,0xff 
+0873 7d20fe05 nsetflag true ,state_init_seq ,pdata 
+0874 79207e03 set1 state_inpage ,pdata 
+0875 67e08031 store 1 ,mem_state 
+0876 70095b03 jam bt_evt_reconn_started ,mem_fifo_temp 
+0877 20407871 call ui_ipc_send_event 
+0878 18007e00 force 0 ,pdata 
+0879 7920fe04 setflag true ,smap_name_req ,pdata 
+087a 67e0804d store 1 ,mem_state_map 
+087b 58000000 setarg 0 
+087c 79207e01 set1 mode_master ,pdata 
+087d 67e08032 store 1 ,mem_mode 
+087e 7834fc00 enable master 
+087f 20400a32 call context_save 
+0880 7854fc00 disable master 
+0881 18000e03 force page_length_timer ,queue 
+0882 6fe140c1 fetch 2 ,mem_page_to 
+0883 20407d66 call timer_init 
+0884 20200845 branch idle_exit 
+
+idle_page_fail:
+0885 4484c001 bpatch patch01_1 ,mem_patch01 
+0886 6fe341dd fetch 6 ,mem_hci_plap 
+0887 67e30041 store 6 ,mem_plap 
+0888 2841fe01 compare lmp_name_req ,temp ,0xff 
+0889 2020888b branch idle_name_fail ,true 
+088a 20200845 branch idle_exit 
+
+idle_name_fail:
+088b d8a00a01 arg mem_tmp_buffer ,contw 
+088c df200008 arg 8 ,loopcnt 
+088d 20407d17 call memset0 
+088e 70095b04 jam bt_evt_reconn_failed ,mem_fifo_temp 
+088f 20407871 call ui_ipc_send_event 
+0890 20200845 branch idle_exit 
+
+inquiry_dispatch:
+0891 c61a0000 rtnmark1 mark_adc_enable 
+0892 c68e0000 rtnmark0 mark_inquiry_on 
+0893 18000e01 force inquiry_length_timer ,queue 
+0894 20407d74 call timer_check 
+0895 7d3a001c nsetflag blank ,mark_inquiry_on ,mark 
+0896 243a0898 nbranch inquiry_start ,blank 
+0897 20600000 rtn 
+
+inquiry_start:
+0898 44854001 bpatch patch01_2 ,mem_patch01 
+0899 684940c3 fetcht 2 ,mem_inq_window 
+089a 18000e04 force 4 ,queue 
+089b 20400f44 call sniff_check_window 
+089c 20740000 rtn user 
+089d 204010fa call afh_clear 
+089e 18004800 force 0 ,freq_mode 
+
+inquiry_restart:
+089f 20618000 rtn timeout 
+08a0 793f800b set0 mark_fhs_already_good ,mark 
+08a1 793f8000 set0 mark_fhs_eir ,mark 
+
+inquiry_rx_restart:
+08a2 1c40c201 add clkn_bt ,1 ,bt_clk 
+08a3 280ffe1e isolate1 mark_inquiry_trainb ,mark 
+08a4 7920c802 setflag true ,2 ,freq_mode 
+08a5 2c200400 compare 0x00 ,bt_clk ,0x02 
+08a6 242088c1 nbranch inquiry_receive ,true 
+
+inquiry_transmit:
+08a7 4485c001 bpatch patch01_3 ,mem_patch01 
+08a8 6fe08012 fetch 1 ,mem_inquiry_transmit 
+08a9 1fe0fe01 increase 1 ,pdata 
+08aa 67e08012 store 1 ,mem_inquiry_transmit 
+08ab 2040112e call fetch_giac 
+08ac 20401128 call tx_radio_freq 
+08ad 20401148 call fetch_diac 
+08ae 2040133e call start_transmitter 
+08af 20401343 call start_tx_native 
+08b0 20401351 call send_access_word 
+08b1 20400e80 call end_of_packet 
+08b2 204008b4 call inquiry_check_train 
+08b3 2020089f branch inquiry_restart 
+
+inquiry_check_train:
+08b4 44864001 bpatch patch01_4 ,mem_patch01 
+08b5 6fe0808b fetch 1 ,mem_nfreq_index_inq 
+08b6 1fe0ffff increase -1 ,pdata 
+08b7 67e0808b store 1 ,mem_nfreq_index_inq 
+08b8 20610000 rtn positive 
+08b9 70008b1f jam 31 ,mem_nfreq_index_inq 
+08ba 6fe0808d fetch 1 ,mem_ninqy_index 
+08bb 1fe0ffff increase -1 ,pdata 
+08bc 67e0808d store 1 ,mem_ninqy_index 
+08bd 20610000 rtn positive 
+08be 7940001e setflip mark_inquiry_trainb ,mark 
+08bf 70008dff jam param_ninquiry ,mem_ninqy_index 
+08c0 20600000 rtn 
+
+inquiry_receive:
+08c1 4486c001 bpatch patch01_5 ,mem_patch01 
+08c2 2040112e call fetch_giac 
+08c3 20401122 call rx_radio_freq 
+08c4 20401148 call fetch_diac 
+08c5 20401348 call start_rx_native 
+08c6 204012d3 call start_receiver 
+08c7 204012f9 call wait_access_clkn_rt 
+08c8 202c08cb branch inquiry_sync ,sync 
+08c9 204008b4 call inquiry_check_train 
+08ca 202008a2 branch inquiry_rx_restart 
+
+inquiry_sync:
+08cb 44874001 bpatch patch01_6 ,mem_patch01 
+08cc 2040127d call save_rssi 
+08cd 20401359 call scan_mode_whiten 
+08ce 20400d47 call receive_packet_whitened 
+08cf 793f8001 set0 mark_rxbuf_inuse ,mark 
+08d0 c6858000 rtnmark0 mark_fhs_already_good 
+
+inquiry_receive_rtn:
+
+inquiry_receive_eir_rtn:
+08d1 6fe08013 fetch 1 ,mem_inquiry_rcv 
+08d2 1fe0fe01 increase 1 ,pdata 
+08d3 67e08013 store 1 ,mem_inquiry_rcv 
+08d4 20600000 rtn 
+
+master_page:
+08d5 4487c001 bpatch patch01_7 ,mem_patch01 
+08d6 7834fc00 enable master 
+08d7 78387c00 enable clknt 
+08d8 6fe140bd fetch 2 ,mem_page_interval 
+08d9 203a08dd branch master_page_no_interval ,blank 
+08da 18000e08 force page_interval_timer ,queue 
+08db 20407d74 call timer_check 
+08dc 247a0000 nrtn blank 
+
+master_page_no_interval:
+08dd 44884002 bpatch patch02_0 ,mem_patch02 
+08de 684940bf fetcht 2 ,mem_page_window 
+08df 18000e28 force 40 ,queue 
+08e0 20400f44 call sniff_check_window 
+08e1 20340916 branch page_exit ,user 
+08e2 18000e03 force page_length_timer ,queue 
+08e3 20407d74 call timer_check 
+08e4 243a08f2 nbranch page_start ,blank 
+08e5 6fe0804d fetch 1 ,mem_state_map 
+08e6 c28208e8 bbit1 smap_name_req ,master_npage_timeout 
+08e7 202008eb branch master_page_timeout 
+
+master_npage_timeout:
+08e8 d8a00a01 arg mem_tmp_buffer ,contw 
+08e9 df200008 arg 8 ,loopcnt 
+08ea 20407d17 call memset0 
+
+master_page_timeout:
+08eb 4488c002 bpatch patch02_1 ,mem_patch02 
+08ec 70003100 jam 0 ,mem_state 
+08ed 20405382 call init_lmp_work 
+08ee 70478b00 jam 0 ,memui_reconnect_mode 
+08ef 70095b13 jam bt_evt_reconn_page_timeout ,mem_fifo_temp 
+08f0 20407871 call ui_ipc_send_event 
+08f1 20200916 branch page_exit 
+
+page_start:
+08f2 44894002 bpatch patch02_2 ,mem_patch02 
+08f3 18001600 force 0 ,timeup 
+08f4 34730200 until clkn_rt ,meet 
+08f5 6fe080a9 fetch 1 ,mem_page_clk 
+08f6 1fe0ffff increase -1 ,pdata 
+08f7 9c42fe00 ixor clkn_bt ,pdata 
+08f8 2fe00600 compare 0 ,pdata ,3 
+08f9 242088f2 nbranch page_start ,true 
+08fa 18827e00 deposit am_addr 
+08fb 67e080e6 store 1 ,mem_fhs_am_addr 
+08fc 18004c00 force 0 ,n_tx_slot 
+08fd 18004800 force 0 ,freq_mode 
+
+page_restart:
+08fe 4489c002 bpatch patch02_3 ,mem_patch02 
+08ff 20218916 branch page_exit ,timeout 
+0900 20401132 call fetch_page_bt_adr 
+0901 69610157 fetchr timeup ,2 ,mem_param_rf_setup 
+0902 34730200 until clkn_rt ,meet 
+
+page_rx_restart:
+0903 448a4002 bpatch patch02_4 ,mem_patch02 
+0904 6fe200a9 fetch 4 ,mem_page_clk 
+0905 98004200 iforce bt_clk 
+0906 1fe0fe01 increase 1 ,pdata 
+0907 67e200a9 store 4 ,mem_page_clk 
+0908 280ffe0c isolate1 mark_page_trainb ,mark 
+0909 7920c802 setflag true ,2 ,freq_mode 
+090a 2c200400 compare 0x00 ,bt_clk ,0x02 
+090b 2420892a nbranch page_receive ,true 
+090c 6fe0800c fetch 1 ,mem_page_transmit 
+090d 1fe0fe01 increase 1 ,pdata 
+090e 67e0800c store 1 ,mem_page_transmit 
+090f 20401128 call tx_radio_freq 
+0910 2040133e call start_transmitter 
+0911 20401343 call start_tx_native 
+0912 20401351 call send_access_word 
+0913 20400e80 call end_of_packet 
+0914 2040091c call page_check_train 
+0915 202008fe branch page_restart 
+
+page_exit:
+0916 448ac002 bpatch patch02_5 ,mem_patch02 
+0917 7854fc00 disable master 
+0918 6fe140bd fetch 2 ,mem_page_interval 
+0919 207a0000 rtn blank 
+091a 18000e08 force page_interval_timer ,queue 
+091b 20207d66 branch timer_init 
+
+page_check_train:
+091c 448b4002 bpatch patch02_6 ,mem_patch02 
+091d 6fe0808c fetch 1 ,mem_nfreq_index_page 
+091e 1fe0ffff increase -1 ,pdata 
+091f 67e0808c store 1 ,mem_nfreq_index_page 
+0920 20610000 rtn positive 
+0921 70008c1f jam 31 ,mem_nfreq_index_page 
+0922 6fe080a7 fetch 1 ,mem_npage_index 
+0923 1fe0ffff increase -1 ,pdata 
+0924 67e080a7 store 1 ,mem_npage_index 
+0925 20610000 rtn positive 
+0926 7940000c setflip mark_page_trainb ,mark 
+0927 6fe0c0ae fetch 1 ,mem_npage 
+0928 67e080a7 store 1 ,mem_npage_index 
+0929 20600000 rtn 
+
+page_receive:
+092a 448bc002 bpatch patch02_7 ,mem_patch02 
+092b 20401122 call rx_radio_freq 
+092c 20401348 call start_rx_native 
+092d 204012d3 call start_receiver 
+092e 204012f9 call wait_access_clkn_rt 
+092f 202c0932 branch page_sync ,sync 
+0930 2040091c call page_check_train 
+0931 20200903 branch page_rx_restart 
+
+page_sync:
+0932 20400e80 call end_of_packet 
+0933 6fe0800d fetch 1 ,mem_page_rcv 
+0934 1fe0fe01 increase 1 ,pdata 
+0935 67e0800d store 1 ,mem_page_rcv 
+0936 18003600 force 0 ,stop_watch 
+0937 6fe200a9 fetch 4 ,mem_page_clk 
+
+page_send_fhs:
+0938 448c4003 bpatch patch03_0 ,mem_patch03 
+0939 2040133c call rf_setup_time_master_slot 
+093a 20401132 call fetch_page_bt_adr 
+093b 1cc0cc01 increase 1 ,n_tx_slot 
+
+page_send_fhs_continue:
+093c 1c2143fd and_into 0x1fd ,bt_clk 
+093d 1c8149fc and_into 0x1fc ,freq_mode 
+093e 20401128 call tx_radio_freq 
+093f 2040133e call start_transmitter 
+0940 20401343 call start_tx_native 
+0941 20401351 call send_access_word 
+0942 1c427e00 deposit clkn_bt 
+0943 67e200b1 store 4 ,mem_clkn_bt 
+0944 18000800 force 0 ,am_addr 
+0945 18000202 force type_fhs ,type 
+0946 20401359 call scan_mode_whiten 
+0947 20400f8e call transmit_packet_whitened 
+
+page_wait_fhs_reply:
+0948 448cc003 bpatch patch03_1 ,mem_patch03 
+0949 2040133a call rf_setup_time_slave_slot 
+094a 1c21c202 or_into 0x02 ,bt_clk 
+094b 1c8149fc and_into 0x1fc ,freq_mode 
+094c 20401122 call rx_radio_freq 
+094d 20401348 call start_rx_native 
+094e 204012d3 call start_receiver 
+094f 204012f9 call wait_access_clkn_rt 
+0950 204c0e80 call end_of_packet ,sync 
+0951 202c0957 branch page_wait_fhs_reply_ok ,sync 
+0952 6fe08010 fetch 1 ,mem_fhs_wait_counter 
+0953 203a08fe branch page_restart ,blank 
+0954 1fe0ffff increase -1 ,pdata 
+0955 67e08010 store 1 ,mem_fhs_wait_counter 
+0956 20200938 branch page_send_fhs 
+
+page_wait_fhs_reply_ok:
+0957 448d4003 bpatch patch03_2 ,mem_patch03 
+0958 6fe0800e fetch 1 ,mem_page_rcv_fhs 
+0959 1fe0fe01 increase 1 ,pdata 
+095a 67e0800e store 1 ,mem_page_rcv_fhs 
+095b 20400c46 call prepare_newconn 
+
+master_newconn_loop:
+095c 79200033 set1 mark_first_packet ,mark 
+095d 20400b01 call master_newconn_once 
+095e 202c0963 branch newconn_poll_responded ,sync 
+095f 793f8033 set0 mark_first_packet ,mark 
+0960 20400c66 call new_conn_timeout 
+0961 243a095c nbranch master_newconn_loop ,blank 
+0962 202008fe branch page_restart 
+
+newconn_poll_responded:
+0963 448dc003 bpatch patch03_3 ,mem_patch03 
+0964 793f8033 set0 mark_first_packet ,mark 
+0965 6fe08031 fetch 1 ,mem_state 
+0966 793ffe03 set0 state_inpage ,pdata 
+0967 67e08031 store 1 ,mem_state 
+0968 20400c51 call newconn_init 
+0969 7854fc00 disable master 
+096a 20600000 rtn 
+
+master_dispatch:
+096b 448e4003 bpatch patch03_4 ,mem_patch03 
+096c 7834fc00 enable master 
+096d 78387c00 enable clknt 
+096e 204009e5 call role_switch_master 
+096f 20740000 rtn user 
+0970 2040133c call rf_setup_time_master_slot 
+0971 1c40c201 add clkn_bt ,1 ,bt_clk 
+0972 20401138 call fetch_self_bt_adr 
+0973 18004803 force 0x03 ,freq_mode 
+0974 20406579 call scheduler_tx_l2cap_pkt 
+0975 20400c9a call prepare_tx 
+0976 20401128 call tx_radio_freq 
+0977 2040133e call start_transmitter 
+0978 20401343 call start_tx_native 
+0979 20401351 call send_access_word 
+097a 20400f8a call transmit_packet 
+
+master_loop:
+097b 448ec003 bpatch patch03_5 ,mem_patch03 
+097c 20405394 call parse_lmp 
+097d 20400af3 call master_conn_recv_packet 
+097e 24368984 nbranch master_notmatch ,match 
+097f 20401376 call supervision_flush 
+0980 20400f50 call parse_l2cap 
+0981 6fe0800f fetch 1 ,mem_master_rcvcnt 
+0982 1fe0fe01 increase 1 ,pdata 
+0983 67e0800f store 1 ,mem_master_rcvcnt 
+
+master_notmatch:
+0984 448f4003 bpatch patch03_6 ,mem_patch03 
+0985 20406561 call scheduler_process 
+0986 2040098f call check_master_disconnect 
+0987 24748000 nrtn master 
+0988 20400f20 call check_attempt 
+0989 243a098c nbranch master_attempt ,blank 
+
+master_exit:
+098a 7854fc00 disable master 
+098b 20600000 rtn 
+
+master_attempt:
+098c 20400c9a call prepare_tx 
+098d 20400ae9 call master_conn_send_packet 
+098e 2020097b branch master_loop 
+
+check_master_disconnect:
+098f 20368992 branch check_master_match ,match 
+0990 2040136d call supervision_update 
+0991 202109a0 branch master_disconnect ,positive 
+
+check_master_match:
+0992 204009ab call check_disconnect_timeout 
+0993 243409a0 nbranch master_disconnect ,user 
+0994 6fe0804d fetch 1 ,mem_state_map 
+0995 c4020000 rtnbit0 smap_name_req 
+0996 c3818000 rtnbit1 smap_name_res 
+0997 6fe0804c fetch 1 ,mem_op 
+0998 c3818000 rtnbit1 op_disconn 
+0999 204009b2 call conn_timer_expired 
+099a 247a0000 nrtn blank 
+099b 6fe080be fetch 1 ,mem_nameres_cnt 
+099c 1fe0ffff increase -1 ,pdata 
+099d 67e080be store 1 ,mem_nameres_cnt 
+099e 247a0000 nrtn blank 
+099f 202056f7 branch lmp_disconnect 
+
+master_disconnect:
+09a0 448fc003 bpatch patch03_7 ,mem_patch03 
+09a1 20400c6e call quit_connection 
+09a2 7854fc00 disable master 
+09a3 6fe0804d fetch 1 ,mem_state_map 
+09a4 c28209a6 bbit1 smap_name_req ,master_name_disconnect 
+09a5 20600000 rtn 
+
+master_name_disconnect:
+09a6 6fe0804d fetch 1 ,mem_state_map 
+09a7 c3818000 rtnbit1 smap_name_res 
+
+master_name_error:
+09a8 d8a00a01 arg mem_tmp_buffer ,contw 
+09a9 df200008 arg 8 ,loopcnt 
+09aa 20207d17 branch memset0 
+
+check_disconnect_timeout:
+09ab 44904004 bpatch patch04_0 ,mem_patch04 
+09ac 78347c00 enable user 
+09ad 6fe0804c fetch 1 ,mem_op 
+09ae c4018000 rtnbit0 op_disconn 
+09af 204009b2 call conn_timer_expired 
+09b0 247a0000 nrtn blank 
+09b1 20207e56 branch disable_user 
+
+conn_timer_expired:
+09b2 6fe08073 fetch 1 ,mem_conn_timer 
+09b3 1fe0ffff increase -1 ,pdata 
+09b4 67e08073 store 1 ,mem_conn_timer 
+09b5 20600000 rtn 
+
+linkkey_ready:
+09b6 4490c004 bpatch patch04_1 ,mem_patch04 
+09b7 6fe08031 fetch 1 ,mem_state 
+09b8 c28389bf bbit1 state_linkkey ,linkkey_set 
+09b9 6fe08877 fetch 1 ,mem_pairing_auth 
+09ba 203a09bf branch linkkey_set ,blank 
+09bb 70087700 jam defalt_pairing_auth ,mem_pairing_auth 
+09bc 70095b18 jam bt_evt_linkkey_generate ,mem_fifo_temp 
+09bd 20407871 call ui_ipc_send_event 
+09be 202009bf branch linkkey_set 
+
+linkkey_set:
+09bf 44914004 bpatch patch04_2 ,mem_patch04 
+09c0 20400a63 call context_traverse_linkkey 
+09c1 6fe08031 fetch 1 ,mem_state 
+09c2 79207e07 set1 state_linkkey ,pdata 
+09c3 67e08031 store 1 ,mem_state 
+09c4 7041ca01 jam 1 ,mem_link_key_exists 
+09c5 6fe08056 fetch 1 ,mem_conn_sm 
+09c6 c08b09c7 bne conn_sm_pairing ,linkkey_set_continue 
+
+linkkey_set_continue:
+09c7 20600000 rtn 
+
+generate_linkkey_continue:
+09c8 70087701 jam pairing_auth ,mem_pairing_auth 
+
+clear_linkstate:
+09c9 6fe08031 fetch 1 ,mem_state 
+09ca 793ffe07 set0 state_linkkey ,pdata 
+09cb 67e08031 store 1 ,mem_state 
+09cc 20600000 rtn 
+
+role_switch_check:
+09cd 4491c004 bpatch patch04_3 ,mem_patch04 
+09ce 78547c00 disable user 
+09cf 6fe10033 fetch 2 ,mem_tsniff 
+09d0 d840ffff arg 0xffff ,temp 
+09d1 98467c00 isub temp ,null 
+09d2 24628000 nrtn zero 
+09d3 6fe20035 fetch 4 ,mem_sniff_anchor 
+09d4 203809d7 branch role_switch_clkn ,clknt 
+09d5 9d067e00 isub clke_bt ,pdata 
+09d6 202009d8 branch role_switch_clke 
+
+role_switch_clkn:
+09d7 9c467e00 isub clkn_bt ,pdata 
+
+role_switch_clke:
+09d8 1fe67c04 sub pdata ,4 ,null 
+09d9 24610000 nrtn positive 
+09da 18007e00 force 0 ,pdata 
+09db 67e10033 store 2 ,mem_tsniff 
+09dc 20207e54 branch enable_user 
+
+role_switch_prepare:
+09dd 1fe20400 copy pdata ,temp 
+09de 604a0035 storet 4 ,mem_sniff_anchor 
+
+role_switch_prepare0:
+09df 44924004 bpatch patch04_4 ,mem_patch04 
+09e0 70464201 jam switch_flag_accept ,mem_switch_flag 
+09e1 5800ffff setarg 0xffff 
+09e2 67e10033 store 2 ,mem_tsniff 
+09e3 70007401 jam 1 ,mem_sniff_attempt 
+09e4 20600000 rtn 
+
+role_switch_master:
+09e5 4492c004 bpatch patch04_5 ,mem_patch04 
+09e6 204009cd call role_switch_check 
+09e7 24740000 nrtn user 
+09e8 78547c00 disable user 
+09e9 70001120 jam param_newconnto ,mem_newconnto_counter 
+09ea 793f800b set0 mark_fhs_already_good ,mark 
+09eb 793f8031 set0 mark_role_switch_receive_fhs ,mark 
+
+roles_waitfhs_loop:
+09ec 2040133c call rf_setup_time_master_slot 
+09ed 20400af5 call master_recv_packet 
+09ee c50589fa bmark1 mark_fhs_already_good ,roles_replyto_fhs 
+09ef 20400c66 call new_conn_timeout 
+09f0 243a09ec nbranch roles_waitfhs_loop ,blank 
+09f1 c5188a04 bmark1 mark_role_switch_receive_fhs ,roles_replyto_fhs_rcvd 
+
+role_switch_fail_master:
+09f2 44934004 bpatch patch04_6 ,mem_patch04 
+09f3 78547c00 disable user 
+09f4 1c427e00 deposit clkn_bt 
+09f5 67e240d1 store 4 ,mem_next_btclk 
+09f6 78387c00 enable clknt 
+09f7 7834fc00 enable master 
+09f8 70095b2a jam bt_evt_switch_fail_master ,mem_fifo_temp 
+09f9 20207871 branch ui_ipc_send_event 
+
+roles_replyto_fhs:
+09fa 4493c004 bpatch patch04_7 ,mem_patch04 
+09fb 2040133a call rf_setup_time_slave_slot 
+09fc d8200010 arg type_id ,type 
+09fd 20400aeb call master_send_packet 
+09fe 79200031 set1 mark_role_switch_receive_fhs ,mark 
+09ff 793f800b set0 mark_fhs_already_good ,mark 
+0a00 6fe08078 fetch 1 ,mem_amaddr 
+0a01 98000800 iforce am_addr 
+0a02 70001102 jam 2 ,mem_newconnto_counter 
+0a03 202009ec branch roles_waitfhs_loop 
+
+roles_replyto_fhs_rcvd:
+0a04 6fe200b5 fetch 4 ,mem_clke_bt 
+0a05 1fe0fe08 pincrease 8 
+0a06 67e200b5 store 4 ,mem_clke_bt 
+0a07 78587c00 disable clknt 
+0a08 7854fc00 disable master 
+0a09 20401039 call apply_switch_clke 
+0a0a 20400c46 call prepare_newconn 
+
+roles_newconns_loop:
+0a0b 44944005 bpatch patch05_0 ,mem_patch05 
+0a0c 20400c8d call slave_newconn_once 
+0a0d 20368a11 branch roles_newconns_responded ,match 
+0a0e 20400c66 call new_conn_timeout 
+0a0f 243a0a0b nbranch roles_newconns_loop ,blank 
+0a10 202009f2 branch role_switch_fail_master 
+
+roles_newconns_responded:
+0a11 6fe08032 fetch 1 ,mem_mode 
+0a12 793ffe01 set0 mode_master ,pdata 
+0a13 67e08032 store 1 ,mem_mode 
+0a14 20401376 call supervision_flush 
+0a15 20401061 call calc_clke_offset 
+0a16 78347c00 enable user 
+0a17 70095b2b jam bt_evt_switch_success_master ,mem_fifo_temp 
+0a18 20207871 branch ui_ipc_send_event 
+
+context_load:
+0a19 4494c005 bpatch patch05_1 ,mem_patch05 
+0a1a 79200009 set1 mark_context ,mark 
+0a1b 1a227e00 deposit rega 
+0a1c 67e1001f store 2 ,mem_context_ptr 
+0a1d 18007258 force context_size ,loopcnt 
+0a1e d8a00287 arg mem_le_state ,contw 
+0a1f 1a208c01 add rega ,coffset_mode ,contr 
+0a20 efe08006 ifetch 1 ,contr 
+0a21 1a220c00 copy rega ,contr 
+0a22 c2807d5f bbit1 mode_le ,memcpy 
+0a23 d8a00031 arg mem_state ,contw 
+0a24 20407d5f call memcpy 
+0a25 78577c00 disable attempt 
+0a26 6fe08078 fetch 1 ,mem_amaddr 
+0a27 98000800 iforce am_addr 
+0a28 70008901 jam 1 ,mem_current_sniff_attempt 
+0a29 20348a2b branch context_load_master ,master 
+0a2a 70008901 jam 1 ,mem_current_sniff_attempt 
+
+context_load_master:
+0a2b 6fe08031 fetch 1 ,mem_state 
+0a2c c4008000 rtnbit0 state_insniff 
+0a2d 6fe08074 fetch 1 ,mem_sniff_attempt 
+0a2e 67e08089 store 1 ,mem_current_sniff_attempt 
+0a2f 6fe08075 fetch 1 ,mem_sniff_timeout 
+0a30 67e0808a store 1 ,mem_current_sniff_timeout 
+0a31 20600000 rtn 
+
+context_save:
+0a32 44954005 bpatch patch05_2 ,mem_patch05 
+0a33 6fe1001f fetch 2 ,mem_context_ptr 
+0a34 98000a00 iforce contw 
+0a35 18007258 force context_size ,loopcnt 
+0a36 d8c00287 arg mem_le_state ,contr 
+0a37 203b7d5f branch memcpy ,le 
+0a38 d8c00031 arg mem_state ,contr 
+0a39 20207d5f branch memcpy 
+
+context_get_next:
+0a3a df200001 arg context_num ,loopcnt 
+0a3b 68488015 fetcht 1 ,mem_current_context 
+
+context_get_next_loop:
+0a3c 18408401 increase 1 ,temp 
+0a3d 2841fe01 compare context_num ,temp ,0xff 
+0a3e 24208a40 nbranch context_get_next_cont ,true 
+0a3f d8400000 arg 0 ,temp 
+
+context_get_next_cont:
+0a40 60488015 storet 1 ,mem_current_context 
+0a41 184ffe58 mul32 temp ,context_size ,pdata 
+0a42 da204040 arg mem_context ,rega 
+0a43 9a20a200 iadd rega ,rega 
+0a44 efe08011 ifetch 1 ,rega 
+0a45 c2808a48 bbit1 state_insniff ,context_get_next_sniff 
+0a46 c3800000 rtnbit1 state_inconn 
+0a47 c3818000 rtnbit1 state_inpage 
+
+context_get_next_sniff:
+0a48 c2000a3c loop context_get_next_loop 
+0a49 20600000 rtn 
+
+context_new:
+0a4a 4495c005 bpatch patch05_3 ,mem_patch05 
+0a4b da600a79 arg context_search_empty ,regc 
+0a4c 20400a70 call context_search 
+0a4d 24628000 nrtn zero 
+0a4e 1a227e00 deposit rega 
+0a4f 67e1001f store 2 ,mem_context_ptr 
+0a50 18007c00 force 0 ,null 
+0a51 20600000 rtn 
+
+context_check_all_wack:
+0a52 20400f4d call check_esco_amaddr 
+0a53 20208a5a branch context_check_esco_wack ,true 
+0a54 6fe1001f fetch 2 ,mem_context_ptr 
+0a55 1fe08a17 add pdata ,coffset_arq ,contw 
+0a56 6fe08048 fetch 1 ,mem_arq 
+0a57 e7e08005 istore 1 ,contw 
+0a58 da600ab9 arg context_check_a_wack ,regc 
+0a59 20200a70 branch context_search 
+
+context_check_esco_wack:
+0a5a 6fe08048 fetch 1 ,mem_arq 
+0a5b 2feffe03 isolate1 wack ,pdata 
+0a5c 20208a5f branch context_esco_wack ,true 
+0a5d 18007c01 force 1 ,null 
+0a5e 20600000 rtn 
+
+context_esco_wack:
+0a5f 18007c00 force 0 ,null 
+0a60 20600000 rtn 
+
+context_check_idle:
+0a61 da600ab6 arg context_check_inconn ,regc 
+0a62 20200a70 branch context_search 
+
+context_traverse_linkkey:
+0a63 6849001f fetcht 2 ,mem_context_ptr 
+0a64 da600ade arg context_traverse_clearkey ,regc 
+0a65 20200a70 branch context_search 
+
+context_search_conn_handle:
+0a66 6848c1dc fetcht 1 ,mem_hci_conn_handle 
+
+context_search_conn_handle2:
+0a67 da600a84 arg context_search_handle ,regc 
+0a68 20200a70 branch context_search 
+
+context_search_plap:
+0a69 44964005 bpatch patch05_4 ,mem_patch05 
+0a6a 684b41dd fetcht 6 ,mem_hci_plap 
+
+context_search_plap2:
+0a6b da600a7d arg context_search_lap ,regc 
+0a6c 20200a70 branch context_search 
+
+context_search_insniff:
+0a6d da600a8a arg context_search_sniff ,regc 
+0a6e 20200a70 branch context_search 
+
+context_search_sniff_window:
+0a6f da600ad5 arg context_search_window ,regc 
+
+context_search:
+0a70 4496c005 bpatch patch05_5 ,mem_patch05 
+0a71 da204040 arg mem_context ,rega 
+0a72 df200001 arg context_num ,loopcnt 
+
+context_search_loop:
+0a73 efe08011 ifetch 1 ,rega 
+0a74 1a627a00 copy regc ,pc 
+
+context_search_next:
+0a75 1a20a258 increase context_size ,rega 
+0a76 c2000a73 loop context_search_loop 
+0a77 18007c01 force 1 ,null 
+0a78 20600000 rtn 
+
+context_search_empty:
+0a79 c2800a75 bbit1 state_inconn ,context_search_next 
+0a7a c2818a75 bbit1 state_inpage ,context_search_next 
+0a7b 18007c00 force 0 ,null 
+0a7c 20600000 rtn 
+
+context_search_lap:
+0a7d c2818a7f bbit1 state_inpage ,context_search_lap_cont 
+0a7e c3000a75 bbit0 state_inconn ,context_search_next 
+
+context_search_lap_cont:
+0a7f 1a208c10 add rega ,coffset_plap ,contr 
+0a80 efe30006 ifetch 6 ,contr 
+0a81 98467c00 isub temp ,null 
+0a82 20628000 rtn zero 
+0a83 20200a75 branch context_search_next 
+
+context_search_handle:
+0a84 c3000a75 bbit0 state_inconn ,context_search_next 
+0a85 1a208c16 add rega ,coffset_conn_handle ,contr 
+0a86 efe08006 ifetch 1 ,contr 
+0a87 98467c00 isub temp ,null 
+0a88 20628000 rtn zero 
+0a89 20200a75 branch context_search_next 
+
+context_search_sniff:
+0a8a c3008a75 bbit0 state_insniff ,context_search_next 
+
+context_search_sniff_loop:
+0a8b 20400ac2 call context_get_anchor 
+0a8c 20400aa6 call sign_pdata_temp 
+0a8d 98467e00 isub temp ,pdata 
+0a8e 1fe0fe01 increase 1 ,pdata 
+0a8f 20210aa0 branch context_search_sniff_miss ,positive 
+0a90 18c22400 copy contr ,regb 
+0a91 67e48964 store 9 ,mem_temp 
+0a92 6fe0c6ba fetch 1 ,mem_sc_calc 
+0a93 243a0a98 nbranch context_search_sniff_sc ,blank 
+0a94 6fe48964 fetch 9 ,mem_temp 
+0a95 1a420c00 copy regb ,contr 
+0a96 1fe0fe05 increase 5 ,pdata 
+0a97 20200a9b branch context_search_meet1 
+
+context_search_sniff_sc:
+0a98 6fe48964 fetch 9 ,mem_temp 
+0a99 1a420c00 copy regb ,contr 
+0a9a 1fe0fe14 increase 20 ,pdata 
+
+context_search_meet1:
+0a9b 24210a75 nbranch context_search_next ,positive 
+
+context_search_meet:
+0a9c 18424200 copy temp ,bt_clk 
+0a9d 20400ace call context_next_anchor 
+0a9e 18007c00 force 0 ,null 
+0a9f 20600000 rtn 
+
+context_search_sniff_miss:
+0aa0 98002400 iforce regb 
+0aa1 1a208c02 add rega ,coffset_tsniff ,contr 
+0aa2 efe10006 ifetch 2 ,contr 
+0aa3 203a0a9c branch context_search_meet ,blank 
+0aa4 20400ace call context_next_anchor 
+0aa5 20200a8b branch context_search_sniff_loop 
+
+sign_pdata_temp:
+0aa6 1ff11600 rshift16 pdata ,timeup 
+0aa7 196c9600 rshift8 timeup ,timeup 
+0aa8 20228ab0 branch sign_pdata_temp_p0 ,zero 
+0aa9 29601e0f compare 0xf ,timeup ,0xf 
+0aaa 24608000 nrtn true 
+0aab 18511600 rshift16 temp ,timeup 
+0aac 196c9600 rshift8 timeup ,timeup 
+0aad 24628000 nrtn zero 
+0aae 7920041c set1 28 ,temp 
+0aaf 20600000 rtn 
+
+sign_pdata_temp_p0:
+0ab0 18511600 rshift16 temp ,timeup 
+0ab1 196c9600 rshift8 timeup ,timeup 
+0ab2 29601e0f compare 0xf ,timeup ,0xf 
+0ab3 24608000 nrtn true 
+0ab4 79207e1c set1 28 ,pdata 
+0ab5 20600000 rtn 
+
+context_check_inconn:
+0ab6 c3000a75 bbit0 state_inconn ,context_search_next 
+0ab7 18007c00 force 0 ,null 
+0ab8 20600000 rtn 
+
+context_check_a_wack:
+0ab9 c3000a75 bbit0 state_inconn ,context_search_next 
+0aba 1a208c01 add rega ,coffset_mode ,contr 
+0abb efe08006 ifetch 1 ,contr 
+0abc c2800a75 bbit1 mode_le ,context_search_next 
+0abd 1a208c17 add rega ,coffset_arq ,contr 
+0abe efe08006 ifetch 1 ,contr 
+0abf c3018a75 bbit0 wack ,context_search_next 
+0ac0 18007c00 force 0 ,null 
+0ac1 20600000 rtn 
+
+context_get_anchor:
+0ac2 1a208c01 add rega ,coffset_mode ,contr 
+0ac3 e8408006 ifetcht 1 ,contr 
+0ac4 1c427e00 deposit clkn_bt 
+0ac5 284ffe01 isolate1 mode_master ,temp 
+0ac6 1a208c04 add rega ,coffset_sniff_anchor ,contr 
+0ac7 e8420006 ifetcht 4 ,contr 
+0ac8 20608000 rtn true 
+0ac9 1a208c08 add rega ,coffset_clk_offset ,contr 
+0aca efe30006 ifetch 6 ,contr 
+0acb 20401077 call calc_clke2 
+0acc 1d027e00 deposit clke_bt 
+0acd 20600000 rtn 
+
+context_next_anchor:
+0ace 1a208c02 add rega ,coffset_tsniff ,contr 
+0acf 1a208a04 add rega ,coffset_sniff_anchor ,contw 
+0ad0 efe10006 ifetch 2 ,contr 
+0ad1 98409600 iadd temp ,timeup 
+0ad2 19627e00 deposit timeup 
+0ad3 e7e20005 istore 4 ,contw 
+0ad4 20201705 branch le_context_nextevent 
+
+context_search_window:
+0ad5 c3008a75 bbit0 state_insniff ,context_search_next 
+0ad6 20400ac2 call context_get_anchor 
+0ad7 9b60fe00 iadd stop_watch ,pdata 
+0ad8 9b60fe00 iadd stop_watch ,pdata 
+0ad9 98e0fe00 iadd queue ,pdata 
+0ada 98467c00 isub temp ,null 
+0adb 24210a75 nbranch context_search_next ,positive 
+0adc 18007c00 force 0 ,null 
+0add 20600000 rtn 
+
+context_traverse_clearkey:
+0ade c3000a75 bbit0 state_inconn ,context_search_next 
+0adf 18427e00 deposit temp 
+0ae0 9a267c00 isub rega ,null 
+0ae1 203f0a75 branch context_search_next ,null 
+0ae2 1a208c01 add rega ,coffset_mode ,contr 
+0ae3 efe08006 ifetch 1 ,contr 
+0ae4 c2800a75 bbit1 mode_le ,context_search_next 
+0ae5 efe08011 ifetch 1 ,rega 
+0ae6 793ffe07 set0 state_linkkey ,pdata 
+0ae7 e7e08011 istore 1 ,rega 
+0ae8 20200a75 branch context_search_next 
+
+master_conn_send_packet:
+0ae9 44974005 bpatch patch05_6 ,mem_patch05 
+0aea 2040133c call rf_setup_time_master_slot 
+
+master_send_packet:
+0aeb 1c40c201 add clkn_bt ,1 ,bt_clk 
+0aec 20401138 call fetch_self_bt_adr 
+0aed 18004803 force 0x03 ,freq_mode 
+0aee 20401128 call tx_radio_freq 
+0aef 2040133e call start_transmitter 
+0af0 20401343 call start_tx_native 
+0af1 20401351 call send_access_word 
+0af2 20200f8a branch transmit_packet 
+
+master_conn_recv_packet:
+0af3 4497c005 bpatch patch05_7 ,mem_patch05 
+0af4 2040133a call rf_setup_time_slave_slot 
+
+master_recv_packet:
+0af5 1c40c201 add clkn_bt ,1 ,bt_clk 
+0af6 20401138 call fetch_self_bt_adr 
+0af7 18004803 force 0x03 ,freq_mode 
+0af8 20401122 call rx_radio_freq 
+0af9 20400c3b call init_rx_packet_flags 
+0afa 204012d8 call prep_crypt 
+0afb 20401348 call start_rx_native 
+0afc 204012d3 call start_receiver 
+
+master_rx_conn_finish_packet:
+0afd 204012f9 call wait_access_clkn_rt 
+0afe 246c0000 nrtn sync 
+0aff 2040127d call save_rssi 
+0b00 20200d44 branch receive_packet 
+
+master_newconn_once:
+0b01 44984006 bpatch patch06_0 ,mem_patch06 
+0b02 6fe080e6 fetch 1 ,mem_fhs_am_addr 
+0b03 98000800 iforce am_addr 
+0b04 18000201 force type_poll ,type 
+0b05 20400ae9 call master_conn_send_packet 
+0b06 20200af3 branch master_conn_recv_packet 
+
+inquiry_scan_dispatch:
+0b07 c61a0000 rtnmark1 mark_adc_enable 
+0b08 6fe0c09b fetch 1 ,mem_scan_mode 
+0b09 c4000000 rtnbit0 inq_scan_mode 
+0b0a 18000e04 force iscan_interval_timer ,queue 
+0b0b 20407d74 call timer_check 
+0b0c 247a0000 nrtn blank 
+0b0d 684940b5 fetcht 2 ,mem_iscan_window 
+0b0e 18000e04 force 4 ,queue 
+0b0f 20400f44 call sniff_check_window 
+0b10 20740000 rtn user 
+0b11 20400b18 call inquiry_scan_start 
+0b12 18000e04 force iscan_interval_timer ,queue 
+0b13 6fe140b7 fetch 2 ,mem_iscan_interval 
+0b14 242c7d66 nbranch timer_init ,sync 
+0b15 180a7e00 random pdata 
+0b16 9ea17e00 iand mask3ff ,pdata 
+0b17 20207d66 branch timer_init 
+
+inquiry_scan_start:
+0b18 4498c006 bpatch patch06_1 ,mem_patch06 
+0b19 7000e600 jam 0 ,mem_fhs_am_addr 
+0b1a 78587c00 disable clknt 
+0b1b 78577c00 disable attempt 
+0b1c 204010fa call afh_clear 
+0b1d 1c4143fc and clkn_bt ,0x1fc ,bt_clk 
+0b1e 18004801 force 0x01 ,freq_mode 
+0b1f 2040112e call fetch_giac 
+0b20 20401122 call rx_radio_freq 
+0b21 7940001d setflip mark_inquiry_state ,mark 
+0b22 6fe08006 fetch 1 ,mem_inquiryscan_waitcnt 
+0b23 1fe0fe01 increase 1 ,pdata 
+0b24 67e08006 store 1 ,mem_inquiryscan_waitcnt 
+0b25 20401148 call fetch_diac 
+0b26 204012d3 call start_receiver 
+0b27 20401300 call wait_access_forever 
+0b28 246c0000 nrtn sync 
+0b29 44994006 bpatch patch06_2 ,mem_patch06 
+0b2a 18003600 force 0 ,stop_watch 
+0b2b 2040114f call shutdown_radio 
+0b2c 6fe08007 fetch 1 ,mem_inquiryscan_rcvcnt 
+0b2d 1fe0fe01 increase 1 ,pdata 
+0b2e 67e08007 store 1 ,mem_inquiryscan_rcvcnt 
+0b2f 2040112e call fetch_giac 
+0b30 2040133a call rf_setup_time_slave_slot 
+0b31 1c21c202 or_into 0x002 ,bt_clk 
+0b32 18004801 force 0x01 ,freq_mode 
+0b33 20401128 call tx_radio_freq 
+0b34 20401148 call fetch_diac 
+0b35 2040133e call start_transmitter 
+0b36 2040134c call start_tx_external 
+0b37 1c427e00 deposit clkn_bt 
+0b38 67e200b1 store 4 ,mem_clkn_bt 
+0b39 20401351 call send_access_word 
+0b3a 18000202 force type_fhs ,type 
+0b3b 18000800 force 0 ,am_addr 
+0b3c 20401359 call scan_mode_whiten 
+0b3d 20400f8e call transmit_packet_whitened 
+0b3e 20400b42 call send_eir 
+0b3f 1c2143fd and_into 0x1fd ,bt_clk 
+0b40 1cc0cc01 increase 1 ,n_tx_slot 
+0b41 20600000 rtn 
+
+send_eir:
+0b42 4499c006 bpatch patch06_3 ,mem_patch06 
+0b43 6fe0c0d8 fetch 1 ,mem_eir_enable 
+0b44 207a0000 rtn blank 
+0b45 d8a000f1 arg mem_eir ,contw 
+0b46 6fe0c5fc fetch 1 ,mem_local_name_length 
+0b47 1fe27200 copy pdata ,loopcnt 
+0b48 1fe0fe01 increase 1 ,pdata 
+0b49 e7e08005 istore 1 ,contw 
+0b4a 18a20400 copy contw ,temp 
+0b4b 1fe0fe01 increase 1 ,pdata 
+0b4c 67e141e6 store 2 ,mem_tx_len 
+0b4d 18420a00 copy temp ,contw 
+0b4e 58000009 setarg 0x09 
+0b4f e7e08005 istore 1 ,contw 
+0b50 d8c045fd arg mem_local_name ,contr 
+0b51 20407d5f call memcpy 
+0b52 da604678 arg mem_all_uuid_128bits ,regc 
+0b53 df200004 arg 4 ,loopcnt 
+0b54 20400b64 call get_all_uuid 
+0b55 da604662 arg mem_all_uuid_16bits ,regc 
+0b56 df200001 arg 1 ,loopcnt 
+0b57 20400b64 call get_all_uuid 
+0b58 1800020a force type_dm3 ,type 
+0b59 7041e502 jam 2 ,mem_tx_lch 
+0b5a 580000f1 setarg mem_eir 
+0b5b 67e100bf store 2 ,mem_txptr 
+0b5c 2040133a call rf_setup_time_slave_slot 
+0b5d 20401128 call tx_radio_freq 
+0b5e 2040133e call start_transmitter 
+0b5f 2040134c call start_tx_external 
+0b60 20401351 call send_access_word 
+0b61 20401359 call scan_mode_whiten 
+0b62 20400f8e call transmit_packet_whitened 
+0b63 20600000 rtn 
+
+get_all_uuid:
+0b64 18a20400 copy contw ,temp 
+0b65 1a620c00 copy regc ,contr 
+0b66 efe08006 ifetch 1 ,contr 
+0b67 207a0000 rtn blank 
+
+lshift_loop:
+0b68 1fe3fe00 lshift pdata ,pdata 
+0b69 c2000b68 loop lshift_loop 
+0b6a 1fe22200 copy pdata ,rega 
+0b6b 1fe0fe02 increase 2 ,pdata 
+0b6c 1fe20e00 copy pdata ,queue 
+0b6d 6fe141e6 fetch 2 ,mem_tx_len 
+0b6e 98e0fe00 iadd queue ,pdata 
+0b6f 67e141e6 store 2 ,mem_tx_len 
+0b70 18420a00 copy temp ,contw 
+0b71 1a227e00 copy rega ,pdata 
+0b72 1fe0fe01 increase 1 ,pdata 
+0b73 e7e08005 istore 1 ,contw 
+0b74 1a620c00 copy regc ,contr 
+0b75 efe08006 ifetch 1 ,contr 
+0b76 efe08006 ifetch 1 ,contr 
+0b77 e7e08005 istore 1 ,contw 
+0b78 1a227200 copy rega ,loopcnt 
+0b79 20207d5f branch memcpy 
+
+page_scan_dispatch:
+0b7a c61a0000 rtnmark1 mark_adc_enable 
+0b7b 6fe0c09b fetch 1 ,mem_scan_mode 
+0b7c c4008000 rtnbit0 page_scan_mode 
+0b7d 18000e05 force pscan_interval_timer ,queue 
+0b7e 20407d74 call timer_check 
+0b7f 247a0000 nrtn blank 
+0b80 684940b9 fetcht 2 ,mem_pscan_window 
+0b81 18000e28 force 40 ,queue 
+0b82 20400f44 call sniff_check_window 
+0b83 20740000 rtn user 
+0b84 18000800 force 0 ,am_addr 
+0b85 70001008 jam param_pagerespto ,mem_fhs_wait_counter 
+0b86 793f800b set0 mark_fhs_already_good ,mark 
+0b87 20400b8b call page_scan_start 
+0b88 18000e05 force pscan_interval_timer ,queue 
+0b89 6fe140bb fetch 2 ,mem_pscan_interval 
+0b8a 20207d66 branch timer_init 
+
+page_scan_start:
+0b8b 449a4006 bpatch patch06_4 ,mem_patch06 
+0b8c 78587c00 disable clknt 
+0b8d 204010fa call afh_clear 
+0b8e 6fe08008 fetch 1 ,mem_pagescan_waitcnt 
+0b8f 1fe0fe01 increase 1 ,pdata 
+0b90 67e08008 store 1 ,mem_pagescan_waitcnt 
+0b91 18004c00 force 0 ,n_tx_slot 
+0b92 20401138 call fetch_self_bt_adr 
+0b93 1c40c201 add clkn_bt ,1 ,bt_clk 
+0b94 18004802 force 0x02 ,freq_mode 
+0b95 449ac006 bpatch patch06_5 ,mem_patch06 
+0b96 20401122 call rx_radio_freq 
+0b97 204012d3 call start_receiver 
+0b98 20401300 call wait_access_forever 
+0b99 246c0000 nrtn sync 
+0b9a 2040114f call shutdown_radio 
+0b9b 6fe08009 fetch 1 ,mem_pagescan_rcvcnt 
+0b9c 1fe0fe01 increase 1 ,pdata 
+0b9d 67e08009 store 1 ,mem_pagescan_rcvcnt 
+0b9e 18003600 force 0 ,stop_watch 
+0b9f 2040133a call rf_setup_time_slave_slot 
+0ba0 1c21c202 or_into 0x002 ,bt_clk 
+0ba1 18004801 force 0x01 ,freq_mode 
+0ba2 20401128 call tx_radio_freq 
+0ba3 2040133e call start_transmitter 
+0ba4 2040134c call start_tx_external 
+0ba5 20401351 call send_access_word 
+0ba6 20400e80 call end_of_packet 
+0ba7 18000800 force 0 ,am_addr 
+0ba8 69610157 fetchr timeup ,2 ,mem_param_rf_setup 
+0ba9 35330200 until clke_rt ,meet 
+0baa 1d01d003 or_into 0x03 ,clke_bt 
+0bab 1c2143fd and_into 0x1fd ,bt_clk 
+
+page_scan_wait_fhs_restart:
+0bac 449b4006 bpatch patch06_6 ,mem_patch06 
+0bad 1cc0cc01 increase 1 ,n_tx_slot 
+0bae 20401122 call rx_radio_freq 
+0baf 204012d3 call start_receiver 
+0bb0 204012f3 call wait_access_mhalfbnd 
+0bb1 242c0bb5 nbranch page_scan_wait_fhs_again ,sync 
+0bb2 20401359 call scan_mode_whiten 
+0bb3 20400d47 call receive_packet_whitened 
+0bb4 c5058bbc bmark1 mark_fhs_already_good ,page_scan_reply_to_fhs 
+
+page_scan_wait_fhs_again:
+0bb5 449bc006 bpatch patch06_7 ,mem_patch06 
+0bb6 6fe08010 fetch 1 ,mem_fhs_wait_counter 
+0bb7 207a0000 rtn blank 
+0bb8 1fe0ffff increase -1 ,pdata 
+0bb9 67e08010 store 1 ,mem_fhs_wait_counter 
+0bba 2040133c call rf_setup_time_master_slot 
+0bbb 20200bac branch page_scan_wait_fhs_restart 
+
+page_scan_reply_to_fhs:
+0bbc 449c4007 bpatch patch07_0 ,mem_patch07 
+0bbd 793fd001 set0 1 ,clke_bt 
+0bbe 79205000 set1 0 ,clke_bt 
+0bbf 6fe0800a fetch 1 ,mem_pagescan_rcvfhscnt 
+0bc0 1fe0fe01 increase 1 ,pdata 
+0bc1 67e0800a store 1 ,mem_pagescan_rcvfhscnt 
+0bc2 2040133a call rf_setup_time_slave_slot 
+0bc3 1c21c202 or_into 0x02 ,bt_clk 
+0bc4 20401128 call tx_radio_freq 
+0bc5 2040133e call start_transmitter 
+0bc6 2040134c call start_tx_external 
+0bc7 20401351 call send_access_word 
+0bc8 20400e80 call end_of_packet 
+
+slave_apply_clke_bt:
+0bc9 2d000603 compare 0x03 ,clke_bt ,0x03 
+0bca 20208bcd branch slave_apply_clke_bt_now ,true 
+0bcb 37cb8200 until null ,mhalfbnd 
+0bcc 20200bc9 branch slave_apply_clke_bt 
+
+slave_apply_clke_bt_now:
+0bcd 6fe200b5 fetch 4 ,mem_clke_bt 
+0bce 1fe1fe03 or_into 0x03 ,pdata 
+0bcf 1fe25000 icopy clke_bt 
+
+start_slave_connection:
+0bd0 449cc007 bpatch patch07_1 ,mem_patch07 
+0bd1 6fe300c8 fetch 6 ,extm_lap 
+0bd2 67e30041 store 6 ,mem_plap 
+0bd3 20400c46 call prepare_newconn 
+
+slave_newconn_loop:
+0bd4 20400c8d call slave_newconn_once 
+0bd5 20368bd9 branch sconn_successful ,match 
+0bd6 20400c66 call new_conn_timeout 
+0bd7 243a0bd4 nbranch slave_newconn_loop ,blank 
+0bd8 20600000 rtn 
+
+sconn_successful:
+0bd9 449d4007 bpatch patch07_2 ,mem_patch07 
+0bda 20400c51 call newconn_init 
+0bdb 20400a4a call context_new 
+0bdc 24628000 nrtn zero 
+0bdd 70003200 jam 0 ,mem_mode 
+0bde 20401061 call calc_clke_offset 
+0bdf 20200a32 branch context_save 
+
+slave_dispatch:
+0be0 449dc007 bpatch patch07_3 ,mem_patch07 
+0be1 20401073 call calc_clke 
+0be2 20400c05 call role_switch_slave 
+0be3 20740000 rtn user 
+
+slave_loop:
+0be4 449e4007 bpatch patch07_4 ,mem_patch07 
+0be5 20406561 call scheduler_process 
+0be6 20400d3c call slave_conn_recv_packet 
+0be7 24368bf4 nbranch slave_notmatch ,match 
+0be8 6fe14477 fetch 2 ,mem_cb_bt_slave_match 
+0be9 20407e05 call callback_func 
+0bea 20401376 call supervision_flush 
+0beb 20406579 call scheduler_tx_l2cap_pkt 
+0bec 20400c9a call prepare_tx 
+0bed 20400f7f call slave_conn_send_packet 
+0bee 20400f50 call parse_l2cap 
+0bef 20405394 call parse_lmp 
+0bf0 6fe0800b fetch 1 ,mem_slave_rcvcnt 
+0bf1 1fe0fe01 increase 1 ,pdata 
+0bf2 67e0800b store 1 ,mem_slave_rcvcnt 
+0bf3 20401061 call calc_clke_offset 
+
+slave_notmatch:
+0bf4 449ec007 bpatch patch07_5 ,mem_patch07 
+0bf5 20401527 call lpm_set_mult 
+0bf6 2040136d call supervision_update 
+0bf7 20210bfd branch slave_disconnect ,positive 
+0bf8 204009ab call check_disconnect_timeout 
+0bf9 24340bfd nbranch slave_disconnect ,user 
+0bfa 20400f20 call check_attempt 
+0bfb 243a0be4 nbranch slave_loop ,blank 
+0bfc 20600000 rtn 
+
+slave_disconnect:
+0bfd 449f4007 bpatch patch07_6 ,mem_patch07 
+0bfe 700a5100 jam 0 ,mem_tester_emulate 
+0bff 7000e400 jam 0 ,mem_debug_config 
+0c00 20400c6e call quit_connection 
+0c01 793f8011 set0 mark_testmode ,mark 
+0c02 20407e1d call test_enable_white 
+0c03 6fe08031 fetch 1 ,mem_state 
+0c04 20600000 rtn 
+
+role_switch_slave:
+0c05 204009cd call role_switch_check 
+0c06 24740000 nrtn user 
+0c07 18820400 copy am_addr ,temp 
+0c08 2040135d call get_free_amaddr 
+0c09 67e080e6 store 1 ,mem_fhs_am_addr 
+0c0a 18420800 copy temp ,am_addr 
+0c0b 70001120 jam param_newconnto ,mem_newconnto_counter 
+
+roles_sendfhs_loop:
+0c0c 449fc007 bpatch patch07_7 ,mem_patch07 
+0c0d 2040133c call rf_setup_time_master_slot 
+0c0e 18000202 force type_fhs ,type 
+0c0f 20400f77 call slave_send_access 
+0c10 1c427e00 deposit clkn_bt 
+0c11 67e200b1 store 4 ,mem_clkn_bt 
+0c12 20400f8a call transmit_packet 
+0c13 2040133a call rf_setup_time_slave_slot 
+0c14 7837fc00 enable user3 
+0c15 20400d1d call slave_receive_access 
+0c16 202c0c1e branch roles_got_fhs_reply ,sync 
+0c17 2040114f call shutdown_radio 
+0c18 20400c66 call new_conn_timeout 
+0c19 243a0c0c nbranch roles_sendfhs_loop ,blank 
+0c1a c6820000 rtnmark0 mark_accept_switch 
+0c1b 70007d34 jam lmp_slot_offset ,mem_lmo_opcode2 
+0c1c 79200003 set1 mark_switch_initiated ,mark 
+0c1d 20600000 rtn 
+
+roles_got_fhs_reply:
+0c1e 78387c00 enable clknt 
+0c1f 20400c46 call prepare_newconn 
+0c20 204010fa call afh_clear 
+
+roles_newconn_loop:
+0c21 44a04008 bpatch patch08_0 ,mem_patch08 
+0c22 20400b01 call master_newconn_once 
+0c23 202c0c2a branch roles_newconn_responded ,sync 
+0c24 20400c66 call new_conn_timeout 
+0c25 243a0c21 nbranch roles_newconn_loop ,blank 
+0c26 78587c00 disable clknt 
+0c27 1d027e00 deposit clke_bt 
+0c28 67e240d1 store 4 ,mem_next_btclk 
+0c29 20600000 rtn 
+
+roles_newconn_responded:
+0c2a 7834fc00 enable master 
+0c2b c5820c30 bmark0 mark_accept_switch ,roles_newconn_nolmp 
+0c2c 793f8004 set0 mark_accept_switch ,mark 
+0c2d 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+0c2e 70007e33 jam lmp_host_connection_req ,mem_lmi_opcode2 
+0c2f 20405a1d call tid_set_reply 
+
+roles_newconn_nolmp:
+0c30 18827e00 deposit am_addr 
+0c31 67e08078 store 1 ,mem_amaddr 
+0c32 18007e00 force 0 ,pdata 
+0c33 67e30039 store 6 ,mem_clk_offset 
+0c34 6fe08032 fetch 1 ,mem_mode 
+0c35 79207e01 set1 mode_master ,pdata 
+0c36 67e08032 store 1 ,mem_mode 
+0c37 20401376 call supervision_flush 
+0c38 7854fc00 disable master 
+0c39 78347c00 enable user 
+0c3a 20600000 rtn 
+
+init_rx_packet_flags:
+0c3b 44a0c008 bpatch patch08_1 ,mem_patch08 
+0c3c 7856fc00 disable match 
+0c3d 793f8005 set0 mark_loopback ,mark 
+0c3e 793f800a set0 mark_am_addr_broadcast ,mark 
+0c3f 793f8010 set0 mark_longpacket ,mark 
+0c40 793f800f set0 mark_old_packet ,mark 
+0c41 6fe08048 fetch 1 ,mem_arq 
+0c42 793ffe05 set0 arqnx ,pdata 
+0c43 79207e04 set1 flowx ,pdata 
+0c44 67e08048 store 1 ,mem_arq 
+0c45 20600000 rtn 
+
+prepare_newconn:
+0c46 44a14008 bpatch patch08_2 ,mem_patch08 
+0c47 70001120 jam param_newconnto ,mem_newconnto_counter 
+0c48 70004850 jam param_newconn_arq ,mem_arq 
+0c49 6fe140c6 fetch 2 ,mem_rx_window_init 
+0c4a 67e1003f store 2 ,mem_rx_window 
+0c4b 1c427e00 deposit clkn_bt 
+0c4c 67e240d1 store 4 ,mem_next_btclk 
+0c4d 20780000 rtn clknt 
+0c4e 1d027e00 deposit clke_bt 
+0c4f 67e240d1 store 4 ,mem_next_btclk 
+0c50 20600000 rtn 
+
+newconn_init:
+0c51 44a1c008 bpatch patch08_3 ,mem_patch08 
+0c52 20405390 call init_lmp_reinit 
+0c53 20400c6a call new_conn_handle 
+0c54 67e08047 store 1 ,mem_conn_handle 
+0c55 58000000 setarg 0 
+0c56 67e1030e store 2 ,mem_l2cap_rxbuff1_len 
+0c57 58001c80 setarg param_supervision_to 
+0c58 67e10052 store 2 ,mem_supervision_to 
+0c59 6fe08031 fetch 1 ,mem_state 
+0c5a 79207e00 set1 state_inconn ,pdata 
+0c5b 67e08031 store 1 ,mem_state 
+0c5c 70004c00 jam 0 ,mem_op 
+0c5d 70004d00 jam 0 ,mem_state_map 
+0c5e 70009e00 jam 0 ,mem_lpm_current_mult 
+0c5f 20201376 branch supervision_flush 
+
+clear_linkkey:
+0c60 44a24008 bpatch patch08_4 ,mem_patch08 
+0c61 18007e00 force 0 ,pdata 
+0c62 67e441cb store 8 ,mem_link_key 
+0c63 e7e40005 istore 8 ,contw 
+0c64 204009c9 call clear_linkstate 
+0c65 20200a63 branch context_traverse_linkkey 
+
+new_conn_timeout:
+0c66 6fe08011 fetch 1 ,mem_newconnto_counter 
+0c67 1fe0ffff increase -1 ,pdata 
+0c68 67e08011 store 1 ,mem_newconnto_counter 
+0c69 20600000 rtn 
+
+new_conn_handle:
+0c6a 6fe0c0d6 fetch 1 ,mem_handle_num 
+0c6b 1fe0fe01 increase 1 ,pdata 
+0c6c 67e0c0d6 store 1 ,mem_handle_num 
+0c6d 20600000 rtn 
+
+quit_connection:
+0c6e 44a2c008 bpatch patch08_5 ,mem_patch08 
+0c6f 6fe0c1db fetch 1 ,mem_hci_cmd 
+0c70 c0018c73 beq hci_cmd_remote_name_req ,quit_connection_name 
+0c71 6fe08049 fetch 1 ,mem_lmp_to_send 
+0c72 c0808c77 bne lmp_name_req ,quit_connection_cont 
+
+quit_connection_name:
+0c73 20404d88 call cmd_check_plap 
+0c74 24228c77 nbranch quit_connection_cont ,zero 
+0c75 204009a8 call master_name_error 
+0c76 7041db00 jam 0 ,mem_hci_cmd 
+
+quit_connection_cont:
+0c77 44a34008 bpatch patch08_6 ,mem_patch08 
+0c78 204031cc call app_disconn_reason_collect_bt 
+0c79 20400f16 call sniff_exit 
+0c7a 70095b02 jam bt_evt_bb_disconnected ,mem_fifo_temp 
+0c7b 20407871 call ui_ipc_send_event 
+0c7c 20405382 call init_lmp_work 
+0c7d 20404dc8 call l2cap_init_work 
+0c7e 20406ecc call sp_clear_flags 
+0c7f 6fe08031 fetch 1 ,mem_state 
+0c80 793ffe00 set0 state_inconn ,pdata 
+0c81 67e08031 store 1 ,mem_state 
+0c82 70478b00 jam 0 ,memui_reconnect_mode 
+0c83 6fe0804d fetch 1 ,mem_state_map 
+0c84 2fe18000 compare 0x0 ,pdata ,0xc0 
+0c85 20208c87 branch quit_connection_not_clear_mark ,true 
+0c86 793f8001 set0 mark_rxbuf_inuse ,mark 
+
+quit_connection_not_clear_mark:
+0c87 6fe08048 fetch 1 ,mem_arq 
+0c88 c3018c89 bbit0 wack ,quit_connection_not_clear_tx 
+
+quit_connection_not_clear_tx:
+0c89 6fe0804c fetch 1 ,mem_op 
+0c8a c4030000 rtnbit0 op_txl2cap 
+0c8b 793f8002 set0 mark_tx_l2cap ,mark 
+0c8c 20600000 rtn 
+
+slave_newconn_once:
+0c8d 44a3c008 bpatch patch08_7 ,mem_patch08 
+0c8e 6fe080c4 fetch 1 ,extm_newconn_am_addr 
+0c8f 207a0000 rtn blank 
+0c90 1fe20800 icopy am_addr 
+0c91 20400d3c call slave_conn_recv_packet 
+0c92 24768000 nrtn match 
+0c93 18000200 force type_null ,type 
+0c94 20400f7f call slave_conn_send_packet 
+0c95 18827e00 deposit am_addr 
+0c96 67e08078 store 1 ,mem_amaddr 
+0c97 18007e00 force 0 ,pdata 
+0c98 67e080c4 store 1 ,extm_newconn_am_addr 
+0c99 20600000 rtn 
+
+prepare_tx:
+0c9a 44a44009 bpatch patch09_0 ,mem_patch09 
+0c9b 6fe08031 fetch 1 ,mem_state 
+0c9c c3010ca7 bbit0 state_insco ,prepare_tx_not_sco 
+0c9d 18000207 force type_hv3 ,type 
+0c9e c5838ca6 bmark0 mark_esco ,prepare_tx_not_esco 
+0c9f 20400f4d call check_esco_amaddr 
+0ca0 24208ca7 nbranch prepare_tx_not_sco ,true 
+0ca1 20370ca7 branch prepare_tx_not_sco ,attempt 
+0ca2 20400ce8 call set_wait_ack 
+0ca3 58000002 setarg 2 
+0ca4 67e140cf store 2 ,mem_retransmission_cnt 
+0ca5 20600000 rtn 
+
+prepare_tx_not_esco:
+0ca6 24770000 nrtn attempt 
+
+prepare_tx_not_sco:
+0ca7 44a4c009 bpatch patch09_1 ,mem_patch09 
+0ca8 20400a52 call context_check_all_wack 
+0ca9 24228cb8 nbranch prepare_tx_no_retransmit ,zero 
+0caa 6fe08048 fetch 1 ,mem_arq 
+0cab c3018cc1 bbit0 wack ,prepare_tx_pollnull 
+
+prepare_tx_retransmit:
+0cac c5028cc5 bmark1 mark_loopback ,prepare_tx_loopback 
+0cad 6fe080e4 fetch 1 ,mem_debug_config 
+0cae c2830ccb bbit1 debug_tx_pattern ,prepare_tx_txpat 
+0caf 6fe140cf fetch 2 ,mem_retransmission_cnt 
+0cb0 1fe0ffff increase -1 ,pdata 
+0cb1 67e140cf store 2 ,mem_retransmission_cnt 
+0cb2 203a0cb6 branch prepare_tx_nomore_retransmit ,blank 
+0cb3 6fe0c0cc fetch 1 ,mem_last_type 
+0cb4 98000200 iforce type 
+0cb5 20600000 rtn 
+
+prepare_tx_nomore_retransmit:
+0cb6 44a54009 bpatch patch09_2 ,mem_patch09 
+0cb7 20400ebb call clear_got_tx 
+
+prepare_tx_no_retransmit:
+0cb8 20400f4d call check_esco_amaddr 
+0cb9 20208cc1 branch prepare_tx_pollnull ,true 
+0cba 204056fb call send_lmp 
+0cbb 20340ccf branch prepare_tx_sendlmp ,user 
+0cbc 6fe0804c fetch 1 ,mem_op 
+0cbd c2830cdb bbit1 op_txl2cap ,prepare_tx_sendl2cap 
+0cbe c5028cc5 bmark1 mark_loopback ,prepare_tx_loopback 
+0cbf 6fe080e4 fetch 1 ,mem_debug_config 
+0cc0 c2830ccb bbit1 debug_tx_pattern ,prepare_tx_txpat 
+
+prepare_tx_pollnull:
+0cc1 18000201 force type_poll ,type 
+0cc2 20748000 rtn master 
+0cc3 18000200 force type_null ,type 
+0cc4 20600000 rtn 
+
+prepare_tx_loopback:
+0cc5 44a5c009 bpatch patch09_3 ,mem_patch09 
+0cc6 6fe0801a fetch 1 ,mem_rx_type 
+0cc7 98000200 iforce type 
+0cc8 c1808000 rtnne 1 
+0cc9 18000200 force type_null ,type 
+0cca 20600000 rtn 
+
+prepare_tx_txpat:
+0ccb 6fe08a58 fetch 1 ,test_mode_packet_type 
+0ccc 1fe1020f and pdata ,0xf ,type 
+0ccd 79200005 set1 mark_loopback ,mark 
+0cce 20600000 rtn 
+
+prepare_tx_sendlmp:
+0ccf 18000213 force type_lmp ,type 
+0cd0 20400ce8 call set_wait_ack 
+
+prepare_tx_ccm_edr_lmp:
+0cd1 20400de1 call check_enc_ccm 
+0cd2 207a0000 rtn blank 
+0cd3 7041e403 jam 3 ,mem_llid 
+0cd4 6fe0838a fetch 1 ,mem_lmo_header_length 
+0cd5 1fe17ff8 and pdata ,0x1f8 ,pdata 
+0cd6 1fe97e00 rshift3 pdata ,pdata 
+0cd7 67e146b2 store 2 ,mem_ccm_len 
+0cd8 1fe22200 copy pdata ,rega 
+0cd9 da60038b arg mem_lmo_header_opcode ,regc 
+0cda 20206c9b branch ccm_br_enc_new 
+
+prepare_tx_sendl2cap:
+0cdb 20400cf1 call tx_l2cap_type 
+0cdc 20400ce8 call set_wait_ack 
+
+prepare_tx_ccm_edr:
+0cdd 20400de1 call check_enc_ccm 
+0cde 207a0000 rtn blank 
+0cdf 6fe0c1e5 fetch 1 ,mem_tx_lch 
+0ce0 1fe17e03 and_into 3 ,pdata 
+0ce1 67e0c1e4 store 1 ,mem_llid 
+0ce2 6fe141e6 fetch 2 ,mem_tx_len 
+0ce3 1fe22200 copy pdata ,rega 
+0ce4 67e146b2 store 2 ,mem_ccm_len 
+0ce5 6fe100bf fetch 2 ,mem_txptr 
+0ce6 1fe22600 copy pdata ,regc 
+0ce7 20206c9b branch ccm_br_enc_new 
+
+set_wait_ack:
+0ce8 44a64009 bpatch patch09_4 ,mem_patch09 
+0ce9 68488048 fetcht 1 ,mem_arq 
+0cea 79200403 set1 wack ,temp 
+0ceb 60488048 storet 1 ,mem_arq 
+0cec 18227e00 deposit type 
+0ced 67e0c0cc store 1 ,mem_last_type 
+0cee 5800ffff setarg 0xffff 
+0cef 67e140cf store 2 ,mem_retransmission_cnt 
+0cf0 20600000 rtn 
+
+tx_l2cap_type:
+0cf1 44a6c009 bpatch patch09_5 ,mem_patch09 
+0cf2 6fe0804d fetch 1 ,mem_state_map 
+0cf3 2feffe05 isolate1 smap_edr ,pdata 
+0cf4 6fe141e6 fetch 2 ,mem_tx_len 
+0cf5 20208d07 branch tx_l2cap_type_edr ,true 
+0cf6 18000203 force type_dm1 ,type 
+0cf7 1fe67c11 sub pdata ,17 ,null 
+0cf8 20610000 rtn positive 
+0cf9 18000204 force type_dh1 ,type 
+0cfa 1fe67c1b sub pdata ,27 ,null 
+0cfb 20610000 rtn positive 
+0cfc 1800020a force type_dm3 ,type 
+0cfd 1fe67c79 sub pdata ,121 ,null 
+0cfe 20610000 rtn positive 
+0cff 1800020b force type_dh3 ,type 
+0d00 1fe67cb7 sub pdata ,183 ,null 
+0d01 20610000 rtn positive 
+0d02 1800020e force type_dm5 ,type 
+0d03 1fe67ce0 sub pdata ,224 ,null 
+0d04 20610000 rtn positive 
+0d05 1800020f force type_dh5 ,type 
+0d06 20600000 rtn 
+
+tx_l2cap_type_edr:
+0d07 18000203 force type_dm1 ,type 
+0d08 1fe67c11 sub pdata ,17 ,null 
+0d09 20610000 rtn positive 
+0d0a 18000204 force type_dh1 ,type 
+0d0b 1fe67c36 sub pdata ,54 ,null 
+0d0c 20610000 rtn positive 
+0d0d 1800020a force type_dm3 ,type 
+0d0e d840016f arg 367 ,temp 
+0d0f 98467c00 isub temp ,null 
+0d10 24610000 nrtn positive 
+0d11 1800020e force type_dm5 ,type 
+0d12 d84002a7 arg 679 ,temp 
+0d13 98467c00 isub temp ,null 
+0d14 24610000 nrtn positive 
+0d15 1800020f force type_dh5 ,type 
+0d16 20600000 rtn 
+
+slave_receive_master_slot:
+0d17 6fe08031 fetch 1 ,mem_state 
+0d18 c3008d1c bbit0 state_insniff ,slave_receive_notsniff 
+0d19 6fe10033 fetch 2 ,mem_tsniff 
+0d1a 203a0d1c branch slave_receive_notsniff ,blank 
+0d1b 24370d1e nbranch slave_receive_sniff ,attempt 
+
+slave_receive_notsniff:
+0d1c 2040133c call rf_setup_time_master_slot 
+
+slave_receive_access:
+0d1d 1d00c201 add clke_bt ,1 ,bt_clk 
+
+slave_receive_sniff:
+0d1e 78287c00 enable swfine 
+0d1f 6fe1003f fetch 2 ,mem_rx_window 
+0d20 1fe37e00 rshift pdata ,pdata 
+0d21 6849015d fetcht 2 ,mem_param_pll_setup 
+0d22 9840fe00 iadd temp ,pdata 
+0d23 20401311 call ahead_window 
+0d24 20401140 call fetch_extm_bt_adr 
+0d25 18004803 force 0x03 ,freq_mode 
+0d26 20401122 call rx_radio_freq 
+0d27 20400c3b call init_rx_packet_flags 
+0d28 204012d8 call prep_crypt 
+0d29 44a74009 bpatch patch09_6 ,mem_patch09 
+0d2a 6fe1003f fetch 2 ,mem_rx_window 
+0d2b 1fe37e00 rshift pdata ,pdata 
+0d2c 20401311 call ahead_window 
+0d2d 204012d3 call start_receiver 
+0d2e 7826fc00 enable decode_fec0 
+0d2f 6fe1003f fetch 2 ,mem_rx_window 
+0d30 6849015b fetcht 2 ,mem_param_clke_cal 
+0d31 9840b600 iadd temp ,stop_watch 
+0d32 37c18400 correlate null ,timeout 
+0d33 1b420400 copy clke ,temp 
+0d34 604b0098 storet 6 ,mem_sync_clke 
+0d35 7846fc00 disable decode_fec0 
+0d36 246c0000 nrtn sync 
+0d37 6fe1015b fetch 2 ,mem_param_clke_cal 
+0d38 1fe25200 copy pdata ,clke_rt 
+0d39 1c225000 copy bt_clk ,clke_bt 
+0d3a 20359473 branch lpm_adjust_clk ,wake 
+0d3b 20600000 rtn 
+
+slave_conn_recv_packet:
+0d3c 44a7c009 bpatch patch09_7 ,mem_patch09 
+0d3d 20400d17 call slave_receive_master_slot 
+0d3e 242c114f nbranch shutdown_radio ,sync 
+0d3f 2040127d call save_rssi 
+0d40 c5888d44 bmark0 mark_testmode ,receive_packet 
+0d41 6fe109f6 fetch 2 ,mem_tst_pktcnt_sync 
+0d42 1fe0fe01 increase 1 ,pdata 
+0d43 67e109f6 store 2 ,mem_tst_pktcnt_sync 
+
+receive_packet:
+0d44 20404caf call rf_debug_rx_sync_line 
+0d45 1c230400 rshift bt_clk ,temp 
+0d46 18419c40 or temp ,0x40 ,white_init 
+
+receive_packet_whitened:
+0d47 44a8400a bpatch patch0a_0 ,mem_patch0a 
+0d48 7823fc00 enable enable_white 
+0d49 78257c00 enable enable_hec 
+0d4a 7825fc00 enable decode_fec1 
+0d4b 09800003 parse demod ,bucket ,3 
+0d4c 198cfe00 rshift8 pwindow ,pdata 
+0d4d 67e080ad store 1 ,mem_temp_am_addr 
+0d4e 09800004 parse demod ,bucket ,4 
+0d4f 08008007 inject bucket ,7 
+0d50 19827e00 copy pwindow ,pdata 
+0d51 67e0801a store 1 ,mem_rx_type 
+0d52 09800003 parse demod ,bucket ,3 
+0d53 198cfe00 rshift8 pwindow ,pdata 
+0d54 67e080ae store 1 ,mem_temp_arq 
+0d55 6fe0801a fetch 1 ,mem_rx_type 
+0d56 1fe67c03 sub pdata ,3 ,null 
+0d57 20210d5c branch receive_packet_noedr ,positive 
+0d58 c0038d5c beq 7 ,receive_packet_noedr 
+0d59 6fe0804d fetch 1 ,mem_state_map 
+0d5a 2feffe05 isolate1 smap_edr ,pdata 
+0d5b 7920aa01 setflag true ,psk ,radio_ctrl 
+
+receive_packet_noedr:
+0d5c 44a8c00a bpatch patch0a_1 ,mem_patch0a 
+0d5d 09800008 parse demod ,bucket ,8 
+0d5e 7845fc00 disable decode_fec1 
+0d5f 78457c00 disable enable_hec 
+0d60 20230e63 branch error_header ,crc_failed 
+0d61 c5888d65 bmark0 mark_testmode ,receive_packet_amchk 
+0d62 6fe109f8 fetch 2 ,mem_tst_pktcnt_hec 
+0d63 1fe0fe01 increase 1 ,pdata 
+0d64 67e109f8 store 2 ,mem_tst_pktcnt_hec 
+
+receive_packet_amchk:
+0d65 44a9400a bpatch patch0a_2 ,mem_patch0a 
+0d66 6fe080ad fetch 1 ,mem_temp_am_addr 
+0d67 2fe00e00 compare 0 ,pdata ,0x07 
+0d68 7920800a setflag true ,mark_am_addr_broadcast ,mark 
+0d69 20208d73 branch am_addr_ok ,true 
+0d6a a8800e00 icompare 0x07 ,am_addr 
+0d6b 20208d71 branch am_addr_match ,true 
+0d6c c5838e80 bmark0 mark_esco ,end_of_packet 
+0d6d 6fe08048 fetch 1 ,mem_arq 
+0d6e 793ffe05 set0 arqnx ,pdata 
+0d6f 79207e04 set1 flowx ,pdata 
+0d70 67e08048 store 1 ,mem_arq 
+
+am_addr_match:
+0d71 20404cb2 call rf_debug_rx_match_line 
+0d72 7836fc00 enable match 
+
+am_addr_ok:
+0d73 44a9c00a bpatch patch0a_3 ,mem_patch0a 
+0d74 6fe0801a fetch 1 ,mem_rx_type 
+0d75 1fe20200 icopy type 
+0d76 c5050d82 bmark1 mark_am_addr_broadcast ,arqn_bypass 
+0d77 684880ae fetcht 1 ,mem_temp_arq 
+0d78 6fe08048 fetch 1 ,mem_arq 
+0d79 793ffe00 set0 flow ,pdata 
+0d7a 284ffe00 isolate1 flow ,temp 
+0d7b 7920fe00 setflag true ,flow ,pdata 
+0d7c 284ffe01 isolate1 arqn ,temp 
+0d7d 7920fe01 setflag true ,arqn ,pdata 
+0d7e 67e08048 store 1 ,mem_arq 
+0d7f 284c0001 isolate0 arqn ,temp 
+0d80 20208d82 branch arqn_bypass ,true 
+0d81 20400ebb call clear_got_tx 
+
+arqn_bypass:
+0d82 44aa400a bpatch patch0a_4 ,mem_patch0a 
+0d83 d8400000 arg 0 ,temp 
+0d84 20401309 call reserve_slot 
+0d85 18217e0f and type ,0xf ,pdata 
+0d86 c0008d9e beq type_poll ,process_poll 
+0d87 c0000e80 beq type_null ,end_of_packet 
+0d88 c0010e8c beq type_fhs ,process_fhs 
+0d89 684880ae fetcht 1 ,mem_temp_arq 
+0d8a 6fe08048 fetch 1 ,mem_arq 
+0d8b a8400800 icompare 0x04 ,temp 
+0d8c 24208d90 nbranch rx_type_dispatch ,true 
+0d8d c5850d8f bmark0 mark_am_addr_broadcast ,failed_seqn 
+0d8e c3038d90 bbit0 bcast1 ,rx_type_dispatch 
+
+failed_seqn:
+0d8f 7920000f set1 mark_old_packet ,mark 
+
+rx_type_dispatch:
+0d90 44aac00a bpatch patch0a_5 ,mem_patch0a 
+0d91 18227e00 deposit type 
+0d92 c0018da0 beq type_dm1 ,process_dm1 
+0d93 c0020da4 beq type_dh1 ,process_dh1 
+0d94 c0040da3 beq type_3dh1 ,process_3dh1 
+0d95 d8400004 arg 4 ,temp 
+0d96 20401309 call reserve_slot 
+0d97 c0050d9f beq type_dm3 ,process_dm3 
+0d98 c0058da2 beq type_dh3 ,process_dh3 
+0d99 d8400008 arg 8 ,temp 
+0d9a 20401309 call reserve_slot 
+0d9b c0070d9f beq type_dm5 ,process_dm5 
+0d9c c0078da2 beq type_dh5 ,process_dh5 
+0d9d 20600000 rtn 
+
+process_poll:
+0d9e 20200e80 branch end_of_packet 
+
+process_dm3:
+
+process_dm5:
+0d9f 79200010 set1 mark_longpacket ,mark 
+
+process_dm1:
+0da0 78267c00 enable decode_fec2 
+0da1 20200da5 branch process_dmh 
+
+process_dh3:
+
+process_dh5:
+0da2 79200010 set1 mark_longpacket ,mark 
+
+process_3dh1:
+0da3 79202a02 set1 psk3m ,radio_ctrl 
+
+process_dh1:
+0da4 7826fc00 enable decode_fec0 
+
+process_dmh:
+0da5 44ab400a bpatch patch0a_6 ,mem_patch0a 
+0da6 c5198e80 bmark1 mark_first_packet ,end_of_packet 
+0da7 c5008e80 bmark1 mark_rxbuf_inuse ,end_of_packet 
+0da8 2aac0001 isolate0 psk ,radio_ctrl 
+0da9 20208db2 branch process_dmh_noedr ,true 
+0daa 7843fc00 disable enable_white 
+0dab 7826fc00 enable decode_fec0 
+0dac 78467c00 disable decode_fec2 
+0dad 1c409602 add clkn_bt ,2 ,timeup 
+0dae 34530400 correlate clkn_bt ,meet 
+0daf 242c0e6f nbranch error_payload ,sync 
+0db0 79200010 set1 mark_longpacket ,mark 
+0db1 7823fc00 enable enable_white 
+
+process_dmh_noedr:
+0db2 44abc00a bpatch patch0a_7 ,mem_patch0a 
+0db3 78277c00 enable encrypt 
+0db4 7824fc00 enable enable_crc 
+0db5 09800003 parse demod ,bucket ,3 
+0db6 198cfe00 rshift8 pwindow ,pdata 
+0db7 67e080e5 store 1 ,mem_lch_code 
+0db8 09800005 parse demod ,bucket ,5 
+0db9 c5080dbd bmark1 mark_longpacket ,process_dmh_long 
+0dba 19897200 rshift3 pwindow ,loopcnt 
+0dbb 1f297200 rshift3 loopcnt ,loopcnt 
+0dbc 20200dc0 branch process_dmh_common 
+
+process_dmh_long:
+0dbd 09800005 parse demod ,bucket ,5 
+0dbe 19837200 rshift pwindow ,loopcnt 
+0dbf 09800003 parse demod ,bucket ,3 
+
+process_dmh_common:
+0dc0 44ac400b bpatch patch0b_0 ,mem_patch0b 
+0dc1 1f227e00 deposit loopcnt 
+0dc2 67e100af store 2 ,mem_len 
+0dc3 203a0dd8 branch process_dmh_data_0 ,blank 
+0dc4 20400de1 call check_enc_ccm 
+0dc5 203a0dc8 branch process_dmh_common2 ,blank 
+
+process_dmh_common2_ccm:
+0dc6 1f20f204 increase 4 ,loopcnt 
+0dc7 1f227e00 deposit loopcnt 
+
+process_dmh_common2:
+0dc8 9ea67c00 isub mask3ff ,null 
+0dc9 20210e6f branch error_payload ,positive 
+0dca 44acc00b bpatch patch0b_1 ,mem_patch0b 
+0dcb 793f8000 set0 mark_fhs_eir ,mark 
+0dcc 6fe080e5 fetch 1 ,mem_lch_code 
+0dcd 1fe17e03 and_into 0x03 ,pdata 
+0dce d8a000cf arg mem_rxbuf ,contw 
+0dcf c0018de6 beq llid_lmp ,process_lmp 
+0dd0 c5088dd6 bmark1 mark_testmode ,process_dmh_common2_testmode 
+0dd1 6fe080e5 fetch 1 ,mem_lch_code 
+0dd2 1fe17e03 and_into 0x03 ,pdata 
+0dd3 c0010deb beq llid_l2cap_start ,process_dmh_data_l2cap_start_pkt 
+0dd4 c0008dff beq llid_l2cap_cont ,process_dmh_data_l2cap_continue_pkt 
+0dd5 20200e6f branch error_payload 
+
+process_dmh_common2_testmode:
+0dd6 d8a01000 arg mem_l2cap_rxbuff1 ,contw 
+0dd7 20200e10 branch process_dmh_data 
+
+process_dmh_data_0:
+0dd8 20400de1 call check_enc_ccm 
+0dd9 203a0e14 branch process_dmh_data_end ,blank 
+0dda 58000000 setarg 0 
+0ddb 67e146b2 store 2 ,mem_ccm_len 
+0ddc 09800020 parse demod ,bucket ,32 
+0ddd 1fef7e00 rshift32 pdata ,pdata 
+0dde 1fecfe00 rshift8 pdata ,pdata 
+0ddf 67e20273 store 4 ,mem_le_peer_mic 
+0de0 20200e14 branch process_dmh_data_end 
+
+check_enc_ccm:
+0de1 6fe0804d fetch 1 ,mem_state_map 
+0de2 c3017e60 bbit0 smap_encryption ,enable_blank 
+0de3 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+0de4 c0817e60 bne encapsulated_minor_type_p256 ,enable_blank 
+0de5 20207e5e branch disable_blank 
+
+process_lmp:
+0de6 6fe100af fetch 2 ,mem_len 
+0de7 1fe67c11 sub pdata ,17 ,null 
+0de8 24210e6f nbranch error_payload ,positive 
+0de9 c5078e50 bmark1 mark_old_packet ,ack_payload 
+0dea 20200e10 branch process_dmh_data 
+
+process_dmh_data_l2cap_start_pkt:
+0deb 44ad400b bpatch patch0b_2 ,mem_patch0b 
+0dec c5078e50 bmark1 mark_old_packet ,ack_payload 
+0ded 6fe100af fetch 2 ,mem_len 
+0dee d84002e0 arg 0x2e0 ,temp 
+0def 98467c00 isub temp ,null 
+0df0 20210e6f branch error_payload ,positive 
+0df1 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0df2 c3000df5 bbit0 l2cap_inuse_buff1 ,process_dmh_data_into_buff1 
+0df3 c3008dfa bbit0 l2cap_inuse_buff2 ,process_dmh_data_into_buff2 
+0df4 20200e80 branch end_of_packet 
+
+process_dmh_data_into_buff1:
+0df5 70031201 jam 1 ,mem_l2cap_rxbuff_new 
+0df6 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+0df7 c0800e80 bne 0 ,end_of_packet 
+0df8 d8a01000 arg mem_l2cap_rxbuff1 ,contw 
+0df9 20200e10 branch process_dmh_data 
+
+process_dmh_data_into_buff2:
+0dfa 70031202 jam 2 ,mem_l2cap_rxbuff_new 
+0dfb 6fe10310 fetch 2 ,mem_l2cap_rxbuff2_len 
+0dfc c0800e80 bne 0 ,end_of_packet 
+0dfd d8a01400 arg mem_l2cap_rxbuff2 ,contw 
+0dfe 20200e10 branch process_dmh_data 
+
+process_dmh_data_l2cap_continue_pkt:
+0dff 44adc00b bpatch patch0b_3 ,mem_patch0b 
+0e00 c5078e50 bmark1 mark_old_packet ,ack_payload 
+0e01 6fe100af fetch 2 ,mem_len 
+0e02 d84002e0 arg 0x2e0 ,temp 
+0e03 98467c00 isub temp ,null 
+0e04 20210e6f branch error_payload ,positive 
+0e05 6fe08312 fetch 1 ,mem_l2cap_rxbuff_new 
+0e06 c0008e09 beq 1 ,process_dmh_data_l2cap_continue_pkt1 
+0e07 c0010e0d beq 2 ,process_dmh_data_l2cap_continue_pkt2 
+0e08 20200e80 branch end_of_packet 
+
+process_dmh_data_l2cap_continue_pkt1:
+0e09 d8a01000 arg mem_l2cap_rxbuff1 ,contw 
+0e0a 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+0e0b 98a08a00 iadd contw ,contw 
+0e0c 20200e10 branch process_dmh_data 
+
+process_dmh_data_l2cap_continue_pkt2:
+0e0d d8a01400 arg mem_l2cap_rxbuff2 ,contw 
+0e0e 6fe10310 fetch 2 ,mem_l2cap_rxbuff2_len 
+0e0f 98a08a00 iadd contw ,contw 
+
+process_dmh_data:
+0e10 09800008 parse demod ,bucket ,8 
+0e11 19897e00 rshift3 pwindow ,pdata 
+0e12 e7e08005 istore 1 ,contw 
+0e13 c2000e10 loop process_dmh_data 
+
+process_dmh_data_end:
+0e14 44ae400b bpatch patch0b_4 ,mem_patch0b 
+0e15 09800010 parse demod ,bucket ,16 
+0e16 20230e69 branch error_payload_crc ,crc_failed 
+0e17 20400de1 call check_enc_ccm 
+0e18 20407e58 call enable_user2 
+0e19 245a6ccc ncall ccm_br_decrypt_new ,blank 
+0e1a 24360e70 nbranch error_mic_error ,user2 
+0e1b 20404cae call rf_debug_rx_crc_line 
+0e1c 6fe0c5f3 fetch 1 ,mem_l2cap_flow_ctrl_flag 
+0e1d c0008e70 beq l2cap_flow_ctrl_enable ,flow_ctrl 
+0e1e c5088e3d bmark1 mark_testmode ,process_dmh_cont 
+0e1f c5078e7d bmark1 mark_old_packet ,redundant_payload 
+0e20 6fe080e5 fetch 1 ,mem_lch_code 
+0e21 2fe00603 compare 3 ,pdata ,3 
+0e22 20208e3d branch process_dmh_cont ,true 
+0e23 6fe100af fetch 2 ,mem_len 
+0e24 203a0e3d branch process_dmh_cont ,blank 
+0e25 44aec00b bpatch patch0b_5 ,mem_patch0b 
+0e26 6fe08312 fetch 1 ,mem_l2cap_rxbuff_new 
+0e27 c0008e2a beq 1 ,process_l2cap_pass_crc_buff1 
+0e28 c0010e34 beq 2 ,process_l2cap_pass_crc_buff2 
+0e29 2020137a branch assert 
+
+process_l2cap_pass_crc_buff1:
+0e2a 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+0e2b 684900af fetcht 2 ,mem_len 
+0e2c 9840fe00 iadd temp ,pdata 
+0e2d 67e1030e store 2 ,mem_l2cap_rxbuff1_len 
+0e2e 207a0000 rtn blank 
+0e2f 68491000 fetcht 2 ,mem_l2cap_rxbuff1 
+0e30 18408404 increase 4 ,temp 
+0e31 98467c00 isub temp ,null 
+0e32 20428f6f call l2cap_buff1_inuse ,zero 
+0e33 20200e3d branch process_dmh_cont 
+
+process_l2cap_pass_crc_buff2:
+0e34 6fe10310 fetch 2 ,mem_l2cap_rxbuff2_len 
+0e35 684900af fetcht 2 ,mem_len 
+0e36 9840fe00 iadd temp ,pdata 
+0e37 67e10310 store 2 ,mem_l2cap_rxbuff2_len 
+0e38 207a0000 rtn blank 
+0e39 68491400 fetcht 2 ,mem_l2cap_rxbuff2 
+0e3a 18408404 add temp ,4 ,temp 
+0e3b 98467c00 isub temp ,null 
+0e3c 20428f73 call l2cap_buff2_inuse ,zero 
+
+process_dmh_cont:
+0e3d 44af400b bpatch patch0b_6 ,mem_patch0b 
+0e3e 6848804d fetcht 1 ,mem_state_map 
+0e3f 6fe080e5 fetch 1 ,mem_lch_code 
+0e40 2fe00603 compare 3 ,pdata ,0x03 
+0e41 79208406 setflag true ,smap_rxlmp ,temp 
+0e42 7d208407 nsetflag true ,smap_rxl2cap ,temp 
+0e43 6048804d storet 1 ,mem_state_map 
+0e44 24208e46 nbranch process_dmh_cont_rxbuf_not_use ,true 
+0e45 79200001 set1 mark_rxbuf_inuse ,mark 
+
+process_dmh_cont_rxbuf_not_use:
+0e46 c5888e50 bmark0 mark_testmode ,ack_payload 
+0e47 284ffe06 isolate1 smap_rxlmp ,temp 
+0e48 20208e50 branch ack_payload ,true 
+0e49 6fe109fa fetch 2 ,mem_tst_pktcnt_crc 
+0e4a 1fe0fe01 increase 1 ,pdata 
+0e4b 67e109fa store 2 ,mem_tst_pktcnt_crc 
+0e4c 79200005 set1 mark_loopback ,mark 
+0e4d 793f8407 set0 smap_rxl2cap ,temp 
+0e4e 793f8001 set0 mark_rxbuf_inuse ,mark 
+0e4f 6048804d storet 1 ,mem_state_map 
+
+ack_payload:
+0e50 44afc00b bpatch patch0b_7 ,mem_patch0b 
+0e51 20400de1 call check_enc_ccm 
+0e52 245a6cf3 ncall ccm_br_pcnt_rx_add ,blank 
+0e53 684880ae fetcht 1 ,mem_temp_arq 
+0e54 6fe08048 fetch 1 ,mem_arq 
+0e55 79207e05 set1 arqnx ,pdata 
+0e56 284ffe02 isolate1 seqn ,temp 
+0e57 7920fe02 setflag true ,seqn ,pdata 
+0e58 280ffe0a isolate1 mark_am_addr_broadcast ,mark 
+0e59 7920fe07 setflag true ,bcast1 ,pdata 
+0e5a 67e08048 store 1 ,mem_arq 
+0e5b 6fe100af fetch 2 ,mem_len 
+0e5c 243a0e80 nbranch end_of_packet ,blank 
+0e5d 6fe0804d fetch 1 ,mem_state_map 
+0e5e 793ffe07 set0 smap_rxl2cap ,pdata 
+0e5f 67e0804d store 1 ,mem_state_map 
+0e60 6fe080e5 fetch 1 ,mem_lch_code 
+0e61 2fe00e01 compare 0x01 ,pdata ,0x07 
+0e62 20200e80 branch end_of_packet 
+
+error_header:
+0e63 44b0400c bpatch patch0c_0 ,mem_patch0c 
+0e64 7856fc00 disable match 
+0e65 6fe1001b fetch 2 ,mem_rx_hec_err 
+0e66 1fe0fe01 increase 1 ,pdata 
+0e67 67e1001b store 2 ,mem_rx_hec_err 
+0e68 20200e80 branch end_of_packet 
+
+error_payload_crc:
+0e69 6fe1001d fetch 2 ,mem_rx_crc_err 
+0e6a 1fe0fe01 increase 1 ,pdata 
+0e6b 67e1001d store 2 ,mem_rx_crc_err 
+0e6c 20400e71 call discard_pkt 
+0e6d c5888e6f bmark0 mark_testmode ,error_payload 
+0e6e 79200005 set1 mark_loopback ,mark 
+
+error_payload:
+0e6f 20200e80 branch end_of_packet 
+
+flow_ctrl:
+
+error_mic_error:
+0e70 20200e69 branch error_payload_crc 
+
+discard_pkt:
+0e71 44b0c00c bpatch patch0c_1 ,mem_patch0c 
+0e72 6fe080e5 fetch 1 ,mem_lch_code 
+0e73 2fe00603 compare 3 ,pdata ,0x03 
+0e74 24208e79 nbranch discard_pkt_l2cap ,true 
+
+discard_pkt_lmp:
+0e75 6848804d fetcht 1 ,mem_state_map 
+0e76 793f8406 set0 smap_rxlmp ,temp 
+0e77 6048804d storet 1 ,mem_state_map 
+0e78 20600000 rtn 
+
+discard_pkt_l2cap:
+0e79 6848804d fetcht 1 ,mem_state_map 
+0e7a 793f8407 set0 smap_rxl2cap ,temp 
+0e7b 6048804d storet 1 ,mem_state_map 
+0e7c 20600000 rtn 
+
+redundant_payload:
+0e7d 6fe08048 fetch 1 ,mem_arq 
+0e7e 79207e05 set1 arqnx ,pdata 
+0e7f 67e08048 store 1 ,mem_arq 
+
+end_of_packet:
+0e80 44b1400c bpatch patch0c_2 ,mem_patch0c 
+0e81 784efc00 disable encode_fec0 
+0e82 784e7c00 disable encode_fec2 
+0e83 7846fc00 disable decode_fec0 
+0e84 78467c00 disable decode_fec2 
+0e85 7844fc00 disable enable_crc 
+0e86 78477c00 disable encrypt 
+0e87 7843fc00 disable enable_white 
+0e88 2030914f branch shutdown_radio ,is_rx 
+0e89 37d38200 until null ,tx_clear 
+0e8a 20000064 nop 100 
+0e8b 2020114f branch shutdown_radio 
+
+process_fhs:
+0e8c 44b1c00c bpatch patch0c_3 ,mem_patch0c 
+0e8d 7824fc00 enable enable_crc 
+0e8e 78267c00 enable decode_fec2 
+0e8f 09800048 parse demod ,bucket ,72 
+0e90 2feffe3a isolate1 58 ,pdata 
+0e91 79208000 setflag true ,mark_fhs_eir ,mark 
+0e92 1c020400 copy bt_adr ,temp 
+0e93 57e04000 ialigned bt_adr 
+0e94 57e03c00 ialigned fhs0 
+0e95 782afc00 pulse recalc 
+0e96 380bffff setsect 2 ,0xfffff 
+0e97 380cffff setsect 3 ,0x0ffff 
+0e98 20000020 nop 32 
+0e99 29a80000 iverify fhs_parity 
+0e9a 1d827e00 deposit lap 
+0e9b 67e180c8 store 3 ,extm_lap 
+0e9c 1da27e00 deposit uap 
+0e9d 67e080cb store 1 ,extm_uap 
+0e9e 18424000 copy temp ,bt_adr 
+0e9f 20208ea1 branch fhs_parity_ok ,true 
+0ea0 20200e6f branch error_payload 
+
+fhs_parity_ok:
+0ea1 44b2400c bpatch patch0c_4 ,mem_patch0c 
+0ea2 09800048 parse demod ,bucket ,72 
+0ea3 57e03e00 ialigned fhs1 
+0ea4 57e00800 ialigned am_addr 
+0ea5 57e05c00 ialigned nap 
+0ea6 57e02400 ialigned regb 
+0ea7 18007e00 force 0 ,pdata 
+0ea8 09800010 parse demod ,bucket ,16 
+0ea9 20230e6f branch error_payload ,crc_failed 
+0eaa 20404cae call rf_debug_rx_crc_line 
+0eab 5ffffffc setarg 0x0ffffffc 
+0eac 9a417e00 iand regb ,pdata 
+0ead 67e200b5 store 4 ,mem_clke_bt 
+0eae 1ba27e00 deposit fhs_class 
+0eaf 67e180c5 store 3 ,extm_class 
+0eb0 1b827e00 deposit fhs_misc 
+0eb1 67e080c3 store 1 ,extm_fhs_misc 
+0eb2 18827e00 deposit am_addr 
+0eb3 67e080c4 store 1 ,extm_newconn_am_addr 
+0eb4 1dc27e00 deposit nap 
+0eb5 67e100cc store 2 ,extm_nap 
+0eb6 1c227e00 deposit bt_clk 
+0eb7 08008220 inject rxf ,32 
+0eb8 28201e02 compare type_fhs ,type ,0x0f 
+0eb9 7920800b setflag true ,mark_fhs_already_good ,mark 
+0eba 20200e80 branch end_of_packet 
+
+clear_got_tx:
+0ebb 44b2c00c bpatch patch0c_5 ,mem_patch0c 
+0ebc 6fe08048 fetch 1 ,mem_arq 
+0ebd c4018000 rtnbit0 wack 
+0ebe 793ffe03 set0 wack ,pdata 
+0ebf 79407e06 setflip seqnx ,pdata 
+0ec0 67e08048 store 1 ,mem_arq 
+0ec1 20400de1 call check_enc_ccm 
+0ec2 245a6cb9 ncall ccm_br_pcnt_tx_add ,blank 
+0ec3 6fe0c0cc fetch 1 ,mem_last_type 
+0ec4 c0098ed2 beq type_lmp ,clear_got_txlmp 
+0ec5 c1038000 rtneq type_hv3 
+0ec6 6fe0804c fetch 1 ,mem_op 
+0ec7 c4030000 rtnbit0 op_txl2cap ,pdata 
+0ec8 793ffe06 set0 op_txl2cap ,pdata 
+0ec9 79207e07 set1 op_pkt_comp ,pdata 
+0eca 67e0804c store 1 ,mem_op 
+0ecb 793f8002 set0 mark_tx_l2cap ,mark 
+0ecc 6fe144d6 fetch 2 ,mem_l2cap_tx_multi_offset 
+0ecd 247a0000 nrtn blank 
+0ece 6fe0804c fetch 1 ,mem_op 
+0ecf 793ffe07 set0 op_pkt_comp ,pdata 
+0ed0 67e0804c store 1 ,mem_op 
+0ed1 202052e0 branch l2cap_malloc_free 
+
+clear_got_txlmp:
+0ed2 44b3400c bpatch patch0c_6 ,mem_patch0c 
+0ed3 6fe0c5f6 fetch 1 ,mem_lmo_header_opcode_x 
+0ed4 1fe37e00 rshift pdata ,pdata 
+0ed5 c0088ee5 beq lmp_start_encryption_req ,start_encryption 
+0ed6 c0090eef beq lmp_stop_encryption_req ,stop_encryption 
+0ed7 c00c0f16 beq lmp_unsniff_req ,sniff_exit 
+0ed8 c03f8edd beq lmp_escape ,clear_lmp_escape 
+0ed9 c1818000 rtnne lmp_accepted 
+0eda 6fe0838c fetch 1 ,mem_lmo_payload 
+0edb c0088ee0 beq lmp_start_encryption_req ,clear_send_setup_complete 
+0edc 20600000 rtn 
+
+clear_lmp_escape:
+0edd 6fe0838c fetch 1 ,mem_lmo_payload 
+0ede 79207e07 set1 7 ,pdata 
+0edf 20600000 rtn 
+
+clear_send_setup_complete:
+0ee0 20748000 rtn master 
+0ee1 6fe08031 fetch 1 ,mem_state 
+0ee2 c3820000 rtnbit1 state_conn_comp 
+0ee3 70007d31 jam lmp_setup_complete ,mem_lmo_opcode2 
+0ee4 20600000 rtn 
+
+start_encryption:
+0ee5 44b3c00c bpatch patch0c_7 ,mem_patch0c 
+0ee6 6fe0804d fetch 1 ,mem_state_map 
+0ee7 79207e02 set1 smap_encryption ,pdata 
+0ee8 67e0804d store 1 ,mem_state_map 
+0ee9 70801101 jam 1 ,core_encrypt 
+0eea 18007e00 force 0 ,pdata 
+0eeb 67e2c6a1 store 5 ,mem_ccm_pcnt_rx 
+0eec 79207e25 set1 br_ccm_directionbit ,pdata 
+0eed 67e2c69c store 5 ,mem_ccm_pcnt_tx 
+0eee 20600000 rtn 
+
+stop_encryption:
+0eef 44b4400d bpatch patch0d_0 ,mem_patch0d 
+0ef0 6fe0804d fetch 1 ,mem_state_map 
+0ef1 793ffe02 set0 smap_encryption ,pdata 
+0ef2 67e0804d store 1 ,mem_state_map 
+0ef3 70801100 jam 0 ,core_encrypt 
+0ef4 20600000 rtn 
+
+sniff_init:
+0ef5 44b4c00d bpatch patch0d_1 ,mem_patch0d 
+0ef6 1c40a203 add clkn_bt ,3 ,rega 
+0ef7 20348ef9 branch sniff_init_master ,master 
+0ef8 1d00a203 add clke_bt ,3 ,rega 
+
+sniff_init_master:
+0ef9 68490033 fetcht 2 ,mem_tsniff 
+0efa 1a227e00 deposit rega 
+0efb 793ffe1b set0 27 ,pdata 
+0efc 9846fc00 idiv temp 
+0efd 6fe10076 fetch 2 ,mem_dsniff 
+0efe 20407def call wait_div_end 
+0eff 18072600 remainder regc 
+0f00 9a667e00 isub regc ,pdata 
+0f01 20210f03 branch sniff_init_nowrap ,positive 
+0f02 9840fe00 iadd temp ,pdata 
+
+sniff_init_nowrap:
+0f03 9a20fe00 iadd rega ,pdata 
+0f04 67e20035 store 4 ,mem_sniff_anchor 
+0f05 70464200 jam switch_flag_init ,mem_switch_flag 
+0f06 6fe08031 fetch 1 ,mem_state 
+0f07 79207e01 set1 state_insniff ,pdata 
+0f08 67e08031 store 1 ,mem_state 
+0f09 6fe08074 fetch 1 ,mem_sniff_attempt 
+0f0a 67e08089 store 1 ,mem_current_sniff_attempt 
+0f0b 58000000 setarg 0 
+0f0c 67e1c16e store 3 ,mem_sniff_rcv 
+0f0d 67e1c171 store 3 ,mem_sniff_lost 
+0f0e 67e0c15e store 1 ,mem_sniff_unint_lost 
+0f0f 70095b0b jam bt_evt_enter_sniff ,mem_fifo_temp 
+0f10 20407871 call ui_ipc_send_event 
+0f11 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+0f12 67e1003f store 2 ,mem_rx_window 
+0f13 24748000 nrtn master 
+0f14 18808fff add am_addr ,-1 ,queue 
+0f15 20600000 rtn 
+
+sniff_exit:
+0f16 44b5400d bpatch patch0d_2 ,mem_patch0d 
+0f17 6fe08031 fetch 1 ,mem_state 
+0f18 c4008000 rtnbit0 state_insniff 
+0f19 793ffe01 set0 state_insniff ,pdata 
+0f1a 67e08031 store 1 ,mem_state 
+0f1b 6fe140c6 fetch 2 ,mem_rx_window_init 
+0f1c 67e1003f store 2 ,mem_rx_window 
+0f1d 7855fc00 disable wake 
+0f1e 70095b0c jam bt_evt_exit_sniff ,mem_fifo_temp 
+0f1f 20207871 branch ui_ipc_send_event 
+
+check_attempt:
+0f20 44b5c00d bpatch patch0d_3 ,mem_patch0d 
+0f21 78377c00 enable attempt 
+0f22 6fe08031 fetch 1 ,mem_state 
+0f23 c2808f2d bbit1 state_insniff ,check_attempt_sniff 
+0f24 c6088000 rtnmark1 mark_testmode 
+0f25 6fe08048 fetch 1 ,mem_arq 
+0f26 c3818000 rtnbit1 wack 
+0f27 6fe08049 fetch 1 ,mem_lmp_to_send 
+0f28 247a0000 nrtn blank 
+0f29 6fe0804c fetch 1 ,mem_op 
+0f2a c3830000 rtnbit1 op_txl2cap 
+
+check_attempt_nomore:
+0f2b 18007e00 force 0 ,pdata 
+0f2c 20600000 rtn 
+
+check_attempt_sniff:
+0f2d c3010f37 bbit0 state_insco ,check_attempt_not_sco 
+0f2e 6fe08089 fetch 1 ,mem_current_sniff_attempt 
+0f2f c0010f33 beq 2 ,check_attempt_sniff_restore_sco 
+0f30 6fe08048 fetch 1 ,mem_arq 
+0f31 c2818f40 bbit1 wack ,check_attempt_notimeout 
+0f32 c5840f40 bmark0 mark_esco_rxok ,check_attempt_notimeout 
+
+check_attempt_sniff_restore_sco:
+0f33 24348f40 nbranch check_attempt_notimeout ,master 
+0f34 6fe08049 fetch 1 ,mem_lmp_to_send 
+0f35 243a0f40 nbranch check_attempt_notimeout ,blank 
+
+check_attempt_sco_master:
+0f36 20200f2b branch check_attempt_nomore 
+
+check_attempt_not_sco:
+0f37 6fe08089 fetch 1 ,mem_current_sniff_attempt 
+0f38 c0808f40 bne 1 ,check_attempt_notimeout 
+0f39 6fe0808a fetch 1 ,mem_current_sniff_timeout 
+0f3a 203a0f40 branch check_attempt_notimeout ,blank 
+0f3b 1fe0ffff increase -1 ,pdata 
+0f3c 67e0808a store 1 ,mem_current_sniff_timeout 
+0f3d 6fe08048 fetch 1 ,mem_arq 
+0f3e c3818000 rtnbit1 wack 
+0f3f 24768000 nrtn match 
+
+check_attempt_notimeout:
+0f40 6fe08089 fetch 1 ,mem_current_sniff_attempt 
+0f41 1fe0ffff increase -1 ,pdata 
+0f42 67e08089 store 1 ,mem_current_sniff_attempt 
+0f43 20600000 rtn 
+
+sniff_check_window:
+0f44 44b6400d bpatch patch0d_4 ,mem_patch0d 
+0f45 78487c00 disable swfine 
+0f46 18423600 copy temp ,stop_watch 
+0f47 20400a6f call context_search_sniff_window 
+0f48 78547c00 disable user 
+0f49 24628000 nrtn zero 
+0f4a 18003600 force 0 ,stop_watch 
+0f4b 78347c00 enable user 
+0f4c 20600000 rtn 
+
+check_esco_amaddr:
+0f4d 6fe0c15d fetch 1 ,mem_esco_addr 
+0f4e a881fe00 icompare 0xff ,am_addr 
+0f4f 20600000 rtn 
+
+parse_l2cap:
+0f50 44b6c00d bpatch patch0d_5 ,mem_patch0d 
+0f51 793f8001 set0 mark_rxbuf_inuse ,mark 
+
+parse_l2cap_cont:
+0f52 70031b00 jam l2cap_rx_clear ,mem_l2cap_rx_done 
+0f53 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f54 207a0000 rtn blank 
+0f55 2feffe00 isolate1 l2cap_inuse_buff1 ,pdata 
+0f56 d8c01000 arg mem_l2cap_rxbuff1 ,contr 
+0f57 2040cdd6 call process_rx_l2cap_pkt ,true 
+0f58 44b7400d bpatch patch0d_6 ,mem_patch0d 
+0f59 6fe0831b fetch 1 ,mem_l2cap_rx_done 
+0f5a c0008f63 beq l2cap_rx_done ,parse_l2cap_release_buff1 
+0f5b 70031b00 jam l2cap_rx_clear ,mem_l2cap_rx_done 
+0f5c 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f5d c4008000 rtnbit0 l2cap_inuse_buff2 
+0f5e d8c01400 arg mem_l2cap_rxbuff2 ,contr 
+0f5f 20404dd6 call process_rx_l2cap_pkt 
+0f60 6fe0831b fetch 1 ,mem_l2cap_rx_done 
+0f61 c0008f69 beq l2cap_rx_done ,parse_l2cap_release_buff2 
+0f62 20600000 rtn 
+
+parse_l2cap_release_buff1:
+0f63 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f64 793ffe00 set0 l2cap_inuse_buff1 ,pdata 
+0f65 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f66 58000000 setarg 0 
+0f67 67e1030e store 2 ,mem_l2cap_rxbuff1_len 
+0f68 20600000 rtn 
+
+parse_l2cap_release_buff2:
+0f69 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f6a 793ffe01 set0 l2cap_inuse_buff2 ,pdata 
+0f6b 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f6c 58000000 setarg 0 
+0f6d 67e10310 store 2 ,mem_l2cap_rxbuff2_len 
+0f6e 20600000 rtn 
+
+l2cap_buff1_inuse:
+0f6f 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f70 79207e00 set1 l2cap_inuse_buff1 ,pdata 
+0f71 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f72 20600000 rtn 
+
+l2cap_buff2_inuse:
+0f73 6fe08314 fetch 1 ,mem_l2cap_rxbuff_inuse 
+0f74 79207e01 set1 l2cap_inuse_buff2 ,pdata 
+0f75 67e08314 store 1 ,mem_l2cap_rxbuff_inuse 
+0f76 20600000 rtn 
+
+slave_send_access:
+0f77 44b7c00d bpatch patch0d_7 ,mem_patch0d 
+0f78 1d00c201 add clke_bt ,1 ,bt_clk 
+0f79 20401140 call fetch_extm_bt_adr 
+0f7a 18004803 force 0x03 ,freq_mode 
+0f7b 20401128 call tx_radio_freq 
+0f7c 2040133e call start_transmitter 
+0f7d 2040134c call start_tx_external 
+0f7e 20201351 branch send_access_word 
+
+slave_conn_send_packet:
+0f7f 44b8400e bpatch patch0e_0 ,mem_patch0e 
+0f80 2040133a call rf_setup_time_slave_slot 
+0f81 1d027e00 deposit clke_bt 
+0f82 684a40d1 fetcht 4 ,mem_next_btclk 
+0f83 98467e00 isub temp ,pdata 
+0f84 c1808000 rtnne 1 
+0f85 28203e00 compare type_null ,type ,0x1f 
+0f86 24208f89 nbranch slave_conn_send_access ,true 
+0f87 6fe0801a fetch 1 ,mem_rx_type 
+0f88 207a0000 rtn blank 
+
+slave_conn_send_access:
+0f89 20400f77 call slave_send_access 
+
+transmit_packet:
+0f8a 28203e10 compare type_id ,type ,0x1f 
+0f8b 20208e80 branch end_of_packet ,true 
+0f8c 1c230400 rshift bt_clk ,temp 
+0f8d 18419c40 or temp ,0x40 ,white_init 
+
+transmit_packet_whitened:
+0f8e 44b8c00e bpatch patch0e_1 ,mem_patch0e 
+0f8f 7823fc00 enable enable_white 
+0f90 78257c00 enable enable_hec 
+0f91 782dfc00 enable encode_fec1 
+0f92 793f8010 set0 mark_longpacket ,mark 
+0f93 18827e00 deposit am_addr 
+0f94 08008603 inject mod ,3 
+0f95 18227e00 deposit type 
+0f96 08008604 inject mod ,4 
+0f97 6fe08048 fetch 1 ,mem_arq 
+0f98 08008004 inject bucket ,4 
+0f99 08008603 inject mod ,3 
+0f9a 78247c00 enable enable_parity 
+0f9b 08008608 inject mod ,8 
+0f9c 784dfc00 disable encode_fec1 
+0f9d 78447c00 disable enable_parity 
+0f9e 78457c00 disable enable_hec 
+0f9f 793faa02 set0 psk3m ,radio_ctrl 
+0fa0 d8400000 arg 0 ,temp 
+0fa1 20401309 call reserve_slot 
+0fa2 44b9400e bpatch patch0e_2 ,mem_patch0e 
+0fa3 18217e1f and type ,0x1f ,pdata 
+0fa4 c0098fd2 beq type_lmp ,transmit_lmp 
+0fa5 c0000e80 beq type_null ,end_of_packet 
+0fa6 c0008e80 beq type_poll ,end_of_packet 
+0fa7 c0010fb3 beq type_fhs ,transmit_fhs 
+0fa8 c0018fe1 beq type_dm1 ,transmit_dm1 
+0fa9 c0020fe7 beq type_dh1 ,transmit_dh1 
+0faa c0040fe6 beq type_3dh1 ,transmit_3dh1 
+0fab d8400004 arg 4 ,temp 
+0fac 20401309 call reserve_slot 
+0fad c0050fe3 beq type_dm3 ,transmit_dm3 
+0fae c0058fe9 beq type_dh3 ,transmit_dh3 
+0faf d8400008 arg 8 ,temp 
+0fb0 20401309 call reserve_slot 
+0fb1 c0078fe9 beq type_dh5 ,transmit_dh5 
+0fb2 20200fe3 branch transmit_dm5 
+
+transmit_fhs:
+0fb3 44b9c00e bpatch patch0e_3 ,mem_patch0e 
+0fb4 6fe080e6 fetch 1 ,mem_fhs_am_addr 
+0fb5 1fe20800 icopy am_addr 
+0fb6 6fe0808e fetch 1 ,mem_fhs_misc 
+0fb7 1fe23800 icopy fhs_misc 
+0fb8 6fe1c0b2 fetch 3 ,mem_class 
+0fb9 1fe23a00 icopy fhs_class 
+0fba 6fe140ac fetch 2 ,mem_nap 
+0fbb 1fe25c00 icopy nap 
+0fbc 7824fc00 enable enable_crc 
+0fbd 782e7c00 enable encode_fec2 
+0fbe 1c022200 copy bt_adr ,rega 
+0fbf 20401138 call fetch_self_bt_adr 
+0fc0 782afc00 pulse recalc 
+0fc1 20000020 nop 32 
+0fc2 1c221600 copy bt_clk ,timeup 
+0fc3 6fe200b1 fetch 4 ,mem_clkn_bt 
+0fc4 1fe24200 icopy bt_clk 
+0fc5 53c07e00 preload fhs0 
+0fc6 79207e3a set1 58 ,pdata 
+0fc7 08008648 inject mod ,72 
+0fc8 53e07e00 preload fhs1 
+0fc9 08008648 inject mod ,72 
+0fca 19624200 copy timeup ,bt_clk 
+0fcb 1a224000 copy rega ,bt_adr 
+0fcc 78247c00 enable enable_parity 
+0fcd 08008610 inject mod ,16 
+0fce 78447c00 disable enable_parity 
+0fcf 20200e80 branch end_of_packet 
+
+transmit_lmp_ccm:
+0fd0 78477c00 disable encrypt 
+0fd1 20200fd6 branch transmit_lmp_common 
+
+transmit_lmp:
+0fd2 44ba400e bpatch patch0e_4 ,mem_patch0e 
+0fd3 20400de1 call check_enc_ccm 
+0fd4 243a0fd0 nbranch transmit_lmp_ccm ,blank 
+0fd5 78277c00 enable encrypt 
+
+transmit_lmp_common:
+0fd6 7824fc00 enable enable_crc 
+0fd7 782e7c00 enable encode_fec2 
+0fd8 6fe0838a fetch 1 ,mem_lmo_header_length 
+0fd9 1fe105f8 and pdata ,0x1f8 ,temp 
+0fda d8c0038a arg mem_lmo_header_length ,contr 
+0fdb 18408408 increase 8 ,temp 
+0fdc 18497200 rshift3 temp ,loopcnt 
+
+transmit_lmp_loop:
+0fdd efe08006 ifetch 1 ,contr 
+0fde 08008608 inject mod ,8 
+0fdf c2000fdd loop transmit_lmp_loop 
+0fe0 20201013 branch transmit_end 
+
+transmit_dm1:
+0fe1 782e7c00 enable encode_fec2 
+0fe2 20200fec branch transmit_dmh 
+
+transmit_dm3:
+
+transmit_dm5:
+0fe3 782e7c00 enable encode_fec2 
+0fe4 79200010 set1 mark_longpacket ,mark 
+0fe5 20200fec branch transmit_dmh 
+
+transmit_3dh1:
+0fe6 79202a02 set1 psk3m ,radio_ctrl 
+
+transmit_dh1:
+0fe7 782efc00 enable encode_fec0 
+0fe8 20200fec branch transmit_dmh 
+
+transmit_dh3:
+
+transmit_dh5:
+0fe9 79202a02 set1 psk3m ,radio_ctrl 
+0fea 782efc00 enable encode_fec0 
+0feb 79200010 set1 mark_longpacket ,mark 
+
+transmit_dmh:
+0fec 44bac00e bpatch patch0e_5 ,mem_patch0e 
+0fed 6fe0804d fetch 1 ,mem_state_map 
+0fee c3029001 bbit0 smap_edr ,transmit_noedr 
+0fef 18267c03 sub type ,3 ,null 
+0ff0 20211001 branch transmit_noedr ,positive 
+0ff1 78477c00 disable encrypt 
+0ff2 784e7c00 disable encode_fec2 
+0ff3 782efc00 enable encode_fec0 
+0ff4 7843fc00 disable enable_white 
+0ff5 79202a01 set1 psk ,radio_ctrl 
+0ff6 2aaffe02 isolate1 psk3m ,radio_ctrl 
+0ff7 20208ffb branch transmit_edr3m ,true 
+0ff8 580abeee setarg 0xabeee 
+0ff9 08008614 inject mod ,20 
+0ffa 20200fff branch transmit_edr_sync_end 
+
+transmit_edr3m:
+0ffb 585faeba setarg 0x5faeba 
+0ffc 08008618 inject mod ,24 
+0ffd 58000012 setarg 0x12 
+0ffe 08008606 inject mod ,6 
+
+transmit_edr_sync_end:
+0fff 7823fc00 enable enable_white 
+1000 79200010 set1 mark_longpacket ,mark 
+
+transmit_noedr:
+1001 78277c00 enable encrypt 
+1002 7824fc00 enable enable_crc 
+1003 c5029021 bmark1 mark_loopback ,transmit_loopback 
+1004 6fe0c1e5 fetch 1 ,mem_tx_lch 
+1005 08008603 inject mod ,3 
+1006 6fe141e6 fetch 2 ,mem_tx_len 
+1007 98007200 iforce loopcnt 
+1008 c508100b bmark1 mark_longpacket ,transmit_long 
+1009 08008605 inject mod ,5 
+100a 2020100c branch transmit_stuff 
+
+transmit_long:
+100b 0800860d inject mod ,13 
+
+transmit_stuff:
+100c 1f227e00 deposit loopcnt 
+100d 203a1013 branch transmit_end ,blank 
+100e 6fe100bf fetch 2 ,mem_txptr 
+100f 98000c00 iforce contr 
+
+transmit_stuff_loop:
+1010 efe08006 ifetch 1 ,contr 
+1011 08008608 inject mod ,8 
+1012 c2001010 loop transmit_stuff_loop 
+
+transmit_end:
+1013 44bb400e bpatch patch0e_6 ,mem_patch0e 
+1014 20400de1 call check_enc_ccm 
+1015 203a1018 branch transmit_end2 ,blank 
+1016 6fe2026f fetch 4 ,mem_le_mic 
+1017 08008620 inject mod ,32 
+
+transmit_end2:
+1018 78247c00 enable enable_parity 
+1019 08008610 inject mod ,16 
+101a 78447c00 disable enable_parity 
+101b 20400ce8 call set_wait_ack 
+101c 6fe0804d fetch 1 ,mem_state_map 
+101d c3028e80 bbit0 smap_edr ,end_of_packet 
+101e 18007e00 force 0 ,pdata 
+101f 08008606 inject mod ,6 
+1020 20200e80 branch end_of_packet 
+
+transmit_loopback:
+1021 44bbc00e bpatch patch0e_7 ,mem_patch0e 
+1022 c5081029 bmark1 mark_longpacket ,transmit_loopback_long 
+
+transmit_loopback_short:
+1023 6fe080e5 fetch 1 ,mem_lch_code 
+1024 08008603 inject mod ,3 
+1025 6fe080af fetch 1 ,mem_len 
+1026 98002600 iforce regc 
+1027 08008605 inject mod ,5 
+1028 2020102e branch transmit_loopback_cont 
+
+transmit_loopback_long:
+1029 6fe080e5 fetch 1 ,mem_lch_code 
+102a 08008603 inject mod ,3 
+102b 6fe100af fetch 2 ,mem_len 
+102c 98002600 iforce regc 
+102d 0800860d inject mod ,13 
+
+transmit_loopback_cont:
+102e d8c01000 arg mem_l2cap_rxbuff1 ,contr 
+
+transmit_loopback_loop:
+102f 1a627c00 copy regc ,null 
+1030 20229035 branch transmit_loopback_end ,zero 
+1031 efe08006 ifetch 1 ,contr 
+1032 08008608 inject mod ,8 
+1033 1a60a7ff increase -1 ,regc 
+1034 2020102f branch transmit_loopback_loop 
+
+transmit_loopback_end:
+1035 6fe109fc fetch 2 ,mem_tst_pktcnt_dmh 
+1036 1fe0fe01 increase 1 ,pdata 
+1037 67e109fc store 2 ,mem_tst_pktcnt_dmh 
+1038 20201013 branch transmit_end 
+
+apply_switch_clke:
+1039 6fe200b5 fetch 4 ,mem_clke_bt 
+103a 1fe0a207 add pdata ,7 ,rega 
+103b 6fe100c1 fetch 2 ,mem_slot_offset 
+103c 243a103f nbranch apply_switch_nozero ,blank 
+103d 1a20a3fd increase -3 ,rega 
+103e 20201047 branch apply_switch_wait_loop 
+
+apply_switch_nozero:
+103f 1feffe0c mul32 pdata ,12 ,pdata 
+1040 68590040 fetcht 2 ,core_halfslot 
+1041 18408401 increase 1 ,temp 
+
+apply_switch_loop:
+1042 98467e00 isub temp ,pdata 
+1043 24211046 nbranch apply_switch_bt ,positive 
+1044 1a20a3ff increase -1 ,rega 
+1045 20201042 branch apply_switch_loop 
+
+apply_switch_bt:
+1046 1fe67e00 sub pdata ,0 ,pdata 
+
+apply_switch_wait_loop:
+1047 37d18200 until null ,oneslot 
+1048 2c400600 compare 0 ,clkn_bt ,3 
+1049 24209047 nbranch apply_switch_wait_loop ,true 
+104a 98005200 iforce clke_rt 
+104b 1a225000 copy rega ,clke_bt 
+104c 98005200 iforce clke_rt 
+104d 20600000 rtn 
+
+calc_slot_offset:
+104e 44bc400f bpatch patch0f_0 ,mem_patch0f 
+104f 37d10200 until null ,halfslot 
+1050 1b427e00 deposit clke 
+1051 98000c00 iforce contr 
+1052 1ff17e00 rshift16 ,pdata ,pdata 
+1053 9c467200 isub clkn_bt ,loopcnt 
+1054 1f217203 and_into 3 ,loopcnt 
+1055 24229058 nbranch calc_bt_portion ,zero 
+1056 18007e00 force 0 ,pdata 
+1057 2020105c branch calc_skip_bt 
+
+calc_bt_portion:
+1058 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+1059 18007e00 force 0 ,pdata 
+
+calc_slot_offset_loop:
+105a 9840fe00 iadd temp ,pdata 
+105b c200105a loop calc_slot_offset_loop 
+
+calc_skip_bt:
+105c 98c0fe00 iadd contr ,pdata 
+105d 1fe6fc0c div pdata ,12 
+105e 20407dec call get_div_result 
+105f 67e100c1 store 2 ,mem_slot_offset 
+1060 20600000 rtn 
+
+calc_clke_offset:
+1061 44bcc00f bpatch patch0f_1 ,mem_patch0f 
+1062 1b427e00 deposit clke 
+1063 1b220400 copy clkn ,temp 
+1064 98467c00 isub temp ,null 
+1065 7d217e2c nsetflag positive ,44 ,pdata 
+1066 98460400 isub temp ,temp 
+1067 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+1068 284c000f isolate0 15 ,temp 
+1069 2020906f branch calc_clke_pos ,true 
+106a 18426000 copy temp ,alarm 
+106b d8410000 arg 0x10000 ,temp 
+106c 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+106d 98467e00 isub temp ,pdata 
+106e 9e008400 iadd alarm ,temp 
+
+calc_clke_pos:
+106f 604b028f storet 6 ,mem_le_clk_offset 
+1070 207b0000 rtn le 
+1071 604b0039 storet 6 ,mem_clk_offset 
+1072 20600000 rtn 
+
+calc_clke:
+1073 78587c00 disable clknt 
+1074 6fe3028f fetch 6 ,mem_le_clk_offset 
+1075 203b1077 branch calc_clke2 ,le 
+1076 6fe30039 fetch 6 ,mem_clk_offset 
+
+calc_clke2:
+1077 9b20e000 iadd clkn ,alarm 
+1078 1e00e00a increase 10 ,alarm 
+1079 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+107a 9e067e00 isub alarm ,pdata 
+107b 2fec000f isolate0 15 ,pdata 
+107c 20209083 branch calc_clke_pos_adj ,true 
+107d 58010000 setarg 0x10000 
+107e 6b010163 fetchr regd ,2 ,mem_param_rt_rthalfslot 
+107f 9b067e00 isub regd ,pdata 
+1080 9e00e000 iadd alarm ,alarm 
+
+calc_clke_pos2:
+1081 1e023400 copy alarm ,clke 
+1082 20600000 rtn 
+
+calc_clke_pos_adj:
+1083 18007c00 force 0 ,null 
+1084 20201081 branch calc_clke_pos2 
+
+calc_mod_value_scale:
+1085 203b10ad branch calc_mod_value_scale_le2 ,le 
+1086 58402c17 setarg 0x402c17 
+1087 67e189ee store 3 ,mem_scale_ratio 
+1088 19317e00 rshift16 access ,pdata 
+1089 1fe90400 rshift3 pdata ,temp 
+108a df200030 arg 48 ,loopcnt 
+
+calc_mod_value_scale_do:
+108b 58000000 setarg 0 
+108c 67e189f1 store 3 ,mem_xcnt 
+
+calc_mod_vs_loop:
+108d 18437e00 rshift temp ,pdata 
+108e 9842fe00 ixor temp ,pdata 
+108f 1fe17e03 and_into 3 ,pdata 
+1090 c3009092 bbit0 1 ,calc_mod_vs01 
+1091 1fe0ffff pincrease -1 
+
+calc_mod_vs01:
+1092 d8a009f1 arg mem_xcnt ,contw 
+1093 98a08a00 iadd contw ,contw 
+1094 efe08005 ifetch 1 ,contw 
+1095 1fe0fe01 pincrease 1 
+1096 e7e08005 istore 1 ,contw 
+1097 18430400 rshift temp ,temp 
+1098 c200108d loop calc_mod_vs_loop 
+1099 da2009f3 arg mem_xcnt + 2 ,rega 
+109a da4009ee arg mem_scale_ratio ,regb 
+109b da600000 arg 0 ,regc 
+109c df200003 arg 3 ,loopcnt 
+
+calc_mod_vs_loop2:
+109d efe08011 ifetch 1 ,rega 
+109e e8408012 ifetcht 1 ,regb 
+109f 984ffe00 imul32 temp ,pdata 
+10a0 9a60a600 iadd regc ,regc 
+10a1 1a20a3ff increase -1 ,rega 
+10a2 1a40a401 increase 1 ,regb 
+10a3 c200109d loop calc_mod_vs_loop2 
+10a4 6fe089ef fetch 1 ,mem_scale_ratio + 1 
+10a5 1fed7e00 lshift8 pdata ,pdata 
+10a6 1ff27e00 lshift4 pdata ,pdata 
+10a7 9a66fc00 idiv regc 
+10a8 20407def call wait_div_end 
+10a9 1807fe00 quotient pdata 
+10aa 67f10938 store 2 ,mod_value_scale1 
+10ab 67e109f4 store 2 ,mem_scale_ratio_temp 
+10ac 20600000 rtn 
+
+calc_mod_value_scale_le2:
+10ad 6fe109f4 fetch 2 ,mem_scale_ratio_temp 
+10ae 67f10938 store 2 ,mod_value_scale1 
+10af 20600000 rtn 
+
+calc_mod_value_scale_le:
+10b0 58402d19 setarg 0x402d19 
+10b1 67e189ee store 3 ,mem_scale_ratio 
+10b2 192f7e00 rshift32 access ,pdata 
+10b3 1fe90400 rshift3 pdata ,temp 
+10b4 df200020 arg 32 ,loopcnt 
+10b5 2020108b branch calc_mod_value_scale_do 
+
+calc_radio_freq:
+10b6 44bd400f bpatch patch0f_2 ,mem_patch0f 
+10b7 20401161 call set_sync_on 
+10b8 1c227e00 copy bt_clk ,pdata 
+10b9 1fe17f80 and_into 0x180 ,pdata 
+10ba 2c800e03 compare 3 ,freq_mode ,0x07 
+10bb 242090bf nbranch freq_not_connection ,true 
+10bc 1fe97e00 rshift3 pdata ,pdata 
+10bd 9ae0fe00 iadd freq_index ,pdata 
+10be 202010c0 branch do_hop_mod_now 
+
+freq_not_connection:
+10bf 1ae27e00 copy freq_index ,pdata 
+
+do_hop_mod_now:
+10c0 1fe6fc4f div pdata ,79 
+10c1 782afc00 pulse recalc 
+10c2 20407def call wait_div_end 
+10c3 18072200 remainder rega 
+10c4 1a2085d8 add rega ,-40 ,temp 
+10c5 202110c8 branch odd_half ,positive 
+10c6 1a238400 lshift rega ,temp 
+10c7 202010ca branch freq_result 
+
+odd_half:
+10c8 18438400 lshift temp ,temp 
+10c9 18408401 increase 1 ,temp 
+
+freq_result:
+10ca 44bdc00f bpatch patch0f_3 ,mem_patch0f 
+10cb 6fe08032 fetch 1 ,mem_mode 
+10cc c30190db bbit0 afh_change ,afh_process_con 
+
+afh_process_0:
+10cd 6fe240d9 fetch 4 ,mem_afh_instant 
+10ce 9c267c00 isub bt_clk ,null 
+10cf 202110db branch afh_process_con ,positive 
+10d0 204010fa call afh_clear 
+10d1 6fe0c0e0 fetch 1 ,mem_afh_new_mod 
+10d2 207a0000 rtn blank 
+10d3 6fe08032 fetch 1 ,mem_mode 
+10d4 79207e02 set1 afh_enable ,pdata 
+10d5 67e08032 store 1 ,mem_mode 
+10d6 6fe2c0ee fetch 5 ,mem_afh_map_new 
+10d7 67e2c0e1 store 5 ,mem_afh_map_lo 
+10d8 efe28006 ifetch 5 ,contr 
+10d9 67e2c0e6 store 5 ,mem_afh_map_hi 
+10da 204010ff call afh_process_freq_map 
+
+afh_process_con:
+10db 6fe08032 fetch 1 ,mem_mode 
+10dc c4010000 rtnbit0 afh_enable 
+10dd 2c2ffe01 isolate1 1 ,bt_clk 
+10de 202090f7 branch afh_same_channel ,true 
+10df 18492200 rshift3 temp ,rega 
+10e0 18410e07 and temp ,7 ,queue 
+10e1 580040e1 setarg mem_afh_map_lo 
+10e2 9a20a200 iadd rega ,rega 
+10e3 efe08011 ifetch 1 ,rega 
+10e4 afec0000 qisolate0 pdata 
+10e5 202090e8 branch afh_process_1 ,true 
+10e6 18427e00 deposit temp 
+10e7 202010f4 branch afh_process_end 
+
+afh_process_1:
+10e8 6fe0c0eb fetch 1 ,mem_afh_used 
+10e9 98002400 iforce regb 
+10ea 1c227e00 deposit bt_clk 
+10eb 1fe17f80 and_into 0x180 ,pdata 
+10ec 1fe97e00 rshift3 pdata ,pdata 
+10ed 9ae0fe00 iadd freq_index ,pdata 
+10ee 9a46fc00 idiv regb 
+10ef 580040f9 setarg mem_afh_map 
+10f0 20407def call wait_div_end 
+10f1 18072200 remainder rega 
+10f2 9a208c00 iadd rega ,contr 
+10f3 efe08006 ifetch 1 ,contr 
+
+afh_process_end:
+10f4 67e0c0ec store 1 ,mem_afh_index 
+10f5 98000400 iforce temp 
+10f6 20600000 rtn 
+
+afh_same_channel:
+10f7 6fe0c0ec fetch 1 ,mem_afh_index 
+10f8 98000400 iforce temp 
+10f9 20600000 rtn 
+
+afh_clear:
+10fa 6fe08032 fetch 1 ,mem_mode 
+10fb 793ffe02 set0 afh_enable ,pdata 
+10fc 793ffe03 set0 afh_change ,pdata 
+10fd 67e08032 store 1 ,mem_mode 
+10fe 20600000 rtn 
+
+afh_process_freq_map:
+10ff 44be400f bpatch patch0f_4 ,mem_patch0f 
+1100 d8a040f9 arg mem_afh_map ,contw 
+1101 1800720a force 10 ,loopcnt 
+1102 20407d17 call memset0 
+1103 d8a040f9 arg mem_afh_map ,contw 
+1104 18002600 force 0 ,regc 
+1105 18000e02 force 2 ,queue 
+
+process_freq_3:
+1106 6fe2c0e1 fetch 5 ,mem_afh_map_lo 
+1107 98000400 iforce temp 
+1108 28e1fe02 compare 2 ,queue ,0xff 
+1109 2020910b branch process_freq_1 ,true 
+110a 18430400 rshift temp ,temp 
+
+process_freq_1:
+110b 284c0000 isolate0 0 ,temp 
+110c 2020910f branch process_freq_0 ,true 
+110d 1a627e00 deposit regc 
+110e e7e08005 istore 1 ,contw 
+
+process_freq_0:
+110f 184b0400 rshift2 temp ,temp 
+1110 1a60a602 increase 2 ,regc 
+1111 2a61fc28 compare 40 ,regc ,0xfe 
+1112 24209118 nbranch process_freq_2 ,true 
+1113 6fe2c0e6 fetch 5 ,mem_afh_map_hi 
+1114 98000400 iforce temp 
+1115 28e1fe02 compare 2 ,queue ,0xff 
+1116 20209118 branch process_freq_2 ,true 
+1117 18430400 rshift temp ,temp 
+
+process_freq_2:
+1118 1a667c4e sub regc ,78 ,null 
+1119 2021110b branch process_freq_1 ,positive 
+111a 18002601 force 1 ,regc 
+111b 18e08fff increase -1 ,queue 
+111c 24229106 nbranch process_freq_3 ,zero 
+111d da2040f9 arg mem_afh_map ,rega 
+111e 18a27e00 deposit contw 
+111f 9a267e00 isub rega ,pdata 
+1120 67e0c0eb store 1 ,mem_afh_used 
+1121 20600000 rtn 
+
+rx_radio_freq:
+1122 44bec00f bpatch patch0f_5 ,mem_patch0f 
+1123 204010b6 call calc_radio_freq 
+1124 6fe080e4 fetch 1 ,mem_debug_config 
+1125 c3029127 bbit0 debug_rx_fixed_freq ,rx_radio_freq_now 
+1126 684883a0 fetcht 1 ,mem_rx_fixed_freq 
+
+rx_radio_freq_now:
+1127 2020118f branch set_freq_rx 
+
+tx_radio_freq:
+1128 44bf400f bpatch patch0f_6 ,mem_patch0f 
+1129 204010b6 call calc_radio_freq 
+112a 6fe080e4 fetch 1 ,mem_debug_config 
+112b c302112d bbit0 debug_tx_fixed_freq ,tx_radio_freq_now 
+112c 6848839f fetcht 1 ,mem_tx_fixed_freq 
+
+tx_radio_freq_now:
+112d 20201205 branch set_freq_tx 
+
+fetch_giac:
+112e 18005a00 force 0 ,uap 
+112f 6fe1c0af fetch 3 ,mem_glap 
+1130 98005800 iforce lap 
+1131 20600000 rtn 
+
+fetch_page_bt_adr:
+1132 44bfc00f bpatch patch0f_7 ,mem_patch0f 
+1133 6fe0c1e0 fetch 1 ,mem_hci_puap 
+1134 1fe25a00 icopy uap 
+1135 6fe1c1dd fetch 3 ,mem_hci_plap 
+1136 1fe25800 icopy lap 
+1137 20600000 rtn 
+
+fetch_self_bt_adr:
+1138 44c04010 bpatch patch10_0 ,mem_patch10 
+1139 6fe140ac fetch 2 ,mem_nap 
+113a 1fe25c00 icopy nap 
+113b 6fe0c0ab fetch 1 ,mem_uap 
+113c 1fe25a00 icopy uap 
+113d 6fe1c0a8 fetch 3 ,mem_lap 
+113e 1fe25800 icopy lap 
+113f 20600000 rtn 
+
+fetch_extm_bt_adr:
+1140 44c0c010 bpatch patch10_1 ,mem_patch10 
+1141 6fe10045 fetch 2 ,mem_pnap 
+1142 1fe25c00 icopy nap 
+1143 6fe08044 fetch 1 ,mem_puap 
+1144 1fe25a00 icopy uap 
+1145 6fe18041 fetch 3 ,mem_plap 
+1146 1fe25800 icopy lap 
+1147 20600000 rtn 
+
+fetch_diac:
+1148 c510114b bmark1 mark_all_diac ,fetch_diac_do 
+1149 c68e8000 rtnmark0 mark_inquiry_state 
+114a c68f8000 rtnmark0 mark_periodical_diac 
+
+fetch_diac_do:
+114b 1d815900 and_into -256 ,lap 
+114c 782afc00 pulse recalc 
+114d 20000020 nop 32 
+114e 20600000 rtn 
+
+shutdown_radio:
+114f 44c14010 bpatch patch10_2 ,mem_patch10 
+1150 20404cad call rf_debug_shutdown_radio_line 
+1151 18002a08 force 0x08 ,radio_ctrl 
+1152 18002a00 force 0 ,radio_ctrl 
+1153 7850fc00 disable is_rx 
+1154 78507c00 disable is_tx 
+1155 782f7c00 pulse packet_end 
+1156 70890005 jam 0x5 ,modem_en 
+1157 20000002 nop 2 
+1158 70890000 jam 0x0 ,modem_en 
+1159 20401161 call set_sync_on 
+115a 708a1600 jam 0 ,core_syn_en 
+115b 708a0a10 jam 0x10 ,core_rf_ldo_en0 
+115c 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+115d 793ffe07 set0 7 ,pdata 
+115e 67f08a09 store 1 ,core_clkpll_cfg6 
+115f 708a0b00 jam 0 ,core_rf_ldo_en1 
+1160 2020129c branch gain_control 
+
+set_sync_on:
+1161 44c1c010 bpatch patch10_3 ,mem_patch10 
+1162 70890005 jam 0x5 ,modem_en 
+1163 20000002 nop 2 
+1164 70890000 jam 0x0 ,modem_en 
+1165 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+1166 c00c1168 beq xtal_24m ,set_sync_on_24m 
+1167 c004117d beq xtal_16m ,set_sync_on_16m 
+
+set_sync_on_24m:
+1168 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+1169 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+116a 708a1215 jam 0x15 ,core_rf_ldo_cfg6 
+116b 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+116c 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+116d 79207e07 set1 7 ,pdata 
+116e 67f08a09 store 1 ,core_clkpll_cfg6 
+116f 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+1170 2000003c nop 60 
+1171 708a167a jam 0x7a ,core_syn_en 
+1172 708a1700 jam 0 ,core_rx_en0 
+1173 708a1800 jam 0 ,core_rx_en1 
+1174 708a1900 jam 0 ,core_tx_en0 
+1175 708a1a00 jam 0 ,core_tx_en1 
+1176 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+1177 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+
+set_sync_on_next:
+1178 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+1179 793ffe07 set0 7 ,pdata 
+117a 67f08a09 store 1 ,core_clkpll_cfg6 
+117b 708a4300 jam 0 ,core_syn_cal_ctrl 
+117c 20600000 rtn 
+
+set_sync_on_16m:
+117d 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+117e 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+117f 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+1180 708a1215 jam 0x15 ,core_rf_ldo_cfg6 
+1181 708a0a78 jam 0x78 ,core_rf_ldo_en0 
+1182 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+1183 79207e07 set1 7 ,pdata 
+1184 67f08a09 store 1 ,core_clkpll_cfg6 
+1185 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+1186 2000003c nop 60 
+1187 708a163a jam 0x3a ,core_syn_en 
+1188 708a1700 jam 0 ,core_rx_en0 
+1189 708a1800 jam 0 ,core_rx_en1 
+118a 708a1900 jam 0 ,core_tx_en0 
+118b 708a1a00 jam 0 ,core_tx_en1 
+118c 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+118d 708a0a38 jam 0x38 ,core_rf_ldo_en0 
+118e 20201178 branch set_sync_on_next 
+
+set_freq_rx:
+118f 44c24010 bpatch patch10_4 ,mem_patch10 
+1190 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+1191 1fe67c18 sub pdata ,xtal_24m ,null 
+1192 2042919a call rf_rx_write_freq_24m ,zero 
+1193 244291a0 ncall rf_rx_write_freq_16m ,zero 
+1194 60488017 storet 1 ,mem_last_freq 
+1195 1840fe00 add temp ,0 ,pdata 
+1196 c5169198 bmark1 mark_ble_2m ,set_rxfreq_2m_offset 
+1197 1840fe01 add temp ,1 ,pdata 
+
+set_rxfreq_2m_offset:
+1198 204011c5 call rf_rx_write_freq 
+1199 20201085 branch calc_mod_value_scale 
+
+rf_rx_write_freq_24m:
+119a 708a4300 jam 0 ,core_syn_cal_ctrl 
+119b 708a3d04 jam 0x04 ,core_syn_top_ctrl 
+119c 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+119d 708a8403 jam 0x03 ,core_syn_cp_lpf_cfg 
+119e 708a8940 jam 0x40 ,core_syn_afc_cfg3 
+119f 20600000 rtn 
+
+rf_rx_write_freq_16m:
+11a0 708a4330 jam 0x30 ,core_syn_cal_ctrl 
+11a1 708a3d06 jam 0x06 ,core_syn_top_ctrl 
+11a2 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+11a3 708a8420 jam 0x20 ,core_syn_cp_lpf_cfg 
+11a4 708a8915 jam 0x15 ,core_syn_afc_cfg3 
+11a5 20600000 rtn 
+
+rf_rx_enable:
+11a6 44c2c010 bpatch patch10_5 ,mem_patch10 
+11a7 20404ca7 call rf_debug_rx_gpio_high 
+11a8 6fe0c1ea fetch 1 ,mem_gain_fix 
+11a9 c07f91af beq 0xff ,rf_rx_enable_no_soft_agc 
+11aa d8c041eb arg mem_gain_table ,contr 
+11ab 98c08c00 iadd contr ,contr 
+11ac efe08006 ifetch 1 ,contr 
+11ad 67f08961 store 1 ,core_rf_rx_gain_fix 
+11ae 70896027 jam 0x27 ,core_rf_rx_agc_ctrl 
+
+rf_rx_enable_no_soft_agc:
+11af 6848c1ee fetcht 1 ,mem_gain_second_agc_en 
+11b0 6ff08960 fetch 1 ,core_rf_rx_agc_ctrl 
+11b1 9841fe00 ior temp ,pdata 
+11b2 67f08960 store 1 ,core_rf_rx_agc_ctrl 
+11b3 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+11b4 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+11b5 708a1213 jam 0x13 ,core_rf_ldo_cfg6 
+11b6 708a0a7f jam 0x7f ,core_rf_ldo_en0 
+11b7 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+11b8 793ffe07 set0 7 ,pdata 
+11b9 67f08a09 store 1 ,core_clkpll_cfg6 
+11ba 2000003c nop 60 
+11bb 708a171f jam 0x1f ,core_rx_en0 
+11bc 708a18f8 jam 0xf8 ,core_rx_en1 
+11bd 708a1918 jam 0x18 ,core_tx_en0 
+11be 708a1000 jam 0x00 ,core_rf_ldo_cfg4 
+11bf 708a1120 jam 0x20 ,core_rf_ldo_cfg5 
+11c0 2000000a nop 10 
+11c1 70890004 jam 0x04 ,modem_en 
+11c2 20000002 nop 2 
+11c3 7089000c jam 0x0c ,modem_en 
+11c4 20600000 rtn 
+
+rf_rx_write_freq:
+11c5 44c34010 bpatch patch10_6 ,mem_patch10 
+11c6 d8c00960 arg 2400 ,contr 
+11c7 98c0fe00 iadd contr ,pdata 
+11c8 6848c0c5 fetcht 1 ,mem_fcomp_div 
+11c9 202011d4 branch rf_write_freq_calc 
+
+rf_tx_write_freq:
+11ca 44c3c010 bpatch patch10_7 ,mem_patch10 
+11cb 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+11cc 1fe67c18 sub pdata ,xtal_24m ,null 
+11cd 204291f7 call rf_tx_write_freq_24m ,zero 
+11ce 244291fe ncall rf_tx_write_freq_16m ,zero 
+11cf 58000960 setarg 2400 
+11d0 9a20fe00 iadd rega ,pdata 
+11d1 1fe3fe00 lshift pdata ,pdata 
+11d2 6848c0c5 fetcht 1 ,mem_fcomp_div 
+11d3 184f8403 mul32 temp ,0x03 ,temp 
+
+rf_write_freq_calc:
+11d4 18438400 lshift temp ,temp 
+11d5 9846fc00 idiv temp 
+11d6 20407def call wait_div_end 
+11d7 1807fe00 quotient pdata 
+11d8 67f08a3f store 1 ,core_syn_divr_int 
+11d9 18077e00 remainder pdata 
+11da 1ff07e00 lshift16 pdata ,pdata 
+11db 1fed7e00 lshift8 pdata ,pdata 
+11dc 9846fc00 idiv temp 
+11dd 20407def call wait_div_end 
+11de 1807fe00 quotient pdata 
+11df 67f08a42 store 1 ,core_syn_divr_int + 3 
+11e0 1fecfe00 rshift8 pdata ,pdata 
+11e1 67f08a41 store 1 ,core_syn_divr_int + 2 
+11e2 1fecfe00 rshift8 pdata ,pdata 
+11e3 67f08a40 store 1 ,core_syn_divr_int + 1 
+11e4 68588a43 fetcht 1 ,core_syn_cal_ctrl 
+11e5 184104f0 and_into 0xf0 ,temp 
+11e6 60588a43 storet 1 ,core_syn_cal_ctrl 
+11e7 2000000c nop 12 
+11e8 6fe0c0c5 fetch 1 ,mem_fcomp_div 
+11e9 c00c11eb beq xtal_24m ,rf_write_freq_calc_24m 
+11ea c00411f1 beq xtal_16m ,rf_write_freq_calc_16m 
+
+rf_write_freq_calc_24m:
+11eb 1841840c or_into 0x0c ,temp 
+11ec 60588a43 storet 1 ,core_syn_cal_ctrl 
+11ed 2000000c nop 12 
+11ee 18418403 or_into 0x03 ,temp 
+11ef 60588a43 storet 1 ,core_syn_cal_ctrl 
+11f0 20600000 rtn 
+
+rf_write_freq_calc_16m:
+11f1 1841843c or_into 0x3c ,temp 
+11f2 60588a43 storet 1 ,core_syn_cal_ctrl 
+11f3 2000000c nop 12 
+11f4 18418433 or_into 0x33 ,temp 
+11f5 60588a43 storet 1 ,core_syn_cal_ctrl 
+11f6 20600000 rtn 
+
+rf_tx_write_freq_24m:
+11f7 708a4300 jam 0 ,core_syn_cal_ctrl 
+11f8 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+11f9 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+11fa 708a8403 jam 0x03 ,core_syn_cp_lpf_cfg 
+11fb 708a8ba6 jam 0xa6 ,core_syn_aac_cfg1 
+11fc 708a8940 jam 0x40 ,core_syn_afc_cfg3 
+11fd 20600000 rtn 
+
+rf_tx_write_freq_16m:
+11fe 708a4330 jam 0x30 ,core_syn_cal_ctrl 
+11ff 708a3d15 jam 0x15 ,core_syn_top_ctrl 
+1200 708a3e00 jam 0 ,core_syn_mmd_cp_ctrl 
+1201 708a8420 jam 0x20 ,core_syn_cp_lpf_cfg 
+1202 708a8ba6 jam 0xa6 ,core_syn_aac_cfg1 
+1203 708a8915 jam 0x15 ,core_syn_afc_cfg3 
+1204 20600000 rtn 
+
+set_freq_tx:
+1205 44c44011 bpatch patch11_0 ,mem_patch11 
+1206 708a3d12 jam 0x12 ,core_syn_top_ctrl 
+1207 60488017 storet 1 ,mem_last_freq 
+1208 1840a202 add temp ,2 ,rega 
+1209 204011ca call rf_tx_write_freq 
+120a 200003c0 nop 0x3c0 
+
+txon:
+120b 44c4c011 bpatch patch11_1 ,mem_patch11 
+120c 708a10aa jam 0xaa ,core_rf_ldo_cfg4 
+120d 708a112a jam 0x2a ,core_rf_ldo_cfg5 
+120e 708a1210 jam 0x10 ,core_rf_ldo_cfg6 
+120f 708a0a7f jam 0x7f ,core_rf_ldo_en0 
+1210 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+1211 793ffe07 set0 7 ,pdata 
+1212 67f08a09 store 1 ,core_clkpll_cfg6 
+1213 708a0b07 jam 0x07 ,core_rf_ldo_en1 
+1214 2000003c nop 60 
+1215 708a190d jam 0x0d ,core_tx_en0 
+1216 708a1af9 jam 0xf9 ,core_tx_en1 
+1217 708a1000 jam 0x00 ,core_rf_ldo_cfg4 
+1218 708a1120 jam 0x20 ,core_rf_ldo_cfg5 
+1219 2000000a nop 10 
+121a 70890001 jam 0x01 ,modem_en 
+121b 20000002 nop 2 
+121c 70890003 jam 0x03 ,modem_en 
+
+txon_next:
+121d 44c54011 bpatch patch11_2 ,mem_patch11 
+121e 6fe0c1e8 fetch 1 ,mem_tx_power 
+121f c001922d beq tx_power_3db ,set_tx_power_3db 
+1220 c0029232 beq tx_power_5db ,set_tx_power_5db 
+1221 c0031235 beq tx_power_6db ,set_tx_power_6db 
+1222 c0039238 beq tx_power_7db ,set_tx_power_7db 
+1223 c005123b beq tx_power_10db ,set_tx_power_10db 
+1224 c041923e beq tx_power_f3db ,set_tx_power_f3db 
+1225 c0429241 beq tx_power_f5db ,set_tx_power_f5db 
+1226 c04a1244 beq tx_power_f20db ,set_tx_power_f20db 
+1227 c04f1247 beq tx_power_f30db ,set_tx_power_f30db 
+
+set_tx_power_0db:
+1228 708a396a jam 0x6a ,core_tx_pwr_ctrl0 
+1229 708a3a07 jam 0x07 ,core_tx_pwr_ctrl1 
+
+set_rf_ldo_cfg89:
+122a 708a14a3 jam 0xa3 ,core_rf_ldo_cfg8 
+122b 708a1507 jam 0x07 ,core_rf_ldo_cfg9 
+122c 20600000 rtn 
+
+set_tx_power_3db:
+122d 708a3966 jam 0x66 ,core_tx_pwr_ctrl0 
+122e 708a3a0b jam 0x0b ,core_tx_pwr_ctrl1 
+
+set_rf_ldo_cfg89_2:
+122f 708a14aa jam 0xaa ,core_rf_ldo_cfg8 
+1230 708a150a jam 0x0a ,core_rf_ldo_cfg9 
+1231 20600000 rtn 
+
+set_tx_power_5db:
+1232 708a396c jam 0x6c ,core_tx_pwr_ctrl0 
+1233 708a3a0d jam 0x0d ,core_tx_pwr_ctrl1 
+1234 2020122f branch set_rf_ldo_cfg89_2 
+
+set_tx_power_6db:
+1235 708a396b jam 0x6b ,core_tx_pwr_ctrl0 
+1236 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+1237 2020122f branch set_rf_ldo_cfg89_2 
+
+set_tx_power_7db:
+1238 708a39a7 jam 0xa7 ,core_tx_pwr_ctrl0 
+1239 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+123a 2020122f branch set_rf_ldo_cfg89_2 
+
+set_tx_power_10db:
+123b 708a39b6 jam 0xb6 ,core_tx_pwr_ctrl0 
+123c 708a3a0f jam 0x0f ,core_tx_pwr_ctrl1 
+123d 2020122f branch set_rf_ldo_cfg89_2 
+
+set_tx_power_f3db:
+123e 708a3968 jam 0x68 ,core_tx_pwr_ctrl0 
+123f 708a3a05 jam 0x05 ,core_tx_pwr_ctrl1 
+1240 2020122a branch set_rf_ldo_cfg89 
+
+set_tx_power_f5db:
+1241 708a3960 jam 0x60 ,core_tx_pwr_ctrl0 
+1242 708a3a05 jam 0x05 ,core_tx_pwr_ctrl1 
+1243 2020122a branch set_rf_ldo_cfg89 
+
+set_tx_power_f20db:
+1244 708a3953 jam 0x53 ,core_tx_pwr_ctrl0 
+1245 708a3a01 jam 0x01 ,core_tx_pwr_ctrl1 
+1246 2020122a branch set_rf_ldo_cfg89 
+
+set_tx_power_f30db:
+1247 708a394c jam 0x4c ,core_tx_pwr_ctrl0 
+1248 708a3a00 jam 0x00 ,core_tx_pwr_ctrl1 
+1249 2020122a branch set_rf_ldo_cfg89 
+
+initialize_radio:
+124a 70804206 jam clksel_rc ,core_clksel 
+
+initialize_radio_wait:
+124b 6fe140ca fetch 2 ,mem_rf_init_ptr 
+124c c307124b bbit0 14 ,initialize_radio_wait 
+124d 98000c00 iforce contr 
+124e d8408a00 arg 0x8a00 ,temp 
+
+initialize_radio_loop:
+124f efe08006 ifetch 1 ,contr 
+1250 c07f9255 beq 0xff ,initialize_radio_cont 
+1251 98418a00 ior temp ,contw 
+1252 efe08006 ifetch 1 ,contr 
+1253 e7e08005 istore 1 ,contw 
+1254 2020124f branch initialize_radio_loop 
+
+initialize_radio_cont:
+1255 44c5c011 bpatch patch11_3 ,mem_patch11 
+1256 708a8be6 jam 0xe6 ,core_syn_aac_cfg1 
+1257 2040126a call initialize_syn_afc_cfg1 
+1258 20401271 call initialize_rf_ldo_cfg1 
+1259 20401277 call initialize_rc_cal 
+125a 708a6d09 jam 0x09 ,core_rx_bq_cfg0 
+125b 708a0305 jam 5 ,core_clkpll_cfg0 
+125c 708a7a94 jam 0x94 ,core_rx_iqadc_cfg 
+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 20401228 call set_tx_power_0db 
+1265 708a9a2b jam 0x2b ,core_tx_mixer_cfg1 
+1266 708a9b13 jam 0x13 ,core_tx_mixer_cfg2 
+1267 70804205 jam clksel_dpll ,core_clksel 
+1268 7041f00c jam system_clk_12m ,mem_system_clk 
+1269 202016b2 branch le_disable 
+
+initialize_syn_afc_cfg1:
+126a 6fe0c4d1 fetch 1 ,mem_syn_afc_cfg1 
+126b 203a126f branch initialize_syn_afc_cfg1_default ,blank 
+126c 1fe1fe20 or_into 0x20 ,pdata 
+126d 67f08a87 store 1 ,core_syn_afc_cfg1 
+126e 20600000 rtn 
+
+initialize_syn_afc_cfg1_default:
+126f 708a8729 jam 0x29 ,core_syn_afc_cfg1 
+1270 20600000 rtn 
+
+initialize_rf_ldo_cfg1:
+1271 6fe0c4d2 fetch 1 ,mem_rf_ldo_cfg1 
+1272 203a1275 branch initialize_rf_ldo_cfg1_default ,blank 
+1273 67f08a0d store 1 ,core_rf_ldo_cfg1 
+1274 20600000 rtn 
+
+initialize_rf_ldo_cfg1_default:
+1275 708a0d00 jam 0x00 ,core_rf_ldo_cfg1 
+1276 20600000 rtn 
+
+initialize_rc_cal:
+1277 6fe0c4d3 fetch 1 ,mem_rc_cal 
+1278 203a127b branch initialize_rc_cal_default ,blank 
+1279 67f08a6c store 1 ,core_rx_bq_bw_cal 
+127a 20600000 rtn 
+
+initialize_rc_cal_default:
+127b 708a6cd3 jam 0xd3 ,core_rx_bq_bw_cal 
+127c 20600000 rtn 
+
+save_rssi:
+127d 44c64011 bpatch patch11_4 ,mem_patch11 
+127e 70001920 jam 0x20 ,mem_rssi_hex 
+127f 6ff089a0 fetch 1 ,modem_rssi 
+1280 67e0c1e9 store 1 ,mem_modem_rssi 
+1281 1fe67cfc sub pdata ,0xfc ,null 
+1282 24610000 nrtn positive 
+1283 1fe67c7f sub pdata ,0x7f ,null 
+1284 20610000 rtn positive 
+1285 6ff089a3 fetch 1 ,modem_gain 
+1286 1fe1040f and pdata ,0x0f ,temp 
+1287 18438400 lshift temp ,temp 
+1288 1ff1fe00 rshift4 pdata ,pdata 
+1289 98408400 iadd temp ,temp 
+128a 184f8403 mul32 temp ,3 ,temp 
+128b 6fe0c1e9 fetch 1 ,mem_modem_rssi 
+128c 1fe67eff sub pdata ,0xff ,pdata 
+128d 9840fe00 iadd temp ,pdata 
+128e 1fe0fffb increase -5 ,pdata 
+128f 67e08019 store 1 ,mem_rssi_hex 
+1290 20600000 rtn 
+
+rssi_hex2dec:
+1291 6fe08019 fetch 1 ,mem_rssi_hex 
+1292 20401295 call bcd 
+1293 67e08018 store 1 ,mem_rssi 
+1294 20600000 rtn 
+
+bcd:
+1295 1fe17eff and_into 0xff ,pdata 
+1296 1fe6fc0a div pdata ,10 
+1297 20407dec call get_div_result 
+1298 1ff27e00 lshift4 pdata ,pdata 
+1299 18070400 remainder temp 
+129a 9841fe00 ior temp ,pdata 
+129b 20600000 rtn 
+
+gain_control:
+129c 6fe0c1ea fetch 1 ,mem_gain_fix 
+129d c17f8000 rtneq 0xff 
+129e 242c12c2 nbranch gain_increase ,sync 
+129f 6fe0c1e9 fetch 1 ,mem_modem_rssi 
+12a0 1fe67cf0 sub pdata ,0xf0 ,null 
+12a1 242112c6 nbranch gain_descend ,positive 
+12a2 1fe67c7f sub pdata ,0x7f ,null 
+12a3 202112c6 branch gain_descend ,positive 
+12a4 6a308961 fetchr rega ,1 ,core_rf_rx_gain_fix 
+12a5 6fe0c1ea fetch 1 ,mem_gain_fix 
+12a6 c1000000 rtneq 0 
+12a7 d8c041eb arg mem_gain_table ,contr 
+12a8 98c08c00 iadd contr ,contr 
+12a9 efe08006 ifetch 1 ,contr 
+12aa 9a267c00 isub rega ,null 
+12ab 24628000 nrtn zero 
+12ac 18c08dfe increase -2 ,contr 
+12ad e8408006 ifetcht 1 ,contr 
+12ae 1851fe00 rshift4 temp ,pdata 
+12af 1a31a400 rshift4 rega ,regb 
+12b0 9a462400 isub regb ,regb 
+12b1 18417e0f and temp ,0xf ,pdata 
+12b2 1a21220f and rega ,0xf ,rega 
+12b3 9a262200 isub rega ,rega 
+12b4 1a23fe00 lshift rega ,pdata 
+12b5 9a40a400 iadd regb ,regb 
+12b6 1a4fa403 mul32 regb ,3 ,regb 
+12b7 6848c1e9 fetcht 1 ,mem_modem_rssi 
+12b8 18417e80 and temp ,0x80 ,pdata 
+12b9 207a0000 rtn blank 
+
+add_negative:
+12ba 58000100 setarg 0x100 
+12bb 98460400 isub temp ,temp 
+12bc 1a427e00 copy regb ,pdata 
+12bd 98467e00 isub temp ,pdata 
+12be 20610000 rtn positive 
+12bf 1fe17eff and pdata ,0xff ,pdata 
+12c0 c17f8000 rtneq 0xff 
+12c1 c17f0000 rtneq 0xfe 
+
+gain_increase:
+12c2 6fe0c1ea fetch 1 ,mem_gain_fix 
+12c3 c00092cb beq 1 ,set_rx_gain0 
+12c4 c00112cd beq 2 ,set_rx_gain1 
+12c5 202012cb branch set_rx_gain0 
+
+gain_descend:
+12c6 6fe0c1ea fetch 1 ,mem_gain_fix 
+12c7 c00012cd beq 0 ,set_rx_gain1 
+12c8 c00092c9 beq 1 ,set_rx_gain2 
+
+set_rx_gain2:
+12c9 7041ea02 jam 2 ,mem_gain_fix 
+12ca 20600000 rtn 
+
+set_rx_gain0:
+12cb 7041ea00 jam 0 ,mem_gain_fix 
+12cc 20600000 rtn 
+
+set_rx_gain1:
+12cd 7041ea01 jam 1 ,mem_gain_fix 
+12ce 20600000 rtn 
+
+xtal_fast_wake:
+12cf 58000f0f setarg 0xf0f 
+12d0 20201591 branch lpm_write_config 
+
+init_lpm_ctrl:
+12d1 5800080f setarg 0x80f 
+12d2 20201591 branch lpm_write_config 
+
+start_receiver:
+12d3 44c6c011 bpatch patch11_5 ,mem_patch11 
+12d4 78507c00 disable is_tx 
+12d5 7830fc00 enable is_rx 
+12d6 782b7c00 pulse init_encrypt 
+12d7 202011a6 branch rf_rx_enable 
+
+prep_crypt:
+12d8 44c74011 bpatch patch11_6 ,mem_patch11 
+12d9 20400de1 call check_enc_ccm 
+12da 243a12e8 nbranch prep_crypt_ccm ,blank 
+12db 6fe0804d fetch 1 ,mem_state_map 
+12dc 2feffe02 isolate1 smap_encryption ,pdata 
+12dd 7920fe00 setflag true ,0 ,pdata 
+12de 67f08011 store 1 ,core_encrypt 
+12df d8c00063 arg mem_kc ,contr 
+12e0 efe48006 ifetch 9 ,contr 
+12e1 98006400 iforce kc_ls 
+12e2 efe38006 ifetch 7 ,contr 
+12e3 98006600 iforce kc_ms 
+12e4 6fe08055 fetch 1 ,mem_key_size 
+12e5 1fe0e9ff add pdata ,-1 ,g1l 
+12e6 782d7c00 pulse kc_p_activate 
+12e7 20600000 rtn 
+
+prep_crypt_ccm:
+12e8 70801100 jam 0 ,core_encrypt 
+12e9 20600000 rtn 
+
+wait_access_end:
+12ea 1b427e00 deposit clke 
+12eb 67e30098 store 6 ,mem_sync_clke 
+12ec 7846fc00 disable decode_fec0 
+12ed 242c114f nbranch shutdown_radio ,sync 
+12ee 6fe1015b fetch 2 ,mem_param_clke_cal 
+12ef 1fe25200 copy pdata ,clke_rt 
+12f0 1d00d001 increase 1 ,clke_bt 
+12f1 1d0151fc and_into 0x1fc ,clke_bt 
+12f2 20600000 rtn 
+
+wait_access_mhalfbnd:
+12f3 7826fc00 enable decode_fec0 
+
+wait_access_mhalfbnd_correlate:
+12f4 37cb8400 correlate null ,mhalfbnd 
+12f5 202c12ea branch wait_access_end ,sync 
+12f6 2d000402 compare 0x02 ,clke_bt ,0x02 
+12f7 242092f4 nbranch wait_access_mhalfbnd_correlate ,true 
+12f8 202012ea branch wait_access_end 
+
+wait_access_clkn_rt:
+12f9 44c7c011 bpatch patch11_7 ,mem_patch11 
+12fa 69610159 fetchr timeup ,2 ,mem_param_conn_access 
+12fb 7826fc00 enable decode_fec0 
+12fc 34730400 correlate clkn_rt ,meet 
+12fd 7846fc00 disable decode_fec0 
+12fe 242c114f nbranch shutdown_radio ,sync 
+12ff 20600000 rtn 
+
+wait_access_forever:
+1300 44c84012 bpatch patch12_0 ,mem_patch12 
+1301 7826fc00 enable decode_fec0 
+1302 37c18400 correlate null ,timeout 
+1303 7846fc00 disable decode_fec0 
+1304 242c114f nbranch shutdown_radio ,sync 
+1305 6fe1015b fetch 2 ,mem_param_clke_cal 
+1306 1fe25200 copy pdata ,clke_rt 
+1307 1d0151fc and_into 0x1fc ,clke_bt 
+1308 20600000 rtn 
+
+reserve_slot:
+1309 44c8c012 bpatch patch12_1 ,mem_patch12 
+130a 98002200 iforce rega 
+130b 1c227e00 deposit bt_clk 
+130c 98409600 iadd temp ,timeup 
+130d 19627e00 copy timeup ,pdata 
+130e 67e240d1 store 4 ,mem_next_btclk 
+130f 1a227e00 deposit rega 
+1310 20600000 rtn 
+
+ahead_window:
+1311 1fe20400 copy pdata ,temp 
+1312 44c94012 bpatch patch12_2 ,mem_patch12 
+1313 18427e00 copy temp ,pdata 
+1314 20407db1 call clk2bt 
+1315 1c307e00 lshift16 bt_clk ,pdata 
+1316 79207e2c set1 44 ,pdata 
+1317 20407d97 call clk_diff 
+1318 793ffe2c set0 44 ,pdata 
+1319 20401365 call get_clk 
+131a 20407d97 call clk_diff 
+131b 20740000 rtn user 
+131c 20407da4 call clk2rt 
+131d 98003600 iforce stop_watch 
+131e 37c18200 until null ,timeout 
+131f 20600000 rtn 
+
+setup_clk:
+1320 44c9c012 bpatch patch12_3 ,mem_patch12 
+1321 20381325 branch setup_clkn ,clknt 
+1322 35330200 until clke_rt ,meet 
+
+skip_setup_clke:
+1323 1d020400 copy clke_bt ,temp 
+1324 20201328 branch setup_clknbt 
+
+setup_clkn:
+1325 20371327 branch skip_setup_clkn ,attempt 
+1326 34730200 until clkn_rt ,meet 
+
+skip_setup_clkn:
+1327 1c420400 copy clkn_bt ,temp 
+
+setup_clknbt:
+1328 20341334 branch setup_clk11 ,user 
+1329 28400601 compare 1 ,temp ,3 
+132a 24209320 nbranch setup_clk ,true 
+
+setup_complete:
+132b 44ca4012 bpatch patch12_4 ,mem_patch12 
+132c 6fe08031 fetch 1 ,mem_state 
+132d c4000000 rtnbit0 state_inconn 
+132e 6fe240d1 fetch 4 ,mem_next_btclk 
+132f 98467e00 isub temp ,pdata 
+1330 24610000 nrtn positive 
+1331 1fe67cff sub pdata ,0xff ,null 
+1332 20211320 branch setup_clk ,positive 
+1333 20600000 rtn 
+
+setup_clk11:
+1334 28400603 compare 3 ,temp ,3 
+1335 24209320 nbranch setup_clk ,true 
+1336 2020132b branch setup_complete 
+
+rf_setup_time:
+1337 44cac012 bpatch patch12_5 ,mem_patch12 
+1338 69610157 fetchr timeup ,2 ,mem_param_rf_setup 
+1339 20201320 branch setup_clk 
+
+rf_setup_time_slave_slot:
+133a 78547c00 disable user 
+133b 20201337 branch rf_setup_time 
+
+rf_setup_time_master_slot:
+133c 78347c00 enable user 
+133d 20201337 branch rf_setup_time 
+
+start_transmitter:
+133e 44cb4012 bpatch patch12_6 ,mem_patch12 
+133f 204012d8 call prep_crypt 
+1340 7850fc00 disable is_rx 
+1341 78307c00 enable is_tx 
+1342 20600000 rtn 
+
+start_tx_native:
+1343 44cbc012 bpatch patch12_7 ,mem_patch12 
+1344 69610155 fetchr timeup ,2 ,mem_param_tx_setup 
+1345 34730200 until clkn_rt ,meet 
+1346 782b7c00 pulse init_encrypt 
+1347 20600000 rtn 
+
+start_rx_native:
+1348 44cc4013 bpatch patch13_0 ,mem_patch13 
+1349 6961015f fetchr timeup ,2 ,mem_param_rx_setup 
+134a 34730200 until clkn_rt ,meet 
+134b 20600000 rtn 
+
+start_tx_external:
+134c 44ccc013 bpatch patch13_1 ,mem_patch13 
+134d 69610155 fetchr timeup ,2 ,mem_param_tx_setup 
+134e 35330200 until clke_rt ,meet 
+134f 782b7c00 pulse init_encrypt 
+1350 20600000 rtn 
+
+send_access_word:
+1351 44cd4013 bpatch patch13_2 ,mem_patch13 
+1352 20404cb5 call rf_debug_tx_on_line 
+1353 51207e00 preload access 
+1354 782efc00 enable encode_fec0 
+1355 79202a00 set1 txgfsk ,radio_ctrl 
+1356 08008648 inject mod ,72 
+1357 784efc00 disable encode_fec0 
+1358 20600000 rtn 
+
+scan_mode_whiten:
+1359 1ca20400 copy xin ,temp 
+135a 18418460 or_into 0x60 ,temp 
+135b 18421c00 copy temp ,white_init 
+135c 20600000 rtn 
+
+get_free_amaddr:
+135d 44cdc013 bpatch patch13_3 ,mem_patch13 
+135e 6fe0c098 fetch 1 ,mem_current_amaddr 
+135f 1fe0fe01 increase 1 ,pdata 
+1360 c0839362 bne param_esco_addr ,get_free_amaddr_cont 
+1361 18007e01 force 1 ,pdata 
+
+get_free_amaddr_cont:
+1362 67e0c098 store 1 ,mem_current_amaddr 
+1363 98000800 iforce am_addr 
+1364 20600000 rtn 
+
+get_clk:
+1365 1b220400 copy clkn ,temp 
+1366 20748000 rtn master 
+1367 1b420400 copy clke ,temp 
+1368 20600000 rtn 
+
+get_clkbt:
+1369 1c427e00 deposit clkn_bt 
+136a 20748000 rtn master 
+136b 1d027e00 deposit clke_bt 
+136c 20600000 rtn 
+
+supervision_update:
+136d 44ce4013 bpatch patch13_4 ,mem_patch13 
+136e 684a004e fetcht 4 ,mem_supervision_timer 
+136f 20401369 call get_clkbt 
+1370 98461600 isub temp ,timeup 
+1371 19627e00 deposit timeup 
+1372 68490052 fetcht 2 ,mem_supervision_to 
+1373 18438400 lshift temp ,temp 
+1374 98467e00 isub temp ,pdata 
+1375 20600000 rtn 
+
+supervision_flush:
+1376 44cec013 bpatch patch13_5 ,mem_patch13 
+1377 20401369 call get_clkbt 
+1378 67e2004e store 4 ,mem_supervision_timer 
+1379 20600000 rtn 
+
+assert:
+137a 44cf4013 bpatch patch13_6 ,mem_patch13 
+137b 2020137a branch assert 
+
+loop:
+137c 2020137c branch loop 
+
+sleep:
+137d 207a0000 rtn blank 
+137e 1fe37e00 rshift pdata ,pdata 
+137f 1fe0fffd increase -3 ,pdata 
+
+sleep_loop:
+1380 1fe0ffff increase -1 ,pdata 
+1381 24229380 nbranch sleep_loop ,zero 
+1382 18007e00 force 0 ,pdata 
+1383 20600000 rtn 
+
+init_param:
+1384 df200010 arg 0x10 ,loopcnt 
+1385 d8a00000 arg 0 ,contw 
+1386 20407d17 call memset0 
+1387 d8a00287 arg mem_le_state ,contw 
+1388 df20000a arg 10 ,loopcnt 
+1389 20407d17 call memset0 
+138a 70087400 jam 0 ,mem_sp_calc 
+138b 70095b00 jam 0 ,mem_fifo_temp 
+138c 7002df00 jam 0 ,mem_le_testtype 
+138d 7000e400 jam 0 ,mem_debug_config 
+138e 7003a500 jam 0 ,mem_lmp_conn_state 
+138f 7000bd00 jam 0 ,mem_connection_options 
+1390 700a5100 jam 0 ,mem_tester_emulate 
+1391 700a5c00 jam 0 ,mem_tester_cnt 
+1392 589e8b33 setarg param_glap 
+1393 67e1c0af store 3 ,mem_glap 
+1394 70008e60 jam 0x60 ,mem_fhs_misc 
+1395 7040d705 jam param_max_slot ,mem_max_slot 
+1396 70001402 jam 0x02 ,mem_fw_ver 
+1397 58000e43 setarg param_tx_setup 
+1398 67e10155 store 2 ,mem_param_tx_setup 
+1399 58000600 setarg param_rf_setup 
+139a 67e10157 store 2 ,mem_param_rf_setup 
+139b 58000600 setarg param_conn_access 
+139c 67e10159 store 2 ,mem_param_conn_access 
+139d 58000d00 setarg param_rx_setup 
+139e 67e1015f store 2 ,mem_param_rx_setup 
+139f 580003bb setarg param_clke_cal 
+13a0 67e1015b store 2 ,mem_param_clke_cal 
+13a1 58000500 setarg param_pll_setup 
+13a2 67e1015d store 2 ,mem_param_pll_setup 
+13a3 580007d0 setarg param_dpll_start_delay 
+13a4 67e10161 store 2 ,mem_param_dpll_start_delay 
+13a5 58000ea6 setarg param_rt_rthalfslot 
+13a6 67e10163 store 2 ,mem_param_rt_rthalfslot 
+13a7 580001e0 setarg param_clke_cal_le_1m 
+13a8 67e10165 store 2 ,mem_param_clke_cal_le_1m 
+13a9 58000120 setarg param_clke_cal_le_2m 
+13aa 67e10167 store 2 ,mem_param_clke_cal_le_2m 
+13ab 5800011a setarg param_clke_cal_le_coded 
+13ac 67e10169 store 2 ,mem_param_clke_cal_le_coded 
+13ad 58001400 setarg mem_ble_tx_buff0 
+13ae 67e143de store 2 ,mem_ble_l2cap_tx_buff0_ptr 
+13af 58000100 setarg mem_ble_l2cap_tx_buff_size 
+13b0 67e143e0 store 2 ,mem_ble_l2cap_tx_buff_size_ptr 
+13b1 20406dfb call init_memp 
+13b2 58000880 setarg mem_sp_state_end 
+13b3 d8a00870 arg mem_sp_state_start ,contw 
+13b4 98a67200 isub contw ,loopcnt 
+13b5 20407d26 call clear_mem 
+
+init_param_next:
+13b6 44cfc013 bpatch patch13_7 ,mem_patch13 
+13b7 20758000 rtn wake 
+13b8 7045f709 jam bluetooth_core_specification_5_0 ,mem_lmp_version 
+13b9 5800050e setarg company_id_yichip 
+13ba 67e145f8 store 2 ,mem_lmp_compid 
+13bb 58000008 setarg 0x08 
+13bc 67e145fa store 2 ,mem_lmp_subversion 
+13bd 7044cf7f jam 0x7f ,mem_seqi 
+13be 58000024 setarg 0x24 
+13bf 67e140b5 store 2 ,mem_iscan_window 
+13c0 67e140b9 store 2 ,mem_pscan_window 
+13c1 58000200 setarg 0x200 
+13c2 67e140b7 store 2 ,mem_iscan_interval 
+13c3 67e140bb store 2 ,mem_pscan_interval 
+13c4 58000020 setarg 0x20 
+13c5 67e140c3 store 2 ,mem_inq_window 
+13c6 67e140bf store 2 ,mem_page_window 
+13c7 58002000 setarg 0x2000 
+13c8 67e140c1 store 2 ,mem_page_to 
+13c9 58000480 setarg 0x480 
+13ca 67e140c6 store 2 ,mem_rx_window_init 
+13cb 58000c00 setarg 0xc00 
+13cc 67e140c8 store 2 ,mem_rx_window_sniff 
+13cd 58000c3f setarg 0xc3f 
+13ce 67e1417e store 2 ,mem_lpm_xtalcnt + 1 
+13cf 58000333 setarg 0x333 
+13d0 e7e10005 istore 2 ,contw 
+13d1 5824109d setarg 0x24109d 
+13d2 67e1c183 store 3 ,mem_lpm_ctrl3 + 1 
+13d3 20407fdc call clear_wake 
+13d4 58000000 setarg 0 
+13d5 67e141e6 store 2 ,mem_tx_len 
+13d6 1c437e00 rshift clkn_bt ,pdata 
+13d7 67e2409c store 4 ,mem_last_clkn 
+13d8 20600000 rtn 
+
+clk24m_init:
+13d9 70804206 jam 6 ,core_clksel 
+13da 70804201 jam 1 ,core_clksel 
+13db 2000000a nop 10 
+13dc 58001d4a setarg 7498 
+13dd 67f10040 store 2 ,core_halfslot 
+13de 20600000 rtn 
+
+test_init:
+13df 580013e4 setarg test_proc 
+13e0 67e14463 store 2 ,mem_cb_bt_process 
+13e1 580013e4 setarg test_proc 
+13e2 67e14465 store 2 ,mem_cb_idle_process 
+13e3 20600000 rtn 
+
+test_proc:
+13e4 6fe08031 fetch 1 ,mem_state 
+13e5 c30093ea bbit0 state_insniff ,check_test_cond 
+13e6 7920000d set1 mark_lpm_mult_enable ,mark 
+13e7 6fe3416e fetch 6 ,mem_sniff_rcv 
+13e8 67e345fd store 6 ,mem_local_name 
+13e9 20600000 rtn 
+
+check_test_cond:
+13ea 6fe08a51 fetch 1 ,mem_tester_emulate 
+13eb c4010000 rtnbit0 tester_change 
+13ec 6fe08a5c fetch 1 ,mem_tester_cnt 
+13ed 1fe0fe01 increase 1 ,pdata 
+13ee 67e08a5c store 1 ,mem_tester_cnt 
+13ef c1828000 rtnne 5 
+13f0 700a5c00 jam 0 ,mem_tester_cnt 
+13f1 6fe08a51 fetch 1 ,mem_tester_emulate 
+13f2 793ffe02 set0 tester_change ,pdata 
+13f3 67e08a51 store 1 ,mem_tester_emulate 
+13f4 c281940b bbit1 tester_exit ,check_test_exit 
+13f5 2feffe07 isolate1 tester_no_whitening ,pdata 
+13f6 2040fe19 call test_no_white ,true 
+13f7 2440fe1d ncall test_enable_white ,true 
+13f8 6fe08a58 fetch 1 ,test_mode_packet_type 
+13f9 2fe06020 compare 0x20 ,pdata ,0x30 
+13fa 6fe0804d fetch 1 ,mem_state_map 
+13fb 7920fe05 setflag true ,smap_edr ,pdata 
+13fc 67e0804d store 1 ,mem_state_map 
+13fd 6fe08a51 fetch 1 ,mem_tester_emulate 
+13fe 684880e4 fetcht 1 ,mem_debug_config 
+13ff 2feffe04 isolate1 tester_pattern_test ,pdata 
+1400 79208406 setflag true ,debug_tx_pattern ,temp 
+1401 2feffe06 isolate1 tester_fixed_freq ,pdata 
+1402 79208404 setflag true ,debug_tx_fixed_freq ,temp 
+1403 79208405 setflag true ,debug_rx_fixed_freq ,temp 
+1404 604880e4 storet 1 ,mem_debug_config 
+1405 6fe08a54 fetch 1 ,test_mode_tx_freq 
+1406 67e0839f store 1 ,mem_tx_fixed_freq 
+1407 6fe08a55 fetch 1 ,test_mode_rx_freq 
+1408 67e083a0 store 1 ,mem_rx_fixed_freq 
+1409 79200011 set1 mark_testmode ,mark 
+140a 20600000 rtn 
+
+check_test_exit:
+140b 793f8011 set0 mark_testmode ,mark 
+140c 700a5100 jam 0 ,mem_tester_emulate 
+140d 6fe08a5b fetch 1 ,mem_test_mode_old_debug_config 
+140e 67e080e4 store 1 ,mem_debug_config 
+140f 20207e1d branch test_enable_white 
+
+lpmstate:
+1410 5800ee21 setarg 0xee21 
+1411 67f10050 store 2 ,core_clkoff 
+1412 6ff2011c fetch 4 ,core_gpio_in 
+1413 67e2098a store 4 ,mem_saved_gpio_in 
+1414 6ff0813b fetch 1 ,core_lpm_ctrl + 3 
+1415 67e08989 store 1 ,mem_wakup_from_power_flag 
+1416 6ff0813e fetch 1 ,core_lpm_ldocnt 
+1417 c301db6a bbit0 gpio_latch ,loadcode 
+1418 7835fc00 enable wake 
+1419 c3039421 bbit0 cold_wake ,lpmwake 
+141a 7855fc00 disable wake 
+141b 1ce27e00 deposit auxcnt 
+141c 243a1421 nbranch lpmwake ,blank 
+141d 6ff0813b fetch 1 ,core_lpm_ctrl + 3 
+141e c2811421 bbit1 reload_code ,lpmwake 
+141f d85fffff arg param_hibernate_clks ,temp 
+1420 202014b0 branch lpm_enter_sleep 
+
+lpmwake:
+1421 6ff20134 fetch 4 ,core_lpm_ctrl2 
+1422 67f2004c store 4 ,core_lpm_reg 
+1423 6ff08135 fetch 1 ,core_lpm_ctrl2 + 1 
+1424 1fe17ee0 and_into 0xe0 ,pdata 
+1425 67f0804d store 1 ,core_lpm_reg + 1 
+1426 204015af call lpm_write_ctrl3 
+1427 6ff1813c fetch 3 ,core_lpm_xtalcnt 
+1428 67f1804c store 3 ,core_lpm_reg 
+1429 efe08006 ifetch 1 ,contr 
+142a 1fe1feef or_into isogate_mask ,pdata 
+142b e7e08005 istore 1 ,contw 
+142c 2040159c call lpm_write_ctrl2 
+142d 6ff0804f fetch 1 ,core_lpm_isogate 
+142e 79207e04 set1 enable_retmem ,pdata 
+142f 67f0804f store 1 ,core_lpm_isogate 
+1430 2040159c call lpm_write_ctrl2 
+1431 20559453 call lpm_load_context ,wake 
+1432 6ff0804e fetch 1 ,core_lpm_reg + 2 
+1433 793ffe03 set0 gpio_latch ,pdata 
+1434 67f0804e store 1 ,core_lpm_reg + 2 
+1435 2040159c call lpm_write_ctrl2 
+1436 2435db6a nbranch loadcode ,wake 
+1437 2040143b call lpm_save_mpu_lock 
+1438 c6958000 rtnmark0 mark_otp_encrypt 
+1439 70800608 jam lock_otp ,core_misc_ctrl 
+143a 20600000 rtn 
+
+lpm_save_mpu_lock:
+143b 6fe1c4cc fetch 3 ,mem_efuse_header 
+143c 207a0000 rtn blank 
+143d 67e18a01 store 3 ,mem_tmp_buffer 
+143e 20205c49 branch app_lpm_peripheral_lock_check 
+
+lpm_ctrl3_cfg_dig_vsel:
+143f 6fe0c4d0 fetch 1 ,mem_dig_aon_vsel 
+1440 c0009447 beq 1 ,lpm_ctrl3_cfg_vsel_108 
+1441 c001144b beq 2 ,lpm_ctrl3_cfg_vsel_096 
+1442 c001944f beq 3 ,lpm_ctrl3_cfg_vsel_084 
+
+lpm_ctrl3_cfg_vsel_120:
+1443 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+1444 1fe17ee0 and_into 0xe0 ,pdata 
+
+lpm_ctrl3_cfg_vsel_store:
+1445 67e0c183 store 1 ,mem_lpm_ctrl3 + 1 
+1446 20600000 rtn 
+
+lpm_ctrl3_cfg_vsel_108:
+1447 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+1448 1fe17ee0 and_into 0xe0 ,pdata 
+1449 1fe1fe1d or_into 0x1d ,pdata 
+144a 20201445 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_ctrl3_cfg_vsel_096:
+144b 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+144c 1fe17ee0 and_into 0xe0 ,pdata 
+144d 1fe1fe1b or_into 0x1b ,pdata 
+144e 20201445 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_ctrl3_cfg_vsel_084:
+144f 6fe0c183 fetch 1 ,mem_lpm_ctrl3 + 1 
+1450 1fe17ee0 and_into 0xe0 ,pdata 
+1451 1fe1fe17 or_into 0x17 ,pdata 
+1452 20201445 branch lpm_ctrl3_cfg_vsel_store 
+
+lpm_load_context:
+1453 6fe0c1a5 fetch 1 ,mem_saved_spidctrl 
+1454 67f08086 store 1 ,core_spid_ctrl 
+1455 d8c04186 arg mem_saved_gpio ,contr 
+1456 d8a08070 arg core_gpio_conf ,contw 
+1457 20407d01 call memcpy20 
+1458 6fe4419d fetch 8 ,mem_saved_mark 
+1459 98000000 iforce mark 
+145a 6ff40140 fetch 8 ,core_gpio_wakeup_low 
+145b 67e4009f store 8 ,mem_gpio_wakeup_low 
+145c 20205c05 branch load_ucode 
+
+lpm_save_context:
+145d 18027e00 deposit mark 
+145e 67e4419d store 8 ,mem_saved_mark 
+145f d8c08070 arg core_gpio_conf ,contr 
+1460 d8a04186 arg mem_saved_gpio ,contw 
+1461 20407d01 call memcpy20 
+1462 6ff08086 fetch 1 ,core_spid_ctrl 
+1463 67e0c1a5 store 1 ,mem_saved_spidctrl 
+1464 202015b1 branch lpm_write_gpio_wakeup 
+
+lpo_calibration:
+1465 6ff08085 fetch 1 ,core_aes_en 
+1466 1ff1fe00 rshift4 pdata ,pdata 
+1467 243a146e nbranch lpo_cal_inited ,blank 
+1468 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+1469 247a0000 nrtn blank 
+146a 6ff08085 fetch 1 ,core_aes_en 
+146b 1fe1fec0 or_into 0xc0 ,pdata 
+146c 67f08085 store 1 ,core_aes_en 
+146d 70800680 jam ccnt_start ,core_misc_ctrl 
+
+lpo_cal_inited:
+146e 6ff0812d fetch 1 ,core_perf_status 
+146f c4008000 rtnbit0 1 
+1470 6ff18149 fetch 3 ,core_clk_counter 
+1471 67e1c174 store 3 ,mem_clks_per_lpo 
+1472 20600000 rtn 
+
+lpm_adjust_clk:
+1473 44d04014 bpatch patch14_0 ,mem_patch14 
+1474 1b427e00 deposit clke 
+1475 20407d95 call clk_diff_rt 
+1476 684a4164 fetcht 4 ,mem_sleep_counter_all 
+1477 18467cff sub temp ,0xff ,null 
+1478 20610000 rtn positive 
+1479 1fed7e00 lshift8 pdata ,pdata 
+147a 1ff27e00 lshift4 pdata ,pdata 
+147b 9846fc00 idiv temp 
+147c 20407dec call get_div_result 
+147d d84000c8 arg param_lpm_adjmax ,temp 
+147e 20407dfa call ceiling 
+147f 67e08097 store 1 ,mem_lpm_adjust 
+1480 24341482 nbranch lpm_adjust_positive ,user 
+1481 1fe67e00 sub pdata ,0 ,pdata 
+
+lpm_adjust_positive:
+1482 6849c174 fetcht 3 ,mem_clks_per_lpo 
+1483 9840fe00 iadd temp ,pdata 
+1484 67e1c174 store 3 ,mem_clks_per_lpo 
+
+lpm_clear_counter:
+1485 58000000 setarg 0 
+1486 67e24164 store 4 ,mem_sleep_counter_all 
+1487 20600000 rtn 
+
+lpm_doze:
+1488 6fe0c17c fetch 1 ,mem_lpm_config + 2 
+1489 79207e02 set1 reload_code ,pdata 
+148a 67e0c17c store 1 ,mem_lpm_config + 2 
+148b 20201490 branch lpm_hibernate_normal 
+
+lpm_hibernate:
+148c d85fffff arg param_hibernate_clks ,temp 
+148d 6fe0c17b fetch 1 ,mem_lpm_config + 1 
+148e 793ffe07 set0 7 ,pdata 
+148f 67e0c17b store 1 ,mem_lpm_config + 1 
+
+lpm_hibernate_normal:
+1490 44d0c014 bpatch patch14_1 ,mem_patch14 
+1491 204015b1 call lpm_write_gpio_wakeup 
+1492 6fe0c15c fetch 1 ,mem_lpm_hibernate_switch 
+1493 67e0c181 store 1 ,mem_lpm_xtalcnt + 4 
+1494 6fe0c17f fetch 1 ,mem_lpm_xtalcnt + 2 
+1495 79207e07 set1 cold_wake ,pdata 
+1496 67e0c17f store 1 ,mem_lpm_xtalcnt + 2 
+
+lpm_sleep:
+1497 44d14014 bpatch patch14_2 ,mem_patch14 
+1498 204012cf call xtal_fast_wake 
+1499 6fe24164 fetch 4 ,mem_sleep_counter_all 
+149a 9840fe00 iadd temp ,pdata 
+149b 67e24164 store 4 ,mem_sleep_counter_all 
+149c 2040145d call lpm_save_context 
+149d 2040143f call lpm_ctrl3_cfg_dig_vsel 
+149e 6fe24182 fetch 4 ,mem_lpm_ctrl3 
+149f 1fe22400 copy pdata ,regb 
+14a0 6fe2c17d fetch 5 ,mem_lpm_xtalcnt 
+14a1 67f2004c store 4 ,core_lpm_reg 
+14a2 1fef2200 rshift32 pdata ,rega 
+14a3 37d98200 until null ,lpo_edge 
+14a4 1b227e00 deposit clkn 
+14a5 67e34168 store 6 ,mem_sleep_clkn 
+14a6 70800502 jam lpmreg_sel_ctrl2 ,core_lpm_wr 
+14a7 37d98200 until null ,lpo_edge 
+14a8 37d98200 until null ,lpo_edge 
+14a9 1a227e00 deposit rega 
+14aa 67f0804f store 1 ,core_lpm_isogate 
+14ab 70800502 jam lpmreg_sel_ctrl2 ,core_lpm_wr 
+14ac 37d98200 until null ,lpo_edge 
+14ad 37d98200 until null ,lpo_edge 
+14ae 6252004c storer regb ,4 ,core_lpm_reg 
+14af 70800520 jam lpmreg_sel_ctrl3 ,core_lpm_wr 
+
+lpm_enter_sleep:
+14b0 37d98200 until null ,lpo_edge 
+14b1 37d98200 until null ,lpo_edge 
+14b2 605a004c storet 4 ,core_lpm_reg 
+14b3 70800510 jam lpmreg_sel_counter ,core_lpm_wr 
+14b4 37df8200 until null ,never 
+
+lpm_recover_clk:
+14b5 44d1c014 bpatch patch14_3 ,mem_patch14 
+14b6 58000000 setarg 0 
+14b7 1ce27c00 copy auxcnt ,null 
+14b8 202294c0 branch lpm_recover_timeout ,zero 
+14b9 6ff0813c fetch 1 ,core_lpm_xtalcnt 
+14ba 6858813d fetcht 1 ,core_lpm_buckcnt 
+14bb 98467c00 isub temp ,null 
+14bc 202114be branch lpm_recover_xtal ,positive 
+14bd 18427e00 deposit temp 
+
+lpm_recover_xtal:
+14be 9ce67e00 isub auxcnt ,pdata 
+14bf 1fe0fe01 increase 1 ,pdata 
+
+lpm_recover_timeout:
+14c0 1fe0fe0a increase 10 ,pdata 
+14c1 37d98200 until null ,lpo_edge 
+14c2 9e20fe00 iadd lpo_time ,pdata 
+14c3 684a4160 fetcht 4 ,mem_sleep_counter 
+14c4 9840fe00 iadd temp ,pdata 
+14c5 6849c174 fetcht 3 ,mem_clks_per_lpo 
+14c6 984ffe00 imul32 temp ,pdata 
+14c7 1fecfe00 rshift8 pdata ,pdata 
+14c8 1ff1fe00 rshift4 pdata ,pdata 
+14c9 1fe0fe6e increase param_lpm_fix ,pdata 
+14ca 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+14cb 9846fc00 idiv temp 
+14cc 20407dec call get_div_result 
+14cd 1ff07e00 lshift16 pdata ,pdata 
+14ce 18070400 remainder temp 
+14cf 9841fe00 ior temp ,pdata 
+14d0 684b4168 fetcht 6 ,mem_sleep_clkn 
+14d1 20407d8a call clk_add 
+14d2 18423200 copy temp ,clkn 
+14d3 6fe34048 fetch 6 ,mem_context + coffset_clk_offset 
+14d4 20401077 call calc_clke2 
+14d5 1b427e00 deposit clke 
+14d6 67e3095c store 6 ,mem_pdatatemp 
+14d7 1ce27e00 deposit auxcnt 
+14d8 e7e08005 istore 1 ,contw 
+14d9 6ff0811d fetch 1 ,core_gpio_in1 
+14da 1fe1fef0 or_into 0xf0 ,pdata 
+14db e7e08005 istore 1 ,contw 
+14dc 20600000 rtn 
+
+lpm_dispatch:
+14dd 44d24014 bpatch patch14_4 ,mem_patch14 
+14de 20401465 call lpo_calibration 
+14df 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+14e0 207a0000 rtn blank 
+14e1 6fe0c099 fetch 1 ,mem_lpm_mode 
+14e2 207a0000 rtn blank 
+14e3 6fe0c764 fetch 1 ,mem_ssp_enable 
+14e4 203a14e7 branch lpm_dispatch_next ,blank 
+14e5 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+14e6 207a0000 rtn blank 
+
+lpm_dispatch_next:
+14e7 6fe0c6ba fetch 1 ,mem_sc_calc 
+14e8 247a0000 nrtn blank 
+14e9 c61a0000 rtnmark1 mark_adc_enable 
+14ea da600ab9 arg context_check_a_wack ,regc 
+14eb 20400a70 call context_search 
+14ec 20628000 rtn zero 
+14ed 204015c2 call lpm_check_wake_lock 
+14ee 247a0000 nrtn blank 
+14ef 6fe0c040 fetch 1 ,mem_context 
+14f0 2fe00e03 compare 3 ,pdata ,0x7 
+14f1 24209514 nbranch lpm_dispatch_unconn ,true 
+14f2 6fe14042 fetch 2 ,mem_context + coffset_tsniff 
+14f3 207a0000 rtn blank 
+14f4 20758000 rtn wake 
+14f5 44d2c014 bpatch patch14_5 ,mem_patch14 
+
+lpm_dispatch_next2:
+14f6 6848809e fetcht 1 ,mem_lpm_current_mult 
+14f7 6fe14042 fetch 2 ,mem_context + coffset_tsniff 
+14f8 984ffe00 imul32 temp ,pdata 
+14f9 18518400 rshift4 temp ,temp 
+14fa 184b0400 rshift2 temp ,temp 
+14fb 98467e00 isub temp ,pdata 
+14fc 684a4044 fetcht 4 ,mem_context + coffset_sniff_anchor 
+14fd 9840fe00 iadd temp ,pdata 
+14fe 6848c15b fetcht 1 ,mem_lpm_overhead 
+14ff 98467e00 isub temp ,pdata 
+1500 1ff06000 lshift16 pdata ,alarm 
+1501 44d34014 bpatch patch14_6 ,mem_patch14 
+1502 6fe1404e fetch 2 ,mem_context + coffset_rx_window 
+1503 1fe37e00 rshift pdata ,pdata 
+1504 20407db1 call clk2bt 
+1505 1e027e00 deposit alarm 
+1506 20407d97 call clk_diff 
+1507 1b420400 copy clke ,temp 
+1508 20407d95 call clk_diff_rt 
+1509 20740000 rtn user 
+
+lpm_dispatch_sleep:
+150a 20407daa call clk2lpo 
+
+lpm_dispatch_lpo:
+150b 44d3c014 bpatch patch14_7 ,mem_patch14 
+150c 6fe0c17d fetch 1 ,mem_lpm_xtalcnt 
+150d 98467c00 isub temp ,null 
+150e 20211485 branch lpm_clear_counter ,positive 
+150f 604a4160 storet 4 ,mem_sleep_counter 
+1510 20403143 call app_will_enter_lpm 
+1511 2040534e call l2cap_lpm_save_txbuf 
+1512 684a4160 fetcht 4 ,mem_sleep_counter 
+1513 20201497 branch lpm_sleep 
+
+lpm_dispatch_unconn:
+1514 44d44015 bpatch patch15_0 ,mem_patch15 
+1515 6fe0c040 fetch 1 ,mem_context 
+1516 c3800000 rtnbit1 state_inconn 
+1517 c3818000 rtnbit1 state_inpage 
+1518 6fe0c764 fetch 1 ,mem_ssp_enable 
+1519 203a151c branch lpm_unconn_nossp ,blank 
+151a 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+151b 207a0000 rtn blank 
+
+lpm_unconn_nossp:
+151c 6fe0c427 fetch 1 ,mem_le_adv_enable 
+151d 243a1520 nbranch lpm_unconn_cont ,blank 
+151e 6fe0c09b fetch 1 ,mem_scan_mode 
+151f 207a0000 rtn blank 
+
+lpm_unconn_cont:
+1520 6fe14159 fetch 2 ,mem_lpm_interval 
+1521 207a0000 rtn blank 
+
+lpm_sleep_btclk:
+1522 6848c15b fetcht 1 ,mem_lpm_overhead 
+1523 98467e00 isub temp ,pdata 
+1524 d8401d4c arg 7500 ,temp 
+1525 984ffe00 imul32 temp ,pdata 
+1526 2020150a branch lpm_dispatch_sleep 
+
+lpm_set_mult:
+1527 44d4c015 bpatch patch15_1 ,mem_patch15 
+1528 7855fc00 disable wake 
+1529 6fe08031 fetch 1 ,mem_state 
+152a c4008000 rtnbit0 state_insniff 
+152b 24369549 nbranch lpm_not_match ,match 
+152c 20401544 call lpm_match 
+152d 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+152e 67e1003f store 2 ,mem_rx_window 
+152f 6fe08048 fetch 1 ,mem_arq 
+1530 c2819557 bbit1 wack ,lpm_mult_short 
+1531 c5869557 bmark0 mark_lpm_mult_enable ,lpm_mult_short 
+1532 204052f7 call l2cap_malloc_is_fifo_empty 
+1533 243a1557 nbranch lpm_mult_short ,blank 
+1534 6fe0c643 fetch 1 ,mem_classic_bt_flag 
+1535 c2809557 bbit1 short_mult_flag ,lpm_mult_short 
+
+lpm_mult_wait_timeout:
+1536 6fe14471 fetch 2 ,mem_cb_bt_set_mult 
+1537 20407e05 call callback_func 
+1538 243a1557 nbranch lpm_mult_short ,blank 
+1539 70009e00 jam 0 ,mem_lpm_current_mult 
+153a c5869557 bmark0 mark_lpm_mult_enable ,lpm_mult_short 
+153b 6fe0c179 fetch 1 ,mem_lpm_mult_cnt 
+153c 203a155b branch lpm_mult_long ,blank 
+153d 1fe0ffff increase -1 ,pdata 
+153e 67e0c179 store 1 ,mem_lpm_mult_cnt 
+153f 20600000 rtn 
+
+classic_bt_set_mult_short_flag:
+1540 d8e00001 arg short_mult_flag ,queue 
+1541 202057e4 branch classic_bluetooth_set_flag 
+
+classic_bt_clr_mult_short_flag:
+1542 d8e00001 arg short_mult_flag ,queue 
+1543 202057e8 branch classic_bluetooth_clr_flag 
+
+lpm_match:
+1544 70415e00 jam 0 ,mem_sniff_unint_lost 
+1545 6fe1c16e fetch 3 ,mem_sniff_rcv 
+1546 1fe0fe01 increase 1 ,pdata 
+1547 67e1c16e store 3 ,mem_sniff_rcv 
+1548 20600000 rtn 
+
+lpm_not_match:
+1549 44d54015 bpatch patch15_2 ,mem_patch15 
+154a 684940c8 fetcht 2 ,mem_rx_window_sniff 
+154b 18430400 rshift temp ,temp 
+154c 6fe1003f fetch 2 ,mem_rx_window 
+154d 9840fe00 iadd temp ,pdata 
+154e 67e1003f store 2 ,mem_rx_window 
+
+lpm_lost:
+154f 70009e00 jam 0 ,mem_lpm_current_mult 
+1550 6fe1c171 fetch 3 ,mem_sniff_lost 
+1551 1fe0fe01 increase 1 ,pdata 
+1552 67e1c171 store 3 ,mem_sniff_lost 
+1553 6fe0c15e fetch 1 ,mem_sniff_unint_lost 
+1554 1fe0fe01 increase 1 ,pdata 
+1555 67e0c15e store 1 ,mem_sniff_unint_lost 
+1556 20600000 rtn 
+
+lpm_mult_short:
+1557 70009e00 jam 0 ,mem_lpm_current_mult 
+1558 6fe0c178 fetch 1 ,mem_lpm_mult_timeout 
+1559 67e0c179 store 1 ,mem_lpm_mult_cnt 
+155a 20600000 rtn 
+
+lpm_mult_long:
+155b 6848c177 fetcht 1 ,mem_lpm_mult 
+155c 6048809e storet 1 ,mem_lpm_current_mult 
+155d 20600000 rtn 
+
+lpm_cal_xtal_startup:
+155e 44d5c015 bpatch patch15_3 ,mem_patch15 
+155f 6fe0c17d fetch 1 ,mem_lpm_xtalcnt 
+1560 247a0000 nrtn blank 
+1561 70804206 jam clksel_rc ,core_clksel 
+1562 58000f0c setarg 0xf0c 
+1563 20401591 call lpm_write_config 
+1564 58030d40 setarg 200000 
+1565 2040137d call sleep 
+1566 37d98200 until null ,lpo_edge 
+1567 1e226000 copy lpo_time ,alarm 
+1568 204012cf call xtal_fast_wake 
+1569 70804204 jam clksel_xtal ,core_clksel 
+156a 2000000a nop 10 
+156b 37d98200 until null ,lpo_edge 
+156c 1e227e00 deposit lpo_time 
+156d 9e067e00 isub alarm ,pdata 
+156e 1fe0fe30 increase 0x30 ,pdata 
+156f d84000ff arg 0xff ,temp 
+1570 20407dfa call ceiling 
+1571 67e0c17d store 1 ,mem_lpm_xtalcnt 
+1572 20007530 nop 30000 
+1573 20007530 nop 30000 
+1574 20007530 nop 30000 
+1575 20600000 rtn 
+
+lpm_cal_xtal_startup_by_snooze:
+1576 6fe0c17d fetch 1 ,mem_lpm_xtalcnt 
+1577 247a0000 nrtn blank 
+1578 708044ff jam 0xff ,core_xtal_stable_time 
+1579 70804206 jam clksel_rc ,core_clksel 
+157a 204012cf call xtal_fast_wake 
+157b 580003e8 setarg 1000 
+157c 9e20e000 iadd lpo_time ,alarm 
+157d 07e00000 snooze 
+157e 1e227e00 deposit lpo_time 
+157f 20002ee0 nop 12000 
+1580 20002ee0 nop 12000 
+1581 20002ee0 nop 12000 
+1582 20002ee0 nop 12000 
+1583 20002ee0 nop 12000 
+1584 20002ee0 nop 12000 
+1585 20002ee0 nop 12000 
+1586 20002ee0 nop 12000 
+1587 20002ee0 nop 12000 
+1588 9e067e00 isub alarm ,pdata 
+1589 1fe0fe30 add pdata ,0x30 ,pdata 
+158a d84000ff arg 0xff ,temp 
+158b 20407dfa call ceiling 
+158c 67e0c17d store 1 ,mem_lpm_xtalcnt 
+158d 20007530 nop 30000 
+158e 20007530 nop 30000 
+158f 20007530 nop 30000 
+1590 20600000 rtn 
+
+lpm_write_config:
+1591 d8a00fff arg 0xfff ,contw 
+1592 98a10a00 iand contw ,contw 
+1593 6fe0c17a fetch 1 ,mem_lpm_config 
+1594 1fe17ef0 and_into 0xf0 ,pdata 
+1595 1fed7e00 lshift8 pdata ,pdata 
+1596 98a1fe00 ior contw ,pdata 
+1597 67f1004c store 2 ,core_lpm_reg 
+1598 efe10006 ifetch 2 ,contr 
+1599 e7e10005 istore 2 ,contw 
+
+lpm_write_ctrl:
+159a 58000001 setarg lpmreg_sel_ctrl 
+159b 2020159d branch lpm_write 
+
+lpm_write_ctrl2:
+159c 58000002 setarg lpmreg_sel_ctrl2 
+
+lpm_write:
+159d 37d98200 until null ,lpo_edge 
+159e 67f08005 store 1 ,core_lpm_wr 
+159f 37d98200 until null ,lpo_edge 
+15a0 37d98200 until null ,lpo_edge 
+15a1 20600000 rtn 
+
+lpm_write_sel_vdd3v3:
+15a2 70418200 jam 0x00 ,mem_lpm_ctrl3 
+15a3 6ff20134 fetch 4 ,core_lpm_ctrl2 
+15a4 67f2004c store 4 ,core_lpm_reg 
+15a5 6ff08134 fetch 1 ,core_lpm_ctrl2 
+15a6 1fe17ec1 and_into 0xc1 ,pdata 
+15a7 67f0804c store 1 ,core_lpm_reg 
+15a8 202015af branch lpm_write_ctrl3 
+
+lpm_write_sel_vdd5v:
+15a9 7041823e jam 0x3e ,mem_lpm_ctrl3 
+15aa 6ff20134 fetch 4 ,core_lpm_ctrl2 
+15ab 67f2004c store 4 ,core_lpm_reg 
+15ac 6ff08134 fetch 1 ,core_lpm_ctrl2 
+15ad 1fe1fe3e or_into 0x3e ,pdata 
+15ae 67f0804c store 1 ,core_lpm_reg 
+
+lpm_write_ctrl3:
+15af 58000020 setarg lpmreg_sel_ctrl3 
+15b0 2020159d branch lpm_write 
+
+lpm_write_gpio_wakeup:
+15b1 44d64015 bpatch patch15_4 ,mem_patch15 
+15b2 6fe2009f fetch 4 ,mem_gpio_wakeup_low 
+15b3 67f2004c store 4 ,core_lpm_reg 
+15b4 58000004 setarg lpmreg_sel_gpiolow 
+15b5 2040159d call lpm_write 
+15b6 6fe200a3 fetch 4 ,mem_gpio_wakeup_high 
+15b7 67f2004c store 4 ,core_lpm_reg 
+15b8 58000008 setarg lpmreg_sel_gpiohigh 
+15b9 2020159d branch lpm_write 
+
+lpm_get_wake_lock:
+15ba 6fe14157 fetch 2 ,mem_lpm_wake_lock 
+15bb f9207e00 qset1 pdata 
+15bc 67e14157 store 2 ,mem_lpm_wake_lock 
+15bd 20600000 rtn 
+
+lpm_put_wake_lock:
+15be 6fe14157 fetch 2 ,mem_lpm_wake_lock 
+15bf f93ffe00 qset0 pdata 
+15c0 67e14157 store 2 ,mem_lpm_wake_lock 
+15c1 20600000 rtn 
+
+lpm_check_wake_lock:
+15c2 44d6c015 bpatch patch15_5 ,mem_patch15 
+15c3 20403141 call app_check_wake_lock 
+15c4 6fe14157 fetch 2 ,mem_lpm_wake_lock 
+15c5 1fe22200 copy pdata ,rega 
+15c6 6fe0804d fetch 1 ,mem_state_map 
+15c7 2feffe06 isolate1 smap_rxlmp ,pdata 
+15c8 7920a20b setflag true ,wake_lock_lmp_rx ,rega 
+15c9 6fe08079 fetch 1 ,mem_lmo_opcode1 
+15ca 6848807d fetcht 1 ,mem_lmo_opcode2 
+15cb 9840fe00 iadd temp ,pdata 
+15cc 68488049 fetcht 1 ,mem_lmp_to_send 
+15cd 9840fe00 iadd temp ,pdata 
+15ce 7d3a220a nsetflag blank ,wake_lock_lmp_tx ,rega 
+15cf 6fe1c4f0 fetch 3 ,mem_tx_fifo3 
+15d0 7d3a2201 nsetflag blank ,wake_lock_ble_tx ,rega 
+15d1 6fe1030e fetch 2 ,mem_l2cap_rxbuff1_len 
+15d2 68490310 fetcht 2 ,mem_l2cap_rxbuff2_len 
+15d3 9840fe00 iadd temp ,pdata 
+15d4 7d3a220d nsetflag blank ,wake_lock_l2cap_rx ,rega 
+15d5 6fe44772 fetch util_fifo_len ,mem_ipc_fifo_bt2c51 
+15d6 7d3a220f nsetflag blank ,wake_lock_ipc_bt2c51 ,rega 
+15d7 6fe4477a fetch util_fifo_len ,mem_ipc_fifo_c512bt 
+15d8 7d3a220e nsetflag blank ,wake_lock_ipc_c512bt ,rega 
+15d9 6fe0c1db fetch 1 ,mem_hci_cmd 
+15da 7d3a2208 nsetflag blank ,wake_lock_cmd ,rega 
+15db 6fe0c09a fetch 1 ,mem_device_option 
+15dc 2fe1fe0a compare dvc_op_module ,pdata ,0xff 
+15dd 204095e1 call lpm_uart_wake_lock ,true 
+15de 1a227e00 copy rega ,pdata 
+15df 67e14157 store 2 ,mem_lpm_wake_lock 
+15e0 20600000 rtn 
+
+lpm_uart_wake_lock:
+15e1 6ff10112 fetch 2 ,core_uart_rxitems 
+15e2 7d3a2206 nsetflag blank ,wake_lock_uart_rx ,rega 
+15e3 6ff1010e fetch 2 ,core_uart_txitems 
+15e4 7d3a2205 nsetflag blank ,wake_lock_uart_tx ,rega 
+15e5 20600000 rtn 
+
+lpm_shut_down:
+15e6 6ff20138 fetch 4 ,core_lpm_ctrl 
+15e7 793ffe1b set0 27 ,pdata 
+15e8 67f2004c store 4 ,core_lpm_reg 
+15e9 2040159a call lpm_write_ctrl 
+15ea 2020137a branch assert 
+
+lpm_disable_exen_output:
+15eb 6ff2013c fetch 4 ,core_lpm_xtalcnt 
+15ec 793ffe14 set0 20 ,pdata 
+15ed 67f2004c store 4 ,core_lpm_reg 
+15ee 2020159c branch lpm_write_ctrl2 
+
+le_init_conn:
+15ef 474dc033 bpatchx patch33_3 ,mem_patch33 
+15f0 7855fc00 disable wake 
+15f1 70029d01 jam 1 ,mem_le_conn_handle 
+15f2 70028703 jam 3 ,mem_le_state 
+15f3 70029e01 jam 1 ,mem_le_arq 
+15f4 5fffffff setarg -1 
+15f5 67e102a1 store 2 ,mem_le_event_count 
+15f6 18007e00 force 0 ,pdata 
+15f7 67e0829f store 1 ,mem_le_ch 
+15f8 67e082aa store 1 ,mem_le_op 
+15f9 67e1c16e store 3 ,mem_sniff_rcv 
+15fa 67e1c171 store 3 ,mem_sniff_lost 
+15fb 20401955 call le_clear_enc 
+15fc 7041f501 jam 1 ,mem_le_txheader 
+15fd 7041f600 jam 0 ,mem_le_txlen 
+15fe 7002bc01 jam fun_rx_ll_1m_phy ,mem_le_rx_phy 
+15ff 7002bd01 jam fun_tx_ll_1m_phy ,mem_le_tx_phy 
+1600 70443500 jam 0 ,mem_le_l2cap_att_states 
+1601 20201a30 branch le_supervision_flush 
+
+le_init_master:
+1602 474e4033 bpatchx patch33_4 ,mem_patch33 
+1603 7834fc00 enable master 
+1604 70028803 jam lemode_master ,mem_le_mode 
+1605 70443701 jam 1 ,mem_le_att_handle 
+1606 70099e01 jam 1 ,mem_le_search_handle_start 
+1607 5800ffff setarg 0xffff 
+1608 67e109a0 store 2 ,mem_le_search_handle_end 
+1609 18007e00 force 0 ,pdata 
+160a 67e2c6a1 store 5 ,mem_ccm_pcnt_rx 
+160b 79207e27 set1 le_ccm_directionbit ,pdata 
+160c 67e2c69c store 5 ,mem_ccm_pcnt_tx 
+160d 202015ef branch le_init_conn 
+
+le_init_slave:
+160e 474ec033 bpatchx patch33_5 ,mem_patch33 
+160f 7854fc00 disable master 
+1610 58000017 setarg 0x17 
+1611 67e14382 store 2 ,mem_le_remote_mtu 
+1612 1fe0fe04 increase 4 ,pdata 
+1613 67e14444 store 2 ,mem_remote_rx_max_octets 
+1614 70028801 jam lemode_slave ,mem_le_mode 
+1615 70442700 jam 0 ,mem_le_adv_enable 
+1616 70009e00 jam 0 ,mem_lpm_current_mult 
+1617 2040167a call le_clear_pairing_state 
+1618 6fe102b5 fetch 2 ,mem_le_superto 
+1619 67e14394 store 2 ,mem_le_init_superto 
+161a 6fe10289 fetch 2 ,mem_le_tsniff 
+161b 1feffe05 mul32 pdata ,5 ,pdata 
+161c 1ff1fe00 rshift4 pdata ,pdata 
+161d 67e102b5 store 2 ,mem_le_superto 
+161e 202015ef branch le_init_conn 
+
+le_conn_dispatch:
+161f 474f4033 bpatchx patch33_6 ,mem_patch33 
+1620 204016a5 call le_enable 
+1621 6fe08287 fetch 1 ,mem_le_state 
+1622 2feffe04 isolate1 lestate_encryption ,pdata 
+1623 79208032 setflag true ,mark_ble_encryption ,mark 
+1624 2040310f call app_process_ble 
+1625 6fe08288 fetch 1 ,mem_le_mode 
+1626 c2809628 bbit1 mode_master ,le_master_dispatch 
+1627 2020163a branch le_slave_dispatch 
+
+le_master_dispatch:
+1628 474fc033 bpatchx patch33_7 ,mem_patch33 
+1629 7834fc00 enable master 
+162a 20401a27 call le_supervision_update 
+162b 20211637 branch le_master_disconn ,positive 
+162c 204016f6 call le_setup 
+162d 2040196a call le_prepare_tx 
+162e 7856fc00 disable match 
+162f 20401828 call le_transmit_receive_sifs 
+1630 24768000 nrtn match 
+1631 6fe08005 fetch 1 ,mem_le_conn_rcv 
+1632 1fe0fe01 increase 1 ,pdata 
+1633 67e08005 store 1 ,mem_le_conn_rcv 
+1634 2040191b call le_acknowledge 
+1635 7854fc00 disable master 
+1636 20600000 rtn 
+
+le_master_disconn:
+1637 2040166e call le_disconnect 
+1638 7854fc00 disable master 
+1639 20600000 rtn 
+
+le_slave_dispatch:
+163a 47504034 bpatchx patch34_0 ,mem_patch34 
+163b 7043dd00 jam 0 ,mem_le_md_count 
+163c 793f8030 set0 mark_ble_crc_fail ,mark 
+163d 20407597 call sp_calc_sequence_256 
+163e 204020b7 call le_secure_connect_sm 
+163f 78577c00 disable attempt 
+1640 20401a27 call le_supervision_update 
+1641 2021166e branch le_slave_disconn ,positive 
+1642 6fe082bc fetch 1 ,mem_le_rx_phy 
+1643 2040168b call le_enable_phy_by_pdata 
+1644 204016f6 call le_setup 
+1645 2040174e call le_receive_slave 
+1646 242c1660 nbranch le_slave_unsync ,sync 
+1647 2040167e call le_got_first_packet 
+1648 2036964b branch le_slave_match ,match 
+1649 c518164b bmark1 mark_ble_crc_fail ,le_slave_crc_fail 
+164a 2020165a branch le_slave_cont 
+
+le_slave_crc_fail:
+
+le_slave_match:
+164b 4750c034 bpatchx patch34_1 ,mem_patch34 
+164c 6fe0c3dd fetch 1 ,mem_le_md_count 
+164d 1fe0fe01 pincrease 1 
+164e 67e0c3dd store 1 ,mem_le_md_count 
+164f c006165a beq le_md_max_count ,le_slave_cont 
+1650 2040191b call le_acknowledge 
+1651 2040196a call le_prepare_tx 
+1652 6fe082bd fetch 1 ,mem_le_tx_phy 
+1653 2040168b call le_enable_phy_by_pdata 
+1654 20401836 call le_transmit_norx 
+1655 204019cd call le_parse 
+1656 6fe1446d fetch 2 ,mem_cb_ble_transmit 
+1657 20407e05 call callback_func 
+1658 20401663 call le_check_md 
+1659 20341668 branch le_slave_more_data ,user 
+
+le_slave_cont:
+165a 47514034 bpatchx patch34_2 ,mem_patch34 
+165b 2040207d call le_pairing_sm 
+165c 20402074 call le_check_paring_time 
+165d 20407887 call check_51cmd 
+165e 6fe082aa fetch 1 ,mem_le_op 
+165f c281966e bbit1 op_disconn ,le_slave_disconn 
+
+le_slave_unsync:
+1660 4751c034 bpatchx patch34_3 ,mem_patch34 
+1661 20401afa call le_lpm_set_mult 
+1662 20201061 branch calc_clke_offset 
+
+le_check_md:
+1663 78547c00 disable user 
+1664 c5157e54 bmark1 mark_ble_rx_md ,enable_user 
+1665 c514fe54 bmark1 mark_ble_tx_md ,enable_user 
+1666 c5187e54 bmark1 mark_ble_crc_fail ,enable_user 
+1667 20600000 rtn 
+
+le_slave_more_data:
+1668 47524034 bpatchx patch34_4 ,mem_patch34 
+1669 78377c00 enable attempt 
+166a 2040182c call le_transmit_receive_sifs_notx 
+166b 2036964b branch le_slave_match ,match 
+166c c518164b bmark1 mark_ble_crc_fail ,le_slave_crc_fail 
+166d 2020165a branch le_slave_cont 
+
+le_slave_disconn:
+
+le_disconnect:
+166e 4752c034 bpatchx patch34_5 ,mem_patch34 
+166f 20401675 call le_clear_connection_info 
+1670 204031d1 call app_disconn_reason_collect_ble 
+1671 2040167a call le_clear_pairing_state 
+1672 204020c5 call le_sc_state_clear 
+1673 70095b15 jam bt_evt_le_disconnected ,mem_fifo_temp 
+1674 20207871 branch ui_ipc_send_event 
+
+le_clear_connection_info:
+1675 d8a044e6 arg mem_used_map ,contw 
+1676 20407d1b call memset0_16 
+1677 70029d00 jam 0 ,mem_le_conn_handle 
+1678 70028800 jam lemode_idle ,mem_le_mode 
+1679 70028700 jam 0 ,mem_le_state 
+
+le_clear_pairing_state:
+167a 47534034 bpatchx patch34_6 ,mem_patch34 
+167b 70439c00 jam flag_le_enc_null ,mem_le_enc_state 
+167c 70439b00 jam flag_le_pairing_null ,mem_le_pairing_state 
+167d 20206ecc branch sp_clear_flags 
+
+le_got_first_packet:
+167e 4753c034 bpatchx patch34_7 ,mem_patch34 
+167f 6fe08005 fetch 1 ,mem_le_conn_rcv 
+1680 1fe0fe01 increase 1 ,pdata 
+1681 67e08005 store 1 ,mem_le_conn_rcv 
+1682 6fe08287 fetch 1 ,mem_le_state 
+1683 c3818000 rtnbit1 lestate_got_first_packet 
+1684 79207e03 set1 lestate_got_first_packet ,pdata 
+1685 67e08287 store 1 ,mem_le_state 
+1686 6fe14394 fetch 2 ,mem_le_init_superto 
+1687 67e102b5 store 2 ,mem_le_superto 
+1688 58000000 setarg 0 
+1689 67e243bc store 4 ,mem_le_transmit_window 
+168a 20600000 rtn 
+
+le_enable_phy_by_pdata:
+168b 1fe20400 copy pdata ,temp 
+168c 47544035 bpatchx patch35_0 ,mem_patch35 
+168d 18427e00 copy temp ,pdata 
+168e c28016a5 bbit1 bit_le_1m_phy ,le_enable 
+168f c2809694 bbit1 bit_le_2m_phy ,le_enable_2m 
+1690 c30116a5 bbit0 bit_le_coded_phy ,le_enable 
+1691 c28396a2 bbit1 bit_le_coded_phy_s8 ,le_enable_coded_s8 
+1692 c281169a bbit1 bit_le_coded_phy_s2 ,le_enable_coded_s2 
+1693 202016a5 branch le_enable 
+
+le_enable_2m:
+1694 204016a5 call le_enable 
+1695 7920002d set1 mark_ble_2m ,mark 
+1696 793f802f set0 mark_ble_lr ,mark 
+1697 70890103 jam 0x03 ,0x8901 
+1698 70892084 jam 0x84 ,0x8920 
+1699 20600000 rtn 
+
+le_enable_coded_s2:
+
+le_enable_coded:
+169a 204016a5 call le_enable 
+169b 7920002f set1 mark_ble_lr ,mark 
+169c 793f802e set0 mark_ble_lr_s8 ,mark 
+169d 70890105 jam 0x05 ,0x8901 
+169e 70892080 jam 0x80 ,0x8920 
+169f 70893020 jam 0x20 ,0x8930 
+16a0 7089340a jam 0x0a ,0x8934 
+16a1 20600000 rtn 
+
+le_enable_coded_s8:
+16a2 2040169a call le_enable_coded 
+16a3 7920002e set1 mark_ble_lr_s8 ,mark 
+16a4 20600000 rtn 
+
+le_enable:
+16a5 4754c035 bpatchx patch35_1 ,mem_patch35 
+16a6 783b7c00 enable le 
+16a7 793f802d set0 mark_ble_2m ,mark 
+16a8 793f802f set0 mark_ble_lr ,mark 
+16a9 70890101 jam 0x01 ,0x8901 
+16aa 70892080 jam 0x80 ,0x8920 
+16ab 708925a7 jam 0xa7 ,0x8925 
+16ac 70893003 jam 0x03 ,0x8930 
+16ad 70893358 jam 0x58 ,0x8933 
+16ae 7089340a jam 0x0a ,0x8934 
+16af 70893740 jam 0x40 ,0x8937 
+16b0 708a6d09 jam 9 ,core_rx_bq_cfg0 
+16b1 20600000 rtn 
+
+le_disable:
+16b2 47554035 bpatchx patch35_2 ,mem_patch35 
+16b3 785b7c00 disable le 
+16b4 793f8032 set0 mark_ble_encryption ,mark 
+16b5 70890100 jam 0x00 ,0x8901 
+16b6 70892080 jam 0x80 ,0x8920 
+16b7 708925a3 jam 0xa3 ,0x8925 
+16b8 70893003 jam 0x03 ,0x8930 
+16b9 70893368 jam 0x68 ,0x8933 
+16ba 70893409 jam 0x09 ,0x8934 
+16bb 70893728 jam 0x28 ,0x8937 
+16bc 708a6d09 jam 9 ,core_rx_bq_cfg0 
+16bd 20600000 rtn 
+
+le_prep:
+16be 7844fc00 disable enable_crc 
+16bf 7843fc00 disable enable_white 
+16c0 6fe182af fetch 3 ,mem_le_crcinit 
+16c1 98001e00 iforce crc24_init 
+16c2 6fe08016 fetch 1 ,mem_le_ch_mapped 
+16c3 1fed8400 reverse pdata ,temp 
+16c4 79200401 set1 1 ,temp 
+16c5 18431c00 rshift temp ,white_init 
+16c6 20600000 rtn 
+
+le_rx_setfreq:
+16c7 204016d0 call le_setfreq 
+
+le_rf_rx_enable:
+16c8 2040118f call set_freq_rx 
+16c9 6fe1015d fetch 2 ,mem_param_pll_setup 
+16ca 2040137d call sleep 
+16cb 202011a6 branch rf_rx_enable 
+
+le_tx_setfreq:
+16cc 2036920b branch txon ,match 
+16cd c518120b bmark1 mark_ble_crc_fail ,txon 
+
+le_tx_setfreq0:
+16ce 204016d0 call le_setfreq 
+16cf 20201205 branch set_freq_tx 
+
+le_setfreq:
+16d0 4755c035 bpatchx patch35_3 ,mem_patch35 
+16d1 20401161 call set_sync_on 
+16d2 6fe082df fetch 1 ,mem_le_testtype 
+16d3 243a16e3 nbranch le_ctf_test ,blank 
+16d4 6fe08016 fetch 1 ,mem_le_ch_mapped 
+16d5 1fe67c24 sub pdata ,36 ,null 
+16d6 202116dd branch le_ctf_normal ,positive 
+16d7 18000400 force 0 ,temp 
+16d8 c1128000 rtneq 37 
+16d9 18000418 force 24 ,temp 
+16da c1130000 rtneq 38 
+16db 1800044e force 78 ,temp 
+16dc 20600000 rtn 
+
+le_ctf_normal:
+16dd 1fe67c0a sub pdata ,10 ,null 
+16de 202116e0 branch le_ctf_low ,positive 
+16df 1fe0fe01 increase 1 ,pdata 
+
+le_ctf_low:
+16e0 1fe3fe00 lshift pdata ,pdata 
+16e1 1fe08402 add pdata ,2 ,temp 
+16e2 20600000 rtn 
+
+le_ctf_test:
+16e3 6fe08016 fetch 1 ,mem_le_ch_mapped 
+16e4 1fe38400 lshift pdata ,temp 
+16e5 20600000 rtn 
+
+le_sca_map:
+16e6 d84001f4 arg 500 ,temp 
+16e7 207a0000 rtn blank 
+16e8 d84000fa arg 250 ,temp 
+16e9 c1008000 rtneq 1 
+16ea d8400096 arg 150 ,temp 
+16eb c1010000 rtneq 2 
+16ec d8400064 arg 100 ,temp 
+16ed c1018000 rtneq 3 
+16ee d840004b arg 75 ,temp 
+16ef c1020000 rtneq 4 
+16f0 d8400032 arg 50 ,temp 
+16f1 c1028000 rtneq 5 
+16f2 d8400028 arg 40 ,temp 
+16f3 c1030000 rtneq 6 
+16f4 d8400014 arg 20 ,temp 
+16f5 20600000 rtn 
+
+le_setup:
+16f6 47564035 bpatchx patch35_4 ,mem_patch35 
+16f7 78287c00 enable swfine 
+16f8 6fe202ab fetch 4 ,mem_le_access 
+16f9 98001200 iforce access 
+16fa 204010b0 call calc_mod_value_scale_le 
+16fb 2040172c call le_map_channel 
+16fc 58000200 setarg 0x200 
+16fd 20349700 branch le_setup_master ,master 
+16fe 6fe10295 fetch 2 ,mem_le_receive_window 
+16ff 1fe37e00 rshift pdata ,pdata 
+
+le_setup_master:
+1700 6849015d fetcht 2 ,mem_param_pll_setup 
+1701 9840fe00 iadd temp ,pdata 
+1702 20401311 call ahead_window 
+1703 1b427e00 deposit clke 
+1704 20600000 rtn 
+
+le_context_nextevent:
+1705 4756c035 bpatchx patch35_5 ,mem_patch35 
+1706 20407cd0 call push_stack_rega_b_c 
+1707 67210987 storer loopcnt ,2 ,mem_loopcnt 
+1708 1a208c01 add rega ,coffset_mode ,contr 
+1709 efe08006 ifetch 1 ,contr 
+170a c4000000 rtnbit0 mode_le 
+170b 1a208a1a add rega ,coffset_le_event_cnt ,contw 
+170c efe10005 ifetch 2 ,contw 
+170d 1fe0fe01 increase 1 ,pdata 
+170e e7e10005 istore 2 ,contw 
+170f 20401898 call le_update_param 
+1710 204018bd call le_update_channel_map 
+1711 204018c6 call le_update_phy 
+1712 20401716 call le_context_nexthop 
+1713 20407cde call pop_stack_rega_b_c 
+1714 6f210987 fetchr loopcnt ,2 ,mem_loopcnt 
+1715 20600000 rtn 
+
+le_context_nexthop:
+1716 1a208c19 add rega ,coffset_le_hop ,contr 
+1717 efe08006 ifetch 1 ,contr 
+1718 1a208a18 add rega ,coffset_le_ch ,contw 
+1719 e8408005 ifetcht 1 ,contw 
+171a 9840fe00 iadd temp ,pdata 
+171b 1fe67c24 sub pdata ,36 ,null 
+171c 2021171e branch le_nexthop_nowrap ,positive 
+171d 1fe0ffdb increase -37 ,pdata 
+
+le_nexthop_nowrap:
+171e e7e08005 istore 1 ,contw 
+171f 20600000 rtn 
+
+le_calc_channel_map:
+1720 1a208c30 add rega ,coffset_le_channel_map ,contr 
+1721 efe28006 ifetch 5 ,contr 
+1722 18000400 force 0 ,temp 
+1723 18007225 force 37 ,loopcnt 
+
+le_count_channels_loop:
+1724 c3001726 bbit0 0 ,le_count_channels_notused 
+1725 18408401 increase 1 ,temp 
+
+le_count_channels_notused:
+1726 1fe37e00 rshift pdata ,pdata 
+1727 c2001724 loop le_count_channels_loop 
+1728 1840ffff add temp ,-1 ,pdata 
+1729 1a208a22 add rega ,coffset_le_channels ,contw 
+172a e7e08005 istore 1 ,contw 
+172b 20600000 rtn 
+
+le_map_channel:
+172c 47574035 bpatchx patch35_6 ,mem_patch35 
+172d 6fe0829f fetch 1 ,mem_le_ch 
+172e 98000e00 iforce queue 
+172f 684a82b7 fetcht 5 ,mem_le_channel_map 
+1730 a84fffff qisolate1 temp 
+1731 20209741 branch le_map_channel_end ,true 
+
+le_map_channel_next:
+1732 6fe082a9 fetch 1 ,mem_le_channels 
+1733 98e67e00 isub queue ,pdata 
+1734 20211737 branch le_map_channel_cont ,positive 
+1735 1fe60fff sub pdata ,-1 ,queue 
+1736 20201732 branch le_map_channel_next 
+
+le_map_channel_cont:
+1737 18e27200 copy queue ,loopcnt 
+1738 18000e00 force 0 ,queue 
+
+le_map_channel_loop:
+1739 a84fffff qisolate1 temp 
+173a 2020973c branch le_map_channel_skip ,true 
+173b 1f20f201 increase 1 ,loopcnt 
+
+le_map_channel_skip:
+173c 1f227e00 deposit loopcnt 
+173d 203a1741 branch le_map_channel_end ,blank 
+173e 18e08e01 increase 1 ,queue 
+173f 1f20f3ff increase -1 ,loopcnt 
+1740 20201739 branch le_map_channel_loop 
+
+le_map_channel_end:
+1741 18e27e00 deposit queue 
+1742 67e08016 store 1 ,mem_le_ch_mapped 
+1743 20600000 rtn 
+
+le_wait_tx:
+1744 20349747 branch le_wait_master ,master 
+1745 37c18200 until null ,timeout 
+1746 20600000 rtn 
+
+le_wait_master:
+1747 d9600ea0 arg 0xea0 ,timeup 
+1748 34730200 until clkn_rt ,meet 
+1749 20600000 rtn 
+
+le_receive_adv:
+174a 78487c00 disable swfine 
+174b 6fe143e5 fetch 2 ,mem_le_scan_window 
+174c 1fe21600 copy pdata ,timeup 
+174d 20201754 branch le_receive_packet 
+
+le_receive_slave:
+174e 4757c035 bpatchx patch35_7 ,mem_patch35 
+174f 204017b8 call le_dec_init 
+1750 78287c00 enable swfine 
+1751 6fe10295 fetch 2 ,mem_le_receive_window 
+1752 684a43bc fetcht 4 ,mem_le_transmit_window 
+1753 98409600 iadd temp ,timeup 
+
+le_receive_packet:
+1754 204016c7 call le_rx_setfreq 
+
+le_receive_rxon:
+1755 47584036 bpatchx patch36_0 ,mem_patch36 
+1756 204016be call le_prep 
+1757 c597975c bmark0 mark_ble_lr ,le_receive_nolr 
+1758 783cfc00 pulse dewhiten_code_calc 
+1759 2000001e nop 30 
+175a 204016be call le_prep 
+175b 19699600 lshift3 timeup ,timeup 
+
+le_receive_nolr:
+175c 7856fc00 disable match 
+175d 7826fc00 enable decode_fec0 
+175e 7830fc00 enable is_rx 
+175f 78507c00 disable is_tx 
+1760 19623600 copy timeup ,stop_watch 
+1761 37c18400 correlate null ,timeout 
+1762 20371765 branch le_receive_on_attempt ,attempt 
+1763 1b420400 copy clke ,temp 
+1764 604b0098 storet 6 ,mem_sync_clke 
+
+le_receive_on_attempt:
+1765 242c17f3 nbranch le_unsync_end ,sync 
+1766 4758c036 bpatchx patch36_1 ,mem_patch36 
+1767 78287c00 enable swfine 
+1768 db604eab arg param_t_ifs_150us + param_20ms_init + param_sync_time_difference ,stop_watch 
+1769 6fe0c1f0 fetch 1 ,mem_system_clk 
+176a 9b6fb600 imul32 stop_watch ,stop_watch 
+176b 20404caf call rf_debug_rx_sync_line 
+176c 20371772 branch le_receive_skip ,attempt 
+176d 204017f7 call calc_clke_all_modem 
+176e 6fe08287 fetch 1 ,mem_le_state 
+176f c3019772 bbit0 lestate_got_first_packet ,le_receive_skip 
+1770 684b0098 fetcht 6 ,mem_sync_clke 
+1771 20559473 call lpm_adjust_clk ,wake 
+
+le_receive_skip:
+1772 2040127d call save_rssi 
+1773 7823fc00 enable enable_white 
+1774 7824fc00 enable enable_crc 
+1775 09800008 parse demod ,bucket ,8 
+1776 19897e00 rshift3 pwindow ,pdata 
+1777 67e0816b store 1 ,mem_le_rxbuf_data_header 
+1778 09800008 parse demod ,bucket ,8 
+1779 19897e00 rshift3 pwindow ,pdata 
+177a 67e0816c store 1 ,mem_le_rxbuf_data_length 
+177b 1fe27200 copy pdata ,loopcnt 
+177c 20229797 branch le_rx_nopayload ,zero 
+177d c5191783 bmark1 mark_ble_encryption ,le_rx_dec 
+
+le_rx_loop:
+177e 09800008 parse demod ,bucket ,8 
+177f 19897e00 rshift3 pwindow ,pdata 
+1780 e7e08005 istore 1 ,contw 
+1781 c200177e loop le_rx_loop 
+1782 20201797 branch le_rx_nopayload 
+
+le_rx_dec:
+1783 18a22400 copy contw ,regb 
+1784 20401914 call le_check_retransmit 
+1785 6a20816c fetchr rega ,1 ,mem_le_rxbuf_data_length 
+1786 1a20a3fc increase -4 ,rega 
+1787 242117eb nbranch le_mic_error ,positive 
+1788 204017bd call le_dec_start 
+1789 1a420a00 copy regb ,contw 
+178a d8400000 arg 0 ,temp 
+178b 6f20816c fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+178c 1f20f3fc increase -4 ,loopcnt 
+178d 20229795 branch le_rx_dec_loop_end ,zero 
+
+le_rx_dec_loop:
+178e 09800008 parse demod ,bucket ,8 
+178f 19897e00 rshift3 pwindow ,pdata 
+1790 e7e08005 istore 1 ,contw 
+1791 18408401 increase 1 ,temp 
+1792 18417c0f and temp ,0xf ,null 
+1793 204297da call le_dec ,zero 
+1794 c200178e loop le_rx_dec_loop 
+
+le_rx_dec_loop_end:
+1795 204017e2 call le_dec_end 
+1796 1a420a00 copy regb ,contw 
+
+le_rx_nopayload:
+1797 47594036 bpatchx patch36_2 ,mem_patch36 
+1798 09800018 parse demod ,bucket ,24 
+1799 1fef7e00 rshift32 pdata ,pdata 
+179a 1ff17e00 rshift16 pdata ,pdata 
+179b e7e18005 istore 3 ,contw 
+179c 78287c00 enable swfine 
+179d 20401805 call le_set_until_tx_timer 
+179e 202317ef branch le_crc_fail ,crc_failed 
+179f c59917a9 bmark0 mark_ble_encryption ,le_rx_match 
+17a0 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+17a1 203a17a9 branch le_rx_match ,blank 
+17a2 1fe0fffc increase -4 ,pdata 
+17a3 67e0816c store 1 ,mem_le_rxbuf_data_length 
+17a4 20406d53 call wait_ccm_done 
+17a5 6ff08108 fetch 1 ,core_misc_status 
+17a6 c30397eb bbit0 7 ,le_mic_error 
+17a7 1800700c force regidx_result ,regext_index 
+17a8 65e20273 storer regext ,4 ,mem_le_peer_mic 
+
+le_rx_match:
+17a9 20404cae call rf_debug_rx_crc_line 
+17aa 7836fc00 enable match 
+17ab 793f8030 set0 mark_ble_crc_fail ,mark 
+
+le_crc_fail_tx:
+17ac 20406d55 call ccm_ctrl_clr 
+17ad 6fe082bc fetch 1 ,mem_le_rx_phy 
+17ae 7d3e7e07 nsetflag ble_coded_info ,bit_le_coded_phy_s8 ,pdata 
+17af 67e082bc store 1 ,mem_le_rx_phy 
+
+le_match_set_txfreq:
+17b0 4759c036 bpatchx patch36_3 ,mem_patch36 
+17b1 68488017 fetcht 1 ,mem_last_freq 
+17b2 1840a202 add temp ,2 ,rega 
+17b3 c51697b5 bmark1 mark_ble_2m ,le_match_set_txfreq_offset 
+17b4 1840a202 add temp ,2 ,rega 
+
+le_match_set_txfreq_offset:
+17b5 7846fc00 disable decode_fec0 
+17b6 20401161 call set_sync_on 
+17b7 202011ca branch rf_tx_write_freq 
+
+le_dec_init:
+17b8 c6990000 rtnmark0 mark_ble_encryption 
+17b9 20406dc7 call load_sk 
+17ba 1800700c force regidx_result ,regext_index 
+17bb 20406dcc call aes_clear 
+17bc 20206dcb branch aes_clear_data 
+
+le_dec_start:
+17bd 7080d500 jam 0 ,core_ccm_aad0 
+17be 7080d601 jam 1 ,core_ccm_aad1 
+17bf 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+17c0 1fe17e03 and_into 0x3 ,pdata 
+17c1 67f080d7 store 1 ,core_ccm_aad2 
+17c2 5800016d setarg mem_le_rxbuf_data_payload 
+17c3 67f100d1 store 2 ,core_ccm_input_playload_addr 
+17c4 67f100d3 store 2 ,core_ccm_output_playload_addr 
+17c5 6a20816c fetchr rega ,1 ,mem_le_rxbuf_data_length 
+17c6 1a20a3fc increase -4 ,rega 
+17c7 684ac6a1 fetcht 5 ,mem_ccm_pcnt_rx 
+17c8 280ffe0f isolate1 mark_old_packet ,mark 
+17c9 204097d0 call le_pcnt_rx_sub1 ,true 
+17ca 20406c61 call ccm_b0 
+17cb 58000000 setarg 0 
+17cc 67f100da store 2 ,core_ccm_inptr 
+17cd 70800a06 jam 6 ,core_ccm_ctrl 
+17ce 70800a07 jam 7 ,core_ccm_ctrl 
+17cf 20600000 rtn 
+
+le_pcnt_rx_sub1:
+17d0 18467c00 sub temp ,0 ,null 
+17d1 202297d5 branch le_pcnt_rx_sub1_0 ,zero 
+17d2 184085ff increase -1 ,temp 
+17d3 79200427 set1 le_ccm_directionbit ,temp 
+17d4 20600000 rtn 
+
+le_pcnt_rx_sub1_0:
+17d5 58ffffff setarg 0xffffff 
+17d6 1ff07e00 lshift16 pdata ,pdata 
+17d7 d840ffff arg 0xffff ,temp 
+17d8 98418400 ior temp ,temp 
+17d9 20600000 rtn 
+
+le_dec:
+17da 18a22400 copy contw ,regb 
+17db 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+17dc 1fe0fffc increase -4 ,pdata 
+17dd 98467c00 isub temp ,null 
+17de 20628000 rtn zero 
+17df 605900da storet 2 ,core_ccm_inptr 
+17e0 1a420a00 copy regb ,contw 
+17e1 20600000 rtn 
+
+le_dec_end:
+17e2 09800020 parse demod ,bucket ,32 
+17e3 1fef7e00 rshift32 pdata ,pdata 
+17e4 1fecfe00 rshift8 pdata ,pdata 
+17e5 e7e20005 istore 4 ,contw 
+17e6 18a22400 copy contw ,regb 
+17e7 18007000 force regidx_data ,regext_index 
+17e8 1fe25e00 copy pdata ,regext 
+17e9 605900da storet 2 ,core_ccm_inptr 
+17ea 20600000 rtn 
+
+le_mic_error:
+17eb 202017f5 branch le_end_of_packet 
+
+le_retransmit_end_of_packet:
+17ec 20401805 call le_set_until_tx_timer 
+17ed 20400e80 call end_of_packet 
+17ee 202017a9 branch le_rx_match 
+
+le_crc_fail:
+17ef 20404cb0 call rf_debug_rx_crc_fail_line 
+17f0 c51817f3 bmark1 mark_ble_crc_fail ,le_crc_fail_consecutive 
+17f1 79200030 set1 mark_ble_crc_fail ,mark 
+17f2 202017ac branch le_crc_fail_tx 
+
+le_unsync_end:
+
+le_crc_fail_consecutive:
+17f3 793f8030 set0 mark_ble_crc_fail ,mark 
+17f4 202017f5 branch le_end_of_packet 
+
+le_end_of_packet:
+17f5 20406d55 call ccm_ctrl_clr 
+17f6 20200e80 branch end_of_packet 
+
+calc_clke_all_modem:
+17f7 c51797fd bmark1 mark_ble_lr ,calc_clke_modem_coded 
+17f8 c5169801 bmark1 mark_ble_2m ,calc_clke_modem_2m 
+17f9 6fe10165 fetch 2 ,mem_param_clke_cal_le_1m 
+17fa 1fe25200 copy pdata ,clke_rt 
+17fb 1c225000 copy bt_clk ,clke_bt 
+17fc 20600000 rtn 
+
+calc_clke_modem_coded:
+17fd 6fe10169 fetch 2 ,mem_param_clke_cal_le_coded 
+17fe 1fe25200 copy pdata ,clke_rt 
+17ff 1c20d001 add bt_clk ,1 ,clke_bt 
+1800 20600000 rtn 
+
+calc_clke_modem_2m:
+1801 6fe10167 fetch 2 ,mem_param_clke_cal_le_2m 
+1802 1fe25200 copy pdata ,clke_rt 
+1803 1c225000 copy bt_clk ,clke_bt 
+1804 20600000 rtn 
+
+le_set_until_tx_timer:
+1805 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+1806 1fe08405 add pdata ,5 ,temp 
+1807 18498400 lshift3 temp ,temp 
+1808 6fe082bc fetch 1 ,mem_le_rx_phy 
+1809 c517980c bmark1 mark_ble_lr ,le_set_until_tx_timer_rx_lr 
+180a c280180e bbit1 bit_le_1m_phy ,le_set_until_tx_timer_rx_1m 
+180b c280980f bbit1 bit_le_2m_phy ,le_set_until_tx_timer_rx_2m 
+
+le_set_until_tx_timer_rx_lr:
+180c 203e1811 branch le_set_until_tx_timer_rx_coded_s2 ,ble_coded_info 
+180d 20201814 branch le_set_until_tx_timer_rx_coded_s8 
+
+le_set_until_tx_timer_rx_1m:
+180e 20201819 branch le_calc_stop_watch 
+
+le_set_until_tx_timer_rx_2m:
+180f 18430400 rshift temp ,temp 
+1810 20201819 branch le_calc_stop_watch 
+
+le_set_until_tx_timer_rx_coded_s2:
+1811 18408403 add temp ,3 ,temp 
+1812 18438400 lshift temp ,temp 
+1813 20201816 branch le_set_until_tx_timer_rx_coded 
+
+le_set_until_tx_timer_rx_coded_s8:
+1814 18408403 add temp ,3 ,temp 
+1815 18498400 lshift3 temp ,temp 
+
+le_set_until_tx_timer_rx_coded:
+1816 58000028 setarg param_coded_c1_term1_time_40us 
+1817 98408400 iadd temp ,temp 
+1818 20201819 branch le_calc_stop_watch 
+
+le_calc_stop_watch:
+1819 6fe0c1f0 fetch 1 ,mem_system_clk 
+181a 984f8400 imul32 temp ,temp 
+181b da204e20 arg param_20ms_init ,rega 
+181c 9a2ffe00 imul32 rega ,pdata 
+181d 98460400 isub temp ,temp 
+181e 1b627e00 copy stop_watch ,pdata 
+181f 98463600 isub temp ,stop_watch 
+1820 20600000 rtn 
+
+le_transmit_receive_sifs_without_change_mode:
+1821 20401838 call le_transmit 
+1822 68488017 fetcht 1 ,mem_last_freq 
+1823 2040118f call set_freq_rx 
+1824 204011a6 call rf_rx_enable 
+1825 78287c00 enable swfine 
+1826 d960157c arg 5500 ,timeup 
+1827 20201755 branch le_receive_rxon 
+
+le_transmit_receive_sifs:
+1828 475a4036 bpatchx patch36_4 ,mem_patch36 
+1829 6fe082bd fetch 1 ,mem_le_tx_phy 
+182a 2040168b call le_enable_phy_by_pdata 
+182b 20401838 call le_transmit 
+
+le_transmit_receive_sifs_notx:
+182c 6fe082bc fetch 1 ,mem_le_rx_phy 
+182d 2040168b call le_enable_phy_by_pdata 
+182e 68488017 fetcht 1 ,mem_last_freq 
+182f 2040118f call set_freq_rx 
+1830 204011a6 call rf_rx_enable 
+1831 78287c00 enable swfine 
+1832 d960157c arg 5500 ,timeup 
+1833 c5979755 bmark0 mark_ble_lr ,le_receive_rxon 
+1834 d9602134 arg 8500 ,timeup 
+1835 20201755 branch le_receive_rxon 
+
+le_transmit_norx:
+1836 20401838 call le_transmit 
+1837 20200e80 branch end_of_packet 
+
+le_transmit:
+1838 475ac036 bpatchx patch36_5 ,mem_patch36 
+1839 204016be call le_prep 
+183a 204016cc call le_tx_setfreq 
+183b 20404cb5 call rf_debug_tx_on_line 
+183c 79202a00 set1 txgfsk ,radio_ctrl 
+183d 782efc00 enable encode_fec0 
+183e 78307c00 enable is_tx 
+183f 7850fc00 disable is_rx 
+1840 20401744 call le_wait_tx 
+1841 785d7c00 disable lr_s2en 
+1842 c517987a bmark1 mark_ble_lr ,le_transmit_lr 
+1843 c516988c bmark1 mark_ble_2m ,le_transmit_2m 
+1844 19317e00 rshift16 access ,pdata 
+1845 1fecfe00 rshift8 pdata ,pdata 
+1846 1ff1fe00 rshift4 pdata ,pdata 
+1847 08008628 inject mod ,40 
+
+le_transmit_packet:
+1848 7823fc00 enable enable_white 
+1849 7824fc00 enable enable_crc 
+184a 475b4036 bpatchx patch36_6 ,mem_patch36 
+184b 6fe0c1f5 fetch 1 ,mem_le_txheader 
+184c 08008608 inject mod ,8 
+184d efe08006 ifetch 1 ,contr 
+184e 1fe27200 copy pdata ,loopcnt 
+184f 08008608 inject mod ,8 
+1850 1f267c00 sub loopcnt ,0 ,null 
+1851 20229859 branch le_tr_nopayload ,zero 
+1852 6ff0800a fetch 1 ,core_ccm_ctrl 
+1853 203a1855 branch le_transmit_packet_not_enc ,blank 
+1854 c519186f bmark1 mark_ble_encryption ,le_transmit_packet_enc 
+
+le_transmit_packet_not_enc:
+1855 d8c041f7 arg mem_le_txpayload ,contr 
+
+le_tr_loop:
+1856 efe08006 ifetch 1 ,contr 
+1857 08008608 inject mod ,8 
+1858 c2001856 loop le_tr_loop 
+
+le_tr_nopayload:
+1859 78247c00 enable enable_parity 
+185a 08008618 inject mod ,24 
+185b 78447c00 disable enable_parity 
+185c c5979860 bmark0 mark_ble_lr ,le_transmit_skip 
+185d 7843fc00 disable enable_white 
+185e 58000000 setarg 0 
+185f 08008603 inject mod ,3 
+
+le_transmit_skip:
+1860 37d38200 until null ,tx_clear 
+1861 20000064 nop 100 
+1862 784efc00 disable encode_fec0 
+1863 785c7c00 disable encode_fec3 
+1864 20401161 call set_sync_on 
+1865 20404cb3 call rf_debug_tx_off_line 
+
+le_check_start_pause_enc:
+1866 6fe0c1f5 fetch 1 ,mem_le_txheader 
+1867 1fe17e03 and pdata ,llid_le_ll ,pdata 
+1868 c1818000 rtnne llid_le_ll 
+1869 6fe0c39c fetch 1 ,mem_le_enc_state 
+186a c0011955 beq flag_le_enc_pause ,le_clear_enc 
+186b c1828000 rtnne flag_le_send_start_enc_req 
+186c 6fe0c1f7 fetch 1 ,mem_le_txpayload 
+186d c0029950 beq ll_start_enc_req ,le_set_enc 
+186e 20600000 rtn 
+
+le_transmit_packet_enc:
+186f 1f20f3fc increase -4 ,loopcnt 
+1870 1f220400 copy loopcnt ,temp 
+1871 20406d40 call ccm_wait_enc 
+1872 d8c041f7 arg mem_le_txpayload ,contr 
+
+le_transmit_packet_enc_loop:
+1873 efe08006 ifetch 1 ,contr 
+1874 08008608 inject mod ,8 
+1875 c2001873 loop le_transmit_packet_enc_loop 
+1876 20406d45 call ccm_check_enc_done 
+1877 1de27e00 copy regext ,pdata 
+1878 08008620 inject mod ,32 
+1879 20201859 branch le_tr_nopayload 
+
+le_transmit_lr:
+187a df20000a arg 10 ,loopcnt 
+
+le_transmit_lr_preamble_loop:
+187b 5800003c setarg 0x3c 
+187c 08008608 inject mod ,8 
+187d c200187b loop le_transmit_lr_preamble_loop 
+187e 784efc00 disable encode_fec0 
+187f 783c7c00 enable encode_fec3 
+1880 19317e00 rshift16 access ,pdata 
+1881 1ff17e00 rshift16 pdata ,pdata 
+1882 1ff1fe00 rshift4 pdata ,pdata 
+1883 08008620 inject mod ,32 
+1884 c5171889 bmark1 mark_ble_lr_s8 ,le_transmit_lr_s8 
+
+le_transmit_lr_s2:
+1885 58000001 setarg 1 
+1886 08008605 inject mod ,5 
+1887 783d7c00 enable lr_s2en 
+1888 20201848 branch le_transmit_packet 
+
+le_transmit_lr_s8:
+1889 58000000 setarg 0 
+188a 08008605 inject mod ,5 
+188b 20201848 branch le_transmit_packet 
+
+le_transmit_2m:
+188c 6fe0c1f0 fetch 1 ,mem_system_clk 
+188d 1fe37200 rshift pdata ,loopcnt 
+
+le_transmit_2m_dealy:
+188e 20000002 nop 2 
+188f c200188e loop le_transmit_2m_dealy 
+1890 19317e00 rshift16 access ,pdata 
+1891 1fecfe00 rshift8 pdata ,pdata 
+1892 1ff18400 rshift4 pdata ,temp 
+1893 18427e00 copy temp ,pdata 
+1894 08008608 inject mod ,8 
+1895 18427e00 copy temp ,pdata 
+1896 08008628 inject mod ,40 
+1897 20201848 branch le_transmit_packet 
+
+le_update_param:
+1898 da60189c arg le_update_param_ahead1_cb ,regc 
+1899 da4018b0 arg le_update_param_cb ,regb 
+189a d8e00005 arg lestate_update_param ,queue 
+189b 202018f4 branch le_check_update_flag 
+
+le_update_param_ahead1_cb:
+189c 1a208c04 add rega ,coffset_sniff_anchor ,contr 
+189d e8420006 ifetcht 4 ,contr 
+189e 1a208c37 add rega ,coffest_le_new_transmitwindowsize ,contr 
+189f efe08006 ifetch 1 ,contr 
+18a0 1a208a2b add rega ,coffset_le_window_size ,contw 
+18a1 e7e08005 istore 1 ,contw 
+18a2 efe10006 ifetch 2 ,contr 
+18a3 1febfe00 lshift2 pdata ,pdata 
+18a4 98409600 iadd temp ,timeup 
+18a5 1a208a04 add rega ,coffset_sniff_anchor ,contw 
+18a6 19627e00 deposit timeup 
+18a7 e7e20005 istore 4 ,contw 
+18a8 efe10006 ifetch 2 ,contr 
+18a9 1febfe00 lshift2 pdata ,pdata 
+18aa 1a208a02 add rega ,coffset_tsniff ,contw 
+18ab e7e10005 istore 2 ,contw 
+18ac efe20006 ifetch 4 ,contr 
+18ad 1a208a2c add rega ,coffset_le_slave_latency ,contw 
+18ae e7e20005 istore 4 ,contw 
+18af 20201a33 branch le_receive_window_size 
+
+le_update_param_cb:
+18b0 efe08011 ifetch 1 ,rega 
+18b1 793ffe03 set0 lestate_got_first_packet ,pdata 
+18b2 e7e08011 istore 1 ,rega 
+18b3 6fe102b5 fetch 2 ,mem_le_superto 
+18b4 67e14394 store 2 ,mem_le_init_superto 
+18b5 62210970 storer rega ,2 ,mem_rega 
+18b6 70095b44 jam bt_evt_le_parse_conn_param_accepted ,mem_fifo_temp 
+18b7 20407871 call ui_ipc_send_event 
+18b8 6a210970 fetchr rega ,2 ,mem_rega 
+18b9 1a208c2e add rega ,coffset_le_slave_superto ,contr 
+18ba efe10006 ifetch 2 ,contr 
+18bb 67e14394 store 2 ,mem_le_init_superto 
+18bc 20600000 rtn 
+
+le_update_channel_map:
+18bd da600000 arg 0 ,regc 
+18be da4018c1 arg le_update_channel_map_cb ,regb 
+18bf d8e00006 arg lestate_update_map ,queue 
+18c0 202018f4 branch le_check_update_flag 
+
+le_update_channel_map_cb:
+18c1 1a208c37 add rega ,coffset_le_new_map ,contr 
+18c2 efe28006 ifetch 5 ,contr 
+18c3 1a208a30 add rega ,coffset_le_channel_map ,contw 
+18c4 e7e28005 istore 5 ,contw 
+18c5 20201720 branch le_calc_channel_map 
+
+le_update_phy:
+18c6 da600000 arg 0 ,regc 
+18c7 da4018ca arg le_update_phy_cb ,regb 
+18c8 d8e00007 arg lestate_update_phy ,queue 
+18c9 202018f4 branch le_check_update_flag 
+
+le_update_phy_cb:
+18ca 1a208c37 add rega ,coffset_le_new_m2s_phy ,contr 
+18cb efe08006 ifetch 1 ,contr 
+18cc 204018d7 call le_update_phy_cb_m2s 
+18cd e7e08005 istore 1 ,contw 
+18ce 1a208c38 add rega ,coffset_le_new_s2m_phy ,contr 
+18cf efe08006 ifetch 1 ,contr 
+18d0 204018e5 call le_update_phy_cb_s2m 
+18d1 e7e08005 istore 1 ,contw 
+18d2 62210970 storer rega ,2 ,mem_rega 
+18d3 70095b42 jam bt_evt_le_update_phy ,mem_fifo_temp 
+18d4 20407871 call ui_ipc_send_event 
+18d5 6a210970 fetchr rega ,2 ,mem_rega 
+18d6 20600000 rtn 
+
+le_update_phy_cb_m2s:
+18d7 205a18df call le_update_phy_cb_m2s_no_change ,blank 
+18d8 1a208a35 add rega ,coffset_le_rx_phy ,contw 
+18d9 24748000 nrtn master 
+18da 6848c442 fetcht 1 ,mem_le_tx_phys 
+18db 284ffe07 isolate1 bit_le_coded_phy_s8 ,temp 
+18dc 7920fe07 setflag true ,bit_le_coded_phy_s8 ,pdata 
+18dd 1a208a36 add rega ,coffset_le_tx_phy ,contw 
+18de 20600000 rtn 
+
+le_update_phy_cb_m2s_no_change:
+18df 1a208c35 add rega ,coffset_le_rx_phy ,contr 
+18e0 efe08006 ifetch 1 ,contr 
+18e1 24748000 nrtn master 
+18e2 1a208c36 add rega ,coffset_le_tx_phy ,contr 
+18e3 efe08006 ifetch 1 ,contr 
+18e4 20600000 rtn 
+
+le_update_phy_cb_s2m:
+18e5 205a18ee call le_update_phy_cb_s2m_no_change ,blank 
+18e6 6848c442 fetcht 1 ,mem_le_tx_phys 
+18e7 284ffe07 isolate1 bit_le_coded_phy_s8 ,temp 
+18e8 7920fe07 setflag true ,bit_le_coded_phy_s8 ,pdata 
+18e9 1a208a36 add rega ,coffset_le_tx_phy ,contw 
+18ea 24748000 nrtn master 
+18eb 793ffe07 set0 bit_le_coded_phy_s8 ,pdata 
+18ec 1a208a35 add rega ,coffset_le_rx_phy ,contw 
+18ed 20600000 rtn 
+
+le_update_phy_cb_s2m_no_change:
+18ee 1a208c36 add rega ,coffset_le_tx_phy ,contr 
+18ef efe08006 ifetch 1 ,contr 
+18f0 24748000 nrtn master 
+18f1 1a208c35 add rega ,coffset_le_rx_phy ,contr 
+18f2 efe08006 ifetch 1 ,contr 
+18f3 20600000 rtn 
+
+le_check_update_flag:
+18f4 efe08011 ifetch 1 ,rega 
+18f5 afec0000 qisolate0 pdata 
+18f6 20608000 rtn true 
+18f7 1a208c1a add rega ,coffset_le_event_cnt ,contr 
+18f8 e8410006 ifetcht 2 ,contr 
+18f9 1a208c20 add rega ,coffset_le_instant ,contr 
+18fa efe10006 ifetch 2 ,contr 
+18fb 98467e00 isub temp ,pdata 
+18fc 20229903 branch le_update ,zero 
+18fd 24211908 nbranch le_check_update_small ,positive 
+18fe 1fe67c01 sub pdata ,1 ,null 
+18ff 20229901 branch le_update_ahead1 ,zero 
+1900 20600000 rtn 
+
+le_update_ahead1:
+1901 1a627e00 copy regc ,pdata 
+1902 20207e05 branch callback_func 
+
+le_update:
+1903 efe08011 ifetch 1 ,rega 
+1904 f93ffe00 qset0 pdata 
+1905 e7e08011 istore 1 ,rega 
+1906 1a427e00 copy regb ,pdata 
+1907 20207e05 branch callback_func 
+
+le_check_update_small:
+1908 1a208c1a add rega ,coffset_le_event_cnt ,contr 
+1909 efe10006 ifetch 2 ,contr 
+190a 1a208c20 add rega ,coffset_le_instant ,contr 
+190b efe10006 ifetch 2 ,contr 
+190c 98467e00 isub temp ,pdata 
+190d d840ffff arg 0xffff ,temp 
+190e 98467c00 isub temp ,null 
+190f 20229903 branch le_update ,zero 
+1910 d840f000 arg 0xf000 ,temp 
+1911 98467c00 isub temp ,null 
+1912 24211903 nbranch le_update ,positive 
+1913 20600000 rtn 
+
+le_check_retransmit:
+1914 6848829e fetcht 1 ,mem_le_arq 
+1915 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+1916 1fe37e00 rshift pdata ,pdata 
+1917 9842fe00 ixor temp ,pdata 
+1918 2feffe02 isolate1 nesn ,pdata 
+1919 7920800f setflag true ,mark_old_packet ,mark 
+191a 20600000 rtn 
+
+le_acknowledge:
+191b 475bc036 bpatchx patch36_7 ,mem_patch36 
+191c 20401a30 call le_supervision_flush 
+191d c6180000 rtnmark1 mark_ble_crc_fail 
+191e 20401942 call le_check_wak 
+191f 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+1920 2feffe04 isolate1 md ,pdata 
+1921 7920802a setflag true ,mark_ble_rx_md ,mark 
+1922 1fe37e00 rshift pdata ,pdata 
+1923 9842fe00 ixor temp ,pdata 
+1924 2feffe02 isolate1 nesn ,pdata 
+1925 7920800f setflag true ,mark_old_packet ,mark 
+1926 c6078000 rtnmark1 mark_old_packet 
+1927 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+1928 203a1934 branch le_ack_unenc ,blank 
+1929 6fe08287 fetch 1 ,mem_le_state 
+192a c3021934 bbit0 lestate_encryption ,le_ack_unenc 
+192b 684a0273 fetcht 4 ,mem_le_peer_mic 
+192c 6fe246a6 fetch 4 ,mem_ccm_last_mic 
+192d 98467c00 isub temp ,null 
+192e 2022937a branch assert ,zero 
+192f 604a46a6 storet 4 ,mem_ccm_last_mic 
+1930 6fe2c6a1 fetch 5 ,mem_ccm_pcnt_rx 
+1931 1fe0fe01 increase 1 ,pdata 
+1932 79207e27 set1 le_ccm_directionbit ,pdata 
+1933 67e2c6a1 store 5 ,mem_ccm_pcnt_rx 
+
+le_ack_unenc:
+1934 6848829e fetcht 1 ,mem_le_arq 
+1935 79400402 setflip nesn ,temp 
+1936 6048829e storet 1 ,mem_le_arq 
+1937 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1938 c4030000 rtnbit0 bit_ble_deal_bb_packet 
+1939 475c4037 bpatchx patch37_0 ,mem_patch37 
+193a 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+193b 207a0000 rtn blank 
+193c 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+193d 2fe00601 compare llid_continue ,pdata ,3 
+193e 20209f2a branch le_parse_writing_attribute_continue ,true 
+193f 2fe00602 compare llid_start ,pdata ,3 
+1940 20209f18 branch le_parse_writing_attribute_start ,true 
+1941 20600000 rtn 
+
+le_check_wak:
+1942 475cc037 bpatchx patch37_1 ,mem_patch37 
+1943 6848829e fetcht 1 ,mem_le_arq 
+1944 284c0005 isolate0 wak ,temp 
+1945 20608000 rtn true 
+1946 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+1947 1fe3fe00 lshift pdata ,pdata 
+1948 9842fe00 ixor temp ,pdata 
+1949 c4018000 rtnbit0 sn 
+194a 793f8405 set0 wak ,temp 
+194b 79400403 setflip sn ,temp 
+194c 6048829e storet 1 ,mem_le_arq 
+194d 28400603 compare 3 ,temp ,3 
+194e 24608000 nrtn true 
+194f 20600000 rtn 
+
+le_set_enc:
+1950 6fe08287 fetch 1 ,mem_le_state 
+1951 79207e04 set1 lestate_encryption ,pdata 
+1952 67e08287 store 1 ,mem_le_state 
+1953 79200032 set1 mark_ble_encryption ,mark 
+1954 20600000 rtn 
+
+le_clear_enc:
+1955 475d4037 bpatchx patch37_2 ,mem_patch37 
+1956 70439c00 jam flag_le_enc_null ,mem_le_enc_state 
+1957 dfe00000 arg 0 ,pdata 
+1958 67e246a6 store 4 ,mem_ccm_last_mic 
+1959 67e2c69c store 5 ,mem_ccm_pcnt_tx 
+195a 79207e27 set1 le_ccm_directionbit ,pdata 
+195b 67e2c6a1 store 5 ,mem_ccm_pcnt_rx 
+195c 6fe08287 fetch 1 ,mem_le_state 
+195d 793ffe04 set0 lestate_encryption ,pdata 
+195e 67e08287 store 1 ,mem_le_state 
+195f 793f8032 set0 mark_ble_encryption ,mark 
+1960 20600000 rtn 
+
+le_scan_check_sender_addr_type:
+1961 da200001 arg 1 ,rega 
+1962 6fe0816b fetch 1 ,mem_le_rxbuf_adv_connect_ind_header 
+1963 c3830000 rtnbit1 le_sender_addr_bit 
+1964 da200000 arg 0 ,rega 
+1965 20600000 rtn 
+
+le_get_master_rx_max:
+1966 18c20a00 copy contr ,contw 
+1967 68494444 fetcht 2 ,mem_remote_rx_max_octets 
+1968 18a20c00 copy contw ,contr 
+1969 20600000 rtn 
+
+le_prepare_tx:
+196a 475dc037 bpatchx patch37_3 ,mem_patch37 
+196b 6fe0829e fetch 1 ,mem_le_arq 
+196c c3828000 rtnbit1 wak 
+196d 2040198b call le_check_tx_md 
+196e 20401b60 call le_fifo_get_first_tx_ptr 
+196f 203a19af branch le_send_empty ,blank 
+1970 efe10006 ifetch 2 ,contr 
+1971 e8410006 ifetcht 2 ,contr 
+1972 18422200 copy temp ,rega 
+1973 9a267e00 isub rega ,pdata 
+1974 20401966 call le_get_master_rx_max 
+1975 20407e4a call not_greater_than 
+1976 1fe20400 copy pdata ,temp 
+1977 e8208006 ifetchr type ,1 ,contr 
+1978 1a227e00 copy rega ,pdata 
+1979 98c0fe00 iadd contr ,pdata 
+197a 67e1097b store 2 ,mem_contr 
+197b 2040199f call le_update_tx_type 
+197c 204019b1 call le_send_packet 
+197d 20401b60 call le_fifo_get_first_tx_ptr 
+197e efe10006 ifetch 2 ,contr 
+197f 1fe22200 copy pdata ,rega 
+1980 18c22600 copy contr ,regc 
+1981 e8410006 ifetcht 2 ,contr 
+1982 18422400 copy temp ,regb 
+1983 9a467e00 isub regb ,pdata 
+1984 20401966 call le_get_master_rx_max 
+1985 20407e4a call not_greater_than 
+1986 9a40fe00 iadd regb ,pdata 
+1987 e7e10013 istore 2 ,regc 
+1988 9a267c00 isub rega ,null 
+1989 24628000 nrtn zero 
+198a 20201b79 branch le_fifo_release_first_node 
+
+le_check_tx_md:
+198b 20401992 call le_check_continue 
+198c c6148000 rtnmark1 mark_ble_tx_md 
+198d 6fe0c3c0 fetch 1 ,mem_le_configuration 
+198e c301199d bbit0 bit_ble_transmit_packet_by_md ,le_clear_md 
+198f 20401b63 call le_fifo_get_second_tx_ptr 
+1990 203a199d branch le_clear_md ,blank 
+1991 2020199b branch le_set_md 
+
+le_check_continue:
+1992 20401b60 call le_fifo_get_first_tx_ptr 
+1993 203a199d branch le_clear_md ,blank 
+1994 efe10006 ifetch 2 ,contr 
+1995 e8410006 ifetcht 2 ,contr 
+1996 98462200 isub temp ,rega 
+1997 20401966 call le_get_master_rx_max 
+1998 18427e00 copy temp ,pdata 
+1999 9a267c00 isub rega ,null 
+199a 2021199d branch le_clear_md ,positive 
+
+le_set_md:
+199b 79200029 set1 mark_ble_tx_md ,mark 
+199c 20600000 rtn 
+
+le_clear_md:
+199d 793f8029 set0 mark_ble_tx_md ,mark 
+199e 20600000 rtn 
+
+le_update_tx_type:
+199f 1a227e00 copy rega ,pdata 
+19a0 207a0000 rtn blank 
+19a1 d8200001 arg llid_continue ,type 
+19a2 20600000 rtn 
+
+le_att_check_notification_enable:
+19a3 475e4037 bpatchx patch37_4 ,mem_patch37 
+19a4 18408401 increase 1 ,temp 
+19a5 20401a62 call le_att_get_handle_ptr 
+19a6 18c08dfe increase -2 ,contr 
+19a7 efe10006 ifetch 2 ,contr 
+19a8 d8402902 arg client_charactertic_configuration ,temp 
+19a9 98467c00 isub temp ,null 
+19aa 24628000 nrtn zero 
+19ab 18c08c01 increase 1 ,contr 
+19ac 18c22200 copy contr ,rega 
+19ad efe08006 ifetch 1 ,contr 
+19ae 20600000 rtn 
+
+le_send_empty:
+19af 18000400 force 0 ,temp 
+19b0 18000201 force 1 ,type 
+
+le_send_packet:
+19b1 475ec037 bpatchx patch37_5 ,mem_patch37 
+19b2 6048c1f6 storet 1 ,mem_le_txlen 
+19b3 6848829e fetcht 1 ,mem_le_arq 
+19b4 79200405 set1 wak ,temp 
+19b5 18417efc and temp ,0xfc ,pdata 
+19b6 9821fe00 ior type ,pdata 
+19b7 67e0829e store 1 ,mem_le_arq 
+19b8 1fe17e1f and_into 0x1f ,pdata 
+19b9 280ffe29 isolate1 mark_ble_tx_md ,mark 
+19ba 7920fe04 setflag true ,md ,pdata 
+19bb 67e0c1f5 store 1 ,mem_le_txheader 
+19bc 6fe0c1f5 fetch 1 ,mem_le_txheader 
+19bd 28200601 compare 1 ,type ,3 
+19be 242099c1 nbranch le_send_no_txlen ,true 
+19bf 6fe0c1f6 fetch 1 ,mem_le_txlen 
+19c0 207a0000 rtn blank 
+
+le_send_no_txlen:
+19c1 c51919c7 bmark1 mark_ble_encryption ,le_send_packet_enc 
+19c2 6f20c1f6 fetchr loopcnt ,1 ,mem_le_txlen 
+19c3 6fe1097b fetch 2 ,mem_contr 
+19c4 1fe20c00 copy pdata ,contr 
+19c5 d8a041f7 arg mem_le_txpayload ,contw 
+19c6 20207d52 branch memcpy_fast 
+
+le_send_packet_enc:
+19c7 20406dc7 call load_sk 
+19c8 20206d27 branch le_encrypt_new_start 
+
+get_lpm_wake_ble_rx_lock:
+19c9 d8e00000 arg wake_lock_ble_rx ,queue 
+19ca 202015ba branch lpm_get_wake_lock 
+
+put_lpm_wake_ble_rx_lock:
+19cb d8e00000 arg wake_lock_ble_rx ,queue 
+19cc 202015be branch lpm_put_wake_lock 
+
+le_parse:
+19cd 475f4037 bpatchx patch37_6 ,mem_patch37 
+19ce c6078000 rtnmark1 mark_old_packet 
+19cf c6180000 rtnmark1 mark_ble_crc_fail 
+19d0 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+19d1 1fe17e03 and pdata ,0x3 ,pdata 
+19d2 67e0c3d3 store 1 ,mem_le_packet_llid 
+19d3 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+19d4 207a0000 rtn blank 
+19d5 5800016d setarg mem_le_rxbuf_data_payload 
+19d6 67e143d8 store 2 ,mem_le_payload_ptr 
+19d7 475fc037 bpatchx patch37_7 ,mem_patch37 
+19d8 6fe0c3d3 fetch 1 ,mem_le_packet_llid 
+19d9 c001a10b beq llid_le_ll ,le_parse_ll 
+
+le_parse_l2cap:
+19da 204019e7 call le_check_l2cap_complete 
+19db 243419c9 nbranch get_lpm_wake_ble_rx_lock ,user 
+19dc 204019cb call put_lpm_wake_ble_rx_lock 
+19dd 58000000 setarg 0 
+19de 67e143d6 store 2 ,mem_le_packet_len_recved 
+19df 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+19e0 1fe08c02 add pdata ,2 ,contr 
+19e1 47604038 bpatchx patch38_0 ,mem_patch38 
+19e2 efe10006 ifetch 2 ,contr 
+19e3 c0021cd1 beq le_l2cap_cid_att ,le_parse_att 
+19e4 c0031f8c beq le_l2cap_cid_smp ,le_parse_smp 
+19e5 c0029f4e beq le_l2cap_cid_signal ,le_parse_signaling 
+19e6 20600000 rtn 
+
+le_check_l2cap_complete:
+19e7 6fe0c3d3 fetch 1 ,mem_le_packet_llid 
+19e8 c00119f6 beq llid_start ,le_check_l2cap_llid_start 
+19e9 c0009a0d beq llid_continue ,le_check_l2cap_llid_continue 
+19ea 20600000 rtn 
+
+le_check_l2cap_cid_legal:
+19eb 20407e54 call enable_user 
+19ec d8400004 arg le_l2cap_cid_att ,temp 
+19ed 9fe67c00 isub pdata ,null 
+19ee 20628000 rtn zero 
+19ef d8400005 arg le_l2cap_cid_signal ,temp 
+19f0 9fe67c00 isub pdata ,null 
+19f1 20628000 rtn zero 
+19f2 d8400006 arg le_l2cap_cid_smp ,temp 
+19f3 9fe67c00 isub pdata ,null 
+19f4 20628000 rtn zero 
+19f5 20207e56 branch disable_user 
+
+le_check_l2cap_llid_start:
+19f6 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+19f7 1fe20c00 copy pdata ,contr 
+19f8 efe10006 ifetch 2 ,contr 
+19f9 67e143d4 store 2 ,mem_le_l2cap_size 
+19fa efe10006 ifetch 2 ,contr 
+19fb 204019eb call le_check_l2cap_cid_legal 
+19fc 24740000 nrtn user 
+19fd 6848816c fetcht 1 ,mem_le_rxbuf_data_length 
+19fe 604943d6 storet 2 ,mem_le_packet_len_recved 
+19ff 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1a00 1fe0fe04 increase 4 ,pdata 
+1a01 98467c00 isub temp ,null 
+1a02 2022fe54 branch enable_user ,zero 
+1a03 6f20816c fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+1a04 d8a01000 arg mem_le_l2cap_buf ,contw 
+1a05 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+1a06 1fe20c00 copy pdata ,contr 
+1a07 20407d52 call memcpy_fast 
+1a08 20207e56 branch disable_user 
+
+le_check_l2cap_continue_legal:
+1a09 20407e54 call enable_user 
+1a0a 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+1a0b 247a0000 nrtn blank 
+1a0c 20207e56 branch disable_user 
+
+le_check_l2cap_llid_continue:
+1a0d 20401a09 call le_check_l2cap_continue_legal 
+1a0e 24740000 nrtn user 
+1a0f 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+1a10 d8a01000 arg mem_le_l2cap_buf ,contw 
+1a11 98a0a200 iadd contw ,rega 
+1a12 6848816c fetcht 1 ,mem_le_rxbuf_data_length 
+1a13 9840fe00 iadd temp ,pdata 
+1a14 67e143d6 store 2 ,mem_le_packet_len_recved 
+1a15 6f20816c fetchr loopcnt ,1 ,mem_le_rxbuf_data_length 
+1a16 1a220a00 copy rega ,contw 
+1a17 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+1a18 1fe20c00 copy pdata ,contr 
+1a19 20407d52 call memcpy_fast 
+1a1a 58001000 setarg mem_le_l2cap_buf 
+1a1b 67e143d8 store 2 ,mem_le_payload_ptr 
+1a1c 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1a1d 1fe0fe04 increase 4 ,pdata 
+1a1e 684943d6 fetcht 2 ,mem_le_packet_len_recved 
+1a1f 98467c00 isub temp ,null 
+1a20 2022fe54 branch enable_user ,zero 
+1a21 20207e56 branch disable_user 
+
+le_get_search_att_uuid:
+1a22 20407ceb call store_contr 
+1a23 d8a04359 arg mem_le_search_uuid_length ,contw 
+1a24 20201f12 branch le_get_search_common 
+
+le_writeatt_cb:
+1a25 6fe1446b fetch 2 ,mem_cb_att_write 
+1a26 20207e05 branch callback_func 
+
+le_supervision_update:
+1a27 684a02a3 fetcht 4 ,mem_le_supervision_timer 
+1a28 20401369 call get_clkbt 
+1a29 98461600 isub temp ,timeup 
+1a2a 19627e00 deposit timeup 
+1a2b 684902b5 fetcht 2 ,mem_le_superto 
+1a2c 18520400 lshift4 temp ,temp 
+1a2d 18438400 lshift temp ,temp 
+1a2e 98467e00 isub temp ,pdata 
+1a2f 20600000 rtn 
+
+le_supervision_flush:
+1a30 20401369 call get_clkbt 
+1a31 67e202a3 store 4 ,mem_le_supervision_timer 
+1a32 20600000 rtn 
+
+le_receive_window_size:
+1a33 4760c038 bpatchx patch38_1 ,mem_patch38 
+1a34 1a208c50 add rega ,coffset_le_peer_sca ,contr 
+1a35 efe08006 ifetch 1 ,contr 
+1a36 204016e6 call le_sca_map 
+1a37 1a208c02 add rega ,coffset_tsniff ,contr 
+1a38 efe10006 ifetch 2 ,contr 
+1a39 984ffe00 imul32 temp ,pdata 
+1a3a 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+1a3b 984ffe00 imul32 temp ,pdata 
+1a3c d84f4240 arg 1000000 ,temp 
+1a3d 9846fc00 idiv temp 
+1a3e d8400682 arg param_windown_size ,temp 
+1a3f 6fe0c1f0 fetch 1 ,mem_system_clk 
+1a40 984f8400 imul32 temp ,temp 
+1a41 1a208c2b add rega ,coffset_le_window_size ,contr 
+1a42 efe08006 ifetch 1 ,contr 
+1a43 984ffe00 imul32 temp ,pdata 
+1a44 9840fe00 iadd temp ,pdata 
+1a45 67e243bc store 4 ,mem_le_transmit_window 
+1a46 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+1a47 20407def call wait_div_end 
+1a48 18078400 quotient temp 
+1a49 9840fe00 iadd temp ,pdata 
+1a4a 1a208a0e add rega ,coffset_rx_window ,contw 
+1a4b e7e10005 istore 2 ,contw 
+1a4c 20600000 rtn 
+
+le_init_attlist_search:
+1a4d 47614038 bpatchx patch38_2 ,mem_patch38 
+1a4e 6fe1099e fetch 2 ,mem_le_search_handle_start 
+1a4f 98002400 iforce regb 
+1a50 6fe109a0 fetch 2 ,mem_le_search_handle_end 
+1a51 98002600 iforce regc 
+1a52 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+1a53 98000c00 iforce contr 
+1a54 78347c00 enable user 
+1a55 20600000 rtn 
+
+le_att_handle_inrange:
+1a56 efe10006 ifetch 2 ,contr 
+1a57 1fe17eff and_into 0xff ,pdata 
+1a58 207a0000 rtn blank 
+1a59 9a467c00 isub regb ,null 
+1a5a 24610000 nrtn positive 
+1a5b 9a667c00 isub regc ,null 
+1a5c 20628000 rtn zero 
+1a5d 20211a60 branch le_att_handle_blank ,positive 
+1a5e 18007c01 force 1 ,null 
+1a5f 20600000 rtn 
+
+le_att_handle_blank:
+1a60 18007e00 force 0 ,pdata 
+1a61 20600000 rtn 
+
+le_att_get_handle_ptr:
+1a62 20401a65 call le_att_get_handle_ptr2 
+1a63 20229a72 branch le_att_get_handle_ptr_found ,zero 
+1a64 20600000 rtn 
+
+le_att_get_handle_ptr2:
+1a65 4761c038 bpatchx patch38_3 ,mem_patch38 
+1a66 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+1a67 98000c00 iforce contr 
+
+le_att_get_handle_loop1:
+1a68 efe10006 ifetch 2 ,contr 
+1a69 1fe17eff and_into 0xff ,pdata 
+1a6a 207a0000 rtn blank 
+1a6b 98467c00 isub temp ,null 
+1a6c 20628000 rtn zero 
+1a6d efe08006 ifetch 1 ,contr 
+1a6e 98c08c00 iadd contr ,contr 
+1a6f efe08006 ifetch 1 ,contr 
+1a70 98c08c00 iadd contr ,contr 
+1a71 20201a68 branch le_att_get_handle_loop1 
+
+le_att_get_handle_ptr_found:
+1a72 efe08006 ifetch 1 ,contr 
+1a73 98c08c00 iadd contr ,contr 
+1a74 20600000 rtn 
+
+le_att_get_short_uuid_ptr:
+1a75 47624038 bpatchx patch38_4 ,mem_patch38 
+1a76 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+1a77 98000c00 iforce contr 
+
+le_att_get_short_uuid_loop:
+1a78 efe10006 ifetch 2 ,contr 
+1a79 1fe17eff and_into 0xff ,pdata 
+1a7a 207a0000 rtn blank 
+1a7b efe08006 ifetch 1 ,contr 
+1a7c 98c08c00 iadd contr ,contr 
+1a7d 18c08dfe increase -2 ,contr 
+1a7e efe10006 ifetch 2 ,contr 
+1a7f 98467c00 isub temp ,null 
+1a80 20628000 rtn zero 
+1a81 efe08006 ifetch 1 ,contr 
+1a82 98c08c00 iadd contr ,contr 
+1a83 20201a78 branch le_att_get_short_uuid_loop 
+
+le_att_get_last_handle:
+1a84 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+1a85 98000c00 iforce contr 
+
+le_att_get_last_handle_loop:
+1a86 efe10006 ifetch 2 ,contr 
+1a87 1fe17eff and_into 0xff ,pdata 
+1a88 207a0000 rtn blank 
+1a89 1fe08401 add pdata ,1 ,temp 
+1a8a efe08006 ifetch 1 ,contr 
+1a8b 98c08c00 iadd contr ,contr 
+1a8c efe08006 ifetch 1 ,contr 
+1a8d 98c08c00 iadd contr ,contr 
+1a8e 18c20a00 copy contr ,contw 
+1a8f 20201a86 branch le_att_get_last_handle_loop 
+
+le_att_get_handle_info_from_ptr:
+1a90 6fe109b4 fetch 2 ,mem_le_cur_attlist_start_ptr 
+1a91 20201a94 branch le_att_get_handle_info_fast 
+
+le_att_get_handle_info:
+1a92 4762c038 bpatchx patch38_5 ,mem_patch38 
+1a93 6fe14396 fetch 2 ,mem_ui_le_uuid_table 
+
+le_att_get_handle_info_fast:
+1a94 98000c00 iforce contr 
+
+le_att_get_handle_loop:
+1a95 efe10006 ifetch 2 ,contr 
+1a96 1fe17eff and_into 0xff ,pdata 
+1a97 203a1a9f branch le_att_unfind_handle ,blank 
+1a98 98467c00 isub temp ,null 
+1a99 20229aa0 branch le_att_finded_handle ,zero 
+1a9a efe08006 ifetch 1 ,contr 
+1a9b 98c08c00 iadd contr ,contr 
+1a9c efe08006 ifetch 1 ,contr 
+1a9d 98c08c00 iadd contr ,contr 
+1a9e 20201a95 branch le_att_get_handle_loop 
+
+le_att_unfind_handle:
+1a9f 20207e5e branch disable_blank 
+
+le_att_finded_handle:
+1aa0 efe08006 ifetch 1 ,contr 
+1aa1 67e089ba store 1 ,mem_le_cur_uuid_length 
+1aa2 1fe27200 copy pdata ,loopcnt 
+1aa3 d8a009bb arg mem_le_cur_uuid ,contw 
+1aa4 20407d52 call memcpy_fast 
+1aa5 efe08006 ifetch 1 ,contr 
+1aa6 67e089b3 store 1 ,mem_le_curr_att_len 
+1aa7 20407ceb call store_contr 
+1aa8 20207e60 branch enable_blank 
+
+le_modified_name:
+1aa9 47634038 bpatchx patch38_6 ,mem_patch38 
+1aaa 20401aac call le_modified_name_att_list 
+1aab 20201abe branch le_modified_name_adv 
+
+le_modified_name_att_list:
+1aac d8402a00 arg uuid_chrctr_device_name ,temp 
+1aad 20401a75 call le_att_get_short_uuid_ptr 
+1aae 207a0000 rtn blank 
+1aaf efe08006 ifetch 1 ,contr 
+1ab0 18c20a00 copy contr ,contw 
+1ab1 6848c2f7 fetcht 1 ,mem_le_name_len 
+1ab2 18427200 copy temp ,loopcnt 
+1ab3 98467c00 isub temp ,null 
+1ab4 24211abb nbranch le_name_length_longer_than_att ,positive 
+1ab5 98460400 isub temp ,temp 
+1ab6 d8c042f8 arg mem_le_name ,contr 
+1ab7 20407d52 call memcpy_fast 
+1ab8 18427200 copy temp ,loopcnt 
+1ab9 24429af6 ncall memcpy_empty ,zero 
+1aba 20600000 rtn 
+
+le_name_length_longer_than_att:
+1abb 1fe27200 copy pdata ,loopcnt 
+1abc d8c042f8 arg mem_le_name ,contr 
+1abd 20207d52 branch memcpy_fast 
+
+le_modified_name_adv:
+1abe da604407 arg mem_le_adv_data_len + 32 ,regc 
+1abf da2043e8 arg mem_le_adv_data ,rega 
+1ac0 20401acb call le_modified_name_adv_and_scan 
+1ac1 58000000 setarg 0 
+1ac2 79347e00 setflag user ,0 ,pdata 
+1ac3 67e0895c store 1 ,mem_pdatatemp 
+1ac4 da604427 arg mem_le_scan_data_len + 32 ,regc 
+1ac5 da204408 arg mem_le_scan_data ,rega 
+1ac6 20401acb call le_modified_name_adv_and_scan 
+1ac7 20740000 rtn user 
+1ac8 6fe0895c fetch 1 ,mem_pdatatemp 
+1ac9 203a137a branch assert ,blank 
+1aca 20600000 rtn 
+
+le_modified_name_adv_and_scan:
+1acb 4763c038 bpatchx patch38_7 ,mem_patch38 
+1acc 20407e54 call enable_user 
+1acd 20407d2c call clear_temp_block 
+1ace da400000 arg 0 ,regb 
+1acf d8a0098f arg mem_le_data_temp ,contw 
+1ad0 20401ae5 call le_modified_name_adv_loop 
+1ad1 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1ad2 1fe08401 add pdata ,1 ,temp 
+1ad3 9a40a200 iadd regb ,rega 
+1ad4 1a20a202 increase 2 ,rega 
+1ad5 1a267c1f sub rega ,0x1f ,null 
+1ad6 24211ae3 nbranch le_modified_name_adv_and_scan_name_overflow ,positive 
+1ad7 e0408005 istoret 1 ,contw 
+1ad8 d8400009 arg gap_adtype_local_name_complete ,temp 
+1ad9 e0408005 istoret 1 ,contw 
+1ada 98007200 iforce loopcnt 
+1adb 20407d52 call memcpy_fast 
+1adc 1a222400 copy rega ,regb 
+
+le_modified_name_adv_and_scan_store_data:
+1add 1a427e00 deposit regb 
+1ade 67e0898e store 1 ,mem_le_data_len_temp 
+1adf d8c0098e arg mem_le_data_len_temp ,contr 
+1ae0 5fffffe0 setarg -32 
+1ae1 9a608a00 iadd regc ,contw 
+1ae2 20207d0a branch memcpy32 
+
+le_modified_name_adv_and_scan_name_overflow:
+1ae3 20407e56 call disable_user 
+1ae4 20201add branch le_modified_name_adv_and_scan_store_data 
+
+le_modified_name_adv_loop:
+1ae5 efe08011 ifetch 1 ,rega 
+1ae6 207a0000 rtn blank 
+1ae7 1fe0fe01 pincrease 1 
+1ae8 e8408006 ifetcht 1 ,contr 
+1ae9 18467c09 sub temp ,gap_adtype_local_name_complete ,null 
+1aea 20229af4 branch le_modified_name_adv_found_name ,zero 
+1aeb 9a40a400 iadd regb ,regb 
+1aec 1a220c00 copy rega ,contr 
+1aed 98007200 iforce loopcnt 
+1aee 20407d52 call memcpy_fast 
+1aef 18c22200 copy contr ,rega 
+
+le_modified_name_adv_loop2:
+1af0 1a227e00 deposit rega 
+1af1 9a667c00 isub regc ,null 
+1af2 20610000 rtn positive 
+1af3 20201ae5 branch le_modified_name_adv_loop 
+
+le_modified_name_adv_found_name:
+1af4 9a20a200 iadd rega ,rega 
+1af5 20201af0 branch le_modified_name_adv_loop2 
+
+memcpy_empty:
+1af6 58000020 setarg space 
+1af7 e7e08005 istore 1 ,contw 
+1af8 c2001af6 loop memcpy_empty 
+1af9 20600000 rtn 
+
+le_lpm_set_mult:
+1afa 47644039 bpatchx patch39_0 ,mem_patch39 
+1afb 7855fc00 disable wake 
+1afc 20371afe branch le_lpm_set_mult_attempt ,attempt 
+1afd 24369b0c nbranch le_lpm_lost ,match 
+
+le_lpm_set_mult_attempt:
+1afe 20401544 call lpm_match 
+1aff 6fe140c8 fetch 2 ,mem_rx_window_sniff 
+1b00 67e10295 store 2 ,mem_le_receive_window 
+
+le_lpm_set_mult_attempt_match:
+1b01 24369557 nbranch lpm_mult_short ,match 
+1b02 c5079557 bmark1 mark_old_packet ,lpm_mult_short 
+1b03 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+1b04 243a1557 nbranch lpm_mult_short ,blank 
+1b05 6fe0c1f6 fetch 1 ,mem_le_txlen 
+1b06 243a1557 nbranch lpm_mult_short ,blank 
+1b07 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1b08 c2829557 bbit1 bit_ble_short_mult ,lpm_mult_short 
+1b09 6fe08287 fetch 1 ,mem_le_state 
+1b0a c2829557 bbit1 lestate_update_param ,lpm_mult_short 
+1b0b 20201536 branch lpm_mult_wait_timeout 
+
+le_lpm_lost:
+1b0c 684940c8 fetcht 2 ,mem_rx_window_sniff 
+1b0d 18430400 rshift temp ,temp 
+1b0e 6fe10295 fetch 2 ,mem_le_receive_window 
+1b0f 9840fe00 iadd temp ,pdata 
+1b10 67e10295 store 2 ,mem_le_receive_window 
+1b11 2020154f branch lpm_lost 
+
+le_set_config_fixed_tk:
+1b12 d8e00000 arg bit_ble_passkey_fixed_key ,queue 
+1b13 20201b2a branch le_set_config 
+
+le_clr_config_fixed_tk:
+1b14 d8e00000 arg bit_ble_passkey_fixed_key ,queue 
+1b15 20201b2e branch le_clr_config 
+
+le_set_config_fixed_ltk:
+1b16 d8e00001 arg bit_ble_pairing_fixed_ltk ,queue 
+1b17 20201b2a branch le_set_config 
+
+le_clr_config_fixed_ltk:
+1b18 d8e00001 arg bit_ble_pairing_fixed_ltk ,queue 
+1b19 20201b2e branch le_clr_config 
+
+le_set_config_more_data:
+1b1a d8e00002 arg bit_ble_transmit_packet_by_md ,queue 
+1b1b 20201b2a branch le_set_config 
+
+le_clr_config_more_data:
+1b1c d8e00002 arg bit_ble_transmit_packet_by_md ,queue 
+1b1d 20201b2e branch le_clr_config 
+
+le_set_config_read_authentication:
+1b1e d8e00003 arg bit_ble_read_auth ,queue 
+1b1f 20201b2a branch le_set_config 
+
+le_clr_config_read_authentication:
+1b20 d8e00003 arg bit_ble_read_auth ,queue 
+1b21 20201b2e branch le_clr_config 
+
+le_set_config_write_authentication:
+1b22 d8e00004 arg bit_ble_write_auth ,queue 
+1b23 20201b2a branch le_set_config 
+
+le_clr_config_write_authentication:
+1b24 d8e00004 arg bit_ble_write_auth ,queue 
+1b25 20201b2e branch le_clr_config 
+
+le_set_config_short_mult:
+1b26 d8e00005 arg bit_ble_short_mult ,queue 
+1b27 20201b2a branch le_set_config 
+
+le_clr_config_short_mult:
+1b28 d8e00005 arg bit_ble_short_mult ,queue 
+1b29 20201b2e branch le_clr_config 
+
+le_set_config:
+1b2a 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1b2b f9207e00 qset1 pdata 
+1b2c 67e0c3c0 store 1 ,mem_le_configuration 
+1b2d 20600000 rtn 
+
+le_clr_config:
+1b2e 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1b2f f93ffe00 qset0 pdata 
+1b30 67e0c3c0 store 1 ,mem_le_configuration 
+1b31 20600000 rtn 
+
+le_set_fixed_ltk:
+1b32 58112233 setarg 0x112233 
+1b33 67e1c3c1 store 3 ,mem_le_fixed_ltk 
+1b34 58445566 setarg 0x445566 
+1b35 e7e18005 istore 3 ,contw 
+1b36 58778899 setarg 0x778899 
+1b37 e7e18005 istore 3 ,contw 
+1b38 58001122 setarg 0x001122 
+1b39 e7e18005 istore 3 ,contw 
+1b3a 58334455 setarg 0x334455 
+1b3b e7e18005 istore 3 ,contw 
+1b3c 58000066 setarg 0x66 
+1b3d e7e08005 istore 1 ,contw 
+1b3e 20600000 rtn 
+
+le_set_justwork:
+1b3f 59000302 setarg 0x01000302 
+1b40 67e24350 store 4 ,mem_le_pres 
+1b41 58010010 setarg 0x010010 
+1b42 67e1c354 store 3 ,mem_le_pres_max_keysize 
+1b43 70439d01 jam 1 ,mem_le_pairing_mode 
+1b44 20600000 rtn 
+
+le_fifo_malloc_tx_empty:
+1b45 da200000 arg 0 ,rega 
+1b46 d8200001 arg llid_empty ,type 
+1b47 20201b56 branch le_fifo_malloc_tx 
+
+le_fifo_malloc_tx_ll:
+1b48 d8200003 arg llid_le_ll ,type 
+1b49 20401b56 call le_fifo_malloc_tx 
+1b4a 1a427e00 copy regb ,pdata 
+1b4b e7e08005 istore 1 ,contw 
+1b4c 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap:
+1b4d 18000202 force llid_start ,type 
+1b4e 1a20a204 increase 4 ,rega 
+1b4f 20401b56 call le_fifo_malloc_tx 
+1b50 1a20a3fc increase -4 ,rega 
+1b51 1a227e00 copy rega ,pdata 
+1b52 e7e10005 istore 2 ,contw 
+1b53 1a427e00 copy regb ,pdata 
+1b54 e7e10005 istore 2 ,contw 
+1b55 20600000 rtn 
+
+le_fifo_malloc_tx:
+1b56 1a20a205 increase 5 ,rega 
+1b57 204052a1 call ble_l2cap_malloc 
+1b58 1a20a3fb increase -5 ,rega 
+1b59 1a227e00 copy rega ,pdata 
+1b5a e7e10005 istore 2 ,contw 
+1b5b 58000000 setarg 0 
+1b5c e7e10005 istore 2 ,contw 
+1b5d 18227e00 copy type ,pdata 
+1b5e e7e08005 istore 1 ,contw 
+1b5f 20600000 rtn 
+
+le_fifo_get_first_tx_ptr:
+1b60 204052db call l2cap_malloc_fifo_out 
+1b61 1fe20c00 copy pdata ,contr 
+1b62 20600000 rtn 
+
+le_fifo_get_second_tx_ptr:
+1b63 6fe144ee fetch 2 ,mem_tx_fifo2_ptr 
+1b64 20600000 rtn 
+
+le_fifo_get_last_tx_ptr:
+1b65 20401b68 call le_fifo_get_last_tx_ptr0 
+1b66 1fe20c00 copy pdata ,contr 
+1b67 20600000 rtn 
+
+le_fifo_get_last_tx_ptr0:
+1b68 6fe144f1 fetch 2 ,mem_tx_fifo3_ptr 
+1b69 20600000 rtn 
+
+le_fifo_get_first_l2cap_ptr:
+1b6a 20401b60 call le_fifo_get_first_tx_ptr 
+1b6b 18c08c05 increase 5 ,contr 
+1b6c 20600000 rtn 
+
+le_fifo_get_first_att_ptr:
+1b6d 20401b60 call le_fifo_get_first_tx_ptr 
+1b6e 18c08c09 increase 9 ,contr 
+1b6f 20600000 rtn 
+
+le_fifo_get_last_att_ptr:
+1b70 20401b65 call le_fifo_get_last_tx_ptr 
+1b71 18c08c09 increase 9 ,contr 
+1b72 20600000 rtn 
+
+le_fifo_get_last_l2cap_ptr:
+1b73 20401b65 call le_fifo_get_last_tx_ptr 
+1b74 18c08c05 increase 5 ,contr 
+1b75 20600000 rtn 
+
+le_fifo_check_full:
+1b76 202052f1 branch l2cap_malloc_is_fifo_full 
+
+le_fifo_check_nearly_full:
+1b77 202052f4 branch l2cap_malloc_is_fifo_nearly_full 
+
+le_fifo_check_empty:
+1b78 202052f7 branch l2cap_malloc_is_fifo_empty 
+
+le_fifo_release_first_node:
+1b79 202052e0 branch l2cap_malloc_free 
+
+le_set_dle:
+1b7a 67e4444c store 8 ,mem_local_rx_max_octets 
+1b7b 20201b8c branch le_set_feature_data_packet_length_extension 
+
+le_set_phys:
+1b7c 184122ff and temp ,0xff ,rega 
+1b7d 20401b80 call le_set_tx_phy 
+1b7e 184ca200 rshift8 temp ,rega 
+1b7f 20201b86 branch le_set_rx_phy 
+
+le_set_tx_phy:
+1b80 6220c442 storer rega ,1 ,mem_le_tx_phys 
+1b81 2a2ffe01 isolate1 bit_le_2m_phy ,rega 
+1b82 20409b88 call le_set_feature_2m_phy ,true 
+1b83 2a2ffe02 isolate1 bit_le_coded_phy ,rega 
+1b84 20409b8a call le_set_feature_coded_phy ,true 
+1b85 20600000 rtn 
+
+le_set_rx_phy:
+1b86 6220c443 storer rega ,1 ,mem_le_rx_phys 
+1b87 20201b81 branch le_set_tx_phy + 1 
+
+le_set_feature_2m_phy:
+1b88 d8e00008 arg bit_ll_feature_le_2m_phy ,queue 
+1b89 20201b8e branch le_set_feature 
+
+le_set_feature_coded_phy:
+1b8a d8e0000b arg bit_ll_feature_le_coded_phy ,queue 
+1b8b 20201b8e branch le_set_feature 
+
+le_set_feature_data_packet_length_extension:
+1b8c d8e00005 arg bit_ll_feature_le_data_packet_length_extension ,queue 
+1b8d 20201b8e branch le_set_feature 
+
+le_set_feature:
+1b8e 6fe4443a fetch 8 ,mem_le_local_feature 
+1b8f f9207e00 qset1 pdata 
+1b90 67e4443a store 8 ,mem_le_local_feature 
+1b91 20600000 rtn 
+
+le_advertising_dispatch:
+1b92 c61a0000 rtnmark1 mark_adc_enable 
+1b93 7002bc01 jam fun_rx_ll_1m_phy ,mem_le_rx_phy 
+1b94 7002bd01 jam fun_tx_ll_1m_phy ,mem_le_tx_phy 
+1b95 204016a5 call le_enable 
+1b96 20401b99 call le_scan 
+1b97 20401c17 call le_adv 
+1b98 202016b2 branch le_disable 
+
+le_scan:
+1b99 4764c039 bpatchx patch39_1 ,mem_patch39 
+1b9a 6fe0c3e2 fetch 1 ,mem_le_scan_enable 
+1b9b c1808000 rtnne le_scan_enable 
+1b9c d8e00002 arg le_scan_interval_timer ,queue 
+1b9d 20407d74 call timer_check 
+1b9e 247a0000 nrtn blank 
+1b9f 6fe143e3 fetch 2 ,mem_le_scan_interval 
+1ba0 684943e5 fetcht 2 ,mem_le_scan_window 
+1ba1 98467e00 isub temp ,pdata 
+1ba2 d8e00002 arg le_scan_interval_timer ,queue 
+1ba3 20407d66 call timer_init 
+1ba4 7854fc00 disable master 
+1ba5 20401c38 call le_init_adv 
+1ba6 20401bb8 call le_wait_adv 
+1ba7 24768000 nrtn match 
+1ba8 47654039 bpatchx patch39_2 ,mem_patch39 
+1ba9 6fe3016d fetch 6 ,mem_le_rxbuf + 2 
+1baa 67e30297 store 6 ,mem_le_plap 
+1bab 6fe08002 fetch 1 ,mem_le_adv_rcv 
+1bac 1fe0fe01 increase 1 ,pdata 
+1bad 67e08002 store 1 ,mem_le_adv_rcv 
+1bae 20401bbf call le_create_conn 
+1baf 20748000 rtn master 
+1bb0 20401c5f call le_send_scan_request 
+1bb1 24768000 nrtn match 
+1bb2 6fe08004 fetch 1 ,mem_le_scanrsp_rcv 
+1bb3 1fe0fe01 increase 1 ,pdata 
+1bb4 67e08004 store 1 ,mem_le_scanrsp_rcv 
+1bb5 6fe48173 fetch 9 ,mem_le_rxbuf + 8 
+1bb6 67e48a01 store 9 ,mem_tmp_buffer 
+1bb7 20600000 rtn 
+
+le_wait_adv:
+1bb8 4765c039 bpatchx patch39_3 ,mem_patch39 
+1bb9 20401caa call le_next_adv_channel 
+1bba 2040174a call le_receive_adv 
+1bbb 6fe08001 fetch 1 ,mem_le_adv_waitcnt 
+1bbc 1fe0fe01 increase 1 ,pdata 
+1bbd 67e08001 store 1 ,mem_le_adv_waitcnt 
+1bbe 20600000 rtn 
+
+le_create_conn:
+1bbf 47664039 bpatchx patch39_4 ,mem_patch39 
+1bc0 6fe082e0 fetch 1 ,mem_cmd_le_create_conn 
+1bc1 c18d8000 rtnne hci_cmd_le_create_conn 
+1bc2 6fe30297 fetch 6 ,mem_le_plap 
+1bc3 684b436b fetcht 6 ,mem_le_conn_peer_addr 
+1bc4 98467c00 isub temp ,null 
+1bc5 24628000 nrtn zero 
+1bc6 20400a4a call context_new 
+1bc7 24628000 nrtn zero 
+1bc8 20401bcf call le_connect_request 
+1bc9 20401602 call le_init_master 
+1bca 7041db00 jam 0 ,mem_hci_cmd 
+1bcb 7002d700 jam 0 ,mem_le_peer_sca 
+1bcc 7043e200 jam 0 ,mem_le_scan_enable 
+1bcd 7002e000 jam 0 ,mem_cmd_le_create_conn 
+1bce 20200a32 branch context_save 
+
+le_connect_request:
+1bcf 4766c039 bpatchx patch39_5 ,mem_patch39 
+1bd0 18007fff force -1 ,pdata 
+1bd1 38080001 setsect 2 ,1 
+1bd2 67e282b7 store 5 ,mem_le_channel_map 
+1bd3 da200287 arg mem_le_state ,rega 
+1bd4 20401720 call le_calc_channel_map 
+1bd5 18007204 force 4 ,loopcnt 
+1bd6 d8a002ab arg mem_le_access ,contw 
+1bd7 20405a32 call generate_random_loop 
+1bd8 6fe14378 fetch 2 ,mem_le_timeout 
+1bd9 67e102b5 store 2 ,mem_le_superto 
+
+le_con_req_hop_retry:
+1bda 180a7e00 random pdata 
+1bdb 1fe17e0f and_into 0xf ,pdata 
+1bdc 1fe67c04 sub pdata ,4 ,null 
+1bdd 20211bda branch le_con_req_hop_retry ,positive 
+1bde 67e082a0 store 1 ,mem_le_hop 
+1bdf 67e085a8 store 1 ,mem_tmp1 
+1be0 47674039 bpatchx patch39_6 ,mem_patch39 
+1be1 684941f3 fetcht 2 ,mem_le_conn_interval 
+1be2 60490289 storet 2 ,mem_le_tsniff 
+1be3 18422600 copy temp ,regc 
+1be4 1c40fe07 add clkn_bt ,7 ,pdata 
+1be5 9a66fc00 idiv regc 
+1be6 20407def call wait_div_end 
+1be7 18072200 remainder rega 
+1be8 9a267e00 isub rega ,pdata 
+1be9 9a60fe00 iadd regc ,pdata 
+1bea 684941f1 fetcht 2 ,mem_le_dsniff 
+1beb 9840fe00 iadd temp ,pdata 
+1bec 67e2028b store 4 ,mem_le_anchor 
+1bed 9c462200 isub clkn_bt ,rega 
+1bee 1a20a3fa increase -6 ,rega 
+1bef da402205 arg 0x2205 ,regb 
+1bf0 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+1bf1 7d3a2406 nsetflag blank ,le_sender_addr_bit ,regb 
+1bf2 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+1bf3 7d3a2407 nsetflag blank ,le_receiver_addr_bit ,regb 
+1bf4 1a427e00 copy regb ,pdata 
+1bf5 67e141f5 store 2 ,mem_le_txheader 
+1bf6 6fe3437a fetch 6 ,mem_le_lap 
+1bf7 e7e30005 istore 6 ,contw 
+1bf8 6fe30297 fetch 6 ,mem_le_plap 
+1bf9 e7e30005 istore 6 ,contw 
+1bfa 6fe202ab fetch 4 ,mem_le_access 
+1bfb e7e20005 istore 4 ,contw 
+1bfc 180a7e00 random pdata 
+1bfd e7e10005 istore 2 ,contw 
+1bfe 180a7e00 random pdata 
+1bff e7e08005 istore 1 ,contw 
+1c00 18007e02 force 2 ,pdata 
+1c01 e7e08005 istore 1 ,contw 
+1c02 1a2b7e00 rshift2 rega ,pdata 
+1c03 e7e10005 istore 2 ,contw 
+1c04 1a6b7e00 rshift2 regc ,pdata 
+1c05 e7e10005 istore 2 ,contw 
+1c06 4767c039 bpatchx patch39_7 ,mem_patch39 
+1c07 58000000 setarg 0 
+1c08 e7e10005 istore 2 ,contw 
+1c09 6fe14378 fetch 2 ,mem_le_timeout 
+1c0a e7e10005 istore 2 ,contw 
+1c0b 6fe282b7 fetch 5 ,mem_le_channel_map 
+1c0c e7e28005 istore 5 ,contw 
+1c0d 6fe082a0 fetch 1 ,mem_le_hop 
+1c0e d84000a0 arg param_le_sca ,temp 
+1c0f 9841fe00 ior temp ,pdata 
+1c10 e7e08005 istore 1 ,contw 
+1c11 20401836 call le_transmit_norx 
+1c12 580041f5 setarg mem_le_txheader 
+1c13 1fe08c12 add pdata ,18 ,contr 
+1c14 efe18006 ifetch 3 ,contr 
+1c15 67e182af store 3 ,mem_le_crcinit 
+1c16 20600000 rtn 
+
+le_adv:
+1c17 70001624 jam 36 ,mem_le_ch_mapped 
+1c18 70098e00 jam 0 ,mem_le_adv_channel_map_temp 
+
+le_adv_loop:
+1c19 6fe0c427 fetch 1 ,mem_le_adv_enable 
+1c1a 207a0000 rtn blank 
+1c1b d8e00000 arg le_adv_interval_timer ,queue 
+1c1c 20407d74 call timer_check 
+1c1d 247a0000 nrtn blank 
+1c1e 4768403a bpatchx patch3a_0 ,mem_patch3a 
+
+le_adv_loop_tx:
+1c1f 78287c00 enable swfine 
+1c20 20401c38 call le_init_adv 
+1c21 20401caa call le_next_adv_channel 
+1c22 20401c41 call le_send_adv_ind 
+1c23 24369c2b nbranch le_adv_not_match ,match 
+1c24 6fe08003 fetch 1 ,mem_le_req_rcv 
+1c25 1fe0fe01 increase 1 ,pdata 
+1c26 67e08003 store 1 ,mem_le_req_rcv 
+1c27 6fe0816b fetch 1 ,mem_le_rxbuf_adv_header 
+1c28 1fe17e0f and pdata ,0x0f ,pdata 
+1c29 c0019c70 beq scan_req ,le_send_scan_response 
+1c2a c0029c82 beq connect_req ,le_parse_connect_req 
+
+le_adv_not_match:
+1c2b 4768c03a bpatchx patch3a_1 ,mem_patch3a 
+1c2c 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1c2d 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1c2e 98467c00 isub temp ,null 
+1c2f 24229c19 nbranch le_adv_loop ,zero 
+1c30 180a7e00 random pdata 
+1c31 d84001ff arg 0x1ff ,temp 
+1c32 98417e00 iand temp ,pdata 
+1c33 1fe0fefa add pdata ,250 ,pdata 
+1c34 20407d0e call delay 
+1c35 d8e00000 arg le_adv_interval_timer ,queue 
+1c36 6fe14428 fetch 2 ,mem_le_adv_interval 
+1c37 20207d66 branch timer_init 
+
+le_init_adv:
+1c38 4769403a bpatchx patch3a_2 ,mem_patch3a 
+1c39 7854fc00 disable master 
+
+le_adv_access:
+1c3a 588e89be setarg 0x8e89be 
+1c3b 1fed7e00 lshift8 pdata ,pdata 
+1c3c 1fe1fed6 or_into 0xd6 ,pdata 
+1c3d 98001200 iforce access 
+1c3e 58555555 setarg 0x555555 
+1c3f 67e182af store 3 ,mem_le_crcinit 
+1c40 202010b0 branch calc_mod_value_scale_le 
+
+le_send_adv_ind:
+1c41 4769c03a bpatchx patch3a_3 ,mem_patch3a 
+1c42 6fe0c42a fetch 1 ,mem_le_adv_type 
+1c43 6848c42b fetcht 1 ,mem_le_adv_own_addr_type 
+1c44 18520400 lshift4 temp ,temp 
+1c45 184b8400 lshift2 temp ,temp 
+1c46 98408400 iadd temp ,temp 
+1c47 6048c1f5 storet 1 ,mem_le_txheader 
+1c48 c0009c52 beq adv_direct_ind ,le_send_adv_direct_ind 
+1c49 6848c3e7 fetcht 1 ,mem_le_adv_data_len 
+1c4a 1840fe06 add temp ,6 ,pdata 
+1c4b 67e0c1f6 store 1 ,mem_le_txlen 
+1c4c 6fe3437a fetch 6 ,mem_le_lap 
+1c4d 67e341f7 store 6 ,mem_le_txpayload 
+1c4e 18427200 copy temp ,loopcnt 
+1c4f d8c043e8 arg mem_le_adv_data ,contr 
+1c50 20407d52 call memcpy_fast 
+1c51 20201c58 branch le_send_adv_transmit 
+
+le_send_adv_direct_ind:
+1c52 5800000c setarg 12 
+1c53 67e0c1f6 store 1 ,mem_le_txlen 
+1c54 6fe3437a fetch 6 ,mem_le_lap 
+1c55 67e341f7 store 6 ,mem_le_txpayload 
+1c56 6fe341dd fetch 6 ,mem_hci_plap 
+1c57 e7e30005 istore 6 ,contw 
+
+le_send_adv_transmit:
+1c58 476a403a bpatchx patch3a_4 ,mem_patch3a 
+1c59 6fe08000 fetch 1 ,mem_le_adv_transmit 
+1c5a 1fe0fe01 increase 1 ,pdata 
+1c5b 67e08000 store 1 ,mem_le_adv_transmit 
+1c5c db600708 arg 1800 ,stop_watch 
+1c5d 7856fc00 disable match 
+1c5e 20201821 branch le_transmit_receive_sifs_without_change_mode 
+
+le_send_scan_request:
+1c5f 476ac03a bpatchx patch3a_5 ,mem_patch3a 
+1c60 6fe0c433 fetch 1 ,mem_le_scan_type 
+1c61 c1808000 rtnne le_scan_type_active 
+1c62 6fe08000 fetch 1 ,mem_le_adv_transmit 
+1c63 1fe0fe01 increase 1 ,pdata 
+1c64 67e08000 store 1 ,mem_le_adv_transmit 
+1c65 d8400c03 arg 0x0c03 ,temp 
+1c66 6fe0c434 fetch 1 ,mem_le_scan_own_addr_type 
+1c67 7d3a0406 nsetflag blank ,le_sender_addr_bit ,temp 
+1c68 1a227e00 copy rega ,pdata 
+1c69 7d3a0407 nsetflag blank ,le_receiver_addr_bit ,temp 
+1c6a 604941f5 storet 2 ,mem_le_txheader 
+1c6b 6fe3437a fetch 6 ,mem_le_lap 
+1c6c e7e30005 istore 6 ,contw 
+1c6d 6fe30297 fetch 6 ,mem_le_plap 
+1c6e e7e30005 istore 6 ,contw 
+1c6f 20201821 branch le_transmit_receive_sifs_without_change_mode 
+
+le_send_scan_response:
+1c70 6fe30173 fetch 6 ,mem_le_rxbuf_adv_scan_req_adv_address 
+1c71 684b437a fetcht 6 ,mem_le_lap 
+1c72 98467c00 isub temp ,null 
+1c73 24628000 nrtn zero 
+1c74 d8400004 arg scan_rsp ,temp 
+1c75 6fe0c42b fetch 1 ,mem_le_adv_own_addr_type 
+1c76 7d3a0406 nsetflag blank ,le_sender_addr_bit ,temp 
+1c77 6048c1f5 storet 1 ,mem_le_txheader 
+1c78 6848c407 fetcht 1 ,mem_le_scan_data_len 
+1c79 1840fe06 add temp ,6 ,pdata 
+1c7a 67e0c1f6 store 1 ,mem_le_txlen 
+1c7b 6fe3437a fetch 6 ,mem_le_lap 
+1c7c 67e341f7 store 6 ,mem_le_txpayload 
+1c7d d8c04408 arg mem_le_scan_data ,contr 
+1c7e 18427200 copy temp ,loopcnt 
+1c7f 20407d52 call memcpy_fast 
+1c80 20401836 call le_transmit_norx 
+1c81 20201c2b branch le_adv_not_match 
+
+le_parse_connect_req:
+1c82 6fe30173 fetch 6 ,mem_le_rxbuf_adv_connect_ind_adv_address 
+1c83 684b437a fetcht 6 ,mem_le_lap 
+1c84 98467c00 isub temp ,null 
+1c85 24628000 nrtn zero 
+1c86 20401961 call le_scan_check_sender_addr_type 
+1c87 6220c36a storer rega ,1 ,mem_le_conn_peer_addr_type 
+1c88 6fe3016d fetch 6 ,mem_le_rxbuf_adv_connect_ind_init_address 
+1c89 67e30297 store 6 ,mem_le_plap 
+1c8a 6fe40179 fetch 8 ,mem_le_rxbuf_adv_connect_ind_access_address 
+1c8b 67e402ab store 8 ,mem_le_access 
+1c8c 68490181 fetcht 2 ,mem_le_rxbuf_adv_connect_ind_win_offset 
+1c8d 476b403a bpatchx patch3a_6 ,mem_patch3a 
+1c8e 184b8400 lshift2 temp ,temp 
+1c8f 6fe10183 fetch 2 ,mem_le_rxbuf_adv_connect_ind_interval 
+1c90 1febfe00 lshift2 pdata ,pdata 
+1c91 67e10289 store 2 ,mem_le_tsniff 
+1c92 67e2028b store 4 ,mem_le_anchor 
+1c93 98467e00 isub temp ,pdata 
+1c94 1fe0d1fe add pdata ,-2 ,clke_bt 
+1c95 6fe48185 fetch 9 ,mem_le_rxbuf_adv_connect_ind_latency 
+1c96 67e482b3 store 9 ,mem_le_slave_latency 
+1c97 6fe0818e fetch 1 ,mem_le_rxbuf_adv_connect_ind_hop_and_sca 
+1c98 1fe1041f and pdata ,0x1f ,temp 
+1c99 604882a0 storet 1 ,mem_le_hop 
+1c9a 1ff18400 rshift4 pdata ,temp 
+1c9b 18430400 rshift temp ,temp 
+1c9c 604882d7 storet 1 ,mem_le_peer_sca 
+1c9d da200287 arg mem_le_state ,rega 
+1c9e 20401a33 call le_receive_window_size 
+1c9f da200287 arg mem_le_state ,rega 
+1ca0 20401720 call le_calc_channel_map 
+1ca1 2040160e call le_init_slave 
+1ca2 20400a4a call context_new 
+1ca3 24628000 nrtn zero 
+1ca4 476bc03a bpatchx patch3a_7 ,mem_patch3a 
+1ca5 20401061 call calc_clke_offset 
+1ca6 20401f6b call le_l2cap_reset_signaling_identifier 
+1ca7 70095b14 jam bt_evt_le_connected ,mem_fifo_temp 
+1ca8 20407871 call ui_ipc_send_event 
+1ca9 20200a32 branch context_save 
+
+le_next_adv_channel:
+1caa 476c403b bpatchx patch3b_0 ,mem_patch3b 
+1cab 6fe08016 fetch 1 ,mem_le_ch_mapped 
+1cac c0129cb0 beq 37 ,le_next_adv_channel_curr_channel_37 
+1cad c0131cb6 beq 38 ,le_next_adv_channel_curr_channel_38 
+1cae c0139cbc beq 39 ,le_next_adv_channel_curr_channel_39 
+1caf 20201cbc branch le_next_adv_channel_curr_channel_39 
+
+le_next_adv_channel_curr_channel_37:
+1cb0 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1cb1 284ffe01 isolate1 bit_adv_channel_map_38 ,temp 
+1cb2 20209cc7 branch set_le_next_adv_channel_38 ,true 
+1cb3 284ffe02 isolate1 bit_adv_channel_map_39 ,temp 
+1cb4 20209ccc branch set_le_next_adv_channel_39 ,true 
+1cb5 20201cc2 branch set_le_next_adv_channel_37 
+
+le_next_adv_channel_curr_channel_38:
+1cb6 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1cb7 284ffe02 isolate1 bit_adv_channel_map_39 ,temp 
+1cb8 20209ccc branch set_le_next_adv_channel_39 ,true 
+1cb9 284ffe00 isolate1 bit_adv_channel_map_37 ,temp 
+1cba 20209cc2 branch set_le_next_adv_channel_37 ,true 
+1cbb 20201cc7 branch set_le_next_adv_channel_38 
+
+le_next_adv_channel_curr_channel_39:
+1cbc 6848c432 fetcht 1 ,mem_le_adv_channel_map 
+1cbd 284ffe00 isolate1 bit_adv_channel_map_37 ,temp 
+1cbe 20209cc2 branch set_le_next_adv_channel_37 ,true 
+1cbf 284ffe01 isolate1 bit_adv_channel_map_38 ,temp 
+1cc0 20209cc7 branch set_le_next_adv_channel_38 ,true 
+1cc1 20201ccc branch set_le_next_adv_channel_39 
+
+set_le_next_adv_channel_37:
+1cc2 70001625 jam 37 ,mem_le_ch_mapped 
+1cc3 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1cc4 79207e00 set1 bit_adv_channel_map_37 ,pdata 
+1cc5 67e0898e store 1 ,mem_le_adv_channel_map_temp 
+1cc6 20600000 rtn 
+
+set_le_next_adv_channel_38:
+1cc7 70001626 jam 38 ,mem_le_ch_mapped 
+1cc8 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1cc9 79207e01 set1 bit_adv_channel_map_38 ,pdata 
+1cca 67e0898e store 1 ,mem_le_adv_channel_map_temp 
+1ccb 20600000 rtn 
+
+set_le_next_adv_channel_39:
+1ccc 70001627 jam 39 ,mem_le_ch_mapped 
+1ccd 6fe0898e fetch 1 ,mem_le_adv_channel_map_temp 
+1cce 79207e02 set1 bit_adv_channel_map_39 ,pdata 
+1ccf 67e0898e store 1 ,mem_le_adv_channel_map_temp 
+1cd0 20600000 rtn 
+
+le_parse_att:
+1cd1 efe18006 ifetch 3 ,contr 
+1cd2 67e1c436 store 3 ,mem_le_att_opcode 
+1cd3 c0011ce8 beq attop_exchange_mtu_request ,le_parse_att_exchange_mtu_request 
+1cd4 c0019cf0 beq attop_exchange_mtu_response ,le_parse_att_exchange_mtu_response 
+1cd5 c0021cf3 beq attop_find_information_request ,le_parse_att_find_information_request 
+1cd6 c0031d1c beq attop_find_by_type_value_request ,le_parse_att_find_by_type_value_request 
+1cd7 c0041d69 beq attop_read_by_type_request ,le_parse_att_read_by_type_request 
+1cd8 c0051de7 beq attop_read_request ,le_parse_att_read_request 
+1cd9 c0061e16 beq attop_read_blob_request ,le_parse_att_read_blob_request 
+1cda c0081e2c beq attop_read_by_group_type_request ,le_parse_att_read_by_group_type_request 
+1cdb c0091e6f beq attop_write_request ,le_parse_att_write_request 
+1cdc c00b1e93 beq attop_prepare_write_request ,le_parse_att_prepare_write_request 
+1cdd c00c1ea6 beq attop_execute_write_request ,le_parse_att_execute_write_request 
+1cde c00f1eab beq attop_handle_value_confirmation ,le_parse_handle_value_confirmation 
+1cdf c0291eaf beq attop_write_command ,le_parse_att_write_command 
+1ce0 20600000 rtn 
+
+le_send_att_exchange_mtu_requset:
+1ce1 18002203 force 3 ,rega 
+1ce2 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1ce3 58000002 setarg attop_exchange_mtu_request 
+1ce4 e7e08005 istore 1 ,contw 
+1ce5 6fe14380 fetch 2 ,mem_le_local_mtu 
+1ce6 e7e10005 istore 2 ,contw 
+1ce7 20600000 rtn 
+
+le_parse_att_exchange_mtu_request:
+1ce8 20401cf0 call le_parse_att_exchange_mtu_response 
+
+le_send_att_exchange_mtu_response:
+1ce9 18002203 force 3 ,rega 
+1cea 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1ceb 58000003 setarg attop_exchange_mtu_response 
+1cec e7e08005 istore 1 ,contw 
+1ced 6fe14380 fetch 2 ,mem_le_local_mtu 
+1cee e7e10005 istore 2 ,contw 
+1cef 20600000 rtn 
+
+le_parse_att_exchange_mtu_response:
+1cf0 1fecfe00 rshift8 pdata ,pdata 
+1cf1 67e14382 store 2 ,mem_le_remote_mtu 
+1cf2 20600000 rtn 
+
+le_parse_att_find_information_request:
+1cf3 20401f03 call le_get_search_handle_start_end_common 
+1cf4 20407e54 call enable_user 
+1cf5 20201cf6 branch le_send_att_find_information_response 
+
+le_send_att_find_information_response:
+1cf6 d9600003 arg 3 ,timeup 
+1cf7 20401a4d call le_init_attlist_search 
+
+le_send_att_find_information_res_loop:
+1cf8 20401a56 call le_att_handle_inrange 
+1cf9 203a1d1a branch le_send_att_find_information_res_end ,blank 
+1cfa 24211d17 nbranch le_send_att_find_information_res_next ,positive 
+1cfb 18c08dfe increase -2 ,contr 
+1cfc 20407ceb call store_contr 
+1cfd 20407ce2 call get_contw 
+1cfe 24341d0a nbranch le_send_att_find_information_res_store_info ,user 
+1cff 20407cd0 call push_stack_rega_b_c 
+1d00 20407e56 call disable_user 
+1d01 6162096c storer timeup ,4 ,mem_timeup 
+1d02 18002214 force 20 ,rega 
+1d03 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1d04 6962096c fetchr timeup ,4 ,mem_timeup 
+1d05 20407cde call pop_stack_rega_b_c 
+1d06 58000005 setarg attop_find_information_response 
+1d07 e7e08005 istore 1 ,contw 
+1d08 58000001 setarg uuid_size_16bit 
+1d09 e7e08005 istore 1 ,contw 
+
+le_send_att_find_information_res_store_info:
+1d0a 20407ce5 call get_contr 
+1d0b efe10006 ifetch 2 ,contr 
+1d0c 1fe17eff and_into 0xff ,pdata 
+1d0d e7e10005 istore 2 ,contw 
+1d0e efe08006 ifetch 1 ,contr 
+1d0f 1fe27200 copy pdata ,loopcnt 
+1d10 20407d5f call memcpy 
+1d11 20407ce8 call store_contw 
+1d12 196097ff increase -1 ,timeup 
+1d13 20229d1a branch le_send_att_find_information_res_end ,zero 
+
+le_send_att_find_information_res_cont:
+1d14 efe08006 ifetch 1 ,contr 
+1d15 98c08c00 iadd contr ,contr 
+1d16 20201cf8 branch le_send_att_find_information_res_loop 
+
+le_send_att_find_information_res_next:
+1d17 efe08006 ifetch 1 ,contr 
+1d18 98c08c00 iadd contr ,contr 
+1d19 20201d14 branch le_send_att_find_information_res_cont 
+
+le_send_att_find_information_res_end:
+1d1a 20341ec8 branch le_send_att_error_response_notfound ,user 
+1d1b 20201ef7 branch le_send_auto_len_by_mem 
+
+le_parse_att_find_by_type_value_request:
+1d1c 20401f03 call le_get_search_handle_start_end_common 
+1d1d efe10006 ifetch 2 ,contr 
+1d1e 67e1435a store 2 ,mem_le_search_uuid 
+1d1f 20407ceb call store_contr 
+1d20 d8a009a2 arg mem_le_search_att_type_length ,contw 
+1d21 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1d22 1fe0fff9 increase -7 ,pdata 
+1d23 20401f14 call le_get_search_common2 
+1d24 20201d2f branch le_send_att_find_by_type_value_response 
+
+le_start_end_handle_check_1:
+1d25 78547c00 disable user 
+1d26 6849099e fetcht 2 ,mem_le_search_handle_start 
+1d27 6fe109a0 fetch 2 ,mem_le_search_handle_end 
+1d28 98467c00 isub temp ,null 
+1d29 24211d2c nbranch le_start_end_handle_check_1_fail ,positive 
+1d2a 18427e00 deposit temp 
+1d2b c1800000 rtnne 0 
+
+le_start_end_handle_check_1_fail:
+1d2c 78347c00 enable user 
+1d2d 7002d801 jam att_err_invalid_handle ,mem_le_err_code 
+1d2e 20201ec9 branch le_send_att_error_response 
+
+le_send_att_find_by_type_value_response:
+1d2f 20401d25 call le_start_end_handle_check_1 
+1d30 20740000 rtn user 
+1d31 6849435a fetcht 2 ,mem_le_search_uuid 
+1d32 58002800 setarg uuid_gatt_primary_service 
+1d33 98467c00 isub temp ,null 
+1d34 20229d36 branch le_send_att_find_by_type_value_res_primary ,zero 
+1d35 20201ec8 branch le_send_att_error_response_notfound 
+
+le_send_att_find_by_type_value_res_primary:
+1d36 70443900 jam le_find_by_type_val_res_not_found ,mem_le_search_res 
+1d37 6849099e fetcht 2 ,mem_le_search_handle_start 
+1d38 60490964 storet 2 ,mem_temp 
+1d39 20401a92 call le_att_get_handle_info 
+1d3a 243a1ec8 nbranch le_send_att_error_response_notfound ,blank 
+
+le_send_att_find_primary_search_loop:
+1d3b 68490964 fetcht 2 ,mem_temp 
+1d3c 20401a92 call le_att_get_handle_info 
+1d3d 243a1d4f nbranch le_send_att_error_response_notfound2 ,blank 
+1d3e 18c22200 copy contr ,rega 
+1d3f 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1d40 1fe27200 copy pdata ,loopcnt 
+1d41 684889a2 fetcht 1 ,mem_le_search_att_type_length 
+1d42 98467c00 isub temp ,null 
+1d43 24229d4b nbranch le_send_att_find_primary_search_loop1 ,zero 
+1d44 da4009a3 arg mem_le_search_att_type ,regb 
+1d45 20407df1 call string_compare 
+1d46 20229d52 branch le_send_att_find_primary_search_end_start_handle_found ,zero 
+1d47 6fe109bb fetch 2 ,mem_le_cur_uuid 
+1d48 6849435a fetcht 2 ,mem_le_search_uuid 
+1d49 98467c00 isub temp ,null 
+1d4a 20229d5a branch le_send_att_find_primary_search_end_ending_handle_found ,zero 
+
+le_send_att_find_primary_search_loop1:
+1d4b 6fe10964 fetch 2 ,mem_temp 
+1d4c 1fe0fe01 increase 1 ,pdata 
+1d4d 67e10964 store 2 ,mem_temp 
+1d4e 20201d3b branch le_send_att_find_primary_search_loop 
+
+le_send_att_error_response_notfound2:
+1d4f 6fe0c439 fetch 1 ,mem_le_search_res 
+1d50 c0009d5a beq le_find_by_type_val_res_found_starting_handle ,le_send_att_find_primary_search_end_ending_handle_found 
+1d51 20201ec8 branch le_send_att_error_response_notfound 
+
+le_send_att_find_primary_search_end_start_handle_found:
+1d52 6fe109bb fetch 2 ,mem_le_cur_uuid 
+1d53 6849435a fetcht 2 ,mem_le_search_uuid 
+1d54 98467c00 isub temp ,null 
+1d55 24229d4b nbranch le_send_att_find_primary_search_loop1 ,zero 
+1d56 70443901 jam le_find_by_type_val_res_found_starting_handle ,mem_le_search_res 
+1d57 68490964 fetcht 2 ,mem_temp 
+1d58 604909b6 storet 2 ,mem_le_cur_handle_start 
+1d59 20201d4b branch le_send_att_find_primary_search_loop1 
+
+le_send_att_find_primary_search_end_ending_handle_found:
+1d5a 6fe0c439 fetch 1 ,mem_le_search_res 
+1d5b c0001d4b beq le_find_by_type_val_res_not_found ,le_send_att_find_primary_search_loop1 
+1d5c 70443902 jam le_find_by_type_val_res_found_ending_handle ,mem_le_search_res 
+1d5d 68490964 fetcht 2 ,mem_temp 
+1d5e 184085ff increase -1 ,temp 
+1d5f 604909b8 storet 2 ,mem_le_cur_handle_end 
+
+le_send_att_find_primary_search_end:
+1d60 da200005 arg 5 ,rega 
+1d61 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1d62 58000007 setarg attop_find_by_type_value_response 
+1d63 e7e08005 istore 1 ,contw 
+1d64 6fe109b6 fetch 2 ,mem_le_cur_handle_start 
+1d65 e7e10005 istore 2 ,contw 
+1d66 6fe109b8 fetch 2 ,mem_le_cur_handle_end 
+1d67 e7e10005 istore 2 ,contw 
+1d68 20600000 rtn 
+
+le_parse_att_read_by_type_request:
+1d69 20401f03 call le_get_search_handle_start_end_common 
+1d6a 20401f10 call le_get_search_att_type 
+1d6b 20201d6c branch le_send_att_read_by_type_response 
+
+le_send_att_read_by_type_response:
+1d6c 6849099e fetcht 2 ,mem_le_search_handle_start 
+1d6d 60490964 storet 2 ,mem_temp 
+1d6e 20401a4d call le_init_attlist_search 
+1d6f 20401a65 call le_att_get_handle_ptr2 
+1d70 18c08dfe increase -2 ,contr 
+1d71 18c27e00 copy contr ,pdata 
+1d72 67e109b4 store 2 ,mem_le_cur_attlist_start_ptr 
+1d73 684909a3 fetcht 2 ,mem_le_search_att_type 
+1d74 58002a00 setarg uuid_chrctr_device_name 
+1d75 98467c00 isub temp ,null 
+1d76 20229dd3 branch le_send_att_read_by_type_res_device_name ,zero 
+1d77 58002803 setarg uuid_gatt_characteristic 
+1d78 98467c00 isub temp ,null 
+1d79 24229dbf nbranch le_send_att_read_by_type_res_not_characteristic ,zero 
+1d7a d9600002 arg 2 ,timeup 
+
+le_send_att_read_by_type_response_loop:
+1d7b 20401eda call le_att_check_handle_end 
+1d7c 24211d9c nbranch le_send_att_read_by_type_response_end ,positive 
+1d7d 68490964 fetcht 2 ,mem_temp 
+1d7e 20401a90 call le_att_get_handle_info_from_ptr 
+1d7f 243a1d9c nbranch le_send_att_read_by_type_response_end ,blank 
+1d80 20401ede call le_att_same_type 
+1d81 24229d9a nbranch le_send_att_read_by_type_response_next_handle ,zero 
+1d82 24341d9e nbranch le_send_att_read_by_type_res_found_next ,user 
+1d83 78547c00 disable user 
+1d84 da200014 arg 20 ,rega 
+1d85 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1d86 58000009 setarg attop_read_by_type_response 
+1d87 e7e08005 istore 1 ,contw 
+1d88 18a26000 copy contw ,alarm 
+1d89 18a08a01 increase 1 ,contw 
+1d8a 20401dac call le_send_att_read_by_type_write_properties 
+1d8b 20401ed6 call le_att_next_handle 
+1d8c 20401a90 call le_att_get_handle_info_from_ptr 
+1d8d 20401db3 call le_send_att_read_by_type_write_uuid 
+1d8e 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1d8f 1fe0a205 add pdata ,5 ,rega 
+1d90 e2208030 istorer rega ,1 ,alarm 
+1d91 1a267c07 sub rega ,7 ,null 
+1d92 2442fe58 ncall enable_user2 ,zero 
+1d93 2042fe5a call disable_user2 ,zero 
+1d94 20401f08 call le_get_search_max_mtu_data 
+1d95 9a26fc00 idiv rega 
+1d96 20407def call wait_div_end 
+1d97 18079600 quotient timeup 
+1d98 196097ff increase -1 ,timeup 
+1d99 20229d9c branch le_send_att_read_by_type_response_end ,zero 
+
+le_send_att_read_by_type_response_next_handle:
+1d9a 20401ed6 call le_att_next_handle 
+1d9b 20201d7b branch le_send_att_read_by_type_response_loop 
+
+le_send_att_read_by_type_response_end:
+1d9c 20341ec8 branch le_send_att_error_response_notfound ,user 
+1d9d 20201ef7 branch le_send_auto_len_by_mem 
+
+le_send_att_read_by_type_res_found_next:
+1d9e 20401ee9 call le_store_att_record 
+1d9f 20401ed6 call le_att_next_handle 
+1da0 20401a90 call le_att_get_handle_info_from_ptr 
+1da1 20401e5d call le_send_att_read_by_type_res_check_pair_length_type 
+1da2 243a1d9c nbranch le_send_att_read_by_type_response_end ,blank 
+1da3 20407ce2 call get_contw 
+1da4 6fe10964 fetch 2 ,mem_temp 
+1da5 1fe0ffff increase -1 ,pdata 
+1da6 e7e10005 istore 2 ,contw 
+1da7 20401ef3 call le_write_att_record_common 
+1da8 20401db3 call le_send_att_read_by_type_write_uuid 
+1da9 196097ff increase -1 ,timeup 
+1daa 20229d9c branch le_send_att_read_by_type_response_end ,zero 
+1dab 20201d9a branch le_send_att_read_by_type_response_next_handle 
+
+le_send_att_read_by_type_write_properties:
+1dac 6fe10964 fetch 2 ,mem_temp 
+1dad e7e10005 istore 2 ,contw 
+1dae 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1daf 1fe27200 copy pdata ,loopcnt 
+1db0 20407ce5 call get_contr 
+1db1 20407d52 call memcpy_fast 
+1db2 20207ce8 branch store_contw 
+
+le_send_att_read_by_type_write_uuid:
+1db3 20407ce2 call get_contw 
+1db4 6fe10964 fetch 2 ,mem_temp 
+1db5 e7e10005 istore 2 ,contw 
+1db6 20407ce8 call store_contw 
+1db7 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1db8 1fe27200 copy pdata ,loopcnt 
+1db9 20407ce2 call get_contw 
+1dba 20407ce5 call get_contr 
+1dbb 9f260c00 isub loopcnt ,contr 
+1dbc 18c08dff increase -1 ,contr 
+1dbd 20407d52 call memcpy_fast 
+1dbe 20207ce8 branch store_contw 
+
+le_send_att_read_by_type_res_not_characteristic:
+1dbf 20401a75 call le_att_get_short_uuid_ptr 
+1dc0 203a1ec8 branch le_send_att_error_response_notfound ,blank 
+1dc1 18c22600 copy contr ,regc 
+1dc2 18c08dfb increase -5 ,contr 
+1dc3 efe10006 ifetch 2 ,contr 
+1dc4 67e10964 store 2 ,mem_temp 
+1dc5 da200014 arg 20 ,rega 
+1dc6 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1dc7 58000009 setarg attop_read_by_type_response 
+1dc8 e7e08005 istore 1 ,contw 
+1dc9 efe08013 ifetch 1 ,regc 
+1dca 1fe27200 copy pdata ,loopcnt 
+1dcb 1fe0fe02 increase 2 ,pdata 
+1dcc e7e08005 istore 1 ,contw 
+1dcd 6fe10964 fetch 2 ,mem_temp 
+1dce e7e10005 istore 2 ,contw 
+1dcf 1a608c01 add regc ,1 ,contr 
+1dd0 20407d52 call memcpy_fast 
+1dd1 20407ce8 call store_contw 
+1dd2 20201ef7 branch le_send_auto_len_by_mem 
+
+le_send_att_read_by_type_res_device_name:
+1dd3 d8402a00 arg uuid_chrctr_device_name ,temp 
+1dd4 20401a75 call le_att_get_short_uuid_ptr 
+1dd5 207a0000 rtn blank 
+1dd6 18c08dfb increase -5 ,contr 
+1dd7 efe10006 ifetch 2 ,contr 
+1dd8 67e10964 store 2 ,mem_temp 
+1dd9 da200014 arg 20 ,rega 
+1dda 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1ddb 58000009 setarg attop_read_by_type_response 
+1ddc e7e08005 istore 1 ,contw 
+1ddd 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1dde 1fe27200 copy pdata ,loopcnt 
+1ddf 1fe0fe02 increase 2 ,pdata 
+1de0 e7e08005 istore 1 ,contw 
+1de1 6fe10964 fetch 2 ,mem_temp 
+1de2 e7e10005 istore 2 ,contw 
+1de3 d8c042f8 arg mem_le_name ,contr 
+1de4 20407d52 call memcpy_fast 
+1de5 20407ce8 call store_contw 
+1de6 20201ef7 branch le_send_auto_len_by_mem 
+
+le_parse_att_read_request:
+1de7 20401e8d call le_check_encrypt_state 
+1de8 68494437 fetcht 2 ,mem_le_att_handle 
+1de9 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1dea c2819e0c bbit1 bit_ble_read_auth ,le_send_att_read_response_check_auth 
+
+le_send_att_read_response:
+1deb 20401a65 call le_att_get_handle_ptr2 
+1dec 24229ec8 nbranch le_send_att_error_response_notfound ,zero 
+1ded 20541e12 call le_send_att_read_response_check_handle ,user 
+1dee 20740000 rtn user 
+1def 20401a72 call le_att_get_handle_ptr_found 
+1df0 18c08dfe increase -2 ,contr 
+1df1 efe10006 ifetch 2 ,contr 
+1df2 d8402a00 arg uuid_chrctr_device_name ,temp 
+1df3 98467c00 isub temp ,null 
+1df4 20229e02 branch le_send_device_name ,zero 
+1df5 efe08006 ifetch 1 ,contr 
+1df6 1fe67c16 sub pdata ,22 ,null 
+1df7 20211df9 branch le_send_att_read_response_less ,positive 
+1df8 18007e16 force 22 ,pdata 
+
+le_send_att_read_response_less:
+1df9 1fe22600 copy pdata ,regc 
+1dfa 20407ceb call store_contr 
+1dfb 1a60a201 add regc ,1 ,rega 
+1dfc 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1dfd 5800000b setarg attop_read_response 
+1dfe e7e08005 istore 1 ,contw 
+1dff 1a627200 copy regc ,loopcnt 
+1e00 20407ce5 call get_contr 
+1e01 20207d5f branch memcpy 
+
+le_send_device_name:
+1e02 20407ceb call store_contr 
+1e03 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1e04 1fe0a201 add pdata ,1 ,rega 
+1e05 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1e06 5800000b setarg attop_read_response 
+1e07 e7e08005 istore 1 ,contw 
+1e08 6fe0c2f7 fetch 1 ,mem_le_name_len 
+1e09 1fe27200 copy pdata ,loopcnt 
+1e0a d8c042f8 arg mem_le_name ,contr 
+1e0b 20207d5f branch memcpy 
+
+le_send_att_read_response_check_auth:
+1e0c 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+1e0d 98467c00 isub temp ,null 
+1e0e 24229deb nbranch le_send_att_read_response ,zero 
+1e0f 24341deb nbranch le_send_att_read_response ,user 
+
+le_send_att_read_response_error_insufficient_auth:
+1e10 7002d805 jam att_err_insufficient_authentication ,mem_le_err_code 
+1e11 20201ec9 branch le_send_att_error_response 
+
+le_send_att_read_response_check_handle:
+1e12 18c08dfe increase -2 ,contr 
+1e13 efe10006 ifetch 2 ,contr 
+1e14 c2871e10 bbit1 bit_of_att_handle_read_authenticated ,le_send_att_read_response_error_insufficient_auth 
+1e15 20207e56 branch disable_user 
+
+le_parse_att_read_blob_request:
+1e16 efe10006 ifetch 2 ,contr 
+1e17 67e109a2 store 2 ,mem_le_att_offset 
+
+le_send_att_read_blob_response:
+1e18 da200014 arg 20 ,rega 
+1e19 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1e1a 5800000d setarg attop_read_blob_response 
+1e1b e7e08005 istore 1 ,contw 
+1e1c 6fe109a2 fetch 2 ,mem_le_att_offset 
+1e1d 98002200 iforce rega 
+1e1e 68494437 fetcht 2 ,mem_le_att_handle 
+1e1f 20401a62 call le_att_get_handle_ptr 
+1e20 203a1ec8 branch le_send_att_error_response_notfound ,blank 
+1e21 efe08006 ifetch 1 ,contr 
+1e22 9a267200 isub rega ,loopcnt 
+1e23 24211ec8 nbranch le_send_att_error_response_notfound ,positive 
+1e24 1f267c16 sub loopcnt ,22 ,null 
+1e25 20211e27 branch le_send_att_read_blob_response_less ,positive 
+1e26 18007216 force 22 ,loopcnt 
+
+le_send_att_read_blob_response_less:
+1e27 1a227e00 deposit rega 
+1e28 98c08c00 iadd contr ,contr 
+1e29 20407d52 call memcpy_fast 
+1e2a 20407ce8 call store_contw 
+1e2b 20201ef7 branch le_send_auto_len_by_mem 
+
+le_parse_att_read_by_group_type_request:
+1e2c 20401f03 call le_get_search_handle_start_end_common 
+1e2d 20401f10 call le_get_search_att_type 
+1e2e 20201e2f branch le_send_att_read_by_group_type_response 
+
+le_send_att_read_by_group_type_response:
+1e2f d9600002 arg 2 ,timeup 
+1e30 6849099e fetcht 2 ,mem_le_search_handle_start 
+1e31 60490964 storet 2 ,mem_temp 
+1e32 20401a65 call le_att_get_handle_ptr2 
+1e33 18c08dfe increase -2 ,contr 
+1e34 18c27e00 copy contr ,pdata 
+1e35 67e109b4 store 2 ,mem_le_cur_attlist_start_ptr 
+
+le_send_att_read_by_group_type_response_loop:
+1e36 20401eda call le_att_check_handle_end 
+1e37 24211e65 nbranch le_send_att_read_by_group_type_end0 ,positive 
+1e38 68490964 fetcht 2 ,mem_temp 
+1e39 20401a90 call le_att_get_handle_info_from_ptr 
+1e3a 243a1e68 nbranch le_send_att_read_by_group_type_end1 ,blank 
+1e3b 20401ede call le_att_same_type 
+1e3c 24229e5b nbranch le_send_att_read_by_group_type_next_handle ,zero 
+1e3d 19627e00 copy timeup ,pdata 
+1e3e c0001e68 beq 0 ,le_send_att_read_by_group_type_end1 
+1e3f 24341e51 nbranch le_send_att_read_by_group_type_store_write_record ,user 
+1e40 78547c00 disable user 
+1e41 da200014 arg 20 ,rega 
+1e42 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1e43 58000011 setarg attop_read_by_group_type_response 
+1e44 e7e08005 istore 1 ,contw 
+1e45 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1e46 1fe0a204 add pdata ,4 ,rega 
+1e47 e2208005 istorer rega ,1 ,contw 
+1e48 20407ce8 call store_contw 
+1e49 1a267c06 sub rega ,6 ,null 
+1e4a 2442fe58 ncall enable_user2 ,zero 
+1e4b 2042fe5a call disable_user2 ,zero 
+1e4c 20401f08 call le_get_search_max_mtu_data 
+1e4d 9a26fc00 idiv rega 
+1e4e 20407def call wait_div_end 
+1e4f 18079600 quotient timeup 
+1e50 20201e57 branch le_send_att_read_by_group_type_store_record 
+
+le_send_att_read_by_group_type_store_write_record:
+1e51 20401e5f call le_send_att_read_by_group_type_check_pair_length_type 
+1e52 243a1e68 nbranch le_send_att_read_by_group_type_end1 ,blank 
+1e53 6fe10964 fetch 2 ,mem_temp 
+1e54 1fe0ffff increase -1 ,pdata 
+1e55 67e109b8 store 2 ,mem_le_cur_handle_end 
+1e56 20401eee call le_write_att_record 
+
+le_send_att_read_by_group_type_store_record:
+1e57 6fe10964 fetch 2 ,mem_temp 
+1e58 67e109b6 store 2 ,mem_le_cur_handle_start 
+1e59 20401ee9 call le_store_att_record 
+1e5a 196097ff increase -1 ,timeup 
+
+le_send_att_read_by_group_type_next_handle:
+1e5b 20401ed6 call le_att_next_handle 
+1e5c 20201e36 branch le_send_att_read_by_group_type_response_loop 
+
+le_send_att_read_by_type_res_check_pair_length_type:
+1e5d 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1e5e 20201e60 branch le_send_att_read_by_group_type_check_pair_length_type + 1 
+
+le_send_att_read_by_group_type_check_pair_length_type:
+1e5f 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1e60 20361e63 branch le_send_att_read_by_group_type_check_pair_length_type_16byte ,user2 
+1e61 1fe0fffe increase -2 ,pdata 
+1e62 20600000 rtn 
+
+le_send_att_read_by_group_type_check_pair_length_type_16byte:
+1e63 1fe0fff0 increase -16 ,pdata 
+1e64 20600000 rtn 
+
+le_send_att_read_by_group_type_end0:
+1e65 6fe10964 fetch 2 ,mem_temp 
+1e66 67e109b8 store 2 ,mem_le_cur_handle_end 
+1e67 20201e6c branch le_send_att_read_by_group_type_end_common 
+
+le_send_att_read_by_group_type_end1:
+1e68 6fe10964 fetch 2 ,mem_temp 
+1e69 1fe0ffff increase -1 ,pdata 
+1e6a 67e109b8 store 2 ,mem_le_cur_handle_end 
+1e6b 20201e6c branch le_send_att_read_by_group_type_end_common 
+
+le_send_att_read_by_group_type_end_common:
+1e6c 20341ec8 branch le_send_att_error_response_notfound ,user 
+1e6d 20401eee call le_write_att_record 
+1e6e 20201ef7 branch le_send_auto_len_by_mem 
+
+le_parse_att_write_request:
+1e6f 18c22200 copy contr ,rega 
+1e70 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e71 1fe0a5fd add pdata ,-3 ,regb 
+1e72 20401a25 call le_writeatt_cb 
+
+le_send_att_write_response_check_auth:
+1e73 20401e8d call le_check_encrypt_state 
+1e74 68494437 fetcht 2 ,mem_le_att_handle 
+1e75 20401a65 call le_att_get_handle_ptr2 
+1e76 24229e8b nbranch le_send_att_write_response_error_invalid_handle ,zero 
+1e77 20541e87 call le_send_att_write_response_check_handle ,user 
+1e78 20740000 rtn user 
+1e79 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1e7a c3021e82 bbit0 bit_ble_write_auth ,le_send_att_write_response 
+1e7b 68494437 fetcht 2 ,mem_le_att_handle 
+1e7c 6fe143d1 fetch 2 ,mem_le_pairing_handle 
+1e7d 98467c00 isub temp ,null 
+1e7e 24229e82 nbranch le_send_att_write_response ,zero 
+1e7f 20401e8d call le_check_encrypt_state 
+1e80 24341e82 nbranch le_send_att_write_response ,user 
+1e81 20201e10 branch le_send_att_read_response_error_insufficient_auth 
+
+le_send_att_write_response:
+1e82 18002201 force 1 ,rega 
+1e83 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1e84 58000013 setarg attop_write_response 
+1e85 e7e08005 istore 1 ,contw 
+1e86 20600000 rtn 
+
+le_send_att_write_response_check_handle:
+1e87 18c08dfe increase -2 ,contr 
+1e88 efe10006 ifetch 2 ,contr 
+1e89 c2879e10 bbit1 bit_of_att_handle_write_authenticated ,le_send_att_read_response_error_insufficient_auth 
+1e8a 20207e56 branch disable_user 
+
+le_send_att_write_response_error_invalid_handle:
+1e8b 7002d801 jam att_err_invalid_handle ,mem_le_err_code 
+1e8c 20201ec9 branch le_send_att_error_response 
+
+le_check_encrypt_state:
+1e8d 20407e56 call disable_user 
+1e8e 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1e8f c1000000 rtneq le_pairing_mode_none 
+1e90 6fe0c040 fetch 1 ,mem_context 
+1e91 c3820000 rtnbit1 lestate_encryption 
+1e92 20207e54 branch enable_user 
+
+le_parse_att_prepare_write_request:
+1e93 18c0a202 add contr ,2 ,rega 
+1e94 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e95 1fe0a5fb add pdata ,-5 ,regb 
+1e96 20401a25 call le_writeatt_cb 
+1e97 20201e98 branch le_send_att_prepare_write_response 
+
+le_send_att_prepare_write_response:
+1e98 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1e99 1fe22200 copy pdata ,rega 
+1e9a 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1e9b 58000017 setarg attop_prepare_write_response 
+1e9c e7e08005 istore 1 ,contw 
+1e9d 6fe14437 fetch 2 ,mem_le_att_handle 
+1e9e e7e10005 istore 2 ,contw 
+1e9f 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1ea0 1fe0f3fb add pdata ,-5 ,loopcnt 
+1ea1 6fe143d8 fetch 2 ,mem_le_payload_ptr 
+1ea2 1fe08c07 add pdata ,7 ,contr 
+1ea3 efe10006 ifetch 2 ,contr 
+1ea4 e7e10005 istore 2 ,contw 
+1ea5 20207d52 branch memcpy_fast 
+
+le_parse_att_execute_write_request:
+
+le_send_att_execute_write_response:
+1ea6 18002201 force 1 ,rega 
+1ea7 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1ea8 58000019 setarg attop_execute_write_response 
+1ea9 e7e08005 istore 1 ,contw 
+1eaa 20600000 rtn 
+
+le_parse_handle_value_confirmation:
+1eab 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1eac 793ffe00 set0 ble_l2cap_recv_confirmation_packet ,pdata 
+1ead 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1eae 20600000 rtn 
+
+le_parse_att_write_command:
+1eaf 18c22200 copy contr ,rega 
+1eb0 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1eb1 1fe0a5fd add pdata ,-3 ,regb 
+1eb2 20201a25 branch le_writeatt_cb 
+
+le_att_malloc_tx_notify:
+1eb3 18422600 copy temp ,regc 
+1eb4 1a20a203 increase 3 ,rega 
+1eb5 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1eb6 1a20a3fd increase -3 ,rega 
+1eb7 5800001b setarg attop_handle_value_notification 
+1eb8 e7e08005 istore 1 ,contw 
+1eb9 1a620400 copy regc ,temp 
+1eba e0410005 istoret 2 ,contw 
+1ebb 20600000 rtn 
+
+le_att_malloc_tx_indication:
+1ebc 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1ebd 79207e00 set1 ble_l2cap_send_indication_packet ,pdata 
+1ebe 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1ebf 18422600 copy temp ,regc 
+1ec0 1a20a203 increase 3 ,rega 
+1ec1 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1ec2 1a20a3fd increase -3 ,rega 
+1ec3 5800001d setarg attop_handle_value_indication 
+1ec4 e7e08005 istore 1 ,contw 
+1ec5 1a620400 copy regc ,temp 
+1ec6 e0410005 istoret 2 ,contw 
+1ec7 20600000 rtn 
+
+le_send_att_error_response_notfound:
+1ec8 7002d80a jam att_err_attribute_not_found ,mem_le_err_code 
+
+le_send_att_error_response:
+1ec9 18002205 force 5 ,rega 
+1eca 20401ed4 call le_fifo_malloc_tx_l2cap_gatt 
+1ecb 58000001 setarg attop_error_response 
+1ecc e7e08005 istore 1 ,contw 
+1ecd 6fe0c436 fetch 1 ,mem_le_att_opcode 
+1ece e7e08005 istore 1 ,contw 
+1ecf 6fe14437 fetch 2 ,mem_le_att_handle 
+1ed0 e7e10005 istore 2 ,contw 
+1ed1 6fe082d8 fetch 1 ,mem_le_err_code 
+1ed2 e7e08005 istore 1 ,contw 
+1ed3 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap_gatt:
+1ed4 18002404 force le_l2cap_cid_att ,regb 
+1ed5 20201b4d branch le_fifo_malloc_tx_l2cap 
+
+le_att_next_handle:
+1ed6 68490964 fetcht 2 ,mem_temp 
+1ed7 18408401 increase 1 ,temp 
+1ed8 60490964 storet 2 ,mem_temp 
+1ed9 20600000 rtn 
+
+le_att_check_handle_end:
+1eda 68490964 fetcht 2 ,mem_temp 
+1edb 6fe109a0 fetch 2 ,mem_le_search_handle_end 
+1edc 98467c00 isub temp ,null 
+1edd 20600000 rtn 
+
+le_att_same_type:
+1ede 684889a2 fetcht 1 ,mem_le_search_att_type_length 
+1edf da2009a3 arg mem_le_search_att_type ,rega 
+
+le_att_check_same_common:
+1ee0 6fe089ba fetch 1 ,mem_le_cur_uuid_length 
+1ee1 1fe27200 copy pdata ,loopcnt 
+1ee2 98467c00 isub temp ,null 
+1ee3 24628000 nrtn zero 
+1ee4 da4009bb arg mem_le_cur_uuid ,regb 
+1ee5 20207df1 branch string_compare 
+
+le_att_same_uuid:
+1ee6 6848c359 fetcht 1 ,mem_le_search_uuid_length 
+1ee7 da20435a arg mem_le_search_uuid ,rega 
+1ee8 20201ee0 branch le_att_check_same_common 
+
+le_store_att_record:
+1ee9 6fe089b3 fetch 1 ,mem_le_curr_att_len 
+1eea 67e08a01 store 1 ,mem_tmp_buffer 
+1eeb 1fe27200 copy pdata ,loopcnt 
+1eec 20407ce5 call get_contr 
+1eed 20207d52 branch memcpy_fast 
+
+le_write_att_record:
+1eee 20407ce2 call get_contw 
+1eef 6fe109b6 fetch 2 ,mem_le_cur_handle_start 
+1ef0 e7e10005 istore 2 ,contw 
+1ef1 6fe109b8 fetch 2 ,mem_le_cur_handle_end 
+1ef2 e7e10005 istore 2 ,contw 
+
+le_write_att_record_common:
+1ef3 6fe08a01 fetch 1 ,mem_tmp_buffer 
+1ef4 1fe27200 copy pdata ,loopcnt 
+1ef5 20407d52 call memcpy_fast 
+1ef6 20207ce8 branch store_contw 
+
+le_send_auto_len_by_mem:
+1ef7 20407ce2 call get_contw 
+1ef8 20401b70 call le_fifo_get_last_att_ptr 
+1ef9 18a27e00 copy contw ,pdata 
+1efa 98c62200 isub contr ,rega 
+1efb 20401b73 call le_fifo_get_last_l2cap_ptr 
+1efc 1a227e00 copy rega ,pdata 
+1efd e7e10006 istore 2 ,contr 
+1efe 1a20a204 increase 4 ,rega 
+1eff 20401b65 call le_fifo_get_last_tx_ptr 
+1f00 1a227e00 copy rega ,pdata 
+1f01 e7e08006 istore 1 ,contr 
+1f02 20600000 rtn 
+
+le_get_search_handle_start_end_common:
+1f03 1fecfe00 rshift8 pdata ,pdata 
+1f04 67e1099e store 2 ,mem_le_search_handle_start 
+1f05 efe10006 ifetch 2 ,contr 
+1f06 67e109a0 store 2 ,mem_le_search_handle_end 
+1f07 20600000 rtn 
+
+le_get_search_max_mtu_data:
+1f08 6fe14382 fetch 2 ,mem_le_remote_mtu 
+1f09 1fe0fffe increase -2 ,pdata 
+1f0a 68494380 fetcht 2 ,mem_le_local_mtu 
+1f0b 184085fe increase -2 ,temp 
+1f0c 20407e4a call not_greater_than 
+1f0d d84000f0 arg 240 ,temp 
+1f0e 20407e4a call not_greater_than 
+1f0f 20600000 rtn 
+
+le_get_search_att_type:
+1f10 20407ceb call store_contr 
+1f11 d8a009a2 arg mem_le_search_att_type_length ,contw 
+
+le_get_search_common:
+1f12 6fe143d4 fetch 2 ,mem_le_l2cap_size 
+1f13 1fe0fffb increase -5 ,pdata 
+
+le_get_search_common2:
+1f14 e7e08005 istore 1 ,contw 
+1f15 1fe27200 copy pdata ,loopcnt 
+1f16 20407ce5 call get_contr 
+1f17 20207d52 branch memcpy_fast 
+
+le_parse_writing_attribute_start:
+1f18 6fe1016f fetch 2 ,mem_le_rxbuf_data_att_cid 
+1f19 c1820000 rtnne le_l2cap_cid_att 
+1f1a 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1f1b 79207e01 set1 ble_l2cap_deal_with_continue_packet ,pdata 
+1f1c 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1f1d 6fe18171 fetch 3 ,mem_le_rxbuf_data_att_opcode 
+1f1e 67e1c436 store 3 ,mem_le_att_opcode 
+1f1f 7920000f set1 mark_old_packet ,mark 
+1f20 c0091f33 beq attop_write_request ,le_parse_attribute_write_request 
+1f21 c0291f38 beq attop_write_command ,le_parse_attribute_write_command 
+1f22 c00c1ea6 beq attop_execute_write_request ,le_parse_att_execute_write_request 
+1f23 c0011ce8 beq attop_exchange_mtu_request ,le_parse_att_exchange_mtu_request 
+1f24 c00f1eab beq attop_handle_value_confirmation ,le_parse_handle_value_confirmation 
+1f25 793f800f set0 mark_old_packet ,mark 
+
+le_clear_l2cap_att_states_deal_with_contiune_packet:
+1f26 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1f27 793ffe01 set0 ble_l2cap_deal_with_continue_packet ,pdata 
+1f28 67e0c435 store 1 ,mem_le_l2cap_att_states 
+1f29 20600000 rtn 
+
+le_parse_writing_attribute_continue:
+1f2a 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+1f2b c4008000 rtnbit0 ble_l2cap_deal_with_continue_packet 
+1f2c 7920000f set1 mark_old_packet ,mark 
+1f2d 20401f42 call le_parse_l2cap_continue_common 
+1f2e 20401f48 call le_parse_attribute_check_complete_packet 
+1f2f 20541f26 call le_clear_l2cap_att_states_deal_with_contiune_packet ,user 
+1f30 6fe0c436 fetch 1 ,mem_le_att_opcode 
+1f31 c0091e73 beq attop_write_request ,le_send_att_write_response_check_auth 
+1f32 20600000 rtn 
+
+le_parse_attribute_write_request:
+1f33 20401f38 call le_parse_attribute_write_command 
+1f34 20201f35 branch le_send_attribute_write_response_check_auth 
+
+le_send_attribute_write_response_check_auth:
+1f35 20401f48 call le_parse_attribute_check_complete_packet 
+1f36 24740000 nrtn user 
+1f37 20201e73 branch le_send_att_write_response_check_auth 
+
+le_parse_attribute_write_command:
+1f38 20401f3b call le_parse_attribute_check_complete_packet_init 
+1f39 da200174 arg mem_le_rxbuf_data_att_write_payload ,rega 
+1f3a 20201a25 branch le_writeatt_cb 
+
+le_parse_attribute_check_complete_packet_init:
+1f3b 6fe0816c fetch 1 ,mem_le_rxbuf_data_att_write_length 
+1f3c 1fe0a5f9 add pdata ,-7 ,regb 
+1f3d 1fe0fffc increase -4 ,pdata 
+1f3e 67e143d6 store 2 ,mem_le_packet_len_recved 
+1f3f 6849016d fetcht 2 ,mem_le_rxbuf_data_att_write_l2cap_length 
+1f40 604943d4 storet 2 ,mem_le_l2cap_size 
+1f41 20600000 rtn 
+
+le_parse_l2cap_continue_common:
+1f42 6a40816c fetchr regb ,1 ,mem_le_rxbuf_data_continue_length 
+1f43 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+1f44 9a408400 iadd regb ,temp 
+1f45 604943d6 storet 2 ,mem_le_packet_len_recved 
+1f46 da20016d arg mem_le_rxbuf_data_continue_payload ,rega 
+1f47 20201a25 branch le_writeatt_cb 
+
+le_parse_attribute_check_complete_packet:
+1f48 20407e56 call disable_user 
+1f49 6fe143d6 fetch 2 ,mem_le_packet_len_recved 
+1f4a 684943d4 fetcht 2 ,mem_le_l2cap_size 
+1f4b 98467c00 isub temp ,null 
+1f4c 24628000 nrtn zero 
+1f4d 20207e54 branch enable_user 
+
+le_parse_signaling:
+1f4e efe08006 ifetch 1 ,contr 
+1f4f e8408006 ifetcht 1 ,contr 
+1f50 e8410006 ifetcht 2 ,contr 
+1f51 c0099f53 beq l2cap_connection_parameter_update_response ,le_l2cap_parse_conn_parameter_update_rsp 
+1f52 20600000 rtn 
+
+le_l2cap_parse_conn_parameter_update_rsp:
+1f53 efe10006 ifetch 2 ,contr 
+1f54 67e143db store 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+1f55 70095b40 jam bt_evt_le_parse_conn_papa_update_rsp ,mem_fifo_temp 
+1f56 20207871 branch ui_ipc_send_event 
+
+le_l2cap_tx_update_req:
+1f57 da20000c arg 0x0c ,rega 
+1f58 da600012 arg l2cap_connection_parameter_update_request ,regc 
+1f59 20401f5f call le_fifo_malloc_tx_l2cap_signaling 
+1f5a 58000008 setarg 0x08 
+1f5b e7e10005 istore 2 ,contw 
+1f5c 6fe44372 fetch 8 ,mem_le_interval_min 
+1f5d e7e40005 istore 8 ,contw 
+1f5e 20600000 rtn 
+
+le_fifo_malloc_tx_l2cap_signaling:
+1f5f 20401f67 call le_l2cap_update_signaling_identifier 
+1f60 da400005 arg le_l2cap_cid_signal ,regb 
+1f61 20401b4d call le_fifo_malloc_tx_l2cap 
+1f62 1a627e00 copy regc ,pdata 
+1f63 e7e08005 istore 1 ,contw 
+1f64 6fe0c3da fetch 1 ,mem_le_signaling_identifier 
+1f65 e7e08005 istore 1 ,contw 
+1f66 20600000 rtn 
+
+le_l2cap_update_signaling_identifier:
+1f67 6fe0c3da fetch 1 ,mem_le_signaling_identifier 
+1f68 1fe0fe01 pincrease 1 
+1f69 67e0c3da store 1 ,mem_le_signaling_identifier 
+1f6a c1800000 rtnne 0 
+
+le_l2cap_reset_signaling_identifier:
+1f6b 7043da01 jam 1 ,mem_le_signaling_identifier 
+1f6c 20600000 rtn 
+
+le_pairing_mode_init:
+1f6d 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1f6e c0001f7c beq le_pairing_mode_none ,le_set_no_pairing 
+1f6f c0009f7f beq le_pairing_mode_lagacy_justwork ,le_set_pairing_mode_lagacy_just_work 
+1f70 c0011f81 beq le_pairing_mode_lagacy_passkey ,le_set_pairing_mode_lagacy_passkey 
+1f71 c0409f75 beq le_pairing_mode_secure_connect_justwork ,le_set_pairing_mode_secure_justwork 
+1f72 c0411f77 beq le_pairing_mode_secure_connect_numeric ,le_set_pairing_mode_secure_numeric 
+1f73 c0419f7a beq le_pairing_mode_secure_connect_passkey ,le_set_pairing_mode_secure_passkey 
+1f74 20600000 rtn 
+
+le_set_pairing_mode_secure_justwork:
+1f75 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+1f76 20201f7d branch le_set_noinputnooutput 
+
+le_set_pairing_mode_secure_numeric:
+1f77 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+1f78 70435101 jam flag_iocap_displayyesno ,mem_le_pres_iocap 
+1f79 20600000 rtn 
+
+le_set_pairing_mode_secure_passkey:
+1f7a 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+1f7b 20201f82 branch le_set_displayonly 
+
+le_set_no_pairing:
+1f7c 70435300 jam flag_le_no_bonding_no_mitm ,mem_le_pres_auth 
+
+le_set_noinputnooutput:
+1f7d 70435103 jam flag_iocap_noinputnooutput ,mem_le_pres_iocap 
+1f7e 20600000 rtn 
+
+le_set_pairing_mode_lagacy_just_work:
+1f7f 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+1f80 20201f7d branch le_set_noinputnooutput 
+
+le_set_pairing_mode_lagacy_passkey:
+1f81 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+
+le_set_displayonly:
+1f82 70435100 jam flag_iocap_displayonly ,mem_le_pres_iocap 
+1f83 20600000 rtn 
+
+le_secure_connection_enable:
+1f84 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+1f85 79207e00 set1 secure_connections_le_bit ,pdata 
+1f86 67e0c6b8 store 1 ,mem_secure_connections_enable 
+1f87 20600000 rtn 
+
+le_secure_connection_disable:
+1f88 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+1f89 793ffe00 set0 secure_connections_le_bit ,pdata 
+1f8a 67e0c6b8 store 1 ,mem_secure_connections_enable 
+1f8b 20600000 rtn 
+
+le_parse_smp:
+1f8c efe08006 ifetch 1 ,contr 
+1f8d c0009fa0 beq smp_pairing_request ,le_parse_smp_pairing_request 
+1f8e c0019fc7 beq smp_pairing_confirm ,le_parse_smp_pairing_confirm 
+1f8f c0021fe8 beq smp_pairing_random ,le_parse_smp_pairing_random 
+1f90 c0029ff5 beq smp_pairing_failed ,le_parse_smp_pairing_failed 
+1f91 c003a05d beq smp_master_identification ,le_parse_smp_master_identification 
+1f92 c0042049 beq smp_identity_information ,le_parse_smp_identity_information 
+1f93 c004a059 beq smp_identity_address_information ,le_parse_smp_identity_address_information 
+1f94 c005205d beq smp_signing_information ,le_parse_smp_signing_information 
+1f95 c005a05d beq smp_security_request ,le_parse_smp_security_request 
+1f96 c006205e beq smp_pairing_public_key ,le_parse_smp_public_key 
+1f97 c006a063 beq smp_pairing_dhkey_check ,le_parse_smp_dhkey_check 
+1f98 20600000 rtn 
+
+le_send_smp_security_request:
+1f99 18002202 force 2 ,rega 
+1f9a 20402109 call le_fifo_malloc_tx_l2cap_smp 
+1f9b 5800000b setarg smp_security_request 
+1f9c e7e08005 istore 1 ,contw 
+1f9d 6fe0c353 fetch 1 ,mem_le_pres_auth 
+1f9e e7e08005 istore 1 ,contw 
+1f9f 20600000 rtn 
+
+le_parse_smp_pairing_request:
+1fa0 67e0c349 store 1 ,mem_le_preq 
+1fa1 efe30006 ifetch 6 ,contr 
+1fa2 e7e30005 istore 6 ,contw 
+1fa3 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fa4 c0001ffa beq le_pairing_mode_none ,le_smp_pairing_fail_reason_not_support_pairing 
+1fa5 20401fc2 call le_send_smp_pairing_response 
+1fa6 6fe0c6b6 fetch 1 ,mem_sc_only_mode 
+1fa7 203a1fac branch le_parse_smp_pairing_request2 ,blank 
+1fa8 6fe0c34c fetch 1 ,mem_le_preq_auth 
+1fa9 c301b20f bbit0 le_auth_secure_connection_pairing_bit ,app_ble_disconnect 
+1faa 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fab c303b20f bbit0 le_pairing_mode_secure_connect_bit ,app_ble_disconnect 
+
+le_parse_smp_pairing_request2:
+1fac 70439b03 jam flag_le_pairing_rcv_pairing_req ,mem_le_pairing_state 
+1fad 6fe0c34a fetch 1 ,mem_le_preq_iocap 
+1fae c0001fb4 beq flag_iocap_displayonly ,le_set_tk_0 
+1faf c0009fb4 beq flag_iocap_displayyesno ,le_set_tk_0 
+1fb0 c0019fb4 beq flag_iocap_noinputnooutput ,le_set_tk_0 
+1fb1 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fb2 c0011fb7 beq le_pairing_mode_lagacy_passkey ,le_parse_smp_pairing_req_passkey 
+1fb3 c1418000 rtneq le_pairing_mode_secure_connect_passkey 
+
+le_set_tk_0:
+1fb4 dfe00000 arg 0 ,pdata 
+1fb5 67e2439e store 4 ,mem_le_tk 
+1fb6 20600000 rtn 
+
+le_parse_smp_pairing_req_passkey:
+1fb7 6fe0c3c0 fetch 1 ,mem_le_configuration 
+1fb8 c2801fc0 bbit1 bit_ble_passkey_fixed_key ,le_parse_smp_pairing_req_fixed_passkey 
+
+le_genernate_tk:
+1fb9 da20439e arg mem_le_tk ,rega 
+1fba 1a220a00 copy rega ,contw 
+1fbb df200003 arg 3 ,loopcnt 
+1fbc 20405a32 call generate_random_loop 
+1fbd 6fe143a0 fetch 2 ,mem_le_tk + 2 
+1fbe 1fe17e07 and_into 0x7 ,pdata 
+1fbf 67e143a0 store 2 ,mem_le_tk + 2 
+
+le_parse_smp_pairing_req_fixed_passkey:
+1fc0 70095b34 jam bt_evt_le_tk_generate ,mem_fifo_temp 
+1fc1 20207871 branch ui_ipc_send_event 
+
+le_send_smp_pairing_response:
+1fc2 18002207 force 7 ,rega 
+1fc3 20402109 call le_fifo_malloc_tx_l2cap_smp 
+1fc4 6fe3c350 fetch 7 ,mem_le_pres 
+1fc5 e7e38005 istore 7 ,contw 
+1fc6 20600000 rtn 
+
+le_parse_smp_pairing_confirm:
+1fc7 70439b05 jam flag_le_pairing_receive_pairing_confirm ,mem_le_pairing_state 
+1fc8 d8a04327 arg mem_le_rconfirm ,contw 
+1fc9 20407d0c call memcpy16 
+1fca 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fcb c0419fcf beq le_pairing_mode_secure_connect_passkey ,le_parse_smp_pairing_confirm_secure_passkey 
+1fcc c0021fd2 beq le_pairing_mode_lagacy_passkey_res_input ,le_parse_smp_pairing_confirm_passkey_res_input 
+1fcd c0421fd4 beq le_pairing_mode_secure_connect_passkey_res_input ,le_parse_smp_pairing_confirm_sc_passkey_res_input 
+1fce 20201fd7 branch le_send_smp_pairing_confirm 
+
+le_parse_smp_pairing_confirm_secure_passkey:
+1fcf 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+1fd0 70439908 jam le_sc_stat_passkey_wait_confirm ,mem_le_secure_connect_state 
+1fd1 20600000 rtn 
+
+le_parse_smp_pairing_confirm_passkey_res_input:
+1fd2 70095b43 jam bt_evt_le_get_passkey ,mem_fifo_temp 
+1fd3 20207871 branch ui_ipc_send_event 
+
+le_parse_smp_pairing_confirm_sc_passkey_res_input:
+1fd4 6fe2439e fetch 4 ,mem_le_tk 
+1fd5 203a1fd2 branch le_parse_smp_pairing_confirm_passkey_res_input ,blank 
+1fd6 20201fcf branch le_parse_smp_pairing_confirm_secure_passkey 
+
+le_send_smp_pairing_confirm:
+1fd7 70439b06 jam flag_le_pairing_send_pairing_confirm ,mem_le_pairing_state 
+1fd8 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fd9 c2839fe0 bbit1 le_pairing_mode_secure_connect_bit ,le_send_smp_pairing_confirm_sc 
+1fda 20406c52 call generate_confirm 
+1fdb 18002211 force 17 ,rega 
+1fdc 20402109 call le_fifo_malloc_tx_l2cap_smp 
+1fdd 58000003 setarg smp_pairing_confirm 
+1fde e7e08005 istore 1 ,contw 
+1fdf 20206dd1 branch store_aes_result 
+
+le_send_smp_pairing_confirm_sc:
+1fe0 d8a04337 arg mem_le_srand ,contw 
+1fe1 20405a31 call generate_random 
+1fe2 20406a7b call function_f4_cb 
+1fe3 18002211 force 17 ,rega 
+1fe4 20402109 call le_fifo_malloc_tx_l2cap_smp 
+1fe5 58000003 setarg smp_pairing_confirm 
+1fe6 e7e08005 istore 1 ,contw 
+1fe7 20206ab7 branch load_inverse_result 
+
+le_parse_smp_pairing_random:
+1fe8 18c22200 copy contr ,rega 
+1fe9 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+1fea c2839ffc bbit1 le_pairing_mode_secure_connect_bit ,le_parse_smp_pairing_random_sc 
+1feb 1a220c00 copy rega ,contr 
+1fec 20406c4a call authenticate_rconfirm 
+1fed 2022a011 branch le_parse_smp_pairing_random_success ,zero 
+
+le_send_pairing_confirm_value_failed:
+1fee 7002d904 jam pairing_failed_confirm_value_failed ,mem_le_ll_pairing_fail_reason 
+
+le_send_pairing_failed:
+1fef 18002202 force 2 ,rega 
+1ff0 20402109 call le_fifo_malloc_tx_l2cap_smp 
+1ff1 58000005 setarg smp_pairing_failed 
+1ff2 e7e08005 istore 1 ,contw 
+1ff3 6fe082d9 fetch 1 ,mem_le_ll_pairing_fail_reason 
+1ff4 e7e08005 istore 1 ,contw 
+
+le_parse_smp_pairing_failed:
+1ff5 18000e0a force smp_pairing_timer ,queue 
+1ff6 20407d65 call timer_stop 
+1ff7 70439b00 jam flag_le_pairing_null ,mem_le_pairing_state 
+1ff8 70095b30 jam bt_evt_le_pairing_fail ,mem_fifo_temp 
+1ff9 20207871 branch ui_ipc_send_event 
+
+le_smp_pairing_fail_reason_not_support_pairing:
+1ffa 7002d905 jam pairing_failed_pairing_not_supported ,mem_le_ll_pairing_fail_reason 
+1ffb 20201fef branch le_send_pairing_failed 
+
+le_parse_smp_pairing_random_sc:
+1ffc d8a00277 arg mem_le_mrand ,contw 
+1ffd 1a220c00 copy rega ,contr 
+1ffe 20407d0c call memcpy16 
+1fff 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+2000 c041a008 beq le_pairing_mode_secure_connect_passkey ,le_parse_smp_pairing_random_sc_passkey 
+2001 c0422008 beq le_pairing_mode_secure_connect_passkey_res_input ,le_parse_smp_pairing_random_sc_passkey 
+2002 20406a05 call function_g2 
+2003 20402016 call le_send_smp_pairing_random 
+2004 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+2005 c1c10000 rtnne le_pairing_mode_secure_connect_numeric 
+2006 70095b3b jam bt_evt_le_gkey_generate ,mem_fifo_temp 
+2007 20207871 branch ui_ipc_send_event 
+
+le_parse_smp_pairing_random_sc_passkey:
+2008 20406a70 call function_f4_ca 
+2009 d8a009be arg mem_aes_cmac_temp ,contw 
+200a 20406ab7 call load_inverse_result 
+200b da2009be arg mem_aes_cmac_temp ,rega 
+200c da404327 arg mem_le_rconfirm ,regb 
+200d df200010 arg 16 ,loopcnt 
+200e 20407df1 call string_compare 
+200f 24229fee nbranch le_send_pairing_confirm_value_failed ,zero 
+2010 20202016 branch le_send_smp_pairing_random 
+
+le_parse_smp_pairing_random_success:
+2011 20406c46 call generate_stk 
+2012 70095b31 jam bt_evt_le_pairing_success ,mem_fifo_temp 
+2013 20407871 call ui_ipc_send_event 
+2014 70432601 jam 1 ,mem_ltk_exists 
+2015 70439b09 jam flag_le_pairing_after_auth ,mem_le_pairing_state 
+
+le_send_smp_pairing_random:
+2016 18002211 force 17 ,rega 
+2017 20402109 call le_fifo_malloc_tx_l2cap_smp 
+2018 58000004 setarg smp_pairing_random 
+2019 e7e08005 istore 1 ,contw 
+201a d8c04337 arg mem_le_srand ,contr 
+201b 20207d0c branch memcpy16 
+
+le_send_smp_encryption_information:
+201c 18002211 force 17 ,rega 
+201d 20402109 call le_fifo_malloc_tx_l2cap_smp 
+201e 58000006 setarg smp_encryption_information 
+201f e7e08005 istore 1 ,contw 
+2020 6fe0c3c0 fetch 1 ,mem_le_configuration 
+2021 c280a024 bbit1 bit_ble_pairing_fixed_ltk ,le_send_fixed_ltk 
+2022 d8c04316 arg mem_le_ltk ,contr 
+2023 20207d0c branch memcpy16 
+
+le_send_fixed_ltk:
+2024 d8c043c1 arg mem_le_fixed_ltk ,contr 
+2025 20207d0c branch memcpy16 
+
+le_send_smp_master_identification:
+2026 d8a043a2 arg mem_le_ediv ,contw 
+2027 1800720a force 10 ,loopcnt 
+2028 20405a32 call generate_random_loop 
+2029 1800220b force 11 ,rega 
+202a 20402109 call le_fifo_malloc_tx_l2cap_smp 
+202b 58000007 setarg smp_master_identification 
+202c e7e08005 istore 1 ,contw 
+202d 6fe143a2 fetch 2 ,mem_le_ediv 
+202e e7e10005 istore 2 ,contw 
+202f 6fe443a4 fetch 8 ,mem_le_rand 
+2030 e7e40005 istore 8 ,contw 
+2031 20600000 rtn 
+
+le_send_smp_identity_information:
+2032 18002211 force 17 ,rega 
+2033 20402109 call le_fifo_malloc_tx_l2cap_smp 
+2034 58000008 setarg smp_identity_information 
+2035 e7e08005 istore 1 ,contw 
+2036 58000000 setarg 0 
+2037 e7e40005 istore 8 ,contw 
+2038 e7e40005 istore 8 ,contw 
+2039 20600000 rtn 
+
+le_send_smp_identity_address_information:
+203a 18002208 force 8 ,rega 
+203b 20402109 call le_fifo_malloc_tx_l2cap_smp 
+203c 58000009 setarg smp_identity_address_information 
+203d e7e08005 istore 1 ,contw 
+203e 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+203f e7e08005 istore 1 ,contw 
+2040 6fe3437a fetch 6 ,mem_le_lap 
+2041 e7e30005 istore 6 ,contw 
+2042 20600000 rtn 
+
+le_send_pairing_fail_unspecified_reason:
+2043 7002d908 jam pairing_failed_unspecified_reason ,mem_le_ll_pairing_fail_reason 
+2044 20201fef branch le_send_pairing_failed 
+
+le_check_init_key_distribution:
+2045 6fe0c355 fetch 1 ,mem_le_pres_init_key_distribution 
+2046 6848c355 fetcht 1 ,mem_le_pres_init_key_distribution 
+2047 98417e00 iand temp ,pdata 
+2048 20600000 rtn 
+
+le_parse_smp_identity_information:
+2049 d8a043ac arg mem_le_irk ,contw 
+204a 20407d0c call memcpy16 
+204b 20402045 call le_check_init_key_distribution 
+204c 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+204d 2020a043 branch le_send_pairing_fail_unspecified_reason ,true 
+204e 6fe0c09a fetch 1 ,mem_device_option 
+204f c1850000 rtnne dvc_op_module 
+2050 20402053 call le_check_master_addr_type 
+2051 24740000 nrtn user 
+2052 2020321d branch app_ble_store_reconn_info 
+
+le_check_master_addr_type:
+2053 20407e56 call disable_user 
+2054 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+2055 c1000000 rtneq master_public_addr 
+2056 6fe0c34e fetch 1 ,mem_le_preq_init_key_distribution 
+2057 c4008000 rtnbit0 le_initator_irk_bit 
+2058 20207e54 branch enable_user 
+
+le_parse_smp_identity_address_information:
+2059 20402045 call le_check_init_key_distribution 
+205a 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+205b 2020a043 branch le_send_pairing_fail_unspecified_reason ,true 
+205c 20600000 rtn 
+
+le_parse_smp_master_identification:
+
+le_parse_smp_signing_information:
+
+le_parse_smp_security_request:
+205d 20600000 rtn 
+
+le_parse_smp_public_key:
+205e d8a00880 arg mem_le_pubkey_remote_x_256 ,contw 
+205f 20407cff call memcpy64 
+2060 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+2061 70439901 jam le_sc_stat_receive_public_key ,mem_le_secure_connect_state 
+2062 20600000 rtn 
+
+le_parse_smp_dhkey_check:
+2063 d8a00930 arg mem_sp_confirm_remote ,contw 
+2064 20407d0c call memcpy16 
+2065 70439906 jam le_sc_stat_receive_dhkey ,mem_le_secure_connect_state 
+2066 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+2067 20600000 rtn 
+
+le_send_smp_pairing_public_key:
+2068 18002241 force 65 ,rega 
+2069 20402109 call le_fifo_malloc_tx_l2cap_smp 
+206a 5800000c setarg smp_pairing_public_key 
+206b e7e08005 istore 1 ,contw 
+206c d8c046dc arg mem_sc_pubkey_local_x_256 ,contr 
+206d 20207cff branch memcpy64 
+
+le_send_smp_pairing_dhkey_check:
+206e 20406a1c call function_f6_eb 
+206f 18002211 force 17 ,rega 
+2070 20402109 call le_fifo_malloc_tx_l2cap_smp 
+2071 5800000d setarg smp_pairing_dhkey_check 
+2072 e7e08005 istore 1 ,contw 
+2073 20206ab7 branch load_inverse_result 
+
+le_check_paring_time:
+2074 6fe0c39b fetch 1 ,mem_le_pairing_state 
+2075 c17f8000 rtneq flag_le_pairing_end 
+2076 d8400003 arg flag_le_pairing_rcv_pairing_req ,temp 
+2077 98467c00 isub temp ,null 
+2078 24610000 nrtn positive 
+2079 d8e0000a arg smp_pairing_timer ,queue 
+207a 20407d74 call timer_check 
+207b 247a0000 nrtn blank 
+207c 20202043 branch le_send_pairing_fail_unspecified_reason 
+
+le_pairing_sm:
+207d 476cc03b bpatchx patch3b_1 ,mem_patch3b 
+207e 20401b77 call le_fifo_check_nearly_full 
+207f 247a0000 nrtn blank 
+2080 6fe0c39b fetch 1 ,mem_le_pairing_state 
+2081 c000208a beq flag_le_pairing_null ,le_pairing_sm_null 
+2082 c000a090 beq flag_le_pairing_start ,le_pairing_sm_start 
+2083 c001208a beq flag_le_pairing_send_recurity_req ,le_pairing_sm_send_sec_req 
+2084 c001a092 beq flag_le_pairing_rcv_pairing_req ,le_pairing_sm_rcv_pairing_req 
+2085 c004a096 beq flag_le_pairing_after_auth ,le_pairing_sm_after_auth 
+2086 c005a0a6 beq flag_le_paring_send_enc_information ,le_pairng_sm_send_enc_information 
+2087 c00620a8 beq flag_le_paring_send_master_identification ,le_pairng_sm_send_master_indentification 
+2088 c006a0af beq flag_le_paring_send_indentity_information ,le_pairng_sm_send_indentity_information 
+2089 20600000 rtn 
+
+le_pairing_sm_null:
+
+le_pairing_sm_send_sec_req:
+208a 6fe0c39c fetch 1 ,mem_le_enc_state 
+208b c1820000 rtnne flag_le_send_start_enc_rsp 
+208c 70439cff jam flag_le_enc_end ,mem_le_enc_state 
+208d 70439bff jam flag_le_pairing_end ,mem_le_pairing_state 
+208e 70095b3f jam bt_evt_le_reconnect_complete ,mem_fifo_temp 
+208f 20207871 branch ui_ipc_send_event 
+
+le_pairing_sm_start:
+2090 70439b02 jam flag_le_pairing_send_recurity_req ,mem_le_pairing_state 
+2091 20201f99 branch le_send_smp_security_request 
+
+le_pairing_sm_rcv_pairing_req:
+2092 70439b04 jam flag_le_pairing_wait_stk_generation ,mem_le_pairing_state 
+2093 58017700 setarg timer_smp_pairing_timeout 
+2094 d8e0000a arg smp_pairing_timer ,queue 
+2095 20207d66 branch timer_init 
+
+le_pairing_sm_after_auth:
+2096 6fe0c39c fetch 1 ,mem_le_enc_state 
+2097 c0022099 beq flag_le_send_start_enc_rsp ,le_pairing_sm_after_auth_start_enc 
+2098 20600000 rtn 
+
+le_pairing_sm_after_auth_start_enc:
+2099 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+209a c283a0a4 bbit1 le_pairing_mode_secure_connect_bit ,le_pairing_sm_after_auth_start_enc_sc 
+209b 70439b0b jam flag_le_paring_send_enc_information ,mem_le_pairing_state 
+209c 2040201c call le_send_smp_encryption_information 
+
+le_pairing_sm_after_auth_start_enc_common:
+209d 70095b29 jam bt_evt_le_enc_info ,mem_fifo_temp 
+209e 20407871 call ui_ipc_send_event 
+209f 6fe0c09a fetch 1 ,mem_device_option 
+20a0 c1850000 rtnne dvc_op_module 
+20a1 20402053 call le_check_master_addr_type 
+20a2 20740000 rtn user 
+20a3 2020321d branch app_ble_store_reconn_info 
+
+le_pairing_sm_after_auth_start_enc_sc:
+20a4 70439b0c jam flag_le_paring_send_master_identification ,mem_le_pairing_state 
+20a5 2020209d branch le_pairing_sm_after_auth_start_enc_common 
+
+le_pairng_sm_send_enc_information:
+20a6 70439b0c jam flag_le_paring_send_master_identification ,mem_le_pairing_state 
+20a7 20202026 branch le_send_smp_master_identification 
+
+le_pairng_sm_send_master_indentification:
+20a8 6fe0c34f fetch 1 ,mem_le_preq_resp_key_distribution 
+20a9 6848c356 fetcht 1 ,mem_le_pres_resp_key_distribution 
+20aa 98417e00 iand temp ,pdata 
+20ab 2fec0001 isolate0 le_initator_irk_bit ,pdata 
+20ac 2020a0b1 branch le_parse_start_enc_rsp_after_auth_end ,true 
+20ad 70439b0d jam flag_le_paring_send_indentity_information ,mem_le_pairing_state 
+20ae 20202032 branch le_send_smp_identity_information 
+
+le_pairng_sm_send_indentity_information:
+20af 2040203a call le_send_smp_identity_address_information 
+20b0 202020b1 branch le_parse_start_enc_rsp_after_auth_end 
+
+le_parse_start_enc_rsp_after_auth_end:
+20b1 18000e0a force smp_pairing_timer ,queue 
+20b2 20407d65 call timer_stop 
+20b3 70439cff jam flag_le_enc_end ,mem_le_enc_state 
+20b4 70439bff jam flag_le_pairing_end ,mem_le_pairing_state 
+20b5 70095b3e jam bt_evt_le_pairing_complete ,mem_fifo_temp 
+20b6 20207871 branch ui_ipc_send_event 
+
+le_secure_connect_sm:
+20b7 476d403b bpatchx patch3b_2 ,mem_patch3b 
+20b8 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+20b9 c4038000 rtnbit0 le_pairing_mode_secure_connect_bit 
+20ba 6fe0c398 fetch 1 ,mem_le_secure_connect_flag 
+20bb c1810000 rtnne le_sp_flag_commit_256 
+20bc 70439800 jam sp_flag_standby ,mem_le_secure_connect_flag 
+20bd 6fe0c399 fetch 1 ,mem_le_secure_connect_state 
+20be c000a0ff beq le_sc_stat_receive_public_key ,le_sc_sm_receive_public_key 
+20bf c0012106 beq le_sc_stat_wait_send_public_key ,le_sc_sm_wait_send_public_key 
+20c0 c001a0f7 beq le_sc_stat_send_public_key ,le_sc_sm_send_public_key 
+20c1 c00320dc beq le_sc_stat_receive_dhkey ,le_sc_sm_receive_dhkey 
+20c2 c003a0d3 beq le_sc_stat_wait_confirm_gkey ,le_sc_sm_wait_confirm_gkey 
+20c3 c00420c9 beq le_sc_stat_passkey_wait_confirm ,le_sc_sm_passkey_wait_confirm 
+20c4 20600000 rtn 
+
+le_sc_state_clear:
+20c5 70439800 jam sp_flag_standby ,mem_le_secure_connect_flag 
+20c6 70439900 jam le_sc_stat_null ,mem_le_secure_connect_state 
+20c7 70439a00 jam flag_le_sc_confrim_null ,mem_le_sc_confirm_gkey_flag 
+20c8 20600000 rtn 
+
+le_sc_sm_passkey_wait_confirm:
+20c9 6fe0c76d fetch 1 ,mem_authentication_passkey_times 
+20ca 1fe20e00 copy pdata ,queue 
+20cb 1fe0fe01 increase 1 ,pdata 
+20cc 67e0c76d store 1 ,mem_authentication_passkey_times 
+20cd 6fe2439e fetch 4 ,mem_le_tk 
+20ce afefffff qisolate1 pdata 
+20cf 58000080 setarg 0x80 
+20d0 7920fe00 setflag true ,0 ,pdata 
+20d1 67e0c76e store 1 ,mem_passkey_1bit 
+20d2 202020fb branch le_sc_sm_ready_send_pairing_confirm 
+
+le_sc_sm_wait_confirm_gkey:
+20d3 6fe0c39a fetch 1 ,mem_le_sc_confirm_gkey_flag 
+20d4 70439a00 jam flag_le_sc_confrim_null ,mem_le_sc_confirm_gkey_flag 
+20d5 c000a0d8 beq flag_le_sc_confrim_gkey_ok ,le_sc_confirm_gkey_ok 
+20d6 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+20d7 20600000 rtn 
+
+le_sc_confirm_gkey_ok:
+20d8 70095b31 jam bt_evt_le_pairing_success ,mem_fifo_temp 
+20d9 20407871 call ui_ipc_send_event 
+20da 70439b09 jam flag_le_pairing_after_auth ,mem_le_pairing_state 
+20db 2020206e branch le_send_smp_pairing_dhkey_check 
+
+le_sc_sm_receive_dhkey:
+20dc 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+20dd c001a0e0 beq sp_key_valid_256 ,le_dhkey_ready 
+20de 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+20df 20600000 rtn 
+
+le_dhkey_ready:
+20e0 20406a43 call function_f5 
+20e1 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+20e2 c041a0e5 beq le_pairing_mode_secure_connect_passkey ,le_dhkey_ready_common 
+20e3 c04220e5 beq le_pairing_mode_secure_connect_passkey_res_input ,le_dhkey_ready_common 
+20e4 20401fb4 call le_set_tk_0 
+
+le_dhkey_ready_common:
+20e5 20406a30 call function_f6_ea 
+20e6 da2009be arg mem_aes_cmac_temp ,rega 
+20e7 da400930 arg mem_sp_confirm_remote ,regb 
+20e8 df200010 arg 16 ,loopcnt 
+20e9 20407df1 call string_compare 
+20ea 2022a0ed branch le_dhkey_check_ok ,zero 
+
+le_dhkey_check_fail:
+20eb 7002d90b jam pairing_failed_dhkey_check_failed ,mem_le_ll_pairing_fail_reason 
+20ec 20201fef branch le_send_pairing_failed 
+
+le_dhkey_check_ok:
+20ed 20406eed call sp_calc_check_publickey_256 
+20ee 2422a0eb nbranch le_dhkey_check_fail ,zero 
+20ef 70432601 jam 1 ,mem_ltk_exists 
+20f0 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+20f1 c040a0d8 beq le_pairing_mode_secure_connect_justwork ,le_sc_confirm_gkey_ok 
+20f2 c041a0d8 beq le_pairing_mode_secure_connect_passkey ,le_sc_confirm_gkey_ok 
+20f3 c04220d8 beq le_pairing_mode_secure_connect_passkey_res_input ,le_sc_confirm_gkey_ok 
+20f4 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+20f5 70439907 jam le_sc_stat_wait_confirm_gkey ,mem_le_secure_connect_state 
+20f6 20600000 rtn 
+
+le_sc_sm_send_public_key:
+20f7 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+20f8 c041a0fc beq le_pairing_mode_secure_connect_passkey ,le_sc_sm_send_public_key_passkey 
+20f9 c04220fc beq le_pairing_mode_secure_connect_passkey_res_input ,le_sc_sm_send_public_key_passkey 
+20fa 70476e00 jam 0 ,mem_passkey_1bit 
+
+le_sc_sm_ready_send_pairing_confirm:
+20fb 20201fd7 branch le_send_smp_pairing_confirm 
+
+le_sc_sm_send_public_key_passkey:
+20fc 70476d00 jam 0 ,mem_authentication_passkey_times 
+20fd c1420000 rtneq le_pairing_mode_secure_connect_passkey_res_input 
+20fe 20201fb7 branch le_parse_smp_pairing_req_passkey 
+
+le_sc_sm_receive_public_key:
+20ff 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+2100 6fe0c6bb fetch 1 ,mem_sc_local_key_invalid 
+2101 c001a103 beq sp_key_valid_256 ,le_public_key_ready 
+2102 20600000 rtn 
+
+le_public_key_ready:
+2103 70439902 jam le_sc_stat_wait_send_public_key ,mem_le_secure_connect_state 
+2104 70087b00 jam sp_key_invalid ,mem_sp_dhkey_invalid 
+2105 20207581 branch sp_dhkey_calc_256 
+
+le_sc_sm_wait_send_public_key:
+2106 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+2107 70439903 jam le_sc_stat_send_public_key ,mem_le_secure_connect_state 
+2108 20202068 branch le_send_smp_pairing_public_key 
+
+le_fifo_malloc_tx_l2cap_smp:
+2109 18002406 force le_l2cap_cid_smp ,regb 
+210a 20201b4d branch le_fifo_malloc_tx_l2cap 
+
+le_parse_ll:
+210b 6fe0816d fetch 1 ,mem_le_rxbuf_data_ll_opcode 
+210c c0002122 beq ll_connection_update_ind ,le_parse_connection_update_ind 
+210d c000a12a beq ll_channel_map_ind ,le_parse_channel_map_ind 
+210e c0012132 beq ll_terminate_ind ,le_parse_terminate_ind 
+210f c001a136 beq ll_enc_req ,le_parse_enc_req 
+2110 c0022155 beq ll_enc_rsp ,le_parse_enc_rsp 
+2111 c002a15a beq ll_start_enc_req ,le_parse_start_enc_req 
+2112 c003215e beq ll_start_enc_rsp ,le_parse_start_enc_rsp 
+2113 c003a163 beq ll_unknown_rsp ,le_parse_unknown_rsp 
+2114 c0042164 beq ll_feature_req ,le_parse_feature_req 
+2115 c004a165 beq ll_feature_rsp ,le_parse_feature_rsp 
+2116 c0052166 beq ll_pause_enc_req ,le_parse_pause_enc_req 
+2117 c005a16a beq ll_pause_enc_rsp ,le_parse_pause_enc_rsp 
+2118 c006216b beq ll_version_ind ,le_parse_version_ind 
+2119 c006a16d beq ll_reject_ind ,le_parse_reject_ind 
+211a c009216e beq ll_ping_req ,le_parse_ping_req 
+211b c009a16f beq ll_ping_rsp ,le_parse_ping_rsp 
+211c c00a2170 beq ll_length_req ,le_parse_length_req 
+211d c00aa172 beq ll_length_rsp ,le_parse_length_rsp 
+211e c00b217d beq ll_phy_req ,le_parse_phy_req 
+211f c00c217e beq ll_phy_update_ind ,le_parse_phy_update_ind 
+2120 6a60816d fetchr regc ,1 ,mem_le_rxbuf_data_ll_opcode 
+2121 202021a1 branch le_send_unknown_rsp 
+
+le_parse_connection_update_ind:
+2122 efe48006 ifetch 9 ,contr 
+2123 67e482be store 9 ,mem_le_new_param 
+2124 efe10006 ifetch 2 ,contr 
+2125 67e102a7 store 2 ,mem_le_instant 
+2126 6fe08287 fetch 1 ,mem_le_state 
+2127 79207e05 set1 lestate_update_param ,pdata 
+2128 67e08287 store 1 ,mem_le_state 
+2129 20600000 rtn 
+
+le_parse_channel_map_ind:
+212a efe28006 ifetch 5 ,contr 
+212b 67e282be store 5 ,mem_le_new_map 
+212c efe10006 ifetch 2 ,contr 
+212d 67e102a7 store 2 ,mem_le_instant 
+
+le_update_map_enable:
+212e 6fe08287 fetch 1 ,mem_le_state 
+212f 79207e06 set1 lestate_update_map ,pdata 
+2130 67e08287 store 1 ,mem_le_state 
+2131 20600000 rtn 
+
+le_parse_terminate_ind:
+2132 58000014 setarg 20 
+2133 67e102b5 store 2 ,mem_le_superto 
+2134 67e14394 store 2 ,mem_le_init_superto 
+2135 20600000 rtn 
+
+le_parse_enc_req:
+2136 efe40006 ifetch 8 ,contr 
+2137 67e443a4 store 8 ,mem_le_rand 
+2138 efe10006 ifetch 2 ,contr 
+2139 67e143a2 store 2 ,mem_le_ediv 
+213a efe40006 ifetch 8 ,contr 
+213b 67e44384 store 8 ,mem_le_skdm 
+213c efe20006 ifetch 4 ,contr 
+213d 67e246aa store 4 ,mem_ccm_ivm 
+213e 2040218e call le_send_enc_rsp 
+213f 476dc03b bpatchx patch3b_3 ,mem_patch3b 
+2140 6fe0c39b fetch 1 ,mem_le_pairing_state 
+2141 c004a148 beq flag_le_pairing_after_auth ,le_parse_enc_req_after_auth 
+2142 6fe0c3c0 fetch 1 ,mem_le_configuration 
+2143 c280a14b bbit1 bit_ble_pairing_fixed_ltk ,le_parse_enc_req_fixed_ltk 
+2144 6fe0c489 fetch 1 ,mem_nv_data_number 
+2145 245a6016 ncall load_device_list_mode_4 ,blank 
+2146 6fe0c326 fetch 1 ,mem_ltk_exists 
+2147 c0002150 beq 0 ,le_ltk_lost 
+
+le_parse_enc_req_after_auth:
+2148 70439c01 jam flag_le_rcv_enc_start ,mem_le_enc_state 
+2149 2040219c call le_send_start_enc_req 
+214a 20206c58 branch generate_sk 
+
+le_parse_enc_req_fixed_ltk:
+214b 70432601 jam 1 ,mem_ltk_exists 
+214c d8c043c1 arg mem_le_fixed_ltk ,contr 
+214d d8a04316 arg mem_le_ltk ,contw 
+214e 20407d0c call memcpy16 
+214f 20202148 branch le_parse_enc_req_after_auth 
+
+le_ltk_lost:
+2150 476e403b bpatchx patch3b_4 ,mem_patch3b 
+2151 70439c00 jam flag_le_enc_null ,mem_le_enc_state 
+2152 70439b00 jam flag_le_enc_null ,mem_le_pairing_state 
+2153 70095b41 jam bt_evt_le_ltk_lost ,mem_fifo_temp 
+2154 20207871 branch ui_ipc_send_event 
+
+le_parse_enc_rsp:
+2155 efe40006 ifetch 8 ,contr 
+2156 67e4438c store 8 ,mem_le_skds 
+2157 efe20006 ifetch 4 ,contr 
+2158 67e246ae store 4 ,mem_ccm_ivs 
+2159 20206c58 branch generate_sk 
+
+le_parse_start_enc_req:
+215a 6fe08287 fetch 1 ,mem_le_state 
+215b 79207e04 set1 lestate_encryption ,pdata 
+215c 67e08287 store 1 ,mem_le_state 
+215d 20600000 rtn 
+
+le_parse_start_enc_rsp:
+215e 20748000 rtn master 
+215f 70095b32 jam bt_evt_le_start_enc ,mem_fifo_temp 
+2160 20407871 call ui_ipc_send_event 
+2161 70439c04 jam flag_le_send_start_enc_rsp ,mem_le_enc_state 
+2162 2020219f branch le_send_start_enc_rsp 
+
+le_parse_unknown_rsp:
+2163 20600000 rtn 
+
+le_parse_feature_req:
+2164 202021a6 branch le_send_feature_rsp 
+
+le_parse_feature_rsp:
+2165 20600000 rtn 
+
+le_parse_pause_enc_req:
+2166 70439c02 jam flag_le_enc_pause ,mem_le_enc_state 
+2167 204021ad call le_send_pause_enc_rsp 
+2168 70095b33 jam bt_evt_le_pause_enc ,mem_fifo_temp 
+2169 20207871 branch ui_ipc_send_event 
+
+le_parse_pause_enc_rsp:
+216a 20600000 rtn 
+
+le_parse_version_ind:
+216b 20748000 rtn master 
+216c 202021af branch le_send_version_ind 
+
+le_parse_reject_ind:
+216d 20600000 rtn 
+
+le_parse_ping_req:
+216e 202021bb branch le_send_ping_rsp 
+
+le_parse_ping_rsp:
+216f 20600000 rtn 
+
+le_parse_length_req:
+2170 20402172 call le_parse_length_rsp 
+2171 202021bf branch le_send_data_length_res 
+
+le_parse_length_rsp:
+2172 efe40006 ifetch 8 ,contr 
+2173 67e44444 store 8 ,mem_remote_rx_max_octets 
+2174 6fe14444 fetch 2 ,mem_remote_rx_max_octets 
+2175 68494450 fetcht 2 ,mem_local_tx_max_octets 
+2176 20407e4a call not_greater_than 
+2177 67e14444 store 2 ,mem_remote_rx_max_octets 
+2178 6fe14448 fetch 2 ,mem_remote_tx_max_octets 
+2179 6849444c fetcht 2 ,mem_local_rx_max_octets 
+217a 20407e4a call not_greater_than 
+217b 67e14448 store 2 ,mem_remote_tx_max_octets 
+217c 20600000 rtn 
+
+le_parse_phy_req:
+217d 202021c5 branch le_send_phy_rsp 
+
+le_parse_phy_update_ind:
+217e efe10006 ifetch 2 ,contr 
+217f 67e102be store 2 ,mem_le_new_m2s_phy 
+2180 efe10006 ifetch 2 ,contr 
+2181 67e102a7 store 2 ,mem_le_instant 
+2182 207a0000 rtn blank 
+2183 6fe08287 fetch 1 ,mem_le_state 
+2184 79207e07 set1 lestate_update_phy ,pdata 
+2185 67e08287 store 1 ,mem_le_state 
+2186 20600000 rtn 
+
+le_send_terminate_ind_user_terminated:
+2187 da600013 arg error_remote_user_terminated_connection ,regc 
+
+le_send_terminate_ind:
+2188 da200002 arg 2 ,rega 
+2189 da400002 arg ll_terminate_ind ,regb 
+218a 20401b48 call le_fifo_malloc_tx_ll 
+218b 1a627e00 copy regc ,pdata 
+218c e7e08005 istore 1 ,contw 
+218d 20600000 rtn 
+
+le_send_enc_rsp:
+218e d8a0438c arg mem_le_skds ,contw 
+218f 18007208 force 8 ,loopcnt 
+2190 20405a32 call generate_random_loop 
+2191 d8a046ae arg mem_ccm_ivs ,contw 
+2192 18007204 force 4 ,loopcnt 
+2193 20405a32 call generate_random_loop 
+2194 da20000d arg 13 ,rega 
+2195 da400004 arg ll_enc_rsp ,regb 
+2196 20401b48 call le_fifo_malloc_tx_ll 
+2197 6fe4438c fetch 8 ,mem_le_skds 
+2198 e7e40005 istore 8 ,contw 
+2199 6fe246ae fetch 4 ,mem_ccm_ivs 
+219a e7e20005 istore 4 ,contw 
+219b 20600000 rtn 
+
+le_send_start_enc_req:
+219c 70439c05 jam flag_le_send_start_enc_req ,mem_le_enc_state 
+219d da400005 arg ll_start_enc_req ,regb 
+219e 202021cf branch le_send_ll_one_lenth 
+
+le_send_start_enc_rsp:
+219f da400006 arg ll_start_enc_rsp ,regb 
+21a0 202021cf branch le_send_ll_one_lenth 
+
+le_send_unknown_rsp:
+21a1 da200002 arg 2 ,rega 
+21a2 da400007 arg ll_unknown_rsp ,regb 
+21a3 20401b48 call le_fifo_malloc_tx_ll 
+21a4 e2608005 istorer regc ,1 ,contw 
+21a5 20600000 rtn 
+
+le_send_feature_rsp:
+21a6 da200009 arg 9 ,rega 
+21a7 da400009 arg ll_feature_rsp ,regb 
+21a8 20401b48 call le_fifo_malloc_tx_ll 
+21a9 6fe4443a fetch 8 ,mem_le_local_feature 
+21aa 1fe1fe01 or pdata ,fun_ll_feature_le_encryption ,pdata 
+21ab e7e40005 istore 8 ,contw 
+21ac 20600000 rtn 
+
+le_send_pause_enc_rsp:
+21ad da40000b arg ll_pause_enc_rsp ,regb 
+21ae 202021cf branch le_send_ll_one_lenth 
+
+le_send_version_ind:
+21af da200006 arg 6 ,rega 
+21b0 da40000c arg ll_version_ind ,regb 
+21b1 20401b48 call le_fifo_malloc_tx_ll 
+21b2 6fe2c5f7 fetch 5 ,mem_lmp_version 
+21b3 e7e28005 istore 5 ,contw 
+21b4 20600000 rtn 
+
+le_send_reject_ind:
+21b5 da200002 arg 2 ,rega 
+21b6 da40000d arg ll_reject_ind ,regb 
+21b7 20401b48 call le_fifo_malloc_tx_ll 
+21b8 58000006 setarg le_err_pin_or_key_missing 
+21b9 e7e08005 istore 1 ,contw 
+21ba 20600000 rtn 
+
+le_send_ping_rsp:
+21bb da400013 arg ll_ping_rsp ,regb 
+21bc 202021cf branch le_send_ll_one_lenth 
+
+le_send_data_length_req:
+21bd da400014 arg ll_length_req ,regb 
+21be 202021c0 branch le_send_data_length 
+
+le_send_data_length_res:
+21bf da400015 arg ll_length_rsp ,regb 
+
+le_send_data_length:
+21c0 da200009 arg 9 ,rega 
+21c1 20401b48 call le_fifo_malloc_tx_ll 
+21c2 6fe4444c fetch 8 ,mem_local_rx_max_octets 
+21c3 e7e40005 istore 8 ,contw 
+21c4 20600000 rtn 
+
+le_send_phy_rsp:
+21c5 da200003 arg 3 ,rega 
+21c6 da400017 arg ll_phy_rsp ,regb 
+21c7 20401b48 call le_fifo_malloc_tx_ll 
+21c8 6fe0c442 fetch 1 ,mem_le_tx_phys 
+21c9 1fe17e07 and pdata ,0x07 ,pdata 
+21ca e7e08005 istore 1 ,contw 
+21cb 6fe0c443 fetch 1 ,mem_le_rx_phys 
+21cc 1fe17e07 and pdata ,0x07 ,pdata 
+21cd e7e08005 istore 1 ,contw 
+21ce 20600000 rtn 
+
+le_send_ll_one_lenth:
+21cf da200001 arg 1 ,rega 
+21d0 20201b48 branch le_fifo_malloc_tx_ll 
+
+g24_dispatch:
+21d1 476ec03b bpatchx patch3b_5 ,mem_patch3b 
+21d2 c61a0000 rtnmark1 mark_adc_enable 
+21d3 c513a40e bmark1 mark_24g_rxmode ,g24_receive_dispatch 
+21d4 2020261b branch g24_transmit_dispatch 
+
+g24_prep:
+21d5 7844fc00 disable enable_crc 
+21d6 7843fc00 disable enable_white 
+21d7 58555555 setarg 0x555555 
+21d8 98001e00 iforce crc24_init 
+21d9 6fe0c83a fetch 1 ,mem_24g_ch 
+21da 202016c3 branch le_prep + 5 
+
+g24_receive_packet:
+21db 476f403b bpatchx patch3b_6 ,mem_patch3b 
+21dc 6fe0c864 fetch 1 ,mem_24g_rx_phy 
+21dd 2040168b call le_enable_phy_by_pdata 
+21de 6fe2483c fetch 4 ,mem_24g_addr 
+21df 98001200 iforce access 
+21e0 204010b0 call calc_mod_value_scale_le 
+21e1 20401161 call set_sync_on 
+21e2 6848c83a fetcht 1 ,mem_24g_ch 
+21e3 204016c8 call le_rf_rx_enable 
+
+g24_receive_rxon:
+21e4 204021d5 call g24_prep 
+21e5 c597a1e9 bmark0 mark_ble_lr ,g24_receive_nolr 
+21e6 783cfc00 pulse dewhiten_code_calc 
+21e7 2000001e nop 30 
+21e8 204021d5 call g24_prep 
+
+g24_receive_nolr:
+21e9 7857fc00 disable user3 
+21ea 7826fc00 enable decode_fec0 
+21eb 7830fc00 enable is_rx 
+21ec 78507c00 disable is_tx 
+21ed 78287c00 enable swfine 
+21ee 6fe14838 fetch 2 ,mem_24g_rx_window 
+21ef 98003600 iforce stop_watch 
+21f0 37c18400 correlate null ,timeout 
+21f1 242c223d nbranch g24_sync_timeout ,sync 
+21f2 20404caf call rf_debug_rx_sync_line 
+21f3 c517a1f6 bmark1 mark_ble_lr ,g24_receive_skip_fec1 
+21f4 7846fc00 disable decode_fec0 
+21f5 7825fc00 enable decode_fec1 
+
+g24_receive_skip_fec1:
+21f6 7823fc00 enable enable_white 
+21f7 7824fc00 enable enable_crc 
+21f8 2040223a call g24_receive_byte 
+21f9 67e0c85a store 1 ,mem_24g_get_syncword_crc8 
+21fa 6848c859 fetcht 1 ,mem_24g_syncword_crc8 
+21fb 98467c00 isub temp ,null 
+21fc 2422a23f nbranch g24_end_of_packet ,zero 
+21fd 476fc03b bpatchx patch3b_7 ,mem_patch3b 
+21fe 7858fc00 disable user7 
+21ff 280ffe2f isolate1 mark_ble_lr ,mark 
+2200 2040a22c call g24_lr_receive_pdu_len ,true 
+2201 2038a23f branch g24_end_of_packet ,user7 
+2202 2040223a call g24_receive_byte 
+2203 67e0c7a4 store 1 ,mem_24g_rxbuf 
+2204 c513a209 bmark1 mark_24g_rxmode ,g24_receive_skip 
+2205 6fe0c7a4 fetch 1 ,mem_24g_rxbuf 
+2206 6848c836 fetcht 1 ,mem_24g_data_type 
+2207 a8400e00 icompare bits_data ,temp 
+2208 2420a23f nbranch g24_end_of_packet ,true 
+
+g24_receive_skip:
+2209 2040223a call g24_receive_byte 
+220a 280ffe2f isolate1 mark_ble_lr ,mark 
+220b 2040a235 call g24_lr_receive_payload_len ,true 
+220c e7e08005 istore 1 ,contw 
+220d 1fe97e00 rshift3 pdata ,pdata 
+220e 1fe67c1f sub pdata ,0x1f ,null 
+220f 2421223f nbranch g24_end_of_packet ,positive 
+2210 1fe27200 copy pdata ,loopcnt 
+2211 2022a215 branch g24rx_nopayload ,zero 
+
+g24rx_loop:
+2212 2040223a call g24_receive_byte 
+2213 e7e08005 istore 1 ,contw 
+2214 c2002212 loop g24rx_loop 
+
+g24rx_nopayload:
+2215 c513a21a bmark1 mark_24g_rxmode ,g24_receive_skip_rssi 
+2216 18a22200 copy contw ,rega 
+2217 2040223a call g24_receive_byte 
+2218 67e0c87e store 1 ,mem_rssi_hex_received 
+2219 1a220a00 copy rega ,contw 
+
+g24_receive_skip_rssi:
+221a 09800018 parse demod ,bucket ,24 
+221b 1fef7e00 rshift32 pdata ,pdata 
+221c 1ff17e00 rshift16 pdata ,pdata 
+221d e7e18005 istore 3 ,contw 
+221e 7845fc00 disable decode_fec1 
+221f 280ffe27 isolate1 mark_24g_rxmode ,mark 
+2220 2040a5de call save_rssi_dec ,true 
+2221 2023223f branch g24_end_of_packet ,crc_failed 
+2222 20404cae call rf_debug_rx_crc_line 
+2223 7837fc00 enable user3 
+2224 204017b0 call le_match_set_txfreq 
+2225 4770403c bpatchx patch3c_0 ,mem_patch3c 
+2226 c6138000 rtnmark1 mark_24g_rxmode 
+2227 6fe0c87e fetch 1 ,mem_rssi_hex_received 
+2228 6848c8cd fetcht 1 ,mem_rssi_hex_received_max_value 
+2229 98467c00 isub temp ,null 
+222a 20417e4c call copy_temp2pdata ,positive 
+222b 202025e2 branch rssi_signal 
+
+g24_lr_receive_pdu_len:
+222c 2040223a call g24_receive_byte 
+222d 1fe67c01 sub pdata ,1 ,null 
+222e 20217e5c branch enable_user7 ,positive 
+222f 1fe0fffe increase -2 ,pdata 
+2230 c513a233 bmark1 mark_24g_rxmode ,g24_lr_receive_pdu_norssi 
+2231 203a7e5c branch enable_user7 ,blank 
+2232 1fe0ffff increase -1 ,pdata 
+
+g24_lr_receive_pdu_norssi:
+2233 67e08964 store 1 ,mem_temp 
+2234 20600000 rtn 
+
+g24_lr_receive_payload_len:
+2235 1fe17e07 and_into 0x07 ,pdata 
+2236 68488964 fetcht 1 ,mem_temp 
+2237 18498400 lshift3 temp ,temp 
+2238 9841fe00 ior temp ,pdata 
+2239 20600000 rtn 
+
+g24_receive_byte:
+223a 09800008 parse demod ,bucket ,8 
+223b 19897e00 rshift3 pwindow ,pdata 
+223c 20600000 rtn 
+
+g24_sync_timeout:
+223d 280ffe27 isolate1 mark_24g_rxmode ,mark 
+223e 2040a5fa call rssi_noise ,true 
+
+g24_end_of_packet:
+223f 204016b2 call le_disable 
+2240 784dfc00 disable encode_fec1 
+2241 7845fc00 disable decode_fec1 
+2242 20200e80 branch end_of_packet 
+
+g24_set_freq_tx:
+2243 20401161 call set_sync_on 
+2244 6848c83a fetcht 1 ,mem_24g_ch 
+2245 20201205 branch set_freq_tx 
+
+g24_transmit:
+2246 4770c03c bpatchx patch3c_1 ,mem_patch3c 
+2247 6fe0c865 fetch 1 ,mem_24g_tx_phy 
+2248 2040168b call le_enable_phy_by_pdata 
+2249 6fe2483c fetch 4 ,mem_24g_addr 
+224a 98001200 iforce access 
+224b 204021d5 call g24_prep 
+224c 20402243 call g24_set_freq_tx 
+224d 79202a00 set1 txgfsk ,radio_ctrl 
+224e 782efc00 enable encode_fec0 
+224f 78307c00 enable is_tx 
+2250 7850fc00 disable is_rx 
+2251 20404cb5 call rf_debug_tx_on_line 
+2252 785d7c00 disable lr_s2en 
+2253 c517a273 bmark1 mark_ble_lr ,g24_transmit_lr 
+2254 c516a285 bmark1 mark_ble_2m ,g24_transmit_2m 
+2255 19317e00 rshift16 access ,pdata 
+2256 1fecfe00 rshift8 pdata ,pdata 
+2257 1ff1fe00 rshift4 pdata ,pdata 
+2258 08008628 inject mod ,40 
+
+g24_transmit_packet:
+2259 c517a25c bmark1 mark_ble_lr ,g24_transmit_nolr 
+225a 784efc00 disable encode_fec0 
+225b 782dfc00 enable encode_fec1 
+
+g24_transmit_nolr:
+225c 7823fc00 enable enable_white 
+225d 7824fc00 enable enable_crc 
+225e 6fe0c837 fetch 1 ,mem_24g_txlen 
+225f 98007200 iforce loopcnt 
+2260 d8c047e6 arg mem_24g_txpayload ,contr 
+
+g24tr_loop:
+2261 efe08006 ifetch 1 ,contr 
+2262 08008608 inject mod ,8 
+2263 c2002261 loop g24tr_loop 
+2264 78247c00 enable enable_parity 
+2265 08008618 inject mod ,24 
+2266 78447c00 disable enable_parity 
+2267 c597a26b bmark0 mark_ble_lr ,g24_transmit_skip 
+2268 7843fc00 disable enable_white 
+2269 58000000 setarg 0 
+226a 08008603 inject mod ,3 
+
+g24_transmit_skip:
+226b 37d38200 until null ,tx_clear 
+226c 20000064 nop 100 
+226d 785d7c00 disable lr_s2en 
+226e 784efc00 disable encode_fec0 
+226f 784dfc00 disable encode_fec1 
+2270 785c7c00 disable encode_fec3 
+2271 20401161 call set_sync_on 
+2272 20204cb3 branch rf_debug_tx_off_line 
+
+g24_transmit_lr:
+2273 df20000a arg 10 ,loopcnt 
+
+g24_transmit_lr_preamble_loop:
+2274 5800003c setarg 0x3c 
+2275 08008608 inject mod ,8 
+2276 c2002274 loop g24_transmit_lr_preamble_loop 
+2277 784efc00 disable encode_fec0 
+2278 783c7c00 enable encode_fec3 
+2279 19317e00 rshift16 access ,pdata 
+227a 1ff17e00 rshift16 pdata ,pdata 
+227b 1ff1fe00 rshift4 pdata ,pdata 
+227c 08008620 inject mod ,32 
+227d c5172282 bmark1 mark_ble_lr_s8 ,g24_transmit_lr_s8 
+
+g24_transmit_lr_s2:
+227e 58000001 setarg 1 
+227f 08008605 inject mod ,5 
+2280 783d7c00 enable lr_s2en 
+2281 20202259 branch g24_transmit_packet 
+
+g24_transmit_lr_s8:
+2282 58000000 setarg 0 
+2283 08008605 inject mod ,5 
+2284 20202259 branch g24_transmit_packet 
+
+g24_transmit_2m:
+2285 6fe0c1f0 fetch 1 ,mem_system_clk 
+2286 1fe37200 rshift pdata ,loopcnt 
+
+g24_transmit_2m_dealy:
+2287 20000002 nop 2 
+2288 c2002287 loop g24_transmit_2m_dealy 
+2289 19317e00 rshift16 access ,pdata 
+228a 1fecfe00 rshift8 pdata ,pdata 
+228b 1ff18400 rshift4 pdata ,temp 
+228c 18427e00 copy temp ,pdata 
+228d 08008608 inject mod ,8 
+228e 18427e00 copy temp ,pdata 
+228f 08008628 inject mod ,40 
+2290 20202259 branch g24_transmit_packet 
+
+g24_transmit_prep:
+2291 6fe0c865 fetch 1 ,mem_24g_tx_phy 
+2292 c28122b0 bbit1 bit_le_coded_phy ,g24_lr_transmit_prep 
+2293 6fe0c835 fetch 1 ,mem_24g_datalen 
+2294 1fe0fe03 increase 3 ,pdata 
+2295 67e0c837 store 1 ,mem_24g_txlen 
+2296 6fe0c859 fetch 1 ,mem_24g_syncword_crc8 
+2297 67e0c7e6 store 1 ,mem_24g_txpayload 
+2298 6fe0c836 fetch 1 ,mem_24g_data_type 
+2299 e7e08005 istore 1 ,contw 
+229a 6fe0c835 fetch 1 ,mem_24g_datalen 
+
+g24_transmit_prep_pdu:
+229b 1fe9fe00 lshift3 pdata ,pdata 
+229c 6848c82b fetcht 1 ,mem_24g_pid 
+229d 18410403 and temp ,0x03 ,temp 
+229e 18438400 lshift temp ,temp 
+229f 9841fe00 ior temp ,pdata 
+22a0 6848c82c fetcht 1 ,mem_24g_no_ack 
+22a1 9840fe00 iadd temp ,pdata 
+22a2 e7e08005 istore 1 ,contw 
+22a3 6fe0c835 fetch 1 ,mem_24g_datalen 
+22a4 98007200 iforce loopcnt 
+22a5 d8c047c6 arg mem_24g_txbuf ,contr 
+22a6 20407d5f call memcpy 
+22a7 c6938000 rtnmark0 mark_24g_rxmode 
+22a8 6fe08019 fetch 1 ,mem_rssi_hex 
+22a9 e7e08005 istore 1 ,contw 
+22aa 6fe0c865 fetch 1 ,mem_24g_tx_phy 
+22ab c3810000 rtnbit1 bit_le_coded_phy 
+22ac 6fe0c837 fetch 1 ,mem_24g_txlen 
+22ad 1fe0fe01 increase 1 ,pdata 
+22ae 67e0c837 store 1 ,mem_24g_txlen 
+22af 20600000 rtn 
+
+g24_lr_transmit_prep:
+22b0 6fe0c835 fetch 1 ,mem_24g_datalen 
+22b1 1fe0fe04 increase 4 ,pdata 
+22b2 c593a2b4 bmark0 mark_24g_rxmode ,g24_lr_transmit_prep_skip 
+22b3 1fe0fe01 increase 1 ,pdata 
+
+g24_lr_transmit_prep_skip:
+22b4 67e0c837 store 1 ,mem_24g_txlen 
+22b5 6fe0c859 fetch 1 ,mem_24g_syncword_crc8 
+22b6 67e0c7e6 store 1 ,mem_24g_txpayload 
+22b7 6fe0c837 fetch 1 ,mem_24g_txlen 
+22b8 1fe0fffe increase -2 ,pdata 
+22b9 e7e08005 istore 1 ,contw 
+22ba 6fe0c836 fetch 1 ,mem_24g_data_type 
+22bb e7e08005 istore 1 ,contw 
+22bc 58000000 setarg 0 
+22bd 2020229b branch g24_transmit_prep_pdu 
+
+g24_read_len_pid_crc:
+22be 6fe0c7a5 fetch 1 ,mem_24g_rxbuf + 1 
+22bf 1fe97e00 rshift3 pdata ,pdata 
+22c0 67e0c82a store 1 ,mem_24g_rxdata_length 
+22c1 1fe0fe01 increase 1 ,pdata 
+22c2 d8c047a5 arg mem_24g_rxbuf + 1 ,contr 
+22c3 98c08c00 iadd contr ,contr 
+22c4 efe18006 ifetch 3 ,contr 
+22c5 67e1c82d store 3 ,mem_24g_sta_crc 
+22c6 6fe0c7a5 fetch 1 ,mem_24g_rxbuf + 1 
+22c7 1fe37e00 rshift pdata ,pdata 
+22c8 1fe17e03 and pdata ,0x03 ,pdata 
+22c9 67e0c833 store 1 ,mem_24g_sta_pid 
+22ca 20600000 rtn 
+
+g24_ch:
+22cb 6848c83b fetcht 1 ,mem_24g_current_ch_number 
+22cc 204022cf call g24_ch_map_size 
+22cd 6048c83b storet 1 ,mem_24g_current_ch_number 
+22ce 20600000 rtn 
+
+g24_ch_map_size:
+22cf 204022d3 call g24_ch_calc 
+22d0 18408401 increase 1 ,temp 
+22d1 18410403 and_into 3 ,temp 
+22d2 20600000 rtn 
+
+g24_ch_calc:
+22d3 6fe0c83c fetch 1 ,mem_24g_addr 
+22d4 1fe17e03 and_into 0x03 ,pdata 
+22d5 1fefa204 mul32 pdata ,4 ,rega 
+22d6 58004840 setarg mem_24g_ch_map1 
+22d7 9a20fe00 iadd rega ,pdata 
+22d8 98408c00 iadd temp ,contr 
+22d9 efe08006 ifetch 1 ,contr 
+22da 67e0c83a store 1 ,mem_24g_ch 
+22db 20600000 rtn 
+
+g24_update_addr_and_synccrc8:
+22dc 67e2483c store 4 ,mem_24g_addr 
+
+g24_syncword_crc8:
+22dd da200000 arg 0 ,rega 
+22de df200004 arg 4 ,loopcnt 
+22df d8c0483c arg mem_24g_addr ,contr 
+
+g24_syncword_crc8_loop:
+22e0 efe08006 ifetch 1 ,contr 
+22e1 9a20a200 iadd rega ,rega 
+22e2 c20022e0 loop g24_syncword_crc8_loop 
+22e3 1a227e00 copy rega ,pdata 
+22e4 67e14857 store 2 ,mem_24g_syncword 
+22e5 6fe0c857 fetch 1 ,mem_24g_syncword 
+22e6 6848c858 fetcht 1 ,mem_24g_syncword + 1 
+22e7 9840fe00 iadd temp ,pdata 
+22e8 67e0c859 store 1 ,mem_24g_syncword_crc8 
+22e9 20600000 rtn 
+
+g24_timer_check:
+22ea 20407e56 call disable_user 
+22eb 684a4850 fetcht 4 ,mem_24g_tx_btclk 
+22ec 1c427e00 copy clkn_bt ,pdata 
+22ed 98467c00 isub temp ,null 
+22ee 244122f9 ncall g24_timer_timeout ,positive 
+22ef 1fe22400 copy pdata ,regb 
+22f0 6fe24850 fetch 4 ,mem_24g_tx_btclk 
+22f1 6848c854 fetcht 1 ,mem_24g_interval 
+22f2 98408400 iadd temp ,temp 
+22f3 1a427e00 copy regb ,pdata 
+22f4 98467c00 isub temp ,null 
+22f5 24610000 nrtn positive 
+22f6 793ffe1c set0 28 ,pdata 
+22f7 67e24850 store 4 ,mem_24g_tx_btclk 
+22f8 20207e54 branch enable_user 
+
+g24_timer_timeout:
+22f9 20628000 rtn zero 
+22fa 79207e1c set1 28 ,pdata 
+22fb 20600000 rtn 
+
+g24_timer_init:
+22fc 58000000 setarg 0 
+22fd 67e24850 store 4 ,mem_24g_tx_btclk 
+22fe 20600000 rtn 
+
+g24_chmap_param_init:
+22ff 38001300 setsect 0 ,0x1300 
+2300 3805908b setsect 1 ,0x1908b 
+2301 380b6150 setsect 2 ,0x36150 
+2302 380c3d20 setsect 3 ,0x3d20 
+2303 67e4c840 store 9 ,mem_24g_ch_map1 
+2304 38003a1a setsect 0 ,0x3a1a 
+2305 3804c453 setsect 1 ,0xc453 
+2306 3808d312 setsect 2 ,0xd312 
+2307 380c0001 setsect 3 ,0x1 
+2308 e7e38005 istore 7 ,contw 
+2309 6fe0c866 fetch 1 ,mem_24g_ch_map_update 
+230a 207a0000 rtn blank 
+230b d8c04867 arg mem_24g_ch_update_map1 ,contr 
+230c d8a04840 arg mem_24g_ch_map1 ,contw 
+230d 20207d0c branch memcpy16 
+
+g24_chamap_param_update:
+230e 584e001e setarg 0x4e001e 
+230f 67e1c868 store 3 ,mem_24g_ch_update_map1 + 1 
+2310 58032303 setarg 0x032303 
+2311 e7e18005 istore 3 ,contw 
+2312 58250642 setarg 0x250642 
+2313 e7e18005 istore 3 ,contw 
+2314 58094c06 setarg 0x094c06 
+2315 e7e18005 istore 3 ,contw 
+2316 583c0927 setarg 0x3c0927 
+2317 e7e18005 istore 3 ,contw 
+2318 70486601 jam 1 ,mem_24g_ch_map_update 
+2319 20600000 rtn 
+
+g24_rx_window_init:
+231a d8407530 arg 0x7530 ,temp 
+231b c513a320 bmark1 mark_24g_rxmode ,g24_rx_window_store 
+231c d84012c0 arg 0x12c0 ,temp 
+231d 6fe0c864 fetch 1 ,mem_24g_rx_phy 
+231e c3012320 bbit0 2 ,g24_rx_window_store 
+231f d8402ee0 arg 0x2ee0 ,temp 
+
+g24_rx_window_store:
+2320 60494838 storet 2 ,mem_24g_rx_window 
+2321 20600000 rtn 
+
+g24_enable_1m:
+2322 70486401 jam 0x01 ,mem_24g_rx_phy 
+2323 70486501 jam 0x01 ,mem_24g_tx_phy 
+2324 20600000 rtn 
+
+g24_pair_param_init:
+2325 70487b4e jam 0x4e ,mem_24g_pair_ch 
+2326 58101520 setarg 0x101520 
+2327 67e1c877 store 3 ,mem_24g_pair_addr 
+2328 58000005 setarg 0x05 
+2329 e7e08005 istore 1 ,contw 
+232a 20600000 rtn 
+
+g24_pair_timeout_timer:
+232b da604883 arg mem_24g_pair_timeout ,regc 
+232c da40267c arg g24_stop_24g_mode ,regb 
+232d 20203191 branch timer_single_step_2b 
+
+g24_pair_start:
+232e 79200026 set1 mark_24g ,mark 
+232f 6fe0c8a1 fetch 1 ,mem_24g_conn_sm 
+2330 793ffe02 set0 state_24g_reconn ,pdata 
+2331 79207e01 set1 state_24g_pair ,pdata 
+2332 67e0c8a1 store 1 ,mem_24g_conn_sm 
+2333 58000000 setarg 0 
+2334 67e14887 store 2 ,mem_24g_reconn_timeout 
+2335 6fe14881 fetch 2 ,mem_24g_pair_timeout_init 
+2336 67e14883 store 2 ,mem_24g_pair_timeout 
+2337 70488000 jam 0 ,mem_24g_pair_no_ack 
+2338 2040236c call g24_pair_sm_reinit 
+
+g24_pair_init_param:
+2339 70482b00 jam 0 ,mem_24g_pid 
+233a 6fe0c87b fetch 1 ,mem_24g_pair_ch 
+233b 67e0c83a store 1 ,mem_24g_ch 
+233c 6fe0c87c fetch 1 ,mem_24g_pair_tx_power 
+233d 67e0c1e8 store 1 ,mem_tx_power 
+233e 6fe24877 fetch 4 ,mem_24g_pair_addr 
+233f 202022dc branch g24_update_addr_and_synccrc8 
+
+g24_pair_dispatch:
+2340 4771403c bpatchx patch3c_2 ,mem_patch3c 
+2341 6fe0c87f fetch 1 ,mem_24g_pair_sm 
+2342 c07fa38e beq state_24g_pairing_success ,g24_pair_exit 
+2343 c000a348 beq state_24g_pairing_1 ,g24_pair_sm_1 
+2344 c001234a beq state_24g_pairing_2 ,g24_pair_sm_2 
+2345 c001a350 beq state_24g_pairing_3 ,g24_pair_sm_3 
+2346 c0022356 beq state_24g_pairing_4 ,g24_pair_sm_4 
+2347 20600000 rtn 
+
+g24_pair_sm_1:
+2348 7047c6ff jam datatype_attemp ,mem_24g_txbuf 
+2349 20202357 branch g24_pair_sm_prep 
+
+g24_pair_sm_2:
+234a 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+234b 203a234e branch g24_pair_sm_2_skip ,blank 
+234c 6fe248a9 fetch 4 ,mem_24g_device_addr 
+234d 204022dc call g24_update_addr_and_synccrc8 
+
+g24_pair_sm_2_skip:
+234e 7047c6aa jam datatype_bind ,mem_24g_txbuf 
+234f 20202357 branch g24_pair_sm_prep 
+
+g24_pair_sm_3:
+2350 7047c655 jam datatype_config ,mem_24g_txbuf 
+2351 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+2352 203a2357 branch g24_pair_sm_prep ,blank 
+2353 6fe24891 fetch 4 ,mem_24g_receiver_addr 
+2354 67e247c8 store 4 ,mem_24g_txbuf + 2 
+2355 20202359 branch g24_pair_sm_common 
+
+g24_pair_sm_4:
+2356 7047c622 jam datatype_ok ,mem_24g_txbuf 
+
+g24_pair_sm_prep:
+2357 6fe248a9 fetch 4 ,mem_24g_device_addr 
+2358 67e247c8 store 4 ,mem_24g_txbuf + 2 
+
+g24_pair_sm_common:
+2359 6fe0c836 fetch 1 ,mem_24g_data_type 
+235a 1fe17e07 and_into bits_data ,pdata 
+235b 67e0c7c7 store 1 ,mem_24g_txbuf + 1 
+235c 7047cc00 jam 0 ,mem_24g_txbuf + 6 
+235d 70483507 jam 7 ,mem_24g_datalen 
+235e 20402291 call g24_transmit_prep 
+235f 2040265b call g24_transmit_receive_ack 
+2360 246c0000 nrtn sync 
+2361 24778000 nrtn user3 
+2362 20402597 call g24_txbuf_clear 
+2363 20402672 call g24_ackpayload_parse 
+2364 4771c03c bpatchx patch3c_3 ,mem_patch3c 
+2365 6fe0c87f fetch 1 ,mem_24g_pair_sm 
+2366 c17f8000 rtneq state_24g_pairing_success 
+2367 c000a371 beq state_24g_pairing_1 ,g24_pair_sm_1_waiting_ack 
+2368 c0012373 beq state_24g_pairing_2 ,g24_pair_sm_2_waiting_ack 
+2369 c001a379 beq state_24g_pairing_3 ,g24_pair_sm_3_waiting_ack 
+236a c0022381 beq state_24g_pairing_4 ,g24_pair_sm_4_waiting_ack 
+236b 20600000 rtn 
+
+g24_pair_sm_reinit:
+236c 70487f02 jam state_24g_pairing_2 ,mem_24g_pair_sm 
+236d 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+236e 207a0000 rtn blank 
+236f 70487f01 jam state_24g_pairing_1 ,mem_24g_pair_sm 
+2370 20600000 rtn 
+
+g24_pair_sm_1_waiting_ack:
+2371 70487f02 jam state_24g_pairing_2 ,mem_24g_pair_sm 
+2372 20202657 branch g24_transmit_abandon 
+
+g24_pair_sm_2_waiting_ack:
+2373 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+2374 203a2377 branch g24_pair_sm_2_waiting_ack_skip ,blank 
+2375 6fe2480c fetch 4 ,mem_24g_rxpayload + 2 
+2376 67e24891 store 4 ,mem_24g_receiver_addr 
+
+g24_pair_sm_2_waiting_ack_skip:
+2377 70487f03 jam state_24g_pairing_3 ,mem_24g_pair_sm 
+2378 20202657 branch g24_transmit_abandon 
+
+g24_pair_sm_3_waiting_ack:
+2379 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+237a 203a237f branch g24_pair_sm_3_waiting_ack_skip ,blank 
+237b 6fe2480c fetch 4 ,mem_24g_rxpayload + 2 
+237c 684a48a9 fetcht 4 ,mem_24g_device_addr 
+237d 98467c00 isub temp ,null 
+237e 24628000 nrtn zero 
+
+g24_pair_sm_3_waiting_ack_skip:
+237f 70487f04 jam state_24g_pairing_4 ,mem_24g_pair_sm 
+2380 20202657 branch g24_transmit_abandon 
+
+g24_pair_sm_4_waiting_ack:
+2381 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+2382 203a2387 branch g24_pair_sm_4_waiting_ack_skip ,blank 
+2383 6fe2480c fetch 4 ,mem_24g_rxpayload + 2 
+2384 684a4891 fetcht 4 ,mem_24g_receiver_addr 
+2385 98467c00 isub temp ,null 
+2386 24628000 nrtn zero 
+
+g24_pair_sm_4_waiting_ack_skip:
+2387 70487fff jam state_24g_pairing_success ,mem_24g_pair_sm 
+2388 70095b39 jam bt_evt_24g_pairing_complete ,mem_fifo_temp 
+2389 20407871 call ui_ipc_send_event 
+238a 58000000 setarg 0 
+238b 67e14883 store 2 ,mem_24g_pair_timeout 
+238c 6fe2480c fetch 4 ,mem_24g_rxpayload + 2 
+238d 204022dc call g24_update_addr_and_synccrc8 
+
+g24_pair_exit:
+238e 6fe0c8a1 fetch 1 ,mem_24g_conn_sm 
+238f 793ffe01 set0 state_24g_pair ,pdata 
+2390 67e0c8a1 store 1 ,mem_24g_conn_sm 
+2391 20202657 branch g24_transmit_abandon 
+
+g24_bind_mode_enable:
+2392 7048bf01 jam dongle_bind ,mem_24g_work_mode 
+2393 7048be00 jam clear_init ,mem_24g_mode_init 
+2394 20600000 rtn 
+
+g24_bind_init:
+2395 6fe0c8be fetch 1 ,mem_24g_mode_init 
+2396 c3808000 rtnbit1 dongle_bind 
+2397 79207e01 set1 dongle_bind ,pdata 
+2398 67e0c8be store 1 ,mem_24g_mode_init 
+2399 58000000 setarg 0 
+239a 67e1c87e store 3 ,mem_24g_device1_bind_step 
+239b 67e248cd store 4 ,mem_24g_transmitter_addr 
+239c 7048ba01 jam 1 ,mem_24g_ackpayload_enable 
+239d 20202339 branch g24_pair_init_param 
+
+g24_bind_ackpayload_prep:
+239e 7048ba01 jam 1 ,mem_24g_ackpayload_enable 
+239f 70483508 jam 0x08 ,mem_24g_datalen 
+23a0 d8c04881 arg mem_24g_bind_payload ,contr 
+23a1 d8a047c6 arg mem_24g_txbuf ,contw 
+23a2 20207d06 branch memcpy8 
+
+g24_bind_data_process:
+23a3 20402427 call g24_rx_interrupt_clear 
+23a4 204021db call g24_receive_packet 
+23a5 2437a427 nbranch g24_rx_interrupt_clear ,user3 
+23a6 204023b0 call g24_bind_data_parse 
+23a7 243423ae nbranch g24_bind_data_error ,user 
+23a8 20402455 call g24_transmit_ack 
+23a9 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+23aa 207a0000 rtn blank 
+23ab 6fe248cd fetch 4 ,mem_24g_transmitter_addr 
+23ac 207a0000 rtn blank 
+23ad 202022dc branch g24_update_addr_and_synccrc8 
+
+g24_bind_data_error:
+23ae 20402427 call g24_rx_interrupt_clear 
+23af 2020223f branch g24_end_of_packet 
+
+g24_bind_data_parse:
+23b0 7048cb05 jam bind_mode_continue ,mem_24g_bind_mode_continue 
+23b1 20407e56 call disable_user 
+23b2 d8c047a4 arg mem_24g_rxbuf ,contr 
+23b3 d8a04891 arg mem_24g_rxdata_temp ,contw 
+23b4 20407d06 call memcpy8 
+23b5 4772403c bpatchx patch3c_4 ,mem_patch3c 
+23b6 6fe0c893 fetch 1 ,mem_24g_rxdata_temp + 2 
+23b7 c05523bc beq datatype_bind ,g24_bind_first_step 
+23b8 c02aa3c9 beq datatype_config ,g24_bind_second_step 
+23b9 c01123e6 beq datatype_ok ,g24_bind_third_step 
+23ba c07fa5b5 beq datatype_attemp ,g24_data_attemp 
+23bb 20202427 branch g24_rx_interrupt_clear 
+
+g24_bind_first_step:
+23bc 6fe0c894 fetch 1 ,mem_24g_rxdata_temp + 3 
+23bd c000a3c0 beq datatype_device1 ,g24_bind_first_step_device1 
+23be c00123c6 beq datatype_device2 ,g24_bind_first_step_device2 
+23bf 20600000 rtn 
+
+g24_bind_first_step_device1:
+23c0 70487e01 jam 1 ,mem_24g_device1_bind_step 
+
+g24_bind_dvc1_payload_cfg:
+23c1 70488101 jam datatype_device1 ,mem_24g_bind_payload 
+
+g24_bind_payload_cfg:
+23c2 70488280 jam 0x80 ,mem_24g_bind_payload + 1 
+23c3 6fe340a8 fetch 6 ,mem_lap 
+23c4 67e34883 store 6 ,mem_24g_bind_payload + 2 
+23c5 20207e54 branch enable_user 
+
+g24_bind_first_step_device2:
+23c6 70487f01 jam 1 ,mem_24g_device2_bind_step 
+
+g24_bind_dvc2_payload_cfg:
+23c7 70488102 jam datatype_device2 ,mem_24g_bind_payload 
+23c8 202023c2 branch g24_bind_payload_cfg 
+
+g24_bind_second_step:
+23c9 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+23ca 203a23cf branch g24_bind_second_step_skip ,blank 
+23cb 6fe24895 fetch 4 ,mem_24g_rxdata_temp + 4 
+23cc 684a40a8 fetcht 4 ,mem_lap 
+23cd 98467c00 isub temp ,null 
+23ce 24628000 nrtn zero 
+
+g24_bind_second_step_skip:
+23cf 6fe0c894 fetch 1 ,mem_24g_rxdata_temp + 3 
+23d0 c000a3d3 beq datatype_device1 ,g24_bind_second_step_device1 
+23d1 c00123de beq datatype_device2 ,g24_bind_second_step_device2 
+23d2 20600000 rtn 
+
+g24_bind_second_step_device1:
+23d3 6fe0c87e fetch 1 ,mem_24g_device1_bind_step 
+23d4 c000a3d6 beq 1 ,g24_bind_dvc1_step_set2 
+23d5 20600000 rtn 
+
+g24_bind_dvc1_step_set2:
+23d6 70487e02 jam 2 ,mem_24g_device1_bind_step 
+23d7 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+23d8 203a23c1 branch g24_bind_dvc1_payload_cfg ,blank 
+
+g24_bind_dvc1_payload_cfg_transmitter_addr:
+23d9 70488101 jam datatype_device1 ,mem_24g_bind_payload 
+
+g24_bind_payload_cfg_transmitter_addr:
+23da 70488280 jam 0x80 ,mem_24g_bind_payload + 1 
+23db 6fe248cd fetch 4 ,mem_24g_transmitter_addr 
+23dc 67e24883 store 4 ,mem_24g_bind_payload + 2 
+23dd 20207e54 branch enable_user 
+
+g24_bind_second_step_device2:
+23de 6fe0c87f fetch 1 ,mem_24g_device2_bind_step 
+23df c000a3e1 beq 1 ,g24_bind_dvc2_step_set2 
+23e0 20600000 rtn 
+
+g24_bind_dvc2_step_set2:
+23e1 70487f02 jam 2 ,mem_24g_device2_bind_step 
+23e2 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+23e3 203a23c7 branch g24_bind_dvc2_payload_cfg ,blank 
+23e4 70488102 jam datatype_device2 ,mem_24g_bind_payload 
+23e5 202023da branch g24_bind_payload_cfg_transmitter_addr 
+
+g24_bind_third_step:
+23e6 6fe0c85b fetch 1 ,mem_24g_pair_switch 
+23e7 203a23ec branch g24_bind_third_step_skip ,blank 
+23e8 6fe24895 fetch 4 ,mem_24g_rxdata_temp + 4 
+23e9 684a48cd fetcht 4 ,mem_24g_transmitter_addr 
+23ea 98467c00 isub temp ,null 
+23eb 24628000 nrtn zero 
+
+g24_bind_third_step_skip:
+23ec 6fe0c894 fetch 1 ,mem_24g_rxdata_temp + 3 
+23ed c000a3f0 beq datatype_device1 ,g24_bind_third_step_device1 
+23ee c00123fa beq datatype_device2 ,g24_bind_third_step_device2 
+23ef 20600000 rtn 
+
+g24_bind_third_step_device1:
+23f0 6fe0c87e fetch 1 ,mem_24g_device1_bind_step 
+23f1 c00123f3 beq 2 ,g24_bind_dvc1_step_success 
+23f2 20600000 rtn 
+
+g24_bind_dvc1_step_success:
+23f3 204023c1 call g24_bind_dvc1_payload_cfg 
+23f4 6fe0c880 fetch 1 ,mem_24g_bind_device_status 
+23f5 1fe1fe01 or_into 0x01 ,pdata 
+23f6 67e0c880 store 1 ,mem_24g_bind_device_status 
+
+g24_bind_exit:
+23f7 58000000 setarg 0 
+23f8 67e1487e store 2 ,mem_24g_device1_bind_step 
+23f9 20600000 rtn 
+
+g24_bind_third_step_device2:
+23fa 6fe0c87f fetch 1 ,mem_24g_device2_bind_step 
+23fb c08023fd bne 0 ,g24_bind_dvc2_step_success 
+23fc 20600000 rtn 
+
+g24_bind_dvc2_step_success:
+23fd 204023c7 call g24_bind_dvc2_payload_cfg 
+23fe 6fe0c880 fetch 1 ,mem_24g_bind_device_status 
+23ff 1fe1fe02 or_into 0x02 ,pdata 
+2400 67e0c880 store 1 ,mem_24g_bind_device_status 
+2401 204023f7 call g24_bind_exit 
+
+g24_store_dvc2_bind_flag:
+2402 6fe0c09a fetch 1 ,mem_device_option 
+2403 c1820000 rtnne dvc_op_dongle 
+2404 6fe0c8e9 fetch 1 ,mem_dg_kb_bind_flag 
+2405 c12d8000 rtneq dongle_kb_bind_success 
+2406 7048e95b jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+2407 20403657 call dongle_write_kb_bind_status 
+2408 20205d8c branch soft_reset_chip 
+
+g24_receive_init:
+2409 79200027 set1 mark_24g_rxmode ,mark 
+240a 6fe0c1e8 fetch 1 ,mem_tx_power 
+240b 67e0c8cc store 1 ,mem_tx_power_temp 
+240c 2040231a call g24_rx_window_init 
+240d 202025ed branch rssi_receiver_buff_init 
+
+g24_receive_dispatch:
+240e 6fe14889 fetch 2 ,mem_cb_24g_receive_process 
+240f 20207e05 branch callback_func 
+
+g24_ackpayload_prep:
+2410 70483500 jam 0 ,mem_24g_datalen 
+2411 6fe0c8ba fetch 1 ,mem_24g_ackpayload_enable 
+2412 207a0000 rtn blank 
+2413 6fe1488b fetch 2 ,mem_cb_24g_ackpayload 
+2414 20207e05 branch callback_func 
+
+g24_receive_packet_start:
+2415 20402452 call g24_receive_transmit_ack 
+2416 2437a427 nbranch g24_rx_interrupt_clear ,user3 
+
+g24_receive_packet_parse:
+2417 20402444 call g24_receive_packet_parse_pid_crc 
+2418 24342427 nbranch g24_rx_interrupt_clear ,user 
+2419 6fe0c82a fetch 1 ,mem_24g_rxdata_length 
+241a 203a2427 branch g24_rx_interrupt_clear ,blank 
+241b 1fe0fe02 increase 2 ,pdata 
+241c 98007200 iforce loopcnt 
+241d d8c047a4 arg mem_24g_rxbuf ,contr 
+241e d8a04891 arg mem_24g_rxdata_temp ,contw 
+241f 20407d5f call memcpy 
+2420 7048bc00 jam 0 ,mem_24g_mode_switch 
+2421 6fe0c8b9 fetch 1 ,mem_24g_pair_mode 
+2422 205a245f call g24_enable_nodata_timer ,blank 
+2423 6fe0c893 fetch 1 ,mem_24g_rxdata_temp + 2 
+2424 c000a42a beq datatype_device1 ,g24_data_device1 
+2425 c0012438 beq datatype_device2 ,g24_data_device2 
+2426 c07fa5b5 beq datatype_attemp ,g24_data_attemp 
+
+g24_rx_interrupt_clear:
+2427 d8a047a4 arg mem_24g_rxbuf ,contw 
+2428 df200042 arg 66 ,loopcnt 
+2429 20207d26 branch clear_mem 
+
+g24_data_device1:
+242a 20402553 call g24_ch_timer_reinit 
+242b 6fe0c8b3 fetch 1 ,mem_24g_abort_packet 
+242c 6848c891 fetcht 1 ,mem_24g_rxdata_temp 
+242d 284ffe03 isolate1 bit_abort ,temp 
+242e 7920fe00 setflag true ,0 ,pdata 
+242f 67e0c8b3 store 1 ,mem_24g_abort_packet 
+2430 c000a43d beq 1 ,g24_data_attemp_device1_abort 
+2431 6fe0c8bb fetch 1 ,mem_24g_hop_packet 
+2432 6848c891 fetcht 1 ,mem_24g_rxdata_temp 
+2433 284ffe04 isolate1 bit_hop ,temp 
+2434 7920fe00 setflag true ,0 ,pdata 
+2435 67e0c8bb store 1 ,mem_24g_hop_packet 
+2436 6fe1488d fetch 2 ,mem_cb_24g_data_device1 
+2437 20207e05 branch callback_func 
+
+g24_data_device2:
+2438 6848c891 fetcht 1 ,mem_24g_rxdata_temp 
+2439 284ffe03 isolate1 bit_abort ,temp 
+243a 2020a442 branch g24_data_attemp_device2_abort ,true 
+243b 6fe1488f fetch 2 ,mem_cb_24g_data_device2 
+243c 20207e05 branch callback_func 
+
+g24_data_attemp_device1_abort:
+243d 6fe0c09a fetch 1 ,mem_device_option 
+243e 1fe67c0e sub pdata ,dvc_op_car ,null 
+243f 2042b476 call car_stop_blink ,zero 
+2440 6fe2489b fetch 4 ,mem_24g_rxdata_temp + 10 
+2441 202025bc branch g24_store_device1_addr 
+
+g24_data_attemp_device2_abort:
+2442 6fe2489b fetch 4 ,mem_24g_rxdata_temp + 10 
+2443 202025c1 branch g24_store_device2_addr 
+
+g24_receive_packet_parse_pid_crc:
+2444 20407e56 call disable_user 
+2445 6fe0c833 fetch 1 ,mem_24g_sta_pid 
+2446 6848c834 fetcht 1 ,mem_24g_last_pid 
+2447 98467c00 isub temp ,null 
+2448 2442fe54 ncall enable_user ,zero 
+2449 6fe0c833 fetch 1 ,mem_24g_sta_pid 
+244a 67e0c834 store 1 ,mem_24g_last_pid 
+244b 6fe1c82d fetch 3 ,mem_24g_sta_crc 
+244c 6849c830 fetcht 3 ,mem_24g_last_crc 
+244d 98467c00 isub temp ,null 
+244e 2442fe54 ncall enable_user ,zero 
+244f 6fe1c82d fetch 3 ,mem_24g_sta_crc 
+2450 67e1c830 store 3 ,mem_24g_last_crc 
+2451 20600000 rtn 
+
+g24_receive_transmit_ack:
+2452 20402427 call g24_rx_interrupt_clear 
+2453 204021db call g24_receive_packet 
+2454 24778000 nrtn user3 
+
+g24_transmit_ack:
+2455 6fe0c7a4 fetch 1 ,mem_24g_rxbuf 
+2456 67e0c836 store 1 ,mem_24g_data_type 
+2457 204022be call g24_read_len_pid_crc 
+2458 6fe0c7a5 fetch 1 ,mem_24g_rxbuf + 1 
+2459 2feffe00 isolate1 bit_ack_24g ,pdata 
+245a 2020a45e branch g24tx_no_ack ,true 
+
+g24tx_with_ack:
+245b 20402410 call g24_ackpayload_prep 
+245c 20402291 call g24_transmit_prep 
+245d 20402246 call g24_transmit 
+
+g24tx_no_ack:
+245e 2020223f branch g24_end_of_packet 
+
+g24_enable_nodata_timer:
+245f 7048bd01 jam 1 ,mem_24g_nodata_timer_enable 
+
+g24_enable_nodata_timer_init:
+2460 58000280 setarg timer_nodata_delay 
+2461 d8e00008 arg timer_nodata ,queue 
+2462 20207d66 branch timer_init 
+
+g24_mode_switch_init:
+2463 7048bc01 jam 1 ,mem_24g_mode_switch 
+2464 7048c000 jam 0 ,mem_24g_time_slice 
+2465 704854ff jam 0xff ,mem_24g_interval 
+2466 202022fc branch g24_timer_init 
+
+g24_mode_switch:
+2467 4772c03c bpatchx patch3c_5 ,mem_patch3c 
+2468 6fe0c8bc fetch 1 ,mem_24g_mode_switch 
+2469 207a0000 rtn blank 
+246a 204022ea call g24_timer_check 
+246b 24740000 nrtn user 
+246c 20402474 call g24_bind_mode_continue 
+246d 6fe0c8c0 fetch 1 ,mem_24g_time_slice 
+246e 1fe0fe01 increase 1 ,pdata 
+246f 1fe17e01 and_into 1 ,pdata 
+2470 67e0c8c0 store 1 ,mem_24g_time_slice 
+2471 c0002479 beq 0 ,g24_work_mode_switch 
+2472 c000a47c beq 1 ,g24_bind_mode_switch 
+2473 20600000 rtn 
+
+g24_bind_mode_continue:
+2474 6fe0c8cb fetch 1 ,mem_24g_bind_mode_continue 
+2475 207a0000 rtn blank 
+2476 1fe0ffff increase -1 ,pdata 
+2477 67e0c8cb store 1 ,mem_24g_bind_mode_continue 
+2478 20600000 rtn 
+
+g24_work_mode_switch:
+2479 6fe0c8cb fetch 1 ,mem_24g_bind_mode_continue 
+247a 247a0000 nrtn blank 
+247b 2020248d branch g24_switch_work_mode 
+
+g24_bind_mode_switch:
+247c 6fe0c8cb fetch 1 ,mem_24g_bind_mode_continue 
+247d 247a0000 nrtn blank 
+247e 20202392 branch g24_bind_mode_enable 
+
+g24_work_init:
+247f 6fe0c8be fetch 1 ,mem_24g_mode_init 
+2480 c3800000 rtnbit1 dongle_work 
+2481 79207e00 set1 dongle_work ,pdata 
+2482 67e0c8be store 1 ,mem_24g_mode_init 
+2483 6fe0c8cc fetch 1 ,mem_tx_power_temp 
+2484 67e0c1e8 store 1 ,mem_tx_power 
+2485 7048ba00 jam 0 ,mem_24g_ackpayload_enable 
+2486 700bf900 jam 0 ,mem_usb_tx_enable 
+2487 7048b301 jam 1 ,mem_24g_abort_packet 
+2488 70482b00 jam 0 ,mem_24g_pid 
+2489 6fe240a8 fetch 4 ,mem_lap 
+248a 204022dc call g24_update_addr_and_synccrc8 
+248b 204022cb call g24_ch 
+248c 20202427 branch g24_rx_interrupt_clear 
+
+g24_switch_work_mode:
+248d 7048ba00 jam 0 ,mem_24g_ackpayload_enable 
+
+g24_work_mode_enable:
+248e 7048bf00 jam dongle_work ,mem_24g_work_mode 
+248f 7048be00 jam clear_init ,mem_24g_mode_init 
+2490 20600000 rtn 
+
+g24_work_mode_start:
+2491 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+2492 c1800000 rtnne dongle_work 
+2493 2040247f call g24_work_init 
+2494 2040253e call g24_ch_process 
+2495 20202415 branch g24_receive_packet_start 
+
+g24_bind_mode_auto:
+2496 4773403c bpatchx patch3c_6 ,mem_patch3c 
+2497 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+2498 c1808000 rtnne dongle_bind 
+2499 20402395 call g24_bind_init 
+249a 204023a3 call g24_bind_data_process 
+249b 6fe0c8b9 fetch 1 ,mem_24g_pair_mode 
+249c 247a0000 nrtn blank 
+249d 6fe0c880 fetch 1 ,mem_24g_bind_device_status 
+249e 207a0000 rtn blank 
+249f 7048bc00 jam 0 ,mem_24g_mode_switch 
+24a0 2040248d call g24_switch_work_mode 
+24a1 2040245f call g24_enable_nodata_timer 
+24a2 202022fc branch g24_timer_init 
+
+g24_search_mode_init:
+24a3 6fe0c8be fetch 1 ,mem_24g_mode_init 
+24a4 c3838000 rtnbit1 dongle_search 
+24a5 79207e07 set1 dongle_search ,pdata 
+24a6 67e0c8be store 1 ,mem_24g_mode_init 
+24a7 7048c000 jam 0 ,mem_24g_time_slice 
+24a8 7048ba01 jam 1 ,mem_24g_ackpayload_enable 
+24a9 58000000 setarg 0 
+24aa 67e1c8de store 3 ,mem_rssi_noise_self_index 
+24ab 67e3c8c3 store 7 ,mem_24g_self_config_ch_once 
+24ac 2040252e call g24_receiver_addr_check 
+24ad 24628000 nrtn zero 
+24ae 6fe0c83b fetch 1 ,mem_24g_current_ch_number 
+24af 67e0c8c2 store 1 ,mem_24g_self_ch_number 
+24b0 6fe0c83a fetch 1 ,mem_24g_ch 
+24b1 67e0c8c1 store 1 ,mem_24g_self_last_ch 
+24b2 20600000 rtn 
+
+g24_search_mode_auto:
+24b3 4773c03c bpatchx patch3c_7 ,mem_patch3c 
+24b4 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+24b5 c1838000 rtnne dongle_search 
+24b6 204024a3 call g24_search_mode_init 
+24b7 204024d7 call g24_auto_addr_ch_search 
+24b8 20402452 call g24_receive_transmit_ack 
+24b9 2437a427 nbranch g24_rx_interrupt_clear ,user3 
+24ba 2040252e call g24_receiver_addr_check 
+24bb 2042a417 call g24_receive_packet_parse ,zero 
+24bc 7048bf00 jam dongle_work ,mem_24g_work_mode 
+24bd 6fe0c8be fetch 1 ,mem_24g_mode_init 
+24be 79207e00 set1 dongle_work ,pdata 
+24bf 67e0c8be store 1 ,mem_24g_mode_init 
+24c0 6fe0c8ba fetch 1 ,mem_24g_ackpayload_enable 
+24c1 1fe67c02 sub pdata ,2 ,null 
+24c2 2442a52c ncall g24_ackpayload_disable ,zero 
+24c3 20402427 call g24_rx_interrupt_clear 
+24c4 2040245f call g24_enable_nodata_timer 
+24c5 2040252e call g24_receiver_addr_check 
+24c6 2022a4d0 branch g24_self_ch_num_reinit ,zero 
+24c7 6fe2483c fetch 4 ,mem_24g_addr 
+24c8 684a48d5 fetcht 4 ,mem_24g_device2_addr 
+24c9 98467c00 isub temp ,null 
+24ca 2022a4d3 branch g24_device2_ch_num_reinit ,zero 
+24cb 6fe2483c fetch 4 ,mem_24g_addr 
+24cc 684a48d1 fetcht 4 ,mem_24g_device1_addr 
+24cd 98467c00 isub temp ,null 
+24ce 2022a4d5 branch g24_device1_ch_num_reinit ,zero 
+24cf 20600000 rtn 
+
+g24_self_ch_num_reinit:
+24d0 6fe0c8c2 fetch 1 ,mem_24g_self_ch_number 
+
+g24_current_ch_num_reinit:
+24d1 67e0c83b store 1 ,mem_24g_current_ch_number 
+24d2 20600000 rtn 
+
+g24_device2_ch_num_reinit:
+24d3 6fe0c8c8 fetch 1 ,mem_24g_device2_ch_number 
+24d4 202024d1 branch g24_current_ch_num_reinit 
+
+g24_device1_ch_num_reinit:
+24d5 6fe0c8c5 fetch 1 ,mem_24g_device1_ch_number 
+24d6 202024d1 branch g24_current_ch_num_reinit 
+
+g24_auto_addr_ch_search:
+24d7 6fe0c8c0 fetch 1 ,mem_24g_time_slice 
+24d8 1fe0fe01 increase 1 ,pdata 
+24d9 1fe17e03 and_into 3 ,pdata 
+24da 67e0c8c0 store 1 ,mem_24g_time_slice 
+24db c00024fa beq 0 ,g24_auto_bind_config_device2 
+24dc c000a514 beq 1 ,g24_auto_bind_config_self 
+24dd c00124e0 beq 2 ,g24_auto_bind_config_device1 
+24de c001a514 beq 3 ,g24_auto_bind_config_self 
+24df 20600000 rtn 
+
+g24_auto_bind_config_device1:
+24e0 204023c1 call g24_bind_dvc1_payload_cfg 
+24e1 6fe248d1 fetch 4 ,mem_24g_device1_addr 
+24e2 203a24d7 branch g24_auto_addr_ch_search ,blank 
+24e3 204022dc call g24_update_addr_and_synccrc8 
+24e4 6fe0c8c6 fetch 1 ,mem_24g_device1_config_ch_once 
+24e5 205a24f5 call g24_device1_config_ch_once ,blank 
+24e6 6fe0c8c4 fetch 1 ,mem_24g_device1_last_ch 
+24e7 67e0c83a store 1 ,mem_24g_ch 
+24e8 6848c8df fetcht 1 ,mem_rssi_noise_device1_index 
+24e9 6a2148e5 fetchr rega ,2 ,mem_rssi_noise_device1_buffer_ptr 
+24ea 204025c3 call rssi_store 
+24eb 6048c8df storet 1 ,mem_rssi_noise_device1_index 
+24ec 204025cb call rssi_average 
+24ed 6048c8dc storet 1 ,mem_rssi_noise_device1_avg 
+24ee 18467c50 sub temp ,rssi_thresh_noise ,null 
+24ef 24610000 nrtn positive 
+24f0 6848c8c5 fetcht 1 ,mem_24g_device1_ch_number 
+24f1 204022cf call g24_ch_map_size 
+24f2 6048c8c5 storet 1 ,mem_24g_device1_ch_number 
+24f3 67e0c8c4 store 1 ,mem_24g_device1_last_ch 
+24f4 20600000 rtn 
+
+g24_device1_config_ch_once:
+24f5 7048c601 jam 1 ,mem_24g_device1_config_ch_once 
+24f6 d8400000 arg 0 ,temp 
+24f7 204022d3 call g24_ch_calc 
+24f8 67e0c8c4 store 1 ,mem_24g_device1_last_ch 
+24f9 20600000 rtn 
+
+g24_auto_bind_config_device2:
+24fa 204023c7 call g24_bind_dvc2_payload_cfg 
+24fb 6fe248d5 fetch 4 ,mem_24g_device2_addr 
+24fc 203a24d7 branch g24_auto_addr_ch_search ,blank 
+24fd 204022dc call g24_update_addr_and_synccrc8 
+24fe 6fe0c8c9 fetch 1 ,mem_24g_device2_config_ch_once 
+24ff 205a250f call g24_device2_config_ch_once ,blank 
+2500 6fe0c8c7 fetch 1 ,mem_24g_device2_last_ch 
+2501 67e0c83a store 1 ,mem_24g_ch 
+2502 6848c8e0 fetcht 1 ,mem_rssi_noise_device2_index 
+2503 6a2148e7 fetchr rega ,2 ,mem_rssi_noise_device2_buffer_ptr 
+2504 204025c3 call rssi_store 
+2505 6048c8e0 storet 1 ,mem_rssi_noise_device2_index 
+2506 204025cb call rssi_average 
+2507 6048c8dd storet 1 ,mem_rssi_noise_device2_avg 
+2508 18467c50 sub temp ,rssi_thresh_noise ,null 
+2509 24610000 nrtn positive 
+250a 6848c8c8 fetcht 1 ,mem_24g_device2_ch_number 
+250b 204022cf call g24_ch_map_size 
+250c 6048c8c8 storet 1 ,mem_24g_device2_ch_number 
+250d 67e0c8c7 store 1 ,mem_24g_device2_last_ch 
+250e 20600000 rtn 
+
+g24_device2_config_ch_once:
+250f 7048c901 jam 1 ,mem_24g_device2_config_ch_once 
+2510 d8400000 arg 0 ,temp 
+2511 204022d3 call g24_ch_calc 
+2512 67e0c8c7 store 1 ,mem_24g_device2_last_ch 
+2513 20600000 rtn 
+
+g24_auto_bind_config_self:
+2514 204023c1 call g24_bind_dvc1_payload_cfg 
+2515 6fe240a8 fetch 4 ,mem_lap 
+2516 204022dc call g24_update_addr_and_synccrc8 
+2517 6fe0c8c3 fetch 1 ,mem_24g_self_config_ch_once 
+2518 205a2528 call g24_self_config_ch_once ,blank 
+2519 6fe0c8c1 fetch 1 ,mem_24g_self_last_ch 
+251a 67e0c83a store 1 ,mem_24g_ch 
+251b 6848c8de fetcht 1 ,mem_rssi_noise_self_index 
+251c 6a2148e3 fetchr rega ,2 ,mem_rssi_noise_self_buffer_ptr 
+251d 204025c3 call rssi_store 
+251e 6048c8de storet 1 ,mem_rssi_noise_self_index 
+251f 204025cb call rssi_average 
+2520 6048c8db storet 1 ,mem_rssi_noise_self_avg 
+2521 18467c50 sub temp ,rssi_thresh_noise ,null 
+2522 24610000 nrtn positive 
+2523 6848c8c2 fetcht 1 ,mem_24g_self_ch_number 
+2524 204022cf call g24_ch_map_size 
+2525 6048c8c2 storet 1 ,mem_24g_self_ch_number 
+2526 67e0c8c1 store 1 ,mem_24g_self_last_ch 
+2527 20600000 rtn 
+
+g24_self_config_ch_once:
+2528 7048c301 jam 1 ,mem_24g_self_config_ch_once 
+2529 6fe0c8c1 fetch 1 ,mem_24g_self_last_ch 
+252a 67e0c83a store 1 ,mem_24g_ch 
+252b 20600000 rtn 
+
+g24_ackpayload_disable:
+252c 7048ba00 jam 0 ,mem_24g_ackpayload_enable 
+252d 20600000 rtn 
+
+g24_receiver_addr_check:
+252e 6fe2483c fetch 4 ,mem_24g_addr 
+252f 684a40a8 fetcht 4 ,mem_lap 
+2530 98467c00 isub temp ,null 
+2531 20600000 rtn 
+
+g24_nodata_process:
+2532 6fe0c8ba fetch 1 ,mem_24g_ackpayload_enable 
+2533 c1010000 rtneq 2 
+2534 6fe0c8bd fetch 1 ,mem_24g_nodata_timer_enable 
+2535 207a0000 rtn blank 
+2536 d8e00008 arg timer_nodata ,queue 
+2537 20407d74 call timer_check 
+2538 247a0000 nrtn blank 
+2539 7048bd00 jam 0 ,mem_24g_nodata_timer_enable 
+253a 7048cb00 jam 0 ,mem_24g_bind_mode_continue 
+253b 7048bf07 jam dongle_search ,mem_24g_work_mode 
+253c 7048be00 jam clear_init ,mem_24g_mode_init 
+253d 20202427 branch g24_rx_interrupt_clear 
+
+g24_ch_process:
+253e 6fe0c8b3 fetch 1 ,mem_24g_abort_packet 
+253f c000a601 beq 1 ,rssi_noise_monitor 
+2540 6fe0c8bb fetch 1 ,mem_24g_hop_packet 
+2541 c000a551 beq 1 ,g24_ch_receive_hop_pac 
+2542 684a48b4 fetcht 4 ,mem_24g_hop_btclk 
+2543 1c427e00 copy clkn_bt ,pdata 
+2544 98467c00 isub temp ,null 
+2545 244122f9 ncall g24_timer_timeout ,positive 
+2546 1fe22400 copy pdata ,regb 
+2547 6fe248b4 fetch 4 ,mem_24g_hop_btclk 
+2548 6848c8b8 fetcht 1 ,mem_24g_hop_interval 
+2549 98408400 iadd temp ,temp 
+254a 1a427e00 copy regb ,pdata 
+254b 98467c00 isub temp ,null 
+254c 24610000 nrtn positive 
+254d 793ffe1c set0 28 ,pdata 
+254e 67e248b4 store 4 ,mem_24g_hop_btclk 
+254f 7048b301 jam 1 ,mem_24g_abort_packet 
+2550 202022cb branch g24_ch 
+
+g24_ch_receive_hop_pac:
+2551 7048bb00 jam 0 ,mem_24g_hop_packet 
+2552 202022cb branch g24_ch 
+
+g24_ch_timer_reinit:
+2553 1c427e00 copy clkn_bt ,pdata 
+2554 67e248b4 store 4 ,mem_24g_hop_btclk 
+2555 20600000 rtn 
+
+g24_reconn_timeout_timer:
+2556 da604887 arg mem_24g_reconn_timeout ,regc 
+2557 da40267c arg g24_stop_24g_mode ,regb 
+2558 20203191 branch timer_single_step_2b 
+
+g24_reconn_start:
+2559 4774403d bpatchx patch3d_0 ,mem_patch3d 
+255a 79200026 set1 mark_24g ,mark 
+255b 6fe0c8a1 fetch 1 ,mem_24g_conn_sm 
+255c 793ffe01 set0 state_24g_pair ,pdata 
+255d 79207e02 set1 state_24g_reconn ,pdata 
+255e 67e0c8a1 store 1 ,mem_24g_conn_sm 
+255f 6fe0c88c fetch 1 ,mem_24g_fast_conn_enable 
+2560 203a256e branch g24_reconn_receiver_addr ,blank 
+2561 6fe0c88b fetch 1 ,mem_24g_reconn_type 
+2562 c000a566 beq fast_conn_and_receiver ,g24_reconn_fast_conn 
+2563 c0012566 beq fast_conn_and_3_0_addr ,g24_reconn_fast_conn 
+2564 c001a575 beq receiver_and_3_0_addr ,g24_reconn_device_3_0_addr 
+2565 c0022575 beq pair_and_3_0_addr ,g24_reconn_device_3_0_addr 
+
+g24_reconn_fast_conn:
+2566 6fe0c87c fetch 1 ,mem_24g_pair_tx_power 
+2567 67e0c1e8 store 1 ,mem_tx_power 
+2568 6848c895 fetcht 1 ,mem_24g_fast_conn_temp_ch 
+2569 6048c83b storet 1 ,mem_24g_current_ch_number 
+256a 6fe2488d fetch 4 ,mem_24g_fast_conn_addr 
+256b 2040257e call g24_ch_syncword_crc8_init 
+256c 6048c895 storet 1 ,mem_24g_fast_conn_temp_ch 
+256d 20600000 rtn 
+
+g24_reconn_receiver_addr:
+256e 7041e803 jam tx_power_3db ,mem_tx_power 
+256f 6848c896 fetcht 1 ,mem_24g_receiver_temp_ch 
+2570 6048c83b storet 1 ,mem_24g_current_ch_number 
+2571 6fe24891 fetch 4 ,mem_24g_receiver_addr 
+2572 2040257e call g24_ch_syncword_crc8_init 
+2573 6048c896 storet 1 ,mem_24g_receiver_temp_ch 
+2574 20600000 rtn 
+
+g24_reconn_device_3_0_addr:
+2575 7041e803 jam tx_power_3db ,mem_tx_power 
+2576 6848c897 fetcht 1 ,mem_24g_device_temp_ch 
+2577 6048c83b storet 1 ,mem_24g_current_ch_number 
+2578 6fe248a9 fetch 4 ,mem_24g_device_addr 
+2579 2040257e call g24_ch_syncword_crc8_init 
+257a 6048c897 storet 1 ,mem_24g_device_temp_ch 
+257b 20600000 rtn 
+
+g24_store_receiver_addr:
+257c 6fe2480c fetch 4 ,mem_24g_rxpayload + 2 
+257d 67e24891 store 4 ,mem_24g_receiver_addr 
+
+g24_ch_syncword_crc8_init:
+257e 204022dc call g24_update_addr_and_synccrc8 
+257f 202022cb branch g24_ch 
+
+g24_reconn_dispatch:
+2580 4774c03d bpatchx patch3d_1 ,mem_patch3d 
+2581 2040259a call g24_reconn_data_prep 
+2582 2040265b call g24_transmit_receive_ack 
+2583 242c25a1 nbranch g24_reconn_device_fail ,sync 
+2584 2437a5a1 nbranch g24_reconn_device_fail ,user3 
+2585 20402672 call g24_ackpayload_parse 
+
+g24_reconn_receiver_succ:
+2586 6fe0c8a1 fetch 1 ,mem_24g_conn_sm 
+2587 793ffe02 set0 state_24g_reconn ,pdata 
+2588 67e0c8a1 store 1 ,mem_24g_conn_sm 
+2589 58000000 setarg 0 
+258a 67e14883 store 2 ,mem_24g_pair_timeout 
+258b 67e14889 store 2 ,mem_24g_reconn_count 
+258c 67e14887 store 2 ,mem_24g_reconn_timeout 
+258d 6fe24877 fetch 4 ,mem_24g_pair_addr 
+258e 684a483c fetcht 4 ,mem_24g_addr 
+258f 98467c00 isub temp ,null 
+2590 2022a32e branch g24_pair_start ,zero 
+2591 6fe248a9 fetch 4 ,mem_24g_device_addr 
+2592 684a483c fetcht 4 ,mem_24g_addr 
+2593 98467c00 isub temp ,null 
+2594 2042a57c call g24_store_receiver_addr ,zero 
+2595 70095b3c jam bt_evt_24g_attempt_success ,mem_fifo_temp 
+2596 20407871 call ui_ipc_send_event 
+
+g24_txbuf_clear:
+2597 df200004 arg 4 ,loopcnt 
+2598 d8a047c6 arg mem_24g_txbuf ,contw 
+2599 20207d17 branch memset0 
+
+g24_reconn_data_prep:
+259a 7047c6ff jam datatype_attemp ,mem_24g_txbuf 
+259b 6fe0c836 fetch 1 ,mem_24g_data_type 
+259c 67e0c7c7 store 1 ,mem_24g_txbuf + 1 
+259d 6fe248a9 fetch 4 ,mem_24g_device_addr 
+259e 67e247c8 store 4 ,mem_24g_txbuf + 2 
+259f 70483506 jam 6 ,mem_24g_datalen 
+25a0 20202291 branch g24_transmit_prep 
+
+g24_reconn_device_fail:
+25a1 6fe0c88c fetch 1 ,mem_24g_fast_conn_enable 
+25a2 203a22cb branch g24_ch ,blank 
+25a3 6fe14889 fetch 2 ,mem_24g_reconn_count 
+25a4 1fe0fe01 increase 1 ,pdata 
+25a5 67e14889 store 2 ,mem_24g_reconn_count 
+25a6 2feffe03 isolate1 3 ,pdata 
+25a7 6fe0c88b fetch 1 ,mem_24g_reconn_type 
+25a8 c000a5ad beq fast_conn_and_receiver ,g24_reconn_fast_conn_and_receiver 
+25a9 c00125af beq fast_conn_and_3_0_addr ,g24_reconn_fast_conn_and_3_0 
+25aa c001a5b1 beq receiver_and_3_0_addr ,g24_reconn_receiver_and_3_0 
+25ab c00225b3 beq pair_and_3_0_addr ,g24_reconn_pair_and_3_0 
+25ac 2020256e branch g24_reconn_receiver_addr 
+
+g24_reconn_fast_conn_and_receiver:
+25ad 2020a56e branch g24_reconn_receiver_addr ,true 
+25ae 20202566 branch g24_reconn_fast_conn 
+
+g24_reconn_fast_conn_and_3_0:
+25af 2020a575 branch g24_reconn_device_3_0_addr ,true 
+25b0 20202566 branch g24_reconn_fast_conn 
+
+g24_reconn_receiver_and_3_0:
+25b1 2020a575 branch g24_reconn_device_3_0_addr ,true 
+25b2 2020256e branch g24_reconn_receiver_addr 
+
+g24_reconn_pair_and_3_0:
+25b3 2020a339 branch g24_pair_init_param ,true 
+25b4 20202575 branch g24_reconn_device_3_0_addr 
+
+g24_data_attemp:
+25b5 6fe0c894 fetch 1 ,mem_24g_rxdata_temp + 3 
+25b6 c000a5b9 beq datatype_device1 ,g24_data_attemp_device1 
+25b7 c00125be beq datatype_device2 ,g24_data_attemp_device2 
+25b8 20600000 rtn 
+
+g24_data_attemp_device1:
+25b9 20407e54 call enable_user 
+25ba 6fe24895 fetch 4 ,mem_24g_rxdata_temp + 4 
+25bb 67e248cd store 4 ,mem_24g_transmitter_addr 
+
+g24_store_device1_addr:
+25bc 67e248d1 store 4 ,mem_24g_device1_addr 
+25bd 20600000 rtn 
+
+g24_data_attemp_device2:
+25be 20407e54 call enable_user 
+25bf 6fe24895 fetch 4 ,mem_24g_rxdata_temp + 4 
+25c0 67e248cd store 4 ,mem_24g_transmitter_addr 
+
+g24_store_device2_addr:
+25c1 67e248d5 store 4 ,mem_24g_device2_addr 
+25c2 20600000 rtn 
+
+rssi_store:
+25c3 1a227e00 copy rega ,pdata 
+25c4 98408a00 iadd temp ,contw 
+25c5 6fe08018 fetch 1 ,mem_rssi 
+25c6 e7e08005 istore 1 ,contw 
+25c7 18408401 increase 1 ,temp 
+25c8 6fe0c87d fetch 1 ,mem_rssi_buff_index 
+25c9 98410400 iand temp ,temp 
+25ca 20600000 rtn 
+
+rssi_average:
+25cb 6fe0c87d fetch 1 ,mem_rssi_buff_index 
+25cc 1fe0fe01 increase 1 ,pdata 
+25cd 67e10987 store 2 ,mem_loopcnt 
+25ce 1fe27200 copy pdata ,loopcnt 
+25cf 1a220c00 copy rega ,contr 
+25d0 dfe00000 arg 0 ,pdata 
+
+rssi_average_loop:
+25d1 e8408006 ifetcht 1 ,contr 
+25d2 9840fe00 iadd temp ,pdata 
+25d3 c20025d1 loop rssi_average_loop 
+25d4 68490987 fetcht 2 ,mem_loopcnt 
+25d5 9846fc00 idiv temp 
+25d6 20407def call wait_div_end 
+25d7 18078400 quotient temp 
+25d8 c6138000 rtnmark1 mark_24g_rxmode 
+25d9 18427e00 copy temp ,pdata 
+25da c6930000 rtnmark0 mark_24g 
+25db 20401295 call bcd 
+25dc 1fe20400 copy pdata ,temp 
+25dd 20600000 rtn 
+
+save_rssi_dec:
+25de 2040127d call save_rssi 
+25df 20201291 branch rssi_hex2dec 
+
+rssi_transmitter_buff_init:
+25e0 6fe14899 fetch 2 ,mem_rssi_signal_buf_ptr 
+25e1 202025f4 branch rssi_buff_clear 
+
+rssi_signal:
+25e2 1fe22200 copy pdata ,rega 
+25e3 6848c898 fetcht 1 ,mem_rssi_signal_index 
+25e4 6fe14899 fetch 2 ,mem_rssi_signal_buf_ptr 
+25e5 98408a00 iadd temp ,contw 
+25e6 1a227e00 copy rega ,pdata 
+25e7 e7e08005 istore 1 ,contw 
+25e8 18408401 increase 1 ,temp 
+25e9 6fe0c87d fetch 1 ,mem_rssi_buff_index 
+25ea 98410400 iand temp ,temp 
+25eb 6048c898 storet 1 ,mem_rssi_signal_index 
+25ec 20600000 rtn 
+
+rssi_receiver_buff_init:
+25ed 6fe148e1 fetch 2 ,mem_rssi_noise_buffer_ptr 
+25ee 204025f4 call rssi_buff_clear 
+25ef 6fe148e3 fetch 2 ,mem_rssi_noise_self_buffer_ptr 
+25f0 204025f4 call rssi_buff_clear 
+25f1 6fe148e5 fetch 2 ,mem_rssi_noise_device1_buffer_ptr 
+25f2 204025f4 call rssi_buff_clear 
+25f3 6fe148e7 fetch 2 ,mem_rssi_noise_device2_buffer_ptr 
+
+rssi_buff_clear:
+25f4 207a0000 rtn blank 
+25f5 1fe20a00 copy pdata ,contw 
+25f6 6fe0c87d fetch 1 ,mem_rssi_buff_index 
+25f7 1fe0fe01 increase 1 ,pdata 
+25f8 1fe27200 copy pdata ,loopcnt 
+25f9 20207d26 branch clear_mem 
+
+rssi_noise:
+25fa 204025de call save_rssi_dec 
+25fb 207a0000 rtn blank 
+25fc 6848c8da fetcht 1 ,mem_rssi_noise_index 
+25fd 6a2148e1 fetchr rega ,2 ,mem_rssi_noise_buffer_ptr 
+25fe 204025c3 call rssi_store 
+25ff 6048c8da storet 1 ,mem_rssi_noise_index 
+2600 20600000 rtn 
+
+rssi_noise_monitor:
+2601 6a2148e1 fetchr rega ,2 ,mem_rssi_noise_buffer_ptr 
+2602 204025cb call rssi_average 
+2603 6048c8d9 storet 1 ,mem_rssi_noise_avg 
+2604 18467c50 sub temp ,rssi_thresh_noise ,null 
+2605 24610000 nrtn positive 
+2606 202022cb branch g24_ch 
+
+g24_transmit_init:
+2607 6fe240a8 fetch 4 ,mem_lap 
+2608 67e248a9 store 4 ,mem_24g_device_addr 
+2609 2040231a call g24_rx_window_init 
+260a 202025e0 branch rssi_transmitter_buff_init 
+
+g24_interval_param_4ms:
+260b 58002fb2 setarg g24_4ms_interval_param 
+260c 67e1c8ad store 3 ,mem_24g_short_sleep_set 
+260d 58100c0c setarg 0x100c0c 
+260e 67e1c854 store 3 ,mem_24g_interval 
+260f 5800bb80 setarg 0x00bb80 
+2610 67e1c8b0 store 3 ,mem_24g_long_sleep_set 
+2611 7048c605 jam 5 ,mem_24g_fast_hop_count 
+2612 20600000 rtn 
+
+g24_interval_param_8ms:
+2613 5800f80c setarg g24_8ms_interval_param 
+2614 67e1c8ad store 3 ,mem_24g_short_sleep_set 
+2615 581c1919 setarg 0x1c1919 
+2616 67e1c854 store 3 ,mem_24g_interval 
+2617 58017700 setarg 0x017700 
+2618 67e1c8b0 store 3 ,mem_24g_long_sleep_set 
+2619 7048c60b jam 11 ,mem_24g_fast_hop_count 
+261a 20600000 rtn 
+
+g24_transmit_dispatch:
+261b c6930000 rtnmark0 mark_24g 
+261c 6fe0c8a1 fetch 1 ,mem_24g_conn_sm 
+261d c280a340 bbit1 state_24g_pair ,g24_pair_dispatch 
+261e c2812580 bbit1 state_24g_reconn ,g24_reconn_dispatch 
+261f 6fe0c8bd fetch 1 ,mem_24g_transmit_by_interrupt 
+2620 c000a6c6 beq g24_tx_timer_int_enable ,g24_transmit_by_interrupt 
+
+g24_transmit_no_interrupt:
+2621 4775403d bpatchx patch3d_2 ,mem_patch3d 
+2622 20402631 call g24_txdata_prep 
+2623 243426a1 nbranch g24_nodata_transmit ,user 
+
+g24_transmit_start:
+2624 20402646 call g24_transmit_process 
+2625 204026ee call power_ctrl_start 
+2626 6fe0c09a fetch 1 ,mem_device_option 
+2627 c00447ef beq dvc_op_mouse ,mouse_24g_transmit_start 
+
+g24_transmit_start_next:
+2628 6fe448b0 fetch 8 ,mem_24g_long_sleep_set 
+2629 67e4485c store 8 ,mem_24g_enter_hibernate 
+262a 6fe148c2 fetch 2 ,mem_24g_long_sleep_param_update_timer_init 
+262b 67e148c4 store 2 ,mem_24g_long_sleep_param_update_timer 
+
+g24_short_sleep:
+262c 204026bb call g24_lpm_wait 
+262d 24740000 nrtn user 
+262e 20407fdc call clear_wake 
+262f 6fe1c8ad fetch 3 ,mem_24g_short_sleep_set 
+2630 2020150a branch lpm_dispatch_sleep 
+
+g24_txdata_prep:
+2631 20402634 call g24_package_data 
+2632 24740000 nrtn user 
+2633 20202291 branch g24_transmit_prep 
+
+g24_package_data:
+2634 6fe1489b fetch 2 ,mem_cb_24g_transmit_data 
+2635 20407e05 call callback_func 
+2636 2034263a branch g24_accumulate_data ,user 
+2637 6fe3c7c7 fetch 7 ,mem_24g_txbuf + 1 
+2638 207a0000 rtn blank 
+2639 20207e54 branch enable_user 
+
+g24_accumulate_data:
+263a 7048a700 jam 0 ,mem_24g_abort_pac 
+263b 1a20fe01 add rega ,1 ,pdata 
+263c 67e0c835 store 1 ,mem_24g_datalen 
+263d 20402642 call g24_transmit_rf_ctrl_clear 
+263e 67e0c7c6 store 1 ,mem_24g_txbuf 
+263f 1a420c00 copy regb ,contr 
+2640 1a227200 copy rega ,loopcnt 
+2641 20207d5f branch memcpy 
+
+g24_transmit_rf_ctrl_clear:
+2642 6fe0c836 fetch 1 ,mem_24g_data_type 
+2643 1fe17e07 and_into bits_data ,pdata 
+2644 67e0c836 store 1 ,mem_24g_data_type 
+2645 20600000 rtn 
+
+g24_transmit_process:
+2646 7048a600 jam 0 ,mem_24g_retry 
+
+g24_transmit_loop:
+2647 6961015f fetchr timeup ,2 ,mem_param_rx_setup 
+2648 34730200 until clkn_rt ,meet 
+2649 2040265b call g24_transmit_receive_ack 
+264a 6fe0c82c fetch 1 ,mem_24g_no_ack 
+264b c000a651 beq no_ack_24g ,g24_transmit_no_ack 
+264c 242c2669 nbranch g24_retransmit ,sync 
+264d 2437a669 nbranch g24_retransmit ,user3 
+264e 20402672 call g24_ackpayload_parse 
+264f 6fe0c09a fetch 1 ,mem_device_option 
+2650 c00447eb beq dvc_op_mouse ,mouse_wakeup_24g 
+
+g24_transmit_no_ack:
+2651 20402720 call power_ctrl_pac_succ_incrs 
+
+g24_transmit_next_packet:
+2652 20402597 call g24_txbuf_clear 
+2653 6fe0c82b fetch 1 ,mem_24g_pid 
+2654 1fe0fe01 increase 1 ,pdata 
+2655 67e0c82b store 1 ,mem_24g_pid 
+2656 20402694 call g24_hop_enable_packet 
+
+g24_transmit_abandon:
+2657 58000000 setarg 0 
+2658 67e0c8a2 store 1 ,mem_24g_ensure 
+2659 67e148a3 store 2 ,mem_24g_txfail_cnt 
+265a 20600000 rtn 
+
+g24_transmit_receive_ack:
+265b 7857fc00 disable user3 
+265c 20402246 call g24_transmit 
+265d 6fe0c82c fetch 1 ,mem_24g_no_ack 
+265e c000a23f beq no_ack_24g ,g24_end_of_packet 
+265f 18002a00 force 0 ,radio_ctrl 
+2660 6fe2483c fetch 4 ,mem_24g_addr 
+2661 98001200 iforce access 
+2662 204010b0 call calc_mod_value_scale_le 
+2663 68488017 fetcht 1 ,mem_last_freq 
+2664 2040118f call set_freq_rx 
+2665 204011a6 call rf_rx_enable 
+2666 204021e4 call g24_receive_rxon 
+2667 2057a23f call g24_end_of_packet ,user3 
+2668 20600000 rtn 
+
+g24_retransmit:
+2669 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+266a 247a0000 nrtn blank 
+266b 6fe148a3 fetch 2 ,mem_24g_txfail_cnt 
+266c 1fe0fe01 increase 1 ,pdata 
+266d 67e148a3 store 2 ,mem_24g_txfail_cnt 
+266e 6fe0c8a4 fetch 1 ,mem_24g_txfail_cnt + 1 
+266f c2822679 bbit1 4 ,g24_tx_attempt_fail 
+2670 2040267e call g24_transmit_hop_process 
+2671 20202647 branch g24_transmit_loop 
+
+g24_ackpayload_parse:
+2672 204022be call g24_read_len_pid_crc 
+2673 6fe0c82a fetch 1 ,mem_24g_rxdata_length 
+2674 207a0000 rtn blank 
+2675 98007200 iforce loopcnt 
+2676 d8c047a6 arg mem_24g_rxbuf + 2 ,contr 
+2677 d8a0480a arg mem_24g_rxpayload ,contw 
+2678 20207d5f branch memcpy 
+
+g24_tx_attempt_fail:
+2679 58000000 setarg 0 
+267a 67e148a3 store 2 ,mem_24g_txfail_cnt 
+267b 7048a501 jam 1 ,mem_24g_attempt_fail_flag 
+
+g24_stop_24g_mode:
+267c 70095b3a jam bt_evt_24g_attempt_fail ,mem_fifo_temp 
+267d 20207871 branch ui_ipc_send_event 
+
+g24_transmit_hop_process:
+267e 4775c03d bpatchx patch3d_3 ,mem_patch3d 
+267f 6848c8a6 fetcht 1 ,mem_24g_retry 
+2680 6fe0c8c6 fetch 1 ,mem_24g_fast_hop_count 
+2681 98467c00 isub temp ,null 
+2682 2421269c nbranch g24_tx_fast_hop ,positive 
+2683 18408401 increase 1 ,temp 
+2684 6048c8a6 storet 1 ,mem_24g_retry 
+2685 6fe0c8c6 fetch 1 ,mem_24g_fast_hop_count 
+2686 c002a68b beq 5 ,g24_transmit_hop_process_4ms 
+2687 6fe0c8a6 fetch 1 ,mem_24g_retry 
+2688 c0032696 beq 6 ,g24_hop_ch_disable 
+2689 c0062696 beq 12 ,g24_hop_ch_disable 
+268a 20600000 rtn 
+
+g24_transmit_hop_process_4ms:
+268b 6fe0c8a6 fetch 1 ,mem_24g_retry 
+268c c001a696 beq 3 ,g24_hop_ch_disable 
+268d c0032696 beq 6 ,g24_hop_ch_disable 
+268e 20600000 rtn 
+
+g24_hop_ch_enable:
+
+g24_txpayload_type_update:
+268f c517a692 bmark1 mark_ble_lr ,g24_lr_type_update 
+2690 67e0c7e7 store 1 ,mem_24g_txpayload + offset_data_type 
+2691 20600000 rtn 
+
+g24_lr_type_update:
+2692 67e0c7e8 store 1 ,mem_24g_txpayload + offset_lr_data_type 
+2693 20600000 rtn 
+
+g24_hop_enable_packet:
+2694 6fe0c836 fetch 1 ,mem_24g_data_type 
+2695 c4020000 rtnbit0 bit_hop 
+
+g24_hop_ch_disable:
+2696 6fe0c836 fetch 1 ,mem_24g_data_type 
+2697 793ffe04 set0 bit_hop ,pdata 
+2698 67e0c836 store 1 ,mem_24g_data_type 
+2699 2040268f call g24_txpayload_type_update 
+269a 20402724 call power_ctrl_pac_succ_decrs 
+269b 202022cb branch g24_ch 
+
+g24_tx_fast_hop:
+269c 20402714 call power_ctrl_txpower_incrs 
+269d 20402724 call power_ctrl_pac_succ_decrs 
+269e 202022cb branch g24_ch 
+
+g24_search_receiver:
+269f 6fe1489d fetch 2 ,mem_cb_24g_search_receiver 
+26a0 20207e05 branch callback_func 
+
+g24_nodata_transmit:
+26a1 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+26a2 205a26a7 call g24_send_abort_packet ,blank 
+26a3 6fe0c8bd fetch 1 ,mem_24g_transmit_by_interrupt 
+26a4 c1008000 rtneq g24_tx_timer_int_enable 
+26a5 2040269f call g24_search_receiver 
+26a6 202026b5 branch g24_long_sleep 
+
+g24_send_abort_packet:
+26a7 70483601 jam type_ms ,mem_24g_data_type 
+26a8 7048a701 jam 1 ,mem_24g_abort_pac 
+26a9 20402642 call g24_transmit_rf_ctrl_clear 
+26aa 67e0c7c6 store 1 ,mem_24g_txbuf 
+26ab 58000000 setarg 0 
+26ac 67e3c7c7 store 7 ,mem_24g_txbuf + 1 
+26ad 6fe248a9 fetch 4 ,mem_24g_device_addr 
+26ae 67e247ce store 4 ,mem_24g_txbuf + 8 
+26af 7048350c jam 12 ,mem_24g_datalen 
+26b0 6fe0c836 fetch 1 ,mem_24g_data_type 
+26b1 79207e03 set1 bit_abort ,pdata 
+26b2 67e0c836 store 1 ,mem_24g_data_type 
+26b3 20402291 call g24_transmit_prep 
+26b4 20202624 branch g24_transmit_start 
+
+g24_long_sleep:
+26b5 204026bb call g24_lpm_wait 
+26b6 24740000 nrtn user 
+26b7 6fe4485c fetch 8 ,mem_24g_enter_hibernate 
+
+g24_long_sleep2:
+26b8 20407daa call clk2lpo 
+26b9 604a4160 storet 4 ,mem_sleep_counter 
+26ba 20201497 branch lpm_sleep 
+
+g24_lpm_wait:
+26bb 4776403d bpatchx patch3d_4 ,mem_patch3d 
+26bc 78347c00 enable user 
+26bd 20401465 call lpo_calibration 
+26be 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+26bf 203a7e56 branch disable_user ,blank 
+26c0 6fe0c099 fetch 1 ,mem_lpm_mode 
+26c1 203a7e56 branch disable_user ,blank 
+26c2 6fe0c8bd fetch 1 ,mem_24g_transmit_by_interrupt 
+26c3 c000fe56 beq g24_tx_timer_int_enable ,disable_user 
+
+g24_setgpio_lpm_before:
+26c4 6fe1489f fetch 2 ,mem_cb_24g_lpm_before 
+26c5 20207e05 branch callback_func 
+
+g24_transmit_by_interrupt:
+26c6 204022ea call g24_timer_check 
+26c7 24740000 nrtn user 
+26c8 204026db call g24_interval_calibrate 
+26c9 6fe148be fetch 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26ca 1fe0fe01 increase 1 ,pdata 
+26cb 67e148be store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26cc 684948c0 fetcht 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+26cd 98467c00 isub temp ,null 
+26ce 2042a6d0 call g24_transmit_by_interrupt_exit ,zero 
+26cf 20202621 branch g24_transmit_no_interrupt 
+
+g24_transmit_by_interrupt_exit:
+26d0 7048bd00 jam g24_tx_timer_int_disable ,mem_24g_transmit_by_interrupt 
+26d1 58000000 setarg 0 
+26d2 67e148be store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26d3 58000064 setarg 100 
+26d4 67e148c0 store 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+
+g24_interval_min:
+26d5 7048bc00 jam 0 ,mem_24g_pac_index 
+26d6 6fe0c855 fetch 1 ,mem_24g_interval_min 
+
+g24_interval_store:
+26d7 67e0c854 store 1 ,mem_24g_interval 
+26d8 20600000 rtn 
+
+g24_interval_max:
+26d9 6fe0c856 fetch 1 ,mem_24g_interval_max 
+26da 202026d7 branch g24_interval_store 
+
+g24_interval_calibrate:
+26db 6fe0c8bc fetch 1 ,mem_24g_pac_index 
+26dc 1fe0fe01 increase 1 ,pdata 
+26dd 67e0c8bc store 1 ,mem_24g_pac_index 
+26de c00226d9 beq 4 ,g24_interval_max 
+26df c002a6d5 beq 5 ,g24_interval_min 
+26e0 20600000 rtn 
+
+g24_transmit_by_interrupt_enable:
+26e1 7048bd01 jam g24_tx_timer_int_enable ,mem_24g_transmit_by_interrupt 
+26e2 58000000 setarg 0 
+26e3 67e148be store 2 ,mem_24g_transmit_by_interrupt_exit_count 
+26e4 20600000 rtn 
+
+g24_factory_check:
+26e5 df200002 arg 2 ,loopcnt 
+26e6 d8c0483c arg mem_24g_addr ,contr 
+
+pdata_0xff_check:
+26e7 20407e54 call enable_user 
+26e8 5800ffff setarg 0xffff 
+
+pdata_0xff_check_loop:
+26e9 e8410006 ifetcht 2 ,contr 
+26ea 98467c00 isub temp ,null 
+26eb 2442fe56 ncall disable_user ,zero 
+26ec c20026e9 loop pdata_0xff_check_loop 
+26ed 20600000 rtn 
+
+power_ctrl_start:
+26ee 4776c03d bpatchx patch3d_5 ,mem_patch3d 
+26ef 6fe1478c fetch 2 ,mem_ui_state_map 
+26f0 c3858000 rtnbit1 ui_state_ble_adv 
+26f1 c3838000 rtnbit1 ui_state_bt_reconnect 
+26f2 c3830000 rtnbit1 ui_state_bt_discovery 
+26f3 6a214899 fetchr rega ,2 ,mem_rssi_signal_buf_ptr 
+26f4 204025cb call rssi_average 
+26f5 6048c8c7 storet 1 ,mem_rssi_avg_received 
+26f6 6fe0c8cc fetch 1 ,mem_rssi_dis_max_24g 
+26f7 c51326f9 bmark1 mark_24g ,power_ctrl_start_next 
+26f8 6fe0c8cf fetch 1 ,mem_rssi_dis_max_ble 
+
+power_ctrl_start_next:
+26f9 98467c00 isub temp ,null 
+26fa 24212713 nbranch power_ctrl_txpower_incrs_force ,positive 
+26fb 6fe0c8c9 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+26fc 1fe67c02 sub pdata ,2 ,null 
+26fd 24212701 nbranch power_ctrl_txpower_decrs_check ,positive 
+26fe 6fe0c8c9 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+26ff c0002714 beq 0 ,power_ctrl_txpower_incrs 
+2700 20600000 rtn 
+
+power_ctrl_txpower_decrs_check:
+2701 6fe0c8c9 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2702 6848c8ca fetcht 1 ,mem_power_ctrl_pac_succ_cnt_init 
+2703 98467c00 isub temp ,null 
+2704 24628000 nrtn zero 
+2705 7048c900 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+
+power_ctrl_txpower_decrs:
+2706 6848c8c7 fetcht 1 ,mem_rssi_avg_received 
+2707 6fe0c8cb fetch 1 ,mem_rssi_dis_min_24g 
+2708 c513270a bmark1 mark_24g ,power_ctrl_txpower_decrs_next 
+2709 6fe0c8ce fetch 1 ,mem_rssi_dis_min_ble 
+
+power_ctrl_txpower_decrs_next:
+270a 98467c00 isub temp ,null 
+270b 24610000 nrtn positive 
+270c 6fe0c8c8 fetch 1 ,mem_power_ctrl_level 
+270d c000271b beq 0 ,power_ctrl_decrs_level0 
+270e 1fe0ffff increase -1 ,pdata 
+270f 67e0c8c8 store 1 ,mem_power_ctrl_level 
+2710 c000271b beq 0 ,power_ctrl_decrs_level0 
+
+power_ctrl_decrs_level1:
+
+power_ctrl_incrs_level1:
+2711 7041e800 jam tx_power_0db ,mem_tx_power 
+2712 20600000 rtn 
+
+power_ctrl_txpower_incrs_force:
+2713 7048c900 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+
+power_ctrl_txpower_incrs:
+2714 6fe0c8c8 fetch 1 ,mem_power_ctrl_level 
+2715 c0012719 beq 2 ,power_ctrl_incrs_level2 
+2716 1fe0fe01 increase 1 ,pdata 
+2717 67e0c8c8 store 1 ,mem_power_ctrl_level 
+2718 c000a711 beq 1 ,power_ctrl_incrs_level1 
+
+power_ctrl_incrs_level2:
+2719 7041e806 jam tx_power_6db ,mem_tx_power 
+271a 20600000 rtn 
+
+power_ctrl_decrs_level0:
+271b 7041e885 jam tx_power_f5db ,mem_tx_power 
+271c 20600000 rtn 
+
+power_ctrl_pac_succ_cnt_init:
+271d 7048c801 jam 1 ,mem_power_ctrl_level 
+271e 7048c900 jam 0 ,mem_power_ctrl_pac_succ_cnt 
+271f 20600000 rtn 
+
+power_ctrl_pac_succ_incrs:
+2720 6fe0c8c9 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2721 1fe0fe01 increase 1 ,pdata 
+2722 67e0c8c9 store 1 ,mem_power_ctrl_pac_succ_cnt 
+2723 20600000 rtn 
+
+power_ctrl_pac_succ_decrs:
+2724 6fe0c8c9 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2725 1fe67c02 sub pdata ,2 ,null 
+2726 2441272c ncall power_ctrl_pac_succ_cnt_reinit ,positive 
+2727 6fe0c8c9 fetch 1 ,mem_power_ctrl_pac_succ_cnt 
+2728 c1000000 rtneq 0 
+2729 1fe0ffff increase -1 ,pdata 
+272a 67e0c8c9 store 1 ,mem_power_ctrl_pac_succ_cnt 
+272b 20600000 rtn 
+
+power_ctrl_pac_succ_cnt_reinit:
+272c 7048c903 jam 3 ,mem_power_ctrl_pac_succ_cnt 
+272d 20600000 rtn 
+
+ali_mesh_access_layer_resolve_message:
+272e 6fe08be0 fetch 1 ,mem_ccm_data_len 
+272f 67e089f6 store 1 ,mem_mesh_receive_model_message_payload_len 
+2730 1e020c00 copy alarm ,contr 
+2731 20407d0b call memcpy24 
+2732 20402785 call logging_tx_info_receive_access_message 
+2733 6fe149b7 fetch 2 ,mem_mesh_cb_receive_access_message 
+2734 20207e05 branch callback_func 
+
+ali_mesh_access_layer_check_access_message_opcode:
+2735 6fe089f7 fetch 1 ,mem_mesh_receive_model_message_payload_opcode 
+2736 c000273d beq mesh_message_opcode_config_appkey_add ,ali_mesh_access_layer_message_opcode_config_appkey_add 
+2737 c0402d68 beq mesh_configuration_and_health_message_opcode_header ,ali_mesh_access_layer_config_or_health_message_opcode 
+2738 c0412e5e beq mesh_module_message_opcode_header ,ali_mesh_model_layer_check_model_message_opcode 
+2739 c068a789 beq vendor_message_attr_set ,ali_mesh_ali_vendor_message_attribute_set 
+273a c06827a2 beq vendor_message_attr_get ,ali_mesh_ali_vendor_message_opcode_attr_get 
+273b c06aa7a2 beq vendor_message_attr_confirmation ,ali_mesh_ali_vendor_message_opcode_attr_confrimation 
+273c 20600000 rtn 
+
+ali_mesh_access_layer_message_opcode_config_appkey_add:
+273d d8c009fb arg mem_mesh_receive_application_key ,contr 
+273e d8a04afe arg mem_mesh_application_key ,contw 
+273f 20407d0c call memcpy16 
+2740 70493300 jam paired_status ,mem_mesh_provisioned_flag 
+2741 20402ae5 call ali_mesh_encrypt_base_function_k4 
+2742 20402757 call ali_mesh_access_layer_finish_pairing_init_subscription_list 
+2743 20402748 call ali_mesh_accesss_layer_check_message_type 
+2744 2040274d call ali_mesh_access_layer_send_config_appkey_status 
+2745 70493300 jam paired_status ,mem_mesh_provisioned_flag 
+2746 6fe149b9 fetch 2 ,mem_mesh_cb_receive_config_appkey_add 
+2747 20207e05 branch callback_func 
+
+ali_mesh_accesss_layer_check_message_type:
+2748 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+2749 70493304 jam received_config_appkey_add ,mem_mesh_provisioned_flag 
+274a c1008000 rtneq mesh_message_app 
+274b 70493300 jam paired_status ,mem_mesh_provisioned_flag 
+274c 20600000 rtn 
+
+ali_mesh_access_layer_send_config_appkey_status:
+274d 58000080 setarg mesh_configuration_and_health_message_opcode_header 
+274e 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+274f 58000003 setarg mesh_message_opcode_config_config_model_publication_set 
+2750 e7e08005 istore 1 ,contw 
+2751 58000000 setarg status_code_success 
+2752 e7e08005 istore 1 ,contw 
+2753 6fe189f8 fetch 3 ,mem_mesh_netkeyindex_and_appkeyindex 
+2754 e7e18005 istore 3 ,contw 
+2755 700a0f06 jam 6 ,mem_mesh_access_layer_payload_len 
+2756 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_finish_pairing_init_subscription_list:
+2757 6fe149d9 fetch 2 ,mem_mesh_core_feature 
+2758 c3810000 rtnbit1 mesh_feature_disable_subscription 
+2759 20402de1 call mesh_get_element_info_config 
+
+ali_mesh_access_layer_finish_pairing_init_subscription_list_loop:
+275a 1a20a606 add rega ,element_device_subscription_label ,regc 
+275b 5fffffff setarg -1 
+275c e7e40013 istore subscription_max_count ,regc 
+275d e7e40005 istore subscription_max_count ,contw 
+275e efe10011 ifetch 2 ,rega 
+275f e7e10013 istore 2 ,regc 
+2760 1a427e00 copy regb ,pdata 
+2761 9a20a200 iadd rega ,rega 
+2762 c200275a loop ali_mesh_access_layer_finish_pairing_init_subscription_list_loop 
+2763 6fe149d5 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2764 20207e05 branch callback_func 
+
+ali_mesh_access_layer_send_generic_onoff_status:
+2765 58000082 setarg mesh_module_message_opcode_header 
+2766 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2767 58000004 setarg mesh_module_message_opcode_generic_onoff_status_no_head 
+2768 e7e08005 istore 1 ,contw 
+2769 6fe089f9 fetch 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+276a e7e08005 istore 1 ,contw 
+276b 700a0f03 jam 3 ,mem_mesh_access_layer_payload_len 
+276c 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_send_light_lightness_status:
+276d 58000082 setarg mesh_module_message_opcode_header 
+276e 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+276f 5800004e setarg mesh_module_message_opcode_light_lightness_status_no_head 
+2770 e7e08005 istore 1 ,contw 
+2771 6fe109f9 fetch 2 ,mem_mesh_light_lightness_set_payload_lightness 
+2772 e7e10005 istore 2 ,contw 
+2773 700a0f04 jam 4 ,mem_mesh_access_layer_payload_len 
+2774 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_send_light_ctl_stauts:
+2775 58000082 setarg mesh_module_message_opcode_header 
+2776 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2777 58000060 setarg mesh_module_message_opcode_light_ctl_status_no_head 
+2778 e7e08005 istore 1 ,contw 
+2779 6fe209f9 fetch 4 ,mem_mesh_ctl_lightness 
+277a e7e20005 istore 4 ,contw 
+277b 700a0f06 jam 6 ,mem_mesh_access_layer_payload_len 
+277c 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_access_layer_send_scene_status:
+277d 5800005e setarg mesh_module_message_opcode_scene_status 
+277e 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+277f 58000000 setarg mesh_success 
+2780 e7e08005 istore 1 ,contw 
+2781 6fe109f9 fetch 2 ,mem_mesh_scene_recall_payload_scene_number 
+2782 e7e10005 istore 2 ,contw 
+2783 700a0f04 jam 4 ,mem_mesh_access_layer_payload_len 
+2784 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message 
+
+logging_tx_info_receive_access_message:
+2785 6f208be0 fetchr loopcnt ,1 ,mem_ccm_data_len 
+2786 1e022200 copy alarm ,rega 
+2787 da400050 arg mesh_access_receive_message ,regb 
+2788 202029db branch logging_tx_info 
+
+ali_mesh_ali_vendor_message_attribute_set:
+2789 204027a3 call ali_mesh_ali_vendor_message_attrbute_check_company_id_and_tid 
+278a 24740000 nrtn user 
+278b 6fe109fb fetch 2 ,mem_mesh_vendor_message_attr_type 
+278c d840f01f arg vendor_message_attr_type_time ,temp 
+278d 98467c00 isub temp ,null 
+278e 2022a7b7 branch ali_mesh_ali_vendor_message_opcode_timer_set_curr_time ,zero 
+278f d840f010 arg vendor_message_attr_type_timing ,temp 
+2790 98467c00 isub temp ,null 
+2791 2022a7bb branch ali_mesh_ali_vendor_message_opcode_timer_set_timing ,zero 
+2792 d840f011 arg vendor_message_attr_type_cycle_timing ,temp 
+2793 98467c00 isub temp ,null 
+2794 2022a7c4 branch ali_mesh_ali_vendor_message_opcode_timer_set_timing_cyclically ,zero 
+2795 d840f012 arg vendor_message_attr_type_delete_timing ,temp 
+2796 98467c00 isub temp ,null 
+2797 2022a7cd branch ali_mesh_ali_vendor_message_opcode_timer_delete_timing ,zero 
+2798 d8400534 arg vendor_message_attr_type_main_light ,temp 
+2799 98467c00 isub temp ,null 
+279a 2022a7ae branch ali_mesh_ali_vendor_message_attribute_set_main_light ,zero 
+279b d8400533 arg vendor_message_attr_type_background_light ,temp 
+279c 98467c00 isub temp ,null 
+279d 2022a7b1 branch ali_mesh_ali_vendor_message_attribute_set_background_light ,zero 
+279e d8400123 arg vendor_message_attr_type_color ,temp 
+279f 98467c00 isub temp ,null 
+27a0 2022a7b4 branch ali_mesh_ali_vendor_message_attribute_set_color ,zero 
+27a1 20600000 rtn 
+
+ali_mesh_ali_vendor_message_opcode_attr_get:
+
+ali_mesh_ali_vendor_message_opcode_attr_confrimation:
+27a2 20600000 rtn 
+
+ali_mesh_ali_vendor_message_attrbute_check_company_id_and_tid:
+27a3 20407e56 call disable_user 
+27a4 6fe109f8 fetch 2 ,mem_mesh_vendor_message_cid 
+27a5 d84001a8 arg vendor_message_opcode_company_id ,temp 
+27a6 98467c00 isub temp ,null 
+27a7 24628000 nrtn zero 
+27a8 6848c7a4 fetcht 1 ,mem_mesh_vendor_mesh_receive_tid 
+27a9 6fe089fa fetch 1 ,mem_mesh_vendor_message_tid 
+27aa 98467c00 isub temp ,null 
+27ab 20628000 rtn zero 
+27ac 67e0c7a4 store 1 ,mem_mesh_vendor_mesh_receive_tid 
+27ad 20207e54 branch enable_user 
+
+ali_mesh_ali_vendor_message_attribute_set_main_light:
+27ae 2040281f call ali_mesh_ali_vendor_message_ack_attr_status_uint8 
+27af 6fe149c9 fetch 2 ,mem_mesh_cb_main_light_onoff_set 
+27b0 20207e05 branch callback_func 
+
+ali_mesh_ali_vendor_message_attribute_set_background_light:
+27b1 2040281f call ali_mesh_ali_vendor_message_ack_attr_status_uint8 
+27b2 6fe149cb fetch 2 ,mem_mesh_cb_background_onoff_set 
+27b3 20207e05 branch callback_func 
+
+ali_mesh_ali_vendor_message_attribute_set_color:
+27b4 20402819 call ali_mesh_ali_vendor_message_ack_attr_status_uint48 
+27b5 6fe149cd fetch 2 ,mem_mesh_cb_color_set 
+27b6 20207e05 branch callback_func 
+
+ali_mesh_ali_vendor_message_opcode_timer_set_curr_time:
+27b7 2040281b call ali_mesh_ali_vendor_message_ack_attr_status_uint32 
+27b8 6fe209fd fetch 4 ,mem_mesh_vendor_message_current_time 
+27b9 67e247a6 store 4 ,mem_mesh_vendor_timer_current_time 
+27ba 20202850 branch ali_mesh_time_init_system_time 
+
+ali_mesh_ali_vendor_message_opcode_timer_set_timing:
+27bb 20402815 call ali_mesh_ali_vendor_message_ack_attr_status_uint64 
+27bc 204027e6 call ali_mesh_ali_vendor_message_calc_timing_address 
+27bd 207a0000 rtn blank 
+27be 6fe089fd fetch 1 ,mem_mesh_vendor_timer_timing_index 
+27bf 204027e2 call ali_mesh_vendor_timer_buffer_offset_cal 
+27c0 684c09fd fetcht 8 ,mem_mesh_vendor_timer_timing_index 
+27c1 e0440005 istoret 8 ,contw 
+
+ali_mesh_ali_vendor_message_cb_timing_changed:
+27c2 6fe149d7 fetch 2 ,mem_mesh_cb_vendor_timing_changed 
+27c3 20207e05 branch callback_func 
+
+ali_mesh_ali_vendor_message_opcode_timer_set_timing_cyclically:
+27c4 20402817 call ali_mesh_ali_vendor_message_ack_attr_status_uint56 
+27c5 204027e6 call ali_mesh_ali_vendor_message_calc_timing_address 
+27c6 207a0000 rtn blank 
+27c7 700a0459 jam timer_cyclical_falg ,mem_mesh_vendor_timer_timing_cyclic_flag 
+27c8 6fe089fd fetch 1 ,mem_mesh_vendor_timer_timing_index_cyclic 
+27c9 204027e2 call ali_mesh_vendor_timer_buffer_offset_cal 
+27ca 6fe409fd fetch 8 ,mem_mesh_vendor_timer_timing_index_cyclic 
+27cb e7e40005 istore 8 ,contw 
+27cc 202027c2 branch ali_mesh_ali_vendor_message_cb_timing_changed 
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing:
+27cd 204027df call ali_mesh_ali_vendor_message_opcode_timer_delete_timing_ack 
+27ce 204027e6 call ali_mesh_ali_vendor_message_calc_timing_address 
+27cf 207a0000 rtn blank 
+27d0 6fe089fd fetch 1 ,mem_mesh_vendor_timer_timing_index 
+27d1 207a0000 rtn blank 
+27d2 204027e2 call ali_mesh_vendor_timer_buffer_offset_cal 
+27d3 d8400000 arg 0 ,temp 
+27d4 e0408005 istoret 1 ,contw 
+27d5 6fe089f6 fetch 1 ,mem_mesh_receive_model_message_payload_len 
+27d6 1fe67c08 sub pdata ,8 ,null 
+27d7 2042a7d9 call ali_mesh_ali_vendor_message_opcode_timer_delete_timing_delete_second ,zero 
+27d8 202027c2 branch ali_mesh_ali_vendor_message_cb_timing_changed 
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing_delete_second:
+27d9 204027e6 call ali_mesh_ali_vendor_message_calc_timing_address 
+27da 6fe089fe fetch 1 ,mem_mesh_vendor_timer_timing_index1 
+27db 204027e2 call ali_mesh_vendor_timer_buffer_offset_cal 
+27dc d8400000 arg 0 ,temp 
+27dd e0408005 istoret 1 ,contw 
+27de 20600000 rtn 
+
+ali_mesh_ali_vendor_message_opcode_timer_delete_timing_ack:
+27df 6fe089f6 fetch 1 ,mem_mesh_receive_model_message_payload_len 
+27e0 c003a81f beq 7 ,ali_mesh_ali_vendor_message_ack_attr_status_uint8 
+27e1 2020281d branch ali_mesh_ali_vendor_message_ack_attr_status_uint16 
+
+ali_mesh_vendor_timer_buffer_offset_cal:
+27e2 1fe0ffff pincrease -1 
+27e3 1fe9fe00 lshift3 pdata ,pdata 
+27e4 98a08a00 iadd contw ,contw 
+27e5 20600000 rtn 
+
+ali_mesh_ali_vendor_message_calc_timing_address:
+27e6 20402de1 call mesh_get_element_info_config 
+27e7 1a20a204 add rega ,element_device_vendor_time_ptr ,rega 
+27e8 6fe0ca12 fetch 1 ,mem_mesh_receive_element_number 
+27e9 9a4ffe00 imul32 regb ,pdata 
+27ea 9a20a200 iadd rega ,rega 
+27eb efe10011 ifetch 2 ,rega 
+27ec 1fe20a00 copy pdata ,contw 
+27ed 20600000 rtn 
+
+ali_mesh_ali_vendor_message_status_add_head:
+27ee 580000d3 setarg vendor_message_attr_status 
+27ef 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+27f0 580001a8 setarg vendor_message_opcode_company_id 
+27f1 e7e10005 istore 2 ,contw 
+27f2 6fe0c7a4 fetch 1 ,mem_mesh_vendor_mesh_receive_tid 
+27f3 e7e08005 istore 1 ,contw 
+27f4 e0410005 istoret 2 ,contw 
+27f5 20600000 rtn 
+
+ali_mesh_ali_vendor_message_opcode_device_power_on:
+27f6 d8e00000 arg 0 ,queue 
+27f7 d8400003 arg vendor_message_event_device_power_on ,temp 
+27f8 da20f009 arg vendor_attr_type_event_trigger ,rega 
+27f9 20202827 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_generic_onoff:
+27fa da200100 arg vendor_attr_generic_onoff_server ,rega 
+27fb 20202827 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_scene_server_first_element:
+27fc d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_scene_server:
+27fd da20f004 arg vendor_attr_scene_server ,rega 
+27fe 2020282c branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_opcode_main_light_onoff_first_element:
+27ff d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_main_light_onoff:
+2800 da200534 arg vendor_attr_main_light_server ,rega 
+2801 20202827 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_background_light_onoff_first_element:
+2802 d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_background_light_onoff:
+2803 da200533 arg vendor_attr_background_light_onoff_server ,rega 
+2804 20202827 branch ali_mesh_ali_vendor_message_opcode_para_uint8 
+
+ali_mesh_ali_vendor_message_opcode_brightness_first_element:
+2805 d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_brightness:
+2806 20402e94 call ali_mesh_model_layer_message_calc_actual_lightness 
+2807 da200121 arg vendor_attr_lightness_level_server ,rega 
+2808 2020282c branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_opcode_color_temperature_first_element:
+2809 d8e00000 arg 0 ,queue 
+
+ali_mesh_ali_vendor_message_opcode_color_temperature:
+280a 20402ea2 call ali_mesh_model_layer_message_calc_actual_temperature 
+280b da200122 arg vendor_attr_color_temperature_server ,rega 
+280c 2020282c branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_opcode_timing_finish:
+280d 18438400 lshift temp ,temp 
+280e 18418411 or temp ,vendor_message_event_finish_timing ,temp 
+280f da20f009 arg vendor_attr_type_event_trigger ,rega 
+2810 2020282c branch ali_mesh_ali_vendor_message_opcode_para_uint16 
+
+ali_mesh_ali_vendor_message_indication_info_add_head_event_trigger:
+2811 20402833 call ali_mesh_ali_vendor_message_indication_info_add_head 
+2812 5800f009 setarg vendor_attr_type_event_trigger 
+2813 e7e10005 istore 2 ,contw 
+2814 20600000 rtn 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint64:
+2815 df200008 arg 8 ,loopcnt 
+2816 20202821 branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint56:
+2817 df200008 arg 8 ,loopcnt 
+2818 20202821 branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint48:
+2819 df200006 arg 6 ,loopcnt 
+281a 20202821 branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint32:
+281b df200004 arg 4 ,loopcnt 
+281c 20202821 branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint16:
+281d df200002 arg 2 ,loopcnt 
+281e 20202821 branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status_uint8:
+281f df200001 arg 1 ,loopcnt 
+2820 20202821 branch ali_mesh_ali_vendor_message_ack_attr_status 
+
+ali_mesh_ali_vendor_message_ack_attr_status:
+2821 1f20fe06 add loopcnt ,6 ,pdata 
+2822 67e08a0f store 1 ,mem_mesh_access_layer_payload_len 
+2823 204027ee call ali_mesh_ali_vendor_message_status_add_head 
+2824 d8c009fd arg mem_mesh_vendor_attr_parameter ,contr 
+2825 20407d5f call memcpy 
+2826 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_ali_vendor_message_opcode_para_uint8:
+2827 20402833 call ali_mesh_ali_vendor_message_indication_info_add_head 
+2828 e2210005 istorer rega ,2 ,contw 
+2829 e0408005 istoret 1 ,contw 
+282a 700a0f07 jam 7 ,mem_mesh_access_layer_payload_len 
+282b 20202831 branch ali_mesh_ali_vendor_message_send_message 
+
+ali_mesh_ali_vendor_message_opcode_para_uint16:
+282c 20402833 call ali_mesh_ali_vendor_message_indication_info_add_head 
+282d e2210005 istorer rega ,2 ,contw 
+282e e0410005 istoret 2 ,contw 
+282f 700a0f08 jam 8 ,mem_mesh_access_layer_payload_len 
+2830 20202831 branch ali_mesh_ali_vendor_message_send_message 
+
+ali_mesh_ali_vendor_message_send_message:
+2831 20402ef8 call ali_mesh_more_element_calc_queue_address 
+2832 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer 
+
+ali_mesh_ali_vendor_message_indication_info_add_head:
+2833 6fe0c932 fetch 1 ,mem_mesh_transport_aid 
+2834 67e08c14 store 1 ,mem_mesh_message_transport_head 
+2835 580000f0 setarg vendor_message_tmall_dst 
+2836 67e10c35 store 2 ,mem_mesh_send_message_dst 
+2837 6fe0c7a5 fetch 1 ,mem_mesh_vendor_mesh_send_tid 
+2838 1fe0fe01 pincrease 1 
+2839 67e0c7a5 store 1 ,mem_mesh_vendor_mesh_send_tid 
+283a c0602842 beq vendor_message_send_tid_max ,ali_mesh_ali_vendor_message_indication_info_reset_tid 
+283b 580000d4 setarg vendor_message_attr_indication 
+283c 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+283d 580001a8 setarg vendor_message_opcode_company_id 
+283e e7e10005 istore 2 ,contw 
+283f 6fe0c7a5 fetch 1 ,mem_mesh_vendor_mesh_send_tid 
+2840 e7e08005 istore 1 ,contw 
+2841 20600000 rtn 
+
+ali_mesh_ali_vendor_message_indication_info_reset_tid:
+2842 7047a580 jam vendor_message_send_tid_min ,mem_mesh_vendor_mesh_send_tid 
+2843 20600000 rtn 
+
+ali_mesh_time_function:
+2844 1c420400 copy clkn_bt ,temp 
+2845 6fe247aa fetch 4 ,mem_system_time 
+2846 98467c00 isub temp ,null 
+2847 20412856 call ali_mesh_timer_timeout ,positive 
+2848 2040285d call ali_mesh_clkn_bt_add_1s 
+2849 98467c00 isub temp ,null 
+284a 20610000 rtn positive 
+284b 20402851 call ali_mesh_time_init_system_time_without_clk 
+284c 6fe247a6 fetch 4 ,mem_mesh_vendor_timer_current_time 
+284d 1fe0fe01 pincrease 1 
+284e 67e247a6 store 4 ,mem_mesh_vendor_timer_current_time 
+284f 20202861 branch ali_mesh_ali_vendor_check_time 
+
+ali_mesh_time_init_system_time:
+2850 1c427e00 copy clkn_bt ,pdata 
+
+ali_mesh_time_init_system_time_without_clk:
+2851 67e247aa store 4 ,mem_system_time 
+2852 6fe0c7ad fetch 1 ,mem_system_time + 3 
+2853 1fe17e0f and_into 0x0f ,pdata 
+2854 67e0c7ad store 1 ,mem_system_time + 3 
+2855 20600000 rtn 
+
+ali_mesh_timer_timeout:
+2856 20628000 rtn zero 
+2857 1fe22400 copy pdata ,regb 
+2858 58100000 setarg 0x100000 
+2859 1fed7e00 lshift8 pdata ,pdata 
+285a 98408400 iadd temp ,temp 
+285b 1a427e00 copy regb ,pdata 
+285c 20600000 rtn 
+
+ali_mesh_clkn_bt_add_1s:
+285d df200014 arg 20 ,loopcnt 
+
+ali_mesh_time_loop:
+285e 1fe0fea0 pincrease 160 
+285f c200285e loop ali_mesh_time_loop 
+2860 20600000 rtn 
+
+ali_mesh_ali_vendor_check_time:
+2861 20402de1 call mesh_get_element_info_config 
+2862 1a20a204 add rega ,element_device_vendor_time_ptr ,rega 
+2863 704a1200 jam 0 ,mem_mesh_receive_element_number 
+
+ali_mesh_ali_vendor_check_time_loop:
+2864 20402eee call ali_mesh_more_element_push_stack 
+2865 efe10011 ifetch 2 ,rega 
+2866 203a2869 branch ali_mesh_ali_vendor_check_time_next_element ,blank 
+2867 1fe26000 copy pdata ,alarm 
+2868 20402873 call ali_mesh_ali_vendor_check_time_one_element 
+
+ali_mesh_ali_vendor_check_time_next_element:
+2869 20402ef3 call ali_mesh_more_element_pop_stack 
+286a 6fe0ca12 fetch 1 ,mem_mesh_receive_element_number 
+286b 1fe0fe01 pincrease 1 
+286c 67e0ca12 store 1 ,mem_mesh_receive_element_number 
+286d 6848c9db fetcht 1 ,mem_mesh_element_number 
+286e 98467e00 isub temp ,pdata 
+286f 20628000 rtn zero 
+2870 1a427e00 copy regb ,pdata 
+2871 9a20a200 iadd rega ,rega 
+2872 20202864 branch ali_mesh_ali_vendor_check_time_loop 
+
+ali_mesh_ali_vendor_check_time_one_element:
+2873 df200028 arg 40 ,loopcnt 
+
+ali_mesh_ali_vendor_check_time_one_element_loop:
+2874 1f227e00 copy loopcnt ,pdata 
+2875 67e08c00 store 1 ,mem_mesh_loopcnt_tmep 
+2876 efe08030 ifetch 1 ,alarm 
+2877 245a287d ncall ali_mesh_ali_vendor_had_timing ,blank 
+2878 1e00e008 increase 8 ,alarm 
+2879 6fe08c00 fetch 1 ,mem_mesh_loopcnt_tmep 
+287a 1fe27200 copy pdata ,loopcnt 
+287b c2002874 loop ali_mesh_ali_vendor_check_time_one_element_loop 
+287c 20600000 rtn 
+
+ali_mesh_ali_vendor_had_timing:
+287d e8440030 ifetcht 8 ,alarm 
+287e 604c09fd storet 8 ,mem_mesh_vendor_timer_timing_index_cyclic 
+287f 6fe08a04 fetch 1 ,mem_mesh_vendor_timer_timing_attr_para 
+2880 c02ca897 beq timer_cyclical_falg ,ali_mesh_ali_vendor_had_timing_cyclically 
+2881 684a47a6 fetcht 4 ,mem_mesh_vendor_timer_current_time 
+2882 6fe209fe fetch 4 ,mem_mesh_vendor_timer_timing_time 
+2883 98467c00 isub temp ,null 
+2884 6fe08a04 fetch 1 ,mem_mesh_vendor_timer_timing_attr_para 
+2885 2022a887 branch ali_mesh_ali_vendor_time_timeout ,zero 
+2886 20600000 rtn 
+
+ali_mesh_ali_vendor_time_timeout:
+2887 67e089f9 store 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+2888 6fe149bf fetch 2 ,mem_mesh_cb_generic_onoff_set 
+2889 20407e05 call callback_func 
+288a 1e027e00 copy alarm ,pdata 
+288b 67e10c08 store 2 ,mem_mesh_alarm_temp 
+288c 68e0ca12 fetchr queue ,1 ,mem_mesh_receive_element_number 
+288d e8408030 ifetcht 1 ,alarm 
+288e 2040280d call ali_mesh_ali_vendor_message_opcode_timing_finish 
+288f 684889f9 fetcht 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+2890 68e0ca12 fetchr queue ,1 ,mem_mesh_receive_element_number 
+2891 204027fa call ali_mesh_ali_vendor_message_opcode_generic_onoff 
+2892 6fe10c08 fetch 2 ,mem_mesh_alarm_temp 
+2893 1fe26000 copy pdata ,alarm 
+2894 58000000 setarg 0 
+2895 e7e08030 istore 1 ,alarm 
+2896 202027c2 branch ali_mesh_ali_vendor_message_cb_timing_changed 
+
+ali_mesh_ali_vendor_had_timing_cyclically:
+2897 6fe247a6 fetch 4 ,mem_mesh_vendor_timer_current_time 
+2898 d840003c arg seconds_of_min ,temp 
+2899 9846fc00 idiv temp 
+289a 20407def call wait_div_end 
+289b 18077e00 remainder pdata 
+289c 247a0000 nrtn blank 
+289d 6fe247a6 fetch 4 ,mem_mesh_vendor_timer_current_time 
+289e d8454600 arg seconds_of_four_days ,temp 
+289f 98467e00 isub temp ,pdata 
+28a0 d8493a80 arg seconds_of_week ,temp 
+28a1 9846fc00 idiv temp 
+28a2 20407def call wait_div_end 
+28a3 18077e00 remainder pdata 
+28a4 d8415180 arg seconds_of_day ,temp 
+28a5 9846fc00 idiv temp 
+28a6 20407def call wait_div_end 
+28a7 18072200 remainder rega 
+28a8 18078e00 quotient queue 
+28a9 58000000 setarg 0 
+28aa f9207e00 qset1 pdata 
+28ab 68488a00 fetcht 1 ,mem_mesh_vendor_timer_timing_weekdays_cyclic 
+28ac 98417e00 iand temp ,pdata 
+28ad 207a0000 rtn blank 
+28ae 1a227e00 deposit rega 
+28af d840003c arg seconds_of_min ,temp 
+28b0 9846fc00 idiv temp 
+28b1 20407def call wait_div_end 
+28b2 18078400 quotient temp 
+28b3 580001e0 setarg eight_hours_time_zone_offset 
+28b4 98408400 iadd temp ,temp 
+28b5 6fe109fe fetch 2 ,mem_mesh_vendor_timer_timing_time_cyclic 
+28b6 98467c00 isub temp ,null 
+28b7 24628000 nrtn zero 
+28b8 6fe08a03 fetch 1 ,mem_mesh_vendor_timer_timing_attr_para_cyclic 
+28b9 20202887 branch ali_mesh_ali_vendor_time_timeout 
+
+ali_mesh_bearer_layer_send_packet_by_network_layer:
+28ba 4777403d bpatchx patch3d_6 ,mem_patch3d 
+28bb 700a7414 jam adv_pairing_mesh_message_duration ,mem_mesh_queue_ele_duration 
+28bc 6fe0c957 fetch 1 ,mem_mesh_gatt_package_send_msg_id 
+28bd 67e08a75 store 1 ,mem_mesh_queue_ele_gatt_msg_id 
+28be 6fe08bff fetch 1 ,mem_mesh_lower_transport_layer_payload_len 
+28bf 1fe0fe0b pincrease 11 
+28c0 1fe0f3fe add pdata ,-2 ,loopcnt 
+28c1 67e08a76 store 1 ,mem_mesh_queue_ele_len 
+28c2 1fe0ffff pincrease -1 
+28c3 e7e08005 istore 1 ,contw 
+28c4 5800002a setarg gap_adtype_mesh_message 
+28c5 e7e08005 istore 1 ,contw 
+28c6 d8c04b3d arg mem_mesh_send_upper_layer_ivi_and_nid ,contr 
+28c7 20407d52 call memcpy_fast 
+28c8 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+28c9 204028cb call ali_mesh_advertising_bearer_layer_init_queue_param 
+28ca 2020793f branch queue_push 
+
+ali_mesh_advertising_bearer_layer_init_queue_param:
+28cb 1a208c02 add rega ,element_device_queue_buffer_ptr ,contr 
+28cc efe10006 ifetch 2 ,contr 
+28cd 67e1448a store 2 ,mem_queue_ptr 
+28ce da200a74 arg mem_mesh_queue_ele_temp ,rega 
+28cf 20600000 rtn 
+
+ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue:
+28d0 da6028d2 arg ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue_deal ,regc 
+28d1 20202dec branch ali_mesh_check_all_element_info 
+
+ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue_deal:
+28d2 1a208c16 add rega ,element_device_upper_adv_flag ,contr 
+28d3 efe08006 ifetch 1 ,contr 
+28d4 c1808000 rtnne packet_in_bearer 
+28d5 58000002 setarg packet_in_adverting 
+28d6 1a208a16 add rega ,element_device_upper_adv_flag ,contw 
+28d7 e7e08005 istore 1 ,contw 
+28d8 20202a09 branch ali_mesh_control_ble_advertising_on_advertising 
+
+ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer:
+28d9 204028e7 call ali_mesh_advertising_bearer_layer_generate_header 
+28da 1840fe0d add temp ,13 ,pdata 
+28db 67e0c7ae store 1 ,mem_mesh_adv_data_len 
+28dc 204028fe call ali_mesh_advertising_add_adtype_flags 
+28dd 1840fe09 add temp ,9 ,pdata 
+28de e7e08005 istore 1 ,contw 
+28df 580000ff setarg gap_adtype_manufacturer_specific 
+28e0 e7e08005 istore 1 ,contw 
+28e1 6fe40bec fetch 8 ,mem_mesh_receive_service_uuid_ios_data_company_id 
+28e2 e7e40005 istore 8 ,contw 
+28e3 1a220c00 copy rega ,contr 
+28e4 18427200 copy temp ,loopcnt 
+28e5 20407d5f call memcpy 
+28e6 20202943 branch mesh_le_send_adv 
+
+ali_mesh_advertising_bearer_layer_generate_header:
+28e7 580ea801 setarg company_id_alibaba_and_vid_gatt 
+28e8 67e18bec store 3 ,mem_mesh_receive_service_uuid_ios_data_company_id 
+28e9 58000007 setarg provisioning_send_ios_data 
+28ea 67e08bef store 1 ,mem_mesh_receive_service_uuid_ios_data_provisioning_type 
+28eb 6fe0c8d1 fetch 1 ,mem_k2_nid 
+28ec 67e08bf0 store 1 ,mem_mesh_receive_service_uuid_ios_data_nid 
+28ed 6fe08a75 fetch 1 ,mem_mesh_queue_ele_gatt_msg_id 
+28ee 67e08bf1 store 1 ,mem_mesh_receive_service_uuid_ios_data_msg_id 
+28ef 6fe08a74 fetch 1 ,mem_mesh_queue_ele_duration 
+28f0 2feffe07 isolate1 bit_of_app_package_num ,pdata 
+28f1 204028f5 call ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer_calc_param 
+28f2 67e08bf2 store 1 ,mem_mesh_receive_service_uuid_ios_data_package_num 
+28f3 60488bf3 storet 1 ,mem_mesh_receive_service_uuid_ios_data_length 
+28f4 20600000 rtn 
+
+ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer_calc_param:
+28f5 da200a79 arg mem_mesh_queue_ele_payload + 2 ,rega 
+28f6 d8400012 arg max_app_mssage_payload_length ,temp 
+28f7 58000021 setarg 0x21 
+28f8 24608000 nrtn true 
+28f9 da200a8b arg mem_mesh_queue_ele_payload + 20 ,rega 
+28fa 68488a76 fetcht 1 ,mem_mesh_queue_ele_len 
+28fb 184085ee increase -18 ,temp 
+28fc 58000022 setarg 0x22 
+28fd 20600000 rtn 
+
+ali_mesh_advertising_add_adtype_flags:
+28fe d8a047af arg mem_mesh_adv_data ,contw 
+28ff 58000002 setarg 0x02 
+2900 e7e08005 istore 1 ,contw 
+2901 58000001 setarg gap_adtype_flags 
+2902 e7e08005 istore 1 ,contw 
+2903 58000002 setarg 0x02 
+2904 e7e08005 istore 1 ,contw 
+2905 20600000 rtn 
+
+ali_mesh_advertising_add_adtype_16bit_complete:
+2906 d8401827 arg mesh_provisioning_uuid ,temp 
+2907 58000003 setarg 0x03 
+2908 e7e08005 istore 1 ,contw 
+2909 58000003 setarg gap_adtype_16bit_complete 
+290a e7e08005 istore 1 ,contw 
+290b e0410005 istoret 2 ,contw 
+290c 20600000 rtn 
+
+mesh_receive_advertising:
+290d 2020290e branch mesh_le_scan_adv 
+
+mesh_le_scan_adv:
+290e 204016a5 call le_enable 
+290f 20401c38 call le_init_adv 
+2910 20402918 call mesh_le_wait_adv 
+2911 24768000 nrtn match 
+2912 6fe08002 fetch 1 ,mem_le_adv_rcv 
+2913 1fe0fe01 pincrease 1 
+2914 67e08002 store 1 ,mem_le_adv_rcv 
+2915 6fe149b5 fetch 2 ,mem_mesh_cb_receive_advertising 
+2916 20407e05 call callback_func 
+2917 202016b2 branch le_disable 
+
+mesh_le_wait_adv:
+2918 2040291a call mesh_le_calc_next_scan_channel 
+2919 2020174a branch le_receive_adv 
+
+mesh_le_calc_next_scan_channel:
+291a 6fe0c7ce fetch 1 ,mem_mesh_adv_scan_channel 
+291b 1fe0fe01 pincrease 1 
+291c 67e0c7ce store 1 ,mem_mesh_adv_scan_channel 
+291d 67e08016 store 1 ,mem_le_ch_mapped 
+291e c1940000 rtnne 40 
+291f 7047ce25 jam 37 ,mem_mesh_adv_scan_channel 
+2920 70001625 jam 37 ,mem_le_ch_mapped 
+2921 20600000 rtn 
+
+mesh_check_ble_rx_packet:
+2922 6fe0816b fetch 1 ,mem_le_rxbuf 
+2923 1fe17e0f and pdata ,0x0f ,pdata 
+2924 c0002927 beq adv_ind ,ali_mesh_match_advertising_packet 
+2925 c0012927 beq adv_nonconn_ind ,ali_mesh_match_advertising_packet 
+2926 20600000 rtn 
+
+ali_mesh_match_advertising_packet:
+2927 e8408006 ifetcht 1 ,contr 
+2928 18467c06 sub temp ,adv_packet_min_length ,null 
+2929 20610000 rtn positive 
+292a 18467c25 sub temp ,adv_packet_max_length ,null 
+292b 24610000 nrtn positive 
+292c 1840a3fa add temp ,-6 ,rega 
+292d 18c0a406 add contr ,6 ,regb 
+
+ali_mesh_find_adv_ind_packet:
+292e e8408012 ifetcht 1 ,regb 
+292f 18467c01 sub temp ,ad_type_min_length ,null 
+2930 20610000 rtn positive 
+2931 18467c1e sub temp ,ad_type_max_length ,null 
+2932 24610000 nrtn positive 
+2933 18427e00 copy temp ,pdata 
+2934 207a0000 rtn blank 
+2935 4777c03d bpatchx patch3d_7 ,mem_patch3d 
+2936 efe08006 ifetch 1 ,contr 
+2937 c07fac3d beq gap_adtype_manufacturer_specific ,ali_mesh_receive_adtype_manufacturer_specific 
+2938 c0152f06 beq gap_adtype_mesh_message ,ali_mesh_receive_adtype_mesh_message 
+2939 c003acb5 beq gap_adtype_128bit_complete ,ali_mesh_receive_adtype_128bit_uuid_complete 
+293a 1840fe01 add temp ,1 ,pdata 
+293b 9a267c00 isub rega ,null 
+293c 20610000 rtn positive 
+293d 9a40a400 iadd regb ,regb 
+293e 18467fff sub temp ,-1 ,pdata 
+293f 9a20a200 iadd rega ,rega 
+2940 1a227e00 copy rega ,pdata 
+2941 207a0000 rtn blank 
+2942 2020292e branch ali_mesh_find_adv_ind_packet 
+
+mesh_le_send_adv:
+2943 6fe08000 fetch 1 ,mem_le_adv_transmit 
+2944 1fe0fe01 pincrease 1 
+2945 67e08000 store 1 ,mem_le_adv_transmit 
+2946 4778403e bpatchx patch3e_0 ,mem_patch3e 
+2947 204016a5 call le_enable 
+2948 df200027 arg 39 ,loopcnt 
+2949 d8c041f5 arg mem_le_txheader ,contr 
+294a d8a00a97 arg mem_le_txheader_mesh_temp ,contw 
+294b 20407d52 call memcpy_fast 
+294c 70001625 jam 37 ,mem_le_ch_mapped 
+294d db600708 arg 1800 ,stop_watch 
+294e 7856fc00 disable match 
+
+mesh_le_send_adv_loop:
+294f 20401c38 call le_init_adv 
+2950 2040295f call mesh_le_send_adv_nonconn_ind 
+2951 180a7e00 random pdata 
+2952 d84001ff arg 0x1ff ,temp 
+2953 98417e00 iand temp ,pdata 
+2954 1fe0fe64 add pdata ,100 ,pdata 
+2955 20407d0e call delay 
+2956 6fe08016 fetch 1 ,mem_le_ch_mapped 
+2957 1fe0fe01 pincrease 1 
+2958 67e08016 store 1 ,mem_le_ch_mapped 
+2959 c094294f bne 40 ,mesh_le_send_adv_loop 
+295a df200027 arg 39 ,loopcnt 
+295b d8a041f5 arg mem_le_txheader ,contw 
+295c d8c00a97 arg mem_le_txheader_mesh_temp ,contr 
+295d 20407d52 call memcpy_fast 
+295e 202016b2 branch le_disable 
+
+mesh_le_send_adv_nonconn_ind:
+295f d8400002 arg adv_nonconn_ind ,temp 
+2960 6048c1f5 storet 1 ,mem_le_txheader 
+2961 6848c7ae fetcht 1 ,mem_mesh_adv_data_len 
+2962 1840fe06 add temp ,6 ,pdata 
+2963 67e0c1f6 store 1 ,mem_le_txlen 
+2964 6fe3437a fetch 6 ,mem_le_lap 
+2965 67e341f7 store 6 ,mem_le_txpayload 
+2966 18427200 copy temp ,loopcnt 
+2967 d8c047af arg mem_mesh_adv_data ,contr 
+2968 20407d52 call memcpy_fast 
+2969 20201836 branch le_transmit_norx 
+
+ali_mesh_base_adt_cache:
+296a 4778c03e bpatchx patch3e_1 ,mem_patch3e 
+296b 68490be1 fetcht 2 ,mem_ccm_data_ptr 
+296c 6fe08be0 fetch 1 ,mem_ccm_data_len 
+296d 18420c00 copy temp ,contr 
+296e da2048f2 arg mem_k4_salt ,rega 
+296f de004902 arg mem_k4_t ,alarm 
+2970 20402b88 call ali_mesh_encrypt_base_function_aes_cmac 
+2971 20407e56 call disable_user 
+2972 1a627e00 copy regc ,pdata 
+2973 9e008c00 iadd alarm ,contr 
+2974 684a4902 fetcht 4 ,mem_k4_t 
+2975 6fe10bfd fetch 2 ,mem_mesh_mic_cache_ptr 
+2976 1fe22200 copy pdata ,rega 
+2977 df20000a arg transport_mic_cache_space_num ,loopcnt 
+
+ali_mesh_base_adt_cache_loop:
+2978 efe20011 ifetch 4 ,rega 
+2979 203a2985 branch ali_mesh_base_adt_cache_empty_space ,blank 
+297a 98467c00 isub temp ,null 
+297b 20628000 rtn zero 
+297c 1a20a204 increase transport_mic_cache_space_size ,rega 
+297d c2002978 loop ali_mesh_base_adt_cache_loop 
+297e 6fe10bfd fetch 2 ,mem_mesh_mic_cache_ptr 
+297f 1fe20a00 copy pdata ,contw 
+2980 1fe08c04 add pdata ,transport_mic_cache_space_size ,contr 
+2981 df200024 arg transport_mic_cache_total_size ,loopcnt 
+2982 20407d52 call memcpy_fast 
+2983 e0420005 istoret 4 ,contw 
+2984 20207e54 branch enable_user 
+
+ali_mesh_base_adt_cache_empty_space:
+2985 e0420011 istoret 4 ,rega 
+2986 20207e54 branch enable_user 
+
+ali_mesh_chip_peripherals_load_data_from_eep:
+2987 2040298e call ali_mesh_chip_peripherals_load_three_tuple_from_eep 
+2988 20402992 call ali_mesh_chip_peripherals_load_network_key_from_eep 
+2989 20402999 call ali_mesh_chip_peripherals_load_application_key_from_eep 
+298a 2040299d call ali_mesh_chip_peripherals_load_device_key_from_eep 
+298b 204029a1 call ali_mesh_chip_peripherals_load_reset_count_from_eep 
+298c 204029a5 call ali_mesh_chip_peripherals_load_seq_from_eep 
+298d 202029a9 branch ali_mesh_chip_peripherals_load_subscription_from_eep 
+
+ali_mesh_chip_peripherals_load_three_tuple_from_eep:
+298e d840001a arg mesh_eep_three_tuple_length ,temp 
+298f da20499b arg mem_mesh_three_tuple_productid ,rega 
+2990 da400000 arg mesh_eep_three_tuple_offset ,regb 
+2991 20205ddc branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_network_key_from_eep:
+2992 d8400013 arg mesh_eep_network_key_length ,temp 
+2993 da20493e arg mem_mesh_network_key ,rega 
+2994 da40001a arg mesh_eep_network_key_offset ,regb 
+2995 20405ddc call iicd_read_eep_data 
+2996 6fe0c94e fetch 1 ,mem_mesh_last_iv_index_byte 
+2997 67e0ca16 store 1 ,mem_mesh_iv_index + 3 
+2998 20600000 rtn 
+
+ali_mesh_chip_peripherals_load_application_key_from_eep:
+2999 d8400010 arg mesh_eep_application_key_length ,temp 
+299a da204afe arg mem_mesh_application_key ,rega 
+299b da40002d arg mesh_eep_application_key_offset ,regb 
+299c 20205ddc branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_device_key_from_eep:
+299d d8400010 arg mesh_eep_device_key_length ,temp 
+299e da204824 arg mem_mesh_device_key ,rega 
+299f da40003d arg mesh_eep_device_key_offset ,regb 
+29a0 20205ddc branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_reset_count_from_eep:
+29a1 20600000 rtn 
+29a2 d8400001 arg mesh_eep_reset_count_length ,temp 
+29a3 da40004d arg mesh_eep_reset_count_offset ,regb 
+29a4 20205ddc branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_seq_from_eep:
+29a5 d8400003 arg mesh_eep_seq_length ,temp 
+29a6 da204b37 arg mem_mesh_send_message_seq ,rega 
+29a7 da40004e arg mesh_eep_seq_offset ,regb 
+29a8 20205ddc branch iicd_read_eep_data 
+
+ali_mesh_chip_peripherals_load_subscription_from_eep:
+29a9 6fe149d9 fetch 2 ,mem_mesh_core_feature 
+29aa c3810000 rtnbit1 mesh_feature_disable_subscription 
+29ab d8400040 arg mesh_eep_subscription_total_length ,temp 
+29ac da20098e arg mem_mesh_subscription_eep_temp ,rega 
+29ad da400051 arg mesh_eep_subscription_offset ,regb 
+29ae 20405ddc call iicd_read_eep_data 
+29af 20402de1 call mesh_get_element_info_config 
+29b0 d8c0098e arg mem_mesh_subscription_eep_temp ,contr 
+29b1 1a20a206 add rega ,element_device_subscription_label ,rega 
+
+ali_mesh_chip_peripherals_load_subscription_from_eep_loop:
+29b2 1a220a00 copy rega ,contw 
+29b3 20407d0c call memcpy16 
+29b4 1a427e00 copy regb ,pdata 
+29b5 9a20a200 iadd rega ,rega 
+29b6 c20029b2 loop ali_mesh_chip_peripherals_load_subscription_from_eep_loop 
+29b7 20600000 rtn 
+
+mesh_receive_config_appkey_add_cb:
+29b8 204029bb call ali_mesh_chip_peripherals_save_network_key_from_eep 
+29b9 204029bf call ali_mesh_chip_peripherals_save_application_key_from_eep 
+29ba 202029c3 branch ali_mesh_chip_peripherals_save_device_key_from_eep 
+
+ali_mesh_chip_peripherals_save_network_key_from_eep:
+29bb d8400013 arg mesh_eep_network_key_length ,temp 
+29bc da20493e arg mem_mesh_network_key ,rega 
+29bd da40001a arg mesh_eep_network_key_offset ,regb 
+29be 20205e02 branch iicd_write_eep_data 
+
+ali_mesh_chip_peripherals_save_application_key_from_eep:
+29bf d8400010 arg mesh_eep_application_key_length ,temp 
+29c0 da204afe arg mem_mesh_application_key ,rega 
+29c1 da40002d arg mesh_eep_application_key_offset ,regb 
+29c2 20205e02 branch iicd_write_eep_data 
+
+ali_mesh_chip_peripherals_save_device_key_from_eep:
+29c3 d8400010 arg mesh_eep_device_key_length ,temp 
+29c4 da204824 arg mem_mesh_device_key ,rega 
+29c5 da40003d arg mesh_eep_device_key_offset ,regb 
+29c6 20205e02 branch iicd_write_eep_data 
+
+mesh_store_new_seq_data:
+
+ali_mesh_chip_peripherals_save_seq_from_eep:
+29c7 d8400003 arg mesh_eep_seq_length ,temp 
+29c8 da204b37 arg mem_mesh_send_message_seq ,rega 
+29c9 da40004e arg mesh_eep_seq_offset ,regb 
+29ca 20205e02 branch iicd_write_eep_data 
+
+mesh_store_new_subscriptuion_list_data:
+29cb 204029d0 call ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep 
+29cc d8400040 arg mesh_eep_subscription_total_length ,temp 
+29cd da20098e arg mem_mesh_subscription_eep_temp ,rega 
+29ce da400051 arg mesh_eep_subscription_offset ,regb 
+29cf 20205e02 branch iicd_write_eep_data 
+
+ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep:
+29d0 20402de1 call mesh_get_element_info_config 
+29d1 d8a0098e arg mem_mesh_subscription_eep_temp ,contw 
+29d2 1a20a206 add rega ,element_device_subscription_label ,rega 
+
+ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep_loop:
+29d3 1a220c00 copy rega ,contr 
+29d4 20407d0c call memcpy16 
+29d5 1a427e00 copy regb ,pdata 
+29d6 9a20a200 iadd rega ,rega 
+29d7 c20029d3 loop ali_mesh_chip_peripherals_save_subscriptuion_list_from_eep_loop 
+29d8 20600000 rtn 
+
+logging_tx_debug:
+29d9 d8400000 arg logging_debug ,temp 
+29da 202029e3 branch logging_tx_common 
+
+logging_tx_info:
+29db d8400001 arg logging_info ,temp 
+29dc 202029e3 branch logging_tx_common 
+
+logging_tx_warning:
+29dd d8400002 arg logging_warning ,temp 
+29de 202029e3 branch logging_tx_common 
+
+logging_tx_error:
+29df d8400003 arg logging_error ,temp 
+29e0 202029e3 branch logging_tx_common 
+
+logging_tx_critical:
+29e1 d8400004 arg logging_critical ,temp 
+29e2 202029e3 branch logging_tx_common 
+
+logging_tx_common:
+29e3 4779403e bpatchx patch3e_2 ,mem_patch3e 
+29e4 20407cc8 call push_stack 
+29e5 20405f11 call uartb_prepare_tx_register_push 
+29e6 580000aa setarg lua_log_packet_header 
+29e7 e7e08003 istore 1 ,contwu 
+29e8 58000003 setarg lua_log_pakcet_type 
+29e9 e7e08003 istore 1 ,contwu 
+29ea 1f20fe04 add loopcnt ,4 ,pdata 
+29eb e7e08003 istore 1 ,contwu 
+29ec e0410003 istorer temp ,2 ,contwu 
+29ed e2410003 istorer regb ,2 ,contwu 
+29ee 1a220c00 copy rega ,contr 
+29ef 20405f1f call uart_copy_tx_bytes_fast 
+29f0 580000bb setarg lua_log_packet_trail 
+29f1 e7e08003 istore 1 ,contwu 
+29f2 20405f15 call uartb_send_register_pop 
+29f3 20207cd4 branch pop_stack 
+
+mesh_uart_init:
+29f4 204029fb call mesh_uart_init_buffer 
+29f5 d84e1000 arg 921600 ,temp 
+29f6 20405eca call uartb_calc_baud_rate_config 
+29f7 20405ed7 call uart_clock_select_main_freq_crystal 
+29f8 d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+29f9 60588061 storet 1 ,core_uartb_ctrl 
+29fa 20600000 rtn 
+
+mesh_uart_init_buffer:
+29fb 58001c00 setarg mem_mesh_uart_log_rx_buff 
+29fc 67e1095c store 2 ,mem_pdatatemp 
+29fd 58001c01 setarg mem_mesh_uart_log_rx_buff_end 
+29fe e7e10005 istore 2 ,contw 
+29ff 58001c02 setarg mem_mesh_uart_log_tx_buff 
+2a00 e7e10005 istore 2 ,contw 
+2a01 58001fff setarg mem_mesh_uart_log_tx_buff_end 
+2a02 e7e10005 istore 2 ,contw 
+2a03 6fe4095c fetch 8 ,mem_pdatatemp 
+2a04 20205eb2 branch uartb_init_dma_mem 
+
+ali_mesh_control_ble_adv_process:
+2a05 20402a15 call ali_mesh_control_ble_adv_tmall_packet 
+2a06 20202a0d branch ali_mesh_control_ble_adv_app_packet 
+
+ali_mesh_control_ble_adv_timer_process:
+2a07 20402a72 call ali_mesh_advertising_unprovisioned_timer_interval_timer 
+2a08 20202a68 branch ali_mesh_advertising_unprovisioned_timer 
+
+ali_mesh_control_ble_advertising_on_advertising:
+2a09 7047cf01 jam device_beacon_on ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2a0a 20600000 rtn 
+
+ali_mesh_control_ble_advertising_off_advertising:
+2a0b 7047cf00 jam device_beacon_off ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2a0c 20600000 rtn 
+
+ali_mesh_control_ble_adv_app_packet:
+2a0d da402a11 arg ali_mesh_control_ble_adv_app_packet_paired ,regb 
+2a0e da200015 arg mesh_adv_app_message_interval ,rega 
+2a0f d8e0000d arg mesh_ble_adv_app ,queue 
+2a10 20202a5d branch ali_mesh_chip_timer_check_with_random_timer 
+
+ali_mesh_control_ble_adv_app_packet_paired:
+2a11 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2a12 c1800000 rtnne paired_status 
+2a13 da602a19 arg ali_mesh_control_ble_adv_app_packet_paired_deal ,regc 
+2a14 20202dec branch ali_mesh_check_all_element_info 
+
+ali_mesh_control_ble_adv_tmall_packet:
+2a15 da402a26 arg ali_mesh_control_ble_adv_tmall_packet_send_package ,regb 
+2a16 da20001d arg mesh_adv_tmall_message_interval ,rega 
+2a17 d8e0000e arg mesh_ble_adv_tmall ,queue 
+2a18 20202a5d branch ali_mesh_chip_timer_check_with_random_timer 
+
+ali_mesh_control_ble_adv_app_packet_paired_deal:
+2a19 1a208c1a add rega ,element_device_tran_package_type ,contr 
+2a1a efe08006 ifetch 1 ,contr 
+2a1b c4008000 rtnbit0 bit_upper_tran_app_message 
+2a1c 204028cb call ali_mesh_advertising_bearer_layer_init_queue_param 
+2a1d 20407967 call queue_get_new_ele 
+2a1e 24740000 nrtn user 
+2a1f 6fe08a76 fetch 1 ,mem_mesh_queue_ele_len 
+2a20 1fe0fffe pincrease -2 
+2a21 67e08a76 store 1 ,mem_mesh_queue_ele_len 
+2a22 6fe08a74 fetch 1 ,mem_mesh_queue_ele_duration 
+2a23 79407e07 setflip bit_of_app_package_num ,pdata 
+2a24 e7e08012 istore 1 ,regb 
+2a25 202028d9 branch ali_mesh_advertising_bearer_layer_send_packet_by_app_bearer 
+
+ali_mesh_control_ble_adv_tmall_packet_send_package:
+2a26 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2a27 c0002a2a beq paired_status ,ali_mesh_control_ble_advertising_send_paired_packet 
+2a28 c0012a5b beq pairing_status ,ali_mesh_control_ble_advertising_send_pairing_packet 
+2a29 20202a4a branch ali_mesh_control_ble_advertising_send_device_beacon_packet 
+
+ali_mesh_control_ble_advertising_send_paired_packet:
+2a2a da602a2c arg ali_mesh_control_ble_advertising_send_paired_packet_deal ,regc 
+2a2b 20202dec branch ali_mesh_check_all_element_info 
+
+ali_mesh_control_ble_advertising_send_paired_packet_deal:
+2a2c 204028cb call ali_mesh_advertising_bearer_layer_init_queue_param 
+2a2d 20407967 call queue_get_new_ele 
+2a2e 24740000 nrtn user 
+2a2f 6fe08a74 fetch 1 ,mem_mesh_queue_ele_duration 
+2a30 1fe0ffff pincrease -1 
+2a31 e7e08012 istore 1 ,regb 
+2a32 c2832a3d bbit1 bit_of_adv_in_off ,ali_mesh_control_ble_advertising_send_paired_packet_adv_in_off 
+2a33 1fe17e3f and pdata ,0x3f ,pdata 
+2a34 205a2a44 call ali_mesh_control_ble_advertising_send_paired_packet_end_duration ,blank 
+2a35 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+2a36 1a208c1a add rega ,element_device_tran_package_type ,contr 
+2a37 efe08006 ifetch 1 ,contr 
+2a38 c4000000 rtnbit0 bit_upper_tran_tmall_message 
+2a39 d8a047ae arg mem_mesh_adv_data_len ,contw 
+2a3a d8c00a76 arg mem_mesh_queue_ele_len ,contr 
+2a3b 20407d0a call memcpy32 
+2a3c 20202943 branch mesh_le_send_adv 
+
+ali_mesh_control_ble_advertising_send_paired_packet_adv_in_off:
+2a3d 1fe17e3f and pdata ,0x3f ,pdata 
+2a3e 247a0000 nrtn blank 
+2a3f 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+2a40 1a208a16 add rega ,element_device_upper_adv_flag ,contw 
+2a41 58000000 setarg null_packet_advertising 
+2a42 e7e08005 istore 1 ,contw 
+2a43 2020793a branch queue_init 
+
+ali_mesh_control_ble_advertising_send_paired_packet_end_duration:
+2a44 da200a74 arg mem_mesh_queue_ele_duration ,rega 
+2a45 20407956 call queue_pop 
+2a46 20407985 call queue_empty 
+2a47 247a0000 nrtn blank 
+2a48 700a7454 jam adv_pairing_mesh_message_interval ,mem_mesh_queue_ele_duration 
+2a49 2020793f branch queue_push 
+
+ali_mesh_control_ble_advertising_send_device_beacon_packet:
+2a4a 20402c16 call ali_mesh_config_device_uuid_by_three_tuple 
+2a4b 20402c22 call ali_mesh_send_unprovisioned_beacons_tmall 
+2a4c 20402c30 call ali_mesh_advertising_send_unprovisioned_beacons_gatt 
+2a4d 20402a53 call ali_mesh_control_ble_advertising_device_beacon_check_duration 
+2a4e 24628000 nrtn zero 
+2a4f 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2a50 c001aa57 beq silence_beacon_status ,ali_mesh_end_advertising_silence_device_beacon_packet 
+2a51 c000aa59 beq unprovisioned_beacon_status ,ali_mesh_end_advertising_unprovisioned_device_beacon_packet 
+2a52 20600000 rtn 
+
+ali_mesh_control_ble_advertising_device_beacon_check_duration:
+2a53 6fe0c7d2 fetch 1 ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a54 1fe0ffff add pdata ,-1 ,pdata 
+2a55 67e0c7d2 store 1 ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a56 20600000 rtn 
+
+ali_mesh_end_advertising_silence_device_beacon_packet:
+2a57 7047d358 jam adv_silence_device_beacon_interval ,mem_mesh_advertising_unprovisioned_device_beacon_interval 
+2a58 20202a0b branch ali_mesh_control_ble_advertising_off_advertising 
+
+ali_mesh_end_advertising_unprovisioned_device_beacon_packet:
+2a59 7047d306 jam adv_unprovisioned_device_beacon_duration ,mem_mesh_advertising_unprovisioned_device_beacon_interval 
+2a5a 20202a0b branch ali_mesh_control_ble_advertising_off_advertising 
+
+ali_mesh_control_ble_advertising_send_pairing_packet:
+2a5b 20402c93 call ali_mesh_advertising_timer 
+2a5c 20202943 branch mesh_le_send_adv 
+
+ali_mesh_chip_timer_check_with_random_timer:
+2a5d 180a7e00 random pdata 
+2a5e 1fe17e07 and pdata ,0x07 ,pdata 
+2a5f 9a20a200 iadd rega ,rega 
+
+ali_mesh_chip_timer_check:
+2a60 6fe0c7cf fetch 1 ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2a61 c1808000 rtnne device_beacon_on 
+2a62 20407d74 call timer_check 
+2a63 247a0000 nrtn blank 
+2a64 1a227e00 copy rega ,pdata 
+2a65 20407d66 call timer_init 
+2a66 1a427e00 copy regb ,pdata 
+2a67 20207e05 branch callback_func 
+
+ali_mesh_advertising_unprovisioned_timer:
+2a68 da6047d0 arg mem_mesh_advertising_unprovisioned_device_beacon_timer ,regc 
+2a69 da402a6b arg ali_mesh_advertising_unprovisioned_timeout ,regb 
+2a6a 20203191 branch timer_single_step_2b 
+
+ali_mesh_advertising_unprovisioned_timeout:
+2a6b 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2a6c c1808000 rtnne unprovisioned_beacon_status 
+2a6d 6fe0c936 fetch 1 ,mem_mesh_uuid_featureflag 
+2a6e 79207e00 set1 bit_silence_adv_flag ,pdata 
+2a6f 67e0c936 store 1 ,mem_mesh_uuid_featureflag 
+2a70 70493303 jam silence_beacon_status ,mem_mesh_provisioned_flag 
+2a71 20202a7b branch ali_mesh_send_silence_device_beacon_init_advertising 
+
+ali_mesh_advertising_unprovisioned_timer_interval_timer:
+2a72 da6047d3 arg mem_mesh_advertising_unprovisioned_device_beacon_interval ,regc 
+2a73 da402a75 arg ali_mesh_advertising_unprovisioned_timer_interval_timeout ,regb 
+2a74 2020318a branch timer_single_step 
+
+ali_mesh_advertising_unprovisioned_timer_interval_timeout:
+2a75 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2a76 c001aa7b beq silence_beacon_status ,ali_mesh_send_silence_device_beacon_init_advertising 
+2a77 c000aa79 beq unprovisioned_beacon_status ,ali_mesh_send_unprovisioned_device_beacon_init_advertising 
+2a78 20600000 rtn 
+
+ali_mesh_send_unprovisioned_device_beacon_init_advertising:
+2a79 7047d206 jam adv_unprovisioned_device_beacon_duration ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a7a 20202a09 branch ali_mesh_control_ble_advertising_on_advertising 
+
+ali_mesh_send_silence_device_beacon_init_advertising:
+2a7b 7047d206 jam adv_silence_device_beacon_duration ,mem_mesh_advertising_unprovisioned_device_beacon_duration 
+2a7c 20202a09 branch ali_mesh_control_ble_advertising_on_advertising 
+
+ali_mesh_encrypt_calc_random_data:
+2a7d 20402a83 call ali_mesh_encrypt_calc_random_data_calc_confirmationkey 
+2a7e 20402a8b call ali_mesh_encrypt_calc_random_data_calc_authvalueprov 
+2a7f 20402a90 call ali_mesh_encrypt_calc_random_data_calc_authvaluedevice 
+2a80 20402a95 call ali_mesh_encrypt_calc_random_data_calc_confirmationcloud 
+2a81 20402a9d call ali_mesh_encrypt_calc_random_data_calc_confirmationdevice 
+2a82 20202aa1 branch ali_mesh_encrypt_calc_random_data_calc_devicekey 
+
+ali_mesh_encrypt_calc_random_data_calc_confirmationkey:
+2a83 20402aae call ali_mesh_encrypt_load_randomab_to_sha256 
+2a84 d8c04844 arg mem_mesh_sha256_confirmationkey_ascii ,contr 
+2a85 df20000f arg 0xf ,loopcnt 
+2a86 20402b0e call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii 
+2a87 20402b28 call ali_mesh_encrypt_base_function_sha256_calc 
+2a88 d8c00900 arg memresult ,contr 
+2a89 d8a04834 arg mem_mesh_confirmationkey ,contw 
+2a8a 20207d0c branch memcpy16 
+
+ali_mesh_encrypt_calc_random_data_calc_authvalueprov:
+2a8b 20402ab1 call ali_mesh_encrypt_load_three_tuple_to_sha256 
+2a8c 20402b28 call ali_mesh_encrypt_base_function_sha256_calc 
+2a8d d8c00900 arg memresult ,contr 
+2a8e d8a047e4 arg mem_mesh_authvalueprov ,contw 
+2a8f 20207d0c branch memcpy16 
+
+ali_mesh_encrypt_calc_random_data_calc_authvaluedevice:
+2a90 20402ab1 call ali_mesh_encrypt_load_three_tuple_to_sha256 
+2a91 20402b28 call ali_mesh_encrypt_base_function_sha256_calc 
+2a92 d8c00900 arg memresult ,contr 
+2a93 d8a04814 arg mem_mesh_authvaluedevice ,contw 
+2a94 20207d0c branch memcpy16 
+
+ali_mesh_encrypt_calc_random_data_calc_confirmationcloud:
+2a95 6fe44804 fetch 8 ,mem_mesh_provisioning_random_a 
+2a96 67e447dc store 8 ,mem_mesh_confirmationcloud_randoma 
+2a97 6fe4480c fetch 8 ,mem_mesh_provisioning_random_b 
+2a98 67e447d4 store 8 ,mem_mesh_confirmationcloud_randomb 
+2a99 d8c047d4 arg mem_mesh_calc_confirmationcloud_data ,contr 
+2a9a da204834 arg mem_mesh_confirmationkey ,rega 
+2a9b de0047f4 arg mem_mesh_confirmationcloud ,alarm 
+2a9c 20202b76 branch ali_mesh_encrypt_base_function_aes_cmac_32byte 
+
+ali_mesh_encrypt_calc_random_data_calc_confirmationdevice:
+2a9d d8c04804 arg mem_mesh_calc_confirmationdevice_data ,contr 
+2a9e da204834 arg mem_mesh_confirmationkey ,rega 
+2a9f de004804 arg mem_mesh_confirmationdevice ,alarm 
+2aa0 20202b76 branch ali_mesh_encrypt_base_function_aes_cmac_32byte 
+
+ali_mesh_encrypt_calc_random_data_calc_devicekey:
+2aa1 d8c047f4 arg mem_mesh_confirmationcloud ,contr 
+2aa2 df200010 arg 0x10 ,loopcnt 
+2aa3 20402b0b call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii 
+2aa4 d8c0485d arg mem_mesh_sha256_devicekey_ascii ,contr 
+2aa5 df200009 arg 9 ,loopcnt 
+2aa6 20402b0e call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii 
+2aa7 20402b28 call ali_mesh_encrypt_base_function_sha256_calc 
+2aa8 d8c00900 arg memresult ,contr 
+2aa9 d8a04824 arg mem_mesh_device_key ,contw 
+2aaa 20207d0c branch memcpy16 
+
+ali_mesh_encrypt_load_randomba_to_sha256:
+2aab 20402aaf call ali_mesh_encrypt_load_randomb_to_sha256 
+
+ali_mesh_encrypt_load_randoma_to_sha256:
+2aac d8c04804 arg mem_mesh_provisioning_random_a ,contr 
+2aad 20202b0a branch ali_mesh_encrypt_base_function_sha256_load_data_64bit 
+
+ali_mesh_encrypt_load_randomab_to_sha256:
+2aae 20402aac call ali_mesh_encrypt_load_randoma_to_sha256 
+
+ali_mesh_encrypt_load_randomb_to_sha256:
+2aaf d8c0480c arg mem_mesh_provisioning_random_b ,contr 
+2ab0 20202b0a branch ali_mesh_encrypt_base_function_sha256_load_data_64bit 
+
+ali_mesh_encrypt_load_three_tuple_to_sha256:
+2ab1 d8c0499b arg mem_mesh_three_tuple_productid ,contr 
+2ab2 df200004 arg 4 ,loopcnt 
+2ab3 20402b11 call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma 
+2ab4 d8c0499f arg mem_mesh_three_tuple_mac ,contr 
+2ab5 df200006 arg 6 ,loopcnt 
+2ab6 20402b11 call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma 
+2ab7 d8c049a5 arg mem_mesh_three_tuple_secret ,contr 
+2ab8 df200010 arg 0x10 ,loopcnt 
+2ab9 20202b0b branch ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii 
+
+ali_mesh_encrypt_calc_provisioning_data:
+2aba 20402ac6 call ali_mesh_encrypt_calc_provisioning_data_calc_sessionkey 
+
+ali_mesh_encrypt_calc_provisioning_data_xor_prov_data:
+2abb da20493b arg mem_mesh_encrypt_provisioning_data ,rega 
+2abc da400900 arg memresult ,regb 
+2abd df20000b arg 0xb ,loopcnt 
+
+ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop:
+2abe efe10011 ifetch 2 ,rega 
+2abf e8410012 ifetcht 2 ,regb 
+2ac0 9842fe00 ixor temp ,pdata 
+2ac1 e7e10011 istore 2 ,rega 
+2ac2 1a20a202 increase 2 ,rega 
+2ac3 1a40a402 increase 2 ,regb 
+2ac4 c2002abe loop ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop 
+2ac5 20600000 rtn 
+
+ali_mesh_encrypt_calc_provisioning_data_calc_sessionkey:
+2ac6 d8c047f4 arg mem_mesh_confirmationcloud ,contr 
+2ac7 df200010 arg 0x10 ,loopcnt 
+2ac8 20402b0b call ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii 
+2ac9 d8c04853 arg mem_mesh_sha256_sessionkey_ascii ,contr 
+2aca df20000a arg 0xa ,loopcnt 
+2acb 20402b0e call ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii 
+2acc 20202b28 branch ali_mesh_encrypt_base_function_sha256_calc 
+
+ali_mesh_encrypt_calc_network_key_by_k2:
+2acd d8c0493e arg mem_mesh_network_key ,contr 
+2ace d8a04891 arg mem_k2_n ,contw 
+2acf 20407d0c call memcpy16 
+
+ali_mesh_encrypt_base_function_k2:
+2ad0 d8c04891 arg mem_k2_n ,contr 
+2ad1 da2048a1 arg mem_k2_salt ,rega 
+2ad2 de0048b1 arg mem_k2_t ,alarm 
+2ad3 20402b78 call ali_mesh_encrypt_base_function_aes_cmac_16byte 
+2ad4 de0048c1 arg mem_k2_t1 ,alarm 
+2ad5 da400001 arg 0x01 ,regb 
+2ad6 58000000 setarg 0 
+2ad7 20402b7a call ali_mesh_encrypt_base_function_k2_aes_cmac_t 
+2ad8 6fe0c8d0 fetch 1 ,mem_k2_t1 + 15 
+2ad9 1fe17e7f and pdata ,0x7f ,pdata 
+2ada 67e0c8d1 store 1 ,mem_k2_nid 
+2adb de0048e2 arg mem_k2_t2 ,alarm 
+2adc da400002 arg 0x02 ,regb 
+2add 58000010 setarg 0x10 
+2ade da2048c1 arg mem_k2_t1 ,rega 
+2adf 20402b7a call ali_mesh_encrypt_base_function_k2_aes_cmac_t 
+2ae0 de0048d2 arg mem_k2_t3 ,alarm 
+2ae1 da400003 arg 0x03 ,regb 
+2ae2 58000010 setarg 0x10 
+2ae3 da2048e2 arg mem_k2_t2 ,rega 
+2ae4 20202b7a branch ali_mesh_encrypt_base_function_k2_aes_cmac_t 
+
+ali_mesh_encrypt_base_function_k4:
+2ae5 d8c04afe arg mem_mesh_application_key ,contr 
+2ae6 da2048f2 arg mem_k4_salt ,rega 
+2ae7 de004902 arg mem_k4_t ,alarm 
+2ae8 20402b78 call ali_mesh_encrypt_base_function_aes_cmac_16byte 
+2ae9 d8c04912 arg mem_k4_id6_01 ,contr 
+2aea da204902 arg mem_k4_t ,rega 
+2aeb de004922 arg mem_k4_k4n ,alarm 
+2aec 58000004 setarg 4 
+2aed 20402b88 call ali_mesh_encrypt_base_function_aes_cmac 
+2aee 6fe0c931 fetch 1 ,mem_k4_k4n + 15 
+2aef 1fe17e3f and pdata ,0x3f ,pdata 
+2af0 79207e06 set1 transport_head_bit_akf ,pdata 
+2af1 67e0c932 store 1 ,mem_mesh_transport_aid 
+2af2 20600000 rtn 
+
+ali_mesh_encrypt_obfuscation_deceypt_send_message:
+2af3 da204b3e arg mem_mesh_send_upper_layer_ctl_and_ttl ,rega 
+2af4 6fe3cb44 fetch 7 ,mem_mesh_send_upper_layer_dst 
+2af5 20202af8 branch ali_mesh_encrypt_obfuscation_deceypt 
+
+ali_mesh_encrypt_obfuscation_deceypt_recevie_message:
+2af6 da200c0c arg mem_mesh_message_ttl ,rega 
+2af7 6fe38c12 fetch 7 ,mem_mesh_message_dst 
+
+ali_mesh_encrypt_obfuscation_deceypt:
+2af8 67e38bc7 store 7 ,mem_mesh_privacy_plaintext_privacy_random 
+2af9 58000000 setarg 0 
+2afa 67e28bbe store 5 ,mem_mesh_privacy_plaintext_zero_string 
+2afb 20402b01 call ali_mesh_encrypt_generate_pecb 
+2afc 6fe30bce fetch 6 ,mem_mesh_pecb 
+2afd e8430011 ifetcht 6 ,rega 
+2afe 9842fe00 ixor temp ,pdata 
+2aff e7e30011 istore 6 ,rega 
+2b00 20600000 rtn 
+
+ali_mesh_encrypt_generate_pecb:
+
+ali_mesh_encrypt_generate_privacy_random:
+2b01 6fe24a13 fetch 4 ,mem_mesh_iv_index 
+2b02 67e20bc3 store 4 ,mem_mesh_privacy_plaintext_iv_index 
+
+ali_mesh_encrypt_base_function_generate_pecb:
+2b03 d8c048d2 arg mem_k2_privacykey ,contr 
+2b04 20406dbe call load_key 
+2b05 d8c00bbe arg mem_mesh_privacy_plaintext ,contr 
+2b06 20406dc0 call load_data128 
+2b07 20406d59 call do_aes_ocb 
+2b08 d8a00bce arg mem_mesh_pecb ,contw 
+2b09 20206dd1 branch store_aes_result 
+
+ali_mesh_encrypt_base_function_sha256_load_data_64bit:
+2b0a df200008 arg 8 ,loopcnt 
+
+ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii:
+2b0b 20402b18 call ali_mesh_encrypt_base_function_sha256_check_first_load_data 
+2b0c 20402b67 call ali_mesh_encrypt_base_function_hex2ascii 
+2b0d 20202b15 branch ali_mesh_encrypt_base_function_sha256_store_dataptr 
+
+ali_mesh_encrypt_base_function_sha256_load_data_without_hex2ascii:
+2b0e 20402b18 call ali_mesh_encrypt_base_function_sha256_check_first_load_data 
+2b0f 20407d5f call memcpy 
+2b10 20202b15 branch ali_mesh_encrypt_base_function_sha256_store_dataptr 
+
+ali_mesh_encrypt_base_function_sha256_load_data_with_hex2ascii_add_comma:
+2b11 20402b18 call ali_mesh_encrypt_base_function_sha256_check_first_load_data 
+2b12 20402b67 call ali_mesh_encrypt_base_function_hex2ascii 
+2b13 5800002c setarg comma 
+2b14 e7e08005 istore 1 ,contw 
+
+ali_mesh_encrypt_base_function_sha256_store_dataptr:
+2b15 18a27e00 copy contw ,pdata 
+2b16 67e14877 store 2 ,mem_mesh_sha256_data_end_addr 
+2b17 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_check_first_load_data:
+2b18 18c20400 copy contr ,temp 
+2b19 1f222200 copy loopcnt ,rega 
+2b1a 6fe14877 fetch 2 ,mem_mesh_sha256_data_end_addr 
+2b1b 1fe20a00 copy pdata ,contw 
+2b1c 6fe0c866 fetch 1 ,mem_mesh_sha256_load_first_data_flag 
+2b1d 205a2b21 call ali_mesh_encrypt_base_function_sha256_first_load_data ,blank 
+2b1e 18420c00 copy temp ,contr 
+2b1f 1a227200 copy rega ,loopcnt 
+2b20 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_first_load_data:
+2b21 70486601 jam 1 ,mem_mesh_sha256_load_first_data_flag 
+2b22 20402b25 call ali_mesh_encrypt_base_function_sha256_clear_data_chunk 
+2b23 d8a00abe arg mem_mesh_sha256_chunk_start ,contw 
+2b24 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_clear_data_chunk:
+2b25 df200020 arg 0x20 ,loopcnt 
+2b26 d8a00abe arg mem_mesh_sha256_chunk_start ,contw 
+2b27 20207d17 branch memset0 
+
+ali_mesh_encrypt_base_function_sha256_calc:
+2b28 20402b45 call ali_mesh_encrypt_base_function_sha256_load_data_end 
+2b29 da400010 arg mesh_encrypt_sha256_function_input ,regb 
+2b2a da200abe arg mem_mesh_sha256_chunk_start ,rega 
+2b2b 6f244867 fetchr loopcnt ,8 ,mem_mesh_sha256_data_len_byte 
+2b2c 204029d9 call logging_tx_debug 
+2b2d 20402b60 call ali_mesh_encrypt_base_function_sha256_input_data_init_inverse 
+2b2e 58000abe setarg mem_mesh_sha256_chunk_start 
+2b2f 67e1487e store 2 ,mem_mesh_sha256_chunk_ptr 
+2b30 2040729b call sha_init 
+
+ali_mesh_encrypt_base_function_sha256_calc_loop:
+2b31 6fe1487e fetch 2 ,mem_mesh_sha256_chunk_ptr 
+2b32 1fe20c00 copy pdata ,contr 
+2b33 d8a004a8 arg memdat ,contw 
+2b34 20407cff call memcpy64 
+2b35 204072a2 call sha 
+2b36 6fe1487e fetch 2 ,mem_mesh_sha256_chunk_ptr 
+2b37 1fe0fe40 pincrease 64 
+2b38 67e1487e store 2 ,mem_mesh_sha256_chunk_ptr 
+2b39 6fe0c87b fetch 1 ,mem_mesh_sha256_chunk_count 
+2b3a 1fe0ffff pincrease -1 
+2b3b 67e0c87b store 1 ,mem_mesh_sha256_chunk_count 
+2b3c 243a2b31 nbranch ali_mesh_encrypt_base_function_sha256_calc_loop ,blank 
+2b3d 204072de call sha_result 
+2b3e da200900 arg memresult ,rega 
+2b3f df200020 arg 0x20 ,loopcnt 
+2b40 20407d37 call inverse_data 
+2b41 da400011 arg mesh_encrypt_sha256_function_result ,regb 
+2b42 da200900 arg memresult ,rega 
+2b43 df200020 arg 0x20 ,loopcnt 
+2b44 202029d9 branch logging_tx_debug 
+
+ali_mesh_encrypt_base_function_sha256_load_data_end:
+2b45 70486600 jam 0 ,mem_mesh_sha256_load_first_data_flag 
+2b46 6fe14877 fetch 2 ,mem_mesh_sha256_data_end_addr 
+2b47 1fe20a00 copy pdata ,contw 
+2b48 d8400080 arg 0x80 ,temp 
+2b49 e0408005 istoret 1 ,contw 
+2b4a d8400abe arg mem_mesh_sha256_chunk_start ,temp 
+2b4b 98467e00 isub temp ,pdata 
+2b4c 67e44867 store 8 ,mem_mesh_sha256_data_len_byte 
+2b4d 1fe98400 lshift3 pdata ,temp 
+2b4e 604c486f storet 8 ,mem_mesh_sha256_data_len_bit 
+2b4f 1ff1a600 rshift4 pdata ,regc 
+2b50 1a6b2600 rshift2 regc ,regc 
+2b51 1fe17e3f and pdata ,0x3f ,pdata 
+2b52 1fe67c37 sub pdata ,55 ,null 
+2b53 24412b5e ncall ali_mesh_encrypt_base_function_sha256_add_chunk ,positive 
+2b54 1a60fe01 add regc ,1 ,pdata 
+2b55 67e0c87b store 1 ,mem_mesh_sha256_chunk_count 
+2b56 1fefa240 mul32 pdata ,64 ,rega 
+2b57 1ff22600 lshift4 pdata ,regc 
+2b58 1a60a7ff increase -1 ,regc 
+2b59 58000aba setarg mem_mesh_sha256_chunk_start + decreased_four 
+2b5a 9a20a200 iadd rega ,rega 
+2b5b 6fe2486f fetch 4 ,mem_mesh_sha256_data_len_bit 
+2b5c e7e20011 istore 4 ,rega 
+2b5d 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_add_chunk:
+2b5e 1a60a601 increase 1 ,regc 
+2b5f 20600000 rtn 
+
+ali_mesh_encrypt_base_function_sha256_input_data_init_inverse:
+2b60 da200abe arg mem_mesh_sha256_chunk_start ,rega 
+
+ali_mesh_encrypt_base_function_sha256_data_inverse_4byte:
+2b61 df200004 arg 4 ,loopcnt 
+2b62 20407d37 call inverse_data 
+2b63 1a20a202 increase 2 ,rega 
+2b64 1a60a7ff add regc ,-1 ,regc 
+2b65 2422ab61 nbranch ali_mesh_encrypt_base_function_sha256_data_inverse_4byte ,zero 
+2b66 20600000 rtn 
+
+ali_mesh_encrypt_base_function_hex2ascii:
+2b67 efe08006 ifetch 1 ,contr 
+2b68 1ff18400 rshift4 pdata ,temp 
+2b69 20402b70 call ali_mesh_encrypt_base_function_dialog2uchar 
+2b6a e0408005 istoret 1 ,contw 
+2b6b 1fe1040f and pdata ,0x0f ,temp 
+2b6c 20402b70 call ali_mesh_encrypt_base_function_dialog2uchar 
+2b6d e0408005 istoret 1 ,contw 
+2b6e c2002b67 loop ali_mesh_encrypt_base_function_hex2ascii 
+2b6f 20600000 rtn 
+
+ali_mesh_encrypt_base_function_dialog2uchar:
+2b70 18467c09 sub temp ,9 ,null 
+2b71 20212b74 branch ali_mesh_encrypt_base_function_dialog2uchar_num ,positive 
+2b72 18408457 add temp ,87 ,temp 
+2b73 20600000 rtn 
+
+ali_mesh_encrypt_base_function_dialog2uchar_num:
+2b74 18408430 add temp ,48 ,temp 
+2b75 20600000 rtn 
+
+ali_mesh_encrypt_base_function_aes_cmac_32byte:
+2b76 58000020 setarg 0x20 
+2b77 20202b88 branch ali_mesh_encrypt_base_function_aes_cmac 
+
+ali_mesh_encrypt_base_function_aes_cmac_16byte:
+2b78 58000010 setarg 0x10 
+2b79 20202b88 branch ali_mesh_encrypt_base_function_aes_cmac 
+
+ali_mesh_encrypt_base_function_k2_aes_cmac_t:
+2b7a 6848c880 fetcht 1 ,mem_k2_p_len 
+2b7b 18408401 increase 1 ,temp 
+2b7c 98408400 iadd temp ,temp 
+2b7d 604884a7 storet 1 ,mem_aes_cmac_data_length 
+2b7e 1a220c00 copy rega ,contr 
+2b7f 1fe27200 copy pdata ,loopcnt 
+2b80 20407d52 call memcpy_fast 
+2b81 6848c880 fetcht 1 ,mem_k2_p_len 
+2b82 18427200 copy temp ,loopcnt 
+2b83 20407d5f call memcpy 
+2b84 1a427e00 copy regb ,pdata 
+2b85 e7e08005 istore 1 ,contw 
+2b86 da2048b1 arg mem_k2_t ,rega 
+2b87 20202b8b branch ali_mesh_encrypt_base_function_aes_cmac + 3 
+
+ali_mesh_encrypt_base_function_aes_cmac:
+2b88 67e084a7 store 1 ,mem_aes_cmac_data_length 
+2b89 1fe27200 copy pdata ,loopcnt 
+2b8a 20407d52 call memcpy_fast 
+2b8b 1a220c00 copy rega ,contr 
+2b8c d8a0098e arg mem_aes_cmac_k ,contw 
+2b8d 20407d0c call memcpy16 
+2b8e da400012 arg mesh_encrypt_aes_cmac_function_input_m ,regb 
+2b8f da2004a8 arg memdat ,rega 
+2b90 6f2084a7 fetchr loopcnt ,1 ,mem_aes_cmac_data_length 
+2b91 204029d9 call logging_tx_debug 
+2b92 da400013 arg mesh_encrypt_aes_cmac_function_input_k ,regb 
+2b93 da20098e arg mem_aes_cmac_k ,rega 
+2b94 df200010 arg 16 ,loopcnt 
+2b95 204029d9 call logging_tx_debug 
+2b96 20406a86 call function_aes_cmac 
+2b97 1e020a00 copy alarm ,contw 
+2b98 20406dd1 call store_aes_result 
+2b99 da400014 arg mesh_encrypt_aes_cmac_function_result ,regb 
+2b9a 1e022200 copy alarm ,rega 
+2b9b df200010 arg 16 ,loopcnt 
+2b9c 202029d9 branch logging_tx_debug 
+
+ali_b0_block_generate:
+2b9d 68488beb fetcht 1 ,mem_ccm_type 
+2b9e 20202ba0 branch ali_block_generate 
+
+ali_a_block_generate:
+2b9f 18000401 force 0x01 ,temp 
+
+ali_block_generate:
+2ba0 18007000 force regidx_data ,regext_index 
+2ba1 6fe10bde fetch 2 ,mem_nonce_ptr 
+2ba2 1fe20c00 copy pdata ,contr 
+2ba3 efe18006 ifetch 3 ,contr 
+2ba4 1fed7e00 lshift8 pdata ,pdata 
+2ba5 9841de00 ior temp ,regext 
+2ba6 1f00f001 increase 1 ,regext_index 
+2ba7 efe20006 ifetch 4 ,contr 
+2ba8 1fe25e00 copy pdata ,regext 
+2ba9 1f00f001 increase 1 ,regext_index 
+2baa efe20006 ifetch 4 ,contr 
+2bab 1fe25e00 copy pdata ,regext 
+2bac 1f00f001 increase 1 ,regext_index 
+2bad 1a30de00 byteswap rega ,regext 
+2bae 1df05e00 lshift16 regext ,regext 
+2baf efe10006 ifetch 2 ,contr 
+2bb0 9de1de00 ior regext ,regext 
+2bb1 20600000 rtn 
+
+ali_generate_mic:
+2bb2 6fe08be0 fetch 1 ,mem_ccm_data_len 
+2bb3 1fe22200 copy pdata ,rega 
+2bb4 20402b9d call ali_b0_block_generate 
+2bb5 20406d59 call do_aes_ocb 
+2bb6 1800700c force regidx_result ,regext_index 
+2bb7 1de27e00 deposit regext 
+2bb8 1a227200 copy rega ,loopcnt 
+2bb9 68490be1 fetcht 2 ,mem_ccm_data_ptr 
+2bba 18420c00 copy temp ,contr 
+2bbb 20406da8 call padding_data 
+2bbc 20206c88 branch generate_mic_loop 
+
+ali_ccm_encrypt_64bit:
+2bbd 700beb19 jam mic_size_64bit ,mem_ccm_type 
+2bbe 20202bc1 branch ali_ccm_encrypt_function 
+
+ali_ccm_encrypt:
+2bbf 700beb09 jam mic_size_32bit ,mem_ccm_type 
+2bc0 20202bc1 branch ali_ccm_encrypt_function 
+
+ali_ccm_encrypt_function:
+2bc1 67e08be0 store 1 ,mem_ccm_data_len 
+2bc2 60490be1 storet 2 ,mem_ccm_data_ptr 
+2bc3 4779c03e bpatchx patch3e_3 ,mem_patch3e 
+2bc4 20402bb2 call ali_generate_mic 
+2bc5 18007008 force regidx_xor ,regext_index 
+2bc6 98005e00 iforce regext 
+2bc7 1800700d force regidx_result + 1 ,regext_index 
+2bc8 1de27e00 copy regext ,pdata 
+2bc9 18007009 force regidx_xor + 1 ,regext_index 
+2bca 98005e00 iforce regext 
+2bcb 18002200 force 0 ,rega 
+2bcc 18422600 copy temp ,regc 
+2bcd 20402b9f call ali_a_block_generate 
+2bce 20406d5f call do_aes_ctr 
+2bcf 20402c00 call ali_fetcht_ccm_mic 
+2bd0 604c0be3 storet 8 ,mem_ccm_mic 
+2bd1 6fe08be0 fetch 1 ,mem_ccm_data_len 
+2bd2 1fe22400 copy pdata ,regb 
+2bd3 20402c08 call ali_aes_crypt_data 
+2bd4 68488be0 fetcht 1 ,mem_ccm_data_len 
+2bd5 6fe10be1 fetch 2 ,mem_ccm_data_ptr 
+2bd6 9840a200 iadd temp ,rega 
+2bd7 684c0be3 fetcht 8 ,mem_ccm_mic 
+2bd8 e0420011 istoret 4 ,rega 
+2bd9 6fe08beb fetch 1 ,mem_ccm_type 
+2bda 1fe67e09 sub pdata ,mic_size_32bit ,pdata 
+2bdb 207a0000 rtn blank 
+2bdc e0440011 istoret 8 ,rega 
+2bdd 20600000 rtn 
+
+ali_ccm_decrypt_64bit:
+2bde 700beb19 jam mic_size_64bit ,mem_ccm_type 
+2bdf 20202be2 branch ali_ccm_decrypt_function 
+
+ali_ccm_decrypt:
+2be0 700beb09 jam mic_size_32bit ,mem_ccm_type 
+2be1 20202be2 branch ali_ccm_decrypt_function 
+
+ali_ccm_decrypt_function:
+2be2 67e08be0 store 1 ,mem_ccm_data_len 
+2be3 60490be1 storet 2 ,mem_ccm_data_ptr 
+2be4 18422600 copy temp ,regc 
+2be5 1fe22400 copy pdata ,regb 
+2be6 9a608c00 iadd regc ,contr 
+2be7 477a403e bpatchx patch3e_4 ,mem_patch3e 
+2be8 efe40006 ifetch 8 ,contr 
+2be9 18007008 force regidx_xor ,regext_index 
+2bea 98005e00 iforce regext 
+2beb 18007009 force regidx_xor + 1 ,regext_index 
+2bec 1fef7e00 rshift32 pdata ,pdata 
+2bed 98005e00 iforce regext 
+2bee 18002200 force 0 ,rega 
+2bef 20402b9f call ali_a_block_generate 
+2bf0 20406d5f call do_aes_ctr 
+2bf1 20402c00 call ali_fetcht_ccm_mic 
+2bf2 604c0be3 storet 8 ,mem_ccm_mic 
+2bf3 20402c08 call ali_aes_crypt_data 
+2bf4 20402bb2 call ali_generate_mic 
+2bf5 20402c00 call ali_fetcht_ccm_mic 
+2bf6 6fe08beb fetch 1 ,mem_ccm_type 
+2bf7 c00cabfd beq mic_size_64bit ,ali_ccm_decrypt_function_check_mic64 
+2bf8 604a0be7 storet 4 ,mem_ccm_mic + 4 
+2bf9 6fe20be3 fetch 4 ,mem_ccm_mic 
+2bfa 684a0be7 fetcht 4 ,mem_ccm_mic + 4 
+2bfb 98467e00 isub temp ,pdata 
+2bfc 20600000 rtn 
+
+ali_ccm_decrypt_function_check_mic64:
+2bfd 6fe40be3 fetch 8 ,mem_ccm_mic 
+2bfe 98467e00 isub temp ,pdata 
+2bff 20600000 rtn 
+
+ali_fetcht_ccm_mic:
+2c00 1800700c force regidx_result ,regext_index 
+2c01 1de27e00 deposit regext 
+2c02 1800700d force regidx_result + 1 ,regext_index 
+2c03 1de20400 copy regext ,temp 
+2c04 18500400 lshift16 temp ,temp 
+2c05 18500400 lshift16 temp ,temp 
+2c06 98418400 ior temp ,temp 
+2c07 20600000 rtn 
+
+ali_aes_crypt_data:
+2c08 1a20a201 increase 1 ,rega 
+2c09 20402b9f call ali_a_block_generate 
+2c0a 1a620c00 copy regc ,contr 
+2c0b 20406dbc call aes_load_xor 
+2c0c 20406d5f call do_aes_ctr 
+2c0d 20406dd8 call store_enc_data 
+2c0e 1a60a610 increase 16 ,regc 
+2c0f 1a40a5f0 increase -16 ,regb 
+2c10 20212c08 branch ali_aes_crypt_data ,positive 
+2c11 20600000 rtn 
+
+mesh_send_unprovisioned_beacons:
+2c12 70493301 jam unprovisioned_beacon_status ,mem_mesh_provisioned_flag 
+2c13 70493400 jam 0x00 ,mem_mesh_provisioning_state_flag 
+2c14 7047cf01 jam 1 ,mem_mesh_advertising_unprovisioned_device_beacon_switch 
+2c15 20600000 rtn 
+
+ali_mesh_config_device_uuid_by_three_tuple:
+2c16 580001a8 setarg company_identifiers_alibaba 
+2c17 67e10bec store 2 ,mem_mesh_device_uuid 
+2c18 6fe0c935 fetch 1 ,mem_mesh_device_pid 
+2c19 e7e08005 istore 1 ,contw 
+2c1a 6fe2499b fetch 4 ,mem_mesh_three_tuple_productid 
+2c1b 20407d4c call inverse_data_4byte 
+2c1c e7e20005 istore 4 ,contw 
+2c1d 6fe3437a fetch 6 ,mem_le_lap 
+2c1e e7e30005 istore 6 ,contw 
+2c1f 6fe1c936 fetch 3 ,mem_mesh_uuid_featureflag 
+2c20 e7e18005 istore 3 ,contw 
+2c21 20600000 rtn 
+
+ali_mesh_send_unprovisioned_beacons_tmall:
+2c22 20402c24 call ali_mesh_init_adv_data_tmall_unprovisioned_beacons_package 
+2c23 20202943 branch mesh_le_send_adv 
+
+ali_mesh_init_adv_data_tmall_unprovisioned_beacons_package:
+2c24 7047ae15 jam 0x15 ,mem_mesh_adv_data_len 
+2c25 58000014 setarg 0x14 
+2c26 67e0c7af store 1 ,mem_mesh_adv_data 
+2c27 5800002b setarg gap_adtype_mesh_beacon 
+2c28 e7e08005 istore 1 ,contw 
+2c29 58000000 setarg unprovisioned_device_beacon 
+2c2a e7e08005 istore 1 ,contw 
+
+ali_mesh_advertising_send_unprovisioned_beacons_store_device_uuid:
+2c2b d8c00bec arg mem_mesh_device_uuid ,contr 
+2c2c 20407d0c call memcpy16 
+2c2d 6fe14939 fetch 2 ,mem_mesh_oob_information 
+2c2e e7e10005 istore 2 ,contw 
+2c2f 20600000 rtn 
+
+ali_mesh_advertising_send_unprovisioned_beacons_gatt:
+2c30 20402c32 call ali_mesh_init_adv_data_gatt_unprovisioned_beacons_package 
+2c31 20202943 branch mesh_le_send_adv 
+
+ali_mesh_init_adv_data_gatt_unprovisioned_beacons_package:
+2c32 7047ae1d jam 0x1d ,mem_mesh_adv_data_len 
+2c33 204028fe call ali_mesh_advertising_add_adtype_flags 
+2c34 20402906 call ali_mesh_advertising_add_adtype_16bit_complete 
+2c35 20402c37 call ali_mesh_advertising_add_adtype_service_data 
+2c36 20202c2b branch ali_mesh_advertising_send_unprovisioned_beacons_store_device_uuid 
+
+ali_mesh_advertising_add_adtype_service_data:
+2c37 58000015 setarg 0x15 
+2c38 e7e08005 istore 1 ,contw 
+2c39 58000016 setarg gap_adtype_service_data 
+2c3a e7e08005 istore 1 ,contw 
+2c3b e0410005 istoret 2 ,contw 
+2c3c 20600000 rtn 
+
+ali_mesh_receive_adtype_manufacturer_specific:
+2c3d 1840f3ff add temp ,-1 ,loopcnt 
+2c3e 20402d01 call ali_mesh_receive_provisioning_package_check_header 
+2c3f 24740000 nrtn user 
+2c40 efe08006 ifetch 1 ,contr 
+2c41 c0002c45 beq provisioning_random ,ali_mesh_advertising_receive_privisioning_random 
+2c42 c0012c60 beq provisioning_data ,ali_mesh_advertising_receive_privisioning_data 
+2c43 c0032c7f beq provisioning_ios_data ,ali_mesh_advertising_receive_privisioning_ios_data 
+2c44 20600000 rtn 
+
+ali_mesh_advertising_receive_privisioning_random:
+2c45 20402c52 call ali_mesh_advertising_receive_privisioning_random_check_states 
+2c46 24740000 nrtn user 
+
+ali_mesh_advertising_calc_encrypt_random_data:
+2c47 20402a7d call ali_mesh_encrypt_calc_random_data 
+2c48 20402c4a call ali_mesh_advertising_send_provisioning_confirmation 
+2c49 20202ca9 branch loggint_tx_info_send_confirmation_packet 
+
+ali_mesh_advertising_send_provisioning_confirmation:
+2c4a d8400012 arg provisioning_packet_confirmation_mac + provisioning_packet_confirmation_device ,temp 
+2c4b 20402c81 call ali_mesh_advertising_send_packet_common 
+2c4c 58000001 setarg provisioning_confirmation 
+2c4d e7e08005 istore 1 ,contw 
+2c4e 6fe149a3 fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2c4f e7e10005 istore 2 ,contw 
+2c50 d8c04804 arg mem_mesh_confirmationdevice ,contr 
+2c51 20207d0c branch memcpy16 
+
+ali_mesh_advertising_receive_privisioning_random_check_states:
+2c52 20407e56 call disable_user 
+2c53 e8410006 ifetcht 2 ,contr 
+2c54 d8a04804 arg mem_mesh_provisioning_random_a ,contw 
+2c55 20407d0c call memcpy16 
+2c56 6fe149a3 fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2c57 98467c00 isub temp ,null 
+2c58 24628000 nrtn zero 
+2c59 6fe0c934 fetch 1 ,mem_mesh_provisioning_state_flag 
+2c5a c3808000 rtnbit1 receive_provisioning_random 
+2c5b 79207e01 set1 receive_provisioning_random ,pdata 
+2c5c 67e0c934 store 1 ,mem_mesh_provisioning_state_flag 
+2c5d 70493302 jam pairing_status ,mem_mesh_provisioned_flag 
+2c5e 20402ca5 call loggint_tx_info_receive_random_packet 
+2c5f 20207e54 branch enable_user 
+
+ali_mesh_advertising_receive_privisioning_data:
+2c60 18c22200 copy contr ,rega 
+2c61 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2c62 c1000000 rtneq paired_status 
+2c63 6fe0c934 fetch 1 ,mem_mesh_provisioning_state_flag 
+2c64 c4008000 rtnbit0 receive_provisioning_random 
+2c65 c3810000 rtnbit1 receive_provisioning_data 
+2c66 1a220c00 copy rega ,contr 
+2c67 df200016 arg 0x16 ,loopcnt 
+2c68 d8a0493b arg mem_mesh_encrypt_provisioning_data ,contw 
+2c69 20407d5f call memcpy 
+2c6a 20402aba call ali_mesh_encrypt_calc_provisioning_data 
+2c6b 6849493b fetcht 2 ,mem_mesh_provisioning_data_mac_addr 
+2c6c 6fe149a3 fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2c6d 98467c00 isub temp ,null 
+2c6e 24628000 nrtn zero 
+
+ali_mesh_resolve_privisioning_data_package:
+2c6f 20402cad call loggint_tx_info_receive_data_packet 
+2c70 6fe0c934 fetch 1 ,mem_mesh_provisioning_state_flag 
+2c71 79207e02 set1 receive_provisioning_data ,pdata 
+2c72 67e0c934 store 1 ,mem_mesh_provisioning_state_flag 
+2c73 20402acd call ali_mesh_encrypt_calc_network_key_by_k2 
+2c74 6fe0c94e fetch 1 ,mem_mesh_last_iv_index_byte 
+2c75 67e0ca16 store 1 ,mem_mesh_iv_index + 3 
+2c76 20402c78 call ali_mesh_advertising_send_provisioning_complete 
+2c77 20202cb1 branch loggint_tx_info_send_complete_packet 
+
+ali_mesh_advertising_send_provisioning_complete:
+2c78 d8400006 arg provisioning_packet_complete_mac ,temp 
+2c79 20402c81 call ali_mesh_advertising_send_packet_common 
+2c7a 58000003 setarg provisioning_complete 
+2c7b e7e08005 istore 1 ,contw 
+2c7c 6fe3499f fetch 6 ,mem_mesh_three_tuple_mac 
+2c7d e7e30005 istore 6 ,contw 
+2c7e 20600000 rtn 
+
+ali_mesh_advertising_receive_privisioning_ios_data:
+2c7f da400012 arg max_length_privisioning_control_msg_android ,regb 
+2c80 20202ceb branch ali_mesh_resolve_app_control_msg_package 
+
+ali_mesh_advertising_send_packet_common:
+2c81 477ac03e bpatchx patch3e_5 ,mem_patch3e 
+2c82 20402c9f call ali_mesh_advertising_reset_adv_timer 
+2c83 58008fff setarg 0x8fff 
+2c84 67e14955 store 2 ,mem_mesh_send_packet_timeout 
+2c85 20402a09 call ali_mesh_control_ble_advertising_on_advertising 
+2c86 1840fe09 add temp ,provisioning_packet_length_ad_type_company_id_vid_provisioning_type + provisioning_packet_length_flags ,pdata 
+2c87 67e0c7ae store 1 ,mem_mesh_adv_data_len 
+2c88 204028fe call ali_mesh_advertising_add_adtype_flags 
+2c89 1840fe05 add temp ,provisioning_packet_ad_type_company_id_vid_provisioning_type ,pdata 
+2c8a e7e08005 istore 1 ,contw 
+2c8b 580000ff setarg gap_adtype_manufacturer_specific 
+2c8c e7e08005 istore 1 ,contw 
+2c8d 580001a8 setarg company_identifiers_alibaba 
+2c8e 1ff0fe00 byteswap pdata ,pdata 
+2c8f e7e10005 istore 2 ,contw 
+2c90 6fe08bfc fetch 1 ,mem_mesh_receive_vid 
+2c91 e7e08005 istore 1 ,contw 
+2c92 20600000 rtn 
+
+ali_mesh_advertising_timer:
+2c93 6fe24951 fetch 4 ,mem_mesh_adv_last_time 
+2c94 243a2c96 nbranch ali_mesh_advertising_check_adv_timer ,blank 
+2c95 20202c9f branch ali_mesh_advertising_reset_adv_timer 
+
+ali_mesh_advertising_check_adv_timer:
+2c96 1c427e00 deposit clkn_bt 
+2c97 684a4951 fetcht 4 ,mem_mesh_adv_last_time 
+2c98 98460400 isub temp ,temp 
+2c99 6fe14955 fetch 2 ,mem_mesh_send_packet_timeout 
+2c9a 98467c00 isub temp ,null 
+2c9b 20610000 rtn positive 
+
+ali_mesh_advertising_adv_timer_timeout:
+2c9c 20402a0b call ali_mesh_control_ble_advertising_off_advertising 
+2c9d 6fe149bb fetch 2 ,mem_mesh_cb_pairing_fail 
+2c9e 20207e05 branch callback_func 
+
+ali_mesh_advertising_reset_adv_timer:
+2c9f 1c427e00 deposit clkn_bt 
+2ca0 67e24951 store 4 ,mem_mesh_adv_last_time 
+2ca1 20600000 rtn 
+
+logging_tx_debug_receive_provisioning_packet:
+2ca2 18c0a3fd add contr ,-3 ,rega 
+2ca3 da400001 arg mesh_receive_provisioning_packet ,regb 
+2ca4 202029d9 branch logging_tx_debug 
+
+loggint_tx_info_receive_random_packet:
+2ca5 df200001 arg 1 ,loopcnt 
+2ca6 da400002 arg mesh_receive_provisioning_random_packet ,regb 
+2ca7 da204934 arg mem_mesh_provisioning_state_flag ,rega 
+2ca8 202029db branch logging_tx_info 
+
+loggint_tx_info_send_confirmation_packet:
+2ca9 6f20c7ae fetchr loopcnt ,1 ,mem_mesh_adv_data_len 
+2caa da400003 arg mesh_send_provisioning_confirmation_packet ,regb 
+2cab da2047af arg mem_mesh_adv_data ,rega 
+2cac 202029db branch logging_tx_info 
+
+loggint_tx_info_receive_data_packet:
+2cad df200001 arg 1 ,loopcnt 
+2cae da400004 arg mesh_receive_provisioning_data_packet ,regb 
+2caf da204934 arg mem_mesh_provisioning_state_flag ,rega 
+2cb0 202029db branch logging_tx_info 
+
+loggint_tx_info_send_complete_packet:
+2cb1 6f20c7ae fetchr loopcnt ,1 ,mem_mesh_adv_data_len 
+2cb2 da400005 arg mesh_send_provisioning_complete_packet ,regb 
+2cb3 da2047af arg mem_mesh_adv_data ,rega 
+2cb4 202029db branch logging_tx_info 
+
+ali_mesh_receive_adtype_128bit_uuid_complete:
+2cb5 20402cf9 call ali_mesh_receive_adtype_128bit_uuid_complete_store_uuid 
+2cb6 24740000 nrtn user 
+2cb7 6fe08bef fetch 1 ,mem_mesh_receive_service_uuid_ios_data_provisioning_type 
+2cb8 c0032ce9 beq provisioning_ios_data ,ali_mesh_ios_gatt_packet_parse_provisioning_app_control 
+
+ali_mesh_ios_gatt_packet_pairing_type:
+2cb9 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2cba c1000000 rtneq paired_status 
+2cbb c1018000 rtneq silence_beacon_status 
+2cbc 6fe10bf0 fetch 2 ,mem_mesh_receive_service_uuid_mac 
+2cbd 684949a3 fetcht 2 ,mem_mesh_three_tuple_mac + 4 
+2cbe 98467c00 isub temp ,null 
+2cbf 24628000 nrtn zero 
+2cc0 da200bf2 arg mem_mesh_receive_service_uuid_msg_id ,rega 
+2cc1 da400007 arg max_length_privisioning_pairing_msg_ios ,regb 
+2cc2 20402d0b call ali_mesh_app_control_package_check_integrity 
+2cc3 20740000 rtn user 
+2cc4 477b403e bpatchx patch3e_6 ,mem_patch3e 
+2cc5 6fe08bef fetch 1 ,mem_mesh_receive_service_uuid_provisioning_type 
+2cc6 c0002cca beq provisioning_random ,ali_mesh_ios_gatt_packet_parse_provisioning_random 
+2cc7 c0012cce beq provisioning_data ,ali_mesh_ios_gatt_packet_parse_provisioning_data 
+2cc8 c0022cdd beq provisioning_config ,ali_mesh_ios_gatt_packet_parse_provisioning_config 
+2cc9 20600000 rtn 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_random:
+2cca 6fe149a3 fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2ccb 67e10a78 store 2 ,mem_mesh_gatt_package_receive_mac 
+2ccc d8c00a78 arg mem_mesh_gatt_package_receive_mac ,contr 
+2ccd 20202c45 branch ali_mesh_advertising_receive_privisioning_random 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_data:
+2cce 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2ccf c1000000 rtneq paired_status 
+2cd0 6fe0c934 fetch 1 ,mem_mesh_provisioning_state_flag 
+2cd1 c4008000 rtnbit0 receive_provisioning_random 
+2cd2 c3810000 rtnbit1 receive_provisioning_data 
+2cd3 d8c00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contr 
+2cd4 df200014 arg 0x14 ,loopcnt 
+2cd5 d8a0493d arg mem_mesh_keyfresh_and_update_flag ,contw 
+2cd6 20407d5f call memcpy 
+2cd7 20402ac6 call ali_mesh_encrypt_calc_provisioning_data_calc_sessionkey 
+2cd8 da20493d arg mem_mesh_keyfresh_and_update_flag ,rega 
+2cd9 da400900 arg memresult ,regb 
+2cda df20000a arg 0x0a ,loopcnt 
+2cdb 20402abe call ali_mesh_encrypt_calc_provisioning_data_xor_prov_data_loop 
+2cdc 20202c6f branch ali_mesh_resolve_privisioning_data_package 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_config:
+2cdd 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2cde c1808000 rtnne unprovisioned_beacon_status 
+2cdf 70493302 jam pairing_status ,mem_mesh_provisioned_flag 
+
+ali_mesh_ios_gatt_packet_send_provisioning_config_ack:
+2ce0 d8400003 arg provisioning_config_ack_mac + provisioning_config_ack_field ,temp 
+2ce1 20402c81 call ali_mesh_advertising_send_packet_common 
+2ce2 58000005 setarg provisioning_config_ack 
+2ce3 e7e08005 istore 1 ,contw 
+2ce4 6fe149a3 fetch 2 ,mem_mesh_three_tuple_mac + 4 
+2ce5 e7e10005 istore 2 ,contw 
+2ce6 58000001 setarg provisioning_config_ack_note 
+2ce7 e7e08005 istore 1 ,contw 
+2ce8 20600000 rtn 
+
+ali_mesh_ios_gatt_packet_parse_provisioning_app_control:
+2ce9 d8c00bf0 arg mem_mesh_receive_service_uuid_ios_data_nid ,contr 
+2cea da400008 arg max_length_privisioning_control_msg_ios ,regb 
+
+ali_mesh_resolve_app_control_msg_package:
+2ceb 477bc03e bpatchx patch3e_7 ,mem_patch3e 
+2cec efe08006 ifetch 1 ,contr 
+2ced 18c22200 copy contr ,rega 
+2cee 6848c8d1 fetcht 1 ,mem_k2_nid 
+2cef 98467c00 isub temp ,null 
+2cf0 24628000 nrtn zero 
+2cf1 20402c9f call ali_mesh_advertising_reset_adv_timer 
+2cf2 20402d0b call ali_mesh_app_control_package_check_integrity 
+2cf3 20740000 rtn user 
+2cf4 700c3a01 jam mesh_message_app ,mem_mesh_network_packet_type 
+2cf5 68488a79 fetcht 1 ,mem_mesh_gatt_package_receive_msg_total_length 
+2cf6 18408401 increase 1 ,temp 
+2cf7 d8c00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contr 
+2cf8 20202f07 branch ali_mesh_network_layer_recevice_network_pdu 
+
+ali_mesh_receive_adtype_128bit_uuid_complete_store_uuid:
+2cf9 d8a00bec arg mem_mesh_receive_service_uuid_company_id ,contw 
+2cfa 20407d0c call memcpy16 
+2cfb da200bec arg mem_mesh_receive_service_uuid_company_id ,rega 
+2cfc df200010 arg 16 ,loopcnt 
+2cfd 20407d37 call inverse_data 
+2cfe df200010 arg 16 ,loopcnt 
+2cff d8c00bec arg mem_mesh_receive_service_uuid_company_id ,contr 
+2d00 20202d01 branch ali_mesh_receive_provisioning_package_check_header 
+
+ali_mesh_receive_provisioning_package_check_header:
+2d01 20407e56 call disable_user 
+2d02 e8410006 ifetcht 2 ,contr 
+2d03 580001a8 setarg company_identifiers_alibaba 
+2d04 1ff0fe00 byteswap pdata ,pdata 
+2d05 98467c00 isub temp ,null 
+2d06 24628000 nrtn zero 
+2d07 efe08006 ifetch 1 ,contr 
+2d08 67e08bfc store 1 ,mem_mesh_receive_vid 
+2d09 20407e54 call enable_user 
+2d0a 20202ca2 branch logging_tx_debug_receive_provisioning_packet 
+
+ali_mesh_app_control_package_check_integrity:
+2d0b 477c403f bpatchx patch3f_0 ,mem_patch3f 
+2d0c 20402d44 call ali_mesh_app_control_package_check_msgid_legal 
+2d0d 20202d0e branch ali_mesh_app_control_package_check_rev_complete 
+
+ali_mesh_app_control_package_check_rev_complete:
+2d0e 1a208c01 add rega ,gatt_package_package_num ,contr 
+2d0f e8408006 ifetcht 1 ,contr 
+2d10 1851fe00 rshift4 temp ,pdata 
+2d11 c000ad3e beq 1 ,ali_mesh_gatt_package_check_integrity_unsegment 
+
+ali_mesh_gatt_package_check_integrity_segment:
+2d12 1fe67c04 sub pdata ,max_gatt_package_num ,null 
+2d13 24217e54 nbranch enable_user ,positive 
+2d14 1fe27200 copy pdata ,loopcnt 
+2d15 20402d34 call ali_mesh_gatt_package_check_integrity_segment_expect_package_num 
+2d16 18410e0f and temp ,0x0f ,queue 
+2d17 98e67c00 isub queue ,null 
+2d18 2042ad2d call ali_mesh_gatt_package_check_integrity_segment_calc_total_length ,zero 
+2d19 18e08fff increase -1 ,queue 
+2d1a 6fe08a78 fetch 1 ,mem_mesh_gatt_package_receive_msg_num 
+2d1b afefffff qisolate1 pdata 
+2d1c 2020fe54 branch enable_user ,true 
+2d1d f9207e00 qset1 pdata 
+2d1e 67e08a78 store 1 ,mem_mesh_gatt_package_receive_msg_num 
+2d1f 1a208c02 add rega ,gatt_package_length ,contr 
+2d20 efe08006 ifetch 1 ,contr 
+2d21 1fe27200 copy pdata ,loopcnt 
+2d22 1a427e00 copy regb ,pdata 
+2d23 98effe00 imul32 queue ,pdata 
+2d24 d8a00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contw 
+2d25 98a08a00 iadd contw ,contw 
+2d26 20407d52 call memcpy_fast 
+2d27 6fe08a78 fetch 1 ,mem_mesh_gatt_package_receive_msg_num 
+2d28 9a667c00 isub regc ,null 
+2d29 2442fe54 ncall enable_user ,zero 
+2d2a 2422ad39 nbranch ali_mesh_gatt_package_store_receive_msg_buffer ,zero 
+
+ali_mesh_gatt_package_check_integrity_segment_complete:
+2d2b 20402d65 call ali_mesh_gatt_package_clear_receive_msg_buffer 
+2d2c 20207e56 branch disable_user 
+
+ali_mesh_gatt_package_check_integrity_segment_calc_total_length:
+2d2d 1fe0ffff pincrease -1 
+2d2e 9a4ffe00 imul32 regb ,pdata 
+2d2f 1a208c02 add rega ,gatt_package_length ,contr 
+2d30 e8408006 ifetcht 1 ,contr 
+2d31 9840fe00 iadd temp ,pdata 
+2d32 67e08a79 store 1 ,mem_mesh_gatt_package_receive_msg_total_length 
+2d33 20600000 rtn 
+
+ali_mesh_gatt_package_check_integrity_segment_expect_package_num:
+2d34 da600000 arg 0 ,regc 
+
+ali_mesh_gatt_package_check_integrity_segment_expect_package_num_loop:
+2d35 1f208fff add loopcnt ,-1 ,queue 
+2d36 f9202600 qset1 regc 
+2d37 c2002d35 loop ali_mesh_gatt_package_check_integrity_segment_expect_package_num_loop 
+2d38 20600000 rtn 
+
+ali_mesh_gatt_package_store_receive_msg_buffer:
+2d39 6fe10a74 fetch 2 ,mem_mesh_gatt_package_receive_msg_buffer_ptr 
+2d3a 1fe20a00 copy pdata ,contw 
+2d3b d8c00a76 arg mem_mesh_gatt_package_receive_msg_buffer_temp ,contr 
+2d3c df200021 arg 33 ,loopcnt 
+2d3d 20207d52 branch memcpy_fast 
+
+ali_mesh_gatt_package_check_integrity_unsegment:
+2d3e efe08006 ifetch 1 ,contr 
+2d3f 1fe27200 copy pdata ,loopcnt 
+2d40 67e08a79 store 1 ,mem_mesh_gatt_package_receive_msg_total_length 
+2d41 d8a00a7a arg mem_mesh_gatt_package_receive_msg_payload ,contw 
+2d42 20407d5f call memcpy 
+2d43 20207e56 branch disable_user 
+
+ali_mesh_app_control_package_check_msgid_legal:
+2d44 70495832 jam gatt_receive_timeout ,mem_mesh_gatt_receive_msg_timer 
+2d45 20402d53 call ali_mesh_gatt_package_get_msgid 
+2d46 68494959 fetcht 2 ,mem_mesh_gatt_packet_receive_msg_buffer1 
+2d47 98467c00 isub temp ,null 
+2d48 2022ad57 branch ali_mesh_gatt_package_load_receive_msg_buffer1 ,zero 
+2d49 18467c00 sub temp ,0 ,null 
+2d4a 2022ad57 branch ali_mesh_gatt_package_load_receive_msg_buffer1 ,zero 
+2d4b 6849497a fetcht 2 ,mem_mesh_gatt_packet_receive_msg_buffer2 
+2d4c 98467c00 isub temp ,null 
+2d4d 2022ad5a branch ali_mesh_gatt_package_load_receive_msg_buffer2 ,zero 
+2d4e 18467c00 sub temp ,0 ,null 
+2d4f 2022ad5a branch ali_mesh_gatt_package_load_receive_msg_buffer2 ,zero 
+2d50 20402d65 call ali_mesh_gatt_package_clear_receive_msg_buffer 
+2d51 20402d53 call ali_mesh_gatt_package_get_msgid 
+2d52 20202d57 branch ali_mesh_gatt_package_load_receive_msg_buffer1 
+
+ali_mesh_gatt_package_get_msgid:
+2d53 efe08011 ifetch 1 ,rega 
+2d54 207a0000 rtn blank 
+2d55 79207e08 set1 8 ,pdata 
+2d56 20600000 rtn 
+
+ali_mesh_gatt_package_load_receive_msg_buffer1:
+2d57 67e14959 store 2 ,mem_mesh_gatt_packet_receive_msg_buffer1 
+2d58 58004959 setarg mem_mesh_gatt_packet_receive_msg_buffer1 
+2d59 20202d5d branch ali_mesh_gatt_package_load_receive_msg_buffer 
+
+ali_mesh_gatt_package_load_receive_msg_buffer2:
+2d5a 67e1497a store 2 ,mem_mesh_gatt_packet_receive_msg_buffer2 
+2d5b 5800497a setarg mem_mesh_gatt_packet_receive_msg_buffer2 
+2d5c 20202d5d branch ali_mesh_gatt_package_load_receive_msg_buffer 
+
+ali_mesh_gatt_package_load_receive_msg_buffer:
+2d5d 67e10a74 store 2 ,mem_mesh_gatt_package_receive_msg_buffer_ptr 
+2d5e 1fe20c00 copy pdata ,contr 
+2d5f d8a00a76 arg mem_mesh_gatt_package_receive_msg_buffer_temp ,contw 
+2d60 df200021 arg gatt_receive_msg_buffer_size ,loopcnt 
+2d61 20207d52 branch memcpy_fast 
+
+ali_mesh_gatt_package_receive_timer:
+2d62 da604958 arg mem_mesh_gatt_receive_msg_timer ,regc 
+2d63 da402d65 arg ali_mesh_gatt_package_clear_receive_msg_buffer ,regb 
+2d64 2020318a branch timer_single_step 
+
+ali_mesh_gatt_package_clear_receive_msg_buffer:
+2d65 d8a04959 arg mem_mesh_gatt_packet_receive_msg_buffer1 ,contw 
+2d66 df200042 arg gatt_receive_msg_buffer_size + gatt_receive_msg_buffer_size ,loopcnt 
+2d67 20207d26 branch clear_mem 
+
+ali_mesh_access_layer_config_or_health_message_opcode:
+2d68 6fe089f8 fetch 1 ,mem_mesh_configuration_health_message_opcode 
+2d69 c024ad6d beq mesh_message_opcode_config_node_reset_no_head ,ali_mesh_access_layer_config_or_health_message_opcode_node_reset 
+2d6a c00dad76 beq mesh_message_opcode_config_model_subscription_add_no_head ,ali_mesh_message_config_modle_subscription_add 
+2d6b c00e2d7d beq mesh_message_opcode_config_model_subscription_delete_no_head ,ali_mesh_message_config_modle_subscription_delete 
+2d6c 20600000 rtn 
+
+ali_mesh_access_layer_config_or_health_message_opcode_node_reset:
+2d6d 20402d70 call ali_mesh_access_layer_send_config_node_reset_status 
+2d6e 6fe149d1 fetch 2 ,mem_mesh_cb_receive_node_reset 
+2d6f 20207e05 branch callback_func 
+
+ali_mesh_access_layer_send_config_node_reset_status:
+2d70 58000080 setarg mesh_configuration_and_health_message_opcode_header 
+2d71 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2d72 5800004a setarg mesh_message_opcode_config_node_reset_status_no_head 
+2d73 e7e08005 istore 1 ,contw 
+2d74 700a0f02 jam 2 ,mem_mesh_access_layer_payload_len 
+2d75 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message 
+
+ali_mesh_message_config_modle_subscription_add:
+2d76 20402d9b call ali_mesh_message_config_modle_subscription_status 
+2d77 6fe149d9 fetch 2 ,mem_mesh_core_feature 
+2d78 c3810000 rtnbit1 mesh_feature_disable_subscription 
+2d79 20402da5 call ali_mesh_message_config_modle_subscription_check_element 
+2d7a 20402dae call ali_mesh_message_config_modle_subscription_add_value_address 
+2d7b 6fe149d5 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2d7c 20207e05 branch callback_func 
+
+ali_mesh_message_config_modle_subscription_delete:
+2d7d 20402d9b call ali_mesh_message_config_modle_subscription_status 
+2d7e 6fe149d9 fetch 2 ,mem_mesh_core_feature 
+2d7f c3810000 rtnbit1 mesh_feature_disable_subscription 
+2d80 20402da5 call ali_mesh_message_config_modle_subscription_check_element 
+2d81 684909fb fetcht 2 ,mem_mesh_subscription_value_address 
+2d82 184cfe00 rshift8 temp ,pdata 
+2d83 1ff1fe00 rshift4 pdata ,pdata 
+2d84 c0062d8b beq 0x0c ,ali_mesh_message_config_modle_subscription_delete_group_addr 
+2d85 20402d90 call ali_mesh_message_config_modle_subscription_check_value_address 
+2d86 24740000 nrtn user 
+2d87 58000000 setarg 0 
+2d88 e7e10011 istore 2 ,rega 
+2d89 6fe149d5 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2d8a 20207e05 branch callback_func 
+
+ali_mesh_message_config_modle_subscription_delete_group_addr:
+2d8b 5fffffff setarg -1 
+2d8c e7e40011 istore subscription_max_count ,rega 
+2d8d e7e40005 istore subscription_max_count ,contw 
+2d8e 6fe149d5 fetch 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2d8f 20207e05 branch callback_func 
+
+ali_mesh_message_config_modle_subscription_check_value_address:
+2d90 df200008 arg subscription_max_count ,loopcnt 
+
+ali_mesh_message_config_modle_subscription_check_value_address_loop:
+2d91 efe10011 ifetch 2 ,rega 
+2d92 da40ffff arg 0xffff ,regb 
+2d93 9a467c00 isub regb ,null 
+2d94 2022fe54 branch enable_user ,zero 
+2d95 98467c00 isub temp ,null 
+2d96 2022fe54 branch enable_user ,zero 
+
+ali_mesh_message_config_modle_subscription_check_value_address_loop_empty:
+2d97 1a20a202 increase 2 ,rega 
+2d98 c2002d91 loop ali_mesh_message_config_modle_subscription_check_value_address_loop 
+2d99 20407e56 call disable_user 
+2d9a 20600000 rtn 
+
+ali_mesh_message_config_modle_subscription_status:
+2d9b 58000080 setarg mesh_configuration_and_health_message_opcode_header 
+2d9c 67e08a10 store 1 ,mem_mesh_access_layer_payload 
+2d9d 5800001f setarg mesh_message_opcode_config_model_subscription_status_no_head 
+2d9e e7e08005 istore 1 ,contw 
+2d9f 58000000 setarg mesh_success 
+2da0 e7e08005 istore 1 ,contw 
+2da1 6fe309f9 fetch 6 ,mem_mesh_subscription_element_address 
+2da2 e7e30005 istore 6 ,contw 
+2da3 700a0f09 jam 9 ,mem_mesh_access_layer_payload_len 
+2da4 20202ff2 branch ali_mesh_upper_transport_layer_send_access_message_without_cleat_tx_buffer 
+
+ali_mesh_message_config_modle_subscription_check_element:
+2da5 20402de1 call mesh_get_element_info_config 
+2da6 1a20a206 add rega ,element_device_subscription_label ,rega 
+2da7 6fe109f9 fetch 2 ,mem_mesh_subscription_element_address 
+2da8 6849494f fetcht 2 ,mem_mesh_unicast_address 
+2da9 18508400 byteswap temp ,temp 
+2daa 98467e00 isub temp ,pdata 
+2dab 9a4ffe00 imul32 regb ,pdata 
+2dac 9a20a200 iadd rega ,rega 
+2dad 20600000 rtn 
+
+ali_mesh_message_config_modle_subscription_add_value_address:
+2dae 684909fb fetcht 2 ,mem_mesh_subscription_value_address 
+2daf df200008 arg subscription_max_count ,loopcnt 
+
+ali_mesh_message_config_modle_subscription_add_value_address_loop:
+2db0 efe10011 ifetch 2 ,rega 
+2db1 203a2db8 branch ali_mesh_message_config_modle_subscription_add_value_address_in ,blank 
+2db2 da40ffff arg 0xffff ,regb 
+2db3 9a467c00 isub regb ,null 
+2db4 2022adb8 branch ali_mesh_message_config_modle_subscription_add_value_address_in ,zero 
+2db5 1a20a202 increase 2 ,rega 
+2db6 c2002db0 loop ali_mesh_message_config_modle_subscription_add_value_address_loop 
+2db7 20600000 rtn 
+
+ali_mesh_message_config_modle_subscription_add_value_address_in:
+2db8 18508400 byteswap temp ,temp 
+2db9 e0410011 istoret 2 ,rega 
+2dba 20600000 rtn 
+
+ali_mesh_init:
+2dbb 20406dfb call init_memp 
+2dbc 58002922 setarg mesh_check_ble_rx_packet 
+2dbd 67e149b5 store 2 ,mem_mesh_cb_receive_advertising 
+2dbe 58002de5 setarg mesh_idle_process 
+2dbf 67e14465 store 2 ,mem_cb_idle_process 
+2dc0 58002f68 setarg ali_mesh_network_layer_relay_access_message 
+2dc1 67e149cf store 2 ,mem_mesh_cb_network_relay 
+2dc2 580029b8 setarg mesh_receive_config_appkey_add_cb 
+2dc3 67e149b9 store 2 ,mem_mesh_cb_receive_config_appkey_add 
+2dc4 580029cb setarg mesh_store_new_subscriptuion_list_data 
+2dc5 67e149d5 store 2 ,mem_mesh_cb_subscriptuion_list_changed 
+2dc6 580029c7 setarg mesh_store_new_seq_data 
+2dc7 67e149d3 store 2 ,mem_mesh_cb_seq_changed 
+2dc8 58002dea setarg mesh_cb_event_timer 
+2dc9 67e1446f store 2 ,mem_cb_event_timer 
+2dca 58002735 setarg ali_mesh_access_layer_check_access_message_opcode 
+2dcb 67e149b7 store 2 ,mem_mesh_cb_receive_access_message 
+2dcc 20758000 rtn wake 
+2dcd 7047ce24 jam 36 ,mem_mesh_adv_scan_channel 
+2dce 20402842 call ali_mesh_ali_vendor_message_indication_info_reset_tid 
+2dcf 477cc03f bpatchx patch3f_1 ,mem_patch3f 
+2dd0 204029f4 call mesh_uart_init 
+2dd1 20402df5 call mesh_iic_init 
+2dd2 da20493e arg mem_mesh_network_key ,rega 
+2dd3 da400000 arg mesh_code_init ,regb 
+2dd4 df200001 arg 1 ,loopcnt 
+2dd5 204029db call logging_tx_info 
+2dd6 20402987 call ali_mesh_chip_peripherals_load_data_from_eep 
+2dd7 20402ddd call mesh_inverse_three_tuple_mac 
+2dd8 6fe0c93e fetch 1 ,mem_mesh_network_key 
+2dd9 c07fac12 beq 0xff ,mesh_send_unprovisioned_beacons 
+2dda 20402ae5 call ali_mesh_encrypt_base_function_k4 
+2ddb 20402acd call ali_mesh_encrypt_calc_network_key_by_k2 
+2ddc 202027f6 branch ali_mesh_ali_vendor_message_opcode_device_power_on 
+
+mesh_inverse_three_tuple_mac:
+2ddd 6fe3499f fetch 6 ,mem_mesh_three_tuple_mac 
+2dde 20407d46 call inverse_data_6byte 
+2ddf 67e3437a store 6 ,mem_le_lap 
+2de0 20600000 rtn 
+
+mesh_get_element_info_config:
+2de1 6f20c9db fetchr loopcnt ,1 ,mem_mesh_element_number 
+2de2 6a2149dc fetchr rega ,2 ,mem_mesh_element_device_ptr 
+2de3 6a4149de fetchr regb ,2 ,mem_mesh_element_device_length 
+2de4 20600000 rtn 
+
+mesh_idle_process:
+2de5 20402844 call ali_mesh_time_function 
+2de6 20402a05 call ali_mesh_control_ble_adv_process 
+2de7 20403018 call ali_mesh_upper_transport_layer_control_packet 
+2de8 204028d0 call ali_mesh_advertising_bearer_layer_load_packet_from_advertising_queue 
+2de9 2020290d branch mesh_receive_advertising 
+
+mesh_cb_event_timer:
+2dea 20402a07 call ali_mesh_control_ble_adv_timer_process 
+2deb 20202d62 branch ali_mesh_gatt_package_receive_timer 
+
+ali_mesh_check_all_element_info:
+2dec 20402de1 call mesh_get_element_info_config 
+
+ali_mesh_check_all_element_info_loop:
+2ded 20402eee call ali_mesh_more_element_push_stack 
+2dee 1a627e00 copy regc ,pdata 
+2def 20407e05 call callback_func 
+2df0 20402ef3 call ali_mesh_more_element_pop_stack 
+2df1 1a427e00 copy regb ,pdata 
+2df2 9a20a200 iadd rega ,rega 
+2df3 c2002ded loop ali_mesh_check_all_element_info_loop 
+2df4 20600000 rtn 
+
+mesh_iic_init:
+2df5 7080700c jam gpcfg_uartb_txd ,core_gpio_conf 
+2df6 7080734d jam gpcfg_uartb_rxd | gpcfg_pullup ,core_gpio_conf + 3 
+2df7 7080722c jam gpcfg_iic_scl ,core_gpio_conf + 2 
+2df8 7080712d jam gpcfg_iic_sda ,core_gpio_conf + 1 
+2df9 7080743e jam gpcfg_output_low ,core_gpio_conf + 4 
+2dfa 20205dbf branch clear_eeprom_size_2k 
+
+ali_mesh_lower_transport_layer_receive_lower_transport_pdu:
+2dfb 477d403f bpatchx patch3f_2 ,mem_patch3f 
+2dfc 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+2dfd c283ae00 bbit1 transport_head_bit_seg ,ali_mesh_lower_transport_layer_receive_lower_transport_pdu_segmented_message 
+2dfe 704b0e00 jam 0 ,mem_mesh_aszmic 
+2dff 20202fb6 branch ali_mesh_upper_transport_layer_receive_unsegmented_access_message 
+
+ali_mesh_lower_transport_layer_receive_lower_transport_pdu_segmented_message:
+2e00 20402e05 call ali_mesh_lower_transport_layer_receive_segaccmess_resolve_szmic_seqzero_segon 
+2e01 20402e22 call ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack 
+2e02 20740000 rtn user 
+2e03 20402e32 call ali_mesh_lower_transport_layer_receive_segmented_access_message_store_segment 
+2e04 20202e3e branch ali_mesh_lower_transport_layer_receive_segmented_access_message_decrypt_segment 
+
+ali_mesh_lower_transport_layer_receive_segaccmess_resolve_szmic_seqzero_segon:
+2e05 df200003 arg 3 ,loopcnt 
+2e06 da200c15 arg mem_mesh_message_segment_access_szmic_seqzero_sego_segn ,rega 
+2e07 20407d37 call inverse_data 
+2e08 6fe18c15 fetch 3 ,mem_mesh_message_segment_access_szmic_seqzero_sego_segn 
+2e09 1fe1041f and pdata ,0x1f ,temp 
+2e0a 6048c9e4 storet 1 ,mem_mesh_segmented_access_message_segn 
+2e0b 1ff1fe00 rshift4 pdata ,pdata 
+2e0c 1fe37e00 rshift pdata ,pdata 
+2e0d 1fe1041f and pdata ,0x1f ,temp 
+2e0e 6048c9e3 storet 1 ,mem_mesh_segmented_access_message_sego 
+2e0f 1ff1fe00 rshift4 pdata ,pdata 
+2e10 1fe37e00 rshift pdata ,pdata 
+2e11 da201fff arg 0x1fff ,rega 
+2e12 9a210400 iand rega ,temp 
+2e13 1fe22400 copy pdata ,regb 
+2e14 6fe149e1 fetch 2 ,mem_mesh_segmented_access_message_seqzero 
+2e15 98467c00 isub temp ,null 
+2e16 2442ae1e ncall ali_mesh_lower_transport_layer_receive_segmented_access_message_recover_seqzero ,zero 
+2e17 604949e1 storet 2 ,mem_mesh_segmented_access_message_seqzero 
+2e18 1a4cfe00 rshift8 regb ,pdata 
+2e19 1ff1fe00 rshift4 pdata ,pdata 
+2e1a 1fe37e00 rshift pdata ,pdata 
+2e1b 67e0c9e0 store 1 ,mem_mesh_segmented_access_message_szmic 
+2e1c 67e0cb0e store 1 ,mem_mesh_aszmic 
+2e1d 20600000 rtn 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_recover_seqzero:
+2e1e 58000000 setarg 0 
+2e1f 67e249e5 store 4 ,mem_mesh_segmented_access_message_blockack 
+2e20 7049ea00 jam 0 ,mem_mesh_segmented_access_message_current_length 
+2e21 20600000 rtn 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack:
+2e22 20407e56 call disable_user 
+2e23 6fe0c9e3 fetch 1 ,mem_mesh_segmented_access_message_sego 
+2e24 1fe20e00 copy pdata ,queue 
+2e25 6fe249e5 fetch 4 ,mem_mesh_segmented_access_message_blockack 
+2e26 afefffff qisolate1 pdata 
+2e27 2020fe54 branch enable_user ,true 
+2e28 f9207e00 qset1 pdata 
+2e29 67e249e5 store 4 ,mem_mesh_segmented_access_message_blockack 
+2e2a 6848c9e4 fetcht 1 ,mem_mesh_segmented_access_message_segn 
+2e2b 1840f201 add temp ,1 ,loopcnt 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack_loop:
+2e2c 1f208fff add loopcnt ,-1 ,queue 
+2e2d afefffff qisolate1 pdata 
+2e2e 24608000 nrtn true 
+2e2f c2002e2c loop ali_mesh_lower_transport_layer_receive_segmented_access_message_check_blockack_loop 
+2e30 7049e901 jam 1 ,mem_mesh_segmented_access_message_receive_finish 
+2e31 20600000 rtn 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_store_segment:
+2e32 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2e33 1fe0fffa pincrease -6 
+2e34 1fe27200 copy pdata ,loopcnt 
+2e35 6848c9ea fetcht 1 ,mem_mesh_segmented_access_message_current_length 
+2e36 98408400 iadd temp ,temp 
+2e37 6048c9ea storet 1 ,mem_mesh_segmented_access_message_current_length 
+2e38 d8a049eb arg mem_mesh_segmented_access_message_segment ,contw 
+2e39 6fe0c9e3 fetch 1 ,mem_mesh_segmented_access_message_sego 
+2e3a 1feffe0c mul32 pdata ,12 ,pdata 
+2e3b 98a08a00 iadd contw ,contw 
+2e3c d8c00c18 arg mem_mesh_message_transport_segmented_access_messagepdu_segment ,contr 
+2e3d 20207d5f branch memcpy 
+
+ali_mesh_lower_transport_layer_receive_segmented_access_message_decrypt_segment:
+2e3e 6fe0c9e9 fetch 1 ,mem_mesh_segmented_access_message_receive_finish 
+2e3f c1000000 rtneq 0 
+2e40 58000000 setarg 0 
+2e41 67e2c9e5 store 5 ,mem_mesh_segmented_access_message_blockack 
+2e42 68490c0e fetcht 2 ,mem_mesh_message_seq + 1 
+2e43 18508400 byteswap temp ,temp 
+2e44 5800e000 setarg 0xe000 
+2e45 98410400 iand temp ,temp 
+2e46 6fe149e1 fetch 2 ,mem_mesh_segmented_access_message_seqzero 
+2e47 9841fe00 ior temp ,pdata 
+2e48 1ff0fe00 byteswap pdata ,pdata 
+2e49 67e10c0e store 2 ,mem_mesh_message_seq + 1 
+2e4a 20202fc0 branch ali_mesh_upper_transport_layer_receive_segmented_access_message 
+
+ali_mesh_lower_transport_layer_send_unsegmented_access_message:
+2e4b 6fe08a0f fetch 1 ,mem_mesh_upper_transport_layer_payload_len 
+2e4c 1fe08401 add pdata ,1 ,temp 
+2e4d 1fe27200 copy pdata ,loopcnt 
+2e4e 60488bff storet 1 ,mem_mesh_lower_transport_layer_payload_len 
+2e4f 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+2e50 793ffe07 set0 transport_head_bit_seg ,pdata 
+2e51 67e0cb46 store 1 ,mem_mesh_unsegmented_access_lower_transport_layer_head 
+2e52 d8c00a10 arg mem_mesh_access_layer_payload ,contr 
+2e53 20407d52 call memcpy_fast 
+2e54 20202f9e branch ali_mesh_network_layer_send_access_message 
+
+ali_mesh_lower_transport_layer_send_segmented_access_message:
+2e55 1a208404 add rega ,4 ,temp 
+2e56 1a227200 copy rega ,loopcnt 
+2e57 60488bff storet 1 ,mem_mesh_lower_transport_layer_payload_len 
+2e58 d8a04b4a arg mem_mesh_segmented_access_lower_transport_layer_parameters ,contw 
+2e59 20407d52 call memcpy_fast 
+2e5a 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+2e5b 79207e07 set1 transport_head_bit_seg ,pdata 
+2e5c 67e0cb46 store 1 ,mem_mesh_segmented_access_lower_transport_layer_head 
+2e5d 20202f9e branch ali_mesh_network_layer_send_access_message 
+
+ali_mesh_model_layer_check_model_message_opcode:
+2e5e 6fe089f8 fetch 1 ,mem_mesh_module_message_opcode 
+
+ali_mesh_model_layer_check_generic_onoff_message_opcde:
+2e5f c000ae65 beq mesh_module_message_opcode_generic_onoff_get_no_head ,ali_mesh_model_layer_message_opcode_generic_onoff_get 
+2e60 c0012e6b beq mesh_module_message_opcode_generic_onoff_set_no_head ,ali_mesh_model_layer_message_opcde_generic_onoff_set 
+2e61 c0212e70 beq mesh_module_message_opcode_scene_recall_no_head ,ali_mesh_model_layer_message_opcde_scene_recall 
+2e62 c0262e73 beq mesh_module_message_opcode_light_lightness_set_no_head ,ali_mesh_model_layer_message_opcde_light_lightness_set 
+2e63 c02f2e79 beq mesh_module_message_opcode_light_ctl_set_no_head ,ali_mesh_model_layer_message_opcde_light_ctl_set 
+2e64 20600000 rtn 
+
+ali_mesh_model_layer_message_opcode_generic_onoff_get:
+2e65 da602e67 arg ali_mesh_model_layer_message_opcode_generic_onoff_get_cb ,regc 
+2e66 20202edd branch ali_mesh_more_element_check_element_address 
+
+ali_mesh_model_layer_message_opcode_generic_onoff_get_cb:
+2e67 6fe149bd fetch 2 ,mem_mesh_cb_generic_onoff_get 
+2e68 20407e05 call callback_func 
+2e69 67e089f9 store 1 ,mem_mesh_generic_onoff_set_payload_onoff 
+2e6a 20202765 branch ali_mesh_access_layer_send_generic_onoff_status 
+
+ali_mesh_model_layer_message_opcde_generic_onoff_set:
+2e6b da602e6d arg ali_mesh_model_layer_message_opcde_generic_onoff_set_cb ,regc 
+2e6c 20202edd branch ali_mesh_more_element_check_element_address 
+
+ali_mesh_model_layer_message_opcde_generic_onoff_set_cb:
+2e6d 20402765 call ali_mesh_access_layer_send_generic_onoff_status 
+2e6e 6fe149bf fetch 2 ,mem_mesh_cb_generic_onoff_set 
+2e6f 20207e05 branch callback_func 
+
+ali_mesh_model_layer_message_opcde_scene_recall:
+2e70 2040277d call ali_mesh_access_layer_send_scene_status 
+2e71 6fe149c1 fetch 2 ,mem_mesh_cb_scene_recall 
+2e72 20207e05 branch callback_func 
+
+ali_mesh_model_layer_message_opcde_light_lightness_set:
+2e73 6fe109f9 fetch 2 ,mem_mesh_light_lightness_set_payload_lightness 
+2e74 20402e88 call ali_mesh_model_layer_message_calc_lightness 
+2e75 67e089fe store 1 ,mem_mesh_light_lightness_calc_lightness 
+2e76 2040276d call ali_mesh_access_layer_send_light_lightness_status 
+2e77 6fe149c3 fetch 2 ,mem_mesh_cb_light_lightness_set 
+2e78 20207e05 branch callback_func 
+
+ali_mesh_model_layer_message_opcde_light_ctl_set:
+2e79 6fe14a0f fetch 2 ,mem_mesh_last_ctl_temperature 
+2e7a 684909fb fetcht 2 ,mem_mesh_ctl_temperature 
+2e7b 98467c00 isub temp ,null 
+2e7c 20628000 rtn zero 
+2e7d 6fe109fb fetch 2 ,mem_mesh_ctl_temperature 
+2e7e 20402e9a call ali_mesh_model_layer_message_calc_temperature 
+2e7f 67e08a03 store 1 ,mem_mesh_ctl_calc_temperature 
+2e80 6fe109fb fetch 2 ,mem_mesh_ctl_temperature 
+2e81 67e14a0f store 2 ,mem_mesh_last_ctl_temperature 
+2e82 6fe149c5 fetch 2 ,mem_mesh_cb_light_lightness_get 
+2e83 20407e05 call callback_func 
+2e84 604909f9 storet 2 ,mem_mesh_ctl_lightness 
+2e85 20402775 call ali_mesh_access_layer_send_light_ctl_stauts 
+2e86 6fe149c7 fetch 2 ,mem_mesh_cb_light_ctl_set 
+2e87 20207e05 branch callback_func 
+
+ali_mesh_model_layer_message_calc_lightness:
+2e88 207a0000 rtn blank 
+2e89 1feffe64 mul32 pdata ,ali_mesh_lightness_level ,pdata 
+2e8a d840ffff arg ali_mesh_lightness_max ,temp 
+2e8b 9846fc00 idiv temp 
+2e8c 20407def call wait_div_end 
+2e8d 18070400 remainder temp 
+2e8e 184c8400 rshift8 temp ,temp 
+2e8f 1807fe00 quotient pdata 
+2e90 18467cff sub temp ,0xff ,null 
+2e91 24628000 nrtn zero 
+2e92 1fe0fe01 pincrease 1 
+2e93 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_actual_lightness:
+2e94 dfe0ffff arg ali_mesh_lightness_max ,pdata 
+2e95 984ffe00 imul32 temp ,pdata 
+2e96 1fe6fc64 div pdata ,ali_mesh_lightness_level 
+2e97 20407def call wait_div_end 
+2e98 18078400 quotient temp 
+2e99 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_temperature:
+2e9a d8400320 arg ali_mesh_temperature_min ,temp 
+2e9b 98462200 isub temp ,rega 
+2e9c 20402ea9 call ali_mesh_model_layer_message_calc_temperature_k 
+2e9d 1a227e00 copy rega ,pdata 
+2e9e 9846fc00 idiv temp 
+2e9f 20407def call wait_div_end 
+2ea0 1807fe00 quotient pdata 
+2ea1 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_actual_temperature:
+2ea2 18422200 copy temp ,rega 
+2ea3 20402ea9 call ali_mesh_model_layer_message_calc_temperature_k 
+2ea4 1a227e00 copy rega ,pdata 
+2ea5 984ffe00 imul32 temp ,pdata 
+2ea6 d8400320 arg ali_mesh_temperature_min ,temp 
+2ea7 98408400 iadd temp ,temp 
+2ea8 20600000 rtn 
+
+ali_mesh_model_layer_message_calc_temperature_k:
+2ea9 58004e20 setarg ali_mesh_temperature_max 
+2eaa d8400320 arg ali_mesh_temperature_min ,temp 
+2eab 98467e00 isub temp ,pdata 
+2eac 1fe6fc64 div pdata ,ali_mesh_temperature_level 
+2ead 20407def call wait_div_end 
+2eae 18078400 quotient temp 
+2eaf 20600000 rtn 
+
+ali_mesh_more_element_check_unicast_address:
+2eb0 d8e00000 arg 0 ,queue 
+2eb1 6f20c9db fetchr loopcnt ,1 ,mem_mesh_element_number 
+2eb2 20407e56 call disable_user 
+2eb3 6fe1494f fetch 2 ,mem_mesh_unicast_address 
+
+ali_mesh_more_element_check_unicast_address_loop:
+2eb4 98467c00 isub temp ,null 
+2eb5 2022aebc branch ali_mesh_more_element_found_unicast_address_element ,zero 
+2eb6 1ff0fe00 byteswap pdata ,pdata 
+2eb7 1fe0fe01 pincrease 1 
+2eb8 1ff0fe00 byteswap pdata ,pdata 
+2eb9 18e08e01 increase 1 ,queue 
+2eba c2002eb4 loop ali_mesh_more_element_check_unicast_address_loop 
+2ebb 20600000 rtn 
+
+ali_mesh_more_element_found_unicast_address_element:
+2ebc 704a1100 jam 0 ,mem_mesh_receive_group_address 
+2ebd 60e0ca12 storer queue ,1 ,mem_mesh_receive_element_number 
+2ebe 20402ef8 call ali_mesh_more_element_calc_queue_address 
+2ebf 20207e54 branch enable_user 
+
+ali_mesh_more_element_check_group_address:
+2ec0 d8e00000 arg 0 ,queue 
+2ec1 da600000 arg 0 ,regc 
+2ec2 20402de1 call mesh_get_element_info_config 
+2ec3 20407e56 call disable_user 
+
+ali_mesh_more_element_check_group_address_loop:
+2ec4 6fe149d9 fetch 2 ,mem_mesh_core_feature 
+2ec5 c3012ed3 bbit0 mesh_feature_disable_subscription ,ali_mesh_more_element_check_subscription_address 
+2ec6 efe10011 ifetch 2 ,rega 
+2ec7 98467c00 isub temp ,null 
+2ec8 2042aed1 call ali_mesh_more_element_found_group_address_element ,zero 
+
+ali_mesh_more_element_check_address_common:
+2ec9 1a427e00 copy regb ,pdata 
+2eca 9a20a200 iadd rega ,rega 
+2ecb 18e08e01 increase 1 ,queue 
+2ecc c2002ec4 loop ali_mesh_more_element_check_group_address_loop 
+2ecd 1a627e00 copy regc ,pdata 
+2ece 207a0000 rtn blank 
+2ecf 67e0ca11 store 1 ,mem_mesh_receive_group_address 
+2ed0 20207e54 branch enable_user 
+
+ali_mesh_more_element_found_group_address_element:
+2ed1 f9202600 qset1 regc 
+2ed2 20600000 rtn 
+
+ali_mesh_more_element_check_subscription_address:
+2ed3 1a208c06 add rega ,element_device_subscription_label ,contr 
+2ed4 de000008 arg subscription_max_count ,alarm 
+
+ali_mesh_more_element_check_subscription_address_loop:
+2ed5 efe10006 ifetch 2 ,contr 
+2ed6 98467c00 isub temp ,null 
+2ed7 2022aedb branch ali_mesh_more_element_found_subscription_address_element ,zero 
+2ed8 1e00e1ff increase -1 ,alarm 
+2ed9 2022aec9 branch ali_mesh_more_element_check_address_common ,zero 
+2eda 20202ed5 branch ali_mesh_more_element_check_subscription_address_loop 
+
+ali_mesh_more_element_found_subscription_address_element:
+2edb 20402ed1 call ali_mesh_more_element_found_group_address_element 
+2edc 20202ec9 branch ali_mesh_more_element_check_address_common 
+
+ali_mesh_more_element_check_element_address:
+2edd d8e00000 arg 0 ,queue 
+2ede 6fe0ca11 fetch 1 ,mem_mesh_receive_group_address 
+2edf 203a2ee9 branch ali_mesh_more_element_check_element_address_no_group_address ,blank 
+2ee0 1fe22400 copy pdata ,regb 
+2ee1 6f20c9db fetchr loopcnt ,1 ,mem_mesh_element_number 
+
+ali_mesh_more_element_check_element_address_loop:
+2ee2 60e0ca12 storer queue ,1 ,mem_mesh_receive_element_number 
+2ee3 aa4fffff qisolate1 regb 
+2ee4 2040aee9 call ali_mesh_more_element_check_element_address_no_group_address ,true 
+2ee5 68e0ca12 fetchr queue ,1 ,mem_mesh_receive_element_number 
+2ee6 18e08e01 increase 1 ,queue 
+2ee7 c2002ee2 loop ali_mesh_more_element_check_element_address_loop 
+2ee8 20600000 rtn 
+
+ali_mesh_more_element_check_element_address_no_group_address:
+2ee9 20402eee call ali_mesh_more_element_push_stack 
+2eea 20402ef8 call ali_mesh_more_element_calc_queue_address 
+2eeb 1a627e00 copy regc ,pdata 
+2eec 20407e05 call callback_func 
+2eed 20202ef3 branch ali_mesh_more_element_pop_stack 
+
+ali_mesh_more_element_push_stack:
+2eee 67210c00 storer loopcnt ,2 ,mem_mesh_loopcnt_tmep 
+2eef 62210c02 storer rega ,2 ,mem_mesh_rega_temp 
+2ef0 62410c04 storer regb ,2 ,mem_mesh_regb_temp 
+2ef1 62610c06 storer regc ,2 ,mem_mesh_regc_temp 
+2ef2 20600000 rtn 
+
+ali_mesh_more_element_pop_stack:
+2ef3 6f210c00 fetchr loopcnt ,2 ,mem_mesh_loopcnt_tmep 
+2ef4 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+2ef5 6a410c04 fetchr regb ,2 ,mem_mesh_regb_temp 
+2ef6 6a610c06 fetchr regc ,2 ,mem_mesh_regc_temp 
+2ef7 20600000 rtn 
+
+ali_mesh_more_element_calc_queue_address:
+2ef8 477dc03f bpatchx patch3f_3 ,mem_patch3f 
+2ef9 6fe1494f fetch 2 ,mem_mesh_unicast_address 
+2efa 1ff0fe00 byteswap pdata ,pdata 
+2efb 98e0fe00 iadd queue ,pdata 
+2efc 1ff0fe00 byteswap pdata ,pdata 
+2efd 67e14b3a store 2 ,mem_mesh_send_message_src 
+2efe 20402de1 call mesh_get_element_info_config 
+2eff 18e27e00 copy queue ,pdata 
+2f00 9a4ffe00 imul32 regb ,pdata 
+2f01 9a20a200 iadd rega ,rega 
+2f02 1a208c17 add rega ,element_device_upper_queue_ptr ,contr 
+2f03 efe10006 ifetch 2 ,contr 
+2f04 67e1448a store ,2 ,mem_queue_ptr 
+2f05 20600000 rtn 
+
+ali_mesh_receive_adtype_mesh_message:
+2f06 700c3a00 jam mesh_message_tmall ,mem_mesh_network_packet_type 
+
+ali_mesh_network_layer_recevice_network_pdu:
+2f07 18467c0c sub temp ,mesh_network_packet_min_length ,null 
+2f08 20610000 rtn positive 
+2f09 18467c1e sub temp ,mesh_network_packet_max_length ,null 
+2f0a 24610000 nrtn positive 
+2f0b 477e403f bpatchx patch3f_4 ,mem_patch3f 
+2f0c 20402f60 call ali_mesh_network_store_in_mem 
+
+ali_mesh_network_layer_recevice_network_pdu_check_nid:
+2f0d 20402f2e call ali_mesh_network_layer_check_nid_ivi 
+2f0e 24740000 nrtn user 
+
+ali_mesh_network_layer_recevice_network_pdu_deceypt_obfuscation:
+2f0f 20402af6 call ali_mesh_encrypt_obfuscation_deceypt_recevie_message 
+
+ali_mesh_network_layer_recevice_network_pdu_decrypt_netmic32:
+2f10 20402f57 call ali_mesh_network_load_network_nonce_and_encryptionkey 
+2f11 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2f12 d8400c12 arg mem_mesh_message_dst ,temp 
+2f13 20402be0 call ali_ccm_decrypt 
+2f14 24628000 nrtn zero 
+
+ali_mesh_network_layer_recevice_network_pdu_check_dst:
+2f15 477ec03f bpatchx patch3f_5 ,mem_patch3f 
+2f16 68490c12 fetcht 2 ,mem_mesh_message_dst 
+2f17 20402eb0 call ali_mesh_more_element_check_unicast_address 
+2f18 20342f3b branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,user 
+2f19 df20001d arg 29 ,loopcnt 
+2f1a d8a00a98 arg mem_mesh_message_nid_temp ,contw 
+2f1b d8c00c0b arg mem_mesh_message_nid ,contr 
+2f1c 20407d5f call memcpy 
+2f1d 20402f24 call ali_mesh_network_layer_recevice_network_pdu_check_dst_group_address 
+2f1e df20001d arg 29 ,loopcnt 
+2f1f d8c00a98 arg mem_mesh_message_nid_temp ,contr 
+2f20 d8a00c0b arg mem_mesh_message_nid ,contw 
+2f21 20407d5f call memcpy 
+2f22 6fe149cf fetch 2 ,mem_mesh_cb_network_relay 
+2f23 20207e05 branch callback_func 
+
+ali_mesh_network_layer_recevice_network_pdu_check_dst_group_address:
+2f24 20402ec0 call ali_mesh_more_element_check_group_address 
+2f25 20342f3b branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,user 
+2f26 704a11ff jam 0xff ,mem_mesh_receive_group_address 
+2f27 5800ffcf setarg group_address_0xcfff_little_endian 
+2f28 98467c00 isub temp ,null 
+2f29 2022af3b branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,zero 
+2f2a 5800ffff setarg group_address_0xffff_little_endian 
+2f2b 98467c00 isub temp ,null 
+2f2c 2022af3b branch ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq ,zero 
+2f2d 20600000 rtn 
+
+ali_mesh_network_layer_check_nid_ivi:
+2f2e 20407e56 call disable_user 
+2f2f 68488c0b fetcht 1 ,mem_mesh_message_nid 
+2f30 1851fe00 rshift4 temp ,pdata 
+2f31 1fe97e00 rshift3 pdata ,pdata 
+2f32 6a20ca16 fetchr rega ,1 ,mem_mesh_iv_index + 3 
+2f33 1a212201 and rega ,0x01 ,rega 
+2f34 9a267c00 isub rega ,null 
+2f35 24628000 nrtn zero 
+2f36 1841047f and temp ,0x7f ,temp 
+2f37 6fe0c8d1 fetch 1 ,mem_k2_nid 
+2f38 98467c00 isub temp ,null 
+2f39 24628000 nrtn zero 
+2f3a 20207e54 branch enable_user 
+
+ali_mesh_network_layer_recevice_network_pdu_check_src_and_seq:
+2f3b da204a17 arg mem_mesh_tmall_cache_start ,rega 
+2f3c df20000a arg cache_space_num ,loopcnt 
+
+ali_mesh_network_layer_raverse_src_seq_cache:
+2f3d 68490c10 fetcht 2 ,mem_mesh_message_src 
+2f3e efe10011 ifetch 2 ,rega 
+2f3f 203a2f45 branch ali_mesh_network_layer_find_empty_space ,blank 
+2f40 98467c00 isub temp ,null 
+2f41 2022af46 branch ali_mesh_network_layer_find_src_space ,zero 
+2f42 1a20a205 increase cache_space_size ,rega 
+2f43 c2002f3d loop ali_mesh_network_layer_raverse_src_seq_cache 
+2f44 da204a17 arg mem_mesh_tmall_cache_start ,rega 
+
+ali_mesh_network_layer_find_empty_space:
+2f45 e0410011 istoret 2 ,rega 
+
+ali_mesh_network_layer_find_src_space:
+2f46 60490c35 storet 2 ,mem_mesh_send_message_dst 
+2f47 1a20a602 add rega ,2 ,regc 
+2f48 efe18013 ifetch 3 ,regc 
+2f49 67e18c37 store 3 ,mem_mesh_last_message_seq 
+2f4a 20202f4b branch ali_mesh_network_layer_recevice_network_pdu_check_seq_legal 
+
+ali_mesh_network_layer_recevice_network_pdu_check_seq_legal:
+2f4b 20402f54 call ali_mesh_inverse_seq 
+2f4c 6fe18c37 fetch 3 ,mem_mesh_last_message_seq 
+2f4d 68498c0d fetcht 3 ,mem_mesh_message_seq 
+2f4e 98467c00 isub temp ,null 
+2f4f 20610000 rtn positive 
+2f50 e0418013 istoret 3 ,regc 
+2f51 20402f54 call ali_mesh_inverse_seq 
+2f52 20402fb1 call logging_tx_debug_network_receive_packet 
+2f53 20202dfb branch ali_mesh_lower_transport_layer_receive_lower_transport_pdu 
+
+ali_mesh_inverse_seq:
+2f54 da200c0d arg mem_mesh_message_seq ,rega 
+2f55 df200003 arg 3 ,loopcnt 
+2f56 20207d37 branch inverse_data 
+
+ali_mesh_network_load_network_nonce_and_encryptionkey:
+2f57 20402f5a call ali_mesh_network_layer_load_network_nonce 
+
+ali_mesh_upper_transport_layer_load_encryptionkey:
+2f58 d8c048e2 arg mem_k2_encryptionkey ,contr 
+2f59 20206dbe branch load_key 
+
+ali_mesh_network_layer_load_network_nonce:
+2f5a d8a00c28 arg mem_mesh_network_nonce ,contw 
+2f5b 58000000 setarg network_nonce 
+2f5c e7e08005 istore 1 ,contw 
+2f5d 6fe30c0c fetch 6 ,mem_mesh_message_ttl 
+2f5e e7e40005 istore 8 ,contw 
+2f5f 20202fac branch mesh_generate_nonce 
+
+ali_mesh_network_store_in_mem:
+2f60 1840fff4 add temp ,-12 ,pdata 
+2f61 67e08c0a store 1 ,mem_mesh_message_transport_netmic_length 
+2f62 df20001d arg 29 ,loopcnt 
+2f63 d8a00c0b arg mem_mesh_message_nid ,contw 
+2f64 20407d26 call clear_mem 
+2f65 1840f3ff add temp ,-1 ,loopcnt 
+2f66 d8a00c0b arg mem_mesh_message_nid ,contw 
+2f67 20207d52 branch memcpy_fast 
+
+ali_mesh_network_layer_relay_access_message:
+2f68 20402f79 call ali_mesh_network_layer_check_relay_states 
+2f69 24740000 nrtn user 
+2f6a 20402f8e call ali_mesh_network_layer_encrypt_relay_package 
+2f6b 700a740a jam adv_relay_mesh_message_duration ,mem_mesh_queue_ele_duration 
+2f6c 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2f6d 1fe0840d add pdata ,13 ,temp 
+2f6e 60488a76 storet 1 ,mem_mesh_queue_ele_len 
+2f6f 184085ff increase -1 ,temp 
+2f70 e0408005 istoret 1 ,contw 
+2f71 5800002a setarg gap_adtype_mesh_message 
+2f72 e7e08005 istore 1 ,contw 
+2f73 1840f3ff add temp ,-1 ,loopcnt 
+2f74 6fe38c0b fetch 7 ,mem_mesh_message_nid 
+2f75 d8c00c0b arg mem_mesh_message_nid ,contr 
+2f76 20407d5f call memcpy 
+2f77 da200a74 arg mem_mesh_queue_ele_temp ,rega 
+2f78 2020793f branch queue_push 
+
+ali_mesh_network_layer_check_relay_states:
+2f79 20407e56 call disable_user 
+2f7a 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+2f7b c1008000 rtneq mesh_message_app 
+2f7c 6fe149d9 fetch 2 ,mem_mesh_core_feature 
+2f7d c3808000 rtnbit1 mesh_feature_disable_relay 
+2f7e 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2f7f c1800000 rtnne paired_status 
+2f80 68490c10 fetcht 2 ,mem_mesh_message_src 
+2f81 20402eb0 call ali_mesh_more_element_check_unicast_address 
+2f82 24740000 nrtn user 
+2f83 20402f93 call ali_mesh_network_layer_check_network_mic_cache 
+2f84 24740000 nrtn user 
+2f85 20402f96 call ali_mesh_network_layer_logging_tx_relay_info 
+2f86 6fe08c0c fetch 1 ,mem_mesh_message_ttl 
+2f87 207a0000 rtn blank 
+2f88 1fe0ffff pincrease -1 
+2f89 207a0000 rtn blank 
+2f8a 67e08c0c store 1 ,mem_mesh_message_ttl 
+2f8b 58004a71 setarg mem_mesh_network_relay_queue 
+2f8c 67e1448a store 2 ,mem_queue_ptr 
+2f8d 20207e54 branch enable_user 
+
+ali_mesh_network_layer_encrypt_relay_package:
+2f8e 20402f57 call ali_mesh_network_load_network_nonce_and_encryptionkey 
+2f8f 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2f90 d8400c12 arg mem_mesh_message_dst ,temp 
+2f91 20402bbf call ali_ccm_encrypt 
+2f92 20202af6 branch ali_mesh_encrypt_obfuscation_deceypt_recevie_message 
+
+ali_mesh_network_layer_check_network_mic_cache:
+2f93 58004a49 setarg mem_mesh_transport_message_mic_cache 
+2f94 67e10bfd store 2 ,mem_mesh_mic_cache_ptr 
+2f95 2020296a branch ali_mesh_base_adt_cache 
+
+ali_mesh_network_layer_logging_tx_relay_info:
+2f96 df200002 arg 2 ,loopcnt 
+2f97 da200c12 arg mem_mesh_message_dst ,rega 
+2f98 da400021 arg mesh_network_relay_packet ,regb 
+2f99 204029db call logging_tx_info 
+2f9a 6f208be0 fetchr loopcnt ,1 ,mem_ccm_data_len 
+2f9b 6a210be1 fetchr rega ,2 ,mem_ccm_data_ptr 
+2f9c da400021 arg mesh_network_relay_packet ,regb 
+2f9d 202029d9 branch logging_tx_debug 
+
+ali_mesh_network_layer_send_access_message:
+2f9e 477f403f bpatchx patch3f_6 ,mem_patch3f 
+2f9f 20402fa2 call ali_mesh_network_layer_send_access_message_encrypt_netmic 
+2fa0 20402fab call ali_mesh_network_layer_send_access_message_encrypt_obfuscation 
+2fa1 202028ba branch ali_mesh_bearer_layer_send_packet_by_network_layer 
+
+ali_mesh_network_layer_send_access_message_encrypt_netmic:
+2fa2 6fe08bff fetch 1 ,mem_mesh_lower_transport_layer_payload_len 
+2fa3 1fe0a202 add pdata ,2 ,rega 
+2fa4 1fe0fe04 pincrease 4 
+2fa5 67e08bff store 1 ,mem_mesh_lower_transport_layer_payload_len 
+2fa6 d8404b44 arg mem_mesh_send_upper_layer_dst ,temp 
+2fa7 20202fa8 branch ali_mesh_network_layer_encrypt_by_network_nonce 
+
+ali_mesh_network_layer_encrypt_by_network_nonce:
+2fa8 20402f57 call ali_mesh_network_load_network_nonce_and_encryptionkey 
+2fa9 1a227e00 copy rega ,pdata 
+2faa 20202bbf branch ali_ccm_encrypt 
+
+ali_mesh_network_layer_send_access_message_encrypt_obfuscation:
+2fab 20202af3 branch ali_mesh_encrypt_obfuscation_deceypt_send_message 
+
+mesh_generate_nonce:
+2fac 6fe24a13 fetch 4 ,mem_mesh_iv_index 
+2fad e7e20005 istore 4 ,contw 
+2fae 18a0fff3 add contw ,-13 ,pdata 
+2faf 67e10bde store 2 ,mem_nonce_ptr 
+2fb0 20600000 rtn 
+
+logging_tx_debug_network_receive_packet:
+2fb1 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2fb2 1fe0f20b add pdata ,11 ,loopcnt 
+2fb3 da200c0b arg mem_mesh_message_nid ,rega 
+2fb4 da400020 arg mesh_network_receive_packet ,regb 
+2fb5 202029d9 branch logging_tx_debug 
+
+ali_mesh_upper_transport_layer_receive_unsegmented_access_message:
+2fb6 c3032fb9 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:
+2fb7 20402fdf call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key 
+2fb8 20202fbb branch ali_mesh_upper_transport_layer_decrypt_unsegmented_message 
+
+ali_mesh_uuper_transport_layer_decrypt_unsegment_access_by_device_key:
+2fb9 20402fec call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key 
+2fba 20202fbb branch ali_mesh_upper_transport_layer_decrypt_unsegmented_message 
+
+ali_mesh_upper_transport_layer_decrypt_unsegmented_message:
+2fbb 6fe08c0a fetch 1 ,mem_mesh_message_transport_netmic_length 
+2fbc 1fe0fff9 pincrease -7 
+2fbd de000c15 arg mem_mesh_message_transport_unsegmented_access_messagepdu ,alarm 
+2fbe 20407e56 call disable_user 
+2fbf 20202fcd branch ali_mesh_upper_transport_layer_decrypt_message 
+
+ali_mesh_upper_transport_layer_receive_segmented_access_message:
+2fc0 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+2fc1 c3032fc4 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:
+2fc2 20402fdf call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key 
+2fc3 20202fc6 branch ali_mesh_upper_transport_layer_decrypt_segmented_message 
+
+ali_mesh_uuper_transport_layer_decrypt_segment_access_by_device_key:
+2fc4 20402fec call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key 
+2fc5 20202fc6 branch ali_mesh_upper_transport_layer_decrypt_segmented_message 
+
+ali_mesh_upper_transport_layer_decrypt_segmented_message:
+2fc6 6fe0cb0e fetch 1 ,mem_mesh_aszmic 
+2fc7 245a7e54 ncall enable_user ,blank 
+2fc8 205a7e56 call disable_user ,blank 
+2fc9 6fe0c9ea fetch 1 ,mem_mesh_segmented_access_message_current_length 
+2fca 1fe0fffc pincrease -4 
+2fcb 7049ea00 jam 0 ,mem_mesh_segmented_access_message_current_length 
+2fcc de0049eb arg mem_mesh_segmented_access_message_segment ,alarm 
+
+ali_mesh_upper_transport_layer_decrypt_message:
+2fcd 1e020400 copy alarm ,temp 
+2fce 20402fd9 call ali_mesh_upper_transport_layer_decrypt_message_decrypt_transmic 
+2fcf 24628000 nrtn zero 
+2fd0 df200001 arg 1 ,loopcnt 
+2fd1 da200be0 arg mem_ccm_data_len ,rega 
+2fd2 da400040 arg mesh_upper_receive_packet ,regb 
+2fd3 204029db call logging_tx_info 
+2fd4 20402fdc call ali_mesh_upper_transport_layer_check_transport_mic_cache 
+2fd5 24740000 nrtn user 
+2fd6 6fe10be1 fetch 2 ,mem_ccm_data_ptr 
+2fd7 1fe26000 copy pdata ,alarm 
+2fd8 2020272e branch ali_mesh_access_layer_resolve_message 
+
+ali_mesh_upper_transport_layer_decrypt_message_decrypt_transmic:
+2fd9 24342be0 nbranch ali_ccm_decrypt ,user 
+2fda 1fe0fffc pincrease -4 
+2fdb 20202bde branch ali_ccm_decrypt_64bit 
+
+ali_mesh_upper_transport_layer_check_transport_mic_cache:
+2fdc 58004b0f setarg mem_mesh_access_message_mic_cache 
+2fdd 67e10bfd store 2 ,mem_mesh_mic_cache_ptr 
+2fde 2020296a branch ali_mesh_base_adt_cache 
+
+ali_mesh_upper_transport_layer_load_application_nonce_and_application_key:
+2fdf 20402fe2 call ali_mesh_upper_transport_layer_load_application_nonce 
+
+ali_mesh_upper_transport_layer_load_application_key:
+2fe0 d8c04afe arg mem_mesh_application_key ,contr 
+2fe1 20206dbe branch load_key 
+
+ali_mesh_upper_transport_layer_load_application_nonce:
+2fe2 d8a00c28 arg mem_mesh_application_nonce ,contw 
+2fe3 58000001 setarg application_nonce 
+2fe4 e7e08005 istore 1 ,contw 
+2fe5 6fe0cb0e fetch 1 ,mem_mesh_aszmic 
+2fe6 d8400000 arg 0 ,temp 
+2fe7 7d3a0407 nsetflag blank ,7 ,temp 
+2fe8 e0408005 istoret 1 ,contw 
+2fe9 6fe38c0d fetch 7 ,mem_mesh_message_seq 
+2fea e7e38005 istore 7 ,contw 
+2feb 20202fac branch mesh_generate_nonce 
+
+ali_mesh_upper_transport_layer_load_device_nonce_and_device_key:
+2fec 20402fef call ali_mesh_upper_transport_layer_load_device_nonce 
+
+ali_mesh_upper_transport_layer_load_device_key:
+2fed d8c04824 arg mem_mesh_device_key ,contr 
+2fee 20206dbe branch load_key 
+
+ali_mesh_upper_transport_layer_load_device_nonce:
+2fef d8a00c28 arg mem_mesh_device_nonce ,contw 
+2ff0 58000002 setarg device_nonce 
+2ff1 20202fe4 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:
+2ff2 477fc03f bpatchx patch3f_7 ,mem_patch3f 
+2ff3 204030d7 call ali_mesh_upper_transport_layer_clear_tx_buffer 
+2ff4 204030d8 call ali_mesh_loggint_tx_info_upper_send_packet 
+2ff5 204030a7 call ali_mesh_upper_transport_layer_send_access_message_add_nid_src_ttl_seq_dst 
+2ff6 20402ffb call ali_mesh_upper_transport_layer_store_packet_header 
+2ff7 20740000 rtn user 
+2ff8 20403010 call ali_mesh_upper_transport_layer_store_unsegment_msg_original_access_pdu 
+2ff9 da200c43 arg mem_mesh_upper_tran_layer_queue_temp ,rega 
+2ffa 2020793f branch queue_push 
+
+ali_mesh_upper_transport_layer_store_packet_header:
+2ffb 20407e56 call disable_user 
+2ffc d8400002 arg upper_retry_count_status ,temp 
+2ffd 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+2ffe 98408400 iadd temp ,temp 
+2fff 6fe08c3a fetch 1 ,mem_mesh_network_packet_type 
+3000 1fe67c01 sub pdata ,mesh_message_app ,null 
+3001 79228406 setflag zero ,bit_upper_flag_app_control ,temp 
+3002 60488c43 storet 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+3003 6fe4cb3d fetch 9 ,mem_mesh_send_upper_layer_ivi_and_nid 
+3004 67e48c47 store 9 ,mem_mesh_upper_tran_layer_temp_packet_header_ivi_nid 
+3005 6fe08a10 fetch 1 ,mem_mesh_access_layer_payload_vendor_command 
+3006 c1ea0000 rtnne vendor_message_attr_indication 
+3007 6fe0c933 fetch 1 ,mem_mesh_provisioned_flag 
+3008 c0807e54 bne paired_status ,enable_user 
+3009 6fe08a13 fetch 1 ,mem_mesh_access_layer_payload_vendor_tid 
+300a 67e08c46 store 1 ,mem_mesh_upper_tran_layer_temp_packet_tid 
+300b 6fe08c43 fetch 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+300c 1fe0fe01 pincrease upper_retry_count_indication 
+300d 79207e05 set1 bit_upper_flag_vendor_indication ,pdata 
+300e 67e08c43 store 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+300f 20600000 rtn 
+
+ali_mesh_upper_transport_layer_store_unsegment_msg_original_access_pdu:
+3010 6fe08a0f fetch 1 ,mem_mesh_access_layer_payload_len 
+3011 1fe27200 copy pdata ,loopcnt 
+3012 67e08c50 store 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+3013 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+3014 67e08c51 store 1 ,mem_mesh_upper_tran_layer_temp_pakcet_akf_aid 
+3015 d8a00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contw 
+3016 d8c00a10 arg mem_mesh_access_layer_payload ,contr 
+3017 20207d5f branch memcpy 
+
+ali_mesh_upper_transport_layer_control_packet:
+3018 da60301a arg ali_mesh_upper_transport_layer_control_packet_deal ,regc 
+3019 20202dec branch ali_mesh_check_all_element_info 
+
+ali_mesh_upper_transport_layer_control_packet_deal:
+301a 1a208c16 add rega ,element_device_upper_adv_flag ,contr 
+301b efe08006 ifetch 1 ,contr 
+301c 247a0000 nrtn blank 
+301d efe10006 ifetch 2 ,contr 
+301e 67e1448a store 2 ,mem_queue_ptr 
+301f da200c43 arg mem_mesh_upper_tran_layer_queue_temp ,rega 
+3020 20407967 call queue_get_new_ele 
+3021 24740000 nrtn user 
+3022 6a210c02 fetchr rega ,2 ,mem_mesh_rega_temp 
+3023 68488c43 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+3024 18417e0f and temp ,data_upper_flag_max_retry_count ,pdata 
+3025 203a3056 branch ali_mesh_upper_transport_layer_queue_pop ,blank 
+3026 1a208a16 add rega ,element_device_upper_adv_flag ,contw 
+3027 58000001 setarg packet_in_bearer 
+3028 e7e08005 istore 1 ,contw 
+3029 20403040 call ali_mesh_upper_transport_layer_control_packet_load_header 
+302a 68488c43 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+302b 20403046 call ali_mesh_upper_transport_layer_control_packet_load_app_control 
+302c 1a208a19 add rega ,element_device_tran_package_tid ,contw 
+302d e7e08005 istore 1 ,contw 
+302e 79200404 set1 bit_upper_flag_retransmit ,temp 
+302f 184085ff increase -1 ,temp 
+3030 e0408012 istoret 1 ,regb 
+3031 68488c43 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_flag 
+3032 284ffe04 isolate1 bit_upper_flag_retransmit ,temp 
+3033 2420b05b nbranch ali_mesh_upper_transport_layer_control_packet_encrypt_access ,true 
+3034 68488c50 fetcht 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+3035 60488a0f storet 1 ,mem_mesh_upper_transport_layer_payload_len 
+3036 18427200 copy temp ,loopcnt 
+3037 d8a00a10 arg mem_mesh_access_layer_payload ,contw 
+3038 d8c00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contr 
+3039 20407d5f call memcpy 
+303a 18467c0f sub temp ,unsegmented_access_message_max_upper_transport_access_pdu_len ,null 
+303b 2421303d nbranch ali_mesh_upper_transport_layer_control_packet_segment_msg ,positive 
+
+ali_mesh_upper_transport_layer_control_packet_unsegment_msg:
+303c 20202e4b branch ali_mesh_lower_transport_layer_send_unsegmented_access_message 
+
+ali_mesh_upper_transport_layer_control_packet_segment_msg:
+303d 6fe20c52 fetch 4 ,mem_mesh_upper_tran_layer_temp_segmented_pakcet_seqzero 
+303e 67e20c3e store 4 ,mem_mesh_segmented_lower_transport_layer_segzero 
+303f 2020307c branch ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer 
+
+ali_mesh_upper_transport_layer_control_packet_load_header:
+3040 6fe08c51 fetch 1 ,mem_mesh_upper_tran_layer_temp_pakcet_akf_aid 
+3041 67e08c14 store 1 ,mem_mesh_message_transport_head 
+3042 6fe48c47 fetch 9 ,mem_mesh_upper_tran_layer_temp_packet_header_ivi_nid 
+3043 67e4cb3d store 9 ,mem_mesh_send_upper_layer_ivi_and_nid 
+3044 67e48c0b store 9 ,mem_mesh_message_nid 
+3045 20600000 rtn 
+
+ali_mesh_upper_transport_layer_control_packet_load_app_control:
+3046 58000003 setarg upper_tran_tmall_and_app 
+3047 20403053 call ali_mesh_store_tran_package_type 
+3048 6fe08c46 fetch 1 ,mem_mesh_upper_tran_layer_temp_packet_tid 
+3049 284ffe05 isolate1 bit_upper_flag_vendor_indication ,temp 
+304a 20608000 rtn true 
+304b 58000001 setarg upper_tran_tmall_message 
+304c 20403053 call ali_mesh_store_tran_package_type 
+304d 58000000 setarg 0 
+304e 284ffe06 isolate1 bit_upper_flag_app_control ,temp 
+304f 24608000 nrtn true 
+3050 58000002 setarg upper_tran_app_message 
+3051 20403053 call ali_mesh_store_tran_package_type 
+3052 20207e60 branch enable_blank 
+
+ali_mesh_store_tran_package_type:
+3053 1a208a1a add rega ,element_device_tran_package_type ,contw 
+3054 e7e08005 istore 1 ,contw 
+3055 20600000 rtn 
+
+ali_mesh_upper_transport_layer_queue_pop:
+3056 58000000 setarg 0 
+3057 1a208a19 add rega ,element_device_tran_package_tid ,contw 
+3058 e7e08005 istore 1 ,contw 
+3059 da200c43 arg mem_mesh_upper_tran_layer_queue_temp ,rega 
+305a 20207956 branch queue_pop 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access:
+305b 2040309f call ali_mesh_upper_transport_layer_send_access_message_calc_seq 
+305c 204030b3 call ali_mesh_upper_transport_layer_send_access_message_add_seq 
+305d 6fe4cb3d fetch 9 ,mem_mesh_send_upper_layer_ivi_and_nid 
+305e 67e48c47 store 9 ,mem_mesh_upper_tran_layer_temp_packet_header_ivi_nid 
+305f 20403074 call ali_mesh_upper_transport_layer_control_packet_encrypt_access_load_payload 
+3060 58000000 setarg 0 
+3061 67e0cb0e store 1 ,mem_mesh_aszmic 
+3062 20403095 call ali_mesh_upper_transport_layer_calc_transport_mic 
+3063 68488a0f fetcht 1 ,mem_mesh_upper_transport_layer_payload_len 
+3064 60488c50 storet 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+3065 18427200 copy temp ,loopcnt 
+3066 d8c00a10 arg mem_mesh_access_layer_payload ,contr 
+3067 d8a00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contw 
+3068 20407d5f call memcpy 
+3069 18467c0f sub temp ,unsegmented_access_message_max_upper_transport_access_pdu_len ,null 
+306a 2421306e nbranch ali_mesh_upper_transport_layer_control_packet_encrypt_access_segment_msg ,positive 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_unsegment_msg:
+306b da200c44 arg mem_mesh_upper_tran_layer_temp_packet_transmit_delay ,rega 
+306c 20407976 call queue_store_new_ele 
+306d 20202e4b branch ali_mesh_lower_transport_layer_send_unsegmented_access_message 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_segment_msg:
+306e 204030bb call ali_mesh_upper_transport_layer_send_segmented_access_message_get_seqzero_segon 
+306f 6fe20c3e fetch 4 ,mem_mesh_segmented_lower_transport_layer_segzero 
+3070 67e20c52 store 4 ,mem_mesh_upper_tran_layer_temp_segmented_pakcet_seqzero 
+3071 da200c44 arg mem_mesh_upper_tran_layer_temp_packet_transmit_delay ,rega 
+3072 20407976 call queue_store_new_ele 
+3073 2020307c branch ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer 
+
+ali_mesh_upper_transport_layer_control_packet_encrypt_access_load_payload:
+3074 6fe08c50 fetch 1 ,mem_mesh_upper_tran_layer_temp_packet_length 
+3075 1fe27200 copy pdata ,loopcnt 
+3076 67e08a0f store 1 ,mem_mesh_access_layer_payload_len 
+3077 6fe08c51 fetch 1 ,mem_mesh_upper_tran_layer_temp_pakcet_akf_aid 
+3078 67e08c14 store 1 ,mem_mesh_message_transport_head 
+3079 d8c00c56 arg mem_mesh_upper_tran_layer_temp_pakcet_upper_tran_access_pdu ,contr 
+307a d8a00a10 arg mem_mesh_access_layer_payload ,contw 
+307b 20207d5f branch memcpy 
+
+ali_mesh_upper_transport_layer_split_segmented_msg_to_lower_tran_layer:
+307c 204030c8 call ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header 
+307d 58000a10 setarg mem_mesh_access_payload 
+307e 67e10c3b store 2 ,mem_mesh_upper_transport_layer_payload_ptr 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_loop:
+307f 20403040 call ali_mesh_upper_transport_layer_control_packet_load_header 
+3080 2040309f call ali_mesh_upper_transport_layer_send_access_message_calc_seq 
+3081 204030b3 call ali_mesh_upper_transport_layer_send_access_message_add_seq 
+3082 68488a0f fetcht 1 ,mem_mesh_access_layer_payload_len 
+3083 5800000c setarg segmented_access_message_unint_pdu_len 
+3084 20407e4a call not_greater_than 
+3085 1fe22200 copy pdata ,rega 
+3086 18427e00 copy temp ,pdata 
+3087 9a267e00 isub rega ,pdata 
+3088 67e08a0f store 1 ,mem_mesh_access_layer_payload_len 
+3089 6fe10c3b fetch 2 ,mem_mesh_upper_transport_layer_payload_ptr 
+308a 1fe20c00 copy pdata ,contr 
+308b 9a208400 iadd rega ,temp 
+308c 60490c3b storet 2 ,mem_mesh_upper_transport_layer_payload_ptr 
+308d 20402e55 call ali_mesh_lower_transport_layer_send_segmented_access_message 
+308e 6fe08a0f fetch 1 ,mem_mesh_access_layer_payload_len 
+308f 207a0000 rtn blank 
+3090 6fe08c40 fetch 1 ,mem_mesh_segmented_lower_transport_layer_sego 
+3091 1fe0fe01 pincrease 1 
+3092 67e08c40 store 1 ,mem_mesh_segmented_lower_transport_layer_sego 
+3093 204030c8 call ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header 
+3094 2020307f branch ali_mesh_upper_transport_layer_send_segmented_access_message_loop 
+
+ali_mesh_upper_transport_layer_calc_transport_mic:
+3095 6fe08c14 fetch 1 ,mem_mesh_message_transport_head 
+3096 c3033099 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:
+3097 20402fdf call ali_mesh_upper_transport_layer_load_application_nonce_and_application_key 
+3098 2020309a branch ali_mesh_upper_transport_layer_calc_transport_mic_encrypt_aesccm 
+
+ali_mesh_upper_transport_layer_calc_transport_mic_by_devicekey:
+3099 20402fec call ali_mesh_upper_transport_layer_load_device_nonce_and_device_key 
+
+ali_mesh_upper_transport_layer_calc_transport_mic_encrypt_aesccm:
+309a 6fe08a0f fetch 1 ,mem_mesh_access_layer_payload_len 
+309b 1fe08404 add pdata ,4 ,temp 
+309c 60488a0f storet 1 ,mem_mesh_upper_transport_layer_payload_len 
+309d d8400a10 arg mem_mesh_access_layer_payload ,temp 
+309e 20202bbf branch ali_ccm_encrypt 
+
+ali_mesh_upper_transport_layer_send_access_message_calc_seq:
+309f 6fe1cb37 fetch 3 ,mem_mesh_send_message_seq 
+30a0 1fe0fe01 pincrease 1 
+30a1 67e1cb37 store 3 ,mem_mesh_send_message_seq 
+30a2 6fe0c957 fetch 1 ,mem_mesh_gatt_package_send_msg_id 
+30a3 1fe0fe01 pincrease 1 
+30a4 67e0c957 store 1 ,mem_mesh_gatt_package_send_msg_id 
+30a5 6fe149d3 fetch 2 ,mem_mesh_cb_seq_changed 
+30a6 20207e05 branch callback_func 
+
+ali_mesh_upper_transport_layer_send_access_message_add_nid_src_ttl_seq_dst:
+30a7 6fe0ca16 fetch 1 ,mem_mesh_iv_index + 3 
+30a8 1ff27e00 lshift4 pdata ,pdata 
+30a9 1fe9fe00 lshift3 pdata ,pdata 
+30aa 6848c8d1 fetcht 1 ,mem_k2_nid 
+30ab 9841fe00 ior temp ,pdata 
+30ac 67e0cb3d store 1 ,mem_mesh_send_upper_layer_ivi_and_nid 
+30ad 6fe0cb3c fetch 1 ,mem_mesh_send_message_ttl 
+30ae 67e0cb3e store 1 ,mem_mesh_send_upper_layer_ctl_and_ttl 
+30af 6fe14b3a fetch 2 ,mem_mesh_send_message_src 
+30b0 67e14b42 store 2 ,mem_mesh_send_upper_layer_src 
+30b1 6fe10c35 fetch 2 ,mem_mesh_send_message_dst 
+30b2 67e14b44 store 2 ,mem_mesh_send_upper_layer_dst 
+
+ali_mesh_upper_transport_layer_send_access_message_add_seq:
+30b3 6fe1cb37 fetch 3 ,mem_mesh_send_message_seq 
+30b4 67e1cb3f store 3 ,mem_mesh_send_upper_layer_seq 
+30b5 da204b3f arg mem_mesh_send_upper_layer_seq ,rega 
+30b6 df200003 arg 3 ,loopcnt 
+30b7 20407d37 call inverse_data 
+30b8 6fe44b3e fetch 8 ,mem_mesh_send_upper_layer_ctl_and_ttl 
+30b9 67e40c0c store 8 ,mem_mesh_message_ttl 
+30ba 20600000 rtn 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_get_seqzero_segon:
+30bb 6fe08a0f fetch 1 ,mem_mesh_upper_transport_layer_payload_len 
+30bc 1fe6fc0c div pdata ,segmented_access_message_unint_pdu_len 
+30bd 20407def call wait_div_end 
+30be 18078400 quotient temp 
+30bf 18077e00 remainder pdata 
+30c0 205a30d5 call ali_mesh_upper_transport_layer_send_segmented_access_message_sub_segn_one ,blank 
+30c1 60488c41 storet 1 ,mem_mesh_segmented_lower_transport_layer_segn 
+30c2 700c4000 jam 0 ,mem_mesh_segmented_lower_transport_layer_sego 
+30c3 6fe1cb37 fetch 3 ,mem_mesh_send_message_seq 
+30c4 d8401fff arg 0x1fff ,temp 
+30c5 98417e00 iand temp ,pdata 
+30c6 67e10c3e store 2 ,mem_mesh_segmented_lower_transport_layer_segzero 
+30c7 20600000 rtn 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_calc_header:
+30c8 6fe10c3e fetch 2 ,mem_mesh_segmented_lower_transport_layer_segzero 
+30c9 1ff27e00 lshift4 pdata ,pdata 
+30ca 1fe3fe00 lshift pdata ,pdata 
+30cb 68488c40 fetcht 1 ,mem_mesh_segmented_lower_transport_layer_sego 
+30cc 9841fe00 ior temp ,pdata 
+30cd 1ff27e00 lshift4 pdata ,pdata 
+30ce 1fe3fe00 lshift pdata ,pdata 
+30cf 68488c41 fetcht 1 ,mem_mesh_segmented_lower_transport_layer_segn 
+30d0 9841fe00 ior temp ,pdata 
+30d1 67e1cb47 store 3 ,mem_mesh_segmented_access_lower_transport_layer_szmic_seqzero_sego_segn 
+30d2 df200003 arg 3 ,loopcnt 
+30d3 da204b47 arg mem_mesh_segmented_access_lower_transport_layer_szmic_seqzero_sego_segn ,rega 
+30d4 20207d37 branch inverse_data 
+
+ali_mesh_upper_transport_layer_send_segmented_access_message_sub_segn_one:
+30d5 184085ff increase -1 ,temp 
+30d6 20600000 rtn 
+
+ali_mesh_upper_transport_layer_clear_tx_buffer:
+30d7 20600000 rtn 
+
+ali_mesh_loggint_tx_info_upper_send_packet:
+30d8 da200a10 arg mem_mesh_access_layer_payload ,rega 
+30d9 6f208a0f fetchr loopcnt ,1 ,mem_mesh_access_layer_payload_len 
+30da da400041 arg mesh_upper_send_packet ,regb 
+30db 202029db branch logging_tx_info 
+
+app_init:
+30dc 44d74015 bpatch patch15_6 ,mem_patch15 
+30dd 6fe0c09a fetch 1 ,mem_device_option 
+30de 203a30dc branch app_init ,blank 
+30df c0023620 beq dvc_op_dongle ,dongle_init 
+30e0 c007b247 beq dvc_op_antilost ,antilost_init 
+30e1 c004cad6 beq dvc_op_shutter ,shutter_init 
+30e2 c0053764 beq dvc_op_module ,module_init 
+30e3 c00733e2 beq dvc_op_car ,car_init 
+30e4 c006c9c0 beq dvc_op_remote_car ,remote_car_init 
+30e5 c0064cba beq dvc_op_hci_boot ,hci_init 
+30e6 c005adbb beq dvc_op_ali_mesh ,ali_mesh_init 
+30e7 c00293df beq dvc_op_test ,test_init 
+30e8 c0043bc1 beq dvc_op_mouse ,mouse_init 
+30e9 20600000 rtn 
+
+app_lpm_init:
+30ea 700a5100 jam 0 ,mem_tester_emulate 
+30eb 7000e400 jam 0 ,mem_debug_config 
+30ec 7000e500 jam 0 ,mem_lch_code 
+30ed 58000000 setarg 0 
+30ee 67e28870 store 5 ,mem_sp_state_start 
+30ef 6fe0c09a fetch 1 ,mem_device_option 
+30f0 203a30ea branch app_lpm_init ,blank 
+30f1 c005378d beq dvc_op_module ,module_lpm_init 
+
+app_lpm_init0:
+30f2 20600000 rtn 
+
+app_param_init:
+30f3 20758000 rtn wake 
+30f4 20405c15 call app_read_efuse_sys_config 
+30f5 20405c1e call app_read_efuse_dig_aon_vsel 
+30f6 20405c24 call app_read_efuse_syn_afc_cfg1 
+30f7 20405c29 call app_read_efuse_rf_ldo_cfg1 
+30f8 20405c2f call app_read_efuse_rc_cal 
+30f9 20405c33 call app_read_efuse_agc 
+30fa 6fe0c09a fetch 1 ,mem_device_option 
+30fb c004cc15 beq dvc_op_shutter ,shutter_default_init 
+30fc c002362c beq dvc_op_dongle ,dongle_default_init 
+30fd c0043c02 beq dvc_op_mouse ,mouse_default_init 
+30fe c006ca90 beq dvc_op_remote_car ,remote_car_default_init 
+30ff 20600000 rtn 
+
+app_sys_param_init:
+3100 7041efff jam 0xff ,mem_rf_init_data 
+3101 580041ef setarg mem_rf_init_data 
+3102 67e140ca store 2 ,mem_rf_init_ptr 
+3103 704790ff jam 0xff ,mem_ui_button_gpio 
+3104 70417a88 jam 0x88 ,mem_lpm_xtal_ib 
+3105 70417cce jam 0xce ,mem_lpm_padding 
+3106 20600000 rtn 
+
+app_process_idle:
+3107 204060dc call idle_read_adc_wait 
+3108 204077b9 call ui_dispatch 
+3109 20407887 call check_51cmd 
+310a 20403111 call app_process_bb_event 
+310b 6fe14465 fetch 2 ,mem_cb_idle_process 
+310c 20207e05 branch callback_func 
+
+app_process_bt:
+310d 6fe14463 fetch 2 ,mem_cb_bt_process 
+310e 20207e05 branch callback_func 
+
+app_process_ble:
+310f 6fe14461 fetch 2 ,mem_cb_le_process 
+3110 20207e05 branch callback_func 
+
+app_process_bb_event:
+3111 44d7c015 bpatch patch15_7 ,mem_patch15 
+3112 da204772 arg mem_ipc_fifo_bt2c51 ,rega 
+3113 20407e31 call fifo_out 
+3114 207a0000 rtn blank 
+3115 1fe22600 copy pdata ,regc 
+3116 2040311a call app_event_normal_process 
+3117 2020313f branch app_process_bb_event_priority 
+
+app_discard_event:
+3118 da600000 arg 0 ,regc 
+3119 20600000 rtn 
+
+app_event_normal_process:
+311a c000b12c beq bt_evt_bb_connected ,app_evt_bt_conn 
+311b c0083173 beq bt_evt_button_long_pressed ,app_evt_button_long_pressed 
+311c c002b150 beq bt_evt_setup_complete ,app_evt_setup_complete 
+311d c0093157 beq bt_evt_hid_handshake ,app_evt_hid_handshake 
+311e c003316f beq bt_evt_hid_connected ,app_bb_event_hid_connected 
+311f c00231b1 beq bt_evt_reconn_failed ,app_bb_event_reconn_failed 
+3120 c00131b6 beq bt_evt_bb_disconnected ,app_bb_event_bb_disconn 
+3121 c009b1b1 beq bt_evt_reconn_page_timeout ,app_bb_event_reconn_failed 
+3122 c00a3166 beq bt_evt_le_connected ,app_le_event_bb_connected 
+3123 c00ab16a beq bt_evt_le_disconnected ,app_le_event_bb_disconn 
+3124 c001b149 beq bt_evt_reconn_started ,app_event_reconn_start 
+3125 c005b15b beq bt_evt_enter_sniff ,app_event_enter_sniff 
+3126 c0063162 beq bt_evt_exit_sniff ,app_event_exit_sniff 
+3127 c00b3177 beq bt_evt_ml2cap_conn_refused ,app_event_ml2cap_conn_refused 
+3128 c00c3145 beq bt_evt_linkkey_generate ,app_event_linkkey_generate 
+3129 c0153135 beq bt_evt_switch_fail_master ,app_event_switch_fail_master 
+312a c015b133 beq bt_evt_switch_success_master ,app_event_switch_success 
+312b 20600000 rtn 
+
+app_evt_bt_conn:
+312c 6fe1478c fetch 2 ,mem_ui_state_map 
+312d 79207e00 set1 ui_state_bt_connected ,pdata 
+312e 67e1478c store 2 ,mem_ui_state_map 
+312f 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3130 793ffe00 set0 app_disc_by_button ,pdata 
+3131 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3132 202078c9 branch check_51cmd_stop_discovery 
+
+app_event_switch_success:
+3133 70030c00 jam 0 ,mem_switch_fail_master_count 
+3134 20600000 rtn 
+
+app_event_switch_fail_master:
+3135 6fe0830c fetch 1 ,mem_switch_fail_master_count 
+3136 1fe0fe01 increase 1 ,pdata 
+3137 67e0830c store 1 ,mem_switch_fail_master_count 
+3138 1fe67c01 sub pdata ,1 ,null 
+3139 202131ec branch app_bt_role_switch ,positive 
+313a 70030c00 jam 0 ,mem_switch_fail_master_count 
+313b 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+313c 79207e09 set1 app_disc_switch_fail ,pdata 
+313d 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+313e 202031f6 branch app_bt_disconnect 
+
+app_process_bb_event_priority:
+313f 6fe14467 fetch 2 ,mem_cb_bb_event_process 
+3140 20207e05 branch callback_func 
+
+app_check_wake_lock:
+3141 6fe1445b fetch 2 ,mem_cb_check_wakelock 
+3142 20207e05 branch callback_func 
+
+app_will_enter_lpm:
+3143 6fe1445f fetch 2 ,mem_cb_before_lpm 
+3144 20207e05 branch callback_func 
+
+app_event_linkkey_generate:
+3145 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3146 79207e01 set1 app_disc_after_pairing ,pdata 
+3147 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3148 2020321f branch app_bt_store_reconn_info 
+
+app_event_reconn_start:
+3149 6fe1478c fetch 2 ,mem_ui_state_map 
+314a 79207e07 set1 ui_state_bt_reconnect ,pdata 
+314b 67e1478c store 2 ,mem_ui_state_map 
+314c 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+314d 79207e02 set1 app_disc_after_reconn ,pdata 
+314e 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+314f 20600000 rtn 
+
+app_evt_setup_complete:
+3150 6fe1478c fetch 2 ,mem_ui_state_map 
+3151 79207e01 set1 ui_state_bt_setup_complete ,pdata 
+3152 67e1478c store 2 ,mem_ui_state_map 
+3153 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3154 79207e04 set1 app_disc_after_setup_done ,pdata 
+3155 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3156 20600000 rtn 
+
+app_evt_hid_handshake:
+3157 6fe1478c fetch 2 ,mem_ui_state_map 
+3158 79207e03 set1 ui_state_bt_hid_handshake ,pdata 
+3159 67e1478c store 2 ,mem_ui_state_map 
+315a 20600000 rtn 
+
+app_event_enter_sniff:
+315b 6fe1478c fetch 2 ,mem_ui_state_map 
+315c 79207e05 set1 ui_state_bt_sniff ,pdata 
+315d 67e1478c store 2 ,mem_ui_state_map 
+315e 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+315f 79207e03 set1 app_disc_after_sniff ,pdata 
+3160 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3161 20600000 rtn 
+
+app_event_exit_sniff:
+3162 6fe1478c fetch 2 ,mem_ui_state_map 
+3163 793ffe05 set0 ui_state_bt_sniff ,pdata 
+3164 67e1478c store 2 ,mem_ui_state_map 
+3165 20600000 rtn 
+
+app_le_event_bb_connected:
+3166 6fe1478c fetch 2 ,mem_ui_state_map 
+3167 79207e09 set1 ui_state_ble_connected ,pdata 
+3168 67e1478c store 2 ,mem_ui_state_map 
+3169 20600000 rtn 
+
+app_le_event_bb_disconn:
+316a 70443500 jam 0 ,mem_le_l2cap_att_states 
+316b 6fe1478c fetch 2 ,mem_ui_state_map 
+316c 793ffe09 set0 ui_state_ble_connected ,pdata 
+316d 67e1478c store 2 ,mem_ui_state_map 
+316e 20203225 branch app_lpm_mult_disable 
+
+app_bb_event_hid_connected:
+316f 6fe1478c fetch 2 ,mem_ui_state_map 
+3170 79207e02 set1 ui_state_bt_hid_conn ,pdata 
+3171 67e1478c store 2 ,mem_ui_state_map 
+3172 20600000 rtn 
+
+app_evt_button_long_pressed:
+3173 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3174 79207e00 set1 app_disc_by_button ,pdata 
+3175 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3176 20600000 rtn 
+
+app_event_ml2cap_conn_refused:
+3177 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+3178 79207e08 set1 app_disc_l2cap_refused ,pdata 
+3179 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+317a 202031f6 branch app_bt_disconnect 
+
+app_evt_timer:
+317b 67e0830d store 1 ,mem_app_evt_timer_count 
+
+app_evt_100ms_loop:
+317c 44d84016 bpatch patch16_0 ,mem_patch16 
+317d 6fe0830d fetch 1 ,mem_app_evt_timer_count 
+317e 207a0000 rtn blank 
+317f 1fe0ffff increase -1 ,pdata 
+3180 67e0830d store 1 ,mem_app_evt_timer_count 
+3181 204077c5 call ui_button_polling 
+3182 204031e3 call app_lpm_wake_auto_lock_timer 
+3183 204031a4 call app_unsniff_delay_timer 
+3184 204031aa call app_discovery_timer 
+3185 20405cdc call flash_write_spi_sm_timer 
+3186 204060d9 call adc_wait_timer 
+3187 6fe1446f fetch 2 ,mem_cb_event_timer 
+3188 20407e05 call callback_func 
+3189 2020317c branch app_evt_100ms_loop 
+
+timer_single_step:
+318a efe08013 ifetch 1 ,regc 
+318b 207a0000 rtn blank 
+318c 1fe0ffff pincrease -1 
+318d e7e08013 istore 1 ,regc 
+318e 247a0000 nrtn blank 
+318f 1a427e00 copy regb ,pdata 
+3190 20207e05 branch callback_func 
+
+timer_single_step_2b:
+3191 efe10013 ifetch 2 ,regc 
+3192 207a0000 rtn blank 
+3193 1fe0ffff pincrease -1 
+3194 e7e10013 istore 2 ,regc 
+3195 247a0000 nrtn blank 
+3196 1a427e00 copy regb ,pdata 
+3197 20207e05 branch callback_func 
+
+app_power_timer:
+3198 684944ca fetcht 2 ,mem_power_param_ptr 
+3199 1840a601 add temp ,power_timer_offset ,regc 
+319a da40319c arg app_power_timer_timeout ,regb 
+319b 2020318a branch timer_single_step 
+
+app_power_timer_timeout:
+319c 2040323b call app_got_power_state_common 
+319d c000b19f beq power_starting ,app_enter_power_stanby_state 
+
+app_enter_power_off_state:
+319e 20203217 branch app_enter_hibernate 
+
+app_enter_power_stanby_state:
+319f 58000002 setarg power_standby 
+31a0 e7e08013 istore 1 ,regc 
+31a1 1840a408 add temp ,power_standby_cb_offset ,regb 
+
+app_power_cb_common:
+31a2 efe10012 ifetch 2 ,regb 
+31a3 20207e05 branch callback_func 
+
+app_unsniff_delay_timer:
+31a4 da60447b arg mem_unsniff2sniff_timer_count ,regc 
+31a5 da4031a7 arg app_unsniff_delay_timeout ,regb 
+31a6 2020318a branch timer_single_step 
+
+app_unsniff_delay_timeout:
+31a7 20400a61 call context_check_idle 
+31a8 2022b21b branch app_bt_enter_sniff ,zero 
+31a9 20600000 rtn 
+
+app_discovery_timer:
+31aa da604788 arg mem_discovery_timeout_timer_count ,regc 
+31ab da4031ad arg app_discovery_timeout ,regb 
+31ac 20203191 branch timer_single_step_2b 
+
+app_discovery_timeout:
+31ad 204031fd call app_bt_stop_discovery 
+31ae 20403215 call app_led_off 
+31af 6fe14469 fetch 2 ,mem_cb_discovry_timeout 
+31b0 20207e05 branch callback_func 
+
+app_bb_event_reconn_failed:
+31b1 204031c9 call app_disconn_reason_flag_clear 
+
+app_clear_reconnect_flag:
+31b2 6fe1478c fetch 2 ,mem_ui_state_map 
+31b3 793ffe07 set0 ui_state_bt_reconnect ,pdata 
+31b4 67e1478c store 2 ,mem_ui_state_map 
+31b5 20600000 rtn 
+
+app_bb_event_bb_disconn:
+31b6 70447b00 jam 0 ,mem_unsniff2sniff_timer_count 
+31b7 6fe1478c fetch 2 ,mem_ui_state_map 
+31b8 c283b1bb bbit1 ui_state_bt_reconnect ,app_bb_event_bb_reconn_disconn 
+31b9 2fec0001 isolate0 ui_state_bt_setup_complete ,pdata 
+31ba 2040b118 call app_discard_event ,true 
+
+app_bb_event_bb_reconn_disconn:
+31bb 44d8c016 bpatch patch16_1 ,mem_patch16 
+31bc 6fe1478c fetch 2 ,mem_ui_state_map 
+31bd 793ffe00 set0 ui_state_bt_connected ,pdata 
+31be 793ffe01 set0 ui_state_bt_setup_complete ,pdata 
+31bf 793ffe02 set0 ui_state_bt_hid_conn ,pdata 
+31c0 793ffe03 set0 ui_state_bt_hid_handshake ,pdata 
+31c1 793ffe07 set0 ui_state_bt_reconnect ,pdata 
+31c2 67e1478c store 2 ,mem_ui_state_map 
+31c3 20203225 branch app_lpm_mult_disable 
+
+app_bb_hibernate:
+31c4 204031c6 call app_disconn_reason_clear 
+31c5 20203217 branch app_enter_hibernate 
+
+app_disconn_reason_clear:
+31c6 58000000 setarg 0 
+31c7 67e1447e store app_disc_rsn_size ,mem_app_disconn_reason 
+31c8 20600000 rtn 
+
+app_disconn_reason_flag_clear:
+31c9 58000000 setarg 0 
+31ca 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31cb 20600000 rtn 
+
+app_disconn_reason_collect_bt:
+31cc 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31cd 67e1447e store app_disc_rsn_size ,mem_app_disconn_reason 
+31ce 58000000 setarg 0 
+31cf 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31d0 20600000 rtn 
+
+app_disconn_reason_collect_ble:
+31d1 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31d2 79207e07 set1 app_disc_ble ,pdata 
+31d3 67e1447e store app_disc_rsn_size ,mem_app_disconn_reason 
+31d4 58000000 setarg 0 
+31d5 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+31d6 20600000 rtn 
+
+app_check_sniff:
+31d7 6fe0c78c fetch 1 ,mem_ui_state_map 
+31d8 2feffe05 isolate1 ui_state_bt_sniff ,pdata 
+31d9 20600000 rtn 
+
+app_start_auto_sniff:
+31da 6fe0c641 fetch 1 ,mem_unsniff2sniff_timer 
+31db 67e0c47b store 1 ,mem_unsniff2sniff_timer_count 
+31dc 20600000 rtn 
+
+app_get_lpm_wake_lock:
+31dd d8e00009 arg wake_lock_app ,queue 
+31de 202015ba branch lpm_get_wake_lock 
+
+app_put_lpm_wake_lock:
+31df d8e00009 arg wake_lock_app ,queue 
+31e0 202015be branch lpm_put_wake_lock 
+
+app_lpm_wake_auto_lock:
+31e1 70447c05 jam lpm_wake_up_delay_timer ,mem_wake_up_delay_timer 
+31e2 202031dd branch app_get_lpm_wake_lock 
+
+app_lpm_wake_auto_lock_timer:
+31e3 da60447c arg mem_wake_up_delay_timer ,regc 
+31e4 da4031df arg app_put_lpm_wake_lock ,regb 
+31e5 2020318a branch timer_single_step 
+
+app_l2cap_flow_control_enable:
+31e6 7045f301 jam l2cap_flow_ctrl_enable ,mem_l2cap_flow_ctrl_flag 
+31e7 20600000 rtn 
+
+app_l2cap_flow_control_disable:
+31e8 7045f300 jam l2cap_flow_ctrl_disable ,mem_l2cap_flow_ctrl_flag 
+31e9 20600000 rtn 
+
+app_bt_set_pincode:
+31ea 70095b0a jam bt_cmd_set_pin_code ,mem_fifo_temp 
+31eb 2020787a branch ui_ipc_send_cmd 
+
+app_bt_role_switch:
+31ec 70095b1d jam bt_cmd_role_switch ,mem_fifo_temp 
+31ed 2020787a branch ui_ipc_send_cmd 
+
+app_bt_start_reconnect:
+31ee 44d94016 bpatch patch16_2 ,mem_patch16 
+31ef 6fe0c47d fetch 1 ,mem_app_connection_options 
+31f0 67e080bd store 1 ,mem_connection_options 
+31f1 70030b01 jam app_flag_reconnect ,mem_reconnect_flag 
+31f2 70095b03 jam bt_cmd_reconnect ,mem_fifo_temp 
+31f3 2020787a branch ui_ipc_send_cmd 
+
+app_bt_reconnect_cancel:
+31f4 70095b1e jam bt_cmd_bb_reconn_cancel ,mem_fifo_temp 
+31f5 2020787a branch ui_ipc_send_cmd 
+
+app_bt_disconnect:
+31f6 70095b04 jam bt_cmd_disconnect ,mem_fifo_temp 
+31f7 2020787a branch ui_ipc_send_cmd 
+
+app_bt_start_discovery_short:
+31f8 6fe14791 fetch 2 ,mem_discovery_timeout 
+31f9 67e14788 store 2 ,mem_discovery_timeout_timer_count 
+
+app_bt_start_discovery_led_blink:
+31fa 20403211 call app_led_start_blink 
+
+app_bt_start_discovery:
+31fb 70095b01 jam bt_cmd_start_discovery ,mem_fifo_temp 
+31fc 2020787a branch ui_ipc_send_cmd 
+
+app_bt_stop_discovery:
+31fd 58000000 setarg 0 
+31fe 67e14788 store 2 ,mem_discovery_timeout_timer_count 
+31ff 70095b02 jam bt_cmd_stop_discovery ,mem_fifo_temp 
+3200 2020787a branch ui_ipc_send_cmd 
+
+app_ble_start_direct_adv:
+3201 70095b0f jam bt_cmd_start_direct_adv ,mem_fifo_temp 
+3202 2020787a branch ui_ipc_send_cmd 
+
+app_ble_stop_direct_adv:
+3203 70095b10 jam bt_cmd_stop_direct_adv ,mem_fifo_temp 
+3204 2020787a branch ui_ipc_send_cmd 
+
+app_ble_stop_adv:
+3205 70095b0e jam bt_cmd_stop_adv ,mem_fifo_temp 
+3206 2020787a branch ui_ipc_send_cmd 
+
+app_ble_start_adv:
+3207 70095b0d jam bt_cmd_start_adv ,mem_fifo_temp 
+3208 2020787a branch ui_ipc_send_cmd 
+
+app_ble_start_scan:
+3209 70095b17 jam bt_cmd_le_start_scan ,mem_fifo_temp 
+320a 2020787a branch ui_ipc_send_cmd 
+
+app_ble_stop_scan:
+320b 70095b18 jam bt_cmd_le_stop_scan ,mem_fifo_temp 
+320c 2020787a branch ui_ipc_send_cmd 
+
+app_ble_start_conn:
+320d 70095b16 jam bt_cmd_le_start_conn ,mem_fifo_temp 
+320e 2020787a branch ui_ipc_send_cmd 
+
+app_ble_disconnect:
+320f 70095b11 jam bt_cmd_le_disconnect ,mem_fifo_temp 
+3210 2020787a branch ui_ipc_send_cmd 
+
+app_led_start_blink:
+3211 70095b15 jam bt_cmd_led_blink ,mem_fifo_temp 
+3212 2020787a branch ui_ipc_send_cmd 
+
+app_led_on:
+3213 70095b14 jam bt_cmd_led_on ,mem_fifo_temp 
+3214 2020787a branch ui_ipc_send_cmd 
+
+app_led_stop_blink:
+
+app_led_off:
+3215 70095b13 jam bt_cmd_led_off ,mem_fifo_temp 
+3216 2020787a branch ui_ipc_send_cmd 
+
+app_enter_hibernate:
+3217 70095b19 jam bt_cmd_enter_hibernate ,mem_fifo_temp 
+3218 2020787a branch ui_ipc_send_cmd 
+
+app_bt_sniff_exit:
+3219 70095b06 jam bt_cmd_exit_sniff ,mem_fifo_temp 
+321a 2020787a branch ui_ipc_send_cmd 
+
+app_bt_enter_sniff:
+321b 70095b05 jam bt_cmd_enter_sniff ,mem_fifo_temp 
+321c 2020787a branch ui_ipc_send_cmd 
+
+app_ble_store_reconn_info:
+321d 70095b1f jam bt_cmd_store_reconn_info_le ,mem_fifo_temp 
+321e 2020787a branch ui_ipc_send_cmd 
+
+app_bt_store_reconn_info:
+321f 70095b20 jam bt_cmd_store_reconn_info_bt ,mem_fifo_temp 
+3220 2020787a branch ui_ipc_send_cmd 
+
+app_store_reconn_info:
+3221 70095b25 jam bt_cmd_store_reconn_info ,mem_fifo_temp 
+3222 2020787a branch ui_ipc_send_cmd 
+
+app_lpm_mult_enable:
+3223 7920000d set1 mark_lpm_mult_enable ,mark 
+3224 20600000 rtn 
+
+app_lpm_mult_disable:
+3225 793f800d set0 mark_lpm_mult_enable ,mark 
+3226 20600000 rtn 
+
+app_button_long_pressed:
+3227 2040323b call app_got_power_state_common 
+3228 c0013231 beq power_standby ,app_power_shutting_down 
+
+app_power_starting:
+3229 58000001 setarg power_starting 
+322a e7e08013 istore 1 ,regc 
+322b 1840a203 add temp ,power_starting_timeout_offset ,rega 
+322c 1840a406 add temp ,power_starting_cb_offset ,regb 
+
+app_power_common:
+322d e8408011 ifetcht 1 ,rega 
+322e 1a60a601 increase 1 ,regc 
+322f e0408013 istoret 1 ,regc 
+3230 202031a2 branch app_power_cb_common 
+
+app_power_shutting_down:
+3231 58000000 setarg power_off 
+3232 e7e08013 istore 1 ,regc 
+3233 6fe1478c fetch 2 ,mem_ui_state_map 
+3234 c304b237 bbit0 ui_state_ble_connected ,app_power_off_end 
+3235 20402187 call le_send_terminate_ind_user_terminated 
+3236 2040320f call app_ble_disconnect 
+
+app_power_off_end:
+3237 684944ca fetcht 2 ,mem_power_param_ptr 
+3238 1840a202 add temp ,power_off_timeout_offset ,rega 
+3239 1840a404 add temp ,power_off_cb_offset ,regb 
+323a 2020322d branch app_power_common 
+
+app_got_power_state_common:
+323b 684944ca fetcht 2 ,mem_power_param_ptr 
+323c 1840a600 add temp ,power_state_offset ,regc 
+323d efe08013 ifetch 1 ,regc 
+323e 20600000 rtn 
+
+app_event_button_up:
+323f 2040323b call app_got_power_state_common 
+3240 c0803242 bne power_off ,app_power_release 
+3241 20203217 branch app_enter_hibernate 
+
+app_power_release:
+3242 1840a40a add temp ,ui_butten_up_cb_offset ,regb 
+3243 202031a2 branch app_power_cb_common 
+
+app_hid_connected:
+3244 58000002 setarg hid_handshake_timeout 
+3245 67e0c78a store 1 ,mem_hid_handshake_timer_count 
+3246 20600000 rtn 
+
+antilost_init:
+3247 20758000 rtn wake 
+3248 58003276 setarg antilost_le_before_hibernate 
+3249 67e1445d store 2 ,mem_cb_before_hibernate 
+324a 58006197 setarg keyscan_process_lpm_before 
+324b 67e1445f store 2 ,mem_cb_before_lpm 
+324c 58003319 setarg antilost_idle_process 
+324d 67e14465 store 2 ,mem_cb_idle_process 
+324e 58003318 setarg antilost_le_conn_process 
+324f 67e14461 store 2 ,mem_cb_le_process 
+3250 58003291 setarg antilost_bb_event_process 
+3251 67e14467 store 2 ,mem_cb_bb_event_process 
+3252 580032ce setarg antilost_le_bb_event_timer 
+3253 67e1446f store 2 ,mem_cb_event_timer 
+3254 58003278 setarg antilost_le_notification 
+3255 67e1446d store 2 ,mem_cb_ble_transmit 
+3256 58003283 setarg antilost_lpm_lock_process 
+3257 67e1445b store 2 ,mem_cb_check_wakelock 
+3258 58003325 setarg antilost_le_receive_data_process 
+3259 67e1446b store 2 ,mem_cb_att_write 
+325a 44d9c016 bpatch patch16_3 ,mem_patch16 
+325b 204033be call antilost_buzzer_pwm_init 
+325c 20403274 call antilost_set_ble_version 
+325d 20406172 call keyscan_key_init 
+325e 204033d0 call antilost_adc_init 
+325f 204077f0 call ui_led_init_global 
+3260 204077bb call ui_button_init 
+3261 5800332f setarg antilost_key_up_down 
+3262 67e14870 store 2 ,mem_cb_antl_key 
+3263 58003320 setarg antilost_power_off_cb 
+3264 67e14867 store 2 ,mem_antl_power_off_cb 
+3265 5800331c setarg antilost_power_starting_cb 
+3266 67e14869 store 2 ,mem_antl_power_starting_cb 
+3267 5800327f setarg antilost_power_standby_cb 
+3268 67e1486b store 2 ,mem_antl_power_standby_cb 
+3269 580033c5 setarg antilost_led_on_cb 
+326a 67e147b3 store 2 ,mem_antl_led_cb_on 
+326b 580033c7 setarg antilost_led_off_cb 
+326c 67e147b5 store 2 ,mem_antl_led_cb_off 
+326d 580033cc setarg antilost_buzzer_on 
+326e 67e147be store 2 ,mem_antl_buzzer_cb_on 
+326f 580033c9 setarg antilost_buzzer_off 
+3270 67e147c0 store 2 ,mem_antl_buzzer_cb_off 
+3271 6fe1478c fetch 2 ,mem_ui_state_map 
+3272 c3860000 rtnbit1 ui_state_btn_down 
+3273 20203217 branch app_enter_hibernate 
+
+antilost_set_ble_version:
+3274 7045f707 jam 7 ,mem_lmp_version 
+3275 20600000 rtn 
+
+antilost_le_before_hibernate:
+3276 204033a9 call antilost_led_buzzer_stop_blink 
+3277 20203217 branch app_enter_hibernate 
+
+antilost_le_notification:
+3278 20401b77 call le_fifo_check_nearly_full 
+3279 247a0000 nrtn blank 
+327a da2009d2 arg mem_temp_block5 ,rega 
+327b 20407956 call queue_pop 
+327c 24740000 nrtn user 
+327d d8c009d2 arg mem_temp_block5 ,contr 
+327e 20204c0d branch le_send_notify_from_list 
+
+antilost_power_standby_cb:
+327f 6fe148a1 fetch 2 ,mem_antl_le_sleep_timeout 
+3280 67e1489b store 2 ,mem_antl_le_sleep_timer 
+3281 70485d01 jam 1 ,mem_antl_key_scan_enable 
+3282 202033b2 branch antilost_fast_adv_start 
+
+antilost_lpm_lock_process:
+3283 6fe0c8a7 fetch 1 ,mem_antl_key_state 
+3284 c000b28c beq 1 ,antilost_lpm_ctrl_for_led_buzzer 
+3285 6fe1478c fetch 2 ,mem_ui_state_map 
+3286 c304b28c bbit0 ui_state_ble_connected ,antilost_lpm_ctrl_for_led_buzzer 
+3287 6fe0c8a8 fetch 1 ,mem_antl_lost_mode 
+3288 c000b1dd beq 1 ,app_get_lpm_wake_lock 
+3289 6fe0c80a fetch 1 ,mem_antl_queue_curr_num 
+328a 243a31dd nbranch app_get_lpm_wake_lock ,blank 
+328b 202031df branch app_put_lpm_wake_lock 
+
+antilost_lpm_ctrl_for_led_buzzer:
+328c 6fe0c8a5 fetch 1 ,mem_antl_led_state 
+328d 6848c8a6 fetcht 1 ,mem_antl_buzzer_state 
+328e 9841fe00 ior temp ,pdata 
+328f c000b1dd beq 1 ,app_get_lpm_wake_lock 
+3290 202031df branch app_put_lpm_wake_lock 
+
+antilost_bb_event_process:
+3291 1a627e00 copy regc ,pdata 
+3292 c016b23f beq bt_evt_button_up ,app_event_button_up 
+3293 c0083227 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+3294 c00a3303 beq bt_evt_le_connected ,antilost_le_process_conn 
+3295 c00ab30c beq bt_evt_le_disconnected ,antilost_le_process_discon 
+3296 c0203299 beq bt_evt_le_parse_conn_papa_update_rsp ,antilost_le_conn_param_update_rsp_recieved 
+3297 c02232a3 beq bt_evt_le_parse_conn_param_accepted ,antilost_le_conn_param_accepted 
+3298 20600000 rtn 
+
+antilost_le_conn_param_update_rsp_recieved:
+3299 2040329f call antilost_le_conn_param_updata_judge 
+329a 6fe143db fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+329b c000b2a9 beq ble_signaling_connect_parameter_update_rejected ,antilost_le_conn_param_rejected 
+
+antilost_le_conn_param_updata_procedure_sucsess:
+329c 70489402 jam conn_param_updata_procedure_complete ,mem_antl_conn_updata_procedure_state 
+329d 7048993c jam 60 ,mem_antl_conn_update_timer 
+329e 20600000 rtn 
+
+antilost_le_conn_param_updata_judge:
+329f 6fe08287 fetch 1 ,mem_le_state 
+32a0 c3828000 rtnbit1 lestate_update_param 
+32a1 704a6001 jam 1 ,mem_lestate_update_param_flag 
+32a2 20600000 rtn 
+
+antilost_le_conn_param_accepted:
+32a3 6fe0ca60 fetch 1 ,mem_lestate_update_param_flag 
+32a4 207a0000 rtn blank 
+32a5 704a6000 jam 0 ,mem_lestate_update_param_flag 
+32a6 6fe102c3 fetch 2 ,mem_le_new_connslavelatency 
+32a7 203a32be branch antilost_master_nonsupport_latency ,blank 
+32a8 20600000 rtn 
+
+antilost_le_conn_param_rejected:
+32a9 6fe14376 fetch 2 ,mem_le_latency 
+32aa 203a32bc branch antilost_conn_param_updata_procedure_faild ,blank 
+
+antilost_conn_param_retransimiting:
+32ab 70489401 jam conn_param_updata_procedure_starting ,mem_antl_conn_updata_procedure_state 
+32ac 684948be fetcht 2 ,mem_interval_increment 
+32ad 6fe14372 fetch 2 ,mem_le_interval_min 
+32ae 9840fe00 iadd temp ,pdata 
+32af 67e14372 store 2 ,mem_le_interval_min 
+32b0 1fe22200 copy pdata ,rega 
+32b1 6fe14374 fetch 2 ,mem_le_interval_max 
+32b2 9840fe00 iadd temp ,pdata 
+32b3 67e14374 store 2 ,mem_le_interval_max 
+32b4 9a20fe00 iadd rega ,pdata 
+32b5 1fe30400 rshift pdata ,temp 
+32b6 6fe148ca fetch 2 ,mem_antl_le_unnormal_interval_max 
+32b7 9846fc00 idiv temp 
+32b8 20407dec call get_div_result 
+32b9 67e14376 store 2 ,mem_le_latency 
+32ba 70489a01 jam 1 ,mem_antl_send_updata_le_param_timer 
+32bb 20600000 rtn 
+
+antilost_conn_param_updata_procedure_faild:
+32bc 70489403 jam conn_param_updata_procedure_faild ,mem_antl_conn_updata_procedure_state 
+32bd 20600000 rtn 
+
+antilost_master_nonsupport_latency:
+32be 70417700 jam 0 ,mem_lpm_mult 
+32bf 70489a00 jam 0 ,mem_antl_send_updata_le_param_timer 
+32c0 6fe102c1 fetch 2 ,mem_le_new_conninterval 
+32c1 684948c8 fetcht 2 ,mem_antl_le_unnormal_interval_min 
+32c2 98467c00 isub temp ,null 
+32c3 79212200 setflag positive ,0 ,rega 
+32c4 6fe148ca fetch 2 ,mem_antl_le_unnormal_interval_max 
+32c5 684902c1 fetcht 2 ,mem_le_new_conninterval 
+32c6 98467e00 isub temp ,pdata 
+32c7 79212201 setflag positive ,1 ,rega 
+32c8 2a200603 compare 0x03 ,rega ,0x03 
+32c9 20608000 rtn true 
+32ca 6fe448c8 fetch 8 ,mem_antl_le_unnormal_interval_min 
+32cb 67e44372 store 8 ,mem_le_interval_min 
+32cc 70489a01 jam 1 ,mem_antl_send_updata_le_param_timer 
+32cd 20600000 rtn 
+
+antilost_le_bb_event_timer:
+32ce 20403198 call app_power_timer 
+32cf 204032dd call antilost_double_click_timer 
+32d0 204032e2 call antilost_le_fast_adv_timer 
+32d1 204032f9 call antilost_le_sleep_timer 
+32d2 204032ee call antilost_app_updata_le_param_timer 
+32d3 204032e8 call antilost_conn_update_timer 
+32d4 204032d6 call antilost_conn_battery_send_timer 
+32d5 202032fd branch antilost_adc_check_timer 
+
+antilost_conn_battery_send_timer:
+32d6 da604a61 arg mem_antilost_conn_battery_send_timer ,regc 
+32d7 da4032d9 arg antilost_conn_battery_send ,regb 
+32d8 2020318a branch timer_single_step 
+
+antilost_conn_battery_send:
+32d9 204033d2 call antilost_battery_process 
+32da 204033d2 call antilost_battery_process 
+32db 204033d2 call antilost_battery_process 
+32dc 202033dc branch antilost_battery_calculate_end 
+
+antilost_double_click_timer:
+32dd da6048a3 arg mem_double_click_timer ,regc 
+32de da4032e0 arg antilost_double_click_timeout ,regb 
+32df 2020318a branch timer_single_step 
+
+antilost_double_click_timeout:
+32e0 7048a400 jam 0 ,mem_butten_click_cnt 
+32e1 20600000 rtn 
+
+antilost_le_fast_adv_timer:
+32e2 da60489d arg mem_antl_fast_adv_timer ,regc 
+32e3 da4032e5 arg antilost_le_fast_adv_timeout ,regb 
+32e4 20203191 branch timer_single_step_2b 
+
+antilost_le_fast_adv_timeout:
+32e5 da6047c9 arg mem_antl_slow_adv_led_style ,regc 
+32e6 da4047a8 arg mem_antl_slow_adv_lpm_interval ,regb 
+32e7 202033b4 branch antilost_adv_start_common 
+
+antilost_conn_update_timer:
+32e8 da604899 arg mem_antl_conn_update_timer ,regc 
+32e9 da4032eb arg antilost_conn_update_timer_time_out ,regb 
+32ea 2020318a branch timer_single_step 
+
+antilost_conn_update_timer_time_out:
+32eb 6fe14376 fetch 2 ,mem_le_latency 
+32ec 67e0c177 store 1 ,mem_lpm_mult 
+32ed 20600000 rtn 
+
+antilost_app_updata_le_param_timer:
+32ee da60489a arg mem_antl_send_updata_le_param_timer ,regc 
+32ef da4032f1 arg antilost_app_updata_le_param_timeout ,regb 
+32f0 2020318a branch timer_single_step 
+
+antilost_app_updata_le_param_timeout:
+32f1 6fe08287 fetch 1 ,mem_le_state 
+32f2 2fe0c000 compare 0 ,pdata ,0x60 
+32f3 2420b2f7 nbranch antilost_wait_for_updata_param_instant_expire ,true 
+32f4 70489401 jam conn_param_updata_procedure_starting ,mem_antl_conn_updata_procedure_state 
+32f5 20403223 call app_lpm_mult_enable 
+32f6 20201f57 branch le_l2cap_tx_update_req 
+
+antilost_wait_for_updata_param_instant_expire:
+32f7 70489a01 jam 1 ,mem_antl_send_updata_le_param_timer 
+32f8 20600000 rtn 
+
+antilost_le_sleep_timer:
+32f9 da60489b arg mem_antl_le_sleep_timer ,regc 
+32fa da4032fc arg antilost_le_sleep_timer_timeout ,regb 
+32fb 20203191 branch timer_single_step_2b 
+
+antilost_le_sleep_timer_timeout:
+32fc 20203227 branch app_button_long_pressed 
+
+antilost_adc_check_timer:
+32fd da604897 arg mem_adc_timer ,regc 
+32fe da403300 arg antilost_adc_check_timer_timeout ,regb 
+32ff 20203191 branch timer_single_step_2b 
+
+antilost_adc_check_timer_timeout:
+3300 6fe148b1 fetch 2 ,mem_adc_timeout 
+3301 67e14897 store 2 ,mem_adc_timer 
+3302 202033d2 branch antilost_battery_process 
+
+antilost_le_process_conn:
+3303 6fe148b1 fetch 2 ,mem_adc_timeout 
+3304 67e14897 store 2 ,mem_adc_timer 
+3305 58000000 setarg 0 
+3306 67e1489d store 2 ,mem_antl_fast_adv_timer 
+3307 67e1489b store 2 ,mem_antl_le_sleep_timer 
+3308 20403380 call antilost_alert_off 
+3309 204033a9 call antilost_led_buzzer_stop_blink 
+330a 70417700 jam 0 ,mem_lpm_mult 
+330b 20203205 branch app_ble_stop_adv 
+
+antilost_le_process_discon:
+330c 58000000 setarg 0 
+330d 67e24897 store 4 ,mem_adc_timer 
+330e 67e1c894 store 3 ,mem_antl_conn_updata_procedure_state 
+330f 67e143db store 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+3310 7048aa01 jam 1 ,mem_alarm_config_notfy_cnt 
+3311 6fe148a1 fetch 2 ,mem_antl_le_sleep_timeout 
+3312 67e1489b store 2 ,mem_antl_le_sleep_timer 
+3313 2040793a call queue_init 
+3314 6fe0c863 fetch 1 ,mem_antl_power_state 
+3315 c1000000 rtneq power_off 
+3316 204033b2 call antilost_fast_adv_start 
+3317 20203392 branch antilost_on_off_alarm_after_disconn 
+
+antilost_le_conn_process:
+3318 2020332c branch antilost_key_process 
+
+antilost_idle_process:
+3319 6fe0c863 fetch 1 ,mem_antl_power_state 
+331a c1810000 rtnne power_standby 
+331b 2020332c branch antilost_key_process 
+
+antilost_power_starting_cb:
+331c da6047d7 arg mem_antl_power_starting_buzzer_style ,regc 
+331d 204033a5 call antilost_buzzer_configuration 
+331e da6047d0 arg mem_antl_power_starting_led_style ,regc 
+
+antilost_power_common:
+331f 202033a7 branch antilost_led_configuration 
+
+antilost_power_off_cb:
+3320 70442700 jam off ,mem_le_adv_enable 
+3321 da6047e5 arg mem_antl_power_off_buzzer_style ,regc 
+3322 204033a5 call antilost_buzzer_configuration 
+3323 da6047de arg mem_antl_power_off_led_style ,regc 
+3324 2020331f branch antilost_power_common 
+
+antilost_le_receive_data_process:
+3325 6fe0c436 fetch 1 ,mem_le_att_opcode 
+3326 c0093328 beq attop_write_request ,antilost_le_parse_att_write_request 
+3327 20600000 rtn 
+
+antilost_le_parse_att_write_request:
+3328 6fe14437 fetch 2 ,mem_le_att_handle 
+3329 c006b35a beq new_spec_write_handle ,antilost_cmd_parse_for_application 
+332a c005b395 beq new_spec_notification_enable_handle ,antilost_notify_alarm_config_first_time 
+332b 20600000 rtn 
+
+antilost_key_process:
+332c 6fe0c85d fetch 1 ,mem_antl_key_scan_enable 
+332d 207a0000 rtn blank 
+332e 202061a3 branch keyscan_key_process 
+
+antilost_key_up_down:
+332f 1a227e00 copy rega ,pdata 
+3330 203a3334 branch antilost_key_is_up ,blank 
+
+antilost_key_is_down:
+3331 18e27e00 copy queue ,pdata 
+3332 c0003337 beq 0 ,antilost_key0_down 
+3333 20600000 rtn 
+
+antilost_key_is_up:
+3334 18e27e00 copy queue ,pdata 
+3335 c000333f beq 0 ,antilost_key0_up 
+3336 20600000 rtn 
+
+antilost_key0_down:
+3337 7048a701 jam 1 ,mem_antl_key_state 
+3338 da604801 arg mem_antl_key_buzzer_style ,regc 
+3339 204033a5 call antilost_buzzer_configuration 
+333a da6047fa arg mem_antl_key_led_style ,regc 
+333b 204033a7 call antilost_led_configuration 
+333c 6fe1478c fetch 2 ,mem_ui_state_map 
+333d c304b356 bbit0 ui_state_ble_connected ,antilost_butten_down_while_disconn 
+333e 20203345 branch antilost_butten_down_after_conn 
+
+antilost_key0_up:
+333f 7048a700 jam 0 ,mem_antl_key_state 
+3340 20203341 branch antilost_double_click_timer_init 
+
+antilost_double_click_timer_init:
+3341 6fe0c8a4 fetch 1 ,mem_butten_click_cnt 
+3342 c1808000 rtnne 1 
+3343 7048a305 jam 5 ,mem_double_click_timer 
+3344 20600000 rtn 
+
+antilost_butten_down_after_conn:
+3345 6fe0c8a4 fetch 1 ,mem_butten_click_cnt 
+3346 1fe0fe01 pincrease 1 
+3347 67e0c8a4 store 1 ,mem_butten_click_cnt 
+3348 c000b34b beq 1 ,antilost_click_once 
+3349 c001334f beq 2 ,antilost_click_twice 
+334a 20600000 rtn 
+
+antilost_click_once:
+334b 20403380 call antilost_alert_off 
+334c 70487b01 jam opcode1_butten_click_once ,mem_antl_key0_press + 5 
+334d da604876 arg mem_antl_key0_press ,regc 
+334e 20203368 branch antilost_prepare_data_and_send 
+
+antilost_click_twice:
+334f 7048a400 jam 0 ,mem_butten_click_cnt 
+3350 70487b02 jam opcode2_butten_double_click ,mem_antl_key0_press + 5 
+3351 da604876 arg mem_antl_key0_press ,regc 
+3352 20403368 call antilost_prepare_data_and_send 
+3353 6fe0c8a8 fetch 1 ,mem_antl_lost_mode 
+3354 c000b375 beq 1 ,antilost_alert_on 
+3355 20600000 rtn 
+
+antilost_butten_down_while_disconn:
+3356 6fe148a1 fetch 2 ,mem_antl_le_sleep_timeout 
+3357 67e1489b store 2 ,mem_antl_le_sleep_timer 
+3358 20403380 call antilost_alert_off 
+3359 202033b2 branch antilost_fast_adv_start 
+
+antilost_cmd_parse_for_application:
+335a 44da4016 bpatch patch16_4 ,mem_patch16 
+335b 204034f3 call le_app_receive_data 
+335c efe08011 ifetch 1 ,rega 
+335d c001b360 beq opcode3_antl_start_alram ,antilost_on_of_alram 
+335e c003b364 beq opcode7_antl_config_alram ,antilost_configuration_for_alram 
+335f 20600000 rtn 
+
+antilost_on_of_alram:
+3360 6fe0c8a8 fetch 1 ,mem_antl_lost_mode 
+3361 c0003375 beq anti_le_alarm_off ,antilost_alert_on 
+3362 c000b380 beq anti_le_alarm_on ,antilost_alert_off 
+3363 20600000 rtn 
+
+antilost_configuration_for_alram:
+3364 efe08012 ifetch 1 ,regb 
+3365 c000b388 beq 1 ,antilost_set_start_alarm_after_disconn 
+3366 c000338d beq 0 ,antilost_set_no_alarm_after_disconn 
+3367 20600000 rtn 
+
+antilost_prepare_data_and_send:
+3368 44dac016 bpatch patch16_5 ,mem_patch16 
+3369 6fe0c895 fetch 1 ,mem_client_characteristic_configuration_descriptor 
+336a 2feffe00 isolate1 notification_enable_bit ,pdata 
+336b 24608000 nrtn true 
+336c 1a608c06 add regc ,6 ,contr 
+336d efe10006 ifetch 2 ,contr 
+336e 1ff0fe00 byteswap pdata ,pdata 
+336f 1fe0f205 add pdata ,5 ,loopcnt 
+3370 1a608c03 add regc ,3 ,contr 
+3371 204034e7 call calc_check_sum_start 
+3372 e7e08006 istore 1 ,contr 
+3373 1a622200 copy regc ,rega 
+3374 2020793f branch queue_push 
+
+antilost_alert_on:
+3375 6fe0c863 fetch 1 ,mem_antl_power_state 
+3376 207a0000 rtn blank 
+3377 7048a801 jam 1 ,mem_antl_lost_mode 
+3378 da6047f3 arg mem_antl_alert_buzzer_stlye ,regc 
+3379 204033a5 call antilost_buzzer_configuration 
+337a da6047ec arg mem_antl_alert_led_stlye ,regc 
+337b 204033a7 call antilost_led_configuration 
+337c 70488a04 jam opcode4_current_alarm_state ,mem_antl_key0_release + 5 
+337d 70488d01 jam 1 ,mem_antl_key0_release + 8 
+337e da604885 arg mem_antl_key0_release ,regc 
+337f 20203368 branch antilost_prepare_data_and_send 
+
+antilost_alert_off:
+3380 6fe0c8a8 fetch 1 ,mem_antl_lost_mode 
+3381 207a0000 rtn blank 
+3382 7048a800 jam 0 ,mem_antl_lost_mode 
+3383 204033a9 call antilost_led_buzzer_stop_blink 
+3384 70488a04 jam opcode4_current_alarm_state ,mem_antl_key0_release + 5 
+3385 70488d00 jam 0 ,mem_antl_key0_release + 8 
+3386 da604885 arg mem_antl_key0_release ,regc 
+3387 20203368 branch antilost_prepare_data_and_send 
+
+antilost_set_start_alarm_after_disconn:
+3388 7048a901 jam 1 ,mem_alarm_config 
+3389 70488a07 jam opcode7_antl_config_alram ,mem_antl_key0_release + 5 
+338a 70488d01 jam 1 ,mem_antl_key0_release + 8 
+338b da604885 arg mem_antl_key0_release ,regc 
+338c 20203368 branch antilost_prepare_data_and_send 
+
+antilost_set_no_alarm_after_disconn:
+338d 7048a900 jam 0 ,mem_alarm_config 
+338e 70488a07 jam opcode7_antl_config_alram ,mem_antl_key0_release + 5 
+338f 70488d00 jam 0 ,mem_antl_key0_release + 8 
+3390 da604885 arg mem_antl_key0_release ,regc 
+3391 20203368 branch antilost_prepare_data_and_send 
+
+antilost_on_off_alarm_after_disconn:
+3392 6fe0c8a9 fetch 1 ,mem_alarm_config 
+3393 207a0000 rtn blank 
+3394 20203375 branch antilost_alert_on 
+
+antilost_notify_alarm_config_first_time:
+3395 efe10011 ifetch 2 ,rega 
+3396 67e14895 store 2 ,mem_client_characteristic_configuration_descriptor 
+3397 2feffe00 isolate1 notification_enable_bit ,pdata 
+3398 24608000 nrtn true 
+3399 6fe0c8aa fetch 1 ,mem_alarm_config_notfy_cnt 
+339a 207a0000 rtn blank 
+339b 7048aa00 jam 0 ,mem_alarm_config_notfy_cnt 
+339c 6fe448c0 fetch 8 ,mem_antl_le_interval_min 
+339d 67e44372 store 8 ,mem_le_interval_min 
+339e 704a6103 jam 3 ,mem_antilost_conn_battery_send_timer 
+339f 70488a07 jam opcode7_antl_config_alram ,mem_antl_key0_release + 5 
+33a0 70489a1e jam 30 ,mem_antl_send_updata_le_param_timer 
+33a1 6fe0c8a9 fetch 1 ,mem_alarm_config 
+33a2 67e0c88d store 1 ,mem_antl_key0_release + 8 
+33a3 da604885 arg mem_antl_key0_release ,regc 
+33a4 20203368 branch antilost_prepare_data_and_send 
+
+antilost_buzzer_configuration:
+33a5 da200001 arg 1 ,rega 
+33a6 202033a8 branch antilost_configuration_common 
+
+antilost_led_configuration:
+33a7 da200000 arg 0 ,rega 
+
+antilost_configuration_common:
+33a8 202033af branch antilost_led_buzzer_style_configuration 
+
+antilost_led_buzzer_stop_blink:
+33a9 da200000 arg 0 ,rega 
+33aa 20407801 call ui_led_blink_stop_global 
+33ab da200001 arg 1 ,rega 
+33ac 20407801 call ui_led_blink_stop_global 
+33ad 6fe148ab fetch 2 ,mem_buzzer_pwm_conf 
+33ae 20206216 branch pwm_disable 
+
+antilost_led_buzzer_style_configuration:
+33af 204077ec call calc_curr_struct_prt 
+33b0 df200007 arg 7 ,loopcnt 
+33b1 2020780e branch ui_led_set_style_global + 2 
+
+antilost_fast_adv_start:
+33b2 da6047c2 arg mem_antl_fast_adv_led_style ,regc 
+33b3 da4047a4 arg mem_antl_lpm_interval ,regb 
+
+antilost_adv_start_common:
+33b4 204033b9 call antilost_adv_interval_lpm_interval_set 
+33b5 204033a7 call antilost_led_configuration 
+33b6 6fe1489f fetch 2 ,mem_antl_fast_adv_timeout 
+33b7 67e1489d store 2 ,mem_antl_fast_adv_timer 
+33b8 20203207 branch app_ble_start_adv 
+
+antilost_adv_interval_lpm_interval_set:
+33b9 efe10012 ifetch 2 ,regb 
+33ba 67e14159 store 2 ,mem_lpm_interval 
+33bb efe10006 ifetch 2 ,contr 
+33bc 67e14428 store 2 ,mem_le_adv_interval 
+33bd 20600000 rtn 
+
+antilost_buzzer_pwm_init:
+33be da200000 arg 0 ,rega 
+33bf 204061d1 call pwm_init 
+33c0 6fe348ab fetch 6 ,mem_buzzer_pwm_conf 
+33c1 67e3095c store 6 ,mem_pdatatemp 
+33c2 204061f8 call pwm_out_set 
+33c3 6fe148ab fetch 2 ,mem_buzzer_pwm_conf 
+33c4 20206216 branch pwm_disable 
+
+antilost_led_on_cb:
+33c5 7048a501 jam 1 ,mem_antl_led_state 
+33c6 20600000 rtn 
+
+antilost_led_off_cb:
+33c7 7048a500 jam 0 ,mem_antl_led_state 
+33c8 20600000 rtn 
+
+antilost_buzzer_off:
+33c9 7048a600 jam 0 ,mem_antl_buzzer_state 
+33ca 6fe148ab fetch 2 ,mem_buzzer_pwm_conf 
+33cb 20206216 branch pwm_disable 
+
+antilost_buzzer_on:
+33cc 7048a601 jam 1 ,mem_antl_buzzer_state 
+33cd 6fe348ab fetch 6 ,mem_buzzer_pwm_conf 
+33ce 67e3095c store 6 ,mem_pdatatemp 
+33cf 202061f8 branch pwm_out_set 
+
+antilost_adc_init:
+33d0 7044a000 jam 0 ,mem_adc_config_flag 
+33d1 20600000 rtn 
+
+antilost_battery_process:
+33d2 20406125 call vdd_calculate_by_mode 
+33d3 67e148ba store 2 ,mem_battery_current_voltage 
+33d4 da2048b4 arg mem_battery_calculate_set ,rega 
+33d5 20406152 call adc_bat_percent_lowpower_out 
+33d6 67e0c8b3 store 1 ,mem_voltage_remain_percent 
+33d7 58000065 setarg 0x65 
+33d8 c00033e1 beq 0 ,antilost_low_battery 
+33d9 1fe67c64 sub pdata ,0x64 ,null 
+33da 242133df nbranch antilost_full_battery ,positive 
+33db 67e0c88d store 1 ,mem_antl_key0_release + 8 
+
+antilost_battery_calculate_end:
+33dc 70488a05 jam opcode5_batter_information ,mem_antl_key0_release + 5 
+33dd da604885 arg mem_antl_key0_release ,regc 
+33de 20203368 branch antilost_prepare_data_and_send 
+
+antilost_full_battery:
+33df 70488d64 jam 100 ,mem_antl_key0_release + 8 
+33e0 202033dc branch antilost_battery_calculate_end 
+
+antilost_low_battery:
+33e1 20203227 branch app_button_long_pressed 
+
+car_init:
+33e2 20758000 rtn wake 
+33e3 20406df3 call enable_authrom 
+33e4 580035da setarg car_g24_receive_process 
+33e5 67e14889 store 2 ,mem_cb_24g_receive_process 
+33e6 5800239e setarg g24_bind_ackpayload_prep 
+33e7 67e1488b store 2 ,mem_cb_24g_ackpayload 
+33e8 5800360c setarg car_g24_cb_data_device1 
+33e9 67e1488d store 2 ,mem_cb_24g_data_device1 
+33ea 5800345e setarg car_le_before_hibernate 
+33eb 67e1445d store 2 ,mem_cb_before_hibernate 
+33ec 58003460 setarg car_le_process_lpm_before 
+33ed 67e1445f store 2 ,mem_cb_before_lpm 
+33ee 58003217 setarg app_enter_hibernate 
+33ef 67e14469 store 2 ,mem_cb_discovry_timeout 
+33f0 58003462 setarg car_scale_process_idle 
+33f1 67e14465 store 2 ,mem_cb_idle_process 
+33f2 58003483 setarg car_scale_process_bb_event 
+33f3 67e14467 store 2 ,mem_cb_bb_event_process 
+33f4 580031dd setarg app_get_lpm_wake_lock 
+33f5 67e1445b store 2 ,mem_cb_check_wakelock 
+33f6 580034ed setarg car_le_receive_data 
+33f7 67e1446b store 2 ,mem_cb_att_write 
+33f8 580034ad setarg car_le_bb_event_timer 
+33f9 67e1446f store 2 ,mem_cb_event_timer 
+33fa 44db4016 bpatch patch16_6 ,mem_patch16 
+33fb 20403444 call car_init_environment 
+33fc 20403470 call car_lpm_timer_enable 
+33fd 2040793a call queue_init 
+33fe 70417702 jam 2 ,mem_lpm_mult 
+33ff 704c5800 jam power_on ,mem_car_24g_received_pac 
+3400 6fe0ca1a fetch 1 ,mem_car_config_soft_switch_enable 
+3401 67e0c8e9 store 1 ,mem_car_hard_soft_switch 
+3402 c000340d beq hard_switch ,car_hard_switch_power_on_signal 
+3403 6fe0ca1b fetch 1 ,mem_car_config_soft_switch_gpio 
+3404 67e0c790 store 1 ,mem_ui_button_gpio 
+3405 70442700 jam off ,mem_le_adv_enable 
+
+car_soft_switch_power_on_init:
+3406 204077bb call ui_button_init 
+3407 204077c5 call ui_button_polling 
+3408 704a4201 jam power_starting ,mem_car_power_state 
+3409 6fe1478c fetch 2 ,mem_ui_state_map 
+340a c3860000 rtnbit1 ui_state_btn_down 
+340b 20203217 branch app_enter_hibernate 
+
+car_power_off_signal:
+340c 2020342b branch car_ui_led_init 
+
+car_hard_switch_power_on_signal:
+340d 704a4202 jam power_standby ,mem_car_power_state 
+
+car_soft_switch_power_on_signal:
+340e 70442701 jam on ,mem_le_adv_enable 
+340f 58000020 setarg fast_adv_interval_value_car 
+3410 20404c09 call shutter_ble_adv_interval_set 
+
+car_le_modified_name_adv:
+3411 d8a042ff arg mem_le_name + 7 ,contw 
+3412 6fe0c37a fetch 1 ,mem_le_lap 
+
+car_name_loop:
+3413 1fe104f0 and pdata ,0xF0 ,temp 
+3414 18518400 rshift4 temp ,temp 
+3415 20403425 call car_hex_to_ascii 
+3416 e0408005 istoret 1 ,contw 
+3417 1fe1040f and pdata ,0x0F ,temp 
+3418 20403425 call car_hex_to_ascii 
+3419 e0408005 istoret 1 ,contw 
+341a 20401aac call le_modified_name_att_list 
+341b 6848c2f7 fetcht 1 ,mem_le_name_len 
+341c 18427200 copy temp ,loopcnt 
+341d d8a043ea arg mem_le_adv_data + 2 ,contw 
+341e d8c042f8 arg mem_le_name ,contr 
+341f 20407d5f call memcpy 
+
+car_le_modified_name_scan:
+3420 6848c2f7 fetcht 1 ,mem_le_name_len 
+3421 18427200 copy temp ,loopcnt 
+3422 d8a0440a arg mem_le_scan_data + 2 ,contw 
+3423 d8c042f8 arg mem_le_name ,contr 
+3424 20207d5f branch memcpy 
+
+car_hex_to_ascii:
+3425 18467c09 sub temp ,9 ,null 
+3426 20213429 branch car_hex_num ,positive 
+3427 18408437 add temp ,55 ,temp 
+3428 20600000 rtn 
+
+car_hex_num:
+3429 18408430 add temp ,48 ,temp 
+342a 20600000 rtn 
+
+car_ui_led_init:
+342b 6fe0ca0f fetch 1 ,mem_car_config_blood_led1_gpio 
+342c c0ffb43d bne invalid_pin_num ,car_blood_led_gpio_set 
+
+car_ui_led_init_1:
+342d 6fe0ca0d fetch 1 ,mem_car_config_pairing_led_gpio 
+342e c0ffb440 bne invalid_pin_num ,car_pairing_led_gpio_set 
+
+car_ui_led_init_2:
+342f 6fe0ca18 fetch 1 ,mem_car_config_low_voltage_led_gpio 
+3430 c0ffb442 bne invalid_pin_num ,car_low_voltage_led_gpio_set 
+
+car_ui_led_init_3:
+3431 6fe0c97b fetch 1 ,mem_car_led_num 
+3432 1fe27200 copy pdata ,loopcnt 
+3433 5800497c setarg mem_car_led_map 
+3434 1fe22200 copy pdata ,rega 
+
+car_in_lp1:
+3435 1a220c00 copy rega ,contr 
+3436 efe08006 ifetch 1 ,contr 
+3437 18c22200 copy contr ,rega 
+3438 c07fb43b beq invalid_pin_num ,car_in_lp1_end 
+3439 1fe20400 copy pdata ,temp 
+343a 20406069 call gpio_config_output 
+
+car_in_lp1_end:
+343b c2003435 loop car_in_lp1 
+
+car_ui_led_init_end:
+343c 20600000 rtn 
+
+car_blood_led_gpio_set:
+343d 6fe44a0f fetch 8 ,mem_car_config_blood_led1_gpio 
+343e 67e4497e store 8 ,mem_car_led_map + 2 
+343f 2020342d branch car_ui_led_init_1 
+
+car_pairing_led_gpio_set:
+3440 67e0c97c store 1 ,mem_car_led_map 
+3441 2020342f branch car_ui_led_init_2 
+
+car_low_voltage_led_gpio_set:
+3442 67e0c97d store 1 ,mem_car_led_map + 1 
+3443 20203431 branch car_ui_led_init_3 
+
+car_init_environment:
+3444 204035d6 call car_g24_init 
+3445 da200000 arg 0 ,rega 
+3446 204061d1 call pwm_init 
+3447 2040342b call car_ui_led_init 
+3448 20403478 call car_start_blink 
+3449 2040345c call car_init_adc_hvin 
+344a 2020344b branch car_motor_init 
+
+car_motor_init:
+344b 6fe0cc45 fetch 1 ,mem_car_motor_gpio_num 
+344c 1fe27200 copy pdata ,loopcnt 
+344d 58004c46 setarg mem_car_motor_gpio_map 
+344e 1fe22200 copy pdata ,rega 
+
+p_in_lp1:
+344f 1a220c00 copy rega ,contr 
+3450 efe08006 ifetch 1 ,contr 
+3451 18c22200 copy contr ,rega 
+3452 c07fb456 beq invalid_pin_num ,p_in_lp1_end 
+3453 1fe20400 copy pdata ,temp 
+3454 67e0cc4a store 1 ,mem_car_gpio 
+3455 20403458 call car_ui_gpio_init 
+
+p_in_lp1_end:
+3456 c200344f loop p_in_lp1 
+
+p_car_ui_led_init_end:
+3457 20600000 rtn 
+
+car_ui_gpio_init:
+3458 6fe0cc4a fetch 1 ,mem_car_gpio 
+3459 c17f8000 rtneq ui_button_gpio_disable 
+345a 98000400 iforce temp 
+345b 20206069 branch gpio_config_output 
+
+car_init_adc_hvin:
+345c 704a1e64 jam 100 ,mem_car_notify_vdd_value_last 
+345d 20600000 rtn 
+
+car_le_before_hibernate:
+345e 2040609d call gpio_set_before_lpm_common 
+345f 20206197 branch keyscan_process_lpm_before 
+
+car_le_process_lpm_before:
+3460 20206197 branch keyscan_process_lpm_before 
+
+car_key_scan_process:
+3461 202061a3 branch keyscan_key_process 
+
+car_scale_process_idle:
+3462 2040347a call car_le_send_packet 
+3463 20403465 call car_g24_status_process 
+3464 20203461 branch car_key_scan_process 
+
+car_g24_status_process:
+3465 6fe1478c fetch 2 ,mem_ui_state_map 
+3466 c3848000 rtnbit1 ui_state_ble_connected 
+3467 6fe0cc58 fetch 1 ,mem_car_24g_received_pac 
+3468 c000b46a beq work_paired ,car_g24_connected_event 
+3469 20600000 rtn 
+
+car_g24_connected_event:
+346a 6fe0ca39 fetch 1 ,mem_car_24g_status 
+346b c1008000 rtneq work_paired 
+346c 704a3901 jam work_paired ,mem_car_24g_status 
+346d 20403474 call car_lpm_timer_disable 
+346e 20403476 call car_stop_blink 
+346f 2020348d branch car_g24_connected 
+
+car_lpm_timer_enable:
+3470 6fe14c5d fetch 2 ,mem_car_enter_lpm_timer_count 
+3471 67e14c5f store 2 ,mem_car_enter_lpm_timer 
+3472 704c6100 jam 0 ,mem_car_enter_lpm_flag 
+3473 20600000 rtn 
+
+car_lpm_timer_disable:
+3474 58000000 setarg 0 
+3475 20203471 branch car_lpm_timer_enable + 1 
+
+car_stop_blink:
+3476 da200000 arg 0 ,rega 
+3477 20207801 branch ui_led_blink_stop_global 
+
+car_start_blink:
+3478 da200000 arg 0 ,rega 
+3479 20207806 branch ui_led_blink_start_global 
+
+car_le_send_packet:
+347a 6fe1478c fetch 2 ,mem_ui_state_map 
+347b c4048000 rtnbit0 ui_state_ble_connected 
+347c 20401b77 call le_fifo_check_nearly_full 
+347d 247a0000 nrtn blank 
+347e da204967 arg mem_car_pop_queue_buff ,rega 
+347f 20407956 call queue_pop 
+3480 24740000 nrtn user 
+3481 d8c04967 arg mem_car_pop_queue_buff ,contr 
+3482 20204c0d branch le_send_notify_from_list 
+
+car_scale_process_bb_event:
+3483 1a627e00 copy regc ,pdata 
+3484 c016b23f beq bt_evt_button_up ,app_event_button_up 
+3485 c0083227 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+3486 c00a3489 beq bt_evt_le_connected ,car_scale_event_le_conn 
+3487 c00ab493 beq bt_evt_le_disconnected ,car_scale_event_le_discon 
+3488 20600000 rtn 
+
+car_scale_event_le_conn:
+3489 20403474 call car_lpm_timer_disable 
+348a 20403476 call car_stop_blink 
+348b 793f8027 set0 mark_24g_rxmode ,mark 
+348c 2020348f branch car_scale_process_conn 
+
+car_g24_connected:
+348d 6fe14a3a fetch 2 ,mem_car_24g_no_data_timeout_count 
+348e 67e14a3c store 2 ,mem_car_24g_no_data_timeout_timer 
+
+car_scale_process_conn:
+348f 704a1d14 jam 0x14 ,mem_car_notify_vdd_timer 
+3490 70409900 jam 0 ,mem_lpm_mode 
+3491 20403205 call app_ble_stop_adv 
+3492 20203223 branch app_lpm_mult_enable 
+
+car_scale_event_le_discon:
+3493 79200027 set1 mark_24g_rxmode ,mark 
+3494 20403470 call car_lpm_timer_enable 
+3495 2040358a call car_fb_motor_stop 
+3496 2040357e call car_lr_motor_stop 
+
+car_g24_disconnect:
+3497 58000000 setarg 0 
+3498 67e2c9eb store 5 ,mem_car_led_control 
+3499 58000004 setarg 4 
+349a 20406216 call pwm_disable 
+349b 58000005 setarg 5 
+349c 20406216 call pwm_disable 
+349d 58000014 setarg 20 
+349e 20406216 call pwm_disable 
+349f 58000015 setarg 21 
+34a0 20406216 call pwm_disable 
+34a1 58000016 setarg 22 
+34a2 20406216 call pwm_disable 
+34a3 58000007 setarg 7 
+34a4 20406216 call pwm_disable 
+34a5 2040793a call queue_init 
+34a6 7049ad0a jam 10 ,mem_motor1_speed 
+34a7 7049af0a jam 10 ,mem_motor2_speed 
+34a8 7049b10a jam 10 ,mem_motor3_speed 
+34a9 70417702 jam 2 ,mem_lpm_mult 
+34aa 58000020 setarg fast_adv_interval_value_car 
+34ab 20404c09 call shutter_ble_adv_interval_set 
+34ac 20203207 branch app_ble_start_adv 
+
+car_le_bb_event_timer:
+34ad 2040352b call car_moto1_blank_data_timer 
+34ae 2040352e call car_moto2_blank_data_timer 
+34af 20403531 call car_moto3_blank_data_timer 
+34b0 20403198 call app_power_timer 
+34b1 204034c3 call car_notify_vdd_timer 
+34b2 204034bd call car_24g_no_data_timeout_timer 
+34b3 204034b5 call car_24g_bind_enable_timer 
+34b4 202034b8 branch car_enter_lpm_timer 
+
+car_24g_bind_enable_timer:
+34b5 da604c59 arg mem_car_24g_bind_enable_delay_count ,regc 
+34b6 da400000 arg 0 ,regb 
+34b7 2020318a branch timer_single_step 
+
+car_enter_lpm_timer:
+34b8 da604c5f arg mem_car_enter_lpm_timer ,regc 
+34b9 da4034bb arg car_enter_lpm_enable ,regb 
+34ba 20203191 branch timer_single_step_2b 
+
+car_enter_lpm_enable:
+34bb 704c6101 jam 1 ,mem_car_enter_lpm_flag 
+34bc 20600000 rtn 
+
+car_24g_no_data_timeout_timer:
+34bd da604a3c arg mem_car_24g_no_data_timeout_timer ,regc 
+34be da4034c0 arg car_24g_no_data_timer_timeout ,regb 
+34bf 20203191 branch timer_single_step_2b 
+
+car_24g_no_data_timer_timeout:
+34c0 704a3902 jam work_search ,mem_car_24g_status 
+34c1 704c5800 jam power_on ,mem_car_24g_received_pac 
+34c2 20203497 branch car_g24_disconnect 
+
+car_notify_vdd_timer:
+34c3 6fe0ca17 fetch 1 ,mem_car_config_bat_notify_enable 
+34c4 207a0000 rtn blank 
+34c5 da604a1d arg mem_car_notify_vdd_timer ,regc 
+34c6 da4034c8 arg car_notify_vdd ,regb 
+34c7 2020318a branch timer_single_step 
+
+car_notify_vdd:
+34c8 6fe0ca1c fetch 1 ,mem_car_notify_vdd_count 
+34c9 67e0ca1d store 1 ,mem_car_notify_vdd_timer 
+34ca 6fe0ca20 fetch 1 ,mem_car_working_flag 
+34cb 247a0000 nrtn blank 
+
+car_read_hvin:
+34cc 20406125 call vdd_calculate_by_mode 
+34cd 67e14a37 store 2 ,mem_vdd_now_vol 
+34ce da204a31 arg mem_vdd_calculate_set ,rega 
+34cf 20406152 call adc_bat_percent_lowpower_out 
+34d0 6848ca1e fetcht 1 ,mem_car_notify_vdd_value_last 
+34d1 98467c00 isub temp ,null 
+34d2 202134d5 branch car_notify_vdd_next2 ,positive 
+34d3 67e0ca1e store 1 ,mem_car_notify_vdd_value_last 
+34d4 1fe20400 copy pdata ,temp 
+
+car_notify_vdd_next2:
+34d5 6048ca1f storet 1 ,mem_car_notify_vdd_percent 
+34d6 6fe0ca19 fetch 1 ,mem_car_config_low_voltage_percent 
+34d7 98467c00 isub temp ,null 
+34d8 204134e0 call car_enter_low_bat ,positive 
+34d9 6048ca2a storet 1 ,mem_notify_bat_payload 
+34da df200006 arg 6 ,loopcnt 
+34db d8c04a25 arg mem_notify_bat_head ,contr 
+34dc 204034e7 call calc_check_sum_start 
+34dd 67e0ca2b store 1 ,mem_notify_bat_check_sum 
+34de da204a22 arg mem_notify_bat_packet ,rega 
+34df 2020793f branch queue_push 
+
+car_enter_low_bat:
+34e0 6fe0ca21 fetch 1 ,mem_low_bat_flag 
+34e1 247a0000 nrtn blank 
+34e2 704a2101 jam 1 ,mem_low_bat_flag 
+34e3 da200001 arg 1 ,rega 
+34e4 20207806 branch ui_led_blink_start_global 
+
+car_low_bat_led_off:
+34e5 da200001 arg 1 ,rega 
+34e6 20207801 branch ui_led_blink_stop_global 
+
+calc_check_sum_start:
+34e7 da200000 arg 0 ,rega 
+
+calc_check_sum_loop:
+34e8 efe08006 ifetch 1 ,contr 
+34e9 9a20a200 iadd rega ,rega 
+34ea c20034e8 loop calc_check_sum_loop 
+
+calc_check_sum_and:
+34eb 1a217eff and rega ,0xff ,pdata 
+34ec 20600000 rtn 
+
+car_le_receive_data:
+34ed 6fe0c436 fetch 1 ,mem_le_att_opcode 
+34ee c00934f0 beq attop_write_request ,car_le_parse_att_write_request 
+34ef 20600000 rtn 
+
+car_le_parse_att_write_request:
+34f0 6fe14437 fetch 2 ,mem_le_att_handle 
+34f1 c00a3507 beq att_car_control_handle ,car_control_le_receive 
+34f2 20600000 rtn 
+
+le_app_receive_data:
+34f3 44dbc016 bpatch patch16_7 ,mem_patch16 
+34f4 efe28011 ifetch 5 ,rega 
+34f5 67e289de store 5 ,mem_app_receive_temp 
+34f6 6fe109de fetch 2 ,mem_app_receive_temp 
+34f7 d8406b5a arg le_receive_packet_head ,temp 
+34f8 98467c00 isub temp ,null 
+34f9 24628000 nrtn zero 
+34fa 6fe109e1 fetch 2 ,mem_app_receive_temp + 3 
+34fb 1ff0fe00 byteswap pdata ,pdata 
+34fc 67e109e1 store 2 ,mem_app_receive_temp + 3 
+34fd 1fe27200 copy pdata ,loopcnt 
+34fe 1a20a205 increase 5 ,rega 
+34ff 1a220c00 copy rega ,contr 
+3500 d8a009e3 arg mem_app_receive_temp + 5 ,contw 
+3501 20407d5f call memcpy 
+3502 efe08006 ifetch 1 ,contr 
+3503 67e089ed store 1 ,mem_app_receive_temp + 15 
+3504 da2009e0 arg mem_app_receive_temp + 2 ,rega 
+3505 da4009e3 arg mem_app_receive_temp + 5 ,regb 
+3506 20600000 rtn 
+
+car_control_le_receive:
+3507 58000000 setarg 0 
+3508 67e2c9a1 store 5 ,mem_le_receive_payload 
+3509 67e2c9a6 store 5 ,mem_le_receive_payload + 5 
+350a 204034f3 call le_app_receive_data 
+350b 1a420c00 copy regb ,contr 
+350c d8a049a1 arg mem_le_receive_payload ,contw 
+350d df20000a arg 10 ,loopcnt 
+350e 20407d5f call memcpy 
+
+car_receive_cmd_select:
+350f 44dc4017 bpatch patch17_0 ,mem_patch17 
+3510 efe08011 ifetch 1 ,rega 
+3511 c001353a beq car_cmd_old_car_control ,car_drive_old 
+3512 c001b54f beq car_cmd_old_speed_control ,car_speed_set_old 
+3513 c0023556 beq car_cmd_l_r_motor_control ,car_motor_control 
+3514 c002b556 beq car_cmd_f_b_motor_control ,car_motor_control 
+3515 c00335c6 beq car_cmd_ir_control ,car_ir_data_rx_from_app 
+3516 c003b5c7 beq car_cmd_led_control ,car_led_control_receive 
+3517 c00435ca beq car_cmd_device_info ,car_info_request 
+3518 20600000 rtn 
+
+car_24g_receive_data:
+3519 20403507 call car_control_le_receive 
+351a 6fe089e0 fetch 1 ,mem_app_receive_temp + 2 
+351b c002351e beq car_cmd_l_r_motor_control ,car_24g_receive_data_next 
+351c c002b51e beq car_cmd_f_b_motor_control ,car_24g_receive_data_next 
+351d 20600000 rtn 
+
+car_24g_receive_data_next:
+351e 6fe0c9a1 fetch 1 ,mem_le_receive_payload 
+351f 245a3525 ncall car_moto1_enable_blank_data_timer ,blank 
+3520 6fe0c9a3 fetch 1 ,mem_le_receive_payload + 2 
+3521 245a3527 ncall car_moto2_enable_blank_data_timer ,blank 
+3522 6fe0c9a5 fetch 1 ,mem_le_receive_payload + 4 
+3523 245a3529 ncall car_moto3_enable_blank_data_timer ,blank 
+3524 20600000 rtn 
+
+car_moto1_enable_blank_data_timer:
+3525 704c4205 jam 5 ,mem_car_moto1_blank_timer 
+3526 20600000 rtn 
+
+car_moto2_enable_blank_data_timer:
+3527 704c4305 jam 5 ,mem_car_moto2_blank_timer 
+3528 20600000 rtn 
+
+car_moto3_enable_blank_data_timer:
+3529 704c4405 jam 5 ,mem_car_moto3_blank_timer 
+352a 20600000 rtn 
+
+car_moto1_blank_data_timer:
+352b da604c42 arg mem_car_moto1_blank_timer ,regc 
+352c da403534 arg car_moto1_blank_data ,regb 
+352d 2020318a branch timer_single_step 
+
+car_moto2_blank_data_timer:
+352e da604c43 arg mem_car_moto2_blank_timer ,regc 
+352f da403536 arg car_moto2_blank_data ,regb 
+3530 2020318a branch timer_single_step 
+
+car_moto3_blank_data_timer:
+3531 da604c44 arg mem_car_moto3_blank_timer ,regc 
+3532 da403538 arg car_moto3_blank_data ,regb 
+3533 2020318a branch timer_single_step 
+
+car_moto1_blank_data:
+3534 7049a100 jam 0 ,mem_le_receive_payload 
+3535 20203556 branch car_motor_control 
+
+car_moto2_blank_data:
+3536 7049a300 jam 0 ,mem_le_receive_payload + 2 
+3537 20203556 branch car_motor_control 
+
+car_moto3_blank_data:
+3538 7049a500 jam 0 ,mem_le_receive_payload + 4 
+3539 20203556 branch car_motor_control 
+
+car_drive_old:
+353a 6fe0c9a1 fetch 1 ,mem_le_receive_payload 
+353b 67e0c9ac store 1 ,mem_motor1_status 
+353c 6fe0c9a2 fetch 1 ,mem_le_receive_payload + 1 
+353d 67e0c9ae store 1 ,mem_motor2_status 
+353e 20203560 branch car_motor_control_common 
+
+car_left_right_control_old:
+353f 6fe0c9a1 fetch 1 ,mem_le_receive_payload 
+3540 67e0c9ae store 1 ,mem_motor2_status 
+3541 2020356e branch car_motor2_control 
+
+car_front_back_control_old:
+3542 6fe0c9ad fetch 1 ,mem_motor1_speed 
+3543 20403547 call car_reset_old_speed 
+3544 6fe0c9a2 fetch 1 ,mem_le_receive_payload + 1 
+3545 67e0c9ac store 1 ,mem_motor1_status 
+3546 2020356c branch car_motor1_control 
+
+car_reset_old_speed:
+3547 c001354b beq speed_level_2 ,car_reset_old_speed2 
+3548 c001b54d beq speed_level_3 ,car_reset_old_speed3 
+3549 67e0c9ad store 1 ,mem_motor1_speed 
+354a 20600000 rtn 
+
+car_reset_old_speed2:
+354b 7049ad05 jam speed_level_5 ,mem_motor1_speed 
+354c 20600000 rtn 
+
+car_reset_old_speed3:
+354d 7049ad0a jam speed_level_10 ,mem_motor1_speed 
+354e 20600000 rtn 
+
+car_speed_set_old:
+354f 6fe0c9a1 fetch 1 ,mem_le_receive_payload 
+3550 20403547 call car_reset_old_speed 
+3551 6fe0c9ad fetch 1 ,mem_motor1_speed 
+3552 204035ba call car_motor_speed_duty_setting 
+3553 204035bd call car_motor_speed_duty_transform 
+3554 70095d00 jam 0x00 ,mem_pdatatemp + 1 
+3555 2020620a branch pwm_duty_cycle_set 
+
+car_motor_control:
+3556 6fe0ca3f fetch 1 ,mem_car_24g_go_die_flag 
+3557 247a0000 nrtn blank 
+3558 6fe349a1 fetch 6 ,mem_le_receive_payload 
+3559 67e349ac store 6 ,mem_motor1_status 
+355a 6fe0c9ad fetch 1 ,mem_motor1_speed 
+355b 6848c9af fetcht 1 ,mem_motor2_speed 
+355c 98417e00 iand temp ,pdata 
+355d 6848c9b1 fetcht 1 ,mem_motor3_speed 
+355e 98417e00 iand temp ,pdata 
+355f 205a3572 call car_motor_working_flag ,blank 
+
+car_motor_control_common:
+3560 44dcc017 bpatch patch17_1 ,mem_patch17 
+3561 6fe1478c fetch 2 ,mem_ui_state_map 
+3562 2feffe09 isolate1 ui_state_ble_connected ,pdata 
+3563 2440b470 ncall car_lpm_timer_enable ,true 
+3564 2040356c call car_motor1_control 
+3565 2040356e call car_motor2_control 
+3566 20203567 branch car_conn_led_state 
+
+car_conn_led_state:
+3567 6fe0c9ac fetch 1 ,mem_motor1_status 
+3568 6848c9ae fetcht 1 ,mem_motor2_status 
+3569 9840fe00 iadd temp ,pdata 
+356a 243a790b nbranch check_51cmd_led_on ,blank 
+356b 20207909 branch check_51cmd_led_off 
+
+car_motor1_control:
+356c d8c049ac arg mem_motor1_status ,contr 
+356d 20203574 branch car_motor1_status_select 
+
+car_motor2_control:
+356e d8c049ae arg mem_motor2_status ,contr 
+356f 20203579 branch car_motor2_status_select 
+
+car_motor3_control:
+3570 d8c049b0 arg mem_motor3_status ,contr 
+3571 20203596 branch car_motor_status_select 
+
+car_motor_working_flag:
+3572 704a2000 jam 0 ,mem_car_working_flag 
+3573 20600000 rtn 
+
+car_motor1_status_select:
+3574 efe08006 ifetch 1 ,contr 
+3575 c000357e beq turn_front ,car_lr_motor_stop 
+3576 c000b582 beq turn_left ,car_lr_motor_left 
+3577 c0013586 beq turn_right ,car_lr_motor_right 
+3578 20600000 rtn 
+
+car_motor2_status_select:
+3579 efe08006 ifetch 1 ,contr 
+357a c000358a beq motor_stop ,car_fb_motor_stop 
+357b c001358e beq go_back ,car_fb_motor_front 
+357c c000b592 beq go_front ,car_fb_motor_back 
+357d 20600000 rtn 
+
+car_lr_motor_stop:
+357e 6848cc46 fetcht 1 ,mem_car_motor_left_gpio 
+357f 20406065 call gpio_out_inactive 
+3580 6848cc47 fetcht 1 ,mem_car_motor_right_gpio 
+3581 20206065 branch gpio_out_inactive 
+
+car_lr_motor_left:
+3582 6848cc46 fetcht 1 ,mem_car_motor_left_gpio 
+3583 20406069 call gpio_out_active 
+3584 6848cc47 fetcht 1 ,mem_car_motor_right_gpio 
+3585 20206065 branch gpio_out_inactive 
+
+car_lr_motor_right:
+3586 6848cc46 fetcht 1 ,mem_car_motor_left_gpio 
+3587 20406065 call gpio_out_inactive 
+3588 6848cc47 fetcht 1 ,mem_car_motor_right_gpio 
+3589 20206069 branch gpio_out_active 
+
+car_fb_motor_stop:
+358a 6848cc48 fetcht 1 ,mem_car_motor_front_gpio 
+358b 20406065 call gpio_out_inactive 
+358c 6848cc49 fetcht 1 ,mem_car_motor_back_gpio 
+358d 20206065 branch gpio_out_inactive 
+
+car_fb_motor_front:
+358e 6848cc48 fetcht 1 ,mem_car_motor_front_gpio 
+358f 20406069 call gpio_out_active 
+3590 6848cc49 fetcht 1 ,mem_car_motor_back_gpio 
+3591 20206065 branch gpio_out_inactive 
+
+car_fb_motor_back:
+3592 6848cc48 fetcht 1 ,mem_car_motor_front_gpio 
+3593 20406065 call gpio_out_inactive 
+3594 6848cc49 fetcht 1 ,mem_car_motor_back_gpio 
+3595 20206069 branch gpio_out_active 
+
+car_motor_status_select:
+3596 44dd4017 bpatch patch17_2 ,mem_patch17 
+3597 efe08006 ifetch 1 ,contr 
+3598 c00035a3 beq motor_stop ,car_motor_stop 
+3599 c000b59c beq go_front ,car_motor_positive 
+359a c001359e beq go_back ,car_motor_negative 
+359b 20600000 rtn 
+
+car_motor_positive:
+359c 7049ca00 jam 0 ,mem_motor_select_p_n 
+359d 2020359f branch car_motor_negative + 1 
+
+car_motor_negative:
+359e 7049ca01 jam 1 ,mem_motor_select_p_n 
+359f efe08006 ifetch 1 ,contr 
+35a0 67e0c9cc store 1 ,mem_car_motor_speed 
+35a1 efe40012 ifetch 8 ,regb 
+35a2 202035a8 branch car_motor_work 
+
+car_motor_stop:
+35a3 efe08012 ifetch 1 ,regb 
+35a4 20406216 call pwm_disable 
+35a5 1a40a401 increase 1 ,regb 
+35a6 efe08012 ifetch 1 ,regb 
+35a7 20206216 branch pwm_disable 
+
+car_motor_work:
+35a8 67e449cd store 8 ,mem_motor_pwm_pin1_set 
+35a9 704a2001 jam 1 ,mem_car_working_flag 
+35aa 6fe0c9ca fetch 1 ,mem_motor_select_p_n 
+35ab c00035b6 beq 0 ,car_motor_select_positive 
+
+car_motor_select_negative:
+35ac 6fe0c9ce fetch 1 ,mem_motor_pwm_pin2_set 
+35ad 67e0c9cf store 1 ,mem_motor_pwm_pin_set 
+35ae 6fe0c9cd fetch 1 ,mem_motor_pwm_pin1_set 
+
+car_motor_work_next:
+35af 20406216 call pwm_disable 
+35b0 6fe0c9cc fetch 1 ,mem_car_motor_speed 
+35b1 204035ba call car_motor_speed_duty_setting 
+35b2 67e0c9d4 store 1 ,mem_motor_pwm_dute_set 
+35b3 6fe349cf fetch 6 ,mem_motor_pwm_pin_set 
+35b4 67e3095c store 6 ,mem_pdatatemp 
+35b5 202061f8 branch pwm_out_set 
+
+car_motor_select_positive:
+35b6 6fe0c9cd fetch 1 ,mem_motor_pwm_pin1_set 
+35b7 67e0c9cf store 1 ,mem_motor_pwm_pin_set 
+35b8 6fe0c9ce fetch 1 ,mem_motor_pwm_pin2_set 
+35b9 202035af branch car_motor_work_next 
+
+car_motor_speed_duty_setting:
+35ba 1feffe05 mul32 pdata ,5 ,pdata 
+35bb 1fe0fe32 add pdata ,50 ,pdata 
+35bc 20600000 rtn 
+
+car_motor_speed_duty_transform:
+35bd d8402ee0 arg 12000 ,temp 
+35be 984ffe00 imul32 temp ,pdata 
+35bf 1fe6fc64 div pdata ,100 
+35c0 20407def call wait_div_end 
+35c1 18078400 quotient temp 
+35c2 18422200 copy temp ,rega 
+35c3 58002ee0 setarg 12000 
+35c4 98462400 isub temp ,regb 
+35c5 20600000 rtn 
+
+car_ir_data_rx_from_app:
+35c6 20600000 rtn 
+
+car_led_control_receive:
+35c7 6fe449a1 fetch 8 ,mem_le_receive_payload 
+35c8 67e449eb store 8 ,mem_car_led_control 
+35c9 20600000 rtn 
+
+car_info_request:
+35ca 6fe0ca08 fetch 1 ,mem_car_config_device_select 
+35cb 67e0c9fe store 1 ,mem_car_info_request_payload 
+35cc 6fe0ca09 fetch 1 ,mem_car_config_motor_layout 
+35cd 67e0c9ff store 1 ,mem_car_info_request_payload + 1 
+35ce 6fe0ca0a fetch 1 ,mem_car_config_ir_enable 
+35cf 67e0ca00 store 1 ,mem_car_info_request_payload + 2 
+35d0 df20000d arg 13 ,loopcnt 
+35d1 d8c049f9 arg mem_car_info_request_head ,contr 
+35d2 204034e7 call calc_check_sum_start 
+35d3 67e0ca06 store 1 ,mem_car_info_request_checksum 
+35d4 da2049f6 arg mem_car_info_request ,rega 
+35d5 2020793f branch queue_push 
+
+car_g24_init:
+35d6 58000000 setarg 0 
+35d7 67e44881 store 8 ,mem_24g_bind_payload 
+35d8 20402409 call g24_receive_init 
+35d9 20202463 branch g24_mode_switch_init 
+
+car_g24_receive_process:
+35da 204035de call car_g24_mode_switch 
+35db 204035e6 call car_g24_work_mode 
+35dc 204035f5 call car_g24_bind_mode 
+35dd 20203613 branch car_g24_lpm_dipatch 
+
+car_g24_mode_switch:
+35de 20402467 call g24_mode_switch 
+
+car_g24_bind_mode_enable:
+35df 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+35e0 c1808000 rtnne dongle_bind 
+35e1 6fe0cc59 fetch 1 ,mem_car_24g_bind_enable_delay_count 
+35e2 243a248d nbranch g24_switch_work_mode ,blank 
+35e3 6fe0ca39 fetch 1 ,mem_car_24g_status 
+35e4 c001248d beq work_search ,g24_switch_work_mode 
+35e5 20600000 rtn 
+
+car_g24_work_mode:
+35e6 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+35e7 c1800000 rtnne dongle_work 
+35e8 20402491 call g24_work_mode_start 
+35e9 2037b5f3 branch car_g24_ch_polling_clear ,user3 
+
+car_g24_receive_ch_polling:
+35ea 6fe0cc61 fetch 1 ,mem_car_enter_lpm_flag 
+35eb 207a0000 rtn blank 
+35ec 6fe0cc62 fetch 1 ,mem_car_24g_ch_polling 
+35ed 1fe0fe01 increase 1 ,pdata 
+35ee 67e0cc62 store 1 ,mem_car_24g_ch_polling 
+35ef c00235f3 beq 4 ,car_g24_ch_polling_clear 
+35f0 204022cb call g24_ch 
+35f1 20402415 call g24_receive_packet_start 
+35f2 2437b5ea nbranch car_g24_receive_ch_polling ,user3 
+
+car_g24_ch_polling_clear:
+35f3 704c6200 jam 0 ,mem_car_24g_ch_polling 
+35f4 20600000 rtn 
+
+car_g24_bind_mode:
+35f5 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+35f6 c1808000 rtnne dongle_bind 
+35f7 20402395 call g24_bind_init 
+35f8 20403609 call car_g24_bind_device_addr 
+35f9 204023a3 call g24_bind_data_process 
+35fa 6fe0c880 fetch 1 ,mem_24g_bind_device_status 
+35fb 243a3602 nbranch car_g24_bind_mode_exit ,blank 
+35fc 20402532 call g24_nodata_process 
+35fd 6fe0c8bd fetch 1 ,mem_24g_nodata_timer_enable 
+35fe 207a0000 rtn blank 
+35ff 58000000 setarg 0 
+3600 67e248d1 store 4 ,mem_24g_device1_addr 
+3601 20600000 rtn 
+
+car_g24_bind_mode_exit:
+3602 7048bc00 jam 0 ,mem_24g_mode_switch 
+3603 da200000 arg 0 ,rega 
+3604 20407801 call ui_led_off_global 
+3605 2040248d call g24_switch_work_mode 
+3606 204022fc call g24_timer_init 
+3607 6fe240a8 fetch 4 ,mem_lap 
+3608 202022dc branch g24_update_addr_and_synccrc8 
+
+car_g24_bind_device_addr:
+3609 6fe248d1 fetch 4 ,mem_24g_device1_addr 
+360a 207a0000 rtn blank 
+360b 202022dc branch g24_update_addr_and_synccrc8 
+
+car_g24_cb_data_device1:
+360c 6fe1478c fetch 2 ,mem_ui_state_map 
+360d c3848000 rtnbit1 ui_state_ble_connected 
+360e 6fe14a3a fetch 2 ,mem_car_24g_no_data_timeout_count 
+360f 67e14a3c store 2 ,mem_car_24g_no_data_timeout_timer 
+3610 704c5801 jam work_paired ,mem_car_24g_received_pac 
+3611 da204894 arg mem_24g_rxdata_temp + 3 ,rega 
+3612 20203519 branch car_24g_receive_data 
+
+car_g24_lpm_dipatch:
+3613 6fe0cc61 fetch 1 ,mem_car_enter_lpm_flag 
+3614 207a0000 rtn blank 
+3615 2040361b call car_g24_lpm_wait 
+3616 24740000 nrtn user 
+3617 6fe1c85c fetch 3 ,mem_24g_enter_hibernate 
+3618 20407daa call clk2lpo 
+3619 604a4160 storet 4 ,mem_sleep_counter 
+361a 20201497 branch lpm_sleep 
+
+car_g24_lpm_wait:
+361b 78347c00 enable user 
+361c 20401465 call lpo_calibration 
+361d 6fe1c174 fetch 3 ,mem_clks_per_lpo 
+361e 203a7e56 branch disable_user ,blank 
+361f 20203460 branch car_le_process_lpm_before 
+
+dongle_init:
+3620 5800364e setarg dongle_dispatch 
+3621 67e14889 store 2 ,mem_cb_24g_receive_process 
+3622 58003701 setarg dongle_g24_mouse 
+3623 67e1488d store 2 ,mem_cb_24g_data_device1 
+3624 58003712 setarg dongle_g24_kb 
+3625 67e1488f store 2 ,mem_cb_24g_data_device2 
+3626 580036f5 setarg dongle_ackpayload_prep 
+3627 67e1488b store 2 ,mem_cb_24g_ackpayload 
+3628 5800365b setarg dongle_usb_config 
+3629 67e10b45 store 2 ,mem_cb_usb_config 
+362a 20403653 call dongle_read_kb_bind_status 
+362b 2020799d branch usb_init 
+
+dongle_default_init:
+362c 20403649 call dongle_xtal_select 
+362d 6fe0c909 fetch 1 ,mem_dg_sys_config 
+362e 2feffe05 isolate1 dg_enable_eeprom ,pdata 
+362f 2020b633 branch dongle_default_no_eeprom ,true 
+3630 6fe0c909 fetch 1 ,mem_dg_sys_config 
+3631 2feffe06 isolate1 dg_enable_new_chmap ,pdata 
+3632 2040a30e call g24_chamap_param_update ,true 
+
+dongle_default_no_eeprom:
+3633 6fe0c909 fetch 1 ,mem_dg_sys_config 
+3634 1fe17e1f and_into 0x1f ,pdata 
+3635 67e0c1e8 store 1 ,mem_tx_power 
+3636 20403100 call app_sys_param_init 
+3637 70487dff jam 0xff ,mem_rssi_buff_index 
+3638 58000c4b setarg mem_dg_rssi_noise_buffer 
+3639 67e148e1 store 2 ,mem_rssi_noise_buffer_ptr 
+363a 58000d4b setarg mem_dg_rssi_noise_dg_buffer 
+363b 67e148e3 store 2 ,mem_rssi_noise_self_buffer_ptr 
+363c 58000e4b setarg mem_dg_rssi_noise_ms_buffer 
+363d 67e148e5 store 2 ,mem_rssi_noise_device1_buffer_ptr 
+363e 58000f4b setarg mem_dg_rssi_noise_kb_buffer 
+363f 67e148e7 store 2 ,mem_rssi_noise_device2_buffer_ptr 
+3640 20402322 call g24_enable_1m 
+3641 20402409 call g24_receive_init 
+3642 20402325 call g24_pair_param_init 
+3643 204022ff call g24_chmap_param_init 
+3644 6fe0c913 fetch 1 ,mem_dg_usb_tx_interval 
+3645 67e08b47 store 1 ,mem_usb_tx_interval 
+3646 6fe4c90a fetch 9 ,mem_dg_usb_vid_pid 
+3647 67e48b48 store 9 ,mem_usb_vid_pid 
+3648 20600000 rtn 
+
+dongle_xtal_select:
+3649 7040c518 jam xtal_24m ,mem_fcomp_div 
+364a 6fe0c909 fetch 1 ,mem_dg_sys_config 
+364b c4038000 rtnbit0 dg_enable_xtal_24m 
+364c 7040c508 jam xtal_16m ,mem_fcomp_div 
+364d 20600000 rtn 
+
+dongle_dispatch:
+364e 6fe0c8b9 fetch 1 ,mem_24g_pair_mode 
+364f c00036e6 beq 0x00 ,dongle_auto_bind 
+3650 c000b682 beq 0x01 ,dongle_pc_bind 
+3651 c007b67e beq 0x0f ,dongle_all_powerful 
+3652 20600000 rtn 
+
+dongle_read_kb_bind_status:
+3653 d8400001 arg 1 ,temp 
+3654 da2048e9 arg mem_dg_kb_bind_flag ,rega 
+3655 5800002a setarg dongle_kb_bind_efuse_offect 
+3656 20205e63 branch efuse_read_data 
+
+dongle_write_kb_bind_status:
+3657 df200001 arg 1 ,loopcnt 
+3658 da2048e9 arg mem_dg_kb_bind_flag ,rega 
+3659 d840002a arg dongle_kb_bind_efuse_offect ,temp 
+365a 20205e75 branch efuse_program 
+
+dongle_usb_config:
+365b 6fe0c8e9 fetch 1 ,mem_dg_kb_bind_flag 
+365c c0adb661 bne dongle_kb_bind_success ,dongle_usb_config_param 
+365d 7048e95b jam dongle_kb_bind_success ,mem_dg_kb_bind_flag 
+365e 6ff21aac fetch 4 ,usb_devicedata_addr + 9 
+365f 79207e1d set1 29 ,pdata 
+3660 67e20aa0 store 4 ,mem_devicedesc + 9 
+
+dongle_usb_config_param:
+3661 20403678 call dongle_usb_device_name 
+3662 204079f0 call usb_tx_interval_config 
+3663 20403665 call dongle_usb_vid_pid_config 
+3664 2020366e branch dongle_usb_hid_icon_config 
+
+dongle_usb_vid_pid_config:
+3665 6fe08b48 fetch 1 ,mem_usb_vid_pid 
+3666 207a0000 rtn blank 
+3667 6fe0c8e9 fetch 1 ,mem_dg_kb_bind_flag 
+3668 c02db66c beq dongle_kb_bind_success ,dongle_usb_vid_pid_for_suit 
+
+dongle_usb_vid_pid_for_mouse_only_auto_pair:
+3669 6fe20b49 fetch 4 ,mem_usb_vid_pid + 1 
+
+dongle_usb_vid_pid_store:
+366a 67e20aa0 store 4 ,mem_devicedesc + 9 
+366b 20600000 rtn 
+
+dongle_usb_vid_pid_for_suit:
+366c 6fe20b4d fetch 4 ,mem_usb_vid_pid + 5 
+366d 2020366a branch dongle_usb_vid_pid_store 
+
+dongle_usb_hid_icon_config:
+366e 6fe0c8e9 fetch 1 ,mem_dg_kb_bind_flag 
+366f c02db674 beq dongle_kb_bind_success ,dongle_usb_kb_hidreportdesc 
+3670 580099a4 setarg usb_kbdata_vendor_define_addr 
+3671 67e10a93 store 2 ,mem_hidreportdesc_kb 
+3672 700ac41a jam 0x1a ,mem_confdesc + 26 
+3673 20600000 rtn 
+
+dongle_usb_kb_hidreportdesc:
+3674 580099bf setarg usb_kbdata_addr 
+3675 67e10a93 store 2 ,mem_hidreportdesc_kb 
+3676 700ac43f jam 0x3f ,mem_confdesc + 26 
+3677 20600000 rtn 
+
+dongle_usb_device_name:
+3678 6fe0c914 fetch 1 ,mem_dg_usb_device_name 
+3679 207a0000 rtn blank 
+367a d8c04914 arg mem_dg_usb_device_name ,contr 
+367b d8a00b09 arg mem_string2 ,contw 
+367c df20001e arg 30 ,loopcnt 
+367d 20207d5f branch memcpy 
+
+dongle_all_powerful:
+367e 2040248d call g24_switch_work_mode 
+
+dongle_all_powerful_loop:
+367f 204036ed call dongle_work_mode_auto 
+3680 204036b4 call dongle_usb_dispatch 
+3681 2020367f branch dongle_all_powerful_loop 
+
+dongle_pc_bind:
+3682 2040248d call g24_switch_work_mode 
+
+dongle_pc_bind_loop:
+3683 204036ed call dongle_work_mode_auto 
+3684 20402496 call g24_bind_mode_auto 
+3685 204036b4 call dongle_usb_dispatch 
+3686 20203683 branch dongle_pc_bind_loop 
+
+dongle_g24_blank_data_process:
+3687 2040368a call dongle_g24_ms_blank_data 
+3688 20403699 call dongle_g24_kb_blank_data 
+3689 202036a8 branch dongle_g24_kb_mul_blank_data 
+
+dongle_g24_ms_blank_data:
+368a 6fe0c908 fetch 1 ,mem_dg_ms_blank_data_enable 
+368b 207a0000 rtn blank 
+368c d8e0000b arg timer_ms_blank ,queue 
+368d 20407d74 call timer_check 
+368e 247a0000 nrtn blank 
+368f 70490800 jam 0 ,mem_dg_ms_blank_data_enable 
+3690 58000001 setarg ms_report_id 
+3691 67e08bff store 1 ,mem_usb_mouse_data 
+3692 58000000 setarg 0 
+3693 e7e38005 istore 7 ,contw 
+
+dongle_usb_tx_ms_data:
+3694 700bf820 jam usb_ep2_ms ,mem_usb_ep2_data 
+
+dongle_usb_tx_enable_ep2:
+3695 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+3696 79207e02 set1 2 ,pdata 
+3697 67e08bf9 store 1 ,mem_usb_tx_enable 
+3698 20600000 rtn 
+
+dongle_g24_kb_blank_data:
+3699 6fe0c906 fetch 1 ,mem_dg_kb_blank_data_enable 
+369a 207a0000 rtn blank 
+369b d8e0000e arg timer_kb_blank ,queue 
+369c 20407d74 call timer_check 
+369d 247a0000 nrtn blank 
+369e 70490600 jam 0 ,mem_dg_kb_blank_data_enable 
+369f d8a00c0f arg mem_usb_kb_data ,contw 
+36a0 df200002 arg 2 ,loopcnt 
+36a1 20407d17 call memset0 
+
+dongle_usb_tx_kb_data:
+36a2 700c0f00 jam kb_normal_report_id ,mem_usb_kb_data 
+
+dongle_usb_tx_enable_ep1:
+36a3 700bf710 jam usb_ep1_kb ,mem_usb_ep1_data 
+36a4 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+36a5 79207e01 set1 1 ,pdata 
+36a6 67e08bf9 store 1 ,mem_usb_tx_enable 
+36a7 20600000 rtn 
+
+dongle_g24_kb_mul_blank_data:
+36a8 6fe0c907 fetch 1 ,mem_dg_kb_mul_blank_data_enable 
+36a9 207a0000 rtn blank 
+36aa d8e0000c arg timer_kb_mul_blank ,queue 
+36ab 20407d74 call timer_check 
+36ac 247a0000 nrtn blank 
+36ad 70490700 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+36ae d8a00c1f arg mem_usb_kb_multikey ,contw 
+36af df200002 arg 2 ,loopcnt 
+36b0 20407d17 call memset0 
+36b1 700c1f03 jam kb_multikey_report_id ,mem_usb_kb_multikey 
+
+dongle_usb_tx_multikey_data:
+36b2 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
+36b3 20203695 branch dongle_usb_tx_enable_ep2 
+
+dongle_usb_dispatch:
+36b4 44ddc017 bpatch patch17_3 ,mem_patch17 
+36b5 20407991 call usb_isr 
+36b6 6fe08be3 fetch 1 ,mem_usb0_get_set_report 
+36b7 207a0000 rtn blank 
+36b8 700be300 jam 0 ,mem_usb0_get_set_report 
+36b9 6fe10be1 fetch 2 ,mem_usb_setup_bvalue_temp 
+36ba d84002ba arg pc_set_report ,temp 
+36bb 98467c00 isub temp ,null 
+36bc 24628000 nrtn zero 
+36bd 6fe08b61 fetch 1 ,mem_usb0_set_report_data 
+36be c1dd0000 rtnne pc_report_id 
+36bf 6fe08b62 fetch 1 ,mem_usb0_set_report_data + 1 
+36c0 c05036c7 beq command_mode ,dongle_dispose_cmd_mode 
+36c1 c050b6cd beq command_bind ,dongle_dispose_cmd_bind 
+36c2 c05336d9 beq command_current_project ,dongle_dispose_cmd_current_project 
+36c3 c053b6db beq command_current_mode ,dongle_dispose_cmd_current_mode 
+36c4 c054b6e1 beq command_current_fw_version ,dongle_dispose_cmd_current_fw_version 
+
+dongle_usb0_data_ready_report_set0:
+36c5 700be400 jam 0 ,mem_usb0_data_ready_report 
+36c6 20600000 rtn 
+
+dongle_dispose_cmd_mode:
+36c7 6fe08b63 fetch 1 ,mem_usb0_set_report_data + 2 
+36c8 c040b6ca beq com_mode_bind ,dongle_enter_bind_mode 
+36c9 202036c5 branch dongle_usb0_data_ready_report_set0 
+
+dongle_enter_bind_mode:
+36ca 20402392 call g24_bind_mode_enable 
+
+dongle_usb0_data_ready_report_set1:
+36cb 700be401 jam 1 ,mem_usb0_data_ready_report 
+36cc 20600000 rtn 
+
+dongle_dispose_cmd_bind:
+36cd 6fe08b63 fetch 1 ,mem_usb0_set_report_data + 2 
+36ce c000b6d2 beq com_bind_get ,dongle_dispose_cmd_get_bind 
+36cf c04236d5 beq com_bind_exit ,dongle_dispose_cmd_exit_bind 
+36d0 c053b6d7 beq com_read_mode ,dongle_dispose_cmd_read_mode 
+36d1 202036c5 branch dongle_usb0_data_ready_report_set0 
+
+dongle_dispose_cmd_get_bind:
+36d2 6fe0c880 fetch 1 ,mem_24g_bind_device_status 
+36d3 67e08ba2 store 1 ,mem_usb0_get_report_data + 1 
+36d4 202036cb branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_exit_bind:
+36d5 2040248e call g24_work_mode_enable 
+36d6 202036d2 branch dongle_dispose_cmd_get_bind 
+
+dongle_dispose_cmd_read_mode:
+
+dongle_dispose_in_bind_mode:
+36d7 700ba2a1 jam command_bind ,mem_usb0_get_report_data + 1 
+36d8 202036cb branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_project:
+36d9 700ba215 jam product_id ,mem_usb0_get_report_data + 1 
+36da 202036cb branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_mode:
+36db 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+36dc c00036df beq dongle_work ,dongle_dispose_in_work_mode 
+36dd c000b6d7 beq dongle_bind ,dongle_dispose_in_bind_mode 
+36de 20600000 rtn 
+
+dongle_dispose_in_work_mode:
+36df 700ba2a0 jam command_mode ,mem_usb0_get_report_data + 1 
+36e0 202036cb branch dongle_usb0_data_ready_report_set1 
+
+dongle_dispose_cmd_current_fw_version:
+36e1 700ba200 jam fw_version0 ,mem_usb0_get_report_data + 1 
+36e2 700ba300 jam fw_version1 ,mem_usb0_get_report_data + 2 
+36e3 700ba401 jam fw_version2 ,mem_usb0_get_report_data + 3 
+36e4 700ba507 jam fw_version3 ,mem_usb0_get_report_data + 4 
+36e5 202036cb branch dongle_usb0_data_ready_report_set1 
+
+dongle_auto_bind:
+36e6 20402463 call g24_mode_switch_init 
+
+dongle_auto_bind_loop:
+36e7 20402467 call g24_mode_switch 
+36e8 204036ed call dongle_work_mode_auto 
+36e9 20402496 call g24_bind_mode_auto 
+36ea 204024b3 call g24_search_mode_auto 
+36eb 204036b4 call dongle_usb_dispatch 
+36ec 202036e7 branch dongle_auto_bind_loop 
+
+dongle_work_mode_auto:
+36ed 44de4017 bpatch patch17_4 ,mem_patch17 
+36ee 6fe0c8bf fetch 1 ,mem_24g_work_mode 
+36ef c1800000 rtnne dongle_work 
+36f0 20402491 call g24_work_mode_start 
+36f1 20403687 call dongle_g24_blank_data_process 
+36f2 6fe0c8b9 fetch 1 ,mem_24g_pair_mode 
+36f3 247a0000 nrtn blank 
+36f4 20202532 branch g24_nodata_process 
+
+dongle_ackpayload_prep:
+36f5 6fe0c8ba fetch 1 ,mem_24g_ackpayload_enable 
+36f6 c000a39e beq bind_ackpayload ,g24_bind_ackpayload_prep 
+36f7 c001b6f9 beq kb_led_ackpayload ,dongle_g24_kb_led_ackpayload_prep 
+36f8 20600000 rtn 
+
+dongle_g24_kb_led_ackpayload_prep:
+36f9 6fe0c7a6 fetch 1 ,mem_24g_rxbuf + 2 
+36fa c000a39e beq datatype_device1 ,g24_bind_ackpayload_prep 
+36fb c07fa39e beq datatype_attemp ,g24_bind_ackpayload_prep 
+36fc 700be500 jam 0 ,mem_usb_tx_win_enable 
+36fd 70483501 jam 0x01 ,mem_24g_datalen 
+36fe 6fe0c8ca fetch 1 ,mem_24g_led_status 
+36ff 67e0c7c6 store 1 ,mem_24g_txbuf 
+3700 20600000 rtn 
+
+dongle_g24_mouse:
+3701 58000001 setarg ms_report_id 
+3702 67e08bff store 1 ,mem_usb_mouse_data 
+3703 6fe3c894 fetch 7 ,mem_24g_rxdata_temp + 3 
+3704 e7e38005 istore 7 ,contw 
+3705 6fe0c894 fetch 1 ,mem_24g_rxdata_temp + 3 
+3706 245a370a ncall dongle_g24_ms_enable_blank_data_forcibly ,blank 
+3707 6fe0c894 fetch 1 ,mem_24g_rxdata_temp + 3 
+3708 205a370e call dongle_g24_ms_disable_blank_data_forcibly ,blank 
+3709 20203694 branch dongle_usb_tx_ms_data 
+
+dongle_g24_ms_enable_blank_data_forcibly:
+370a 70490801 jam 1 ,mem_dg_ms_blank_data_enable 
+370b 58000180 setarg timer_ms_blank_delay 
+370c d8e0000b arg timer_ms_blank ,queue 
+370d 20207d66 branch timer_init 
+
+dongle_g24_ms_disable_blank_data_forcibly:
+370e 70490800 jam 0 ,mem_dg_ms_blank_data_enable 
+370f 58000000 setarg 0 
+3710 d8e0000b arg timer_ms_blank ,queue 
+3711 20207d66 branch timer_init 
+
+dongle_g24_kb:
+3712 6fe0c894 fetch 1 ,mem_24g_rxdata_temp + 3 
+3713 c0003717 beq 0 ,dongle_g24_kb_type0 
+3714 c001374a beq 2 ,dongle_g24_kb_type2 
+3715 c001b732 beq 3 ,dongle_g24_kb_type3 
+3716 20202427 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_type0:
+3717 6fe0c896 fetch 1 ,mem_24g_rxdata_temp + 5 
+3718 67e0c8ba store 1 ,mem_24g_ackpayload_enable 
+3719 70489600 jam 0 ,mem_24g_rxdata_temp + 5 
+371a d8a00c0f arg mem_usb_kb_data ,contw 
+371b d8c04895 arg mem_24g_rxdata_temp + 4 ,contr 
+371c df200008 arg 8 ,loopcnt 
+371d 20407d5f call memcpy 
+371e 6fe40c0f fetch 8 ,mem_usb_kb_data 
+371f 245a372a ncall dongle_g24_kb_enable_blank_data_forcibly ,blank 
+3720 6fe40c0f fetch 8 ,mem_usb_kb_data 
+3721 205a372e call dongle_g24_kb_disable_blank_data_forcibly ,blank 
+3722 6fe40c0f fetch 8 ,mem_usb_kb_data 
+3723 67e448ea store 8 ,mem_dg_kb_data_sta_data 
+3724 684c48f2 fetcht 8 ,mem_dg_kb_data_last_data 
+3725 98467c00 isub temp ,null 
+3726 2442b6a3 ncall dongle_usb_tx_enable_ep1 ,zero 
+3727 6fe448ea fetch 8 ,mem_dg_kb_data_sta_data 
+3728 67e448f2 store 8 ,mem_dg_kb_data_last_data 
+3729 20202427 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_enable_blank_data_forcibly:
+372a 70490601 jam 1 ,mem_dg_kb_blank_data_enable 
+372b 58000180 setarg timer_kb_blank_delay 
+372c d8e0000e arg timer_kb_blank ,queue 
+372d 20207d66 branch timer_init 
+
+dongle_g24_kb_disable_blank_data_forcibly:
+372e 70490600 jam 0 ,mem_dg_kb_blank_data_enable 
+372f 58000000 setarg 0 
+3730 d8e0000e arg timer_kb_blank ,queue 
+3731 20207d66 branch timer_init 
+
+dongle_g24_kb_type3:
+3732 d8a00c1f arg mem_usb_kb_multikey ,contw 
+3733 d8c04894 arg mem_24g_rxdata_temp + 3 ,contr 
+3734 df200003 arg 3 ,loopcnt 
+3735 20407d5f call memcpy 
+3736 6fe10c20 fetch 2 ,mem_usb_kb_multikey + 1 
+3737 245a3742 ncall dongle_g24_kb_mul_enable_blank_data_forcibly ,blank 
+3738 6fe10c20 fetch 2 ,mem_usb_kb_multikey + 1 
+3739 205a3746 call dongle_g24_kb_mul_disable_blank_data_forcibly ,blank 
+373a 6fe18c1f fetch 3 ,mem_usb_kb_multikey 
+373b 67e1c8fa store 3 ,mem_dg_kb_multikey_sta_data 
+373c 6849c8fd fetcht 3 ,mem_dg_kb_multikey_last_data 
+373d 98467c00 isub temp ,null 
+373e 2442b6b2 ncall dongle_usb_tx_multikey_data ,zero 
+373f 6fe1c8fa fetch 3 ,mem_dg_kb_multikey_sta_data 
+3740 67e1c8fd store 3 ,mem_dg_kb_multikey_last_data 
+3741 20202427 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_mul_enable_blank_data_forcibly:
+3742 70490701 jam 1 ,mem_dg_kb_mul_blank_data_enable 
+3743 58000180 setarg timer_kb_mul_blank_delay 
+3744 d8e0000c arg timer_kb_mul_blank ,queue 
+3745 20207d66 branch timer_init 
+
+dongle_g24_kb_mul_disable_blank_data_forcibly:
+3746 70490700 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+3747 58000000 setarg 0 
+3748 d8e0000c arg timer_kb_mul_blank ,queue 
+3749 20207d66 branch timer_init 
+
+dongle_g24_kb_type2:
+374a d8a00c2f arg mem_usb_kb_system ,contw 
+374b d8c04894 arg mem_24g_rxdata_temp + 3 ,contr 
+374c df200002 arg 2 ,loopcnt 
+374d 20407d5f call memcpy 
+374e 6fe10c2f fetch 2 ,mem_usb_kb_system 
+374f 245a375a ncall dongle_g24_kb_sys_enable_blank_data_forcibly ,blank 
+3750 6fe10c2f fetch 2 ,mem_usb_kb_system 
+3751 205a375e call dongle_g24_kb_sys_disable_blank_data_forcibly ,blank 
+3752 6fe10c2f fetch 2 ,mem_usb_kb_system 
+3753 67e14900 store 2 ,mem_dg_kb_system_sta_data 
+3754 68494903 fetcht 2 ,mem_dg_kb_system_last_data 
+3755 98467c00 isub temp ,null 
+3756 2442b762 ncall dongle_usb_tx_sys_data ,zero 
+3757 6fe14900 fetch 2 ,mem_dg_kb_system_sta_data 
+3758 67e14903 store 2 ,mem_dg_kb_system_last_data 
+3759 20202427 branch g24_rx_interrupt_clear 
+
+dongle_g24_kb_sys_enable_blank_data_forcibly:
+375a 70490701 jam 1 ,mem_dg_kb_mul_blank_data_enable 
+375b 58000180 setarg timer_kb_mul_blank_delay 
+375c d8e0000c arg timer_kb_mul_blank ,queue 
+375d 20207d66 branch timer_init 
+
+dongle_g24_kb_sys_disable_blank_data_forcibly:
+375e 70490700 jam 0 ,mem_dg_kb_mul_blank_data_enable 
+375f 58000000 setarg 0 
+3760 d8e0000c arg timer_kb_mul_blank ,queue 
+3761 20207d66 branch timer_init 
+
+dongle_usb_tx_sys_data:
+3762 700bf822 jam usb_ep2_systemkey ,mem_usb_ep2_data 
+3763 20203695 branch dongle_usb_tx_enable_ep2 
+
+module_init:
+3764 20758000 rtn wake 
+3765 20401aa9 call le_modified_name 
+3766 580037ab setarg module_process_idle 
+3767 67e14465 store 2 ,mem_cb_idle_process 
+3768 58003798 setarg module_bt_conn_process 
+3769 67e14463 store 2 ,mem_cb_bt_process 
+376a 580037af setarg module_process_bb_event 
+376b 67e14467 store 2 ,mem_cb_bb_event_process 
+376c 58003794 setarg module_lpm_lock 
+376d 67e1445b store 2 ,mem_cb_check_wakelock 
+376e 580038e8 setarg module_hci_cmd_transmit_le_notify 
+376f 67e1446d store 2 ,mem_cb_ble_transmit 
+3770 58003ae1 setarg module_hci_event_receive_spp_data 
+3771 67e1465a store 2 ,mem_cb_receive_spp_data 
+3772 58003b84 setarg module_le_receive_data 
+3773 67e1446b store 2 ,mem_cb_att_write 
+3774 58003b9b setarg module_bb_event_timer 
+3775 67e1446f store 2 ,mem_cb_event_timer 
+3776 204037a8 call module_spp_clear_last_transmite_clock 
+3777 44dec017 bpatch patch17_5 ,mem_patch17 
+3778 2040377b call module_lpm_uart_init 
+3779 2040378f call module_gpio_init 
+377a 20203af7 branch module_hci_event_enter_standby_mode 
+
+module_lpm_uart_init:
+377b 6ff08060 fetch 1 ,core_uart_ctrl 
+377c 793ffe00 set0 bit_uart_control_enable ,pdata 
+377d 67f08060 store 1 ,core_uart_ctrl 
+377e 6fe447b4 fetch 8 ,mem_module_uart_rx_buffer 
+377f 20405eb0 call uarta_init_dma_mem 
+3780 6fe147bc fetch uart_baud_len ,mem_module_uarta_baud_rate 
+3781 20405ec4 call uarta_init_baud_rate 
+3782 20405ed7 call uart_clock_select_main_freq_crystal 
+3783 70807d08 jam gpcfg_uart_txd ,core_gpio_conf + hci_uart_tx_gpio_num 
+3784 70807e49 jam gpcfg_uart_rxd | gpcfg_pullup ,core_gpio_conf + hci_uart_rx_gpio_num 
+3785 7080790a jam gpcfg_uart_rts ,core_gpio_conf + hci_uart_rts_gpio_num 
+3786 70807a0b jam gpcfg_uart_cts ,core_gpio_conf + hci_uart_cts_gpio_num 
+3787 d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+3788 6fe147c3 fetch 2 ,mem_module_flag 
+3789 2feffe00 isolate1 module_flag_uart_flow_control ,pdata 
+378a 79208404 setflag true ,bit_uart_control_flow_control ,temp 
+378b 60588060 storet 1 ,core_uart_ctrl 
+378c 20600000 rtn 
+
+module_lpm_init:
+378d 204037a8 call module_spp_clear_last_transmite_clock 
+378e 2020377b branch module_lpm_uart_init 
+
+module_gpio_init:
+378f 6848c7a8 fetcht 1 ,mem_module_connect_state_gpio 
+3790 20406069 call gpio_config_output 
+3791 20403812 call module_set_conn_pin_low 
+3792 6848c7a6 fetcht 1 ,mem_module_wake_up_gpio 
+3793 20206050 branch gpio_config_input 
+
+module_lpm_lock:
+3794 6848c7a6 fetcht 1 ,mem_module_wake_up_gpio 
+3795 20406059 call gpio_get_bit 
+3796 2420b1df nbranch app_put_lpm_wake_lock ,true 
+3797 202031dd branch app_get_lpm_wake_lock 
+
+module_bt_conn_process:
+3798 2040379a call module_spp_enter_sniff 
+3799 20203baa branch module_control_air_flow 
+
+module_spp_enter_sniff:
+379a 6fe0c78c fetch 1 ,mem_ui_state_map 
+379b c30237a8 bbit0 ui_state_bt_spp_conn ,module_spp_clear_last_transmite_clock 
+379c 58003eff setarg 0x3eff 
+379d 684a47cb fetcht 4 ,mem_last_transmite_clock 
+379e 98408400 iadd temp ,temp 
+379f 1c427e00 copy clkn_bt ,pdata 
+37a0 98467c00 isub temp ,null 
+37a1 24610000 nrtn positive 
+37a2 6fe1478c fetch 2 ,mem_ui_state_map 
+37a3 c282b7a8 bbit1 ui_state_bt_sniff ,module_spp_clear_last_transmite_clock 
+37a4 6fe147c3 fetch 2 ,mem_module_flag 
+37a5 c3850000 rtnbit1 moudle_task_sniff 
+37a6 20403bad call module_set_sniff_task_flag 
+37a7 2040321b call app_bt_enter_sniff 
+
+module_spp_clear_last_transmite_clock:
+37a8 1c427e00 copy clkn_bt ,pdata 
+37a9 67e247cb store 4 ,mem_last_transmite_clock 
+37aa 20600000 rtn 
+
+module_process_idle:
+37ab 20403baa call module_control_air_flow 
+37ac 204052f1 call l2cap_malloc_is_fifo_full 
+37ad 247a0000 nrtn blank 
+37ae 20203817 branch module_process_check_hci_command_complete 
+
+module_process_bb_event:
+37af 1a627e00 copy regc ,pdata 
+37b0 c000b7ff beq bt_evt_bb_connected ,module_process_bb_conn 
+37b1 c00137ce beq bt_evt_bb_disconnected ,module_process_bb_event_disconned 
+37b2 c0023802 beq bt_evt_reconn_failed ,module_process_reconn_fail 
+37b3 c002b7ef beq bt_evt_setup_complete ,module_process_setup_complete 
+37b4 c00437d5 beq bt_evt_spp_connected ,module_process_spp_connected 
+37b5 c004b7dc beq bt_evt_spp_disconnected ,module_process_spp_disconnected 
+37b6 c00537f5 beq bt_evt_pincode_req ,module_process_evt_pincode_req 
+37b7 c005b7e1 beq bt_evt_enter_sniff ,module_process_enter_sniff 
+37b8 c00637ed beq bt_evt_exit_sniff ,module_process_exit_sniff 
+37b9 c009b802 beq bt_evt_reconn_page_timeout ,module_process_page_time_out 
+37ba c00a37fb beq bt_evt_le_connected ,module_process_le_conn 
+37bb c00ab7f1 beq bt_evt_le_disconnected ,module_process_bb_even_le_disconn 
+37bc c010b7f6 beq bt_evt_sniff_not_accept ,module_process_sniff_not_accept 
+37bd c011b7f7 beq bt_evt_unsniff_accept ,module_process_unsniff_accept 
+37be c01237fa beq bt_evt_unsniff_not_accept ,module_process_unsniff_not_accept 
+37bf c0183b3f beq bt_evt_le_pairing_fail ,module_hci_event_le_pairing_fail 
+37c0 c018bb41 beq bt_evt_le_pairing_success ,module_hci_event_le_pairing_success 
+37c1 c0193b4f beq bt_evt_le_start_enc ,module_hci_event_start_enc 
+37c2 c019bb4d beq bt_evt_le_pause_enc ,module_hci_event_pause_enc 
+37c3 c01a3b39 beq bt_evt_le_tk_generate ,module_hci_event_le_tk 
+37c4 c01abb22 beq bt_evt_bt_gkey_generate ,module_hci_event_gkey_generate 
+37c5 c01b3b37 beq bt_evt_bt_get_passkey ,module_hci_event_passkey_entry_mode 
+37c6 c01bbb43 beq bt_evt_bt_pairing_fail ,module_hci_event_bt_pairing_fail 
+37c7 c01c3b45 beq bt_evt_bt_pairing_success ,module_hci_event_bt_pairing_success 
+37c8 c01dbb22 beq bt_evt_le_gkey_generate ,module_hci_event_gkey_generate 
+37c9 c01ebb19 beq bt_evt_store_nvram ,module_hci_event_store_device 
+37ca c020b804 beq bt_evt_le_ltk_lost ,module_process_ble_ltk_lost 
+37cb c0213806 beq bt_evt_le_update_phy ,module_process_ble_update_phy 
+37cc c021bb37 beq bt_evt_le_get_passkey ,module_hci_event_passkey_entry_mode 
+37cd 20600000 rtn 
+
+module_process_bb_event_disconned:
+37ce 204037a8 call module_spp_clear_last_transmite_clock 
+37cf 6fe0c76f fetch 1 ,mem_flag_pairing_state 
+37d0 245a3b43 ncall module_hci_event_bt_pairing_fail ,blank 
+37d1 20403802 call module_disconn_start 
+37d2 6fe1478c fetch 2 ,mem_ui_state_map 
+37d3 c4020000 rtnbit0 ui_state_bt_spp_conn 
+37d4 202037dc branch module_spp_disconnected 
+
+module_process_spp_connected:
+37d5 6fe1478c fetch 2 ,mem_ui_state_map 
+37d6 79207e04 set1 ui_state_bt_spp_conn ,pdata 
+37d7 67e1478c store 2 ,mem_ui_state_map 
+37d8 6fe0c7b1 fetch 1 ,mem_module_spp_lpm_mult 
+37d9 67e0c177 store 1 ,mem_lpm_mult 
+37da 20403812 call module_set_conn_pin_low 
+37db 20203acc branch module_hci_event_spp_connect 
+
+module_process_spp_disconnected:
+
+module_spp_disconnected:
+37dc 6fe1478c fetch 2 ,mem_ui_state_map 
+37dd c4020000 rtnbit0 ui_state_bt_spp_conn 
+37de 793ffe04 set0 ui_state_bt_spp_conn ,pdata 
+37df 67e1478c store 2 ,mem_ui_state_map 
+37e0 20203ad0 branch module_hci_event_spp_disconnect 
+
+module_process_enter_sniff:
+
+module_sniff_param_check:
+37e1 204037a8 call module_spp_clear_last_transmite_clock 
+37e2 6fe14042 fetch 2 ,mem_context + coffset_tsniff 
+37e3 1fe37e00 rshift pdata ,pdata 
+37e4 68494455 fetcht 2 ,mem_sniff_param_interval 
+37e5 98467c00 isub temp ,null 
+37e6 2422b7e8 nbranch module_sniff_param_check_unsniff ,zero 
+37e7 20203223 branch app_lpm_mult_enable 
+
+module_sniff_param_check_unsniff:
+37e8 6fe147c3 fetch 2 ,mem_module_flag 
+37e9 c3848000 rtnbit1 moudle_task_unsniff 
+37ea 6ff10112 fetch 2 ,core_uart_rxitems 
+37eb 245a3bb1 ncall module_set_unsniff_task_flag ,blank 
+37ec 20203219 branch app_bt_sniff_exit 
+
+module_process_exit_sniff:
+37ed 20403baf call module_clear_sniff_task_flag 
+37ee 20203225 branch app_lpm_mult_disable 
+
+module_process_setup_complete:
+37ef 204037a8 call module_spp_clear_last_transmite_clock 
+37f0 20203809 branch module_conn_start 
+
+module_process_bb_even_le_disconn:
+37f1 20401b1c call le_clr_config_more_data 
+37f2 7047c500 jam 0 ,mem_module_hci_notify_len 
+37f3 20403802 call module_disconn_start 
+37f4 20203ad2 branch module_hci_event_le_disconnect 
+
+module_process_evt_pincode_req:
+37f5 202031ea branch app_bt_set_pincode 
+
+module_process_sniff_not_accept:
+37f6 20203baf branch module_clear_sniff_task_flag 
+
+module_process_unsniff_accept:
+37f7 6fe147c3 fetch 2 ,mem_module_flag 
+37f8 c304b21b bbit0 moudle_task_unsniff ,app_bt_enter_sniff 
+37f9 20203bb3 branch module_clear_unsniff_task_flag 
+
+module_process_unsniff_not_accept:
+37fa 20203bb3 branch module_clear_unsniff_task_flag 
+
+module_process_le_conn:
+37fb 20403809 call module_conn_start 
+37fc 6fe0c7b2 fetch 1 ,mem_module_le_lpm_mult 
+37fd 67e0c177 store 1 ,mem_lpm_mult 
+37fe 20203ace branch module_hci_event_le_connect 
+
+module_process_bb_conn:
+37ff 70476b00 jam 0 ,mem_flag_mode_ssp_pin 
+3800 20403baf call module_clear_sniff_task_flag 
+3801 20203bb3 branch module_clear_unsniff_task_flag 
+
+module_process_page_time_out:
+
+module_process_reconn_fail:
+
+module_disconn_start:
+3802 2040387f call module_start_adv_discovery_by_command 
+3803 20203807 branch module_set_conn_pin_high 
+
+module_process_ble_ltk_lost:
+3804 204021b5 call le_send_reject_ind 
+3805 20201f99 branch le_send_smp_security_request 
+
+module_process_ble_update_phy:
+3806 20203b65 branch module_hci_event_le_update_phy 
+
+module_set_conn_pin_high:
+3807 6848c7a8 fetcht 1 ,mem_module_connect_state_gpio 
+3808 20206069 branch gpio_out_active 
+
+module_conn_start:
+3809 2040380b call module_stop_adv_discovery 
+380a 20203812 branch module_set_conn_pin_low 
+
+module_stop_adv_discovery:
+380b 6fe0c7ab fetch 1 ,mem_module_state 
+380c 2feffe00 isolate1 moudle_state_bt_bit ,pdata 
+380d 2040b1fd call app_bt_stop_discovery ,true 
+380e 6fe0c7ab fetch 1 ,mem_module_state 
+380f 2feffe01 isolate1 moudle_state_ble_bit ,pdata 
+3810 2040b205 call app_ble_stop_adv ,true 
+3811 20600000 rtn 
+
+module_set_conn_pin_low:
+3812 6848c7a8 fetcht 1 ,mem_module_connect_state_gpio 
+3813 20206065 branch gpio_out_inactive 
+
+module_process_with_credit:
+3814 6fe0c656 fetch 1 ,mem_rfcomm_credit_flag 
+3815 c1000000 rtneq credit_disable 
+3816 202064df branch rfcomm_send_uih_without_payload 
+
+module_process_check_hci_command_complete:
+3817 6ff0810b fetch 1 ,core_uart_status 
+3818 c2813814 bbit1 uart_status_rx_fifo_empty ,module_process_with_credit 
+3819 20405ef7 call uarta_prepare_rx 
+381a efe08003 ifetch 1 ,contru 
+381b c080b82d bne 0x01 ,module_hci_in_excp 
+381c 6ff10112 fetch 2 ,core_uart_rxitems 
+381d 1fe67c02 sub pdata ,2 ,null 
+381e 20610000 rtn positive 
+381f efe08003 ifetch 1 ,contru 
+3820 67e089cf store 1 ,mem_module_uart_opcode 
+3821 e8408003 ifetcht 1 ,contru 
+3822 18622200 copy contru ,rega 
+3823 604889d0 storet 1 ,mem_module_uart_len 
+3824 18408403 add temp ,3 ,temp 
+3825 6ff10112 fetch 2 ,core_uart_rxitems 
+3826 98460400 isub temp ,temp 
+3827 24610000 nrtn positive 
+3828 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+3829 2040383b call module_hci_cmd_control 
+382a 6fe089d1 fetch 1 ,mem_module_temp_nl_discard_packet 
+382b c1000000 rtneq hci_not_discard_packet 
+382c 20203836 branch module_hci_dicard_packet 
+
+module_hci_in_excp:
+382d 20407d12 call delay_10ms 
+382e 20403b28 call module_hci_event_invalid_packet 
+382f 20203830 branch module_hci_release_except 
+
+module_hci_release_except:
+3830 44df4017 bpatch patch17_6 ,mem_patch17 
+3831 20405ef7 call uarta_prepare_rx 
+3832 6ff10112 fetch 2 ,core_uart_rxitems 
+3833 207a0000 rtn blank 
+3834 98608600 iadd contru ,contru 
+3835 2020383a branch module_hci_dicard_bytes 
+
+module_hci_dicard_packet:
+3836 20405ef7 call uarta_prepare_rx 
+3837 18608602 increase 2 ,contu 
+3838 efe08003 ifetch 1 ,contu 
+3839 98608600 iadd contu ,contu 
+
+module_hci_dicard_bytes:
+383a 20205f03 branch uarta_rxdone 
+
+module_hci_cmd_control:
+383b 44dfc017 bpatch patch17_7 ,mem_patch17 
+383c 6fe089cf fetch 1 ,mem_module_uart_opcode 
+383d c000386d beq hci_cmd_set_bt_addr_req ,module_hci_cmd_set_bt_addr 
+383e c000b872 beq hci_cmd_set_le_addr_req ,module_hci_cmd_set_le_addr 
+383f c0013877 beq hci_cmd_set_visibility_req ,module_hci_cmd_set_visibility 
+3840 c001b88c beq hci_cmd_set_bt_name_req ,module_hci_cmd_set_bt_name 
+3841 c0023896 beq hci_cmd_set_le_name_req ,module_hci_cmd_set_le_name 
+3842 c002b89a beq hci_cmd_spp_data_req ,module_hci_cmd_receive_spp_data 
+3843 c004b8bc beq hci_cmd_le_data_req ,module_hci_cmd_receive_le_data 
+3844 c005b910 beq hci_cmd_status_irq ,module_hci_cmd_inquire_status 
+3845 c0063911 beq hci_cmd_set_pairing_req ,module_hci_cmd_set_pairing_mode 
+3846 c006b935 beq hci_cmd_set_pincode_req ,module_hci_cmd_set_pincode 
+3847 c0073938 beq hci_cmd_set_uartcontrol_req ,module_hci_cmd_set_uart_control_mode 
+3848 c007b940 beq hci_cmd_set_uart_baud_req ,module_hci_cmd_set_uart_baud 
+3849 c0083948 beq hci_cmd_version_req ,module_hci_cmd_version_request 
+384a c008b94c beq hci_cmd_bt_disconnect ,module_hci_cmd_bt_disconnect 
+384b c0093950 beq hci_cmd_ble_disconnect ,module_hci_cmd_ble_disconnect 
+384c c00ab954 beq hci_cmd_set_cod ,module_hci_cmd_set_cod 
+384d c0133959 beq hci_cmd_set_nvram_req ,module_hci_cmd_set_nvram 
+384e c014395e beq hci_cmd_confirm_gkey ,module_hci_cmd_confirm_gkey 
+384f c014b96e beq hci_cmd_set_credit_given ,module_hci_cmd_set_credit_given 
+3850 c0153977 beq hci_cmd_auto_adv_scan ,module_hci_cmd_auto_adv 
+3851 c015b9aa beq hci_cmd_power_req ,module_hci_cmd_power_request 
+3852 c01639b0 beq hci_cmd_power_set ,module_hci_cmd_power_set 
+3853 c01839b7 beq hci_cmd_passkey_entry ,module_hci_cmd_passkey_entry 
+3854 c018b9c1 beq hci_cmd_set_gpio ,module_hci_cmd_set_gpio 
+3855 c01939d2 beq hci_cmd_read_gpio ,module_hci_cmd_read_gpio 
+3856 c019b9dd beq hci_cmd_le_set_pairing ,module_hci_cmd_le_set_pairing_mode 
+3857 c01a3a0a beq hci_cmd_le_set_adv_data ,module_hci_cmd_le_set_adv_data 
+3858 c01aba0d beq hci_cmd_le_set_scan_data ,module_hci_cmd_le_set_scan_data 
+3859 c01b3a16 beq hci_cmd_le_send_conn_update_req ,module_hci_cmd_le_send_conn_update_req 
+385a c01bba1f beq hci_cmd_le_set_adv_parm ,module_hci_cmd_set_le_adv_parameter 
+385b c01c3a22 beq hci_cmd_le_start_pairing ,module_hci_cmd_le_start_pairing 
+385c c0203a2a beq hci_cmd_set_wake_gpio ,module_hci_cmd_set_wake_gpio 
+385d c0213a34 beq hci_cmd_set_tx_power ,module_hci_cmd_set_tx_power 
+385e c0243a39 beq hci_cmd_le_confirm_gkey ,module_hci_cmd_le_confirm_gkey 
+385f c024ba44 beq hci_cmd_reject_justwork ,module_hci_cmd_set_reject_justwork_flag 
+3860 c028ba4a beq hci_cmd_reset_chip_req ,module_hci_cmd_reset_chip 
+3861 c030ba4e beq hci_cmd_le_set_fixed_passkey ,module_hci_cmd_le_set_fixed_passkey 
+3862 c03b3a5d beq hci_cmd_delete_customize_service ,module_hci_cmd_delete_customize_service 
+3863 c03bba63 beq hci_cmd_add_service_uuid ,module_hci_cmd_add_service_uuid 
+3864 c03c3a68 beq hci_cmd_add_characteristic_uuid ,module_hci_cmd_add_characteristic_uuid 
+3865 c03d3a9e beq hci_cmd_passkey_entry_input ,module_hci_cmd_le_passkey_entry_input 
+3866 c0483aac beq hci_cmd_ble_set_phy ,module_hci_cmd_ble_set_phy 
+3867 c048bab1 beq hci_cmd_ble_read_current_phy ,module_hci_cmd_ble_read_current_phy 
+3868 c0493ab5 beq hci_cmd_ble_set_dle ,module_hci_cmd_ble_set_dle 
+3869 c049baba beq hci_cmd_read_chip_data ,module_hci_cmd_read_chip_data 
+386a c04a3abe beq hci_cmd_write_chip_data ,module_hci_cmd_write_chip_data 
+386b c07fbac4 beq hci_cmd_close_lpm ,module_hci_cmd_close_lpm 
+386c 20203ac6 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_set_bt_addr:
+386d 6fe089d0 fetch 1 ,mem_module_uart_len 
+386e c0833ac6 bne 6 ,module_hci_event_receive_invalid_cmd 
+386f efe30003 ifetch 6 ,contru 
+3870 67e340a8 store 6 ,mem_lap 
+3871 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_le_addr:
+3872 6fe089d0 fetch 1 ,mem_module_uart_len 
+3873 c0833ac6 bne 6 ,module_hci_event_receive_invalid_cmd 
+3874 efe30003 ifetch 6 ,contru 
+3875 67e3437a store 6 ,mem_le_lap 
+3876 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_visibility:
+3877 6fe089d0 fetch 1 ,mem_module_uart_len 
+3878 c080bac6 bne 1 ,module_hci_event_receive_invalid_cmd 
+3879 e8408003 ifetcht 1 ,contru 
+387a 6048c7b3 storet 1 ,mem_module_bluetooth_stauts_by_command 
+387b 20403ac9 call module_hci_event_receive_valid_cmd 
+387c 6fe1478c fetch 2 ,mem_ui_state_map 
+387d c3848000 rtnbit1 ui_state_ble_connected 
+387e c3800000 rtnbit1 ui_state_bt_connected 
+
+module_start_adv_discovery_by_command:
+387f 6fe0c7ab fetch 1 ,mem_module_state 
+3880 2feffe00 isolate1 moudle_state_bt_bit ,pdata 
+3881 2420b885 nbranch moudle_start_adv_by_command ,true 
+3882 6848c7b3 fetcht 1 ,mem_module_bluetooth_stauts_by_command 
+3883 18417e03 and temp ,0x03 ,pdata 
+3884 67e0c09b store 1 ,mem_scan_mode 
+
+moudle_start_adv_by_command:
+3885 6fe0c7ab fetch 1 ,mem_module_state 
+3886 2feffe01 isolate1 moudle_state_ble_bit ,pdata 
+3887 24608000 nrtn true 
+3888 6848c7b3 fetcht 1 ,mem_module_bluetooth_stauts_by_command 
+3889 284ffe02 isolate1 2 ,temp 
+388a 2020b207 branch app_ble_start_adv ,true 
+388b 20203205 branch app_ble_stop_adv 
+
+module_hci_cmd_set_bt_name:
+388c 6fe089d0 fetch 1 ,mem_module_uart_len 
+388d 1fe67c43 sub pdata ,67 ,null 
+388e 24213ac6 nbranch module_hci_event_receive_invalid_cmd ,positive 
+388f 67e0c5fc store 1 ,mem_local_name_length 
+3890 df200008 arg 8 ,loopcnt 
+3891 20407d17 call memset0 
+3892 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3893 d8a045fd arg mem_local_name ,contw 
+3894 20405f39 call uart_copy_rx_bytes_fast 
+3895 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_le_name:
+3896 dfe0001f arg 31 ,pdata 
+3897 d8a042f7 arg mem_le_name_len ,contw 
+3898 20403a10 call module_hci_cmd_receive_store_mem 
+3899 20201aa9 branch le_modified_name 
+
+module_hci_cmd_receive_spp_data:
+389a 6fe0c78c fetch 1 ,mem_ui_state_map 
+389b c3023ac6 bbit0 ui_state_bt_spp_conn ,module_hci_event_receive_invalid_cmd 
+389c 204031d7 call app_check_sniff 
+389d 2020b8aa branch module_hci_cmd_spp_exit_sniff ,true 
+389e 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+389f 204037a8 call module_spp_clear_last_transmite_clock 
+38a0 6fe0c653 fetch 1 ,mem_remote_credits 
+38a1 207a0000 rtn blank 
+38a2 6fe1465e fetch 2 ,mem_nl_rx_len_all 
+38a3 243a38a8 nbranch module_hci_cmd_pass_init_ng_rx_len_all ,blank 
+38a4 6fe089d0 fetch 1 ,mem_module_uart_len 
+38a5 67e1465e store 2 ,mem_nl_rx_len_all 
+38a6 67e1465c store 2 ,mem_nl_rx_data_src 
+38a7 6061465c storer contru ,2 ,mem_nl_rx_data_src 
+
+module_hci_cmd_pass_init_ng_rx_len_all:
+38a8 204038ac call module_hci_cmd_get_current_packet_len_and_remain_len 
+38a9 20206504 branch spp_tx_rfcomm_packet 
+
+module_hci_cmd_spp_exit_sniff:
+38aa 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+38ab 20203b95 branch module_exit_sniff 
+
+module_hci_cmd_get_current_packet_len_and_remain_len:
+38ac 204038b2 call module_hci_cmd_get_current_patcket_len 
+38ad 6fe1465e fetch 2 ,mem_nl_rx_len_all 
+38ae 684947a9 fetcht 2 ,mem_current_packet_length 
+38af 98467e00 isub temp ,pdata 
+38b0 67e1465e store 2 ,mem_nl_rx_len_all 
+38b1 20600000 rtn 
+
+module_hci_cmd_get_current_patcket_len:
+38b2 6fe1465e fetch 2 ,mem_nl_rx_len_all 
+38b3 68494657 fetcht 2 ,mem_rfcomm_max_frame_size 
+38b4 20407e4a call not_greater_than 
+38b5 68494649 fetcht 2 ,mem_pn_max_frame_size 
+38b6 20407e4a call not_greater_than 
+38b7 67e147a9 store 2 ,mem_current_packet_length 
+38b8 20600000 rtn 
+
+module_hci_command_tx_spp_tx_complete:
+38b9 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+38ba 7009cf05 jam hci_cmd_spp_data_req ,mem_module_uart_opcode 
+38bb 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_receive_le_data:
+38bc 6fe1478c fetch 2 ,mem_ui_state_map 
+38bd c304bac6 bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+38be 2040390d call module_check_ble_encrypt_state 
+38bf 20343ac6 branch module_hci_event_receive_invalid_cmd ,user 
+38c0 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+38c1 6fe147c3 fetch 2 ,mem_module_flag 
+38c2 c28438e1 bbit1 module_flag_ble_data_finish ,module_hci_cmd_receive_le_data_finish 
+38c3 6fe0c7c5 fetch 1 ,mem_module_hci_notify_len 
+38c4 247a0000 nrtn blank 
+38c5 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+38c6 efe10003 ifetch 2 ,contru 
+38c7 67e147c6 store 2 ,mem_module_hci_notify_handle 
+38c8 606147c8 storer contru ,2 ,mem_module_hci_nofiy_addr 
+38c9 6fe089d0 fetch 1 ,mem_module_uart_len 
+38ca 1fe0fffe pincrease -2 
+38cb 24213ac6 nbranch module_hci_event_receive_invalid_cmd ,positive 
+38cc 2022bac6 branch module_hci_event_receive_invalid_cmd ,zero 
+38cd 67e0c7c5 store 1 ,mem_module_hci_notify_len 
+38ce 684947c6 fetcht 2 ,mem_module_hci_notify_handle 
+38cf 184085ff increase -1 ,temp 
+38d0 20401a65 call le_att_get_handle_ptr2 
+38d1 203a38e4 branch module_hci_cmd_transmit_handle_error ,blank 
+38d2 e8420006 ifetcht 4 ,contr 
+38d3 59280302 setarg 0x01280302 
+38d4 98467c00 isub temp ,null 
+38d5 2422b8e4 nbranch module_hci_cmd_transmit_handle_error ,zero 
+38d6 efe08006 ifetch 1 ,contr 
+38d7 67e0c7ca store 1 ,mem_module_hci_notify_type 
+38d8 1fe17e30 and_into 0x30 ,pdata 
+38d9 203a38e4 branch module_hci_cmd_transmit_handle_error ,blank 
+38da 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+38db 20401b1a call le_set_config_more_data 
+38dc 204038e8 call module_hci_cmd_transmit_le_notify 
+38dd 204038e8 call module_hci_cmd_transmit_le_notify 
+38de 204038e8 call module_hci_cmd_transmit_le_notify 
+38df 6fe147c3 fetch 2 ,mem_module_flag 
+38e0 c4040000 rtnbit0 module_flag_ble_data_finish 
+
+module_hci_cmd_receive_le_data_finish:
+38e1 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+38e2 20403bb7 call module_clear_le_tx_data_flag 
+38e3 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_transmit_handle_error:
+38e4 7047c500 jam 0 ,mem_module_hci_notify_len 
+38e5 7009d101 jam hci_discard_packet ,mem_module_temp_nl_discard_packet 
+38e6 20403bb7 call module_clear_le_tx_data_flag 
+38e7 20203ac6 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_transmit_le_notify:
+38e8 6fe0c7c5 fetch 1 ,mem_module_hci_notify_len 
+38e9 207a0000 rtn blank 
+38ea 20401b77 call le_fifo_check_nearly_full 
+38eb 247a0000 nrtn blank 
+38ec 20403908 call module_get_le_remote_mtu 
+38ed 44e04018 bpatch patch18_0 ,mem_patch18 
+38ee 6fe0c435 fetch 1 ,mem_le_l2cap_att_states 
+38ef c3800000 rtnbit1 ble_l2cap_recv_confirmation_packet 
+38f0 1840fffd add temp ,-3 ,pdata 
+38f1 d84000fb arg 251 ,temp 
+38f2 20407e4a call not_greater_than 
+38f3 6848c7c5 fetcht 1 ,mem_module_hci_notify_len 
+38f4 20407e4a call not_greater_than 
+38f5 1fe22200 copy pdata ,rega 
+38f6 18427e00 copy temp ,pdata 
+38f7 9a267e00 isub rega ,pdata 
+38f8 67e0c7c5 store 1 ,mem_module_hci_notify_len 
+38f9 20403903 call module_hci_cmd_transmit_le_notify_malloc_l2cap 
+38fa 6fe147c8 fetch 2 ,mem_module_hci_nofiy_addr 
+38fb 1fe20600 copy pdata ,contru 
+38fc 1a227200 copy rega ,loopcnt 
+38fd 20405f39 call uart_copy_rx_bytes_fast 
+38fe 18627e00 copy contru ,pdata 
+38ff 67e147c8 store 2 ,mem_module_hci_nofiy_addr 
+3900 6fe0c7c5 fetch 1 ,mem_module_hci_notify_len 
+3901 247a0000 nrtn blank 
+3902 20203bb5 branch module_set_le_tx_data_flag 
+
+module_hci_cmd_transmit_le_notify_malloc_l2cap:
+3903 684947c6 fetcht 2 ,mem_module_hci_notify_handle 
+3904 6fe0c7ca fetch 1 ,mem_module_hci_notify_type 
+3905 c2829ebc bbit1 bit_characteristic_indicate ,le_att_malloc_tx_indication 
+3906 c2821eb3 bbit1 bit_characteristic_notify ,le_att_malloc_tx_notify 
+3907 20600000 rtn 
+
+module_get_le_remote_mtu:
+3908 d8400017 arg 0x17 ,temp 
+3909 6fe147c3 fetch 2 ,mem_module_flag 
+390a c3808000 rtnbit1 module_flag_ble_send_mtu23 
+390b 68494382 fetcht 2 ,mem_le_remote_mtu 
+390c 20600000 rtn 
+
+module_check_ble_encrypt_state:
+390d 6fe147c3 fetch 2 ,mem_module_flag 
+390e c2811e8d bbit1 module_flag_ble_data_encrypt ,le_check_encrypt_state 
+390f 20207e56 branch disable_user 
+
+module_hci_cmd_inquire_status:
+3910 20203afb branch module_hci_event_status_res 
+
+module_hci_cmd_set_pairing_mode:
+3911 efe08003 ifetch 1 ,contru 
+3912 c040b91e beq br_pairing_mode_secure_connect_justwork ,module_hci_pairing_just_work_sc 
+3913 c0413920 beq br_pairing_mode_secure_connect_passkey ,module_hci_pairing_passkey_sc 
+3914 c041b922 beq br_pairing_mode_secure_connect_numeric ,module_hci_pairing_numeric_comparison_sc 
+3915 1fe22200 copy pdata ,rega 
+3916 20406ebb call sp_br_secure_connection_disable 
+3917 20407544 call sc_reset 
+3918 1a227e00 copy rega ,pdata 
+3919 c0003924 beq br_pairing_mode_pincode ,module_hci_pairing_pincode_mode 
+391a c000b927 beq br_pairing_mode_justwork ,module_hci_pairing_just_work_mode 
+391b c0013931 beq br_pairing_mode_passkey ,module_hci_pairing_passkey 
+391c c001b933 beq br_pairing_mode_numeric ,module_hci_pairing_numeric_comparison 
+391d 20203ac6 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_pairing_just_work_sc:
+391e 20406eb7 call sp_br_secure_connection_enable 
+391f 20203927 branch module_hci_pairing_just_work_mode 
+
+module_hci_pairing_passkey_sc:
+3920 20406eb7 call sp_br_secure_connection_enable 
+3921 20203931 branch module_hci_pairing_passkey 
+
+module_hci_pairing_numeric_comparison_sc:
+3922 20406eb7 call sp_br_secure_connection_enable 
+3923 20203933 branch module_hci_pairing_numeric_comparison 
+
+module_hci_pairing_pincode_mode:
+3924 20406ec2 call sp_reset 
+3925 70476400 jam 0 ,mem_ssp_enable 
+3926 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_pairing_just_work_mode:
+3927 58000003 setarg io_capability_no_input_no_output 
+
+module_hci_sspairing_mode:
+3928 67e0c76c store 1 ,mem_ssp_mode_flag 
+3929 67e0c765 store 1 ,mem_lmp_io_cap_payload_iocap 
+392a 58000000 setarg oob_data_present_not_present 
+392b 67e0c766 store 1 ,mem_lmp_io_cap_payload_oob_auth_data 
+392c 58000004 setarg auth_req_mitm_protection_not_required_general_bonding 
+392d 67e0c767 store 1 ,mem_lmp_io_cap_payload_auth_req 
+392e 204057ae call ssp_enable 
+392f 70476401 jam 1 ,mem_ssp_enable 
+3930 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_pairing_passkey:
+3931 58000002 setarg io_capability_keyboard_only 
+3932 20203928 branch module_hci_sspairing_mode 
+
+module_hci_pairing_numeric_comparison:
+3933 58000001 setarg io_capability_display_yesno 
+3934 20203928 branch module_hci_sspairing_mode 
+
+module_hci_cmd_set_pincode:
+3935 dfe00010 arg 16 ,pdata 
+3936 d8a04793 arg mem_pin_length ,contw 
+3937 20203a10 branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_set_uart_control_mode:
+3938 efe08003 ifetch 1 ,contru 
+3939 6848c7c3 fetcht 1 ,mem_module_flag 
+393a 7d3a0400 nsetflag blank ,module_flag_uart_flow_control ,temp 
+393b 6048c7c3 storet 1 ,mem_module_flag 
+393c 68588060 fetcht 1 ,core_uart_ctrl 
+393d 7d3a0404 nsetflag blank ,bit_uart_control_flow_control ,temp 
+393e 60588060 storet 1 ,core_uart_ctrl 
+393f 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_uart_baud:
+3940 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3941 20407db8 call string2dec_from_uart 
+3942 20405ecc call uart_calc_baud_rate_config 
+3943 67e147bc store uart_baud_len ,mem_module_uarta_baud_rate 
+3944 20403ac9 call module_hci_event_receive_valid_cmd 
+3945 20407e07 call wait_uarttx 
+3946 6fe147bc fetch uart_baud_len ,mem_module_uarta_baud_rate 
+3947 20205ec4 branch uarta_init_baud_rate 
+
+module_hci_cmd_version_request:
+3948 da200002 arg 2 ,rega 
+3949 da4047a4 arg mem_soft_version_num ,regb 
+394a d8400000 arg 0 ,temp 
+394b 20203ad4 branch module_hci_event_set_cmd 
+
+module_hci_cmd_bt_disconnect:
+394c 6fe1478c fetch 2 ,mem_ui_state_map 
+394d c3003ac6 bbit0 ui_state_bt_connected ,module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_bt_disconnect_doing:
+394e 20403ac9 call module_hci_event_receive_valid_cmd 
+394f 202031f6 branch app_bt_disconnect 
+
+module_hci_cmd_ble_disconnect:
+3950 6fe1478c fetch 2 ,mem_ui_state_map 
+3951 c304bac6 bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_ble_disconnect_doing:
+3952 20403ac9 call module_hci_event_receive_valid_cmd 
+3953 2020320f branch app_ble_disconnect 
+
+module_hci_cmd_set_cod:
+3954 6fe089d0 fetch 1 ,mem_module_uart_len 
+3955 c081bac6 bne 3 ,module_hci_event_receive_invalid_cmd 
+3956 efe18003 ifetch 3 ,contru 
+3957 67e1c0b2 store 3 ,mem_class 
+3958 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_nvram:
+3959 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+395a 6fe14487 fetch 2 ,mem_nv_data_ptr 
+395b 1fe20a00 icopy contw 
+395c 20405f39 call uart_copy_rx_bytes_fast 
+395d 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_confirm_gkey:
+395e 6fe1478c fetch 2 ,mem_ui_state_map 
+395f c284ba39 bbit1 ui_state_ble_connected ,module_hci_cmd_le_confirm_gkey 
+3960 c3003ac6 bbit0 ui_state_bt_connected ,module_hci_event_receive_invalid_cmd 
+3961 efe08003 ifetch 1 ,contru 
+3962 6848c76b fetcht 1 ,mem_flag_mode_ssp_pin 
+3963 793a0400 setflag blank ,flag_mode_ssp_pin_comparison_result_bit ,temp 
+3964 79200407 set1 flag_mode_ssp_pin_reviceve_comparison_bit ,temp 
+3965 6048c76b storet 1 ,mem_flag_mode_ssp_pin 
+3966 20403ac9 call module_hci_event_receive_valid_cmd 
+3967 6fe0c76b fetch 1 ,mem_flag_mode_ssp_pin 
+3968 c283396a bbit1 flag_mode_ssp_pin_recieve_dhkey_bit ,module_hci_cmd_spp_number_comparison_result_is1 
+3969 20600000 rtn 
+
+module_hci_cmd_spp_number_comparison_result_is1:
+396a c2805686 bbit1 flag_mode_ssp_pin_comparison_result_bit ,number_comparison_successed 
+396b 70476b00 jam 0 ,mem_flag_mode_ssp_pin 
+396c 70095b21 jam bt_cmd_dhkey_not_accept ,mem_fifo_temp 
+396d 2020787a branch ui_ipc_send_cmd 
+
+module_hci_cmd_set_credit_given:
+396e 6fe0c78c fetch 1 ,mem_ui_state_map 
+396f c4020000 rtnbit0 ui_state_bt_spp_conn 
+3970 6fe0c656 fetch 1 ,mem_rfcomm_credit_flag 
+3971 c1000000 rtneq credit_disable 
+3972 efe08003 ifetch 1 ,contru 
+3973 6848c654 fetcht 1 ,mem_credit_given 
+3974 98408400 iadd temp ,temp 
+3975 6048c654 storet 1 ,mem_credit_given 
+3976 20600000 rtn 
+
+module_hci_cmd_auto_adv:
+3977 df200040 arg 0x40 ,loopcnt 
+3978 d8a043e7 arg mem_le_adv_data_len ,contw 
+3979 20407d26 call clear_mem 
+397a 58000000 setarg 0 
+397b 67e08974 store 1 ,mem_regb 
+397c 1a220600 copy rega ,contru 
+
+module_hci_cmd_auto_adv_loop:
+397d 18627e00 copy contru ,pdata 
+397e 67e10978 store 2 ,mem_regc 
+397f 204039a5 call module_hci_cmd_auto_adv_adv_analys 
+3980 6fe08974 fetch 1 ,mem_regb 
+3981 68488964 fetcht 1 ,mem_temp 
+3982 18408401 increase 1 ,temp 
+3983 9840fe00 iadd temp ,pdata 
+3984 67e08974 store 1 ,mem_regb 
+3985 1fe67c1f sub pdata ,31 ,null 
+3986 24213991 nbranch module_hci_cmd_auto_adv_store_scan ,positive 
+
+module_hci_cmd_auto_adv_store_adv:
+3987 6848c3e7 fetcht 1 ,mem_le_adv_data_len 
+3988 580043e8 setarg mem_le_adv_data 
+3989 9840fe00 iadd temp ,pdata 
+398a 67e1097d store 2 ,mem_contw 
+398b 68488964 fetcht 1 ,mem_temp 
+398c 18408401 increase 1 ,temp 
+398d 6fe0c3e7 fetch 1 ,mem_le_adv_data_len 
+398e 9840fe00 iadd temp ,pdata 
+398f 67e0c3e7 store 1 ,mem_le_adv_data_len 
+3990 2020399a branch module_hci_cmd_auto_adv_store_common 
+
+module_hci_cmd_auto_adv_store_scan:
+3991 6848c407 fetcht 1 ,mem_le_scan_data_len 
+3992 58004408 setarg mem_le_scan_data 
+3993 9840fe00 iadd temp ,pdata 
+3994 67e1097d store 2 ,mem_contw 
+3995 68488964 fetcht 1 ,mem_temp 
+3996 18408401 increase 1 ,temp 
+3997 6fe0c407 fetch 1 ,mem_le_scan_data_len 
+3998 9840fe00 iadd temp ,pdata 
+3999 67e0c407 store 1 ,mem_le_scan_data_len 
+
+module_hci_cmd_auto_adv_store_common:
+399a 6fe1097d fetch 2 ,mem_contw 
+399b 1fe20a00 copy pdata ,contw 
+399c 6fe10978 fetch 2 ,mem_regc 
+399d 1fe20600 copy pdata ,contru 
+399e 18427200 copy temp ,loopcnt 
+399f 20405f39 call uart_copy_rx_bytes_fast 
+39a0 6fe089d0 fetch 1 ,mem_module_uart_len 
+39a1 68488974 fetcht 1 ,mem_regb 
+39a2 98467c00 isub temp ,null 
+39a3 2422b97d nbranch module_hci_cmd_auto_adv_loop ,zero 
+39a4 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_auto_adv_adv_analys:
+39a5 efe08003 ifetch 1 ,contru 
+39a6 67e08964 store 1 ,mem_temp 
+39a7 efe08003 ifetch 1 ,contru 
+39a8 67e08970 store 1 ,mem_rega 
+39a9 20600000 rtn 
+
+module_hci_cmd_power_request:
+39aa d8400000 arg 0 ,temp 
+39ab da200002 arg 2 ,rega 
+39ac 6fe147c0 fetch 2 ,mem_module_vdd_quotient 
+39ad 67e1098e store 2 ,mem_event_cmd_response_content 
+39ae da40098e arg mem_event_cmd_response_content ,regb 
+39af 20203ad4 branch module_hci_event_set_cmd 
+
+module_hci_cmd_power_set:
+39b0 6fe089d0 fetch 1 ,mem_module_uart_len 
+39b1 c080bac6 bne 1 ,module_hci_event_receive_invalid_cmd 
+39b2 efe08003 ifetch 1 ,contru 
+39b3 67e0c7be store 1 ,mem_module_read_vdd_flag 
+39b4 58000000 setarg 0x00 
+39b5 67e147c0 store 2 ,mem_module_vdd_quotient 
+39b6 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_passkey_entry:
+39b7 6fe089d0 fetch 1 ,mem_module_uart_len 
+39b8 c0823ac6 bne 4 ,module_hci_event_receive_invalid_cmd 
+39b9 6fe1478c fetch 2 ,mem_ui_state_map 
+39ba c284ba9e bbit1 ui_state_ble_connected ,module_hci_cmd_le_passkey_entry_input 
+39bb efe20003 ifetch 4 ,contru 
+39bc 67e24794 store 4 ,mem_pin 
+39bd 70479304 jam 4 ,mem_pin_length 
+39be 70476d00 jam 0 ,mem_authentication_passkey_times 
+39bf 20403ac9 call module_hci_event_receive_valid_cmd 
+39c0 20205606 branch authentication_passkey 
+
+module_hci_cmd_set_gpio:
+39c1 6fe089d0 fetch 1 ,mem_module_uart_len 
+39c2 c081bac6 bne 3 ,module_hci_event_receive_invalid_cmd 
+39c3 efe08003 ifetch 1 ,contru 
+39c4 c00039c7 beq hci_cmd_config_gpio_input ,module_set_gpio_input 
+39c5 c000b9cd beq hci_cmd_config_gpio_output ,module_set_gpio_output 
+39c6 20203ac6 branch module_hci_event_receive_invalid_cmd 
+
+module_set_gpio_input:
+39c7 20403ac9 call module_hci_event_receive_valid_cmd 
+39c8 e8408003 ifetcht 1 ,contru 
+39c9 efe08003 ifetch 1 ,contru 
+39ca c001607f beq gpio_input_high_impedance ,gpio_set_high_impedance 
+39cb 7d3a0407 nsetflag blank ,7 ,temp 
+39cc 20206050 branch gpio_config_input 
+
+module_set_gpio_output:
+39cd 20403ac9 call module_hci_event_receive_valid_cmd 
+39ce e8408003 ifetcht 1 ,contru 
+39cf efe08003 ifetch 1 ,contru 
+39d0 203a6069 branch gpio_out_active ,blank 
+39d1 20206065 branch gpio_out_inactive 
+
+module_hci_cmd_read_gpio:
+39d2 6fe089d0 fetch 1 ,mem_module_uart_len 
+39d3 c080bac6 bne 1 ,module_hci_event_receive_invalid_cmd 
+39d4 e8408003 ifetcht 1 ,contru 
+39d5 20406059 call gpio_get_bit 
+39d6 58000000 setarg 0x0 
+39d7 7d20fe00 nsetflag true ,0 ,pdata 
+39d8 da200001 arg 1 ,rega 
+39d9 67e1098e store 2 ,mem_event_cmd_response_content 
+39da da40098e arg mem_event_cmd_response_content ,regb 
+39db d8400000 arg 0 ,temp 
+39dc 20203ad4 branch module_hci_event_set_cmd 
+
+module_hci_cmd_le_set_pairing_mode:
+39dd efe08003 ifetch 1 ,contru 
+39de 1fe20400 copy pdata ,temp 
+39df c040b9ec beq le_pairing_mode_secure_connect_justwork ,module_le_set_pairing_mode_secure_justwork 
+39e0 c04139f0 beq le_pairing_mode_secure_connect_numeric ,module_le_set_pairing_mode_secure_numeric 
+39e1 c041b9f5 beq le_pairing_mode_secure_connect_passkey ,module_le_set_pairing_mode_secure_passkey 
+39e2 c04239f9 beq le_pairing_mode_secure_connect_passkey_res_input ,module_le_set_pairing_mode_secure_passkey_res_input 
+39e3 67e0c39d store 1 ,mem_le_pairing_mode 
+39e4 20407544 call sc_reset 
+39e5 20401f88 call le_secure_connection_disable 
+39e6 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+39e7 c00039fd beq le_pairing_mode_none ,module_le_set_no_pairing 
+39e8 c000ba00 beq le_pairing_mode_lagacy_justwork ,module_le_set_pairing_mode_lagacy_just_work 
+39e9 c0013a02 beq le_pairing_mode_lagacy_passkey ,module_le_set_pairing_mode_lagacy_passkey 
+39ea c0023a04 beq le_pairing_mode_lagacy_passkey_res_input ,module_le_set_pairing_mode_lagacy_passkey_res_input 
+39eb 20203ac6 branch module_hci_event_receive_invalid_cmd 
+
+module_le_set_pairing_mode_secure_justwork:
+39ec 6048c39d storet 1 ,mem_le_pairing_mode 
+39ed 20401f84 call le_secure_connection_enable 
+39ee 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+39ef 202039fe branch module_le_set_noinputnooutput 
+
+module_le_set_pairing_mode_secure_numeric:
+39f0 6048c39d storet 1 ,mem_le_pairing_mode 
+39f1 20401f84 call le_secure_connection_enable 
+39f2 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+39f3 70435101 jam flag_iocap_displayyesno ,mem_le_pres_iocap 
+39f4 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_le_set_pairing_mode_secure_passkey:
+39f5 6048c39d storet 1 ,mem_le_pairing_mode 
+39f6 20401f84 call le_secure_connection_enable 
+39f7 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+39f8 20203a08 branch module_le_set_displayonly 
+
+module_le_set_pairing_mode_secure_passkey_res_input:
+39f9 6048c39d storet 1 ,mem_le_pairing_mode 
+39fa 20401f84 call le_secure_connection_enable 
+39fb 7043530d jam flag_le_bonding_mitm_secure ,mem_le_pres_auth 
+39fc 20203a06 branch module_le_set_keboadonly 
+
+module_le_set_no_pairing:
+39fd 70435300 jam flag_le_no_bonding_no_mitm ,mem_le_pres_auth 
+
+module_le_set_noinputnooutput:
+39fe 70435103 jam flag_iocap_noinputnooutput ,mem_le_pres_iocap 
+39ff 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_le_set_pairing_mode_lagacy_just_work:
+3a00 70435301 jam flag_le_bonding_no_mitm ,mem_le_pres_auth 
+3a01 202039fe branch module_le_set_noinputnooutput 
+
+module_le_set_pairing_mode_lagacy_passkey:
+3a02 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+3a03 20203a08 branch module_le_set_displayonly 
+
+module_le_set_pairing_mode_lagacy_passkey_res_input:
+3a04 70435305 jam flag_le_bonding_mitm ,mem_le_pres_auth 
+3a05 20203a06 branch module_le_set_keboadonly 
+
+module_le_set_keboadonly:
+3a06 70435102 jam flag_iocap_keyboardonly ,mem_le_pres_iocap 
+3a07 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_le_set_displayonly:
+3a08 70435100 jam flag_iocap_displayonly ,mem_le_pres_iocap 
+3a09 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_set_adv_data:
+3a0a dfe0001f arg 31 ,pdata 
+3a0b d8a043e7 arg mem_le_adv_data_len ,contw 
+3a0c 20203a10 branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_le_set_scan_data:
+3a0d dfe0001f arg 31 ,pdata 
+3a0e d8a04407 arg mem_le_scan_data_len ,contw 
+3a0f 20203a10 branch module_hci_cmd_receive_store_mem 
+
+module_hci_cmd_receive_store_mem:
+3a10 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3a11 9f267c00 isub loopcnt ,null 
+3a12 24213ac6 nbranch module_hci_event_receive_invalid_cmd ,positive 
+3a13 e7208005 istorer loopcnt ,1 ,contw 
+3a14 20405f39 call uart_copy_rx_bytes_fast 
+3a15 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_send_conn_update_req:
+3a16 6fe1478c fetch 2 ,mem_ui_state_map 
+3a17 c304bac6 bbit0 ui_state_ble_connected ,module_hci_event_receive_invalid_cmd 
+3a18 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a19 c0843ac6 bne 0x08 ,module_hci_event_receive_invalid_cmd 
+3a1a efe40003 ifetch 8 ,contru 
+3a1b 67e44372 store 8 ,mem_le_interval_min 
+3a1c 70095b12 jam bt_cmd_le_update_conn ,mem_fifo_temp 
+3a1d 2040787a call ui_ipc_send_cmd 
+3a1e 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_le_adv_parameter:
+3a1f efe10003 ifetch 2 ,contru 
+3a20 67e14428 store 2 ,mem_le_adv_interval 
+3a21 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_start_pairing:
+3a22 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+3a23 203a3ac6 branch module_hci_event_receive_invalid_cmd ,blank 
+3a24 6fe0c39b fetch 1 ,mem_le_pairing_state 
+3a25 c0803ac6 bne flag_le_pairing_null ,module_hci_event_receive_invalid_cmd 
+3a26 6fe0c39c fetch 1 ,mem_le_enc_state 
+3a27 c0803ac6 bne flag_le_enc_null ,module_hci_event_receive_invalid_cmd 
+3a28 20407927 call check_51cmd_le_smp_sec_req 
+3a29 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_wake_gpio:
+3a2a 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a2b c082bac6 bne 5 ,module_hci_event_receive_invalid_cmd 
+3a2c efe08003 ifetch 1 ,contru 
+3a2d 67e0c7ac store 1 ,mem_module_mcu_wake_pin 
+3a2e efe20003 ifetch 4 ,contru 
+3a2f 67e247ad store 4 ,mem_module_mcu_wake_delay_us 
+3a30 6848c7ac fetcht 1 ,mem_module_mcu_wake_pin 
+3a31 20406069 call gpio_config_output 
+3a32 20403b82 call module_set_mcu_wake_pin_low 
+3a33 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_tx_power:
+3a34 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a35 c080bac6 bne 0x01 ,module_hci_event_receive_invalid_cmd 
+3a36 efe08003 ifetch 1 ,contru 
+3a37 67e0c1e8 store 1 ,mem_tx_power 
+3a38 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_confirm_gkey:
+3a39 efe08003 ifetch 1 ,contru 
+3a3a c000ba42 beq 0x01 ,module_hci_cmd_le_confirm_gkey_fail 
+3a3b 6fe0c399 fetch 1 ,mem_le_secure_connect_state 
+3a3c c001ba40 beq le_sc_stat_send_public_key ,module_hci_cmd_le_confirm_gkey_ok 
+3a3d c0033a40 beq le_sc_stat_receive_dhkey ,module_hci_cmd_le_confirm_gkey_ok 
+3a3e c003ba40 beq le_sc_stat_wait_confirm_gkey ,module_hci_cmd_le_confirm_gkey_ok 
+3a3f 20203ac6 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_le_confirm_gkey_ok:
+3a40 70439a01 jam flag_le_sc_confrim_gkey_ok ,mem_le_sc_confirm_gkey_flag 
+3a41 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_confirm_gkey_fail:
+3a42 20401fee call le_send_pairing_confirm_value_failed 
+3a43 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_set_reject_justwork_flag:
+3a44 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a45 c080bac6 bne 0x01 ,module_hci_event_receive_invalid_cmd 
+3a46 20403ac9 call module_hci_event_receive_valid_cmd 
+3a47 efe08003 ifetch 1 ,contru 
+3a48 203a57e2 branch classic_bt_clr_reject_justwork_flag ,blank 
+3a49 202057e0 branch classic_bt_set_reject_justwork_flag 
+
+module_hci_cmd_reset_chip:
+3a4a 20403ac9 call module_hci_event_receive_valid_cmd 
+3a4b 20407e07 call wait_uarttx 
+3a4c 70801001 jam 0x01 ,core_reset 
+3a4d 2020137c branch loop 
+
+module_hci_cmd_le_set_fixed_passkey:
+3a4e 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a4f c0003ac6 beq 0 ,module_hci_event_receive_invalid_cmd 
+3a50 efe08003 ifetch 1 ,contru 
+3a51 203a3a5b branch module_hci_cmd_le_set_random_passkey ,blank 
+3a52 6fe089d0 fetch 1 ,mem_module_uart_len 
+3a53 c082bac6 bne 5 ,module_hci_event_receive_invalid_cmd 
+3a54 efe20003 ifetch 4 ,contru 
+3a55 d84f4240 arg 1000000 ,temp 
+3a56 98467c00 isub temp ,null 
+3a57 20213ac6 branch module_hci_event_receive_invalid_cmd ,positive 
+3a58 67e2439e store 4 ,mem_le_tk 
+3a59 20401b12 call le_set_config_fixed_tk 
+3a5a 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_le_set_random_passkey:
+3a5b 20401b14 call le_clr_config_fixed_tk 
+3a5c 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_delete_customize_service:
+3a5d e8410003 ifetcht 2 ,contru 
+3a5e 20401a65 call le_att_get_handle_ptr2 
+3a5f 18c08bfe add contr ,-2 ,contw 
+3a60 58000000 setarg 0x0000 
+3a61 e7e10005 istore 2 ,contw 
+3a62 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_add_service_uuid:
+3a63 20403a6c call module_hci_cmd_add_service_uuid_set_uuid 
+3a64 20403a9a call uart_copy_rx_bytes_len_data 
+3a65 58000000 setarg 0x0000 
+3a66 e7e10005 istore 2 ,contw 
+3a67 20203b5c branch module_hci_event_uuid_handle 
+
+module_hci_cmd_add_characteristic_uuid:
+3a68 efe08003 ifetch 1 ,contru 
+3a69 20403a70 call module_hci_cmd_add_characteristic_uuid_set_handle 
+3a6a 20403a77 call module_hci_cmd_add_characteristic_uuid_set_uuid 
+3a6b 20203b5c branch module_hci_event_uuid_handle 
+
+module_hci_cmd_add_service_uuid_set_uuid:
+3a6c 20403a97 call le_att_creat_new_handle 
+3a6d 58280002 setarg 0x280002 
+3a6e e7e18005 istore 3 ,contw 
+3a6f 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_handle:
+3a70 67e0895c store 1 ,mem_pdatatemp 
+3a71 20403a97 call le_att_creat_new_handle 
+3a72 59280302 setarg 0x01280302 
+3a73 e7e20005 istore 4 ,contw 
+3a74 6fe0895c fetch 1 ,mem_pdatatemp 
+3a75 e7e18005 istore 3 ,contw 
+3a76 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_uuid:
+3a77 20401a84 call le_att_get_last_handle 
+3a78 efe08003 ifetch 1 ,contru 
+3a79 1fe1721f and pdata ,0x1f ,loopcnt 
+3a7a 1fe22200 copy pdata ,rega 
+3a7b 2a2ffe07 isolate1 bit_of_write_authenticated ,rega 
+3a7c 7920840f setflag true ,bit_of_att_handle_write_authenticated ,temp 
+3a7d 2a2ffe06 isolate1 bit_of_read_authenticated ,rega 
+3a7e 7920840e setflag true ,bit_of_att_handle_read_authenticated ,temp 
+3a7f e0410005 istoret 2 ,contw 
+3a80 1f227e00 copy loopcnt ,pdata 
+3a81 e7e08005 istore 1 ,contw 
+3a82 20405f4d call uart_copy_rx_bytes 
+3a83 20403a9a call uart_copy_rx_bytes_len_data 
+3a84 58000000 setarg 0 
+3a85 e7e10005 istore 2 ,contw 
+3a86 184104ff and temp ,0xff ,temp 
+3a87 184085ff increase -1 ,temp 
+3a88 20401a65 call le_att_get_handle_ptr2 
+3a89 18c08c04 add contr ,4 ,contr 
+3a8a efe08006 ifetch 1 ,contr 
+3a8b c2823a8f bbit1 bit_characteristic_notify ,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid 
+3a8c c282ba8f bbit1 bit_characteristic_indicate ,module_hci_cmd_add_characteristic_uuid_set_ccc_uuid 
+3a8d 18408401 increase 1 ,temp 
+3a8e 20600000 rtn 
+
+module_hci_cmd_add_characteristic_uuid_set_ccc_uuid:
+3a8f 20401a84 call le_att_get_last_handle 
+3a90 2a2ffe05 isolate1 bit_of_notify_authenticated ,rega 
+3a91 7920840f setflag true ,bit_of_att_handle_write_authenticated ,temp 
+3a92 e0410005 istoret 2 ,contw 
+3a93 5a290202 setarg 0x02290202 
+3a94 e7e40005 istore 8 ,contw 
+3a95 184085ff increase -1 ,temp 
+3a96 20600000 rtn 
+
+le_att_creat_new_handle:
+3a97 20401a84 call le_att_get_last_handle 
+3a98 e0410005 istoret 2 ,contw 
+3a99 20600000 rtn 
+
+uart_copy_rx_bytes_len_data:
+3a9a efe08003 ifetch 1 ,contru 
+3a9b 1fe27200 copy pdata ,loopcnt 
+3a9c e7e08005 istore 1 ,contw 
+3a9d 20205f4d branch uart_copy_rx_bytes 
+
+module_hci_cmd_le_passkey_entry_input:
+3a9e 6fe0c39b fetch 1 ,mem_le_pairing_state 
+3a9f c082bac6 bne flag_le_pairing_receive_pairing_confirm ,module_hci_event_receive_invalid_cmd 
+3aa0 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+3aa1 c0023aaa beq le_pairing_mode_lagacy_passkey_res_input ,module_hci_cmd_passkey_entry_res_input 
+3aa2 c0423aa4 beq le_pairing_mode_secure_connect_passkey_res_input ,module_hci_cmd_passkey_entry_sc_res_input 
+3aa3 20203ac6 branch module_hci_event_receive_invalid_cmd 
+
+module_hci_cmd_passkey_entry_sc_res_input:
+3aa4 70439802 jam le_sp_flag_commit_256 ,mem_le_secure_connect_flag 
+3aa5 70439908 jam le_sc_stat_passkey_wait_confirm ,mem_le_secure_connect_state 
+3aa6 20203aa7 branch module_hci_cmd_receive_ble_passkey 
+
+module_hci_cmd_receive_ble_passkey:
+3aa7 efe20003 ifetch 4 ,contru 
+3aa8 67e2439e store 4 ,mem_le_tk 
+3aa9 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_passkey_entry_res_input:
+3aaa 20403aa7 call module_hci_cmd_receive_ble_passkey 
+3aab 20201fd7 branch le_send_smp_pairing_confirm 
+
+module_hci_cmd_ble_set_phy:
+3aac 6fe089d0 fetch 1 ,mem_module_uart_len 
+3aad c0813ac6 bne 2 ,module_hci_event_receive_invalid_cmd 
+3aae e8410003 ifetcht 2 ,contru 
+3aaf 20401b7c call le_set_phys 
+3ab0 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_ble_read_current_phy:
+3ab1 d8400000 arg 0 ,temp 
+3ab2 da200002 arg 2 ,rega 
+3ab3 da404075 arg mem_context + coffset_le_rx_phy ,regb 
+3ab4 20203ad4 branch module_hci_event_set_cmd 
+
+module_hci_cmd_ble_set_dle:
+3ab5 6fe089d0 fetch 1 ,mem_module_uart_len 
+3ab6 c0843ac6 bne 8 ,module_hci_event_receive_invalid_cmd 
+3ab7 efe40003 ifetch 8 ,contru 
+3ab8 20401b7a call le_set_dle 
+3ab9 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_read_chip_data:
+3aba ea208003 ifetchr rega ,1 ,contru 
+3abb ea410003 ifetchr regb ,2 ,contru 
+3abc d8400000 arg 0 ,temp 
+3abd 20203ad4 branch module_hci_event_set_cmd 
+
+module_hci_cmd_write_chip_data:
+3abe 6f2089d0 fetchr loopcnt ,1 ,mem_module_uart_len 
+3abf 1f20f3fe increase -2 ,loopcnt 
+3ac0 efe10003 ifetch 2 ,contru 
+3ac1 1fe20a00 copy pdata ,contw 
+3ac2 20405f39 call uart_copy_rx_bytes_fast 
+3ac3 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_cmd_close_lpm:
+3ac4 70409900 jam 0 ,mem_lpm_mode 
+3ac5 20203ac9 branch module_hci_event_receive_valid_cmd 
+
+module_hci_event_receive_invalid_cmd:
+3ac6 d8400001 arg 1 ,temp 
+3ac7 da200000 arg 0 ,rega 
+3ac8 20203ad4 branch module_hci_event_set_cmd 
+
+module_hci_event_receive_valid_cmd:
+3ac9 d8400000 arg 0 ,temp 
+3aca da200000 arg 0 ,rega 
+3acb 20203ad4 branch module_hci_event_set_cmd 
+
+module_hci_event_spp_connect:
+3acc 7009cf00 jam hci_event_spp_conn_rep ,mem_module_uart_opcode 
+3acd 20203af8 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_connect:
+3ace 7009cf02 jam hci_event_le_conn_rep ,mem_module_uart_opcode 
+3acf 20203af8 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_spp_disconnect:
+3ad0 7009cf03 jam hci_event_spp_dis_rep ,mem_module_uart_opcode 
+3ad1 20203af8 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_disconnect:
+3ad2 7009cf05 jam hci_event_le_dis_rep ,mem_module_uart_opcode 
+3ad3 20203af8 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_set_cmd:
+3ad4 6fe089cf fetch 1 ,mem_module_uart_opcode 
+3ad5 1fe22600 copy pdata ,regc 
+3ad6 7009cf06 jam hci_event_cmd_res ,mem_module_uart_opcode 
+3ad7 58000002 setarg 2 
+3ad8 9a20fe00 iadd rega ,pdata 
+3ad9 20403b6b call module_hci_prepare_tx 
+3ada 1a627e00 copy regc ,pdata 
+3adb e7e08003 istore 1 ,contwu 
+3adc e0408003 istoret 1 ,contwu 
+3add 1a227200 copy rega ,loopcnt 
+3ade 1a420c00 copy regb ,contr 
+3adf 20405f33 call uart_copy_tx_bytes 
+3ae0 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_receive_spp_data:
+3ae1 204037a8 call module_spp_clear_last_transmite_clock 
+3ae2 7009cf07 jam hci_event_spp_data_rep ,mem_module_uart_opcode 
+3ae3 6fe083d2 fetch 1 ,mem_current_length 
+3ae4 207a0000 rtn blank 
+3ae5 20403b6b call module_hci_prepare_tx 
+3ae6 6fe083d2 fetch 1 ,mem_current_length 
+3ae7 1fe27200 copy pdata ,loopcnt 
+3ae8 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+3ae9 1fe20c00 copy pdata ,contr 
+3aea 20405f1f call uart_copy_tx_bytes_fast 
+3aeb 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_receive_le_data:
+3aec 7009cf08 jam hci_event_le_data_rep ,mem_module_uart_opcode 
+3aed 1f20fe02 add loopcnt ,2 ,pdata 
+3aee 20403b6b call module_hci_prepare_tx 
+3aef 6fe109fa fetch 2 ,mem_module_le_rx_data_handle 
+3af0 e7e10003 istore 2 ,contwu 
+3af1 6fe109f8 fetch 2 ,mem_module_le_rx_data_address 
+3af2 1fe20c00 icopy contr 
+3af3 20405f1f call uart_copy_tx_bytes_fast 
+3af4 18c27e00 copy contr ,pdata 
+3af5 67e109f8 store 2 ,mem_module_le_rx_data_address 
+3af6 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_enter_standby_mode:
+3af7 7009cf09 jam hci_event_standby_rep ,mem_module_uart_opcode 
+
+module_hci_event_enter_standby_mode_len0:
+3af8 58000000 setarg 0 
+3af9 20403b6b call module_hci_prepare_tx 
+3afa 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_status_res:
+3afb 7009cf0a jam hci_event_status_res ,mem_module_uart_opcode 
+3afc 58000001 setarg 1 
+3afd 20403b6b call module_hci_prepare_tx 
+3afe 20403b0c call module_hci_read_bt_status 
+3aff 6fe1478c fetch 2 ,mem_ui_state_map 
+3b00 d8e00002 arg ui_state_bt_hid_conn ,queue 
+3b01 afefffff qisolate1 pdata 
+3b02 79208403 setflag true ,3 ,temp 
+3b03 d8e00009 arg ui_state_ble_connected ,queue 
+3b04 afefffff qisolate1 pdata 
+3b05 79208405 setflag true ,5 ,temp 
+3b06 6fe0c78c fetch 1 ,mem_ui_state_map 
+3b07 d8e00004 arg ui_state_bt_spp_conn ,queue 
+3b08 afefffff qisolate1 pdata 
+3b09 79208404 setflag true ,4 ,temp 
+3b0a e0408003 istoret 1 ,contwu 
+3b0b 20203b75 branch module_hci_transmit_tx 
+
+module_hci_read_bt_status:
+3b0c d8400000 arg 0 ,temp 
+3b0d 6fe0c09b fetch 1 ,mem_scan_mode 
+3b0e d8e00000 arg inq_scan_mode ,queue 
+3b0f afefffff qisolate1 pdata 
+3b10 79208400 setflag true ,0 ,temp 
+3b11 d8e00001 arg page_scan_mode ,queue 
+3b12 afefffff qisolate1 pdata 
+3b13 79208401 setflag true ,1 ,temp 
+3b14 6fe0c427 fetch 1 ,mem_le_adv_enable 
+3b15 d8e00000 arg 0 ,queue 
+3b16 afefffff qisolate1 pdata 
+3b17 79208402 setflag true ,2 ,temp 
+3b18 20600000 rtn 
+
+module_hci_event_store_device:
+3b19 7009cf0d jam hci_event_nvram_rep ,mem_module_uart_opcode 
+3b1a 6fe0c489 fetch 1 ,mem_nv_data_number 
+3b1b 1feffe22 mul32 pdata ,34 ,pdata 
+3b1c 1fe27200 icopy loopcnt 
+3b1d 20403b6b call module_hci_prepare_tx 
+3b1e 6fe14487 fetch 2 ,mem_nv_data_ptr 
+3b1f 1fe20c00 icopy contr 
+3b20 20405f1f call uart_copy_tx_bytes_fast 
+3b21 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_gkey_generate:
+3b22 7009cf0e jam hci_event_gkey ,mem_module_uart_opcode 
+3b23 58000004 setarg 4 
+3b24 20403b6b call module_hci_prepare_tx 
+3b25 6fe2087c fetch 4 ,mem_gkey 
+3b26 e7e20003 istore 4 ,contwu 
+3b27 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_invalid_packet:
+3b28 7009cf0f jam hci_event_invalid_packet ,mem_module_uart_opcode 
+3b29 6ff10112 fetch 2 ,core_uart_rxitems 
+3b2a d8400040 arg 0x40 ,temp 
+3b2b 20407e4a call not_greater_than 
+3b2c 1fe22200 copy pdata ,rega 
+3b2d 1fe27200 copy pdata ,loopcnt 
+3b2e 20405ef7 call uarta_prepare_rx 
+3b2f d8a0098e arg mem_module_rx_error_data_buffer ,contw 
+3b30 20405f39 call uart_copy_rx_bytes_fast 
+3b31 1a227e00 copy rega ,pdata 
+3b32 1a227200 copy rega ,loopcnt 
+3b33 20403b6b call module_hci_prepare_tx 
+3b34 d8c0098e arg mem_module_rx_error_data_buffer ,contr 
+3b35 20405f1f call uart_copy_tx_bytes_fast 
+3b36 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_passkey_entry_mode:
+3b37 7009cf10 jam hci_event_get_passkey ,mem_module_uart_opcode 
+3b38 20203af8 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_tk:
+3b39 7009cf11 jam hci_event_le_tk ,mem_module_uart_opcode 
+3b3a 58000004 setarg 4 
+3b3b 20403b6b call module_hci_prepare_tx 
+3b3c 6fe2439e fetch 4 ,mem_le_tk 
+3b3d e7e20003 istore 4 ,contwu 
+3b3e 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_le_pairing_fail:
+3b3f da200180 arg flag_ble_pairing_fail ,rega 
+3b40 20203b46 branch module_hci_event_pairing_completed 
+
+module_hci_event_le_pairing_success:
+3b41 da200080 arg flag_ble_pairing_success ,rega 
+3b42 20203b46 branch module_hci_event_pairing_completed 
+
+module_hci_event_bt_pairing_fail:
+3b43 da200101 arg flag_bt_pairing_fail ,rega 
+3b44 20203b46 branch module_hci_event_pairing_completed 
+
+module_hci_event_bt_pairing_success:
+3b45 da200001 arg flag_bt_pairing_success ,rega 
+
+module_hci_event_pairing_completed:
+3b46 70476b00 jam 0 ,mem_flag_mode_ssp_pin 
+3b47 7009cf14 jam hci_event_le_pairing_state ,mem_module_uart_opcode 
+3b48 58000002 setarg 2 
+3b49 20403b6b call module_hci_prepare_tx 
+3b4a 1a227e00 copy rega ,pdata 
+3b4b e7e10003 istore 2 ,contwu 
+3b4c 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_pause_enc:
+3b4d da600000 arg flag_event_pause_enc ,regc 
+3b4e 20203b50 branch module_hci_event_enc 
+
+module_hci_event_start_enc:
+3b4f da600001 arg flag_event_start_enc ,regc 
+
+module_hci_event_enc:
+3b50 7009cf15 jam hci_event_le_encryption_state ,mem_module_uart_opcode 
+3b51 58000001 setarg 1 
+3b52 20403b6b call module_hci_prepare_tx 
+3b53 1a627e00 copy regc ,pdata 
+3b54 e7e08003 istore 1 ,contwu 
+3b55 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_le_gkey:
+3b56 7009cf1d jam hci_event_le_gkey ,mem_module_uart_opcode 
+3b57 58000004 setarg 4 
+3b58 20403b6b call module_hci_prepare_tx 
+3b59 6fe2087c fetch 4 ,mem_gkey 
+3b5a e7e20003 istore 4 ,contwu 
+3b5b 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_uuid_handle:
+3b5c 60490964 storet 2 ,mem_temp 
+3b5d 7009cf29 jam hci_event_uuid_handle ,mem_module_uart_opcode 
+3b5e 58000002 setarg 2 
+3b5f 20403b6b call module_hci_prepare_tx 
+3b60 68490964 fetcht 2 ,mem_temp 
+3b61 e0410003 istoret 2 ,contwu 
+3b62 20203b75 branch module_hci_transmit_tx 
+
+module_hci_event_le_input_passkey:
+3b63 7009cf2b jam hci_event_le_input_gkey ,mem_module_uart_opcode 
+3b64 20203af8 branch module_hci_event_enter_standby_mode_len0 
+
+module_hci_event_le_update_phy:
+3b65 7009cf40 jam hci_ble_update_phy_event ,mem_module_uart_opcode 
+3b66 58000002 setarg 2 
+3b67 20403b6b call module_hci_prepare_tx 
+3b68 6fe14075 fetch 2 ,mem_context + coffset_le_rx_phy 
+3b69 e7e10003 istore 2 ,contwu 
+3b6a 20203b75 branch module_hci_transmit_tx 
+
+module_hci_prepare_tx:
+3b6b 7009ce02 jam 0x02 ,mem_module_uart_cmd 
+3b6c 67e089d0 store 1 ,mem_module_uart_len 
+3b6d 604c0964 storet 8 ,mem_temp 
+3b6e 44e0c018 bpatch patch18_1 ,mem_patch18 
+3b6f 20403b77 call module_set_mcu_wake_pin_high_delay 
+3b70 684c0964 fetcht 8 ,mem_temp 
+3b71 20405f0f call uarta_prepare_tx_register_push 
+3b72 6fe189ce fetch 3 ,mem_module_uart_cmd 
+3b73 e7e18003 istore 3 ,contwu 
+3b74 20600000 rtn 
+
+module_hci_transmit_tx:
+3b75 44e14018 bpatch patch18_2 ,mem_patch18 
+3b76 20205f13 branch uarta_send_register_pop 
+
+module_set_mcu_wake_pin_high_delay:
+3b77 20403b80 call module_check_mcu_wake_pin_high 
+3b78 20608000 rtn true 
+
+module_set_mcu_wake_pin_h_delay:
+3b79 20403b7e call module_set_mcu_wake_pin_high 
+3b7a 6fe247ad fetch 4 ,mem_module_mcu_wake_delay_us 
+3b7b 1feb7e00 rshift2 pdata ,pdata 
+3b7c 207a0000 rtn blank 
+3b7d 20207d0e branch delay 
+
+module_set_mcu_wake_pin_high:
+3b7e 6848c7ac fetcht 1 ,mem_module_mcu_wake_pin 
+3b7f 20206069 branch gpio_out_active 
+
+module_check_mcu_wake_pin_high:
+3b80 6848c7ac fetcht 1 ,mem_module_mcu_wake_pin 
+3b81 20206074 branch gpio_check_active 
+
+module_set_mcu_wake_pin_low:
+3b82 6848c7ac fetcht 1 ,mem_module_mcu_wake_pin 
+3b83 20206065 branch gpio_out_inactive 
+
+module_le_receive_data:
+3b84 622109f8 storer rega ,2 ,mem_module_le_rx_data_address 
+3b85 624109f6 storer regb ,2 ,mem_module_le_rx_data_len 
+3b86 6fe14437 fetch 2 ,mem_le_att_handle 
+3b87 67e109fa store 2 ,mem_module_le_rx_data_handle 
+3b88 2040390d call module_check_ble_encrypt_state 
+3b89 20740000 rtn user 
+
+module_le_receive_data_ok:
+3b8a 684909f6 fetcht 2 ,mem_module_le_rx_data_len 
+3b8b 6fe0c7c2 fetch 1 ,mem_module_ble_data_uart_max_length 
+3b8c 20407e4a call not_greater_than 
+3b8d 1fe27200 copy pdata ,loopcnt 
+3b8e 18427e00 copy temp ,pdata 
+3b8f 9f267e00 isub loopcnt ,pdata 
+3b90 67e109f6 store 2 ,mem_module_le_rx_data_len 
+3b91 20403aec call module_hci_event_receive_le_data 
+3b92 6fe109f6 fetch 2 ,mem_module_le_rx_data_len 
+3b93 207a0000 rtn blank 
+3b94 20203b8a branch module_le_receive_data_ok 
+
+module_exit_sniff:
+3b95 6fe147c3 fetch 2 ,mem_module_flag 
+3b96 c3848000 rtnbit1 moudle_task_unsniff 
+3b97 20403bb1 call module_set_unsniff_task_flag 
+3b98 20203219 branch app_bt_sniff_exit 
+
+module_set_lpm_mult_2:
+3b99 70417702 jam 2 ,mem_lpm_mult 
+3b9a 20600000 rtn 
+
+module_bb_event_timer:
+
+module_read_vdd_timer:
+3b9b 6fe0c7be fetch 1 ,mem_module_read_vdd_flag 
+3b9c 207a0000 rtn blank 
+3b9d 6fe0c7bf fetch 1 ,mem_module_read_vdd_count 
+3b9e 207a0000 rtn blank 
+3b9f 1fe0ffff increase -1 ,pdata 
+3ba0 67e0c7bf store 1 ,mem_module_read_vdd_count 
+3ba1 247a0000 nrtn blank 
+3ba2 7047bf32 jam flag_module_read_vdd_count ,mem_module_read_vdd_count 
+3ba3 20406125 call vdd_calculate_by_mode 
+3ba4 1fe6fc64 div pdata ,0x64 
+3ba5 20407dec call get_div_result 
+3ba6 18070400 remainder temp 
+3ba7 67e0c7c0 store 1 ,mem_module_vdd_quotient 
+3ba8 6048c7c1 storet 1 ,mem_module_vdd_remainder 
+3ba9 20600000 rtn 
+
+module_control_air_flow:
+3baa 20407e21 call check_uart_tx_buff 
+3bab 202131e6 branch app_l2cap_flow_control_enable ,positive 
+3bac 202031e8 branch app_l2cap_flow_control_disable 
+
+module_set_sniff_task_flag:
+3bad d8e0000a arg moudle_task_sniff ,queue 
+3bae 20203bbd branch module_set_state 
+
+module_clear_sniff_task_flag:
+3baf d8e0000a arg moudle_task_sniff ,queue 
+3bb0 20203bb9 branch module_clr_state 
+
+module_set_unsniff_task_flag:
+3bb1 d8e00009 arg moudle_task_unsniff ,queue 
+3bb2 20203bbd branch module_set_state 
+
+module_clear_unsniff_task_flag:
+3bb3 d8e00009 arg moudle_task_unsniff ,queue 
+3bb4 20203bb9 branch module_clr_state 
+
+module_set_le_tx_data_flag:
+3bb5 d8e00008 arg module_flag_ble_data_finish ,queue 
+3bb6 20203bbd branch module_set_state 
+
+module_clear_le_tx_data_flag:
+3bb7 d8e00008 arg module_flag_ble_data_finish ,queue 
+3bb8 20203bb9 branch module_clr_state 
+
+module_clr_state:
+3bb9 6fe147c3 fetch 2 ,mem_module_flag 
+3bba f93ffe00 qset0 pdata 
+3bbb 67e147c3 store 2 ,mem_module_flag 
+3bbc 20600000 rtn 
+
+module_set_state:
+3bbd 6fe147c3 fetch 2 ,mem_module_flag 
+3bbe f9207e00 qset1 pdata 
+3bbf 67e147c3 store 2 ,mem_module_flag 
+3bc0 20600000 rtn 
+
+mouse_init:
+3bc1 20403bf0 call mouse_setting_config 
+3bc2 204041a7 call mouse_init_sunt 
+3bc3 2040408e call mouse_dpi_config 
+3bc4 20758000 rtn wake 
+3bc5 20403d8a call mouse_usb_check_enable 
+3bc6 20404728 call mouse_drawing_optima_init 
+3bc7 20403bcf call mouse_cb_fuction 
+3bc8 2040423c call mouse_sensor_powerdown 
+3bc9 6fe0c92a fetch 1 ,mem_usb_addr 
+3bca c3838000 rtnbit1 7 
+
+mouse_init_wireless:
+3bcb 6fe1478c fetch 2 ,mem_ui_state_map 
+3bcc c2864553 bbit1 ui_state_btn_down ,mouse_start_discovery 
+3bcd 204046a0 call mouse_check_select_device_by_switch 
+3bce 20203d52 branch mouse_start_work 
+
+mouse_cb_fuction:
+3bcf 58004866 setarg mouse_24g_package_data 
+3bd0 67e1489b store 2 ,mem_cb_24g_transmit_data 
+3bd1 5800488f setarg mouse_24g_search_dongle 
+3bd2 67e1489d store 2 ,mem_cb_24g_search_receiver 
+3bd3 58003e40 setarg mouse_lpm_before_common 
+3bd4 67e1489f store 2 ,mem_cb_24g_lpm_before 
+3bd5 5800439f setarg mouse_le 
+3bd6 67e14461 store 2 ,mem_cb_le_process 
+3bd7 58004457 setarg mouse_bt 
+3bd8 67e14463 store 2 ,mem_cb_bt_process 
+3bd9 58003e3b setarg mouse_process_lpm_before 
+3bda 67e1445f store 2 ,mem_cb_before_lpm 
+3bdb 58004334 setarg mouse_priority_bb_event 
+3bdc 67e14467 store 2 ,mem_cb_bb_event_process 
+3bdd 5800464b setarg mouse_idle 
+3bde 67e14465 store 2 ,mem_cb_idle_process 
+3bdf 58003e25 setarg mouse_before_hibernate 
+3be0 67e1445d store 2 ,mem_cb_before_hibernate 
+3be1 58004388 setarg mouse_le_bb_event_connect_complete 
+3be2 67e1446b store 2 ,mem_cb_att_write 
+3be3 580044b5 setarg mouse_bb_event_timer 
+3be4 67e1446f store 2 ,mem_cb_event_timer 
+3be5 58003f69 setarg mouse_spi_write_flash_cb 
+3be6 67e14473 store 2 ,mem_cb_spi_flash_write_complate 
+3be7 58003e13 setarg mouse_lpm_check_wake_lock 
+3be8 67e1445b store 2 ,mem_cb_check_wakelock 
+3be9 580049a8 setarg mouse_le_transmit 
+3bea 67e1446d store 2 ,mem_cb_ble_transmit 
+3beb 580049aa setarg mouse_bt_slave_match 
+3bec 67e14477 store 2 ,mem_cb_bt_slave_match 
+3bed 580049bd setarg mouse_set_lpm_mult 
+3bee 67e14471 store 2 ,mem_cb_bt_set_mult 
+3bef 20600000 rtn 
+
+mouse_setting_config:
+3bf0 20758000 rtn wake 
+3bf1 20402607 call g24_transmit_init 
+3bf2 204022ff call g24_chmap_param_init 
+3bf3 20403f1e call mouse_gpio_init 
+3bf4 20403d13 call mouse_param_init 
+3bf5 20401b16 call le_set_config_fixed_ltk 
+3bf6 20401b3f call le_set_justwork 
+3bf7 20401b32 call le_set_fixed_ltk 
+3bf8 20401b1e call le_set_config_read_authentication 
+3bf9 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3bfa c289c635 bbit1 mouse_enable_eeprom ,mouse_load_eeprom_info_check 
+3bfb c28945f6 bbit1 mouse_enable_flash ,mouse_load_flash_info_check 
+3bfc 20600000 rtn 
+
+mouse_xtal_init:
+3bfd 7040c508 jam 0x08 ,mem_fcomp_div 
+3bfe 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3bff c3860000 rtnbit1 mouse_enable_16m 
+3c00 7040c518 jam 0x18 ,mem_fcomp_div 
+3c01 20600000 rtn 
+
+mouse_default_init:
+3c02 700b58ff jam 0xff ,mem_usb_offline_check_gpio 
+3c03 704790ff jam 0xff ,mem_ui_button_gpio 
+3c04 70478f1e jam 0x1e ,mem_ui_button_timeout 
+3c05 5800492d setarg mem_mouse_led_type 
+3c06 67e1448d store 2 ,mem_ui_led_struct_ptr 
+3c07 70448c01 jam 1 ,mem_ui_led_struct_num 
+3c08 58004ab5 setarg mem_mouse_rssi_signal_buf 
+3c09 67e14899 store 2 ,mem_rssi_signal_buf_ptr 
+3c0a 70483601 jam 1 ,mem_24g_data_type 
+3c0b 6fe148fe fetch 2 ,mem_mouse_discovery_timeout 
+3c0c 67e14791 store 2 ,mem_discovery_timeout 
+3c0d 6fe14900 fetch 2 ,mem_mouse_24g_pair_timeout_init 
+3c0e 67e14881 store 2 ,mem_24g_pair_timeout_init 
+3c0f 6fe0c903 fetch 1 ,mem_mouse_24g_reconn_timeout_init 
+3c10 67e14885 store 2 ,mem_24g_reconn_timeout_init 
+3c11 6fe2c905 fetch 5 ,mem_rssi_dis_min_24g_init 
+3c12 67e2c8cb store 5 ,mem_rssi_dis_min_24g 
+3c13 6fe0c904 fetch 1 ,mem_mouse_24g_pair_tx_power 
+3c14 67e0c87c store 1 ,mem_24g_pair_tx_power 
+3c15 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3c16 247a0000 nrtn blank 
+3c17 58020800 setarg 0x020800 
+3c18 67e1cbab store 3 ,mem_mouse_flag 
+3c19 58800700 setarg 0x800700 
+3c1a e7e18005 istore 3 ,contw 
+3c1b 58000300 setarg 0x0300 
+3c1c e7e10005 istore 2 ,contw 
+3c1d 70409901 jam 1 ,mem_lpm_mode 
+3c1e 6fe0c90a fetch 1 ,mem_mouse_enable_flag 
+3c1f 2feffe00 isolate1 mouse_adc_enable ,pdata 
+3c20 2040c6e6 call mouse_adc_read_enable ,true 
+3c21 6fe0c90a fetch 1 ,mem_mouse_enable_flag 
+3c22 2feffe02 isolate1 mouse_24g_250hz_enable ,pdata 
+3c23 2040c6e8 call mouse_24g_set_250hz ,true 
+3c24 6fe0c90a fetch 1 ,mem_mouse_enable_flag 
+3c25 2feffe01 isolate1 mouse_search_dongle_enable ,pdata 
+3c26 2040c6ea call mouse_24g_search_dongle_enable ,true 
+3c27 6fe0c90a fetch 1 ,mem_mouse_enable_flag 
+3c28 2feffe03 isolate1 mouse_clk_16m_enable ,pdata 
+3c29 2040c6ec call mouse_16m_enable ,true 
+3c2a 6fe0c90a fetch 1 ,mem_mouse_enable_flag 
+3c2b 2feffe04 isolate1 mouse_dpi_4_level_enable ,pdata 
+3c2c 2040c6ee call mouse_dpi_4level_enable ,true 
+3c2d 6fe0c90a fetch 1 ,mem_mouse_enable_flag 
+3c2e 2feffe05 isolate1 mouse_keyboard_enable ,pdata 
+3c2f 2040c6f8 call mouse_customer_key_enable ,true 
+3c30 6fe0c866 fetch 1 ,mem_24g_ch_map_update 
+3c31 245a230e ncall g24_chamap_param_update ,blank 
+3c32 20403bfd call mouse_xtal_init 
+3c33 6fe0c90b fetch 1 ,mem_mouse_global_setup 
+3c34 1fe10407 and pdata ,0x07 ,temp 
+3c35 6048c4a1 storet 1 ,mem_adc_channel 
+3c36 1fe97e00 rshift3 pdata ,pdata 
+3c37 1fe10401 and pdata ,0x01 ,temp 
+3c38 6048c866 storet 1 ,mem_24g_ch_map_update 
+3c39 1fe37e00 rshift pdata ,pdata 
+3c3a 1fe10403 and pdata ,0x03 ,temp 
+3c3b 6048c8fd storet 1 ,mem_adc_config_flag_init 
+3c3c 1feb7e00 rshift2 pdata ,pdata 
+3c3d 1fe17e03 and pdata ,0x03 ,pdata 
+3c3e 204047d4 call mouse_24g_long_sleep_set 
+3c3f 6fe0c90c fetch 1 ,mem_mouse_global_setup1 
+3c40 1fe10403 and pdata ,0x03 ,temp 
+3c41 6048c924 storet 1 ,mem_sensor_angle_default 
+3c42 1feb7e00 rshift2 pdata ,pdata 
+3c43 1fe10403 and pdata ,0x03 ,temp 
+3c44 6048c925 storet 1 ,mem_sensor_angle_switch 
+3c45 1feb7e00 rshift2 pdata ,pdata 
+3c46 1fe17e03 and pdata ,0x03 ,pdata 
+3c47 67e0c926 store 1 ,mem_config_sensor_dpi 
+3c48 67e0c992 store 1 ,mem_mouse_dpi 
+3c49 1feb7e00 rshift2 pdata ,pdata 
+3c4a 1fe17e03 and pdata ,0x03 ,pdata 
+3c4b 67e0cbb4 store 1 ,mem_device_number 
+3c4c 580b0c0a setarg 0x0b0c0a 
+3c4d 67e1c918 store 3 ,mem_lbutton_gpio 
+3c4e 58ffffff setarg 0xffffff 
+3c4f e7e18005 istore 3 ,contw 
+3c50 580607ff setarg 0x0607ff 
+3c51 e7e18005 istore 3 ,contw 
+3c52 58ffffff setarg 0xffffff 
+3c53 e7e18005 istore 3 ,contw 
+
+mouse_default_init_next:
+3c54 7048f70a jam 0x0a ,mem_adc_read_time_init 
+3c55 58000064 setarg 0x0064 
+3c56 67e14bc8 store 2 ,mem_adc_low_volatage_led_blink_timer 
+3c57 20403e7b call mouse_adc_vol_init 
+3c58 58001770 setarg 0x1770 
+3c59 67e14bbe store 2 ,mem_mouse_no_data_timeout 
+3c5a 704bc014 jam 0x14 ,mem_mouse_device_poweron_timer_count_init 
+3c5b 58000190 setarg 0x0190 
+3c5c 67e14bc6 store 2 ,mem_mouse_low_v_led_blink_time 
+3c5d 67e14bc2 store 2 ,mem_mouse_dpi_led_blink_time 
+3c5e 580003e8 setarg 0x03e8 
+3c5f 67e14bc4 store 2 ,mem_mouse_disconvey_led_blink_time 
+3c60 70487d07 jam 0x07 ,mem_rssi_buff_index 
+3c61 7048ca7d jam 125 ,mem_power_ctrl_pac_succ_cnt_init 
+3c62 7041e800 jam tx_power_0db ,mem_tx_power 
+3c63 70488c01 jam 0x01 ,mem_24g_fast_conn_enable 
+3c64 58000f0f setarg 0x0f0f 
+3c65 67e1488d store 2 ,mem_24g_fast_conn_addr 
+3c66 67e1488f store 2 ,mem_24g_fast_conn_addr + 2 
+3c67 6fe140a8 fetch 2 ,mem_lap 
+3c68 67e140ac store 2 ,mem_lap + 4 
+3c69 d8a0437a arg mem_le_lap ,contw 
+3c6a d8c040a8 arg mem_lap ,contr 
+3c6b df200006 arg 0x06 ,loopcnt 
+3c6c 20407e68 call reverse_byte 
+3c6d 704b8a20 jam 0x20 ,mem_lpm_mult_init 
+3c6e 70493934 jam 0x34 ,mem_device1_type 
+3c6f 6fe3437a fetch 6 ,mem_le_lap 
+3c70 67e34950 store 6 ,mem_device1_locall_addr 
+3c71 704bb302 jam 0x02 ,mem_mouse_bluetooth_type 
+3c72 7043e71f jam 0x1f ,mem_le_adv_data_len 
+3c73 58050102 setarg 0x050102 
+3c74 67e1c3e8 store 3 ,mem_le_adv_data 
+3c75 58120303 setarg 0x120303 
+3c76 e7e18005 istore 3 ,contw 
+3c77 58190318 setarg 0x190318 
+3c78 e7e18005 istore 3 ,contw 
+3c79 580003c2 setarg 0x03c2 
+3c7a e7e10005 istore 2 ,contw 
+3c7b 5806ff06 setarg 0x06ff06 
+3c7c 67e1cad2 store 3 ,mem_le_adv_swift_pair 
+3c7d 58000300 setarg 0x000300 
+3c7e e7e18005 istore 3 ,contw 
+3c7f 58090c80 setarg 0x090c80 
+3c80 e7e18005 istore 3 ,contw 
+3c81 58355442 setarg 0x355442 
+3c82 e7e18005 istore 3 ,contw 
+3c83 5820322e setarg 0x20322e 
+3c84 e7e18005 istore 3 ,contw 
+3c85 58756f4d setarg 0x756f4d 
+3c86 e7e18005 istore 3 ,contw 
+3c87 58006573 setarg 0x6573 
+3c88 e7e10005 istore 2 ,contw 
+3c89 7044071f jam 0x1f ,mem_le_scan_data_len 
+3c8a d8c04ad9 arg mem_le_adv_swift_pair + 7 ,contr 
+3c8b d8a04408 arg mem_le_scan_data ,contw 
+3c8c df20000d arg 13 ,loopcnt 
+3c8d 20407d5f call memcpy 
+3c8e 6fe0c408 fetch 1 ,mem_le_scan_data 
+3c8f 1fe0ffff increase -1 ,pdata 
+3c90 67e0c2f7 store 1 ,mem_le_name_len 
+3c91 d8c0440a arg mem_le_scan_data + 2 ,contr 
+3c92 d8a042f8 arg mem_le_name_len + 1 ,contw 
+3c93 df20000b arg 11 ,loopcnt 
+3c94 20407d5f call memcpy 
+3c95 58070007 setarg 0x070007 
+3c96 67e1c372 store 3 ,mem_le_interval_min 
+3c97 58002000 setarg 0x002000 
+3c98 e7e18005 istore 3 ,contw 
+3c99 5800012c setarg 0x012c 
+3c9a e7e10005 istore 2 ,contw 
+3c9b 58181203 setarg 0x181203 
+3c9c 67e1cacc store 3 ,mem_le_adv_ind 
+3c9d 580000ff setarg 0x0000ff 
+3c9e 67e1cacf store 3 ,mem_le_adv_direct_ind 
+3c9f 380000fb setsect 0 ,0xfb 
+3ca0 3806c212 setsect 1 ,0x2c212 
+3ca1 3808800f setsect 2 ,0x800f 
+3ca2 380c0021 setsect 3 ,0x21 
+3ca3 67e4444c store 8 ,mem_local_rx_max_octets 
+3ca4 70443207 jam 0x07 ,mem_le_adv_channel_map 
+3ca5 58000015 setarg 0x0015 
+3ca6 67e14ae7 store 2 ,mem_le_keyboard_handle 
+3ca7 58000019 setarg 0x0019 
+3ca8 67e14357 store 2 ,mem_le_notify_handle 
+3ca9 5800001d setarg 0x001d 
+3caa 67e14ae9 store 2 ,mem_le_multimedia_handle 
+3cab 58000021 setarg 0x0021 
+3cac 67e14aeb store 2 ,mem_le_systemctrl_handle 
+3cad 58000030 setarg 0x0030 
+3cae 67e14aed store 2 ,mem_le_battery_level_handle 
+3caf 58000022 setarg 0x0022 
+3cb0 67e143d1 store 2 ,mem_le_pairing_handle 
+3cb1 704af096 jam 0x96 ,mem_le_battery_level_updata_timer_init 
+3cb2 70493800 jam mode_24g_device ,mem_device_flag 
+3cb3 20402322 call g24_enable_1m 
+3cb4 20402325 call g24_pair_param_init 
+3cb5 58604800 setarg 0x604800 
+3cb6 67e1c85c store 3 ,mem_24g_enter_hibernate 
+3cb7 5800012c setarg 0x012c 
+3cb8 67e148c2 store 2 ,mem_24g_long_sleep_param_update_timer_init 
+3cb9 58000050 setarg 0x0050 
+3cba 67e148c0 store 2 ,mem_24g_transmit_by_interrupt_exit_count_init 
+3cbb 58000005 setarg 0x05 
+3cbc 67e14bba store 2 ,mem_mouse_24g_power_on_fast_conn_timer 
+3cbd 58000708 setarg 0x0708 
+3cbe 67e14bbc store 2 ,mem_mouse_24g_search_dongle_time_init 
+3cbf 58010403 setarg 0x010403 
+3cc0 67e1c9d0 store 3 ,mem_mouse_dpi_seting 
+3cc1 582a2002 setarg 0x2a2002 
+3cc2 e7e18005 istore 3 ,contw 
+3cc3 5822153f setarg 0x22153f 
+3cc4 e7e18005 istore 3 ,contw 
+3cc5 58114433 setarg 0x114433 
+3cc6 e7e18005 istore 3 ,contw 
+3cc7 58265a09 setarg 0x265a09 
+3cc8 67e1c9df store 3 ,mem_sensor_3212_init 
+3cc9 58041934 setarg 0x041934 
+3cca e7e18005 istore 3 ,contw 
+3ccb 58000009 setarg 0x0009 
+3ccc e7e10005 istore 2 ,contw 
+3ccd 5800ffff setarg 0xffff 
+3cce e7e10005 istore 2 ,contw 
+3ccf 580d5a09 setarg 0x0d5a09 
+3cd0 67e1c9f3 store 3 ,mem_sensor_3205_init 
+3cd1 58ed1d10 setarg 0xed1d10 
+3cd2 e7e18005 istore 3 ,contw 
+3cd3 5800807d setarg 0x807d 
+3cd4 e7e10005 istore 2 ,contw 
+3cd5 5800ffff setarg 0xffff 
+3cd6 e7e10005 istore 2 ,contw 
+3cd7 58ff5a09 setarg 0xff5a09 
+3cd8 67e1ca39 store 3 ,mem_sensor_8650_init 
+3cd9 5840ab27 setarg 0x40ab27 
+3cda e7e18005 istore 3 ,contw 
+3cdb 58a0d1be setarg 0xa0d1be 
+3cdc e7e18005 istore 3 ,contw 
+3cdd 5812a141 setarg 0x12a141 
+3cde e7e18005 istore 3 ,contw 
+3cdf 58a784a5 setarg 0xa784a5 
+3ce0 e7e18005 istore 3 ,contw 
+3ce1 58d0b5ff setarg 0xd0b5ff 
+3ce2 e7e18005 istore 3 ,contw 
+3ce3 58ff00b6 setarg 0xff00b6 
+3ce4 e7e18005 istore 3 ,contw 
+3ce5 58000900 setarg 0x000900 
+3ce6 e7e18005 istore 3 ,contw 
+3ce7 5800ffff setarg 0xffff 
+3ce8 e7e10005 istore 2 ,contw 
+3ce9 580d5a09 setarg 0x0d5a09 
+3cea 67e1ca53 store 3 ,mem_sensor_ka8ul_init 
+3ceb 58c50e10 setarg 0xc50e10 
+3cec e7e18005 istore 3 ,contw 
+3ced 58109a5b setarg 0x109a5b 
+3cee e7e18005 istore 3 ,contw 
+3cef 58421138 setarg 0x421138 
+3cf0 e7e18005 istore 3 ,contw 
+3cf1 58412828 setarg 0x412828 
+3cf2 e7e18005 istore 3 ,contw 
+3cf3 58394923 setarg 0x394923 
+3cf4 e7e18005 istore 3 ,contw 
+3cf5 584bb04a setarg 0x4bb04a 
+3cf6 e7e18005 istore 3 ,contw 
+3cf7 58904ca0 setarg 0x904ca0 
+3cf8 e7e18005 istore 3 ,contw 
+3cf9 5809704d setarg 0x09704d 
+3cfa e7e18005 istore 3 ,contw 
+3cfb 58ffff00 setarg 0xffff00 
+3cfc e7e18005 istore 3 ,contw 
+3cfd 5846a509 setarg 0x46a509 
+3cfe 67e1ca81 store 3 ,mem_sensor_ka8g2_init 
+3cff 58101934 setarg 0x101934 
+3d00 e7e18005 istore 3 ,contw 
+3d01 58690760 setarg 0x690760 
+3d02 e7e18005 istore 3 ,contw 
+3d03 58207d04 setarg 0x207d04 
+3d04 e7e18005 istore 3 ,contw 
+3d05 5809007e setarg 0x09007e 
+3d06 e7e18005 istore 3 ,contw 
+3d07 58220d00 setarg 0x220d00 
+3d08 e7e18005 istore 3 ,contw 
+3d09 58ff220e setarg 0xff220e 
+3d0a e7e18005 istore 3 ,contw 
+3d0b 704a96ff jam 0xff ,mem_sensor_ka8g2_init + 21 
+3d0c 580b5a09 setarg 0x0b5a09 
+3d0d 67e1caa3 store 3 ,mem_sensor_poweron_init 
+3d0e 580009f3 setarg 0x0009f3 
+3d0f e7e18005 istore 3 ,contw 
+3d10 5800ffff setarg 0xffff 
+3d11 e7e10005 istore 2 ,contw 
+3d12 20203100 branch app_sys_param_init 
+
+mouse_param_init:
+3d13 58009468 setarg mouse_bt_sdp_addr 
+3d14 67e14660 store 2 ,mem_ui_uuid_table 
+3d15 58009732 setarg mouse_ble_att_list_addr 
+3d16 67e14396 store 2 ,mem_ui_le_uuid_table 
+3d17 58002580 setarg 0x2580 
+3d18 67e1c0b2 store 3 ,mem_class 
+3d19 70417803 jam 3 ,mem_lpm_mult_timeout 
+3d1a 70415b08 jam 8 ,mem_lpm_overhead 
+3d1b 704b9e00 jam dpi_button_state_up ,mem_select_device_button_statue 
+3d1c 704b9e00 jam pb_button_state_up ,mem_select_device_button_statue 
+3d1d 704b9f00 jam commbination_key_state_up ,mem_commbination_key_statue 
+3d1e 58000200 setarg 0x0200 
+3d1f 67e14159 store 2 ,mem_lpm_interval 
+3d20 70438017 jam 0x17 ,mem_le_local_mtu 
+3d21 70438217 jam 0x17 ,mem_le_remote_mtu 
+3d22 58000a77 setarg 0x0a77 
+3d23 67e14484 store 2 ,mem_spi_init_clk 
+3d24 38000306 setsect 0 ,0x306 
+3d25 38044440 setsect 1 ,0x4440 
+3d26 38090000 setsect 2 ,0x10000 
+3d27 380c4408 setsect 3 ,0x4408 
+3d28 67e4c662 store 9 ,mem_all_uuid_16bits 
+3d29 38001224 setsect 0 ,0x1224 
+3d2a 38044000 setsect 1 ,0x4000 
+3d2b 38080000 setsect 2 ,0x0 
+3d2c e7e28005 istore 5 ,contw 
+3d2d 3803ffff setsect 0 ,0x3ffff 
+3d2e 3806fe23 setsect 1 ,0x2fe23 
+3d2f 380999d9 setsect 2 ,0x199d9 
+3d30 380c020d setsect 3 ,0x20d 
+3d31 67e440a0 store 8 ,mem_features 
+3d32 58004af5 setarg mem_le_tx_buffer0_omemalloc 
+3d33 67e143de store 2 ,mem_ble_l2cap_tx_buff0_ptr 
+3d34 58000010 setarg mouse_ble_l2cap_txbuff_size 
+3d35 67e143e0 store 2 ,mem_ble_l2cap_tx_buff_size_ptr 
+3d36 2040490e call mouse_device_led_all_off 
+3d37 204048c6 call mouse_device_poweron_timer_init 
+3d38 20403e8e call mouse_adc_gpio_mux_init 
+3d39 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3d3a c30dbd3f bbit0 mouse_enable_bt_125hz ,mouse_param_init_intervl_end 
+3d3b 7044550c jam classic_interval_7_5ms ,mem_sniff_param_interval 
+3d3c 58000006 setarg le_interval_7_5ms 
+3d3d 67e14372 store 2 ,mem_le_interval_min 
+3d3e 67e14374 store 2 ,mem_le_interval_min + 2 
+
+mouse_param_init_intervl_end:
+3d3f 20402613 call g24_interval_param_8ms 
+3d40 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3d41 c30c3d43 bbit0 mouse_enable_24g_250hz ,mouse_24g_short_sleep_set_end 
+3d42 2040260b call g24_interval_param_4ms 
+
+mouse_24g_short_sleep_set_end:
+3d43 6fe0c938 fetch 1 ,mem_device_flag 
+3d44 67e0cab4 store 1 ,mem_device_flag_temp 
+3d45 6fe1c37d fetch 3 ,mem_le_lap + 3 
+3d46 67e1cac9 store 3 ,mem_mouse_le_lap_temp 
+3d47 6fe0c8fd fetch 1 ,mem_adc_config_flag_init 
+3d48 1fe17efe and pdata ,0xfe ,pdata 
+3d49 67e0c8fd store 1 ,mem_adc_config_flag_init 
+3d4a 67e0c4a0 store 1 ,mem_adc_config_flag 
+3d4b 58000000 setarg 0 
+3d4c 67e3c8d0 store 7 ,mem_mouse_key 
+3d4d 6fe0c78f fetch 1 ,mem_ui_button_timeout 
+3d4e 67e0cb9b store 1 ,mem_bt_discovery_count 
+3d4f 67e0cb9c store 1 ,mem_select_device_count 
+3d50 20401aa9 call le_modified_name 
+3d51 202042a0 branch mouse_sensor_set_angle 
+
+mouse_start_work:
+3d52 44e1c018 bpatch patch18_3 ,mem_patch18 
+3d53 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3d54 c297c80a bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_start_auto_pair_mode 
+3d55 6fe0c938 fetch 1 ,mem_device_flag 
+3d56 c00047f6 beq mode_24g_device ,mouse_24g_start_mode 
+3d57 20403d65 call mouse_wakeup_from_power_check 
+3d58 243442eb nbranch mouse_buletooth_fast_conn_init ,user 
+
+mouse_start_reconnect_device:
+3d59 44e24018 bpatch patch18_4 ,mem_patch18 
+3d5a da204939 arg mem_device1_type ,rega 
+3d5b 6fe0c938 fetch 1 ,mem_device_flag 
+3d5c 1fe0ffff increase -1 ,pdata 
+3d5d 1feffe1d mul32 pdata ,29 ,pdata 
+3d5e 9a20a200 iadd rega ,rega 
+3d5f efe08011 ifetch 1 ,rega 
+3d60 67e0c482 store 1 ,mem_xrecord_mode 
+
+mouse_start_reconnect:
+3d61 6fe0c482 fetch 1 ,mem_xrecord_mode 
+3d62 c019bd6f beq rec_3_mode ,mouse3_0_check_reconn_target 
+3d63 c01a3d7b beq rec_4_mode ,mouse4_0_check_reconn_target 
+3d64 20204553 branch mouse_start_discovery 
+
+mouse_wakeup_from_power_check:
+3d65 44e2c018 bpatch patch18_5 ,mem_patch18 
+3d66 78547c00 disable user 
+3d67 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3d68 c305bd6c bbit0 mouse_enable_wakeup_from_power ,mouse_wakeup_from_power 
+3d69 6fe08989 fetch 1 ,mem_wakup_from_power_flag 
+3d6a c3013d6c bbit0 bit_power_on ,mouse_wakeup_from_power 
+3d6b 78347c00 enable user 
+
+mouse_wakeup_from_power:
+3d6c 6fe0cab1 fetch 1 ,mem_reconn_times_init 
+3d6d 67e0cab0 store 1 ,mem_reconn_times 
+3d6e 20600000 rtn 
+
+mouse3_0_check_reconn_target:
+3d6f 68494bb8 fetcht 2 ,mem_mouse_fast_page_to 
+3d70 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+3d71 c07fbd73 beq 0xff ,mouse3_0_check_reconn_target_next 
+3d72 68494bb5 fetcht 2 ,mem_mouse_page_to 
+
+mouse3_0_check_reconn_target_next:
+3d73 604940c1 storet 2 ,mem_page_to 
+3d74 6fe341dd fetch 6 ,mem_hci_plap 
+3d75 203a31f8 branch app_bt_start_discovery_short ,blank 
+3d76 70447d17 jam 0x17 ,mem_app_connection_options 
+3d77 6fe0c764 fetch 1 ,mem_ssp_enable 
+3d78 243a31ee nbranch app_bt_start_reconnect ,blank 
+3d79 70447d04 jam 0x04 ,mem_app_connection_options 
+3d7a 202031ee branch app_bt_start_reconnect 
+
+mouse4_0_check_reconn_target:
+3d7b 704ac701 jam 1 ,mem_mouse_le_reconnect_flag 
+3d7c 6848cbb7 fetcht 1 ,mem_mouse_fast_direct_timeout 
+3d7d 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+3d7e c07fbd80 beq 0xff ,mouse4_0_check_reconn_target_next 
+3d7f 6848c902 fetcht 1 ,mem_mouse_direct_timeout 
+
+mouse4_0_check_reconn_target_next:
+3d80 6048cb77 storet 1 ,mem_mouse_direct_timer 
+3d81 20403225 call app_lpm_mult_disable 
+3d82 6fe1cacf fetch 3 ,mem_le_adv_direct_ind 
+3d83 67e1c3ec store 3 ,mem_le_adv_data + 4 
+3d84 204043e8 call mouse_le_check_adv_flag 
+3d85 58000004 setarg adv_flag_bredr_not_supported 
+3d86 e7e08006 istore 1 ,contr 
+3d87 d8c04408 arg mem_le_scan_data ,contr 
+3d88 204043ef call mouse_le_adv_data_update 
+3d89 202078ee branch check_51cmd_adv 
+
+mouse_usb_check_enable:
+3d8a 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3d8b c4068000 rtnbit0 mouse_enable_usb 
+3d8c 58003d90 setarg mouse_usb_config_param 
+3d8d 67e10b45 store 2 ,mem_cb_usb_config 
+3d8e 70492ba5 jam mouse_usb_interface_remove ,mem_mouse_usb_vdd_status 
+3d8f 20203dc1 branch mouse_usb_interface_check 
+
+mouse_usb_config_param:
+3d90 20403d93 call mouse_usb_config_kb_check 
+3d91 20403d98 call mouse_usb_config_param_init 
+3d92 20203da8 branch mouse_usb_config_param_setup 
+
+mouse_usb_config_kb_check:
+3d93 70492c00 jam dongle_kb_bind_eeprom_offect ,mem_mouse_usb_keyboard_flag 
+3d94 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3d95 c40a8000 rtnbit0 mouse_enable_keyboard 
+3d96 70492c5b jam dongle_kb_bind_success ,mem_mouse_usb_keyboard_flag 
+3d97 20600000 rtn 
+
+mouse_usb_config_param_init:
+3d98 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3d99 c28ebd9f bbit1 mouse_enable_usb_250 ,mouse_usb_report_rate_set_250hz 
+3d9a c28f3da2 bbit1 mouse_enable_usb_500 ,mouse_usb_report_rate_set_500hz 
+3d9b c28fbda5 bbit1 mouse_enable_usb_1000 ,mouse_usb_report_rate_set_1000hz 
+3d9c 70492919 jam 0x19 ,mem_wire_usb_interval 
+3d9d 700b4708 jam 0x08 ,mem_usb_tx_interval 
+3d9e 20600000 rtn 
+
+mouse_usb_report_rate_set_250hz:
+3d9f 7049290c jam 0x0c ,mem_wire_usb_interval 
+3da0 700b4704 jam 0x04 ,mem_usb_tx_interval 
+3da1 20600000 rtn 
+
+mouse_usb_report_rate_set_500hz:
+3da2 70492906 jam 0x06 ,mem_wire_usb_interval 
+3da3 700b4702 jam 0x02 ,mem_usb_tx_interval 
+3da4 20600000 rtn 
+
+mouse_usb_report_rate_set_1000hz:
+3da5 70492903 jam 0x03 ,mem_wire_usb_interval 
+3da6 700b4701 jam 0x01 ,mem_usb_tx_interval 
+3da7 20600000 rtn 
+
+mouse_usb_config_param_setup:
+3da8 204079f0 call usb_tx_interval_config 
+3da9 20403dab call mouse_usb_vid_pid_config 
+3daa 20203db0 branch mouse_usb_hid_icon_config 
+
+mouse_usb_vid_pid_config:
+3dab 6fe08b48 fetch 1 ,mem_usb_vid_pid 
+3dac 207a0000 rtn blank 
+3dad 6fe0c92c fetch 1 ,mem_mouse_usb_keyboard_flag 
+3dae c02db66c beq dongle_kb_bind_success ,dongle_usb_vid_pid_for_suit 
+3daf 20203669 branch dongle_usb_vid_pid_for_mouse_only_auto_pair 
+
+mouse_usb_hid_icon_config:
+3db0 6fe0c92c fetch 1 ,mem_mouse_usb_keyboard_flag 
+3db1 2020366f branch dongle_usb_hid_icon_config + 1 
+
+mouse_usb_check:
+3db2 6ff08c02 fetch 1 ,core_usb_addr 
+3db3 c303bdb6 bbit0 7 ,mouse_usb_no_exsit 
+3db4 c283bdb9 bbit1 7 ,mouse_usb_exsit 
+3db5 20600000 rtn 
+
+mouse_usb_no_exsit:
+3db6 6fe0c92a fetch 1 ,mem_usb_addr 
+3db7 c4038000 rtnbit0 7 
+3db8 20205d8c branch soft_reset_chip 
+
+mouse_usb_exsit:
+3db9 6fe0c92a fetch 1 ,mem_usb_addr 
+3dba c3838000 rtnbit1 7 
+3dbb 204047f2 call mouse_24g_stop 
+3dbc 20204316 branch mouse_stop_bluetooth_mode 
+
+mouse_usb_isr:
+3dbd 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3dbe c4068000 rtnbit0 mouse_enable_usb 
+3dbf 20407991 call usb_isr 
+3dc0 20203dc1 branch mouse_usb_interface_check 
+
+mouse_usb_interface_check:
+3dc1 44e34018 bpatch patch18_6 ,mem_patch18 
+3dc2 68488b58 fetcht 1 ,mem_usb_offline_check_gpio 
+3dc3 20406059 call gpio_get_bit 
+3dc4 2020bdc6 branch mouse_usb_gpio_low ,true 
+3dc5 20203dcd branch mouse_usb_gpio_high 
+
+mouse_usb_gpio_low:
+3dc6 6fe0c92b fetch 1 ,mem_mouse_usb_vdd_status 
+3dc7 c1528000 rtneq mouse_usb_interface_remove 
+3dc8 70492ba5 jam mouse_usb_interface_remove ,mem_mouse_usb_vdd_status 
+3dc9 700bfa00 jam 0 ,mem_usb_device_enumeration_endflag 
+3dca 7009f600 jam 0 ,mem_usb_status 
+3dcb 700bec00 jam 0 ,mem_usb_state 
+3dcc 20203bcb branch mouse_init_wireless 
+
+mouse_usb_gpio_high:
+3dcd 6fe0c92b fetch 1 ,mem_mouse_usb_vdd_status 
+3dce c12d0000 rtneq mouse_usb_interface_insert 
+3dcf 70492b5a jam mouse_usb_interface_insert ,mem_mouse_usb_vdd_status 
+3dd0 204047f2 call mouse_24g_stop 
+3dd1 20404316 call mouse_stop_bluetooth_mode 
+3dd2 2040490e call mouse_device_led_all_off 
+3dd3 2020799d branch usb_init 
+
+mouse_usb_mode:
+3dd4 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3dd5 c4068000 rtnbit0 mouse_enable_usb 
+3dd6 20403db2 call mouse_usb_check 
+3dd7 6ff08c02 fetch 1 ,core_usb_addr 
+3dd8 67e0c92a store 1 ,mem_usb_addr 
+3dd9 c4038000 rtnbit0 7 
+3dda 20403e0b call mouse_clkn_check 
+3ddb 6fe24abd fetch 4 ,mem_btclk_sensor 
+3ddc 6848c929 fetcht 1 ,mem_wire_usb_interval 
+3ddd 98408400 iadd temp ,temp 
+3dde 1c427e00 copy clkn_bt ,pdata 
+3ddf 98467c00 isub temp ,null 
+3de0 24610000 nrtn positive 
+3de1 67e24abd store 4 ,mem_btclk_sensor 
+3de2 20403f70 call mouse_motion 
+3de3 24740000 nrtn user 
+
+mouse_push_data_to_usb:
+3de4 6ff08c02 fetch 1 ,core_usb_addr 
+3de5 c4038000 rtnbit0 7 
+3de6 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3de7 c30abdea bbit0 mouse_enable_keyboard ,mouse_push_mouse_data_to_usb 
+3de8 6fe0cb8b fetch 1 ,mem_customer_key 
+3de9 c000bdf0 beq 1 ,mouse_push_keyboard_data_to_usb 
+
+mouse_push_mouse_data_to_usb:
+3dea 20403694 call dongle_usb_tx_ms_data 
+3deb 58000001 setarg ms_report_id 
+3dec 67e08bff store 1 ,mem_usb_mouse_data 
+3ded 6fe3c8d0 fetch 7 ,mem_mouse_key 
+3dee e7e38005 istore 7 ,contw 
+3def 20600000 rtn 
+
+mouse_push_keyboard_data_to_usb:
+3df0 6fe0cb8c fetch 1 ,mem_customer_data_trigger 
+3df1 203a3dfb branch mouse_push_release_keyboard_data_to_usb ,blank 
+3df2 6fe44bcd fetch 8 ,mem_customer_key_press + 1 
+
+mouse_push_keyboard_package_data_to_usb:
+3df3 67e4095c store 8 ,mem_pdatatemp 
+3df4 6fe0cbcc fetch 1 ,mem_customer_key_press 
+3df5 c001bdfd beq kb_multikey_report_id ,mouse_push_multimedia_key_data_to_usb 
+3df6 c0013e04 beq kb_system_conctrl_report_id ,mouse_push_systemctrl_key_data_to_usb 
+3df7 204036a2 call dongle_usb_tx_kb_data 
+3df8 6fe4095c fetch 8 ,mem_pdatatemp 
+3df9 67e40c0f store 8 ,mem_usb_kb_data 
+3dfa 20600000 rtn 
+
+mouse_push_release_keyboard_data_to_usb:
+3dfb 6fe44bd6 fetch 8 ,mem_customer_key_release + 1 
+3dfc 20203df3 branch mouse_push_keyboard_package_data_to_usb 
+
+mouse_push_multimedia_key_data_to_usb:
+3dfd 20403695 call dongle_usb_tx_enable_ep2 
+3dfe 700bf821 jam usb_ep2_multikey ,mem_usb_ep2_data 
+3dff 58000003 setarg kb_multikey_report_id 
+3e00 67e08c1f store 1 ,mem_usb_kb_multikey 
+3e01 6fe1095c fetch 2 ,mem_pdatatemp 
+3e02 e7e10005 istore 2 ,contw 
+3e03 20600000 rtn 
+
+mouse_push_systemctrl_key_data_to_usb:
+3e04 20403695 call dongle_usb_tx_enable_ep2 
+3e05 700bf822 jam usb_ep2_systemkey ,mem_usb_ep2_data 
+3e06 58000002 setarg kb_system_conctrl_report_id 
+3e07 67e08c2f store 1 ,mem_usb_kb_system 
+3e08 6fe0895c fetch 1 ,mem_pdatatemp 
+3e09 e7e08005 istore 1 ,contw 
+3e0a 20600000 rtn 
+
+mouse_clkn_check:
+3e0b 684a4abd fetcht 4 ,mem_btclk_sensor 
+3e0c 1c427e00 copy clkn_bt ,pdata 
+3e0d 98467c00 isub temp ,null 
+3e0e 24413e10 ncall mouse_clkn_timeout ,positive 
+3e0f 20600000 rtn 
+
+mouse_clkn_timeout:
+3e10 58000000 setarg 0 
+3e11 67e24abd store 4 ,mem_btclk_sensor 
+3e12 20600000 rtn 
+
+mouse_lpm_check_wake_lock:
+3e13 c51331dd bmark1 mark_24g ,app_get_lpm_wake_lock 
+3e14 6fe0caac fetch 1 ,mem_mouse_clear_sensor_data_flag 
+3e15 203a31dd branch app_get_lpm_wake_lock ,blank 
+3e16 6fe0caf4 fetch 1 ,mem_mouse_le_conn_param_reject 
+3e17 c000b1dd beq le_lpm_disable ,app_get_lpm_wake_lock 
+3e18 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+3e19 243a31dd nbranch app_get_lpm_wake_lock ,blank 
+3e1a 6fe0c8e1 fetch 1 ,mem_mouse_wheel_trigger 
+3e1b 243a31dd nbranch app_get_lpm_wake_lock ,blank 
+3e1c 202031df branch app_put_lpm_wake_lock 
+
+mouse_delay_enter_hibernata:
+3e1d 6fe0c902 fetch 1 ,mem_mouse_direct_timeout 
+3e1e 67e0cac4 store 1 ,mem_mouse_bluetooth_reconnect_timeout 
+3e1f 20600000 rtn 
+
+mouse_app_enter_hibernate:
+3e20 44e3c018 bpatch patch18_7 ,mem_patch18 
+3e21 20404232 call mouse_sensor_reset 
+3e22 2040423c call mouse_sensor_powerdown 
+3e23 20403e33 call mouse_setgpio_hibernate 
+3e24 20203217 branch app_enter_hibernate 
+
+mouse_before_hibernate:
+3e25 44e44019 bpatch patch19_0 ,mem_patch19 
+3e26 78347c00 enable user 
+3e27 6ff20138 fetch 4 ,0x8138 
+3e28 79347e1a setflag user ,26 ,pdata 
+3e29 67f2004c store 4 ,core_lpm_reg 
+3e2a 2040159a call lpm_write_ctrl 
+3e2b 20406df7 call disable_authrom 
+3e2c 2040490e call mouse_device_led_all_off 
+3e2d 20404015 call mouse_before_hibernate_wheel_gpio_set 
+3e2e 20403e33 call mouse_setgpio_hibernate 
+3e2f 2040462d call mouse_flash_power_down 
+3e30 2040609d call gpio_set_before_lpm_common 
+3e31 6848c911 fetcht 1 ,mem_sensor_motion_gpio 
+3e32 20206042 branch gpio_clr_wake 
+
+mouse_setgpio_hibernate:
+3e33 44e4c019 bpatch patch19_1 ,mem_patch19 
+3e34 204042e9 call mouse_set_sdio_high 
+3e35 20407fdc call clear_wake 
+3e36 20403e40 call mouse_lpm_before_common 
+3e37 20406082 call gpio_pd_idle 
+3e38 d8400013 arg 19 ,temp 
+3e39 20403f56 call mouse_gpio_config_input_pu 
+3e3a 20203f58 branch mouse_gpio_set_high_impedance 
+
+mouse_process_lpm_before:
+3e3b c6130000 rtnmark1 mark_24g 
+3e3c 20403e40 call mouse_lpm_before_common 
+3e3d 6fe0809e fetch 1 ,mem_lpm_current_mult 
+3e3e 247a0000 nrtn blank 
+3e3f 20206042 branch gpio_clr_wake 
+
+mouse_lpm_before_common:
+3e40 44e54019 bpatch patch19_2 ,mem_patch19 
+3e41 20403f88 call mouse_wheel_check 
+3e42 6848c91f fetcht 1 ,mem_mouse_sensor_sclk_gpio 
+3e43 20406069 call gpio_config_output 
+
+mouse_lpm_before_common_next:
+3e44 20405b04 call twspi_disable 
+3e45 6848c918 fetcht 1 ,mem_lbutton_gpio 
+3e46 20406036 call gpio_set_wake 
+3e47 6848c919 fetcht 1 ,mem_rbutton_gpio 
+3e48 20406036 call gpio_set_wake 
+3e49 6848c91a fetcht 1 ,mem_mbutton_gpio 
+3e4a 20406036 call gpio_set_wake 
+3e4b 6848c90d fetcht 1 ,mem_bk_button_gpio 
+3e4c 20406036 call gpio_set_wake 
+3e4d 6848c90e fetcht 1 ,mem_fw_button_gpio 
+3e4e 20406036 call gpio_set_wake 
+3e4f 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+3e50 20406036 call gpio_set_wake 
+3e51 6848c91b fetcht 1 ,mem_config_select_device_button_gpio 
+3e52 20406036 call gpio_set_wake 
+3e53 6848c912 fetcht 1 ,mem_customer_key_gpio 
+3e54 20406036 call gpio_set_wake 
+3e55 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+3e56 20406032 call gpio_set_wake_by_current_state 
+3e57 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
+3e58 20406032 call gpio_set_wake_by_current_state 
+3e59 6848c91c fetcht 1 ,mem_whee_ta_data_gpio 
+3e5a 20406032 call gpio_set_wake_by_current_state 
+3e5b 6848c91d fetcht 1 ,mem_whee_tb_data_gpio 
+3e5c 20406032 call gpio_set_wake_by_current_state 
+3e5d 6848c911 fetcht 1 ,mem_sensor_motion_gpio 
+3e5e 20206036 branch gpio_set_wake 
+
+mouse_set_mult:
+3e5f 6fe1478c fetch 2 ,mem_ui_state_map 
+3e60 c284be64 bbit1 ui_state_ble_connected ,mouse_set_ble_mult 
+3e61 6fe1478c fetch 2 ,mem_ui_state_map 
+3e62 c2803e67 bbit1 ui_state_bt_connected ,mouse_set_bt_mult 
+3e63 20600000 rtn 
+
+mouse_set_ble_mult:
+3e64 1a227e00 copy rega ,pdata 
+3e65 243a1b26 nbranch le_set_config_short_mult ,blank 
+3e66 20201b28 branch le_clr_config_short_mult 
+
+mouse_set_bt_mult:
+3e67 1a227e00 copy rega ,pdata 
+3e68 243a1540 nbranch classic_bt_set_mult_short_flag ,blank 
+3e69 20201542 branch classic_bt_clr_mult_short_flag 
+
+mouse_adc_gpio_set:
+3e6a 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+3e6b c1810000 rtnne adc_config_gpio 
+
+mouse_adc_gpio_check_output:
+3e6c 44e5c019 bpatch patch19_3 ,mem_patch19 
+3e6d 6848c4a1 fetcht 1 ,mem_adc_channel 
+3e6e 18467c03 sub temp ,3 ,null 
+3e6f 20213e78 branch mouse_adc_gpio_4_7_set ,positive 
+3e70 18408405 increase 5 ,temp 
+3e71 6048c8fc storet 1 ,mem_adc_channel_gpio 
+
+mouse_adc_gpio_set_next:
+3e72 18422200 copy temp ,rega 
+3e73 20406098 call gpio_get_config 
+3e74 c01fc954 beq gpcfg_output_high ,mouse_set_24g_led_statue 
+3e75 20404952 call mouse_clear_24g_led_statue 
+3e76 1a220400 copy rega ,temp 
+3e77 2020607f branch gpio_set_high_impedance 
+
+mouse_adc_gpio_4_7_set:
+3e78 18408404 increase 4 ,temp 
+3e79 6048c8fc storet 1 ,mem_adc_channel_gpio 
+3e7a 20203e72 branch mouse_adc_gpio_set_next 
+
+mouse_adc_vol_init:
+3e7b 6fe0c8fd fetch 1 ,mem_adc_config_flag_init 
+3e7c c0013e84 beq adc_config_gpio ,mouse_adc_gpio_vol_init 
+3e7d c0003e89 beq adc_config_vinlpm ,mouse_adc_gpio_vinlpm_init 
+3e7e 7048fd00 jam adc_config_vinlpm ,mem_adc_config_flag_init 
+3e7f 582c0172 setarg 0x2c0172 
+3e80 67e1c8e3 store 3 ,mem_mouse_vdd_full_vol 
+3e81 58014001 setarg 0x014001 
+3e82 e7e18005 istore 3 ,contw 
+3e83 20600000 rtn 
+
+mouse_adc_gpio_vol_init:
+3e84 585d0099 setarg 0x5d0099 
+3e85 67e1c8e3 store 3 ,mem_mouse_vdd_full_vol 
+3e86 58007100 setarg 0x007100 
+3e87 e7e18005 istore 3 ,contw 
+3e88 20600000 rtn 
+
+mouse_adc_gpio_vinlpm_init:
+3e89 58c8012c setarg 0xc8012c 
+3e8a 67e1c8e3 store 3 ,mem_mouse_vdd_full_vol 
+3e8b 5800dc00 setarg 0x00dc00 
+3e8c e7e18005 istore 3 ,contw 
+3e8d 20600000 rtn 
+
+mouse_adc_gpio_mux_init:
+3e8e 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3e8f c40a0000 rtnbit0 mouse_enable_adc 
+3e90 7048f501 jam mouse_adc_check_multiple ,mem_adc_mux_status 
+3e91 c3970000 rtnbit1 mouse_enable_dpi_key_connect_adc 
+3e92 c3958000 rtnbit1 mouse_enable_select_device_by_switch_adc 
+3e93 7048f500 jam mouse_adc_check_battery_only ,mem_adc_mux_status 
+3e94 20600000 rtn 
+
+mouse_adc_read_interval:
+3e95 6fe0c8f6 fetch 1 ,mem_adc_read_timer 
+3e96 1fe0fe01 increase 1 ,pdata 
+3e97 67e0c8f6 store 1 ,mem_adc_read_timer 
+3e98 6848c8f7 fetcht 1 ,mem_adc_read_time_init 
+3e99 98467c00 isub temp ,null 
+3e9a 20600000 rtn 
+
+mouse_adc_read:
+3e9b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3e9c c40a0000 rtnbit0 mouse_enable_adc 
+3e9d 20403e6a call mouse_adc_gpio_set 
+3e9e 6fe0c8f5 fetch 1 ,mem_adc_mux_status 
+3e9f 203a3eb2 branch mouse_adc_read_battery ,blank 
+3ea0 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+3ea1 c0013ea7 beq adc_config_gpio ,mouse_adc_read_gpio_mux_start 
+3ea2 7048f503 jam mouse_adc_check_vinlpm_multiple ,mem_adc_mux_status 
+3ea3 20403e95 call mouse_adc_read_interval 
+3ea4 20213ea9 branch mouse_adc_read_gpio ,positive 
+3ea5 20403eae call mouse_adc_read_vinlpm 
+3ea6 20203eb8 branch mouse_adc_read_start 
+
+mouse_adc_read_gpio_mux_start:
+3ea7 7048f502 jam mouse_adc_check_gpio_multiple ,mem_adc_mux_status 
+3ea8 20203eb8 branch mouse_adc_read_start 
+
+mouse_adc_read_gpio:
+3ea9 20403e6c call mouse_adc_gpio_check_output 
+3eaa 7044a002 jam adc_config_gpio ,mem_adc_config_flag 
+3eab 6fe0cbaa fetch 1 ,mem_24g_device_led_status 
+3eac 245a3eae ncall mouse_adc_read_vinlpm ,blank 
+3ead 20203eb8 branch mouse_adc_read_start 
+
+mouse_adc_read_vinlpm:
+3eae 7048f600 jam 0 ,mem_adc_read_timer 
+3eaf 6fe0c8fd fetch 1 ,mem_adc_config_flag_init 
+3eb0 67e0c4a0 store 1 ,mem_adc_config_flag 
+3eb1 20600000 rtn 
+
+mouse_adc_read_battery:
+3eb2 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+3eb3 c0813eb6 bne adc_config_gpio ,mouse_adc_read_battery_start 
+3eb4 6fe0cbaa fetch 1 ,mem_24g_device_led_status 
+3eb5 247a0000 nrtn blank 
+
+mouse_adc_read_battery_start:
+3eb6 20403e95 call mouse_adc_read_interval 
+3eb7 24610000 nrtn positive 
+
+mouse_adc_read_start:
+3eb8 44e64019 bpatch patch19_4 ,mem_patch19 
+3eb9 6fe0cbaa fetch 1 ,mem_24g_device_led_status 
+3eba 247a0000 nrtn blank 
+3ebb 7048f600 jam 0 ,mem_adc_read_timer 
+3ebc 20406125 call vdd_calculate_by_mode 
+3ebd 67e148e9 store 2 ,mem_mouse_vdd_now_vol 
+3ebe 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+3ebf c0813ec6 bne adc_config_gpio ,mouse_adc_data_process 
+3ec0 684948e9 fetcht 2 ,mem_mouse_vdd_now_vol 
+3ec1 184ffe08 mul32 temp ,8 ,pdata 
+3ec2 1fe6fc0a div pdata ,10 
+3ec3 20407dec call get_div_result 
+3ec4 9840fe00 iadd temp ,pdata 
+3ec5 67e148e9 store 2 ,mem_mouse_vdd_now_vol 
+
+mouse_adc_data_process:
+3ec6 da2048e3 arg mem_mouse_vdd_calculate_set ,rega 
+3ec7 20403ed8 call mouse_adc_bat_percent_lowpower_out 
+3ec8 6fe0c4a4 fetch 1 ,mem_adc_power_flag 
+3ec9 c2813f1a bbit1 2 ,mouse_adc_button_press 
+3eca c280bf1c bbit1 1 ,mouse_power_down 
+3ecb c3003ed0 bbit0 0 ,mouse_adc_no_low_voltage 
+3ecc 7048fa01 jam 1 ,mem_mouse_adc_last_low_voltage_flag 
+3ecd 20203ece branch mouse_adc_low_voltage 
+
+mouse_adc_low_voltage:
+3ece d8e00004 arg mouse_low_voltage_flag ,queue 
+3ecf 202046f0 branch mouse_enable_function_flag 
+
+mouse_adc_no_low_voltage:
+3ed0 d8e00004 arg mouse_low_voltage_flag ,queue 
+3ed1 204046f4 call mouse_disable_function_flag 
+3ed2 7048f80c jam 12 ,mem_adc_low_volatage_led_timer_count 
+3ed3 6fe0c8fa fetch 1 ,mem_mouse_adc_last_low_voltage_flag 
+3ed4 207a0000 rtn blank 
+3ed5 7048fa00 jam 0 ,mem_mouse_adc_last_low_voltage_flag 
+3ed6 6848c921 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+3ed7 2020492b branch mouse_led_off 
+
+mouse_adc_bat_percent_lowpower_out:
+3ed8 44e6c019 bpatch patch19_5 ,mem_patch19 
+3ed9 efe40011 ifetch 8 ,rega 
+3eda 67e4095c store 8 ,mem_pdatatemp 
+3edb 6fe0c8f5 fetch 1 ,mem_adc_mux_status 
+3edc c0003ef0 beq mouse_adc_check_battery_only ,mouse_adc_bat_percent_lowpower_out_battery 
+3edd c0013edf beq mouse_adc_check_gpio_multiple ,mouse_adc_bat_percent_lowpower_out_gpio_multiple 
+3ede c001bf0f beq mouse_adc_check_vinlpm_multiple ,mouse_adc_bat_percent_lowpower_out_vinlpm_multiple 
+
+mouse_adc_bat_percent_lowpower_out_gpio_multiple:
+3edf 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3ee0 c3173ee5 bbit0 mouse_enable_dpi_key_connect_adc ,mouse_adc_bat_percent_lowpower_out_gpio_switch 
+3ee1 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3ee2 684948eb fetcht 2 ,mem_mouse_vdd_button_press_vol 
+3ee3 98467c00 isub temp ,null 
+3ee4 24213f12 nbranch mouse_adc_set_button_press_flag ,positive 
+
+mouse_adc_bat_percent_lowpower_out_gpio_switch:
+3ee5 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+3ee6 c315bef0 bbit0 mouse_enable_select_device_by_switch_adc ,mouse_adc_bat_percent_lowpower_out_battery 
+3ee7 7048fb00 jam 0 ,mem_mouse_adc_button_press_flag 
+3ee8 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3ee9 684948ed fetcht 2 ,mem_mouse_vdd_switch_gnd_24g_vol 
+3eea 98467c00 isub temp ,null 
+3eeb 24213eee nbranch mouse_select_24gdevice ,positive 
+3eec 204046a9 call mouse_select_btdevice 
+3eed 20203ef0 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_select_24gdevice:
+3eee 204046ad call mouse_check_select_24gdevice 
+3eef 20203ef0 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_adc_bat_percent_lowpower_out_battery:
+3ef0 20403f16 call mouse_adc_clear_button_press_flag 
+3ef1 2040616e call adc_clear_no_power_flag 
+3ef2 20406166 call adc_clear_low_power_flag 
+3ef3 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3ef4 6849095e fetcht 2 ,mem_pdatatemp + 2 
+3ef5 98467c00 isub temp ,null 
+3ef6 2441616a ncall adc_set_no_power_flag ,positive 
+3ef7 68490960 fetcht 2 ,mem_pdatatemp + 4 
+3ef8 98467c00 isub temp ,null 
+3ef9 24416162 ncall adc_set_low_power_flag ,positive 
+
+mouse_adc_bat_level_set:
+3efa 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+3efb 6849095c fetcht 2 ,mem_pdatatemp 
+3efc 98467c00 isub temp ,null 
+3efd 20213f0b branch mouse_adc_bat_level_100_percent ,positive 
+3efe 6849095e fetcht 2 ,mem_pdatatemp + 2 
+3eff 98467e00 isub temp ,pdata 
+3f00 24213f0d nbranch mouse_adc_bat_level_0_percent ,positive 
+3f01 203a3f0d branch mouse_adc_bat_level_0_percent ,blank 
+3f02 1fefa264 mul32 pdata ,100 ,rega 
+3f03 6fe1095c fetch 2 ,mem_pdatatemp 
+3f04 6849095e fetcht 2 ,mem_pdatatemp + 2 
+3f05 98460400 isub temp ,temp 
+3f06 1a227e00 copy rega ,pdata 
+3f07 9846fc00 idiv temp 
+3f08 20407dec call get_div_result 
+3f09 67e0caef store 1 ,mem_le_battery_level_percentage 
+3f0a 20600000 rtn 
+
+mouse_adc_bat_level_100_percent:
+3f0b 704aef64 jam 100 ,mem_le_battery_level_percentage 
+3f0c 20600000 rtn 
+
+mouse_adc_bat_level_0_percent:
+3f0d 704aef00 jam 0 ,mem_le_battery_level_percentage 
+3f0e 20600000 rtn 
+
+mouse_adc_bat_percent_lowpower_out_vinlpm_multiple:
+3f0f 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+3f10 c0013edf beq adc_config_gpio ,mouse_adc_bat_percent_lowpower_out_gpio_multiple 
+3f11 20203ef0 branch mouse_adc_bat_percent_lowpower_out_battery 
+
+mouse_adc_set_button_press_flag:
+3f12 6848c4a4 fetcht 1 ,mem_adc_power_flag 
+3f13 79200402 set1 2 ,temp 
+3f14 6048c4a4 storet 1 ,mem_adc_power_flag 
+3f15 20600000 rtn 
+
+mouse_adc_clear_button_press_flag:
+3f16 6848c4a4 fetcht 1 ,mem_adc_power_flag 
+3f17 793f8402 set0 2 ,temp 
+3f18 6048c4a4 storet 1 ,mem_adc_power_flag 
+3f19 20600000 rtn 
+
+mouse_adc_button_press:
+3f1a 7048fb01 jam 1 ,mem_mouse_adc_button_press_flag 
+3f1b 20600000 rtn 
+
+mouse_power_down:
+3f1c 2040490e call mouse_device_led_all_off 
+3f1d 20203e20 branch mouse_app_enter_hibernate 
+
+mouse_gpio_init:
+3f1e 6848c4c1 fetcht 1 ,mem_eeprom_wp_gpio 
+3f1f 20406069 call gpio_config_output 
+3f20 204079b4 call usb_offline_check_init 
+3f21 6848c918 fetcht 1 ,mem_lbutton_gpio 
+3f22 20403f56 call mouse_gpio_config_input_pu 
+3f23 6848c919 fetcht 1 ,mem_rbutton_gpio 
+3f24 20403f56 call mouse_gpio_config_input_pu 
+3f25 6848c91a fetcht 1 ,mem_mbutton_gpio 
+3f26 20403f56 call mouse_gpio_config_input_pu 
+3f27 6848c90d fetcht 1 ,mem_bk_button_gpio 
+3f28 20403f56 call mouse_gpio_config_input_pu 
+3f29 6848c90e fetcht 1 ,mem_fw_button_gpio 
+3f2a 20403f56 call mouse_gpio_config_input_pu 
+3f2b 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+3f2c 20403f56 call mouse_gpio_config_input_pu 
+3f2d 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+3f2e 20403f56 call mouse_gpio_config_input_pu 
+3f2f 6848c91b fetcht 1 ,mem_config_select_device_button_gpio 
+3f30 20403f56 call mouse_gpio_config_input_pu 
+3f31 6848c912 fetcht 1 ,mem_customer_key_gpio 
+3f32 20403f56 call mouse_gpio_config_input_pu 
+3f33 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+3f34 20403f56 call mouse_gpio_config_input_pu 
+3f35 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
+3f36 20403f56 call mouse_gpio_config_input_pu 
+3f37 6848c91c fetcht 1 ,mem_whee_ta_data_gpio 
+3f38 20403f56 call mouse_gpio_config_input_pu 
+3f39 6848c91d fetcht 1 ,mem_whee_tb_data_gpio 
+3f3a 20403f56 call mouse_gpio_config_input_pu 
+3f3b 6848c911 fetcht 1 ,mem_sensor_motion_gpio 
+3f3c 20403f56 call mouse_gpio_config_input_pu 
+3f3d 6848c91e fetcht 1 ,mem_device_switch_gpio 
+3f3e 20403f56 call mouse_gpio_config_input_pu 
+3f3f 6848caab fetcht 1 ,mem_sensor_reset_gpio 
+3f40 20406069 call gpio_config_output 
+3f41 6848c921 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+3f42 20406069 call gpio_config_output 
+3f43 6848c915 fetcht 1 ,mem_config_device_24g_led_gpio 
+3f44 20406069 call gpio_config_output 
+3f45 6848c916 fetcht 1 ,mem_config_device_bt1_led_gpio 
+3f46 20406069 call gpio_config_output 
+3f47 6848c922 fetcht 1 ,mem_config_device_bt2_led_gpio 
+3f48 20406069 call gpio_config_output 
+3f49 6848c923 fetcht 1 ,mem_dpi_led_gpio 
+3f4a 20406069 call gpio_config_output 
+3f4b 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
+3f4c 20203f56 branch mouse_gpio_config_input_pu 
+
+mouse_gpio_set_pupd_by_input:
+3f4d 18467cff sub temp ,ui_button_gpio_disable ,null 
+3f4e 20628000 rtn zero 
+3f4f 18410e7f and temp ,0x7f ,queue 
+3f50 6ff2011c fetch 4 ,core_gpio_in 
+3f51 afefffff qisolate1 pdata 
+3f52 2020bf56 branch mouse_gpio_config_input_pu ,true 
+3f53 20203f54 branch mouse_gpio_config_input_pd 
+
+mouse_gpio_config_input_pd:
+3f54 79200407 set1 gpio_active_bit ,temp 
+3f55 20206050 branch gpio_config_input 
+
+mouse_gpio_config_input_pu:
+3f56 793f8407 set0 gpio_active_bit ,temp 
+3f57 20206050 branch gpio_config_input 
+
+mouse_gpio_set_high_impedance:
+3f58 6fe1cbde fetch 3 ,mem_mouse_set_high_impedance_bit_set 
+3f59 67e1895c store 3 ,mem_pdatatemp 
+3f5a df200014 arg 20 ,loopcnt 
+3f5b d8400000 arg 0 ,temp 
+
+mouse_gpio_set_high_impedance_bit_loop:
+3f5c 6fe1895c fetch 3 ,mem_pdatatemp 
+3f5d 2feffe00 isolate1 0 ,pdata 
+3f5e 2040e07f call gpio_set_high_impedance ,true 
+3f5f 6fe1895c fetch 3 ,mem_pdatatemp 
+3f60 1fe3fe00 lshift pdata ,pdata 
+3f61 67e1895c store 3 ,mem_pdatatemp 
+3f62 18408401 increase 1 ,temp 
+3f63 c2003f5c loop mouse_gpio_set_high_impedance_bit_loop 
+3f64 20600000 rtn 
+
+mouse_sensor_spi_init:
+3f65 20403f6a call mouse_spid_init_pin 
+3f66 70448473 jam 0x73 ,mem_spi_init_clk 
+3f67 20403f69 call mouse_spi_init 
+3f68 20205b08 branch twspi_enable 
+
+mouse_spi_write_flash_cb:
+
+mouse_spi_init:
+3f69 20205cb5 branch spid_init 
+
+mouse_spid_init_pin:
+3f6a 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
+3f6b d8400021 arg gpcfg_spid_sck ,temp 
+3f6c 20406093 call gpio_config_function_int 
+3f6d 6fe0c920 fetch 1 ,mem_mouse_sensor_sdio_gpio 
+3f6e d8400023 arg gpcfg_spid_sdio ,temp 
+3f6f 20206093 branch gpio_config_function_int 
+
+mouse_motion:
+3f70 44e74019 bpatch patch19_6 ,mem_patch19 
+3f71 78547c00 disable user 
+3f72 58000000 setarg 0 
+3f73 67e348d1 store 6 ,mem_mouse_x 
+3f74 20404240 call mouse_check_sensor_data 
+3f75 20403f7e call mouse_zwheel 
+3f76 20403f83 call mouse_t_zwheel 
+3f77 204040dc call mouse_key 
+3f78 6fe0c8d0 fetch 1 ,mem_mouse_key 
+3f79 1fe17e1f and_into 0x1f ,pdata 
+3f7a 67e0c8d0 store 1 ,mem_mouse_key 
+3f7b 24344728 nbranch mouse_drawing_optima_init ,user 
+3f7c 2040471a call mouse_drawing_optima 
+3f7d 20204544 branch mouse_no_data_timer_init 
+
+mouse_zwheel:
+3f7e 6fe0c8e0 fetch 1 ,mem_mouse_z_data 
+3f7f 207a0000 rtn blank 
+3f80 67e0c8d5 store 1 ,mem_mouse_z 
+3f81 7048e000 jam 0 ,mem_mouse_z_data 
+3f82 20207e54 branch enable_user 
+
+mouse_t_zwheel:
+3f83 6fe0c8dc fetch 1 ,mem_mouse_tz_data 
+3f84 207a0000 rtn blank 
+3f85 67e0c8d6 store 1 ,mem_mouse_tz 
+3f86 7048dc00 jam 0 ,mem_mouse_tz_data 
+3f87 20207e54 branch enable_user 
+
+mouse_wheel_check:
+3f88 20403f95 call mouse_t_wheel_scan 
+3f89 20403fd1 call mouse_wheel_scan 
+3f8a 6fe0c8da fetch 1 ,mem_wheel_tb_new_pinlevel 
+3f8b 6848c8d9 fetcht 1 ,mem_wheel_tb_old_pinlevel 
+3f8c 67e0c8d9 store 1 ,mem_wheel_tb_old_pinlevel 
+3f8d 98467c00 isub temp ,null 
+3f8e 2422b1e1 nbranch app_lpm_wake_auto_lock ,zero 
+3f8f 6fe0c8de fetch 1 ,mem_mwheel_b_new_pinlevel 
+3f90 6848c8dd fetcht 1 ,mem_mwheel_b_old_pinlevel 
+3f91 67e0c8dd store 1 ,mem_mwheel_b_old_pinlevel 
+3f92 98467c00 isub temp ,null 
+3f93 2422b1e1 nbranch app_lpm_wake_auto_lock ,zero 
+3f94 20600000 rtn 
+
+mouse_t_wheel_scan:
+3f95 6fe0c91c fetch 1 ,mem_whee_ta_data_gpio 
+3f96 c17f8000 rtneq gpio_disable 
+3f97 da200000 arg 0 ,rega 
+3f98 6848c91c fetcht 1 ,mem_whee_ta_data_gpio 
+3f99 20406059 call gpio_get_bit 
+3f9a 7920a200 setflag true ,0 ,rega 
+3f9b 6848c91d fetcht 1 ,mem_whee_tb_data_gpio 
+3f9c 20406059 call gpio_get_bit 
+3f9d 7920a201 setflag true ,1 ,rega 
+3f9e 1a227e00 copy rega ,pdata 
+3f9f 67e0c8da store 1 ,mem_wheel_tb_new_pinlevel 
+3fa0 c000bfa5 beq 0x01 ,mouse_t_wheel_scan_judge1 
+3fa1 c0013fa9 beq 0x02 ,mouse_t_wheel_scan_judge2 
+3fa2 6fe0c8db fetch 1 ,mem_wheel_tog 
+3fa3 c283bfb5 bbit1 7 ,mouse_t_wheel_scan_judge3 
+3fa4 20600000 rtn 
+
+mouse_t_wheel_scan_judge1:
+3fa5 6fe0c8d9 fetch 1 ,mem_wheel_tb_old_pinlevel 
+3fa6 c0003fad beq 0 ,mouse_t_wheel_scan_judge11 
+3fa7 c001bfaf beq 3 ,mouse_t_wheel_scan_judge12 
+3fa8 20600000 rtn 
+
+mouse_t_wheel_scan_judge2:
+3fa9 6fe0c8d9 fetch 1 ,mem_wheel_tb_old_pinlevel 
+3faa c0003fb1 beq 0 ,mouse_t_wheel_scan_judge21 
+3fab c001bfb3 beq 3 ,mouse_t_wheel_scan_judge22 
+3fac 20600000 rtn 
+
+mouse_t_wheel_scan_judge11:
+3fad 7048db82 jam 0x82 ,mem_wheel_tog 
+3fae 20600000 rtn 
+
+mouse_t_wheel_scan_judge12:
+3faf 7048db81 jam 0x81 ,mem_wheel_tog 
+3fb0 20600000 rtn 
+
+mouse_t_wheel_scan_judge21:
+3fb1 7048db80 jam 0x80 ,mem_wheel_tog 
+3fb2 20600000 rtn 
+
+mouse_t_wheel_scan_judge22:
+3fb3 7048db83 jam 0x83 ,mem_wheel_tog 
+3fb4 20600000 rtn 
+
+mouse_t_wheel_scan_judge3:
+3fb5 6fe0c8db fetch 1 ,mem_wheel_tog 
+3fb6 793ffe07 set0 7 ,pdata 
+3fb7 67e0c8db store 1 ,mem_wheel_tog 
+3fb8 c0003fbd beq 0 ,mouse_t_wheel_scan_judge30 
+3fb9 c000bfc0 beq 1 ,mouse_t_wheel_scan_judge31 
+3fba c0013fc3 beq 2 ,mouse_t_wheel_scan_judge32 
+3fbb c001bfc6 beq 3 ,mouse_t_wheel_scan_judge33 
+3fbc 20600000 rtn 
+
+mouse_t_wheel_scan_judge30:
+3fbd 6fe0c8da fetch 1 ,mem_wheel_tb_new_pinlevel 
+3fbe c001bfc9 beq 3 ,mouse_wheel_t_forward 
+3fbf 20600000 rtn 
+
+mouse_t_wheel_scan_judge31:
+3fc0 6fe0c8da fetch 1 ,mem_wheel_tb_new_pinlevel 
+3fc1 c0003fc9 beq 0 ,mouse_wheel_t_forward 
+3fc2 20600000 rtn 
+
+mouse_t_wheel_scan_judge32:
+3fc3 6fe0c8da fetch 1 ,mem_wheel_tb_new_pinlevel 
+3fc4 c001bfcd beq 3 ,mouse_wheel_t_back 
+3fc5 20600000 rtn 
+
+mouse_t_wheel_scan_judge33:
+3fc6 6fe0c8da fetch 1 ,mem_wheel_tb_new_pinlevel 
+3fc7 c0003fcd beq 0 ,mouse_wheel_t_back 
+3fc8 20600000 rtn 
+
+mouse_wheel_t_forward:
+3fc9 6fe0c8dc fetch 1 ,mem_mouse_tz_data 
+3fca 1fe0fe01 increase 1 ,pdata 
+3fcb 67e0c8dc store 1 ,mem_mouse_tz_data 
+3fcc 20600000 rtn 
+
+mouse_wheel_t_back:
+3fcd 6fe0c8dc fetch 1 ,mem_mouse_tz_data 
+3fce 1fe0ffff increase -1 ,pdata 
+3fcf 67e0c8dc store 1 ,mem_mouse_tz_data 
+3fd0 20600000 rtn 
+
+mouse_wheel_scan:
+3fd1 6fe0c913 fetch 1 ,mem_whee_a_data_gpio 
+3fd2 c17f8000 rtneq gpio_disable 
+3fd3 da200000 arg 0 ,rega 
+3fd4 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+3fd5 20406059 call gpio_get_bit 
+3fd6 7920a200 setflag true ,0 ,rega 
+3fd7 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
+3fd8 20406059 call gpio_get_bit 
+3fd9 7920a201 setflag true ,1 ,rega 
+3fda 1a227e00 copy rega ,pdata 
+3fdb 67e0c8de store 1 ,mem_mwheel_b_new_pinlevel 
+3fdc c000bfe1 beq 0x01 ,mouse_wheel_scan_judge1 
+3fdd c0013fe5 beq 0x02 ,mouse_wheel_scan_judge2 
+3fde 6fe0c8df fetch 1 ,mem_mwheel_tog 
+3fdf c283bff1 bbit1 7 ,mouse_wheel_scan_judge3 
+3fe0 20600000 rtn 
+
+mouse_wheel_scan_judge1:
+3fe1 6fe0c8dd fetch 1 ,mem_mwheel_b_old_pinlevel 
+3fe2 c0003fe9 beq 0 ,mouse_wheel_scan_judge11 
+3fe3 c001bfeb beq 3 ,mouse_wheel_scan_judge12 
+3fe4 20600000 rtn 
+
+mouse_wheel_scan_judge2:
+3fe5 6fe0c8dd fetch 1 ,mem_mwheel_b_old_pinlevel 
+3fe6 c0003fed beq 0 ,mouse_wheel_scan_judge21 
+3fe7 c001bfef beq 3 ,mouse_wheel_scan_judge22 
+3fe8 20600000 rtn 
+
+mouse_wheel_scan_judge11:
+3fe9 7048df82 jam 0x82 ,mem_mwheel_tog 
+3fea 20600000 rtn 
+
+mouse_wheel_scan_judge12:
+3feb 7048df81 jam 0x81 ,mem_mwheel_tog 
+3fec 20600000 rtn 
+
+mouse_wheel_scan_judge21:
+3fed 7048df80 jam 0x80 ,mem_mwheel_tog 
+3fee 20600000 rtn 
+
+mouse_wheel_scan_judge22:
+3fef 7048df83 jam 0x83 ,mem_mwheel_tog 
+3ff0 20600000 rtn 
+
+mouse_wheel_scan_judge3:
+3ff1 6fe0c8df fetch 1 ,mem_mwheel_tog 
+3ff2 793ffe07 set0 7 ,pdata 
+3ff3 67e0c8df store 1 ,mem_mwheel_tog 
+3ff4 c0003ff9 beq 0 ,mouse_wheel_scan_judge30 
+3ff5 c000bffc beq 1 ,mouse_wheel_scan_judge31 
+3ff6 c0013fff beq 2 ,mouse_wheel_scan_judge32 
+3ff7 c001c002 beq 3 ,mouse_wheel_scan_judge33 
+3ff8 20600000 rtn 
+
+mouse_wheel_scan_judge30:
+3ff9 6fe0c8de fetch 1 ,mem_mwheel_b_new_pinlevel 
+3ffa c001c005 beq 3 ,mouse_wheel_forward 
+3ffb 20600000 rtn 
+
+mouse_wheel_scan_judge31:
+3ffc 6fe0c8de fetch 1 ,mem_mwheel_b_new_pinlevel 
+3ffd c0004005 beq 0 ,mouse_wheel_forward 
+3ffe 20600000 rtn 
+
+mouse_wheel_scan_judge32:
+3fff 6fe0c8de fetch 1 ,mem_mwheel_b_new_pinlevel 
+4000 c001c009 beq 3 ,mouse_wheel_back 
+4001 20600000 rtn 
+
+mouse_wheel_scan_judge33:
+4002 6fe0c8de fetch 1 ,mem_mwheel_b_new_pinlevel 
+4003 c0004009 beq 0 ,mouse_wheel_back 
+4004 20600000 rtn 
+
+mouse_wheel_forward:
+4005 6fe0c8e0 fetch 1 ,mem_mouse_z_data 
+4006 1fe0fe01 increase 1 ,pdata 
+4007 67e0c8e0 store 1 ,mem_mouse_z_data 
+4008 20600000 rtn 
+
+mouse_wheel_back:
+4009 6fe0c8e0 fetch 1 ,mem_mouse_z_data 
+400a 1fe0ffff increase -1 ,pdata 
+400b 67e0c8e0 store 1 ,mem_mouse_z_data 
+400c 20600000 rtn 
+
+mouse_wheel_gpio_set_wake:
+400d 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+400e 20406032 call gpio_set_wake_by_current_state 
+400f 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
+4010 20406032 call gpio_set_wake_by_current_state 
+4011 6848c91c fetcht 1 ,mem_whee_ta_data_gpio 
+4012 20406032 call gpio_set_wake_by_current_state 
+4013 6848c91d fetcht 1 ,mem_whee_tb_data_gpio 
+4014 20206032 branch gpio_set_wake_by_current_state 
+
+mouse_before_hibernate_wheel_gpio_set:
+4015 6848c913 fetcht 1 ,mem_whee_a_data_gpio 
+4016 20403f4d call mouse_gpio_set_pupd_by_input 
+4017 6848c914 fetcht 1 ,mem_whee_b_data_gpio 
+4018 20403f4d call mouse_gpio_set_pupd_by_input 
+4019 6848c91c fetcht 1 ,mem_whee_ta_data_gpio 
+401a 20403f4d call mouse_gpio_set_pupd_by_input 
+401b 6848c91d fetcht 1 ,mem_whee_tb_data_gpio 
+401c 20203f4d branch mouse_gpio_set_pupd_by_input 
+
+mouse_wheel_trigger:
+401d 6fe148d5 fetch 2 ,mem_mouse_z 
+401e 207a0000 rtn blank 
+401f 7048e101 jam 1 ,mem_mouse_wheel_trigger 
+4020 7048e20a jam 10 ,mem_mouse_wheel_trigger_timer 
+4021 20600000 rtn 
+
+mouse_wheel_trigger_timer:
+4022 da6048e2 arg mem_mouse_wheel_trigger_timer ,regc 
+4023 da404025 arg mouse_wheel_trigger_disable ,regb 
+4024 2020318a branch timer_single_step 
+
+mouse_wheel_trigger_disable:
+4025 7048e100 jam 0 ,mem_mouse_wheel_trigger 
+4026 20600000 rtn 
+
+mouse_dpi_check:
+4027 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4028 c2974036 bbit1 mouse_enable_dpi_key_connect_adc ,mouse_dpi_check_connect_adc 
+4029 6fe0c90f fetch 1 ,mem_dpi_button_gpio 
+402a c17f8000 rtneq gpio_disable 
+402b da200000 arg 0 ,rega 
+402c 704b9605 jam mouse_dpi_key ,mem_mouse_key_temp 
+402d 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+402e 20404039 call mouse_dpi_key_check 
+
+mouse_dpi_check_next:
+402f 67e0cb93 store 1 ,mem_mouse_dpikey_press_status 
+4030 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+4031 c07fc042 beq gpio_disable ,mouse_3io6key_dpi_check_end 
+4032 20404168 call mouse_matrix_public_gpio_reset 
+
+mouse_dpi_check_exit:
+4033 1a227e00 copy rega ,pdata 
+4034 c282c052 bbit1 mouse_dpi_key ,mouse_dpi_down 
+4035 20204059 branch mouse_dpi_up 
+
+mouse_dpi_check_connect_adc:
+4036 6fe0c8fb fetch 1 ,mem_mouse_adc_button_press_flag 
+4037 203a4059 branch mouse_dpi_up ,blank 
+4038 20204052 branch mouse_dpi_down 
+
+mouse_dpi_key_check:
+4039 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+403a c2964048 bbit1 mouse_enable_dpi_key_connect_gnd ,mouse_dpi_key_connect_gnd 
+403b 6fe0cb93 fetch 1 ,mem_mouse_dpikey_press_status 
+403c 1fe22600 copy pdata ,regc 
+403d 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+403e c07fc195 beq gpio_disable ,mouse_3io6key_check 
+
+mouse_dpi_key_check_next:
+403f 6fe0cb9a fetch 1 ,mem_mouse_ghost_flag 
+4040 243a4045 nbranch mouse_dpi_check_end ,blank 
+4041 2020404a branch mouse_dpi_key_connect_matrix 
+
+mouse_3io6key_dpi_check_end:
+4042 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+4043 20403f56 call mouse_gpio_config_input_pu 
+4044 20204033 branch mouse_dpi_check_exit 
+
+mouse_dpi_check_end:
+4045 7049dd00 jam dpi_button_state_up ,mem_mouse_dpi_button_state 
+4046 704b9300 jam 0 ,mem_mouse_dpikey_press_status 
+4047 20600000 rtn 
+
+mouse_dpi_key_connect_gnd:
+4048 6fe0cb93 fetch 1 ,mem_mouse_dpikey_press_status 
+4049 20204187 branch mouse_check_key_connect_gnd 
+
+mouse_dpi_key_connect_matrix:
+404a 20406059 call gpio_get_bit 
+404b 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+404c 2020c048 branch mouse_dpi_key_connect_gnd ,true 
+404d 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+404e 20406069 call gpio_out_active 
+404f 6848c90f fetcht 1 ,mem_dpi_button_gpio 
+4050 6fe0cb93 fetch 1 ,mem_mouse_dpikey_press_status 
+4051 20204187 branch mouse_check_key_connect_gnd 
+
+mouse_dpi_down:
+4052 6fe0c9dd fetch 1 ,mem_mouse_dpi_button_state 
+4053 c1008000 rtneq dpi_button_state_down 
+4054 7049dd01 jam dpi_button_state_down ,mem_mouse_dpi_button_state 
+4055 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4056 c3940000 rtnbit1 mouse_enable_select_device_by_dpi_button 
+4057 c39b0000 rtnbit1 mouse_enable_dpi_key_long_press_disconvery 
+4058 20204069 branch mouse_dpi_process 
+
+mouse_dpi_up:
+4059 6fe0c9dd fetch 1 ,mem_mouse_dpi_button_state 
+405a c1000000 rtneq dpi_button_state_up 
+405b 7049dd00 jam dpi_button_state_up ,mem_mouse_dpi_button_state 
+405c 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+405d c2944060 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_dpi_up_next 
+405e c29b4060 bbit1 mouse_enable_dpi_key_long_press_disconvery ,mouse_dpi_up_next 
+405f 20600000 rtn 
+
+mouse_dpi_up_next:
+4060 6fe0c9de fetch 1 ,mem_mouse_dpi_long_press_flag 
+4061 243a4064 nbranch mouse_dpi_up_after_long_press ,blank 
+4062 6fe0cb9c fetch 1 ,mem_select_device_count 
+4063 245a4069 ncall mouse_dpi_process ,blank 
+
+mouse_dpi_up_after_long_press:
+4064 7049de00 jam 0 ,mem_mouse_dpi_long_press_flag 
+4065 6fe0c78f fetch 1 ,mem_ui_button_timeout 
+4066 67e0cb9c store 1 ,mem_select_device_count 
+4067 67e0cb9b store 1 ,mem_bt_discovery_count 
+4068 20600000 rtn 
+
+mouse_dpi_process:
+4069 44e7c019 bpatch patch19_7 ,mem_patch19 
+406a 20404072 call mouse_dpi_ghost_check 
+406b 20740000 rtn user 
+406c 6fe0c992 fetch 1 ,mem_mouse_dpi 
+406d 1fe0fe01 increase 1 ,pdata 
+406e 1fe17e03 and pdata ,0x03 ,pdata 
+406f 67e0c992 store 1 ,mem_mouse_dpi 
+4070 20404095 call mouse_seting_dpi 
+4071 202045ee branch mouse_store_device_info_delay 
+
+mouse_dpi_ghost_check:
+4072 78547c00 disable user 
+4073 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4074 c3960000 rtnbit1 mouse_enable_dpi_key_connect_gnd 
+4075 c3970000 rtnbit1 mouse_enable_dpi_key_connect_adc 
+4076 6fe0cb8e fetch 1 ,mem_mouse_lkey_press_status 
+4077 207a0000 rtn blank 
+4078 6fe0cb8f fetch 1 ,mem_mouse_rkey_press_status 
+4079 207a0000 rtn blank 
+407a 78347c00 enable user 
+407b 20600000 rtn 
+
+mouse_dpi_key_check_long_press:
+407c 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+407d c2944080 bbit1 mouse_enable_select_device_by_dpi_button ,mouse_select_device_by_dpi_button 
+407e c29b4087 bbit1 mouse_enable_dpi_key_long_press_disconvery ,mouse_discovery_by_dpi_button 
+407f 20600000 rtn 
+
+mouse_select_device_by_dpi_button:
+4080 6fe0c9dd fetch 1 ,mem_mouse_dpi_button_state 
+4081 c1808000 rtnne dpi_button_state_down 
+4082 da604b9c arg mem_select_device_count ,regc 
+4083 da404085 arg mouse_ready_reconnection_by_dpi_button ,regb 
+4084 2020318a branch timer_single_step 
+
+mouse_ready_reconnection_by_dpi_button:
+4085 7049de01 jam 1 ,mem_mouse_dpi_long_press_flag 
+4086 202046b5 branch mouse_ready_reconnection_by_button 
+
+mouse_discovery_by_dpi_button:
+4087 6fe0c9dd fetch 1 ,mem_mouse_dpi_button_state 
+4088 c1808000 rtnne dpi_button_state_down 
+4089 da604b9b arg mem_bt_discovery_count ,regc 
+408a da40408c arg mouse_long_dpi_button_bt_discovery ,regb 
+408b 2020318a branch timer_single_step 
+
+mouse_long_dpi_button_bt_discovery:
+408c 7049de01 jam 1 ,mem_mouse_dpi_long_press_flag 
+408d 202044d4 branch mouse_long_button_bt_discovery 
+
+mouse_dpi_config:
+408e 20204098 branch mouse_seting_sensor_type 
+
+mouse_setting_dpi_4_level:
+408f 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4090 c38e0000 rtnbit1 mouse_enable_dpi_level_4 
+4091 6fe0c992 fetch 1 ,mem_mouse_dpi 
+4092 c1818000 rtnne mouse_dpi_level4 
+4093 70499200 jam mouse_dpi_level1 ,mem_mouse_dpi 
+4094 20600000 rtn 
+
+mouse_seting_dpi:
+4095 44e8401a bpatch patch1a_0 ,mem_patch1a 
+4096 2040408f call mouse_setting_dpi_4_level 
+4097 204048e1 call mouse_dpi_led_blink_delay 
+
+mouse_seting_sensor_type:
+4098 6fe0c927 fetch 1 ,mem_config_sensor_type 
+4099 c001c0bb beq p3212 ,mouse_seting_3212_dpi 
+409a c005c0cf beq ka8g2 ,mouse_seting_ka8g2_dpi 
+409b 6fe0c992 fetch 1 ,mem_mouse_dpi 
+409c c00040a2 beq mouse_dpi_level1 ,mouse_set_cpi0 
+409d c000c0a0 beq mouse_dpi_level2 ,mouse_set_cpi1 
+409e c00140a4 beq mouse_dpi_level3 ,mouse_set_cpi2 
+409f c001c0a6 beq mouse_dpi_level4 ,mouse_set_cpi3 
+
+mouse_set_cpi1:
+40a0 6848c9d1 fetcht 1 ,mem_320x_dpi_1 
+40a1 202040a8 branch mouse_dpi_store 
+
+mouse_set_cpi0:
+40a2 6848c9d0 fetcht 1 ,mem_320x_dpi_0 
+40a3 202040a8 branch mouse_dpi_store 
+
+mouse_set_cpi2:
+40a4 6848c9d2 fetcht 1 ,mem_320x_dpi_2 
+40a5 202040a8 branch mouse_dpi_store 
+
+mouse_set_cpi3:
+40a6 6848c9d3 fetcht 1 ,mem_320x_dpi_3 
+40a7 202040a8 branch mouse_dpi_store 
+
+mouse_dpi_store:
+40a8 6fe0c927 fetch 1 ,mem_config_sensor_type 
+40a9 c00240b7 beq p3065_xy ,mouse_3065xy_set_dpi 
+40aa c002c0b7 beq mx8650 ,mouse_3065xy_set_dpi 
+40ab c00440b9 beq ka8 ,mouse_ka8_set_dpi 
+40ac c003c0b9 beq p6520 ,mouse_ka8_set_dpi 
+40ad c00340b7 beq p8009 ,mouse_3065xy_set_dpi 
+
+mouse_dpi_write:
+40ae 6048c9dc storet 1 ,mem_mouse_cpi_count 
+40af 58000006 setarg mouse_dpi_address 
+40b0 20405b0d call twspi_read 
+40b1 1fe104f8 and pdata ,0xf8 ,temp 
+40b2 6fe0c9dc fetch 1 ,mem_mouse_cpi_count 
+40b3 9840fe00 iadd temp ,pdata 
+40b4 1fed7e00 lshift8 pdata ,pdata 
+40b5 1fe0fe06 add pdata ,mouse_dpi_address ,pdata 
+40b6 20205b0c branch twspi_write 
+
+mouse_3065xy_set_dpi:
+40b7 184085ff increase -1 ,temp 
+40b8 202040ae branch mouse_dpi_write 
+
+mouse_ka8_set_dpi:
+40b9 18408402 increase 2 ,temp 
+40ba 202040ae branch mouse_dpi_write 
+
+mouse_seting_3212_dpi:
+40bb 6fe0c992 fetch 1 ,mem_mouse_dpi 
+40bc c00040c2 beq mouse_dpi_level1 ,mouse_set_p3212_cpi0 
+40bd c000c0c0 beq mouse_dpi_level2 ,mouse_set_p3212_cpi1 
+40be c00140c4 beq mouse_dpi_level3 ,mouse_set_p3212_cpi2 
+40bf c001c0c6 beq mouse_dpi_level4 ,mouse_set_p3212_cpi3 
+
+mouse_set_p3212_cpi1:
+40c0 6fe0c9d5 fetch 1 ,mem_3212_dpi_1 
+40c1 202040c7 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi0:
+40c2 6fe0c9d4 fetch 1 ,mem_3212_dpi_0 
+40c3 202040c7 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi2:
+40c4 6fe0c9d6 fetch 1 ,mem_3212_dpi_2 
+40c5 202040c7 branch mouse_p3212_dpi 
+
+mouse_set_p3212_cpi3:
+40c6 6fe0c9d7 fetch 1 ,mem_3212_dpi_3 
+
+mouse_p3212_dpi:
+40c7 67e0c9dc store 1 ,mem_mouse_cpi_count 
+40c8 1fed7e00 lshift8 pdata ,pdata 
+40c9 1fe22200 copy pdata ,rega 
+40ca 1fe0fe0d add pdata ,mouse_p3212_dpi_xaddress ,pdata 
+40cb 20405b0c call twspi_write 
+40cc 1a227e00 copy rega ,pdata 
+40cd 1fe0fe0e add pdata ,mouse_p3212_dpi_yaddress ,pdata 
+40ce 20205b0c branch twspi_write 
+
+mouse_seting_ka8g2_dpi:
+40cf 6fe0c992 fetch 1 ,mem_mouse_dpi 
+40d0 c00040d6 beq mouse_dpi_level1 ,mouse_set_pka8g2_cpi0 
+40d1 c000c0d4 beq mouse_dpi_level2 ,mouse_set_pka8g2_cpi1 
+40d2 c00140d8 beq mouse_dpi_level3 ,mouse_set_pka8g2_cpi2 
+40d3 c001c0da beq mouse_dpi_level4 ,mouse_set_pka8g2_cpi3 
+
+mouse_set_pka8g2_cpi1:
+40d4 6fe0c9d9 fetch 1 ,mem_ka8g2_dpi_1 
+40d5 202040c7 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi0:
+40d6 6fe0c9d8 fetch 1 ,mem_ka8g2_dpi_0 
+40d7 202040c7 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi2:
+40d8 6fe0c9da fetch 1 ,mem_ka8g2_dpi_2 
+40d9 202040c7 branch mouse_p3212_dpi 
+
+mouse_set_pka8g2_cpi3:
+40da 6fe0c9db fetch 1 ,mem_ka8g2_dpi_3 
+40db 202040c7 branch mouse_p3212_dpi 
+
+mouse_key:
+40dc 20404115 call mouse_check_key_gpio 
+40dd 204040ed call mouse_ghost_key_check 
+40de 20403e5f call mouse_set_mult 
+40df 204040e8 call mouse_24g_key 
+40e0 1a227e00 copy rega ,pdata 
+40e1 6848c8d8 fetcht 1 ,mem_mouse_key_last 
+40e2 67e0c8d8 store 1 ,mem_mouse_key_last 
+40e3 67e0c8d0 store 1 ,mem_mouse_key 
+40e4 9842fe00 ixor temp ,pdata 
+40e5 1fe67c00 sub pdata ,0 ,null 
+40e6 20628000 rtn zero 
+40e7 20207e54 branch enable_user 
+
+mouse_24g_key:
+40e8 c6930000 rtnmark0 mark_24g 
+40e9 1a227e00 copy rega ,pdata 
+40ea 207a0000 rtn blank 
+40eb 67e0c8d0 store 1 ,mem_mouse_key 
+40ec 20207e54 branch enable_user 
+
+mouse_ghost_key_check:
+40ed 704b9800 jam 0 ,mem_mouse_matrix_key_cow_count 
+40ee 704b9900 jam 0 ,mem_mouse_matrix_key_row_count 
+40ef 704b9a00 jam 0 ,mem_mouse_ghost_flag 
+40f0 1fe20400 copy pdata ,temp 
+40f1 204040fd call mouse_ghost_key_check_l_bk 
+40f2 20404100 call mouse_ghost_key_check_m_fw 
+40f3 20404103 call mouse_ghost_key_check_bk_fw 
+40f4 20404106 call mouse_ghost_key_check_lmr 
+40f5 6fe0cb99 fetch 1 ,mem_mouse_matrix_key_row_count 
+40f6 207a0000 rtn blank 
+40f7 6fe0cb98 fetch 1 ,mem_mouse_matrix_key_cow_count 
+40f8 207a0000 rtn blank 
+40f9 704b9a01 jam 1 ,mem_mouse_ghost_flag 
+40fa 6fe0c8d8 fetch 1 ,mem_mouse_key_last 
+40fb 1fe22200 copy pdata ,rega 
+40fc 20600000 rtn 
+
+mouse_ghost_key_check_l_bk:
+40fd 18417e09 and temp ,mouse_l_bk_button ,pdata 
+40fe c004c10e beq mouse_l_bk_button ,mouse_matrix_cow_more_than_one_key 
+40ff 20600000 rtn 
+
+mouse_ghost_key_check_m_fw:
+4100 18417e14 and temp ,mouse_m_fw_button ,pdata 
+4101 c00a410e beq mouse_m_fw_button ,mouse_matrix_cow_more_than_one_key 
+4102 20600000 rtn 
+
+mouse_ghost_key_check_bk_fw:
+4103 18417e18 and temp ,mouse_bk_fw_button ,pdata 
+4104 c00c410c beq mouse_bk_fw_button ,mouse_matrix_row_more_than_one_key 
+4105 20600000 rtn 
+
+mouse_ghost_key_check_lmr:
+4106 18417e07 and temp ,mouse_lmr_button ,pdata 
+4107 c001c10c beq mouse_lr_button ,mouse_matrix_row_more_than_one_key 
+4108 c002c10c beq mouse_lm_button ,mouse_matrix_row_more_than_one_key 
+4109 c003410c beq mouse_rm_button ,mouse_matrix_row_more_than_one_key 
+410a c003c10c beq mouse_lmr_button ,mouse_matrix_row_more_than_one_key 
+410b 20600000 rtn 
+
+mouse_matrix_row_more_than_one_key:
+410c 704b9901 jam 1 ,mem_mouse_matrix_key_row_count 
+410d 20600000 rtn 
+
+mouse_matrix_cow_more_than_one_key:
+410e 704b9801 jam 1 ,mem_mouse_matrix_key_cow_count 
+410f 20600000 rtn 
+
+mouse_key_check_once:
+4110 20404121 call mouse_check_key_gpio_once 
+4111 20404115 call mouse_check_key_gpio 
+4112 58000000 setarg 0x00 
+4113 67e1cb8e store 3 ,mem_mouse_lkey_press_status 
+4114 20600000 rtn 
+
+mouse_check_key_gpio:
+4115 44e8c01a bpatch patch1a_1 ,mem_patch1a 
+4116 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+4117 245a4121 ncall mouse_check_key_gpio_once ,blank 
+4118 da200000 arg 0 ,rega 
+4119 20404124 call mouse_check_lkey_gpio 
+411a 2040412a call mouse_check_rkey_gpio 
+411b 20404130 call mouse_check_mkey_gpio 
+411c 20404136 call mouse_check_bkkey_gpio 
+411d 2040414f call mouse_check_fwkey_gpio 
+
+mouse_check_key_gpio_next:
+411e 2040416a call mouse_check_customerkey_gpio 
+411f 1a227e00 copy rega ,pdata 
+4120 20600000 rtn 
+
+mouse_check_key_gpio_once:
+4121 58030303 setarg 0x030303 
+4122 67e1cb8e store 3 ,mem_mouse_lkey_press_status 
+4123 20600000 rtn 
+
+mouse_check_lkey_gpio:
+4124 704b9600 jam mouse_l_key ,mem_mouse_key_temp 
+4125 6848c918 fetcht 1 ,mem_lbutton_gpio 
+4126 6fe0cb8e fetch 1 ,mem_mouse_lkey_press_status 
+4127 20404187 call mouse_check_key_connect_gnd 
+4128 67e0cb8e store 1 ,mem_mouse_lkey_press_status 
+4129 20600000 rtn 
+
+mouse_check_rkey_gpio:
+412a 704b9601 jam mouse_r_key ,mem_mouse_key_temp 
+412b 6848c919 fetcht 1 ,mem_rbutton_gpio 
+412c 6fe0cb8f fetch 1 ,mem_mouse_rkey_press_status 
+412d 20404187 call mouse_check_key_connect_gnd 
+412e 67e0cb8f store 1 ,mem_mouse_rkey_press_status 
+412f 20600000 rtn 
+
+mouse_check_mkey_gpio:
+4130 704b9602 jam mouse_m_key ,mem_mouse_key_temp 
+4131 6848c91a fetcht 1 ,mem_mbutton_gpio 
+4132 6fe0cb90 fetch 1 ,mem_mouse_mkey_press_status 
+4133 20404187 call mouse_check_key_connect_gnd 
+4134 67e0cb90 store 1 ,mem_mouse_mkey_press_status 
+4135 20600000 rtn 
+
+mouse_check_bkkey_gpio:
+4136 6fe0c90d fetch 1 ,mem_bk_button_gpio 
+4137 c17f8000 rtneq gpio_disable 
+4138 704b9603 jam mouse_bk_key ,mem_mouse_key_temp 
+4139 6fe0cb91 fetch 1 ,mem_mouse_bkkey_press_status 
+413a 1fe22600 copy pdata ,regc 
+413b 6848c90d fetcht 1 ,mem_bk_button_gpio 
+413c 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+413d c07fc14b beq gpio_disable ,mouse_3io6key_bk_check 
+
+mouse_check_bkkey_gpio_next:
+413e 20406059 call gpio_get_bit 
+413f 2020c147 branch mouse_check_bk_button_connect_gnd ,true 
+4140 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+4141 20406069 call gpio_out_active 
+4142 6848c90d fetcht 1 ,mem_bk_button_gpio 
+4143 6fe0cb91 fetch 1 ,mem_mouse_bkkey_press_status 
+4144 20404187 call mouse_check_key_connect_gnd 
+
+mouse_check_bkkey_gpio_end:
+4145 67e0cb91 store 1 ,mem_mouse_bkkey_press_status 
+4146 20204168 branch mouse_matrix_public_gpio_reset 
+
+mouse_check_bk_button_connect_gnd:
+4147 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+4148 6fe0cb91 fetch 1 ,mem_mouse_bkkey_press_status 
+4149 20404187 call mouse_check_key_connect_gnd 
+414a 20204145 branch mouse_check_bkkey_gpio_end 
+
+mouse_3io6key_bk_check:
+414b 20404195 call mouse_3io6key_check 
+414c 67e0cb91 store 1 ,mem_mouse_bkkey_press_status 
+414d 6848c90d fetcht 1 ,mem_bk_button_gpio 
+414e 20203f56 branch mouse_gpio_config_input_pu 
+
+mouse_check_fwkey_gpio:
+414f 6fe0c90e fetch 1 ,mem_fw_button_gpio 
+4150 c17f8000 rtneq gpio_disable 
+4151 704b9604 jam mouse_fw_key ,mem_mouse_key_temp 
+4152 6fe0cb92 fetch 1 ,mem_mouse_fwkey_press_status 
+4153 1fe22600 copy pdata ,regc 
+4154 6848c90e fetcht 1 ,mem_fw_button_gpio 
+4155 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+4156 c07fc164 beq gpio_disable ,mouse_3io6key_fw_check 
+
+mouse_check_fwkey_gpio_next:
+4157 20406059 call gpio_get_bit 
+4158 2020c160 branch mouse_check_fw_button_connect_gnd ,true 
+4159 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+415a 20406069 call gpio_out_active 
+415b 6848c90e fetcht 1 ,mem_fw_button_gpio 
+415c 6fe0cb92 fetch 1 ,mem_mouse_fwkey_press_status 
+415d 20404187 call mouse_check_key_connect_gnd 
+
+mouse_check_fwkey_gpio_end:
+415e 67e0cb92 store 1 ,mem_mouse_fwkey_press_status 
+415f 20204168 branch mouse_matrix_public_gpio_reset 
+
+mouse_check_fw_button_connect_gnd:
+4160 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+4161 6fe0cb92 fetch 1 ,mem_mouse_fwkey_press_status 
+4162 20404187 call mouse_check_key_connect_gnd 
+4163 2020415e branch mouse_check_fwkey_gpio_end 
+
+mouse_3io6key_fw_check:
+4164 20404195 call mouse_3io6key_check 
+4165 67e0cb92 store 1 ,mem_mouse_fwkey_press_status 
+4166 6848c90e fetcht 1 ,mem_fw_button_gpio 
+4167 20203f56 branch mouse_gpio_config_input_pu 
+
+mouse_matrix_public_gpio_reset:
+4168 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+4169 20203f56 branch mouse_gpio_config_input_pu 
+
+mouse_check_customerkey_gpio:
+416a 704b8b00 jam 0 ,mem_customer_key 
+416b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+416c c40a8000 rtnbit0 mouse_enable_keyboard 
+416d 6fe0c912 fetch 1 ,mem_customer_key_gpio 
+416e c17f8000 rtneq gpio_disable 
+416f 704b9607 jam mouse_customer_key ,mem_mouse_key_temp 
+4170 6848c912 fetcht 1 ,mem_customer_key_gpio 
+4171 6fe0cb95 fetch 1 ,mem_mouse_customerkey_press_status 
+4172 20404187 call mouse_check_key_connect_gnd 
+4173 67e0cb95 store 1 ,mem_mouse_customerkey_press_status 
+4174 1a227e00 copy rega ,pdata 
+4175 c283c17a bbit1 mouse_customer_key ,mouse_customerkey_press 
+4176 2040417d call mouse_customerkey_release 
+
+mouse_check_customerkey_gpio_exit:
+4177 6fe0cb8c fetch 1 ,mem_customer_data_trigger 
+4178 67e0cb8d store 1 ,mem_customer_data_trigger_last 
+4179 20600000 rtn 
+
+mouse_customerkey_press:
+417a 704b8c01 jam 1 ,mem_customer_data_trigger 
+417b 20404180 call mouse_customer_key_need_send 
+417c 20204177 branch mouse_check_customerkey_gpio_exit 
+
+mouse_customerkey_release:
+417d 704b8c00 jam 0 ,mem_customer_data_trigger 
+417e 6fe0cb8d fetch 1 ,mem_customer_data_trigger_last 
+417f 207a0000 rtn blank 
+
+mouse_customer_key_need_send:
+4180 704b8b01 jam 1 ,mem_customer_key 
+4181 20600000 rtn 
+
+mouse_check_matrix_button_connect_gnd:
+4182 20406059 call gpio_get_bit 
+4183 6848cb96 fetcht 1 ,mem_mouse_key_temp 
+4184 18420e00 copy temp ,queue 
+4185 2020c193 branch mouse_key_press ,true 
+4186 20204191 branch mouse_key_release 
+
+mouse_check_key_connect_gnd:
+4187 1fe3fe00 lshift pdata ,pdata 
+4188 1fe22400 copy pdata ,regb 
+4189 20406059 call gpio_get_bit 
+418a 7920a400 setflag true ,0 ,regb 
+418b 1a417e07 and regb ,0x07 ,pdata 
+418c 6848cb96 fetcht 1 ,mem_mouse_key_temp 
+418d 18420e00 copy temp ,queue 
+418e c003c193 beq 0x07 ,mouse_key_press 
+418f c0004191 beq 0x00 ,mouse_key_release 
+4190 20600000 rtn 
+
+mouse_key_release:
+4191 f93fa200 qset0 rega 
+4192 20600000 rtn 
+
+mouse_key_press:
+4193 f9202200 qset1 rega 
+4194 20600000 rtn 
+
+mouse_3io6key_check:
+4195 44e9401a bpatch patch1a_2 ,mem_patch1a 
+4196 1a627e00 copy regc ,pdata 
+4197 67e0cb97 store 1 ,mem_mouse_key_status 
+4198 1fe3fe00 lshift pdata ,pdata 
+4199 1fe22400 copy pdata ,regb 
+419a 18422600 copy temp ,regc 
+419b 20403f54 call mouse_gpio_config_input_pd 
+419c 1a620400 copy regc ,temp 
+419d 20406059 call gpio_get_bit 
+419e 7d20a400 nsetflag true ,0 ,regb 
+419f 204041a1 call mouse_check_press 
+41a0 2020418b branch mouse_check_key_connect_gnd + 4 
+
+mouse_check_press:
+41a1 6848cb97 fetcht 1 ,mem_mouse_key_status 
+41a2 18410401 and_into 0x01 ,temp 
+41a3 1a417e01 and regb ,0x01 ,pdata 
+41a4 98467c00 isub temp ,null 
+41a5 2422c32f nbranch mouse_current_mult_update ,zero 
+41a6 20600000 rtn 
+
+mouse_init_sunt:
+41a7 44e9c01a bpatch patch1a_3 ,mem_patch1a 
+41a8 20403f65 call mouse_sensor_spi_init 
+41a9 20758000 rtn wake 
+
+mouse_init_sensor_wakeup:
+41aa 20404236 call mouse_sensor_poweron 
+
+mouse_init_sensor:
+41ab 204041b5 call mouse_read_sensor_id 
+41ac c01841bc beq p32xx_id1 ,mouse_init_p32xx_id2_judge 
+41ad c018c217 beq p3065_id1 ,mouse_init_p3065 
+41ae c02c4220 beq pka8g2_id1 ,mouse_ka8g2_id2_judge 
+41af 204041b2 call mouse_twspi_reset 
+41b0 20001af4 nop 6900 
+41b1 202041ab branch mouse_init_sensor 
+
+mouse_twspi_reset:
+41b2 6fe0c91f fetch 1 ,mem_mouse_sensor_sclk_gpio 
+41b3 20405af7 call twspi_reset 
+41b4 20203f6a branch mouse_spid_init_pin 
+
+mouse_read_sensor_id:
+41b5 58000001 setarg pan_reg_pid_h 
+41b6 20405b0d call twspi_read 
+41b7 67e0c9c2 store 1 ,mem_sensor_id2 
+41b8 58000000 setarg pan_reg_pid_l 
+41b9 20405b0d call twspi_read 
+41ba 67e0c9c1 store 1 ,mem_sensor_id1 
+41bb 20600000 rtn 
+
+mouse_init_p32xx_id2_judge:
+41bc 6fe0c9c2 fetch 1 ,mem_sensor_id2 
+41bd c02d41c5 beq p_mx8650 ,mouse_mx8650_init_param 
+41be c06c41cb beq p8009_id2 ,mouse_8009_init_param 
+41bf c068c1da beq p3205_tj3t_id2 ,mouse_3205_3t_init_param 
+41c0 c06941e3 beq p3204_tj3l_id2 ,mouse_3204_3l_init_param 
+41c1 c00141ea beq p3212_id2 ,mouse_3212_init_param 
+41c2 c02a41ed beq pka8_id2 ,mouse_ka8_init_param_check 
+41c3 c0284214 beq p6520a_id2 ,mouse_p6520_init_param 
+41c4 202041ab branch mouse_init_sensor 
+
+mouse_mx8650_init_param:
+41c5 70492705 jam mx8650 ,mem_config_sensor_type 
+41c6 20404232 call mouse_sensor_reset 
+41c7 20407d12 call delay_10ms 
+41c8 da604a39 arg mem_sensor_8650_init ,regc 
+41c9 2040422b call mouse_sensor_wr_seq 
+41ca 2020408e branch mouse_dpi_config 
+
+mouse_8009_init_param:
+41cb 58000016 setarg 0x16 
+41cc 20405b0d call twspi_read 
+41cd 1fe67cbd sub pdata ,0xbd ,null 
+41ce 2422c1a7 nbranch mouse_init_sunt ,zero 
+41cf 58000019 setarg 0x19 
+41d0 20405b0d call twspi_read 
+41d1 1fe67c55 sub pdata ,0x55 ,null 
+41d2 2422c1a7 nbranch mouse_init_sunt ,zero 
+41d3 5800001b setarg 0x1b 
+41d4 20405b0d call twspi_read 
+41d5 1fe67c1d sub pdata ,0x1d ,null 
+41d6 2422c1a7 nbranch mouse_init_sunt ,zero 
+41d7 70492706 jam p8009 ,mem_config_sensor_type 
+41d8 da604a71 arg mem_sensor_8009_init ,regc 
+41d9 2020422b branch mouse_sensor_wr_seq 
+
+mouse_3205_3t_init_param:
+41da 70492700 jam p3205 ,mem_config_sensor_type 
+41db da6049f3 arg mem_sensor_3205_init ,regc 
+41dc 2040422b call mouse_sensor_wr_seq 
+41dd da6049fd arg mem_sensor_32xx_init ,regc 
+41de 2040422b call mouse_sensor_wr_seq 
+41df 58000943 setarg 0x0943 
+41e0 20405b0c call twspi_write 
+41e1 da604a17 arg mem_sensor_32xx_init_1 ,regc 
+41e2 2020422b branch mouse_sensor_wr_seq 
+
+mouse_3204_3l_init_param:
+41e3 70492702 jam p3204 ,mem_config_sensor_type 
+41e4 da6049e9 arg mem_sensor_3204_init ,regc 
+41e5 2040422b call mouse_sensor_wr_seq 
+41e6 da6049fd arg mem_sensor_32xx_init ,regc 
+41e7 2040422b call mouse_sensor_wr_seq 
+41e8 da604a17 arg mem_sensor_32xx_init_1 ,regc 
+41e9 2020422b branch mouse_sensor_wr_seq 
+
+mouse_3212_init_param:
+41ea 70492703 jam p3212 ,mem_config_sensor_type 
+41eb da6049df arg mem_sensor_3212_init ,regc 
+41ec 2020422b branch mouse_sensor_wr_seq 
+
+mouse_ka8_init_param_check:
+41ed 20404229 call mouse_sensor_disable_wp 
+41ee 58009a5b setarg 0x9a5b 
+41ef 20405b0c call twspi_write 
+41f0 5800000d setarg 0x0d 
+41f1 20405b0d call twspi_read 
+41f2 1fe67c12 sub pdata ,0x12 ,null 
+41f3 2022c201 branch mouse_ka8ul_init_param ,zero 
+41f4 1fe67c0a sub pdata ,0x0a ,null 
+41f5 2422c204 nbranch mouse_ka8hd_sensor_judge ,zero 
+41f6 5800000e setarg 0x0e 
+41f7 20405b0d call twspi_read 
+41f8 1fe67ce5 sub pdata ,0xe5 ,null 
+41f9 2422c1ab nbranch mouse_init_sensor ,zero 
+41fa 58000010 setarg 0x10 
+41fb 20405b0d call twspi_read 
+41fc 1fe67ca5 sub pdata ,0xa5 ,null 
+41fd 2022c201 branch mouse_ka8ul_init_param ,zero 
+41fe 20404211 call mouse_enable_ka8_sensor_wp 
+
+mouse_ka8_init_param:
+41ff 70492708 jam ka8 ,mem_config_sensor_type 
+4200 20600000 rtn 
+
+mouse_ka8ul_init_param:
+4201 70492709 jam ka8_ul ,mem_config_sensor_type 
+4202 da604a53 arg mem_sensor_ka8ul_init ,regc 
+4203 2020422b branch mouse_sensor_wr_seq 
+
+mouse_ka8hd_sensor_judge:
+4204 1fe67c10 sub pdata ,0x10 ,null 
+4205 2422c1ab nbranch mouse_init_sensor ,zero 
+4206 5800000e setarg 0x0e 
+4207 20405b0d call twspi_read 
+4208 1fe67cc5 sub pdata ,0xc5 ,null 
+4209 2422c1ab nbranch mouse_init_sensor ,zero 
+420a 58000010 setarg 0x10 
+420b 20405b0d call twspi_read 
+420c 1fe67c38 sub pdata ,0x38 ,null 
+420d 2422c1ab nbranch mouse_init_sensor ,zero 
+
+mouse_ka8hd_init_param:
+420e 20404211 call mouse_enable_ka8_sensor_wp 
+420f 7049270a jam ka8_hd ,mem_config_sensor_type 
+4210 20600000 rtn 
+
+mouse_enable_ka8_sensor_wp:
+4211 5800005b setarg 0x005b 
+4212 20405b0c call twspi_write 
+4213 20204227 branch mouse_sensor_enable_wp 
+
+mouse_p6520_init_param:
+4214 70492707 jam p6520 ,mem_config_sensor_type 
+4215 da604a97 arg mem_sensor_p6520_init ,regc 
+4216 2020422b branch mouse_sensor_wr_seq 
+
+mouse_init_p3065:
+4217 20404236 call mouse_sensor_poweron 
+4218 6fe0c9c2 fetch 1 ,mem_sensor_id2 
+4219 c038421e beq p3065_xy_id2 ,mouse_p3065xy_init_param 
+421a c000421c beq p3065_id2 ,mouse_p3065_init_param 
+421b 202041ab branch mouse_init_sensor 
+
+mouse_p3065_init_param:
+421c 70492701 jam p3065 ,mem_config_sensor_type 
+421d 20600000 rtn 
+
+mouse_p3065xy_init_param:
+421e 70492704 jam p3065_xy ,mem_config_sensor_type 
+421f 20600000 rtn 
+
+mouse_ka8g2_id2_judge:
+4220 20404236 call mouse_sensor_poweron 
+4221 6fe0c9c2 fetch 1 ,mem_sensor_id2 
+4222 c02cc224 beq pka8g2_id2 ,mouse_ka8g2_init_param 
+4223 202041bc branch mouse_init_p32xx_id2_judge 
+
+mouse_ka8g2_init_param:
+4224 7049270b jam ka8g2 ,mem_config_sensor_type 
+4225 da604a81 arg mem_sensor_ka8g2_init ,regc 
+4226 2020422b branch mouse_sensor_wr_seq 
+
+mouse_sensor_enable_wp:
+4227 58000009 setarg 0x0009 
+4228 20205b0c branch twspi_write 
+
+mouse_sensor_disable_wp:
+4229 58005a09 setarg 0x5a09 
+422a 20205b0c branch twspi_write 
+
+mouse_sensor_wr_seq:
+422b efe10013 ifetch 2 ,regc 
+422c d840ffff arg 0xffff ,temp 
+422d 98467c00 isub temp ,null 
+422e 20628000 rtn zero 
+422f 20405b0c call twspi_write 
+4230 1a60a602 increase 2 ,regc 
+4231 2020422b branch mouse_sensor_wr_seq 
+
+mouse_sensor_reset:
+4232 58008006 setarg 0x8006 
+4233 20405b0c call twspi_write 
+4234 20002ee0 nop 12000 
+4235 20600000 rtn 
+
+mouse_sensor_poweron:
+4236 44ea401a bpatch patch1a_4 ,mem_patch1a 
+4237 20403f65 call mouse_sensor_spi_init 
+4238 20404232 call mouse_sensor_reset 
+4239 da604aa3 arg mem_sensor_poweron_init ,regc 
+423a 2040422b call mouse_sensor_wr_seq 
+423b 2020408e branch mouse_dpi_config 
+
+mouse_sensor_powerdown:
+423c 204041a7 call mouse_init_sunt 
+423d 20403f65 call mouse_sensor_spi_init 
+423e 58000806 setarg 0x0806 
+423f 20205b0c branch twspi_write 
+
+mouse_check_sensor_data:
+4240 6fe0c4ac fetch 1 ,mem_spi_write_flash_sm 
+4241 c1800000 rtnne flash_sm_no_buys 
+4242 6fe0c927 fetch 1 ,mem_config_sensor_type 
+4243 c000424c beq p3205 ,mouse_p32xx_sensor_motion 
+4244 c000c24c beq p3065 ,mouse_p32xx_sensor_motion 
+4245 c004424c beq ka8 ,mouse_p32xx_sensor_motion 
+4246 c001424c beq p3204 ,mouse_p32xx_sensor_motion 
+4247 c001c270 beq p3212 ,mouse_p3212_sensor_motion 
+4248 c002424c beq p3065_xy ,mouse_p32xx_sensor_motion 
+4249 c0034295 beq p8009 ,mouse_p8009_sensor_motion 
+424a c005c28e beq ka8g2 ,mouse_pka8g2_sensor_motion 
+424b 2020424c branch mouse_p32xx_sensor_motion 
+
+mouse_p32xx_sensor_motion:
+424c 204042c4 call mouse_clear_sensor_data 
+424d 78547c00 disable user 
+424e 6fe0c911 fetch 1 ,mem_sensor_motion_gpio 
+424f c07fc253 beq gpio_disable ,mouse_p32xx_sensor_motion_2 
+4250 6848c911 fetcht 1 ,mem_sensor_motion_gpio 
+4251 20406059 call gpio_get_bit 
+4252 24608000 nrtn true 
+
+mouse_p32xx_sensor_motion_2:
+4253 58000000 setarg pan_reg_pid_l 
+4254 20405b0d call twspi_read 
+4255 c0984266 bne p32xx_id1 ,mouse_p3065_judge 
+
+mouse_p32xx_sensor_motion_1:
+4256 58000002 setarg pan_reg_motion_staus 
+4257 20405b0d call twspi_read 
+4258 c4038000 rtnbit0 7 
+4259 204042db call mouse_read_sensor_common 
+425a 6fe0c8d1 fetch 1 ,mem_mouse_x 
+425b 204042d3 call mouse_data_extsign 
+425c 67e148d1 store 2 ,mem_mouse_x 
+425d 6fe0c8d3 fetch 1 ,mem_mouse_y 
+425e 204042d3 call mouse_data_extsign 
+425f 67e148d3 store 2 ,mem_mouse_y 
+4260 6fe0c928 fetch 1 ,mem_config_sensor_angle 
+4261 c0004268 beq mouse_6clk_angle ,mouse_motion32xx_6clk_direction_selection 
+4262 c000c26a beq mouse_9clk_angle ,mouse_motion32xx_9clk_direction_selection 
+4263 c001426c beq mouse_12clk_angle ,mouse_motion32xx_12clk_direction_selection 
+4264 c001c26e beq mouse_3clk_angle ,mouse_motion32xx_3clk_direction_selection 
+4265 20600000 rtn 
+
+mouse_p3065_judge:
+4266 c018c256 beq p3065_id1 ,mouse_p32xx_sensor_motion_1 
+4267 202041b2 branch mouse_twspi_reset 
+
+mouse_motion32xx_6clk_direction_selection:
+4268 204042ad call mouse_motion_6clk_direction_dispose 
+4269 202042e2 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_9clk_direction_selection:
+426a 204042b5 call mouse_motion_9clk_direction_dispose 
+426b 202042e2 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_12clk_direction_selection:
+426c 204042b1 call mouse_motion_12clk_direction_dispose 
+426d 202042e2 branch mouse_sensor_sdio_low 
+
+mouse_motion32xx_3clk_direction_selection:
+426e 204042bd call mouse_motion_3clk_direction_dispose 
+426f 202042e2 branch mouse_sensor_sdio_low 
+
+mouse_p3212_sensor_motion:
+4270 204042c4 call mouse_clear_sensor_data 
+4271 6fe0c911 fetch 1 ,mem_sensor_motion_gpio 
+4272 c07fc276 beq gpio_disable ,mouse_p3212_sensor_motion_1 
+4273 6848c911 fetcht 1 ,mem_sensor_motion_gpio 
+4274 20406059 call gpio_get_bit 
+4275 24608000 nrtn true 
+
+mouse_p3212_sensor_motion_1:
+4276 58000000 setarg pan_reg_pid_l 
+4277 20405b0d call twspi_read 
+4278 c09841b2 bne p32xx_id1 ,mouse_twspi_reset 
+
+mouse_p3212_sensor_motion_2:
+4279 58000002 setarg pan_reg_motion_staus 
+427a 20405b0d call twspi_read 
+427b c4038000 rtnbit0 7 
+427c 204042db call mouse_read_sensor_common 
+427d 2040428c call mouse_read_3212sensor_xy_high 
+427e 67e0c8d7 store 1 ,mem_mouse_xy_h 
+427f 1ff1fe00 rshift4 pdata ,pdata 
+4280 204042d7 call mouse_data_extsign_bit3 
+4281 67e0c8d2 store 1 ,mem_mouse_x + 1 
+4282 6fe0c8d7 fetch 1 ,mem_mouse_xy_h 
+4283 1fe17e0f and pdata ,0x0f ,pdata 
+4284 204042d7 call mouse_data_extsign_bit3 
+4285 67e0c8d4 store 1 ,mem_mouse_y + 1 
+4286 6fe0c928 fetch 1 ,mem_config_sensor_angle 
+4287 c00042ad beq mouse_6clk_angle ,mouse_motion_6clk_direction_dispose 
+4288 c000c2b5 beq mouse_9clk_angle ,mouse_motion_9clk_direction_dispose 
+4289 c00142b1 beq mouse_12clk_angle ,mouse_motion_12clk_direction_dispose 
+428a c001c2bd beq mouse_3clk_angle ,mouse_motion_3clk_direction_dispose 
+428b 20600000 rtn 
+
+mouse_read_3212sensor_xy_high:
+428c 58000012 setarg 0x12 
+428d 20205b0d branch twspi_read 
+
+mouse_pka8g2_sensor_motion:
+428e 204042c4 call mouse_clear_sensor_data 
+428f 6fe0c911 fetch 1 ,mem_sensor_motion_gpio 
+4290 c07fc294 beq gpio_disable ,mouse_pka8g2_sensor_motion_1 
+4291 6848c911 fetcht 1 ,mem_sensor_motion_gpio 
+4292 20406059 call gpio_get_bit 
+4293 24608000 nrtn true 
+
+mouse_pka8g2_sensor_motion_1:
+4294 20204279 branch mouse_p3212_sensor_motion_2 
+
+mouse_p8009_sensor_motion:
+4295 204042c4 call mouse_clear_sensor_data 
+4296 78547c00 disable user 
+4297 58000002 setarg pan_reg_motion_staus 
+4298 20405b0d call twspi_read 
+4299 c4038000 rtnbit0 7 
+429a 58000008 setarg pan_reg_opration_state 
+429b 20405b0d call twspi_read 
+429c 203a4259 branch mouse_p32xx_sensor_motion_1 + 3 ,blank 
+429d 58000000 setarg 0 
+429e 67e348d1 store 6 ,mem_mouse_x 
+429f 20600000 rtn 
+
+mouse_sensor_set_angle:
+42a0 6fe0c924 fetch 1 ,mem_sensor_angle_default 
+42a1 67e0c928 store 1 ,mem_config_sensor_angle 
+42a2 6fe0c917 fetch 1 ,mem_select_sensor_angle_gpio 
+42a3 c17f8000 rtneq gpio_disable 
+42a4 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
+42a5 20403f56 call mouse_gpio_config_input_pu 
+42a6 6848c917 fetcht 1 ,mem_select_sensor_angle_gpio 
+42a7 20406059 call gpio_get_bit 
+42a8 2040c2aa call mouse_sensor_switch_angle ,true 
+42a9 20203f54 branch mouse_gpio_config_input_pd 
+
+mouse_sensor_switch_angle:
+42aa 6fe0c925 fetch 1 ,mem_sensor_angle_switch 
+42ab 67e0c928 store 1 ,mem_config_sensor_angle 
+42ac 20600000 rtn 
+
+mouse_motion_6clk_direction_dispose:
+42ad 6fe148d1 fetch 2 ,mem_mouse_x 
+42ae 1fe67e00 sub pdata ,0 ,pdata 
+42af 67e148d1 store 2 ,mem_mouse_x 
+42b0 20207e54 branch enable_user 
+
+mouse_motion_12clk_direction_dispose:
+42b1 6fe148d3 fetch 2 ,mem_mouse_y 
+42b2 1fe67e00 sub pdata ,0 ,pdata 
+42b3 67e148d3 store 2 ,mem_mouse_y 
+42b4 20207e54 branch enable_user 
+
+mouse_motion_9clk_direction_dispose:
+42b5 6fe148d3 fetch 2 ,mem_mouse_y 
+42b6 1fe67e00 sub pdata ,0 ,pdata 
+42b7 67e148d3 store 2 ,mem_mouse_y 
+42b8 6fe148d1 fetch 2 ,mem_mouse_x 
+42b9 1fe67e00 sub pdata ,0 ,pdata 
+42ba 67e148d1 store 2 ,mem_mouse_x 
+42bb 204042bf call mouse_sensor_data_swap_places 
+42bc 20207e54 branch enable_user 
+
+mouse_motion_3clk_direction_dispose:
+42bd 204042bf call mouse_sensor_data_swap_places 
+42be 20207e54 branch enable_user 
+
+mouse_sensor_data_swap_places:
+42bf 6fe148d3 fetch 2 ,mem_mouse_y 
+42c0 684948d1 fetcht 2 ,mem_mouse_x 
+42c1 67e148d1 store 2 ,mem_mouse_x 
+42c2 604948d3 storet 2 ,mem_mouse_y 
+42c3 20600000 rtn 
+
+mouse_clear_sensor_data:
+42c4 6fe0c9c8 fetch 1 ,mem_mouse_move_flag 
+42c5 205a42db call mouse_read_sensor_common ,blank 
+42c6 7049c801 jam 1 ,mem_mouse_move_flag 
+42c7 20600000 rtn 
+
+mouse_clear_sensor_data_by_reset:
+42c8 704aac01 jam 1 ,mem_mouse_clear_sensor_data_flag 
+42c9 20401b1a call le_set_config_more_data 
+
+mouse_init_sensor_reset:
+42ca 202041a7 branch mouse_init_sunt 
+
+mouse_data_xy_release:
+42cb 6fe0c911 fetch 1 ,mem_sensor_motion_gpio 
+42cc c1ff8000 rtnne gpio_disable 
+42cd 6fe0caae fetch 1 ,mem_mouse_long_mult_flag 
+42ce c1808000 rtnne 1 
+42cf 58000000 setarg 0 
+42d0 67e0caae store 1 ,mem_mouse_long_mult_flag 
+42d1 67e248d1 store 4 ,mem_mouse_x 
+42d2 202042ca branch mouse_init_sensor_reset 
+
+mouse_data_extsign:
+42d3 c4038000 rtnbit0 7 
+42d4 d840ff00 arg 0xff00 ,temp 
+42d5 9841fe00 ior temp ,pdata 
+42d6 20600000 rtn 
+
+mouse_data_extsign_bit3:
+42d7 c4018000 rtnbit0 3 
+42d8 d84000f0 arg 0xf0 ,temp 
+42d9 9841fe00 ior temp ,pdata 
+42da 20600000 rtn 
+
+mouse_read_sensor_common:
+42db dfe00003 arg pan_reg_delta_x ,pdata 
+42dc 20405b0d call twspi_read 
+42dd 67e148d1 store 2 ,mem_mouse_x 
+42de dfe00004 arg pan_reg_delta_y ,pdata 
+42df 20405b0d call twspi_read 
+42e0 67e148d3 store 2 ,mem_mouse_y 
+42e1 20600000 rtn 
+
+mouse_sensor_sdio_low:
+42e2 6848c920 fetcht 1 ,mem_mouse_sensor_sdio_gpio 
+42e3 20406059 call gpio_get_bit 
+42e4 20608000 rtn true 
+42e5 5800000a setarg 0x0a 
+42e6 20405b0d call twspi_read 
+42e7 200003e8 nop 1000 
+42e8 202042e2 branch mouse_sensor_sdio_low 
+
+mouse_set_sdio_high:
+42e9 58008100 setarg 0x8100 
+42ea 20205b0c branch twspi_write 
+
+mouse_buletooth_fast_conn_init:
+42eb 704ac1ff jam 0xff ,mem_mouse_bluetooth_fast_conn_flag 
+42ec 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+42ed c280c2ef bbit1 mode_4_mouse ,mouse_ble_fast_conn_init 
+42ee c28042f4 bbit1 mode_3_mouse ,mouse_bt_fast_conn_init 
+
+mouse_ble_fast_conn_init:
+42ef 70448234 jam 0x34 ,mem_xrecord_mode 
+42f0 580f0f0f setarg 0x0f0f0f 
+42f1 67e1c37a store 3 ,mem_le_lap 
+42f2 67e1c37d store 3 ,mem_le_lap + 3 
+42f3 20203d61 branch mouse_start_reconnect 
+
+mouse_bt_fast_conn_init:
+42f4 70448233 jam 0x33 ,mem_xrecord_mode 
+42f5 d8c04974 arg mem_mouse_compare_addr_ff ,contr 
+42f6 204045c8 call mouse_load_bt_device 
+42f7 20203d61 branch mouse_start_reconnect 
+
+mouse_buletooth_fast_conn_end:
+42f8 44eac01a bpatch patch1a_5 ,mem_patch1a 
+42f9 204045bd call mouse_select_reconn_device 
+42fa 20404314 call mouse_bluetooth_fast_conn_disable 
+42fb 6fe0c938 fetch 1 ,mem_device_flag 
+42fc c000c2ff beq mode_bt_device1 ,mouse_device1_check_auto_discover 
+42fd c0014301 beq mode_bt_device2 ,mouse_device2_check_auto_discover 
+42fe 20600000 rtn 
+
+mouse_device1_check_auto_discover:
+42ff 6fe3493a fetch 6 ,mem_device1_addr 
+4300 20204302 branch mouse_device_check_auto_discover 
+
+mouse_device2_check_auto_discover:
+4301 6fe34957 fetch 6 ,mem_device2_addr 
+
+mouse_device_check_auto_discover:
+4302 684b4974 fetcht 6 ,mem_mouse_compare_addr_ff 
+4303 98467c00 isub temp ,null 
+4304 2022c553 branch mouse_start_discovery ,zero 
+4305 20203d59 branch mouse_start_reconnect_device 
+
+mouse_bt_fast_conn_send_device_name:
+4306 20404314 call mouse_bluetooth_fast_conn_disable 
+4307 6fe0c5fc fetch 1 ,mem_local_name_length 
+4308 1fe0fe03 increase 3 ,pdata 
+4309 1fe22200 copy pdata ,rega 
+430a 20404dc0 call hid_malloc_tx_buff 
+430b 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+430c e7e10005 istore 2 ,contw 
+430d 580004a1 setarg 0x04a1 
+430e e7e10005 istore 2 ,contw 
+430f 6fe0c5fc fetch 1 ,mem_local_name_length 
+4310 1fe0fe01 increase 1 ,pdata 
+4311 1fe27200 copy pdata ,loopcnt 
+4312 d8c045fc arg mem_local_name_length ,contr 
+4313 20207d5f branch memcpy 
+
+mouse_bluetooth_fast_conn_disable:
+4314 704ac15a jam 0x5a ,mem_mouse_bluetooth_fast_conn_flag 
+4315 20600000 rtn 
+
+mouse_stop_bluetooth_mode:
+4316 6fe1478c fetch 2 ,mem_ui_state_map 
+4317 c283c322 bbit1 ui_state_bt_reconnect ,mouse_cancel_reconnect 
+4318 c284b20f bbit1 ui_state_ble_connected ,app_ble_disconnect 
+4319 c28031f6 bbit1 ui_state_bt_connected ,app_bt_disconnect 
+431a 20204576 branch mouse_stop_discovery 
+
+mouse_disconnect:
+431b 58000000 setarg 0 
+431c 67e14ab2 store 2 ,mem_mouse_no_data_timer 
+431d 6fe1478c fetch 2 ,mem_ui_state_map 
+431e c284b20f bbit1 ui_state_ble_connected ,app_ble_disconnect 
+431f 6fe1478c fetch 2 ,mem_ui_state_map 
+4320 c28031f6 bbit1 ui_state_bt_connected ,app_bt_disconnect 
+4321 20600000 rtn 
+
+mouse_cancel_reconnect:
+4322 204046de call mouse_bt_cannel_reconn_enable 
+4323 20207931 branch check_51cmd_bb_reconn_cancel 
+
+mouse_check_125hz:
+4324 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4325 c40d8000 rtnbit0 mouse_enable_bt_125hz 
+
+mouse_bluetooth_125hz:
+4326 2434432c nbranch mouse_bluetooth_125hz_clear ,user 
+4327 6fe0caad fetch 1 ,mem_bluetooth_125hz_cnt 
+4328 1fe0fe01 increase 1 ,pdata 
+4329 1fe17e0f and_into 0x0f ,pdata 
+432a 67e0caad store 1 ,mem_bluetooth_125hz_cnt 
+432b 247a0000 nrtn blank 
+
+mouse_bluetooth_125hz_clear:
+432c 704aad00 jam 0 ,mem_bluetooth_125hz_cnt 
+432d 78547c00 disable user 
+432e 20600000 rtn 
+
+mouse_current_mult_update:
+432f 6fe0c911 fetch 1 ,mem_sensor_motion_gpio 
+4330 c1ff8000 rtnne gpio_disable 
+4331 70417700 jam 0 ,mem_lpm_mult 
+4332 704aaf1e jam 30 ,mem_mouse_current_mult_timer 
+4333 20600000 rtn 
+
+mouse_priority_bb_event:
+4334 44eb401a bpatch patch1a_6 ,mem_patch1a 
+4335 1a627e00 copy regc ,pdata 
+4336 c00a4350 beq bt_evt_le_connected ,mouse_le_bb_event_connected 
+4337 c000c3fa beq bt_evt_bb_connected ,mouse_bb_event_connected 
+4338 c00ac35f beq bt_evt_le_disconnected ,mouse_le_bb_disconnected 
+4339 c00143fe beq bt_evt_bb_disconnected ,mouse_bb_disconnected 
+433a c002c421 beq bt_evt_setup_complete ,mouse_bt_event_setup_complete 
+433b c008454e beq bt_evt_button_long_pressed ,mouse_bb_event_discovery_btn 
+433c c0094424 beq bt_evt_hid_handshake ,mouse_bt_hid_handshake 
+433d c0033244 beq bt_evt_hid_connected ,app_hid_connected 
+433e c0024432 beq bt_evt_reconn_failed ,mouse_bb_event_reconn_failed 
+433f c009c432 beq bt_evt_reconn_page_timeout ,mouse_bb_event_reconn_timeout 
+4340 c00cb1ec beq bt_evt_switch_not_accept ,app_bt_role_switch 
+4341 c015c43d beq bt_evt_switch_success_master ,mouse_enter_sniff_check 
+4342 c010c443 beq bt_evt_sniff_not_accept ,mouse_sniff_not_accept 
+4343 c005444a beq bt_evt_pincode_req ,mouse_bb_event_pincode 
+4344 c01731da beq bt_evt_remote_unsniff ,app_start_auto_sniff 
+4345 c018c36a beq bt_evt_le_pairing_success ,mouse_le_pairing_success 
+4346 c014c36c beq bt_evt_le_enc_info ,mouse_le_enc_info 
+4347 c019436e beq bt_evt_le_start_enc ,mouse_le_ll_start_encryt 
+4348 c01f4379 beq bt_evt_le_pairing_complete ,mouse_le_pairing_complete 
+4349 c020437a beq bt_evt_le_parse_conn_papa_update_rsp ,mouse_le_conn_param_update_rsp_recieved 
+434a c013c44c beq bt_evt_virtual_cable_unplug ,mouse_irtual_cable_unplug 
+434b c01cc857 beq bt_evt_24g_pairing_complete ,mouse_24g_pairing_complete 
+434c c01d4833 beq bt_evt_24g_attempt_fail ,mouse_24g_attempt_fail 
+434d c01e484e beq bt_evt_24g_attempt_success ,mouse_24g_attempt_success 
+434e c0224390 beq bt_evt_le_parse_conn_param_accepted ,mouse_le_parse_conn_param_accepted 
+434f 20600000 rtn 
+
+mouse_le_bb_event_connected:
+4350 704aae00 jam 0 ,mem_mouse_long_mult_flag 
+4351 204042ca call mouse_init_sensor_reset 
+4352 704ac601 jam 1 ,mem_mouse_le_bb_connected_flag 
+4353 20404822 call mouse_24g_first_store_reconn_info 
+4354 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+4355 243a4357 nbranch mouse_le_bb_event_connected_next ,blank 
+4356 704ac814 jam 0x14 ,mem_mouse_send_secutiry_request_timer 
+
+mouse_le_bb_event_connected_next:
+4357 6fe14480 fetch app_disc_rsn_size ,mem_app_disconn_reason_flag 
+4358 793ffe00 set0 app_disc_by_button ,pdata 
+4359 67e14480 store app_disc_rsn_size ,mem_app_disconn_reason_flag 
+435a 704b7700 jam 0 ,mem_mouse_direct_timer 
+435b 6fe14af0 fetch 2 ,mem_le_battery_level_updata_timer_init 
+435c 67e14af2 store 2 ,mem_le_battery_level_updata_timer 
+435d 20404544 call mouse_no_data_timer_init 
+435e 20204576 branch mouse_stop_discovery 
+
+mouse_le_bb_disconnected:
+435f 704ac600 jam 0 ,mem_mouse_le_bb_connected_flag 
+4360 58000006 setarg le_interval_7_5ms 
+4361 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4362 c28dc364 bbit1 mouse_enable_bt_125hz ,mouse_le_bb_disconnected_next 
+4363 58000007 setarg le_interval_8_75ms 
+
+mouse_le_bb_disconnected_next:
+4364 67e14372 store 2 ,mem_le_interval_min 
+4365 67e14374 store 2 ,mem_le_interval_min + 2 
+4366 704af400 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+4367 704aac00 jam 0 ,mem_mouse_clear_sensor_data_flag 
+4368 20401b1c call le_clr_config_more_data 
+4369 202043fe branch mouse_bb_disconnected 
+
+mouse_le_pairing_success:
+436a d8e00002 arg ll_pairing_success_flag ,queue 
+436b 20204375 branch mouse_le_enable_connect_flag 
+
+mouse_le_enc_info:
+
+mouse_updata_le_param:
+436c 70095b12 jam bt_cmd_le_update_conn ,mem_fifo_temp 
+436d 2020787a branch ui_ipc_send_cmd 
+
+mouse_le_ll_start_encryt:
+436e 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+436f c000c371 beq 1 ,mouse_le_ll_reconn_start_encryt 
+4370 20204373 branch mouse_le_ll_enable_start_enc_flag 
+
+mouse_le_ll_reconn_start_encryt:
+4371 2040436c call mouse_updata_le_param 
+4372 704b7614 jam 20 ,mem_le_start_encrypt_timer 
+
+mouse_le_ll_enable_start_enc_flag:
+4373 d8e00001 arg ll_start_enc_flag ,queue 
+4374 20204375 branch mouse_le_enable_connect_flag 
+
+mouse_le_enable_connect_flag:
+4375 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+4376 f9207e00 qset1 pdata 
+4377 67e0cb75 store 1 ,mem_le_connect_status_flag 
+4378 20600000 rtn 
+
+mouse_le_pairing_complete:
+4379 2020321d branch app_ble_store_reconn_info 
+
+mouse_le_conn_param_update_rsp_recieved:
+437a 6fe143db fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+437b c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
+437c 6fe08289 fetch 1 ,mem_le_tsniff 
+437d 1feb7e00 rshift2 pdata ,pdata 
+437e 1fe67c0c sub pdata ,le_interval_15ms ,null 
+437f 20610000 rtn positive 
+4380 58000009 setarg le_interval_11_25ms 
+4381 67e14372 store 2 ,mem_le_interval_min 
+4382 67e14374 store 2 ,mem_le_interval_min + 2 
+4383 2040436c call mouse_updata_le_param 
+
+mouse_le_conn_param_lpm_disable:
+4384 704af401 jam le_lpm_disable ,mem_mouse_le_conn_param_reject 
+4385 20600000 rtn 
+
+mouse_le_conn_param_lpm_enable:
+4386 704af400 jam le_lpm_enable ,mem_mouse_le_conn_param_reject 
+4387 20600000 rtn 
+
+mouse_le_bb_event_connect_complete:
+4388 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+4389 247a0000 nrtn blank 
+438a 6fe0c437 fetch 1 ,mem_le_att_handle 
+438b 1fe67e22 sub pdata ,34 ,pdata 
+438c 24628000 nrtn zero 
+438d 704b7600 jam 0 ,mem_le_start_encrypt_timer 
+
+mouse_le_write_enable:
+438e d8e00000 arg write_req_enable_flag ,queue 
+438f 20204375 branch mouse_le_enable_connect_flag 
+
+mouse_le_parse_conn_param_accepted:
+4390 6fe082c1 fetch 1 ,mem_le_new_conninterval 
+4391 1fe67c0c sub pdata ,le_interval_15ms ,null 
+4392 24214384 nbranch mouse_le_conn_param_lpm_disable ,positive 
+4393 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+4394 6848cb8a fetcht 1 ,mem_lpm_mult_init 
+4395 98467c00 isub temp ,null 
+4396 2021439a branch mouse_le_lpm_mult_reinit ,positive 
+4397 6fe082c3 fetch 1 ,mem_le_new_connslavelatency 
+4398 67e0c177 store 1 ,mem_lpm_mult 
+4399 20204386 branch mouse_le_conn_param_lpm_enable 
+
+mouse_le_lpm_mult_reinit:
+439a 6fe0cb8a fetch 1 ,mem_lpm_mult_init 
+439b 67e0c177 store 1 ,mem_lpm_mult 
+439c 20204386 branch mouse_le_conn_param_lpm_enable 
+
+mouse_le_clean_connect_flag:
+439d 704b7500 jam 0 ,mem_le_connect_status_flag 
+439e 20600000 rtn 
+
+mouse_le:
+439f 44ebc01a bpatch patch1a_7 ,mem_patch1a 
+43a0 20401b77 call le_fifo_check_nearly_full 
+43a1 247a0000 nrtn blank 
+43a2 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+43a3 c07fc3a7 beq 0xff ,mouse_le_next 
+43a4 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+43a5 1fe17e03 and pdata ,0x03 ,pdata 
+43a6 c1818000 rtnne 0x03 
+
+mouse_le_next:
+43a7 6fe0caac fetch 1 ,mem_mouse_clear_sensor_data_flag 
+43a8 205a42c8 call mouse_clear_sensor_data_by_reset ,blank 
+43a9 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+43aa c280c3d1 bbit1 mouse_24g_pairing_flag ,mouse_le_send_empty_packet 
+43ab c28043d1 bbit1 mouse_select_device_flag ,mouse_le_send_empty_packet 
+43ac c282c3d1 bbit1 mouse_bt_discovery_button_down_flag ,mouse_le_send_empty_packet 
+43ad c28343d1 bbit1 mouse_bt_discovery_button_long_down_flag ,mouse_le_send_empty_packet 
+43ae 20403f70 call mouse_motion 
+43af 20404324 call mouse_check_125hz 
+43b0 24740000 nrtn user 
+43b1 2040432f call mouse_current_mult_update 
+43b2 204042cb call mouse_data_xy_release 
+43b3 2040401d call mouse_wheel_trigger 
+43b4 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+43b5 c30ac3b8 bbit0 mouse_enable_keyboard ,mouse_le_send_mouse_data 
+43b6 6fe0cb8b fetch 1 ,mem_customer_key 
+43b7 c000c3b9 beq 1 ,mouse_le_send_keyboard_package_data 
+
+mouse_le_send_mouse_data:
+43b8 202043d3 branch mouse_fill_mouse_data_le 
+
+mouse_le_send_keyboard_package_data:
+43b9 6fe0cb8c fetch 1 ,mem_customer_data_trigger 
+43ba 203a43c3 branch mouse_le_release_keyboard_data ,blank 
+43bb 6fe44bcd fetch 8 ,mem_customer_key_press + 1 
+
+mouse_fill_keyboard_package_data_le:
+43bc 67e4095c store 8 ,mem_pdatatemp 
+43bd 6fe0cbcc fetch 1 ,mem_customer_key_press 
+43be c001c3c5 beq kb_multikey_report_id ,mouse_fill_multimedia_key_data_le 
+43bf c00143c8 beq kb_system_conctrl_report_id ,mouse_fill_systemctrl_key_data_le 
+43c0 704ae608 jam 8 ,mem_le_data_len 
+43c1 68494ae7 fetcht 2 ,mem_le_keyboard_handle 
+43c2 202043d8 branch mouse_fill_data_le 
+
+mouse_le_release_keyboard_data:
+43c3 6fe44bd6 fetch 8 ,mem_customer_key_release + 1 
+43c4 202043bc branch mouse_fill_keyboard_package_data_le 
+
+mouse_fill_multimedia_key_data_le:
+43c5 704ae603 jam 3 ,mem_le_data_len 
+43c6 68494ae9 fetcht 2 ,mem_le_multimedia_handle 
+43c7 202043d8 branch mouse_fill_data_le 
+
+mouse_fill_systemctrl_key_data_le:
+43c8 704ae602 jam 2 ,mem_le_data_len 
+43c9 68494aeb fetcht 2 ,mem_le_systemctrl_handle 
+43ca 202043d8 branch mouse_fill_data_le 
+
+mouse_fill_battery_level_le:
+43cb da200001 arg 1 ,rega 
+43cc 68494aed fetcht 2 ,mem_le_battery_level_handle 
+43cd 20401eb3 call le_att_malloc_tx_notify 
+43ce 6fe0caef fetch 1 ,mem_le_battery_level_percentage 
+43cf e7e08005 istore 1 ,contw 
+43d0 20600000 rtn 
+
+mouse_le_send_empty_packet:
+43d1 58000000 setarg 0 
+43d2 67e3c8d0 store 7 ,mem_mouse_key 
+
+mouse_fill_mouse_data_le:
+43d3 704ae607 jam 7 ,mem_le_data_len 
+43d4 6fe3c8d0 fetch 7 ,mem_mouse_key 
+43d5 67e3895c store 7 ,mem_pdatatemp 
+43d6 68494357 fetcht 2 ,mem_le_notify_handle 
+43d7 202043d8 branch mouse_fill_data_le 
+
+mouse_fill_data_le:
+43d8 6fe0cae6 fetch 1 ,mem_le_data_len 
+43d9 1fe22200 copy pdata ,rega 
+43da 20401eb3 call le_att_malloc_tx_notify 
+43db 6848cae6 fetcht 1 ,mem_le_data_len 
+43dc 18427200 copy temp ,loopcnt 
+43dd d8c0095c arg mem_pdatatemp ,contr 
+43de 20207d5f branch memcpy 
+
+mouse_check_51cmd_adv:
+43df 704ac700 jam 0 ,mem_mouse_le_reconnect_flag 
+43e0 6fe1cacc fetch 3 ,mem_le_adv_ind 
+43e1 67e1c3ec store 3 ,mem_le_adv_data + 4 
+43e2 204043e8 call mouse_le_check_adv_flag 
+43e3 58000005 setarg adv_flag_bredr_not_supported | adv_flag_limited_discoverable 
+43e4 e7e08006 istore 1 ,contr 
+43e5 d8c04ad2 arg mem_le_adv_swift_pair ,contr 
+43e6 204043ef call mouse_le_adv_data_update 
+43e7 202078ee branch check_51cmd_adv 
+
+mouse_le_check_adv_flag:
+43e8 da2043e8 arg mem_le_adv_data ,rega 
+
+mouse_le_check_adv_flag_loop:
+43e9 efe08011 ifetch 1 ,rega 
+43ea 207a0000 rtn blank 
+43eb 98c0a200 iadd contr ,rega 
+43ec efe08006 ifetch 1 ,contr 
+43ed c1008000 rtneq 0x01 
+43ee 202043e9 branch mouse_le_check_adv_flag_loop 
+
+mouse_le_adv_data_update:
+43ef d8a043f3 arg mem_le_adv_data + 11 ,contw 
+43f0 df200013 arg 19 ,loopcnt 
+43f1 20407d5f call memcpy 
+43f2 20201abe branch le_modified_name_adv 
+
+mouse_bt_sniff_param_interval_setup:
+43f3 5800000c setarg classic_interval_7_5ms 
+43f4 67e14455 store 2 ,mem_sniff_param_interval 
+43f5 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+43f6 c38d8000 rtnbit1 mouse_enable_bt_125hz 
+43f7 5800000e setarg classic_interval_8_75ms 
+43f8 67e14455 store 2 ,mem_sniff_param_interval 
+43f9 20600000 rtn 
+
+mouse_bb_event_connected:
+43fa 704aae00 jam 0 ,mem_mouse_long_mult_flag 
+43fb 204042ca call mouse_init_sensor_reset 
+43fc 20404822 call mouse_24g_first_store_reconn_info 
+43fd 20204576 branch mouse_stop_discovery 
+
+mouse_bb_disconnected:
+43fe 704b7f00 jam 0 ,mem_mouse_enter_sniff_count 
+43ff 704b8800 jam 0 ,mem_mouse_bt_send_first_package_flag 
+4400 204043f3 call mouse_bt_sniff_param_interval_setup 
+4401 20404409 call mouse_bb_discon_clear_stack 
+4402 6fe1447e fetch app_disc_rsn_size ,mem_app_disconn_reason 
+4403 c283c410 bbit1 app_disc_ble ,mouse4_0_event_bb_disconn 
+4404 c28031c6 bbit1 app_disc_by_button ,app_disconn_reason_clear 
+4405 c280c414 bbit1 app_disc_after_pairing ,mouse_event_light_state_pairing 
+4406 c2814417 bbit1 app_disc_after_reconn ,mouse_event_light_state_hibernate 
+4407 c281c417 bbit1 app_disc_after_sniff ,mouse_event_light_state_hibernate 
+4408 20204553 branch mouse_start_discovery 
+
+mouse_bb_discon_clear_stack:
+4409 58000000 setarg 0 
+440a 67e448d9 store 8 ,mem_wheel_tb_old_pinlevel 
+440b e7e20005 istore 4 ,contw 
+440c 7049c800 jam 0 ,mem_mouse_move_flag 
+440d 70445400 jam app_handshake_null ,mem_app_handshake_flag 
+440e 70432600 jam 0 ,mem_ltk_exists 
+440f 20600000 rtn 
+
+mouse4_0_event_bb_disconn:
+4410 2040439d call mouse_le_clean_connect_flag 
+4411 6fe1447e fetch app_disc_rsn_size ,mem_app_disconn_reason 
+4412 c28031c6 bbit1 app_disc_by_button ,app_disconn_reason_clear 
+4413 20203e20 branch mouse_app_enter_hibernate 
+
+mouse_event_light_state_pairing:
+4414 c282c417 bbit1 app_disc_after_handshake ,mouse_event_light_state_hibernate 
+4415 c281c417 bbit1 app_disc_after_sniff ,mouse_event_light_state_hibernate 
+4416 20204553 branch mouse_start_discovery 
+
+mouse_event_light_state_hibernate:
+4417 6fe1478c fetch 2 ,mem_ui_state_map 
+4418 c2864553 bbit1 ui_state_btn_down ,mouse_start_discovery 
+4419 204031c6 call app_disconn_reason_clear 
+441a 20404110 call mouse_key_check_once 
+441b 204044dc call mouse_commbination_key_process 
+441c 6fe0cb9f fetch 1 ,mem_commbination_key_statue 
+441d c000be1d beq commbination_key_state_down ,mouse_delay_enter_hibernata 
+441e 6fe0cac4 fetch 1 ,mem_mouse_bluetooth_reconnect_timeout 
+441f 247a0000 nrtn blank 
+4420 20203e20 branch mouse_app_enter_hibernate 
+
+mouse_bt_event_setup_complete:
+4421 20600000 rtn 
+
+mouse_bt_send_first_package_timer_init:
+4422 704b8704 jam 4 ,mem_mouse_bt_send_first_package_timer 
+4423 20600000 rtn 
+
+mouse_bt_hid_handshake:
+4424 70445401 jam app_handshake_done ,mem_app_handshake_flag 
+4425 20403223 call app_lpm_mult_enable 
+4426 2040321f call app_bt_store_reconn_info 
+4427 58000000 setarg 0 
+4428 67e14788 store 2 ,mem_discovery_timeout_timer_count 
+4429 67e0c78a store 1 ,mem_hid_handshake_timer_count 
+442a 20404422 call mouse_bt_send_first_package_timer_init 
+442b 2020321b branch app_bt_enter_sniff 
+
+mouse_bt_hid_handshake_boot_check:
+442c 704b8000 jam 0 ,mem_mouse_bt_boot_mode 
+442d 6fe0c5f5 fetch 1 ,mem_l2cap_rcv_hidtype 
+442e 2feffe00 isolate1 0 ,pdata 
+442f 20608000 rtn true 
+4430 704b8001 jam 1 ,mem_mouse_bt_boot_mode 
+4431 20600000 rtn 
+
+mouse_bb_event_reconn_timeout:
+
+mouse_bb_event_reconn_failed:
+4432 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+4433 c07fc2f8 beq 0xff ,mouse_buletooth_fast_conn_end 
+4434 6fe1478c fetch 2 ,mem_ui_state_map 
+4435 c3860000 rtnbit1 ui_state_btn_down 
+4436 c3830000 rtnbit1 ui_state_bt_discovery 
+4437 c3858000 rtnbit1 ui_state_ble_adv 
+4438 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4439 c3828000 rtnbit1 mouse_bt_discovery_button_down_flag 
+443a c299c553 bbit1 mouse_enable_bt_reconnect_timeout_enter_discovery ,mouse_start_discovery 
+443b c297c81f bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_bb_event_reconn_timeout 
+443c 20203e20 branch mouse_app_enter_hibernate 
+
+mouse_enter_sniff_check:
+443d 6fe0cb7f fetch 1 ,mem_mouse_enter_sniff_count 
+443e c1810000 rtnne 2 
+443f 704b7f00 jam 0 ,mem_mouse_enter_sniff_count 
+4440 204043f3 call mouse_bt_sniff_param_interval_setup 
+4441 20404422 call mouse_bt_send_first_package_timer_init 
+4442 2020321b branch app_bt_enter_sniff 
+
+mouse_sniff_not_accept:
+4443 6fe0cb7f fetch 1 ,mem_mouse_enter_sniff_count 
+4444 c1010000 rtneq 2 
+4445 1fe0fe01 increase 1 ,pdata 
+4446 67e0cb7f store 1 ,mem_mouse_enter_sniff_count 
+4447 70445512 jam 0x12 ,mem_sniff_param_interval 
+4448 20404422 call mouse_bt_send_first_package_timer_init 
+4449 2020321b branch app_bt_enter_sniff 
+
+mouse_bb_event_pincode:
+444a 20405af1 call pincode_reinit 
+444b 202031ea branch app_bt_set_pincode 
+
+mouse_irtual_cable_unplug:
+444c 58000001 setarg 0x01 
+444d 67e30041 store 6 ,mem_plap 
+444e 7000e833 jam rec_3_mode ,mem_record_bt_mode 
+444f 2020458d branch mouse_unplug_clean_bdaddr 
+
+mouse_irtual_cable_unplug1:
+4450 5fffffff setarg -1 
+4451 67e30041 store 6 ,mem_plap 
+4452 7000e833 jam rec_3_mode ,mem_record_bt_mode 
+4453 704ac1ff jam 0xff ,mem_mouse_bluetooth_fast_conn_flag 
+4454 204045a2 call mouse_before_store_reconn_info 
+4455 704939ff jam 0xff ,mem_device1_type 
+4456 202045ee branch mouse_store_device_info_delay 
+
+mouse_bt:
+4457 44ec401b bpatch patch1b_0 ,mem_patch1b 
+4458 20770000 rtn attempt 
+4459 6fe0c454 fetch 1 ,mem_app_handshake_flag 
+445a 207a0000 rtn blank 
+445b 204052f4 call l2cap_malloc_is_fifo_nearly_full 
+445c 247a0000 nrtn blank 
+445d 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+445e c07fc306 beq 0xff ,mouse_bt_fast_conn_send_device_name 
+445f 6fe0caac fetch 1 ,mem_mouse_clear_sensor_data_flag 
+4460 205a42c8 call mouse_clear_sensor_data_by_reset ,blank 
+4461 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4462 c280c48e bbit1 mouse_24g_pairing_flag ,mouse_send_empty_data 
+4463 c280448e bbit1 mouse_select_device_flag ,mouse_send_empty_data 
+4464 c282c48e bbit1 mouse_bt_discovery_button_down_flag ,mouse_send_empty_data 
+4465 c283448e bbit1 mouse_bt_discovery_button_long_down_flag ,mouse_send_empty_data 
+4466 20403f70 call mouse_motion 
+4467 20404324 call mouse_check_125hz 
+4468 24740000 nrtn user 
+4469 2040432f call mouse_current_mult_update 
+446a 204042cb call mouse_data_xy_release 
+446b 2040401d call mouse_wheel_trigger 
+446c 6fe0cb80 fetch 1 ,mem_mouse_bt_boot_mode 
+446d c000c47d beq 1 ,mouse_send_data_boot_mode 
+446e 6fe0cb88 fetch 1 ,mem_mouse_bt_send_first_package_flag 
+446f 207a0000 rtn blank 
+4470 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4471 c30ac474 bbit0 mouse_enable_keyboard ,mouse_send_data 
+4472 6fe0cb8b fetch 1 ,mem_customer_key 
+4473 c000c491 beq 1 ,mouse_bt_send_keyboard_packet 
+
+mouse_send_data:
+4474 da200009 arg 9 ,rega 
+4475 20404dc0 call hid_malloc_tx_buff 
+4476 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+4477 e7e10005 istore 2 ,contw 
+4478 580002a1 setarg 0x02a1 
+4479 e7e10005 istore 2 ,contw 
+447a 6fe3c8d0 fetch 7 ,mem_mouse_key 
+447b e7e38005 istore 7 ,contw 
+447c 20600000 rtn 
+
+mouse_send_data_boot_mode:
+447d 6fe0c8d0 fetch 1 ,mem_mouse_key 
+447e 67e0cb81 store 1 ,mem_mouse_bt_boot_data 
+447f 6fe0c8d1 fetch 1 ,mem_mouse_x 
+4480 e7e08005 istore 1 ,contw 
+4481 6fe0c8d3 fetch 1 ,mem_mouse_y 
+4482 e7e08005 istore 1 ,contw 
+4483 6fe148d5 fetch 2 ,mem_mouse_z 
+4484 e7e10005 istore 2 ,contw 
+4485 da200007 arg 7 ,rega 
+4486 20404dc0 call hid_malloc_tx_buff 
+4487 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+4488 e7e10005 istore 2 ,contw 
+4489 580002a1 setarg 0x02a1 
+448a e7e10005 istore 2 ,contw 
+448b 6fe2cb81 fetch 5 ,mem_mouse_bt_boot_data 
+448c e7e28005 istore 5 ,contw 
+448d 20600000 rtn 
+
+mouse_send_empty_data:
+448e 58000000 setarg 0 
+448f 67e3c8d0 store 7 ,mem_mouse_key 
+4490 20204474 branch mouse_send_data 
+
+mouse_bt_send_keyboard_packet:
+4491 6fe0cb8c fetch 1 ,mem_customer_data_trigger 
+4492 203a44b3 branch mouse_bt_release_keyboard_data ,blank 
+4493 6fe44bcd fetch 8 ,mem_customer_key_press + 1 
+
+mouse_bt_send_keyboard_data:
+4494 67e4095c store 8 ,mem_pdatatemp 
+4495 6fe0cbcc fetch 1 ,mem_customer_key_press 
+4496 c001c4a1 beq kb_multikey_report_id ,mouse_bt_send_multimedia_key_data 
+4497 c00144aa beq kb_system_conctrl_report_id ,mouse_bt_send_systemctrl_key_data 
+4498 da20000a arg 10 ,rega 
+4499 20404dc0 call hid_malloc_tx_buff 
+449a 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+449b e7e10005 istore 2 ,contw 
+449c 580001a1 setarg 0x01a1 
+449d e7e10005 istore 2 ,contw 
+449e 6fe4095c fetch 8 ,mem_pdatatemp 
+449f e7e40005 istore 8 ,contw 
+44a0 20600000 rtn 
+
+mouse_bt_send_multimedia_key_data:
+44a1 da200004 arg 4 ,rega 
+44a2 20404dc0 call hid_malloc_tx_buff 
+44a3 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+44a4 e7e10005 istore 2 ,contw 
+44a5 580003a1 setarg 0x03a1 
+44a6 e7e10005 istore 2 ,contw 
+44a7 6fe1095c fetch 2 ,mem_pdatatemp 
+44a8 e7e10005 istore 2 ,contw 
+44a9 20600000 rtn 
+
+mouse_bt_send_systemctrl_key_data:
+44aa da200003 arg 3 ,rega 
+44ab 20404dc0 call hid_malloc_tx_buff 
+44ac 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+44ad e7e10005 istore 2 ,contw 
+44ae 580004a1 setarg 0x04a1 
+44af e7e10005 istore 2 ,contw 
+44b0 6fe0895c fetch 1 ,mem_pdatatemp 
+44b1 e7e08005 istore 1 ,contw 
+44b2 20600000 rtn 
+
+mouse_bt_release_keyboard_data:
+44b3 6fe44bd6 fetch 8 ,mem_customer_key_release + 1 
+44b4 20204494 branch mouse_bt_send_keyboard_data 
+
+mouse_bb_event_timer:
+44b5 44ecc01b bpatch patch1b_1 ,mem_patch1b 
+44b6 20403e9b call mouse_adc_read 
+44b7 20404956 call mouse_low_voltage_led_timer 
+44b8 2040232b call g24_pair_timeout_timer 
+44b9 20402556 call g24_reconn_timeout_timer 
+44ba 204047cd call mouse_24g_long_sleep_param_update_timer 
+44bb 204048be call mouse_device_poweron_timer 
+44bc 204048ef call mouse_dpi_led_blink_delay_timer 
+44bd 2040407c call mouse_dpi_key_check_long_press 
+44be 204044cc call mouse_bt_discovery_check 
+44bf 204044dc call mouse_commbination_key_process 
+44c0 204044ff call mouse_check_discovery_timeout_timer 
+44c1 20404504 call mouse_check_direct_timeout_timer 
+44c2 20404512 call mouse_le_enable_att_list_timer 
+44c3 2040451f call mouse_le_battery_updata_timer 
+44c4 20404515 call mouse_le_send_smp_security_request_timer 
+44c5 2040452a call mouse_check_hid_handshake_timer 
+44c6 2040452d call mouse_bt_check_sniff_req_timeout_timer 
+44c7 20404532 call mouse_check_reconnect_delay_long_sleep 
+44c8 20404535 call mouse_current_mult_update_timer 
+44c9 20404022 call mouse_wheel_trigger_timer 
+44ca 20404547 call mouse_store_information_delay_timer 
+44cb 2020453c branch mouse_check_no_data_timeout_timer 
+
+mouse_bt_discovery_check:
+44cc 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+44cd c29bc4cf bbit1 mouse_enable_pb_button_long_press_disconvery ,mouse_bt_discovery_by_pb_button 
+44ce 20600000 rtn 
+
+mouse_bt_discovery_by_pb_button:
+44cf 6fe0cb9e fetch 1 ,mem_select_device_button_statue 
+44d0 c1808000 rtnne pb_button_state_down 
+44d1 da604b9b arg mem_bt_discovery_count ,regc 
+44d2 da4044d4 arg mouse_long_button_bt_discovery ,regb 
+44d3 2020318a branch timer_single_step 
+
+mouse_long_button_bt_discovery:
+44d4 6fe0c938 fetch 1 ,mem_device_flag 
+44d5 c1000000 rtneq mode_24g_device 
+44d6 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+44d7 c3830000 rtnbit1 mouse_bt_discovery_button_long_down_flag 
+44d8 d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
+44d9 204046f0 call mouse_enable_function_flag 
+44da 20403173 call app_evt_button_long_pressed 
+44db 2020454e branch mouse_bb_event_discovery_btn 
+
+mouse_commbination_key_process:
+44dc 6fe0c938 fetch 1 ,mem_device_flag 
+44dd c00044e2 beq mode_24g_device ,mouse_24g_commbination_key_process 
+44de 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+44df c41a8000 rtnbit0 mouse_enable_commbination_key_by_bt_discovery 
+44e0 6848cbca fetcht 1 ,mem_mouse_commbination_key_bt 
+44e1 202044e5 branch mouse_commbination_key_start 
+
+mouse_24g_commbination_key_process:
+44e2 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+44e3 c4190000 rtnbit0 mouse_enable_commbination_key_by_24g_pairing 
+44e4 6848cbcb fetcht 1 ,mem_mouse_commbination_key_24g 
+
+mouse_commbination_key_start:
+44e5 6048cb9d storet 1 ,mem_mouse_commbination_key 
+44e6 20404115 call mouse_check_key_gpio 
+44e7 1fe17e07 and pdata ,0x07 ,pdata 
+44e8 6848cb9d fetcht 1 ,mem_mouse_commbination_key 
+44e9 98467c00 isub temp ,null 
+44ea 2022c4f1 branch mouse_commbination_key_down ,zero 
+
+mouse_commbination_key_up:
+44eb 6fe0c78f fetch 1 ,mem_ui_button_timeout 
+44ec 67e0cba0 store 1 ,mem_combination_ui_button_count 
+44ed 6fe0cb9f fetch 1 ,mem_commbination_key_statue 
+44ee c1000000 rtneq commbination_key_state_up 
+44ef 704b9f00 jam commbination_key_state_up ,mem_commbination_key_statue 
+44f0 20600000 rtn 
+
+mouse_commbination_key_down:
+44f1 204044f6 call mouse_combination_ui_timer 
+44f2 6fe0cb9f fetch 1 ,mem_commbination_key_statue 
+44f3 c1008000 rtneq commbination_key_state_down 
+44f4 704b9f01 jam commbination_key_state_down ,mem_commbination_key_statue 
+44f5 20207931 branch check_51cmd_bb_reconn_cancel 
+
+mouse_combination_ui_timer:
+44f6 da404827 arg mouse_24g_start_pair_mode ,regb 
+44f7 da604ba0 arg mem_combination_ui_button_count ,regc 
+44f8 6fe0c938 fetch 1 ,mem_device_flag 
+44f9 c000318a beq mode_24g_device ,timer_single_step 
+44fa da4044d4 arg mouse_long_button_bt_discovery ,regb 
+44fb 2040318a call timer_single_step 
+44fc 6fe0cba0 fetch 1 ,mem_combination_ui_button_count 
+44fd c000c6e2 beq 1 ,mouse_bt_discovery_button_down_enable 
+44fe 20600000 rtn 
+
+mouse_check_discovery_timeout_timer:
+44ff da604ac2 arg mem_mouse_discovery_timer ,regc 
+4500 da404502 arg mouse_check_discovery_timeout ,regb 
+4501 20203191 branch timer_single_step_2b 
+
+mouse_check_discovery_timeout:
+4502 20404576 call mouse_stop_discovery 
+4503 20203e20 branch mouse_app_enter_hibernate 
+
+mouse_check_direct_timeout_timer:
+4504 da604b77 arg mem_mouse_direct_timer ,regc 
+4505 da40450a arg mouse_check_direct_timeout ,regb 
+4506 20403191 call timer_single_step_2b 
+4507 6fe0cb77 fetch 1 ,mem_mouse_direct_timer 
+4508 c000b203 beq 1 ,app_ble_stop_direct_adv 
+4509 20600000 rtn 
+
+mouse_check_direct_timeout:
+450a 6fe0cac1 fetch 1 ,mem_mouse_bluetooth_fast_conn_flag 
+450b c07fc2f8 beq 0xff ,mouse_buletooth_fast_conn_end 
+450c 6fe0cab0 fetch 1 ,mem_reconn_times 
+450d 243a470e nbranch mouse_polling_device ,blank 
+450e 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+450f c299c553 bbit1 mouse_enable_bt_reconnect_timeout_enter_discovery ,mouse_start_discovery 
+4510 c297c81f bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_first_bb_event_reconn_timeout 
+4511 20203e20 branch mouse_app_enter_hibernate 
+
+mouse_le_enable_att_list_timer:
+4512 da604b76 arg mem_le_start_encrypt_timer ,regc 
+4513 da40438e arg mouse_le_write_enable ,regb 
+4514 2020318a branch timer_single_step 
+
+mouse_le_send_smp_security_request_timer:
+4515 6fe0cac6 fetch 1 ,mem_mouse_le_bb_connected_flag 
+4516 207a0000 rtn blank 
+4517 da604ac8 arg mem_mouse_send_secutiry_request_timer ,regc 
+4518 da40451a arg mouse_le_pairing_sm_start_check ,regb 
+4519 2020318a branch timer_single_step 
+
+mouse_le_pairing_sm_start_check:
+451a 6fe0cac7 fetch 1 ,mem_mouse_le_reconnect_flag 
+451b 247a0000 nrtn blank 
+451c 6fe0c39b fetch 1 ,mem_le_pairing_state 
+451d c1800000 rtnne flag_le_pairing_null 
+451e 20202090 branch le_pairing_sm_start 
+
+mouse_le_battery_updata_timer:
+451f da604af2 arg mem_le_battery_level_updata_timer ,regc 
+4520 da404522 arg mouse_le_battery_level_updata ,regb 
+4521 2020318a branch timer_single_step 
+
+mouse_le_battery_level_updata:
+4522 6fe14af0 fetch 2 ,mem_le_battery_level_updata_timer_init 
+4523 67e14af2 store 2 ,mem_le_battery_level_updata_timer 
+4524 202043cb branch mouse_fill_battery_level_le 
+
+mouse_le_enable_att_list:
+4525 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+4526 c3810000 rtnbit1 ll_pairing_success_flag 
+4527 2040436c call mouse_updata_le_param 
+4528 d8e00000 arg write_req_enable_flag ,queue 
+4529 20204375 branch mouse_le_enable_connect_flag 
+
+mouse_check_hid_handshake_timer:
+452a da60478a arg mem_hid_handshake_timer_count ,regc 
+452b da404424 arg mouse_bt_hid_handshake ,regb 
+452c 2020318a branch timer_single_step 
+
+mouse_bt_check_sniff_req_timeout_timer:
+452d da604b87 arg mem_mouse_bt_send_first_package_timer ,regc 
+452e da404530 arg mouse_bt_send_first_package ,regb 
+452f 2020318a branch timer_single_step 
+
+mouse_bt_send_first_package:
+4530 704b8801 jam 1 ,mem_mouse_bt_send_first_package_flag 
+4531 20600000 rtn 
+
+mouse_check_reconnect_delay_long_sleep:
+4532 da604ac4 arg mem_mouse_bluetooth_reconnect_timeout ,regc 
+4533 da403e20 arg mouse_app_enter_hibernate ,regb 
+4534 2020318a branch timer_single_step 
+
+mouse_current_mult_update_timer:
+4535 da604aaf arg mem_mouse_current_mult_timer ,regc 
+4536 da404538 arg mouse_current_mult_reinit ,regb 
+4537 2020318a branch timer_single_step 
+
+mouse_current_mult_reinit:
+4538 6fe0cb8a fetch 1 ,mem_lpm_mult_init 
+4539 67e0c177 store 1 ,mem_lpm_mult 
+453a 704aae01 jam 1 ,mem_mouse_long_mult_flag 
+453b 20600000 rtn 
+
+mouse_check_no_data_timeout_timer:
+453c 6fe0c92a fetch 1 ,mem_usb_addr 
+453d c3838000 rtnbit1 7 
+453e da604ab2 arg mem_mouse_no_data_timer ,regc 
+453f da404541 arg mouse_check_no_data_timeout ,regb 
+4540 20203191 branch timer_single_step_2b 
+
+mouse_check_no_data_timeout:
+4541 6fe0c938 fetch 1 ,mem_device_flag 
+4542 c00047e1 beq mode_24g_device ,mouse_24g_hibernate_set 
+4543 2020431b branch mouse_disconnect 
+
+mouse_no_data_timer_init:
+4544 6fe14bbe fetch 2 ,mem_mouse_no_data_timeout 
+4545 67e14ab2 store 2 ,mem_mouse_no_data_timer 
+4546 20600000 rtn 
+
+mouse_store_information_delay_timer:
+4547 da6049bf arg mem_store_information_delay_timer ,regc 
+4548 da40454a arg mouse_store_device_info_check ,regb 
+4549 2020318a branch timer_single_step 
+
+mouse_store_device_info_check:
+454a 204045f1 call mouse_store_device_info 
+454b 6fe0cac5 fetch 1 ,mem_mouse_need_soft_reset 
+454c 243a46c0 nbranch mouse_soft_reset ,blank 
+454d 20600000 rtn 
+
+mouse_bb_event_discovery_btn:
+454e 280ffe26 isolate1 mark_24g ,mark 
+454f 2040c7f2 call mouse_24g_stop ,true 
+4550 2040431b call mouse_disconnect 
+4551 2040439d call mouse_le_clean_connect_flag 
+4552 20204553 branch mouse_start_discovery 
+
+mouse_start_discovery:
+4553 44ed401b bpatch patch1b_2 ,mem_patch1b 
+4554 20404314 call mouse_bluetooth_fast_conn_disable 
+4555 6fe1478c fetch 2 ,mem_ui_state_map 
+4556 c285c55f bbit1 ui_state_ble_adv ,mouse_start_discovery_norandom 
+4557 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4558 c304455f bbit0 mouse_enable_ble_random_addre ,mouse_start_discovery_norandom 
+4559 68494997 fetcht 2 ,mem_random_addr_increase_count 
+455a 18408401 increase 1 ,temp 
+455b 60494997 storet 2 ,mem_random_addr_increase_count 
+455c 6049437b storet 2 ,mem_le_lap + 1 
+455d 180a7e00 random pdata 
+455e 67e0c37a store 1 ,mem_le_lap 
+
+mouse_start_discovery_norandom:
+455f 6fe1cac9 fetch 3 ,mem_mouse_le_lap_temp 
+4560 67e1c37d store 3 ,mem_le_lap + 3 
+4561 20403225 call app_lpm_mult_disable 
+4562 6fe14791 fetch 2 ,mem_discovery_timeout 
+4563 67e14ac2 store 2 ,mem_mouse_discovery_timer 
+4564 7000bd06 jam 6 ,mem_connection_options 
+4565 58000000 setarg 0 
+4566 67e14ab2 store 2 ,mem_mouse_no_data_timer 
+4567 67e0cb77 store 1 ,mem_mouse_direct_timer 
+4568 67e0cac4 store 1 ,mem_mouse_bluetooth_reconnect_timeout 
+4569 67e0cba7 store 1 ,mem_mouse_device_poweron_timer_count 
+456a 67e0caac store 1 ,mem_mouse_clear_sensor_data_flag 
+456b d8e00002 arg mouse_store_eeprom_flag ,queue 
+456c 204046f0 call mouse_enable_function_flag 
+456d 204046e4 call mouse_bt_discovery_button_down_disable 
+456e 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+456f 2feffe01 isolate1 mode_4_mouse ,pdata 
+4570 2040c3df call mouse_check_51cmd_adv ,true 
+4571 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+4572 2feffe00 isolate1 mode_3_mouse ,pdata 
+4573 2040f8c4 call check_51cmd_start_discovery ,true 
+4574 2040498e call mouse_low_voltage_led_blink_disable 
+4575 202048cc branch mouse_discover_setting_led_gpio 
+
+mouse_stop_discovery:
+4576 44edc01b bpatch patch1b_3 ,mem_patch1b 
+4577 d8e00006 arg mouse_bt_discovery_button_long_down_flag ,queue 
+4578 204046f4 call mouse_disable_function_flag 
+4579 704ac400 jam 0 ,mem_mouse_bluetooth_reconnect_timeout 
+457a 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+457b 2feffe01 isolate1 mode_4_mouse ,pdata 
+457c 2040c581 call mouse_stop_le_adv ,true 
+457d 6fe0cbb3 fetch 1 ,mem_mouse_bluetooth_type 
+457e 2feffe00 isolate1 mode_3_mouse ,pdata 
+457f 2040c583 call mouse_stop_bt3_discovery ,true 
+4580 20204912 branch mouse_device_led_off 
+
+mouse_stop_le_adv:
+4581 704b7700 jam 0 ,mem_mouse_direct_timer 
+4582 202078f4 branch check_51cmd_stop_adv 
+
+mouse_stop_bt3_discovery:
+4583 58000000 setarg 0 
+4584 67e14ac2 store 2 ,mem_mouse_discovery_timer 
+4585 202078c9 branch check_51cmd_stop_discovery 
+
+mouse_store_remote_bdaddr:
+4586 44ee401b bpatch patch1b_4 ,mem_patch1b 
+4587 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4588 c4010000 rtnbit0 mouse_store_eeprom_flag 
+4589 204048c6 call mouse_device_poweron_timer_init 
+458a d8e00002 arg mouse_store_eeprom_flag ,queue 
+458b 204046f4 call mouse_disable_function_flag 
+458c 2040458f call mouse_check_device_addr 
+
+mouse_unplug_clean_bdaddr:
+458d 204045a2 call mouse_before_store_reconn_info 
+458e 202045ee branch mouse_store_device_info_delay 
+
+mouse_check_device_addr:
+458f 6fe080e8 fetch 1 ,mem_record_bt_mode 
+4590 c01a4593 beq rec_4_mode ,mouse_check_le_device_addr 
+4591 c019c596 beq rec_3_mode ,mouse_check_bt_device_addr 
+4592 20600000 rtn 
+
+mouse_check_le_device_addr:
+4593 67e0cb78 store 1 ,mem_device_addr_temp 
+4594 6fe30297 fetch 6 ,mem_le_plap 
+4595 20204598 branch mouse_check_bt_device_addr_common 
+
+mouse_check_bt_device_addr:
+4596 67e0cb78 store 1 ,mem_device_addr_temp 
+4597 6fe30041 fetch 6 ,mem_plap 
+
+mouse_check_bt_device_addr_common:
+4598 67e34b79 store 6 ,mem_device_addr_temp + 1 
+4599 6fe3cb78 fetch 7 ,mem_device_addr_temp 
+459a d8c04939 arg mem_device1_type ,contr 
+459b df200003 arg 3 ,loopcnt 
+
+mouse_check_device_addr_end:
+459c e8438006 ifetcht 7 ,contr 
+459d 98467c00 isub temp ,null 
+459e 2022c5b7 branch mouse_clean_addr ,zero 
+459f 18c08c16 increase 22 ,contr 
+45a0 c200459c loop mouse_check_device_addr_end 
+45a1 20600000 rtn 
+
+mouse_before_store_reconn_info:
+45a2 da204939 arg mem_device1_type ,rega 
+45a3 6fe0c938 fetch 1 ,mem_device_flag 
+45a4 1fe0ffff increase -1 ,pdata 
+45a5 1feffe1d mul32 pdata ,29 ,pdata 
+45a6 9a20a200 iadd rega ,rega 
+45a7 6fe080e8 fetch 1 ,mem_record_bt_mode 
+45a8 e7e08011 istore 1 ,rega 
+45a9 c01a45ac beq rec_4_mode ,mouse_store_le_device 
+45aa c019c5b3 beq rec_3_mode ,mouse_store_bt_device 
+45ab 20600000 rtn 
+
+mouse_store_le_device:
+45ac 6fe30297 fetch 6 ,mem_le_plap 
+45ad e7e30005 istore 6 ,contw 
+45ae d8c04316 arg mem_le_ltk ,contr 
+45af 20407d0c call memcpy16 
+45b0 6fe3437a fetch 6 ,mem_le_lap 
+45b1 e7e30005 istore 6 ,contw 
+45b2 20600000 rtn 
+
+mouse_store_bt_device:
+45b3 6fe30041 fetch 6 ,mem_plap 
+45b4 e7e30005 istore 6 ,contw 
+45b5 d8c041cb arg mem_link_key ,contr 
+45b6 20207d0c branch memcpy16 
+
+mouse_clean_addr:
+45b7 18c08dfa increase -6 ,contr 
+45b8 18c20a00 copy contr ,contw 
+45b9 684b4b79 fetcht 6 ,mem_device_addr_temp + 1 
+45ba 18408403 increase 3 ,temp 
+45bb e0430005 istoret 6 ,contw 
+45bc 20600000 rtn 
+
+mouse_select_reconn_device:
+45bd da204939 arg mem_device1_type ,rega 
+45be 6fe0c938 fetch 1 ,mem_device_flag 
+45bf c1000000 rtneq mode_24g_device 
+45c0 1fe0ffff increase -1 ,pdata 
+45c1 1feffe1d mul32 pdata ,29 ,pdata 
+45c2 9a20a200 iadd rega ,rega 
+45c3 efe08011 ifetch 1 ,rega 
+45c4 67e0c482 store 1 ,mem_xrecord_mode 
+45c5 c019c5c8 beq rec_3_mode ,mouse_load_bt_device 
+45c6 c01a45cd beq rec_4_mode ,mouse_load_le_device 
+45c7 20600000 rtn 
+
+mouse_load_bt_device:
+45c8 efe30006 ifetch 6 ,contr 
+
+mouse_load_bt_device_end:
+45c9 67e341dd store 6 ,mem_hci_plap 
+45ca d8a041cb arg mem_link_key ,contw 
+45cb 20407d0c call memcpy16 
+45cc 2020602c branch check_link_key_load 
+
+mouse_load_le_device:
+45cd efe30006 ifetch 6 ,contr 
+
+mouse_load_le_device_end:
+45ce 67e341dd store 6 ,mem_hci_plap 
+45cf d8a04316 arg mem_le_ltk ,contw 
+45d0 20407d0c call memcpy16 
+45d1 efe30006 ifetch 6 ,contr 
+45d2 67e3437a store 6 ,mem_le_lap 
+45d3 20600000 rtn 
+
+mouse_app_initflag_check:
+45d4 6fe14990 fetch 2 ,mem_store_flag 
+45d5 d840aa55 arg eeprom_init_flag ,temp 
+45d6 98467c00 isub temp ,null 
+45d7 2022c5e2 branch mouse_load_device_info ,zero 
+45d8 60494990 storet 2 ,mem_store_flag 
+45d9 204045e7 call mouse_ble_init_address 
+45da 6fe0cab4 fetch 1 ,mem_device_flag_temp 
+45db 67e0c938 store 1 ,mem_device_flag 
+45dc 6fe0c926 fetch 1 ,mem_config_sensor_dpi 
+45dd 67e0c992 store 1 ,mem_mouse_dpi 
+45de 6fe2488d fetch 4 ,mem_24g_fast_conn_addr 
+45df 67e24891 store 4 ,mem_24g_receiver_addr 
+45e0 67e2483c store 4 ,mem_24g_addr 
+45e1 20600000 rtn 
+
+mouse_load_device_info:
+45e2 204045bd call mouse_select_reconn_device 
+45e3 6fe24993 fetch 4 ,mem_mouse_24g_addr 
+45e4 67e24891 store 4 ,mem_24g_receiver_addr 
+45e5 67e2483c store 4 ,mem_24g_addr 
+45e6 20600000 rtn 
+
+mouse_ble_init_address:
+45e7 6fe3437a fetch 6 ,mem_le_lap 
+45e8 67e34950 store 6 ,mem_device1_locall_addr 
+45e9 1fe0ff00 add pdata ,0x0100 ,pdata 
+45ea 67e3496d store 6 ,mem_device2_locall_addr 
+45eb 1fe0ff00 add pdata ,0x0100 ,pdata 
+45ec 67e3498a store 6 ,mem_device3_locall_addr 
+45ed 20600000 rtn 
+
+mouse_store_device_info_delay:
+45ee 6fe0c9c0 fetch 1 ,mem_store_information_delay_timer_init 
+45ef 67e0c9bf store 1 ,mem_store_information_delay_timer 
+45f0 20600000 rtn 
+
+mouse_store_device_info:
+45f1 44eec01b bpatch patch1b_5 ,mem_patch1b 
+45f2 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+45f3 c289c63f bbit1 mouse_enable_eeprom ,mouse_store_eeprom_device_info 
+45f4 c2894603 bbit1 mouse_enable_flash ,mouse_store_flash_device_info 
+45f5 20600000 rtn 
+
+mouse_load_flash_info_check:
+45f6 20405d10 call spid_init_flash 
+45f7 2040460a call mouse_spid_flash_release_form_powerdown 
+45f8 204045fd call mouse_information_flash_parameters 
+45f9 20405d33 call spid_read_flash 
+45fa 20404611 call mouse_spid_flash_powerdown 
+45fb 204045d4 call mouse_app_initflag_check 
+45fc 20203f65 branch mouse_sensor_spi_init 
+
+mouse_information_flash_parameters:
+45fd 580049b8 setarg mem_mouse_information_end 
+45fe d8404938 arg mem_mouse_information_start ,temp 
+45ff 98460400 isub temp ,temp 
+4600 6fe1c9b8 fetch 3 ,mem_flash_base 
+4601 da204938 arg mem_mouse_information_start ,rega 
+4602 20600000 rtn 
+
+mouse_store_flash_device_info:
+4603 20405d10 call spid_init_flash 
+4604 2040460a call mouse_spid_flash_release_form_powerdown 
+4605 2040461f call mouse_flash_erase_sector 
+4606 204045fd call mouse_information_flash_parameters 
+4607 20404622 call mouse_spid_write_flash 
+4608 20404611 call mouse_spid_flash_powerdown 
+4609 20203f65 branch mouse_sensor_spi_init 
+
+mouse_spid_flash_release_form_powerdown:
+460a 700964ab jam flash_command_release_from_powerdown ,mem_temp 
+
+mouse_spid_write_flash_cmd:
+460b 204061d7 call delay_nop100 
+460c 20405d15 call spid_unlock_flash 
+460d da2049bb arg mem_write_flash_head_temp ,rega 
+460e 68488964 fetcht 1 ,mem_temp 
+460f 20404613 call mouse_spid_write_flash_cmd_common 
+4610 202061d7 branch delay_nop100 
+
+mouse_spid_flash_powerdown:
+4611 700964b9 jam flash_command_powerdown ,mem_temp 
+4612 2020460b branch mouse_spid_write_flash_cmd 
+
+mouse_spid_write_flash_cmd_common:
+4613 e0408011 istoret 1 ,rega 
+4614 1ff10400 rshift16 pdata ,temp 
+4615 e0408005 istoret 1 ,contw 
+4616 1fec8400 rshift8 pdata ,temp 
+4617 e0408005 istoret 1 ,contw 
+4618 e7e08005 istore 1 ,contw 
+4619 1a227e00 deposit rega 
+461a 67f1008a store 2 ,core_spid_txaddr 
+461b 58000000 setarg 0 
+461c 67f1008e store 2 ,core_spid_rxlen 
+461d 70800602 jam spid_start ,core_misc_ctrl 
+461e 20205ccf branch wait_spid_done 
+
+mouse_flash_erase_sector:
+461f 6fe1c9b8 fetch 3 ,mem_flash_base 
+4620 67e1c4a5 store 3 ,mem_spi_write_addr 
+4621 20205ceb branch spid_flash_erase_sector + 2 
+
+mouse_spid_write_flash:
+4622 1fe22600 copy pdata ,regc 
+4623 1a227e00 copy rega ,pdata 
+4624 1fe0fffc increase -4 ,pdata 
+4625 1fe22400 copy pdata ,regb 
+4626 efe20012 ifetch 4 ,regb 
+4627 67e249bb store 4 ,mem_write_flash_head_temp 
+4628 1a627e00 copy regc ,pdata 
+4629 20405d22 call spid_write_flash 
+462a 6fe249bb fetch 4 ,mem_write_flash_head_temp 
+462b e7e20012 istore 4 ,regb 
+462c 20600000 rtn 
+
+mouse_flash_power_down:
+462d 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+462e c4090000 rtnbit0 mouse_enable_flash 
+462f 20404611 call mouse_spid_flash_powerdown 
+4630 20405b08 call twspi_enable 
+4631 6848c4b5 fetcht 1 ,mem_spi_cs_gpio 
+4632 20406065 call gpio_out_inactive 
+4633 6848c4ba fetcht 1 ,mem_spi_hold_gpio 
+4634 20203f54 branch mouse_gpio_config_input_pd 
+
+mouse_load_eeprom_info_check:
+4635 20405da5 call iicd_read_init_pin 
+4636 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4637 2feffe09 isolate1 mouse_enable_2k_eeprom ,pdata 
+4638 2440ddbf ncall clear_eeprom_size_2k ,true 
+4639 2040463b call mouse_eeprom_load_recon_info 
+463a 202045d4 branch mouse_app_initflag_check 
+
+mouse_eeprom_load_recon_info:
+463b d8400080 arg 128 ,temp 
+463c da204938 arg mem_device_flag ,rega 
+463d da400000 arg mouse_info_eeprom_offect ,regb 
+463e 20205ddc branch iicd_read_eep_data 
+
+mouse_store_eeprom_device_info:
+463f d8400080 arg 128 ,temp 
+4640 da204938 arg mem_device_flag ,rega 
+4641 da400000 arg mouse_info_eeprom_offect ,regb 
+4642 20205dce branch iicd_write_protect_eep_data 
+
+mouse_store_eerpom_dpi:
+4643 d8400001 arg 1 ,temp 
+4644 da204992 arg mem_mouse_dpi ,rega 
+4645 da40005a arg mouse_dpi_eeprom_offect ,regb 
+4646 20205dce branch iicd_write_protect_eep_data 
+
+mouse_load_eeprom_dpi:
+4647 d8400001 arg 1 ,temp 
+4648 da204992 arg mem_mouse_dpi ,rega 
+4649 da40005a arg mouse_dpi_eeprom_offect ,regb 
+464a 20205ddc branch iicd_read_eep_data 
+
+mouse_idle:
+464b 44ef401b bpatch patch1b_6 ,mem_patch1b 
+464c 20404990 call mouse_low_voltage_led_no_enter_lpm 
+464d 20407936 call ui_check_paring_button 
+464e 20404027 call mouse_dpi_check 
+464f 20404655 call mouse_select_device_check 
+4650 204046a0 call mouse_check_select_device_by_switch 
+4651 204046d6 call mouse_bt_button_check 
+4652 20403dbd call mouse_usb_isr 
+4653 20403f88 call mouse_wheel_check 
+4654 20203dd4 branch mouse_usb_mode 
+
+mouse_select_device_check:
+4655 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4656 c294c65a bbit1 mouse_enable_select_device_by_pb_button ,mouse_select_device_by_pb_button 
+4657 c29bc65a bbit1 mouse_enable_pb_button_long_press_disconvery ,mouse_select_device_by_pb_button 
+4658 20600000 rtn 
+
+mouse_select_device_by_pb_button_check_once:
+4659 704b9403 jam 0x03 ,mem_mouse_pbkey_press_status 
+
+mouse_select_device_by_pb_button:
+465a 6fe0c91b fetch 1 ,mem_config_select_device_button_gpio 
+465b c17f8000 rtneq gpio_disable 
+465c da200000 arg 0 ,rega 
+465d 704b9606 jam mouse_pb_key ,mem_mouse_key_temp 
+465e 6848c91b fetcht 1 ,mem_config_select_device_button_gpio 
+465f 2040466a call mouse_pb_button_check 
+4660 67e0cb94 store 1 ,mem_mouse_pbkey_press_status 
+4661 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+4662 c07fc667 beq gpio_disable ,mouse_3io6key_pb_button_check_end 
+4663 20404168 call mouse_matrix_public_gpio_reset 
+
+mouse_select_device_by_pb_button_exit:
+4664 1a227e00 copy rega ,pdata 
+4665 c283468b bbit1 mouse_pb_key ,mouse_select_device_button_down 
+4666 20204680 branch mouse_select_device_button_up 
+
+mouse_3io6key_pb_button_check_end:
+4667 6848c91b fetcht 1 ,mem_config_select_device_button_gpio 
+4668 20403f56 call mouse_gpio_config_input_pu 
+4669 20204664 branch mouse_select_device_by_pb_button_exit 
+
+mouse_pb_button_check:
+466a 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+466b c296c676 bbit1 mouse_enable_pb_button_connect_gnd ,mouse_pb_button_connect_gnd 
+466c 6fe0cb94 fetch 1 ,mem_mouse_pbkey_press_status 
+466d 1fe22600 copy pdata ,regc 
+466e 6fe0c910 fetch 1 ,mem_matrix_public_gpio 
+466f c07fc195 beq gpio_disable ,mouse_3io6key_check 
+4670 6fe0cb9a fetch 1 ,mem_mouse_ghost_flag 
+4671 243a4673 nbranch mouse_select_device_by_pb_button_end ,blank 
+4672 20204678 branch mouse_pb_button_connect_matrix 
+
+mouse_select_device_by_pb_button_end:
+4673 704b9e00 jam pb_button_state_up ,mem_select_device_button_statue 
+4674 704b9400 jam 0 ,mem_mouse_pbkey_press_status 
+4675 20600000 rtn 
+
+mouse_pb_button_connect_gnd:
+4676 6fe0cb94 fetch 1 ,mem_mouse_pbkey_press_status 
+4677 20204187 branch mouse_check_key_connect_gnd 
+
+mouse_pb_button_connect_matrix:
+4678 20406059 call gpio_get_bit 
+4679 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+467a 2020c676 branch mouse_pb_button_connect_gnd ,true 
+467b 6848c910 fetcht 1 ,mem_matrix_public_gpio 
+467c 20406069 call gpio_out_active 
+467d 6848c91b fetcht 1 ,mem_config_select_device_button_gpio 
+467e 6fe0cb94 fetch 1 ,mem_mouse_pbkey_press_status 
+467f 20204187 branch mouse_check_key_connect_gnd 
+
+mouse_select_device_button_up:
+4680 6fe0cb9e fetch 1 ,mem_select_device_button_statue 
+4681 c1000000 rtneq pb_button_state_up 
+4682 704b9e00 jam pb_button_state_up ,mem_select_device_button_statue 
+4683 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4684 c39a0000 rtnbit1 mouse_enable_pb_button_short_press_enter_discovery 
+4685 6fe0cb9b fetch 1 ,mem_bt_discovery_count 
+4686 1fe67c14 sub pdata ,20 ,null 
+4687 244146b5 ncall mouse_ready_reconnection_by_button ,positive 
+4688 6fe0c78f fetch 1 ,mem_ui_button_timeout 
+4689 67e0cb9b store 1 ,mem_bt_discovery_count 
+468a 20600000 rtn 
+
+mouse_select_device_button_down:
+468b 20404697 call mouse_select_device_ghost_check 
+468c 20740000 rtn user 
+468d 6fe0cb9e fetch 1 ,mem_select_device_button_statue 
+468e c1008000 rtneq pb_button_state_down 
+468f 704b9e01 jam pb_button_state_down ,mem_select_device_button_statue 
+4690 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4691 c29a44d4 bbit1 mouse_enable_pb_button_short_press_enter_discovery ,mouse_long_button_bt_discovery 
+4692 6fe0cb77 fetch 1 ,mem_mouse_direct_timer 
+4693 207a0000 rtn blank 
+4694 6fe0c902 fetch 1 ,mem_mouse_direct_timeout 
+4695 67e0cb77 store 1 ,mem_mouse_direct_timer 
+4696 20600000 rtn 
+
+mouse_select_device_ghost_check:
+4697 78547c00 disable user 
+4698 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4699 c3968000 rtnbit1 mouse_enable_pb_button_connect_gnd 
+469a 6fe0cb8e fetch 1 ,mem_mouse_lkey_press_status 
+469b 207a0000 rtn blank 
+469c 6fe0cb8f fetch 1 ,mem_mouse_rkey_press_status 
+469d 207a0000 rtn blank 
+469e 78347c00 enable user 
+469f 20600000 rtn 
+
+mouse_check_select_device_by_switch:
+46a0 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+46a1 c29546a4 bbit1 mouse_enable_select_device_by_switch_gpio ,mouse_check_select_device_by_switch_gpio 
+46a2 c295be9b bbit1 mouse_enable_select_device_by_switch_adc ,mouse_adc_read 
+46a3 20600000 rtn 
+
+mouse_check_select_device_by_switch_gpio:
+46a4 6848c91e fetcht 1 ,mem_device_switch_gpio 
+46a5 20403f56 call mouse_gpio_config_input_pu 
+46a6 6848c91e fetcht 1 ,mem_device_switch_gpio 
+46a7 20406059 call gpio_get_bit 
+46a8 2020c6ad branch mouse_check_select_24gdevice ,true 
+
+mouse_select_btdevice:
+46a9 6fe0c938 fetch 1 ,mem_device_flag 
+46aa c1008000 rtneq mode_bt_device1 
+46ab 70493801 jam mode_bt_device1 ,mem_device_flag 
+46ac 20204316 branch mouse_stop_bluetooth_mode 
+
+mouse_check_select_24gdevice:
+46ad 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+46ae c315c6b1 bbit0 mouse_enable_select_device_by_switch_adc ,mouse_check_select_24g_device 
+46af 6fe348ef fetch 6 ,mem_mouse_vdd_switch_gnd_full_vol 
+46b0 67e348e3 store 6 ,mem_mouse_vdd_calculate_set 
+
+mouse_check_select_24g_device:
+46b1 6fe0c938 fetch 1 ,mem_device_flag 
+46b2 c1000000 rtneq mode_24g_device 
+46b3 70493800 jam mode_24g_device ,mem_device_flag 
+46b4 202047f2 branch mouse_24g_stop 
+
+mouse_ready_reconnection_by_button:
+46b5 44efc01b bpatch patch1b_7 ,mem_patch1b 
+46b6 6fe0cbb4 fetch 1 ,mem_device_number 
+46b7 c1008000 rtneq 1 
+46b8 204046c2 call mouse_select_device_number 
+46b9 6048c938 storet 1 ,mem_device_flag 
+
+mouse_store_device_number_before_reset:
+46ba 7041ca00 jam 0 ,mem_link_key_exists 
+46bb 204046da call mouse_select_device_enable 
+46bc 20404316 call mouse_stop_bluetooth_mode 
+46bd 204046dc call mouse_select_device_disable 
+46be 704ac501 jam 1 ,mem_mouse_need_soft_reset 
+46bf 202045ee branch mouse_store_device_info_delay 
+
+mouse_soft_reset:
+46c0 204046da call mouse_select_device_enable 
+46c1 20205d8c branch soft_reset_chip 
+
+mouse_select_device_number:
+46c2 6848c938 fetcht 1 ,mem_device_flag 
+46c3 18408401 increase 1 ,temp 
+46c4 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+46c5 c288c6c9 bbit1 mouse_enable_24g ,mouse_select_device_number_24g 
+46c6 18467c02 sub temp ,2 ,null 
+46c7 244146d0 ncall mouse_select_device_count_clean_bt ,positive 
+46c8 20600000 rtn 
+
+mouse_select_device_number_24g:
+46c9 6fe0cbb4 fetch 1 ,mem_device_number 
+46ca 1fe0ffff increase -1 ,pdata 
+46cb 98467c00 isub temp ,null 
+46cc 244146ce ncall mouse_select_device_count_clean_24g ,positive 
+46cd 20600000 rtn 
+
+mouse_select_device_count_clean_24g:
+46ce d8400000 arg 0 ,temp 
+46cf 20600000 rtn 
+
+mouse_select_device_count_clean_bt:
+46d0 d8400001 arg 1 ,temp 
+46d1 20600000 rtn 
+
+mouse_store_device_number2eeprom:
+46d2 d8400001 arg 1 ,temp 
+46d3 da204938 arg mem_device_flag ,rega 
+46d4 da400000 arg 0 ,regb 
+46d5 20205dce branch iicd_write_protect_eep_data 
+
+mouse_bt_button_check:
+46d6 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+46d7 c41a0000 rtnbit0 mouse_enable_pb_button_short_press_enter_discovery 
+46d8 2040465a call mouse_select_device_by_pb_button 
+46d9 20600000 rtn 
+
+mouse_select_device_enable:
+46da d8e00000 arg mouse_select_device_flag ,queue 
+46db 202046f0 branch mouse_enable_function_flag 
+
+mouse_select_device_disable:
+46dc d8e00000 arg mouse_select_device_flag ,queue 
+46dd 202046f4 branch mouse_disable_function_flag 
+
+mouse_bt_cannel_reconn_enable:
+46de d8e00003 arg mouse_bt_cannel_reconn_flag ,queue 
+46df 202046f0 branch mouse_enable_function_flag 
+
+mouse_bt_cannel_reconn_disable:
+46e0 d8e00003 arg mouse_bt_cannel_reconn_flag ,queue 
+46e1 202046f4 branch mouse_disable_function_flag 
+
+mouse_bt_discovery_button_down_enable:
+46e2 d8e00005 arg mouse_bt_discovery_button_down_flag ,queue 
+46e3 202046f0 branch mouse_enable_function_flag 
+
+mouse_bt_discovery_button_down_disable:
+46e4 d8e00005 arg mouse_bt_discovery_button_down_flag ,queue 
+46e5 202046f4 branch mouse_disable_function_flag 
+
+mouse_adc_read_enable:
+46e6 d8e00014 arg mouse_enable_adc ,queue 
+46e7 202046f0 branch mouse_enable_function_flag 
+
+mouse_24g_set_250hz:
+46e8 d8e00018 arg mouse_enable_24g_250hz ,queue 
+46e9 202046f0 branch mouse_enable_function_flag 
+
+mouse_24g_search_dongle_enable:
+46ea d8e00016 arg mouse_enable_24g_search_dongle ,queue 
+46eb 202046f0 branch mouse_enable_function_flag 
+
+mouse_16m_enable:
+46ec d8e0000c arg mouse_enable_16m ,queue 
+46ed 202046f0 branch mouse_enable_function_flag 
+
+mouse_dpi_4level_enable:
+46ee d8e0001c arg mouse_enable_dpi_level_4 ,queue 
+46ef 202046f0 branch mouse_enable_function_flag 
+
+mouse_enable_function_flag:
+46f0 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+46f1 f9207e00 qset1 pdata 
+46f2 67e44bab store mouse_flag_len ,mem_mouse_flag 
+46f3 20600000 rtn 
+
+mouse_disable_function_flag:
+46f4 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+46f5 f93ffe00 qset0 pdata 
+46f6 67e44bab store mouse_flag_len ,mem_mouse_flag 
+46f7 20600000 rtn 
+
+mouse_customer_key_enable:
+46f8 d8e00015 arg mouse_enable_keyboard ,queue 
+46f9 204046f0 call mouse_enable_function_flag 
+46fa 58000000 setarg 0 
+46fb 67e44bcc store 8 ,mem_customer_key_press 
+46fc 67e44bd5 store 8 ,mem_customer_key_release 
+46fd 6fe0c90a fetch 1 ,mem_mouse_enable_flag 
+46fe 1fe17ec0 and pdata ,0xc0 ,pdata 
+46ff c0204705 beq 0x40 ,mouse_customer_key_ctrl_alt_a 
+4700 c0404707 beq 0x80 ,mouse_customer_ac_home 
+4701 c060470c beq 0xc0 ,mouse_customer_key_play 
+4702 58070008 setarg 0x070008 
+
+mouse_customer_standrad_key_set:
+4703 67e44bcd store 8 ,mem_customer_key_press + 1 
+4704 20600000 rtn 
+
+mouse_customer_key_ctrl_alt_a:
+4705 58040005 setarg 0x040005 
+4706 20204703 branch mouse_customer_standrad_key_set 
+
+mouse_customer_ac_home:
+4707 58022303 setarg 0x022303 
+
+mouse_customer_media_key_set:
+4708 67e44bcc store 8 ,mem_customer_key_press 
+4709 58000003 setarg 0x03 
+470a 67e44bd5 store 8 ,mem_customer_key_release 
+470b 20600000 rtn 
+
+mouse_customer_key_play:
+470c 5800cd03 setarg 0x00cd03 
+470d 20204708 branch mouse_customer_media_key_set 
+
+mouse_polling_device:
+470e 44f0401c bpatch patch1c_0 ,mem_patch1c 
+470f 6fe0cab0 fetch 1 ,mem_reconn_times 
+4710 1fe0ffff increase -1 ,pdata 
+4711 67e0cab0 store 1 ,mem_reconn_times 
+4712 6848c938 fetcht 1 ,mem_device_flag 
+4713 18467c01 sub temp ,1 ,null 
+4714 2442c6c2 ncall mouse_select_device_number ,zero 
+4715 6048c938 storet 1 ,mem_device_flag 
+4716 7041ca00 jam 0 ,mem_link_key_exists 
+4717 204046d2 call mouse_store_device_number2eeprom 
+4718 204045a2 call mouse_before_store_reconn_info 
+4719 20203d59 branch mouse_start_reconnect_device 
+
+mouse_drawing_optima:
+471a 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+471b c41c0000 rtnbit0 mouse_enable_smoother 
+471c 6fe248d1 fetch 4 ,mem_mouse_x 
+471d 207a0000 rtn blank 
+471e 204047bd call mouse_data_abs_check 
+471f 58000003 setarg 0x03 
+4720 204047b3 call mouse_pdata_greater_than_check 
+4721 205a47af call mouse_disable_asm ,blank 
+4722 245a47b1 ncall mouse_enable_asm ,blank 
+4723 58000002 setarg 0x02 
+4724 204047b8 call mouse_data_less_than_check 
+4725 205a47af call mouse_disable_asm ,blank 
+4726 6fe0c9c9 fetch 1 ,mem_mouse_asm_flag 
+4727 c000c72d beq 1 ,mouse_drawing_optima_modify 
+
+mouse_drawing_optima_init:
+4728 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4729 c41c0000 rtnbit0 mouse_enable_smoother 
+472a df200005 arg 5 ,loopcnt 
+472b d8a049c9 arg mem_mouse_asm_flag ,contw 
+472c 20207d26 branch clear_mem 
+
+mouse_drawing_optima_modify:
+472d 20404741 call mouse_drawing_optima_xy_offset_modify 
+472e 6fe149ca fetch 2 ,mem_mouse_x_pre 
+472f 67e109f8 store 2 ,mem_data_pre 
+4730 6fe148d1 fetch 2 ,mem_mouse_x 
+4731 67e109fa store 2 ,mem_data_current 
+4732 20404779 call mouse_drawing_optima_data_x 
+4733 6fe109f8 fetch 2 ,mem_data_pre 
+4734 67e149ca store 2 ,mem_mouse_x_pre 
+4735 6fe109fa fetch 2 ,mem_data_current 
+4736 67e148d1 store 2 ,mem_mouse_x 
+4737 6fe149cc fetch 2 ,mem_mouse_y_pre 
+4738 67e109f8 store 2 ,mem_data_pre 
+4739 6fe148d3 fetch 2 ,mem_mouse_y 
+473a 67e109fa store 2 ,mem_data_current 
+473b 20404781 call mouse_drawing_optima_data_y 
+473c 6fe109f8 fetch 2 ,mem_data_pre 
+473d 67e149cc store 2 ,mem_mouse_y_pre 
+473e 6fe109fa fetch 2 ,mem_data_current 
+473f 67e148d3 store 2 ,mem_mouse_y 
+4740 20600000 rtn 
+
+mouse_drawing_optima_xy_offset_modify:
+4741 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4742 c41c8000 rtnbit0 mouse_enable_xy_offset 
+4743 6fe149ca fetch 2 ,mem_mouse_x_pre 
+4744 67e109ff store 2 ,mem_data_value 
+4745 20404754 call mouse_pre_xy_data_judge 
+4746 67e149ca store 2 ,mem_mouse_x_pre 
+4747 6fe148d1 fetch 2 ,mem_mouse_x 
+4748 67e109ff store 2 ,mem_data_value 
+4749 20404762 call mouse_current_xy_data_judge 
+474a 67e148d1 store 2 ,mem_mouse_x 
+474b 6fe149cc fetch 2 ,mem_mouse_y_pre 
+474c 67e109ff store 2 ,mem_data_value 
+474d 20404754 call mouse_pre_xy_data_judge 
+474e 67e149cc store 2 ,mem_mouse_y_pre 
+474f 6fe148d3 fetch 2 ,mem_mouse_y 
+4750 67e109ff store 2 ,mem_data_value 
+4751 20404762 call mouse_current_xy_data_judge 
+4752 67e148d3 store 2 ,mem_mouse_y 
+4753 20600000 rtn 
+
+mouse_pre_xy_data_judge:
+4754 6fe08a00 fetch 1 ,mem_data_value + 1 
+4755 203a4757 branch mouse_pre_xy_pdata_offset ,blank 
+4756 2020475c branch mouse_pre_xy_ndata_offset 
+
+mouse_pre_xy_pdata_offset:
+4757 6fe089ff fetch 1 ,mem_data_value 
+4758 2040476f call mouse_pre_xy_get_0_4_times 
+4759 67e089ff store 1 ,mem_data_value 
+
+mouse_xy_data_offset_new:
+475a 6fe109ff fetch 2 ,mem_data_value 
+475b 20600000 rtn 
+
+mouse_pre_xy_ndata_offset:
+475c 6fe089ff fetch 1 ,mem_data_value 
+475d 204047ab call mouse_pdata_invert 
+475e 2040476f call mouse_pre_xy_get_0_4_times 
+475f 205a7e5e call disable_blank ,blank 
+4760 204047a7 call mouse_pdata_get_new_value 
+4761 2020475a branch mouse_xy_data_offset_new 
+
+mouse_current_xy_data_judge:
+4762 6fe08a00 fetch 1 ,mem_data_value + 1 
+4763 203a4765 branch mouse_current_xy_pdata_offset ,blank 
+4764 20204769 branch mouse_current_xy_ndata_offset 
+
+mouse_current_xy_pdata_offset:
+4765 6fe089ff fetch 1 ,mem_data_value 
+4766 20404774 call mouse_current_xy_get_0_6_times 
+4767 67e089ff store 1 ,mem_data_value 
+4768 2020475a branch mouse_xy_data_offset_new 
+
+mouse_current_xy_ndata_offset:
+4769 6fe089ff fetch 1 ,mem_data_value 
+476a 204047ab call mouse_pdata_invert 
+476b 20404774 call mouse_current_xy_get_0_6_times 
+476c 205a7e5e call disable_blank ,blank 
+476d 204047a7 call mouse_pdata_get_new_value 
+476e 2020475a branch mouse_xy_data_offset_new 
+
+mouse_pre_xy_get_0_4_times:
+476f 1feffe04 mul32 pdata ,4 ,pdata 
+4770 1fe6fc05 div pdata ,5 
+4771 20407def call wait_div_end 
+4772 1807fe00 quotient pdata 
+4773 20600000 rtn 
+
+mouse_current_xy_get_0_6_times:
+4774 1feffe0c mul32 pdata ,12 ,pdata 
+4775 1fe6fc0a div pdata ,10 
+4776 20407def call wait_div_end 
+4777 1807fe00 quotient pdata 
+4778 20600000 rtn 
+
+mouse_drawing_optima_data_x:
+4779 6fe109f8 fetch 2 ,mem_data_pre 
+477a 684909fa fetcht 2 ,mem_data_current 
+477b 9840fe00 iadd temp ,pdata 
+477c 6848c9ce fetcht 1 ,mem_mouse_data_xtemp 
+477d 9840fe00 iadd temp ,pdata 
+477e 1fe10401 and pdata ,0x01 ,temp 
+477f 6048c9ce storet 1 ,mem_mouse_data_xtemp 
+4780 20204789 branch mouse_drawing_optima_data 
+
+mouse_drawing_optima_data_y:
+4781 6fe109f8 fetch 2 ,mem_data_pre 
+4782 684909fa fetcht 2 ,mem_data_current 
+4783 9840fe00 iadd temp ,pdata 
+4784 6848c9cf fetcht 1 ,mem_mouse_data_ytemp 
+4785 9840fe00 iadd temp ,pdata 
+4786 1fe10401 and pdata ,0x01 ,temp 
+4787 6048c9cf storet 1 ,mem_mouse_data_ytemp 
+4788 20204789 branch mouse_drawing_optima_data 
+
+mouse_drawing_optima_data:
+4789 67e189fc store 3 ,mem_data_sum 
+478a 2feffe10 isolate1 16 ,pdata 
+478b 2020c793 branch mouse_data_sum_overflow ,true 
+478c 6fe089fd fetch 1 ,mem_data_sum + 1 
+478d c07fc79a beq 0xff ,mouse_data_sum_n 
+478e 6fe089fc fetch 1 ,mem_data_sum 
+
+mouse_data_store_pre:
+478f 1fe37e00 rshift pdata ,pdata 
+4790 67e109f8 store 2 ,mem_data_pre 
+4791 67e109fa store 2 ,mem_data_current 
+4792 20600000 rtn 
+
+mouse_data_sum_overflow:
+4793 6fe089fd fetch 1 ,mem_data_sum + 1 
+4794 c0004797 beq 0 ,mouse_data_sum_overflow_p 
+4795 6fe189fc fetch 3 ,mem_data_sum 
+4796 2020478f branch mouse_data_store_pre 
+
+mouse_data_sum_overflow_p:
+4797 7009fe00 jam 0 ,mem_data_sum + 2 
+4798 6fe089fc fetch 1 ,mem_data_sum 
+4799 2020478f branch mouse_data_store_pre 
+
+mouse_data_sum_n:
+479a 6fe089fc fetch 1 ,mem_data_sum 
+479b 204047a5 call mouse_pdata_get_half 
+479c 67e089f8 store 1 ,mem_data_pre 
+479d 67e089fa store 1 ,mem_data_current 
+479e 203a47a3 branch mouse_data_zero ,blank 
+479f 580000ff setarg 0xff 
+
+mouse_data_set_direction:
+47a0 67e089f9 store 1 ,mem_data_pre + 1 
+47a1 67e089fb store 1 ,mem_data_current + 1 
+47a2 20600000 rtn 
+
+mouse_data_zero:
+47a3 58000000 setarg 0 
+47a4 202047a0 branch mouse_data_set_direction 
+
+mouse_pdata_get_half:
+47a5 204047ab call mouse_pdata_invert 
+47a6 1fe37e00 rshift pdata ,pdata 
+
+mouse_pdata_get_new_value:
+47a7 204047ac call mouse_rega_in_out 
+47a8 1fe67e00 sub pdata ,0 ,pdata 
+47a9 67e089ff store 1 ,mem_data_value 
+47aa 20600000 rtn 
+
+mouse_pdata_invert:
+47ab 1fe67e00 sub pdata ,0 ,pdata 
+
+mouse_rega_in_out:
+47ac 67e08970 store 1 ,mem_rega 
+47ad 6fe08970 fetch 1 ,mem_rega 
+47ae 20600000 rtn 
+
+mouse_disable_asm:
+47af 7049c900 jam 0 ,mem_mouse_asm_flag 
+47b0 20600000 rtn 
+
+mouse_enable_asm:
+47b1 7049c901 jam 1 ,mem_mouse_asm_flag 
+47b2 20600000 rtn 
+
+mouse_pdata_greater_than_check:
+47b3 9a267c00 isub rega ,null 
+47b4 24217e5e nbranch disable_blank ,positive 
+47b5 9a467c00 isub regb ,null 
+47b6 24217e5e nbranch disable_blank ,positive 
+47b7 20207e60 branch enable_blank 
+
+mouse_data_less_than_check:
+47b8 9a267c00 isub rega ,null 
+47b9 24610000 nrtn positive 
+47ba 9a467c00 isub regb ,null 
+47bb 24610000 nrtn positive 
+47bc 20207e60 branch enable_blank 
+
+mouse_data_abs_check:
+47bd 6fe148d1 fetch 2 ,mem_mouse_x 
+47be 204047c4 call mouse_data_abs 
+47bf 1fe22200 copy pdata ,rega 
+47c0 6fe148d3 fetch 2 ,mem_mouse_y 
+47c1 204047c4 call mouse_data_abs 
+47c2 1fe22400 copy pdata ,regb 
+47c3 20600000 rtn 
+
+mouse_data_abs:
+47c4 67e109fa store 2 ,mem_data_current 
+47c5 6fe089fb fetch 1 ,mem_data_current + 1 
+47c6 c07fc7ca beq 0xff ,mouse_data_reversal 
+47c7 6fe089fa fetch 1 ,mem_data_current 
+
+mouse_data_abs_store:
+47c8 1fe17eff and_into 0xff ,pdata 
+47c9 20600000 rtn 
+
+mouse_data_reversal:
+47ca 6fe109fa fetch 2 ,mem_data_current 
+47cb 1fe67e00 sub pdata ,0 ,pdata 
+47cc 202047c8 branch mouse_data_abs_store 
+
+mouse_24g_long_sleep_param_update_timer:
+47cd da6048c4 arg mem_24g_long_sleep_param_update_timer ,regc 
+47ce da4047d0 arg mouse_24g_long_sleep_normal_param ,regb 
+47cf 2020318a branch timer_single_step 
+
+mouse_24g_long_sleep_normal_param:
+47d0 6fe248b8 fetch 4 ,mem_24g_long_sleep_set1 
+47d1 67e2485c store 4 ,mem_24g_enter_hibernate 
+47d2 704aae01 jam 1 ,mem_mouse_long_mult_flag 
+47d3 20600000 rtn 
+
+mouse_24g_long_sleep_set:
+47d4 c00047db beq 0x00 ,mouse_24g_long_sleep_set_30ms 
+47d5 c000c7dd beq 0x01 ,mouse_24g_long_sleep_set_50ms 
+47d6 c00147d8 beq 0x02 ,mouse_24g_long_sleep_set_80ms 
+47d7 c001c7df beq 0x03 ,mouse_24g_long_sleep_set_100ms 
+
+mouse_24g_long_sleep_set_80ms:
+47d8 580ea600 setarg 0x0ea600 
+
+mouse_24g_long_sleep_set_end:
+47d9 67e248b8 store 4 ,mem_24g_long_sleep_set1 
+47da 20600000 rtn 
+
+mouse_24g_long_sleep_set_30ms:
+47db 5805e740 setarg 0x05e740 
+47dc 202047d9 branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_long_sleep_set_50ms:
+47dd 580927c0 setarg 0x0927c0 
+47de 202047d9 branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_long_sleep_set_100ms:
+47df 58124f80 setarg 0x124f80 
+47e0 202047d9 branch mouse_24g_long_sleep_set_end 
+
+mouse_24g_hibernate_set:
+47e1 7048a500 jam 0 ,mem_24g_attempt_fail_flag 
+47e2 20402652 call g24_transmit_next_packet 
+47e3 5fffffff setarg -1 
+47e4 67e2485c store 4 ,mem_24g_enter_hibernate 
+47e5 58000000 setarg 0 
+47e6 67e3c8d0 store 7 ,mem_mouse_key 
+47e7 704be101 jam 1 ,mem_sensor_shutdown_flag 
+47e8 2040423c call mouse_sensor_powerdown 
+47e9 20403e33 call mouse_setgpio_hibernate 
+47ea 202026b5 branch g24_long_sleep 
+
+mouse_wakeup_24g:
+47eb 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+47ec 245a41aa ncall mouse_init_sensor_wakeup ,blank 
+47ed 704be100 jam 0 ,mem_sensor_shutdown_flag 
+47ee 20202651 branch g24_transmit_no_ack 
+
+mouse_24g_transmit_start:
+47ef 6fe0cbe1 fetch 1 ,mem_sensor_shutdown_flag 
+47f0 243a262c nbranch g24_short_sleep ,blank 
+47f1 20202628 branch g24_transmit_start_next 
+
+mouse_24g_stop:
+47f2 793f8026 set0 mark_24g ,mark 
+47f3 7048a100 jam state_24g_stop ,mem_24g_conn_sm 
+47f4 d8e00001 arg mouse_24g_pairing_flag ,queue 
+47f5 202046f4 branch mouse_disable_function_flag 
+
+mouse_24g_start_mode:
+47f6 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+47f7 c308c803 bbit0 mouse_enable_24g ,mouse_24g_mode_setup_error 
+47f8 20403d65 call mouse_wakeup_from_power_check 
+47f9 20344806 branch mouse_24g_reconn_dongle_start ,user 
+47fa 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+47fb c298480c bbit1 mouse_enable_auto_24g_paring ,mouse_24g_reconn_general_dongle 
+47fc c318c80c bbit0 mouse_enable_24g_power_on_pairing ,mouse_24g_reconn_general_dongle 
+47fd 20404110 call mouse_key_check_once 
+47fe 1fe17e07 and pdata ,0x07 ,pdata 
+47ff 6848cbcb fetcht 1 ,mem_mouse_commbination_key_24g 
+4800 98467c00 isub temp ,null 
+4801 2022c827 branch mouse_24g_start_pair_mode ,zero 
+4802 2020480c branch mouse_24g_reconn_general_dongle 
+
+mouse_24g_mode_setup_error:
+4803 6fe0cab0 fetch 1 ,mem_reconn_times 
+4804 243a470e nbranch mouse_polling_device ,blank 
+4805 20600000 rtn 
+
+mouse_24g_reconn_dongle_start:
+4806 6fe14885 fetch 2 ,mem_24g_reconn_timeout_init 
+4807 67e14887 store 2 ,mem_24g_reconn_timeout 
+4808 70488b03 jam receiver_and_3_0_addr ,mem_24g_reconn_type 
+4809 20202559 branch g24_reconn_start 
+
+mouse_24g_first_start_auto_pair_mode:
+480a 20403d65 call mouse_wakeup_from_power_check 
+480b 20344816 branch mouse_24g_first_start_reconn ,user 
+
+mouse_24g_reconn_general_dongle:
+480c 70493800 jam mode_24g_device ,mem_device_flag 
+480d 6fe14bba fetch 2 ,mem_mouse_24g_power_on_fast_conn_timer 
+480e 67e14887 store 2 ,mem_24g_reconn_timeout 
+480f 70488b02 jam fast_conn_and_3_0_addr ,mem_24g_reconn_type 
+4810 20202559 branch g24_reconn_start 
+
+mouse_24g_start_auto_pair:
+4811 204048cc call mouse_discover_setting_led_gpio 
+4812 6fe14881 fetch 2 ,mem_24g_pair_timeout_init 
+4813 67e14887 store 2 ,mem_24g_reconn_timeout 
+4814 70488b04 jam pair_and_3_0_addr ,mem_24g_reconn_type 
+4815 20202559 branch g24_reconn_start 
+
+mouse_24g_first_start_reconn:
+4816 6fe0c938 fetch 1 ,mem_device_flag 
+4817 c0004806 beq mode_24g_device ,mouse_24g_reconn_dongle_start 
+4818 20404314 call mouse_bluetooth_fast_conn_disable 
+4819 2020481a branch mouse_24g_first_bluetooth_reconnect 
+
+mouse_24g_first_bluetooth_reconnect:
+481a 204047f2 call mouse_24g_stop 
+481b 2040490e call mouse_device_led_all_off 
+481c 70493801 jam mode_bt_device1 ,mem_device_flag 
+481d 204045bd call mouse_select_reconn_device 
+481e 20203d59 branch mouse_start_reconnect_device 
+
+mouse_24g_first_bb_event_reconn_timeout:
+481f 20403d65 call mouse_wakeup_from_power_check 
+4820 20343e20 branch mouse_app_enter_hibernate ,user 
+4821 20204553 branch mouse_start_discovery 
+
+mouse_24g_first_store_reconn_info:
+4822 20403d65 call mouse_wakeup_from_power_check 
+4823 20740000 rtn user 
+4824 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4825 c297c5ee bbit1 mouse_enable_24g_first_auto_pairing ,mouse_store_device_info_delay 
+4826 20600000 rtn 
+
+mouse_24g_start_pair_mode:
+4827 d8e00001 arg mouse_24g_pairing_flag ,queue 
+4828 204046f0 call mouse_enable_function_flag 
+4829 58000000 setarg 0 
+482a 67e14887 store 2 ,mem_24g_reconn_timeout 
+482b 20404576 call mouse_stop_discovery 
+482c 2040498e call mouse_low_voltage_led_blink_disable 
+482d 204048cc call mouse_discover_setting_led_gpio 
+482e 70483601 jam type_ms ,mem_24g_data_type 
+482f 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4830 c30aa32e bbit0 mouse_enable_keyboard ,g24_pair_start 
+4831 70483602 jam type_kb ,mem_24g_data_type 
+4832 2020232e branch g24_pair_start 
+
+mouse_24g_attempt_fail:
+4833 6fe0c8a5 fetch 1 ,mem_24g_attempt_fail_flag 
+4834 243a47e1 nbranch mouse_24g_hibernate_set ,blank 
+4835 6fe0c88b fetch 1 ,mem_24g_reconn_type 
+4836 c0014840 beq fast_conn_and_3_0_addr ,mouse_24g_fast_conn_attempt_fail 
+4837 c0024844 beq pair_and_3_0_addr ,mouse_24g_auto_pair_attempt_fail 
+4838 c001c849 beq receiver_and_3_0_addr ,mouse_reconn_dongle_attempt_fail 
+
+mouse_24g_attempt_fail_enter_hibernate:
+4839 20404912 call mouse_device_led_off 
+483a 204047f2 call mouse_24g_stop 
+483b 6fe0cab0 fetch 1 ,mem_reconn_times 
+483c 243a470e nbranch mouse_polling_device ,blank 
+483d 6fe0c938 fetch 1 ,mem_device_flag 
+483e c0003e20 beq mode_24g_device ,mouse_app_enter_hibernate 
+483f 20600000 rtn 
+
+mouse_24g_fast_conn_attempt_fail:
+4840 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4841 c297c811 bbit1 mouse_enable_24g_first_auto_pairing ,mouse_24g_start_auto_pair 
+4842 c2984811 bbit1 mouse_enable_auto_24g_paring ,mouse_24g_start_auto_pair 
+4843 20204806 branch mouse_24g_reconn_dongle_start 
+
+mouse_24g_auto_pair_attempt_fail:
+4844 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4845 c317c839 bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate 
+4846 6fe0cbb4 fetch 1 ,mem_device_number 
+4847 c000c839 beq 1 ,mouse_24g_attempt_fail_enter_hibernate 
+4848 2020481a branch mouse_24g_first_bluetooth_reconnect 
+
+mouse_reconn_dongle_attempt_fail:
+4849 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+484a c317c839 bbit0 mouse_enable_24g_first_auto_pairing ,mouse_24g_attempt_fail_enter_hibernate 
+484b c289c839 bbit1 mouse_enable_eeprom ,mouse_24g_attempt_fail_enter_hibernate 
+484c c2894839 bbit1 mouse_enable_flash ,mouse_24g_attempt_fail_enter_hibernate 
+484d 20204812 branch mouse_24g_start_auto_pair + 1 
+
+mouse_24g_attempt_success:
+484e 204042ca call mouse_init_sensor_reset 
+484f 704aae00 jam 0 ,mem_mouse_long_mult_flag 
+4850 7048a100 jam 0 ,mem_24g_conn_sm 
+4851 70488b00 jam 0 ,mem_24g_reconn_type 
+4852 6fe24891 fetch 4 ,mem_24g_receiver_addr 
+4853 6fe2488d fetch 4 ,mem_24g_fast_conn_addr 
+4854 98467c00 isub temp ,null 
+4855 20628000 rtn zero 
+4856 20204822 branch mouse_24g_first_store_reconn_info 
+
+mouse_24g_pairing_complete:
+4857 d8e00001 arg mouse_24g_pairing_flag ,queue 
+4858 204046f4 call mouse_disable_function_flag 
+4859 204048c6 call mouse_device_poweron_timer_init 
+485a 58000000 setarg 0 
+485b 67e14883 store 2 ,mem_24g_pair_timeout 
+485c 67e14887 store 2 ,mem_24g_reconn_timeout 
+485d 67e0c8a1 store 1 ,mem_24g_conn_sm 
+485e 67e0c9c8 store 1 ,mem_mouse_move_flag 
+485f 67e0c88b store 1 ,mem_24g_reconn_type 
+4860 204042ca call mouse_init_sensor_reset 
+4861 204042db call mouse_read_sensor_common 
+4862 6fe2483c fetch 4 ,mem_24g_addr 
+4863 67e24891 store 4 ,mem_24g_receiver_addr 
+4864 67e24993 store 4 ,mem_mouse_24g_addr 
+4865 202045ee branch mouse_store_device_info_delay 
+
+mouse_24g_package_data:
+4866 c6930000 rtnmark0 mark_24g 
+4867 20403f70 call mouse_motion 
+4868 24740000 nrtn user 
+4869 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+486a c30ac86d bbit0 mouse_enable_keyboard ,mouse_24g_mouse_package_data 
+486b 6fe0cb8b fetch 1 ,mem_customer_key 
+486c 243a4884 nbranch mouse_24g_keyboard_package_data ,blank 
+
+mouse_24g_mouse_package_data:
+486d 204042cb call mouse_data_xy_release 
+486e 6fe0c836 fetch 1 ,mem_24g_data_type 
+486f c280c87c bbit1 1 ,mouse_24g_mouse_package_data_now 
+4870 6848c7c7 fetcht 1 ,mem_24g_txbuf + 1 
+4871 6fe0c8d0 fetch 1 ,mem_mouse_key 
+4872 9841fe00 ior temp ,pdata 
+4873 67e0c8d0 store 1 ,mem_mouse_key 
+4874 6848c7cc fetcht 1 ,mem_24g_txbuf + 6 
+4875 6fe0c8d5 fetch 1 ,mem_mouse_z 
+4876 9840fe00 iadd temp ,pdata 
+4877 67e0c8d5 store 1 ,mem_mouse_z 
+4878 6848c7cd fetcht 1 ,mem_24g_txbuf + 7 
+4879 6fe0c8d6 fetch 1 ,mem_mouse_tz 
+487a 9840fe00 iadd temp ,pdata 
+487b 67e0c8d6 store 1 ,mem_mouse_tz 
+
+mouse_24g_mouse_package_data_now:
+487c 70483601 jam type_ms ,mem_24g_data_type 
+487d da200007 arg 7 ,rega 
+487e da4048d0 arg mem_mouse_key ,regb 
+487f 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4880 c28c26e1 bbit1 mouse_enable_24g_250hz ,g24_transmit_by_interrupt_enable 
+4881 6fe148d5 fetch 2 ,mem_mouse_z 
+4882 207a0000 rtn blank 
+4883 202026e1 branch g24_transmit_by_interrupt_enable 
+
+mouse_24g_keyboard_package_data:
+4884 70483602 jam type_kb ,mem_24g_data_type 
+4885 da200009 arg 9 ,rega 
+4886 6fe0cb8c fetch 1 ,mem_customer_data_trigger 
+4887 243a488a nbranch mouse_customer_key_press ,blank 
+4888 da404bd5 arg mem_customer_key_release ,regb 
+4889 20600000 rtn 
+
+mouse_customer_key_press:
+488a da404bcc arg mem_customer_key_press ,regb 
+488b 20600000 rtn 
+
+mouse_24g_search_dongle_init:
+488c 58000000 setarg 0 
+488d 67e1cba4 store 3 ,mem_mouse_search_dongle_action 
+488e 20600000 rtn 
+
+mouse_24g_search_dongle:
+488f 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4890 c40b0000 rtnbit0 mouse_enable_24g_search_dongle 
+4891 6fe0caae fetch 1 ,mem_mouse_long_mult_flag 
+4892 207a0000 rtn blank 
+4893 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+4894 207a0000 rtn blank 
+4895 6fe0cba1 fetch 1 ,mem_mouse_search_dongle_interval 
+4896 1fe0fe01 increase 1 ,pdata 
+4897 1fe17e03 and_into 3 ,pdata 
+4898 67e0cba1 store 1 ,mem_mouse_search_dongle_interval 
+4899 247a0000 nrtn blank 
+489a 704ba200 jam 0 ,mem_mouse_search_dongle_ch 
+
+mouse_24g_search_dongle_loop:
+489b 6fe0cba2 fetch 1 ,mem_mouse_search_dongle_ch 
+489c 1fe0fe01 increase 1 ,pdata 
+489d 67e0cba2 store 1 ,mem_mouse_search_dongle_ch 
+489e 1fe67c08 sub pdata ,g24_ch_number ,null 
+489f 242148a5 nbranch mouse_24g_search_dongle_loop_end ,positive 
+48a0 2040259a call g24_reconn_data_prep 
+48a1 2040265b call g24_transmit_receive_ack 
+48a2 242c48ab nbranch mouse_24g_search_dongle_loop_retry ,sync 
+48a3 2437c8ab nbranch mouse_24g_search_dongle_loop_retry ,user3 
+48a4 204048b5 call mouse_24g_search_dongle_success 
+
+mouse_24g_search_dongle_loop_end:
+48a5 20402597 call g24_txbuf_clear 
+48a6 6fe0cba3 fetch 1 ,mem_mouse_search_dongle_count 
+48a7 1fe0fe01 increase 1 ,pdata 
+48a8 67e0cba3 store 1 ,mem_mouse_search_dongle_count 
+48a9 c00848ad beq g24_ch_poll_count ,mouse_24g_search_dongle_check 
+48aa 20600000 rtn 
+
+mouse_24g_search_dongle_loop_retry:
+48ab 204022cb call g24_ch 
+48ac 2020489b branch mouse_24g_search_dongle_loop 
+
+mouse_24g_search_dongle_check:
+48ad 704ba300 jam 0 ,mem_mouse_search_dongle_count 
+48ae 6fe0cba4 fetch 1 ,mem_mouse_search_dongle_action 
+48af c3800000 rtnbit1 g24_disconn_state 
+48b0 79207e00 set1 g24_disconn_state ,pdata 
+48b1 67e0cba4 store 1 ,mem_mouse_search_dongle_action 
+48b2 6fe14bbc fetch 2 ,mem_mouse_24g_search_dongle_time_init 
+48b3 67e14ab2 store 2 ,mem_mouse_no_data_timer 
+48b4 2020423c branch mouse_sensor_powerdown 
+
+mouse_24g_search_dongle_success:
+48b5 6fe0c8a7 fetch 1 ,mem_24g_abort_pac 
+48b6 203a488c branch mouse_24g_search_dongle_init ,blank 
+48b7 704ba300 jam 0 ,mem_mouse_search_dongle_count 
+48b8 6fe0cba4 fetch 1 ,mem_mouse_search_dongle_action 
+48b9 c4000000 rtnbit0 g24_disconn_state 
+48ba 793ffe00 set0 g24_disconn_state ,pdata 
+48bb 67e0cba4 store 1 ,mem_mouse_search_dongle_action 
+48bc 20404544 call mouse_no_data_timer_init 
+48bd 202041aa branch mouse_init_sensor_wakeup 
+
+mouse_device_poweron_timer:
+48be 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+48bf c4100000 rtnbit0 mouse_enable_power_on_led 
+48c0 6fe0cba7 fetch 1 ,mem_mouse_device_poweron_timer_count 
+48c1 207a0000 rtn blank 
+48c2 1fe0ffff increase -1 ,pdata 
+48c3 67e0cba7 store 1 ,mem_mouse_device_poweron_timer_count 
+48c4 203a4912 branch mouse_device_led_off ,blank 
+48c5 20204920 branch mouse_device_led_on 
+
+mouse_device_poweron_timer_init:
+48c6 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+48c7 c4100000 rtnbit0 mouse_enable_power_on_led 
+48c8 2040498e call mouse_low_voltage_led_blink_disable 
+48c9 6fe0cbc0 fetch 1 ,mem_mouse_device_poweron_timer_count_init 
+48ca 67e0cba7 store 1 ,mem_mouse_device_poweron_timer_count 
+48cb 20600000 rtn 
+
+mouse_discover_setting_led_gpio:
+48cc 704ba700 jam 0 ,mem_mouse_device_poweron_timer_count 
+48cd 6fe14bc4 fetch 2 ,mem_mouse_disconvey_led_blink_time 
+48ce 67e14930 store 2 ,mem_mouse_on_time 
+48cf 67e14932 store 2 ,mem_mouse_off_time 
+
+mouse_setting_led_gpio_comman:
+48d0 6fe0c938 fetch 1 ,mem_device_flag 
+48d1 c00048d5 beq mode_24g_device ,mouse_device_led_24g 
+48d2 c000c8d7 beq mode_bt_device1 ,mouse_device_led_bt1 
+48d3 c00148d9 beq mode_bt_device2 ,mouse_device_led_bt2 
+48d4 20600000 rtn 
+
+mouse_device_led_24g:
+48d5 6fe0c915 fetch 1 ,mem_config_device_24g_led_gpio 
+48d6 202048da branch mouse_led_blink 
+
+mouse_device_led_bt1:
+48d7 6fe0c916 fetch 1 ,mem_config_device_bt1_led_gpio 
+48d8 202048da branch mouse_led_blink 
+
+mouse_device_led_bt2:
+48d9 6fe0c922 fetch 1 ,mem_config_device_bt2_led_gpio 
+
+mouse_led_blink:
+48da 67e08964 store 1 ,mem_temp 
+48db 20404912 call mouse_device_led_off 
+48dc 6fe08964 fetch 1 ,mem_temp 
+48dd 67e0c92f store 1 ,mem_mouse_struct_led_gpio 
+48de da200000 arg 0 ,rega 
+48df 70492d01 jam ui_led_state_blink_start ,mem_mouse_led_type 
+48e0 20207806 branch ui_led_blink_start_global 
+
+mouse_dpi_led_blink_delay:
+48e1 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+48e2 c17f8000 rtneq gpio_disable 
+48e3 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
+48e4 247a0000 nrtn blank 
+48e5 6fe14883 fetch 2 ,mem_24g_pair_timeout 
+48e6 247a0000 nrtn blank 
+48e7 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
+48e8 247a0000 nrtn blank 
+48e9 6fe0cba7 fetch 1 ,mem_mouse_device_poweron_timer_count 
+48ea 247a0000 nrtn blank 
+48eb 6fe0cbc1 fetch 1 ,mem_mouse_dpi_led_delay_count_init 
+48ec 203a48f2 branch mouse_dpi_led_blink_init ,blank 
+48ed 67e0cba8 store 1 ,mem_mouse_dpi_led_delay_count 
+48ee 20600000 rtn 
+
+mouse_dpi_led_blink_delay_timer:
+48ef da604ba8 arg mem_mouse_dpi_led_delay_count ,regc 
+48f0 da4048f2 arg mouse_dpi_led_blink_init ,regb 
+48f1 2020318a branch timer_single_step 
+
+mouse_dpi_led_blink_init:
+48f2 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+48f3 67e0c92f store 1 ,mem_mouse_struct_led_gpio 
+48f4 6fe14bc2 fetch 2 ,mem_mouse_dpi_led_blink_time 
+48f5 67e14930 store 2 ,mem_mouse_on_time 
+48f6 67e14932 store 2 ,mem_mouse_off_time 
+48f7 da200000 arg 0 ,rega 
+48f8 6848c992 fetcht 1 ,mem_mouse_dpi 
+48f9 18408401 increase 1 ,temp 
+48fa 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+48fb c30e48ff bbit0 mouse_enable_dpi_level_4 ,mouse_dpi_led_blink_init_end 
+48fc 18408401 increase 1 ,temp 
+48fd 18467c04 sub temp ,4 ,null 
+48fe 24414902 ncall mouse_dpi_led_blink_count_clean ,positive 
+
+mouse_dpi_led_blink_init_end:
+48ff 6048c92e storet 1 ,mem_mouse_blink_count 
+4900 70492d01 jam ui_led_state_blink_start ,mem_mouse_led_type 
+4901 20600000 rtn 
+
+mouse_dpi_led_blink_count_clean:
+4902 d8400001 arg 1 ,temp 
+4903 20600000 rtn 
+
+mouse_check_dpi_blink:
+4904 78547c00 disable user 
+4905 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+4906 6848c92f fetcht 1 ,mem_mouse_struct_led_gpio 
+4907 98467c00 isub temp ,null 
+4908 24628000 nrtn zero 
+4909 6fe0c92e fetch 1 ,mem_mouse_blink_count 
+490a 207a0000 rtn blank 
+490b 7048f900 jam 0 ,mem_adc_low_volatage_led_blink_enable 
+490c 78347c00 enable user 
+490d 20600000 rtn 
+
+mouse_device_led_all_off:
+490e 2040491e call mouse_dpi_led_off 
+490f 20404917 call mouse_device_24g_led_off 
+4910 2040491a call mouse_device_bt1_led_off 
+4911 2020491c branch mouse_device_bt2_led_off 
+
+mouse_device_led_off:
+4912 6fe0c938 fetch 1 ,mem_device_flag 
+4913 c0004917 beq mode_24g_device ,mouse_device_24g_led_off 
+4914 c000c91a beq mode_bt_device1 ,mouse_device_bt1_led_off 
+4915 c001491c beq mode_bt_device2 ,mouse_device_bt2_led_off 
+4916 20600000 rtn 
+
+mouse_device_24g_led_off:
+4917 704baa00 jam 0 ,mem_24g_device_led_status 
+4918 6848c915 fetcht 1 ,mem_config_device_24g_led_gpio 
+4919 2020492b branch mouse_led_off 
+
+mouse_device_bt1_led_off:
+491a 6848c916 fetcht 1 ,mem_config_device_bt1_led_gpio 
+491b 2020492b branch mouse_led_off 
+
+mouse_device_bt2_led_off:
+491c 6848c922 fetcht 1 ,mem_config_device_bt2_led_gpio 
+491d 2020492b branch mouse_led_off 
+
+mouse_dpi_led_off:
+491e 6848c923 fetcht 1 ,mem_dpi_led_gpio 
+491f 2020492b branch mouse_led_off 
+
+mouse_device_led_on:
+4920 6fe0c938 fetch 1 ,mem_device_flag 
+4921 c0004925 beq mode_24g_device ,mouse_device_24g_led_on 
+4922 c000c927 beq mode_bt_device1 ,mouse_device_bt1_led_on 
+4923 c0014929 beq mode_bt_device2 ,mouse_device_bt2_led_on 
+4924 20600000 rtn 
+
+mouse_device_24g_led_on:
+4925 6848c915 fetcht 1 ,mem_config_device_24g_led_gpio 
+4926 2020492f branch mouse_led_on 
+
+mouse_device_bt1_led_on:
+4927 6848c916 fetcht 1 ,mem_config_device_bt1_led_gpio 
+4928 2020492f branch mouse_led_on 
+
+mouse_device_bt2_led_on:
+4929 6848c922 fetcht 1 ,mem_config_device_bt2_led_gpio 
+492a 2020492f branch mouse_led_on 
+
+mouse_led_off:
+492b 44f0c01c bpatch patch1c_1 ,mem_patch1c 
+492c 6048c92f storet 1 ,mem_mouse_struct_led_gpio 
+492d da200000 arg 0 ,rega 
+492e 20207801 branch ui_led_off_global 
+
+mouse_led_on:
+492f 44f1401c bpatch patch1c_2 ,mem_patch1c 
+4930 6048c92f storet 1 ,mem_mouse_struct_led_gpio 
+4931 da200000 arg 0 ,rega 
+4932 202077fc branch ui_led_on_global 
+
+mouse_ui_led_off_static:
+4933 6fe0c915 fetch 1 ,mem_config_device_24g_led_gpio 
+4934 98467c00 isub temp ,null 
+4935 2042c952 call mouse_clear_24g_led_statue ,zero 
+4936 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4937 c3126065 bbit0 mouse_enable_4_led ,gpio_out_inactive 
+4938 20404943 call mouse_check_bt2_led_off 
+4939 20404947 call mouse_check_dpi_led_off 
+493a 2040494b call mouse_check_low_v_led_off 
+493b 6fe0cba9 fetch 1 ,mem_mouse_led_off_4_led 
+493c 203a6065 branch gpio_out_inactive ,blank 
+493d 704ba900 jam 0 ,mem_mouse_led_off_4_led 
+493e 2020607f branch gpio_set_high_impedance 
+
+mouse_ui_led_on_static:
+493f 6fe0c915 fetch 1 ,mem_config_device_24g_led_gpio 
+4940 98467c00 isub temp ,null 
+4941 2042c954 call mouse_set_24g_led_statue ,zero 
+4942 20206069 branch gpio_out_active 
+
+mouse_check_bt2_led_off:
+4943 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4944 c4130000 rtnbit0 mouse_enable_bt2_for_4_led 
+4945 6fe0c922 fetch 1 ,mem_config_device_bt2_led_gpio 
+4946 2020494e branch mouse_check_1gpio_2led_off 
+
+mouse_check_dpi_led_off:
+4947 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4948 c4128000 rtnbit0 mouse_enable_dpi_for_4_led 
+4949 6fe0c923 fetch 1 ,mem_dpi_led_gpio 
+494a 2020494e branch mouse_check_1gpio_2led_off 
+
+mouse_check_low_v_led_off:
+494b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+494c c4138000 rtnbit0 mouse_enable_low_v_for_4_led 
+494d 6fe0c921 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+
+mouse_check_1gpio_2led_off:
+494e 98467c00 isub temp ,null 
+494f 24628000 nrtn zero 
+4950 704ba901 jam 1 ,mem_mouse_led_off_4_led 
+4951 20600000 rtn 
+
+mouse_clear_24g_led_statue:
+4952 704baa00 jam 0 ,mem_24g_device_led_status 
+4953 20600000 rtn 
+
+mouse_set_24g_led_statue:
+4954 704baa01 jam 1 ,mem_24g_device_led_status 
+4955 20600000 rtn 
+
+mouse_low_voltage_led_timer:
+4956 6fe14ac2 fetch 2 ,mem_mouse_discovery_timer 
+4957 247a0000 nrtn blank 
+4958 6fe14883 fetch 2 ,mem_24g_pair_timeout 
+4959 247a0000 nrtn blank 
+495a 6fe14887 fetch 2 ,mem_24g_reconn_timeout 
+495b 247a0000 nrtn blank 
+495c 6fe0cba7 fetch 1 ,mem_mouse_device_poweron_timer_count 
+495d 247a0000 nrtn blank 
+495e 20404904 call mouse_check_dpi_blink 
+495f 20740000 rtn user 
+4960 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4961 c4108000 rtnbit0 mouse_enable_low_voltage_led 
+4962 c4020000 rtnbit0 mouse_low_voltage_flag 
+4963 c291c97c bbit1 mouse_enable_low_voltage_led_blink_n_second ,mouse_low_voltage_led_blink_new_data 
+4964 6fe0c8f8 fetch 1 ,mem_adc_low_volatage_led_timer_count 
+4965 1fe0fe01 increase 1 ,pdata 
+4966 67e0c8f8 store 1 ,mem_adc_low_volatage_led_timer_count 
+4967 1fe67c14 sub pdata ,20 ,null 
+4968 2441496e ncall mouse_adc_low_volatage_led_timer_count_clean ,positive 
+4969 c0014970 beq 2 ,mouse_low_voltage_led_on 
+496a c0024976 beq 4 ,mouse_low_voltage_led_off 
+496b c0034970 beq 6 ,mouse_low_voltage_led_on 
+496c c0044976 beq 8 ,mouse_low_voltage_led_off 
+496d 20600000 rtn 
+
+mouse_adc_low_volatage_led_timer_count_clean:
+496e 7048f801 jam 1 ,mem_adc_low_volatage_led_timer_count 
+496f 20204976 branch mouse_low_voltage_led_off 
+
+mouse_low_voltage_led_on:
+4970 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4971 c2914920 bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_device_led_on 
+4972 6fe0c921 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+4973 c17f8000 rtneq gpio_disable 
+4974 6848c921 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+4975 2020492f branch mouse_led_on 
+
+mouse_low_voltage_led_off:
+4976 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4977 c2914912 bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_device_led_off 
+4978 6fe0c921 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+4979 c17f8000 rtneq gpio_disable 
+497a 6848c921 fetcht 1 ,mem_config_low_voltage_alarm_gpio 
+497b 2020492b branch mouse_led_off 
+
+mouse_low_voltage_led_blink_new_data:
+497c 6fe14bbe fetch 2 ,mem_mouse_no_data_timeout 
+497d 68494ab2 fetcht 2 ,mem_mouse_no_data_timer 
+497e 98460400 isub temp ,temp 
+497f 6fe14bc8 fetch 2 ,mem_adc_low_volatage_led_blink_timer 
+4980 98467c00 isub temp ,null 
+4981 2421498e nbranch mouse_low_voltage_led_blink_disable ,positive 
+4982 6fe0c8f9 fetch 1 ,mem_adc_low_volatage_led_blink_enable 
+4983 247a0000 nrtn blank 
+4984 7048f901 jam 1 ,mem_adc_low_volatage_led_blink_enable 
+4985 20204986 branch mouse_low_voltage_led_blink_init 
+
+mouse_low_voltage_led_blink_init:
+4986 6fe14bc6 fetch 2 ,mem_mouse_low_v_led_blink_time 
+4987 67e14930 store 2 ,mem_mouse_on_time 
+4988 67e14932 store 2 ,mem_mouse_off_time 
+4989 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+498a c29148d0 bbit1 mouse_enable_low_voltage_use_mode_led ,mouse_setting_led_gpio_comman 
+498b 6fe0c921 fetch 1 ,mem_config_low_voltage_alarm_gpio 
+498c c17f8000 rtneq gpio_disable 
+498d 202048da branch mouse_led_blink 
+
+mouse_low_voltage_led_blink_disable:
+498e 7048f900 jam 0 ,mem_adc_low_volatage_led_blink_enable 
+498f 20204976 branch mouse_low_voltage_led_off 
+
+mouse_low_voltage_led_no_enter_lpm:
+4990 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+4991 c4108000 rtnbit0 mouse_enable_low_voltage_led 
+4992 c4020000 rtnbit0 mouse_low_voltage_flag 
+4993 c291c9a2 bbit1 mouse_enable_low_voltage_led_blink_n_second ,mouse_low_voltage_led_no_enter_lpm_blink 
+4994 6fe0c8f8 fetch 1 ,mem_adc_low_volatage_led_timer_count 
+4995 1fe67c0a sub pdata ,10 ,null 
+4996 2021499e branch mouse_lpm_mode_clear ,positive 
+
+mouse_low_voltage_led_no_enter_lpm_next:
+4997 6fe0c938 fetch 1 ,mem_device_flag 
+4998 c000499b beq mode_24g_device ,g24_transmit_by_interrupt_exit_check 
+4999 70409901 jam 1 ,mem_lpm_mode 
+499a 20600000 rtn 
+
+g24_transmit_by_interrupt_exit_check:
+499b 6fe44bab fetch mouse_flag_len ,mem_mouse_flag 
+499c c38c0000 rtnbit1 mouse_enable_24g_250hz 
+499d 202026d0 branch g24_transmit_by_interrupt_exit 
+
+mouse_lpm_mode_clear:
+499e 6fe0c938 fetch 1 ,mem_device_flag 
+499f c00026e1 beq mode_24g_device ,g24_transmit_by_interrupt_enable 
+49a0 70409900 jam 0 ,mem_lpm_mode 
+49a1 20600000 rtn 
+
+mouse_low_voltage_led_no_enter_lpm_blink:
+49a2 6fe0c8f9 fetch 1 ,mem_adc_low_volatage_led_blink_enable 
+49a3 243a499e nbranch mouse_lpm_mode_clear ,blank 
+49a4 20204997 branch mouse_low_voltage_led_no_enter_lpm_next 
+
+mouse_store_signal_rssi:
+49a5 20401291 call rssi_hex2dec 
+49a6 6fe08018 fetch 1 ,mem_rssi 
+49a7 202025e2 branch rssi_signal 
+
+mouse_le_transmit:
+49a8 204049a5 call mouse_store_signal_rssi 
+49a9 202026ee branch power_ctrl_start 
+
+mouse_bt_slave_match:
+49aa 204049a5 call mouse_store_signal_rssi 
+49ab 6fe08031 fetch 1 ,mem_state 
+49ac 2feffe00 isolate1 state_inconn ,pdata 
+49ad 24608000 nrtn true 
+49ae 6fe08048 fetch 1 ,mem_arq 
+49af 2feffe03 isolate1 wack ,pdata 
+49b0 2040a724 call power_ctrl_pac_succ_decrs ,true 
+49b1 2440a720 ncall power_ctrl_pac_succ_incrs ,true 
+49b2 202026ee branch power_ctrl_start 
+
+mouse_le_set_lpm_mult:
+49b3 6fe0cb75 fetch 1 ,mem_le_connect_status_flag 
+49b4 2fe00603 compare 3 ,pdata ,3 
+49b5 2420fe5e nbranch disable_blank ,true 
+49b6 20403223 call app_lpm_mult_enable 
+49b7 20207e60 branch enable_blank 
+
+mouse_bt_set_lpm_mult:
+49b8 204052f7 call l2cap_malloc_is_fifo_empty 
+49b9 247a0000 nrtn blank 
+49ba 70008901 jam 1 ,mem_current_sniff_attempt 
+49bb 70008a00 jam 0 ,mem_current_sniff_timeout 
+49bc 20207e60 branch enable_blank 
+
+mouse_set_lpm_mult:
+49bd 6fe1478c fetch 2 ,mem_ui_state_map 
+49be c284c9b3 bbit1 ui_state_ble_connected ,mouse_le_set_lpm_mult 
+49bf 202049b8 branch mouse_bt_set_lpm_mult 
+
+remote_car_init:
+49c0 20758000 rtn wake 
+49c1 20406172 call keyscan_key_init 
+49c2 58004a74 setarg remote_car_g24_package_data 
+49c3 67e1489b store 2 ,mem_cb_24g_transmit_data 
+49c4 58004a03 setarg remote_car_process_lpm_before 
+49c5 67e1489f store 2 ,mem_cb_24g_lpm_before 
+49c6 580049fe setarg remote_car_le_before_hibernate 
+49c7 67e1445d store 2 ,mem_cb_before_hibernate 
+49c8 58004a3e setarg remote_car_scale_process_idle 
+49c9 67e14465 store 2 ,mem_cb_idle_process 
+49ca 58004a40 setarg remote_car_scale_process_bb_event 
+49cb 67e14467 store 2 ,mem_cb_bb_event_process 
+49cc 58004a59 setarg remote_car_event_timer 
+49cd 67e1446f store 2 ,mem_cb_event_timer 
+49ce 580049f3 setarg remote_car_power_off_signal 
+49cf 67e14991 store 2 ,mem_remote_car_power_off_cb 
+49d0 580049e3 setarg remote_car_soft_switch_power_on_signal 
+49d1 67e14995 store 2 ,mem_remote_car_power_standby_cb 
+49d2 44f1c01c bpatch patch1c_3 ,mem_patch1c 
+49d3 20405dbc call set_eeprom_size_2k 
+49d4 204049fa call remote_car_init_environment 
+49d5 2040793a call queue_init 
+49d6 6fe0c961 fetch 1 ,mem_remote_car_config_soft_switch_enable 
+49d7 67e0c8d0 store 1 ,mem_remote_car_hard_soft_switch 
+49d8 c00049e2 beq hard_switch ,remote_car_hard_switch_power_on_signal 
+49d9 6fe0c962 fetch 1 ,mem_remote_car_config_soft_switch_gpio 
+49da 67e0c790 store 1 ,mem_ui_button_gpio 
+
+remote_car_soft_switch_power_on_init:
+49db 204049f3 call remote_car_ui_led_init 
+49dc 204077bb call ui_button_init 
+49dd 204077c5 call ui_button_polling 
+49de 70498d01 jam power_starting ,mem_remote_car_power_state 
+49df 6fe1478c fetch 2 ,mem_ui_state_map 
+49e0 c3860000 rtnbit1 ui_state_btn_down 
+49e1 20203217 branch app_enter_hibernate 
+
+remote_car_hard_switch_power_on_signal:
+49e2 70498d02 jam power_standby ,mem_remote_car_power_state 
+
+remote_car_soft_switch_power_on_signal:
+49e3 204049f3 call remote_car_ui_led_init 
+49e4 da200000 arg 0 ,rega 
+49e5 20407806 call ui_led_blink_start_global 
+49e6 204049ef call remote_car_set_24g_addr_eeprom 
+49e7 20405ddc call iicd_read_eep_data 
+49e8 204026e5 call g24_factory_check 
+49e9 2034232e branch g24_pair_start ,user 
+49ea 6fe2483c fetch 4 ,mem_24g_addr 
+49eb 67e24891 store 4 ,mem_24g_receiver_addr 
+49ec 6fe14885 fetch 2 ,mem_24g_reconn_timeout_init 
+49ed 67e14887 store 2 ,mem_24g_reconn_timeout 
+49ee 20202559 branch g24_reconn_start 
+
+remote_car_set_24g_addr_eeprom:
+49ef d8400004 arg 4 ,temp 
+49f0 da20483c arg mem_24g_addr ,rega 
+49f1 da400000 arg remote_info_eeprom_offect ,regb 
+49f2 20600000 rtn 
+
+remote_car_power_off_signal:
+
+remote_car_ui_led_init:
+49f3 44f2401c bpatch patch1c_4 ,mem_patch1c 
+49f4 6fe0c95f fetch 1 ,mem_remote_car_config_connect_led_gpio 
+49f5 c0ffc9f8 bne invalid_pin_num ,remote_car_pairing_led_gpio_set 
+
+remote_car_ui_led_init_1:
+49f6 6848c93c fetcht 1 ,mem_remote_car_led_map 
+49f7 20206069 branch gpio_config_output 
+
+remote_car_pairing_led_gpio_set:
+49f8 67e0c93c store 1 ,mem_remote_car_led_map 
+49f9 202049f6 branch remote_car_ui_led_init_1 
+
+remote_car_init_environment:
+49fa 20402607 call g24_transmit_init 
+
+remote_no_data_timer_init:
+49fb 6fe14989 fetch 2 ,mem_remote_car_no_data_timeout 
+49fc 67e1498b store 2 ,mem_remote_car_no_data_timer 
+49fd 20600000 rtn 
+
+remote_car_le_before_hibernate:
+49fe 20404a03 call remote_car_process_lpm_before 
+
+remote_gpio_set_before_hibernate:
+49ff 6fe0c932 fetch 1 ,mem_remote_style_struct_led_gpio 
+4a00 79207e07 set1 7 ,pdata 
+4a01 d840003f arg gpcfg_output_high ,temp 
+4a02 20206092 branch gpio_config_function 
+
+remote_car_process_lpm_before:
+4a03 2040609f call gpio_set_before_lpm 
+4a04 20206197 branch keyscan_process_lpm_before 
+
+remote_car_key_scan_process:
+4a05 204061a3 call keyscan_key_process 
+4a06 20404a16 call get_remote_key_state 
+4a07 20404a09 call remote_conn_led_state 
+4a08 20204a24 branch send_data 
+
+remote_conn_led_state:
+4a09 6fe0c998 fetch 1 ,mem_remote_car_24g_status 
+4a0a c1808000 rtnne work_paired 
+4a0b 6fe2499c fetch 4 ,mem_remote_car_motor1_key0_press_state 
+4a0c 203a4a10 branch remote_car_stop_state ,blank 
+4a0d 7049a200 jam 0 ,mem_remote_car_no_data_check 
+4a0e 78347c00 enable user 
+4a0f 2020790b branch check_51cmd_led_on 
+
+remote_car_stop_state:
+4a10 6fe0c9a2 fetch 1 ,mem_remote_car_no_data_check 
+4a11 c17f8000 rtneq 0xff 
+4a12 1fe0fe01 pincrease 1 
+4a13 67e0c9a2 store 1 ,mem_remote_car_no_data_check 
+4a14 78547c00 disable user 
+4a15 20207909 branch check_51cmd_led_off 
+
+get_remote_key_state:
+4a16 684944c8 fetcht 2 ,mem_key_value_retention 
+4a17 18417e01 and temp ,0x01 ,pdata 
+4a18 18430400 rshift temp ,temp 
+4a19 67e0c99c store 1 ,mem_remote_car_motor1_key0_press_state 
+4a1a 18417e01 and temp ,0x01 ,pdata 
+4a1b 18430400 rshift temp ,temp 
+4a1c 67e0c99d store 1 ,mem_remote_car_motor1_key1_press_state 
+4a1d 18417e01 and temp ,0x01 ,pdata 
+4a1e 18430400 rshift temp ,temp 
+4a1f 67e0c99e store 1 ,mem_remote_car_motor2_key2_press_state 
+4a20 18417e01 and temp ,0x01 ,pdata 
+4a21 18430400 rshift temp ,temp 
+4a22 67e0c99f store 1 ,mem_remote_car_motor2_key3_press_state 
+4a23 20600000 rtn 
+
+send_data:
+4a24 44f2c01c bpatch patch1c_5 ,mem_patch1c 
+4a25 20404a34 call remote_car_fb_check 
+4a26 20404a39 call remote_car_lr_check 
+4a27 20404a2a call remote_car_no_data_timeout_check 
+4a28 24740000 nrtn user 
+4a29 20204a70 branch remote_car_send_key 
+
+remote_car_no_data_timeout_check:
+4a2a 6fe0c998 fetch 1 ,mem_remote_car_24g_status 
+4a2b c1808000 rtnne work_paired 
+4a2c 6fe0c9a2 fetch 1 ,mem_remote_car_no_data_check 
+4a2d 207a0000 rtn blank 
+4a2e 1fe67c01 sub pdata ,1 ,null 
+4a2f 24610000 nrtn positive 
+4a30 6fe14885 fetch 2 ,mem_24g_reconn_timeout_init 
+4a31 67e14887 store 2 ,mem_24g_reconn_timeout 
+4a32 78347c00 enable user 
+4a33 20600000 rtn 
+
+remote_car_fb_check:
+4a34 6fe0c99c fetch 1 ,mem_remote_car_motor1_key0_press_state 
+4a35 243a4a64 nbranch remote_car_send_motor1_key0_press ,blank 
+4a36 6fe0c99d fetch 1 ,mem_remote_car_motor1_key1_press_state 
+4a37 243a4a66 nbranch remote_car_send_motor1_key1_press ,blank 
+4a38 20204a6c branch remote_car_send_motor1_key0_rel 
+
+remote_car_lr_check:
+4a39 6fe0c99e fetch 1 ,mem_remote_car_motor2_key2_press_state 
+4a3a 243a4a68 nbranch remote_car_send_motor2_key2_press ,blank 
+4a3b 6fe0c99f fetch 1 ,mem_remote_car_motor2_key3_press_state 
+4a3c 243a4a6a nbranch remote_car_send_motor2_key3_press ,blank 
+4a3d 20204a6e branch remote_car_send_motor2_key2_rel 
+
+remote_car_scale_process_idle:
+4a3e 20404a4e call remote_car_24g_status_process 
+4a3f 20204a05 branch remote_car_key_scan_process 
+
+remote_car_scale_process_bb_event:
+4a40 1a627e00 copy regc ,pdata 
+4a41 c016b23f beq bt_evt_button_up ,app_event_button_up 
+4a42 c0083227 beq bt_evt_button_long_pressed ,app_button_long_pressed 
+4a43 c01cca48 beq bt_evt_24g_pairing_complete ,remote_car_24g_pairing_complete 
+4a44 c01e4a4a beq bt_evt_24g_attempt_success ,remote_car_24g_attempt_success 
+4a45 c01d4a47 beq bt_evt_24g_attempt_fail ,remote_car_24g_attempt_fail 
+4a46 20600000 rtn 
+
+remote_car_24g_attempt_fail:
+4a47 20202597 branch g24_txbuf_clear 
+
+remote_car_24g_pairing_complete:
+4a48 204049ef call remote_car_set_24g_addr_eeprom 
+4a49 20405dce call iicd_write_protect_eep_data 
+
+remote_car_24g_attempt_success:
+4a4a 7048a100 jam 0 ,mem_24g_conn_sm 
+4a4b 70499901 jam work_paired ,mem_remote_car_24g_auto_work_step 
+4a4c 70499a01 jam work_paired ,mem_remote_car_24g_pair_success_flag 
+4a4d 20600000 rtn 
+
+remote_car_24g_status_process:
+4a4e 6fe0c999 fetch 1 ,mem_remote_car_24g_auto_work_step 
+4a4f c1000000 rtneq power_on 
+4a50 6fe0c998 fetch 1 ,mem_remote_car_24g_status 
+4a51 c1008000 rtneq work_paired 
+4a52 70499801 jam work_paired ,mem_remote_car_24g_status 
+
+remote_car_scale_process_paired:
+4a53 da200000 arg 0 ,rega 
+4a54 20207801 branch ui_led_off_global 
+
+remote_car_scale_process_shutdown:
+4a55 da200000 arg 0 ,rega 
+4a56 20407801 call ui_led_off_global 
+4a57 204049f3 call remote_car_ui_led_init 
+4a58 20203217 branch app_enter_hibernate 
+
+remote_car_event_timer:
+4a59 20403198 call app_power_timer 
+4a5a 2040232b call g24_pair_timeout_timer 
+4a5b 20402556 call g24_reconn_timeout_timer 
+4a5c 20204a5d branch remote_car_no_data_timer 
+
+remote_car_no_data_timer:
+4a5d 6fe0c963 fetch 1 ,mem_remote_car_config_timeout_shutdown_enable 
+4a5e 207a0000 rtn blank 
+4a5f 6fe0c4c8 fetch 1 ,mem_key_value_retention 
+4a60 243a49fb nbranch remote_no_data_timer_init ,blank 
+4a61 da60498b arg mem_remote_car_no_data_timer ,regc 
+4a62 da404a55 arg remote_car_scale_process_shutdown ,regb 
+4a63 20203191 branch timer_single_step_2b 
+
+remote_car_send_motor1_key0_press:
+4a64 70496a01 jam motor_positive ,mem_remote_car_24g_motor1_payload 
+4a65 20600000 rtn 
+
+remote_car_send_motor1_key1_press:
+4a66 70496a02 jam motor_negative ,mem_remote_car_24g_motor1_payload 
+4a67 20600000 rtn 
+
+remote_car_send_motor2_key2_press:
+4a68 70496c01 jam motor_positive ,mem_remote_car_24g_motor2_payload 
+4a69 20600000 rtn 
+
+remote_car_send_motor2_key3_press:
+4a6a 70496c02 jam motor_negative ,mem_remote_car_24g_motor2_payload 
+4a6b 20600000 rtn 
+
+remote_car_send_motor1_key0_rel:
+
+remote_car_send_motor1_key1_rel:
+4a6c 70496a00 jam motor_stop ,mem_remote_car_24g_motor1_payload 
+4a6d 20600000 rtn 
+
+remote_car_send_motor2_key2_rel:
+
+remote_car_send_motor2_key3_rel:
+4a6e 70496c00 jam motor_stop ,mem_remote_car_24g_motor2_payload 
+4a6f 20600000 rtn 
+
+remote_car_send_key:
+4a70 da204964 arg mem_remote_car_24g_motor_packet ,rega 
+4a71 2020793f branch queue_push 
+
+remote_car_send_attack:
+4a72 da204971 arg mem_remote_car_24g_fire_packet ,rega 
+4a73 2020793f branch queue_push 
+
+remote_car_g24_package_data:
+4a74 6fe0c99a fetch 1 ,mem_remote_car_24g_pair_success_flag 
+4a75 c000ca7e beq work_paired ,remote_car_g24_send_empty 
+4a76 da20497a arg mem_remote_car_24g_tx_temp ,rega 
+4a77 20407956 call queue_pop 
+4a78 24344a83 nbranch remote_car_moto_data ,user 
+
+remote_car_g24_package_data_continue:
+4a79 d8c0497a arg mem_remote_car_24g_tx_temp ,contr 
+4a7a efe08006 ifetch 1 ,contr 
+4a7b 1fe22200 copy pdata ,rega 
+4a7c da40497b arg mem_remote_car_24g_tx_temp + 1 ,regb 
+4a7d 20600000 rtn 
+
+remote_car_g24_send_empty:
+4a7e 70499a00 jam 0 ,mem_remote_car_24g_pair_success_flag 
+4a7f 78347c00 enable user 
+4a80 da200001 arg 1 ,rega 
+4a81 da40499b arg mem_remote_car_empty_packet ,regb 
+4a82 20600000 rtn 
+
+remote_car_moto_data:
+4a83 6fe0c97d fetch 1 ,mem_remote_car_24g_tx_temp + 3 
+4a84 c0024a87 beq car_cmd_l_r_motor_control ,remote_car_moto_data_next 
+4a85 c002ca87 beq car_cmd_f_b_motor_control ,remote_car_moto_data_next 
+4a86 20600000 rtn 
+
+remote_car_moto_data_next:
+4a87 6fe0c980 fetch 1 ,mem_remote_car_24g_tx_temp + 6 
+4a88 243a4a8e nbranch remote_car_moto_data_enable_user ,blank 
+4a89 6fe0c982 fetch 1 ,mem_remote_car_24g_tx_temp + 8 
+4a8a 243a4a8e nbranch remote_car_moto_data_enable_user ,blank 
+4a8b 6fe0c984 fetch 1 ,mem_remote_car_24g_tx_temp + 10 
+4a8c 243a4a8e nbranch remote_car_moto_data_enable_user ,blank 
+4a8d 20600000 rtn 
+
+remote_car_moto_data_enable_user:
+4a8e 78347c00 enable user 
+4a8f 20204a79 branch remote_car_g24_package_data_continue 
+
+remote_car_default_init:
+4a90 70478f14 jam 0x14 ,mem_ui_button_timeout 
+4a91 70478301 jam 0x01 ,mem_ui_button_last_state 
+4a92 5800060f setarg 0x060f 
+4a93 67e148d1 store 2 ,mem_remote_car_queue_each_size 
+4a94 580048d1 setarg mem_remote_car_queue_each_size 
+4a95 67e1448a store 2 ,mem_queue_ptr 
+4a96 70409901 jam 0x01 ,mem_lpm_mode 
+4a97 70415b06 jam 0x06 ,mem_lpm_overhead 
+4a98 70417802 jam 0x02 ,mem_lpm_mult_timeout 
+4a99 7048d000 jam 0x00 ,mem_remote_car_hard_soft_switch 
+4a9a 58004930 setarg mem_remote_style_led_type 
+4a9b 67e1448d store 2 ,mem_ui_led_struct_ptr 
+4a9c 70448c01 jam 0x01 ,mem_ui_led_struct_num 
+4a9d 704931ff jam 0xff ,mem_remote_style_blink_count 
+4a9e 58000296 setarg 0x0296 
+4a9f 67e14933 store 2 ,mem_remote_style_on_time 
+4aa0 5800073a setarg 0x073a 
+4aa1 67e14935 store 2 ,mem_remote_style_off_time 
+4aa2 5800498d setarg mem_remote_car_soft_power 
+4aa3 67e144ca store 2 ,mem_power_param_ptr 
+4aa4 58000c0c setarg 0x0c0c 
+4aa5 67e1498f store 2 ,mem_remote_car_power_off_timeout 
+4aa6 58004944 setarg mem_remote_car_keyscan 
+4aa7 67e144c6 store 2 ,mem_keyscan_ptr 
+4aa8 70496100 jam 0x00 ,mem_remote_car_config_soft_switch_enable 
+4aa9 70495fff jam 0xff ,mem_remote_car_config_connect_led_gpio 
+4aaa 704962ff jam 0xff ,mem_remote_car_config_soft_switch_gpio 
+4aab 70495d00 jam 0x00 ,mem_remote_car_config_key_map 
+4aac 70495e00 jam 0x00 ,mem_remote_car_config_layout 
+4aad 70496000 jam 0x00 ,mem_remote_car_config_check_way 
+4aae 70496301 jam 0x01 ,mem_remote_car_config_timeout_shutdown_enable 
+4aaf 58004e55 setarg 0x4e55 
+4ab0 67e14950 store 2 ,mem_current_vdd_value_default_mid_x 
+4ab1 67e14952 store 2 ,mem_current_vdd_value_default_mid_y 
+4ab2 58000007 setarg 0x0007 
+4ab3 67e14956 store 2 ,mem_current_vdd_default_range 
+4ab4 7044a002 jam 0x02 ,mem_adc_config_flag 
+4ab5 38035a0c setsect 0 ,0x35a0c 
+4ab6 3804011a setsect 1 ,0x11a 
+4ab7 38080060 setsect 2 ,0x60 
+4ab8 380c0028 setsect 3 ,0x28 
+4ab9 67e4c964 store 9 ,mem_remote_car_24g_motor_packet 
+4aba 3802000a setsect 0 ,0x2000a 
+4abb 38040002 setsect 1 ,0x02 
+4abc e7e20005 istore 4 ,contw 
+4abd 38035a08 setsect 0 ,0x35a08 
+4abe 3804019a setsect 1 ,0x19a 
+4abf 38080000 setsect 2 ,0x00 
+4ac0 380c0000 setsect 3 ,0x00 
+4ac1 67e4c971 store 9 ,mem_remote_car_24g_fire_packet 
+4ac2 58000064 setarg 0x0064 
+4ac3 67e14989 store 2 ,mem_remote_car_no_data_timeout 
+4ac4 7041e800 jam tx_power_0db ,mem_tx_power 
+4ac5 70483601 jam 0x01 ,mem_24g_data_type 
+4ac6 7048a806 jam 0x06 ,mem_24g_max_retry 
+4ac7 70485b01 jam 0x01 ,mem_24g_pair_switch 
+4ac8 70488c00 jam 0x00 ,mem_24g_fast_conn_enable 
+4ac9 2040231a call g24_rx_window_init 
+4aca 20402613 call g24_interval_param_8ms 
+4acb 204022ff call g24_chmap_param_init 
+4acc 20402325 call g24_pair_param_init 
+4acd 58000708 setarg 0x0708 
+4ace 67e14881 store 2 ,mem_24g_pair_timeout_init 
+4acf 58000050 setarg 0x0050 
+4ad0 67e14885 store 2 ,mem_24g_reconn_timeout_init 
+4ad1 580a7700 setarg 0x0a7700 
+4ad2 67e1c8b0 store 3 ,mem_24g_long_sleep_set 
+4ad3 58604800 setarg 0x604800 
+4ad4 67e1c85c store 3 ,mem_24g_enter_hibernate 
+4ad5 20203100 branch app_sys_param_init 
+
+shutter_init:
+4ad6 20758000 rtn wake 
+4ad7 20406df3 call enable_authrom 
+4ad8 58004b5b setarg shutter_le_before_hibernate 
+4ad9 67e1445d store 2 ,mem_cb_before_hibernate 
+4ada 58004b59 setarg shutter_process_lpm_before 
+4adb 67e1445f store 2 ,mem_cb_before_lpm 
+4adc 58003217 setarg app_enter_hibernate 
+4add 67e14469 store 2 ,mem_cb_discovry_timeout 
+4ade 58004b57 setarg shutter_process_idle 
+4adf 67e14465 store 2 ,mem_cb_idle_process 
+4ae0 58004b06 setarg shutter_process_bb_event 
+4ae1 67e14467 store 2 ,mem_cb_bb_event_process 
+4ae2 58004b00 setarg shutter_le_scale_lpm_lock 
+4ae3 67e1445b store 2 ,mem_cb_check_wakelock 
+4ae4 58004bc8 setarg ble_shutter_receive_data 
+4ae5 67e1446b store 2 ,mem_cb_att_write 
+4ae6 58004b3d setarg shutter_le_bb_event_timer 
+4ae7 67e1446f store 2 ,mem_cb_event_timer 
+4ae8 58004ba3 setarg shutter_key_change 
+4ae9 67e147e8 store 2 ,mem_cb_shutter_keycan 
+4aea 58004bdf setarg shutter_soft_swtich_power_on 
+4aeb 67e147e3 store 2 ,mem_shutter_soft_switch_poweron_callback_function 
+4aec 58004be0 setarg shutter_soft_swtich_power_off 
+4aed 67e147e5 store 2 ,mem_shutter_soft_switch_poweroff_callback_function 
+4aee 20404afb call shutter_set_ble_version 
+4aef 20401aa9 call le_modified_name 
+4af0 20404bcb call shutter_init_param 
+4af1 20406172 call keyscan_key_init 
+4af2 2040793a call queue_init 
+4af3 204077f0 call ui_led_init_global 
+4af4 44f3401c bpatch patch1c_6 ,mem_patch1c 
+4af5 20404bd8 call shutter_load_buffer_config_form_datarom 
+4af6 6fe0c7de fetch 1 ,mem_shutter_hard_soft_switch_case 
+4af7 c0004afd beq hard_switch ,shutter_hart_swtich_power_on 
+4af8 6fe0c7df fetch 1 ,mem_shutter_soft_switch_button_gpio 
+4af9 67e0c790 store 1 ,mem_ui_button_gpio 
+4afa 20204be7 branch ui_soft_swtich_init 
+
+shutter_set_ble_version:
+4afb 7045f707 jam 7 ,mem_lmp_version 
+4afc 20600000 rtn 
+
+shutter_hart_swtich_power_on:
+4afd 704790ff jam ui_button_gpio_disable ,mem_ui_button_gpio 
+4afe 7047e001 jam ss_state_power_on ,mem_shutter_soft_switch_power_state 
+4aff 20204b76 branch shutter_start_reconnect 
+
+shutter_le_scale_lpm_lock:
+4b00 6fe0c7e0 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b01 c00131dd beq ss_state_power_off ,app_get_lpm_wake_lock 
+4b02 20405301 call l2cap_malloc_get_full_map 
+4b03 6fe0c4e6 fetch 1 ,mem_used_map 
+4b04 243a31dd nbranch app_get_lpm_wake_lock ,blank 
+4b05 202031df branch app_put_lpm_wake_lock 
+
+shutter_process_bb_event:
+4b06 1a627e00 copy regc ,pdata 
+4b07 c00a4b0f beq bt_evt_le_connected ,ble_shutter_process_baseband_connect 
+4b08 c00acb13 beq bt_evt_le_disconnected ,ble_shutter_process_baseband_disconnect 
+4b09 c01fcb16 beq bt_evt_le_reconnect_complete ,ble_shutter_process_reconnect_complete 
+4b0a c0204b1c beq bt_evt_le_parse_conn_papa_update_rsp ,ble_shutter_process_parse_connect_parameter_update_response 
+4b0b c0084b22 beq bt_evt_button_long_pressed ,shutter_process_soft_swtich_button_long_press 
+4b0c c0164b23 beq bt_evt_button_down ,shutter_process_soft_swtich_button_down 
+4b0d c016cb2e beq bt_evt_button_up ,shutter_process_soft_swtich_button_up 
+4b0e 20600000 rtn 
+
+ble_shutter_process_baseband_connect:
+4b0f 20404b5d call shutter_stop_bluetooth_discovery 
+4b10 58000000 setarg 0 
+4b11 67e147b8 store 2 ,mem_ble_shutter_reconn_timer 
+4b12 20203215 branch app_led_off 
+
+ble_shutter_process_baseband_disconnect:
+4b13 2040793a call queue_init 
+4b14 7047b100 jam 0 ,mem_ble_shutter_enable_notify 
+4b15 20204b76 branch shutter_start_reconnect 
+
+ble_shutter_process_reconnect_complete:
+4b16 2040793a call queue_init 
+4b17 7047b101 jam 1 ,mem_ble_shutter_enable_notify 
+4b18 6fe447c2 fetch 8 ,mem_ble_shutter_interval_min 
+4b19 67e44372 store 8 ,mem_le_interval_min 
+4b1a 20403223 call app_lpm_mult_enable 
+4b1b 20201f57 branch le_l2cap_tx_update_req 
+
+ble_shutter_process_parse_connect_parameter_update_response:
+4b1c 6fe143db fetch 2 ,mem_le_l2cap_signaling_conn_param_update_rsp_result 
+4b1d c1000000 rtneq ble_signaling_connect_parameter_update_accepted 
+4b1e 6fe447ca fetch 8 ,mem_ble_shutter_interval_min_new 
+4b1f 207a0000 rtn blank 
+4b20 67e44372 store 8 ,mem_le_interval_min 
+4b21 20201f57 branch le_l2cap_tx_update_req 
+
+shutter_process_soft_swtich_button_long_press:
+4b22 20204bf8 branch ui_soft_switch_botton_long_press 
+
+shutter_process_soft_swtich_button_down:
+4b23 6fe0c7de fetch 1 ,mem_shutter_hard_soft_switch_case 
+4b24 c1000000 rtneq hard_switch 
+4b25 6fe0c7e0 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b26 c1808000 rtnne ss_state_power_on 
+4b27 20404b29 call shutter_store_currenct_led_state 
+4b28 20203213 branch app_led_on 
+
+shutter_store_currenct_led_state:
+4b29 7049e001 jam 1 ,mem_shutter_soft_swtich_botton_down 
+4b2a df20000b arg 11 ,loopcnt 
+4b2b d8a049e1 arg mem_shutter_soft_swtich_led_struct_temp ,contw 
+4b2c d8c049ca arg mem_shutter_led_struct_app_led ,contr 
+4b2d 20207d5f branch memcpy 
+
+shutter_process_soft_swtich_button_up:
+4b2e 6fe0c7de fetch 1 ,mem_shutter_hard_soft_switch_case 
+4b2f c1000000 rtneq hard_switch 
+4b30 6fe0c7e0 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b31 c000cb33 beq ss_state_power_on ,shutter_load_currenct_led_state 
+4b32 20204bf4 branch ui_soft_switch_botton_up 
+
+shutter_load_currenct_led_state:
+4b33 6fe0c9e0 fetch 1 ,mem_shutter_soft_swtich_botton_down 
+4b34 c1808000 rtnne 1 
+4b35 7049e000 jam 0 ,mem_shutter_soft_swtich_botton_down 
+4b36 6fe1478c fetch 2 ,mem_ui_state_map 
+4b37 c2803215 bbit1 ui_state_bt_connected ,app_led_off 
+4b38 c284b215 bbit1 ui_state_ble_connected ,app_led_off 
+4b39 df20000b arg 11 ,loopcnt 
+4b3a d8c049e1 arg mem_shutter_soft_swtich_led_struct_temp ,contr 
+4b3b d8a049ca arg mem_shutter_led_struct_app_led ,contw 
+4b3c 20207d5f branch memcpy 
+
+shutter_le_bb_event_timer:
+4b3d 20404b40 call shutter_check_sleep_timer 
+4b3e 20404b47 call shutter_check_power_off_timer 
+4b3f 20204b52 branch ble_shutter_reconn_timer 
+
+shutter_check_sleep_timer:
+4b40 da6047dc arg mem_shutter_sleep_timer ,regc 
+4b41 da404b43 arg shutter_sleep_timeout ,regb 
+4b42 20203191 branch timer_single_step_2b 
+
+shutter_sleep_timeout:
+4b43 7047e002 jam ss_state_power_off ,mem_shutter_soft_switch_power_state 
+4b44 20403215 call app_led_off 
+4b45 20404b87 call shutter_disconnect_current_connection 
+4b46 20204be4 branch shutter_wait_power_off 
+
+shutter_check_power_off_timer:
+4b47 da6049ed arg mem_shutter_power_off_timer ,regc 
+4b48 da404b4a arg shutter_check_power_off_timeout ,regb 
+4b49 2020318a branch timer_single_step 
+
+shutter_check_power_off_timeout:
+4b4a 6fe1478c fetch 2 ,mem_ui_state_map 
+4b4b c284cbe4 bbit1 ui_state_ble_connected ,shutter_wait_power_off 
+4b4c c2804be4 bbit1 ui_state_bt_connected ,shutter_wait_power_off 
+4b4d 6fe0c9ca fetch 1 ,mem_shutter_led_struct_app_led_type 
+4b4e c000cbe4 beq ui_led_state_blink_start ,shutter_wait_power_off 
+4b4f c0024be4 beq ui_led_state_blink_lighting ,shutter_wait_power_off 
+4b50 c002cbe4 beq ui_led_state_blink_darking ,shutter_wait_power_off 
+4b51 20203217 branch app_enter_hibernate 
+
+ble_shutter_reconn_timer:
+4b52 6fe0c7e0 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b53 c1808000 rtnne ss_state_power_on 
+4b54 da6047b8 arg mem_ble_shutter_reconn_timer ,regc 
+4b55 da404b64 arg shutter_start_bluetooth_discovery ,regb 
+4b56 20203191 branch timer_single_step_2b 
+
+shutter_process_idle:
+4b57 20404bb4 call shutter_send_data_to_master 
+4b58 202061a3 branch keyscan_key_process 
+
+shutter_process_lpm_before:
+4b59 2040609f call gpio_set_before_lpm 
+4b5a 20206197 branch keyscan_process_lpm_before 
+
+shutter_le_before_hibernate:
+4b5b 2040609f call gpio_set_before_lpm 
+4b5c 20206df7 branch disable_authrom 
+
+shutter_stop_bluetooth_discovery:
+4b5d 6fe0c7a4 fetch 1 ,mem_shutter_bluetooth_type 
+4b5e c2804b60 bbit1 ble_shutter ,ble_shutter_stop_bluetooth_discovery 
+4b5f 20600000 rtn 
+
+ble_shutter_stop_bluetooth_discovery:
+4b60 6fe147d8 fetch 2 ,mem_ble_shutter_connect_timeout 
+4b61 67e147da store 2 ,mem_shutter_sleep_timeout 
+4b62 67e147dc store 2 ,mem_shutter_sleep_timer 
+4b63 20203205 branch app_ble_stop_adv 
+
+shutter_start_bluetooth_discovery:
+4b64 6fe0c7e0 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b65 c1808000 rtnne ss_state_power_on 
+4b66 6fe0c7a4 fetch 1 ,mem_shutter_bluetooth_type 
+4b67 c2804b69 bbit1 ble_shutter ,ble_shutter_start_discovery 
+4b68 20600000 rtn 
+
+ble_shutter_start_discovery:
+4b69 6fe1478c fetch 2 ,mem_ui_state_map 
+4b6a c3848000 rtnbit1 ui_state_ble_connected 
+4b6b 6fe147d6 fetch 2 ,mem_ble_shutter_discovery_timeout 
+4b6c 67e147da store 2 ,mem_shutter_sleep_timeout 
+4b6d 67e147dc store 2 ,mem_shutter_sleep_timer 
+4b6e 6fe147b4 fetch 2 ,mem_ble_shutter_discovery_adv_interval 
+4b6f 20404c09 call shutter_ble_adv_interval_set 
+4b70 20403211 call app_led_start_blink 
+4b71 6fe247be fetch 4 ,mem_ble_shutter_discovery_blink_on_time 
+4b72 67e249cd store 4 ,mem_shutter_led_struct_app_led_on_time 
+4b73 6fe1478c fetch 2 ,mem_ui_state_map 
+4b74 c3858000 rtnbit1 ui_state_ble_adv 
+4b75 20203207 branch app_ble_start_adv 
+
+shutter_start_reconnect:
+4b76 6fe0c7e0 fetch 1 ,mem_shutter_soft_switch_power_state 
+4b77 c1808000 rtnne ss_state_power_on 
+4b78 6fe0c7a4 fetch 1 ,mem_shutter_bluetooth_type 
+4b79 c2804b7b bbit1 ble_shutter ,ble_shutter_start_reconnect 
+4b7a 20600000 rtn 
+
+ble_shutter_start_reconnect:
+4b7b 6fe147b8 fetch 2 ,mem_ble_shutter_reconn_timer 
+4b7c 684947b6 fetcht 2 ,mem_ble_shutter_reconn_timeout 
+4b7d 604947b8 storet 2 ,mem_ble_shutter_reconn_timer 
+4b7e 247a0000 nrtn blank 
+4b7f 6fe147b2 fetch 2 ,mem_ble_shutter_reconn_adv_interval 
+4b80 20404c09 call shutter_ble_adv_interval_set 
+4b81 20403211 call app_led_start_blink 
+4b82 6fe247ba fetch 4 ,mem_ble_shutter_reconn_blink_on_time 
+4b83 67e249cd store 4 ,mem_shutter_led_struct_app_led_on_time 
+4b84 6fe1478c fetch 2 ,mem_ui_state_map 
+4b85 c3858000 rtnbit1 ui_state_ble_adv 
+4b86 20203207 branch app_ble_start_adv 
+
+shutter_disconnect_current_connection:
+4b87 6fe1478c fetch 2 ,mem_ui_state_map 
+4b88 c284b20f bbit1 ui_state_ble_connected ,app_ble_disconnect 
+4b89 20204b5d branch shutter_stop_bluetooth_discovery 
+
+shutter_check_data_enable:
+4b8a 20407e56 call disable_user 
+4b8b 6fe1478c fetch 2 ,mem_ui_state_map 
+4b8c c284cb8e bbit1 ui_state_ble_connected ,shutter_check_ble_data_enable 
+4b8d 20600000 rtn 
+
+shutter_check_ble_data_enable:
+4b8e 6fe0c7b1 fetch 1 ,mem_ble_shutter_enable_notify 
+4b8f 207a0000 rtn blank 
+4b90 20207e54 branch enable_user 
+
+shutter_check_bluetooth_conn:
+4b91 20407e56 call disable_user 
+4b92 6fe1478c fetch 2 ,mem_ui_state_map 
+4b93 c3800000 rtnbit1 ui_state_bt_connected 
+4b94 c3848000 rtnbit1 ui_state_ble_connected 
+4b95 20207e54 branch enable_user 
+
+shutter_change_bluetooth_status_bt_disconn:
+4b96 6fe0c7a4 fetch 1 ,mem_shutter_bluetooth_type 
+4b97 c2804b99 bbit1 ble_shutter ,ble_shutter_change_bluetooth_status_bt_disconn 
+4b98 20600000 rtn 
+
+ble_shutter_change_bluetooth_status_bt_disconn:
+4b99 20204b76 branch shutter_start_reconnect 
+
+shutter_check_send_data:
+4b9a 78567c00 disable user2 
+4b9b 6fe147da fetch 2 ,mem_shutter_sleep_timeout 
+4b9c 67e147dc store 2 ,mem_shutter_sleep_timer 
+4b9d 20404b91 call shutter_check_bluetooth_conn 
+4b9e 20344b96 branch shutter_change_bluetooth_status_bt_disconn ,user 
+4b9f 20404b8a call shutter_check_data_enable 
+4ba0 24740000 nrtn user 
+4ba1 78367c00 enable user2 
+4ba2 20600000 rtn 
+
+shutter_key_change:
+4ba3 20404b9a call shutter_check_send_data 
+4ba4 24760000 nrtn user2 
+4ba5 1a227e00 deposit rega 
+4ba6 203a4baa branch shutter_key_release ,blank 
+
+shutter_key_press:
+4ba7 20403213 call app_led_on 
+4ba8 da6047f2 arg mem_key0_press ,regc 
+4ba9 20204bac branch push_queue_press_or_release 
+
+shutter_key_release:
+4baa 20403215 call app_led_off 
+4bab da60481a arg mem_key0_release ,regc 
+
+push_queue_press_or_release:
+4bac dfe00005 arg max_queue_num ,pdata 
+4bad 98effe00 imul32 queue ,pdata 
+4bae 9a60a600 iadd regc ,regc 
+
+push_buffer_in_queue:
+4baf efe08013 ifetch 1 ,regc 
+4bb0 207a0000 rtn blank 
+4bb1 20404bc0 call queue_push_one_byte 
+4bb2 1a60a601 increase 1 ,regc 
+4bb3 20204baf branch push_buffer_in_queue 
+
+shutter_send_data_to_master:
+4bb4 6fe1478c fetch 2 ,mem_ui_state_map 
+4bb5 c284cbb7 bbit1 ui_state_ble_connected ,pop_queue_to_ble_data 
+4bb6 20600000 rtn 
+
+pop_queue_to_ble_data:
+4bb7 20401b77 call le_fifo_check_nearly_full 
+4bb8 247a0000 nrtn blank 
+4bb9 20404bc3 call queue_pop_one_byte 
+4bba 24740000 nrtn user 
+4bbb 1fe0ffff pincrease -1 
+4bbc 1feffe05 mul32 pdata ,shutter_ble_data_buffer ,pdata 
+4bbd d8404842 arg mem_ble_data_buffer1 ,temp 
+4bbe 98408c00 iadd temp ,contr 
+4bbf 20204c0d branch le_send_notify_from_list 
+
+queue_push_one_byte:
+4bc0 67e0895c store 1 ,mem_pdatatemp 
+4bc1 da20095c arg mem_pdatatemp ,rega 
+4bc2 2020793f branch queue_push 
+
+queue_pop_one_byte:
+4bc3 da20095c arg mem_pdatatemp ,rega 
+4bc4 20407956 call queue_pop 
+4bc5 24740000 nrtn user 
+4bc6 6fe0895c fetch 1 ,mem_pdatatemp 
+4bc7 20600000 rtn 
+
+ble_shutter_receive_data:
+4bc8 6fe14437 fetch 2 ,mem_le_att_handle 
+4bc9 c00c4b16 beq gatt_keyboard_write_handle ,ble_shutter_process_reconnect_complete 
+4bca 20600000 rtn 
+
+shutter_init_param:
+4bcb 58000002 setarg 0x02 
+4bcc 67e0c9ec store 1 ,mem_shutter_power_off_timeout 
+4bcd 58200008 setarg 0x00200008 
+4bce 67e247c2 store 4 ,mem_ble_shutter_interval_min 
+4bcf 592c0005 setarg 0x012c0005 
+4bd0 e7e20005 istore 4 ,contw 
+4bd1 70438017 jam 0x17 ,mem_le_local_mtu 
+4bd2 5800001b setarg 0x1b 
+4bd3 67e143d1 store 2 ,mem_le_pairing_handle 
+4bd4 20401b16 call le_set_config_fixed_ltk 
+4bd5 20401b32 call le_set_fixed_ltk 
+4bd6 20401b3f call le_set_justwork 
+4bd7 20201b1e branch le_set_config_read_authentication 
+
+shutter_load_buffer_config_form_datarom:
+4bd8 df200028 arg ble_key_value_list_size ,loopcnt 
+4bd9 d8a04842 arg mem_ble_data_buffer1 ,contw 
+4bda d8c09e57 arg ble_shutter_key_value_list ,contr 
+4bdb 20207d52 branch memcpy_fast 
+
+shutter_load_ble_gatt_form_datarom:
+4bdc df20017e arg ble_gatt_list_size ,loopcnt 
+4bdd d8c09af2 arg ble_shutter_gatt_list ,contr 
+4bde 20207d52 branch memcpy_fast 
+
+shutter_soft_swtich_power_on:
+4bdf 20204b76 branch shutter_start_reconnect 
+
+shutter_soft_swtich_power_off:
+4be0 da200000 arg 0 ,rega 
+4be1 da6049d5 arg mem_shutter_power_off_led_style ,regc 
+4be2 2040780c call ui_led_set_style_global 
+4be3 20404b87 call shutter_disconnect_current_connection 
+
+shutter_wait_power_off:
+4be4 6fe0c9ec fetch 1 ,mem_shutter_power_off_timeout 
+4be5 67e0c9ed store 1 ,mem_shutter_power_off_timer 
+4be6 20600000 rtn 
+
+ui_soft_swtich_init:
+4be7 58000000 setarg ss_state_power_up 
+4be8 20404bef call ui_soft_swtich_init_power_on_time 
+4be9 70478301 jam ui_button_state_up ,mem_ui_button_last_state 
+4bea 204077bb call ui_button_init 
+4beb 204077c5 call ui_button_polling 
+4bec 6fe1478c fetch 2 ,mem_ui_state_map 
+4bed c3860000 rtnbit1 ui_state_btn_down 
+4bee 20203217 branch app_enter_hibernate 
+
+ui_soft_swtich_init_power_on_time:
+4bef 684944ca fetcht 2 ,mem_power_param_ptr 
+4bf0 e7e08002 istore 1 ,temp 
+4bf1 efe08005 ifetch 1 ,contw 
+4bf2 67e0c78f store 1 ,mem_ui_button_timeout 
+4bf3 20600000 rtn 
+
+ui_soft_switch_botton_up:
+4bf4 6fe144ca fetch 2 ,mem_power_param_ptr 
+4bf5 efe0803f ifetch 1 ,pdata 
+4bf6 c1800000 rtnne ss_state_power_up 
+4bf7 20203217 branch app_enter_hibernate 
+
+ui_soft_switch_botton_long_press:
+4bf8 684944ca fetcht 2 ,mem_power_param_ptr 
+4bf9 efe08002 ifetch 1 ,temp 
+4bfa c000cc03 beq ss_state_power_on ,ui_soft_switch_power_off 
+
+ui_soft_switch_power_on:
+4bfb 58000001 setarg ss_state_power_on 
+4bfc 684944ca fetcht 2 ,mem_power_param_ptr 
+4bfd e7e08002 istore 1 ,temp 
+4bfe 18408c02 add temp ,ss_power_off_time ,contr 
+4bff efe08006 ifetch 1 ,contr 
+4c00 e7e0800f istore 1 ,mem_ui_button_timeout 
+4c01 efe10006 ifetch 2 ,contr 
+4c02 20207e05 branch callback_func 
+
+ui_soft_switch_power_off:
+4c03 58000002 setarg ss_state_power_off 
+4c04 20404bef call ui_soft_swtich_init_power_on_time 
+4c05 18408c05 add temp ,ss_power_off_cb ,contr 
+4c06 efe10006 ifetch 2 ,contr 
+4c07 203a3217 branch app_enter_hibernate ,blank 
+4c08 20207e05 branch callback_func 
+
+shutter_ble_adv_interval_set:
+4c09 67e14159 store 2 ,mem_lpm_interval 
+4c0a 1fe0fffc increase -4 ,pdata 
+4c0b 67e14428 store 2 ,mem_le_adv_interval 
+4c0c 20600000 rtn 
+
+le_send_notify_from_list:
+4c0d efe08006 ifetch 1 ,contr 
+4c0e 1fe22200 copy pdata ,rega 
+4c0f e8410006 ifetcht 2 ,contr 
+4c10 20407ceb call store_contr 
+4c11 20401eb3 call le_att_malloc_tx_notify 
+4c12 1a227200 copy rega ,loopcnt 
+4c13 20407ce5 call get_contr 
+4c14 20207d5f branch memcpy 
+
+shutter_default_init:
+4c15 6fe149ee fetch 2 ,mem_shutter_key_conf0_temp 
+4c16 67e147ea store 2 ,mem_shutter_key_conf0 
+4c17 6fe0c9f0 fetch 1 ,mem_shutter_led_struct_app_led_gpio_temp 
+4c18 67e0c9cc store 1 ,mem_shutter_led_struct_app_led_gpio 
+4c19 67e0c9d7 store 1 ,mem_shutter_power_off_led_style_gpio 
+4c1a 6fe0c9f1 fetch 1 ,mem_shutter_hard_soft_switch_case_temp 
+4c1b 67e0c7de store 1 ,mem_shutter_hard_soft_switch_case 
+4c1c 6fe0c9f2 fetch 1 ,mem_shutter_soft_switch_button_gpio_temp 
+4c1d 67e0c7df store 1 ,mem_shutter_soft_switch_button_gpio 
+4c1e 7047a401 jam 0x01 ,mem_shutter_bluetooth_type 
+4c1f 58000030 setarg 0x0030 
+4c20 67e147af store 2 ,mem_classic_shutter_random_mac_offset_addr 
+4c21 58000000 setarg 0x0000 
+4c22 67e147a5 store 2 ,mem_shutter_config_eeprom_offset_addr 
+4c23 58000001 setarg 0x0001 
+4c24 67e147f2 store 2 ,mem_key0_press 
+4c25 67e147f7 store 2 ,mem_key1_press 
+4c26 58000006 setarg 0x0006 
+4c27 67e1481a store 2 ,mem_key0_release 
+4c28 67e1481f store 2 ,mem_key1_release 
+4c29 58000007 setarg 0x0007 
+4c2a 67e147fc store 2 ,mem_key2_press 
+4c2b 58000008 setarg 0x0008 
+4c2c 67e14824 store 2 ,mem_key2_release 
+4c2d 580047e0 setarg mem_shutter_soft_switch_power_state 
+4c2e 67e144ca store 2 ,mem_power_param_ptr 
+4c2f 58201400 setarg 0x201400 
+4c30 67e1c7e0 store 3 ,mem_shutter_soft_switch_power_state 
+4c31 70409901 jam 0x01 ,mem_lpm_mode 
+4c32 58000100 setarg 0x0100 
+4c33 67e14159 store 2 ,mem_lpm_interval 
+4c34 70415b08 jam 0x08 ,mem_lpm_overhead 
+4c35 70417705 jam 0x05 ,mem_lpm_mult 
+4c36 70417802 jam 0x02 ,mem_lpm_mult_timeout 
+4c37 58000030 setarg 0x0030 
+4c38 67e14455 store 2 ,mem_sniff_param_interval 
+4c39 58000001 setarg 0x0001 
+4c3a e7e10005 istore 2 ,contw 
+4c3b 7046410a jam 0x0a ,mem_unsniff2sniff_timer 
+4c3c 58000096 setarg 0x0096 
+4c3d 67e147ba store 2 ,mem_ble_shutter_reconn_blink_on_time 
+4c3e e7e10005 istore 2 ,contw 
+4c3f 58000296 setarg 0x0296 
+4c40 67e147be store 2 ,mem_ble_shutter_discovery_blink_on_time 
+4c41 e7e10005 istore 2 ,contw 
+4c42 38000010 setsect 0 ,0x10 
+4c43 38048008 setsect 1 ,0x8008 
+4c44 380ac000 setsect 2 ,0x2c000 
+4c45 380c0004 setsect 3 ,0x04 
+4c46 67e447ca store 8 ,mem_ble_shutter_interval_min_new 
+4c47 70448c01 jam 0x01 ,mem_ui_led_struct_num 
+4c48 580049ca setarg mem_shutter_led_struct_app_led 
+4c49 67e1448d store 2 ,mem_ui_led_struct_ptr 
+4c4a 58000000 setarg 0x0000 
+4c4b 67e149ca store 2 ,mem_shutter_led_struct_app_led 
+4c4c 380001a0 setsect 0 ,0x1a0 
+4c4d 38040068 setsect 1 ,0x68 
+4c4e 38080000 setsect 2 ,0x00 
+4c4f 380c0000 setsect 3 ,0x00 
+4c50 67e449cd store 8 ,mem_shutter_led_struct_app_led_on_time 
+4c51 58000301 setarg 0x0301 
+4c52 67e149d5 store 2 ,mem_shutter_power_off_led_style 
+4c53 380001a0 setsect 0 ,0x1a0 
+4c54 380400e8 setsect 1 ,0xe8 
+4c55 38080000 setsect 2 ,0x00 
+4c56 380c0000 setsect 3 ,0x00 
+4c57 67e449d8 store 8 ,mem_shutter_power_off_led_style_on_time 
+4c58 5800000e setarg 0x000e 
+4c59 67e147b2 store 2 ,mem_ble_shutter_reconn_adv_interval 
+4c5a 58000140 setarg 0x0140 
+4c5b 67e147b4 store 2 ,mem_ble_shutter_discovery_adv_interval 
+4c5c 67e14428 store 2 ,mem_le_adv_interval 
+4c5d 58000050 setarg 0x0050 
+4c5e 67e147b6 store 2 ,mem_ble_shutter_reconn_timeout 
+4c5f 70443207 jam 0x07 ,mem_le_adv_channel_map 
+4c60 70442700 jam 0x00 ,mem_le_adv_enable 
+4c61 380000fb setsect 0 ,0xfb 
+4c62 3806c212 setsect 1 ,0x2c212 
+4c63 3808800f setsect 2 ,0x800f 
+4c64 380c0021 setsect 3 ,0x21 
+4c65 67e4444c store 8 ,mem_local_rx_max_octets 
+4c66 3800ff00 setsect 0 ,0xff00 
+4c67 38043fc0 setsect 1 ,0x3fc0 
+4c68 38080ff0 setsect 2 ,0xff0 
+4c69 380c03fc setsect 3 ,0x3fc 
+4c6a 67e447d2 store 8 ,mem_classic_shutter_discovery_timeout 
+4c6b 580048fb setarg mem_queue_each_size 
+4c6c 67e1448a store 2 ,mem_queue_ptr 
+4c6d 58002001 setarg 0x2001 
+4c6e 67e148fb store 2 ,mem_queue_each_size 
+4c6f 7043e71f jam 0x1f ,mem_le_adv_data_len 
+4c70 38010102 setsect 0 ,0x10102 
+4c71 380480c1 setsect 1 ,0x80c1 
+4c72 38098120 setsect 2 ,0x18120 
+4c73 380c640c setsect 3 ,0x640c 
+4c74 67e4c3e8 store 9 ,mem_le_adv_data 
+4c75 380003c1 setsect 0 ,0x3c1 
+4c76 e7e10005 istore 2 ,contw 
+4c77 7044071f jam 0x1f ,mem_le_scan_data_len 
+4c78 3802090d setsect 0 ,0x2090d 
+4c79 38074c15 setsect 1 ,0x34c15 
+4c7a 380a8532 setsect 2 ,0x28532 
+4c7b 380dd1d5 setsect 3 ,0x1d1d5 
+4c7c 67e4c408 store 9 ,mem_le_scan_data 
+4c7d 38026574 setsect 0 ,0x26574 
+4c7e 3804001c setsect 1 ,0x1c 
+4c7f e7e18005 istore 3 ,contw 
+4c80 580047e7 setarg mem_shutter_keyscan 
+4c81 67e144c6 store 2 ,mem_keyscan_ptr 
+4c82 7047e702 jam 0x02 ,mem_shutter_key_num 
+4c83 70447d17 jam 0x17 ,mem_app_connection_options 
+4c84 58004920 setarg mem_shutter_nv_data 
+4c85 67e14487 store 2 ,mem_nv_data_ptr 
+4c86 70448905 jam 0x05 ,mem_nv_data_number 
+4c87 58002540 setarg 0x2540 
+4c88 67e140b2 store 2 ,mem_class 
+4c89 58040003 setarg 0x040003 
+4c8a 67e1c765 store 3 ,mem_lmp_io_cap_payload_iocap 
+4c8b 70476c03 jam 0x03 ,mem_ssp_mode_flag 
+4c8c 70476401 jam 0x01 ,mem_ssp_enable 
+4c8d 70478e01 jam 0x01 ,mem_ui_profile_supported 
+4c8e 70415f00 jam 0x00 ,mem_ptt 
+4c8f 3803ffff setsect 0 ,0x3ffff 
+4c90 3806fe23 setsect 1 ,0x2fe23 
+4c91 380999d9 setsect 2 ,0x199d9 
+4c92 380c020d setsect 3 ,0x20d 
+4c93 67e440a0 store 8 ,mem_features 
+4c94 58009af2 setarg 0x9af2 
+4c95 67e14396 store 2 ,mem_ui_le_uuid_table 
+4c96 7040d801 jam 0x01 ,mem_eir_enable 
+4c97 38010306 setsect 0 ,0x10306 
+4c98 38040004 setsect 1 ,0x4 
+4c99 38082010 setsect 2 ,0x2010 
+4c9a 380c9040 setsect 3 ,0x9040 
+4c9b 67e4c662 store 9 ,mem_all_uuid_16bits 
+4c9c 38020011 setsect 0 ,0x20011 
+4c9d 38040044 setsect 1 ,0x44 
+4c9e e7e28005 istore 5 ,contw 
+4c9f 70467800 jam 0x00 ,mem_all_uuid_128bits 
+4ca0 58009c70 setarg 0x9c70 
+4ca1 67e14660 store 2 ,mem_ui_uuid_table 
+4ca2 7040c518 jam 0x18 ,mem_fcomp_div 
+4ca3 20203100 branch app_sys_param_init 
+
+rf_debug_rx_gpio_low:
+4ca4 6fe0c4d4 fetch 1 ,mem_rf_debug_rx_gpio 
+
+rf_debug_gpio_low:
+4ca5 d840003e arg gpcfg_output_low ,temp 
+4ca6 20206092 branch gpio_config_function 
+
+rf_debug_rx_on_line:
+
+rf_debug_rx_gpio_high:
+4ca7 6fe0c4d4 fetch 1 ,mem_rf_debug_rx_gpio 
+
+rf_debug_gpio_high:
+4ca8 d840003f arg gpcfg_output_high ,temp 
+4ca9 20206092 branch gpio_config_function 
+
+rf_debug_rx_gpio_h_l_h:
+4caa 20404ca7 call rf_debug_rx_gpio_high 
+
+rf_debug_rx_gpio_l_h:
+4cab 20404ca4 call rf_debug_rx_gpio_low 
+4cac 20204ca7 branch rf_debug_rx_gpio_high 
+
+rf_debug_rx_gpio_l_h_l:
+
+rf_debug_shutdown_radio_line:
+4cad 20404cab call rf_debug_rx_gpio_l_h 
+
+rf_debug_rx_crc_line:
+4cae 20204ca4 branch rf_debug_rx_gpio_low 
+
+rf_debug_rx_sync_line:
+4caf 20204cab branch rf_debug_rx_gpio_l_h 
+
+rf_debug_rx_crc_fail_line:
+4cb0 20404cab call rf_debug_rx_gpio_l_h 
+4cb1 20204cad 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:
+4cb2 20204ca4 branch rf_debug_rx_gpio_low 
+
+rf_debug_tx_off_line:
+
+rf_debug_tx_gpio_low:
+4cb3 6fe0c4d5 fetch 1 ,mem_rf_debug_tx_gpio 
+4cb4 20204ca5 branch rf_debug_gpio_low 
+
+rf_debug_tx_on_line:
+
+rf_debug_tx_gpio_high:
+4cb5 6fe0c4d5 fetch 1 ,mem_rf_debug_tx_gpio 
+4cb6 20204ca8 branch rf_debug_gpio_high 
+
+rf_debug_tx_gpio_l_h_l:
+4cb7 20404cb3 call rf_debug_tx_gpio_low 
+4cb8 20404cb5 call rf_debug_tx_gpio_high 
+4cb9 20204cb3 branch rf_debug_tx_gpio_low 
+
+hci_init:
+4cba 20800000 clear_stack 
+4cbb 20404cc4 call hci_init_clksel 
+4cbc 20404cce call hci_init_uart_default_config 
+4cbd 20404ce2 call hci_init_uart_config 
+4cbe 20404d01 call hci_init_pwm_default_config 
+4cbf 20404d05 call hci_init_pwm 
+4cc0 7009fc01 jam 1 ,mem_hci_command_complete_num_hci_command_packet 
+4cc1 7009f904 jam hci_h4_type_event ,mem_hci_event_head_type 
+
+hci_process_loop:
+4cc2 20404d10 call hci_process_check_uart_rx 
+4cc3 20204cc2 branch hci_process_loop 
+
+hci_init_clksel:
+4cc4 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_hci_boot_clksel 
+4cc5 c283cccc bbit1 7 ,hci_init_clksel_xtal 
+
+hci_init_clksel_dpll:
+4cc6 708a01ff jam 0xff ,core_clkpll_ctrl1 
+4cc7 20000064 nop 100 
+4cc8 708a020e jam 0x0e ,core_clkpll_ctrl2 
+4cc9 708a0003 jam 0x03 ,core_clkpll_ctrl0 
+4cca 70804205 jam clksel_dpll ,core_clksel 
+4ccb 20600000 rtn 
+
+hci_init_clksel_xtal:
+4ccc 70804204 jam clksel_xtal ,core_clksel 
+4ccd 20600000 rtn 
+
+hci_init_uart_default_config:
+4cce 20404cd2 call hci_init_uart_default_config_tx 
+4ccf 20404cd6 call hci_init_uart_default_config_rx 
+4cd0 20404cda call hci_init_uart_default_config_rts 
+4cd1 20204cde branch hci_init_uart_default_config_cts 
+
+hci_init_uart_default_config_tx:
+4cd2 6fe0c7a4 fetch 1 ,mem_hci_uart_tx_gpio 
+4cd3 247a0000 nrtn blank 
+4cd4 7047a40d jam hci_uart_tx_gpio_num ,mem_hci_uart_tx_gpio 
+4cd5 20600000 rtn 
+
+hci_init_uart_default_config_rx:
+4cd6 6fe0c7a5 fetch 1 ,mem_hci_uart_rx_gpio 
+4cd7 247a0000 nrtn blank 
+4cd8 7047a50e jam hci_uart_rx_gpio_num ,mem_hci_uart_rx_gpio 
+4cd9 20600000 rtn 
+
+hci_init_uart_default_config_rts:
+4cda 6fe0c7a6 fetch 1 ,mem_hci_uart_rts_gpio 
+4cdb 247a0000 nrtn blank 
+4cdc 7047a609 jam hci_uart_rts_gpio_num ,mem_hci_uart_rts_gpio 
+4cdd 20600000 rtn 
+
+hci_init_uart_default_config_cts:
+4cde 6fe0c7a7 fetch 1 ,mem_hci_uart_cts_gpio 
+4cdf 247a0000 nrtn blank 
+4ce0 7047a70a jam hci_uart_cts_gpio_num ,mem_hci_uart_cts_gpio 
+4ce1 20600000 rtn 
+
+hci_init_uart_config:
+4ce2 58001800 setarg mem_h5rx_buf 
+4ce3 67e1095c store 2 ,mem_pdatatemp 
+4ce4 58001bff setarg mem_h5rx_buf_end 
+4ce5 e7e10005 istore 2 ,contw 
+4ce6 58001c00 setarg mem_h5tx_buf 
+4ce7 e7e10005 istore 2 ,contw 
+4ce8 58001fff setarg mem_h5tx_buf_end 
+4ce9 e7e10005 istore 2 ,contw 
+4cea 6fe4095c fetch 8 ,mem_pdatatemp 
+4ceb 20405eb0 call uarta_init_dma_mem 
+4cec 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_hci_boot_clksel 
+4ced 2feffe07 isolate1 7 ,pdata 
+4cee 2040ded7 call uart_clock_select_main_freq_crystal ,true 
+4cef 2440dedb ncall uart_clock_select_main_freq_dpll ,true 
+4cf0 d841c200 arg 115200 ,temp 
+4cf1 20405ec8 call uarta_calc_baud_rate_config 
+4cf2 6fe0c7a4 fetch 1 ,mem_hci_uart_tx_gpio 
+4cf3 d8400008 arg gpcfg_uart_txd ,temp 
+4cf4 20406093 call gpio_config_function_int 
+4cf5 6fe0c7a5 fetch 1 ,mem_hci_uart_rx_gpio 
+4cf6 d8400049 arg gpcfg_uart_rxd | gpcfg_pullup ,temp 
+4cf7 20406093 call gpio_config_function_int 
+4cf8 6fe0c7a6 fetch 1 ,mem_hci_uart_rts_gpio 
+4cf9 d840000a arg gpcfg_uart_rts ,temp 
+4cfa 20406093 call gpio_config_function_int 
+4cfb 6fe0c7a7 fetch 1 ,mem_hci_uart_cts_gpio 
+4cfc d840000b arg gpcfg_uart_cts ,temp 
+4cfd 20406093 call gpio_config_function_int 
+4cfe d8400081 arg fun_uart_control_enable | fun_uart_control_setting_rate_baud ,temp 
+4cff 60588060 storet 1 ,core_uart_ctrl 
+4d00 20207e02 branch clean_mem 
+
+hci_init_pwm_default_config:
+4d01 6fe0c7a8 fetch 1 ,mem_hci_pwm_12mhz_gpio 
+4d02 247a0000 nrtn blank 
+4d03 7047a80c jam hci_pmw_12mhz_gpio_num ,mem_hci_pwm_12mhz_gpio 
+4d04 20600000 rtn 
+
+hci_init_pwm:
+4d05 6fe0c7a8 fetch 1 ,mem_hci_pwm_12mhz_gpio 
+4d06 d8400010 arg gpcfg_pwm_out0 ,temp 
+4d07 20406093 call gpio_config_function_int 
+4d08 da200040 arg 0x40 ,rega 
+4d09 204061d1 call pwm_init 
+4d0a da200000 arg 0 ,rega 
+4d0b da400000 arg 0 ,regb 
+4d0c 58000000 setarg 0 
+4d0d 2040620a call pwm_duty_cycle_set 
+4d0e d8e00000 arg 0 ,queue 
+4d0f 2020621d branch pwm_set_select 
+
+hci_process_check_uart_rx:
+4d10 6ff10112 fetch 2 ,core_uart_rxitems 
+4d11 1fe0a3fc add pdata ,-4 ,rega 
+4d12 24610000 nrtn positive 
+4d13 20405ef7 call uarta_prepare_rx 
+4d14 efe08003 ifetch 1 ,contru 
+4d15 c000cd18 beq hci_h4_type_cmd ,hci_parse_packet_cmd 
+4d16 20407d12 call delay_10ms 
+4d17 20205f07 branch uarta_clear_current_rx 
+
+hci_parse_packet_cmd:
+4d18 efe10003 ifetch 2 ,contru 
+4d19 67e109fd store 2 ,mem_hci_opcode 
+4d1a d84003ff arg 0x3ff ,temp 
+4d1b 98410400 iand temp ,temp 
+4d1c 604909f6 storet 2 ,mem_hci_opcode_ocf 
+4d1d 1feb7e00 rshift2 pdata ,pdata 
+4d1e 1fecfe00 rshift8 pdata ,pdata 
+4d1f 67e089f8 store 1 ,mem_hci_opcode_ogf 
+4d20 efe08003 ifetch 1 ,contru 
+4d21 1fe0ffff pincrease -1 
+4d22 9a267c00 isub rega ,null 
+4d23 20610000 rtn positive 
+4d24 20404d26 call hci_parse_complete_packet 
+4d25 20204d81 branch hci_drop_current_packet 
+
+hci_parse_complete_packet:
+4d26 6fe089f8 fetch 1 ,mem_hci_opcode_ogf 
+4d27 c01fcd29 beq hci_ogf_vendor_specific_debug ,hci_parse_packet_cmd_ogf_vendorspecific_debug 
+4d28 20204d6d branch hci_send_event_command_complete_error_command_nuknown 
+
+hci_parse_packet_cmd_ogf_vendorspecific_debug:
+4d29 44f3c01c bpatch patch1c_7 ,mem_patch1c 
+4d2a 6fe089f6 fetch 1 ,mem_hci_opcode_ocf 
+4d2b c0004d6c beq hci_vendor_cmd_reset ,hci_normal_reply 
+4d2c c000cd34 beq hci_vendor_cmd_chipid ,phci_grp_vendor_chipid 
+4d2d c0014d39 beq hci_vendor_cmd_baud ,phci_grp_vendor_baud 
+4d2e c001cd47 beq hci_vendor_cmd_patch ,phci_grp_vendor_patch 
+4d2f c0024d51 beq hci_vendor_cmd_patch_done ,phci_grp_vendor_done 
+4d30 c002cd6c beq hci_vendor_cmd_echo ,hci_normal_reply 
+4d31 c0084d62 beq hci_vendor_cmd_mem ,phci_grp_vendor_mem 
+4d32 c00a4d68 beq hci_vendor_cmd_set_flow_control ,phci_grp_vendor_flow_control 
+4d33 20204d6c branch hci_normal_reply 
+
+phci_grp_vendor_chipid:
+4d34 7009ff00 jam command_succeeded ,mem_hci_command_complete_return_parameter 
+4d35 6ff10000 fetch 2 ,core_chipid 
+4d36 67e10a00 store 2 ,mem_hci_command_complete_return_parameter_chip_id 
+4d37 df200003 arg 3 ,loopcnt 
+4d38 20204d74 branch hci_send_event_command_complete 
+
+phci_grp_vendor_baud:
+4d39 efe10003 ifetch 2 ,contu 
+4d3a 67f10052 store 2 ,core_uart_baud 
+4d3b 20600000 rtn 
+
+phci_grp_vendor_patch_common:
+4d3c efe08003 ifetch 1 ,contu 
+4d3d 1fe20400 copy pdata ,temp 
+4d3e 67f08024 store 1 ,core_ucode_low 
+4d3f efe08003 ifetch 1 ,contu 
+4d40 98408400 iadd temp ,temp 
+4d41 79207e07 set1 7 ,pdata 
+4d42 67f08023 store 1 ,core_ucode_ctrl 
+4d43 efe08003 ifetch 1 ,contu 
+4d44 98408400 iadd temp ,temp 
+4d45 1fe27200 copy pdata ,loopcnt 
+4d46 20600000 rtn 
+
+phci_grp_vendor_patch:
+4d47 20404d3c call phci_grp_vendor_patch_common 
+
+phci_grp_vendor_patch_loop:
+4d48 efe08003 ifetch 1 ,contu 
+4d49 67f08025 store 1 ,core_ucode_data 
+4d4a 98408400 iadd temp ,temp 
+4d4b c2004d48 loop phci_grp_vendor_patch_loop 
+
+phci_grp_vendor_patch_check_sum:
+4d4c 184104ff and temp ,0xff ,temp 
+4d4d efe08003 ifetch 1 ,contu 
+4d4e 98467c00 isub temp ,null 
+4d4f 2422cd60 nbranch phci_grp_vendor_patch_bad ,zero 
+4d50 20204d6c branch hci_normal_reply 
+
+phci_grp_vendor_done:
+4d51 df200020 arg 0x20 ,loopcnt 
+4d52 d8a04000 arg mem_patch00 ,contw 
+4d53 d8400000 arg 0 ,temp 
+
+phci_grp_vendor_done_loop:
+4d54 efe08003 ifetch 1 ,contu 
+4d55 e7e08005 istore 1 ,contw 
+4d56 98408400 iadd temp ,temp 
+4d57 c2004d54 loop phci_grp_vendor_done_loop 
+4d58 184104ff and temp ,0xff ,temp 
+4d59 efe08003 ifetch 1 ,contu 
+4d5a 98467c00 isub temp ,null 
+4d5b 2422cd60 nbranch phci_grp_vendor_patch_bad ,zero 
+4d5c 70802300 jam 0 ,core_ucode_ctrl 
+4d5d 20404d6c call hci_normal_reply 
+4d5e 20407e07 call wait_uarttx 
+4d5f 20200801 branch soft_reset 
+
+phci_grp_vendor_patch_bad:
+4d60 70802300 jam 0 ,core_ucode_ctrl 
+4d61 20204d6d branch hci_send_event_command_complete_error_command_nuknown 
+
+phci_grp_vendor_mem:
+4d62 efe08003 ifetch 1 ,contu 
+4d63 1fe27200 copy pdata ,loopcnt 
+4d64 efe10003 ifetch 2 ,contu 
+4d65 1fe20a00 copy pdata ,contw 
+4d66 20405f4d call uart_copy_rx_bytes 
+4d67 20204d6c branch hci_normal_reply 
+
+phci_grp_vendor_flow_control:
+4d68 6ff08060 fetch 1 ,core_uart_ctrl 
+4d69 79207e04 set1 bit_uart_control_flow_control ,pdata 
+4d6a 67f08060 store 1 ,core_uart_ctrl 
+4d6b 20204d6c branch hci_normal_reply 
+
+hci_normal_reply:
+4d6c 20204d71 branch hci_send_event_command_complete_without_payload 
+
+hci_send_event_command_complete_error_command_nuknown:
+4d6d 7009ff01 jam command_unknown ,mem_hci_command_complete_return_parameter 
+4d6e 20204d72 branch hci_send_event_command_complete_without_payload + 1 
+
+hci_send_event_command_complete_error_command_disallowed:
+4d6f 7009ff0c jam command_disallowed ,mem_hci_command_complete_return_parameter 
+4d70 20204d72 branch hci_send_event_command_complete_without_payload + 1 
+
+hci_send_event_command_complete_without_payload:
+4d71 7009ff00 jam command_succeeded ,mem_hci_command_complete_return_parameter 
+4d72 df200001 arg 1 ,loopcnt 
+4d73 20204d74 branch hci_send_event_command_complete 
+
+hci_send_event_command_complete:
+4d74 7009fa0e jam hci_event_command_complete ,mem_hci_event_head_event_code 
+4d75 1f20fe03 add loopcnt ,3 ,pdata 
+4d76 67e089fb store 1 ,mem_hci_event_para_total_length 
+4d77 20404d7d call hci_prepare_send_event 
+4d78 6fe189fc fetch 3 ,mem_hci_command_complete_num_hci_command_packet 
+4d79 e7e18003 istore 3 ,contwu 
+4d7a d8c009ff arg mem_hci_command_complete_return_parameter ,contr 
+4d7b 20405f33 call uart_copy_tx_bytes 
+4d7c 20205f13 branch uarta_send_register_pop 
+
+hci_prepare_send_event:
+4d7d 20405f0f call uarta_prepare_tx_register_push 
+4d7e 6fe189f9 fetch 3 ,mem_hci_event_head_type 
+4d7f e7e18003 istore 3 ,contwu 
+4d80 20600000 rtn 
+
+hci_drop_current_packet:
+4d81 20405ef7 call uarta_prepare_rx 
+4d82 18608603 increase 3 ,contru 
+4d83 efe08003 ifetch 1 ,contru 
+4d84 98608600 iadd contru ,contru 
+4d85 20205f03 branch uarta_rxdone 
+
+cmd_exit:
+4d86 7041db00 jam 0 ,mem_hci_cmd 
+4d87 20600000 rtn 
+
+cmd_check_plap:
+4d88 6fe341dd fetch 6 ,mem_hci_plap 
+4d89 684b0041 fetcht 6 ,mem_plap 
+4d8a 98467c00 isub temp ,null 
+4d8b 20600000 rtn 
+
+hid_rx_process:
+4d8c 44f4401d bpatch patch1d_0 ,mem_patch1d 
+4d8d 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+4d8e 1fe20c00 copy pdata ,contr 
+4d8f efe08006 ifetch 1 ,contr 
+4d90 67e0c5f5 store 1 ,mem_l2cap_rcv_hidtype 
+4d91 1fe1040f and pdata ,0x0f ,temp 
+4d92 1ff1fe00 rshift4 pdata ,pdata 
+4d93 c004cdad beq hid_type_set_idle ,hid_rx_process_handshake 
+4d94 c003cdad beq hid_type_set_protocol ,hid_rx_process_handshake 
+4d95 c0054dbc beq hid_type_data ,hid_rx_process_data 
+4d96 c002cda5 beq hid_type_set_report ,hid_rx_process_set_report 
+4d97 c000cd99 beq hid_type_control ,hid_rx_process_hid_control 
+4d98 20600000 rtn 
+
+hid_rx_process_hid_control:
+4d99 18427e00 copy temp ,pdata 
+4d9a c002cd9d beq hid_control_p_virtualcableunplug ,hid_rx_process_virtual_cable_unplug 
+4d9b c001cda4 beq hid_control_p_suspend ,hid_rx_process_suspend 
+4d9c 20600000 rtn 
+
+hid_rx_process_virtual_cable_unplug:
+4d9d 70095b27 jam bt_evt_virtual_cable_unplug ,mem_fifo_temp 
+4d9e 20407871 call ui_ipc_send_event 
+4d9f 6fe0c09a fetch 1 ,mem_device_option 
+4da0 c1840000 rtnne dvc_op_mouse 
+4da1 18427e00 copy temp ,pdata 
+4da2 c002c44c beq hid_control_p_virtualcableunplug ,mouse_irtual_cable_unplug 
+4da3 20600000 rtn 
+
+hid_rx_process_suspend:
+4da4 20600000 rtn 
+
+hid_rx_process_set_report:
+4da5 20404dbc call hid_rx_process_data 
+4da6 da200001 arg 0x01 ,rega 
+4da7 20404dc0 call hid_malloc_tx_buff 
+4da8 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+4da9 e7e10005 istore 2 ,contw 
+4daa 58000000 setarg 0x00 
+4dab e7e08005 istore 1 ,contw 
+4dac 20600000 rtn 
+
+hid_rx_process_handshake:
+4dad da200001 arg 1 ,rega 
+4dae 20404dc0 call hid_malloc_tx_buff 
+4daf 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+4db0 e7e10005 istore 2 ,contw 
+4db1 58000000 setarg 0 
+4db2 e7e08005 istore 1 ,contw 
+4db3 70095001 jam 1 ,mem_ui_data_txbuff_length 
+4db4 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+4db5 79207e06 set1 l2cap_channel_hid_handshake_done ,pdata 
+4db6 67e0c4e2 store 1 ,mem_hid_control_state 
+4db7 70095b12 jam bt_evt_hid_handshake ,mem_fifo_temp 
+4db8 20407871 call ui_ipc_send_event 
+4db9 6fe0c09a fetch 1 ,mem_device_option 
+4dba c1840000 rtnne dvc_op_mouse 
+4dbb 2020442c branch mouse_bt_hid_handshake_boot_check 
+
+hid_rx_process_data:
+4dbc efe08006 ifetch 1 ,contr 
+4dbd c000cdbf beq hid_report_id_kb ,hid_rx_process_data_hid_kb 
+4dbe 20600000 rtn 
+
+hid_rx_process_data_hid_kb:
+4dbf 20600000 rtn 
+
+hid_malloc_tx_buff:
+4dc0 2040529d call l2cap_malloc 
+4dc1 1a220400 copy rega ,temp 
+4dc2 60488950 storet 1 ,mem_ui_data_txbuff_length 
+4dc3 1fe20a00 copy pdata ,contw 
+4dc4 1a227e00 copy rega ,pdata 
+4dc5 e7e10005 istore 2 ,contw 
+4dc6 20600000 rtn 
+
+l2cap_init:
+4dc7 2035cdcc branch l2cap_init_wake ,wake 
+
+l2cap_init_work:
+4dc8 580045f6 setarg mem_l2cap_xmem_end 
+4dc9 d8a044d6 arg mem_l2cap_xmem_start ,contw 
+4dca 98a67200 isub contw ,loopcnt 
+4dcb 20407d26 call clear_mem 
+
+l2cap_init_wake:
+4dcc 44f4c01d bpatch patch1d_1 ,mem_patch1d 
+4dcd 58000424 setarg mem_sdp_mem_end 
+4dce d8a003e4 arg mem_sdp_mem_start ,contw 
+4dcf 98a67200 isub contw ,loopcnt 
+4dd0 20407d26 call clear_mem 
+4dd1 5800037a setarg mem_l2cap_mem_end 
+4dd2 d8a0030e arg mem_l2cap_mem_start ,contw 
+4dd3 98a67200 isub contw ,loopcnt 
+4dd4 20407d26 call clear_mem 
+4dd5 2020536b branch l2cap_lpm_load_txbuf 
+
+process_rx_l2cap_pkt:
+4dd6 44f5401d bpatch patch1d_2 ,mem_patch1d 
+4dd7 18c20400 copy contr ,temp 
+4dd8 18420c00 copy temp ,contr 
+4dd9 efe10006 ifetch 2 ,contr 
+4dda 67e10317 store 2 ,mem_l2cap_rx_pkt_length 
+4ddb efe10006 ifetch 2 ,contr 
+4ddc 67e10319 store 2 ,mem_l2cap_rx_cid 
+4ddd 18c27e00 deposit contr 
+4dde 67e10315 store 2 ,mem_l2cap_payload_ptr 
+4ddf 6fe0c78b fetch 1 ,memui_reconnect_mode 
+4de0 c0004de2 beq no_reconnection ,l2cap_rx_multiplexing 
+4de1 2020514d branch ml2cap_rx_multiplexing 
+
+l2cap_rx_multiplexing:
+4de2 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+4de3 203a4e5a branch l2cap_rx_reset_state ,blank 
+4de4 44f5c01d bpatch patch1d_3 ,mem_patch1d 
+4de5 6fe08319 fetch 1 ,mem_l2cap_rx_cid 
+4de6 c000cdf8 beq l2cap_signal_channel ,l2cap_call_proc_signal 
+
+l2cap_rx_multiplexing0:
+4de7 c0284e3a beq l2cap_sdp_channel ,l2cap_call_proc_sdp 
+4de8 c028ce53 beq l2cap_rfcomm_channel ,l2cap_call_proc_rfcomm 
+4de9 c0294e51 beq l2cap_hid_control_channel ,l2cap_call_proc_hid 
+4dea c029ce51 beq l2cap_hid_interrupt_channel ,l2cap_call_proc_hid 
+4deb 20204e5a branch l2cap_rx_reset_state 
+
+l2cap_check_map:
+4dec 44f6401d bpatch patch1d_4 ,mem_patch1d 
+4ded 20405301 call l2cap_malloc_get_full_map 
+4dee 6fe0c4e6 fetch 1 ,mem_used_map 
+4def c0007e60 beq 0 ,set_pdata_0 
+4df0 c000fe60 beq 1 ,set_pdata_0 
+4df1 c0017e60 beq 2 ,set_pdata_0 
+4df2 c001fe60 beq 3 ,set_pdata_0 
+4df3 c040fe60 beq 0x81 ,set_pdata_0 
+4df4 c0607e60 beq 0xc0 ,set_pdata_0 
+4df5 c0407e60 beq 0x80 ,set_pdata_0 
+4df6 c0207e60 beq 0x40 ,set_pdata_0 
+4df7 20600000 rtn 
+
+l2cap_call_proc_signal:
+4df8 20404dec call l2cap_check_map 
+4df9 247a0000 nrtn blank 
+
+l2cap_call_proc_signal0:
+4dfa 2040530b call l2cap_malloc_signal_channel 
+4dfb 20404e5f call l2cap_process_signal_pkt 
+4dfc 68490320 fetcht 2 ,mem_l2cap_signal_tx_length 
+4dfd 203a4e59 branch l2cap_call_proc_no_reply ,blank 
+4dfe 20405314 call l2cap_get_signal_tx_buff 
+4dff 6fe10320 fetch 2 ,mem_l2cap_signal_tx_length 
+4e00 e7e10005 istore 2 ,contw 
+4e01 18007e01 force l2cap_signal_channel ,pdata 
+4e02 e7e10005 istore 2 ,contw 
+4e03 20204e5a branch l2cap_rx_reset_state 
+
+l2cap_call_proc_sigal_pending:
+4e04 6fe0c5f4 fetch 1 ,mem_l2cap_pending_item 
+4e05 207a0000 rtn blank 
+4e06 1fe22200 copy pdata ,rega 
+4e07 44f6c01d bpatch patch1d_5 ,mem_patch1d 
+4e08 6fe20386 fetch 4 ,mem_l2cap_sdpres_delay_time 
+4e09 d8400100 arg 0x100 ,temp 
+4e0a 98408400 iadd temp ,temp 
+4e0b 1c427e00 copy clkn_bt ,pdata 
+4e0c 98467c00 isub temp ,null 
+4e0d 24610000 nrtn positive 
+4e0e 7045f400 jam 0 ,mem_l2cap_pending_item 
+4e0f 1a227e00 copy rega ,pdata 
+4e10 c0284e12 beq l2cap_sdp_channel ,l2cap_sdp_conn_succ 
+4e11 2020137a branch assert 
+
+l2cap_sdp_conn_succ:
+4e12 d9000000 arg 0 ,debug 
+4e13 2040530b call l2cap_malloc_signal_channel 
+4e14 20404ed8 call restore_l2cap_req_param 
+4e15 20405316 call l2cap_get_signal_tx_payload 
+4e16 20407cee call save_cont_pointers 
+4e17 20404f0b call send_connection_sdp_res 
+4e18 20405314 call l2cap_get_signal_tx_buff 
+4e19 5800000c setarg 0x000c 
+4e1a e7e10005 istore 2 ,contw 
+4e1b 18007e01 force l2cap_signal_channel ,pdata 
+4e1c e7e10005 istore 2 ,contw 
+4e1d 20204e5a branch l2cap_rx_reset_state 
+
+l2cap_reset_sdp_map:
+4e1e 44f7401d bpatch patch1d_6 ,mem_patch1d 
+4e1f 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+4e20 1fe0fe04 increase 4 ,pdata 
+4e21 20407eb6 call rshift7 
+4e22 1fe08401 add pdata ,1 ,temp 
+4e23 d8c044f0 arg mem_tx_fifo3 ,contr 
+4e24 efe18006 ifetch 3 ,contr 
+4e25 207a0000 rtn blank 
+4e26 67e1898e store 3 ,mem_tx_fifo_map_temp 
+4e27 6fe0898e fetch 1 ,mem_tx_fifo_map_temp 
+4e28 1fe22200 copy pdata ,rega 
+4e29 20404e2d call check_l2cap_map 
+4e2a 1a427e00 copy regb ,pdata 
+4e2b 67e0c4f0 store 1 ,mem_tx_fifo3 
+4e2c 20600000 rtn 
+
+check_l2cap_map:
+4e2d d8e00000 arg 0 ,queue 
+4e2e da400000 arg 0 ,regb 
+
+check_l2cap_map_loop:
+4e2f 18e67c07 sub queue ,7 ,null 
+4e30 24610000 nrtn positive 
+4e31 aa2fffff qisolate1 rega 
+4e32 2020ce34 branch check_l2cap_map_used ,true 
+4e33 20204e38 branch check_l2cap_map_used2 
+
+check_l2cap_map_used:
+4e34 18427e00 copy temp ,pdata 
+4e35 203a4e38 branch check_l2cap_map_used2 ,blank 
+4e36 f9202400 qset1 regb 
+4e37 184085ff increase -1 ,temp 
+
+check_l2cap_map_used2:
+4e38 18e08e01 increase 1 ,queue 
+4e39 20204e2f branch check_l2cap_map_loop 
+
+l2cap_call_proc_sdp:
+4e3a 204052f7 call l2cap_malloc_is_fifo_empty 
+4e3b 247a0000 nrtn blank 
+4e3c 20404dec call l2cap_check_map 
+4e3d 247a0000 nrtn blank 
+4e3e 20405318 call l2cap_malloc_sdp_channel 
+4e3f 20406df3 call enable_authrom 
+4e40 204066c7 call sdp_process 
+4e41 20406df7 call disable_authrom 
+4e42 20404e1e call l2cap_reset_sdp_map 
+4e43 20204e4a branch l2cap_call_proc_sdp_common 
+
+ml2cap_call_proc_sdp:
+4e44 204052f7 call l2cap_malloc_is_fifo_empty 
+4e45 247a0000 nrtn blank 
+4e46 20405318 call l2cap_malloc_sdp_channel 
+4e47 20406df3 call enable_authrom 
+4e48 204066c7 call sdp_process 
+4e49 20406df7 call disable_authrom 
+
+l2cap_call_proc_sdp_common:
+4e4a 20405321 call l2cap_get_sdp_tx_buff 
+4e4b 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+4e4c 203a4e59 branch l2cap_call_proc_no_reply ,blank 
+4e4d e7e10005 istore 2 ,contw 
+4e4e 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+4e4f e7e10005 istore 2 ,contw 
+4e50 20204e5a branch l2cap_rx_reset_state 
+
+l2cap_call_proc_hid:
+4e51 20404d8c call hid_rx_process 
+4e52 20204e5a branch l2cap_rx_reset_state 
+
+l2cap_call_proc_rfcomm:
+4e53 44f7c01d bpatch patch1d_7 ,mem_patch1d 
+4e54 70033500 jam rfcomm_malloc_succeed ,mem_rfcomm_malloc_fail_flag 
+4e55 20406341 call rfcomm_rx_process 
+4e56 6fe08335 fetch 1 ,mem_rfcomm_malloc_fail_flag 
+4e57 c1008000 rtneq rfcomm_malloc_fail 
+4e58 20204e5a branch l2cap_rx_reset_state 
+
+l2cap_call_proc_no_reply:
+4e59 204052e7 call l2cap_malloc_discard 
+
+l2cap_rx_reset_state:
+4e5a 58000000 setarg 0 
+4e5b 67e10317 store 2 ,mem_l2cap_rx_pkt_length 
+4e5c 67e10319 store 2 ,mem_l2cap_rx_cid 
+4e5d 70031b01 jam l2cap_rx_done ,mem_l2cap_rx_done 
+4e5e 20600000 rtn 
+
+l2cap_process_signal_pkt:
+4e5f 44f8401e bpatch patch1e_0 ,mem_patch1e 
+4e60 20405316 call l2cap_get_signal_tx_payload 
+4e61 18002400 force 0 ,regb 
+4e62 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+4e63 1fe22600 copy pdata ,regc 
+4e64 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+4e65 98000c00 iforce contr 
+
+l2cap_process_signal_pkt_loop:
+4e66 20404e6e call l2cap_process_one_signal 
+4e67 1a627e00 deposit regc 
+4e68 1a60a7fc increase -4 ,regc 
+4e69 1fe0fffc increase -4 ,pdata 
+4e6a 243a4e66 nbranch l2cap_process_signal_pkt_loop ,blank 
+4e6b 1a427e00 copy regb ,pdata 
+4e6c 67e10320 store 2 ,mem_l2cap_signal_tx_length 
+4e6d 20600000 rtn 
+
+l2cap_process_one_signal:
+4e6e 44f8c01e bpatch patch1e_1 ,mem_patch1e 
+4e6f efe08006 ifetch 1 ,contr 
+4e70 c000cea7 beq signal_cmd_reject ,l2cap_proc_signal_cmd_reject 
+4e71 c0014eaf beq signal_connect_req ,l2cap_proc_signal_connect_req 
+4e72 c001cf33 beq signal_connect_rsp ,l2cap_proc_signal_connect_rsp 
+4e73 c0024f63 beq signal_config_req ,l2cap_proc_signal_config_req 
+4e74 c002d000 beq signal_config_rsp ,l2cap_proc_signal_config_rsp 
+4e75 c0035029 beq signal_disconnect_req ,l2cap_proc_signal_disconnect_req 
+4e76 c003d079 beq signal_disconnect_rsp ,l2cap_proc_signal_disconnect_rsp 
+4e77 c00450ae beq signal_echo_req ,l2cap_proc_signal_echo_req 
+4e78 c004d0be beq signal_echo_rsp ,l2cap_proc_signal_echo_rsp 
+4e79 c0054e7d beq signal_info_req ,l2cap_proc_signal_info_req 
+4e7a c005d0bf beq signal_info_rsp ,l2cap_proc_signal_info_rsp 
+4e7b 204050c0 call l2cap_reject_command 
+
+l2cap_process_one_signal_rtn:
+4e7c 20600000 rtn 
+
+l2cap_proc_signal_info_req:
+4e7d efe08006 ifetch 1 ,contr 
+4e7e 1fe20e00 copy pdata ,queue 
+4e7f efe10006 ifetch 2 ,contr 
+4e80 1fe22200 copy pdata ,rega 
+4e81 1a627e00 copy regc ,pdata 
+4e82 9a262600 isub rega ,regc 
+4e83 5800000b setarg signal_info_rsp 
+4e84 e7e08005 istore 1 ,contw 
+4e85 18e27e00 copy queue ,pdata 
+4e86 e7e08005 istore 1 ,contw 
+4e87 efe10006 ifetch 2 ,contr 
+
+l2cap_proc_signal_info_req_reply:
+4e88 c0014e8b beq l2cap_sig_ext_featrue ,l2cap_proc_signal_info_req_ext 
+4e89 c001ce91 beq l2cap_sig_fix_featrue ,l2cap_proc_signal_info_req_fix 
+4e8a 20600000 rtn 
+
+l2cap_proc_signal_info_req_ext:
+4e8b 58020008 setarg 0x020008 
+4e8c e7e30005 istore 6 ,contw 
+4e8d 58000280 setarg 0x0280 
+4e8e e7e20005 istore 4 ,contw 
+4e8f 18007e0c force 12 ,pdata 
+4e90 20204e96 branch l2cap_proc_signal_info_req_common 
+
+l2cap_proc_signal_info_req_fix:
+4e91 5803000c setarg 0x3000c 
+4e92 e7e30005 istore 6 ,contw 
+4e93 58000006 setarg 0x0006 
+4e94 e7e40005 istore 8 ,contw 
+4e95 18007e10 force 16 ,pdata 
+
+l2cap_proc_signal_info_req_common:
+4e96 9a40a400 iadd regb ,regb 
+4e97 20204e7c branch l2cap_process_one_signal_rtn 
+
+ml2cap_proc_signal_info_req:
+4e98 efe08006 ifetch 1 ,contr 
+4e99 1fe20e00 copy pdata ,queue 
+4e9a efe10006 ifetch 2 ,contr 
+4e9b 1fe22200 copy pdata ,rega 
+4e9c efe10006 ifetch 2 ,contr 
+4e9d 67e10964 store 2 ,mem_temp 
+4e9e 1a627e00 copy regc ,pdata 
+4e9f 9a262600 isub rega ,regc 
+4ea0 20405316 call l2cap_get_signal_tx_payload 
+4ea1 5800000b setarg signal_info_rsp 
+4ea2 e7e08005 istore 1 ,contw 
+4ea3 18e27e00 copy queue ,pdata 
+4ea4 e7e08005 istore 1 ,contw 
+4ea5 6fe10964 fetch 2 ,mem_temp 
+4ea6 20204e88 branch l2cap_proc_signal_info_req_reply 
+
+l2cap_proc_signal_cmd_reject:
+4ea7 efe08006 ifetch 1 ,contr 
+4ea8 1fe20e00 copy pdata ,queue 
+4ea9 efe10006 ifetch 2 ,contr 
+4eaa 1fe22200 copy pdata ,rega 
+4eab 98c08c00 iadd contr ,contr 
+4eac 1a627e00 copy regc ,pdata 
+4ead 9a262600 isub rega ,regc 
+
+l2cap_proc_signal_cmd_reject_rtn:
+4eae 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_connect_req:
+4eaf 20407cee call save_cont_pointers 
+4eb0 20407cf3 call load_cont_pointers 
+4eb1 d9000000 arg 0 ,debug 
+4eb2 efe08006 ifetch 1 ,contr 
+4eb3 1fe20e00 copy pdata ,queue 
+4eb4 efe10006 ifetch 2 ,contr 
+4eb5 1fe22200 copy pdata ,rega 
+4eb6 efe10006 ifetch 2 ,contr 
+4eb7 1fe20400 copy pdata ,temp 
+4eb8 efe10006 ifetch 2 ,contr 
+4eb9 1fe21600 copy pdata ,timeup 
+4eba 44f9401e bpatch patch1e_2 ,mem_patch1e 
+4ebb 18427e00 copy temp ,pdata 
+4ebc c000cec2 beq psm_sdp ,l2cap_proc_signal_connect_req_sdp 
+4ebd c001cee4 beq psm_rfcomm ,l2cap_proc_signal_connect_req_rfcomm 
+4ebe c008cef0 beq psm_hid_control ,l2cap_proc_signal_connect_req_hid_ctrl 
+4ebf c009cefb beq psm_hid_interrupt ,l2cap_proc_signal_connect_req_hid_int 
+4ec0 204050c0 call l2cap_reject_command 
+4ec1 20204f32 branch l2cap_proc_signal_connect_req_rtn 
+
+l2cap_proc_signal_connect_req_sdp:
+4ec2 20407cee call save_cont_pointers 
+4ec3 d8400050 arg l2cap_sdp_channel ,temp 
+4ec4 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+4ec5 243a4f2c nbranch already_connected ,blank 
+4ec6 19627e00 copy timeup ,pdata 
+4ec7 67e144d8 store 2 ,mem_sdp_remote_cid 
+4ec8 1c427e00 copy clkn_bt ,pdata 
+4ec9 67e20386 store 4 ,mem_l2cap_sdpres_delay_time 
+4eca 20404ecc call store_l2cap_req_param 
+4ecb 20204f07 branch send_connection_pending 
+
+store_l2cap_req_param:
+4ecc 60490384 storet 2 ,mem_psm 
+4ecd 19627e00 deposit timeup 
+4ece 67e1037a store 2 ,mem_scid 
+4ecf 1a227e00 deposit rega 
+4ed0 67e1037c store 2 ,mem_cmd_length 
+4ed1 1a427e00 deposit regb 
+4ed2 67e1037e store 2 ,mem_tt2 
+4ed3 1a627e00 deposit regc 
+4ed4 67e10380 store 2 ,mem_tt3 
+4ed5 18e27e00 deposit queue 
+4ed6 67e10382 store 2 ,mem_id 
+4ed7 20600000 rtn 
+
+restore_l2cap_req_param:
+4ed8 68490384 fetcht 2 ,mem_psm 
+4ed9 6fe1037a fetch 2 ,mem_scid 
+4eda 1fe21600 copy pdata ,timeup 
+4edb 6fe1037c fetch 2 ,mem_cmd_length 
+4edc 1fe22200 copy pdata ,rega 
+4edd 6fe1037e fetch 2 ,mem_tt2 
+4ede 1fe22400 copy pdata ,regb 
+4edf 6fe10380 fetch 2 ,mem_tt3 
+4ee0 1fe22600 copy pdata ,regc 
+4ee1 6fe10382 fetch 2 ,mem_id 
+4ee2 1fe20e00 copy pdata ,queue 
+4ee3 20600000 rtn 
+
+l2cap_proc_signal_connect_req_rfcomm:
+4ee4 20407cee call save_cont_pointers 
+4ee5 58000051 setarg l2cap_rfcomm_channel 
+4ee6 d8400051 arg l2cap_rfcomm_channel ,temp 
+4ee7 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+4ee8 243a4f2c nbranch already_connected ,blank 
+4ee9 19627e00 copy timeup ,pdata 
+4eea 67e144da store 2 ,mem_rfcomm_remote_cid 
+4eeb 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+4eec 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4eed 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4eee 67e0c4e1 store 1 ,mem_rfcomm_state 
+4eef 20204f0f branch send_connection_res 
+
+l2cap_proc_signal_connect_req_hid_ctrl:
+4ef0 20407cee call save_cont_pointers 
+4ef1 d8400052 arg l2cap_hid_control_channel ,temp 
+4ef2 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+4ef3 243a4f2c nbranch already_connected ,blank 
+4ef4 19627e00 copy timeup ,pdata 
+4ef5 67e144dc store 2 ,mem_hid_ctrl_remote_cid 
+4ef6 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+4ef7 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4ef8 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4ef9 67e0c4e2 store 1 ,mem_hid_control_state 
+4efa 20204f0f branch send_connection_res 
+
+l2cap_proc_signal_connect_req_hid_int:
+4efb 20407cee call save_cont_pointers 
+4efc 1b427e00 deposit clke 
+4efd d8400053 arg l2cap_hid_interrupt_channel ,temp 
+4efe 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+4eff 243a4f2c nbranch already_connected ,blank 
+4f00 19627e00 copy timeup ,pdata 
+4f01 67e144de store 2 ,mem_hid_int_remote_cid 
+4f02 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+4f03 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4f04 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f05 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+4f06 20204f0f branch send_connection_res 
+
+send_connection_pending:
+4f07 58000001 setarg l2cap_connect_pending 
+4f08 67e1032e store 2 ,meml2cap_t1 
+4f09 7045f450 jam l2cap_sdp_channel ,mem_l2cap_pending_item 
+4f0a 20204f11 branch send_connection_res0 
+
+send_connection_sdp_res:
+4f0b 6fe0c4e0 fetch 1 ,mem_sdp_state 
+4f0c 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+4f0d 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f0e 67e0c4e0 store 1 ,mem_sdp_state 
+
+send_connection_res:
+4f0f 58000000 setarg l2cap_connect_successful 
+4f10 67e1032e store 2 ,meml2cap_t1 
+
+send_connection_res0:
+4f11 44f9c01e bpatch patch1e_3 ,mem_patch1e 
+4f12 20407cf3 call load_cont_pointers 
+4f13 58000003 setarg signal_connect_rsp 
+4f14 e7e08005 istore 1 ,contw 
+4f15 18e27e00 copy queue ,pdata 
+4f16 e7e08005 istore 1 ,contw 
+4f17 58000008 setarg 0x0008 
+4f18 e7e10005 istore 2 ,contw 
+4f19 18427e00 copy temp ,pdata 
+4f1a e7e10005 istore 2 ,contw 
+4f1b 19627e00 copy timeup ,pdata 
+4f1c e7e10005 istore 2 ,contw 
+4f1d 6fe1032e fetch 2 ,meml2cap_t1 
+4f1e c000cf27 beq l2cap_connect_pending ,connect_pending 
+4f1f 290c0000 isolate0 0 ,debug 
+4f20 2020cf22 branch connect_suc ,true 
+4f21 58000004 setarg l2cap_connect_refused_no_resources 
+
+connect_suc:
+4f22 e7e10005 istore 2 ,contw 
+4f23 18007e00 force 0x0000 ,pdata 
+4f24 e7e10005 istore 2 ,contw 
+4f25 5800000c setarg 12 
+4f26 20204f2e branch connect_req_update_byte_counts 
+
+connect_pending:
+4f27 e7e10005 istore 2 ,contw 
+4f28 18007e02 force 0x0002 ,pdata 
+4f29 e7e10005 istore 2 ,contw 
+4f2a 5800000c setarg 12 
+4f2b 20204f2e branch connect_req_update_byte_counts 
+
+already_connected:
+4f2c 79201000 set1 0 ,debug 
+4f2d 20204f0f branch send_connection_res 
+
+connect_req_update_byte_counts:
+4f2e 9a40a400 iadd regb ,regb 
+4f2f 1a627e00 copy regc ,pdata 
+4f30 9a262600 isub rega ,regc 
+4f31 20204f32 branch l2cap_proc_signal_connect_req_rtn 
+
+l2cap_proc_signal_connect_req_rtn:
+4f32 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_connect_rsp:
+4f33 efe08006 ifetch 1 ,contr 
+4f34 1fe20e00 copy pdata ,queue 
+4f35 efe10006 ifetch 2 ,contr 
+4f36 1fe22200 copy pdata ,rega 
+4f37 1a627e00 copy regc ,pdata 
+4f38 9a262600 isub rega ,regc 
+4f39 efe10006 ifetch 2 ,contr 
+4f3a 1fe21600 copy pdata ,timeup 
+4f3b efe10006 ifetch 2 ,contr 
+4f3c 1fe20400 copy pdata ,temp 
+4f3d 44fa401e bpatch patch1e_4 ,mem_patch1e 
+4f3e 58000050 setarg l2cap_sdp_channel 
+4f3f 98467c00 isub temp ,null 
+4f40 2022cf4b branch l2cap_proc_signal_connect_rsp_sdp ,zero 
+4f41 58000051 setarg l2cap_rfcomm_channel 
+4f42 98467c00 isub temp ,null 
+4f43 2022cf51 branch l2cap_proc_signal_connect_rsp_rfcomm ,zero 
+4f44 58000052 setarg l2cap_hid_control_channel 
+4f45 98467c00 isub temp ,null 
+4f46 2022cf5d branch l2cap_proc_signal_connect_rsp_hid_ctrl ,zero 
+4f47 58000053 setarg l2cap_hid_interrupt_channel 
+4f48 98467c00 isub temp ,null 
+4f49 2022cf57 branch l2cap_proc_signal_connect_rsp_hid_int ,zero 
+4f4a 20600000 rtn 
+
+l2cap_proc_signal_connect_rsp_sdp:
+4f4b 19627e00 copy timeup ,pdata 
+4f4c 67e144d8 store 2 ,mem_sdp_remote_cid 
+4f4d 6fe0c4e0 fetch 1 ,mem_sdp_state 
+4f4e 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f4f 67e0c4e0 store 1 ,mem_sdp_state 
+4f50 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_connect_rsp_rfcomm:
+4f51 19627e00 copy timeup ,pdata 
+4f52 67e144da store 2 ,mem_rfcomm_remote_cid 
+4f53 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+4f54 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f55 67e0c4e1 store 1 ,mem_rfcomm_state 
+4f56 20600000 rtn 
+
+l2cap_proc_signal_connect_rsp_hid_int:
+4f57 19627e00 copy timeup ,pdata 
+4f58 67e144dc store 2 ,mem_hid_ctrl_remote_cid 
+4f59 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+4f5a 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f5b 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+4f5c 20600000 rtn 
+
+l2cap_proc_signal_connect_rsp_hid_ctrl:
+4f5d 19627e00 copy timeup ,pdata 
+4f5e 67e144de store 2 ,mem_hid_int_remote_cid 
+4f5f 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+4f60 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+4f61 67e0c4e2 store 1 ,mem_hid_control_state 
+4f62 20600000 rtn 
+
+l2cap_proc_signal_config_req:
+4f63 efe08006 ifetch 1 ,contr 
+4f64 1fe20e00 copy pdata ,queue 
+4f65 efe10006 ifetch 2 ,contr 
+4f66 1fe22200 copy pdata ,rega 
+4f67 1a627e00 copy regc ,pdata 
+4f68 9a262600 isub rega ,regc 
+4f69 efe10006 ifetch 2 ,contr 
+4f6a 1fe20400 copy pdata ,temp 
+4f6b 18422200 copy temp ,rega 
+4f6c 44fac01e bpatch patch1e_5 ,mem_patch1e 
+4f6d 58000050 setarg l2cap_sdp_channel 
+4f6e 98467c00 isub temp ,null 
+4f6f 2022cf7a branch l2cap_proc_signal_config_req_sdp ,zero 
+4f70 58000051 setarg l2cap_rfcomm_channel 
+4f71 98467c00 isub temp ,null 
+4f72 2022cf98 branch l2cap_proc_signal_config_req_rfcomm ,zero 
+4f73 58000052 setarg l2cap_hid_control_channel 
+4f74 98467c00 isub temp ,null 
+4f75 2022cf84 branch l2cap_proc_signal_config_req_hid_ctrl ,zero 
+4f76 58000053 setarg l2cap_hid_interrupt_channel 
+4f77 98467c00 isub temp ,null 
+4f78 2022cf8e branch l2cap_proc_signal_config_req_hid_int ,zero 
+4f79 202050c0 branch l2cap_reject_command 
+
+l2cap_proc_signal_config_req_sdp:
+4f7a 18a21600 copy contw ,timeup 
+4f7b 6fe0c4e0 fetch 1 ,mem_sdp_state 
+4f7c 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4f7d 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4f7e 67e0c4e0 store 1 ,mem_sdp_state 
+4f7f 19620a00 copy timeup ,contw 
+4f80 d9600050 arg l2cap_sdp_channel ,timeup 
+4f81 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+4f82 1fe20400 copy pdata ,temp 
+4f83 20204fa1 branch l2cap_send_config_rsp 
+
+l2cap_proc_signal_config_req_hid_ctrl:
+4f84 18a21600 copy contw ,timeup 
+4f85 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+4f86 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4f87 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4f88 67e0c4e2 store 1 ,mem_hid_control_state 
+4f89 19620a00 copy timeup ,contw 
+4f8a d9600052 arg l2cap_hid_control_channel ,timeup 
+4f8b 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+4f8c 1fe20400 copy pdata ,temp 
+4f8d 20204fa1 branch l2cap_send_config_rsp 
+
+l2cap_proc_signal_config_req_hid_int:
+4f8e 18a21600 copy contw ,timeup 
+4f8f 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+4f90 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4f91 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4f92 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+4f93 19620a00 copy timeup ,contw 
+4f94 d9600053 arg l2cap_hid_interrupt_channel ,timeup 
+4f95 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+4f96 1fe20400 copy pdata ,temp 
+4f97 20204fa1 branch l2cap_send_config_rsp 
+
+l2cap_proc_signal_config_req_rfcomm:
+4f98 18a21600 copy contw ,timeup 
+4f99 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+4f9a 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+4f9b 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+4f9c 67e0c4e1 store 1 ,mem_rfcomm_state 
+4f9d 19620a00 copy timeup ,contw 
+4f9e d9600051 arg l2cap_rfcomm_channel ,timeup 
+4f9f 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+4fa0 1fe20400 copy pdata ,temp 
+
+l2cap_send_config_rsp:
+4fa1 44fb401e bpatch patch1e_6 ,mem_patch1e 
+4fa2 58000005 setarg signal_config_rsp 
+4fa3 e7e08005 istore 1 ,contw 
+4fa4 18e27e00 copy queue ,pdata 
+4fa5 e7e08005 istore 1 ,contw 
+4fa6 58000006 setarg 0x0006 
+4fa7 e7e10005 istore 2 ,contw 
+4fa8 18427e00 copy temp ,pdata 
+4fa9 e7e10005 istore 2 ,contw 
+4faa 18007e00 force 0x00 ,pdata 
+4fab e7e10005 istore 2 ,contw 
+4fac 18007e00 force l2cap_config_success ,pdata 
+4fad e7e10005 istore 2 ,contw 
+4fae 18007e0a force 10 ,pdata 
+4faf 9a40a400 iadd regb ,regb 
+4fb0 60490333 storet 2 ,mem_config_req_dest_cid 
+4fb1 18e27e00 copy queue ,pdata 
+4fb2 67e08332 store 1 ,mem_config_identifier 
+4fb3 18007e50 force l2cap_sdp_channel ,pdata 
+4fb4 a961fe00 icompare 0xff ,timeup 
+4fb5 2020cfb7 branch l2cap_send_config_rsp_is_sdp ,true 
+4fb6 1fe0fe01 increase 1 ,pdata 
+
+l2cap_send_config_rsp_is_sdp:
+4fb7 20600000 rtn 
+
+l2cap_check_channel_state:
+4fb8 78547c00 disable user 
+4fb9 c3810000 rtnbit1 l2cap_channel_state_snd_cfg_req ,pdata 
+4fba c4000000 rtnbit0 l2cap_channel_state_conn_req ,pdata 
+4fbb c4008000 rtnbit0 l2cap_channel_state_conn_res ,pdata 
+4fbc 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+4fbd 18c20a00 copy contr ,contw 
+4fbe 18a08bff increase -1 ,contw 
+4fbf e7e08005 istore 1 ,contw 
+4fc0 78347c00 enable user 
+4fc1 20600000 rtn 
+
+l2cap_send_config_req:
+
+l2cap_send_config_req_sdp:
+4fc2 6fe0c4e0 fetch 1 ,mem_sdp_state 
+4fc3 20404fb8 call l2cap_check_channel_state 
+4fc4 24344fc9 nbranch l2cap_send_config_req_rfcomm ,user 
+4fc5 70033150 jam l2cap_sdp_channel ,mem_send_config_req 
+4fc6 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+4fc7 67e10333 store 2 ,mem_config_req_dest_cid 
+4fc8 20204fdd branch l2cap_generate_config_req 
+
+l2cap_send_config_req_rfcomm:
+4fc9 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+4fca 20404fb8 call l2cap_check_channel_state 
+4fcb 24344fd0 nbranch l2cap_send_config_req_hid_ctrl ,user 
+4fcc 70033151 jam l2cap_rfcomm_channel ,mem_send_config_req 
+4fcd 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+4fce 67e10333 store 2 ,mem_config_req_dest_cid 
+4fcf 20204fdd branch l2cap_generate_config_req 
+
+l2cap_send_config_req_hid_ctrl:
+4fd0 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+4fd1 20404fb8 call l2cap_check_channel_state 
+4fd2 24344fd7 nbranch l2cap_send_config_req_hid_int ,user 
+4fd3 70033152 jam l2cap_hid_control_channel ,mem_send_config_req 
+4fd4 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+4fd5 67e10333 store 2 ,mem_config_req_dest_cid 
+4fd6 20204fdd branch l2cap_generate_config_req 
+
+l2cap_send_config_req_hid_int:
+4fd7 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+4fd8 20404fb8 call l2cap_check_channel_state 
+4fd9 24740000 nrtn user 
+4fda 70033153 jam l2cap_hid_interrupt_channel ,mem_send_config_req 
+4fdb 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+4fdc 67e10333 store 2 ,mem_config_req_dest_cid 
+
+l2cap_generate_config_req:
+4fdd 44fbc01e bpatch patch1e_7 ,mem_patch1e 
+4fde 20405297 call l2cap_get_req_id 
+4fdf 2040530b call l2cap_malloc_signal_channel 
+4fe0 18002400 force 0 ,regb 
+4fe1 20405316 call l2cap_get_signal_tx_payload 
+4fe2 18007e04 force signal_config_req ,pdata 
+4fe3 e7e08005 istore 1 ,contw 
+4fe4 6fe0c4e5 fetch 1 ,mem_ml2cap_comm_id 
+4fe5 e7e08005 istore 1 ,contw 
+4fe6 58000008 setarg 0x0008 
+4fe7 e7e10005 istore 2 ,contw 
+4fe8 6fe10333 fetch 2 ,mem_config_req_dest_cid 
+4fe9 e7e10005 istore 2 ,contw 
+4fea 58000000 setarg 0x0000 
+4feb e7e10005 istore 2 ,contw 
+4fec 18007e01 force 1 ,pdata 
+4fed e7e08005 istore 1 ,contw 
+4fee 18007e02 force 2 ,pdata 
+4fef e7e08005 istore 1 ,contw 
+4ff0 6fe08331 fetch 1 ,mem_send_config_req 
+4ff1 c028cff5 beq l2cap_rfcomm_channel ,l2cap_generate_config_req_rfcomm 
+4ff2 58000030 setarg l2cap_config_mtu_sdp 
+4ff3 e7e10005 istore 2 ,contw 
+4ff4 20204ff7 branch l2cap_generate_config_req_done 
+
+l2cap_generate_config_req_rfcomm:
+4ff5 580003e3 setarg l2cap_config_mtu_rfcomm 
+4ff6 e7e10005 istore 2 ,contw 
+
+l2cap_generate_config_req_done:
+4ff7 d840000c arg 0x0c ,temp 
+4ff8 60490320 storet 2 ,mem_l2cap_signal_tx_length 
+4ff9 20405314 call l2cap_get_signal_tx_buff 
+4ffa 6fe10320 fetch 2 ,mem_l2cap_signal_tx_length 
+4ffb e7e10005 istore 2 ,contw 
+4ffc 18007e01 force l2cap_signal_channel ,pdata 
+4ffd e7e10005 istore 2 ,contw 
+4ffe 70033100 jam 0 ,mem_send_config_req 
+
+l2cap_proc_signal_config_req_rtn:
+4fff 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp:
+5000 18c08c01 increase 1 ,contr 
+5001 efe10006 ifetch 2 ,contr 
+5002 1fe22200 copy pdata ,rega 
+5003 1a627e00 copy regc ,pdata 
+5004 9a262600 isub rega ,regc 
+5005 efe10006 ifetch 2 ,contr 
+5006 1fe22200 copy pdata ,rega 
+5007 44fc401f bpatch patch1f_0 ,mem_patch1f 
+5008 58000050 setarg l2cap_sdp_channel 
+5009 9a267c00 isub rega ,null 
+500a 2022d018 branch l2cap_proc_signal_config_rsp_sdp ,zero 
+500b 58000051 setarg l2cap_rfcomm_channel 
+500c 9a267c00 isub rega ,null 
+500d 2022d01c branch l2cap_proc_signal_config_rsp_rfcomm ,zero 
+500e 58000052 setarg l2cap_hid_control_channel 
+500f 9a267c00 isub rega ,null 
+5010 2022d020 branch l2cap_proc_signal_config_rsp_hid_ctrl ,zero 
+5011 58000053 setarg l2cap_hid_interrupt_channel 
+5012 9a267c00 isub rega ,null 
+5013 2022d024 branch l2cap_proc_signal_config_rsp_hid_int ,zero 
+5014 18c08c02 increase 2 ,contr 
+5015 efe10006 ifetch 2 ,contr 
+5016 98007c00 iforce null 
+5017 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_sdp:
+5018 6fe0c4e0 fetch 1 ,mem_sdp_state 
+5019 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+501a 67e0c4e0 store 1 ,mem_sdp_state 
+501b 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_rfcomm:
+501c 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+501d 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+501e 67e0c4e1 store 1 ,mem_rfcomm_state 
+501f 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_hid_ctrl:
+5020 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+5021 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+5022 67e0c4e2 store 1 ,mem_hid_control_state 
+5023 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_config_rsp_hid_int:
+5024 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+5025 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+5026 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+5027 70095b06 jam bt_evt_hid_connected ,mem_fifo_temp 
+5028 20207871 branch ui_ipc_send_event 
+
+l2cap_proc_signal_disconnect_req:
+5029 efe08006 ifetch 1 ,contr 
+502a 1fe20e00 copy pdata ,queue 
+502b efe10006 ifetch 2 ,contr 
+502c 1fe22200 copy pdata ,rega 
+502d 1a627e00 copy regc ,pdata 
+502e 9a262600 isub rega ,regc 
+502f efe10006 ifetch 2 ,contr 
+5030 1fe22200 copy pdata ,rega 
+5031 efe10006 ifetch 2 ,contr 
+5032 1fe21600 copy pdata ,timeup 
+5033 1a220400 copy rega ,temp 
+5034 20407cee call save_cont_pointers 
+5035 44fcc01f bpatch patch1f_1 ,mem_patch1f 
+5036 58000050 setarg l2cap_sdp_channel 
+5037 98467c00 isub temp ,null 
+5038 2022d050 branch l2cap_proc_signal_disconnect_req_sdp ,zero 
+5039 58000051 setarg l2cap_rfcomm_channel 
+503a 98467c00 isub temp ,null 
+503b 2022d060 branch l2cap_proc_signal_disconnect_req_rfcomm ,zero 
+503c 58000052 setarg l2cap_hid_control_channel 
+503d 98467c00 isub temp ,null 
+503e 2022d044 branch l2cap_proc_signal_disconnect_req_hid_ctrl ,zero 
+503f 58000053 setarg l2cap_hid_interrupt_channel 
+5040 98467c00 isub temp ,null 
+5041 2022d04a branch l2cap_proc_signal_disconnect_req_hid_int ,zero 
+5042 204050c0 call l2cap_reject_command 
+5043 20205075 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_proc_signal_disconnect_req_hid_ctrl:
+5044 19620400 copy timeup ,temp 
+5045 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+5046 98467c00 isub temp ,null 
+5047 2022d056 branch l2cap_disconnect_hid_control_now ,zero 
+5048 204050c0 call l2cap_reject_command 
+5049 20205075 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_proc_signal_disconnect_req_hid_int:
+504a 19620400 copy timeup ,temp 
+504b 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+504c 98467c00 isub temp ,null 
+504d 2022d058 branch l2cap_disconnect_hid_interrupt_now ,zero 
+504e 204050c0 call l2cap_reject_command 
+504f 20205075 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_proc_signal_disconnect_req_sdp:
+5050 19620400 copy timeup ,temp 
+5051 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+5052 98467c00 isub temp ,null 
+5053 2022d05c branch l2cap_disconnect_sdp_now ,zero 
+5054 204050c0 call l2cap_reject_command 
+5055 20205075 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_disconnect_hid_control_now:
+5056 204050d7 call l2cap_reset_hid_ctrl_state 
+5057 20205068 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_disconnect_hid_interrupt_now:
+5058 204050dd call l2cap_reset_hid_int_state 
+5059 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+505a 203a5068 branch l2cap_send_disconnect_rsp_pkt ,blank 
+505b 20205068 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_disconnect_sdp_now:
+505c 204050d2 call l2cap_reset_sdp_channel_state 
+505d 6fe08339 fetch 1 ,mem_upper_sm_ss 
+505e 243a5068 nbranch l2cap_send_disconnect_rsp_pkt ,blank 
+505f 20205068 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_proc_signal_disconnect_req_rfcomm:
+5060 19620400 copy timeup ,temp 
+5061 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+5062 98467c00 isub temp ,null 
+5063 2022d066 branch l2cap_disconnect_rfcomm_now ,zero 
+5064 204050c0 call l2cap_reject_command 
+5065 20205075 branch l2cap_proc_signal_disconnect_req_err_rtn 
+
+l2cap_disconnect_rfcomm_now:
+5066 204050cd call l2cap_reset_rfcomm_channel_state 
+5067 20205068 branch l2cap_send_disconnect_rsp_pkt 
+
+l2cap_send_disconnect_rsp_pkt:
+5068 20407cf3 call load_cont_pointers 
+5069 58000007 setarg signal_disconnect_rsp 
+506a e7e08005 istore 1 ,contw 
+506b 18e27e00 copy queue ,pdata 
+506c e7e08005 istore 1 ,contw 
+506d 58000004 setarg 0x0004 
+506e e7e10005 istore 2 ,contw 
+506f 1a227e00 copy rega ,pdata 
+5070 e7e10005 istore 2 ,contw 
+5071 19627e00 copy timeup ,pdata 
+5072 e7e10005 istore 2 ,contw 
+5073 18007e08 force 8 ,pdata 
+5074 20205077 branch l2cap_proc_signal_disconnect_req_rtn 
+
+l2cap_proc_signal_disconnect_req_err_rtn:
+5075 20407cf3 call load_cont_pointers 
+5076 20205077 branch l2cap_proc_signal_disconnect_req_rtn 
+
+l2cap_proc_signal_disconnect_req_rtn:
+5077 9a40a400 iadd regb ,regb 
+5078 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_disconnect_rsp:
+5079 efe08006 ifetch 1 ,contr 
+507a 1fe20e00 copy pdata ,queue 
+507b efe10006 ifetch 2 ,contr 
+507c 1fe22200 copy pdata ,rega 
+507d 1a627e00 copy regc ,pdata 
+507e 9a262600 isub rega ,regc 
+507f efe10006 ifetch 2 ,contr 
+5080 1fe21600 copy pdata ,timeup 
+5081 efe10006 ifetch 2 ,contr 
+5082 1fe20400 copy pdata ,temp 
+5083 20407cee call save_cont_pointers 
+5084 44fd401f bpatch patch1f_2 ,mem_patch1f 
+5085 58000050 setarg l2cap_sdp_channel 
+5086 98467c00 isub temp ,null 
+5087 2022d093 branch l2cap_proc_signal_disconnect_rsp_sdp ,zero 
+5088 58000051 setarg l2cap_rfcomm_channel 
+5089 98467c00 isub temp ,null 
+508a 2022d099 branch l2cap_proc_signal_disconnect_rsp_rfcomm ,zero 
+508b 58000052 setarg l2cap_hid_control_channel 
+508c 98467c00 isub temp ,null 
+508d 2022d09f branch l2cap_proc_signal_disconnect_rsp_hid_ctrl ,zero 
+508e 58000053 setarg l2cap_hid_interrupt_channel 
+508f 98467c00 isub temp ,null 
+5090 2022d0a5 branch l2cap_proc_signal_disconnect_rsp_hid_int ,zero 
+5091 204050c0 call l2cap_reject_command 
+5092 202050ad branch l2cap_proc_signal_disconnect_rsp_err_rtn 
+
+l2cap_proc_signal_disconnect_rsp_sdp:
+5093 18422200 copy temp ,rega 
+5094 19620400 copy timeup ,temp 
+5095 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+5096 98467c00 isub temp ,null 
+5097 2042d0d2 call l2cap_reset_sdp_channel_state ,zero 
+5098 202050ab branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_rfcomm:
+5099 18422200 copy temp ,rega 
+509a 19620400 copy timeup ,temp 
+509b 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+509c 98467c00 isub temp ,null 
+509d 2042d0cd call l2cap_reset_rfcomm_channel_state ,zero 
+509e 202050ab branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_hid_ctrl:
+509f 18422200 copy temp ,rega 
+50a0 19620400 copy timeup ,temp 
+50a1 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+50a2 98467c00 isub temp ,null 
+50a3 2042d0d7 call l2cap_reset_hid_ctrl_state ,zero 
+50a4 202050ab branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_hid_int:
+50a5 18422200 copy temp ,rega 
+50a6 19620400 copy timeup ,temp 
+50a7 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+50a8 98467c00 isub temp ,null 
+50a9 2042d0dd call l2cap_reset_hid_int_state ,zero 
+50aa 202050ab branch l2cap_proc_signal_disconnect_rsp_rtn 
+
+l2cap_proc_signal_disconnect_rsp_rtn:
+50ab 20407cf3 call load_cont_pointers 
+50ac 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_disconnect_rsp_err_rtn:
+50ad 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_echo_req:
+50ae efe08006 ifetch 1 ,contr 
+50af 1fe20e00 copy pdata ,queue 
+50b0 efe10006 ifetch 2 ,contr 
+50b1 1fe22200 copy pdata ,rega 
+50b2 98c08c00 iadd contr ,contr 
+50b3 58000009 setarg 9 
+50b4 e7e08005 istore 1 ,contw 
+50b5 18e27e00 copy queue ,pdata 
+50b6 e7e08005 istore 1 ,contw 
+50b7 18007e00 force 0x0000 ,pdata 
+50b8 e7e10005 istore 2 ,contw 
+50b9 18007e04 force 4 ,pdata 
+50ba 9a40a400 iadd regb ,regb 
+50bb 1a627e00 copy regc ,pdata 
+50bc 9a262600 isub rega ,regc 
+50bd 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_echo_rsp:
+50be 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_proc_signal_info_rsp:
+50bf 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_reject_command:
+50c0 18002400 force 0 ,regb 
+50c1 20405316 call l2cap_get_signal_tx_payload 
+50c2 58000001 setarg signal_cmd_reject 
+50c3 e7e08005 istore 1 ,contw 
+50c4 18e27e00 copy queue ,pdata 
+50c5 e7e08005 istore 1 ,contw 
+50c6 58000002 setarg 2 
+50c7 e7e10005 istore 2 ,contw 
+50c8 58000000 setarg cmd_not_understood 
+50c9 e7e10005 istore 2 ,contw 
+50ca 1a40a406 increase 6 ,regb 
+50cb da600004 arg 4 ,regc 
+50cc 20204e7c branch l2cap_process_one_signal_rtn 
+
+l2cap_reset_rfcomm_channel_state:
+50cd 58000000 setarg 0 
+50ce 67e1032c store 2 ,mem_rfcomm_tx_pkt_length 
+50cf 67e144da store 2 ,mem_rfcomm_remote_cid 
+50d0 7044e100 jam 0 ,mem_rfcomm_state 
+50d1 20600000 rtn 
+
+l2cap_reset_sdp_channel_state:
+50d2 58000000 setarg 0 
+50d3 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+50d4 67e144d8 store 2 ,mem_sdp_remote_cid 
+50d5 7044e000 jam 0 ,mem_sdp_state 
+50d6 20600000 rtn 
+
+l2cap_reset_hid_ctrl_state:
+50d7 58000000 setarg 0 
+50d8 67e144dc store 2 ,mem_hid_ctrl_remote_cid 
+50d9 7044e200 jam 0 ,mem_hid_control_state 
+50da 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+50db c00050e3 beq 0 ,l2cap_reset_hid_disconnected 
+50dc 20600000 rtn 
+
+l2cap_reset_hid_int_state:
+50dd 58000000 setarg 0 
+50de 67e144de store 2 ,mem_hid_int_remote_cid 
+50df 7044e300 jam 0 ,mem_hid_interrupt_state 
+50e0 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+50e1 c00050e3 beq 0 ,l2cap_reset_hid_disconnected 
+50e2 20600000 rtn 
+
+l2cap_reset_hid_disconnected:
+50e3 70095b07 jam bt_evt_hid_disconnected ,mem_fifo_temp 
+50e4 20207871 branch ui_ipc_send_event 
+
+l2cap_disconnect_interrupt_req:
+50e5 6fe08330 fetch 1 ,mem_control_tasks 
+50e6 793ffe00 set0 l2cap_disconnect_interrupt ,pdata 
+50e7 67e08330 store 1 ,mem_control_tasks 
+50e8 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+50e9 207a0000 rtn blank 
+50ea 2040530b call l2cap_malloc_signal_channel 
+50eb 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+50ec 1fe22200 copy pdata ,rega 
+50ed 18002453 force l2cap_hid_interrupt_channel ,regb 
+50ee 202050f8 branch l2cap_generate_disconnect_req 
+
+l2cap_disconnect_control_req:
+50ef 6fe08330 fetch 1 ,mem_control_tasks 
+50f0 793ffe07 set0 l2cap_disconnect_control ,pdata 
+50f1 67e08330 store 1 ,mem_control_tasks 
+50f2 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+50f3 207a0000 rtn blank 
+50f4 2040530b call l2cap_malloc_signal_channel 
+50f5 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+50f6 1fe22200 copy pdata ,rega 
+50f7 18002452 force l2cap_hid_control_channel ,regb 
+
+l2cap_generate_disconnect_req:
+50f8 20405297 call l2cap_get_req_id 
+50f9 20405316 call l2cap_get_signal_tx_payload 
+50fa 18007e06 force signal_disconnect_req ,pdata 
+50fb e7e08005 istore 1 ,contw 
+50fc 6fe0c4e5 fetch 1 ,mem_ml2cap_comm_id 
+50fd e7e08005 istore 1 ,contw 
+50fe 58000004 setarg 0x0004 
+50ff e7e10005 istore 2 ,contw 
+5100 1a227e00 copy rega ,pdata 
+5101 e7e10005 istore 2 ,contw 
+5102 1a427e00 copy regb ,pdata 
+5103 e7e10005 istore 2 ,contw 
+5104 18000408 force 0x08 ,temp 
+5105 2020513c branch ml2cap_send_signal 
+
+ml2cap_send_signal_connect_req:
+5106 44fdc01f bpatch patch1f_3 ,mem_patch1f 
+5107 20405297 call l2cap_get_req_id 
+5108 20405316 call l2cap_get_signal_tx_payload 
+5109 58000002 setarg signal_connect_req 
+510a e7e08005 istore 1 ,contw 
+510b 6fe0c4e5 fetch 1 ,mem_ml2cap_comm_id 
+510c e7e08005 istore 1 ,contw 
+510d 58000004 setarg 0x0004 
+510e e7e10005 istore 2 ,contw 
+510f 18427e00 copy temp ,pdata 
+5110 e7e10005 istore 2 ,contw 
+5111 19627e00 copy timeup ,pdata 
+5112 e7e10005 istore 2 ,contw 
+5113 d8400008 arg 8 ,temp 
+5114 2020513c branch ml2cap_send_signal 
+
+ml2cap_send_signal_config_req:
+5115 44fe401f bpatch patch1f_4 ,mem_patch1f 
+5116 20405297 call l2cap_get_req_id 
+5117 20405316 call l2cap_get_signal_tx_payload 
+5118 58000004 setarg signal_config_req 
+5119 e7e08005 istore 1 ,contw 
+511a 6fe0c4e5 fetch 1 ,mem_ml2cap_comm_id 
+511b e7e08005 istore 1 ,contw 
+511c 58000008 setarg 0x0008 
+511d e7e10005 istore 2 ,contw 
+511e 18427e00 copy temp ,pdata 
+511f e7e10005 istore 2 ,contw 
+5120 58000000 setarg 0x0000 
+5121 e7e10005 istore 2 ,contw 
+5122 58000001 setarg 0x01 
+5123 e7e08005 istore 1 ,contw 
+5124 58000002 setarg 0x02 
+5125 e7e08005 istore 1 ,contw 
+5126 580003e3 setarg l2cap_config_mtu_rfcomm 
+5127 e7e10005 istore 2 ,contw 
+5128 d840000c arg 0xc ,temp 
+5129 2020513c branch ml2cap_send_signal 
+
+ml2cap_send_signal_disconn_req:
+512a 44fec01f bpatch patch1f_5 ,mem_patch1f 
+512b 20405297 call l2cap_get_req_id 
+512c 20405316 call l2cap_get_signal_tx_payload 
+512d 58000006 setarg signal_disconnect_req 
+512e e7e08005 istore 1 ,contw 
+512f 6fe0c4e5 fetch 1 ,mem_ml2cap_comm_id 
+5130 1fe0fe01 increase 1 ,pdata 
+5131 18a22200 copy contw ,rega 
+5132 67e0c4e5 store 1 ,mem_ml2cap_comm_id 
+5133 1a220a00 copy rega ,contw 
+5134 e7e08005 istore 1 ,contw 
+5135 58000004 setarg 0x0004 
+5136 e7e10005 istore 2 ,contw 
+5137 18427e00 copy temp ,pdata 
+5138 e7e10005 istore 2 ,contw 
+5139 19627e00 copy timeup ,pdata 
+513a e7e10005 istore 2 ,contw 
+513b d8400008 arg 0x8 ,temp 
+
+ml2cap_send_signal:
+513c 60490320 storet 2 ,mem_l2cap_signal_tx_length 
+513d 18427e00 copy temp ,pdata 
+513e 203a52e7 branch l2cap_malloc_discard ,blank 
+513f 20405314 call l2cap_get_signal_tx_buff 
+5140 6fe10320 fetch 2 ,mem_l2cap_signal_tx_length 
+5141 e7e10005 istore 2 ,contw 
+5142 18007e01 force l2cap_signal_channel ,pdata 
+5143 e7e10005 istore 2 ,contw 
+5144 20600000 rtn 
+
+msdp_send_req_done:
+5145 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+5146 203a137a branch assert ,blank 
+5147 20405321 call l2cap_get_sdp_tx_buff 
+5148 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+5149 e7e10005 istore 2 ,contw 
+514a 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+514b e7e10005 istore 2 ,contw 
+514c 20600000 rtn 
+
+ml2cap_rx_multiplexing:
+514d 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+514e 203a4e5a branch l2cap_rx_reset_state ,blank 
+514f 44ff401f bpatch patch1f_6 ,mem_patch1f 
+5150 6fe08319 fetch 1 ,mem_l2cap_rx_cid 
+5151 c000d157 beq l2cap_signal_channel ,ml2cap_call_proc_signal 
+5152 c0284e44 beq l2cap_sdp_channel ,ml2cap_call_proc_sdp 
+5153 c028ce53 beq l2cap_rfcomm_channel ,l2cap_call_proc_rfcomm 
+5154 c0294e51 beq l2cap_hid_control_channel ,l2cap_call_proc_hid 
+5155 c029ce51 beq l2cap_hid_interrupt_channel ,l2cap_call_proc_hid 
+5156 20204e5a branch l2cap_rx_reset_state 
+
+ml2cap_call_proc_signal:
+5157 2040530b call l2cap_malloc_signal_channel 
+5158 18002400 force 0 ,regb 
+5159 20405316 call l2cap_get_signal_tx_payload 
+515a 1fe20a00 copy pdata ,contw 
+515b 6fe10317 fetch 2 ,mem_l2cap_rx_pkt_length 
+515c 1fe22600 copy pdata ,regc 
+515d 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+515e 98000c00 iforce contr 
+
+ml2cap_proc_one_comm_loop:
+515f 20405165 call ml2cap_proc_one_comm 
+5160 1a60a7fc increase -4 ,regc 
+5161 2422d15f nbranch ml2cap_proc_one_comm_loop ,zero 
+5162 1a420400 copy regb ,temp 
+5163 2040513c call ml2cap_send_signal 
+5164 20204e5a branch l2cap_rx_reset_state 
+
+ml2cap_proc_one_comm:
+5165 efe08006 ifetch 1 ,contr 
+5166 c0015170 beq signal_connect_req ,ml2cap_proc_signal_connect_req 
+5167 c000d173 beq signal_cmd_reject ,ml2cap_proc_signal_cmd_reject 
+5168 c001d17d beq signal_connect_rsp ,ml2cap_proc_signal_connect_rsp 
+5169 c002d1b9 beq signal_config_rsp ,ml2cap_proc_signal_config_rsp 
+516a c00251eb beq signal_config_req ,ml2cap_proc_signal_config_req 
+516b c003d270 beq signal_disconnect_rsp ,ml2cap_proc_signal_disconn_rsp 
+516c c003523e beq signal_disconnect_req ,ml2cap_proc_signal_disconn_req 
+516d c00450ae beq signal_echo_req ,l2cap_proc_signal_echo_req 
+516e c0054e98 beq signal_info_req ,ml2cap_proc_signal_info_req 
+516f 2020528b branch ml2cap_proc_send_reject 
+
+ml2cap_proc_signal_connect_req:
+5170 20407cee call save_cont_pointers 
+5171 20407cf3 call load_cont_pointers 
+5172 20204eaf branch l2cap_proc_signal_connect_req 
+
+ml2cap_proc_signal_cmd_reject:
+5173 efe08006 ifetch 1 ,contr 
+5174 1fe20e00 copy pdata ,queue 
+5175 efe10006 ifetch 2 ,contr 
+5176 1fe22200 copy pdata ,rega 
+5177 1a627e00 copy regc ,pdata 
+5178 9a262600 isub rega ,regc 
+
+mvptr:
+5179 efe08006 ifetch 1 ,contr 
+517a 1a20a3ff increase -1 ,rega 
+517b 2422d179 nbranch mvptr ,zero 
+517c 20600000 rtn 
+
+ml2cap_proc_signal_connect_rsp:
+517d efe08006 ifetch 1 ,contr 
+517e 1fe20e00 copy pdata ,queue 
+517f efe10006 ifetch 2 ,contr 
+5180 1fe22200 copy pdata ,rega 
+5181 efe10006 ifetch 2 ,contr 
+5182 1fe21600 copy pdata ,timeup 
+5183 efe10006 ifetch 2 ,contr 
+5184 1fe20400 copy pdata ,temp 
+5185 efe10006 ifetch 2 ,contr 
+5186 1fe67c00 sub pdata ,0 ,null 
+5187 2022d18f branch ml2cap_proc_signal_connect_rsp_sucessful ,zero 
+5188 c001518b beq l2cap_connect_refused_psm_unsupported ,ml2cap_proc_signal_connect_refused_result 
+5189 c002518b beq l2cap_connect_refused_no_resources ,ml2cap_proc_signal_connect_refused_result 
+518a 2020518d branch ml2cap_proc_signal_connect_rsp_mnosucc 
+
+ml2cap_proc_signal_connect_refused_result:
+518b 70095b16 jam bt_evt_ml2cap_conn_refused ,mem_fifo_temp 
+518c 20407871 call ui_ipc_send_event 
+
+ml2cap_proc_signal_connect_rsp_mnosucc:
+518d efe10006 ifetch 2 ,contr 
+518e 202051b6 branch mnosucc 
+
+ml2cap_proc_signal_connect_rsp_sucessful:
+518f 20407cee call save_cont_pointers 
+5190 44ffc01f bpatch patch1f_7 ,mem_patch1f 
+5191 58000050 setarg l2cap_sdp_channel 
+5192 98467c00 isub temp ,null 
+5193 2022d19e branch ml2cap_proc_signal_connect_rsp_sdp ,zero 
+5194 58000051 setarg l2cap_rfcomm_channel 
+5195 98467c00 isub temp ,null 
+5196 2022d1a4 branch ml2cap_proc_signal_connect_rsp_rfcomm ,zero 
+5197 58000053 setarg l2cap_hid_interrupt_channel 
+5198 98467c00 isub temp ,null 
+5199 2022d1b0 branch ml2cap_proc_signal_connect_rsp_hid_int ,zero 
+519a 58000052 setarg l2cap_hid_control_channel 
+519b 98467c00 isub temp ,null 
+519c 2022d1aa branch ml2cap_proc_signal_connect_rsp_hid_ctrl ,zero 
+519d 202051b6 branch mnosucc 
+
+ml2cap_proc_signal_connect_rsp_sdp:
+519e 19627e00 copy timeup ,pdata 
+519f 67e144d8 store 2 ,mem_sdp_remote_cid 
+51a0 6fe0c4e0 fetch 1 ,mem_sdp_state 
+51a1 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+51a2 67e0c4e0 store 1 ,mem_sdp_state 
+51a3 202051b5 branch mnosucc1 
+
+ml2cap_proc_signal_connect_rsp_rfcomm:
+51a4 19627e00 copy timeup ,pdata 
+51a5 67e144da store 2 ,mem_rfcomm_remote_cid 
+51a6 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+51a7 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+51a8 67e0c4e1 store 1 ,mem_rfcomm_state 
+51a9 202051b5 branch mnosucc1 
+
+ml2cap_proc_signal_connect_rsp_hid_ctrl:
+51aa 19627e00 copy timeup ,pdata 
+51ab 67e144dc store 2 ,mem_hid_ctrl_remote_cid 
+51ac 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+51ad 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+51ae 67e0c4e2 store 1 ,mem_hid_control_state 
+51af 202051b5 branch mnosucc1 
+
+ml2cap_proc_signal_connect_rsp_hid_int:
+51b0 19627e00 copy timeup ,pdata 
+51b1 67e144de store 2 ,mem_hid_int_remote_cid 
+51b2 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+51b3 79207e01 set1 l2cap_channel_state_conn_res ,pdata 
+51b4 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+
+mnosucc1:
+51b5 20407cf3 call load_cont_pointers 
+
+mnosucc:
+51b6 1a627e00 copy regc ,pdata 
+51b7 9a262600 isub rega ,regc 
+51b8 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp:
+51b9 efe08006 ifetch 1 ,contr 
+51ba 1fe20e00 copy pdata ,queue 
+51bb efe10006 ifetch 2 ,contr 
+51bc 1fe22200 copy pdata ,rega 
+51bd 1a627e00 copy regc ,pdata 
+51be 9a262600 isub rega ,regc 
+51bf efe10006 ifetch 2 ,contr 
+51c0 1fe21600 copy pdata ,timeup 
+51c1 efe10006 ifetch 2 ,contr 
+51c2 efe10006 ifetch 2 ,contr 
+51c3 243a51e5 nbranch mcrsdone1 ,blank 
+51c4 20407cee call save_cont_pointers 
+51c5 19620400 copy timeup ,temp 
+51c6 47004020 bpatchx patch20_0 ,mem_patch20 
+51c7 58000050 setarg l2cap_sdp_channel 
+51c8 98467c00 isub temp ,null 
+51c9 2022d1d3 branch ml2cap_proc_signal_config_rsp_sdp ,zero 
+51ca 58000051 setarg l2cap_rfcomm_channel 
+51cb 98467c00 isub temp ,null 
+51cc 2022d1d7 branch ml2cap_proc_signal_config_rsp_rfcomm ,zero 
+51cd 58000052 setarg l2cap_hid_control_channel 
+51ce 98467c00 isub temp ,null 
+51cf 2022d1db branch ml2cap_proc_signal_config_rsp_hid_ctrl ,zero 
+51d0 58000053 setarg l2cap_hid_interrupt_channel 
+51d1 98467c00 isub temp ,null 
+51d2 2022d1df branch ml2cap_proc_signal_config_rsp_hid_int ,zero 
+
+ml2cap_proc_signal_config_rsp_sdp:
+51d3 6fe0c4e0 fetch 1 ,mem_sdp_state 
+51d4 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+51d5 67e0c4e0 store 1 ,mem_sdp_state 
+51d6 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp_rfcomm:
+51d7 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+51d8 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+51d9 67e0c4e1 store 1 ,mem_rfcomm_state 
+51da 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp_hid_ctrl:
+51db 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+51dc 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+51dd 67e0c4e2 store 1 ,mem_hid_control_state 
+51de 20600000 rtn 
+
+ml2cap_proc_signal_config_rsp_hid_int:
+51df 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+51e0 79207e05 set1 l2cap_channel_state_rcv_cfg_res ,pdata 
+51e1 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+51e2 70095b06 jam bt_evt_hid_connected ,mem_fifo_temp 
+51e3 20207871 branch ui_ipc_send_event 
+
+mcfrsdone:
+51e4 20407cf3 call load_cont_pointers 
+
+mcrsdone1:
+51e5 1a20a3fa increase -6 ,rega 
+
+mloop2:
+51e6 2022d1ea branch mcrsdone ,zero 
+51e7 18c08c01 increase 1 ,contr 
+51e8 1a20a3ff increase -1 ,rega 
+51e9 202051e6 branch mloop2 
+
+mcrsdone:
+51ea 20600000 rtn 
+
+ml2cap_proc_signal_config_req:
+51eb efe08006 ifetch 1 ,contr 
+51ec 1fe20e00 copy pdata ,queue 
+51ed efe10006 ifetch 2 ,contr 
+51ee 1fe22200 copy pdata ,rega 
+51ef 1a627e00 copy regc ,pdata 
+51f0 9a262600 isub rega ,regc 
+51f1 efe10006 ifetch 2 ,contr 
+51f2 18c08c02 increase 2 ,contr 
+51f3 1fe20400 copy pdata ,temp 
+51f4 58000005 setarg signal_config_rsp 
+51f5 e7e08005 istore 1 ,contw 
+51f6 18e27e00 copy queue ,pdata 
+51f7 e7e08005 istore 1 ,contw 
+51f8 1a20a202 increase 2 ,rega 
+51f9 1a227e00 copy rega ,pdata 
+51fa e7e10005 istore 2 ,contw 
+51fb 20407cee call save_cont_pointers 
+51fc 4700c020 bpatchx patch20_1 ,mem_patch20 
+51fd 58000050 setarg l2cap_sdp_channel 
+51fe 98467c00 isub temp ,null 
+51ff 2022d20a branch ml2cap_proc_signal_config_req_sdp ,zero 
+5200 58000051 setarg l2cap_rfcomm_channel 
+5201 98467c00 isub temp ,null 
+5202 2022d21b branch ml2cap_proc_signal_config_req_rfcomm ,zero 
+5203 58000052 setarg l2cap_hid_control_channel 
+5204 98467c00 isub temp ,null 
+5205 2022d221 branch ml2cap_proc_signal_config_req_hid_ctrl ,zero 
+5206 58000053 setarg l2cap_hid_interrupt_channel 
+5207 98467c00 isub temp ,null 
+5208 2022d227 branch ml2cap_proc_signal_config_req_hid_int ,zero 
+5209 2020522c branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_sdp:
+520a 6fe0c4e0 fetch 1 ,mem_sdp_state 
+520b 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+520c 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+520d 67e0c4e0 store 1 ,mem_sdp_state 
+520e c2815218 bbit1 l2cap_channel_state_snd_cfg_req ,ml2cap_proc_signal_config_req_sdp_nsndreq 
+520f 68488330 fetcht 1 ,mem_control_tasks 
+5210 79200406 set1 l2cap_init_config_req ,temp 
+5211 60488330 storet 1 ,mem_control_tasks 
+5212 18e27e00 copy queue ,pdata 
+5213 1fe0fe01 increase 1 ,pdata 
+5214 67e08332 store 1 ,mem_config_identifier 
+5215 6fe0c4e0 fetch 1 ,mem_sdp_state 
+5216 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+5217 67e0c4e0 store 1 ,mem_sdp_state 
+
+ml2cap_proc_signal_config_req_sdp_nsndreq:
+5218 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+5219 67e10333 store 2 ,mem_config_req_dest_cid 
+521a 2020522c branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_rfcomm:
+521b 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+521c 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+521d 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+521e 67e0c4e1 store 1 ,mem_rfcomm_state 
+521f 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+5220 2020522c branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_hid_ctrl:
+5221 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+5222 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+5223 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+5224 67e0c4e2 store 1 ,mem_hid_control_state 
+5225 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+5226 2020522c branch mcfgrq_done 
+
+ml2cap_proc_signal_config_req_hid_int:
+5227 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+5228 79207e04 set1 l2cap_channel_state_rcv_cfg_req ,pdata 
+5229 79207e03 set1 l2cap_channel_state_snd_cfg_res ,pdata 
+522a 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+522b 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+
+mcfgrq_done:
+522c 1fe21600 copy pdata ,timeup 
+522d 20407cf3 call load_cont_pointers 
+522e 19627e00 copy timeup ,pdata 
+522f e7e10005 istore 2 ,contw 
+5230 18007e00 force 0x0000 ,pdata 
+5231 e7e10005 istore 2 ,contw 
+5232 18007e00 force 0x0000 ,pdata 
+5233 e7e10005 istore 2 ,contw 
+5234 18007e0a force 10 ,pdata 
+5235 9a40a400 iadd regb ,regb 
+5236 1a20a3fa increase -6 ,rega 
+
+mloop1:
+5237 2022d23d branch mcrqdone ,zero 
+5238 efe08006 ifetch 1 ,contr 
+5239 e7e08005 istore 1 ,contw 
+523a 1a40a401 increase 1 ,regb 
+523b 1a20a3ff increase -1 ,rega 
+523c 20205237 branch mloop1 
+
+mcrqdone:
+523d 20600000 rtn 
+
+ml2cap_proc_signal_disconn_req:
+523e efe08006 ifetch 1 ,contr 
+523f 1fe20e00 copy pdata ,queue 
+5240 efe10006 ifetch 2 ,contr 
+5241 1fe22200 copy pdata ,rega 
+5242 1a627e00 copy regc ,pdata 
+5243 9a262600 isub rega ,regc 
+5244 efe10006 ifetch 2 ,contr 
+5245 1fe22200 copy pdata ,rega 
+5246 efe10006 ifetch 2 ,contr 
+5247 1fe21600 copy pdata ,timeup 
+5248 20407cee call save_cont_pointers 
+5249 47014020 bpatchx patch20_2 ,mem_patch20 
+524a 58000050 setarg l2cap_sdp_channel 
+524b 1a220400 copy rega ,temp 
+524c 98467c00 isub temp ,null 
+524d 2022d257 branch ml2cap_proc_signal_disconn_sdp ,zero 
+524e 58000052 setarg l2cap_hid_control_channel 
+524f 1a220400 copy rega ,temp 
+5250 98467c00 isub temp ,null 
+5251 2022d25c branch ml2cap_proc_signal_disconn_hid_ctrl ,zero 
+5252 58000053 setarg l2cap_hid_interrupt_channel 
+5253 1a220400 copy rega ,temp 
+5254 98467c00 isub temp ,null 
+5255 2022d25e branch ml2cap_proc_signal_disconn_hid_int ,zero 
+5256 20205260 branch mclsrfc 
+
+ml2cap_proc_signal_disconn_sdp:
+5257 58000000 setarg 0x0000 
+5258 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+5259 67e144d8 store 2 ,mem_sdp_remote_cid 
+525a 67e0c4e0 store 1 ,mem_sdp_state 
+525b 20205262 branch mclssdp 
+
+ml2cap_proc_signal_disconn_hid_ctrl:
+525c 204050d7 call l2cap_reset_hid_ctrl_state 
+525d 20205262 branch mclssdp 
+
+ml2cap_proc_signal_disconn_hid_int:
+525e 204050dd call l2cap_reset_hid_int_state 
+525f 20205262 branch mclssdp 
+
+mclsrfc:
+5260 58000000 setarg 0x0000 
+5261 67e1032c store 2 ,mem_rfcomm_tx_pkt_length 
+
+mclssdp:
+5262 20407cf3 call load_cont_pointers 
+5263 58000007 setarg signal_disconnect_rsp 
+5264 e7e08005 istore 1 ,contw 
+5265 18e27e00 copy queue ,pdata 
+5266 e7e08005 istore 1 ,contw 
+5267 58000004 setarg 0x0004 
+5268 e7e10005 istore 2 ,contw 
+5269 1a227e00 copy rega ,pdata 
+526a e7e10005 istore 2 ,contw 
+526b 19627e00 copy timeup ,pdata 
+526c e7e10005 istore 2 ,contw 
+526d 18007e08 force 8 ,pdata 
+526e 9a40a400 iadd regb ,regb 
+526f 20600000 rtn 
+
+ml2cap_proc_signal_disconn_rsp:
+5270 efe08006 ifetch 1 ,contr 
+5271 1fe20e00 copy pdata ,queue 
+5272 efe10006 ifetch 2 ,contr 
+5273 1fe22200 copy pdata ,rega 
+5274 efe10006 ifetch 2 ,contr 
+5275 1fe21600 copy pdata ,timeup 
+5276 efe10006 ifetch 2 ,contr 
+5277 1fe20400 copy pdata ,temp 
+5278 20407cee call save_cont_pointers 
+5279 4701c020 bpatchx patch20_3 ,mem_patch20 
+527a 6fe0c4e5 fetch 1 ,mem_ml2cap_comm_id 
+527b a8e1fe00 icompare 0xff ,queue 
+527c 2420d287 nbranch mdisdone ,true 
+527d 58000050 setarg l2cap_sdp_channel 
+527e 98467c00 isub temp ,null 
+527f 2022d284 branch ml2cap_proc_signal_disconn_rsp_sdp ,zero 
+5280 58000051 setarg l2cap_rfcomm_channel 
+5281 98467c00 isub temp ,null 
+5282 2022d287 branch ml2cap_proc_signal_disconn_rsp_rfcomm ,zero 
+5283 20205287 branch mdisdone 
+
+ml2cap_proc_signal_disconn_rsp_sdp:
+5284 7044d800 jam 0 ,mem_sdp_remote_cid 
+5285 7044e000 jam 0 ,mem_sdp_state 
+5286 20205287 branch mdisdone 
+
+ml2cap_proc_signal_disconn_rsp_rfcomm:
+
+mdisdone:
+5287 20407cf3 call load_cont_pointers 
+5288 1a627e00 copy regc ,pdata 
+5289 9a262600 isub rega ,regc 
+528a 20600000 rtn 
+
+ml2cap_proc_send_reject:
+528b 58000001 setarg signal_cmd_reject 
+528c e7e08005 istore 1 ,contw 
+528d efe08006 ifetch 1 ,contr 
+528e e7e08005 istore 1 ,contw 
+528f 58000002 setarg 0x0002 
+5290 e7e10005 istore 2 ,contw 
+5291 58000000 setarg 0x0000 
+5292 e7e10005 istore 2 ,contw 
+5293 58000006 setarg 0x0006 
+5294 9a40a400 iadd regb ,regb 
+5295 18002604 force 4 ,regc 
+5296 20600000 rtn 
+
+l2cap_get_req_id:
+5297 6fe0c4e5 fetch 1 ,mem_ml2cap_comm_id 
+5298 1fe0fe01 increase 1 ,pdata 
+5299 c080529b bne 0 ,l2cap_get_req_id_ok 
+529a 1fe0fe01 increase 1 ,pdata 
+
+l2cap_get_req_id_ok:
+529b 67e0c4e5 store 1 ,mem_ml2cap_comm_id 
+529c 20600000 rtn 
+
+l2cap_malloc:
+
+bt_l2cap_malloc:
+529d db001800 arg mem_tx_buff0 ,regd 
+529e dd600080 arg mem_bt_l2cap_tx_buff_size ,rege 
+529f 20407e54 call enable_user 
+52a0 202052a5 branch host_l2cap_malloc 
+
+ble_l2cap_malloc:
+52a1 6b0143de fetchr regd ,2 ,mem_ble_l2cap_tx_buff0_ptr 
+52a2 6d6143e0 fetchr rege ,2 ,mem_ble_l2cap_tx_buff_size_ptr 
+52a3 20407e56 call disable_user 
+52a4 202052a5 branch host_l2cap_malloc 
+
+host_l2cap_malloc:
+52a5 47024020 bpatchx patch20_4 ,mem_patch20 
+52a6 204052f1 call l2cap_malloc_is_fifo_full 
+52a7 243a137a nbranch assert ,blank 
+52a8 20405301 call l2cap_malloc_get_full_map 
+52a9 df200008 arg 8 ,loopcnt 
+
+host_l2cap_malloc_loop:
+52aa 6848c4e6 fetcht 1 ,mem_used_map 
+52ab 1f260e08 sub loopcnt ,8 ,queue 
+52ac a84fffff qisolate1 temp 
+52ad 2020d2b2 branch host_l2cap_malloc_next_buffer ,true 
+52ae 204052b9 call host_l2cap_malloc_check_buffer_enough 
+52af 242152b2 nbranch host_l2cap_malloc_next_buffer ,positive 
+52b0 204052cf call host_l2cap_malloc_into_fifo 
+52b1 202052b6 branch host_l2cap_malloc_succ 
+
+host_l2cap_malloc_next_buffer:
+52b2 1d627e00 copy rege ,pdata 
+52b3 9b00b000 iadd regd ,regd 
+52b4 c20052aa loop host_l2cap_malloc_loop 
+52b5 2020137a branch assert 
+
+host_l2cap_malloc_succ:
+52b6 1b027e00 copy regd ,pdata 
+52b7 1b020a00 copy regd ,contw 
+52b8 20600000 rtn 
+
+host_l2cap_malloc_check_buffer_enough:
+52b9 4702c020 bpatchx patch20_5 ,mem_patch20 
+52ba 1f260e08 sub loopcnt ,8 ,queue 
+52bb d8400000 arg 0 ,temp 
+52bc d9600000 arg 0 ,timeup 
+
+host_l2cap_malloc_check_buffer_enough_loop:
+52bd 18e27e00 copy queue ,pdata 
+52be c00452ca beq 8 ,host_l2cap_malloc_check_buffer_enough_end 
+52bf 6fe0c4e6 fetch 1 ,mem_used_map 
+52c0 afefffff qisolate1 pdata 
+52c1 2020d2ca branch host_l2cap_malloc_check_buffer_enough_end ,true 
+52c2 f9201600 qset1 timeup 
+52c3 1d627e00 copy rege ,pdata 
+52c4 98408400 iadd temp ,temp 
+52c5 18e08e01 increase 1 ,queue 
+52c6 1a227e00 copy rega ,pdata 
+52c7 98467c00 isub temp ,null 
+52c8 2022d2ca branch host_l2cap_malloc_check_buffer_enough_end ,zero 
+52c9 202152bd branch host_l2cap_malloc_check_buffer_enough_loop ,positive 
+
+host_l2cap_malloc_check_buffer_enough_end:
+52ca 18427e00 copy temp ,pdata 
+52cb 9a267c00 isub rega ,null 
+52cc 24628000 nrtn zero 
+52cd f9201600 qset1 timeup 
+52ce 20600000 rtn 
+
+host_l2cap_malloc_into_fifo:
+52cf 47034020 bpatchx patch20_6 ,mem_patch20 
+52d0 204052f1 call l2cap_malloc_is_fifo_full 
+52d1 243a137a nbranch assert ,blank 
+52d2 204052f7 call l2cap_malloc_is_fifo_empty 
+52d3 203a52d8 branch host_l2cap_malloc_into_fifo_no_push ,blank 
+52d4 6fe4c4ea fetch 9 ,mem_tx_fifo1 
+52d5 67e4c4e7 store 9 ,mem_tx_fifo0 
+52d6 58000000 setarg 0 
+52d7 e7e18005 istore 3 ,contw 
+
+host_l2cap_malloc_into_fifo_no_push:
+52d8 6160c4f0 storer timeup ,1 ,mem_tx_fifo3_map 
+52d9 630144f1 storer regd ,2 ,mem_tx_fifo3_ptr 
+52da 20600000 rtn 
+
+l2cap_malloc_fifo_out:
+52db 4703c020 bpatchx patch20_7 ,mem_patch20 
+52dc 204052fa call l2cap_malloc_fifo_get_first_ptr 
+52dd 18c08c01 increase 1 ,contr 
+52de efe10006 ifetch 2 ,contr 
+52df 20600000 rtn 
+
+l2cap_malloc_free:
+52e0 47044021 bpatchx patch21_0 ,mem_patch21 
+52e1 204052fa call l2cap_malloc_fifo_get_first_ptr 
+52e2 18c20a00 copy contr ,contw 
+52e3 18c20400 copy contr ,temp 
+52e4 58000000 setarg 0 
+52e5 e7e18005 istore 3 ,contw 
+52e6 20600000 rtn 
+
+l2cap_malloc_discard:
+52e7 4704c021 bpatchx patch21_1 ,mem_patch21 
+52e8 204052f7 call l2cap_malloc_is_fifo_empty 
+52e9 203a137a branch assert ,blank 
+52ea 6fe1c4ed fetch 3 ,mem_tx_fifo2 
+52eb 67e1c4f0 store 3 ,mem_tx_fifo3 
+52ec 6fe1c4ea fetch 3 ,mem_tx_fifo1 
+52ed 67e1c4ed store 3 ,mem_tx_fifo2 
+52ee 6fe1c4e7 fetch 3 ,mem_tx_fifo0 
+52ef 67e1c4ea store 3 ,mem_tx_fifo1 
+52f0 20600000 rtn 
+
+l2cap_malloc_is_fifo_full:
+52f1 47054021 bpatchx patch21_2 ,mem_patch21 
+52f2 6fe1c4e7 fetch 3 ,mem_tx_fifo0 
+52f3 20600000 rtn 
+
+l2cap_malloc_is_fifo_nearly_full:
+52f4 4705c021 bpatchx patch21_3 ,mem_patch21 
+52f5 6fe1c4ea fetch 3 ,mem_tx_fifo1 
+52f6 20600000 rtn 
+
+l2cap_malloc_is_fifo_empty:
+52f7 47064021 bpatchx patch21_4 ,mem_patch21 
+52f8 6fe1c4f0 fetch 3 ,mem_tx_fifo3 
+52f9 20600000 rtn 
+
+l2cap_malloc_fifo_get_first_ptr:
+52fa 204052f7 call l2cap_malloc_is_fifo_empty 
+52fb 203a52ff branch l2cap_malloc_fifo_get_first_ptr_empty ,blank 
+52fc d8c044e7 arg mem_tx_fifo0 ,contr 
+
+l2cap_malloc_free_loop:
+52fd efe18006 ifetch 3 ,contr 
+52fe 203a52fd branch l2cap_malloc_free_loop ,blank 
+
+l2cap_malloc_fifo_get_first_ptr_empty:
+52ff 18c08dfd increase -3 ,contr 
+5300 20600000 rtn 
+
+l2cap_malloc_get_full_map:
+5301 4706c021 bpatchx patch21_5 ,mem_patch21 
+5302 df200004 arg 4 ,loopcnt 
+5303 d8c044e7 arg mem_tx_fifo0_map ,contr 
+5304 d8400000 arg 0 ,temp 
+
+l2cap_malloc_get_full_map_loop:
+5305 efe18006 ifetch 3 ,contr 
+5306 1fe17eff and pdata ,0xff ,pdata 
+5307 98418400 ior temp ,temp 
+5308 c2005305 loop l2cap_malloc_get_full_map_loop 
+5309 6048c4e6 storet 1 ,mem_used_map 
+530a 20600000 rtn 
+
+l2cap_malloc_signal_channel:
+530b 47074021 bpatchx patch21_6 ,mem_patch21 
+530c da20007f arg l2cap_signal_malloc_size ,rega 
+530d 2040529d call l2cap_malloc 
+530e 67e1031c store 2 ,mem_l2cap_signal_tx_buff_ptr 
+530f 1fe0fe04 increase 4 ,pdata 
+5310 67e1031e store 2 ,mem_l2cap_signal_tx_payload_ptr 
+5311 58000000 setarg 0 
+5312 67e10320 store 2 ,mem_l2cap_signal_tx_length 
+5313 20600000 rtn 
+
+l2cap_get_signal_tx_buff:
+5314 6fe1031c fetch 2 ,mem_l2cap_signal_tx_buff_ptr 
+5315 20205335 branch l2cap_util_pdata_to_contw 
+
+l2cap_get_signal_tx_payload:
+5316 6fe1031e fetch 2 ,mem_l2cap_signal_tx_payload_ptr 
+5317 20205335 branch l2cap_util_pdata_to_contw 
+
+l2cap_malloc_sdp_channel:
+5318 4707c021 bpatchx patch21_7 ,mem_patch21 
+5319 da2000fa arg sdp_malloc_size ,rega 
+531a 2040529d call l2cap_malloc 
+531b 67e10322 store 2 ,mem_sdp_tx_buff_ptr 
+531c 1fe0fe04 increase 4 ,pdata 
+531d 67e10324 store 2 ,mem_sdp_tx_payload_ptr 
+531e 58000000 setarg 0 
+531f 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+5320 20600000 rtn 
+
+l2cap_get_sdp_tx_buff:
+5321 6fe10322 fetch 2 ,mem_sdp_tx_buff_ptr 
+5322 20205335 branch l2cap_util_pdata_to_contw 
+
+l2cap_get_sdp_tx_payload:
+5323 6fe10324 fetch 2 ,mem_sdp_tx_payload_ptr 
+5324 20205335 branch l2cap_util_pdata_to_contw 
+
+l2cap_malloc_rfcomm_channel:
+5325 47084022 bpatchx patch22_0 ,mem_patch22 
+5326 20407cc8 call push_stack 
+5327 70033501 jam rfcomm_malloc_fail ,mem_rfcomm_malloc_fail_flag 
+5328 204052f1 call l2cap_malloc_is_fifo_full 
+5329 247a0000 nrtn blank 
+532a da20007f arg rfcomm_malloc_size ,rega 
+532b 2040529d call l2cap_malloc 
+532c 67e10328 store 2 ,mem_rfcomm_tx_buff_ptr 
+532d 1fe0fe04 increase 4 ,pdata 
+532e 67e1032a store 2 ,mem_rfcomm_tx_payload_ptr 
+532f 58000000 setarg 0 
+5330 67e1032c store 2 ,mem_rfcomm_tx_pkt_length 
+5331 70033500 jam rfcomm_malloc_succeed ,mem_rfcomm_malloc_fail_flag 
+5332 20207cd4 branch pop_stack 
+
+l2cap_get_rfcomm_tx_buff:
+5333 6fe10328 fetch 2 ,mem_rfcomm_tx_buff_ptr 
+5334 20205335 branch l2cap_util_pdata_to_contw 
+
+l2cap_util_pdata_to_contw:
+5335 203a137a branch assert ,blank 
+5336 1fe20a00 copy pdata ,contw 
+5337 20600000 rtn 
+
+l2cap_lpm_save_calc_len:
+5338 4708c022 bpatchx patch22_1 ,mem_patch22 
+5339 da400000 arg 0 ,regb 
+533a da2044e7 arg mem_tx_fifo0_map ,rega 
+533b 1a20a3fe increase -2 ,rega 
+
+l2cap_lpm_save_calc_len_loop:
+533c 1a20a202 increase 2 ,rega 
+533d 580044f3 setarg mem_tx_fifo_end 
+533e 9a267c00 isub rega ,null 
+533f 2022d348 branch l2cap_lpm_save_calc_len_end ,zero 
+5340 efe08011 ifetch 1 ,rega 
+5341 1a20a201 increase 1 ,rega 
+5342 203a533c branch l2cap_lpm_save_calc_len_loop ,blank 
+5343 e8410011 ifetcht 2 ,rega 
+5344 efe10002 ifetch 2 ,temp 
+5345 9a40a400 iadd regb ,regb 
+5346 1a40a404 increase 4 ,regb 
+5347 2020533c branch l2cap_lpm_save_calc_len_loop 
+
+l2cap_lpm_save_calc_len_end:
+5348 1a427e00 copy regb ,pdata 
+5349 20600000 rtn 
+
+l2cap_lpm_get_wake_lock:
+534a d8e0000c arg wake_lock_l2cap_tx ,queue 
+534b 202015ba branch lpm_get_wake_lock 
+
+l2cap_lpm_put_wake_lock:
+534c d8e0000c arg wake_lock_l2cap_tx ,queue 
+534d 202015be branch lpm_put_wake_lock 
+
+l2cap_lpm_save_txbuf:
+534e 47094022 bpatchx patch22_2 ,mem_patch22 
+534f 20405301 call l2cap_malloc_get_full_map 
+5350 6fe0c4e6 fetch 1 ,mem_used_map 
+5351 207a0000 rtn blank 
+5352 20405338 call l2cap_lpm_save_calc_len 
+5353 d8400100 arg l2cap_lpm_txbuf_len ,temp 
+5354 98467c00 isub temp ,null 
+5355 2021534a branch l2cap_lpm_get_wake_lock ,positive 
+5356 2040534c call l2cap_lpm_put_wake_lock 
+5357 d8a044f3 arg mem_l2cap_lpm_txbuf ,contw 
+5358 da2044e7 arg mem_tx_fifo0 ,rega 
+
+l2cap_lpm_save_txbuf_loop:
+5359 580044f3 setarg mem_tx_fifo_end 
+535a 9a267c00 isub rega ,null 
+535b 20628000 rtn zero 
+535c efe08011 ifetch 1 ,rega 
+535d 1a20a201 increase 1 ,rega 
+535e 243a5362 nbranch l2cap_lpm_save_txbuf_nempty ,blank 
+535f e7e10005 istore 2 ,contw 
+5360 1a20a202 increase 2 ,rega 
+5361 20205359 branch l2cap_lpm_save_txbuf_loop 
+
+l2cap_lpm_save_txbuf_nempty:
+5362 efe10011 ifetch 2 ,rega 
+5363 1a20a202 increase 2 ,rega 
+5364 1fe20c00 copy pdata ,contr 
+5365 efe10006 ifetch 2 ,contr 
+5366 e7e10005 istore 2 ,contw 
+5367 1fe27200 copy pdata ,loopcnt 
+5368 1f20f202 increase 2 ,loopcnt 
+5369 20407d5f call memcpy 
+536a 20205359 branch l2cap_lpm_save_txbuf_loop 
+
+l2cap_lpm_load_txbuf:
+536b 4709c022 bpatchx patch22_3 ,mem_patch22 
+536c 20405301 call l2cap_malloc_get_full_map 
+536d 6fe0c4e6 fetch 1 ,mem_used_map 
+536e 207a0000 rtn blank 
+536f da2044e8 arg mem_tx_fifo0_ptr ,rega 
+5370 1a20a3fd increase -3 ,rega 
+5371 d8c044f3 arg mem_l2cap_lpm_txbuf ,contr 
+
+l2cap_lpm_load_txbuf_loop:
+5372 1a20a203 increase 3 ,rega 
+5373 580044f4 setarg mem_tx_fifo_end + 1 
+5374 9a267c00 isub rega ,null 
+5375 20628000 rtn zero 
+5376 efe10006 ifetch 2 ,contr 
+5377 203a5372 branch l2cap_lpm_load_txbuf_loop ,blank 
+5378 1fe0fe04 increase 4 ,pdata 
+5379 1fe27200 copy pdata ,loopcnt 
+537a 18c22400 copy contr ,regb 
+537b efe10011 ifetch 2 ,rega 
+537c 1fe20a00 copy pdata ,contw 
+537d 1a420c00 copy regb ,contr 
+537e 18c08dfe increase -2 ,contr 
+537f 20407d5f call memcpy 
+5380 20205372 branch l2cap_lpm_load_txbuf_loop 
+
+init_lmp:
+5381 20758000 rtn wake 
+
+init_lmp_work:
+5382 470a4022 bpatchx patch22_4 ,mem_patch22 
+5383 58000000 setarg 0 
+5384 67e08049 store 1 ,mem_lmp_to_send 
+5385 67e08056 store 1 ,mem_conn_sm 
+5386 67e08079 store 1 ,mem_lmo_opcode1 
+5387 67e0807d store 1 ,mem_lmo_opcode2 
+5388 67e0c15d store 1 ,mem_esco_addr 
+5389 67e080bd store 1 ,mem_connection_options 
+538a 67e08877 store 1 ,mem_pairing_auth 
+538b 67e1c644 store 3 ,mem_encapsulated_major_type 
+538c 67e0c647 store 1 ,mem_remote_br_sc_support 
+538d 70464200 jam switch_flag_init ,mem_switch_flag 
+538e 70030c00 jam 0 ,mem_switch_fail_master_count 
+538f 7003ab00 jam null_encryp ,mem_wait_encryption 
+
+init_lmp_reinit:
+5390 70087700 jam 0 ,mem_pairing_auth 
+5391 70087600 jam 0 ,mem_sp_localsm 
+5392 7003a500 jam 0 ,mem_lmp_conn_state 
+
+parse_rx_done:
+5393 20600000 rtn 
+
+parse_lmp:
+5394 470ac022 bpatchx patch22_5 ,mem_patch22 
+5395 2054da24 call setlocalsm_master ,master 
+5396 2454da28 ncall setlocalsm_slave ,master 
+5397 204059e1 call lmo_fifo_check 
+5398 247a0000 nrtn blank 
+5399 6fe0804d fetch 1 ,mem_state_map 
+539a c4030000 rtnbit0 smap_rxlmp 
+539b 793ffe06 set0 smap_rxlmp ,pdata 
+539c 793f8001 set0 mark_rxbuf_inuse ,mark 
+539d 67e0804d store 1 ,mem_state_map 
+539e 6fe080cf fetch 1 ,mem_rxbuf 
+539f 6848804d fetcht 1 ,mem_state_map 
+53a0 2feffe00 isolate1 smap_lmptidinit ,pdata 
+53a1 79208401 setflag true ,smap_lmptid ,temp 
+53a2 6048804d storet 1 ,mem_state_map 
+53a3 18410402 and_into 0x2 ,temp 
+53a4 60488080 storet 1 ,mem_lmo_tid2 
+53a5 6848804d fetcht 1 ,mem_state_map 
+53a6 1fe37e00 rshift pdata ,pdata 
+53a7 67e0807e store 1 ,mem_lmi_opcode2 
+53a8 470b4022 bpatchx patch22_6 ,mem_patch22 
+53a9 6fe0807e fetch 1 ,mem_lmi_opcode2 
+53aa c03fd3f6 beq lmp_escape ,parse_lmp_escape 
+53ab c001d462 beq lmp_accepted ,parse_lmp_accepted 
+53ac c0025473 beq lmp_not_accepted ,parse_lmp_not_accepted 
+53ad c01e53e9 beq lmp_set_afh ,parse_lmp_set_afh 
+53ae c002d3e5 beq lmp_clkoffset_req ,parse_lmp_clkoffset_req 
+53af c007d699 beq lmp_encryption_mode_req ,parse_lmp_encryption_mode_req 
+53b0 c00854d8 beq lmp_encryption_key_size_req ,parse_lmp_crypt_key 
+53b1 c011d4f7 beq lmp_auto_rate ,parse_lmp_auto_rate 
+53b2 c01cd6b2 beq lmp_test_control ,parse_lmp_test_control 
+53b3 c01c56ad beq lmp_test_activate ,parse_lmp_test_activate 
+53b4 c018d4dd beq lmp_setup_complete ,parse_lmp_setup_complete 
+53b5 c01bd579 beq lmp_supervision_timeout ,parse_lmp_supervision_timeout 
+53b6 c013d575 beq lmp_features_req ,parse_lmp_features_req 
+53b7 c019d572 beq lmp_host_connection_req ,parse_lmp_conn_req 
+53b8 c012d577 beq lmp_version_req ,parse_lmp_version_req 
+53b9 c01354f3 beq lmp_version_res ,parse_lmp_version_res 
+53ba c003d4ec beq lmp_detach ,parse_lmp_detach 
+53bb c016d4e3 beq lmp_max_slot ,parse_lmp_max_slot 
+53bc c01754e4 beq lmp_max_slot_req ,parse_lmp_max_slot_req 
+53bd c000d56e beq lmp_name_req ,parse_lmp_name_req 
+53be c0015559 beq lmp_name_res ,parse_lmp_name_res 
+53bf c01456a4 beq lmp_features_res ,parse_lmp_features_res 
+53c0 c004d54f beq lmp_comb_key ,parse_lmp_comb_key 
+53c1 c005d516 beq lmp_au_rand ,parse_lmp_au_rand 
+53c2 c00454f8 beq lmp_in_rand ,parse_lmp_in_rand 
+53c3 c0065528 beq lmp_sres ,parse_lmp_sres 
+53c4 c00fd4ef beq lmp_incr_power_req ,parse_lmp_incr_power 
+53c5 c01054f1 beq lmp_decr_power_req ,parse_lmp_decr_power 
+53c6 c010d593 beq lmp_max_power ,parse_lmp_max_power 
+53c7 c0115593 beq lmp_min_power ,parse_lmp_min_power 
+53c8 c01ad594 beq lmp_page_mode_req ,parse_lmp_page_mode_req 
+53c9 c01b5595 beq lmp_page_scan_mode_req ,parse_lmp_page_scan_mode_req 
+53ca c0125593 beq lmp_preferred_rate ,parse_lmp_preferred_rate 
+53cb c01a5596 beq lmp_slot_offset ,parse_lmp_slot_offset 
+53cc c00bd59f beq lmp_sniff_req ,parse_lmp_sniff_req 
+53cd c008d5b9 beq lmp_start_encryption_req ,parse_lmp_start_encryption_req 
+53ce c00955c6 beq lmp_stop_encryption_req ,parse_lmp_stop_encryption_req 
+53cf c009d5c8 beq lmp_switch_req ,parse_lmp_switch_req 
+53d0 c006d5d8 beq lmp_temp_rand ,parse_lmp_temp_rand 
+53d1 c00755d8 beq lmp_temp_key ,parse_lmp_temp_key 
+53d2 c017d573 beq lmp_timing_accuracy_req ,parse_lmp_timing_accuracy_req 
+53d3 c01855d8 beq lmp_timing_accuracy_res ,parse_lmp_timing_accuracy_res 
+53d4 c00555d8 beq lmp_unit_key ,parse_lmp_unit_key 
+53d5 c00c55d9 beq lmp_unsniff_req ,parse_lmp_unsniff_req 
+53d6 c01955d8 beq lmp_use_semi_permanent_key ,parse_lmp_use_semi_permanend_key 
+53d7 c01ed5de beq lmp_encapsulated_header ,parse_lmp_encapsulated_header 
+53d8 c01f5627 beq lmp_encapsulated_payload ,parse_lmp_encapsulated_payload 
+53d9 c01fd620 beq lmp_simple_pairing_confirm ,parse_simple_pairing_confirm 
+53da c020566a beq lmp_simple_pairing_number ,parse_lmp_simple_pairing_number 
+53db c020d67b beq lmp_dhkey_check ,parse_dhkey_check 
+53dc c0035698 beq lmp_clkoffset_res ,parse_lmp_clkoffset_res 
+53dd c01d53e7 beq lmp_enc_key_size_mask_req ,parse_enc_key_size_mask_req 
+53de c01553e3 beq lmp_quality_of_service_req ,parse_quality_of_server_req 
+53df c014d3e4 beq lmp_quality_of_service ,parse_quality_of_server 
+
+reject_unknown_packet:
+53e0 70007f19 jam unknown_lmp_pdu ,mem_lmo_reason2 
+
+reject_lmp_packet:
+53e1 70007d04 jam lmp_not_accepted ,mem_lmo_opcode2 
+53e2 20600000 rtn 
+
+parse_quality_of_server_req:
+53e3 202054ed branch accept_lmp_msg 
+
+parse_quality_of_server:
+53e4 20600000 rtn 
+
+parse_lmp_clkoffset_req:
+53e5 70007d06 jam lmp_clkoffset_res ,mem_lmo_opcode2 
+53e6 20600000 rtn 
+
+parse_enc_key_size_mask_req:
+53e7 70007d3b jam lmp_enc_key_size_mask_res ,mem_lmo_opcode2 
+53e8 20600000 rtn 
+
+parse_lmp_set_afh:
+53e9 6fe200d0 fetch 4 ,mem_rxbuf + 1 
+53ea 1fe3fe00 lshift pdata ,pdata 
+53eb 67e240d9 store 4 ,mem_afh_instant 
+53ec 6fe080d4 fetch 1 ,mem_rxbuf + 5 
+53ed 67e0c0e0 store 1 ,mem_afh_new_mod 
+53ee 6fe280d5 fetch 5 ,mem_rxbuf + 6 
+53ef 67e2c0ee store 5 ,mem_afh_map_new 
+53f0 6fe280da fetch 5 ,mem_rxbuf + 11 
+53f1 e7e28005 istore 5 ,contw 
+53f2 6fe08032 fetch 1 ,mem_mode 
+53f3 79207e03 set1 afh_change ,pdata 
+53f4 67e08032 store 1 ,mem_mode 
+53f5 20600000 rtn 
+
+parse_lmp_escape:
+53f6 470bc022 bpatchx patch22_7 ,mem_patch22 
+53f7 6fe080d0 fetch 1 ,mem_rxbuf + 1 
+53f8 79207e07 set1 7 ,pdata 
+53f9 67e0807e store 1 ,mem_lmi_opcode2 
+53fa c040d41b beq lmp_ext_accepted ,parse_lmpext_accepted 
+53fb c0415420 beq lmp_not_accepted_ext ,parse_lmpext_not_accepted 
+53fc c04ad57a beq lmp_sniff_subrating_req ,parse_lmp_sniff_subrating_req 
+53fd c04b5593 beq lmp_sniff_subrating_res ,parse_lmp_sniff_subrating_res 
+53fe c045d588 beq lmp_packet_type_table_req ,parse_lmpext_packet_type_table_req 
+53ff c041d436 beq lmp_ext_features_req ,parse_lmpext_features_req 
+5400 c0425458 beq lmp_ext_features_res ,parse_lmpext_features_res 
+5401 c048540d beq lmp_ext_chn_classification_req ,parse_lmpext_chn_classification_req 
+5402 c04bd42f beq lmp_pause_encryption_req ,parse_lmpext_pause_encrypt 
+5403 c04c5434 beq lmp_resume_encryption_req ,parse_lmpext_resume_encrypt 
+5404 c04cd410 beq lmp_io_cap_req ,parse_lmpext_iocap_req 
+5405 c04d5413 beq lmp_io_cap_res ,parse_lmpext_iocap_res 
+5406 c050d40b beq lmp_ping_req ,parse_lmpext_ping_req 
+5407 c1420000 rtneq lmp_ext_features_res 
+
+reject_unknown_ext_packet:
+5408 70007d82 jam lmp_not_accepted_ext ,mem_lmo_opcode2 
+5409 70007f19 jam unknown_lmp_pdu ,mem_lmo_reason2 
+540a 20600000 rtn 
+
+parse_lmpext_ping_req:
+540b 70007da2 jam lmp_ping_res ,mem_lmo_opcode2 
+540c 20600000 rtn 
+
+parse_lmpext_chn_classification_req:
+540d 70007d82 jam lmp_not_accepted_ext ,mem_lmo_opcode2 
+540e 70007f2e jam not_support_chn_classification ,mem_lmo_reason2 
+540f 20600000 rtn 
+
+parse_lmpext_iocap_req:
+5410 20405415 call iocap_lmpext_load 
+5411 70007d9a jam lmp_io_cap_res ,mem_lmo_opcode2 
+5412 20600000 rtn 
+
+parse_lmpext_iocap_res:
+5413 20405415 call iocap_lmpext_load 
+5414 20205419 branch iocap_lmpext_common 
+
+iocap_lmpext_load:
+5415 d8a04768 arg mem_sp_iocap_remote ,contw 
+5416 6fe180d1 fetch 3 ,mem_rxbuf + 2 
+5417 e7e18005 istore 3 ,contw 
+5418 20600000 rtn 
+
+iocap_lmpext_common:
+5419 2020f068 branch master_set_mem_master_sp_flag ,true 
+541a 20600000 rtn 
+
+parse_lmpext_accepted:
+541b 6fe080d2 fetch 1 ,mem_rxbuf + 3 
+541c 79207e07 set1 7 ,pdata 
+541d 67e0839d store 1 ,mem_lmi_accepted_opcode 
+541e c045d425 beq lmp_packet_type_table_req ,parse_lmpext_accepted_ptt 
+541f 20600000 rtn 
+
+parse_lmpext_not_accepted:
+5420 6fe080d2 fetch 1 ,mem_rxbuf + 3 
+5421 79207e07 set1 7 ,pdata 
+5422 67e0839d store 1 ,mem_lmi_accepted_opcode 
+5423 c045d429 beq lmp_packet_type_table_req ,parse_lmpext_not_accepted_ptt 
+5424 20600000 rtn 
+
+parse_lmpext_accepted_ptt:
+5425 6fe0c15f fetch 1 ,mem_ptt 
+5426 6848804d fetcht 1 ,mem_state_map 
+5427 7d3a0405 nsetflag blank ,smap_edr ,temp 
+5428 6048804d storet 1 ,mem_state_map 
+
+parse_lmpext_not_accepted_ptt:
+5429 6fe08031 fetch 1 ,mem_state 
+542a c4028000 rtnbit0 state_init_seq 
+542b 793ffe05 set0 state_init_seq ,pdata 
+542c 67e08031 store 1 ,mem_state 
+542d 70007d31 jam lmp_setup_complete ,mem_lmo_opcode2 
+542e 20600000 rtn 
+
+parse_lmpext_pause_encrypt:
+542f 2434d432 nbranch parse_lmpext_pause_encrypt_slave ,master 
+5430 70007d12 jam lmp_stop_encryption_req ,mem_lmo_opcode2 
+5431 20205a10 branch tid_reply 
+
+parse_lmpext_pause_encrypt_slave:
+5432 70007d97 jam lmp_pause_encryption_req ,mem_lmo_opcode2 
+5433 20600000 rtn 
+
+parse_lmpext_resume_encrypt:
+5434 20405a10 call tid_reply 
+5435 202056ef branch lmp_start_encryption 
+
+parse_lmpext_features_req:
+5436 efe08006 ifetch 1 ,contr 
+5437 67e083a1 store 1 ,mem_ext_features_page 
+5438 c000d43b beq 1 ,parse_lmpext_features_req_page1 
+5439 c0015440 beq 2 ,parse_lmpext_features_req_page2 
+543a 20600000 rtn 
+
+parse_lmpext_features_req_page1:
+543b 70007d84 jam lmp_ext_features_res ,mem_lmo_opcode2 
+543c 18c08c01 increase 1 ,contr 
+543d efe08006 ifetch 1 ,contr 
+543e c281d452 bbit1 lmp_features_ext_page1_sc_host_bit ,remote_support_br_sc_host 
+543f 20205455 branch remote_not_support_br_sc_host 
+
+parse_lmpext_features_req_page2:
+5440 70007d84 jam lmp_ext_features_res ,mem_lmo_opcode2 
+5441 18c08c01 increase 1 ,contr 
+5442 efe10006 ifetch 2 ,contr 
+5443 c2845445 bbit1 lmp_features_ext_page2_sc_controller_bit ,remote_support_br_sc_controller 
+5444 2020544e branch remote_not_support_br_sc_controller 
+
+remote_support_br_sc_controller:
+5445 6fe0c647 fetch 1 ,mem_remote_br_sc_support 
+5446 79207e01 set1 remote_br_sc_controller_bit ,pdata 
+5447 20405450 call set_remote_br_sc_support 
+5448 6fe0c647 fetch 1 ,mem_remote_br_sc_support 
+5449 c1818000 rtnne 3 
+544a 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+544b c4008000 rtnbit0 secure_connections_br_bit 
+544c 70464502 jam encapsulated_minor_type_p256 ,mem_encapsulated_minor_type 
+544d 20600000 rtn 
+
+remote_not_support_br_sc_controller:
+544e 6fe0c647 fetch 1 ,mem_remote_br_sc_support 
+544f 793ffe01 set0 remote_br_sc_controller_bit ,pdata 
+
+set_remote_br_sc_support:
+5450 67e0c647 store 1 ,mem_remote_br_sc_support 
+5451 20600000 rtn 
+
+remote_support_br_sc_host:
+5452 6fe0c647 fetch 1 ,mem_remote_br_sc_support 
+5453 79207e00 set1 remote_br_sc_host_bit ,pdata 
+5454 20205450 branch set_remote_br_sc_support 
+
+remote_not_support_br_sc_host:
+5455 6fe0c647 fetch 1 ,mem_remote_br_sc_support 
+5456 793ffe00 set0 remote_br_sc_host_bit ,pdata 
+5457 20205450 branch set_remote_br_sc_support 
+
+parse_lmpext_features_res:
+5458 684880d3 fetcht 1 ,mem_rxbuf + 4 
+5459 18410401 and temp ,0x1 ,temp 
+545a 604883a4 storet 1 ,mem_remote_sppcap 
+545b 6fe0c1db fetch 1 ,mem_hci_cmd 
+545c c0a8d45e bne hci_cmd_wait_remote_ext_feature ,parse_lmpext_features_res_not_hci 
+545d 7041db00 jam 0 ,mem_hci_cmd 
+
+parse_lmpext_features_res_not_hci:
+545e 6fe08056 fetch 1 ,mem_conn_sm 
+545f c18a8000 rtnne conn_sm_wait_features_ext 
+5460 70005604 jam conn_sm_send_conn_req ,mem_conn_sm 
+5461 20205a40 branch process_conn_sm 
+
+parse_lmp_accepted:
+5462 470c4023 bpatchx patch23_0 ,mem_patch23 
+5463 6fe080d0 fetch 1 ,mem_rxbuf + 1 
+5464 67e0839d store 1 ,mem_lmi_accepted_opcode 
+5465 c019d489 beq lmp_host_connection_req ,parse_lmp_accepted_hostconn 
+5466 c0045498 beq lmp_in_rand ,parse_lmp_accepted_inrand 
+5467 c007d49f beq lmp_encryption_mode_req ,parse_lmp_accepted_enc_mode 
+5468 c00854a5 beq lmp_encryption_key_size_req ,parse_lmp_accepted_enc_keysize 
+5469 c008d4a6 beq lmp_start_encryption_req ,parse_lmp_accepted_start_enc 
+546a c00954ae beq lmp_stop_encryption_req ,parse_lmp_accepted_stop_enc 
+546b c00c54c7 beq lmp_unsniff_req ,parse_lmp_accepted_unsniff_req 
+546c c00bd4ca beq lmp_sniff_req ,parse_lmp_accepted_sniff_req 
+546d c009d480 beq lmp_switch_req ,parse_lmp_accepted_switch 
+546e c01ed5f3 beq lmp_encapsulated_header ,parse_lmp_accepted_encapsulated_header 
+546f c01f5654 beq lmp_encapsulated_payload ,parse_lmp_accepted_encapsulated_payload 
+5470 c02055f5 beq lmp_simple_pairing_number ,parse_lmp_accepted_simple_pairing_number 
+5471 c020d612 beq lmp_dhkey_check ,parse_lmp_accepted_dhkey_check 
+5472 20600000 rtn 
+
+parse_lmp_not_accepted:
+5473 470cc023 bpatchx patch23_1 ,mem_patch23 
+5474 6fe080d0 fetch 1 ,mem_rxbuf + 1 
+5475 67e0839d store 1 ,mem_lmi_accepted_opcode 
+5476 c000d4be beq lmp_name_req ,parse_lmp_not_accepted_name_req 
+5477 c019d493 beq lmp_host_connection_req ,parse_lmp_not_accepted_hostconn 
+5478 c005d4af beq lmp_au_rand ,parse_lmp_not_accepted_aurand 
+5479 c00454b5 beq lmp_in_rand ,parse_lmp_not_accepted_inrand 
+547a c009d483 beq lmp_switch_req ,parse_lmp_not_accepted_switch 
+547b c02054bf beq lmp_simple_pairing_number ,parse_lmp_not_accepted_simple_pairing_number 
+547c c020d4c2 beq lmp_dhkey_check ,parse_lmp_not_accepted_dhkey_check 
+547d c00c54c5 beq lmp_unsniff_req ,parse_lmp_not_accepted_unsniff_req 
+547e c00bd4d6 beq lmp_sniff_req ,parse_lmp_not_acdcept_sniff_req 
+547f 20600000 rtn 
+
+parse_lmp_accepted_switch:
+5480 70095b20 jam bt_evt_switch_accept ,mem_fifo_temp 
+5481 20407871 call ui_ipc_send_event 
+5482 202009df branch role_switch_prepare0 
+
+parse_lmp_not_accepted_switch:
+5483 70095b19 jam bt_evt_switch_not_accept ,mem_fifo_temp 
+5484 20407871 call ui_ipc_send_event 
+5485 70464202 jam switch_flag_not_accept ,mem_switch_flag 
+5486 58000050 setarg timer_switch_waite 
+5487 d8e00006 arg switch_wait_timer ,queue 
+5488 20207d66 branch timer_init 
+
+parse_lmp_accepted_hostconn:
+5489 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+548a 79207e00 set1 received_conn_req ,pdata 
+548b 67e083a5 store 1 ,mem_lmp_conn_state 
+548c 70095b01 jam bt_evt_bb_connected ,mem_fifo_temp 
+548d 20407871 call ui_ipc_send_event 
+548e 70007d8b jam lmp_packet_type_table_req ,mem_lmo_opcode2 
+
+parse_lmp_accepted_hostconn_ctn:
+548f 6fe08056 fetch 1 ,mem_conn_sm 
+5490 c082d393 bne conn_sm_wait_conn_accept ,parse_rx_done 
+5491 70005606 jam conn_sm_auth_pair ,mem_conn_sm 
+5492 20600000 rtn 
+
+parse_lmp_not_accepted_hostconn:
+5493 70039e0b jam acl_connection_already_exists ,mem_disconn_reason_send 
+5494 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+5495 70005600 jam conn_sm_standby ,mem_conn_sm 
+5496 2020d393 branch parse_rx_done ,true 
+5497 20600000 rtn 
+
+parse_lmp_accepted_inrand:
+5498 6fe0c1ca fetch 1 ,mem_link_key_exists 
+5499 247a0000 nrtn blank 
+549a 20400c60 call clear_linkkey 
+549b 204056ed call lmp_generate_key 
+549c 20748000 rtn master 
+549d 79200021 set1 mark_slave_in_rand_accepted ,mark 
+549e 20600000 rtn 
+
+parse_lmp_accepted_enc_mode:
+549f 24748000 nrtn master 
+54a0 70007d10 jam lmp_encryption_key_size_req ,mem_lmo_opcode2 
+54a1 6fe0804d fetch 1 ,mem_state_map 
+54a2 c4010000 rtnbit0 smap_encryption 
+54a3 70007d12 jam lmp_stop_encryption_req ,mem_lmo_opcode2 
+54a4 20600000 rtn 
+
+parse_lmp_accepted_enc_keysize:
+54a5 202056ef branch lmp_start_encryption 
+
+parse_lmp_accepted_start_enc:
+54a6 2040574b call send_create_conn_start_l2cap_timer_sm 
+54a7 6fe08031 fetch 1 ,mem_state 
+54a8 c3820000 rtnbit1 state_conn_comp 
+54a9 70007d31 jam lmp_setup_complete ,mem_lmo_opcode2 
+54aa 6fe08056 fetch 1 ,mem_conn_sm 
+54ab c1850000 rtnne conn_sm_encrypt_wait 
+54ac 7000560b jam conn_sm_encrypt_wait_clear ,mem_conn_sm 
+54ad 20600000 rtn 
+
+parse_lmp_accepted_stop_enc:
+54ae 20600000 rtn 
+
+parse_lmp_not_accepted_aurand:
+
+parse_lmp_not_accepted_aurand_send_detach:
+54af 6fe0c09a fetch 1 ,mem_device_option 
+54b0 1fe67c08 sub pdata ,dvc_op_mouse ,null 
+54b1 2042be1d call mouse_delay_enter_hibernata ,zero 
+54b2 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+54b3 70039e13 jam other_end_terminated ,mem_disconn_reason_send 
+54b4 20600000 rtn 
+
+parse_lmp_not_accepted_inrand:
+54b5 6fe080d1 fetch 1 ,mem_rxbuf + 2 
+54b6 c00354bb beq key_missing ,parse_lmp_inrand_key_missing 
+54b7 c18c0000 rtnne pairing_not_allowed 
+54b8 70039e18 jam pairing_not_allowed ,mem_disconn_reason_send 
+54b9 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+54ba 20600000 rtn 
+
+parse_lmp_inrand_key_missing:
+54bb 70039e06 jam key_missing ,mem_disconn_reason_send 
+54bc 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+54bd 20600000 rtn 
+
+parse_lmp_not_accepted_name_req:
+54be 20600000 rtn 
+
+parse_lmp_not_accepted_simple_pairing_number:
+54bf 70087000 jam sp_stat_null ,mem_sp_state 
+54c0 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+54c1 20205393 branch parse_rx_done 
+
+parse_lmp_not_accepted_dhkey_check:
+54c2 70087000 jam sp_stat_null ,mem_sp_state 
+54c3 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+54c4 20205393 branch parse_rx_done 
+
+parse_lmp_not_accepted_unsniff_req:
+54c5 70095b24 jam bt_evt_unsniff_not_accept ,mem_fifo_temp 
+54c6 20207871 branch ui_ipc_send_event 
+
+parse_lmp_accepted_unsniff_req:
+54c7 70095b23 jam bt_evt_unsniff_accept ,mem_fifo_temp 
+54c8 20407871 call ui_ipc_send_event 
+54c9 20200f16 branch sniff_exit 
+
+parse_lmp_accepted_sniff_req:
+54ca 70095b22 jam bt_evt_sniff_accept ,mem_fifo_temp 
+54cb 20407871 call ui_ipc_send_event 
+54cc 58000000 setarg 0 
+54cd 67e10076 store 2 ,mem_dsniff 
+54ce 6fe14455 fetch 2 ,mem_sniff_param_interval 
+54cf 1fe3fe00 lshift pdata ,pdata 
+54d0 67e10033 store 2 ,mem_tsniff 
+54d1 6fe0c457 fetch 1 ,mem_sniff_param_attempt 
+54d2 67e08074 store 1 ,mem_sniff_attempt 
+54d3 6fe0c459 fetch 1 ,mem_sniff_param_timeout 
+54d4 67e08075 store 1 ,mem_sniff_timeout 
+54d5 20200ef5 branch sniff_init 
+
+parse_lmp_not_acdcept_sniff_req:
+54d6 70095b21 jam bt_evt_sniff_not_accept ,mem_fifo_temp 
+54d7 20207871 branch ui_ipc_send_event 
+
+parse_lmp_crypt_key:
+54d8 684880d0 fetcht 1 ,mem_rxbuf + 1 
+54d9 18467c06 sub temp ,6 ,null 
+54da 2021568e branch lmp_reject_pdu_not_allowed ,positive 
+54db 60488055 storet 1 ,mem_key_size 
+54dc 202054ed branch accept_lmp_msg 
+
+parse_lmp_setup_complete:
+54dd 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+54de 79207e02 set1 received_setup_complete ,pdata 
+54df 67e083a5 store 1 ,mem_lmp_conn_state 
+54e0 c3818000 rtnbit1 sent_setup_complete 
+54e1 70007d31 jam lmp_setup_complete ,mem_lmo_opcode2 
+54e2 20205393 branch parse_rx_done 
+
+parse_lmp_max_slot:
+54e3 20600000 rtn 
+
+parse_lmp_max_slot_req:
+54e4 6fe0c0d7 fetch 1 ,mem_max_slot 
+54e5 684880d0 fetcht 1 ,mem_rxbuf + 1 
+54e6 98467c00 isub temp ,null 
+54e7 202154ed branch accept_lmp_msg ,positive 
+54e8 70007d04 jam lmp_not_accepted ,mem_lmo_opcode2 
+54e9 70007f1f jam unspecified_error ,mem_lmo_reason2 
+54ea 70007e2e jam lmp_max_slot_req ,mem_lmi_opcode2 
+54eb 20600000 rtn 
+
+parse_lmp_detach:
+54ec 20205862 branch prepare_disconnect 
+
+accept_lmp_msg:
+54ed 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+54ee 20600000 rtn 
+
+parse_lmp_incr_power:
+54ef 70007d21 jam lmp_max_power ,mem_lmo_opcode2 
+54f0 20600000 rtn 
+
+parse_lmp_decr_power:
+54f1 70007d22 jam lmp_min_power ,mem_lmo_opcode2 
+54f2 20600000 rtn 
+
+parse_lmp_version_res:
+54f3 6fe08056 fetch 1 ,mem_conn_sm 
+54f4 c1098000 rtneq conn_sm_wait_version 
+54f5 70005602 jam conn_sm_send_features ,mem_conn_sm 
+54f6 20600000 rtn 
+
+parse_lmp_auto_rate:
+54f7 20600000 rtn 
+
+parse_lmp_in_rand:
+54f8 6fe0c6b6 fetch 1 ,mem_sc_only_mode 
+54f9 243a5501 nbranch parse_lmp_in_rand_not_accept ,blank 
+54fa 204056ea call lmp_copy_rand 
+54fb 7003a801 jam pincode_state_wait_pincode ,mem_pincode_state 
+54fc 70095b0a jam bt_evt_pincode_req ,mem_fifo_temp 
+54fd 20407871 call ui_ipc_send_event 
+54fe 20405a18 call tid_check 
+54ff 2420d6f2 nbranch lmp_accept_inrand ,true 
+5500 2434d505 nbranch parse_lmp_inrand_res ,master 
+
+parse_lmp_in_rand_not_accept:
+5501 70007d04 jam lmp_not_accepted ,mem_lmo_opcode2 
+5502 70007e08 jam lmp_in_rand ,mem_lmi_opcode2 
+5503 70007f23 jam transaction_collision ,mem_lmo_reason2 
+5504 20600000 rtn 
+
+parse_lmp_inrand_res:
+5505 6fe0804c fetch 1 ,mem_op 
+5506 79207e02 set1 op_inrand_req ,pdata 
+5507 67e0804c store 1 ,mem_op 
+5508 20600000 rtn 
+
+pop_tid_follow:
+5509 6848804d fetcht 1 ,mem_state_map 
+550a 7d3a0401 nsetflag blank ,smap_lmptid ,temp 
+550b 6048804d storet 1 ,mem_state_map 
+550c 20600000 rtn 
+
+push_tid_follow:
+550d 6fe08080 fetch 1 ,mem_lmo_tid2 
+550e 1fe37e00 rshift pdata ,pdata 
+550f 1fe17e01 and_into 1 ,pdata 
+5510 20600000 rtn 
+
+parse_lmp_au_rand_moudle:
+5511 6fe0c489 fetch 1 ,mem_nv_data_number 
+5512 207a0000 rtn blank 
+5513 6fe08877 fetch 1 ,mem_pairing_auth 
+5514 205a6009 call load_device_list ,blank 
+5515 20600000 rtn 
+
+parse_lmp_au_rand:
+5516 20405511 call parse_lmp_au_rand_moudle 
+5517 2040550d call push_tid_follow 
+5518 67e083a9 store 1 ,mem_sres_tid 
+5519 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+551a c0015523 beq encapsulated_minor_type_p256 ,parse_lmp_au_rand_256 
+551b 204056ea call lmp_copy_rand 
+551c 70007d0c jam lmp_sres ,mem_lmo_opcode2 
+
+parse_lmp_au_rand_common:
+551d 6fe0c1ca fetch 1 ,mem_link_key_exists 
+551e 247a0000 nrtn blank 
+551f 6fe08031 fetch 1 ,mem_state 
+5520 c3830000 rtnbit1 state_combkey 
+5521 70007f06 jam key_missing ,mem_lmo_reason2 
+5522 202053e1 branch reject_lmp_packet 
+
+parse_lmp_au_rand_256:
+5523 70007d0b jam lmp_au_rand ,mem_lmo_opcode2 
+5524 d8a008f0 arg mem_sp_random_remote ,contw 
+5525 d8c000d0 arg mem_rxbuf + 1 ,contr 
+5526 20407d0c call memcpy16 
+5527 2020551d branch parse_lmp_au_rand_common 
+
+parse_lmp_sres:
+5528 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+5529 c0015538 beq encapsulated_minor_type_p256 ,parse_lmp_sres_256 
+552a da200041 arg mem_plap ,rega 
+552b 20406b3e call function_e1 
+552c 684a0454 fetcht 4 ,mem_input_store 
+552d 6fe200d0 fetch 4 ,mem_rxbuf + 1 
+552e 98467c00 isub temp ,null 
+552f 2022d533 branch authentication_ok ,zero 
+
+authentication_fail:
+5530 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+5531 70039e05 jam authentication_failure_error ,mem_disconn_reason_send 
+5532 20600000 rtn 
+
+authentication_ok:
+5533 20406c3c call copy_aco 
+5534 20405541 call authentication_ok_common 
+5535 6fe0c764 fetch 1 ,mem_ssp_enable 
+5536 203a5613 branch pairing_success ,blank 
+5537 20600000 rtn 
+
+parse_lmp_sres_256:
+5538 6fe200d0 fetch 4 ,mem_rxbuf + 1 
+5539 684a091c fetcht 4 ,mema 
+553a 98467c00 isub temp ,null 
+553b 2022d53d branch authentication_ok_256 ,zero 
+553c 20205530 branch authentication_fail 
+
+authentication_ok_256:
+553d 20405541 call authentication_ok_common 
+553e 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+553f c280d613 bbit1 secure_connections_br_bit ,pairing_success 
+5540 20600000 rtn 
+
+authentication_ok_common:
+5541 204009b6 call linkkey_ready 
+5542 6fe0804c fetch 1 ,mem_op 
+5543 2feffe01 isolate1 op_auth_req ,pdata 
+5544 793ffe01 set0 op_auth_req ,pdata 
+5545 67e0804c store 1 ,mem_op 
+5546 6fe08056 fetch 1 ,mem_conn_sm 
+5547 c00cd54a beq conn_sm_auth_wait ,authentication_ok_conn_sm 
+5548 c00c554a beq conn_sm_pairing_wait ,authentication_ok_conn_sm 
+5549 20600000 rtn 
+
+authentication_ok_conn_sm:
+554a 6fe08877 fetch 1 ,mem_pairing_auth 
+554b c1800000 rtnne defalt_pairing_auth 
+554c 6fe0804d fetch 1 ,mem_state_map 
+554d c3810000 rtnbit1 smap_encryption 
+554e 20205ad7 branch host_create_conn_encrypt 
+
+parse_lmp_comb_key:
+554f da2000d0 arg mem_rxbuf + 1 ,rega 
+5550 da400444 arg mem_kinit ,regb 
+5551 d8a00424 arg mem_random_number ,contw 
+5552 20406c08 call xor16 
+5553 da200041 arg mem_plap ,rega 
+5554 20405a36 call generate_linkkey 
+5555 70007d0b jam lmp_au_rand ,mem_lmo_opcode2 
+5556 6fe08031 fetch 1 ,mem_state 
+5557 c30356ed bbit0 state_combkey ,lmp_generate_key 
+5558 20600000 rtn 
+
+parse_lmp_name_res:
+5559 6fe100af fetch 2 ,mem_len 
+555a 1fe0f3fd add pdata ,-3 ,loopcnt 
+555b 684880d0 fetcht 1 ,mem_rxbuf + 1 
+555c 58000a01 setarg mem_tmp_buffer 
+555d 98408a00 iadd temp ,contw 
+555e d8c000d2 arg mem_rxbuf + 3 ,contr 
+555f 20407d5f call memcpy 
+5560 68488054 fetcht 1 ,mem_name_offset 
+5561 6fe080d1 fetch 1 ,mem_rxbuf + 2 
+5562 98467e00 isub temp ,pdata 
+5563 1fe67c0e sub pdata ,14 ,null 
+5564 20215569 branch parse_lmp_name_res_end ,positive 
+5565 1840fe0e add temp ,14 ,pdata 
+5566 67e08054 store 1 ,mem_name_offset 
+5567 70007d01 jam lmp_name_req ,mem_lmo_opcode2 
+5568 20600000 rtn 
+
+parse_lmp_name_res_end:
+5569 6fe0804d fetch 1 ,mem_state_map 
+556a 79207e03 set1 smap_name_res ,pdata 
+556b 67e0804d store 1 ,mem_state_map 
+556c c28256f7 bbit1 smap_name_req ,lmp_disconnect 
+556d 20600000 rtn 
+
+parse_lmp_name_req:
+556e 6fe080d0 fetch 1 ,mem_rxbuf + 1 
+556f 67e0807e store 1 ,mem_lmi_opcode2 
+5570 70007d02 jam lmp_name_res ,mem_lmo_opcode2 
+5571 20600000 rtn 
+
+parse_lmp_conn_req:
+5572 202054ed branch accept_lmp_msg 
+
+parse_lmp_timing_accuracy_req:
+5573 70007d30 jam lmp_timing_accuracy_res ,mem_lmo_opcode2 
+5574 20600000 rtn 
+
+parse_lmp_features_req:
+5575 70007d28 jam lmp_features_res ,mem_lmo_opcode2 
+5576 20600000 rtn 
+
+parse_lmp_version_req:
+5577 70007d26 jam lmp_version_res ,mem_lmo_opcode2 
+5578 20600000 rtn 
+
+parse_lmp_supervision_timeout:
+5579 20600000 rtn 
+
+parse_lmp_sniff_subrating_req:
+557a 6fe10033 fetch 2 ,mem_tsniff 
+557b 98000400 iforce temp 
+557c 6fe080d1 fetch 1 ,mem_rxbuf + 2 
+557d 67e08093 store 1 ,mem_subsniff_rate 
+557e 984f8400 imul32 temp ,temp 
+557f 6fe100d2 fetch 2 ,mem_rxbuf + 3 
+5580 1fe3fe00 lshift pdata ,pdata 
+5581 67e10094 store 2 ,mem_subsniff_tcmax 
+5582 6fe200d4 fetch 4 ,mem_rxbuf + 5 
+5583 1fe3fe00 lshift pdata ,pdata 
+5584 67e2008f store 4 ,mem_subsniff_instant 
+5585 18427e00 deposit temp 
+5586 67e10096 store 2 ,mem_subsniff_tsniff 
+5587 20600000 rtn 
+
+parse_lmpext_packet_type_table_req:
+5588 6848c15f fetcht 1 ,mem_ptt 
+5589 6fe080d1 fetch 1 ,mem_rxbuf + 2 
+558a 9842fc00 ixor temp ,null 
+558b 2422d408 nbranch reject_unknown_ext_packet ,zero 
+558c 2feffe00 isolate1 0 ,pdata 
+558d 6fe0804d fetch 1 ,mem_state_map 
+558e 7920fe05 setflag true ,smap_edr ,pdata 
+558f 67e0804d store 1 ,mem_state_map 
+5590 70007d81 jam lmp_ext_accepted ,mem_lmo_opcode2 
+5591 70007e8b jam lmp_packet_type_table_req ,mem_lmi_opcode2 
+5592 20600000 rtn 
+
+parse_lmp_sniff_subrating_res:
+
+parse_lmp_preferred_rate:
+
+parse_lmp_max_power:
+
+parse_lmp_min_power:
+5593 20600000 rtn 
+
+parse_lmp_page_mode_req:
+5594 202054ed branch accept_lmp_msg 
+
+parse_lmp_page_scan_mode_req:
+5595 202054ed branch accept_lmp_msg 
+
+parse_lmp_slot_offset:
+5596 6fe100d0 fetch 2 ,mem_rxbuf + 1 
+5597 67e100c1 store 2 ,mem_slot_offset 
+5598 20600000 rtn 
+
+parse_lmp_sniff_req_check_sniff_para:
+5599 6fe100d3 fetch 2 ,mem_rxbuf + 4 
+559a 6848c177 fetcht 1 ,mem_lpm_mult 
+559b 984ffe00 imul32 temp ,pdata 
+559c d8400640 arg 0x640 ,temp 
+559d 98467c00 isub temp ,null 
+559e 20600000 rtn 
+
+parse_lmp_sniff_req:
+559f 6fe100d5 fetch 2 ,mem_rxbuf + 6 
+55a0 203a568e branch lmp_reject_pdu_not_allowed ,blank 
+55a1 20405599 call parse_lmp_sniff_req_check_sniff_para 
+55a2 2021568e branch lmp_reject_pdu_not_allowed ,positive 
+55a3 6fe0c09a fetch 1 ,mem_device_option 
+55a4 1fe67c0a sub pdata ,dvc_op_module ,null 
+55a5 2042bb99 call module_set_lpm_mult_2 ,zero 
+55a6 6fe08031 fetch 1 ,mem_state 
+55a7 c280d68e bbit1 state_insniff ,lmp_reject_pdu_not_allowed 
+55a8 6fe100d1 fetch 2 ,mem_rxbuf + 2 
+55a9 1fe3fe00 lshift pdata ,pdata 
+55aa 67e10076 store 2 ,mem_dsniff 
+55ab 6fe100d3 fetch 2 ,mem_rxbuf + 4 
+55ac 1fe3fe00 lshift pdata ,pdata 
+55ad 67e10033 store 2 ,mem_tsniff 
+55ae 6fe100d5 fetch 2 ,mem_rxbuf + 6 
+55af 67e08074 store 1 ,mem_sniff_attempt 
+55b0 98000400 iforce temp 
+55b1 6fe100d7 fetch 2 ,mem_rxbuf + 8 
+55b2 67e08075 store 1 ,mem_sniff_timeout 
+55b3 98467c00 isub temp ,null 
+55b4 242155b6 nbranch set_big_value_to_attempt ,positive 
+55b5 67e08074 store 1 ,mem_sniff_attempt 
+
+set_big_value_to_attempt:
+55b6 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+55b7 70007e17 jam lmp_sniff_req ,mem_lmi_opcode2 
+55b8 20600000 rtn 
+
+parse_lmp_start_encryption_req:
+55b9 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+55ba c00155bf beq encapsulated_minor_type_p256 ,parse_lmp_start_encryption_req_256 
+55bb 204054ed call accept_lmp_msg 
+55bc 204056ea call lmp_copy_rand 
+55bd 20406b41 call function_e3 
+55be 20200ee5 branch start_encryption 
+
+parse_lmp_start_encryption_req_256:
+55bf 204054ed call accept_lmp_msg 
+55c0 20400ee5 call start_encryption 
+
+calc_kc:
+55c1 204074cc call function_h3 
+55c2 d8a00063 arg mem_kc ,contw 
+55c3 d8c00910 arg mem_sp_calc_result_high ,contr 
+55c4 df200010 arg 0x10 ,loopcnt 
+55c5 20207e68 branch reverse_byte 
+
+parse_lmp_stop_encryption_req:
+55c6 204054ed call accept_lmp_msg 
+55c7 20200eef branch stop_encryption 
+
+parse_lmp_switch_req:
+55c8 6fe200d0 fetch 4 ,mem_rxbuf + 1 
+55c9 1fe3fe00 lshift pdata ,pdata 
+55ca 2034d5d2 branch parse_lmp_switch_accept ,master 
+55cb 6848c1ca fetcht 1 ,mem_link_key_exists 
+55cc 243a55cf nbranch parse_lmp_switch_req_clear_mark ,blank 
+
+parse_lmp_switch_req_not_accept:
+55cd 70007e13 jam lmp_switch_req ,mem_lmi_opcode2 
+55ce 2020568e branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_switch_req_clear_mark:
+55cf 70007d34 jam lmp_slot_offset ,mem_lmo_opcode2 
+55d0 70005600 jam 0 ,mem_conn_sm 
+55d1 202009dd branch role_switch_prepare 
+
+parse_lmp_switch_accept:
+55d2 204009dd call role_switch_prepare 
+55d3 79200022 set1 mark_reconn_recieve_switch ,mark 
+55d4 6fe080bd fetch 1 ,mem_connection_options 
+55d5 793ffe02 set0 connection_switch ,pdata 
+55d6 67e080bd store 1 ,mem_connection_options 
+55d7 202054ed 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:
+55d8 20600000 rtn 
+
+parse_lmp_unsniff_req:
+55d9 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+55da 70007e18 jam lmp_unsniff_req ,mem_lmi_opcode2 
+55db 70095b2e jam bt_evt_remote_unsniff ,mem_fifo_temp 
+55dc 20407871 call ui_ipc_send_event 
+55dd 20200f16 branch sniff_exit 
+
+parse_lmp_encapsulated_header:
+55de 70087900 jam 0 ,mem_sp_remote_key_recv_count 
+55df 6fe080d0 fetch 1 ,mem_rxbuf + 1 
+55e0 67e0c644 store 1 ,mem_encapsulated_major_type 
+55e1 c080d68e bne encapsulated_major_type ,lmp_reject_pdu_not_allowed 
+55e2 684880d1 fetcht 1 ,mem_rxbuf + 2 
+55e3 6048c645 storet 1 ,mem_encapsulated_minor_type 
+55e4 6fe0c6b6 fetch 1 ,mem_sc_only_mode 
+55e5 203a55e8 branch parse_lmp_encapsulated_header2 ,blank 
+55e6 18467c02 sub temp ,encapsulated_minor_type_p256 ,null 
+55e7 2422d530 nbranch authentication_fail ,zero 
+
+parse_lmp_encapsulated_header2:
+55e8 6fe080d2 fetch 1 ,mem_rxbuf + 3 
+55e9 c02055ec beq encapsulated_len_p256 ,parse_lmp_encapsulated_header3 
+55ea c01855ec beq encapsulated_len_p192 ,parse_lmp_encapsulated_header3 
+55eb 2020568e branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_encapsulated_header3:
+55ec 67e0c646 store 1 ,mem_encapsulated_len 
+55ed 20405a21 call check_localsm 
+55ee 2020d5f0 branch parse_lmp_encapsulated_header_master ,true 
+55ef 70087001 jam sp_stat_key_recv ,mem_sp_state 
+
+parse_lmp_encapsulated_header_master:
+55f0 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+55f1 70007e3d jam lmp_encapsulated_header ,mem_lmi_opcode2 
+55f2 20205393 branch parse_rx_done 
+
+parse_lmp_accepted_encapsulated_header:
+55f3 70007d3e jam lmp_encapsulated_payload ,mem_lmo_opcode2 
+55f4 20600000 rtn 
+
+parse_lmp_accepted_simple_pairing_number:
+55f5 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+55f6 c000d5fc beq ssp_mode_ssp_pin_flag ,parse_lmp_accepted_simple_pairing_number_ssp_pin 
+55f7 c0015600 beq ssp_mode_passkey_entry_flag ,parse_lmp_accepted_simple_pairing_number_passkey 
+
+parse_lmp_accepted_simple_pairing_number_common:
+55f8 20405a21 call check_localsm 
+55f9 20608000 rtn true 
+55fa 70087008 jam sp_stat_confirm_recv ,mem_sp_state 
+55fb 20600000 rtn 
+
+parse_lmp_accepted_simple_pairing_number_ssp_pin:
+55fc 204072f2 call g_noninit_number_confirm 
+55fd 70095b35 jam bt_evt_bt_gkey_generate ,mem_fifo_temp 
+55fe 20407871 call ui_ipc_send_event 
+55ff 202055f8 branch parse_lmp_accepted_simple_pairing_number_common 
+
+parse_lmp_accepted_simple_pairing_number_passkey:
+5600 20405a21 call check_localsm 
+5601 20608000 rtn true 
+5602 6fe0c76d fetch 1 ,mem_authentication_passkey_times 
+5603 c009d610 beq 19 ,authentication_passkey_end 
+5604 1fe0fe01 increase 1 ,pdata 
+5605 67e0c76d store 1 ,mem_authentication_passkey_times 
+
+authentication_passkey:
+5606 70087201 jam sp_flag_commit ,mem_sp_flag 
+5607 70087004 jam sp_stat_commit_calc ,mem_sp_state 
+5608 6fe0c76d fetch 1 ,mem_authentication_passkey_times 
+5609 1fe20e00 copy pdata ,queue 
+560a 6fe34794 fetch 6 ,mem_pin 
+560b afefffff qisolate1 pdata 
+560c 58000080 setarg 0x80 
+560d 7920fe00 setflag true ,0 ,pdata 
+560e 67e0c76e store 1 ,mem_passkey_1bit 
+560f 20600000 rtn 
+
+authentication_passkey_end:
+5610 70087008 jam sp_stat_confirm_recv ,mem_sp_state 
+5611 20600000 rtn 
+
+parse_lmp_accepted_dhkey_check:
+5612 20405618 call parse_lmp_accepted_dhkey_check_common 
+
+pairing_success:
+5613 6fe0c76f fetch 1 ,mem_flag_pairing_state 
+5614 207a0000 rtn blank 
+5615 70476f00 jam flag_pairing_state_not_pairing ,mem_flag_pairing_state 
+5616 70095b38 jam bt_evt_bt_pairing_success ,mem_fifo_temp 
+5617 20207871 branch ui_ipc_send_event 
+
+parse_lmp_accepted_dhkey_check_common:
+5618 20405a21 call check_localsm 
+5619 2440f2fc ncall g_noninit_192 ,true 
+561a 2040f30c call g_init_192 ,true 
+561b 20405a21 call check_localsm 
+561c 20608000 rtn true 
+561d 7008700c jam sp_stat_link_key_calc ,mem_sp_state 
+561e 70087201 jam sp_flag_commit ,mem_sp_flag 
+561f 20600000 rtn 
+
+parse_simple_pairing_confirm:
+5620 d8a00930 arg mem_sp_confirm_remote ,contw 
+5621 d8c000d0 arg mem_rxbuf + 1 ,contr 
+5622 20407d0c call memcpy16 
+5623 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+5624 c1010000 rtneq ssp_mode_passkey_entry_flag 
+5625 20207068 branch master_set_mem_master_sp_flag 
+5626 20600000 rtn 
+
+parse_lmp_encapsulated_payload:
+5627 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+5628 c000d63d beq encapsulated_minor_type_p192 ,parse_lmp_encapsulated_payload_192 
+5629 c001562b beq encapsulated_minor_type_p256 ,parse_lmp_encapsulated_payload_256 
+562a 2020568e branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_encapsulated_payload_256:
+562b 6fe08871 fetch 1 ,mem_master_sp_state 
+562c c003d62f beq sp_stat_random_send ,parse_encapsulated_payload_256_master 
+562d 6fe08870 fetch 1 ,mem_sp_state 
+562e c080d68e bne sp_stat_key_recv ,lmp_reject_pdu_not_allowed 
+
+parse_encapsulated_payload_256_master:
+562f 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+5630 1fe60a30 sub pdata ,0x30 ,contw 
+5631 2421568e nbranch lmp_reject_pdu_not_allowed ,positive 
+5632 d8a00880 arg mem_le_pubkey_remote_x_256 ,contw 
+5633 98a08a00 iadd contw ,contw 
+5634 6fe400d0 fetch 8 ,mem_rxbuf + 1 
+5635 e7e40005 istore 8 ,contw 
+5636 6fe400d8 fetch 8 ,mem_rxbuf + 9 
+5637 e7e40005 istore 8 ,contw 
+5638 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+5639 1fe0fe10 increase 16 ,pdata 
+563a 67e08879 store 1 ,mem_sp_remote_key_recv_count 
+563b c0a054ed bne encapsulated_len_p256 ,accept_lmp_msg 
+563c 2020564e branch parse_lmp_encapsulated_payload_completed 
+
+parse_lmp_encapsulated_payload_192:
+563d 6fe08871 fetch 1 ,mem_master_sp_state 
+563e c003d641 beq sp_stat_random_send ,parse_encapsulated_payload_192_master 
+563f 6fe08870 fetch 1 ,mem_sp_state 
+5640 c080d68e bne sp_stat_key_recv ,lmp_reject_pdu_not_allowed 
+
+parse_encapsulated_payload_192_master:
+5641 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+5642 1fe60a20 sub pdata ,0x20 ,contw 
+5643 2421568e nbranch lmp_reject_pdu_not_allowed ,positive 
+5644 d8a00888 arg mem_sp_pubkey_remote ,contw 
+5645 98a08a00 iadd contw ,contw 
+5646 6fe400d0 fetch 8 ,mem_rxbuf + 1 
+5647 e7e40005 istore 8 ,contw 
+5648 6fe400d8 fetch 8 ,mem_rxbuf + 9 
+5649 e7e40005 istore 8 ,contw 
+564a 6fe08879 fetch 1 ,mem_sp_remote_key_recv_count 
+564b 1fe0fe10 increase 16 ,pdata 
+564c 67e08879 store 1 ,mem_sp_remote_key_recv_count 
+564d c09854ed bne encapsulated_len_p192 ,accept_lmp_msg 
+
+parse_lmp_encapsulated_payload_completed:
+564e 20405a21 call check_localsm 
+564f 2020d4ed branch accept_lmp_msg ,true 
+5650 70087a01 jam sp_key_valid ,mem_sp_remote_key_invalid 
+5651 70087002 jam sp_stat_key_generate ,mem_sp_state 
+5652 70087201 jam sp_flag_commit ,mem_sp_flag 
+5653 202054ed branch accept_lmp_msg 
+
+parse_lmp_accepted_encapsulated_payload:
+5654 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+5655 c000d658 beq encapsulated_minor_type_p192 ,parse_lmp_accepted_encapsulated_payload_192 
+5656 c001565c beq encapsulated_minor_type_p256 ,parse_lmp_accepted_encapsulated_payload_256 
+5657 20600000 rtn 
+
+parse_lmp_accepted_encapsulated_payload_192:
+5658 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+5659 c0185660 beq encapsulated_len_p192 ,parse_lmp_encapsulated_payload_all_accepted 
+565a 70007d3e jam lmp_encapsulated_payload ,mem_lmo_opcode2 
+565b 20600000 rtn 
+
+parse_lmp_accepted_encapsulated_payload_256:
+565c 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+565d c0205660 beq encapsulated_len_p256 ,parse_lmp_encapsulated_payload_all_accepted 
+565e 70007d3e jam lmp_encapsulated_payload ,mem_lmo_opcode2 
+565f 20600000 rtn 
+
+parse_lmp_encapsulated_payload_all_accepted:
+5660 20405a21 call check_localsm 
+5661 2020d669 branch parse_lmp_encapsulated_payload_all_accepted_master ,true 
+5662 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+5663 c0015667 beq ssp_mode_passkey_entry_flag ,parse_lmp_encapsulated_payload_all_accepted_get_passkey 
+5664 70087201 jam sp_flag_commit ,mem_sp_flag 
+5665 70087004 jam sp_stat_commit_calc ,mem_sp_state 
+5666 20205393 branch parse_rx_done 
+
+parse_lmp_encapsulated_payload_all_accepted_get_passkey:
+5667 70095b36 jam bt_evt_bt_get_passkey ,mem_fifo_temp 
+5668 20207871 branch ui_ipc_send_event 
+
+parse_lmp_encapsulated_payload_all_accepted_master:
+5669 20205393 branch parse_rx_done 
+
+parse_lmp_simple_pairing_number:
+566a 6fe08871 fetch 1 ,mem_master_sp_state 
+566b c003d66e beq sp_stat_random_send ,parse_lmp_simple_pairing_number_master 
+566c 6fe08870 fetch 1 ,mem_sp_state 
+566d c083568e bne sp_stat_random_recv ,lmp_reject_pdu_not_allowed 
+
+parse_lmp_simple_pairing_number_master:
+566e d8a008f0 arg mem_sp_random_remote ,contw 
+566f 6fe400d0 fetch 8 ,mem_rxbuf + 1 
+5670 e7e40005 istore 8 ,contw 
+5671 6fe400d8 fetch 8 ,mem_rxbuf + 9 
+5672 e7e40005 istore 8 ,contw 
+5673 20405a21 call check_localsm 
+5674 2020d678 branch parse_lmp_simple_pairing_number_master0 ,true 
+5675 70087007 jam sp_stat_random_send ,mem_sp_state 
+5676 70087201 jam sp_flag_commit ,mem_sp_flag 
+5677 202054ed branch accept_lmp_msg 
+
+parse_lmp_simple_pairing_number_master0:
+5678 70087104 jam sp_stat_commit_calc ,mem_master_sp_state 
+5679 20207068 branch master_set_mem_master_sp_flag 
+567a 2020568e branch lmp_reject_pdu_not_allowed 
+
+parse_dhkey_check:
+567b 6fe08871 fetch 1 ,mem_master_sp_state 
+567c c005d67f beq sp_stat_confirm_send ,parse_dhkey_check_master 
+567d 6fe08870 fetch 1 ,mem_sp_state 
+567e c084568e bne sp_stat_confirm_recv ,lmp_reject_pdu_not_allowed 
+
+parse_dhkey_check_master:
+567f d8a00920 arg mem_sp_check_result ,contw 
+5680 d8c000d0 arg mem_rxbuf + 1 ,contr 
+5681 20407d0c call memcpy16 
+5682 20405a21 call check_localsm 
+5683 2020d68b branch parse_dhkey_check_master0 ,true 
+5684 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+5685 c000d690 beq ssp_mode_ssp_pin_flag ,number_comparison_mode 
+
+number_comparison_successed:
+5686 70476b00 jam 0 ,mem_flag_mode_ssp_pin 
+5687 70087009 jam sp_stat_confirm_check ,mem_sp_state 
+5688 70087201 jam sp_flag_commit ,mem_sp_flag 
+5689 70007e41 jam lmp_dhkey_check ,mem_lmi_opcode2 
+568a 20205393 branch parse_rx_done 
+
+parse_dhkey_check_master0:
+568b 70087109 jam sp_stat_confirm_check ,mem_master_sp_state 
+568c 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+568d 20205393 branch parse_rx_done 
+
+lmp_reject_pdu_not_allowed:
+568e 70007f24 jam pdu_not_allowed ,mem_lmo_reason2 
+568f 202053e1 branch reject_lmp_packet 
+
+number_comparison_mode:
+5690 6fe0c76b fetch 1 ,mem_flag_mode_ssp_pin 
+5691 c283d695 bbit1 flag_mode_ssp_pin_reviceve_comparison_bit ,comparison_result 
+5692 79207e06 set1 flag_mode_ssp_pin_recieve_dhkey_bit ,pdata 
+5693 67e0c76b store 1 ,mem_flag_mode_ssp_pin 
+5694 20600000 rtn 
+
+comparison_result:
+5695 c2805686 bbit1 flag_mode_ssp_pin_comparison_result_bit ,number_comparison_successed 
+5696 70476b00 jam 0 ,mem_flag_mode_ssp_pin 
+5697 2020568e branch lmp_reject_pdu_not_allowed 
+
+parse_lmp_clkoffset_res:
+5698 20205393 branch parse_rx_done 
+
+parse_lmp_encryption_mode_req:
+5699 6fe080bd fetch 1 ,mem_connection_options 
+569a 793ffe01 set0 connection_encrypt ,pdata 
+569b 67e080bd store 1 ,mem_connection_options 
+569c 204054ed call accept_lmp_msg 
+569d 24748000 nrtn master 
+569e 6fe080d0 fetch 1 ,mem_rxbuf + 1 
+569f 6848804c fetcht 1 ,mem_op 
+56a0 793a0404 setflag blank ,op_stop_enc ,temp 
+56a1 7d3a0405 nsetflag blank ,op_start_enc ,temp 
+56a2 6048804c storet 1 ,mem_op 
+56a3 20600000 rtn 
+
+parse_lmp_features_res:
+56a4 684c00d0 fetcht 8 ,mem_rxbuf + 1 
+
+parse_lmp_features_res_not_hci:
+56a5 6fe08056 fetch 1 ,mem_conn_sm 
+56a6 c1818000 rtnne conn_sm_wait_features_res 
+56a7 6fe080bd fetch 1 ,mem_connection_options 
+56a8 c30256ab bbit0 connection_feature_ext ,parse_lmp_send_conn 
+56a9 70005614 jam conn_sm_send_features_ext ,mem_conn_sm 
+56aa 20600000 rtn 
+
+parse_lmp_send_conn:
+56ab 70005604 jam conn_sm_send_conn_req ,mem_conn_sm 
+56ac 20600000 rtn 
+
+parse_lmp_test_activate:
+56ad 6fe080e4 fetch 1 ,mem_debug_config 
+56ae 67e08a5b store 1 ,mem_test_mode_old_debug_config 
+56af 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+56b0 70007e38 jam lmp_test_activate ,mem_lmi_opcode2 
+56b1 20600000 rtn 
+
+parse_lmp_test_control:
+56b2 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+56b3 70007e39 jam lmp_test_control ,mem_lmi_opcode2 
+56b4 18007209 force 9 ,loopcnt 
+56b5 d8c000d0 arg mem_rxbuf + 1 ,contr 
+56b6 d8a00a52 arg mem_temp_payload ,contw 
+
+parse_lmp_test_xor:
+56b7 efe08006 ifetch 1 ,contr 
+56b8 1fe2fe55 xor_into 0x55 ,pdata 
+56b9 e7e08005 istore 1 ,contw 
+56ba c20056b7 loop parse_lmp_test_xor 
+56bb 6fe08a52 fetch 1 ,test_mode_scenario 
+56bc 68488a51 fetcht 1 ,mem_tester_emulate 
+56bd 793f8407 set0 tester_no_whitening ,temp 
+56be 793f8404 set0 tester_pattern_test ,temp 
+56bf c07fd6cb beq exit_test_mode ,parse_lmp_test_control_exit 
+56c0 c00056e4 beq pause_test_mode ,parse_lmp_test_control_pause 
+56c1 c002d6d8 beq closed_loop_back_acl ,parse_lmp_test_control_loopback 
+56c2 c003d6d7 beq acl_without_whitening ,parse_lmp_test_control_loopback_nowhite 
+56c3 c00356d8 beq closed_loop_back_sco ,parse_lmp_test_control_loopback 
+56c4 c00456d7 beq sco_without_whitening ,parse_lmp_test_control_loopback_nowhite 
+56c5 c000d6d0 beq zero_pattern ,parse_lmp_test_control_pattern 
+56c6 c00156d0 beq one_pattern ,parse_lmp_test_control_pattern 
+56c7 c001d6d0 beq alt_pattern ,parse_lmp_test_control_pattern 
+56c8 c004d6d0 beq alt2_pattern ,parse_lmp_test_control_pattern 
+56c9 c00256d0 beq pseudorandom ,parse_lmp_test_control_pattern 
+56ca 20600000 rtn 
+
+parse_lmp_test_control_exit:
+56cb 6fe08a51 fetch 1 ,mem_tester_emulate 
+56cc 79207e03 set1 tester_exit ,pdata 
+56cd 79207e02 set1 tester_change ,pdata 
+56ce 67e08a51 store 1 ,mem_tester_emulate 
+56cf 20600000 rtn 
+
+parse_lmp_test_control_pattern:
+56d0 79200404 set1 tester_pattern_test ,temp 
+56d1 7000e505 jam 5 ,mem_lch_code 
+56d2 6fe10a59 fetch 2 ,test_mode_data_length 
+56d3 98007200 iforce loopcnt 
+56d4 67e100af store 2 ,mem_len 
+56d5 d8a000cf arg mem_rxbuf ,contw 
+56d6 20407dd3 call pn9 
+
+parse_lmp_test_control_loopback_nowhite:
+56d7 79200407 set1 tester_no_whitening ,temp 
+
+parse_lmp_test_control_loopback:
+56d8 79200402 set1 tester_change ,temp 
+56d9 18007e00 force 0 ,pdata 
+56da 67e0800b store 1 ,mem_slave_rcvcnt 
+56db 67e109fa store 2 ,mem_tst_pktcnt_crc 
+56dc 67e109fc store 2 ,mem_tst_pktcnt_dmh 
+56dd 67e109f8 store 2 ,mem_tst_pktcnt_hec 
+56de 67e109f6 store 2 ,mem_tst_pktcnt_sync 
+56df 6fe08a53 fetch 1 ,test_mode_hopping_mode 
+56e0 2fe1fe00 compare fixed_freq ,pdata ,0xff 
+56e1 79208406 setflag true ,tester_fixed_freq ,temp 
+56e2 60488a51 storet 1 ,mem_tester_emulate 
+56e3 20600000 rtn 
+
+parse_lmp_test_control_pause:
+56e4 793f8011 set0 mark_testmode ,mark 
+56e5 700a5100 jam 0 ,mem_tester_emulate 
+56e6 6fe080e4 fetch 1 ,mem_debug_config 
+56e7 793ffe06 set0 debug_tx_pattern ,pdata 
+56e8 67e080e4 store 1 ,mem_debug_config 
+56e9 20600000 rtn 
+
+lmp_copy_rand:
+56ea d8c000d0 arg mem_rxbuf + 1 ,contr 
+56eb d8a00424 arg mem_random_number ,contw 
+56ec 20207d0c branch memcpy16 
+
+lmp_generate_key:
+56ed 70007d09 jam lmp_comb_key ,mem_lmo_opcode2 
+56ee 20600000 rtn 
+
+lmp_start_encryption:
+56ef 24748000 nrtn master 
+56f0 70007d11 jam lmp_start_encryption_req ,mem_lmo_opcode2 
+56f1 20600000 rtn 
+
+lmp_accept_inrand:
+56f2 da2040a8 arg mem_lap ,rega 
+56f3 20406b0b call generate_kinit 
+56f4 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+56f5 70007e08 jam lmp_in_rand ,mem_lmi_opcode2 
+56f6 20600000 rtn 
+
+lmp_disconnect:
+56f7 7000730a jam 10 ,mem_conn_timer 
+56f8 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+56f9 70039e16 jam local_host ,mem_disconn_reason_send 
+56fa 20600000 rtn 
+
+send_lmp:
+56fb 470d4023 bpatchx patch23_2 ,mem_patch23 
+56fc 78547c00 disable user 
+56fd 204059e6 call lmo_fifo_process 
+56fe 6fe08049 fetch 1 ,mem_lmp_to_send 
+56ff 207a0000 rtn blank 
+5700 c283d730 bbit1 7 ,send_lmp_escape 
+
+send_lmp0:
+5701 c000d87a beq lmp_name_req ,send_lmp_name_req 
+5702 c00157fb beq lmp_name_res ,send_lmp_name_res 
+5703 c001d73c beq lmp_accepted ,send_lmp_accepted 
+5704 c0025752 beq lmp_not_accepted ,send_lmp_not_accepted 
+5705 c013d8e6 beq lmp_features_req ,send_lmp_features_req 
+5706 c014581f beq lmp_features_res ,send_lmp_features_res 
+5707 c018580b beq lmp_timing_accuracy_res ,send_lmp_timing_accuracy_res 
+5708 c012d8e1 beq lmp_version_req ,send_lmp_version_req 
+5709 c013581a beq lmp_version_res ,send_lmp_version_res 
+570a c018d8ce beq lmp_setup_complete ,send_lmp_setup_complete 
+570b c01bd875 beq lmp_supervision_timeout ,send_lmp_superto 
+570c c019d867 beq lmp_host_connection_req ,send_lmp_no_payload 
+570d c0045968 beq lmp_in_rand ,send_lmp_inrand 
+570e c004d95e beq lmp_comb_key ,send_lmp_comb_key 
+570f c005d973 beq lmp_au_rand ,send_lmp_aurand 
+5710 c0065980 beq lmp_sres ,send_lmp_sres 
+5711 c007d86d beq lmp_encryption_mode_req ,send_lmp_encryption_mode_req 
+5712 c00859b6 beq lmp_encryption_key_size_req ,send_lmp_encryption_key_size_req 
+5713 c008d9ac beq lmp_start_encryption_req ,send_lmp_start_encryption 
+5714 c003d85d beq lmp_detach ,send_lmp_detach 
+5715 c0155889 beq lmp_quality_of_service_req ,send_lmp_quality_of_service_req 
+5716 c005588a beq lmp_unit_key ,send_lmp_unit_key 
+5717 c00fd8c7 beq lmp_incr_power_req ,send_lmp_inc_power 
+5718 c0035810 beq lmp_clkoffset_res ,send_lmp_clkoffset_res 
+5719 c010d86a beq lmp_max_power ,send_lmp_nopayload_reply 
+571a c016d8bd beq lmp_max_slot ,send_lmp_max_slot 
+571b c01758c2 beq lmp_max_slot_req ,send_lmp_max_slot_req 
+571c c011586a beq lmp_min_power ,send_lmp_nopayload_reply 
+571d c01a588b beq lmp_slot_offset ,send_lmp_slot_offset 
+571e c009d8a0 beq lmp_switch_req ,send_lmp_switch_req 
+571f c00bd8af beq lmp_sniff_req ,send_lmp_sniff_req 
+5720 c00959b3 beq lmp_stop_encryption_req ,send_lmp_stop_encryption_req 
+5721 c017d8b5 beq lmp_timing_accuracy_req ,send_lmp_timing_accuracy_req 
+5722 c00c58ba beq lmp_unsniff_req ,send_lmp_unsniff_req 
+5723 c01ed909 beq lmp_encapsulated_header ,send_lmp_encapsulated_header 
+5724 c01f5911 beq lmp_encapsulated_payload ,send_lmp_encapsulated_payload 
+5725 c01fd92c beq lmp_simple_pairing_confirm ,send_lmp_simple_pairing_comfirm 
+5726 c0205936 beq lmp_simple_pairing_number ,send_lmp_simple_pairing_number 
+5727 c020d94b beq lmp_dhkey_check ,send_lmp_dhkey_check 
+5728 c011d95a beq lmp_auto_rate ,send_lmp_auto_rate 
+5729 c01dd955 beq lmp_enc_key_size_mask_res ,send_lmp_enc_key_size_mask_res 
+572a c002d95b beq lmp_clkoffset_req ,send_lmp_clkoffset_req 
+572b c014d95c beq lmp_quality_of_service ,send_lmp_quality_of_service 
+572c c01c595d beq lmp_test_activate ,send_lmp_test_activate 
+572d c01cd880 beq lmp_test_control ,send_lmp_test_control 
+
+send_lmp_error:
+572e 2020137a branch assert 
+572f 20600000 rtn 
+
+send_lmp_escape:
+5730 c040d75f beq lmp_ext_accepted ,send_lmpext_accepted 
+5731 c041d824 beq lmp_ext_features_req ,send_lmpext_features_req 
+5732 c042578e beq lmp_ext_features_res ,send_lmpext_features_res 
+5733 c0415768 beq lmp_not_accepted_ext ,send_lmpext_not_accepted 
+5734 c045d831 beq lmp_packet_type_table_req ,send_lmpext_packet_type_table_req 
+5735 c04bd859 beq lmp_pause_encryption_req ,send_lmpext_pause_encryption_req 
+5736 c04cd7ec beq lmp_io_cap_req ,send_lmp_io_cap_req 
+5737 c04d57bb beq lmp_io_cap_res ,send_lmpext_io_cap_res 
+5738 c04ad7f1 beq lmp_sniff_subrating_req ,send_lmpext_sniff_subrating_req 
+5739 c04b57f2 beq lmp_sniff_subrating_res ,send_lmpext_sniff_subrating_res 
+573a c051578b beq lmp_ping_res ,send_lmpext_ping_res 
+573b 2020137a branch assert 
+
+send_lmp_accepted:
+573c 18007e02 force 2 ,pdata 
+573d 204059bc call msg_send_lmp 
+573e 6fe0804a fetch 1 ,mem_lmi_opcode 
+573f e7e08005 istore 1 ,contw 
+5740 204059cb call send_lmp_follow 
+5741 470dc023 bpatchx patch23_3 ,mem_patch23 
+5742 6fe0804a fetch 1 ,mem_lmi_opcode 
+5743 c0045772 beq lmp_in_rand ,send_lmp_accepted_inrand 
+5744 c007d776 beq lmp_encryption_mode_req ,send_lmp_accepted_enc_mode 
+5745 c0085781 beq lmp_encryption_key_size_req ,send_lmp_accepted_enc_key 
+5746 c00bd751 beq lmp_sniff_req ,send_lmp_accept_sniff_req 
+5747 c019d784 beq lmp_host_connection_req ,send_lmp_accepted_connection 
+5748 c020d78a beq lmp_dhkey_check ,send_lmp_accept_dhkey_check 
+5749 c008d74b beq lmp_start_encryption_req ,send_create_conn_start_l2cap_timer_sm 
+574a 20600000 rtn 
+
+send_create_conn_start_l2cap_timer_sm:
+574b 6fe08056 fetch 1 ,mem_conn_sm 
+574c 207a0000 rtn blank 
+574d 7000561b jam conn_sm_wait_done ,mem_conn_sm 
+574e 5800000c setarg timer_enpt_waite 
+574f d8e00007 arg enpt_delay_timer ,queue 
+5750 20207d66 branch timer_init 
+
+send_lmp_accept_sniff_req:
+5751 20200ef5 branch sniff_init 
+
+send_lmp_not_accepted:
+5752 18007e03 force 3 ,pdata 
+5753 204059bc call msg_send_lmp 
+5754 6fe0804a fetch 1 ,mem_lmi_opcode 
+5755 c005d75a beq lmp_au_rand ,send_not_accept_aurand 
+5756 e7e08005 istore 1 ,contw 
+5757 6fe0804b fetch 1 ,mem_lmo_reason 
+5758 e7e08005 istore 1 ,contw 
+5759 202059cb branch send_lmp_follow 
+
+send_not_accept_aurand:
+575a e7e08005 istore 1 ,contw 
+575b 6fe0804b fetch 1 ,mem_lmo_reason 
+575c e7e08005 istore 1 ,contw 
+575d d84003a9 arg mem_sres_tid ,temp 
+575e 20205a07 branch special_tid_store 
+
+send_lmpext_accepted:
+575f 18000e04 force 4 ,queue 
+5760 204059c4 call send_lmpext 
+5761 5800007f setarg lmp_escape 
+5762 e7e08005 istore 1 ,contw 
+5763 6fe0804a fetch 1 ,mem_lmi_opcode 
+5764 793ffe07 set0 7 ,pdata 
+5765 e7e08005 istore 1 ,contw 
+5766 6fe0804a fetch 1 ,mem_lmi_opcode 
+5767 202059cb branch send_lmp_follow 
+
+send_lmpext_not_accepted:
+5768 18000e05 force 5 ,queue 
+5769 204059c4 call send_lmpext 
+576a 5800007f setarg lmp_escape 
+576b e7e08005 istore 1 ,contw 
+576c 6fe0804a fetch 1 ,mem_lmi_opcode 
+576d 793ffe07 set0 7 ,pdata 
+576e e7e08005 istore 1 ,contw 
+576f 6fe0804b fetch 1 ,mem_lmo_reason 
+5770 e7e08005 istore 1 ,contw 
+5771 202059cb branch send_lmp_follow 
+
+send_lmp_accepted_inrand:
+5772 20400c60 call clear_linkkey 
+5773 20405a18 call tid_check 
+5774 20608000 rtn true 
+5775 202056ed branch lmp_generate_key 
+
+send_lmp_accepted_enc_mode:
+5776 6fe0804c fetch 1 ,mem_op 
+5777 c282d77d bbit1 op_start_enc ,send_lmp_accepted_enc_start 
+5778 c4020000 rtnbit0 op_stop_enc 
+5779 70007d12 jam lmp_stop_encryption_req ,mem_lmo_opcode2 
+577a 793ffe04 set0 op_stop_enc ,pdata 
+577b 20405a10 call tid_reply 
+577c 2020577f branch send_lmp_accepted_enc_exit 
+
+send_lmp_accepted_enc_start:
+577d 70007d10 jam lmp_encryption_key_size_req ,mem_lmo_opcode2 
+577e 793ffe05 set0 op_start_enc ,pdata 
+
+send_lmp_accepted_enc_exit:
+577f 67e0804c store 1 ,mem_op 
+5780 20600000 rtn 
+
+send_lmp_accepted_enc_key:
+5781 20405a21 call check_localsm 
+5782 2020d6ef branch lmp_start_encryption ,true 
+5783 20600000 rtn 
+
+send_lmp_accepted_connection:
+5784 70007d8b jam lmp_packet_type_table_req ,mem_lmo_opcode2 
+5785 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5786 79207e00 set1 received_conn_req ,pdata 
+5787 67e083a5 store 1 ,mem_lmp_conn_state 
+5788 70095b01 jam bt_evt_bb_connected ,mem_fifo_temp 
+5789 20207871 branch ui_ipc_send_event 
+
+send_lmp_accept_dhkey_check:
+578a 20600000 rtn 
+
+send_lmpext_ping_res:
+578b 18000e02 force 2 ,queue 
+578c 204059c4 call send_lmpext 
+578d 202059d4 branch send_lmp_reply 
+
+send_lmpext_features_res:
+578e 1fe22200 copy pdata ,rega 
+578f 204057a4 call check_ssp_enable 
+5790 6fe083a1 fetch 1 ,mem_ext_features_page 
+5791 c000d794 beq 1 ,send_lmpext_features_res1 
+5792 c001579c beq 2 ,send_lmpext_features_res2 
+5793 20600000 rtn 
+
+send_lmpext_features_res1:
+5794 1a227e00 copy rega ,pdata 
+5795 18000e0c force 12 ,queue 
+5796 204059c4 call send_lmpext 
+5797 58000001 setarg 0x01 
+5798 e7e08005 istore 1 ,contw 
+5799 6fe103a2 fetch 2 ,mem_lmpext_ssp_enable 
+579a e7e48005 istore 9 ,contw 
+579b 202059d4 branch send_lmp_reply 
+
+send_lmpext_features_res2:
+579c 1a227e00 copy rega ,pdata 
+579d 18000e0c force 12 ,queue 
+579e 204059c4 call send_lmpext 
+579f 58000002 setarg 0x02 
+57a0 e7e08005 istore 1 ,contw 
+57a1 58010002 setarg 0x010002 
+57a2 e7e48005 istore 9 ,contw 
+57a3 202059d4 branch send_lmp_reply 
+
+check_ssp_enable:
+57a4 6fe0c764 fetch 1 ,mem_ssp_enable 
+57a5 203a57a8 branch ssp_disable ,blank 
+57a6 204057ae call ssp_enable 
+57a7 202057b5 branch check_br_sc_enable 
+
+ssp_disable:
+57a8 6fe0c0a6 fetch 1 ,mem_features + 6 
+57a9 793ffe03 set0 param_featrue_ssp ,pdata 
+57aa 67e0c0a6 store 1 ,mem_features + 6 
+57ab 58000001 setarg 0x1 
+57ac 67e103a2 store 2 ,mem_lmpext_ssp_enable 
+57ad 20206ecc branch sp_clear_flags 
+
+ssp_enable:
+57ae 470e4023 bpatchx patch23_4 ,mem_patch23 
+57af 6fe0c0a6 fetch 1 ,mem_features + 6 
+57b0 79207e03 set1 param_featrue_ssp ,pdata 
+57b1 67e0c0a6 store 1 ,mem_features + 6 
+57b2 58000101 setarg param_lmpext_ssp_enable 
+57b3 67e103a2 store 2 ,mem_lmpext_ssp_enable 
+57b4 20600000 rtn 
+
+check_br_sc_enable:
+57b5 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+57b6 c280d7b8 bbit1 secure_connections_br_bit ,br_sc_enable 
+57b7 20600000 rtn 
+
+br_sc_enable:
+57b8 58000902 setarg 0x0902 
+57b9 67e103a2 store 2 ,mem_lmpext_ssp_enable 
+57ba 20600000 rtn 
+
+send_lmpext_io_cap_res:
+57bb 18000e05 force 5 ,queue 
+57bc 204059c4 call send_lmpext 
+57bd 6fe1c765 fetch 3 ,mem_lmp_io_cap_payload_iocap 
+57be e7e18005 istore 3 ,contw 
+57bf 204059d4 call send_lmp_reply 
+57c0 70476f01 jam flag_pairing_state_pairing ,mem_flag_pairing_state 
+57c1 6fe0c765 fetch 1 ,mem_lmp_io_cap_payload_iocap 
+57c2 c000d7cc beq io_capability_display_yesno ,responder_iocap_display_yesno 
+57c3 c00157c6 beq io_capability_keyboard_only ,responder_iocap_keyboard_only 
+57c4 c001d7d2 beq io_capability_no_input_no_output ,responder_iocap_no_input_no_output 
+57c5 20600000 rtn 
+
+responder_iocap_keyboard_only:
+57c6 6fe0c768 fetch 1 ,mem_sp_iocap_remote 
+57c7 c00057de beq io_capability_display_only ,responder_iocap_keyboard_only_initiator_iocap_display_only 
+57c8 c000d7de beq io_capability_display_yesno ,responder_iocap_keyboard_only_initiator_iocap_display_yesno 
+57c9 c00157de beq io_capability_keyboard_only ,responder_iocap_keyboard_only_initiator_iocap_keyboard_only 
+57ca c001d7d8 beq io_capability_no_input_no_output ,responder_iocap_keyboard_only_initiator_iocap_no_input_no_output 
+57cb 20600000 rtn 
+
+responder_iocap_display_yesno:
+57cc 6fe0c768 fetch 1 ,mem_sp_iocap_remote 
+57cd c00057d8 beq io_capability_display_only ,responder_iocap_display_yesno_initiator_iocap_display_only 
+57ce c000d7dc beq io_capability_display_yesno ,responder_iocap_display_yesno_initiator_iocap_display_yesno 
+57cf c00157de beq io_capability_keyboard_only ,responder_iocap_display_yesno_initiator_iocap_keyboard_only 
+57d0 c001d7d8 beq io_capability_no_input_no_output ,responder_iocap_display_yesno_initiator_iocap_no_input_no_output 
+57d1 20600000 rtn 
+
+responder_iocap_no_input_no_output:
+57d2 6fe0c768 fetch 1 ,mem_sp_iocap_remote 
+57d3 c00057d8 beq io_capability_display_only ,responder_iocap_no_input_no_output_initiator_iocap_display_only 
+57d4 c000d7d8 beq io_capability_display_yesno ,responder_iocap_no_input_no_output_initiator_iocap_display_yesno 
+57d5 c00157d8 beq io_capability_keyboard_only ,responder_iocap_no_input_no_output_initiator_iocap_keyboard_only 
+57d6 c001d7d8 beq io_capability_no_input_no_output ,responder_iocap_no_input_no_output_initiator_iocap_no_input_no_output 
+57d7 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:
+57d8 70476c03 jam ssp_mode_just_work_flag ,mem_ssp_mode_flag 
+57d9 6fe0c643 fetch 1 ,mem_classic_bt_flag 
+57da c28031f6 bbit1 flag_ssp_reject_justwork ,app_bt_disconnect 
+57db 20600000 rtn 
+
+responder_iocap_display_yesno_initiator_iocap_display_yesno:
+
+set_ssp_mode_numeric_comparison:
+57dc 70476c01 jam ssp_mode_ssp_pin_flag ,mem_ssp_mode_flag 
+57dd 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:
+57de 70476c02 jam ssp_mode_passkey_entry_flag ,mem_ssp_mode_flag 
+57df 20600000 rtn 
+
+classic_bt_set_reject_justwork_flag:
+57e0 d8e00000 arg flag_ssp_reject_justwork ,queue 
+57e1 202057e4 branch classic_bluetooth_set_flag 
+
+classic_bt_clr_reject_justwork_flag:
+57e2 d8e00000 arg flag_ssp_reject_justwork ,queue 
+57e3 202057e8 branch classic_bluetooth_clr_flag 
+
+classic_bluetooth_set_flag:
+57e4 6fe0c643 fetch 1 ,mem_classic_bt_flag 
+57e5 f9207e00 qset1 pdata 
+57e6 67e0c643 store 1 ,mem_classic_bt_flag 
+57e7 20600000 rtn 
+
+classic_bluetooth_clr_flag:
+57e8 6fe0c643 fetch 1 ,mem_classic_bt_flag 
+57e9 f93ffe00 qset0 pdata 
+57ea 67e0c643 store 1 ,mem_classic_bt_flag 
+57eb 20600000 rtn 
+
+send_lmp_io_cap_req:
+57ec 18000e05 force 5 ,queue 
+57ed 204059c4 call send_lmpext 
+57ee 6fe1c765 fetch 3 ,mem_lmp_io_cap_payload_iocap 
+57ef e7e18005 istore 3 ,contw 
+57f0 202059d6 branch send_lmp_request 
+
+send_lmpext_sniff_subrating_req:
+57f1 20600000 rtn 
+
+send_lmpext_sniff_subrating_res:
+57f2 18000e09 force 9 ,queue 
+57f3 204059c4 call send_lmpext 
+57f4 6fe08093 fetch 1 ,mem_subsniff_rate 
+57f5 e7e08005 istore 1 ,contw 
+57f6 6fe10094 fetch 2 ,mem_subsniff_tcmax 
+57f7 e7e10005 istore 2 ,contw 
+57f8 6fe2008f fetch 4 ,mem_subsniff_instant 
+57f9 e7e20005 istore 4 ,contw 
+57fa 202059d4 branch send_lmp_reply 
+
+send_lmp_name_res:
+57fb 18007e11 force 17 ,pdata 
+57fc 204059bc call msg_send_lmp 
+57fd 6fe0804a fetch 1 ,mem_lmi_opcode 
+57fe 1fe20400 copy pdata ,temp 
+57ff c0005803 beq 0x00 ,send_lmp_name_res_offset_ok 
+5800 c0075803 beq 0x0e ,send_lmp_name_res_offset_ok 
+5801 c00e5803 beq 0x1c ,send_lmp_name_res_offset_ok 
+5802 20600000 rtn 
+
+send_lmp_name_res_offset_ok:
+5803 e7e08005 istore 1 ,contw 
+5804 6fe0c5fc fetch 1 ,mem_local_name_length 
+5805 e7e08005 istore 1 ,contw 
+5806 df20000e arg 14 ,loopcnt 
+5807 580045fd setarg mem_local_name 
+5808 98408c00 iadd temp ,contr 
+5809 20407d5f call memcpy 
+580a 202059d4 branch send_lmp_reply 
+
+send_lmp_timing_accuracy_res:
+580b 18007e03 force 3 ,pdata 
+580c 204059bc call msg_send_lmp 
+580d 58000114 setarg 0x0114 
+580e e7e10005 istore 2 ,contw 
+580f 202059d4 branch send_lmp_reply 
+
+send_lmp_clkoffset_res:
+5810 18007e03 force 3 ,pdata 
+5811 204059bc call msg_send_lmp 
+5812 6fe200b5 fetch 4 ,mem_clke_bt 
+5813 9c467e00 isub clkn_bt ,pdata 
+5814 2034d816 branch send_lmp_clkoffset_res_master ,master 
+5815 1fe67e00 sub pdata ,0 ,pdata 
+
+send_lmp_clkoffset_res_master:
+5816 1feb7e00 rshift2 pdata ,pdata 
+5817 793ffe0f set0 15 ,pdata 
+5818 e7e10005 istore 2 ,contw 
+5819 202059d4 branch send_lmp_reply 
+
+send_lmp_version_res:
+581a 18007e06 force 6 ,pdata 
+581b 204059bc call msg_send_lmp 
+581c 6fe2c5f7 fetch 5 ,mem_lmp_version 
+581d e7e28005 istore 5 ,contw 
+581e 202059d4 branch send_lmp_reply 
+
+send_lmp_features_res:
+581f 18007e09 force 9 ,pdata 
+5820 204059bc call msg_send_lmp 
+5821 6fe440a0 fetch 8 ,mem_features 
+5822 e7e40005 istore 8 ,contw 
+5823 202059d4 branch send_lmp_reply 
+
+send_lmpext_features_req:
+5824 204057a4 call check_ssp_enable 
+5825 6fe08049 fetch 1 ,mem_lmp_to_send 
+5826 18000e0c force 12 ,queue 
+5827 204059c4 call send_lmpext 
+5828 58000001 setarg 0x01 
+5829 e7e08005 istore 1 ,contw 
+582a 6fe103a2 fetch 2 ,mem_lmpext_ssp_enable 
+582b e7e10005 istore 2 ,contw 
+582c 58000000 setarg 0 
+582d e7e18005 istore 3 ,contw 
+582e 58000000 setarg 0x00 
+582f e7e20005 istore 4 ,contw 
+5830 202059d6 branch send_lmp_request 
+
+send_lmpext_packet_type_table_req:
+5831 18000e03 force 3 ,queue 
+5832 204059c4 call send_lmpext 
+5833 6fe0c15f fetch 1 ,mem_ptt 
+5834 e7e08005 istore 1 ,contw 
+5835 78547c00 disable user 
+5836 204059d6 call send_lmp_request 
+5837 24740000 nrtn user 
+5838 24748000 nrtn master 
+5839 6fe0c0df fetch 1 ,mem_afh_cfg 
+583a c4000000 rtnbit0 afh_cfg_on 
+583b 2040583d call afh_init 
+583c 20205847 branch afh_open_all_channels 
+
+afh_init:
+583d 7040df03 jam 0x3 ,mem_afh_cfg 
+583e 58000000 setarg 0 
+583f 67e24149 store 4 ,mem_afh_timer 
+5840 d8a040e1 arg mem_afh_map_lo ,contw 
+5841 2040584b call afh_reset_map 
+5842 d8a040ee arg mem_afh_map_new ,contw 
+5843 2040584b call afh_reset_map 
+5844 d8a0414d arg mem_afh_classify_channel_map ,contw 
+5845 2040584b call afh_reset_map 
+5846 20205852 branch afh_clear_error_counter 
+
+afh_open_all_channels:
+5847 d8a040ee arg mem_afh_map_new ,contw 
+5848 2040584b call afh_reset_map 
+5849 20405852 call afh_clear_error_counter 
+584a 20205855 branch afh_set_send_flag 
+
+afh_reset_map:
+584b 58ffffff setarg 0xffffff 
+584c e7e18005 istore 3 ,contw 
+584d e7e18005 istore 3 ,contw 
+584e e7e18005 istore 3 ,contw 
+584f 5800007f setarg 0x7f 
+5850 e7e08005 istore 1 ,contw 
+5851 20600000 rtn 
+
+afh_clear_error_counter:
+5852 58000000 setarg 0 
+5853 67e140dd store 2 ,mem_afh_error_total 
+5854 20600000 rtn 
+
+afh_set_send_flag:
+5855 6fe0c0df fetch 1 ,mem_afh_cfg 
+5856 79207e02 set1 send_lmp_set_afh ,pdata 
+5857 67e0c0df store 1 ,mem_afh_cfg 
+5858 20600000 rtn 
+
+send_lmpext_pause_encryption_req:
+5859 18000e02 force 2 ,queue 
+585a 204059c4 call send_lmpext 
+585b 2434d9d4 nbranch send_lmp_reply ,master 
+585c 202059d6 branch send_lmp_request 
+
+send_lmp_detach:
+585d 18007e02 force 2 ,pdata 
+585e 204059bc call msg_send_lmp 
+585f 6fe0839e fetch 1 ,mem_disconn_reason_send 
+5860 e7e08005 istore 1 ,contw 
+5861 204059d6 call send_lmp_request 
+
+prepare_disconnect:
+5862 6fe0804c fetch 1 ,mem_op 
+5863 79207e03 set1 op_disconn ,pdata 
+5864 67e0804c store 1 ,mem_op 
+5865 70007332 jam 50 ,mem_conn_timer 
+5866 20600000 rtn 
+
+send_lmp_no_payload:
+5867 18007e01 force 1 ,pdata 
+5868 204059bc call msg_send_lmp 
+5869 202059d6 branch send_lmp_request 
+
+send_lmp_nopayload_reply:
+586a 18007e01 force 1 ,pdata 
+586b 204059bc call msg_send_lmp 
+586c 202059d4 branch send_lmp_reply 
+
+send_lmp_encryption_mode_req:
+586d 18007e02 force 2 ,pdata 
+586e 204059bc call msg_send_lmp 
+586f 6fe0804d fetch 1 ,mem_state_map 
+5870 2fec0002 isolate0 smap_encryption ,pdata 
+5871 7920fe00 setflag true ,0 ,pdata 
+5872 1fe17e01 and_into 1 ,pdata 
+5873 e7e08005 istore 1 ,contw 
+5874 202059d6 branch send_lmp_request 
+
+send_lmp_superto:
+5875 18007e03 force 3 ,pdata 
+5876 204059bc call msg_send_lmp 
+5877 6fe10052 fetch 2 ,mem_supervision_to 
+5878 e7e10005 istore 2 ,contw 
+5879 202059d6 branch send_lmp_request 
+
+send_lmp_name_req:
+587a 700073fa jam 250 ,mem_conn_timer 
+587b 18007e02 force 2 ,pdata 
+587c 204059bc call msg_send_lmp 
+587d 6fe08054 fetch 1 ,mem_name_offset 
+587e e7e08005 istore 1 ,contw 
+587f 202059d6 branch send_lmp_request 
+
+send_lmp_test_control:
+5880 18007e0a force 10 ,pdata 
+5881 204059bc call msg_send_lmp 
+5882 d8c00a52 arg mem_temp_payload ,contr 
+5883 18007209 force 9 ,loopcnt 
+
+send_lmp_test_control_loop:
+5884 efe08006 ifetch 1 ,contr 
+5885 1fe2fe55 xor_into 0x55 ,pdata 
+5886 e7e08005 istore 1 ,contw 
+5887 c2005884 loop send_lmp_test_control_loop 
+5888 202059d6 branch send_lmp_request 
+
+send_lmp_quality_of_service_req:
+5889 202059d6 branch send_lmp_request 
+
+send_lmp_unit_key:
+588a 202059d6 branch send_lmp_request 
+
+send_lmp_slot_offset:
+588b 20748000 rtn master 
+588c 2040104e call calc_slot_offset 
+588d 18007e09 force 9 ,pdata 
+588e 204059bc call msg_send_lmp 
+588f 6fe100c1 fetch 2 ,mem_slot_offset 
+5890 e7e10005 istore 2 ,contw 
+5891 6fe1c0a8 fetch 3 ,mem_lap 
+5892 e7e18005 istore 3 ,contw 
+5893 6fe0c0ab fetch 1 ,mem_uap 
+5894 e7e08005 istore 1 ,contw 
+5895 6fe140ac fetch 2 ,mem_nap 
+5896 e7e10005 istore 2 ,contw 
+5897 c581d89c bmark0 mark_switch_initiated ,send_lmp_slot_offset_reply 
+5898 793f8003 set0 mark_switch_initiated ,mark 
+5899 204059d6 call send_lmp_request 
+589a 70007d13 jam lmp_switch_req ,mem_lmo_opcode2 
+589b 20600000 rtn 
+
+send_lmp_slot_offset_reply:
+589c 204059d4 call send_lmp_reply 
+589d 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+589e 70007e13 jam lmp_switch_req ,mem_lmi_opcode2 
+589f 20600000 rtn 
+
+send_lmp_switch_req:
+58a0 d8400200 arg 0x200 ,temp 
+58a1 2034d8a4 branch switch_on_native ,master 
+58a2 1d027e00 deposit clke_bt 
+58a3 202058a5 branch switch_slack 
+
+switch_on_native:
+58a4 1c427e00 deposit clkn_bt 
+
+switch_slack:
+58a5 1c227e00 deposit bt_clk 
+58a6 9840fe00 iadd temp ,pdata 
+58a7 1fe17ffc and_into 0x1fc ,pdata 
+58a8 67e20035 store 4 ,mem_sniff_anchor 
+58a9 18007e05 force 5 ,pdata 
+58aa 204059bc call msg_send_lmp 
+58ab 6fe20035 fetch 4 ,mem_sniff_anchor 
+58ac 1fe37e00 rshift pdata ,pdata 
+58ad e7e20005 istore 4 ,contw 
+58ae 202059d6 branch send_lmp_request 
+
+send_lmp_sniff_req:
+58af 18007e0a force 10 ,pdata 
+58b0 204059bc call msg_send_lmp 
+58b1 d8c003ac arg mem_sniff_payload ,contr 
+58b2 efe48006 ifetch 9 ,contr 
+58b3 e7e48005 istore 9 ,contw 
+58b4 202059d6 branch send_lmp_request 
+
+send_lmp_timing_accuracy_req:
+58b5 18007e03 force 3 ,pdata 
+58b6 204059bc call msg_send_lmp 
+58b7 58000114 setarg 0x0114 
+58b8 e7e10005 istore 2 ,contw 
+58b9 202059d6 branch send_lmp_request 
+
+send_lmp_unsniff_req:
+58ba 18007e01 force 1 ,pdata 
+58bb 204059bc call msg_send_lmp 
+58bc 202059d6 branch send_lmp_request 
+
+send_lmp_max_slot:
+58bd 18007e02 force 2 ,pdata 
+58be 204059bc call msg_send_lmp 
+58bf 6fe0c0d7 fetch 1 ,mem_max_slot 
+58c0 e7e08005 istore 1 ,contw 
+58c1 202059d6 branch send_lmp_request 
+
+send_lmp_max_slot_req:
+58c2 18007e02 force 2 ,pdata 
+58c3 204059bc call msg_send_lmp 
+58c4 58000005 setarg 0x05 
+58c5 e7e08005 istore 1 ,contw 
+58c6 202059d6 branch send_lmp_request 
+
+send_lmp_inc_power:
+58c7 18007e02 force 2 ,pdata 
+58c8 204059bc call msg_send_lmp 
+58c9 58000000 setarg 0x00 
+58ca e7e08005 istore 1 ,contw 
+58cb 202059d6 branch send_lmp_request 
+
+send_lmp_setup_complete_by_module:
+58cc 70007d2e jam lmp_max_slot_req ,mem_lmo_opcode2 
+58cd 20600000 rtn 
+
+send_lmp_setup_complete:
+58ce 6fe0c09a fetch 1 ,mem_device_option 
+58cf 1fe67c0a sub pdata ,dvc_op_module ,null 
+58d0 2042d8cc call send_lmp_setup_complete_by_module ,zero 
+58d1 6fe08031 fetch 1 ,mem_state 
+58d2 79207e04 set1 state_conn_comp ,pdata 
+58d3 67e08031 store 1 ,mem_state 
+58d4 1c427e00 copy clkn_bt ,pdata 
+58d5 67e203bc store 4 ,mem_aurand_send_delay_time 
+58d6 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+58d7 c281d8df bbit1 sent_setup_complete ,send_lmp_setup_complete_has_sent 
+58d8 79207e03 set1 sent_setup_complete ,pdata 
+58d9 67e083a5 store 1 ,mem_lmp_conn_state 
+58da 70095b05 jam bt_evt_setup_complete ,mem_fifo_temp 
+58db 20407871 call ui_ipc_send_event 
+58dc 18007e01 force 1 ,pdata 
+58dd 204059bc call msg_send_lmp 
+58de 202059d6 branch send_lmp_request 
+
+send_lmp_setup_complete_has_sent:
+58df 70004900 jam 0 ,mem_lmp_to_send 
+58e0 20600000 rtn 
+
+send_lmp_version_req:
+58e1 18007e06 force 6 ,pdata 
+58e2 204059bc call msg_send_lmp 
+58e3 6fe2c5f7 fetch 5 ,mem_lmp_version 
+58e4 e7e28005 istore 5 ,contw 
+58e5 202059d6 branch send_lmp_request 
+
+send_lmp_features_req:
+58e6 18007e09 force 9 ,pdata 
+58e7 204059bc call msg_send_lmp 
+58e8 6fe440a0 fetch 8 ,mem_features 
+58e9 e7e40005 istore 8 ,contw 
+58ea 202059d6 branch send_lmp_request 
+
+sp_master_send_io_cap_get:
+58eb 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+58ec 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+58ed c1808000 rtnne sp_key_valid 
+58ee 70087113 jam sp_master_stat_start_done ,mem_master_sp_state 
+58ef 20600000 rtn 
+
+sp_master_send_io_cap_send:
+58f0 20405a14 call tid_initiate 
+58f1 70007d99 jam lmp_io_cap_req ,mem_lmo_opcode2 
+58f2 70087103 jam sp_stat_key_send ,mem_master_sp_state 
+58f3 20600000 rtn 
+
+sp_master_send_lmp_encapsulated_header:
+58f4 20405a14 call tid_initiate 
+58f5 70007d3d jam lmp_encapsulated_header ,mem_lmo_opcode2 
+58f6 70087107 jam sp_stat_random_send ,mem_master_sp_state 
+58f7 20600000 rtn 
+
+sp_master_commitment_compare:
+58f8 da200910 arg mem_sp_calc_result_high ,rega 
+58f9 da400930 arg mem_sp_confirm_remote ,regb 
+58fa df200010 arg 16 ,loopcnt 
+58fb 20407df1 call string_compare 
+58fc 2022d901 branch sp_master_commitment_compare_success ,zero 
+58fd 70087100 jam sp_stat_null ,mem_master_sp_state 
+58fe 2040706a call master_clear_mem_master_sp_flag 
+58ff 70007e40 jam lmp_simple_pairing_number ,mem_lmi_opcode2 
+5900 2020568e branch lmp_reject_pdu_not_allowed 
+
+sp_master_commitment_compare_success:
+5901 7008710a jam sp_stat_confirm_calc ,mem_master_sp_state 
+5902 20407068 call master_set_mem_master_sp_flag 
+5903 70007e40 jam lmp_simple_pairing_number ,mem_lmi_opcode2 
+5904 202054ed branch accept_lmp_msg 
+
+sp_master_send_lmp_simple_pairing_number:
+5905 70007d40 jam lmp_simple_pairing_number ,mem_lmo_opcode2 
+5906 20600000 rtn 
+
+sp_send_lmp_encapsulated_header:
+5907 70007d3d jam lmp_encapsulated_header ,mem_lmo_opcode2 
+5908 20600000 rtn 
+
+send_lmp_encapsulated_header:
+5909 70087800 jam 0 ,mem_sp_local_key_send_count 
+590a 18007e04 force 4 ,pdata 
+590b 204059bc call msg_send_lmp 
+590c 6fe1c644 fetch 3 ,mem_encapsulated_major_type 
+590d e7e18005 istore 3 ,contw 
+590e 20405a21 call check_localsm 
+590f 2020d9d6 branch send_lmp_request ,true 
+5910 202059d4 branch send_lmp_reply 
+
+send_lmp_encapsulated_payload:
+5911 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+5912 c0015915 beq encapsulated_minor_type_p256 ,send_lmp_encapsulated_payload_256 
+5913 c000d91a beq encapsulated_minor_type_p192 ,send_lmp_encapsulated_payload_192 
+5914 20600000 rtn 
+
+send_lmp_encapsulated_payload_256:
+5915 18007e11 force 17 ,pdata 
+5916 204059bc call msg_send_lmp 
+5917 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+5918 d8c046dc arg mem_sc_pubkey_local_x_256 ,contr 
+5919 2020591e branch send_lmp_encapsulated_payload_common 
+
+send_lmp_encapsulated_payload_192:
+591a 18007e11 force 17 ,pdata 
+591b 204059bc call msg_send_lmp 
+591c 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+591d d8c04734 arg mem_sp_pubkey_local ,contr 
+
+send_lmp_encapsulated_payload_common:
+591e 98c08c00 iadd contr ,contr 
+591f efe40006 ifetch 8 ,contr 
+5920 e7e40005 istore 8 ,contw 
+5921 efe40006 ifetch 8 ,contr 
+5922 e7e40005 istore 8 ,contw 
+5923 6fe08878 fetch 1 ,mem_sp_local_key_send_count 
+5924 1fe0fe10 increase 16 ,pdata 
+5925 67e08878 store 1 ,mem_sp_local_key_send_count 
+5926 20405a21 call check_localsm 
+5927 2020d9d6 branch send_lmp_request ,true 
+5928 202059d4 branch send_lmp_reply 
+
+sp_send_lmp_simple_pairing_comfirm:
+5929 70087006 jam sp_stat_random_recv ,mem_sp_state 
+592a 70007d3f jam lmp_simple_pairing_confirm ,mem_lmo_opcode2 
+592b 20600000 rtn 
+
+send_lmp_simple_pairing_comfirm:
+592c 18007e11 force 17 ,pdata 
+592d 204059bc call msg_send_lmp 
+592e d8c00910 arg mem_sp_calc_result_high ,contr 
+592f efe40006 ifetch 8 ,contr 
+5930 e7e40005 istore 8 ,contw 
+5931 efe40006 ifetch 8 ,contr 
+5932 e7e40005 istore 8 ,contw 
+5933 202059d4 branch send_lmp_reply 
+
+sp_send_lmp_simple_pairing_number:
+5934 70007d40 jam lmp_simple_pairing_number ,mem_lmo_opcode2 
+5935 20600000 rtn 
+
+send_lmp_simple_pairing_number:
+5936 20405a21 call check_localsm 
+5937 2040ef7e call sp_local_random_key_generator ,true 
+5938 18007e11 force 17 ,pdata 
+5939 204059bc call msg_send_lmp 
+593a d8c008e0 arg mem_sp_random_local ,contr 
+593b efe40006 ifetch 8 ,contr 
+593c e7e40005 istore 8 ,contw 
+593d efe40006 ifetch 8 ,contr 
+593e e7e40005 istore 8 ,contw 
+593f 20405a21 call check_localsm 
+5940 2420d9d4 nbranch send_lmp_reply ,true 
+5941 2020d9d6 branch send_lmp_request ,true 
+
+master_sp_sm_end:
+5942 7008710f jam sp_stat_done ,mem_master_sp_state 
+
+sp_aurand_send:
+5943 20405a14 call tid_initiate 
+5944 70007d0b jam lmp_au_rand ,mem_lmo_opcode2 
+5945 20405a2c call check_localsm_master 
+5946 2020efcc branch sp_master_key_prarm_push ,true 
+5947 20206fd6 branch sp_link_key_prarm_push 
+
+master_sp_send_lmp_dhkey_check:
+5948 20405a10 call tid_reply 
+
+sp_send_lmp_dhkey_check:
+5949 70007d41 jam lmp_dhkey_check ,mem_lmo_opcode2 
+594a 20600000 rtn 
+
+send_lmp_dhkey_check:
+594b 18007e11 force 17 ,pdata 
+594c 204059bc call msg_send_lmp 
+594d d8c00910 arg mem_sp_calc_result_high ,contr 
+594e efe40006 ifetch 8 ,contr 
+594f e7e40005 istore 8 ,contw 
+5950 efe40006 ifetch 8 ,contr 
+5951 e7e40005 istore 8 ,contw 
+5952 20405a21 call check_localsm 
+5953 2420d9d4 nbranch send_lmp_reply ,true 
+5954 2020d9d6 branch send_lmp_request ,true 
+
+send_lmp_enc_key_size_mask_res:
+5955 18007e03 force 3 ,pdata 
+5956 204059bc call msg_send_lmp 
+5957 5800fffe setarg 0xfffe 
+5958 e7e10005 istore 2 ,contw 
+5959 202059d4 branch send_lmp_reply 
+
+send_lmp_auto_rate:
+595a 202059d6 branch send_lmp_request 
+
+send_lmp_clkoffset_req:
+595b 202059d6 branch send_lmp_request 
+
+send_lmp_quality_of_service:
+595c 202059d6 branch send_lmp_request 
+
+send_lmp_test_activate:
+595d 202059d6 branch send_lmp_request 
+
+send_lmp_comb_key:
+595e 20405a30 call generate_random_number 
+595f da2040a8 arg mem_lap ,rega 
+5960 20405a36 call generate_linkkey 
+5961 18007e11 force 17 ,pdata 
+5962 204059bc call msg_send_lmp 
+5963 da200444 arg mem_kinit ,rega 
+5964 da400424 arg mem_random_number ,regb 
+5965 20406c08 call xor16 
+5966 2434d9cb nbranch send_lmp_follow ,master 
+5967 202059d1 branch send_lmp_tid 
+
+send_lmp_inrand:
+5968 20405a30 call generate_random_number 
+5969 da200041 arg mem_plap ,rega 
+596a 20406b0b call generate_kinit 
+
+send_lmp_rand:
+596b 18007e11 force 17 ,pdata 
+596c 204059bc call msg_send_lmp 
+596d d8c00424 arg mem_random_number ,contr 
+596e 20407d0c call memcpy16 
+596f 6fe08056 fetch 1 ,mem_conn_sm 
+5970 c00cd9d6 beq conn_sm_auth_wait ,send_lmp_request 
+5971 c00c59d6 beq conn_sm_pairing_wait ,send_lmp_request 
+5972 202059d1 branch send_lmp_tid 
+
+send_lmp_aurand:
+5973 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+5974 c001597e beq encapsulated_minor_type_p256 ,send_lmp_aurand_256 
+5975 6fe08877 fetch 1 ,mem_pairing_auth 
+5976 203a597b branch send_lmp_aurand_notpairing ,blank 
+
+send_lmp_aurand2:
+5977 20405a21 call check_localsm 
+5978 2040da14 call tid_initiate ,true 
+5979 2440da10 ncall tid_reply ,true 
+597a 2020597c branch send_lmp_aurand_common 
+
+send_lmp_aurand_notpairing:
+597b 20405a14 call tid_initiate 
+
+send_lmp_aurand_common:
+597c 20405a30 call generate_random_number 
+597d 2020596b branch send_lmp_rand 
+
+send_lmp_aurand_256:
+597e 70007d0c jam lmp_sres ,mem_lmo_opcode2 
+597f 20205977 branch send_lmp_aurand2 
+
+send_lmp_sres:
+5980 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+5981 c001599a beq encapsulated_minor_type_p256 ,send_lmp_sres_256 
+5982 da2040a8 arg mem_lap ,rega 
+5983 20406b3e call function_e1 
+5984 18007e05 force 5 ,pdata 
+5985 204059bc call msg_send_lmp 
+5986 6fe20454 fetch 4 ,mem_input_store 
+5987 e7e20005 istore 4 ,contw 
+5988 d84003a9 arg mem_sres_tid ,temp 
+5989 20405a07 call special_tid_store 
+598a 20406c3c call copy_aco 
+598b 20405a21 call check_localsm 
+598c 2020d991 branch send_lmp_sres_master ,true 
+598d 7003ab01 jam done_encryp ,mem_wait_encryption 
+598e 6fe08877 fetch 1 ,mem_pairing_auth 
+598f 207a0000 rtn blank 
+5990 70007d0b jam lmp_au_rand ,mem_lmo_opcode2 
+
+send_lmp_sres_master:
+5991 6fe0c1ca fetch 1 ,mem_link_key_exists 
+5992 207a0000 rtn blank 
+
+send_lmp_sres_startenc:
+5993 20405a21 call check_localsm 
+5994 2420d996 nbranch send_lmp_sres_startenc_slave ,true 
+5995 20600000 rtn 
+
+send_lmp_sres_startenc_slave:
+5996 c6908000 rtnmark0 mark_slave_in_rand_accepted 
+5997 793f8021 set0 mark_slave_in_rand_accepted ,mark 
+5998 70007d0f jam lmp_encryption_mode_req ,mem_lmo_opcode2 
+5999 20600000 rtn 
+
+send_lmp_sres_256:
+599a 204074f4 call function_h4 
+599b 20407519 call function_h5 
+599c 18007e05 force 5 ,pdata 
+599d 204059bc call msg_send_lmp 
+599e 6fe20918 fetch 4 ,memb 
+599f e7e20005 istore 4 ,contw 
+59a0 d84003a9 arg mem_sres_tid ,temp 
+59a1 20405a07 call special_tid_store 
+59a2 204059a9 call copy_aco_256 
+59a3 20405a21 call check_localsm 
+59a4 2020d991 branch send_lmp_sres_master ,true 
+59a5 7003ab01 jam done_encryp ,mem_wait_encryption 
+59a6 6fe08877 fetch 1 ,mem_pairing_auth 
+59a7 207a0000 rtn blank 
+59a8 20205991 branch send_lmp_sres_master 
+
+copy_aco_256:
+59a9 6fe40910 fetch 8 ,mem_sp_calc_result_high 
+59aa 67e446aa store 8 ,mem_ccm_iv 
+59ab 20600000 rtn 
+
+send_lmp_start_encryption:
+59ac 20405a30 call generate_random_number 
+59ad 20406b41 call function_e3 
+59ae 18007e11 force 17 ,pdata 
+59af 204059bc call msg_send_lmp 
+59b0 d8c00424 arg mem_random_number ,contr 
+59b1 20407d0c call memcpy16 
+59b2 202059d1 branch send_lmp_tid 
+
+send_lmp_stop_encryption_req:
+59b3 18007e01 force 1 ,pdata 
+59b4 204059bc call msg_send_lmp 
+59b5 202059d1 branch send_lmp_tid 
+
+send_lmp_encryption_key_size_req:
+59b6 18007e02 force 2 ,pdata 
+59b7 204059bc call msg_send_lmp 
+59b8 18007e10 force 16 ,pdata 
+59b9 e7e08005 istore 1 ,contw 
+59ba 67e08055 store 1 ,mem_key_size 
+59bb 202059d1 branch send_lmp_tid 
+
+msg_send_lmp:
+59bc 1fe9fe00 lshift3 pdata ,pdata 
+59bd 1fe1fe07 or_into 0x07 ,pdata 
+59be 67e0838a store 1 ,mem_lmo_header_length 
+59bf df200011 arg 17 ,loopcnt 
+59c0 d8a0038c arg mem_lmo_payload ,contw 
+59c1 20407d26 call clear_mem 
+59c2 d8a0038c arg mem_lmo_payload ,contw 
+59c3 20600000 rtn 
+
+send_lmpext:
+59c4 1fe1227f and pdata ,0x7f ,rega 
+59c5 7000497f jam lmp_escape ,mem_lmp_to_send 
+59c6 18e27e00 deposit queue 
+59c7 204059bc call msg_send_lmp 
+59c8 1a227e00 deposit rega 
+59c9 e7e08005 istore 1 ,contw 
+59ca 20600000 rtn 
+
+send_lmp_follow:
+59cb 6fe08049 fetch 1 ,mem_lmp_to_send 
+59cc 1fe3fe00 lshift pdata ,pdata 
+59cd 6848804d fetcht 1 ,mem_state_map 
+59ce 284ffe01 isolate1 smap_lmptid ,temp 
+59cf 7920fe00 setflag true ,0 ,pdata 
+59d0 202059db branch send_lmp_exit 
+
+send_lmp_tid:
+59d1 6848804d fetcht 1 ,mem_state_map 
+59d2 18410401 and_into 1 ,temp 
+59d3 202059d7 branch send_lmp_end 
+
+send_lmp_reply:
+59d4 18000400 force 0 ,temp 
+59d5 202059d7 branch send_lmp_end 
+
+send_lmp_request:
+59d6 18000401 force 1 ,temp 
+
+send_lmp_end:
+59d7 6fe08049 fetch 1 ,mem_lmp_to_send 
+59d8 1fe3fe00 lshift pdata ,pdata 
+59d9 7934fe00 setflag master ,0 ,pdata 
+59da 9842fe00 ixor temp ,pdata 
+
+send_lmp_exit:
+59db 67e0838b store 1 ,mem_lmo_header_opcode 
+59dc 67e0c5f6 store 1 ,mem_lmo_header_opcode_x 
+59dd 70004900 jam 0 ,mem_lmp_to_send 
+59de 204059ec call lmo_fifo_process_lmo0empty 
+59df 78347c00 enable user 
+59e0 20600000 rtn 
+
+lmo_fifo_check:
+59e1 6fe0807d fetch 1 ,mem_lmo_opcode2 
+59e2 207a0000 rtn blank 
+59e3 204059e6 call lmo_fifo_process 
+59e4 6fe0807d fetch 1 ,mem_lmo_opcode2 
+59e5 20600000 rtn 
+
+lmo_fifo_process:
+59e6 470ec023 bpatchx patch23_5 ,mem_patch23 
+59e7 6fe08049 fetch 1 ,mem_lmp_to_send 
+59e8 203a59ec branch lmo_fifo_process_lmo0empty ,blank 
+59e9 6fe08079 fetch 1 ,mem_lmo_opcode1 
+59ea 247a0000 nrtn blank 
+59eb 202059f6 branch lmo_fifo_process_lmo2to1 
+
+lmo_fifo_process_lmo0empty:
+59ec 6fe08079 fetch 1 ,mem_lmo_opcode1 
+59ed 203a59fc branch lmo_fifo_process_lmo1_empty ,blank 
+59ee 6fe18079 fetch 3 ,mem_lmo_opcode1 
+59ef 67e18049 store 3 ,mem_lmp_to_send 
+59f0 6848807c fetcht 1 ,mem_lmo_tid1 
+59f1 6fe0804d fetch 1 ,mem_state_map 
+59f2 793ffe01 set0 smap_lmptid ,pdata 
+59f3 9841fe00 ior temp ,pdata 
+59f4 67e0804d store 1 ,mem_state_map 
+59f5 70007900 jam 0 ,mem_lmo_opcode1 
+
+lmo_fifo_process_lmo2to1:
+59f6 6fe0807d fetch 1 ,mem_lmo_opcode2 
+59f7 207a0000 rtn blank 
+59f8 6fe2007d fetch 4 ,mem_lmo_opcode2 
+59f9 67e20079 store 4 ,mem_lmo_opcode1 
+59fa 70007d00 jam 0 ,mem_lmo_opcode2 
+59fb 20600000 rtn 
+
+lmo_fifo_process_lmo1_empty:
+59fc 6fe0807d fetch 1 ,mem_lmo_opcode2 
+59fd 207a0000 rtn blank 
+59fe 6fe1807d fetch 3 ,mem_lmo_opcode2 
+59ff 67e18049 store 3 ,mem_lmp_to_send 
+5a00 68488080 fetcht 1 ,mem_lmo_tid2 
+5a01 6fe0804d fetch 1 ,mem_state_map 
+5a02 793ffe01 set0 smap_lmptid ,pdata 
+5a03 9841fe00 ior temp ,pdata 
+5a04 67e0804d store 1 ,mem_state_map 
+5a05 70007d00 jam 0 ,mem_lmo_opcode2 
+5a06 20600000 rtn 
+
+special_tid_store:
+5a07 470f4023 bpatchx patch23_6 ,mem_patch23 
+5a08 6fe0804d fetch 1 ,mem_state_map 
+5a09 1fe22600 copy pdata ,regc 
+5a0a efe08002 ifetch 1 ,temp 
+5a0b 20405509 call pop_tid_follow 
+5a0c 204059cb call send_lmp_follow 
+5a0d 1a627e00 copy regc ,pdata 
+5a0e 67e0804d store 1 ,mem_state_map 
+5a0f 20600000 rtn 
+
+tid_reply:
+5a10 6848804d fetcht 1 ,mem_state_map 
+5a11 793f8400 set0 smap_lmptidinit ,temp 
+5a12 6048804d storet 1 ,mem_state_map 
+5a13 20600000 rtn 
+
+tid_initiate:
+5a14 6848804d fetcht 1 ,mem_state_map 
+5a15 79200400 set1 smap_lmptidinit ,temp 
+5a16 6048804d storet 1 ,mem_state_map 
+5a17 20600000 rtn 
+
+tid_check:
+5a18 7d34fe01 nsetflag master ,smap_lmptid ,pdata 
+5a19 6848804d fetcht 1 ,mem_state_map 
+5a1a 9842fe00 ixor temp ,pdata 
+5a1b 2feffe01 isolate1 smap_lmptid ,pdata 
+5a1c 20600000 rtn 
+
+tid_set_reply:
+5a1d 6fe0804d fetch 1 ,mem_state_map 
+5a1e 7934fe01 setflag master ,smap_lmptid ,pdata 
+5a1f 67e0804d store 1 ,mem_state_map 
+5a20 20600000 rtn 
+
+check_localsm:
+5a21 6fe08876 fetch 1 ,mem_sp_localsm 
+5a22 2fe0fe01 compare local_statemachine ,pdata ,0x7f 
+5a23 20600000 rtn 
+
+setlocalsm_master:
+5a24 6fe08876 fetch 1 ,mem_sp_localsm 
+5a25 79207e07 set1 7 ,pdata 
+5a26 67e08876 store 1 ,mem_sp_localsm 
+5a27 20600000 rtn 
+
+setlocalsm_slave:
+5a28 6fe08876 fetch 1 ,mem_sp_localsm 
+5a29 793ffe07 set0 7 ,pdata 
+5a2a 67e08876 store 1 ,mem_sp_localsm 
+5a2b 20600000 rtn 
+
+check_localsm_master:
+5a2c 6fe08876 fetch 1 ,mem_sp_localsm 
+5a2d 2feffe07 isolate1 7 ,pdata 
+5a2e 67e08876 store 1 ,mem_sp_localsm 
+5a2f 20600000 rtn 
+
+generate_random_number:
+5a30 d8a00424 arg mem_random_number ,contw 
+
+generate_random:
+5a31 18007210 force 16 ,loopcnt 
+
+generate_random_another:
+
+generate_random_loop:
+5a32 180a7e00 random pdata 
+5a33 e7e08005 istore 1 ,contw 
+5a34 c2005a32 loop generate_random_another 
+5a35 20600000 rtn 
+
+generate_linkkey:
+5a36 20406b0f call function_e21 
+5a37 da2041cb arg mem_link_key ,rega 
+5a38 da400454 arg mem_input_store ,regb 
+5a39 efe40011 ifetch 8 ,rega 
+5a3a 68488031 fetcht 1 ,mem_state 
+5a3b 7d3a0406 nsetflag blank ,state_combkey ,temp 
+5a3c 60488031 storet 1 ,mem_state 
+5a3d 1a220a00 copy rega ,contw 
+5a3e 20406c08 call xor16 
+5a3f 202009c8 branch generate_linkkey_continue 
+
+process_conn_sm:
+5a40 470fc023 bpatchx patch23_7 ,mem_patch23 
+5a41 204059e1 call lmo_fifo_check 
+5a42 247a0000 nrtn blank 
+
+process_conn_sm_continue:
+5a43 6fe08056 fetch 1 ,mem_conn_sm 
+5a44 207a0000 rtn blank 
+5a45 c0025a94 beq conn_sm_send_conn_req ,host_create_conn_send_conn_req 
+5a46 c002da9a beq conn_sm_wait_conn_accept ,host_create_conn_wait_accept 
+5a47 c0015a8b beq conn_sm_send_features ,host_create_conn_send_features 
+5a48 c001daa2 beq conn_sm_wait_features_res ,host_create_conn_waiting 
+5a49 c0075a8e beq conn_sm_send_switch ,host_create_conn_send_switch 
+5a4a c0035abe beq conn_sm_auth_pair ,host_create_conn_auth_pair 
+5a4b c003dad6 beq conn_sm_auth_pair_wait ,host_create_conn_auth_pair_wait 
+5a4c c004dad7 beq conn_sm_encrypt ,host_create_conn_encrypt 
+5a4d c0055ae0 beq conn_sm_encrypt_wait ,host_create_conn_encrypt_wait 
+5a4e c005dae4 beq conn_sm_encrypt_wait_clear ,host_create_conn_encrypt_wait_clear 
+5a4f c0065aac beq conn_sm_send_setup_complete ,host_create_conn_send_setup_complete 
+5a50 c006daaf beq conn_sm_wait_setup_complete ,host_create_conn_wait_setup_complete 
+5a51 c007dab5 beq conn_sm_detach_delay ,host_create_conn_master_detach 
+5a52 c0095a7e beq conn_sm_send_version ,host_create_conn_send_version 
+5a53 c009daa2 beq conn_sm_wait_version ,host_create_conn_waiting 
+5a54 c0085a81 beq conn_sm_wait_switch_after_host_connection ,host_creat_conn_wait_switch 
+5a55 c00a5a7b beq conn_sm_send_features_ext ,host_creat_conn_send_feat_ext 
+5a56 c00adaa2 beq conn_sm_wait_features_ext ,host_create_conn_waiting 
+5a57 c00b5a75 beq conn_sm_pairing ,host_create_conn_pairing 
+5a58 c00c5a7a beq conn_sm_pairing_wait ,host_create_conn_pairing_wait 
+5a59 c00bda6e beq conn_sm_auth ,host_create_conn_auth 
+5a5a c00cda74 beq conn_sm_auth_wait ,host_create_conn_auth_wait 
+5a5b c00d5a5f beq conn_sm_done ,host_create_conn_done 
+5a5c c00dda69 beq conn_sm_wait_done ,host_create_conn_done_wait 
+5a5d 70005600 jam conn_sm_standby ,mem_conn_sm 
+5a5e 20600000 rtn 
+
+host_create_conn_done:
+5a5f 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5a60 c4010000 rtnbit0 received_setup_complete 
+5a61 c4018000 rtnbit0 sent_setup_complete 
+5a62 70005600 jam conn_sm_standby ,mem_conn_sm 
+5a63 20405a65 call host_conn_judge_encrypt 
+5a64 202065a5 branch scheduler_start_upper_sm 
+
+host_conn_judge_encrypt:
+5a65 6fe080bd fetch 1 ,mem_connection_options 
+5a66 c4008000 rtnbit0 connection_encrypt 
+5a67 7000560a jam conn_sm_encrypt_wait ,mem_conn_sm 
+5a68 20600000 rtn 
+
+host_create_conn_done_wait:
+5a69 d8e00007 arg enpt_delay_timer ,queue 
+5a6a 20407d74 call timer_check 
+5a6b 247a0000 nrtn blank 
+5a6c 7000561a jam conn_sm_done ,mem_conn_sm 
+5a6d 20600000 rtn 
+
+host_create_conn_auth:
+5a6e 6fe080bd fetch 1 ,mem_connection_options 
+5a6f 793ffe00 set0 connection_auth ,pdata 
+5a70 67e080bd store 1 ,mem_connection_options 
+5a71 70005619 jam conn_sm_auth_wait ,mem_conn_sm 
+5a72 70007d0b jam lmp_au_rand ,mem_lmo_opcode2 
+5a73 20600000 rtn 
+
+host_create_conn_auth_wait:
+5a74 20600000 rtn 
+
+host_create_conn_pairing:
+5a75 6fe083a8 fetch 1 ,mem_pincode_state 
+5a76 c1810000 rtnne pincode_state_pincode_ready 
+5a77 20405ae6 call host_auth 
+5a78 70005618 jam conn_sm_pairing_wait ,mem_conn_sm 
+5a79 20600000 rtn 
+
+host_create_conn_pairing_wait:
+5a7a 20600000 rtn 
+
+host_creat_conn_send_feat_ext:
+5a7b 70005615 jam conn_sm_wait_features_ext ,mem_conn_sm 
+5a7c 70007d83 jam lmp_ext_features_req ,mem_lmo_opcode2 
+5a7d 20600000 rtn 
+
+host_create_conn_send_version:
+5a7e 70005613 jam conn_sm_wait_version ,mem_conn_sm 
+5a7f 70007d25 jam lmp_version_req ,mem_lmo_opcode2 
+5a80 20600000 rtn 
+
+host_creat_conn_wait_switch:
+5a81 6fe0c642 fetch 1 ,mem_switch_flag 
+5a82 c1000000 rtneq switch_flag_init 
+5a83 c000da89 beq switch_flag_accept ,host_create_conn_switch_accept 
+5a84 d8e00006 arg switch_wait_timer ,queue 
+5a85 20407d74 call timer_check 
+5a86 247a0000 nrtn blank 
+5a87 70464200 jam switch_flag_init ,mem_switch_flag 
+5a88 20205aa3 branch host_create_conn_switch 
+
+host_create_conn_switch_accept:
+5a89 20748000 rtn master 
+5a8a 20205abe branch host_create_conn_auth_pair 
+
+host_create_conn_send_features:
+5a8b 70005603 jam conn_sm_wait_features_res ,mem_conn_sm 
+5a8c 70007d27 jam lmp_features_req ,mem_lmo_opcode2 
+5a8d 20600000 rtn 
+
+host_create_conn_send_switch:
+5a8e 70007d13 jam lmp_switch_req ,mem_lmo_opcode2 
+5a8f 79200003 set1 mark_switch_initiated ,mark 
+5a90 70005605 jam conn_sm_wait_conn_accept ,mem_conn_sm 
+5a91 580001ff setarg 0x1ff 
+5a92 67e103a6 store 2 ,mem_soft_timer 
+5a93 20600000 rtn 
+
+host_create_conn_send_conn_req:
+5a94 70005605 jam conn_sm_wait_conn_accept ,mem_conn_sm 
+5a95 580000ff setarg 0xff 
+5a96 67e103a6 store 2 ,mem_soft_timer 
+5a97 793f8022 set0 mark_reconn_recieve_switch ,mark 
+5a98 70007d33 jam lmp_host_connection_req ,mem_lmo_opcode2 
+5a99 20205390 branch init_lmp_reinit 
+
+host_create_conn_wait_accept:
+5a9a c6110000 rtnmark1 mark_reconn_recieve_switch 
+5a9b 6fe103a6 fetch 2 ,mem_soft_timer 
+5a9c 1fe0ffff increase -1 ,pdata 
+5a9d 2022daa0 branch host_create_conn_resend ,zero 
+5a9e 67e103a6 store 2 ,mem_soft_timer 
+5a9f 20600000 rtn 
+
+host_create_conn_resend:
+5aa0 7000560e jam conn_sm_send_switch ,mem_conn_sm 
+5aa1 20600000 rtn 
+
+host_create_conn_waiting:
+5aa2 20600000 rtn 
+
+host_create_conn_switch:
+5aa3 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5aa4 c4018000 rtnbit0 sent_setup_complete 
+5aa5 c4010000 rtnbit0 received_setup_complete 
+5aa6 6fe080bd fetch 1 ,mem_connection_options 
+5aa7 793ffe02 set0 connection_switch ,pdata 
+5aa8 67e080bd store 1 ,mem_connection_options 
+5aa9 70007d13 jam lmp_switch_req ,mem_lmo_opcode2 
+5aaa 70005610 jam conn_sm_wait_switch_after_host_connection ,mem_conn_sm 
+5aab 20600000 rtn 
+
+host_create_conn_send_setup_complete:
+5aac 7000560d jam conn_sm_wait_setup_complete ,mem_conn_sm 
+5aad 70007d31 jam lmp_setup_complete ,mem_lmo_opcode2 
+5aae 20600000 rtn 
+
+host_create_conn_wait_setup_complete:
+5aaf 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5ab0 c4010000 rtnbit0 received_setup_complete 
+5ab1 70005600 jam conn_sm_standby ,mem_conn_sm 
+5ab2 20600000 rtn 
+
+host_create_conn_wait_setup_complete_rtn:
+5ab3 70005606 jam conn_sm_auth_pair ,mem_conn_sm 
+5ab4 20600000 rtn 
+
+host_create_conn_master_detach:
+5ab5 6fe103a6 fetch 2 ,mem_soft_timer 
+5ab6 1fe0ffff increase -1 ,pdata 
+5ab7 203a5aba branch host_create_conn_send_detach ,blank 
+5ab8 67e103a6 store 2 ,mem_soft_timer 
+5ab9 20600000 rtn 
+
+host_create_conn_send_detach:
+5aba 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+5abb 70039e16 jam local_host ,mem_disconn_reason_send 
+5abc 70005600 jam 0 ,mem_conn_sm 
+5abd 20600000 rtn 
+
+host_create_conn_auth_pair:
+5abe 6fe080bd fetch 1 ,mem_connection_options 
+5abf c2815aa3 bbit1 connection_switch ,host_create_conn_switch 
+5ac0 c2805ac3 bbit1 connection_auth ,host_create_conn_auth_pair_true 
+
+host_create_conn_sm_done:
+5ac1 7000561a jam conn_sm_done ,mem_conn_sm 
+5ac2 20600000 rtn 
+
+host_create_conn_auth_pair_true:
+5ac3 6fe0c1ca fetch 1 ,mem_link_key_exists 
+5ac4 203a5acf branch host_create_conn_auth_pair_nokey ,blank 
+5ac5 6fe083a5 fetch 1 ,mem_lmp_conn_state 
+5ac6 c4018000 rtnbit0 sent_setup_complete 
+5ac7 c4010000 rtnbit0 received_setup_complete 
+5ac8 6fe203bc fetch 4 ,mem_aurand_send_delay_time 
+5ac9 d8400064 arg 100 ,temp 
+5aca 98408400 iadd temp ,temp 
+5acb 1c427e00 copy clkn_bt ,pdata 
+5acc 98467c00 isub temp ,null 
+5acd 24610000 nrtn positive 
+5ace 20205a6e branch host_create_conn_auth 
+
+host_create_conn_auth_pair_nokey:
+5acf 70005616 jam conn_sm_pairing ,mem_conn_sm 
+5ad0 70479304 jam 4 ,mem_pin_length 
+5ad1 58003030 setarg 0x3030 
+5ad2 67e14794 store 2 ,mem_pin 
+5ad3 e7e10005 istore 2 ,contw 
+5ad4 7003a802 jam pincode_state_pincode_ready ,mem_pincode_state 
+5ad5 20205a75 branch host_create_conn_pairing 
+
+host_create_conn_auth_pair_wait:
+5ad6 20600000 rtn 
+
+host_create_conn_encrypt:
+5ad7 6fe080bd fetch 1 ,mem_connection_options 
+5ad8 c280dadb bbit1 connection_encrypt ,host_create_conn_encrypt_start 
+5ad9 7000561a jam conn_sm_done ,mem_conn_sm 
+5ada 20600000 rtn 
+
+host_create_conn_encrypt_start:
+5adb 6fe080bd fetch 1 ,mem_connection_options 
+5adc 793ffe01 set0 connection_encrypt ,pdata 
+5add 67e080bd store 1 ,mem_connection_options 
+5ade 70007d0f jam lmp_encryption_mode_req ,mem_lmo_opcode2 
+5adf 20600000 rtn 
+
+host_create_conn_encrypt_wait:
+5ae0 6fe083ab fetch 1 ,mem_wait_encryption 
+5ae1 207a0000 rtn blank 
+5ae2 70005600 jam conn_sm_standby ,mem_conn_sm 
+5ae3 20205adb branch host_create_conn_encrypt_start 
+
+host_create_conn_encrypt_wait_clear:
+5ae4 7000560c jam conn_sm_send_setup_complete ,mem_conn_sm 
+5ae5 20600000 rtn 
+
+host_auth:
+5ae6 6fe0804c fetch 1 ,mem_op 
+5ae7 c2815aeb bbit1 op_inrand_req ,remote_auth 
+5ae8 20405a14 call tid_initiate 
+5ae9 70007d08 jam lmp_in_rand ,mem_lmo_opcode2 
+5aea 20204d86 branch cmd_exit 
+
+remote_auth:
+5aeb 6fe0804c fetch 1 ,mem_op 
+5aec 793ffe02 set0 op_inrand_req ,pdata 
+5aed 67e0804c store 1 ,mem_op 
+5aee 204056f2 call lmp_accept_inrand 
+5aef 20405a1d call tid_set_reply 
+5af0 20204d86 branch cmd_exit 
+
+pincode_reinit:
+5af1 58000004 setarg 4 
+5af2 67e0c793 store 1 ,mem_pin_length 
+5af3 58003030 setarg 0x3030 
+5af4 e7e10005 istore 2 ,contw 
+5af5 e7e10005 istore 2 ,contw 
+5af6 20600000 rtn 
+
+twspi_reset:
+5af7 47104024 bpatchx patch24_0 ,mem_patch24 
+5af8 1fe17eff and_into 0xff ,pdata 
+5af9 d8a08070 arg core_gpio_conf ,contw 
+5afa 98a08a00 iadd contw ,contw 
+5afb 18a22200 copy contw ,rega 
+5afc d840003e arg gpcfg_output_low ,temp 
+5afd e0408005 istoret 1 ,contw 
+5afe 20405b04 call twspi_disable 
+5aff 2000001e nop 30 
+5b00 1a220a00 copy rega ,contw 
+5b01 d840003f arg gpcfg_output_high ,temp 
+5b02 e0408005 istoret 1 ,contw 
+5b03 20205b08 branch twspi_enable 
+
+twspi_disable:
+5b04 6ff08085 fetch 1 ,core_aes_en 
+5b05 1fe17efb and_into 0xfb ,pdata 
+5b06 67f08085 store 1 ,core_aes_en 
+5b07 20600000 rtn 
+
+twspi_enable:
+5b08 6ff08085 fetch 1 ,core_aes_en 
+5b09 1fe1fe04 or_into 0x04 ,pdata 
+5b0a 67f08085 store 1 ,core_aes_en 
+5b0b 20600000 rtn 
+
+twspi_write:
+5b0c 20205cbf branch spid_write_reg 
+
+twspi_read:
+5b0d 20205cc6 branch spid_read_reg 
+
+aes_disable:
+5b0e 6ff08085 fetch 1 ,core_aes_en 
+5b0f 1fe17efd and_into 0xfd ,pdata 
+5b10 67f08085 store 1 ,core_aes_en 
+5b11 20600000 rtn 
+
+read_function_aes:
+5b12 24345b16 nbranch read_function ,user 
+5b13 6ff08085 fetch 1 ,core_aes_en 
+5b14 1fe1fe02 or_into 0x2 ,pdata 
+5b15 67f08085 store 1 ,core_aes_en 
+
+read_function:
+5b16 18427c00 copy temp ,null 
+5b17 2022db19 branch read_fuction_zero ,zero 
+5b18 1a627a00 copy regc ,pc 
+
+read_fuction_zero:
+5b19 2fcc0000 isolate0 0 ,null 
+5b1a 20205be7 branch set_ucode_status 
+
+get_block_header:
+5b1b 18000404 force 4 ,temp 
+
+get_block_header0:
+5b1c da2002eb arg mem_ucode_buf ,rega 
+5b1d 20405b0e call aes_disable 
+5b1e 20405b16 call read_function 
+5b1f da2055aa arg 0x55aa ,rega 
+5b20 6fe102eb fetch 2 ,mem_ucode_buf 
+5b21 e8410006 ifetcht 2 ,contr 
+5b22 9a267c00 isub rega ,null 
+5b23 20600000 rtn 
+
+read_first_block:
+5b24 d8400002 arg 2 ,temp 
+5b25 da2002f1 arg mem_ucode_ptr ,rega 
+5b26 20405b16 call read_function 
+5b27 6fe102f1 fetch 2 ,mem_ucode_ptr 
+5b28 67e102e4 store 2 ,mem_addr_mi 
+5b29 20545b2b call get_iv ,user 
+5b2a 20600000 rtn 
+
+get_iv:
+5b2b d8400010 arg 16 ,temp 
+5b2c da2002f3 arg mem_ucode_keybuf ,rega 
+5b2d 20405b0e call aes_disable 
+5b2e 20405b16 call read_function 
+5b2f d8c002f3 arg mem_ucode_keybuf ,contr 
+5b30 df200010 arg 16 ,loopcnt 
+5b31 20406db2 call aes_load_data 
+5b32 20406d62 call aes_init 
+5b33 20406dcb call aes_clear_data 
+5b34 20206d5c branch do_aes_cbc 
+
+load_storage:
+5b35 7856fc00 disable match 
+5b36 20405b1b call get_block_header 
+5b37 24628000 nrtn zero 
+5b38 7836fc00 enable match 
+5b39 70802380 jam 0x80 ,core_ucode_ctrl 
+5b3a 70802200 jam 0 ,core_ucode_hi 
+5b3b 70802400 jam 0 ,core_ucode_low 
+5b3c da208025 arg core_ucode_data ,rega 
+5b3d 20405b12 call read_function_aes 
+5b3e 70802300 jam 0x0 ,core_ucode_ctrl 
+
+load_storage_loop:
+5b3f d8400006 arg 6 ,temp 
+5b40 20405b1c call get_block_header0 
+5b41 24628000 nrtn zero 
+5b42 efe10006 ifetch 2 ,contr 
+5b43 98002200 iforce rega 
+5b44 20405b16 call read_function 
+5b45 20205b3f branch load_storage_loop 
+
+load_storage_efuse:
+5b46 6fe08a04 fetch 1 ,mem_tmp_buffer + efuse_offset_offset 
+5b47 d8c00a01 arg mem_tmp_buffer ,contr 
+5b48 98c08c00 iadd contr ,contr 
+5b49 70802380 jam 0x80 ,core_ucode_ctrl 
+5b4a 70802200 jam 0 ,core_ucode_hi 
+5b4b 70802400 jam 0 ,core_ucode_low 
+5b4c da208025 arg core_ucode_data ,rega 
+5b4d ef208006 ifetchr loopcnt ,1 ,contr 
+5b4e 1f267c00 sub loopcnt ,0 ,null 
+5b4f 2442db58 ncall load_efuse_read_code_loop ,zero 
+5b50 70802300 jam 0x0 ,core_ucode_ctrl 
+
+load_storage_efuse_loop:
+5b51 efe08006 ifetch 1 ,contr 
+5b52 207a0000 rtn blank 
+5b53 1fe27200 copy pdata ,loopcnt 
+5b54 ea410006 ifetchr regb ,2 ,contr 
+5b55 1a420a00 copy regb ,contw 
+5b56 20407d61 call memcpy_loop 
+5b57 20205b51 branch load_storage_efuse_loop 
+
+load_efuse_read_code_loop:
+5b58 efe08006 ifetch 1 ,contr 
+5b59 e7e08011 istore 1 ,rega 
+5b5a c2005b58 loop load_efuse_read_code_loop 
+5b5b 20600000 rtn 
+
+reload_eeprom:
+5b5c 20407e02 call clean_mem 
+5b5d 58001000 setarg 0x1000 
+5b5e 67e102e4 store 2 ,mem_addr_mi 
+5b5f da605de2 arg iicd_read_eep ,regc 
+5b60 df200002 arg 2 ,loopcnt 
+
+reload_eeprom_loop:
+5b61 20405b1b call get_block_header 
+5b62 24628000 nrtn zero 
+5b63 6fe102e4 fetch 2 ,mem_addr_mi 
+5b64 1ff0fe00 byteswap pdata ,pdata 
+5b65 9840fe00 iadd temp ,pdata 
+5b66 1ff0fe00 byteswap pdata ,pdata 
+5b67 67e102e4 store 2 ,mem_addr_mi 
+5b68 c2005b61 loop reload_eeprom_loop 
+5b69 20205b3f branch load_storage_loop 
+
+loadcode:
+5b6a 20407e02 call clean_mem 
+5b6b 70805025 jam 0x25 ,core_clkoff 
+5b6c 58000000 setarg 0 
+5b6d da200a01 arg mem_tmp_buffer ,rega 
+5b6e d8400040 arg 64 ,temp 
+5b6f 20405e63 call efuse_read_data 
+5b70 20405bb8 call loadcode_efuse_check 
+5b71 20405c12 call app_read_efuse_app_vsel 
+5b72 78547c00 disable user 
+5b73 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5b74 c301db7c bbit0 ucode_flag_enc ,loadcode_efuse 
+5b75 70800608 jam lock_otp ,core_misc_ctrl 
+5b76 7920002b set1 mark_otp_encrypt ,mark 
+5b77 18007004 force regidx_key ,regext_index 
+5b78 20406dcc call aes_clear 
+5b79 18007004 force regidx_key ,regext_index 
+5b7a 6de20a3d fetchr regext ,4 ,mem_tmp_buffer + efuse_offset_key_addr 
+5b7b 78347c00 enable user 
+
+loadcode_efuse:
+5b7c 6fe20a01 fetch 4 ,mem_tmp_buffer 
+5b7d 203a5b81 branch loadcode_iic ,blank 
+5b7e 67e1c4cc store 3 ,mem_efuse_header 
+5b7f 20405c49 call app_lpm_peripheral_lock_check 
+5b80 20405b46 call load_storage_efuse 
+
+loadcode_iic:
+5b81 7041e300 jam 0 ,mem_loadcode_times 
+
+loadcode_iic_2:
+5b82 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5b83 c2815b9c bbit1 ucode_flag_skip_eep ,loadcode_spi 
+5b84 20405be0 call loadcode_check_times 
+5b85 20405b94 call iicd_load_gpio_init 
+5b86 20405dbf call clear_eeprom_size_2k 
+5b87 20405bda call loadcode_iic_by_eeprom 
+5b88 2436db8c nbranch loadcode_iic_eeprom_2k ,match 
+5b89 6fe082e1 fetch 1 ,mem_ucode_status 
+5b8a c3005b82 bbit0 0 ,loadcode_iic_2 
+5b8b 20205baa branch loadcode_hci 
+
+loadcode_iic_eeprom_2k:
+5b8c 20405dbc call set_eeprom_size_2k 
+5b8d 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5b8e c2815b9c bbit1 ucode_flag_skip_eep ,loadcode_spi 
+5b8f 20405bda call loadcode_iic_by_eeprom 
+5b90 2436db9c nbranch loadcode_spi ,match 
+5b91 6fe082e1 fetch 1 ,mem_ucode_status 
+5b92 c3005b82 bbit0 0 ,loadcode_iic_2 
+5b93 20205baa branch loadcode_hci 
+
+iicd_load_gpio_init:
+5b94 6fe0c4c3 fetch 1 ,mem_eeprom_sda_gpio 
+5b95 6848c4c2 fetcht 1 ,mem_eeprom_scl_gpio 
+5b96 98467c00 isub temp ,null 
+5b97 2422dda5 nbranch iicd_read_init_pin ,zero 
+
+iicd_load_default_gpio:
+5b98 7044c102 jam 2 ,mem_eeprom_wp_gpio 
+5b99 7044c201 jam 1 ,mem_eeprom_scl_gpio 
+5b9a 7044c300 jam 0 ,mem_eeprom_sda_gpio 
+5b9b 20205da5 branch iicd_read_init_pin 
+
+loadcode_spi:
+5b9c 7041e300 jam 0 ,mem_loadcode_times 
+
+loadcode_spi_loop:
+5b9d 20405be0 call loadcode_check_times 
+5b9e 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5b9f c280dbaa bbit1 ucode_flag_skip_flash ,loadcode_hci 
+5ba0 20405d10 call spid_init_flash 
+5ba1 200000c8 nop 200 
+5ba2 20405d1e call spid_flash_release_form_powerdown 
+5ba3 20000064 nop 100 
+5ba4 da605d52 arg spid_load_flash ,regc 
+5ba5 20405b24 call read_first_block 
+5ba6 20405b35 call load_storage 
+5ba7 2436dbaa nbranch loadcode_hci ,match 
+5ba8 6fe082e1 fetch 1 ,mem_ucode_status 
+5ba9 c3005b9d bbit0 0 ,loadcode_spi_loop 
+
+loadcode_hci:
+5baa 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5bab c3005bae bbit0 ucode_flag_hci ,clear_key_buf 
+5bac 20405bae call clear_key_buf 
+5bad 20204cba branch hci_init 
+
+clear_key_buf:
+5bae 58000000 setarg 0 
+5baf 67e20a3d store 4 ,mem_tmp_buffer + efuse_offset_key_addr 
+5bb0 18007004 force regidx_key ,regext_index 
+5bb1 20406dcc call aes_clear 
+5bb2 70805021 jam 0x21 ,core_clkoff 
+5bb3 20600000 rtn 
+
+loadcode_efuse_check_xor:
+5bb4 1ff18400 rshift4 pdata ,temp 
+5bb5 1fe17e0f and pdata ,0x0f ,pdata 
+5bb6 9842fe00 ixor temp ,pdata 
+5bb7 20600000 rtn 
+
+loadcode_efuse_check:
+5bb8 6fe20a01 fetch 4 ,mem_tmp_buffer 
+5bb9 207a0000 rtn blank 
+5bba 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5bbb 20405bb4 call loadcode_efuse_check_xor 
+5bbc c087dbe6 bne 0x0f ,loadcode_error 
+5bbd 6fe08a02 fetch 1 ,mem_tmp_buffer + efuse_offset_device_lock 
+5bbe 20405bb4 call loadcode_efuse_check_xor 
+5bbf c087dbe6 bne 0x0f ,loadcode_error 
+
+loadcode_efuse_check_sum:
+5bc0 6fe08a01 fetch 1 ,mem_tmp_buffer 
+5bc1 e8408006 ifetcht 1 ,contr 
+5bc2 9840fe00 iadd temp ,pdata 
+5bc3 e8408006 ifetcht 1 ,contr 
+5bc4 9840fe00 iadd temp ,pdata 
+5bc5 e8408006 ifetcht 1 ,contr 
+5bc6 9840a200 iadd temp ,rega 
+5bc7 dfe00a01 arg mem_tmp_buffer ,pdata 
+5bc8 98408c00 iadd temp ,contr 
+5bc9 1a227e00 copy rega ,pdata 
+5bca ef208006 ifetchr loopcnt ,1 ,contr 
+5bcb 9f20fe00 iadd loopcnt ,pdata 
+5bcc 20407e62 call cal_sum 
+5bcd 20405bd3 call loadcode_efuse_check_sum_loop 
+5bce e8408006 ifetcht 1 ,contr 
+5bcf 1fe17eff and pdata ,0xff ,pdata 
+5bd0 98467c00 isub temp ,null 
+5bd1 2422dbe6 nbranch loadcode_error ,zero 
+5bd2 20600000 rtn 
+
+loadcode_efuse_check_sum_loop:
+5bd3 ef208006 ifetchr loopcnt ,1 ,contr 
+5bd4 1f267c00 sub loopcnt ,0 ,null 
+5bd5 20628000 rtn zero 
+5bd6 9f20fe00 iadd loopcnt ,pdata 
+5bd7 1f20f202 increase 2 ,loopcnt 
+5bd8 20407e62 call cal_sum 
+5bd9 20205bd3 branch loadcode_efuse_check_sum_loop 
+
+loadcode_iic_by_eeprom:
+5bda 58000000 setarg 0x0 
+5bdb 67e102e4 store 2 ,mem_addr_mi 
+5bdc da605de2 arg iicd_read_eep ,regc 
+5bdd 20405d8e call iic_init_600khz 
+5bde 20405b24 call read_first_block 
+5bdf 20205b35 branch load_storage 
+
+loadcode_check_times:
+5be0 6fe0c1e3 fetch 1 ,mem_loadcode_times 
+5be1 1fe0fe01 increase 1 ,pdata 
+5be2 1fe67c03 sub pdata ,3 ,null 
+5be3 24215be6 nbranch loadcode_error ,positive 
+5be4 67e0c1e3 store 1 ,mem_loadcode_times 
+5be5 20600000 rtn 
+
+loadcode_error:
+5be6 20205c94 branch app_lpm_mpu_lock_br_ble 
+
+set_ucode_status:
+5be7 6fe082e1 fetch 1 ,mem_ucode_status 
+5be8 1fe3fe00 lshift pdata ,pdata 
+5be9 7920fe00 setflag true ,0 ,pdata 
+5bea 2a2c000f isolate0 15 ,rega 
+5beb 20608000 rtn true 
+5bec 67e082e1 store 1 ,mem_ucode_status 
+5bed 20600000 rtn 
+
+decrypt_code:
+5bee 6ff08085 fetch 1 ,core_aes_en 
+5bef c4008000 rtnbit0 1 
+5bf0 20205bf4 branch decrypt_code_skip 
+
+decrypt_code_loop:
+5bf1 6ff0812c fetch 1 ,core_dma_status 
+5bf2 afefffff qisolate1 pdata 
+5bf3 20608000 rtn true 
+
+decrypt_code_skip:
+5bf4 6ff08108 fetch 1 ,core_misc_status 
+5bf5 c300dbf1 bbit0 1 ,decrypt_code_loop 
+5bf6 20406d5c call do_aes_cbc 
+5bf7 20205bf1 branch decrypt_code_loop 
+
+save_ucode:
+5bf8 1f220400 copy loopcnt ,temp 
+5bf9 604941a8 storet 2 ,mem_patch_len 
+5bfa 70802380 jam 0x80 ,core_ucode_ctrl 
+5bfb 70802200 jam 0 ,core_ucode_hi 
+5bfc 70802400 jam 0 ,core_ucode_low 
+5bfd 67e141a6 store 2 ,mem_patch_ptr 
+5bfe 98000a00 iforce contw 
+5bff 1f2bf200 lshift2 loopcnt ,loopcnt 
+
+save_ucode_loop:
+5c00 6ff08025 fetch 1 ,core_ucode_data 
+5c01 e7e08005 istore 1 ,contw 
+5c02 c2005c00 loop save_ucode_loop 
+5c03 70802300 jam 0x0 ,core_ucode_ctrl 
+5c04 20600000 rtn 
+
+load_ucode:
+5c05 6fe141a6 fetch 2 ,mem_patch_ptr 
+5c06 207a0000 rtn blank 
+5c07 70802380 jam 0x80 ,core_ucode_ctrl 
+5c08 70802200 jam 0 ,core_ucode_hi 
+5c09 70802400 jam 0 ,core_ucode_low 
+5c0a 684941a8 fetcht 2 ,mem_patch_len 
+5c0b 184bf200 lshift2 temp ,loopcnt 
+5c0c 98000c00 iforce contr 
+
+load_ucode_loop:
+5c0d efe08006 ifetch 1 ,contr 
+5c0e 67f08025 store 1 ,core_ucode_data 
+5c0f c2005c0d loop load_ucode_loop 
+5c10 70802300 jam 0x0 ,core_ucode_ctrl 
+5c11 20600000 rtn 
+
+app_read_efuse_app_vsel:
+5c12 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_app_vsel 
+5c13 c28315a9 bbit1 6 ,lpm_write_sel_vdd5v 
+5c14 202015a2 branch lpm_write_sel_vdd3v3 
+
+app_read_efuse_sys_config:
+5c15 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_device_option 
+5c16 1fe17e0f and_into 0x0f ,pdata 
+5c17 207a0000 rtn blank 
+5c18 67e0c09a store 1 ,mem_device_option 
+5c19 6fe08a2d fetch 1 ,mem_tmp_buffer + efuse_offset_xtal_offset 
+5c1a 67e0c17b store 1 ,mem_lpm_ctrim 
+5c1b 6fe08a2e fetch 1 ,mem_tmp_buffer + efuse_offset_xtal_cnt 
+5c1c 67e0c17d store 1 ,mem_lpm_xtalcnt 
+5c1d 20600000 rtn 
+
+app_read_efuse_dig_aon_vsel:
+5c1e 6fe08a2c fetch 1 ,mem_tmp_buffer + efuse_offset_dig_aon_vsel 
+5c1f 1fe17e30 and_into 0x30 ,pdata 
+5c20 1ff1fe00 rshift4 pdata ,pdata 
+5c21 207a0000 rtn blank 
+5c22 67e0c4d0 store 1 ,mem_dig_aon_vsel 
+5c23 20600000 rtn 
+
+app_read_efuse_syn_afc_cfg1:
+5c24 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_tx_vco_current 
+5c25 1fe17e0f and_into 0x0f ,pdata 
+5c26 207a0000 rtn blank 
+5c27 67e0c4d1 store 1 ,mem_syn_afc_cfg1 
+5c28 20600000 rtn 
+
+app_read_efuse_rf_ldo_cfg1:
+5c29 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_ldo_cfg1 
+5c2a 1fe17e30 and_into 0x30 ,pdata 
+5c2b 1ff1fe00 rshift4 pdata ,pdata 
+5c2c 207a0000 rtn blank 
+5c2d 67e0c4d2 store 1 ,mem_rf_ldo_cfg1 
+5c2e 20600000 rtn 
+
+app_read_efuse_rc_cal:
+5c2f 6fe08a33 fetch 1 ,mem_tmp_buffer + efuse_offset_rc_cal 
+5c30 207a0000 rtn blank 
+5c31 67e0c4d3 store 1 ,mem_rc_cal 
+5c32 20600000 rtn 
+
+app_read_efuse_agc:
+5c33 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_agc_sel 
+5c34 c283dc3c bbit1 7 ,app_disable_soft_agc 
+5c35 7041eb88 jam 0x88 ,mem_gain_table 
+5c36 7041ec66 jam 0x66 ,mem_gain_table + 1 
+5c37 7041ed44 jam 0x44 ,mem_gain_table + 2 
+5c38 6fe10a2f fetch 2 ,mem_tmp_buffer + efuse_offset_agc_table 
+5c39 207a0000 rtn blank 
+5c3a 67e141ec store 2 ,mem_gain_table + 1 
+5c3b 20600000 rtn 
+
+app_disable_soft_agc:
+5c3c 7041eaff jam 0xff ,mem_gain_fix 
+5c3d 6fe08a32 fetch 1 ,mem_tmp_buffer + efuse_offset_agc_sec_en 
+5c3e 1fe17e40 and_into 0x40 ,pdata 
+5c3f 1fe97e00 rshift3 pdata ,pdata 
+5c40 67e0c1ee store 1 ,mem_gain_second_agc_en 
+5c41 20600000 rtn 
+
+app_lpm_efuse_lock_prep:
+5c42 70800273 jam 0x73 ,0x8002 
+5c43 37d98200 until null ,lpo_edge 
+5c44 37d98200 until null ,lpo_edge 
+5c45 6ff10120 fetch 2 ,core_ucode_flag 
+5c46 793ffe0d set0 13 ,pdata 
+5c47 67f1004c store 2 ,core_lpm_reg 
+5c48 20205caf branch lpm_write2_ctrl_option 
+
+app_lpm_peripheral_lock_check:
+5c49 6fe08a02 fetch 1 ,mem_tmp_buffer + efuse_offset_device_lock 
+5c4a 1fe17e0f and pdata ,0x0f ,pdata 
+5c4b c0055c57 beq dvc_op_module ,app_lpm_peripheral_lock_module 
+5c4c c000dc57 beq dvc_op_hci ,app_lpm_peripheral_lock_hci 
+5c4d c0025c5a beq dvc_op_dongle ,app_lpm_peripheral_lock_dongle 
+5c4e c002dc5f beq dvc_op_test ,app_lpm_peripheral_lock_test 
+5c4f c0045c61 beq dvc_op_mouse ,app_lpm_peripheral_lock_mouse 
+5c50 c004dc66 beq dvc_op_shutter ,app_lpm_peripheral_lock_shutter 
+5c51 c005dc6b beq dvc_op_ali_mesh ,app_lpm_peripheral_lock_mesh 
+5c52 c0065c57 beq dvc_op_hci_boot ,app_lpm_peripheral_lock_hciboot 
+5c53 c006dc6e beq dvc_op_remote_car ,app_lpm_peripheral_lock_remote_car 
+5c54 c0075c73 beq dvc_op_car ,app_lpm_peripheral_lock_car 
+5c55 c007dc78 beq dvc_op_antilost ,app_lpm_peripheral_lock_antilost 
+5c56 20600000 rtn 
+
+app_lpm_peripheral_lock_module:
+
+app_lpm_peripheral_lock_hci:
+
+app_lpm_peripheral_lock_hciboot:
+5c57 20405c42 call app_lpm_efuse_lock_prep 
+5c58 20405c7d call app_lpm_mpu_lock_mesh 
+5c59 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_dongle:
+5c5a 20405c42 call app_lpm_efuse_lock_prep 
+5c5b dfe03764 arg module_init ,pdata 
+5c5c d8404c03 arg ui_soft_switch_power_off ,temp 
+5c5d 20405c83 call app_mpu_s0_lock 
+5c5e 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_test:
+5c5f 20405c42 call app_lpm_efuse_lock_prep 
+5c60 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_mouse:
+5c61 20405c42 call app_lpm_efuse_lock_prep 
+5c62 dfe03247 arg antilost_init ,pdata 
+5c63 d8403bbd arg module_set_state ,temp 
+5c64 20405c83 call app_mpu_s0_lock 
+5c65 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_shutter:
+5c66 20405c42 call app_lpm_efuse_lock_prep 
+5c67 dfe03247 arg antilost_init ,pdata 
+5c68 d8404a8e arg remote_car_moto_data_enable_user ,temp 
+5c69 20405c83 call app_mpu_s0_lock 
+5c6a 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_mesh:
+5c6b 20405c42 call app_lpm_efuse_lock_prep 
+5c6c 20405c86 call app_lpm_mpu_lock_app 
+5c6d 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_remote_car:
+5c6e 20405c42 call app_lpm_efuse_lock_prep 
+5c6f dfe03247 arg antilost_init ,pdata 
+5c70 d84049a2 arg mouse_low_voltage_led_no_enter_lpm_blink ,temp 
+5c71 20405c83 call app_mpu_s0_lock 
+5c72 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_car:
+5c73 20405c42 call app_lpm_efuse_lock_prep 
+5c74 dfe03620 arg dongle_init ,pdata 
+5c75 d8404c03 arg ui_soft_switch_power_off ,temp 
+5c76 20405c83 call app_mpu_s0_lock 
+5c77 20205c9e branch lpm_write_lock 
+
+app_lpm_peripheral_lock_antilost:
+5c78 20405c42 call app_lpm_efuse_lock_prep 
+5c79 dfe033e2 arg car_init ,pdata 
+5c7a d8404c03 arg ui_soft_switch_power_off ,temp 
+5c7b 20405c83 call app_mpu_s0_lock 
+5c7c 20205c9e branch lpm_write_lock 
+
+app_lpm_mpu_lock_mesh:
+5c7d dfe0272e arg ali_mesh_access_layer_resolve_message ,pdata 
+5c7e d84030d7 arg ali_mesh_upper_transport_layer_clear_tx_buffer ,temp 
+5c7f 20205c83 branch app_mpu_s0_lock 
+
+app_lpm_mpu_lock_module:
+5c80 20405c42 call app_lpm_efuse_lock_prep 
+5c81 dfe03764 arg module_init ,pdata 
+5c82 d8403bbd arg module_set_state ,temp 
+
+app_mpu_s0_lock:
+5c83 67f10013 store 2 ,core_mpu_s0_saddr 
+5c84 60590015 storet 2 ,core_mpu_s0_eaddr 
+5c85 20600000 rtn 
+
+app_lpm_mpu_lock_app:
+5c86 dfe03247 arg antilost_init ,pdata 
+5c87 d8404c03 arg ui_soft_switch_power_off ,temp 
+5c88 20205c83 branch app_mpu_s0_lock 
+
+app_lpm_mpu_lock_br:
+5c89 dfe05394 arg parse_lmp ,pdata 
+5c8a d8405aeb arg remote_auth ,temp 
+5c8b 20205c8e branch app_mpu_s1_lock 
+
+app_lpm_mpu_lock_ble:
+5c8c dfe01cd1 arg le_parse_att ,pdata 
+5c8d d84021cf arg le_send_ll_one_lenth ,temp 
+
+app_mpu_s1_lock:
+5c8e 67f10017 store 2 ,core_mpu_s1_saddr 
+5c8f 60590019 storet 2 ,core_mpu_s1_eaddr 
+5c90 20600000 rtn 
+
+app_lpm_mpu_lock_24g:
+5c91 dfe021d5 arg g24_prep ,pdata 
+5c92 d840272c arg power_ctrl_pac_succ_cnt_reinit ,temp 
+5c93 20205c8e branch app_mpu_s1_lock 
+
+app_lpm_mpu_lock_br_ble:
+5c94 20405c89 call app_lpm_mpu_lock_br 
+5c95 dfe01cd1 arg le_parse_att ,pdata 
+5c96 d84021cf arg le_send_ll_one_lenth ,temp 
+5c97 20205c83 branch app_mpu_s0_lock 
+
+app_lpm_mpu_mode_lock:
+5c98 6fe08a03 fetch 1 ,mem_tmp_buffer + efuse_offset_peripherals_lock 
+5c99 1fe17ec0 and pdata ,0xc0 ,pdata 
+5c9a c0605c94 beq 0xc0 ,app_lpm_mpu_lock_br_ble 
+5c9b c2835c8c bbit1 efuse_le_lock_bit ,app_lpm_mpu_lock_ble 
+5c9c c283dc89 bbit1 efuse_br_lock_bit ,app_lpm_mpu_lock_br 
+5c9d 20600000 rtn 
+
+lpm_write_lock:
+5c9e 20405c98 call app_lpm_mpu_mode_lock 
+5c9f 6fe08a03 fetch 1 ,mem_tmp_buffer + efuse_offset_peripherals_lock 
+5ca0 1fe1221f and pdata ,0x1f ,rega 
+5ca1 6fe08a01 fetch 1 ,mem_tmp_buffer + efuse_offset_ucode 
+5ca2 1fe17e0f and pdata ,0x0f ,pdata 
+5ca3 68488a02 fetcht 1 ,mem_tmp_buffer + efuse_offset_device_lock 
+5ca4 1841040f and temp ,0x0f ,temp 
+5ca5 18520400 lshift4 temp ,temp 
+5ca6 9841fe00 ior temp ,pdata 
+5ca7 1a2d2200 lshift8 rega ,rega 
+5ca8 9a21fe00 ior rega ,pdata 
+5ca9 79207e0d set1 lpmreg_rom_lock_bit ,pdata 
+5caa 79207e0e set1 lpmreg_ice_mode_bit ,pdata 
+5cab 67f2004c store 4 ,core_lpm_reg 
+5cac 20405caf call lpm_write2_ctrl_option 
+5cad 70801108 jam 8 ,core_encrypt 
+5cae 20600000 rtn 
+
+lpm_write2_ctrl_option:
+5caf 58000002 setarg lpmreg_sel_option 
+
+lpm_write2:
+5cb0 37d98200 until null ,lpo_edge 
+5cb1 67f08012 store 1 ,core_lpm_wr2 
+5cb2 37d98200 until null ,lpo_edge 
+5cb3 37d98200 until null ,lpo_edge 
+5cb4 20600000 rtn 
+
+spid_init:
+5cb5 4710c024 bpatchx patch24_1 ,mem_patch24 
+
+spid_init_common:
+5cb6 6fe0c484 fetch 1 ,mem_spi_init_clk 
+5cb7 67f08086 store 1 ,core_spid_ctrl 
+5cb8 6fe0c485 fetch 1 ,mem_spi_init_delay_time 
+5cb9 67f08087 store 1 ,core_spid_delay 
+5cba 580002e2 setarg mem_spid_tbuf 
+5cbb 67f1008a store 2 ,core_spid_txaddr 
+5cbc 580002e7 setarg mem_spid_rbuf 
+5cbd 67f1008c store 2 ,core_spid_rxaddr 
+5cbe 20205b04 branch twspi_disable 
+
+spid_write_reg:
+5cbf 79207e07 set1 7 ,pdata 
+5cc0 67e102e2 store 2 ,mem_spid_tbuf 
+5cc1 47114024 bpatchx patch24_2 ,mem_patch24 
+5cc2 70808802 jam 2 ,core_spid_txlen 
+5cc3 70808e00 jam 0 ,core_spid_rxlen 
+5cc4 70800602 jam spid_start ,core_misc_ctrl 
+5cc5 20205ccf branch wait_spid_done 
+
+spid_read_reg:
+5cc6 18000401 force 1 ,temp 
+
+spid_read_regs:
+5cc7 67e082e2 store 1 ,mem_spid_tbuf 
+5cc8 4711c024 bpatchx patch24_3 ,mem_patch24 
+5cc9 70808801 jam 1 ,core_spid_txlen 
+5cca 6059008e storet 2 ,core_spid_rxlen 
+5ccb 70800602 jam spid_start ,core_misc_ctrl 
+5ccc 20405ccf call wait_spid_done 
+5ccd 6fe082e7 fetch 1 ,mem_spid_rbuf 
+5cce 20600000 rtn 
+
+wait_spid_done:
+5ccf 6fe140dd fetch 2 ,mem_afh_error_total 
+5cd0 1fe0fe01 increase 1 ,pdata 
+5cd1 67e140dd store 2 ,mem_afh_error_total 
+5cd2 6ff0812c fetch 1 ,core_dma_status 
+5cd3 c301dccf bbit0 spid_done ,wait_spid_done 
+5cd4 20600000 rtn 
+
+flash_write:
+5cd5 78547c00 disable user 
+5cd6 1fe22400 copy pdata ,regb 
+5cd7 6fe0c4ac fetch 1 ,mem_spi_write_flash_sm 
+5cd8 c1800000 rtnne flash_sm_no_buys 
+5cd9 78347c00 enable user 
+5cda 1a427e00 copy regb ,pdata 
+5cdb 20205ce3 branch spid_flash_write_start 
+
+flash_write_spi_sm_timer:
+5cdc 6fe0c4ac fetch 1 ,mem_spi_write_flash_sm 
+5cdd c000dce3 beq flash_sm_start ,spid_flash_write_start 
+5cde c0015ce9 beq flash_sm_erase_sector ,spid_flash_erase_sector 
+5cdf c001dcf1 beq flash_sm_wait_erase_sector ,spid_flash_wait_erase_sector 
+5ce0 c0025cf5 beq flash_sm_write_data ,spid_flash_write_data 
+5ce1 c002dcfb beq flash_sm_wait_write_data ,spid_flash_wait_write_data 
+5ce2 20600000 rtn 
+
+spid_flash_write_start:
+5ce3 67e1c4a5 store 3 ,mem_spi_write_addr 
+5ce4 1a227e00 copy rega ,pdata 
+5ce5 67e144a8 store 2 ,mem_spi_write_ptr 
+5ce6 604944aa storet 2 ,mem_spi_write_len 
+5ce7 7044ac02 jam flash_sm_erase_sector ,mem_spi_write_flash_sm 
+5ce8 20205d10 branch spid_init_flash 
+
+spid_flash_erase_sector:
+5ce9 20405d10 call spid_init_flash 
+5cea 7044ac03 jam flash_sm_wait_erase_sector ,mem_spi_write_flash_sm 
+5ceb 20405d15 call spid_unlock_flash 
+5cec da2002e2 arg mem_spid_tbuf ,rega 
+5ced 70808804 jam 4 ,core_spid_txlen 
+5cee 6fe1c4a5 fetch 3 ,mem_spi_write_addr 
+5cef d8400020 arg flash_command_sector_erase ,temp 
+5cf0 20205d26 branch spid_write_flash_common 
+
+spid_flash_wait_erase_sector:
+5cf1 20405d10 call spid_init_flash 
+5cf2 20405d49 call wait_spid_flash_done 
+5cf3 7044ac04 jam flash_sm_write_data ,mem_spi_write_flash_sm 
+5cf4 20600000 rtn 
+
+spid_flash_write_data:
+5cf5 20405d10 call spid_init_flash 
+5cf6 7044ac05 jam flash_sm_wait_write_data ,mem_spi_write_flash_sm 
+5cf7 20405d15 call spid_unlock_flash 
+5cf8 20405d08 call spid_flash_data_preserve 
+5cf9 20405d22 call spid_write_flash 
+5cfa 20205d03 branch spid_flash_data_recover 
+
+spid_flash_wait_write_data:
+5cfb 20405d10 call spid_init_flash 
+5cfc 20405d15 call spid_unlock_flash 
+5cfd 58000005 setarg flash_read_satus 
+5cfe 20405cc6 call spid_read_reg 
+5cff c3800000 rtnbit1 flash_status_wip 
+5d00 7044ac00 jam flash_sm_no_buys ,mem_spi_write_flash_sm 
+5d01 6fe14473 fetch 2 ,mem_cb_spi_flash_write_complate 
+5d02 20207e05 branch callback_func 
+
+spid_flash_data_recover:
+5d03 6fe20964 fetch 4 ,mem_temp 
+5d04 684944a8 fetcht 2 ,mem_spi_write_ptr 
+
+spid_flash_data_recover_comm:
+5d05 184085fc increase -4 ,temp 
+5d06 e7e20002 istore 4 ,temp 
+5d07 20600000 rtn 
+
+spid_flash_data_preserve:
+5d08 684944a8 fetcht 2 ,mem_spi_write_ptr 
+5d09 18422200 copy temp ,rega 
+5d0a 184085fc increase -4 ,temp 
+5d0b efe20002 ifetch 4 ,temp 
+5d0c 67e20964 store 4 ,mem_temp 
+5d0d 684944aa fetcht 2 ,mem_spi_write_len 
+5d0e 6fe1c4a5 fetch 3 ,mem_spi_write_addr 
+5d0f 20600000 rtn 
+
+spid_init_flash:
+5d10 20405d74 call spi_gpio_init 
+5d11 20405b04 call twspi_disable 
+5d12 58000000 setarg 0 
+5d13 67e202e2 store 4 ,mem_spid_tbuf 
+5d14 20600000 rtn 
+
+spid_unlock_flash:
+5d15 7002e206 jam flash_command_write_enable ,mem_spid_tbuf 
+
+spid_sendcmd_common:
+5d16 58000000 setarg 0 
+5d17 67f1008e store 2 ,core_spid_rxlen 
+5d18 58000001 setarg 1 
+5d19 67f10088 store 2 ,core_spid_txlen 
+5d1a 580002e2 setarg mem_spid_tbuf 
+5d1b 67f1008a store 2 ,core_spid_txaddr 
+5d1c 70800602 jam spid_start ,core_misc_ctrl 
+5d1d 20205ccf branch wait_spid_done 
+
+spid_flash_release_form_powerdown:
+5d1e 7002e2ab jam flash_command_release_from_powerdown ,mem_spid_tbuf 
+5d1f 20205d16 branch spid_sendcmd_common 
+
+spid_flash_powerdown:
+5d20 7002e2b9 jam flash_command_powerdown ,mem_spid_tbuf 
+5d21 20205d16 branch spid_sendcmd_common 
+
+spid_write_flash:
+5d22 18408404 increase 4 ,temp 
+5d23 60590088 storet 2 ,core_spid_txlen 
+5d24 d8400002 arg flash_command_write_data ,temp 
+5d25 1a20a3fc increase -4 ,rega 
+
+spid_write_flash_common:
+5d26 e0408011 istoret 1 ,rega 
+5d27 1ff10400 rshift16 pdata ,temp 
+5d28 e0408005 istoret 1 ,contw 
+5d29 1fec8400 rshift8 pdata ,temp 
+5d2a e0408005 istoret 1 ,contw 
+5d2b e7e08005 istore 1 ,contw 
+5d2c 1a227e00 deposit rega 
+5d2d 67f1008a store 2 ,core_spid_txaddr 
+5d2e 58000000 setarg 0 
+5d2f 67f1008e store 2 ,core_spid_rxlen 
+5d30 70800602 jam spid_start ,core_misc_ctrl 
+5d31 20405ccf call wait_spid_done 
+5d32 20205d49 branch wait_spid_flash_done 
+
+spid_read_flash:
+5d33 6059008e storet 2 ,core_spid_rxlen 
+5d34 1ff10400 rshift16 pdata ,temp 
+5d35 604882e3 storet 1 ,mem_addr_hi 
+5d36 1fec8400 rshift8 pdata ,temp 
+5d37 604882e4 storet 1 ,mem_addr_mi 
+5d38 67e082e5 store 1 ,mem_addr_lo 
+5d39 58000004 setarg 4 
+5d3a 67f10088 store 2 ,core_spid_txlen 
+5d3b 7002e203 jam flash_command_read_data ,mem_spid_tbuf 
+5d3c 580002e2 setarg mem_spid_tbuf 
+5d3d 67f1008a store 2 ,core_spid_txaddr 
+5d3e 1a227e00 deposit rega 
+5d3f 67f1008c store 2 ,core_spid_rxaddr 
+5d40 6ff08086 fetch 1 ,core_spid_ctrl 
+5d41 2a2c000f isolate0 15 ,rega 
+5d42 7920fe06 setflag true ,6 ,pdata 
+5d43 67f08086 store 1 ,core_spid_ctrl 
+5d44 70800602 jam spid_start ,core_misc_ctrl 
+
+spid_read_flash_wait:
+5d45 6ff0812c fetch 1 ,core_dma_status 
+5d46 c283dd45 bbit1 7 ,spid_read_flash_wait 
+5d47 d8e00003 arg spid_done ,queue 
+5d48 20205ccf branch wait_spid_done 
+
+wait_spid_flash_done:
+5d49 580007d0 setarg 2000 
+5d4a 2040137d call sleep 
+5d4b 20405d15 call spid_unlock_flash 
+5d4c 580002e7 setarg mem_spid_rbuf 
+5d4d 67f1008c store 2 ,core_spid_rxaddr 
+5d4e 58000005 setarg flash_read_satus 
+5d4f 20405cc6 call spid_read_reg 
+5d50 c2805d49 bbit1 flash_status_wip ,wait_spid_flash_done 
+5d51 20600000 rtn 
+
+spid_load_flash:
+5d52 6059008e storet 2 ,core_spid_rxlen 
+5d53 58000004 setarg 4 
+5d54 67f10088 store 2 ,core_spid_txlen 
+5d55 7002e203 jam 3 ,mem_spid_tbuf 
+5d56 580002e2 setarg mem_spid_tbuf 
+5d57 67f1008a store 2 ,core_spid_txaddr 
+5d58 1a227e00 deposit rega 
+5d59 67f1008c store 2 ,core_spid_rxaddr 
+5d5a 6ff08086 fetch 1 ,core_spid_ctrl 
+5d5b 2a2c000f isolate0 15 ,rega 
+5d5c 7920fe06 setflag true ,6 ,pdata 
+5d5d 67f08086 store 1 ,core_spid_ctrl 
+5d5e 70800602 jam spid_start ,core_misc_ctrl 
+
+spi_load_flash_wait:
+5d5f 6ff0812c fetch 1 ,core_dma_status 
+5d60 c283dd5f bbit1 7 ,spi_load_flash_wait 
+5d61 d8e00003 arg spid_done ,queue 
+5d62 20405bee call decrypt_code 
+5d63 20405ccf call wait_spid_done 
+5d64 2feffe02 isolate1 spid_crcok ,pdata 
+5d65 20405be7 call set_ucode_status 
+5d66 6fe082e3 fetch 1 ,mem_addr_hi 
+5d67 1ff02400 lshift16 pdata ,regb 
+5d68 6fe082e4 fetch 1 ,mem_addr_mi 
+5d69 1fed7e00 lshift8 pdata ,pdata 
+5d6a 9a41a400 ior regb ,regb 
+5d6b 6fe082e5 fetch 1 ,mem_addr_lo 
+5d6c 9a41fe00 ior regb ,pdata 
+5d6d 9840fe00 iadd temp ,pdata 
+5d6e 67e082e5 store 1 ,mem_addr_lo 
+5d6f 1fecfe00 rshift8 pdata ,pdata 
+5d70 67e082e4 store 1 ,mem_addr_mi 
+5d71 1fecfe00 rshift8 pdata ,pdata 
+5d72 67e082e3 store 1 ,mem_addr_hi 
+5d73 20600000 rtn 
+
+spi_gpio_init:
+5d74 6fe0c4b5 fetch 1 ,mem_spi_cs_gpio 
+5d75 6848c4b7 fetcht 1 ,mem_spi_so_gpio 
+5d76 98467c00 isub temp ,null 
+5d77 2422dd79 nbranch spi_pin_set ,zero 
+5d78 20405d85 call spi_gpio_default_init 
+
+spi_pin_set:
+5d79 6fe0c4b5 fetch 1 ,mem_spi_cs_gpio 
+5d7a d8400020 arg gpcfg_spid_ncs ,temp 
+5d7b 20406093 call gpio_config_function_int 
+5d7c 6fe0c4b8 fetch 1 ,mem_spi_sclk_gpio 
+5d7d d8400021 arg gpcfg_spid_sck ,temp 
+5d7e 20406093 call gpio_config_function_int 
+5d7f 6fe0c4b6 fetch 1 ,mem_spi_si_gpio 
+5d80 d8400022 arg gpcfg_spid_mosi ,temp 
+5d81 20406093 call gpio_config_function_int 
+5d82 6fe0c4b7 fetch 1 ,mem_spi_so_gpio 
+5d83 d840001f arg gpcfg_spid_miso ,temp 
+5d84 20206093 branch gpio_config_function_int 
+
+spi_gpio_default_init:
+5d85 7044b50e jam 14 ,mem_spi_cs_gpio 
+5d86 7044b60d jam 13 ,mem_spi_si_gpio 
+5d87 7044b710 jam 16 ,mem_spi_so_gpio 
+5d88 7044b80f jam 15 ,mem_spi_sclk_gpio 
+5d89 7044b911 jam 17 ,mem_spi_wp_gpio 
+5d8a 7044ba12 jam 18 ,mem_spi_hold_gpio 
+5d8b 20600000 rtn 
+
+soft_reset_chip:
+5d8c 70801001 jam 1 ,core_reset 
+5d8d 20600000 rtn 
+
+iic_init_600khz:
+5d8e 70809105 jam 5 ,core_iicd_scl_low 
+5d8f 70809207 jam 7 ,core_iicd_scl_high 
+5d90 70809307 jam 7 ,core_iicd_start_setup 
+5d91 70809407 jam 7 ,core_iicd_start_hold 
+5d92 70809507 jam 7 ,core_iicd_stop_setup 
+5d93 70809605 jam 5 ,core_iicd_data_setup 
+5d94 70809700 jam 0 ,core_iicd_data_hold 
+5d95 20600000 rtn 
+
+iic_init_360khz:
+5d96 7080910c jam 12 ,core_iicd_scl_low 
+5d97 7080920d jam 13 ,core_iicd_scl_high 
+5d98 7080930d jam 13 ,core_iicd_start_setup 
+5d99 7080940d jam 13 ,core_iicd_start_hold 
+5d9a 7080950d jam 13 ,core_iicd_stop_setup 
+5d9b 7080960c jam 12 ,core_iicd_data_setup 
+5d9c 70809700 jam 0 ,core_iicd_data_hold 
+5d9d 20600000 rtn 
+
+iicd_init_pin:
+5d9e 20405dd3 call iicd_eeprom_write_enable 
+
+iicd_init_pin_scl_sda:
+5d9f 6fe0c4c2 fetch 1 ,mem_eeprom_scl_gpio 
+5da0 d840006c arg gpcfg_iic_scl | gpcfg_pullup ,temp 
+5da1 20406093 call gpio_config_function_int 
+5da2 6fe0c4c3 fetch 1 ,mem_eeprom_sda_gpio 
+5da3 d840006d arg gpcfg_iic_sda | gpcfg_pullup ,temp 
+5da4 20206093 branch gpio_config_function_int 
+
+iicd_read_init_pin:
+5da5 20405dda call iicd_eeprom_write_disable 
+5da6 20205d9f branch iicd_init_pin_scl_sda 
+
+wait_iicd_done:
+5da7 6ff0812c fetch 1 ,core_dma_status 
+5da8 c302dda7 bbit0 iicd_done ,wait_iicd_done 
+5da9 20600000 rtn 
+
+iicd_read_data:
+5daa 67e082e6 store 1 ,mem_iicd_addr 
+5dab 580002e6 setarg mem_iicd_addr 
+5dac 67f1009a store 2 ,core_iicd_txaddr 
+5dad 58000001 setarg 1 
+5dae 67f10098 store 2 ,core_iicd_txlen 
+5daf 6059009e storet 2 ,core_iicd_rxlen 
+5db0 6231009c storer rega ,2 ,core_iicd_rxaddr 
+5db1 70809001 jam 1 ,core_iicd_ctrl 
+5db2 70800604 jam iicd_start ,core_misc_ctrl 
+5db3 20205da7 branch wait_iicd_done 
+
+iic_write_data:
+5db4 58000000 setarg 0 
+5db5 67f1009e store 2 ,core_iicd_rxlen 
+5db6 67f1009c store 2 ,core_iicd_rxaddr 
+5db7 60590098 storet 2 ,core_iicd_txlen 
+5db8 6231009a storer rega ,2 ,core_iicd_txaddr 
+5db9 70809001 jam 1 ,core_iicd_ctrl 
+5dba 70800604 jam iicd_start ,core_misc_ctrl 
+5dbb 20205da7 branch wait_iicd_done 
+
+set_eeprom_size_2k:
+5dbc 79200028 set1 mark_eeprom_size ,mark 
+5dbd 70448308 jam 0x08 ,mem_eeprom_block_size 
+5dbe 20600000 rtn 
+
+clear_eeprom_size_2k:
+5dbf 793f8028 set0 mark_eeprom_size ,mark 
+5dc0 70448320 jam 0x20 ,mem_eeprom_block_size 
+5dc1 20600000 rtn 
+
+iicd_read_eep_data_size_2k:
+5dc2 6fe0c479 fetch 1 ,mem_eeprom_base 
+5dc3 9a40fe00 iadd regb ,pdata 
+5dc4 67e082e4 store 1 ,mem_addr_mi 
+5dc5 20205dc9 branch iicd_read_eep_size_2k 
+
+iicd_read_eep_size_2k_lcadcode:
+5dc6 6fe102e4 fetch 2 ,mem_addr_mi 
+5dc7 1ff0fe00 byteswap pdata ,pdata 
+5dc8 67e082e4 store 1 ,mem_addr_mi 
+
+iicd_read_eep_size_2k:
+5dc9 58000003 setarg 3 
+5dca 67f10098 store 2 ,core_iicd_txlen 
+5dcb 7002e3a0 jam 0xa0 ,mem_iicd_tbuf 
+5dcc 7002e5a1 jam 0xa1 ,mem_iicd_tbuf + 2 
+5dcd 20205de8 branch iicd_read_eep_common 
+
+iicd_write_protect_eep_data:
+5dce 60490964 storet 2 ,mem_temp 
+5dcf 20405dd3 call iicd_eeprom_write_enable 
+5dd0 68490964 fetcht 2 ,mem_temp 
+5dd1 20405e02 call iicd_write_eep_data 
+5dd2 20205dda branch iicd_eeprom_write_disable 
+
+iicd_eeprom_write_enable:
+5dd3 6fe0c4c1 fetch 1 ,mem_eeprom_wp_gpio 
+5dd4 c17f8000 rtneq gpio_disable 
+5dd5 c3035dd8 bbit0 6 ,iicd_wp_gpio_output_low 
+5dd6 580249f0 setarg 150000 
+5dd7 2040137d call sleep 
+
+iicd_wp_gpio_output_low:
+5dd8 6848c4c1 fetcht 1 ,mem_eeprom_wp_gpio 
+5dd9 20206069 branch gpio_out_active 
+
+iicd_eeprom_write_disable:
+5dda 6848c4c1 fetcht 1 ,mem_eeprom_wp_gpio 
+5ddb 20206065 branch gpio_out_inactive 
+
+iicd_read_eep_data:
+5ddc 47124024 bpatchx patch24_4 ,mem_patch24 
+5ddd c5145dc2 bmark1 mark_eeprom_size ,iicd_read_eep_data_size_2k 
+5dde 6fe14479 fetch 2 ,mem_eeprom_base 
+5ddf 9a40fe00 iadd regb ,pdata 
+5de0 1ff0fe00 byteswap pdata ,pdata 
+5de1 67e102e4 store 2 ,mem_addr_mi 
+
+iicd_read_eep:
+5de2 4712c024 bpatchx patch24_5 ,mem_patch24 
+5de3 c5145dc6 bmark1 mark_eeprom_size ,iicd_read_eep_size_2k_lcadcode 
+5de4 58000004 setarg 4 
+5de5 67f10098 store 2 ,core_iicd_txlen 
+5de6 7002e3a0 jam 0xa0 ,mem_iicd_tbuf 
+5de7 7002e6a1 jam 0xa1 ,mem_iicd_tbuf + 3 
+
+iicd_read_eep_common:
+5de8 580002e3 setarg mem_iicd_tbuf 
+5de9 67f1009a store 2 ,core_iicd_txaddr 
+5dea 6059009e storet 2 ,core_iicd_rxlen 
+5deb 6231009c storer rega ,2 ,core_iicd_rxaddr 
+5dec 58000002 setarg 2 
+5ded 2a2c000f isolate0 15 ,rega 
+5dee 7920fe00 setflag true ,0 ,pdata 
+5def 67f08090 store 1 ,core_iicd_ctrl 
+5df0 70800604 jam iicd_start ,core_misc_ctrl 
+5df1 d8e00005 arg iicd_done ,queue 
+5df2 20405bee call decrypt_code 
+5df3 20405da7 call wait_iicd_done 
+5df4 2feffe04 isolate1 iicd_crcok ,pdata 
+5df5 20405be7 call set_ucode_status 
+5df6 c5145dfd bmark1 mark_eeprom_size ,iicd_read_eep_load_code_size_2k 
+5df7 6fe102e4 fetch 2 ,mem_addr_mi 
+5df8 1ff0fe00 byteswap pdata ,pdata 
+5df9 9840fe00 iadd temp ,pdata 
+5dfa 1ff0fe00 byteswap pdata ,pdata 
+5dfb 67e102e4 store 2 ,mem_addr_mi 
+5dfc 20600000 rtn 
+
+iicd_read_eep_load_code_size_2k:
+5dfd 6fe082e4 fetch 1 ,mem_addr_mi 
+5dfe 9840fe00 iadd temp ,pdata 
+5dff 1ff0fe00 byteswap pdata ,pdata 
+5e00 67e102e4 store 2 ,mem_addr_mi 
+5e01 20600000 rtn 
+
+iicd_write_eep_data:
+5e02 6fe14479 fetch 2 ,mem_eeprom_base 
+5e03 9a40fe00 iadd regb ,pdata 
+
+iicd_write_ota_data:
+5e04 67e1095c store 2 ,mem_pdatatemp 
+5e05 47134024 bpatchx patch24_6 ,mem_patch24 
+5e06 60490964 storet 2 ,mem_temp 
+5e07 6221097b storer rega ,2 ,mem_contr 
+
+iicd_write_eep_loop:
+5e08 20405e17 call iicd_eep_transparency 
+5e09 68490974 fetcht 2 ,mem_regb 
+5e0a 6a21097b fetchr rega ,2 ,mem_contr 
+5e0b 6fe1095c fetch 2 ,mem_pdatatemp 
+5e0c 20405e38 call iicd_write_eep 
+5e0d 6fe10974 fetch 2 ,mem_regb 
+5e0e 6849097b fetcht 2 ,mem_contr 
+5e0f 98408400 iadd temp ,temp 
+5e10 6049097b storet 2 ,mem_contr 
+5e11 6849095c fetcht 2 ,mem_pdatatemp 
+5e12 98408400 iadd temp ,temp 
+5e13 6049095c storet 2 ,mem_pdatatemp 
+5e14 6fe10964 fetch 2 ,mem_temp 
+5e15 243a5e08 nbranch iicd_write_eep_loop ,blank 
+5e16 20600000 rtn 
+
+iicd_eep_transparency:
+5e17 4713c024 bpatchx patch24_7 ,mem_patch24 
+5e18 6fe0c483 fetch 1 ,mem_eeprom_block_size 
+5e19 1fe0ffff increase -1 ,pdata 
+5e1a 6849095c fetcht 2 ,mem_pdatatemp 
+5e1b 9841fe00 ior temp ,pdata 
+5e1c 1fe0fe01 increase 1 ,pdata 
+5e1d 67e18978 store 3 ,mem_regc 
+5e1e 6fe10964 fetch 2 ,mem_temp 
+5e1f 9840fe00 iadd temp ,pdata 
+5e20 68498978 fetcht 3 ,mem_regc 
+5e21 98467e00 isub temp ,pdata 
+5e22 24215e29 nbranch iicd_eep_deal_short_packet ,positive 
+5e23 67e10964 store 2 ,mem_temp 
+5e24 6fe18978 fetch 3 ,mem_regc 
+5e25 6849095c fetcht 2 ,mem_pdatatemp 
+5e26 98467e00 isub temp ,pdata 
+5e27 67e10974 store 2 ,mem_regb 
+5e28 20600000 rtn 
+
+iicd_eep_deal_short_packet:
+5e29 6fe10964 fetch 2 ,mem_temp 
+5e2a 67e10974 store 2 ,mem_regb 
+5e2b 58000000 setarg 0 
+5e2c 67e10964 store 2 ,mem_temp 
+5e2d 20600000 rtn 
+
+iicd_write_eep_size_2k:
+5e2e 1a427e00 copy regb ,pdata 
+5e2f 18408402 increase 2 ,temp 
+5e30 60590098 storet 2 ,core_iicd_txlen 
+5e31 1a20a3fe increase -2 ,rega 
+5e32 e8418011 ifetcht 3 ,rega 
+5e33 18422400 copy temp ,regb 
+5e34 d84000a0 arg 0xa0 ,temp 
+5e35 e0408011 istoret 1 ,rega 
+5e36 e7e08005 istore 1 ,contw 
+5e37 20205e45 branch iicd_write_eep_common 
+
+iicd_write_eep:
+5e38 1fe22400 copy pdata ,regb 
+5e39 47144025 bpatchx patch25_0 ,mem_patch25 
+5e3a c5145e2e bmark1 mark_eeprom_size ,iicd_write_eep_size_2k 
+5e3b 1a427e00 copy regb ,pdata 
+5e3c 18408403 increase 3 ,temp 
+5e3d 60590098 storet 2 ,core_iicd_txlen 
+5e3e 1a20a3fd increase -3 ,rega 
+5e3f e8418011 ifetcht 3 ,rega 
+5e40 18422400 copy temp ,regb 
+5e41 d84000a0 arg 0xa0 ,temp 
+5e42 e0408011 istoret 1 ,rega 
+5e43 1ff0fe00 byteswap pdata ,pdata 
+5e44 e7e10005 istore 2 ,contw 
+
+iicd_write_eep_common:
+5e45 6231009a storer rega ,2 ,core_iicd_txaddr 
+5e46 58000000 setarg 0 
+5e47 67f1009e store 2 ,core_iicd_rxlen 
+5e48 70809001 jam 1 ,core_iicd_ctrl 
+5e49 70800604 jam iicd_start ,core_misc_ctrl 
+5e4a 20405da7 call wait_iicd_done 
+5e4b e2418011 istorer regb ,3 ,rega 
+
+iic_check_eeprom_standby:
+5e4c 4714c025 bpatchx patch25_1 ,mem_patch25 
+5e4d 7002e600 jam 0 ,mem_iicd_tbuf + 3 
+
+iic_check_eeprom_standby_wait:
+5e4e 58000001 setarg 1 
+5e4f 67f10098 store 2 ,core_iicd_txlen 
+5e50 7002e3a0 jam 0xa0 ,mem_iicd_tbuf 
+5e51 580002e3 setarg mem_iicd_tbuf 
+5e52 67f1009a store 2 ,core_iicd_txaddr 
+5e53 58000000 setarg 0 
+5e54 67f1009e store 2 ,core_iicd_rxlen 
+5e55 67f1009c store 2 ,core_iicd_rxaddr 
+5e56 58000003 setarg 3 
+5e57 67f08090 store 1 ,core_iicd_ctrl 
+5e58 70800604 jam iicd_start ,core_misc_ctrl 
+5e59 20405da7 call wait_iicd_done 
+5e5a 6ff0812c fetch 1 ,core_dma_status 
+5e5b c4030000 rtnbit0 iicd_ack 
+5e5c 200005dc nop 1500 
+5e5d 6fe082e6 fetch 1 ,mem_iicd_tbuf + 3 
+5e5e 1fe0fe01 increase 1 ,pdata 
+5e5f 67e082e6 store 1 ,mem_iicd_tbuf + 3 
+5e60 1fe67c28 sub pdata ,40 ,null 
+5e61 24610000 nrtn positive 
+5e62 20205e4e branch iic_check_eeprom_standby_wait 
+
+efuse_read_data:
+5e63 18427200 copy temp ,loopcnt 
+5e64 1fe20400 copy pdata ,temp 
+5e65 47154025 bpatchx patch25_2 ,mem_patch25 
+5e66 18498400 lshift3 temp ,temp 
+5e67 20405e96 call efuse_vdd_on 
+5e68 70804780 jam 0x80 ,core_efuse_ctrl 
+
+efuse_read_loop:
+5e69 70804786 jam 0x86 ,core_efuse_ctrl 
+5e6a 60590045 storet 2 ,core_efuse_addr 
+5e6b 18408408 increase 8 ,temp 
+5e6c 70804787 jam 0x87 ,core_efuse_ctrl 
+5e6d 6ff08007 fetch 1 ,core_efuse_rdata 
+5e6e e7e08011 istore 1 ,rega 
+5e6f 1a20a201 increase 1 ,rega 
+5e70 c2005e69 loop efuse_read_loop 
+5e71 70804786 jam 0x86 ,core_efuse_ctrl 
+5e72 70804780 jam 0x80 ,core_efuse_ctrl 
+5e73 70804700 jam 0x0 ,core_efuse_ctrl 
+5e74 20205e9e branch efuse_vdd_off 
+
+efuse_program:
+5e75 20405e8e call efuse_vdd_fsource_on 
+5e76 70804780 jam 0x80 ,core_efuse_ctrl 
+5e77 18498400 lshift3 temp ,temp 
+5e78 1a220c00 copy rega ,contr 
+
+efuse_program_loop:
+5e79 efe08006 ifetch 1 ,contr 
+5e7a da400008 arg 8 ,regb 
+
+efuse_program_bit_loop:
+5e7b 1fe17c01 and pdata ,1 ,null 
+5e7c 2442deaa ncall efuse_program_bit ,zero 
+5e7d 1fe37e00 rshift pdata ,pdata 
+5e7e 18408401 increase 1 ,temp 
+5e7f 1a40a5ff increase -1 ,regb 
+5e80 2422de7b nbranch efuse_program_bit_loop ,zero 
+5e81 c2005e79 loop efuse_program_loop 
+5e82 70804780 jam 0x80 ,core_efuse_ctrl 
+5e83 70804700 jam 0x0 ,core_efuse_ctrl 
+5e84 20205e9e branch efuse_vdd_off 
+
+efuse_lna_pa_ldo_on:
+5e85 6ff08a0a fetch 1 ,core_rf_ldo_en0 
+5e86 79207e01 set1 1 ,pdata 
+5e87 67f08a0a store 1 ,core_rf_ldo_en0 
+5e88 200000c8 nop 200 
+5e89 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5e8a 79207e00 set1 0 ,pdata 
+5e8b 67f08a0b store 1 ,core_rf_ldo_en1 
+5e8c 200007d0 nop 2000 
+5e8d 20600000 rtn 
+
+efuse_vdd_fsource_on:
+5e8e 20405e85 call efuse_lna_pa_ldo_on 
+5e8f 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5e90 793ffe05 set0 5 ,pdata 
+5e91 79207e04 set1 4 ,pdata 
+5e92 79207e03 set1 3 ,pdata 
+5e93 67f08a0b store 1 ,core_rf_ldo_en1 
+5e94 200001f4 nop 500 
+5e95 20600000 rtn 
+
+efuse_vdd_on:
+5e96 20405e85 call efuse_lna_pa_ldo_on 
+5e97 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5e98 79207e05 set1 5 ,pdata 
+5e99 79207e04 set1 4 ,pdata 
+5e9a 793ffe03 set0 3 ,pdata 
+5e9b 67f08a0b store 1 ,core_rf_ldo_en1 
+5e9c 200001f4 nop 500 
+5e9d 20600000 rtn 
+
+efuse_vdd_off:
+5e9e 4715c025 bpatchx patch25_3 ,mem_patch25 
+5e9f 6ff08a0b fetch 1 ,core_rf_ldo_en1 
+5ea0 793ffe05 set0 5 ,pdata 
+5ea1 793ffe04 set0 4 ,pdata 
+5ea2 793ffe03 set0 3 ,pdata 
+5ea3 793ffe00 set0 0 ,pdata 
+5ea4 67f08a0b store 1 ,core_rf_ldo_en1 
+5ea5 200000c8 nop 200 
+5ea6 6ff08a0a fetch 1 ,core_rf_ldo_en0 
+5ea7 793ffe01 set0 1 ,pdata 
+5ea8 67f08a0a store 1 ,core_rf_ldo_en0 
+5ea9 20600000 rtn 
+
+efuse_program_bit:
+5eaa 70804780 jam 0x80 ,core_efuse_ctrl 
+5eab 2000000a nop 10 
+5eac 60590045 storet 2 ,core_efuse_addr 
+5ead 70804781 jam 0x81 ,core_efuse_ctrl 
+5eae 2000006e nop 110 
+5eaf 20600000 rtn 
+
+uarta_init_dma_mem:
+5eb0 20407e54 call enable_user 
+5eb1 20205eb4 branch uart_init_dma_mem 
+
+uartb_init_dma_mem:
+5eb2 20407e56 call disable_user 
+5eb3 20205eb4 branch uart_init_dma_mem 
+
+uart_init_dma_mem:
+5eb4 1ff10400 rshift16 pdata ,temp 
+5eb5 20545ee7 call uarta_init_rx ,user 
+5eb6 24545eeb ncall uartb_init_rx ,user 
+5eb7 1fef7e00 rshift32 pdata ,pdata 
+5eb8 1ff10400 rshift16 pdata ,temp 
+5eb9 20545edf call uarta_init_tx ,user 
+5eba 24545ee3 ncall uartb_init_tx ,user 
+5ebb 24345ec0 nbranch uartb_init_dma_turn_on_clk ,user 
+5ebc 6ff10050 fetch 2 ,core_clkoff 
+5ebd 793ffe0f set0 clock_off_uart ,pdata 
+5ebe 67f10050 store 2 ,core_clkoff 
+5ebf 20600000 rtn 
+
+uartb_init_dma_turn_on_clk:
+5ec0 6ff10050 fetch 2 ,core_clkoff 
+5ec1 793ffe0e set0 clock_off_uartb ,pdata 
+5ec2 67f10050 store 2 ,core_clkoff 
+5ec3 20600000 rtn 
+
+uarta_init_baud_rate:
+5ec4 67f10052 store uart_baud_len ,core_uart_baud 
+5ec5 20600000 rtn 
+
+uartb_init_baud_rate:
+5ec6 67f10062 store uart_baud_len ,core_uartb_baud 
+5ec7 20600000 rtn 
+
+uarta_calc_baud_rate_config:
+5ec8 20405ecc call uart_calc_baud_rate_config 
+5ec9 20205ec4 branch uarta_init_baud_rate 
+
+uartb_calc_baud_rate_config:
+5eca 20405ecc call uart_calc_baud_rate_config 
+5ecb 20205ec6 branch uartb_init_baud_rate 
+
+uart_calc_baud_rate_config:
+5ecc 20405ed1 call uart_calc_baud_rate_config_choice_uart_clock 
+5ecd 9846fc00 idiv temp 
+5ece 20407def call wait_div_end 
+5ecf 1807fe00 quotient pdata 
+5ed0 20600000 rtn 
+
+uart_calc_baud_rate_config_choice_uart_clock:
+5ed1 6ff08043 fetch 1 ,core_uart_clksel 
+5ed2 c3005ed5 bbit0 uart_clock_select_bit ,uart_calc_baud_rate_config_choice_uart_clock_crystal 
+5ed3 5adc6c00 setarg uart_clock_freq_48m 
+5ed4 20600000 rtn 
+
+uart_calc_baud_rate_config_choice_uart_clock_crystal:
+5ed5 596e3600 setarg uart_clock_freq_24m 
+5ed6 20600000 rtn 
+
+uart_clock_select_main_freq_crystal:
+5ed7 6ff08043 fetch 1 ,core_uart_clksel 
+5ed8 1fe17efe and pdata ,uart_clock_select_crystal ,pdata 
+5ed9 67f08043 store 1 ,core_uart_clksel 
+5eda 20600000 rtn 
+
+uart_clock_select_main_freq_dpll:
+5edb 6ff08043 fetch 1 ,core_uart_clksel 
+5edc 1fe1fe01 or pdata ,uart_clock_select_dpll ,pdata 
+5edd 67f08043 store 1 ,core_uart_clksel 
+5ede 20600000 rtn 
+
+uarta_init_tx:
+5edf 67f1005a store 2 ,core_uart_tsaddr 
+5ee0 67f1005e store 2 ,core_uart_twptr 
+5ee1 6059005c storet 2 ,core_uart_teaddr 
+5ee2 20600000 rtn 
+
+uartb_init_tx:
+5ee3 67f1006a store 2 ,core_uartb_tsaddr 
+5ee4 67f1006e store 2 ,core_uartb_twptr 
+5ee5 6059006c storet 2 ,core_uartb_teaddr 
+5ee6 20600000 rtn 
+
+uarta_init_rx:
+5ee7 67f10054 store 2 ,core_uart_rsaddr 
+5ee8 67f10058 store 2 ,core_uart_rrptr 
+5ee9 60590056 storet 2 ,core_uart_readdr 
+5eea 20600000 rtn 
+
+uartb_init_rx:
+5eeb 67f10064 store 2 ,core_uartb_rsaddr 
+5eec 67f10068 store 2 ,core_uartb_rrptr 
+5eed 60590066 storet 2 ,core_uartb_readdr 
+5eee 20600000 rtn 
+
+uarta_prepare_tx:
+5eef 6951005a fetchr contus ,2 ,core_uart_tsaddr 
+5ef0 6a11005c fetchr contue ,2 ,core_uart_teaddr 
+5ef1 6871005e fetchr contu ,2 ,core_uart_twptr 
+5ef2 20600000 rtn 
+
+uartb_prepare_tx:
+5ef3 6951006a fetchr contus ,2 ,core_uartb_tsaddr 
+5ef4 6a11006c fetchr contue ,2 ,core_uartb_teaddr 
+5ef5 6871006e fetchr contu ,2 ,core_uartb_twptr 
+5ef6 20600000 rtn 
+
+uarta_prepare_rx:
+5ef7 69510054 fetchr contus ,2 ,core_uart_rsaddr 
+5ef8 6a110056 fetchr contue ,2 ,core_uart_readdr 
+5ef9 68710058 fetchr contu ,2 ,core_uart_rrptr 
+5efa 20600000 rtn 
+
+uartb_prepare_rx:
+5efb 69510064 fetchr contus ,2 ,core_uartb_rsaddr 
+5efc 6a110066 fetchr contue ,2 ,core_uartb_readdr 
+5efd 68710068 fetchr contu ,2 ,core_uartb_rrptr 
+5efe 20600000 rtn 
+
+uarta_send:
+5eff 6071005e storer contu ,2 ,core_uart_twptr 
+5f00 20600000 rtn 
+
+uartb_send:
+5f01 6071006e storer contu ,2 ,core_uartb_twptr 
+5f02 20600000 rtn 
+
+uarta_rxdone:
+5f03 60710058 storer contu ,2 ,core_uart_rrptr 
+5f04 20600000 rtn 
+
+uartb_rxdone:
+5f05 60710068 storer contu ,2 ,core_uartb_rrptr 
+5f06 20600000 rtn 
+
+uarta_clear_current_rx:
+5f07 20405ef7 call uarta_prepare_rx 
+5f08 6ff10112 fetch 2 ,core_uart_rxitems 
+5f09 98608600 iadd contu ,contu 
+5f0a 20205f03 branch uarta_rxdone 
+
+uartb_clear_current_rx:
+5f0b 20405efb call uartb_prepare_rx 
+5f0c 6ff10158 fetch 2 ,core_uartb_rxitems 
+5f0d 98608600 iadd contu ,contu 
+5f0e 20205f05 branch uartb_rxdone 
+
+uarta_prepare_tx_register_push:
+5f0f 20405f17 call uart_register_push 
+5f10 20205eef branch uarta_prepare_tx 
+
+uartb_prepare_tx_register_push:
+5f11 20405f17 call uart_register_push 
+5f12 20205ef3 branch uartb_prepare_tx 
+
+uarta_send_register_pop:
+5f13 20405eff call uarta_send 
+5f14 20205f1b branch uart_register_pop 
+
+uartb_send_register_pop:
+5f15 20405f01 call uartb_send 
+5f16 20205f1b branch uart_register_pop 
+
+uart_register_push:
+5f17 60610983 storer contu ,2 ,mem_contu 
+5f18 61410981 storer contus ,2 ,mem_contue 
+5f19 6201097f storer contue ,2 ,mem_contus 
+5f1a 20600000 rtn 
+
+uart_register_pop:
+5f1b 68610983 fetchr contu ,2 ,mem_contu 
+5f1c 69410981 fetchr contus ,2 ,mem_contue 
+5f1d 6a01097f fetchr contue ,2 ,mem_contus 
+5f1e 20600000 rtn 
+
+uart_copy_tx_bytes_fast:
+5f1f 1f227e00 deposit loopcnt 
+5f20 207a0000 rtn blank 
+
+uart_copy_tx_bytes_fast_loop:
+5f21 1f20f3f8 increase -8 ,loopcnt 
+5f22 20415f2d call uart_tx_8_bytes ,positive 
+5f23 20628000 rtn zero 
+5f24 20215f21 branch uart_copy_tx_bytes_fast_loop ,positive 
+5f25 1f20f208 increase 8 ,loopcnt 
+
+uart_copy_tx_bytes_fast_loop_four:
+5f26 1f20f3fc increase -4 ,loopcnt 
+5f27 20415f30 call uart_tx_4_bytes ,positive 
+5f28 20628000 rtn zero 
+5f29 20215f26 branch uart_copy_tx_bytes_fast_loop_four ,positive 
+5f2a 1f20f204 increase 4 ,loopcnt 
+5f2b 20205f33 branch uart_copy_tx_bytes 
+
+uart_tx_16_bytes:
+5f2c 20405f2d call uart_tx_8_bytes 
+
+uart_tx_8_bytes:
+5f2d efe40006 ifetch 8 ,contr 
+5f2e e7e40003 istore 8 ,contu 
+5f2f 20600000 rtn 
+
+uart_tx_4_bytes:
+5f30 efe20006 ifetch 4 ,contr 
+5f31 e7e20003 istore 4 ,contu 
+5f32 20600000 rtn 
+
+uart_copy_tx_bytes:
+5f33 1f227e00 deposit loopcnt 
+5f34 207a0000 rtn blank 
+
+uart_copy_tx_bytes_loop:
+5f35 efe08006 ifetch 1 ,contr 
+5f36 e7e08003 istore 1 ,contu 
+5f37 c2005f35 loop uart_copy_tx_bytes_loop 
+5f38 20600000 rtn 
+
+uart_copy_rx_bytes_fast:
+5f39 1f227e00 deposit loopcnt 
+5f3a 207a0000 rtn blank 
+
+uart_copy_rx_bytes_fast_loop:
+5f3b 1f20f3f8 increase -8 ,loopcnt 
+5f3c 20415f47 call uart_rx_8_bytes ,positive 
+5f3d 20628000 rtn zero 
+5f3e 20215f3b branch uart_copy_rx_bytes_fast_loop ,positive 
+5f3f 1f20f208 increase 8 ,loopcnt 
+
+uart_copy_rx_bytes_fast_loop_four:
+5f40 1f20f3fc increase -4 ,loopcnt 
+5f41 20415f4a call uart_rx_4_bytes ,positive 
+5f42 20628000 rtn zero 
+5f43 20215f40 branch uart_copy_rx_bytes_fast_loop_four ,positive 
+5f44 1f20f204 increase 4 ,loopcnt 
+5f45 20205f4d branch uart_copy_rx_bytes 
+
+uart_rx_16_bytes:
+5f46 20405f47 call uart_rx_8_bytes 
+
+uart_rx_8_bytes:
+5f47 efe40003 ifetch 8 ,contu 
+5f48 e7e40005 istore 8 ,contw 
+5f49 20600000 rtn 
+
+uart_rx_4_bytes:
+5f4a efe20003 ifetch 4 ,contu 
+5f4b e7e20005 istore 4 ,contw 
+5f4c 20600000 rtn 
+
+uart_copy_rx_bytes:
+5f4d 1f227e00 deposit loopcnt 
+5f4e 207a0000 rtn blank 
+
+uart_copy_rx_bytes_loop:
+5f4f efe08003 ifetch 1 ,contu 
+5f50 e7e08005 istore 1 ,contw 
+5f51 c2005f4f loop uart_copy_rx_bytes_loop 
+5f52 20600000 rtn 
+
+app_store_nvram_event:
+5f53 70095b3d jam bt_evt_store_nvram ,mem_fifo_temp 
+5f54 20207871 branch ui_ipc_send_event 
+
+check_51cmd_store_reconn_info:
+
+check_51cmd_update_device_record:
+5f55 47164025 bpatchx patch25_4 ,mem_patch25 
+5f56 6fe0c489 fetch 1 ,mem_nv_data_number 
+5f57 207a0000 rtn blank 
+5f58 20405ffa call check_nvram 
+5f59 2042e000 call init_device_list ,zero 
+5f5a 20407e5a call disable_user2 
+5f5b 20405f89 call nvram_find_addr_from_bd_list 
+
+write_device_record:
+5f5c 6fe0c489 fetch 1 ,mem_nv_data_number 
+5f5d 1fe22600 icopy regc 
+5f5e 68494487 fetcht 2 ,mem_nv_data_ptr 
+5f5f 604900ef storet 2 ,mem_list_item_ptr 
+
+write_device_loop_find:
+5f60 1a627e00 copy regc ,pdata 
+5f61 203a5f53 branch app_store_nvram_event ,blank 
+5f62 1a60a7ff increase -1 ,regc 
+5f63 18422200 copy temp ,rega 
+5f64 efe08011 ifetch 1 ,rega 
+5f65 684880e7 fetcht 1 ,mem_select_list_item 
+5f66 98467c00 isub temp ,null 
+5f67 2042df70 call set_index_finded_device ,zero 
+5f68 20215f6c branch write_device_loop_find0 ,positive 
+5f69 efe08011 ifetch 1 ,rega 
+5f6a 1fe0fe01 increase 1 ,pdata 
+5f6b e7e08011 istore 1 ,rega 
+
+write_device_loop_find0:
+5f6c 684900ef fetcht 2 ,mem_list_item_ptr 
+5f6d 18408422 increase nv_data_len ,temp 
+5f6e 604900ef storet 2 ,mem_list_item_ptr 
+5f6f 20205f60 branch write_device_loop_find 
+
+set_index_finded_device:
+5f70 58000000 setarg 0 
+5f71 e7e08011 istore 1 ,rega 
+5f72 6fe080e8 fetch 1 ,mem_temp_reconn_record 
+5f73 e7e08005 istore 1 ,contw 
+5f74 c099df7e bne rec_3_mode ,set_index_finded_device_ble_mode 
+5f75 da4041cb arg mem_link_key ,regb 
+
+set_index_find_device_master_addr:
+5f76 efe30006 ifetch 6 ,contr 
+5f77 e7e40005 istore 8 ,contw 
+5f78 58000000 setarg 0 
+5f79 e7e40005 istore 8 ,contw 
+5f7a 1a420c00 copy regb ,contr 
+
+store_rec_data_common:
+5f7b 20407d0c call memcpy16 
+5f7c 18007c01 force 1 ,null 
+5f7d 20600000 rtn 
+
+set_index_finded_device_ble_mode:
+5f7e c01b5f82 beq rec_4_mode_random_resolvable_private_address ,set_index_finded_device_irk 
+5f7f c01bdf86 beq rec_4_mode_random_non_resolvable_private_address ,set_index_finded_device_ediv 
+5f80 da404316 arg mem_le_ltk ,regb 
+5f81 20205f76 branch set_index_find_device_master_addr 
+
+set_index_finded_device_irk:
+5f82 d8c043ac arg mem_le_irk ,contr 
+5f83 20407d0c call memcpy16 
+
+store_ble_rec_data_common:
+5f84 d8c04316 arg mem_le_ltk ,contr 
+5f85 20205f7b branch store_rec_data_common 
+
+set_index_finded_device_ediv:
+5f86 d8c043a4 arg mem_le_rand ,contr 
+5f87 20407d0c call memcpy16 
+5f88 20205f84 branch store_ble_rec_data_common 
+
+nvram_find_addr_from_bd_list:
+5f89 20407e56 call disable_user 
+5f8a 6fe0c489 fetch 1 ,mem_nv_data_number 
+5f8b 207a0000 rtn blank 
+5f8c 4716c025 bpatchx patch25_5 ,mem_patch25 
+5f8d 6fe1478c fetch 2 ,mem_ui_state_map 
+5f8e c2805fac bbit1 ui_state_bt_connected ,find_addr_from_bd_list_spp_mode 
+5f8f c4048000 rtnbit0 ui_state_ble_connected 
+
+find_addr_from_bd_list_ble_mode:
+5f90 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+5f91 c0005fa5 beq master_public_addr ,find_addr_from_bd_list_public_device_addr 
+5f92 6fe0829c fetch 1 ,mem_le_plap + 5 
+5f93 2fe180c0 compare 0xc0 ,pdata ,0xc0 
+5f94 2020df98 branch find_addr_from_bd_list_static_addr ,true 
+5f95 2fe18040 compare 0x40 ,pdata ,0xc0 
+5f96 2020dfaa branch find_addr_from_bd_list_random_addr ,true 
+5f97 20205f9f branch find_addr_from_bd_list_random_non_resolvable_private_address_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr:
+5f98 20365f9c branch find_addr_from_bd_list_static_addr_reconnect ,user2 
+5f99 6fe0c34e fetch 1 ,mem_le_preq_init_key_distribution 
+5f9a c300dfa5 bbit0 le_initator_irk_bit ,find_addr_from_bd_list_public_device_addr 
+5f9b 20205f9f branch find_addr_from_bd_list_static_addr_sc_or_legacy 
+
+find_addr_from_bd_list_static_addr_reconnect:
+5f9c 20405fa5 call find_addr_from_bd_list_public_device_addr 
+5f9d 20740000 rtn user 
+5f9e 20205f9f 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:
+5f9f 6fe0c39d fetch 1 ,mem_le_pairing_mode 
+5fa0 c283dfa2 bbit1 le_pairing_mode_secure_connect_bit ,find_addr_from_bd_list_random_non_resolvable_private_address_sc 
+5fa1 20205fa8 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:
+5fa2 6fe30297 fetch 6 ,mem_le_plap 
+5fa3 67e443a4 store 8 ,mem_le_rand 
+5fa4 20205fa8 branch find_addr_from_bd_list_random_non_resolvable_private_address 
+
+find_addr_from_bd_list_public_device_addr:
+5fa5 7000e835 jam rec_4_mode_static_address ,mem_temp_reconn_record 
+5fa6 6fe30297 fetch 6 ,mem_le_plap 
+5fa7 20205fae branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_random_non_resolvable_private_address:
+5fa8 7000e837 jam rec_4_mode_random_non_resolvable_private_address ,mem_temp_reconn_record 
+5fa9 20205fae branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_random_addr:
+5faa 7000e836 jam rec_4_mode_random_resolvable_private_address ,mem_temp_reconn_record 
+5fab 20205fae branch find_addr_from_bd_list_common 
+
+find_addr_from_bd_list_spp_mode:
+5fac 7000e833 jam rec_3_mode ,mem_temp_reconn_record 
+5fad 6fe30041 fetch 6 ,mem_plap 
+
+find_addr_from_bd_list_common:
+5fae 67e300e9 store 6 ,mem_temp_lap 
+5faf 6fe14487 fetch 2 ,mem_nv_data_ptr 
+5fb0 e840803f ifetcht 1 ,pdata 
+5fb1 1fe0fe01 pincrease 1 
+5fb2 67e100ef store 2 ,mem_list_item_ptr 
+5fb3 604880e7 storet 1 ,mem_select_list_item 
+5fb4 6fe0c489 fetch 1 ,mem_nv_data_number 
+5fb5 1fe22600 icopy regc 
+
+nvram_find_addr_from_list:
+5fb6 6fe100ef fetch 2 ,mem_list_item_ptr 
+5fb7 1fe22200 copy pdata ,rega 
+5fb8 20405fc6 call nvram_find_addr_from_list_compare 
+5fb9 20740000 rtn user 
+5fba 684900ef fetcht 2 ,mem_list_item_ptr 
+5fbb 18408422 increase nv_data_len ,temp 
+5fbc 604900ef storet 2 ,mem_list_item_ptr 
+5fbd 184085ff increase -1 ,temp 
+5fbe efe08002 ifetch 1 ,temp 
+5fbf 67e080e7 store 1 ,mem_select_list_item 
+5fc0 1a60a7ff increase -1 ,regc 
+5fc1 2422dfb6 nbranch nvram_find_addr_from_list ,zero 
+5fc2 6fe0c489 fetch 1 ,mem_nv_data_number 
+5fc3 1fe0ffff pincrease decreased_one 
+5fc4 67e080e7 store 1 ,mem_select_list_item 
+5fc5 20600000 rtn 
+
+nvram_find_addr_from_list_compare:
+5fc6 6fe080e8 fetch 1 ,mem_temp_reconn_record 
+5fc7 c099dfcd bne rec_3_mode ,find_addr_from_list_compare_ble_mode 
+
+find_master_addr_from_list_compare:
+5fc8 da4000e8 arg mem_temp_reconn_record ,regb 
+5fc9 df200007 arg 7 ,loopcnt 
+5fca 20407df1 call string_compare 
+5fcb 2022fe54 branch enable_user ,zero 
+5fcc 20600000 rtn 
+
+find_addr_from_list_compare_ble_mode:
+5fcd c01b5fd0 beq rec_4_mode_random_resolvable_private_address ,find_irk_form_list_compare 
+5fce c01bdfeb beq rec_4_mode_random_non_resolvable_private_address ,find_ediv_form_list_compare 
+5fcf 20205fc8 branch find_master_addr_from_list_compare 
+
+find_irk_form_list_compare:
+5fd0 e8408011 ifetcht 1 ,rega 
+5fd1 98467c00 isub temp ,null 
+5fd2 24628000 nrtn zero 
+5fd3 d8a0098e arg mem_le_prand ,contw 
+5fd4 df200010 arg 16 ,loopcnt 
+5fd5 20407d26 call clear_mem 
+5fd6 6fe1829a fetch 3 ,mem_le_plap + 3 
+5fd7 67e1898e store 3 ,mem_le_prand 
+5fd8 20405fe2 call genernate_master_macaddress 
+5fd9 6fe109ab fetch 2 ,mem_le_aes_128 + 13 
+5fda 1ff0fe00 byteswap pdata ,pdata 
+5fdb 1fed0400 lshift8 pdata ,temp 
+5fdc efe08006 ifetch 1 ,contr 
+5fdd 9840fe00 iadd temp ,pdata 
+5fde 68498297 fetcht 3 ,mem_le_plap 
+5fdf 98467c00 isub temp ,null 
+5fe0 2022fe54 branch enable_user ,zero 
+5fe1 20600000 rtn 
+
+genernate_master_macaddress:
+5fe2 d8c0098e arg mem_le_prand ,contr 
+5fe3 20406dc0 call load_data128 
+5fe4 efe08011 ifetch 1 ,rega 
+5fe5 20406dc1 call load_regext 
+5fe6 18006c38 force 0x38 ,aes_ctrl 
+5fe7 18006c00 force 0x0 ,aes_ctrl 
+5fe8 20406d57 call wait_aes 
+5fe9 d8a0099e arg mem_le_aes_128 ,contw 
+5fea 20206dd1 branch store_aes_result 
+
+find_ediv_form_list_compare:
+5feb e8408011 ifetcht 1 ,rega 
+5fec 98467c00 isub temp ,null 
+5fed 24628000 nrtn zero 
+5fee 18c22200 copy contr ,rega 
+5fef 18c0a608 add contr ,8 ,regc 
+5ff0 da4043a4 arg mem_le_rand ,regb 
+5ff1 df200008 arg 8 ,loopcnt 
+5ff2 20407df1 call string_compare 
+5ff3 2022fe54 branch enable_user ,zero 
+5ff4 1a622200 copy regc ,rega 
+5ff5 da4043ac arg mem_le_irk ,regb 
+5ff6 df200008 arg 8 ,loopcnt 
+5ff7 20407df1 call string_compare 
+5ff8 2022fe54 branch enable_user ,zero 
+5ff9 20600000 rtn 
+
+check_nvram:
+5ffa 6fe14487 fetch 2 ,mem_nv_data_ptr 
+5ffb e840803f ifetcht 1 ,pdata 
+5ffc 1fe0fe22 pincrease nv_data_len 
+5ffd efe0803f ifetch 1 ,pdata 
+5ffe 98467c00 isub temp ,null 
+5fff 20600000 rtn 
+
+init_device_list:
+6000 6fe0c489 fetch 1 ,mem_nv_data_number 
+6001 1fe27200 icopy loopcnt 
+6002 68494487 fetcht 2 ,mem_nv_data_ptr 
+6003 58000000 setarg 0 
+
+init_device_list_loop:
+6004 e7e08002 istore 1 ,temp 
+6005 18408422 increase nv_data_len ,temp 
+6006 1fe0fe01 pincrease 1 
+6007 c2006004 loop init_device_list_loop 
+6008 20600000 rtn 
+
+load_device_list:
+6009 47174025 bpatchx patch25_6 ,mem_patch25 
+600a 20407e58 call enable_user2 
+600b 20405f89 call nvram_find_addr_from_bd_list 
+600c 6fe08031 fetch 1 ,mem_state 
+600d 79347e06 setflag user ,state_combkey ,pdata 
+600e 67e08031 store 1 ,mem_state 
+600f 24346014 nbranch clear_key_exists ,user 
+6010 1a208c0a add rega ,10 ,contr 
+6011 d8a041cb arg mem_link_key ,contw 
+6012 20407d0c call memcpy16 
+6013 2020602c branch check_link_key_load 
+
+clear_key_exists:
+6014 7041ca00 jam 0 ,mem_link_key_exists 
+6015 20600000 rtn 
+
+load_device_list_mode_4:
+6016 6fe4c3a2 fetch 9 ,mem_le_ediv 
+6017 203a6023 branch clear_ltk_exists ,blank 
+6018 20407e58 call enable_user2 
+6019 20405f89 call nvram_find_addr_from_bd_list 
+601a 24346023 nbranch clear_ltk_exists ,user 
+601b 6fe100ef fetch 2 ,mem_list_item_ptr 
+601c 1fe08c01 add pdata ,1 ,contr 
+601d d8a043ac arg mem_le_irk ,contw 
+601e 20407d0c call memcpy16 
+601f d8a04316 arg mem_le_ltk ,contw 
+6020 20407d0c call memcpy16 
+6021 70432601 jam 1 ,mem_ltk_exists 
+6022 20600000 rtn 
+
+clear_ltk_exists:
+6023 70432600 jam 0 ,mem_ltk_exists 
+6024 20600000 rtn 
+
+eeprom_store_le_reconn_info:
+6025 7000e834 jam rec_4_mode ,mem_record_bt_mode 
+6026 20206028 branch eeprom_store_reconn_info 
+
+eeprom_store_bd_reconn_info:
+6027 7000e833 jam rec_3_mode ,mem_record_bt_mode 
+
+eeprom_store_reconn_info:
+6028 6fe0c09a fetch 1 ,mem_device_option 
+6029 c0055f55 beq dvc_op_module ,check_51cmd_update_device_record 
+602a c0044586 beq dvc_op_mouse ,mouse_store_remote_bdaddr 
+602b 20600000 rtn 
+
+check_link_key_load:
+602c 6fe441cb fetch 8 ,mem_link_key 
+602d 684c41d3 fetcht 8 ,mem_link_key + 8 
+602e 9841fe00 ior temp ,pdata 
+602f 207a0000 rtn blank 
+6030 7041ca01 jam 1 ,mem_link_key_exists 
+6031 20600000 rtn 
+
+gpio_set_wake_by_current_state:
+6032 4717c025 bpatchx patch25_7 ,mem_patch25 
+6033 79200407 set1 gpio_active_bit ,temp 
+6034 20406059 call gpio_get_bit 
+6035 7d208407 nsetflag true ,gpio_active_bit ,temp 
+
+gpio_set_wake:
+6036 47184026 bpatchx patch26_0 ,mem_patch26 
+6037 18467cff sub temp ,ui_button_gpio_disable ,null 
+6038 20628000 rtn zero 
+6039 284c0007 isolate0 gpio_active_bit ,temp 
+603a 18410e1f and temp ,0x1f ,queue 
+603b 6fe2009f fetch 4 ,mem_gpio_wakeup_low 
+603c f920fe00 qsetflag true ,pdata 
+603d 67e2009f store 4 ,mem_gpio_wakeup_low 
+603e 6fe200a3 fetch 4 ,mem_gpio_wakeup_high 
+603f fd20fe00 nqsetflag true ,pdata 
+6040 67e200a3 store 4 ,mem_gpio_wakeup_high 
+6041 20600000 rtn 
+
+gpio_clr_wake:
+6042 4718c026 bpatchx patch26_1 ,mem_patch26 
+6043 18467cff sub temp ,ui_button_gpio_disable ,null 
+6044 20628000 rtn zero 
+6045 284c0007 isolate0 gpio_active_bit ,temp 
+6046 18410e1f and temp ,0x1f ,queue 
+6047 6fe2009f fetch 4 ,mem_gpio_wakeup_low 
+6048 f93ffe00 qset0 pdata 
+6049 67e2009f store 4 ,mem_gpio_wakeup_low 
+604a 6fe200a3 fetch 4 ,mem_gpio_wakeup_high 
+604b f93ffe00 qset0 pdata 
+604c 67e200a3 store 4 ,mem_gpio_wakeup_high 
+604d 20600000 rtn 
+
+gpio_config_input_nowake:
+604e 20406042 call gpio_clr_wake 
+604f 20206053 branch gpio_config_input_without_wake 
+
+gpio_config_input:
+6050 18467cff sub temp ,ui_button_gpio_disable ,null 
+6051 20628000 rtn zero 
+6052 2455e036 ncall gpio_set_wake ,wake 
+
+gpio_config_input_without_wake:
+6053 2040608b call gpio_addr 
+6054 58000000 setarg 0 
+6055 284ffe07 isolate1 gpio_active_bit ,temp 
+6056 7d20fe06 nsetflag true ,6 ,pdata 
+6057 7920fe07 setflag true ,7 ,pdata 
+6058 2020607d branch gpio_write 
+
+gpio_get_bit:
+6059 d8a0811c arg core_gpio_in ,contw 
+605a 18410e07 and temp ,0x07 ,queue 
+605b 18497e00 rshift3 temp ,pdata 
+605c 1fe17e03 and_into 3 ,pdata 
+605d 98a08a00 iadd contw ,contw 
+605e efe08005 ifetch 1 ,contw 
+605f 284ffe07 isolate1 gpio_active_bit ,temp 
+6060 2020e063 branch gpio_get_bit_reverse ,true 
+6061 afec0000 qisolate0 pdata 
+6062 20600000 rtn 
+
+gpio_get_bit_reverse:
+6063 afefffff qisolate1 pdata 
+6064 20600000 rtn 
+
+gpio_out_inactive:
+6065 18467cff sub temp ,ui_button_gpio_disable ,null 
+6066 20628000 rtn zero 
+6067 2fcffe07 isolate1 gpio_active_bit ,null 
+6068 2020606c branch gpio_out_flag 
+
+gpio_config_output:
+
+gpio_out_active:
+6069 18467cff sub temp ,ui_button_gpio_disable ,null 
+606a 20628000 rtn zero 
+606b 2fcc0007 isolate0 gpio_active_bit ,null 
+
+gpio_out_flag:
+606c 58000000 setarg 0 
+606d 7d20fe07 nsetflag true ,gpio_active_bit ,pdata 
+606e 98428400 ixor temp ,temp 
+
+gpio_out:
+606f 2040608b call gpio_addr 
+6070 5800003f setarg gpcfg_output_high 
+6071 284ffe07 isolate1 gpio_active_bit ,temp 
+6072 7920fe00 setflag true ,0 ,pdata 
+6073 2020607d branch gpio_write 
+
+gpio_check_active:
+6074 2040608b call gpio_addr 
+6075 efe08005 ifetch 1 ,contw 
+6076 c2806079 bbit1 0 ,gpio_check_active_high 
+6077 284c0007 isolate0 gpio_active_bit ,temp 
+6078 20600000 rtn 
+
+gpio_check_active_high:
+6079 284c0007 isolate0 gpio_active_bit ,temp 
+607a 20600000 rtn 
+
+gpio_set_analog:
+607b 2040608b call gpio_addr 
+607c 580000c0 setarg gpcfg_no_ie 
+
+gpio_write:
+607d e7e08005 istore 1 ,contw 
+607e 20600000 rtn 
+
+gpio_set_high_impedance:
+607f 2040608b call gpio_addr 
+6080 58000000 setarg gpcfg_high_impedance 
+6081 2020607d branch gpio_write 
+
+gpio_pd_idle:
+6082 d8c08070 arg core_gpio_conf ,contr 
+6083 df200013 arg 19 ,loopcnt 
+
+gpio_pd_idle_loop:
+6084 efe08006 ifetch 1 ,contr 
+6085 243a6089 nbranch gpio_pd_idle_configured ,blank 
+6086 58000080 setarg 0x80 
+6087 18c08bff add contr ,-1 ,contw 
+6088 e7e08005 istore 1 ,contw 
+
+gpio_pd_idle_configured:
+6089 c2006084 loop gpio_pd_idle_loop 
+608a 20600000 rtn 
+
+gpio_addr:
+608b 18417e3f and temp ,0x3f ,pdata 
+608c d8a08070 arg core_gpio_conf ,contw 
+608d 98a08a00 iadd contw ,contw 
+608e 20600000 rtn 
+
+gpio_config_param:
+608f 1fe104ff and pdata ,0xff ,temp 
+6090 1fecfe00 rshift8 pdata ,pdata 
+6091 20206093 branch gpio_config_function_int 
+
+gpio_config_function:
+6092 c4038000 rtnbit0 gpio_active_bit 
+
+gpio_config_function_int:
+6093 1fe17e3f and_into 0x3f ,pdata 
+6094 d8a08070 arg core_gpio_conf ,contw 
+6095 98a08a00 iadd contw ,contw 
+6096 e0408005 istoret 1 ,contw 
+6097 20600000 rtn 
+
+gpio_get_config:
+6098 1841043f and_into 0x3f ,temp 
+6099 58008070 setarg core_gpio_conf 
+609a 98408c00 iadd temp ,contr 
+609b efe08006 ifetch 1 ,contr 
+609c 20600000 rtn 
+
+gpio_set_before_lpm_common:
+609d 47194026 bpatchx patch26_2 ,mem_patch26 
+609e 20600000 rtn 
+
+gpio_set_before_lpm:
+609f df200014 arg 20 ,loopcnt 
+60a0 d8c08070 arg core_gpio_conf ,contr 
+
+setgpio_loop:
+60a1 18c20a00 copy contr ,contw 
+60a2 efe08006 ifetch 1 ,contr 
+60a3 c00160b3 beq gpcfg_qspi_ncs ,setgpio_pullup 
+60a4 c001e0b3 beq gpcfg_qspi_sck ,setgpio_pullup 
+60a5 c00260b3 beq gpcfg_qspi_io0 ,setgpio_pullup 
+60a6 c002e0b3 beq gpcfg_qspi_io1 ,setgpio_pullup 
+60a7 c00360b3 beq gpcfg_qspi_io2 ,setgpio_pullup 
+60a8 c003e0b3 beq gpcfg_qspi_io3 ,setgpio_pullup 
+60a9 c00fe0b3 beq gpcfg_spid_miso ,setgpio_pullup 
+60aa c01060b3 beq gpcfg_spid_ncs ,setgpio_pullup 
+60ab c010e0b3 beq gpcfg_spid_sck ,setgpio_pullup 
+60ac c01160b3 beq gpcfg_spid_mosi ,setgpio_pullup 
+60ad c011e0b3 beq gpcfg_spid_sdio ,setgpio_pullup 
+60ae c01660b3 beq gpcfg_iic_scl ,setgpio_pullup 
+60af c016e0b3 beq gpcfg_iic_sda ,setgpio_pullup 
+60b0 c00060b3 beq gpcfg_input ,setgpio_pullup 
+
+setgpio_loop_end:
+60b1 c20060a1 loop setgpio_loop 
+60b2 20600000 rtn 
+
+setgpio_pullup:
+60b3 58000040 setarg gpcfg_pullup 
+60b4 e7e08005 istore 1 ,contw 
+60b5 202060b1 branch setgpio_loop_end 
+
+setgpio_pulldown:
+60b6 58000080 setarg gpcfg_pulldown 
+60b7 e7e08005 istore 1 ,contw 
+60b8 202060b1 branch setgpio_loop_end 
+
+adc_init_data:
+60b9 4719c026 bpatchx patch26_3 ,mem_patch26 
+60ba da20099e arg mem_temp_block2 ,rega 
+60bb d840000c arg 12 ,temp 
+60bc 58000030 setarg efuse_offset_adc_param 
+60bd 20405e63 call efuse_read_data 
+60be 20406102 call enable_adc 
+60bf 204060d5 call adc_init_wait_count 
+
+adc_init_cal_data:
+60c0 6fe409a1 fetch 8 ,mem_temp_block2 + 3 
+60c1 203a60cc branch adc_init_cal_data_default ,blank 
+60c2 d8c009a1 arg mem_temp_block2 + 3 ,contr 
+60c3 d8a04490 arg mem_3v_adc_io_data ,contw 
+60c4 df200003 arg 3 ,loopcnt 
+
+adc_init_cal_data_loop:
+60c5 efe18006 ifetch 3 ,contr 
+60c6 1ff20400 lshift4 pdata ,temp 
+60c7 e0410005 istoret 2 ,contw 
+60c8 1fec8400 rshift8 pdata ,temp 
+60c9 e0410005 istoret 2 ,contw 
+60ca c20060c5 loop adc_init_cal_data_loop 
+60cb 20600000 rtn 
+
+adc_init_cal_data_default:
+60cc 5800469a setarg 0x469a 
+60cd 67e14490 store 2 ,mem_3v_adc_io_data 
+60ce 5800ab77 setarg 0xab77 
+60cf 67e14496 store 2 ,mem_1v_adc_io_data 
+60d0 580073d0 setarg 0x73d0 
+60d1 67e1449a store 2 ,mem_3v_adc_vinlpm_data 
+60d2 58009658 setarg 0x9658 
+60d3 67e14494 store 2 ,mem_2v_adc_vinlpm_data 
+60d4 20600000 rtn 
+
+adc_init_wait_count:
+60d5 6fe0899e fetch 1 ,mem_temp_block2 
+60d6 247a0000 nrtn blank 
+60d7 70448f0c jam 12 ,mem_adc_wait_count 
+60d8 20600000 rtn 
+
+adc_wait_timer:
+60d9 da60449c arg mem_app_adc_read_count ,regc 
+60da da406102 arg enable_adc ,regb 
+60db 2020318a branch timer_single_step 
+
+idle_read_adc_wait:
+60dc c69a0000 rtnmark0 mark_adc_enable 
+60dd 1c417eff and clkn_bt ,0xff ,pdata 
+60de 6848c49d fetcht 1 ,mem_start_adc_clkn 
+60df 20407cf8 call get_diff 
+60e0 6fe0c48f fetch 1 ,mem_adc_wait_count 
+60e1 9a267c00 isub rega ,null 
+60e2 20610000 rtn positive 
+60e3 6ff10150 fetch 2 ,core_adc_sum 
+60e4 67e144a2 store 2 ,mem_adc_current_value 
+60e5 793f8034 set0 mark_adc_enable ,mark 
+60e6 70449c32 jam 50 ,mem_app_adc_read_count 
+60e7 6ff08053 fetch 1 ,core_sum_en 
+60e8 793ffe07 set0 7 ,pdata 
+60e9 67f08053 store 1 ,core_sum_en 
+60ea 708a9700 jam 0 ,core_gpadc_ctrl 
+60eb 20600000 rtn 
+
+enable_adc_check:
+60ec c3008a75 bbit0 state_insniff ,context_search_next 
+60ed 1a208c01 add rega ,coffset_mode ,contr 
+60ee efe08006 ifetch 1 ,contr 
+60ef c28060f6 bbit1 mode_le ,enable_adc_check_le 
+60f0 1a208c02 add rega ,coffset_tsniff ,contr 
+60f1 efe10006 ifetch 2 ,contr 
+60f2 d840ffff arg 0xffff ,temp 
+60f3 98467c00 isub temp ,null 
+60f4 2022fe52 branch enable_zero ,zero 
+60f5 20200a75 branch context_search_next 
+
+enable_adc_check_le:
+60f6 efe08011 ifetch 1 ,rega 
+60f7 c301fe52 bbit0 lestate_got_first_packet ,enable_zero 
+60f8 c282fe52 bbit1 lestate_update_param ,enable_zero 
+60f9 c2837e52 bbit1 lestate_update_map ,enable_zero 
+60fa c283fe52 bbit1 lestate_update_phy ,enable_zero 
+60fb 1a208c1a add rega ,coffset_le_event_cnt ,contr 
+60fc efe10006 ifetch 2 ,contr 
+60fd 1fe67c07 sub pdata ,7 ,null 
+60fe 20217e52 branch enable_zero ,positive 
+60ff 20200a75 branch context_search_next 
+
+enable_adc_wait:
+6100 70449c01 jam 1 ,mem_app_adc_read_count 
+6101 20600000 rtn 
+
+enable_adc:
+6102 471a4026 bpatchx patch26_4 ,mem_patch26 
+6103 da6060ec arg enable_adc_check ,regc 
+6104 20400a70 call context_search 
+6105 2022e100 branch enable_adc_wait ,zero 
+6106 708a11aa jam 0xaa ,core_rf_ldo_cfg5 
+6107 708a0a0c jam 0x0c ,core_rf_ldo_en0 
+6108 6ff08a09 fetch 1 ,core_clkpll_cfg6 
+6109 79207e07 set1 7 ,pdata 
+610a 67f08a09 store 1 ,core_clkpll_cfg6 
+610b 708a0b04 jam 0x04 ,core_rf_ldo_en1 
+610c 2000003c nop 60 
+610d 708a1600 jam 0 ,core_syn_en 
+610e 708a1706 jam 6 ,core_rx_en0 
+610f 2040611a call read_adc_mode 
+6110 67f08a97 store 1 ,core_gpadc_ctrl 
+6111 7080dc03 jam 0x03 ,core_sum_ctrl 
+6112 2000003c nop 60 
+6113 6ff08053 fetch 1 ,core_sum_en 
+6114 79207e07 set1 7 ,pdata 
+6115 67f08053 store 1 ,core_sum_en 
+6116 79200034 set1 mark_adc_enable ,mark 
+6117 1c427e00 copy clkn_bt ,pdata 
+6118 67e0c49d store 1 ,mem_start_adc_clkn 
+6119 20600000 rtn 
+
+read_adc_mode:
+611a 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+611b c0006121 beq adc_config_vinlpm ,adc_mode_vdcdc 
+611c c000e123 beq adc_config_hvin ,adc_adc_mode_vbat 
+
+adc_check_gpio:
+611d 6fe0c4a1 fetch 1 ,mem_adc_channel 
+611e 1fe9fe00 lshift3 pdata ,pdata 
+611f 1fe1fe07 or pdata ,7 ,pdata 
+6120 20600000 rtn 
+
+adc_mode_vdcdc:
+6121 58000057 setarg 0x57 
+6122 20600000 rtn 
+
+adc_adc_mode_vbat:
+6123 5800004f setarg 0x4f 
+6124 20600000 rtn 
+
+vdd_calculate_by_mode:
+6125 471ac026 bpatchx patch26_5 ,mem_patch26 
+6126 6fe0c4a0 fetch 1 ,mem_adc_config_flag 
+6127 c000612b beq adc_config_vinlpm ,vdd_calculate_vinlpm 
+6128 c000e131 beq adc_config_hvin ,vdd_calculate_hvin 
+6129 c0016137 beq adc_config_gpio ,vdd_calculate_io 
+612a 20600000 rtn 
+
+vdd_calculate_vinlpm:
+612b 58000064 setarg 100 
+612c 67e1449e store 2 ,mem_reference_voltage 
+612d 6849449a fetcht 2 ,mem_3v_adc_vinlpm_data 
+612e 6fe14494 fetch 2 ,mem_2v_adc_vinlpm_data 
+612f da60012c arg 300 ,regc 
+6130 2020613c branch vdd_calculate 
+
+vdd_calculate_hvin:
+6131 580000c8 setarg 200 
+6132 67e1449e store 2 ,mem_reference_voltage 
+6133 68494498 fetcht 2 ,mem_5v_adc_hvin_data 
+6134 6fe14492 fetch 2 ,mem_3v_adc_hvin_data 
+6135 da6001f4 arg 500 ,regc 
+6136 2020613c branch vdd_calculate 
+
+vdd_calculate_io:
+6137 580000c8 setarg 200 
+6138 67e1449e store 2 ,mem_reference_voltage 
+6139 68494490 fetcht 2 ,mem_3v_adc_io_data 
+613a 6fe14496 fetch 2 ,mem_1v_adc_io_data 
+613b da60012c arg 300 ,regc 
+
+vdd_calculate:
+613c 98462200 isub temp ,rega 
+613d 6fe144a2 fetch 2 ,mem_adc_current_value 
+613e 98467e00 isub temp ,pdata 
+613f 24216149 nbranch vdd_calculate1 ,positive 
+6140 6849449e fetcht 2 ,mem_reference_voltage 
+6141 984fa400 imul32 temp ,regb 
+6142 1a627e00 copy regc ,pdata 
+6143 9a2ffe00 imul32 rega ,pdata 
+6144 9a467e00 isub regb ,pdata 
+
+vdd_calculate2:
+6145 9a26fc00 idiv rega 
+6146 20407def call wait_div_end 
+6147 1807fe00 quotient pdata 
+6148 20600000 rtn 
+
+vdd_calculate1:
+6149 18427e00 copy temp ,pdata 
+614a 684944a2 fetcht 2 ,mem_adc_current_value 
+614b 98467e00 isub temp ,pdata 
+614c 6849449e fetcht 2 ,mem_reference_voltage 
+614d 984fa400 imul32 temp ,regb 
+614e 1a627e00 copy regc ,pdata 
+614f 9a2ffe00 imul32 rega ,pdata 
+6150 9a40fe00 iadd regb ,pdata 
+6151 20206145 branch vdd_calculate2 
+
+adc_bat_percent_lowpower_out:
+6152 efe40011 ifetch 8 ,rega 
+6153 67e4095c store 8 ,mem_pdatatemp 
+6154 6fe1095c fetch 2 ,mem_pdatatemp 
+6155 6849095e fetcht 2 ,mem_pdatatemp + 2 
+6156 98462200 isub temp ,rega 
+6157 6fe10962 fetch 2 ,mem_pdatatemp + 6 
+6158 98462400 isub temp ,regb 
+6159 68490960 fetcht 2 ,mem_pdatatemp + 4 
+615a 98467c00 isub temp ,null 
+615b 24416162 ncall adc_set_low_power_flag ,positive 
+615c 1a4ffe64 mul32 regb ,100 ,pdata 
+615d 9a26fc00 idiv rega 
+615e 20407def call wait_div_end 
+615f 1807fe00 quotient pdata 
+6160 205a616a call adc_set_no_power_flag ,blank 
+6161 20600000 rtn 
+
+adc_set_low_power_flag:
+6162 6fe0c4a4 fetch 1 ,mem_adc_power_flag 
+6163 79207e00 set1 0 ,pdata 
+6164 67e0c4a4 store 1 ,mem_adc_power_flag 
+6165 20600000 rtn 
+
+adc_clear_low_power_flag:
+6166 6fe0c4a4 fetch 1 ,mem_adc_power_flag 
+6167 793ffe00 set0 0 ,pdata 
+6168 67e0c4a4 store 1 ,mem_adc_power_flag 
+6169 20600000 rtn 
+
+adc_set_no_power_flag:
+616a 6848c4a4 fetcht 1 ,mem_adc_power_flag 
+616b 79200401 set1 1 ,temp 
+616c 6048c4a4 storet 1 ,mem_adc_power_flag 
+616d 20600000 rtn 
+
+adc_clear_no_power_flag:
+616e 6848c4a4 fetcht 1 ,mem_adc_power_flag 
+616f 793f8401 set0 1 ,temp 
+6170 6048c4a4 storet 1 ,mem_adc_power_flag 
+6171 20600000 rtn 
+
+keyscan_key_init:
+6172 6fe144c6 fetch 2 ,mem_key_num_ptr 
+6173 efe0803f ifetch 1 ,pdata 
+
+keyscan_key_init_next:
+6174 207a0000 rtn blank 
+6175 1fe27200 copy pdata ,loopcnt 
+6176 6fe144c6 fetch 2 ,mem_keyscan_ptr 
+6177 1fe0fe03 increase 3 ,pdata 
+6178 1fe22200 copy pdata ,rega 
+
+keyscan_key_init_lp1:
+6179 e8408011 ifetcht 1 ,rega 
+617a 20406050 call gpio_config_input 
+617b 1a20a201 increase key_conf_struct_len ,rega 
+617c c2006179 loop keyscan_key_init_lp1 
+
+keyscan_key_init_end:
+617d 20600000 rtn 
+
+keyscan_scan_key:
+617e 6fe144c6 fetch 2 ,mem_keyscan_ptr 
+617f 1fe0fe03 increase 3 ,pdata 
+6180 1fe22200 copy pdata ,rega 
+6181 18002400 force 0 ,regb 
+6182 58000000 setarg 0 
+6183 67e109de store 2 ,mem_key_value_temp 
+
+keyscan_scan_key_lp1:
+6184 e8408011 ifetcht 1 ,rega 
+6185 20406059 call gpio_get_bit 
+6186 471b4026 bpatchx patch26_6 ,mem_patch26 
+6187 6fe109de fetch 2 ,mem_key_value_temp 
+6188 1a420e00 copy regb ,queue 
+6189 f920fe00 qsetflag true ,pdata 
+618a 67e109de store 2 ,mem_key_value_temp 
+618b 1a20a201 increase key_conf_struct_len ,rega 
+618c 1a40a401 increase 1 ,regb 
+618d 6fe144c6 fetch 2 ,mem_key_num_ptr 
+618e efe0803f ifetch 1 ,pdata 
+
+keyscan_scan_key_lp1_next:
+618f 9a42fc00 ixor regb ,null 
+6190 2422e184 nbranch keyscan_scan_key_lp1 ,zero 
+6191 6fe109de fetch 2 ,mem_key_value_temp 
+6192 684944c8 fetcht 2 ,mem_key_value_retention 
+6193 9842fc00 ixor temp ,null 
+6194 20628000 rtn zero 
+6195 78347c00 enable user 
+6196 20600000 rtn 
+
+keyscan_process_lpm_before:
+6197 6fe144c6 fetch 2 ,mem_key_num_ptr 
+6198 efe0803f ifetch 1 ,pdata 
+
+keyscan_process_lpm_before_next:
+6199 207a0000 rtn blank 
+619a 1fe27200 copy pdata ,loopcnt 
+619b 6fe144c6 fetch 2 ,mem_keyscan_ptr 
+619c 1fe0fe03 increase 3 ,pdata 
+619d 1fe22200 copy pdata ,rega 
+
+keyscan_process_lpm_before_lp1:
+619e e8408011 ifetcht 1 ,rega 
+619f 20406032 call gpio_set_wake_by_current_state 
+61a0 1a20a201 increase key_conf_struct_len ,rega 
+61a1 c200619e loop keyscan_process_lpm_before_lp1 
+
+keyscan_process_lpm_before_end:
+61a2 20600000 rtn 
+
+keyscan_key_process:
+61a3 d8e00009 arg key_scan_timer ,queue 
+61a4 20407d74 call timer_check 
+61a5 247a0000 nrtn blank 
+61a6 58000020 setarg 0x20 
+61a7 d8e00009 arg key_scan_timer ,queue 
+61a8 20407d66 call timer_init 
+61a9 78547c00 disable user 
+61aa 20406197 call keyscan_process_lpm_before 
+61ab 471bc026 bpatchx patch26_7 ,mem_patch26 
+61ac 6fe144c6 fetch 2 ,mem_key_num_ptr 
+61ad efe0803f ifetch 1 ,pdata 
+
+keyscan_key_process_next:
+61ae 207a0000 rtn blank 
+61af 2040617e call keyscan_scan_key 
+61b0 243477ea nbranch lpm_button_clean_wake_lock ,user 
+61b1 204077e8 call lpm_button_get_wake_lock 
+61b2 78547c00 disable user 
+61b3 6fe109de fetch 2 ,mem_key_value_temp 
+61b4 67e109e5 store 2 ,mem_key_value_temp4 
+61b5 7009e700 jam 0 ,mem_key_value_temp6 
+61b6 18000e00 force 0 ,queue 
+
+keyscan_key_lp1:
+61b7 6fe144c8 fetch 2 ,mem_key_value_retention 
+61b8 1fe30400 rshift pdata ,temp 
+61b9 604944c8 storet 2 ,mem_key_value_retention 
+61ba 1fe17e01 and pdata ,0x01 ,pdata 
+61bb 684909e5 fetcht 2 ,mem_key_value_temp4 
+61bc 18412201 and temp ,0x01 ,rega 
+61bd 18430400 rshift temp ,temp 
+61be 604909e5 storet 2 ,mem_key_value_temp4 
+61bf 9a22fc00 ixor rega ,null 
+61c0 2442e1cc ncall keyscan_send_key_data ,zero 
+61c1 6fe144c6 fetch 2 ,mem_key_num_ptr 
+61c2 efe0803f ifetch 1 ,pdata 
+
+keyscan_key_lp1_next:
+61c3 684889e7 fetcht 1 ,mem_key_value_temp6 
+61c4 18408401 increase 1 ,temp 
+61c5 604889e7 storet 1 ,mem_key_value_temp6 
+61c6 18420e00 copy temp ,queue 
+61c7 98e2fc00 ixor queue ,null 
+61c8 2422e1b7 nbranch keyscan_key_lp1 ,zero 
+61c9 6fe109de fetch 2 ,mem_key_value_temp 
+61ca 67e144c8 store 2 ,mem_key_value_retention 
+61cb 20600000 rtn 
+
+keyscan_send_key_data:
+61cc 471c4027 bpatchx patch27_0 ,mem_patch27 
+61cd 6fe144c6 fetch 2 ,mem_keyscan_ptr 
+61ce 1fe0fe01 increase 1 ,pdata 
+61cf efe1003f ifetch 2 ,pdata 
+61d0 20207e05 branch callback_func 
+
+pwm_init:
+61d1 6ff08042 fetch 1 ,core_clksel 
+61d2 9a21fe00 ior rega ,pdata 
+61d3 67f08042 store 1 ,core_clksel 
+61d4 6ff10050 fetch 2 ,core_clkoff 
+61d5 793ffe0d set0 clock_off_pwm ,pdata 
+61d6 67f10050 store 2 ,core_clkoff 
+
+delay_nop100:
+61d7 20000064 nop 100 
+61d8 20600000 rtn 
+
+pwm_clk_set:
+61d9 6ff08042 fetch 1 ,core_clksel 
+61da c28361de bbit1 6 ,pwm_24m_clk_set 
+61db c283e1e0 bbit1 7 ,pwm_33k_clk_set 
+
+pwm_12m_clk_set:
+61dc 58b71b00 setarg pwm_12mhz 
+61dd 20600000 rtn 
+
+pwm_24m_clk_set:
+61de 596e3600 setarg pwm_24mhz 
+61df 20600000 rtn 
+
+pwm_33k_clk_set:
+61e0 580080e8 setarg pwm_33khz 
+61e1 20600000 rtn 
+
+pwm_cont_set:
+61e2 6fe0895d fetch 1 ,mem_pdatatemp + 1 
+61e3 c28261e6 bbit1 4 ,pwm_cont_set1 
+61e4 c30261ed bbit0 4 ,pwm_cont_set0 
+61e5 20600000 rtn 
+
+pwm_cont_set1:
+61e6 78347c00 enable user 
+61e7 1fe10e0f and pdata ,0x0f ,queue 
+61e8 204061f4 call pwm_set_value 
+61e9 1807a400 quotient regb 
+61ea 18427e00 copy temp ,pdata 
+61eb 9a462200 isub regb ,rega 
+61ec 20600000 rtn 
+
+pwm_cont_set0:
+61ed 78547c00 disable user 
+61ee 1fe10e0f and pdata ,0x0f ,queue 
+61ef 204061f4 call pwm_set_value 
+61f0 1807a200 quotient rega 
+61f1 18427e00 copy temp ,pdata 
+61f2 9a262400 isub rega ,regb 
+61f3 20600000 rtn 
+
+pwm_set_value:
+61f4 6ff080d8 fetch 1 ,core_pwm_init 
+61f5 f9347e00 qsetflag user ,pdata 
+61f6 67f080d8 store 1 ,core_pwm_init 
+61f7 20600000 rtn 
+
+pwm_out_set:
+61f8 6849895e fetcht 3 ,mem_pdatatemp + 2 
+61f9 204061d9 call pwm_clk_set 
+61fa 9846fc00 idiv temp 
+61fb 20407def call wait_div_end 
+61fc 18078400 quotient temp 
+61fd 6fe08961 fetch 1 ,mem_pdatatemp + 5 
+61fe 984ffe00 imul32 temp ,pdata 
+61ff 1fe6fc64 div pdata ,100 
+6200 20407def call wait_div_end 
+6201 204061e2 call pwm_cont_set 
+6202 6fe0895d fetch 1 ,mem_pdatatemp + 1 
+6203 2040620a call pwm_duty_cycle_set 
+6204 6fe0895c fetch 1 ,mem_pdatatemp 
+6205 6848895d fetcht 1 ,mem_pdatatemp + 1 
+6206 1841040f and_into 0x0f ,temp 
+6207 184d0400 lshift8 temp ,temp 
+6208 9841fe00 ior temp ,pdata 
+6209 20206213 branch pwm_enable 
+
+pwm_duty_cycle_set:
+620a 1fe17e0f and_into 0x0f ,pdata 
+620b d8a080a0 arg core_pwm_pcnt0 ,contw 
+620c 1feffe04 mul32 pdata ,4 ,pdata 
+620d 98a08a00 iadd contw ,contw 
+620e 1a227e00 copy rega ,pdata 
+620f e7e10005 istore 2 ,contw 
+6210 1a427e00 copy regb ,pdata 
+6211 e7e10005 istore 2 ,contw 
+6212 20600000 rtn 
+
+pwm_enable:
+6213 78347c00 enable user 
+6214 20406228 call pwm_srst_set 
+6215 20206218 branch pwm_gpio_set 
+
+pwm_disable:
+6216 78547c00 disable user 
+6217 20406223 call pwm_select_channel 
+
+pwm_gpio_set:
+6218 18427e00 copy temp ,pdata 
+6219 1fed7e00 lshift8 pdata ,pdata 
+621a 18e08410 add queue ,gpcfg_pwm_out0 ,temp 
+621b 9841fe00 ior temp ,pdata 
+621c 2040608f call gpio_config_param 
+
+pwm_set_select:
+621d 6ff08084 fetch 1 ,core_pwm_en 
+621e 70808400 jam 0x00 ,core_pwm_en 
+621f 200004b0 nop 1200 
+6220 f9347e00 qsetflag user ,pdata 
+6221 67f08084 store 1 ,core_pwm_en 
+6222 20600000 rtn 
+
+pwm_select_channel:
+6223 1fe20400 copy pdata ,temp 
+6224 1fecfe00 rshift8 pdata ,pdata 
+6225 1fe20e00 copy pdata ,queue 
+6226 20600000 rtn 
+
+pwm_srst_powerdown:
+6227 78547c00 disable user 
+
+pwm_srst_set:
+6228 20406223 call pwm_select_channel 
+6229 6ff080dd fetch 1 ,core_pwm_srst 
+622a fd347e00 nqsetflag user ,pdata 
+622b 67f080dd store 1 ,core_pwm_srst 
+622c 20206218 branch pwm_gpio_set 
+
+wdt_init_config:
+622d d8402710 arg 0x2710 ,temp 
+622e 984ffe00 imul32 temp ,pdata 
+622f d841312d arg 0x1312d ,temp 
+6230 9846fc00 idiv temp 
+6231 20407def call wait_div_end 
+6232 18078400 quotient temp 
+6233 58000800 setarg 2048 
+6234 98467e00 isub temp ,pdata 
+6235 1fe20400 copy pdata ,temp 
+6236 1841040f and_into 0x0f ,temp 
+6237 6058800b storet 1 ,core_write_wdt2 
+6238 1fe20400 copy pdata ,temp 
+6239 18518400 rshift4 temp ,temp 
+623a 60588004 storet 1 ,core_write_wdt 
+623b 20600000 rtn 
+
+wdt_set_enable:
+623c 78347c00 enable user 
+623d 2020623f branch wdt_init_set 
+
+wdt_set_disable:
+623e 78547c00 disable user 
+
+wdt_init_set:
+623f 6ff08043 fetch 1 ,core_config 
+6240 79347e03 setflag user ,3 ,pdata 
+6241 67f08043 store 1 ,core_config 
+6242 20600000 rtn 
+
+nec61212_init:
+6243 d8400031 arg fun_nec_enable | fun_nec_clk_divide_24 ,temp 
+
+nec_init_config:
+6244 67f200ca store 4 ,core_nec_start_addr 
+6245 67f100ce store 2 ,core_nec_rptr 
+6246 605880d0 storet 1 ,core_nec_control 
+6247 20600000 rtn 
+
+nec_check_rxbuff_size:
+6248 6ff10130 fetch 2 ,core_nec_rxitem 
+6249 20600000 rtn 
+
+nec_prepare_read:
+624a 687100ce fetchr contu ,2 ,core_nec_rptr 
+624b 695100ca fetchr contus ,2 ,core_nec_start_addr 
+624c 6a1100cc fetchr contue ,2 ,core_nec_end_addr 
+624d 20600000 rtn 
+
+nec_read_done:
+624e 607100ce storer contu ,2 ,core_nec_rptr 
+624f 20600000 rtn 
+
+nec_parse_nec61212:
+6250 20407e54 call enable_user 
+6251 dd600000 arg 0 ,rege 
+6252 20406248 call nec_check_rxbuff_size 
+6253 c0016292 beq 2 ,nec_parse_nec61212_check_timeout 
+6254 1fe67c04 sub pdata ,4 ,null 
+6255 20610000 rtn positive 
+6256 2040624a call nec_prepare_read 
+6257 e8410003 ifetcht 2 ,contu 
+6258 5800a654 setarg nec61212_data2repeat_time 
+6259 2040629b call nec_check_pulse_range_legal_default_deviation 
+625a 24216280 nbranch nec_parse_nec61212_check_repeat_data ,positive 
+625b 1b020400 copy regd ,temp 
+625c 58017f8e setarg nec61212_repeat2repeat_time 
+625d 2040629b call nec_check_pulse_range_legal_default_deviation 
+625e 24216280 nbranch nec_parse_nec61212_check_repeat_data ,positive 
+625f 1b020400 copy regd ,temp 
+6260 58002328 setarg nec61212_boot_code_start_time 
+6261 2040629b call nec_check_pulse_range_legal_default_deviation 
+6262 20216277 branch nec_parse_nec61212_error_data ,positive 
+6263 e8410003 ifetcht 2 ,contu 
+6264 58001194 setarg nec61212_boot_code_end_time 
+6265 2040629b call nec_check_pulse_range_legal_default_deviation 
+6266 20216277 branch nec_parse_nec61212_error_data ,positive 
+6267 20406248 call nec_check_rxbuff_size 
+6268 1fe67c85 sub pdata ,133 ,null 
+6269 20610000 rtn positive 
+626a df200020 arg 32 ,loopcnt 
+
+nec_parse_nec61212_data:
+626b e8410003 ifetcht 2 ,contu 
+626c 58000230 setarg nec61212_data_bit_1_start_time 
+626d 2040629b call nec_check_pulse_range_legal_default_deviation 
+626e 20216277 branch nec_parse_nec61212_error_data ,positive 
+626f e8410003 ifetcht 2 ,contu 
+6270 5800069a setarg nec61212_data_bit_1_end_time 
+6271 2040629b call nec_check_pulse_range_legal_default_deviation 
+6272 2421627c nbranch nec_parse_nec61212_add_bit1 ,positive 
+6273 1b020400 copy regd ,temp 
+6274 58000230 setarg nec61212_data_bit_0_end_time 
+6275 2040629b call nec_check_pulse_range_legal_default_deviation 
+6276 2421627d nbranch nec_parse_nec61212_add_bit0 ,positive 
+
+nec_parse_nec61212_error_data:
+6277 1b020400 copy regd ,temp 
+6278 5800ffff setarg nec61212_timeout_time 
+6279 98467c00 isub temp ,null 
+627a 2022e297 branch nec_parse_nec61212_check_timeout_cb ,zero 
+627b 2020624e branch nec_read_done 
+
+nec_parse_nec61212_add_bit1:
+627c 79205620 set1 32 ,rege 
+
+nec_parse_nec61212_add_bit0:
+627d 1d635600 rshift rege ,rege 
+627e c200626b loop nec_parse_nec61212_data 
+627f 2020628b branch nec_parse_nec61212_check_stop_bit 
+
+nec_parse_nec61212_check_repeat_data:
+6280 20406248 call nec_check_rxbuff_size 
+6281 1fe67c07 sub pdata ,7 ,null 
+6282 20610000 rtn positive 
+6283 e8410003 ifetcht 2 ,contu 
+6284 58002328 setarg nec61212_repeat_start_time 
+6285 2040629b call nec_check_pulse_range_legal_default_deviation 
+6286 20216277 branch nec_parse_nec61212_error_data ,positive 
+6287 e8410003 ifetcht 2 ,contu 
+6288 580008ca setarg nec61212_repeat_end_time 
+6289 2040629b call nec_check_pulse_range_legal_default_deviation 
+628a 20216277 branch nec_parse_nec61212_error_data ,positive 
+
+nec_parse_nec61212_check_stop_bit:
+628b e8410003 ifetcht 2 ,contu 
+628c 58000230 setarg nec61212_stop_time 
+628d 2040629b call nec_check_pulse_range_legal_default_deviation 
+628e 20216277 branch nec_parse_nec61212_error_data ,positive 
+628f 2040624e call nec_read_done 
+6290 1a627e00 copy regc ,pdata 
+6291 20207e05 branch callback_func 
+
+nec_parse_nec61212_check_timeout:
+6292 2040624a call nec_prepare_read 
+6293 e8410003 ifetcht 2 ,contu 
+6294 5800ffff setarg nec61212_timeout_time 
+6295 98467c00 isub temp ,null 
+6296 24628000 nrtn zero 
+
+nec_parse_nec61212_check_timeout_cb:
+6297 2040624e call nec_read_done 
+6298 20407e56 call disable_user 
+6299 1a627e00 copy regc ,pdata 
+629a 20207e05 branch callback_func 
+
+nec_check_pulse_range_legal_default_deviation:
+629b da40000a arg 10 ,regb 
+
+nec_check_pulse_range_legal:
+629c 18423000 copy temp ,regd 
+629d 9a4fa400 imul32 regb ,regb 
+629e 18438400 lshift temp ,temp 
+629f 98462200 isub temp ,rega 
+62a0 244162a4 ncall nec_check_pulse_range_legal_data_negative ,positive 
+62a1 1a2ffe64 mul32 rega ,100 ,pdata 
+62a2 9a467c00 isub regb ,null 
+62a3 20600000 rtn 
+
+nec_check_pulse_range_legal_data_negative:
+62a4 1a262200 sub rega ,0 ,rega 
+62a5 20600000 rtn 
+
+select_system_clk_24m:
+62a6 7041f018 jam system_clk_24m ,mem_system_clk 
+62a7 70804201 jam clksel_dpll_24m ,core_clksel 
+62a8 58001d4b setarg 7499 
+62a9 67f10040 store 2 ,core_halfslot 
+
+calc_new_param:
+62aa df20000b arg 11 ,loopcnt 
+62ab da200155 arg mem_param_tx_setup ,rega 
+
+calc_new_param_loop:
+62ac efe10011 ifetch 2 ,rega 
+62ad 1fe3fe00 lshift pdata ,pdata 
+62ae e7e10011 istore 2 ,rega 
+62af 1a20a202 increase 2 ,rega 
+62b0 c20062ac loop calc_new_param_loop 
+62b1 20600000 rtn 
+
+calc_new_le_time:
+62b2 1b63b600 lshift stop_watch ,stop_watch 
+62b3 20600000 rtn 
+
+select_system_clk_12m_xtal:
+62b4 70804204 jam clksel_xtal ,core_clksel 
+
+select_system_clk_12m_common:
+62b5 7041f00c jam system_clk_12m ,mem_system_clk 
+62b6 58000ea5 setarg 3749 
+62b7 67f10040 store 2 ,core_halfslot 
+62b8 20600000 rtn 
+
+select_system_clk_12m_dpll:
+62b9 70804205 jam clksel_dpll ,core_clksel 
+62ba 202062b5 branch select_system_clk_12m_common 
+
+rfcomm_init:
+62bb 20758000 rtn wake 
+62bc 70465200 jam 0 ,mem_rfcomm_send_more_pkt 
+62bd 7003c003 jam bits9600 ,memremoterpnbitrate 
+62be 7003c103 jam databits8 ,memremoteprndatabits 
+62bf 7003c511 jam 0x11 ,memremoteprnxon 
+62c0 7003c613 jam 0x13 ,memremoteprnxoff 
+62c1 58000000 setarg 0 
+62c2 67e183c2 store 3 ,memremoteprnstopbit 
+62c3 67e0c4e4 store 1 ,mem_spp_state 
+62c4 70478b00 jam 0 ,memui_reconnect_mode 
+
+rfcomm_init_spp:
+62c5 58000000 setarg 0 
+62c6 67e0c4e4 store 1 ,mem_spp_state 
+62c7 67e0c64f store 1 ,mem_remote_spp_channel 
+62c8 67e0c648 store 1 ,mem_pn_dlci 
+62c9 6fe0c656 fetch 1 ,mem_rfcomm_credit_flag 
+62ca c000e2cd beq credit_enable ,rfcomm_init_spp_with_credit 
+62cb 70465450 jam 0x50 ,mem_credit_given 
+62cc 20600000 rtn 
+
+rfcomm_init_spp_with_credit:
+62cd 70465400 jam 0x00 ,mem_credit_given 
+62ce 20600000 rtn 
+
+set_cr_bit:
+62cf 18418402 or_into 0x02 ,temp 
+62d0 20600000 rtn 
+
+rfcomm_calculate_fcs_sabm:
+62d1 18427e00 copy temp ,pdata 
+62d2 1fedfe00 reverse pdata ,pdata 
+62d3 67e0c64d store 1 ,memfcstemp3 
+62d4 18007e3f force ini_tx_sabm ,pdata 
+62d5 1fedfe00 reverse pdata ,pdata 
+62d6 67e0c64c store 1 ,memfcstemp2 
+62d7 18007e01 force 0x01 ,pdata 
+62d8 1fedfe00 reverse pdata ,pdata 
+62d9 67e0c64b store 1 ,memfcstemp1 
+62da 20406307 call caculate_fcs 
+62db 18427e00 copy temp ,pdata 
+62dc 20600000 rtn 
+
+rfcomm_calculate_fcs_ua:
+62dd 1fedfe00 reverse pdata ,pdata 
+62de 67e0c64d store 1 ,memfcstemp3 
+62df 18007e73 force rsp_tx_ua ,pdata 
+62e0 1fedfe00 reverse pdata ,pdata 
+62e1 67e0c64c store 1 ,memfcstemp2 
+62e2 18007e01 force 0x01 ,pdata 
+62e3 1fedfe00 reverse pdata ,pdata 
+62e4 67e0c64b store 1 ,memfcstemp1 
+62e5 20206307 branch caculate_fcs 
+
+rfcomm_calculate_fcs_dlci0:
+62e6 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+62e7 203a62ea branch rfcomm_calculate_fcs_dlci0_res ,blank 
+62e8 58000070 setarg 0x70 
+62e9 20600000 rtn 
+
+rfcomm_calculate_fcs_dlci0_res:
+62ea 580000aa setarg 0xaa 
+62eb 20600000 rtn 
+
+rfcomm_save_fcs_uih:
+62ec 1fedfe00 reverse pdata ,pdata 
+62ed 67e0c64d store 1 ,memfcstemp3 
+62ee 18007eef force rsp_rx_uih ,pdata 
+62ef 204062fb call caculate_uihdata_fcs 
+62f0 684903ca fetcht 2 ,mem_contw_temp 
+62f1 18420a00 copy temp ,contw 
+62f2 e7e08005 istore 1 ,contw 
+62f3 18a20400 copy contw ,temp 
+62f4 604903ca storet 2 ,mem_contw_temp 
+62f5 18007eff force rsp_rx_uih_wdata ,pdata 
+62f6 204062fb call caculate_uihdata_fcs 
+62f7 684903ca fetcht 2 ,mem_contw_temp 
+62f8 18420a00 copy temp ,contw 
+62f9 e7e08005 istore 1 ,contw 
+62fa 20600000 rtn 
+
+caculate_uihdata_fcs:
+62fb 1fedfe00 reverse pdata ,pdata 
+62fc 67e0c64c store 1 ,memfcstemp2 
+62fd 6fe1464c fetch 2 ,memfcstemp2 
+62fe 1fed7e00 lshift8 pdata ,pdata 
+62ff 67e183c7 store 3 ,mem_mod2div_temp 
+6300 da200107 arg 0x107 ,rega 
+6301 da40000f arg 0xf ,regb 
+6302 20406314 call mod2div 
+6303 1fe2fed7 xor_into 0xd7 ,pdata 
+6304 1fe47e00 invert pdata ,pdata 
+6305 1fedfe00 reverse pdata ,pdata 
+6306 20600000 rtn 
+
+caculate_fcs:
+6307 6fe1c64b fetch 3 ,memfcstemp1 
+6308 67e183c7 store 3 ,mem_mod2div_temp 
+6309 da200107 arg 0x107 ,rega 
+630a da40000f arg 0xf ,regb 
+630b 20406314 call mod2div 
+630c 1fed7e00 lshift8 pdata ,pdata 
+630d da400007 arg 0x7 ,regb 
+630e 20406314 call mod2div 
+630f 1fe2fe2b xor_into 0x2b ,pdata 
+6310 1fe47e00 invert pdata ,pdata 
+6311 1fedfe00 reverse pdata ,pdata 
+6312 1fe20400 copy pdata ,temp 
+6313 20600000 rtn 
+
+mod2div:
+6314 da600000 arg 0 ,regc 
+6315 1a427200 copy regb ,loopcnt 
+6316 20407cbd call right_shift_n 
+6317 1fe20400 icopy temp 
+
+mod2div_loop:
+6318 18427e00 copy temp ,pdata 
+6319 1a63a600 lshift regc ,regc 
+631a c304631d bbit0 8 ,mod2div_not_enough_reduction 
+631b 9a228400 ixor rega ,temp 
+631c 1a60a601 increase 1 ,regc 
+
+mod2div_not_enough_reduction:
+631d 18438400 lshift temp ,temp 
+631e 6fe183c7 fetch 3 ,mem_mod2div_temp 
+631f 1a40a5ff increase -1 ,regb 
+6320 2a41feff compare 0xff ,regb ,0xff 
+6321 2020e327 branch mod2div_end ,true 
+6322 1a427200 copy regb ,loopcnt 
+6323 20407cbd call right_shift_n 
+6324 2feffe00 isolate1 0 ,pdata 
+6325 79208400 setflag true ,0 ,temp 
+6326 20206318 branch mod2div_loop 
+
+mod2div_end:
+6327 18437e00 rshift temp ,pdata 
+6328 20600000 rtn 
+
+get_rfcomm_snd_adss:
+6329 6848c648 fetcht 1 ,mem_pn_dlci 
+
+dlci_to_address_cmd:
+632a 184b8400 lshift2 temp ,temp 
+632b 79200400 set1 rfcomm_address_ext_len ,temp 
+632c 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+632d 245a62cf ncall set_cr_bit ,blank 
+632e 604883e0 storet 1 ,mem_rfcomm_send_adss 
+632f 20600000 rtn 
+
+channel_to_dlci:
+6330 18438400 lshift temp ,temp 
+6331 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+6332 793a0400 setflag blank ,0 ,temp 
+6333 20600000 rtn 
+
+rfcomm_rx_process_dlci0_sabm:
+6334 684883cf fetcht 1 ,mem_current_channel 
+6335 7003d1d7 jam 0xd7 ,mem_current_fcs 
+6336 2040646d call rfcomm_send_ua 
+6337 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+6338 79207e06 set1 l2cap_channel_rfcomm_only_sabm ,pdata 
+6339 79207e07 set1 l2cap_channel_rfcomm_only_ua ,pdata 
+633a 67e0c4e1 store 1 ,mem_rfcomm_state 
+633b 70464e00 jam 0 ,mem_rfcomm_initiator 
+633c 2020644e branch rfcomm_rx_process_end 
+
+rfcomm_rx_process_dlci0_ua:
+633d 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+633e 79207e07 set1 l2cap_channel_rfcomm_only_ua ,pdata 
+633f 67e0c4e1 store 1 ,mem_rfcomm_state 
+6340 2020644e branch rfcomm_rx_process_end 
+
+rfcomm_rx_process:
+6341 471cc027 bpatchx patch27_1 ,mem_patch27 
+6342 6fe0c78b fetch 1 ,memui_reconnect_mode 
+6343 c0006345 beq no_reconnection ,rfcomm_rx_process_remote_page 
+6344 20206403 branch rfcomm_rx_process_reconn 
+
+rfcomm_rx_process_remote_page:
+6345 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+6346 1fe20c00 copy pdata ,contr 
+6347 2040636f call get_rfcomm_head_struct 
+6348 6fe083cf fetch 1 ,mem_current_channel 
+6349 c000634b beq 0 ,parse_dlci0_rp 
+634a 202063cf branch parse_uih_rp 
+
+parse_dlci0_rp:
+634b 471d4027 bpatchx patch27_2 ,mem_patch27 
+634c 6fe083d0 fetch 1 ,mem_current_frame_type 
+634d c01fe334 beq rfcomm_frame_type_sabm ,rfcomm_rx_process_dlci0_sabm 
+634e c039e33d beq rfcomm_frame_type_ua ,rfcomm_rx_process_dlci0_ua 
+634f c077e352 beq rfcomm_frame_type_uih ,parse_dlci0_rp_uih 
+6350 c029e3fb beq rfcomm_frame_type_disconn ,parse_uih_rp_spp_disconn_send_event 
+6351 20600000 rtn 
+
+parse_dlci0_rp_uih:
+6352 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+6353 1fe20c00 copy pdata ,contr 
+6354 2040637a call get_rfcomm_uih_head_struct 
+6355 6fe083d6 fetch 1 ,mem_uih_cmd_type 
+6356 c020e35c beq uih_param_neg_cmd ,parse_dlci0_rp_uih_pn_cmd 
+6357 c0206364 beq uih_param_neg_res ,parse_dlci0_rp_uih_pn_res 
+6358 c038e39d beq uih_modem_status_cmd ,parse_dlci0_rp_uih_ms_cmd 
+6359 c03863a9 beq uih_modem_status_res ,parse_dlci0_rp_uih_ms_res 
+635a c024e3b4 beq uih_param_cmd_remove_port ,parse_dlci0_rp_uih_cmd_port 
+635b 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_pn_cmd:
+635c 20406366 call parse_dlci0_rp_uih_pn_res_common 
+635d 2020635e branch parse_dlci0_rp_uih_pn_cmd_spp 
+
+parse_dlci0_rp_uih_pn_cmd_spp:
+635e 6fe0c4e4 fetch 1 ,mem_spp_state 
+635f 79207e00 set1 rfcomm_channel_state_pn_cmd ,pdata 
+6360 79207e01 set1 rfcomm_channel_state_pn_res ,pdata 
+6361 67e0c4e4 store 1 ,mem_spp_state 
+6362 20406497 call rfcomm_send_param_neg_res 
+6363 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_pn_res:
+6364 20406366 call parse_dlci0_rp_uih_pn_res_common 
+6365 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_pn_res_common:
+6366 20406382 call get_param_payload_ptr 
+6367 2020638e branch get_rfcomm_prarmer_negotiation 
+
+get_rfcomm_param_modem_status:
+6368 20406382 call get_param_payload_ptr 
+6369 efe08006 ifetch 1 ,contr 
+636a 1fe97e00 rshift3 pdata ,pdata 
+636b 67e0c655 store 1 ,mem_ms_channel 
+636c efe08006 ifetch 1 ,contr 
+636d 67e083db store 1 ,mem_ms_param 
+636e 20600000 rtn 
+
+get_rfcomm_head_struct:
+636f efe08006 ifetch 1 ,contr 
+6370 67e083ce store 1 ,mem_current_adss 
+6371 1fe97e00 rshift3 pdata ,pdata 
+6372 67e083cf store 1 ,mem_current_channel 
+6373 efe08006 ifetch 1 ,contr 
+6374 67e083d0 store 1 ,mem_current_frame_type 
+
+get_rfcomm_current_length:
+6375 20406385 call get_rfcomm_length_common 
+6376 604903d2 storet 2 ,mem_current_length 
+6377 18c27e00 copy contr ,pdata 
+6378 67e103d4 store 2 ,mem_rfcomm_uih_payload_ptr 
+6379 20600000 rtn 
+
+get_rfcomm_uih_head_struct:
+637a efe08006 ifetch 1 ,contr 
+637b 1fe37e00 rshift pdata ,pdata 
+637c 67e083d6 store 1 ,mem_uih_cmd_type 
+637d 20406385 call get_rfcomm_length_common 
+637e 604903d7 storet 2 ,mem_uih_length 
+637f 18c27e00 copy contr ,pdata 
+6380 67e103d9 store 2 ,mem_param_payload_ptr 
+6381 20600000 rtn 
+
+get_param_payload_ptr:
+6382 6fe103d9 fetch 2 ,mem_param_payload_ptr 
+6383 1fe20c00 copy pdata ,contr 
+6384 20600000 rtn 
+
+get_rfcomm_length_common:
+6385 efe08006 ifetch 1 ,contr 
+6386 1fe20400 copy pdata ,temp 
+6387 18430400 rshift temp ,temp 
+6388 c3800000 rtnbit1 0 
+6389 efe08006 ifetch 1 ,contr 
+638a 1fe9fe00 lshift3 pdata ,pdata 
+638b 1ff27e00 lshift4 pdata ,pdata 
+638c 98408400 iadd temp ,temp 
+638d 20600000 rtn 
+
+get_rfcomm_prarmer_negotiation:
+638e efe08006 ifetch 1 ,contr 
+638f 67e0c648 store 1 ,mem_pn_dlci 
+6390 efe08006 ifetch 1 ,contr 
+6391 67e083dc store 1 ,mem_pn_credit_flow_type_info 
+6392 efe08006 ifetch 1 ,contr 
+6393 67e083dd store 1 ,mem_pn_priority 
+6394 efe08006 ifetch 1 ,contr 
+6395 67e083de store 1 ,mem_pn_acknowledg_timer 
+6396 efe10006 ifetch 2 ,contr 
+6397 67e14649 store 2 ,mem_pn_max_frame_size 
+6398 efe08006 ifetch 1 ,contr 
+6399 67e083df store 1 ,mem_pn_max_retrans 
+639a efe08006 ifetch 1 ,contr 
+639b 67e0c653 store 1 ,mem_remote_credits 
+639c 20600000 rtn 
+
+parse_dlci0_rp_uih_ms_cmd:
+639d 20406368 call get_rfcomm_param_modem_status 
+639e 2020639f branch parse_dlci0_rp_uih_ms_cmd_spp 
+
+parse_dlci0_rp_uih_ms_cmd_spp:
+639f 6fe0c4e4 fetch 1 ,mem_spp_state 
+63a0 79207e05 set1 rfcomm_channel_state_rcv_ms_cmd ,pdata 
+63a1 79207e06 set1 rfcomm_channel_state_snd_ms_res ,pdata 
+63a2 67e0c4e4 store 1 ,mem_spp_state 
+63a3 6848c648 fetcht 1 ,mem_pn_dlci 
+63a4 184b8400 lshift2 temp ,temp 
+63a5 18418403 or_into 3 ,temp 
+63a6 204064c8 call rfcomm_send_modem_status_res 
+63a7 70465203 jam more_pkt_msc_cmd_spp ,mem_rfcomm_send_more_pkt 
+63a8 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_ms_res:
+63a9 70095b08 jam bt_evt_spp_connected ,mem_fifo_temp 
+63aa 20407871 call ui_ipc_send_event 
+63ab 20406368 call get_rfcomm_param_modem_status 
+63ac 6fe0c655 fetch 1 ,mem_ms_channel 
+63ad 1fe67c01 sub pdata ,1 ,null 
+63ae 2022e3b0 branch parse_dlci0_rp_uih_ms_res_spp ,zero 
+63af 2020137a branch assert 
+
+parse_dlci0_rp_uih_ms_res_spp:
+63b0 6fe0c4e4 fetch 1 ,mem_spp_state 
+63b1 79207e07 set1 rfcomm_channel_state_rcv_ms_res ,pdata 
+63b2 67e0c4e4 store 1 ,mem_spp_state 
+63b3 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_rp_uih_cmd_port:
+63b4 20406382 call get_param_payload_ptr 
+63b5 efe08006 ifetch 1 ,contr 
+63b6 67e0898e store 1 ,mem_rpn_dlci 
+63b7 20405325 call l2cap_malloc_rfcomm_channel 
+63b8 20405333 call l2cap_get_rfcomm_tx_buff 
+63b9 5800000e setarg 0x000e 
+63ba e7e10005 istore 2 ,contw 
+63bb 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+63bc e7e10005 istore 2 ,contw 
+63bd 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+63be 1fe3fe00 lshift pdata ,pdata 
+63bf 79207e00 set1 0 ,pdata 
+63c0 e7e08005 istore 1 ,contw 
+63c1 471dc027 bpatchx patch27_3 ,mem_patch27 
+63c2 580015ef setarg 0x15ef 
+63c3 e7e10005 istore 2 ,contw 
+63c4 58001191 setarg 0x1191 
+63c5 e7e10005 istore 2 ,contw 
+63c6 6fe0898e fetch 1 ,mem_rpn_dlci 
+63c7 e7e08005 istore 1 ,contw 
+63c8 58000007 setarg 0x000007 
+63c9 e7e28005 istore 5 ,contw 
+63ca 58000001 setarg 0x01 
+63cb e7e10005 istore 2 ,contw 
+63cc 204062e6 call rfcomm_calculate_fcs_dlci0 
+63cd e7e08005 istore 1 ,contw 
+63ce 20600000 rtn 
+
+parse_uih_rp:
+63cf 202063d0 branch parse_uih_rp_spp 
+
+parse_uih_rp_spp:
+63d0 471e4027 bpatchx patch27_4 ,mem_patch27 
+63d1 6fe083d0 fetch 1 ,mem_current_frame_type 
+63d2 c039e3d8 beq rfcomm_frame_type_ua ,parse_uih_rp_spp_ua 
+63d3 c01fe3dc beq rfcomm_frame_type_sabm ,parse_uih_rp_spp_sabm 
+63d4 c077e3f6 beq rfcomm_frame_type_uih ,parse_uih_spp_uih 
+63d5 c07fe3ee beq rfcomm_frame_type_uih_credits ,parse_uih_spp_uih_credits 
+63d6 c029e3fd beq rfcomm_frame_type_disconn ,parse_uih_rp_spp_disconn 
+63d7 20600000 rtn 
+
+parse_uih_rp_spp_ua:
+63d8 6fe0c4e4 fetch 1 ,mem_spp_state 
+63d9 79207e03 set1 rfcomm_channel_state_ua ,pdata 
+63da 67e0c4e4 store 1 ,mem_spp_state 
+63db 2020644e branch rfcomm_rx_process_end 
+
+parse_uih_rp_spp_sabm:
+63dc 6fe0c4e4 fetch 1 ,mem_spp_state 
+63dd 79207e03 set1 rfcomm_channel_state_ua ,pdata 
+63de 79207e02 set1 rfcomm_channel_state_sabm ,pdata 
+63df 67e0c4e4 store 1 ,mem_spp_state 
+63e0 6fe083ce fetch 1 ,mem_current_adss 
+63e1 204062dd call rfcomm_calculate_fcs_ua 
+63e2 67e083d1 store 1 ,mem_current_fcs 
+63e3 2040646d call rfcomm_send_ua 
+63e4 6fe083ce fetch 1 ,mem_current_adss 
+63e5 1feb7e00 rshift2 pdata ,pdata 
+63e6 67e0c648 store 1 ,mem_pn_dlci 
+63e7 1febfe00 lshift2 pdata ,pdata 
+63e8 793ffe01 set0 rfcomm_address_cr ,pdata 
+63e9 79207e00 set1 rfcomm_address_ext_len ,pdata 
+63ea d8404650 arg mem_hiufcs_spp ,temp 
+63eb 604903ca storet 2 ,mem_contw_temp 
+63ec 204062ec call rfcomm_save_fcs_uih 
+63ed 2020644e branch rfcomm_rx_process_end 
+
+parse_uih_spp_uih_credits:
+63ee 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+63ef 1fe20c00 copy pdata ,contr 
+63f0 1fe0fe01 increase 1 ,pdata 
+63f1 67e103d4 store 2 ,mem_rfcomm_uih_payload_ptr 
+63f2 efe08006 ifetch 1 ,contr 
+63f3 6848c653 fetcht 1 ,mem_remote_credits 
+63f4 9840fe00 iadd temp ,pdata 
+63f5 67e0c653 store 1 ,mem_remote_credits 
+
+parse_uih_spp_uih:
+63f6 204064f9 call rfcomm_increase_credit_given 
+
+parse_uih_spp_uih_cont:
+63f7 20406329 call get_rfcomm_snd_adss 
+63f8 204064df call rfcomm_send_uih_without_payload 
+63f9 20406502 call spp_process_rx_data 
+63fa 2020644e branch rfcomm_rx_process_end 
+
+parse_uih_rp_spp_disconn_send_event:
+63fb 70095b09 jam bt_evt_spp_disconnected ,mem_fifo_temp 
+63fc 20407871 call ui_ipc_send_event 
+
+parse_uih_rp_spp_disconn:
+63fd 204062c5 call rfcomm_init_spp 
+63fe 6fe083ce fetch 1 ,mem_current_adss 
+63ff 204062dd call rfcomm_calculate_fcs_ua 
+6400 67e083d1 store 1 ,mem_current_fcs 
+6401 2040646d call rfcomm_send_ua 
+6402 2020644e branch rfcomm_rx_process_end 
+
+rfcomm_rx_process_reconn:
+6403 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+6404 1fe20c00 copy pdata ,contr 
+6405 2040636f call get_rfcomm_head_struct 
+6406 6fe083cf fetch 1 ,mem_current_channel 
+6407 c0006409 beq 0 ,parse_dlci0_reconn 
+6408 2020643d branch parse_uih_reconn 
+
+parse_dlci0_reconn:
+6409 471ec027 bpatchx patch27_5 ,mem_patch27 
+640a 6fe083d0 fetch 1 ,mem_current_frame_type 
+640b c01fe334 beq rfcomm_frame_type_sabm ,rfcomm_rx_process_dlci0_sabm 
+640c c039e33d beq rfcomm_frame_type_ua ,rfcomm_rx_process_dlci0_ua 
+640d c077e40f beq rfcomm_frame_type_uih ,parse_dlci0_reconn_uih 
+640e 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih:
+640f 6fe103d4 fetch 2 ,mem_rfcomm_uih_payload_ptr 
+6410 1fe20c00 copy pdata ,contr 
+6411 2040637a call get_rfcomm_uih_head_struct 
+6412 6fe083d6 fetch 1 ,mem_uih_cmd_type 
+6413 c020e418 beq uih_param_neg_cmd ,parse_dlci0_reconn_uih_pn_cmd 
+6414 c0206418 beq uih_param_neg_res ,parse_dlci0_reconn_uih_pn_cmd 
+6415 c038e423 beq uih_modem_status_cmd ,parse_dlci0_reconn_uih_ms_cmd 
+6416 c0386433 beq uih_modem_status_res ,parse_dlci0_reconn_uih_ms_res 
+6417 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_pn_cmd:
+6418 20406366 call parse_dlci0_rp_uih_pn_res_common 
+6419 6fe0c648 fetch 1 ,mem_pn_dlci 
+641a 1fe37e00 rshift pdata ,pdata 
+641b 6848c64f fetcht 1 ,mem_remote_spp_channel 
+641c 98467c00 isub temp ,null 
+641d 2022e41f branch parse_dlci0_reconn_uih_pn_cmd_spp ,zero 
+641e 2020137a branch assert 
+
+parse_dlci0_reconn_uih_pn_cmd_spp:
+641f 6fe0c4e4 fetch 1 ,mem_spp_state 
+6420 79207e01 set1 rfcomm_channel_state_pn_res ,pdata 
+6421 67e0c4e4 store 1 ,mem_spp_state 
+6422 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_ms_cmd:
+6423 20406368 call get_rfcomm_param_modem_status 
+6424 6fe0c655 fetch 1 ,mem_ms_channel 
+6425 6848c64f fetcht 1 ,mem_remote_spp_channel 
+6426 98467c00 isub temp ,null 
+6427 2022e42a branch parse_dlci0_reconn_uih_ms_cmd_spp ,zero 
+6428 2020137a branch assert 
+6429 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_ms_cmd_spp:
+642a 6fe0c4e4 fetch 1 ,mem_spp_state 
+642b 79207e05 set1 rfcomm_channel_state_rcv_ms_cmd ,pdata 
+642c 79207e06 set1 rfcomm_channel_state_snd_ms_res ,pdata 
+642d 67e0c4e4 store 1 ,mem_spp_state 
+642e 6848c648 fetcht 1 ,mem_pn_dlci 
+642f 184b8400 lshift2 temp ,temp 
+6430 18418403 or_into 3 ,temp 
+6431 204064c8 call rfcomm_send_modem_status_res 
+6432 2020644e branch rfcomm_rx_process_end 
+
+parse_dlci0_reconn_uih_ms_res:
+6433 20406368 call get_rfcomm_param_modem_status 
+6434 6fe0c655 fetch 1 ,mem_ms_channel 
+6435 6848c64f fetcht 1 ,mem_remote_spp_channel 
+6436 98467c00 isub temp ,null 
+6437 2022e439 branch parse_dlci0_reconn_uih_ms_res_spp ,zero 
+6438 2020137a branch assert 
+
+parse_dlci0_reconn_uih_ms_res_spp:
+6439 6fe0c4e4 fetch 1 ,mem_spp_state 
+643a 79207e07 set1 rfcomm_channel_state_rcv_ms_res ,pdata 
+643b 67e0c4e4 store 1 ,mem_spp_state 
+643c 2020644e branch rfcomm_rx_process_end 
+
+parse_uih_reconn:
+643d 6fe083cf fetch 1 ,mem_current_channel 
+643e 6848c64f fetcht 1 ,mem_remote_spp_channel 
+643f 98467c00 isub temp ,null 
+6440 2022e443 branch parse_uih_reconn_spp ,zero 
+6441 2020137a branch assert 
+6442 2020644e branch rfcomm_rx_process_end 
+
+parse_uih_reconn_spp:
+6443 6fe083d0 fetch 1 ,mem_current_frame_type 
+6444 c039e448 beq rfcomm_frame_type_ua ,parse_uih_reconn_spp_ua 
+6445 c077e3f6 beq rfcomm_frame_type_uih ,parse_uih_spp_uih 
+6446 c07fe3ee beq rfcomm_frame_type_uih_credits ,parse_uih_spp_uih_credits 
+6447 c029e44d beq rfcomm_frame_type_disconn ,parse_uih_reconn_spp_disconn 
+
+parse_uih_reconn_spp_ua:
+6448 6fe0c4e4 fetch 1 ,mem_spp_state 
+6449 79207e03 set1 rfcomm_channel_state_ua ,pdata 
+644a 67e0c4e4 store 1 ,mem_spp_state 
+644b 2020644e branch rfcomm_rx_process_end 
+
+parse_uih_reconn_spp_sabm:
+644c 2020644c branch parse_uih_reconn_spp_sabm 
+
+parse_uih_reconn_spp_disconn:
+644d 202063fd branch parse_uih_rp_spp_disconn 
+
+rfcomm_rx_process_end:
+644e 20600000 rtn 
+
+rfcomm_send_more_pkt:
+644f 6fe0c652 fetch 1 ,mem_rfcomm_send_more_pkt 
+6450 207a0000 rtn blank 
+6451 c001e453 beq more_pkt_msc_cmd_spp ,rfcomm_send_more_pkt_msc_cmd_spp 
+6452 2020137a branch assert 
+
+rfcomm_send_more_pkt_msc_cmd_spp:
+6453 70465200 jam 0 ,mem_rfcomm_send_more_pkt 
+6454 20405325 call l2cap_malloc_rfcomm_channel 
+6455 d8400001 arg spp_slave_channel ,temp 
+6456 6848c648 fetcht 1 ,mem_pn_dlci 
+6457 184b8400 lshift2 temp ,temp 
+
+rfcomm_send_more_pkt_msc_cmd_spp0:
+6458 18418403 or_into 0x03 ,temp 
+6459 da2000aa arg 0xaa ,rega 
+645a 204064b3 call rfcomm_send_modem_status_cmd 
+645b 20405333 call l2cap_get_rfcomm_tx_buff 
+645c 18a20c00 copy contw ,contr 
+645d efe10006 ifetch 2 ,contr 
+645e 203a137a branch assert ,blank 
+645f 20600000 rtn 
+
+rfcomm_send_sabm:
+6460 20405333 call l2cap_get_rfcomm_tx_buff 
+6461 58000004 setarg 0x0004 
+6462 e7e10005 istore 2 ,contw 
+6463 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+6464 e7e10005 istore 2 ,contw 
+6465 6fe083ce fetch 1 ,mem_current_adss 
+6466 e7e08005 istore 1 ,contw 
+6467 471f4027 bpatchx patch27_6 ,mem_patch27 
+6468 5800013f setarg 0x013f 
+6469 e7e10005 istore 2 ,contw 
+646a 6fe083d1 fetch 1 ,mem_current_fcs 
+646b e7e08005 istore 1 ,contw 
+646c 20600000 rtn 
+
+rfcomm_send_ua:
+646d 20405325 call l2cap_malloc_rfcomm_channel 
+646e 20405333 call l2cap_get_rfcomm_tx_buff 
+646f 58000004 setarg 0x0004 
+6470 e7e10005 istore 2 ,contw 
+6471 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+6472 e7e10005 istore 2 ,contw 
+6473 6fe083ce fetch 1 ,mem_current_adss 
+6474 e7e08005 istore 1 ,contw 
+6475 471fc027 bpatchx patch27_7 ,mem_patch27 
+6476 58000173 setarg 0x0173 
+6477 e7e10005 istore 2 ,contw 
+6478 6fe083d1 fetch 1 ,mem_current_fcs 
+6479 e7e08005 istore 1 ,contw 
+647a 20600000 rtn 
+
+rfcomm_send_param_neg_cmd:
+647b 20405333 call l2cap_get_rfcomm_tx_buff 
+647c 5800000e setarg 0x000e 
+647d e7e10005 istore 2 ,contw 
+647e 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+647f e7e10005 istore 2 ,contw 
+6480 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+6481 1fe3fe00 lshift pdata ,pdata 
+6482 79207e00 set1 0 ,pdata 
+6483 e7e08005 istore 1 ,contw 
+6484 47204028 bpatchx patch28_0 ,mem_patch28 
+6485 580015ef setarg 0x15ef 
+6486 e7e10005 istore 2 ,contw 
+6487 58001183 setarg 0x1183 
+6488 e7e10005 istore 2 ,contw 
+6489 18427e00 copy temp ,pdata 
+648a e7e08005 istore 1 ,contw 
+648b 580000f0 setarg 0x0000f0 
+648c e7e18005 istore 3 ,contw 
+648d 5800007f setarg rfcomm_max_frame_size 
+648e e7e10005 istore 2 ,contw 
+648f 58000000 setarg 0 
+6490 e7e08005 istore 1 ,contw 
+6491 58000001 setarg 0x01 
+6492 e7e08005 istore 1 ,contw 
+6493 204062e6 call rfcomm_calculate_fcs_dlci0 
+6494 e7e08005 istore 1 ,contw 
+6495 70465410 jam 0x10 ,mem_credit_given 
+6496 20600000 rtn 
+
+rfcomm_send_param_neg_res:
+6497 20405325 call l2cap_malloc_rfcomm_channel 
+6498 20405333 call l2cap_get_rfcomm_tx_buff 
+6499 5800000e setarg 0x000e 
+649a e7e10005 istore 2 ,contw 
+649b 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+649c e7e10005 istore 2 ,contw 
+649d 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+649e 1fe3fe00 lshift pdata ,pdata 
+649f 79207e00 set1 0 ,pdata 
+64a0 e7e08005 istore 1 ,contw 
+64a1 4720c028 bpatchx patch28_1 ,mem_patch28 
+64a2 580015ef setarg 0x15ef 
+64a3 e7e10005 istore 2 ,contw 
+64a4 58001181 setarg 0x1181 
+64a5 e7e10005 istore 2 ,contw 
+64a6 6fe0c648 fetch 1 ,mem_pn_dlci 
+64a7 e7e08005 istore 1 ,contw 
+64a8 580000e0 setarg 0x0000e0 
+64a9 e7e18005 istore 3 ,contw 
+64aa 6fe14657 fetch 2 ,mem_rfcomm_max_frame_size 
+64ab e7e10005 istore 2 ,contw 
+64ac 58000000 setarg 0x00 
+64ad e7e08005 istore 1 ,contw 
+64ae 6fe0c659 fetch 1 ,mem_rfcomm_credit_init_data 
+64af e7e08005 istore 1 ,contw 
+64b0 204062e6 call rfcomm_calculate_fcs_dlci0 
+64b1 e7e08005 istore 1 ,contw 
+64b2 20600000 rtn 
+
+rfcomm_send_modem_status_cmd:
+64b3 20405333 call l2cap_get_rfcomm_tx_buff 
+64b4 58000008 setarg 0x0008 
+64b5 e7e10005 istore 2 ,contw 
+64b6 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+64b7 e7e10005 istore 2 ,contw 
+64b8 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+64b9 1fe3fe00 lshift pdata ,pdata 
+64ba 79207e00 set1 0 ,pdata 
+64bb e7e08005 istore 1 ,contw 
+64bc 47214028 bpatchx patch28_2 ,mem_patch28 
+64bd 580009ef setarg 0x09ef 
+64be e7e10005 istore 2 ,contw 
+64bf 580005e3 setarg 0x05e3 
+64c0 e7e10005 istore 2 ,contw 
+64c1 18427e00 copy temp ,pdata 
+64c2 e7e08005 istore 1 ,contw 
+64c3 5800008d setarg 0x8d 
+64c4 e7e08005 istore 1 ,contw 
+64c5 204062e6 call rfcomm_calculate_fcs_dlci0 
+64c6 e7e08005 istore 1 ,contw 
+64c7 20600000 rtn 
+
+rfcomm_send_modem_status_res:
+64c8 20405325 call l2cap_malloc_rfcomm_channel 
+64c9 20405333 call l2cap_get_rfcomm_tx_buff 
+64ca 58000008 setarg 0x0008 
+64cb e7e10005 istore 2 ,contw 
+64cc 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+64cd e7e10005 istore 2 ,contw 
+64ce 18421600 copy temp ,timeup 
+64cf 6fe0c64e fetch 1 ,mem_rfcomm_initiator 
+64d0 1fe3fe00 lshift pdata ,pdata 
+64d1 79207e00 set1 0 ,pdata 
+64d2 e7e08005 istore 1 ,contw 
+64d3 4721c028 bpatchx patch28_3 ,mem_patch28 
+64d4 580009ef setarg 0x09ef 
+64d5 e7e10005 istore 2 ,contw 
+64d6 580005e1 setarg 0x05e1 
+64d7 e7e10005 istore 2 ,contw 
+64d8 19627e00 copy timeup ,pdata 
+64d9 e7e08005 istore 1 ,contw 
+64da 5800008d setarg 0x8d 
+64db e7e08005 istore 1 ,contw 
+64dc 204062e6 call rfcomm_calculate_fcs_dlci0 
+64dd e7e08005 istore 1 ,contw 
+64de 20600000 rtn 
+
+rfcomm_send_uih_without_payload:
+64df 47224028 bpatchx patch28_4 ,mem_patch28 
+64e0 6fe0c654 fetch 1 ,mem_credit_given 
+64e1 207a0000 rtn blank 
+64e2 6ff10112 fetch 2 ,core_uart_rxitems 
+64e3 247a0000 nrtn blank 
+64e4 1a227e00 copy rega ,pdata 
+64e5 67e0895d store 1 ,mem_pdatatemp + 1 
+64e6 6048895c storet 1 ,mem_pdatatemp 
+64e7 204052f1 call l2cap_malloc_is_fifo_full 
+64e8 247a0000 nrtn blank 
+64e9 20405325 call l2cap_malloc_rfcomm_channel 
+64ea 20405333 call l2cap_get_rfcomm_tx_buff 
+64eb 58000005 setarg 0x05 
+64ec e7e10005 istore 2 ,contw 
+64ed 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+64ee e7e10005 istore 2 ,contw 
+64ef 6fe083e0 fetch 1 ,mem_rfcomm_send_adss 
+64f0 e7e08005 istore 1 ,contw 
+64f1 580001ff setarg 0x01ff 
+64f2 e7e10005 istore 2 ,contw 
+64f3 6fe0c654 fetch 1 ,mem_credit_given 
+64f4 e7e08005 istore 1 ,contw 
+64f5 6fe0c651 fetch 1 ,mem_hiufcs_spp_wcredits 
+64f6 e7e08005 istore 1 ,contw 
+64f7 70465400 jam 0 ,mem_credit_given 
+64f8 20600000 rtn 
+
+rfcomm_increase_credit_given:
+64f9 4722c028 bpatchx patch28_5 ,mem_patch28 
+64fa 6fe0c656 fetch 1 ,mem_rfcomm_credit_flag 
+64fb c1008000 rtneq credit_enable 
+64fc 6fe103d2 fetch 2 ,mem_current_length 
+64fd 207a0000 rtn blank 
+64fe 6fe0c654 fetch 1 ,mem_credit_given 
+64ff 1fe0fe01 increase 1 ,pdata 
+6500 67e0c654 store 1 ,mem_credit_given 
+6501 20600000 rtn 
+
+spp_process_rx_data:
+6502 6fe1465a fetch 2 ,mem_cb_receive_spp_data 
+6503 20207e05 branch callback_func 
+
+spp_tx_rfcomm_packet:
+6504 47234028 bpatchx patch28_6 ,mem_patch28 
+6505 6fe0c653 fetch 1 ,mem_remote_credits 
+6506 207a0000 rtn blank 
+6507 1fe0ffff increase -1 ,pdata 
+6508 67e0c653 store 1 ,mem_remote_credits 
+6509 6fe14649 fetch 2 ,mem_pn_max_frame_size 
+650a 684947a9 fetcht 2 ,mem_current_packet_length 
+650b 98467c00 isub temp ,null 
+650c 2021650e branch ssp_tx_rfcomm_from_uart ,positive 
+650d 67e147a9 store 2 ,mem_current_packet_length 
+
+ssp_tx_rfcomm_from_uart:
+650e 6fe0c654 fetch 1 ,mem_credit_given 
+650f 203a6516 branch ssp_tx_rfcomm_from_uart_without_credit ,blank 
+6510 7003e301 jam 1 ,mem_rfcomm_send_offset 
+6511 6fe0c651 fetch 1 ,mem_hiufcs_spp_wcredits 
+6512 67e083e2 store 1 ,mem_rfcomm_send_fcs 
+6513 580000ff setarg rsp_rx_uih_wdata 
+6514 67e083e1 store 1 ,mem_rfcomm_send_frame_type 
+6515 2020651b branch ssp_tx_rfcomm_from_uart_common 
+
+ssp_tx_rfcomm_from_uart_without_credit:
+6516 7003e300 jam 0 ,mem_rfcomm_send_offset 
+6517 6fe0c650 fetch 1 ,mem_hiufcs_spp 
+6518 67e083e2 store 1 ,mem_rfcomm_send_fcs 
+6519 580000ef setarg rsp_tx_uih 
+651a 67e083e1 store 1 ,mem_rfcomm_send_frame_type 
+
+ssp_tx_rfcomm_from_uart_common:
+651b 4723c028 bpatchx patch28_7 ,mem_patch28 
+651c 6fe147a9 fetch 2 ,mem_current_packet_length 
+651d 1fe67c7f sub pdata ,127 ,null 
+651e 20216522 branch ssp_tx_rfcomm_from_uart_common0 ,positive 
+651f 6fe083e3 fetch 1 ,mem_rfcomm_send_offset 
+6520 1fe0fe01 increase 1 ,pdata 
+6521 67e083e3 store 1 ,mem_rfcomm_send_offset 
+
+ssp_tx_rfcomm_from_uart_common0:
+6522 20406329 call get_rfcomm_snd_adss 
+6523 6fe147a9 fetch 2 ,mem_current_packet_length 
+6524 1fe0fe08 increase 8 ,pdata 
+6525 684883e3 fetcht 1 ,mem_rfcomm_send_offset 
+6526 9840a200 iadd temp ,rega 
+6527 2040529d call l2cap_malloc 
+6528 67e10328 store 2 ,mem_rfcomm_tx_buff_ptr 
+6529 1fe0fe04 increase 4 ,pdata 
+652a 67e1032a store 2 ,mem_rfcomm_tx_payload_ptr 
+652b 1fe20a00 copy pdata ,contw 
+652c 6fe083e0 fetch 1 ,mem_rfcomm_send_adss 
+652d e7e08005 istore 1 ,contw 
+652e 6fe083e1 fetch 1 ,mem_rfcomm_send_frame_type 
+652f e7e08005 istore 1 ,contw 
+6530 2040654c call ssp_tx_write_length 
+6531 2040655d call ssp_tx_write_given_credit 
+6532 47244029 bpatchx patch29_0 ,mem_patch29 
+6533 6fe1465c fetch 2 ,mem_nl_rx_data_src 
+6534 1fe20600 copy pdata ,contu 
+6535 6fe147a9 fetch 2 ,mem_current_packet_length 
+6536 1fe27200 copy pdata ,loopcnt 
+6537 20405f39 call uart_copy_rx_bytes_fast 
+6538 18a20400 copy contw ,temp 
+6539 18627e00 copy contu ,pdata 
+653a 67e1465c store 2 ,mem_nl_rx_data_src 
+653b 18420a00 copy temp ,contw 
+653c 6fe083e2 fetch 1 ,mem_rfcomm_send_fcs 
+653d e7e08005 istore 1 ,contw 
+653e 6fe10328 fetch 2 ,mem_rfcomm_tx_buff_ptr 
+653f 1fe20a00 copy pdata ,contw 
+6540 6fe147a9 fetch 2 ,mem_current_packet_length 
+6541 684883e3 fetcht 1 ,mem_rfcomm_send_offset 
+6542 9840fe00 iadd temp ,pdata 
+6543 1fe0fe04 increase 4 ,pdata 
+6544 e7e10005 istore 2 ,contw 
+6545 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+6546 e7e10005 istore 2 ,contw 
+6547 70465400 jam 0 ,mem_credit_given 
+6548 6fe1465e fetch 2 ,mem_nl_rx_len_all 
+6549 c00038b9 beq 0 ,module_hci_command_tx_spp_tx_complete 
+654a 7009d100 jam hci_not_discard_packet ,mem_module_temp_nl_discard_packet 
+654b 20600000 rtn 
+
+ssp_tx_write_length:
+654c 4724c029 bpatchx patch29_1 ,mem_patch29 
+654d 6fe147a9 fetch 2 ,mem_current_packet_length 
+654e 1fe67c7f sub pdata ,0x7f ,null 
+654f 24216554 nbranch ssp_tx_write_long_packet ,positive 
+6550 1fe3fe00 lshift pdata ,pdata 
+6551 79207e00 set1 0 ,pdata 
+6552 e7e08005 istore 1 ,contw 
+6553 20600000 rtn 
+
+ssp_tx_write_long_packet:
+6554 6fe147a9 fetch 2 ,mem_current_packet_length 
+6555 1fe97e00 rshift3 pdata ,pdata 
+6556 1ff18400 rshift4 pdata ,temp 
+6557 1fe17e7f and_into 0x7f ,pdata 
+6558 1fe3fe00 lshift pdata ,pdata 
+6559 793ffe00 set0 0 ,pdata 
+655a e7e08005 istore 1 ,contw 
+655b e0408005 istoret 1 ,contw 
+655c 20600000 rtn 
+
+ssp_tx_write_given_credit:
+655d 6fe0c654 fetch 1 ,mem_credit_given 
+655e 207a0000 rtn blank 
+655f e7e08005 istore 1 ,contw 
+6560 20600000 rtn 
+
+scheduler_process:
+6561 47254029 bpatchx patch29_2 ,mem_patch29 
+6562 20407887 call check_51cmd 
+6563 20403111 call app_process_bb_event 
+6564 20405a40 call process_conn_sm 
+6565 4725c029 bpatchx patch29_3 ,mem_patch29 
+6566 2040706c call sp_calc_sequence 
+6567 20407045 call simple_pairing_sequence 
+6568 20407056 call master_simple_paring_sequence 
+6569 204052f1 call l2cap_malloc_is_fifo_full 
+656a 247a0000 nrtn blank 
+656b 20404e04 call l2cap_call_proc_sigal_pending 
+656c 204052f1 call l2cap_malloc_is_fifo_full 
+656d 247a0000 nrtn blank 
+656e 47264029 bpatchx patch29_4 ,mem_patch29 
+656f 204065ab call process_upper_sm 
+6570 20404fc2 call l2cap_send_config_req 
+6571 2040644f call rfcomm_send_more_pkt 
+
+scheduler_process0:
+6572 20406575 call scheduler_tx_disconnect_hid 
+6573 4726c029 bpatchx patch29_5 ,mem_patch29 
+6574 2020310d branch app_process_bt 
+
+scheduler_tx_disconnect_hid:
+6575 6fe08330 fetch 1 ,mem_control_tasks 
+6576 c28050e5 bbit1 l2cap_disconnect_interrupt ,l2cap_disconnect_interrupt_req 
+6577 c283d0ef bbit1 l2cap_disconnect_control ,l2cap_disconnect_control_req 
+6578 20600000 rtn 
+
+scheduler_tx_l2cap_pkt:
+6579 47274029 bpatchx patch29_6 ,mem_patch29 
+657a 204052f7 call l2cap_malloc_is_fifo_empty 
+657b 207a0000 rtn blank 
+657c 6fe0804c fetch 1 ,mem_op 
+657d c3830000 rtnbit1 op_txl2cap 
+657e 204052db call l2cap_malloc_fifo_out 
+657f 67e100bf store 2 ,mem_txptr 
+6580 1fe20c00 copy pdata ,contr 
+6581 efe10006 ifetch 2 ,contr 
+6582 1fe0fe04 increase 4 ,pdata 
+6583 67e141e6 store 2 ,mem_tx_len 
+6584 7041e506 jam 6 ,mem_tx_lch 
+6585 4727c029 bpatchx patch29_7 ,mem_patch29 
+6586 6fe144d6 fetch 2 ,mem_l2cap_tx_multi_offset 
+6587 203a6594 branch scheduler_tx_l2cap_start_pkt ,blank 
+6588 6fe0804c fetch 1 ,mem_op 
+6589 c4038000 rtnbit0 op_pkt_comp 
+658a 793ffe07 set0 op_pkt_comp ,pdata 
+658b 67e0804c store 1 ,mem_op 
+658c 7041e505 jam 5 ,mem_tx_lch 
+658d 684944d6 fetcht 2 ,mem_l2cap_tx_multi_offset 
+658e 6fe100bf fetch 2 ,mem_txptr 
+658f 9840fe00 iadd temp ,pdata 
+6590 67e100bf store 2 ,mem_txptr 
+6591 6fe141e6 fetch 2 ,mem_tx_len 
+6592 98467e00 isub temp ,pdata 
+6593 67e141e6 store 2 ,mem_tx_len 
+
+scheduler_tx_l2cap_start_pkt:
+6594 6fe141e6 fetch 2 ,mem_tx_len 
+6595 203a137a branch assert ,blank 
+6596 d8400104 arg l2cap_max_pkt_len ,temp 
+6597 98467e00 isub temp ,pdata 
+6598 2022e59f branch scheduler_tx_l2cap_last_pkt ,zero 
+6599 2421659f nbranch scheduler_tx_l2cap_last_pkt ,positive 
+659a 604941e6 storet 2 ,mem_tx_len 
+659b 6fe144d6 fetch 2 ,mem_l2cap_tx_multi_offset 
+659c 9840fe00 iadd temp ,pdata 
+659d 67e144d6 store 2 ,mem_l2cap_tx_multi_offset 
+659e 202065a1 branch scheduler_tx_l2cap_pkt_end 
+
+scheduler_tx_l2cap_last_pkt:
+659f 58000000 setarg 0 
+65a0 67e144d6 store 2 ,mem_l2cap_tx_multi_offset 
+
+scheduler_tx_l2cap_pkt_end:
+65a1 6fe0804c fetch 1 ,mem_op 
+65a2 79207e06 set1 op_txl2cap ,pdata 
+65a3 67e0804c store 1 ,mem_op 
+65a4 20600000 rtn 
+
+scheduler_start_upper_sm:
+65a5 6fe0c78e fetch 1 ,mem_ui_profile_supported 
+65a6 c28065a9 bbit1 support_hid ,scheduler_start_upper_sm_hid 
+65a7 70033801 jam uppersm_reconn_sdp_conn ,mem_upper_sm_reconn 
+65a8 20600000 rtn 
+
+scheduler_start_upper_sm_hid:
+65a9 7003380f jam uppersm_reconn_hid_ctrl_conn ,mem_upper_sm_reconn 
+65aa 20600000 rtn 
+
+process_upper_sm:
+65ab 6fe0c78b fetch 1 ,memui_reconnect_mode 
+65ac 243a65b1 nbranch process_upper_sm_reconn ,blank 
+
+process_upper_sm_remote_page:
+65ad 6fe08337 fetch 1 ,mem_upper_sm_remote_page 
+65ae 207a0000 rtn blank 
+65af 70033700 jam 0 ,mem_upper_sm_remote_page 
+
+process_upper_sm_rp_wait:
+65b0 20600000 rtn 
+
+process_upper_sm_reconn:
+65b1 4728402a bpatchx patch2a_0 ,mem_patch2a 
+65b2 6fe08338 fetch 1 ,mem_upper_sm_reconn 
+65b3 207a0000 rtn blank 
+65b4 c000e5d1 beq uppersm_reconn_sdp_conn ,process_upper_sm_reconn_sdp_conn 
+65b5 c001662a beq uppersm_reconn_sdp_conn_wait ,process_upper_sm_reconn_sdp_conn_wait 
+65b6 c001e5d7 beq uppersm_reconn_sdp_cfg ,process_upper_sm_reconn_sdp_cfg 
+65b7 c002662e beq uppersm_reconn_sdp_cfg_wait ,process_upper_sm_reconn_sdp_cfg_wait 
+65b8 c01de5e1 beq uppersm_reconn_ss_spp ,process_upper_sm_reconn_ss_spp 
+65b9 c01e6631 beq uppersm_reconn_ss_spp_wait ,process_upper_sm_reconn_ss_spp_wait 
+65ba c006e5e6 beq uppersm_reconn_sdp_disconn ,process_upper_sm_reconn_sdp_disconn 
+65bb c0076636 beq uppersm_reconn_sdp_disconn_wait ,process_upper_sm_reconn_sdp_disconn_wait 
+65bc c007e5e9 beq uppersm_reconn_hid_ctrl_conn ,process_upper_sm_reconn_hid_ctrl_conn 
+65bd c008663c beq uppersm_reconn_hid_ctrl_conn_wait ,process_upper_sm_reconn_hid_ctrl_conn_wait 
+65be c008e5ef beq uppersm_reconn_hid_ctrl_cfg ,process_upper_sm_reconn_hid_ctrl_cfg 
+65bf c0096640 beq uppersm_reconn_hid_ctrl_cfg_wait ,process_upper_sm_reconn_hid_ctrl_cfg_wait 
+65c0 c009e5f5 beq uppersm_reconn_hid_int_conn ,process_upper_sm_reconn_hid_int_conn 
+65c1 c00a6644 beq uppersm_reconn_hid_int_conn_wait ,process_upper_sm_reconn_hid_int_conn_wait 
+65c2 c00ae5fb beq uppersm_reconn_hid_int_cfg ,process_upper_sm_reconn_hid_int_cfg 
+65c3 c00b6648 beq uppersm_reconn_hid_int_cfg_wait ,process_upper_sm_reconn_hid_int_cfg_wait 
+65c4 c00be601 beq uppersm_reconn_rfcomm_conn ,process_upper_sm_reconn_rfcomm_conn 
+65c5 c00c664d beq uppersm_reconn_rfcomm_conn_wait ,process_upper_sm_reconn_rfcomm_conn_wait 
+65c6 c00ce607 beq uppersm_reconn_rfcomm_cfg ,process_upper_sm_reconn_rfcomm_cfg 
+65c7 c00d6651 beq uppersm_reconn_rfcomm_cfg_wait ,process_upper_sm_reconn_rfcomm_cfg_wait 
+65c8 c00de60d beq uppersm_reconn_rfcomm_sabm ,process_upper_sm_reconn_rfcomm_sabm 
+65c9 c00e6655 beq uppersm_reconn_rfcomm_sabm_wait ,process_upper_sm_reconn_rfcomm_sabm_wait 
+65ca c00ee613 beq uppersm_reconn_spp_cmd_pn ,process_upper_sm_reconn_spp_cmd_pn 
+65cb c00f665a beq uppersm_reconn_spp_cmd_pn_wait ,process_upper_sm_reconn_spp_cmd_pn_wait 
+65cc c00fe619 beq uppersm_reconn_spp_sabm ,process_upper_sm_reconn_spp_sabm 
+65cd c010665e beq uppersm_reconn_spp_sabm_wait ,process_upper_sm_reconn_spp_sabm_wait 
+65ce c010e624 beq uppersm_reconn_spp_cmd_ms ,process_upper_sm_reconn_spp_cmd_ms 
+65cf c0116662 beq uppersm_reconn_spp_cmd_ms_wait ,process_upper_sm_reconn_spp_cmd_ms_wait 
+
+process_upper_sm_reconn_wait:
+65d0 20600000 rtn 
+
+process_upper_sm_reconn_sdp_conn:
+65d1 2040666d call upper_sm_send_sdp_conn 
+65d2 70033802 jam uppersm_reconn_sdp_conn_wait ,mem_upper_sm_reconn 
+65d3 6fe0c4e0 fetch 1 ,mem_sdp_state 
+65d4 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+65d5 67e0c4e0 store 1 ,mem_sdp_state 
+65d6 20600000 rtn 
+
+process_upper_sm_reconn_sdp_cfg:
+65d7 70033804 jam uppersm_reconn_sdp_cfg_wait ,mem_upper_sm_reconn 
+65d8 6fe0c4e0 fetch 1 ,mem_sdp_state 
+65d9 c3810000 rtnbit1 l2cap_channel_state_snd_cfg_req 
+65da 70033803 jam uppersm_reconn_sdp_cfg ,mem_upper_sm_reconn 
+65db 20406674 call upper_sm_send_sdp_cfg 
+65dc 70033804 jam uppersm_reconn_sdp_cfg_wait ,mem_upper_sm_reconn 
+65dd 6fe0c4e0 fetch 1 ,mem_sdp_state 
+65de 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+65df 67e0c4e0 store 1 ,mem_sdp_state 
+65e0 20600000 rtn 
+
+process_upper_sm_reconn_ss_spp:
+65e1 204052f7 call l2cap_malloc_is_fifo_empty 
+65e2 247a0000 nrtn blank 
+65e3 20406683 call upper_sm_send_ss_spp 
+65e4 7003383c jam uppersm_reconn_ss_spp_wait ,mem_upper_sm_reconn 
+65e5 20600000 rtn 
+
+process_upper_sm_reconn_sdp_disconn:
+65e6 20406679 call upper_sm_send_sdp_disconn 
+65e7 7003380e jam uppersm_reconn_sdp_disconn_wait ,mem_upper_sm_reconn 
+65e8 20600000 rtn 
+
+process_upper_sm_reconn_hid_ctrl_conn:
+65e9 20406693 call upper_sm_send_hid_ctrl_conn 
+65ea 70033810 jam uppersm_reconn_hid_ctrl_conn_wait ,mem_upper_sm_reconn 
+65eb 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+65ec 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+65ed 67e0c4e2 store 1 ,mem_hid_control_state 
+65ee 20600000 rtn 
+
+process_upper_sm_reconn_hid_ctrl_cfg:
+65ef 2040669a call upper_sm_send_hid_ctrl_cfg 
+65f0 70033812 jam uppersm_reconn_hid_ctrl_cfg_wait ,mem_upper_sm_reconn 
+65f1 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+65f2 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+65f3 67e0c4e2 store 1 ,mem_hid_control_state 
+65f4 20600000 rtn 
+
+process_upper_sm_reconn_hid_int_conn:
+65f5 2040669f call upper_sm_send_hid_int_conn 
+65f6 70033814 jam uppersm_reconn_hid_int_conn_wait ,mem_upper_sm_reconn 
+65f7 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+65f8 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+65f9 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+65fa 20600000 rtn 
+
+process_upper_sm_reconn_hid_int_cfg:
+65fb 204066a6 call upper_sm_send_hid_int_cfg 
+65fc 70033816 jam uppersm_reconn_hid_int_cfg_wait ,mem_upper_sm_reconn 
+65fd 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+65fe 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+65ff 67e0c4e3 store 1 ,mem_hid_interrupt_state 
+6600 20600000 rtn 
+
+process_upper_sm_reconn_rfcomm_conn:
+6601 20406687 call upper_sm_send_rfcomm_conn 
+6602 70033818 jam uppersm_reconn_rfcomm_conn_wait ,mem_upper_sm_reconn 
+6603 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+6604 79207e00 set1 l2cap_channel_state_conn_req ,pdata 
+6605 67e0c4e1 store 1 ,mem_rfcomm_state 
+6606 20600000 rtn 
+
+process_upper_sm_reconn_rfcomm_cfg:
+6607 2040668e call upper_sm_send_rfcomm_cfg 
+6608 7003381a jam uppersm_reconn_rfcomm_cfg_wait ,mem_upper_sm_reconn 
+6609 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+660a 79207e02 set1 l2cap_channel_state_snd_cfg_req ,pdata 
+660b 67e0c4e1 store 1 ,mem_rfcomm_state 
+660c 20600000 rtn 
+
+process_upper_sm_reconn_rfcomm_sabm:
+660d 204066ab call upper_sm_send_rfcomm_sabm 
+660e 7003381c jam uppersm_reconn_rfcomm_sabm_wait ,mem_upper_sm_reconn 
+660f 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+6610 79207e06 set1 l2cap_channel_rfcomm_only_sabm ,pdata 
+6611 67e0c4e1 store 1 ,mem_rfcomm_state 
+6612 20600000 rtn 
+
+process_upper_sm_reconn_spp_cmd_pn:
+6613 204066b2 call upper_sm_send_spp_cmd_pn 
+6614 6fe0c4e4 fetch 1 ,mem_spp_state 
+6615 79207e00 set1 rfcomm_channel_state_pn_cmd ,pdata 
+6616 67e0c4e4 store 1 ,mem_spp_state 
+6617 7003381e jam uppersm_reconn_spp_cmd_pn_wait ,mem_upper_sm_reconn 
+6618 20600000 rtn 
+
+process_upper_sm_reconn_spp_sabm:
+6619 204066b8 call upper_sm_send_spp_sabm 
+661a 6fe0c4e4 fetch 1 ,mem_spp_state 
+661b 79207e02 set1 rfcomm_channel_state_sabm ,pdata 
+661c 67e0c4e4 store 1 ,mem_spp_state 
+661d 70033820 jam uppersm_reconn_spp_sabm_wait ,mem_upper_sm_reconn 
+661e 6fe0c64f fetch 1 ,mem_remote_spp_channel 
+661f 1fe9fe00 lshift3 pdata ,pdata 
+6620 1fe1fe03 or_into 3 ,pdata 
+6621 d8404650 arg mem_hiufcs_spp ,temp 
+6622 604903ca storet 2 ,mem_contw_temp 
+6623 202062ec branch rfcomm_save_fcs_uih 
+
+process_upper_sm_reconn_spp_cmd_ms:
+6624 204066c2 call upper_sm_send_spp_cmd_ms 
+6625 6fe0c4e4 fetch 1 ,mem_spp_state 
+6626 79207e04 set1 rfcomm_channel_state_snd_ms_cmd ,pdata 
+6627 67e0c4e4 store 1 ,mem_spp_state 
+6628 70033822 jam uppersm_reconn_spp_cmd_ms_wait ,mem_upper_sm_reconn 
+6629 20600000 rtn 
+
+process_upper_sm_reconn_sdp_conn_wait:
+662a 6fe0c4e0 fetch 1 ,mem_sdp_state 
+662b c4008000 rtnbit0 l2cap_channel_state_conn_res 
+662c 70033803 jam uppersm_reconn_sdp_cfg ,mem_upper_sm_reconn 
+662d 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_sdp_cfg_wait:
+662e 6fe0c4e0 fetch 1 ,mem_sdp_state 
+662f c19f8000 rtnne l2cap_channel_setup_complete 
+6630 7003383b jam uppersm_reconn_ss_spp ,mem_upper_sm_reconn 
+
+process_upper_sm_reconn_ss_spp_wait:
+6631 6fe08336 fetch 1 ,mem_message_to_uppersm 
+6632 c18b8000 rtnne recieve_ss_reasult_hf 
+6633 70033600 jam 0 ,mem_message_to_uppersm 
+6634 7003380d jam uppersm_reconn_sdp_disconn ,mem_upper_sm_reconn 
+6635 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_sdp_disconn_wait:
+6636 6fe0c4e0 fetch 1 ,mem_sdp_state 
+6637 247a0000 nrtn blank 
+6638 6fe0c78e fetch 1 ,mem_ui_profile_supported 
+6639 c2806665 bbit1 support_hid ,process_upper_sm_reconn_setup_hid 
+663a c2836667 bbit1 support_spp ,process_upper_sm_reconn_setup_rfcomm 
+663b 2020666b branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_hid_ctrl_conn_wait:
+663c 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+663d c4008000 rtnbit0 l2cap_channel_state_conn_res 
+663e 70033811 jam uppersm_reconn_hid_ctrl_cfg ,mem_upper_sm_reconn 
+663f 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_hid_ctrl_cfg_wait:
+6640 6fe0c4e2 fetch 1 ,mem_hid_control_state 
+6641 c19f8000 rtnne l2cap_channel_setup_complete 
+6642 70033813 jam uppersm_reconn_hid_int_conn ,mem_upper_sm_reconn 
+6643 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_hid_int_conn_wait:
+6644 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+6645 c4008000 rtnbit0 l2cap_channel_state_conn_res 
+6646 70033815 jam uppersm_reconn_hid_int_cfg ,mem_upper_sm_reconn 
+6647 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_hid_int_cfg_wait:
+6648 6fe0c4e3 fetch 1 ,mem_hid_interrupt_state 
+6649 c19f8000 rtnne l2cap_channel_setup_complete 
+664a 6fe0c78e fetch 1 ,mem_ui_profile_supported 
+664b c2836667 bbit1 support_spp ,process_upper_sm_reconn_setup_rfcomm 
+664c 2020666b branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_rfcomm_conn_wait:
+664d 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+664e c4008000 rtnbit0 l2cap_channel_state_conn_res 
+664f 70033819 jam uppersm_reconn_rfcomm_cfg ,mem_upper_sm_reconn 
+6650 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_rfcomm_cfg_wait:
+6651 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+6652 c19f8000 rtnne l2cap_channel_setup_complete 
+6653 7003381b jam uppersm_reconn_rfcomm_sabm ,mem_upper_sm_reconn 
+6654 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_rfcomm_sabm_wait:
+6655 6fe0c4e1 fetch 1 ,mem_rfcomm_state 
+6656 c1ff8000 rtnne l2cap_channel_rfcomm_dlci0_opened 
+6657 6fe0c78e fetch 1 ,mem_ui_profile_supported 
+6658 c2836669 bbit1 support_spp ,process_upper_sm_reconn_setup_spp 
+6659 2020666b branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_spp_cmd_pn_wait:
+665a 6fe0c4e4 fetch 1 ,mem_spp_state 
+665b c4008000 rtnbit0 rfcomm_channel_state_pn_res 
+665c 7003381f jam uppersm_reconn_spp_sabm ,mem_upper_sm_reconn 
+665d 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_spp_sabm_wait:
+665e 6fe0c4e4 fetch 1 ,mem_spp_state 
+665f c4018000 rtnbit0 rfcomm_channel_state_ua 
+6660 70033821 jam uppersm_reconn_spp_cmd_ms ,mem_upper_sm_reconn 
+6661 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_spp_cmd_ms_wait:
+6662 6fe0c4e4 fetch 1 ,mem_spp_state 
+6663 c1ff8000 rtnne rfcomm_channel_setup_complete 
+6664 2020666b branch process_upper_sm_reconn_termination 
+
+process_upper_sm_reconn_setup_hid:
+6665 7003380f jam uppersm_reconn_hid_ctrl_conn ,mem_upper_sm_reconn 
+6666 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_setup_rfcomm:
+6667 70033817 jam uppersm_reconn_rfcomm_conn ,mem_upper_sm_reconn 
+6668 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_setup_spp:
+6669 7003381d jam uppersm_reconn_spp_cmd_pn ,mem_upper_sm_reconn 
+666a 202065b1 branch process_upper_sm_reconn 
+
+process_upper_sm_reconn_termination:
+666b 70033800 jam 0 ,mem_upper_sm_reconn 
+666c 20600000 rtn 
+
+upper_sm_send_sdp_conn:
+666d 4728c02a bpatchx patch2a_1 ,mem_patch2a 
+666e 2040530b call l2cap_malloc_signal_channel 
+666f 58000001 setarg psm_sdp 
+6670 1fe20400 copy pdata ,temp 
+6671 58000050 setarg l2cap_sdp_channel 
+6672 1fe21600 copy pdata ,timeup 
+6673 20205106 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_sdp_cfg:
+6674 4729402a bpatchx patch2a_2 ,mem_patch2a 
+6675 2040530b call l2cap_malloc_signal_channel 
+6676 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+6677 1fe20400 copy pdata ,temp 
+6678 20205115 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_sdp_disconn:
+6679 4729c02a bpatchx patch2a_3 ,mem_patch2a 
+667a 2040530b call l2cap_malloc_signal_channel 
+667b 6fe144d8 fetch 2 ,mem_sdp_remote_cid 
+667c 1fe20400 copy pdata ,temp 
+667d d9600050 arg l2cap_sdp_channel ,timeup 
+667e 2040512a call ml2cap_send_signal_disconn_req 
+667f 6fe0c4e0 fetch 1 ,mem_sdp_state 
+6680 793ffe05 set0 l2cap_channel_state_rcv_cfg_res ,pdata 
+6681 67e0c4e0 store 1 ,mem_sdp_state 
+6682 20600000 rtn 
+
+upper_sm_send_ss_spp:
+6683 472a402a bpatchx patch2a_4 ,mem_patch2a 
+6684 20405318 call l2cap_malloc_sdp_channel 
+6685 204069ee call sdp_send_spp_request 
+6686 20205145 branch msdp_send_req_done 
+
+upper_sm_send_rfcomm_conn:
+6687 472ac02a bpatchx patch2a_5 ,mem_patch2a 
+6688 2040530b call l2cap_malloc_signal_channel 
+6689 58000003 setarg psm_rfcomm 
+668a 1fe20400 copy pdata ,temp 
+668b 58000051 setarg l2cap_rfcomm_channel 
+668c 1fe21600 copy pdata ,timeup 
+668d 20205106 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_rfcomm_cfg:
+668e 472b402a bpatchx patch2a_6 ,mem_patch2a 
+668f 2040530b call l2cap_malloc_signal_channel 
+6690 6fe144da fetch 2 ,mem_rfcomm_remote_cid 
+6691 1fe20400 copy pdata ,temp 
+6692 20205115 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_hid_ctrl_conn:
+6693 472bc02a bpatchx patch2a_7 ,mem_patch2a 
+6694 2040530b call l2cap_malloc_signal_channel 
+6695 58000011 setarg psm_hid_control 
+6696 1fe20400 copy pdata ,temp 
+6697 58000052 setarg l2cap_hid_control_channel 
+6698 1fe21600 copy pdata ,timeup 
+6699 20205106 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_hid_ctrl_cfg:
+669a 472c402b bpatchx patch2b_0 ,mem_patch2b 
+669b 2040530b call l2cap_malloc_signal_channel 
+669c 6fe144dc fetch 2 ,mem_hid_ctrl_remote_cid 
+669d 1fe20400 copy pdata ,temp 
+669e 20205115 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_hid_int_conn:
+669f 472cc02b bpatchx patch2b_1 ,mem_patch2b 
+66a0 2040530b call l2cap_malloc_signal_channel 
+66a1 58000013 setarg psm_hid_interrupt 
+66a2 1fe20400 copy pdata ,temp 
+66a3 58000053 setarg l2cap_hid_interrupt_channel 
+66a4 1fe21600 copy pdata ,timeup 
+66a5 20205106 branch ml2cap_send_signal_connect_req 
+
+upper_sm_send_hid_int_cfg:
+66a6 472d402b bpatchx patch2b_2 ,mem_patch2b 
+66a7 2040530b call l2cap_malloc_signal_channel 
+66a8 6fe144de fetch 2 ,mem_hid_int_remote_cid 
+66a9 1fe20400 copy pdata ,temp 
+66aa 20205115 branch ml2cap_send_signal_config_req 
+
+upper_sm_send_rfcomm_sabm:
+66ab 472dc02b bpatchx patch2b_3 ,mem_patch2b 
+66ac 20405325 call l2cap_malloc_rfcomm_channel 
+66ad 7003ce03 jam 3 ,mem_current_adss 
+66ae 7003d11c jam 0x1c ,mem_current_fcs 
+66af 20406460 call rfcomm_send_sabm 
+66b0 70464e01 jam 1 ,mem_rfcomm_initiator 
+66b1 20600000 rtn 
+
+upper_sm_send_spp_cmd_pn:
+66b2 472e402b bpatchx patch2b_4 ,mem_patch2b 
+66b3 20405325 call l2cap_malloc_rfcomm_channel 
+66b4 6848c64f fetcht 1 ,mem_remote_spp_channel 
+66b5 20406330 call channel_to_dlci 
+66b6 6048c648 storet 1 ,mem_pn_dlci 
+66b7 2020647b branch rfcomm_send_param_neg_cmd 
+
+upper_sm_send_spp_sabm:
+66b8 472ec02b bpatchx patch2b_5 ,mem_patch2b 
+66b9 20405325 call l2cap_malloc_rfcomm_channel 
+66ba 6848c648 fetcht 1 ,mem_pn_dlci 
+66bb 2040632a call dlci_to_address_cmd 
+66bc 204062d1 call rfcomm_calculate_fcs_sabm 
+66bd 67e083d1 store 1 ,mem_current_fcs 
+66be 6848c648 fetcht 1 ,mem_pn_dlci 
+66bf 2040632a call dlci_to_address_cmd 
+66c0 604883ce storet 1 ,mem_current_adss 
+66c1 20206460 branch rfcomm_send_sabm 
+
+upper_sm_send_spp_cmd_ms:
+66c2 472f402b bpatchx patch2b_6 ,mem_patch2b 
+66c3 20405325 call l2cap_malloc_rfcomm_channel 
+66c4 6848c648 fetcht 1 ,mem_pn_dlci 
+66c5 2040632a call dlci_to_address_cmd 
+66c6 202064b3 branch rfcomm_send_modem_status_cmd 
+
+sdp_process:
+66c7 472fc02b bpatchx patch2b_7 ,mem_patch2b 
+66c8 6fe10315 fetch 2 ,mem_l2cap_payload_ptr 
+66c9 98000c00 iforce contr 
+66ca efe08006 ifetch 1 ,contr 
+66cb 1fe22400 copy pdata ,regb 
+66cc 67e083ee store 1 ,mem_sdp_pduid 
+66cd efe10006 ifetch 2 ,contr 
+66ce 67e103ef store 2 ,mem_sdp_transactionid 
+66cf efe08006 ifetch 1 ,contr 
+66d0 1fed1600 lshift8 pdata ,timeup 
+66d1 efe08006 ifetch 1 ,contr 
+66d2 99609600 iadd timeup ,timeup 
+66d3 4730402c bpatchx patch2c_0 ,mem_patch2c 
+66d4 18c20400 copy contr ,temp 
+66d5 df200004 arg 4 ,loopcnt 
+66d6 d8a003fd arg mem_sdp_handle_list ,contw 
+66d7 20407d17 call memset0 
+66d8 18420c00 copy temp ,contr 
+66d9 1a427e00 deposit regb 
+66da c000e870 beq sdp_error_res ,sdp_process_error_res 
+66db c00166e2 beq sdp_search_req ,sdp_process_ss_req 
+66dc c001e870 beq sdp_search_res ,sdp_process_ss_res 
+66dd c002670a beq sdp_attribute_req ,sdp_process_sa_req 
+66de c002e870 beq sdp_attribute_res ,sdp_process_sa_res 
+66df c00367b8 beq sdp_searchattrib_req ,sdp_process_ssa_req 
+66e0 c003e870 beq sdp_searchattrib_res ,sdp_process_ssa_res 
+66e1 20206877 branch sdp_insufficient_resource 
+
+sdp_process_ss_req:
+66e2 4730c02c bpatchx patch2c_1 ,mem_patch2c 
+66e3 20406886 call ask_serviceclassid 
+66e4 2841fe01 compare 1 ,temp ,0xff 
+66e5 2020e8f6 branch ss_empty_rsp ,true 
+66e6 2841feff compare 0xff ,temp ,0xff 
+66e7 2020e87a branch sdp_invalid_request_syntax ,true 
+66e8 efe10006 ifetch 2 ,contr 
+66e9 67e103f5 store 2 ,mem_sdp_record_maxcnt 
+66ea 196097fe increase -2 ,timeup 
+66eb 196097ff increase -1 ,timeup 
+66ec 2422e874 nbranch sdp_invalid_pdu_size ,zero 
+66ed d96003e4 arg mem_sdp_uuid_search_ptr ,timeup 
+66ee efe1000b ifetch 2 ,timeup 
+66ef 207a0000 rtn blank 
+66f0 20406938 call search_all_uuid 
+66f1 20405323 call l2cap_get_sdp_tx_payload 
+66f2 18007e03 force 3 ,pdata 
+66f3 e7e08005 istore 1 ,contw 
+66f4 6fe103ef fetch 2 ,mem_sdp_transactionid 
+66f5 e7e10005 istore 2 ,contw 
+66f6 18ebfe00 lshift2 queue ,pdata 
+66f7 1fe0fe05 add pdata ,5 ,pdata 
+66f8 1fe0a605 add pdata ,5 ,regc 
+66f9 1ff0fe00 byteswap pdata ,pdata 
+66fa e7e10005 istore 2 ,contw 
+66fb 18e27e00 deposit queue 
+66fc 1ff0fe00 byteswap pdata ,pdata 
+66fd e7e10005 istore 2 ,contw 
+66fe e7e10005 istore 2 ,contw 
+66ff d8c003fd arg mem_sdp_handle_list ,contr 
+6700 18e27200 copy queue ,loopcnt 
+6701 2022e705 branch ss_req_blank ,zero 
+
+ss_req_loop:
+6702 efe20006 ifetch 4 ,contr 
+6703 e7e20005 istore 4 ,contw 
+6704 c2006702 loop ss_req_loop 
+
+ss_req_blank:
+6705 18007e00 force 0 ,pdata 
+6706 e7e08005 istore 1 ,contw 
+6707 1a627e00 deposit regc 
+6708 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+6709 20600000 rtn 
+
+sdp_process_sa_req:
+670a 4731402c bpatchx patch2c_2 ,mem_patch2c 
+670b efe20006 ifetch 4 ,contr 
+670c 67e203f7 store 4 ,mem_sdp_record_handle 
+670d 196097fc increase -4 ,timeup 
+670e 204067e4 call sdp_store_maxbyte 
+670f 67e103f3 store 2 ,mem_sdp_attribute_maxbyte 
+6710 196097fe increase -2 ,timeup 
+6711 204068de call dataelementtype6 
+6712 2022e87a branch sdp_invalid_request_syntax ,zero 
+6713 2a21fe05 compare 5 ,rega ,0xff 
+6714 2020e718 branch sa_judge_wholerange ,true 
+
+sa_isnot_wholerange:
+6715 d8a003fd arg mem_sdp_attrib_list ,contw 
+6716 18000e00 force 0 ,queue 
+6717 20206727 branch sa_req_loop 
+
+sa_judge_wholerange:
+6718 efe08006 ifetch 1 ,contr 
+6719 c085687a bne sdp_attribute_range ,sdp_invalid_request_syntax 
+671a efe10006 ifetch 2 ,contr 
+671b 243a6725 nbranch sa_judge_wholerange_false1 ,blank 
+671c efe08006 ifetch 1 ,contr 
+671d c0ffe723 bne 0xff ,sa_judge_wholerange_false2 
+671e efe08006 ifetch 1 ,contr 
+671f c0ffe721 bne 0xff ,sa_judge_wholerange_false3 
+6720 2020676e branch sa_req_all 
+
+sa_judge_wholerange_false3:
+6721 18c08dfb increase -5 ,contr 
+6722 20206715 branch sa_isnot_wholerange 
+
+sa_judge_wholerange_false2:
+6723 18c08dfc increase -4 ,contr 
+6724 20206715 branch sa_isnot_wholerange 
+
+sa_judge_wholerange_false1:
+6725 18c08dfd increase -3 ,contr 
+6726 20206715 branch sa_isnot_wholerange 
+
+sa_req_loop:
+6727 efe08006 ifetch 1 ,contr 
+6728 c004e73c beq sdp_attribute_id ,sa_req_one_id 
+6729 c005672a beq sdp_attribute_range ,sa_req_range 
+
+sa_req_range:
+672a efe10006 ifetch 2 ,contr 
+672b e7e10005 istore 2 ,contw 
+672c 18e08e01 increase 1 ,queue 
+672d 1ff0a400 byteswap pdata ,regb 
+672e efe10006 ifetch 2 ,contr 
+672f 1ff0fe00 byteswap pdata ,pdata 
+
+sa_req_range_id_increase:
+6730 1a40a401 increase 1 ,regb 
+6731 9a467c00 isub regb ,null 
+6732 24216739 nbranch sa_req_range_id_finish ,positive 
+6733 1fe22600 copy pdata ,regc 
+6734 1a50fe00 byteswap regb ,pdata 
+6735 e7e10005 istore 2 ,contw 
+6736 18e08e01 increase 1 ,queue 
+6737 1a627e00 copy regc ,pdata 
+6738 20206730 branch sa_req_range_id_increase 
+
+sa_req_range_id_finish:
+6739 196097fb increase -5 ,timeup 
+673a 1a20a3fb increase -5 ,rega 
+673b 20206741 branch sa_req_check_next_id 
+
+sa_req_one_id:
+673c efe10006 ifetch 2 ,contr 
+673d e7e10005 istore 2 ,contw 
+673e 18e08e01 increase 1 ,queue 
+673f 196097fd increase -3 ,timeup 
+6740 1a20a3fd increase -3 ,rega 
+
+sa_req_check_next_id:
+6741 2421687a nbranch sdp_invalid_request_syntax ,positive 
+6742 2422e727 nbranch sa_req_loop ,zero 
+6743 196097ff increase -1 ,timeup 
+6744 2422e87a nbranch sdp_invalid_request_syntax ,zero 
+6745 20405323 call l2cap_get_sdp_tx_payload 
+6746 18a08a0a increase 10 ,contw 
+6747 da2003fd arg mem_sdp_attrib_list ,rega 
+
+sa_req_handle_attributelist_next:
+6748 18e27e00 copy queue ,pdata 
+6749 203a675b branch sa_req_handle_attributelist_end ,blank 
+674a efe10011 ifetch 2 ,rega 
+674b 203a675b branch sa_req_handle_attributelist_end ,blank 
+674c 98002400 iforce regb 
+674d 6fe203f7 fetch 4 ,mem_sdp_record_handle 
+674e 98000400 iforce temp 
+674f 2040699d call search_handle_attrib 
+6750 18c27e00 copy contr ,pdata 
+6751 203a6758 branch sa_req_handle_attributelist_notfound ,blank 
+6752 18c08dfd increase -3 ,contr 
+6753 efe18006 ifetch 3 ,contr 
+6754 e7e18005 istore 3 ,contw 
+6755 20406911 call sdp_data_len 
+6756 98007200 iforce loopcnt 
+6757 20407d5f call memcpy 
+
+sa_req_handle_attributelist_notfound:
+6758 1a20a202 increase 2 ,rega 
+6759 18e08fff increase -1 ,queue 
+675a 20206748 branch sa_req_handle_attributelist_next 
+
+sa_req_handle_attributelist_end:
+675b da200005 arg sdp_attribute_res ,rega 
+675c 2040683a call ssa_req_range_lastfreg_common 
+675d 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+675e c005e8f9 beq 11 ,sa_empty_rsp 
+675f 20206850 branch ssa_req_range_attrbutes_length_no_continue 
+
+sdp_store_continue_common:
+6760 efe08006 ifetch 1 ,contr 
+6761 c0006764 beq 0 ,sdp_store_continue_0byte 
+6762 c000e766 beq 1 ,sdp_store_continue_1byte 
+6763 c0016769 beq 2 ,sdp_store_continue_2byte 
+
+sdp_store_continue_0byte:
+6764 196097ff increase -1 ,timeup 
+6765 2020676c branch sdp_store_continue_end 
+
+sdp_store_continue_1byte:
+6766 efe08006 ifetch 1 ,contr 
+6767 196097fe increase -2 ,timeup 
+6768 2020676c branch sdp_store_continue_end 
+
+sdp_store_continue_2byte:
+6769 efe10006 ifetch 2 ,contr 
+676a 1ff0fe00 byteswap pdata ,pdata 
+676b 196097fd increase -3 ,timeup 
+
+sdp_store_continue_end:
+676c 67e103ec store 2 ,mem_sdp_continue_byte 
+676d 20600000 rtn 
+
+sa_req_all:
+676e 196097fb increase -5 ,timeup 
+676f 20406760 call sdp_store_continue_common 
+6770 2422e874 nbranch sdp_invalid_pdu_size ,zero 
+6771 684a03f7 fetcht 4 ,mem_sdp_record_handle 
+6772 20406967 call search_handle 
+6773 2422e871 nbranch sdp_invalid_service_record_handle ,zero 
+6774 18c22200 copy contr ,rega 
+6775 20405323 call l2cap_get_sdp_tx_payload 
+6776 1a220c00 copy rega ,contr 
+6777 18a08a03 increase 3 ,contw 
+6778 18c21600 copy contr ,timeup 
+6779 20406918 call sdp_get_data 
+677a 1fe22200 copy pdata ,rega 
+677b 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+677c 1fe22400 copy pdata ,regb 
+677d 1a227e00 copy rega ,pdata 
+677e 9a462400 isub regb ,regb 
+677f 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+6780 9a467c00 isub regb ,null 
+6781 2421679d nbranch sa_req_all_fragment_sdp ,positive 
+6782 78547c00 disable user 
+6783 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+6784 203a6790 branch sa_req_all_fisrt_fragment ,blank 
+6785 99608c00 iadd timeup ,contr 
+6786 1a40a403 increase 3 ,regb 
+6787 1a427200 copy regb ,loopcnt 
+6788 1f227e00 copy loopcnt ,pdata 
+6789 1fe0fe03 increase 3 ,pdata 
+678a 1ff0fe00 byteswap pdata ,pdata 
+678b e7e10005 istore 2 ,contw 
+678c 1f227e00 copy loopcnt ,pdata 
+678d 1ff0fe00 byteswap pdata ,pdata 
+678e e7e10005 istore 2 ,contw 
+678f 202067ab branch sa_req_all_answer_attributelist_full_loop 
+
+sa_req_all_fisrt_fragment:
+6790 1a20f206 add rega ,6 ,loopcnt 
+6791 20346794 branch sa_req_all_parlength_continue_byte ,user 
+6792 1f30fe00 byteswap loopcnt ,pdata 
+6793 20206797 branch sa_req_all_parlength_continue_byte_end 
+
+sa_req_all_parlength_continue_byte:
+6794 1f227e00 copy loopcnt ,pdata 
+6795 1fe0fe02 increase 2 ,pdata 
+6796 1ff0fe00 byteswap pdata ,pdata 
+
+sa_req_all_parlength_continue_byte_end:
+6797 e7e10005 istore 2 ,contw 
+6798 1f20f3fd increase -3 ,loopcnt 
+6799 1f30fe00 byteswap loopcnt ,pdata 
+679a e7e10005 istore 2 ,contw 
+679b 19620c00 copy timeup ,contr 
+679c 202067ab branch sa_req_all_answer_attributelist_full_loop 
+
+sa_req_all_fragment_sdp:
+679d 78347c00 enable user 
+679e 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+679f 1fe22200 copy pdata ,rega 
+67a0 1a227200 copy rega ,loopcnt 
+67a1 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+67a2 203a6790 branch sa_req_all_fisrt_fragment ,blank 
+67a3 99608c00 iadd timeup ,contr 
+67a4 1a227e00 copy rega ,pdata 
+67a5 1fe0fe05 increase 5 ,pdata 
+67a6 1ff0fe00 byteswap pdata ,pdata 
+67a7 e7e10005 istore 2 ,contw 
+67a8 1a227e00 copy rega ,pdata 
+67a9 1ff0fe00 byteswap pdata ,pdata 
+67aa e7e10005 istore 2 ,contw 
+
+sa_req_all_answer_attributelist_full_loop:
+67ab 20407d5f call memcpy 
+67ac 243467b4 nbranch sa_req_all_last_frag_continue ,user 
+67ad 18007e02 force 2 ,pdata 
+67ae e7e08005 istore 1 ,contw 
+67af 18c27e00 copy contr ,pdata 
+67b0 99667e00 isub timeup ,pdata 
+67b1 1ff0fe00 byteswap pdata ,pdata 
+67b2 e7e10005 istore 2 ,contw 
+67b3 202067b6 branch sa_req_all_frag_end 
+
+sa_req_all_last_frag_continue:
+67b4 18007e00 force 0 ,pdata 
+67b5 e7e08005 istore 1 ,contw 
+
+sa_req_all_frag_end:
+67b6 da200005 arg sdp_attribute_res ,rega 
+67b7 20206866 branch ssa_req_range_common 
+
+sdp_process_ssa_req:
+67b8 4731c02c bpatchx patch2c_3 ,mem_patch2c 
+67b9 20406886 call ask_serviceclassid 
+67ba 2841feff compare 0xff ,temp ,0xff 
+67bb 2020e87a branch sdp_invalid_request_syntax ,true 
+67bc 204067e4 call sdp_store_maxbyte 
+67bd 67e103f3 store 2 ,mem_sdp_attribute_maxbyte 
+67be 196097fe increase -2 ,timeup 
+67bf 204068de call dataelementtype6 
+67c0 d8a003fd arg mem_sdp_attrib_list ,contw 
+67c1 18000e00 force 0 ,queue 
+
+ssa_req_loop:
+67c2 efe08006 ifetch 1 ,contr 
+67c3 c00567ec beq sdp_attribute_range ,ssa_req_range 
+67c4 efe10006 ifetch 2 ,contr 
+67c5 e7e10005 istore 2 ,contw 
+67c6 18e08e01 increase 1 ,queue 
+67c7 196097fd increase -3 ,timeup 
+67c8 1a20a3fd increase -3 ,rega 
+67c9 2421687a nbranch sdp_invalid_request_syntax ,positive 
+67ca 2422e7c2 nbranch ssa_req_loop ,zero 
+67cb 196097ff increase -1 ,timeup 
+67cc 2422e87a nbranch sdp_invalid_request_syntax ,zero 
+67cd 20405323 call l2cap_get_sdp_tx_payload 
+67ce 18a08a0d increase 13 ,contw 
+67cf 6fe103e4 fetch 2 ,mem_sdp_uuid_search_ptr 
+67d0 98002600 iforce regc 
+67d1 da2003fd arg mem_sdp_attrib_list ,rega 
+
+ssa_req_attributelist_next:
+67d2 efe10011 ifetch 2 ,rega 
+67d3 203a67df branch ssa_req_attributelist_end ,blank 
+67d4 98002400 iforce regb 
+67d5 2040697c call search_attrib 
+67d6 203a67dd branch ssa_req_attributelist_notfound ,blank 
+67d7 18c08dfd increase -3 ,contr 
+67d8 efe18006 ifetch 3 ,contr 
+67d9 e7e18005 istore 3 ,contw 
+67da 20406911 call sdp_data_len 
+67db 98007200 iforce loopcnt 
+67dc 20407d5f call memcpy 
+
+ssa_req_attributelist_notfound:
+67dd 1a20a202 increase 2 ,rega 
+67de 202067d2 branch ssa_req_attributelist_next 
+
+ssa_req_attributelist_end:
+67df 20406839 call ssa_req_range_lastfreg 
+67e0 6fe10326 fetch 2 ,mem_sdp_tx_pkt_length 
+67e1 c00768fc beq 14 ,ssa_empty_rsp 
+67e2 20406850 call ssa_req_range_attrbutes_length_no_continue 
+67e3 20206850 branch ssa_req_range_attrbutes_length_no_continue 
+
+sdp_store_maxbyte:
+67e4 efe10006 ifetch 2 ,contr 
+67e5 1ff0fe00 byteswap pdata ,pdata 
+67e6 1fe0fffd increase -3 ,pdata 
+67e7 d84000c8 arg 200 ,temp 
+67e8 98467c00 isub temp ,null 
+67e9 24610000 nrtn positive 
+67ea 580000c8 setarg 200 
+67eb 20600000 rtn 
+
+ssa_req_range:
+67ec 18c08c04 increase 4 ,contr 
+67ed 196097fb increase -5 ,timeup 
+67ee 1a20a3fb increase -5 ,rega 
+67ef 2422e87a nbranch sdp_invalid_request_syntax ,zero 
+67f0 20406760 call sdp_store_continue_common 
+67f1 2422e874 nbranch sdp_invalid_pdu_size ,zero 
+67f2 d96003e4 arg mem_sdp_uuid_search_ptr ,timeup 
+67f3 20406938 call search_all_uuid 
+67f4 18e27e00 deposit queue 
+67f5 203a68fc branch ssa_empty_rsp ,blank 
+67f6 67e08421 store 1 ,mem_handle_humber 
+67f7 1a427e00 copy regb ,pdata 
+67f8 67e1041f store 2 ,mem_sdp_all_length 
+67f9 d8e00000 arg 0 ,queue 
+67fa da200000 arg 0 ,rega 
+67fb 20405323 call l2cap_get_sdp_tx_payload 
+67fc 18a08a0a increase 10 ,contw 
+
+ssa_req_range_find_handle:
+67fd 20406822 call ssa_req_range_get_length 
+67fe 2434137a nbranch assert ,user 
+67ff 18c21600 copy contr ,timeup 
+6800 1fe22600 copy pdata ,regc 
+6801 9a20a200 iadd rega ,rega 
+6802 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+6803 1fe22400 copy pdata ,regb 
+6804 203a682b branch ssa_req_range_first_freg ,blank 
+
+ssa_req_range_later_freg_with_continue:
+6805 1a227e00 copy rega ,pdata 
+6806 9a462400 isub regb ,regb 
+6807 2022e81d branch ssa_req_range_next_handle ,zero 
+6808 2421681d nbranch ssa_req_range_next_handle ,positive 
+6809 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+680a 9a467c00 isub regb ,null 
+680b 2022e814 branch ssa_req_range_maxbyte_with_continue ,zero 
+680c 24216814 nbranch ssa_req_range_maxbyte_with_continue ,positive 
+
+ssa_req_range_send_not_maxbyte:
+680d 1a427200 copy regb ,loopcnt 
+680e 20406817 call ssa_req_range_maxbyte_with_continue_cpy 
+680f 6fe08421 fetch 1 ,mem_handle_humber 
+6810 18e08e01 increase 1 ,queue 
+6811 98e67c00 isub queue ,null 
+6812 2022e839 branch ssa_req_range_lastfreg ,zero 
+6813 20206856 branch ssa_req_range_freg_with_continue 
+
+ssa_req_range_maxbyte_with_continue:
+6814 1fe27200 copy pdata ,loopcnt 
+6815 20406817 call ssa_req_range_maxbyte_with_continue_cpy 
+6816 20206856 branch ssa_req_range_freg_with_continue 
+
+ssa_req_range_maxbyte_with_continue_cpy:
+6817 18a08bfd increase -3 ,contw 
+6818 1f220400 copy loopcnt ,temp 
+6819 1a627e00 copy regc ,pdata 
+681a 9a467e00 isub regb ,pdata 
+681b 99608c00 iadd timeup ,contr 
+681c 20207d5f branch memcpy 
+
+ssa_req_range_next_handle:
+681d 6fe08421 fetch 1 ,mem_handle_humber 
+681e 18e08e01 increase 1 ,queue 
+681f 98e67c00 isub queue ,null 
+6820 20628000 rtn zero 
+6821 202067fd branch ssa_req_range_find_handle 
+
+ssa_req_range_get_length:
+6822 20407e56 call disable_user 
+6823 d8c003fd arg mem_sdp_handle_list ,contr 
+6824 18ebfe00 lshift2 queue ,pdata 
+6825 98c08c00 iadd contr ,contr 
+6826 e8420006 ifetcht 4 ,contr 
+6827 20406967 call search_handle 
+6828 24628000 nrtn zero 
+6829 20406911 call sdp_data_len 
+682a 20207e54 branch enable_user 
+
+ssa_req_range_first_freg:
+682b 6fe103f3 fetch 2 ,mem_sdp_attribute_maxbyte 
+682c 9a267c00 isub rega ,null 
+682d 24216845 nbranch ssa_req_range_firstfreg_maxbyte_with_continue ,positive 
+682e 1a227200 copy rega ,loopcnt 
+682f 1f220400 copy loopcnt ,temp 
+6830 19620c00 copy timeup ,contr 
+6831 20407d5f call memcpy 
+6832 6fe1041f fetch 2 ,mem_sdp_all_length 
+6833 9a267c00 isub rega ,null 
+6834 2022e837 branch ssa_req_range_freg_no_continue ,zero 
+
+ssa_req_range_firstfreg_not_maxbyte_with_continue:
+6835 20406856 call ssa_req_range_freg_with_continue 
+6836 2020684a branch ssa_req_range_attrbutes_length 
+
+ssa_req_range_freg_no_continue:
+6837 20406839 call ssa_req_range_lastfreg 
+6838 2020684a branch ssa_req_range_attrbutes_length 
+
+ssa_req_range_lastfreg:
+6839 da200007 arg sdp_searchattrib_res ,rega 
+
+ssa_req_range_lastfreg_common:
+683a 18007e00 force 0 ,pdata 
+683b e7e08005 istore 1 ,contw 
+683c 20406866 call ssa_req_range_common 
+683d 68490326 fetcht 2 ,mem_sdp_tx_pkt_length 
+683e 184085fb increase -5 ,temp 
+683f 1850fe00 byteswap temp ,pdata 
+6840 e7e10005 istore 2 ,contw 
+6841 184085fd increase -3 ,temp 
+6842 1850fe00 byteswap temp ,pdata 
+6843 e7e10005 istore 2 ,contw 
+6844 20600000 rtn 
+
+ssa_req_range_firstfreg_maxbyte_with_continue:
+6845 1fe27200 copy pdata ,loopcnt 
+6846 1f220400 copy loopcnt ,temp 
+6847 19620c00 copy timeup ,contr 
+6848 20407d5f call memcpy 
+6849 20406856 call ssa_req_range_freg_with_continue 
+
+ssa_req_range_attrbutes_length:
+684a 58000036 setarg 0x36 
+684b e7e08005 istore 1 ,contw 
+684c 6fe1041f fetch 2 ,mem_sdp_all_length 
+684d 1ff0fe00 byteswap pdata ,pdata 
+684e e7e10005 istore 2 ,contw 
+684f 20600000 rtn 
+
+ssa_req_range_attrbutes_length_no_continue:
+6850 58000036 setarg 0x36 
+6851 e7e08005 istore 1 ,contw 
+6852 184085fd increase -3 ,temp 
+6853 1850fe00 byteswap temp ,pdata 
+6854 e7e10005 istore 2 ,contw 
+6855 20600000 rtn 
+
+ssa_req_range_freg_with_continue:
+6856 da200007 arg sdp_searchattrib_res ,rega 
+6857 58000002 setarg 2 
+6858 e7e08005 istore 1 ,contw 
+6859 6fe103ec fetch 2 ,mem_sdp_continue_byte 
+685a 98408400 iadd temp ,temp 
+685b 1850fe00 byteswap temp ,pdata 
+685c e7e10005 istore 2 ,contw 
+685d 20406866 call ssa_req_range_common 
+685e 68490326 fetcht 2 ,mem_sdp_tx_pkt_length 
+685f 184085fb increase -5 ,temp 
+6860 1850fe00 byteswap temp ,pdata 
+6861 e7e10005 istore 2 ,contw 
+6862 184085fb increase -5 ,temp 
+6863 1850fe00 byteswap temp ,pdata 
+6864 e7e10005 istore 2 ,contw 
+6865 20600000 rtn 
+
+ssa_req_range_common:
+6866 6fe10324 fetch 2 ,mem_sdp_tx_payload_ptr 
+6867 98a67e00 isub contw ,pdata 
+6868 1fe67e00 sub pdata ,0 ,pdata 
+6869 67e10326 store 2 ,mem_sdp_tx_pkt_length 
+686a 20405323 call l2cap_get_sdp_tx_payload 
+686b 1a227e00 copy rega ,pdata 
+686c e7e08005 istore 1 ,contw 
+686d 6fe103ef fetch 2 ,mem_sdp_transactionid 
+686e e7e10005 istore 2 ,contw 
+686f 20600000 rtn 
+
+sdp_process_ssa_res:
+
+sdp_process_ss_res:
+
+sdp_process_sa_res:
+
+sdp_process_error_res:
+6870 20600000 rtn 
+
+sdp_invalid_service_record_handle:
+6871 58000200 setarg 0x0200 
+6872 67e1041d store 2 ,mem_sdp_error_code 
+6873 2020687c branch sdp_error_response 
+
+sdp_invalid_pdu_size:
+6874 58000400 setarg 0x0400 
+6875 67e1041d store 2 ,mem_sdp_error_code 
+6876 2020687c branch sdp_error_response 
+
+sdp_insufficient_resource:
+6877 58000600 setarg 0x0600 
+6878 67e1041d store 2 ,mem_sdp_error_code 
+6879 2020687c branch sdp_error_response 
+
+sdp_invalid_request_syntax:
+687a 58000300 setarg 0x0300 
+687b 67e1041d store 2 ,mem_sdp_error_code 
+
+sdp_error_response:
+687c 20405323 call l2cap_get_sdp_tx_payload 
+687d e7e08005 istore 1 ,contw 
+687e 6fe103ef fetch 2 ,mem_sdp_transactionid 
+687f e7e10005 istore 2 ,contw 
+6880 58000200 setarg 0x0200 
+6881 e7e10005 istore 2 ,contw 
+6882 6fe1041d fetch 2 ,mem_sdp_error_code 
+6883 e7e10005 istore 2 ,contw 
+6884 70032607 jam 7 ,mem_sdp_tx_pkt_length 
+6885 20600000 rtn 
+
+ask_serviceclassid:
+6886 da400000 arg 0 ,regb 
+6887 18000400 force 0 ,temp 
+6888 d8a003e4 arg mem_sdp_uuid_search_ptr ,contw 
+6889 204068de call dataelementtype6 
+688a 2022e8dc branch asksrv_error ,zero 
+
+classidloop:
+688b 1a40a401 increase 1 ,regb 
+688c efe08006 ifetch 1 ,contr 
+688d 1a20a3ff increase -1 ,rega 
+688e 196097ff increase -1 ,timeup 
+688f 2fe1f018 compare 0x18 ,pdata ,0xf8 
+6890 2420e8dc nbranch asksrv_error ,true 
+6891 2fe00e04 compare 0x04 ,pdata ,0x07 
+6892 2420e8a9 nbranch cmp032 ,true 
+6893 18000401 force 1 ,temp 
+
+skip2bytes:
+6894 efe08006 ifetch 1 ,contr 
+6895 1a20a3ff increase -1 ,rega 
+6896 196097ff increase -1 ,timeup 
+6897 c080689d bne 0x00 ,frstbwrong 
+6898 efe08006 ifetch 1 ,contr 
+6899 1a20a3ff increase -1 ,rega 
+689a 196097ff increase -1 ,timeup 
+689b c00068ae beq 0x00 ,cmpuuid 
+689c 202068a0 branch scndbwrong 
+
+frstbwrong:
+689d 18c08c01 increase 1 ,contr 
+689e 1a20a3ff increase -1 ,rega 
+689f 196097ff increase -1 ,timeup 
+
+scndbwrong:
+68a0 18c08c02 increase 2 ,contr 
+68a1 1a20a3fe increase -2 ,rega 
+68a2 196097fe increase -2 ,timeup 
+68a3 2841fe00 compare 0x00 ,temp ,0xff 
+68a4 2020e8d6 branch loopornot ,true 
+68a5 18c08c0c increase 12 ,contr 
+68a6 1a20a3f4 increase -12 ,rega 
+68a7 196097f4 increase -12 ,timeup 
+68a8 202068d6 branch loopornot 
+
+cmp032:
+68a9 2fe00e02 compare 0x02 ,pdata ,0x07 
+68aa 2420e8ac nbranch cmp016 ,true 
+68ab 20206894 branch skip2bytes 
+
+cmp016:
+68ac 2fe00e01 compare 0x01 ,pdata ,0x07 
+68ad 2420e8dc nbranch asksrv_error ,true 
+
+cmpuuid:
+68ae 1a20a3fe increase -2 ,rega 
+68af 196097fe increase -2 ,timeup 
+68b0 efe10006 ifetch 2 ,contr 
+68b1 1a467c04 sub regb ,4 ,null 
+68b2 2022e8b4 branch uuidsize ,zero 
+68b3 e7e10005 istore 2 ,contw 
+
+uuidsize:
+68b4 2841fe00 compare 0x00 ,temp ,0xff 
+68b5 2020e8d6 branch loopornot ,true 
+68b6 18c20400 copy contr ,temp 
+68b7 efe08006 ifetch 1 ,contr 
+68b8 c08068cf bne 0x00 ,wrong12b 
+68b9 efe08006 ifetch 1 ,contr 
+68ba c08068cf bne 0x00 ,wrong12b 
+68bb efe08006 ifetch 1 ,contr 
+68bc c08868cf bne 0x10 ,wrong12b 
+68bd efe08006 ifetch 1 ,contr 
+68be c08068cf bne 0x00 ,wrong12b 
+68bf efe08006 ifetch 1 ,contr 
+68c0 c0c068cf bne 0x80 ,wrong12b 
+68c1 efe08006 ifetch 1 ,contr 
+68c2 c08068cf bne 0x00 ,wrong12b 
+68c3 efe08006 ifetch 1 ,contr 
+68c4 c08068cf bne 0x00 ,wrong12b 
+68c5 efe08006 ifetch 1 ,contr 
+68c6 c0c068cf bne 0x80 ,wrong12b 
+68c7 efe08006 ifetch 1 ,contr 
+68c8 c0afe8cf bne 0x5f ,wrong12b 
+68c9 efe08006 ifetch 1 ,contr 
+68ca c0cde8cf bne 0x9b ,wrong12b 
+68cb efe08006 ifetch 1 ,contr 
+68cc c09a68cf bne 0x34 ,wrong12b 
+68cd efe08006 ifetch 1 ,contr 
+68ce c07de8d4 beq 0xfb ,chck12dn 
+
+wrong12b:
+68cf 18420c00 copy temp ,contr 
+
+wrong12b1:
+68d0 18c08c0c increase 12 ,contr 
+68d1 18000e00 force 0x00 ,queue 
+68d2 18000400 force 0x00 ,temp 
+68d3 202068d4 branch chck12dn 
+
+chck12dn:
+68d4 196097f4 increase -12 ,timeup 
+68d5 1a20a3f4 increase -12 ,rega 
+
+loopornot:
+68d6 18000400 force 0x00 ,temp 
+68d7 2a21fe00 compare 0x00 ,rega ,0xff 
+68d8 2420e88b nbranch classidloop ,true 
+68d9 18007e00 force 0 ,pdata 
+68da e7e10005 istore 2 ,contw 
+68db 20600000 rtn 
+
+asksrv_error:
+68dc d84000ff arg 0xff ,temp 
+68dd 20600000 rtn 
+
+dataelementtype6:
+68de 4733402c bpatchx patch2c_6 ,mem_patch2c 
+68df efe08006 ifetch 1 ,contr 
+68e0 196097ff increase -1 ,timeup 
+68e1 2fe1f030 compare 0x30 ,pdata ,0xf8 
+68e2 2420e8f4 nbranch dsize_error ,true 
+68e3 2fe00e07 compare 0x07 ,pdata ,0x07 
+68e4 2020e8ed branch dsize32 ,true 
+68e5 2fe00e06 compare 0x06 ,pdata ,0x07 
+68e6 2020e8ef branch dsize16 ,true 
+68e7 2fe00e05 compare 0x05 ,pdata ,0x07 
+68e8 2420e8f4 nbranch dsize_error ,true 
+68e9 efe08006 ifetch 1 ,contr 
+68ea 1fe22200 copy pdata ,rega 
+68eb 196097ff increase -1 ,timeup 
+68ec 202068f2 branch dsize 
+
+dsize32:
+68ed 18c08c02 increase 2 ,contr 
+68ee 196097fe increase -2 ,timeup 
+
+dsize16:
+68ef efe10006 ifetch 2 ,contr 
+68f0 1ff0a200 byteswap pdata ,rega 
+68f1 196097fe increase -2 ,timeup 
+
+dsize:
+68f2 18007e01 force 0x01 ,pdata 
+68f3 20600000 rtn 
+
+dsize_error:
+68f4 18007e00 force 0x00 ,pdata 
+68f5 20600000 rtn 
+
+ss_empty_rsp:
+68f6 58000003 setarg sdp_search_res 
+68f7 67e083ee store 1 ,mem_sdp_pduid 
+68f8 202068fe branch empty_response 
+
+sa_empty_rsp:
+68f9 58000005 setarg sdp_attribute_res 
+68fa 67e083ee store 1 ,mem_sdp_pduid 
+68fb 202068fe branch empty_response 
+
+ssa_empty_rsp:
+68fc 58000007 setarg sdp_searchattrib_res 
+68fd 67e083ee store 1 ,mem_sdp_pduid 
+
+empty_response:
+68fe 20405323 call l2cap_get_sdp_tx_payload 
+68ff 6fe083ee fetch 1 ,mem_sdp_pduid 
+6900 1fe22400 copy pdata ,regb 
+6901 e7e08005 istore 1 ,contw 
+6902 6fe103ef fetch 2 ,mem_sdp_transactionid 
+6903 e7e10005 istore 2 ,contw 
+6904 58000500 setarg 0x0500 
+6905 e7e10005 istore 2 ,contw 
+6906 2a41fe05 compare sdp_attribute_res ,regb ,0xff 
+6907 2020e90d branch fullsearch ,true 
+6908 2a41fe07 compare sdp_searchattrib_res ,regb ,0xff 
+6909 2020e90d branch fullsearch ,true 
+690a 58000000 setarg 0x000000 
+690b e7e28005 istore 5 ,contw 
+690c 2020690f branch outempty 
+
+fullsearch:
+690d 58350200 setarg 0x350200 
+690e e7e28005 istore 5 ,contw 
+
+outempty:
+690f 7003260a jam 10 ,mem_sdp_tx_pkt_length 
+6910 20600000 rtn 
+
+sdp_data_len:
+6911 20407ce8 call store_contw 
+6912 20407ceb call store_contr 
+6913 20406918 call sdp_get_data 
+6914 20407ce2 call get_contw 
+6915 20407ce5 call get_contr 
+6916 18427e00 copy temp ,pdata 
+6917 20600000 rtn 
+
+sdp_get_data:
+6918 efe08006 ifetch 1 ,contr 
+6919 1fe17207 and pdata ,0x7 ,loopcnt 
+691a 1fe97e00 rshift3 pdata ,pdata 
+691b c0806922 bne 0 ,sdp_get_data_type_not0 
+
+sdp_get_data_type0:
+691c 18007e01 force 1 ,pdata 
+691d 18000401 force 1 ,temp 
+691e 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex01234:
+691f 20407cc2 call left_shift_n 
+6920 1fe08401 add pdata ,1 ,temp 
+6921 20600000 rtn 
+
+sdp_get_data_type_not0:
+6922 1f227e00 deposit loopcnt 
+6923 1fe67c04 sub pdata ,4 ,null 
+6924 2021691f branch sdp_get_data_type_not0_sizeindex01234 ,positive 
+6925 c002e929 beq 5 ,sdp_get_data_type_not0_sizeindex5 
+6926 c003692c beq 6 ,sdp_get_data_type_not0_sizeindex6 
+6927 c003e930 beq 7 ,sdp_get_data_type_not0_sizeindex7 
+6928 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex5:
+6929 efe08006 ifetch 1 ,contr 
+692a 1fe08402 add pdata ,2 ,temp 
+692b 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex6:
+692c efe10006 ifetch 2 ,contr 
+692d 1ff0fe00 byteswap pdata ,pdata 
+692e 1fe08403 add pdata ,3 ,temp 
+692f 20600000 rtn 
+
+sdp_get_data_type_not0_sizeindex7:
+6930 efe10006 ifetch 2 ,contr 
+6931 1ff0fe00 byteswap pdata ,pdata 
+6932 e8410006 ifetcht 2 ,contr 
+6933 18508400 byteswap temp ,temp 
+6934 18500400 lshift16 temp ,temp 
+6935 9840fe00 iadd temp ,pdata 
+6936 1fe08405 add pdata ,5 ,temp 
+6937 20600000 rtn 
+
+search_all_uuid:
+6938 4733c02c bpatchx patch2c_7 ,mem_patch2c 
+6939 18000e00 force 0 ,queue 
+693a da400000 arg 0 ,regb 
+693b d8a003fd arg mem_sdp_handle_list ,contw 
+
+search_all_uuid_llop:
+693c efe1000b ifetch 2 ,timeup 
+693d 207a0000 rtn blank 
+693e 20406943 call search_uuid 
+693f 18e27e00 copy queue ,pdata 
+6940 c1038000 rtneq sdp_max_handle_number 
+6941 19609602 increase 2 ,timeup 
+6942 2020693c branch search_all_uuid_llop 
+
+search_uuid:
+6943 98002600 iforce regc 
+6944 6fe14660 fetch 2 ,mem_ui_uuid_table 
+6945 98000c00 iforce contr 
+
+search_uuid_next:
+6946 18e27e00 copy queue ,pdata 
+6947 c1038000 rtneq sdp_max_handle_number 
+6948 78547c00 disable user 
+6949 efe08006 ifetch 1 ,contr 
+694a 207a0000 rtn blank 
+694b 98007200 iforce loopcnt 
+
+search_uuid_loop:
+694c efe10006 ifetch 2 ,contr 
+694d 9a667c00 isub regc ,null 
+694e 2422e950 nbranch search_uuid_not_found ,zero 
+694f 78347c00 enable user 
+
+search_uuid_not_found:
+6950 c200694c loop search_uuid_loop 
+6951 e8420006 ifetcht 4 ,contr 
+6952 18c22200 copy contr ,rega 
+6953 24346963 nbranch search_uuid_nomatch ,user 
+6954 d8c003fd arg mem_sdp_handle_list ,contr 
+6955 df200007 arg sdp_max_handle_number ,loopcnt 
+
+search_uuid_check_same_handle:
+6956 efe20006 ifetch 4 ,contr 
+6957 203a695c branch search_uuid_store_handle ,blank 
+6958 98467c00 isub temp ,null 
+6959 2022e963 branch search_uuid_nomatch ,zero 
+695a c2006956 loop search_uuid_check_same_handle 
+695b 20600000 rtn 
+
+search_uuid_store_handle:
+695c e0420005 istoret 4 ,contw 
+695d 18e08e01 increase 1 ,queue 
+695e 1a220c00 copy rega ,contr 
+695f 20406911 call sdp_data_len 
+6960 9a40a400 iadd regb ,regb 
+6961 98c08c00 iadd contr ,contr 
+6962 20206946 branch search_uuid_next 
+
+search_uuid_nomatch:
+6963 1a220c00 copy rega ,contr 
+6964 20406918 call sdp_get_data 
+6965 98c08c00 iadd contr ,contr 
+6966 20206946 branch search_uuid_next 
+
+search_handle:
+6967 4734402d bpatchx patch2d_0 ,mem_patch2d 
+6968 6fe14660 fetch 2 ,mem_ui_uuid_table 
+6969 98000c00 iforce contr 
+
+search_handle_loop:
+696a efe08006 ifetch 1 ,contr 
+696b 203a7e50 branch disable_zero ,blank 
+696c 1fe3fe00 lshift pdata ,pdata 
+696d 98c08c00 iadd contr ,contr 
+696e efe20006 ifetch 4 ,contr 
+696f 98467c00 isub temp ,null 
+6970 20628000 rtn zero 
+6971 18a27e00 deposit contw 
+6972 67e1097d store 2 ,mem_contw 
+6973 604c0964 storet 8 ,mem_temp 
+6974 20406918 call sdp_get_data 
+6975 98c08c00 iadd contr ,contr 
+6976 18c27e00 copy contr ,pdata 
+6977 6849097d fetcht 2 ,mem_contw 
+6978 18420a00 copy temp ,contw 
+6979 684c0964 fetcht 8 ,mem_temp 
+697a 1fe20c00 copy pdata ,contr 
+697b 2020696a branch search_handle_loop 
+
+search_attrib:
+697c 4734c02d bpatchx patch2d_1 ,mem_patch2d 
+697d 6fe14660 fetch 2 ,mem_ui_uuid_table 
+697e 98000c00 iforce contr 
+
+search_attrib_next:
+697f efe08006 ifetch 1 ,contr 
+6980 203a699a branch search_attrib_end ,blank 
+6981 98007200 iforce loopcnt 
+
+search_attrib_loop:
+6982 efe10006 ifetch 2 ,contr 
+6983 9a667c00 isub regc ,null 
+6984 2022e98a branch search_attrib_found_uuid ,zero 
+6985 c2006982 loop search_attrib_loop 
+6986 18c08c04 increase 4 ,contr 
+6987 20406918 call sdp_get_data 
+6988 98c08c00 iadd contr ,contr 
+6989 2020697f branch search_attrib_next 
+
+search_attrib_found_uuid:
+698a 1f20f3ff increase -1 ,loopcnt 
+698b 1f23fe00 lshift loopcnt ,pdata 
+698c 98c08c00 iadd contr ,contr 
+698d 18c08c04 increase 4 ,contr 
+698e 20406918 call sdp_get_data 
+698f 98c09600 iadd contr ,timeup 
+
+search_attrib_loop_attribs:
+6990 18c08c01 increase 1 ,contr 
+6991 efe10006 ifetch 2 ,contr 
+6992 9a467c00 isub regb ,null 
+6993 2022fe5e branch disable_blank ,zero 
+6994 20406911 call sdp_data_len 
+6995 98c08c00 iadd contr ,contr 
+6996 19627e00 deposit timeup 
+6997 98c67c00 isub contr ,null 
+6998 2022e99a branch search_attrib_end ,zero 
+6999 20206990 branch search_attrib_loop_attribs 
+
+search_attrib_end:
+699a 18000c00 force 0 ,contr 
+699b 18007e00 force 0 ,pdata 
+699c 20600000 rtn 
+
+search_handle_attrib:
+699d 4735402d bpatchx patch2d_2 ,mem_patch2d 
+699e 6fe14660 fetch 2 ,mem_ui_uuid_table 
+699f 98000c00 iforce contr 
+
+search_handle_attrib_next:
+69a0 efe08006 ifetch 1 ,contr 
+69a1 203a69b6 branch search_handle_attrib_end ,blank 
+69a2 1fe3fe00 lshift pdata ,pdata 
+69a3 98c08c00 iadd contr ,contr 
+69a4 efe20006 ifetch 4 ,contr 
+69a5 98467c00 isub temp ,null 
+69a6 2022e9aa branch search_handl_attrib_found_handle ,zero 
+69a7 20406918 call sdp_get_data 
+69a8 98c08c00 iadd contr ,contr 
+69a9 202069a0 branch search_handle_attrib_next 
+
+search_handl_attrib_found_handle:
+69aa 20406918 call sdp_get_data 
+69ab 98c09600 iadd contr ,timeup 
+
+search_handle_attrib_loop_attribs:
+69ac 18c08c01 increase 1 ,contr 
+69ad efe10006 ifetch 2 ,contr 
+69ae 9a467c00 isub regb ,null 
+69af 20628000 rtn zero 
+69b0 20406911 call sdp_data_len 
+69b1 98c08c00 iadd contr ,contr 
+69b2 19627e00 deposit timeup 
+69b3 98c67c00 isub contr ,null 
+69b4 2022e9b6 branch search_handle_attrib_end ,zero 
+69b5 202069ac branch search_handle_attrib_loop_attribs 
+
+search_handle_attrib_end:
+69b6 18000c00 force 0 ,contr 
+69b7 20600000 rtn 
+
+search_rfcomm_cn:
+69b8 da400400 arg 0x0400 ,regb 
+69b9 204069aa call search_handl_attrib_found_handle 
+69ba da400300 arg 0x0300 ,regb 
+69bb 204069c3 call search_uuid_in_data 
+69bc 24740000 nrtn user 
+69bd 1a267c03 sub rega ,3 ,null 
+69be 20217e56 branch disable_user ,positive 
+69bf efe08006 ifetch 1 ,contr 
+69c0 c0847e56 bne 0x08 ,disable_user 
+69c1 efe08006 ifetch 1 ,contr 
+69c2 20600000 rtn 
+
+search_uuid_in_data:
+69c3 4735c02d bpatchx patch2d_3 ,mem_patch2d 
+69c4 20406918 call sdp_get_data 
+69c5 1fe22200 copy pdata ,rega 
+
+search_uuid_in_data_loop:
+69c6 efe08006 ifetch 1 ,contr 
+69c7 1fe17207 and pdata ,0x7 ,loopcnt 
+69c8 1fe97e00 rshift3 pdata ,pdata 
+69c9 1fe67c03 sub pdata ,3 ,null 
+69ca 2022e9df branch search_uuid_in_data_found_uuid ,zero 
+69cb 1f227e00 copy loopcnt ,pdata 
+69cc c002e9d6 beq 5 ,search_uuid_in_data_found_element_index5 
+69cd c00369d9 beq 6 ,search_uuid_in_data_found_element_index6 
+69ce c003e9dc beq 7 ,search_uuid_in_data_found_element_index7 
+69cf 18c08dff increase -1 ,contr 
+69d0 20406918 call sdp_get_data 
+69d1 98c08c00 iadd contr ,contr 
+69d2 1a227e00 copy rega ,pdata 
+69d3 98462200 isub temp ,rega 
+69d4 2022fe56 branch disable_user ,zero 
+69d5 202069c6 branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_element_index5:
+69d6 1a20a3fe increase -2 ,rega 
+69d7 18c08c01 increase 1 ,contr 
+69d8 202069c6 branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_element_index6:
+69d9 1a20a3fd increase -3 ,rega 
+69da 18c08c02 increase 2 ,contr 
+69db 202069c6 branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_element_index7:
+69dc 1a20a3fb increase -5 ,rega 
+69dd 18c08c04 increase 4 ,contr 
+69de 202069c6 branch search_uuid_in_data_loop 
+
+search_uuid_in_data_found_uuid:
+69df 1a20a3ff increase -1 ,rega 
+69e0 1f227e00 copy loopcnt ,pdata 
+69e1 c000e9e8 beq 1 ,search_uuid_in_data_type_uuid_16 
+69e2 c00169e6 beq 2 ,search_uuid_in_data_type_uuid_32 
+69e3 c00269e5 beq 4 ,search_uuid_in_data_type_uuid_128 
+69e4 20207e56 branch disable_user 
+
+search_uuid_in_data_type_uuid_128:
+69e5 1a20a3f4 increase -12 ,rega 
+
+search_uuid_in_data_type_uuid_32:
+69e6 efe10006 ifetch 2 ,contr 
+69e7 1a20a3fe increase -2 ,rega 
+
+search_uuid_in_data_type_uuid_16:
+69e8 efe10006 ifetch 2 ,contr 
+69e9 9a467c00 isub regb ,null 
+69ea 2022fe54 branch enable_user ,zero 
+69eb 1a20a3fe increase -2 ,rega 
+69ec 2022fe56 branch disable_user ,zero 
+69ed 202069c6 branch search_uuid_in_data_loop 
+
+sdp_send_spp_request:
+69ee 20405323 call l2cap_get_sdp_tx_payload 
+69ef 1fe20a00 copy pdata ,contw 
+69f0 58000006 setarg 6 
+69f1 e7e08005 istore 1 ,contw 
+69f2 5800006e setarg sdp_tid_spp 
+69f3 e7e10005 istore 2 ,contw 
+69f4 58000f00 setarg 0x0f00 
+69f5 e7e10005 istore 2 ,contw 
+69f6 581a0535 setarg 0x1a0535 
+69f7 e7e18005 istore 3 ,contw 
+69f8 58000111 setarg 0x0111 
+69f9 1ff07e00 lshift16 pdata ,pdata 
+69fa e7e20005 istore 4 ,contw 
+69fb 58002600 setarg 0x2600 
+69fc e7e10005 istore 2 ,contw 
+69fd 58000335 setarg 0x0335 
+69fe e7e10005 istore 2 ,contw 
+69ff 58000009 setarg 0x0009 
+6a00 e7e10005 istore 2 ,contw 
+6a01 58000004 setarg 0x0004 
+6a02 e7e10005 istore 2 ,contw 
+6a03 70032614 jam 0x14 ,mem_sdp_tx_pkt_length 
+6a04 20600000 rtn 
+
+function_g2:
+6a05 4736402d bpatchx patch2d_4 ,mem_patch2d 
+6a06 7004a750 jam 80 ,mem_aes_cmac_data_length 
+6a07 d8a004a8 arg memdat ,contw 
+6a08 d8c04337 arg mem_le_srand ,contr 
+6a09 20407d0c call memcpy16 
+6a0a d8c046dc arg mem_sc_pubkey_local_x_256 ,contr 
+6a0b 20407d0a call memcpy32 
+6a0c d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+6a0d 20407d0a call memcpy32 
+6a0e 20406ac0 call inverse_memdat 
+6a0f d8c00277 arg mem_le_mrand ,contr 
+6a10 20406abb call store_inverse_k 
+6a11 20406a86 call function_aes_cmac 
+6a12 d8a009be arg mem_aes_cmac_temp ,contw 
+6a13 20406ab7 call load_inverse_result 
+6a14 580f4240 setarg 1000000 
+6a15 1fe22200 copy pdata ,rega 
+6a16 6fe209be fetch 4 ,mem_aes_cmac_temp 
+6a17 9a26fc00 idiv rega 
+6a18 20407def call wait_div_end 
+6a19 18077e00 remainder pdata 
+6a1a 67e2087c store 4 ,mem_gkey 
+6a1b 20600000 rtn 
+
+function_f6_eb:
+6a1c 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6a1d d8a004a8 arg memdat ,contw 
+6a1e 20406a6b call store_addr_common_a 
+6a1f 20406a66 call store_addr_common_b 
+6a20 6fe1c351 fetch 3 ,mem_le_pres + 1 
+6a21 e7e18005 istore 3 ,contw 
+6a22 20406a2c call get_r 
+6a23 d8c00277 arg mem_le_mrand ,contr 
+6a24 20407d0c call memcpy16 
+6a25 d8c04337 arg mem_le_srand ,contr 
+6a26 20407d0c call memcpy16 
+6a27 20406ac0 call inverse_memdat 
+6a28 d8c009de arg mem_le_mackey ,contr 
+6a29 d8a0098e arg mem_aes_cmac_k ,contw 
+6a2a 20407d0c call memcpy16 
+6a2b 20206a86 branch function_aes_cmac 
+
+get_r:
+6a2c 6fe2439e fetch 4 ,mem_le_tk 
+6a2d e7e20005 istore 4 ,contw 
+6a2e 20407d1f call memset0_4 
+6a2f 20207d1c branch memset0_8 
+
+function_f6_ea:
+6a30 4736c02d bpatchx patch2d_5 ,mem_patch2d 
+6a31 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6a32 d8a004a8 arg memdat ,contw 
+6a33 20406a66 call store_addr_common_b 
+6a34 20406a6b call store_addr_common_a 
+6a35 6fe1c34a fetch 3 ,mem_le_preq + 1 
+6a36 e7e18005 istore 3 ,contw 
+6a37 20406a2c call get_r 
+6a38 d8c04337 arg mem_le_srand ,contr 
+6a39 20407d0c call memcpy16 
+6a3a d8c00277 arg mem_le_mrand ,contr 
+6a3b 20407d0c call memcpy16 
+6a3c 20406ac0 call inverse_memdat 
+6a3d d8c009de arg mem_le_mackey ,contr 
+6a3e d8a0098e arg mem_aes_cmac_k ,contw 
+6a3f 20407d0c call memcpy16 
+6a40 20406a86 call function_aes_cmac 
+6a41 d8a009be arg mem_aes_cmac_temp ,contw 
+6a42 20206ab7 branch load_inverse_result 
+
+function_f5:
+6a43 7004a720 jam 32 ,mem_aes_cmac_data_length 
+6a44 d8c008c0 arg mem_le_dhkey_256 ,contr 
+6a45 d8a004a8 arg memdat ,contw 
+6a46 20407d0a call memcpy32 
+6a47 20406ac0 call inverse_memdat 
+6a48 d8c00860 arg mem_le_slat ,contr 
+6a49 20406abb call store_inverse_k 
+6a4a 20406a86 call function_aes_cmac 
+6a4b d8a0098e arg mem_aes_cmac_k ,contw 
+6a4c 20406dd1 call store_aes_result 
+6a4d d8400001 arg 1 ,temp 
+6a4e 20406a55 call function_f5_common 
+6a4f d8a04316 arg mem_le_ltk ,contw 
+6a50 20406ab7 call load_inverse_result 
+6a51 d8400000 arg 0 ,temp 
+6a52 20406a55 call function_f5_common 
+6a53 d8a009de arg mem_le_mackey ,contw 
+6a54 20206dd1 branch store_aes_result 
+
+function_f5_common:
+6a55 4737402d bpatchx patch2d_6 ,mem_patch2d 
+6a56 7004a735 jam 53 ,mem_aes_cmac_data_length 
+6a57 58000100 setarg 0x100 
+6a58 67e104a8 store 2 ,memdat 
+6a59 20406a66 call store_addr_common_b 
+6a5a 20406a6b call store_addr_common_a 
+6a5b d8c04337 arg mem_le_srand ,contr 
+6a5c 20407d0c call memcpy16 
+6a5d d8c00277 arg mem_le_mrand ,contr 
+6a5e 20407d0c call memcpy16 
+6a5f 58006c65 setarg 0x6c65 
+6a60 e7e10005 istore 2 ,contw 
+6a61 58006274 setarg 0x6274 
+6a62 e7e10005 istore 2 ,contw 
+6a63 e0408005 istoret 1 ,contw 
+6a64 20406ac0 call inverse_memdat 
+6a65 20206a86 branch function_aes_cmac 
+
+store_addr_common_b:
+6a66 6fe3437a fetch 6 ,mem_le_lap 
+6a67 e7e30005 istore 6 ,contw 
+6a68 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+6a69 e7e08005 istore 1 ,contw 
+6a6a 20600000 rtn 
+
+store_addr_common_a:
+6a6b 6fe30297 fetch 6 ,mem_le_plap 
+6a6c e7e30005 istore 6 ,contw 
+6a6d 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+6a6e e7e08005 istore 1 ,contw 
+6a6f 20600000 rtn 
+
+function_f4_ca:
+6a70 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6a71 6fe0c76e fetch 1 ,mem_passkey_1bit 
+6a72 67e084a8 store 1 ,memdat 
+6a73 d8c046dc arg mem_sc_pubkey_local_x_256 ,contr 
+6a74 20407d0a call memcpy32 
+6a75 d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+6a76 20407d0a call memcpy32 
+6a77 20406ac0 call inverse_memdat 
+6a78 d8c00277 arg mem_le_mrand ,contr 
+6a79 20406abb call store_inverse_k 
+6a7a 20206a86 branch function_aes_cmac 
+
+function_f4_cb:
+6a7b 7004a741 jam 65 ,mem_aes_cmac_data_length 
+6a7c 6fe0c76e fetch 1 ,mem_passkey_1bit 
+6a7d 67e084a8 store 1 ,memdat 
+6a7e d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+6a7f 20407d0a call memcpy32 
+6a80 d8c046dc arg mem_sc_pubkey_local_x_256 ,contr 
+6a81 20407d0a call memcpy32 
+6a82 20406ac0 call inverse_memdat 
+6a83 d8c04337 arg mem_le_srand ,contr 
+6a84 20406abb call store_inverse_k 
+6a85 20206a86 branch function_aes_cmac 
+
+function_aes_cmac:
+6a86 4737c02d bpatchx patch2d_7 ,mem_patch2d 
+6a87 20406ad5 call function_aes_cmac_generate_subkey 
+6a88 6fe084a7 fetch 1 ,mem_aes_cmac_data_length 
+6a89 1fe20400 copy pdata ,temp 
+
+function_ceil16:
+6a8a 1fe0fe0f increase 15 ,pdata 
+6a8b 1ff1fe00 rshift4 pdata ,pdata 
+6a8c 1fe22400 copy pdata ,regb 
+6a8d 203a6a98 branch function_aes_cmac_set_flag_0_balnk ,blank 
+6a8e 18417e0f and temp ,0x0f ,pdata 
+6a8f 243a6a9b nbranch function_aes_cmac_set_flag_0 ,blank 
+6a90 da60099e arg mem_aes_cmac_k1 ,regc 
+6a91 dfe004a8 arg memdat ,pdata 
+6a92 1fe0fff0 increase -16 ,pdata 
+6a93 9840a200 iadd temp ,rega 
+6a94 d8a009ce arg mem_aes_cmac_m_last ,contw 
+6a95 df200004 arg 4 ,loopcnt 
+6a96 20407d2f call xor_loop 
+6a97 20206aa6 branch function_aes_cmac_aes 
+
+function_aes_cmac_set_flag_0_balnk:
+6a98 da400001 arg 1 ,regb 
+6a99 da200000 arg 0 ,rega 
+6a9a 20206a9c branch function_aes_cmac_set_flag_0_common 
+
+function_aes_cmac_set_flag_0:
+6a9b 1841220f and temp ,0x0f ,rega 
+
+function_aes_cmac_set_flag_0_common:
+6a9c dfe004a8 arg memdat ,pdata 
+6a9d 9840fe00 iadd temp ,pdata 
+6a9e 9a260c00 isub rega ,contr 
+6a9f d8a009be arg mem_aes_cmac_temp ,contw 
+6aa0 20406afb call function_aes_cmac_padding 
+6aa1 da6009ae arg mem_aes_cmac_k2 ,regc 
+6aa2 da2009be arg mem_aes_cmac_temp ,rega 
+6aa3 d8a009ce arg mem_aes_cmac_m_last ,contw 
+6aa4 df200004 arg 4 ,loopcnt 
+6aa5 20407d2f call xor_loop 
+
+function_aes_cmac_aes:
+6aa6 20406dcb call aes_clear_data 
+6aa7 20406d62 call aes_init 
+6aa8 d8c004a8 arg memdat ,contr 
+
+function_aes_cmac_aes_loop:
+6aa9 1a40a5ff increase -1 ,regb 
+6aaa 1a427e00 deposit regb 
+6aab 203a6aaf branch function_aes_cmac_aes_loop_end ,blank 
+6aac 20406dc0 call load_data128 
+6aad 20406d5c call do_aes_cbc 
+6aae 20206aa9 branch function_aes_cmac_aes_loop 
+
+function_aes_cmac_aes_loop_end:
+6aaf d8a009be arg mem_aes_cmac_temp ,contw 
+6ab0 20406dd1 call store_aes_result 
+6ab1 d8c009ce arg mem_aes_cmac_m_last ,contr 
+6ab2 20406dc0 call load_data128 
+6ab3 20406d62 call aes_init 
+6ab4 d8c009be arg mem_aes_cmac_temp ,contr 
+6ab5 20406dc0 call load_data128 
+6ab6 20206d5c branch do_aes_cbc 
+
+load_inverse_result:
+6ab7 18a22200 copy contw ,rega 
+6ab8 20406dd1 call store_aes_result 
+6ab9 df200010 arg 16 ,loopcnt 
+6aba 20207d37 branch inverse_data 
+
+store_inverse_k:
+6abb d8a0098e arg mem_aes_cmac_k ,contw 
+6abc 20407d0c call memcpy16 
+
+inverse_k:
+6abd df200010 arg 16 ,loopcnt 
+6abe da20098e arg mem_aes_cmac_k ,rega 
+6abf 20207d37 branch inverse_data 
+
+inverse_memdat:
+6ac0 6fe084a7 fetch 1 ,mem_aes_cmac_data_length 
+6ac1 1fe27200 copy pdata ,loopcnt 
+6ac2 da2004a8 arg memdat ,rega 
+6ac3 20207d37 branch inverse_data 
+
+bn_lshift_0_inverse:
+6ac4 efe08011 ifetch 1 ,rega 
+6ac5 1fe3fe00 lshift pdata ,pdata 
+6ac6 2a6ffe00 isolate1 0 ,regc 
+6ac7 7920fe00 setflag true ,0 ,pdata 
+6ac8 2feffe08 isolate1 8 ,pdata 
+6ac9 7920a600 setflag true ,0 ,regc 
+6aca e7e08011 istore 1 ,rega 
+6acb 1a20a3ff increase -1 ,rega 
+6acc c2006ac4 loop bn_lshift_0_inverse 
+6acd 20600000 rtn 
+
+function_aes_cmac_k1_inverse:
+6ace da20099e arg mem_aes_cmac_k1 ,rega 
+
+function_aes_cmac_inverse_common:
+6acf 1a20a20f increase 15 ,rega 
+6ad0 18007210 force 16 ,loopcnt 
+6ad1 18002600 force 0 ,regc 
+6ad2 20206ac4 branch bn_lshift_0_inverse 
+
+function_aes_cmac_k2_inverse:
+6ad3 da2009ae arg mem_aes_cmac_k2 ,rega 
+6ad4 20206acf branch function_aes_cmac_inverse_common 
+
+function_aes_cmac_generate_subkey:
+6ad5 d8c0098e arg mem_aes_cmac_k ,contr 
+6ad6 20406dbe call load_key 
+6ad7 18007008 force regidx_xor ,regext_index 
+6ad8 20406dcc call aes_clear 
+6ad9 20406dcb call aes_clear_data 
+6ada 20406d59 call do_aes_ocb 
+6adb d8a0099e arg mem_aes_cmac_k1 ,contw 
+6adc 20406dd1 call store_aes_result 
+
+function_aes_cmac_k1:
+6add 4738402e bpatchx patch2e_0 ,mem_patch2e 
+6ade 6fe0899e fetch 1 ,mem_aes_cmac_k1 
+6adf 2feffe07 isolate1 7 ,pdata 
+6ae0 2420eae6 nbranch function_aes_cmac_k1_0 ,true 
+6ae1 20406ace call function_aes_cmac_k1_inverse 
+6ae2 da60099e arg mem_aes_cmac_k1 ,regc 
+6ae3 d8a0099e arg mem_aes_cmac_k1 ,contw 
+6ae4 20406af0 call function_aes_cmac_xor_rb 
+6ae5 20206ae7 branch function_aes_cmac_k2 
+
+function_aes_cmac_k1_0:
+6ae6 20406ace call function_aes_cmac_k1_inverse 
+
+function_aes_cmac_k2:
+6ae7 d8c0099e arg mem_aes_cmac_k1 ,contr 
+6ae8 d8a009ae arg mem_aes_cmac_k2 ,contw 
+6ae9 20407d0c call memcpy16 
+6aea 6fe089ae fetch 1 ,mem_aes_cmac_k2 
+6aeb 2feffe07 isolate1 7 ,pdata 
+6aec 2420ead3 nbranch function_aes_cmac_k2_inverse ,true 
+6aed 20406ad3 call function_aes_cmac_k2_inverse 
+6aee da6009ae arg mem_aes_cmac_k2 ,regc 
+6aef d8a009ae arg mem_aes_cmac_k2 ,contw 
+
+function_aes_cmac_xor_rb:
+6af0 df200003 arg 3 ,loopcnt 
+
+function_aes_cmac_xor_rb_loop:
+6af1 d8400000 arg 0 ,temp 
+6af2 20406af7 call function_aes_cmac_xor_loop_common 
+6af3 1a60a604 increase 4 ,regc 
+6af4 c2006af1 loop function_aes_cmac_xor_rb_loop 
+6af5 d8408700 arg 0x8700 ,temp 
+6af6 18500400 lshift16 temp ,temp 
+
+function_aes_cmac_xor_loop_common:
+6af7 efe20013 ifetch 4 ,regc 
+6af8 9842fe00 ixor temp ,pdata 
+6af9 e7e20005 istore 4 ,contw 
+6afa 20600000 rtn 
+
+function_aes_cmac_padding:
+6afb 4738c02e bpatchx patch2e_1 ,mem_patch2e 
+6afc df200010 arg 16 ,loopcnt 
+6afd dfe00000 arg 0 ,pdata 
+
+function_aes_cmac_padding_loop:
+6afe 9a267c00 isub rega ,null 
+6aff 2022eb06 branch function_aes_cmac_padding_beq_length ,zero 
+6b00 20216b09 branch function_aes_cmac_padding_big_length ,positive 
+6b01 e8408006 ifetcht 1 ,contr 
+6b02 e0408005 istoret 1 ,contw 
+
+function_aes_cmac_padding_loop2:
+6b03 1fe0fe01 increase 1 ,pdata 
+6b04 c2006afe loop function_aes_cmac_padding_loop 
+6b05 20600000 rtn 
+
+function_aes_cmac_padding_beq_length:
+6b06 d8400080 arg 0x80 ,temp 
+
+function_aes_cmac_padding_common:
+6b07 e0408005 istoret 1 ,contw 
+6b08 20206b03 branch function_aes_cmac_padding_loop2 
+
+function_aes_cmac_padding_big_length:
+6b09 d8400000 arg 0 ,temp 
+6b0a 20206b07 branch function_aes_cmac_padding_common 
+
+generate_kinit:
+6b0b 20406b1e call function_e22 
+6b0c d8c00454 arg mem_input_store ,contr 
+6b0d d8a00444 arg mem_kinit ,contw 
+6b0e 20207d0c branch memcpy16 
+
+function_e21:
+6b0f 78547c00 disable user 
+6b10 20406c15 call function_expand 
+6b11 d8c00424 arg mem_random_number ,contr 
+6b12 d8a00464 arg mem_x ,contw 
+6b13 1800720f force 15 ,loopcnt 
+6b14 20407d5f call memcpy 
+6b15 efe08006 ifetch 1 ,contr 
+6b16 1fe2fe06 xor_into 6 ,pdata 
+6b17 e7e08005 istore 1 ,contw 
+6b18 58000474 setarg mem_y 
+6b19 67e10498 store 2 ,memp_ar_input 
+6b1a 58000464 setarg mem_x 
+6b1b 67e10496 store 2 ,memp_ar_key 
+6b1c 79200012 set1 mark_ar2 ,mark 
+6b1d 20206b5e branch function_ar 
+
+function_e22:
+6b1e 6848c793 fetcht 1 ,mem_pin_length 
+6b1f 18002410 force 16 ,regb 
+6b20 1840a606 add temp ,6 ,regc 
+6b21 1a667c10 sub regc ,16 ,null 
+6b22 20216b24 branch function_e22_pin_init ,positive 
+6b23 18002610 force 16 ,regc 
+
+function_e22_pin_init:
+6b24 d8a00464 arg mem_x ,contw 
+
+function_e22_genx_pin:
+6b25 d8c04794 arg mem_pin ,contr 
+6b26 18427200 copy temp ,loopcnt 
+6b27 78547c00 disable user 
+
+function_e22_genx_loop:
+6b28 efe08006 ifetch 1 ,contr 
+6b29 e7e08005 istore 1 ,contw 
+6b2a 1a40a5ff increase -1 ,regb 
+6b2b 2022eb32 branch function_e22_genx_end ,zero 
+6b2c c2006b28 loop function_e22_genx_loop 
+6b2d 20346b25 branch function_e22_genx_pin ,user 
+6b2e 78347c00 enable user 
+6b2f 18007206 force 6 ,loopcnt 
+6b30 1a220c00 copy rega ,contr 
+6b31 20206b28 branch function_e22_genx_loop 
+
+function_e22_genx_end:
+6b32 d8c00424 arg mem_random_number ,contr 
+6b33 d8a00474 arg mem_y ,contw 
+6b34 20407d0c call memcpy16 
+6b35 6fe08483 fetch 1 ,mem_y15 
+6b36 9a62fe00 ixor regc ,pdata 
+6b37 67e08483 store 1 ,mem_y15 
+6b38 58000474 setarg mem_y 
+6b39 67e10498 store 2 ,memp_ar_input 
+6b3a 58000464 setarg mem_x 
+6b3b 67e10496 store 2 ,memp_ar_key 
+6b3c 79200012 set1 mark_ar2 ,mark 
+6b3d 20206b5e branch function_ar 
+
+function_e1:
+6b3e 78547c00 disable user 
+6b3f 20406c15 call function_expand 
+6b40 20206b48 branch function_hash 
+
+function_e3:
+6b41 da200057 arg mem_aco ,rega 
+6b42 78347c00 enable user 
+6b43 20406c15 call function_expand 
+6b44 20406b48 call function_hash 
+6b45 d8c00454 arg mem_input_store ,contr 
+6b46 d8a00063 arg mem_kc ,contw 
+6b47 20207d0c branch memcpy16 
+
+function_hash:
+6b48 58000424 setarg mem_random_number 
+6b49 67e10498 store 2 ,memp_ar_input 
+6b4a 580041cb setarg mem_link_key 
+6b4b 67e10496 store 2 ,memp_ar_key 
+6b4c 793f8012 set0 mark_ar2 ,mark 
+6b4d 20406b5e call function_ar 
+6b4e da200454 arg mem_input_store ,rega 
+6b4f da400424 arg mem_random_number ,regb 
+6b50 d8a00464 arg mem_x ,contw 
+6b51 20406c08 call xor16 
+6b52 da200464 arg mem_x ,rega 
+6b53 da400474 arg mem_y ,regb 
+6b54 1a420a00 copy regb ,contw 
+6b55 78347c00 enable user 
+6b56 20406c06 call add16 
+6b57 20406c20 call key_offset 
+6b58 58000474 setarg mem_y 
+6b59 67e10498 store 2 ,memp_ar_input 
+6b5a 58000464 setarg mem_x 
+6b5b 67e10496 store 2 ,memp_ar_key 
+6b5c 79200012 set1 mark_ar2 ,mark 
+6b5d 20206b5e branch function_ar 
+
+function_ar:
+6b5e 70049a00 jam 0 ,mem_ar_hround 
+6b5f 6fe10496 fetch 2 ,memp_ar_key 
+6b60 98000c00 iforce contr 
+6b61 d8a00484 arg mem_key_store ,contw 
+6b62 20407d0c call memcpy16 
+6b63 6fe10498 fetch 2 ,memp_ar_input 
+6b64 98000c00 iforce contr 
+6b65 d8a00454 arg mem_input_store ,contw 
+6b66 20407d0c call memcpy16 
+
+function_ar_loop:
+6b67 20406b85 call key_scheduling 
+6b68 78547c00 disable user 
+6b69 c5896b6f bmark0 mark_ar2 ,function_ar_original 
+6b6a 6fe0849a fetch 1 ,mem_ar_hround 
+6b6b c0826b6f bne 4 ,function_ar_original 
+6b6c 6fe10498 fetch 2 ,memp_ar_input 
+6b6d 98002400 iforce regb 
+6b6e 20406bb7 call xor_mod32_ar2 
+
+function_ar_original:
+6b6f 20406bb6 call xor_mod32 
+6b70 20406bc9 call el_boxes 
+6b71 6fe0849a fetch 1 ,mem_ar_hround 
+6b72 1fe0fe01 increase 1 ,pdata 
+6b73 67e0849a store 1 ,mem_ar_hround 
+6b74 20406b85 call key_scheduling 
+6b75 78347c00 enable user 
+6b76 20406bb6 call xor_mod32 
+6b77 20406bd8 call pht 
+6b78 20406be7 call permute 
+6b79 20406bd8 call pht 
+6b7a 20406be7 call permute 
+6b7b 20406bd8 call pht 
+6b7c 20406be7 call permute 
+6b7d 20406bd8 call pht 
+6b7e 6fe0849a fetch 1 ,mem_ar_hround 
+6b7f 1fe0fe01 increase 1 ,pdata 
+6b80 67e0849a store 1 ,mem_ar_hround 
+6b81 c0886b67 bne 16 ,function_ar_loop 
+6b82 20406b85 call key_scheduling 
+6b83 78547c00 disable user 
+6b84 20206bb6 branch xor_mod32 
+
+key_scheduling:
+6b85 6fe0849a fetch 1 ,mem_ar_hround 
+6b86 d8c00484 arg mem_key_store ,contr 
+6b87 203a6bac branch key_sched_zero ,blank 
+6b88 98002400 iforce regb 
+6b89 18007211 force 17 ,loopcnt 
+6b8a 18c20a00 copy contr ,contw 
+
+key_rotateloop:
+6b8b efe08006 ifetch 1 ,contr 
+6b8c 1fe98400 lshift3 pdata ,temp 
+6b8d 1feb7e00 rshift2 pdata ,pdata 
+6b8e 1fe97e00 rshift3 pdata ,pdata 
+6b8f 9841fe00 ior temp ,pdata 
+6b90 e7e08005 istore 1 ,contw 
+6b91 c2006b8b loop key_rotateloop 
+6b92 58000484 setarg mem_key_store 
+6b93 9a408c00 iadd regb ,contr 
+6b94 18007210 force 16 ,loopcnt 
+6b95 d8a00434 arg mem_round_key ,contw 
+
+key_select_octet_loop:
+6b96 efe08006 ifetch 1 ,contr 
+6b97 e7e08005 istore 1 ,contw 
+6b98 28c1fe95 compare mem_key_store_end ,contr ,0xff 
+6b99 2420eb9b nbranch key_select_octet_nwrap ,true 
+6b9a 18c08def increase -17 ,contr 
+
+key_select_octet_nwrap:
+6b9b c2006b96 loop key_select_octet_loop 
+6b9c 18002200 force 0 ,rega 
+6b9d 1a40a7ff add regb ,-1 ,regc 
+6b9e 1a6ba600 lshift2 regc ,regc 
+6b9f 1a6ba600 lshift2 regc ,regc 
+6ba0 20406df3 call enable_authrom 
+6ba1 58009000 setarg mem_b_box 
+6ba2 9a60a600 iadd regc ,regc 
+6ba3 d8a00434 arg mem_round_key ,contw 
+6ba4 18007210 force 16 ,loopcnt 
+
+bias_round_key_loop:
+6ba5 e8408013 ifetcht 1 ,regc 
+6ba6 efe08005 ifetch 1 ,contw 
+6ba7 9840fe00 iadd temp ,pdata 
+6ba8 e7e08005 istore 1 ,contw 
+6ba9 1a60a601 increase 1 ,regc 
+6baa c2006ba5 loop bias_round_key_loop 
+6bab 20206df7 branch disable_authrom 
+
+key_sched_zero:
+6bac 18007210 force 16 ,loopcnt 
+6bad 18000400 force 0 ,temp 
+
+create_byte_16_loop:
+6bae efe08006 ifetch 1 ,contr 
+6baf 98428400 ixor temp ,temp 
+6bb0 c2006bae loop create_byte_16_loop 
+6bb1 18427e00 deposit temp 
+6bb2 e7e08006 istore 1 ,contr 
+6bb3 d8c00484 arg mem_key_store ,contr 
+6bb4 d8a00434 arg mem_round_key ,contw 
+6bb5 20207d0c branch memcpy16 
+
+xor_mod32:
+6bb6 da400434 arg mem_round_key ,regb 
+
+xor_mod32_ar2:
+6bb7 18007210 force 16 ,loopcnt 
+6bb8 da200454 arg mem_input_store ,rega 
+6bb9 1a220a00 copy rega ,contw 
+
+xor_mod32_loop:
+6bba e8408011 ifetcht 1 ,rega 
+6bbb efe08012 ifetch 1 ,regb 
+6bbc 9842e000 ixor temp ,alarm 
+6bbd 1f212603 and loopcnt ,3 ,regc 
+6bbe 24346bc0 nbranch xor_mod32_invert ,user 
+6bbf 1a62a603 xor_into 3 ,regc 
+
+xor_mod32_invert:
+6bc0 1a662601 sub regc ,1 ,regc 
+6bc1 20216bc3 branch xor_even ,positive 
+6bc2 9840e000 iadd temp ,alarm 
+
+xor_even:
+6bc3 1e027e00 deposit alarm 
+6bc4 e7e08005 istore 1 ,contw 
+6bc5 1a20a201 increase 1 ,rega 
+6bc6 1a40a401 increase 1 ,regb 
+6bc7 c2006bba loop xor_mod32_loop 
+6bc8 20600000 rtn 
+
+el_boxes:
+6bc9 20406df3 call enable_authrom 
+6bca 18007210 force 16 ,loopcnt 
+6bcb da200454 arg mem_input_store ,rega 
+
+el_box_loop:
+6bcc efe08011 ifetch 1 ,rega 
+6bcd d8c09100 arg mem_e_box ,contr 
+6bce 1f212603 and loopcnt ,3 ,regc 
+6bcf 1a667c01 sub regc ,1 ,null 
+6bd0 20216bd2 branch e_boxes ,positive 
+6bd1 d8c09200 arg mem_l_box ,contr 
+
+e_boxes:
+6bd2 98c08c00 iadd contr ,contr 
+6bd3 efe08006 ifetch 1 ,contr 
+6bd4 e7e08011 istore 1 ,rega 
+6bd5 1a20a201 increase 1 ,rega 
+6bd6 c2006bcc loop el_box_loop 
+6bd7 20206df7 branch disable_authrom 
+
+pht:
+6bd8 18007208 force 8 ,loopcnt 
+6bd9 d8c00454 arg mem_input_store ,contr 
+6bda 18c20a00 copy contr ,contw 
+
+pht_loop:
+6bdb efe08006 ifetch 1 ,contr 
+6bdc 98002200 iforce rega 
+6bdd efe08006 ifetch 1 ,contr 
+6bde 98002400 iforce regb 
+6bdf 1a23fe00 lshift rega ,pdata 
+6be0 9a40fe00 iadd regb ,pdata 
+6be1 e7e08005 istore 1 ,contw 
+6be2 1a227e00 deposit rega 
+6be3 9a40fe00 iadd regb ,pdata 
+6be4 e7e08005 istore 1 ,contw 
+6be5 c2006bdb loop pht_loop 
+6be6 20600000 rtn 
+
+permute:
+6be7 588ae42c setarg 0x8ae42c 
+6be8 98000400 iforce temp 
+6be9 18007207 force 7 ,loopcnt 
+6bea 20406bf6 call permute_exchange 
+6beb 580d751b setarg 0xd751b 
+6bec 98000400 iforce temp 
+6bed 18007205 force 5 ,loopcnt 
+6bee 20406bf6 call permute_exchange 
+6bef 6fe08463 fetch 1 ,mem_input_store + 15 
+6bf0 98002200 iforce rega 
+6bf1 6fe08457 fetch 1 ,mem_input_store + 3 
+6bf2 67e08463 store 1 ,mem_input_store + 15 
+6bf3 1a227e00 deposit rega 
+6bf4 67e08457 store 1 ,mem_input_store + 3 
+6bf5 20600000 rtn 
+
+permute_exchange:
+6bf6 1841240f and temp ,0xf ,regb 
+
+permute_loop:
+6bf7 18417e0f and temp ,0xf ,pdata 
+6bf8 d8a00454 arg mem_input_store ,contw 
+6bf9 98a08a00 iadd contw ,contw 
+6bfa efe08005 ifetch 1 ,contw 
+6bfb 98002600 iforce regc 
+6bfc 1a227e00 deposit rega 
+6bfd e7e08005 istore 1 ,contw 
+6bfe 1a622200 copy regc ,rega 
+6bff 18518400 rshift4 temp ,temp 
+6c00 c2006bf7 loop permute_loop 
+6c01 58000454 setarg mem_input_store 
+6c02 9a408a00 iadd regb ,contw 
+6c03 1a227e00 deposit rega 
+6c04 e7e08005 istore 1 ,contw 
+6c05 20600000 rtn 
+
+add16:
+6c06 78347c00 enable user 
+6c07 20206c09 branch xor_add16 
+
+xor16:
+6c08 78547c00 disable user 
+
+xor_add16:
+6c09 18007210 force 16 ,loopcnt 
+
+xoradd_loop:
+6c0a e8408011 ifetcht 1 ,rega 
+6c0b efe08012 ifetch 1 ,regb 
+6c0c 20346c0f branch xoradd_add ,user 
+6c0d 9842fe00 ixor temp ,pdata 
+6c0e 20206c10 branch xoradd_store 
+
+xoradd_add:
+6c0f 9840fe00 iadd temp ,pdata 
+
+xoradd_store:
+6c10 e7e08005 istore 1 ,contw 
+6c11 1a20a201 increase 1 ,rega 
+6c12 1a40a401 increase 1 ,regb 
+6c13 c2006c0a loop xoradd_loop 
+6c14 20600000 rtn 
+
+function_expand:
+6c15 d8a00474 arg mem_y ,contw 
+6c16 efe30011 ifetch 6 ,rega 
+6c17 e7e30005 istore 6 ,contw 
+6c18 20346c1b branch expand_12 ,user 
+6c19 efe30011 ifetch 6 ,rega 
+6c1a 20206c1c branch expand_cont 
+
+expand_12:
+6c1b efe30006 ifetch 6 ,contr 
+
+expand_cont:
+6c1c e7e30005 istore 6 ,contw 
+6c1d efe20011 ifetch 4 ,rega 
+6c1e e7e20005 istore 4 ,contw 
+6c1f 20600000 rtn 
+
+key_offset:
+6c20 d8c041cb arg mem_link_key ,contr 
+6c21 d8a00464 arg mem_x ,contw 
+6c22 d8400000 arg 0 ,temp 
+6c23 588395a7 setarg 0x8395a7 
+6c24 20406c41 call concatenate_temp24 
+6c25 58b3c1df setarg 0xb3c1df 
+6c26 20406c41 call concatenate_temp24 
+6c27 5800e5e9 setarg 0xe5e9 
+6c28 20406c42 call concatenate_temp16 
+6c29 18422800 copy temp ,regab 
+6c2a 78547c00 disable user 
+6c2b 20406c2f call key_addxor 
+6c2c 1a820400 copy regab ,temp 
+6c2d 78347c00 enable user 
+6c2e 20206c2f branch key_addxor 
+
+key_addxor:
+6c2f 18007208 force 8 ,loopcnt 
+
+key_addxor_loop:
+6c30 efe08006 ifetch 1 ,contr 
+6c31 2f200201 compare 1 ,loopcnt ,1 
+6c32 20346c36 branch key_high ,user 
+6c33 2020ec37 branch key_xor ,true 
+
+key_add:
+6c34 9840fe00 iadd temp ,pdata 
+6c35 20206c38 branch key_store 
+
+key_high:
+6c36 2020ec34 branch key_add ,true 
+
+key_xor:
+6c37 9842fe00 ixor temp ,pdata 
+
+key_store:
+6c38 e7e08005 istore 1 ,contw 
+6c39 184c8400 rshift8 temp ,temp 
+6c3a c2006c30 loop key_addxor_loop 
+6c3b 20600000 rtn 
+
+copy_aco:
+6c3c 6fe30458 fetch 6 ,mem_input_store + 4 
+6c3d 67e30057 store 6 ,mem_aco 
+6c3e efe30006 ifetch 6 ,contr 
+6c3f e7e30005 istore 6 ,contw 
+6c40 20600000 rtn 
+
+concatenate_temp24:
+6c41 184d0400 lshift8 temp ,temp 
+
+concatenate_temp16:
+6c42 18500400 lshift16 temp ,temp 
+6c43 98418400 ior temp ,temp 
+6c44 20600000 rtn 
+
+loop1:
+6c45 20206c45 branch loop1 
+
+generate_stk:
+6c46 4739402e bpatchx patch2e_2 ,mem_patch2e 
+6c47 20406d65 call function_s1 
+6c48 d8a04316 arg mem_le_ltk ,contw 
+6c49 20206dd1 branch store_aes_result 
+
+authenticate_rconfirm:
+6c4a d8a04337 arg mem_le_srand ,contw 
+6c4b 2034ec4d branch authenticate_mconfirm ,master 
+6c4c d8a00277 arg mem_le_mrand ,contw 
+
+authenticate_mconfirm:
+6c4d 18c22200 copy contr ,rega 
+6c4e 20407d0c call memcpy16 
+6c4f 20406d7a call function_c1 
+6c50 d8c04327 arg mem_le_rconfirm ,contr 
+6c51 20206dea branch compare_res 
+
+generate_confirm:
+6c52 da200277 arg mem_le_mrand ,rega 
+6c53 2034ec55 branch generate_mrand ,master 
+6c54 da204337 arg mem_le_srand ,rega 
+
+generate_mrand:
+6c55 1a220a00 copy rega ,contw 
+6c56 20405a31 call generate_random 
+6c57 20206d7a branch function_c1 
+
+generate_sk:
+6c58 d8c04384 arg mem_le_skdm ,contr 
+6c59 20406dc0 call load_data128 
+6c5a d8c04316 arg mem_le_ltk ,contr 
+6c5b 20406dc1 call load_regext 
+6c5c 18006c38 force 0x38 ,aes_ctrl 
+6c5d 18006c00 force 0x0 ,aes_ctrl 
+6c5e 20406d57 call wait_aes 
+6c5f d8a002c7 arg mem_le_sk ,contw 
+6c60 20206dd1 branch store_aes_result 
+
+ccm_b0:
+6c61 18007008 force regidx_xor ,regext_index 
+6c62 18007e49 force 0x49 ,pdata 
+6c63 20206c68 branch iv_common 
+
+first_block_counter:
+6c64 18007e49 force 0x49 ,pdata 
+6c65 20206c67 branch first_block 
+
+first_block_data:
+6c66 18007e01 force 1 ,pdata 
+
+first_block:
+6c67 18007000 force regidx_data ,regext_index 
+
+iv_common:
+6c68 184d5e00 lshift8 temp ,regext 
+6c69 9de1de00 ior regext ,regext 
+6c6a 1f00f001 increase 1 ,regext_index 
+6c6b 184cde00 rshift8 temp ,regext 
+6c6c 1df15e00 rshift16 regext ,regext 
+6c6d 6fe146aa fetch 2 ,mem_ccm_iv 
+6c6e 1ff07e00 lshift16 pdata ,pdata 
+6c6f 9de1de00 ior regext ,regext 
+6c70 1f00f001 increase 1 ,regext_index 
+6c71 ede20006 ifetchr regext ,4 ,contr 
+6c72 1f00f001 increase 1 ,regext_index 
+6c73 efe10006 ifetch 2 ,contr 
+6c74 1a30de00 byteswap rega ,regext 
+6c75 1df05e00 lshift16 regext ,regext 
+6c76 9de1de00 ior regext ,regext 
+6c77 1f00f001 increase 1 ,regext_index 
+6c78 20600000 rtn 
+
+generate_mic:
+6c79 1a608c01 add regc ,1 ,contr 
+6c7a efe08006 ifetch 1 ,contr 
+6c7b 98002200 iforce rega 
+6c7c 20406c64 call first_block_counter 
+6c7d 20406d59 call do_aes_ocb 
+6c7e 18007000 force regidx_data ,regext_index 
+6c7f efe08013 ifetch 1 ,regc 
+6c80 1fe17e03 and_into 0x3 ,pdata 
+6c81 1ff05e00 lshift16 pdata ,regext 
+6c82 79205e08 set1 8 ,regext 
+6c83 20406dc9 call clear_hidata 
+6c84 20406d5c call do_aes_cbc 
+6c85 1a227200 copy rega ,loopcnt 
+6c86 1a608c02 add regc ,2 ,contr 
+6c87 20406da8 call padding_data 
+
+generate_mic_loop:
+6c88 20406db2 call aes_load_data 
+6c89 20406d5c call do_aes_cbc 
+6c8a 1f227e00 deposit loopcnt 
+6c8b 203a6c8d branch generate_mic_end ,blank 
+6c8c 20206c88 branch generate_mic_loop 
+
+generate_mic_end:
+6c8d 1800700c force regidx_result ,regext_index 
+6c8e 1de27e00 deposit regext 
+6c8f 67e2026f store 4 ,mem_le_mic 
+6c90 20600000 rtn 
+
+aes_crypt_data:
+6c91 1a20a201 increase 1 ,rega 
+6c92 20406c66 call first_block_data 
+6c93 1a620c00 copy regc ,contr 
+6c94 20406dbc call aes_load_xor 
+6c95 20406d5f call do_aes_ctr 
+6c96 20406dd8 call store_enc_data 
+6c97 1a60a610 increase 16 ,regc 
+6c98 1a40a5f0 increase -16 ,regb 
+6c99 20216c91 branch aes_crypt_data ,positive 
+6c9a 20600000 rtn 
+
+ccm_br_enc_new:
+6c9b 20406d4c call ccm_init_common 
+6c9c 4739c02e bpatchx patch2e_3 ,mem_patch2e 
+6c9d d8c00063 arg mem_kc ,contr 
+6c9e 20406dbe call load_key 
+6c9f 7080d500 jam 0 ,core_ccm_aad0 
+6ca0 18217e0f and type ,0x0f ,pdata 
+6ca1 1fe9fe00 lshift3 pdata ,pdata 
+6ca2 9881fe00 ior am_addr ,pdata 
+6ca3 67f080d6 store 1 ,core_ccm_aad1 
+6ca4 6fe0c1e4 fetch 1 ,mem_llid 
+6ca5 67f080d7 store 1 ,core_ccm_aad2 
+6ca6 627100d1 storer regc ,2 ,core_ccm_input_playload_addr 
+6ca7 627100d3 storer regc ,2 ,core_ccm_output_playload_addr 
+6ca8 6a2146b2 fetchr rega ,2 ,mem_ccm_len 
+6ca9 684ac69c fetcht 5 ,mem_ccm_pcnt_tx 
+6caa 20406cbd call ccm_br_check_0_length_continuation 
+6cab 20406c61 call ccm_b0 
+6cac 70800a02 jam 2 ,core_ccm_ctrl 
+6cad 70800a03 jam 3 ,core_ccm_ctrl 
+6cae 6fe146b2 fetch 2 ,mem_ccm_len 
+6caf 67f100da store 2 ,core_ccm_inptr 
+6cb0 1fe0fe04 increase 4 ,pdata 
+6cb1 67e146b2 store 2 ,mem_ccm_len 
+6cb2 1a627e00 copy regc ,pdata 
+6cb3 9a20a200 iadd rega ,rega 
+6cb4 20406d53 call wait_ccm_done 
+6cb5 df00000c arg regidx_result ,regext_index 
+6cb6 e5e20011 istorer regext ,4 ,rega 
+6cb7 65e2026f storer regext ,4 ,mem_le_mic 
+6cb8 20600000 rtn 
+
+ccm_br_pcnt_tx_add:
+6cb9 6fe2c69c fetch 5 ,mem_ccm_pcnt_tx 
+6cba 1fe0fe01 increase 1 ,pdata 
+6cbb 67e2c69c store 5 ,mem_ccm_pcnt_tx 
+6cbc 20206cc3 branch ccm_br_pcnt_tx_set 
+
+ccm_br_check_0_length_continuation:
+6cbd 6fe0c1e4 fetch 1 ,mem_llid 
+6cbe c1808000 rtnne llid_l2cap_cont 
+6cbf 6fe146b2 fetch 2 ,mem_ccm_len 
+6cc0 247a0000 nrtn blank 
+6cc1 79200424 set1 br_ccm_0_length_continuation ,temp 
+6cc2 20600000 rtn 
+
+ccm_br_pcnt_tx_set:
+6cc3 6fe0c6a0 fetch 1 ,mem_ccm_pcnt_tx + 4 
+6cc4 1fe17e0f and pdata ,0x0f ,pdata 
+6cc5 1fe1fe20 or pdata ,0x20 ,pdata 
+6cc6 67e0c6a0 store 1 ,mem_ccm_pcnt_tx + 4 
+6cc7 20600000 rtn 
+
+ccm_br_pcnt_rx_set:
+6cc8 6fe0c6a5 fetch 1 ,mem_ccm_pcnt_rx + 4 
+6cc9 1fe17e0f and pdata ,0x0f ,pdata 
+6cca 67e0c6a5 store 1 ,mem_ccm_pcnt_rx + 4 
+6ccb 20600000 rtn 
+
+ccm_br_decrypt_new:
+6ccc 18a27e00 copy contw ,pdata 
+6ccd 684900af fetcht 2 ,mem_len 
+6cce 18408404 increase 4 ,temp 
+6ccf 98467e00 isub temp ,pdata 
+6cd0 67e146b4 store 2 ,mem_ccm_rx_ptr 
+6cd1 67f100d1 store 2 ,core_ccm_input_playload_addr 
+6cd2 67f100d3 store 2 ,core_ccm_output_playload_addr 
+6cd3 20407e5a call disable_user2 
+6cd4 20406d4c call ccm_init_common 
+6cd5 d8c00063 arg mem_kc ,contr 
+6cd6 20406dbe call load_key 
+6cd7 7080d500 jam 0 ,core_ccm_aad0 
+6cd8 6fe0801a fetch 1 ,mem_rx_type 
+6cd9 1fe17e0f and pdata ,0x0f ,pdata 
+6cda 1fe9fe00 lshift3 pdata ,pdata 
+6cdb 9881fe00 ior am_addr ,pdata 
+6cdc 67f080d6 store 1 ,core_ccm_aad1 
+6cdd 6fe080e5 fetch 1 ,mem_lch_code 
+6cde 1fe17e03 and pdata ,0x3 ,pdata 
+6cdf 67e0c1e4 store 1 ,mem_llid 
+6ce0 67f080d7 store 1 ,core_ccm_aad2 
+6ce1 6a2100af fetchr rega ,2 ,mem_len 
+6ce2 622146b2 storer rega ,2 ,mem_ccm_len 
+6ce3 6fe146b4 fetch 2 ,mem_ccm_rx_ptr 
+6ce4 9a208c00 iadd rega ,contr 
+6ce5 18007000 force regidx_data ,regext_index 
+6ce6 ede20006 ifetchr regext ,4 ,contr 
+6ce7 65e20273 storer regext ,4 ,mem_le_peer_mic 
+6ce8 684ac6a1 fetcht 5 ,mem_ccm_pcnt_rx 
+6ce9 20406cbd call ccm_br_check_0_length_continuation 
+6cea 20406c61 call ccm_b0 
+6ceb 70800a06 jam 6 ,core_ccm_ctrl 
+6cec 70800a07 jam 7 ,core_ccm_ctrl 
+6ced 6fe100af fetch 2 ,mem_len 
+6cee 67f100da store 2 ,core_ccm_inptr 
+6cef 20406d53 call wait_ccm_done 
+6cf0 6ff08108 fetch 1 ,core_misc_status 
+6cf1 c4038000 rtnbit0 7 
+6cf2 20207e58 branch enable_user2 
+
+ccm_br_pcnt_rx_add:
+6cf3 c6078000 rtnmark1 mark_old_packet 
+6cf4 684a0273 fetcht 4 ,mem_le_peer_mic 
+6cf5 604a46a6 storet 4 ,mem_ccm_last_mic 
+6cf6 6fe2c6a1 fetch 5 ,mem_ccm_pcnt_rx 
+6cf7 1fe0fe01 increase 1 ,pdata 
+6cf8 67e2c6a1 store 5 ,mem_ccm_pcnt_rx 
+6cf9 20206cc8 branch ccm_br_pcnt_rx_set 
+
+le_decrypt_new:
+6cfa 20406d4c call ccm_init_common 
+6cfb 7080d500 jam 0 ,core_ccm_aad0 
+6cfc 7080d601 jam 1 ,core_ccm_aad1 
+6cfd 6fe0816b fetch 1 ,mem_le_rxbuf_data_header 
+6cfe 1fe17e03 and_into 0x3 ,pdata 
+6cff 67f080d7 store 1 ,core_ccm_aad2 
+6d00 5800016d setarg mem_le_rxbuf_data_payload 
+6d01 67f100d1 store 2 ,core_ccm_input_playload_addr 
+6d02 67f100d3 store 2 ,core_ccm_output_playload_addr 
+6d03 6a20816c fetchr rega ,1 ,mem_le_rxbuf_data_length 
+6d04 1a20a3fc increase -4 ,rega 
+6d05 24217e5e nbranch disable_blank ,positive 
+6d06 6220816c storer rega ,1 ,mem_le_rxbuf_data_length 
+6d07 5800016d setarg mem_le_rxbuf_data_payload 
+6d08 9a208c00 iadd rega ,contr 
+6d09 18007000 force regidx_data ,regext_index 
+6d0a ede20006 ifetchr regext ,4 ,contr 
+6d0b 65e20273 storer regext ,4 ,mem_le_peer_mic 
+6d0c 684ac6a1 fetcht 5 ,mem_ccm_pcnt_rx 
+6d0d 20406c61 call ccm_b0 
+6d0e 70800a06 jam 6 ,core_ccm_ctrl 
+6d0f 70800a07 jam 7 ,core_ccm_ctrl 
+6d10 6fe0816c fetch 1 ,mem_le_rxbuf_data_length 
+6d11 67f100da store 2 ,core_ccm_inptr 
+6d12 20406d53 call wait_ccm_done 
+6d13 6ff08108 fetch 1 ,core_misc_status 
+6d14 c303fe5e bbit0 7 ,disable_blank 
+6d15 684a0273 fetcht 4 ,mem_le_peer_mic 
+6d16 6fe246a6 fetch 4 ,mem_ccm_last_mic 
+6d17 98467e00 isub temp ,pdata 
+6d18 207a0000 rtn blank 
+6d19 604a46a6 storet 4 ,mem_ccm_last_mic 
+6d1a 6fe2c6a1 fetch 5 ,mem_ccm_pcnt_rx 
+6d1b 1fe0fe01 increase 1 ,pdata 
+6d1c 79207e27 set1 le_ccm_directionbit ,pdata 
+6d1d 67e2c6a1 store 5 ,mem_ccm_pcnt_rx 
+6d1e 18007e00 force 0 ,pdata 
+6d1f 20600000 rtn 
+
+le_encrypt_new:
+6d20 20406d27 call le_encrypt_new_start 
+6d21 580041f7 setarg mem_le_txpayload 
+6d22 9a20a200 iadd rega ,rega 
+6d23 20406d53 call wait_ccm_done 
+6d24 df00000c arg regidx_result ,regext_index 
+6d25 e5e20011 istorer regext ,4 ,rega 
+6d26 20600000 rtn 
+
+le_encrypt_new_start:
+6d27 20406d4c call ccm_init_common 
+6d28 473a402e bpatchx patch2e_4 ,mem_patch2e 
+6d29 7080d500 jam 0 ,core_ccm_aad0 
+6d2a 7080d601 jam 1 ,core_ccm_aad1 
+6d2b 6fe0c1f5 fetch 1 ,mem_le_txheader 
+6d2c 1fe17e03 and_into 0x3 ,pdata 
+6d2d 67f080d7 store 1 ,core_ccm_aad2 
+6d2e 6fe1097b fetch 2 ,mem_contr 
+6d2f 67f100d1 store 2 ,core_ccm_input_playload_addr 
+6d30 580041f7 setarg mem_le_txpayload 
+6d31 67f100d3 store 2 ,core_ccm_output_playload_addr 
+6d32 6a20c1f6 fetchr rega ,1 ,mem_le_txlen 
+6d33 684ac69c fetcht 5 ,mem_ccm_pcnt_tx 
+6d34 20406c61 call ccm_b0 
+6d35 70800a02 jam 2 ,core_ccm_ctrl 
+6d36 70800a03 jam 3 ,core_ccm_ctrl 
+6d37 6fe0c1f6 fetch 1 ,mem_le_txlen 
+6d38 67f100da store 2 ,core_ccm_inptr 
+6d39 1fe0fe04 increase 4 ,pdata 
+6d3a 67e0c1f6 store 1 ,mem_le_txlen 
+6d3b 6fe2c69c fetch 5 ,mem_ccm_pcnt_tx 
+6d3c 1fe0fe01 increase 1 ,pdata 
+6d3d 793ffe27 set0 le_ccm_directionbit ,pdata 
+6d3e 67e2c69c store 5 ,mem_ccm_pcnt_tx 
+6d3f 20600000 rtn 
+
+ccm_wait_enc:
+6d40 6ff1011a fetch 2 ,core_ccm_outptr 
+6d41 98467c00 isub temp ,null 
+6d42 20628000 rtn zero 
+6d43 247a0000 nrtn blank 
+6d44 20206d40 branch ccm_wait_enc 
+
+ccm_check_enc_done:
+6d45 6ff08108 fetch 1 ,core_misc_status 
+6d46 c303137a bbit0 6 ,assert 
+
+ccm_enc_done:
+6d47 580041f7 setarg mem_le_txpayload 
+6d48 98408a00 iadd temp ,contw 
+6d49 df00000c arg regidx_result ,regext_index 
+6d4a e5e20005 istorer regext ,4 ,contw 
+6d4b 20206d55 branch ccm_ctrl_clr 
+
+ccm_init_common:
+6d4c 473ac02e bpatchx patch2e_5 ,mem_patch2e 
+6d4d 1800700c force regidx_result ,regext_index 
+6d4e 20406dcc call aes_clear 
+6d4f 20406dcb call aes_clear_data 
+6d50 58000000 setarg 0 
+6d51 67f100da store 2 ,core_ccm_inptr 
+6d52 20600000 rtn 
+
+wait_ccm_done:
+6d53 6ff08108 fetch 1 ,core_misc_status 
+6d54 c3036d53 bbit0 6 ,wait_ccm_done 
+
+ccm_ctrl_clr:
+6d55 70800a00 jam 0 ,core_ccm_ctrl 
+6d56 20600000 rtn 
+
+wait_aes:
+6d57 243bed57 nbranch wait_aes ,aes_ready 
+6d58 20600000 rtn 
+
+do_aes_ocb:
+6d59 18006c30 force 0x30 ,aes_ctrl 
+6d5a 18006c00 force 0x0 ,aes_ctrl 
+6d5b 20206d57 branch wait_aes 
+
+do_aes_cbc:
+6d5c 18006c32 force 0x32 ,aes_ctrl 
+6d5d 18006c02 force 0x2 ,aes_ctrl 
+6d5e 20206d57 branch wait_aes 
+
+do_aes_ctr:
+6d5f 18006c34 force 0x34 ,aes_ctrl 
+6d60 18006c04 force 0x4 ,aes_ctrl 
+6d61 20206d57 branch wait_aes 
+
+aes_init:
+6d62 18006c01 force 1 ,aes_ctrl 
+6d63 18006c00 force 0 ,aes_ctrl 
+6d64 20600000 rtn 
+
+function_s1:
+6d65 18007000 force regidx_data ,regext_index 
+6d66 6fe20277 fetch 4 ,mem_le_mrand 
+6d67 98005e00 iforce regext 
+6d68 1f00f001 increase 1 ,regext_index 
+6d69 efe20006 ifetch 4 ,contr 
+6d6a 98005e00 iforce regext 
+6d6b 1f00f001 increase 1 ,regext_index 
+6d6c 6fe24337 fetch 4 ,mem_le_srand 
+6d6d 98005e00 iforce regext 
+6d6e 1f00f001 increase 1 ,regext_index 
+6d6f efe20006 ifetch 4 ,contr 
+6d70 98005e00 iforce regext 
+6d71 1f00f001 increase 1 ,regext_index 
+6d72 20406dcc call aes_clear 
+6d73 1f00f1fc increase -4 ,regext_index 
+6d74 6fe2439e fetch 4 ,mem_le_tk 
+6d75 1fe25e00 copy pdata ,regext 
+6d76 1f00f004 increase 4 ,regext_index 
+6d77 18006c38 force 0x38 ,aes_ctrl 
+6d78 18006c08 force 0x8 ,aes_ctrl 
+6d79 20206d57 branch wait_aes 
+
+function_c1:
+6d7a 473b402e bpatchx patch2e_6 ,mem_patch2e 
+6d7b 6fe3437a fetch 6 ,mem_le_lap 
+6d7c 684b0297 fetcht 6 ,mem_le_plap 
+6d7d 2034ed80 branch function_c1_master ,master 
+6d7e 6fe30297 fetch 6 ,mem_le_plap 
+6d7f 684b437a fetcht 6 ,mem_le_lap 
+
+function_c1_master:
+6d80 18007008 force regidx_xor ,regext_index 
+6d81 18425e00 copy temp ,regext 
+6d82 1f00f001 increase 1 ,regext_index 
+6d83 184f5e00 rshift32 temp ,regext 
+6d84 1ff07e00 lshift16 pdata ,pdata 
+6d85 9de1de00 ior regext ,regext 
+6d86 1f00f001 increase 1 ,regext_index 
+6d87 1fef5e00 rshift32 pdata ,regext 
+6d88 1f00f001 increase 1 ,regext_index 
+6d89 18005e00 force 0 ,regext 
+6d8a 18007e00 force 0 ,pdata 
+6d8b 6fe0c36a fetch 1 ,mem_le_conn_peer_addr_type 
+6d8c 6848c42b fetcht 1 ,mem_le_adv_own_addr_type 
+6d8d 2434ed90 nbranch function_c1_irat ,master 
+6d8e 6fe0c371 fetch 1 ,mem_le_conn_own_addr_type 
+6d8f 6848c36a fetcht 1 ,mem_le_conn_peer_addr_type 
+
+function_c1_irat:
+6d90 67e0c347 store 1 ,mem_le_iat 
+6d91 6048c348 storet 1 ,mem_le_rat 
+6d92 18007000 force regidx_data ,regext_index 
+6d93 da404347 arg mem_le_iat ,regb 
+6d94 18007204 force 4 ,loopcnt 
+
+function_c1_loop1:
+6d95 efe20011 ifetch 4 ,rega 
+6d96 e8420012 ifetcht 4 ,regb 
+6d97 9842de00 ixor temp ,regext 
+6d98 1f00f001 increase 1 ,regext_index 
+6d99 1a20a204 increase 4 ,rega 
+6d9a 1a40a404 increase 4 ,regb 
+6d9b c2006d95 loop function_c1_loop1 
+6d9c 20406dcc call aes_clear 
+6d9d 1f00f1fc increase -4 ,regext_index 
+6d9e 6fe2439e fetch 4 ,mem_le_tk 
+6d9f 1fe25e00 copy pdata ,regext 
+6da0 1f00f004 increase 4 ,regext_index 
+6da1 18006c38 force 0x38 ,aes_ctrl 
+6da2 18006c0c force 0xc ,aes_ctrl 
+6da3 20406d57 call wait_aes 
+6da4 20406dcb call aes_clear_data 
+6da5 18006c3a force 0x3a ,aes_ctrl 
+6da6 18006c08 force 0x8 ,aes_ctrl 
+6da7 20206d57 branch wait_aes 
+
+padding_data:
+6da8 2f200600 compare 0 ,loopcnt ,3 
+6da9 20608000 rtn true 
+6daa 18c27e00 deposit contr 
+6dab 9f208a00 iadd loopcnt ,contw 
+6dac 18007e00 force 0 ,pdata 
+
+padding_loop:
+6dad e7e08005 istore 1 ,contw 
+6dae 1f20f201 increase 1 ,loopcnt 
+6daf 2f200600 compare 0 ,loopcnt ,3 
+6db0 20608000 rtn true 
+6db1 20206dad branch padding_loop 
+
+aes_load_data:
+6db2 18007000 force regidx_data ,regext_index 
+
+load_data_loop:
+6db3 1f227e00 deposit loopcnt 
+6db4 203a6db7 branch load_data_padding ,blank 
+6db5 efe20006 ifetch 4 ,contr 
+6db6 1f20f3fc increase -4 ,loopcnt 
+
+load_data_padding:
+6db7 98005e00 iforce regext 
+6db8 1f00f001 increase 1 ,regext_index 
+6db9 2f001e04 compare regidx_key ,regext_index ,0xf 
+6dba 20608000 rtn true 
+6dbb 20206db3 branch load_data_loop 
+
+aes_load_xor:
+6dbc 18007008 force regidx_xor ,regext_index 
+6dbd 20206dc1 branch load_regext 
+
+load_key:
+6dbe 18007004 force regidx_key ,regext_index 
+6dbf 20206dc1 branch load_regext 
+
+load_data128:
+6dc0 18007000 force regidx_data ,regext_index 
+
+load_regext:
+6dc1 18007204 force 4 ,loopcnt 
+
+load_regext_loop:
+6dc2 efe20006 ifetch 4 ,contr 
+6dc3 98005e00 iforce regext 
+6dc4 1f00f001 increase 1 ,regext_index 
+6dc5 c2006dc2 loop load_regext_loop 
+6dc6 20600000 rtn 
+
+load_sk:
+6dc7 d8c002c7 arg mem_le_sk ,contr 
+6dc8 20206dbe branch load_key 
+
+clear_hidata:
+6dc9 18007204 force 4 ,loopcnt 
+6dca 20206dce branch clear_data_rest 
+
+aes_clear_data:
+6dcb 18007000 force regidx_data ,regext_index 
+
+aes_clear:
+6dcc 18007204 force 4 ,loopcnt 
+
+clear_loop:
+6dcd 18005e00 force 0 ,regext 
+
+clear_data_rest:
+6dce 1f00f001 increase 1 ,regext_index 
+6dcf c2006dcd loop clear_loop 
+6dd0 20600000 rtn 
+
+store_aes_result:
+6dd1 1800700c force regidx_result ,regext_index 
+6dd2 18007204 force 4 ,loopcnt 
+
+send_aes_result_loop:
+6dd3 1de27e00 deposit regext 
+6dd4 e7e20005 istore 4 ,contw 
+6dd5 1f00f001 increase 1 ,regext_index 
+6dd6 c2006dd3 loop send_aes_result_loop 
+6dd7 20600000 rtn 
+
+store_enc_data:
+6dd8 1800700c force regidx_result ,regext_index 
+6dd9 1a620a00 copy regc ,contw 
+6dda 1a40f201 add regb ,1 ,loopcnt 
+6ddb 1f267c0f sub loopcnt ,15 ,null 
+6ddc 20216dde branch store_enc_loop ,positive 
+6ddd 18007210 force 16 ,loopcnt 
+
+store_enc_loop:
+6dde 1de27e00 deposit regext 
+6ddf 1f267c03 sub loopcnt ,3 ,null 
+6de0 20216de6 branch store_enc_byte ,positive 
+6de1 e7e20005 istore 4 ,contw 
+6de2 1f20f3fc increase -4 ,loopcnt 
+6de3 20628000 rtn zero 
+6de4 1f00f001 increase 1 ,regext_index 
+6de5 20206dde branch store_enc_loop 
+
+store_enc_byte:
+6de6 e7e08005 istore 1 ,contw 
+6de7 1fecfe00 rshift8 pdata ,pdata 
+6de8 c2006de6 loop store_enc_byte 
+6de9 20600000 rtn 
+
+compare_res:
+6dea 1800700c force regidx_result ,regext_index 
+6deb 18007204 force 4 ,loopcnt 
+
+compare_res_loop:
+6dec efe20006 ifetch 4 ,contr 
+6ded 9de67c00 isub regext ,null 
+6dee 24628000 nrtn zero 
+6def 1f00f001 increase 1 ,regext_index 
+6df0 c2006dec loop compare_res_loop 
+6df1 18007c00 force 0 ,null 
+6df2 20600000 rtn 
+
+enable_authrom:
+6df3 6ff08050 fetch 1 ,core_clkoff 
+6df4 793ffe00 set0 clock_off_auth_rom ,pdata 
+6df5 67f08050 store 1 ,core_clkoff 
+6df6 20600000 rtn 
+
+disable_authrom:
+6df7 6ff08050 fetch 1 ,core_clkoff 
+6df8 79207e00 set1 clock_off_auth_rom ,pdata 
+6df9 67f08050 store 1 ,core_clkoff 
+6dfa 20600000 rtn 
+
+init_memp:
+6dfb d8a00748 arg mem_p ,contw 
+6dfc 3803ffff setsect 0 ,0x3ffff 
+6dfd 3807ffff setsect 1 ,0x3ffff 
+6dfe 380bffff setsect 2 ,0x3ffff 
+6dff 380ffbff setsect 3 ,0x3fbff 
+6e00 e7e48005 istore 9 ,contw 
+6e01 3803ffff setsect 0 ,0x3ffff 
+6e02 3807ffff setsect 1 ,0x3ffff 
+6e03 380bffff setsect 2 ,0x3ffff 
+6e04 380fffff setsect 3 ,0x3ffff 
+6e05 e7e48005 istore 9 ,contw 
+6e06 3803ffff setsect 0 ,0x3ffff 
+6e07 3807ffff setsect 1 ,0x3ffff 
+6e08 380bcfff setsect 2 ,0x3cfff 
+6e09 380fffff setsect 3 ,0x3ffff 
+6e0a e7e48005 istore 9 ,contw 
+6e0b 3803ffff setsect 0 ,0x3ffff 
+6e0c 3807ffff setsect 1 ,0x3ffff 
+6e0d 380bffef setsect 2 ,0x3ffef 
+6e0e 380fffff setsect 3 ,0x3ffff 
+6e0f e7e48005 istore 9 ,contw 
+6e10 3803ffff setsect 0 ,0x3ffff 
+6e11 3807ffff setsect 1 ,0x3ffff 
+6e12 380bffff setsect 2 ,0x3ffff 
+6e13 380fffff setsect 3 ,0x3ffff 
+6e14 e7e48005 istore 9 ,contw 
+6e15 3803ffff setsect 0 ,0x3ffff 
+6e16 38066c7f setsect 1 ,0x26c7f 
+6e17 3808146b setsect 2 ,0x146b 
+6e18 380f7bb3 setsect 3 ,0x37bb3 
+6e19 e7e48005 istore 9 ,contw 
+6e1a 3801feb8 setsect 0 ,0x1feb8 
+6e1b 38050c12 setsect 1 ,0x10c12 
+6e1c 380ab722 setsect 2 ,0x2b722 
+6e1d 380e9fa6 setsect 3 ,0x29fa6 
+6e1e e7e48005 istore 9 ,contw 
+6e1f 3800e70f setsect 0 ,0xe70f 
+6e20 38056720 setsect 1 ,0x16720 
+6e21 3808519e setsect 2 ,0x519e 
+6e22 380d9084 setsect 3 ,0x19084 
+6e23 e7e48005 istore 9 ,contw 
+6e24 38031012 setsect 0 ,0x31012 
+6e25 380760bf setsect 1 ,0x360bf 
+6e26 380bf0af setsect 2 ,0x3f0af 
+6e27 380c03d3 setsect 3 ,0x3d3 
+6e28 e7e48005 istore 9 ,contw 
+6e29 3803a188 setsect 0 ,0x3a188 
+6e2a 38043ad0 setsect 1 ,0x3ad0 
+6e2b 380bcbf2 setsect 2 ,0x3cbf2 
+6e2c 380e43d9 setsect 3 ,0x243d9 
+6e2d e7e48005 istore 9 ,contw 
+6e2e 3802b030 setsect 0 ,0x2b030 
+6e2f 38076a03 setsect 1 ,0x36a03 
+6e30 38091188 setsect 2 ,0x11188 
+6e31 380de520 setsect 3 ,0x1e520 
+6e32 e7e48005 istore 9 ,contw 
+6e33 3803a11e setsect 0 ,0x3a11e 
+6e34 3804fe5d setsect 1 ,0xfe5d 
+6e35 3808dd57 setsect 2 ,0xdd57 
+6e36 380dac93 setsect 3 ,0x1ac93 
+6e37 e7e48005 istore 9 ,contw 
+6e38 380011ed setsect 0 ,0x11ed 
+6e39 380618c4 setsect 1 ,0x218c4 
+6e3a 38088da7 setsect 2 ,0x8da7 
+6e3b 380e57ff setsect 3 ,0x257ff 
+6e3c e7e48005 istore 9 ,contw 
+6e3d 3803192b setsect 0 ,0x3192b 
+6e3e 38074641 setsect 1 ,0x34641 
+6e3f 3809be0c setsect 2 ,0x1be0c 
+6e40 380f66ad setsect 3 ,0x366ad 
+6e41 e7e48005 istore 9 ,contw 
+6e42 38001f83 setsect 0 ,0x1f83 
+6e43 38055a23 setsect 1 ,0x15a23 
+6e44 380bf9b0 setsect 2 ,0x3f9b0 
+6e45 380c3949 setsect 3 ,0x3949 
+6e46 e7e48005 istore 9 ,contw 
+6e47 38013a51 setsect 0 ,0x13a51 
+6e48 380553fd setsect 1 ,0x153fd 
+6e49 380b372a setsect 2 ,0x3372a 
+6e4a 380cf1bb setsect 3 ,0xf1bb 
+6e4b e7e48005 istore 9 ,contw 
+6e4c 3803ae85 setsect 0 ,0x3ae85 
+6e4d 3805eed9 setsect 1 ,0x1eed9 
+6e4e 38089e66 setsect 2 ,0x9e66 
+6e4f 380c01a8 setsect 3 ,0x1a8 
+6e50 e7e40005 istore 8 ,contw 
+6e51 20600000 rtn 
+
+init_memp_256:
+6e52 d8a007e0 arg mem_p_256 ,contw 
+6e53 3803ffff setsect 0 ,0x3ffff 
+6e54 3807ffff setsect 1 ,0x3ffff 
+6e55 380bffff setsect 2 ,0x3ffff 
+6e56 380fffff setsect 3 ,0x3ffff 
+6e57 e7e48005 istore 9 ,contw 
+6e58 3803ffff setsect 0 ,0x3ffff 
+6e59 3804003f setsect 1 ,0x3f 
+6e5a 38080000 setsect 2 ,0x0 
+6e5b 380c0000 setsect 3 ,0x0 
+6e5c e7e48005 istore 9 ,contw 
+6e5d 38000000 setsect 0 ,0x0 
+6e5e 38040000 setsect 1 ,0x0 
+6e5f 38081000 setsect 2 ,0x1000 
+6e60 380c0000 setsect 3 ,0x0 
+6e61 e7e48005 istore 9 ,contw 
+6e62 3803ff00 setsect 0 ,0x3ff00 
+6e63 3807ffff setsect 1 ,0x3ffff 
+6e64 380bffcf setsect 2 ,0x3ffcf 
+6e65 380fffff setsect 3 ,0x3ffff 
+6e66 e7e48005 istore 9 ,contw 
+6e67 3803ffff setsect 0 ,0x3ffff 
+6e68 3807ffff setsect 1 ,0x3ffff 
+6e69 380bffff setsect 2 ,0x3ffff 
+6e6a 380c03ff setsect 3 ,0x3ff 
+6e6b e7e48005 istore 9 ,contw 
+6e6c 38000000 setsect 0 ,0x0 
+6e6d 38040000 setsect 1 ,0x0 
+6e6e 38080000 setsect 2 ,0x0 
+6e6f 380c0000 setsect 3 ,0x0 
+6e70 e7e48005 istore 9 ,contw 
+6e71 38010000 setsect 0 ,0x10000 
+6e72 38040000 setsect 1 ,0x0 
+6e73 380bf000 setsect 2 ,0x3f000 
+6e74 380fffff setsect 3 ,0x3ffff 
+6e75 e7e48005 istore 9 ,contw 
+6e76 380296ff setsect 0 ,0x296ff 
+6e77 38062630 setsect 1 ,0x22630 
+6e78 380b945d setsect 2 ,0x3945d 
+6e79 380fd284 setsect 3 ,0x3d284 
+6e7a e7e48005 istore 9 ,contw 
+6e7b 380333a0 setsect 0 ,0x333a0 
+6e7c 38044b7a setsect 1 ,0x4b7a 
+6e7d 380837d8 setsect 2 ,0x37d8 
+6e7e 380fc9dc setsect 3 ,0x3c9dc 
+6e7f e7e48005 istore 9 ,contw 
+6e80 3803a440 setsect 0 ,0x3a440 
+6e81 3805b958 setsect 1 ,0x1b958 
+6e82 380b8bce setsect 2 ,0x38bce 
+6e83 380d091f setsect 3 ,0x1091f 
+6e84 e7e48005 istore 9 ,contw 
+6e85 3802e12c setsect 0 ,0x2e12c 
+6e86 3805f47c setsect 1 ,0x1f47c 
+6e87 380b56b1 setsect 2 ,0x356b1 
+6e88 380efd47 setsect 3 ,0x2fd47 
+6e89 e7e48005 istore 9 ,contw 
+6e8a 38006837 setsect 0 ,0x6837 
+6e8b 3806ed90 setsect 1 ,0x2ed90 
+6e8c 3809ecec setsect 2 ,0x1ecec 
+6e8d 380dacc5 setsect 3 ,0x1acc5 
+6e8e e7e48005 istore 9 ,contw 
+6e8f 38023357 setsect 0 ,0x23357 
+6e90 38058af3 setsect 1 ,0x18af3 
+6e91 3808f9e1 setsect 2 ,0xf9e1 
+6e92 380d29f0 setsect 3 ,0x129f0 
+6e93 e7e48005 istore 9 ,contw 
+6e94 3802e7eb setsect 0 ,0x2e7eb 
+6e95 3807e6e3 setsect 1 ,0x3e6e3 
+6e96 380be1a7 setsect 2 ,0x3e1a7 
+6e97 380d0b8b setsect 3 ,0x10b8b 
+6e98 e7e48005 istore 9 ,contw 
+6e99 38024fe3 setsect 0 ,0x24fe3 
+6e9a 380420ef setsect 1 ,0x20ef 
+6e9b 3809b5a6 setsect 2 ,0x1b5a6 
+6e9c 380cdc2f setsect 3 ,0xdc2f 
+6e9d e7e48005 istore 9 ,contw 
+6e9e 38013860 setsect 0 ,0x13860 
+6e9f 3806bd69 setsect 1 ,0x2bd69 
+6ea0 3808391a setsect 2 ,0x391a 
+6ea1 380db222 setsect 3 ,0x1b222 
+6ea2 e7e48005 istore 9 ,contw 
+6ea3 20600000 rtn 
+
+publickey_init:
+6ea4 6fe0c764 fetch 1 ,mem_ssp_enable 
+6ea5 243a6ebf nbranch sp_initialize ,blank 
+6ea6 20207541 branch sp_initialize_256 
+
+sp_calc_sequence_256_check:
+6ea7 473bc02e bpatchx patch2e_7 ,mem_patch2e 
+6ea8 6fe0c764 fetch 1 ,mem_ssp_enable 
+6ea9 207a0000 rtn blank 
+6eaa 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+6eab c1808000 rtnne sp_key_valid 
+6eac 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+6ead 207a0000 rtn blank 
+6eae 6fe0c6bb fetch 1 ,mem_sc_local_key_invalid 
+6eaf c1018000 rtneq sp_key_valid_256 
+6eb0 6fe1478c fetch 2 ,mem_ui_state_map 
+6eb1 c2806eb5 bbit1 ui_state_bt_connected ,stop_publickey_calc_256 
+6eb2 6fe0c6ba fetch 1 ,mem_sc_calc 
+6eb3 c0007541 beq sp_calc_standby ,sp_initialize_256 
+6eb4 20600000 rtn 
+
+stop_publickey_calc_256:
+6eb5 7046ba00 jam sp_calc_standby ,mem_sc_calc 
+6eb6 20600000 rtn 
+
+sp_br_secure_connection_enable:
+6eb7 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+6eb8 79207e01 set1 secure_connections_br_bit ,pdata 
+6eb9 67e0c6b8 store 1 ,mem_secure_connections_enable 
+6eba 20600000 rtn 
+
+sp_br_secure_connection_disable:
+6ebb 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+6ebc 793ffe01 set0 secure_connections_br_bit ,pdata 
+6ebd 67e0c6b8 store 1 ,mem_secure_connections_enable 
+6ebe 20600000 rtn 
+
+sp_initialize:
+6ebf 473c402f bpatchx patch2f_0 ,mem_patch2f 
+6ec0 6fe0c764 fetch 1 ,mem_ssp_enable 
+6ec1 243a6ffb nbranch sp_pubkey_calc ,blank 
+
+sp_reset:
+6ec2 20406ecc call sp_clear_flags 
+6ec3 7046b900 jam sp_key_invalid ,mem_sp_local_key_invalid 
+6ec4 70087400 jam sp_calc_standby ,mem_sp_calc 
+6ec5 20600000 rtn 
+
+sp_wait_pubkey_calc_done:
+6ec6 6fe0c764 fetch 1 ,mem_ssp_enable 
+6ec7 207a0000 rtn blank 
+6ec8 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+6ec9 c1008000 rtneq sp_key_valid 
+6eca 2040706c call sp_calc_sequence 
+6ecb 20206ec6 branch sp_wait_pubkey_calc_done 
+
+sp_clear_flags:
+6ecc 473cc02f bpatchx patch2f_1 ,mem_patch2f 
+6ecd 58000880 setarg mem_sp_state_end 
+6ece d8a00870 arg mem_sp_state_start ,contw 
+6ecf 98a67200 isub contw ,loopcnt 
+6ed0 20407d26 call clear_mem 
+6ed1 58004770 setarg mem_sp_state_xmem_end 
+6ed2 d8a04768 arg mem_sp_state_xmem ,contw 
+6ed3 98a67200 isub contw ,loopcnt 
+6ed4 20207d26 branch clear_mem 
+
+sp_generate_local_key:
+6ed5 70087201 jam sp_flag_commit ,mem_sp_flag 
+6ed6 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+6ed7 c0016eda beq encapsulated_minor_type_p256 ,sp_generate_local_key0_256 
+6ed8 c000eee5 beq encapsulated_minor_type_p192 ,sp_generate_local_key0_192 
+6ed9 20600000 rtn 
+
+sp_generate_local_key0_256:
+6eda 6fe0c6bb fetch 1 ,mem_sc_local_key_invalid 
+6edb c001eedd beq sp_key_valid_256 ,sp_start_send_pubkey_256 
+6edc 20207562 branch sp_pubkey_calc_256 
+
+sp_start_send_pubkey_256:
+6edd 20407581 call sp_dhkey_calc_256 
+6ede 6fe08871 fetch 1 ,mem_master_sp_state 
+6edf 247a0000 nrtn blank 
+6ee0 70087003 jam sp_stat_key_send ,mem_sp_state 
+6ee1 20600000 rtn 
+
+sp_master_generate_local_key:
+6ee2 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+6ee3 c000f01a beq sp_key_valid ,sp_dhkey_calc 
+6ee4 2020137a branch assert 
+
+sp_generate_local_key0_192:
+6ee5 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+6ee6 c000eee8 beq sp_key_valid ,sp_start_send_pubkey 
+6ee7 20206ffb branch sp_pubkey_calc 
+
+sp_start_send_pubkey:
+6ee8 2040701a call sp_dhkey_calc 
+6ee9 6fe08871 fetch 1 ,mem_master_sp_state 
+6eea 247a0000 nrtn blank 
+6eeb 70087003 jam sp_stat_key_send ,mem_sp_state 
+6eec 20600000 rtn 
+
+sp_calc_check_publickey_256:
+6eed 20406f08 call sp_calc_b256 
+6eee da2008a0 arg mem_le_pubkey_remote_y_256 ,rega 
+6eef d8a00728 arg mem_t7_256 ,contw 
+6ef0 20407761 call bn_sqrmod_256 
+6ef1 da200880 arg mem_le_pubkey_remote_x_256 ,rega 
+6ef2 d8a006e8 arg mem_t2_256 ,contw 
+6ef3 20407761 call bn_sqrmod_256 
+6ef4 da2006e8 arg mem_t2_256 ,rega 
+6ef5 da400880 arg mem_le_pubkey_remote_x_256 ,regb 
+6ef6 d8a006e8 arg mem_t2_256 ,contw 
+6ef7 204076c9 call bn_mulmod_256 
+6ef8 da200800 arg mem_a_256 ,rega 
+6ef9 da400880 arg mem_le_pubkey_remote_x_256 ,regb 
+6efa d8a00708 arg mem_t3_256 ,contw 
+6efb 204076c9 call bn_mulmod_256 
+6efc da200708 arg mem_t3_256 ,rega 
+6efd da4006e8 arg mem_t2_256 ,regb 
+6efe d8a006e8 arg mem_t2_256 ,contw 
+6eff 20407765 call bn_addmod_256 
+6f00 da2006c8 arg mem_t0_256 ,rega 
+6f01 da4006e8 arg mem_t2_256 ,regb 
+6f02 d8a006c8 arg mem_t0_256 ,contw 
+6f03 20407765 call bn_addmod_256 
+6f04 df200020 arg 32 ,loopcnt 
+6f05 da200728 arg mem_t7_256 ,rega 
+6f06 da4006c8 arg mem_t0_256 ,regb 
+6f07 20207df1 branch string_compare 
+
+sp_calc_b256:
+6f08 da200840 arg mem_gy_256 ,rega 
+6f09 d8a006c8 arg mem_t0_256 ,contw 
+6f0a 20407761 call bn_sqrmod_256 
+6f0b da200820 arg mem_gx_256 ,rega 
+6f0c d8a006e8 arg mem_t2_256 ,contw 
+6f0d 20407761 call bn_sqrmod_256 
+6f0e da2006e8 arg mem_t2_256 ,rega 
+6f0f da400820 arg mem_gx_256 ,regb 
+6f10 d8a006e8 arg mem_t2_256 ,contw 
+6f11 204076c9 call bn_mulmod_256 
+6f12 da200800 arg mem_a_256 ,rega 
+6f13 da400820 arg mem_gx_256 ,regb 
+6f14 d8a00708 arg mem_t3_256 ,contw 
+6f15 204076c9 call bn_mulmod_256 
+6f16 da200708 arg mem_t3_256 ,rega 
+6f17 da4006e8 arg mem_t2_256 ,regb 
+6f18 d8a006e8 arg mem_t2_256 ,contw 
+6f19 20407765 call bn_addmod_256 
+6f1a da2006c8 arg mem_t0_256 ,rega 
+6f1b da4006e8 arg mem_t2_256 ,regb 
+6f1c d8a006c8 arg mem_t0_256 ,contw 
+6f1d 2020777e branch bn_submod_256 
+
+sp_calc_check_publickey:
+6f1e 20406f39 call sp_calc_b 
+6f1f da2008a8 arg mem_sp_pubkey_remote_y ,rega 
+6f20 d8a00728 arg mem_t7_256 ,contw 
+6f21 20407138 call bn_sqrmod 
+6f22 da200888 arg mem_sp_pubkey_remote_x ,rega 
+6f23 d8a006e8 arg mem_t2_256 ,contw 
+6f24 20407138 call bn_sqrmod 
+6f25 da2006e8 arg mem_t2_256 ,rega 
+6f26 da400888 arg mem_sp_pubkey_remote_x ,regb 
+6f27 d8a006e8 arg mem_t2_256 ,contw 
+6f28 20407116 call bn_mulmod 
+6f29 da200760 arg mem_a ,rega 
+6f2a da400888 arg mem_sp_pubkey_remote_x ,regb 
+6f2b d8a00708 arg mem_t3_256 ,contw 
+6f2c 20407116 call bn_mulmod 
+6f2d da200708 arg mem_t3_256 ,rega 
+6f2e da4006e8 arg mem_t2_256 ,regb 
+6f2f d8a006e8 arg mem_t2_256 ,contw 
+6f30 204070e5 call bn_addmod 
+6f31 da2006c8 arg mem_t0_256 ,rega 
+6f32 da4006e8 arg mem_t2_256 ,regb 
+6f33 d8a006c8 arg mem_t0_256 ,contw 
+6f34 204070e5 call bn_addmod 
+6f35 df200018 arg 24 ,loopcnt 
+6f36 da200728 arg mem_t7_256 ,rega 
+6f37 da4006c8 arg mem_t0_256 ,regb 
+6f38 20207df1 branch string_compare 
+
+sp_calc_b:
+6f39 da2007a8 arg mem_gy ,rega 
+6f3a d8a006c8 arg mem_t0_256 ,contw 
+6f3b 20407138 call bn_sqrmod 
+6f3c da200790 arg mem_gx ,rega 
+6f3d d8a006e8 arg mem_t2_256 ,contw 
+6f3e 20407138 call bn_sqrmod 
+6f3f da2006e8 arg mem_t2_256 ,rega 
+6f40 da400790 arg mem_gx ,regb 
+6f41 d8a006e8 arg mem_t2_256 ,contw 
+6f42 20407116 call bn_mulmod 
+6f43 da200760 arg mem_a ,rega 
+6f44 da400790 arg mem_gx ,regb 
+6f45 d8a00708 arg mem_t3_256 ,contw 
+6f46 20407116 call bn_mulmod 
+6f47 da200708 arg mem_t3_256 ,rega 
+6f48 da4006e8 arg mem_t2_256 ,regb 
+6f49 d8a006e8 arg mem_t2_256 ,contw 
+6f4a 204070e5 call bn_addmod 
+6f4b da2006c8 arg mem_t0_256 ,rega 
+6f4c da4006e8 arg mem_t2_256 ,regb 
+6f4d d8a006c8 arg mem_t0_256 ,contw 
+6f4e 202070e8 branch bn_submod 
+
+sp_calculate_commitment:
+6f4f 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+6f50 c0016f53 beq encapsulated_minor_type_p256 ,sp_calculate_commitment_256 
+6f51 c000ef63 beq encapsulated_minor_type_p192 ,sp_calculate_commitment_192 
+6f52 20600000 rtn 
+
+sp_calculate_commitment_256:
+6f53 6fe0c6ba fetch 1 ,mem_sc_calc 
+6f54 c0806f81 bne sp_calc_standby ,sp_calculate_commitment_wait_dhkey_calc 
+6f55 20406f7e call sp_local_random_key_generator 
+6f56 d8a00940 arg mem_sp_prarm_stack ,contw 
+6f57 580008f0 setarg mem_sp_random_local_end 
+6f58 e7e10005 istore 2 ,contw 
+6f59 580046fc setarg mem_sc_pubkey_local_x_256 + 32 
+6f5a e7e10005 istore 2 ,contw 
+6f5b 580008a0 setarg mem_le_pubkey_remote_x_256 + 32 
+6f5c e7e10005 istore 2 ,contw 
+
+sp_calculate_commitment0_256:
+6f5d 2040742a call function_f1_256 
+6f5e 6fe08871 fetch 1 ,mem_master_sp_state 
+6f5f c0026f7b beq sp_stat_commit_calc ,master_sp_calculate_commitment0 
+6f60 70087201 jam sp_flag_commit ,mem_sp_flag 
+6f61 70087005 jam sp_stat_commit_send ,mem_sp_state 
+6f62 20600000 rtn 
+
+sp_calculate_commitment_192:
+6f63 6fe08874 fetch 1 ,mem_sp_calc 
+6f64 c0806f81 bne sp_calc_standby ,sp_calculate_commitment_wait_dhkey_calc 
+6f65 20406f7e call sp_local_random_key_generator 
+6f66 d8a00940 arg mem_sp_prarm_stack ,contw 
+6f67 580008f0 setarg mem_sp_random_local_end 
+6f68 e7e10005 istore 2 ,contw 
+6f69 5800474c setarg mem_sp_pubkey_local_x_end 
+6f6a e7e10005 istore 2 ,contw 
+6f6b 580008a0 setarg mem_sp_pubkey_remote_x_end 
+6f6c e7e10005 istore 2 ,contw 
+6f6d 20206f75 branch sp_calculate_commitment0 
+
+master_sp_calculate_commitment:
+6f6e d8a00940 arg mem_sp_prarm_stack ,contw 
+6f6f 58000900 setarg mem_sp_random_remote_end 
+6f70 e7e10005 istore 2 ,contw 
+6f71 580008a0 setarg mem_sp_pubkey_remote_x_end 
+6f72 e7e10005 istore 2 ,contw 
+6f73 5800474c setarg mem_sp_pubkey_local_x_end 
+6f74 e7e10005 istore 2 ,contw 
+
+sp_calculate_commitment0:
+6f75 20407351 call function_f1_192 
+6f76 6fe08871 fetch 1 ,mem_master_sp_state 
+6f77 c0026f7b beq sp_stat_commit_calc ,master_sp_calculate_commitment0 
+6f78 70087201 jam sp_flag_commit ,mem_sp_flag 
+6f79 70087005 jam sp_stat_commit_send ,mem_sp_state 
+6f7a 20600000 rtn 
+
+master_sp_calculate_commitment0:
+6f7b 70087114 jam sp_stat_commitment_compare ,mem_master_sp_state 
+6f7c 20406ee2 call sp_master_generate_local_key 
+6f7d 20207068 branch master_set_mem_master_sp_flag 
+
+sp_local_random_key_generator:
+6f7e d8a008e0 arg mem_sp_random_local ,contw 
+6f7f 18000e08 force 8 ,queue 
+6f80 20207032 branch random_generator 
+
+sp_calculate_commitment_wait_dhkey_calc:
+6f81 70087201 jam sp_flag_commit ,mem_sp_flag 
+6f82 20600000 rtn 
+
+sp_confirm_check:
+6f83 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+6f84 c0016f89 beq encapsulated_minor_type_p256 ,sp_confirm_check_256 
+6f85 c000ef8c beq encapsulated_minor_type_p192 ,sp_confirm_check_192 
+
+sp_confirm_check_wait:
+6f86 70087009 jam sp_stat_confirm_check ,mem_sp_state 
+6f87 70087201 jam sp_flag_commit ,mem_sp_flag 
+6f88 20600000 rtn 
+
+sp_confirm_check_256:
+6f89 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+6f8a c081ef86 bne sp_key_valid_256 ,sp_confirm_check_wait 
+6f8b 20206f8e branch sp_confirm_check_common 
+
+sp_confirm_check_192:
+6f8c 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+6f8d c080ef86 bne sp_key_valid ,sp_confirm_check_wait 
+
+sp_confirm_check_common:
+6f8e d8a005e9 arg mem_addr_value ,contw 
+6f8f 6fe340a8 fetch 6 ,mem_lap 
+6f90 e7e30005 istore 6 ,contw 
+6f91 6fe30041 fetch 6 ,mem_plap 
+6f92 e7e30005 istore 6 ,contw 
+6f93 6fe1c768 fetch 3 ,mem_sp_iocap_remote 
+6f94 e7e18005 istore 3 ,contw 
+6f95 20407449 call function_f3a 
+6f96 da200910 arg mem_sp_calc_result_high ,rega 
+6f97 da400920 arg mem_sp_check_result ,regb 
+6f98 18000e04 force 4 ,queue 
+6f99 20407037 call compare4 
+6f9a 2420efa7 nbranch sp_confirm_check_failed ,true 
+6f9b 20406f9e call sp_confirm_check_success 
+6f9c 70007e41 jam lmp_dhkey_check ,mem_lmi_opcode2 
+6f9d 20205a1d branch tid_set_reply 
+
+sp_confirm_check_success:
+6f9e 6fe08871 fetch 1 ,mem_master_sp_state 
+6f9f c004efa4 beq sp_stat_confirm_check ,sp_confirm_check_success_master 
+6fa0 7008700a jam sp_stat_confirm_calc ,mem_sp_state 
+6fa1 70087201 jam sp_flag_commit ,mem_sp_flag 
+6fa2 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+6fa3 20600000 rtn 
+
+sp_confirm_check_success_master:
+6fa4 70007d03 jam lmp_accepted ,mem_lmo_opcode2 
+6fa5 70087115 jam sp_state_end ,mem_master_sp_state 
+6fa6 20207068 branch master_set_mem_master_sp_flag 
+
+sp_confirm_check_failed:
+6fa7 6fe08871 fetch 1 ,mem_master_sp_state 
+6fa8 c004efad beq sp_stat_confirm_check ,sp_confirm_check_failed_master 
+6fa9 70087000 jam sp_stat_null ,mem_sp_state 
+6faa 70007d04 jam lmp_not_accepted ,mem_lmo_opcode2 
+6fab 70007f05 jam authentication_failure_error ,mem_lmo_reason2 
+6fac 20600000 rtn 
+
+sp_confirm_check_failed_master:
+6fad 70007d04 jam lmp_not_accepted ,mem_lmo_opcode2 
+6fae 70087100 jam sp_stat_null ,mem_master_sp_state 
+6faf 20600000 rtn 
+
+sp_confirm_calc:
+6fb0 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+6fb1 c0016fb4 beq encapsulated_minor_type_p256 ,sp_confirm_calc_256 
+6fb2 c000efb8 beq encapsulated_minor_type_p192 ,sp_confirm_calc_192 
+6fb3 20600000 rtn 
+
+sp_confirm_calc_256:
+6fb4 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+6fb5 c001efbc beq sp_key_valid_256 ,sp_confirm_calc_ready 
+6fb6 7008710a jam sp_stat_confirm_calc ,mem_master_sp_state 
+6fb7 20207068 branch master_set_mem_master_sp_flag 
+
+sp_confirm_calc_192:
+6fb8 6fe08875 fetch 1 ,mem_sp_dh_ready 
+6fb9 c000efbc beq sp_flag_commit ,sp_confirm_calc_ready 
+6fba 7008710a jam sp_stat_confirm_calc ,mem_master_sp_state 
+6fbb 20207068 branch master_set_mem_master_sp_flag 
+
+sp_confirm_calc_ready:
+6fbc d8a005e9 arg mem_addr_value ,contw 
+6fbd 6fe30041 fetch 6 ,mem_plap 
+6fbe e7e30005 istore 6 ,contw 
+6fbf 6fe340a8 fetch 6 ,mem_lap 
+6fc0 e7e30005 istore 6 ,contw 
+6fc1 6fe1c765 fetch 3 ,mem_lmp_io_cap_payload_iocap 
+6fc2 e7e18005 istore 3 ,contw 
+6fc3 2040748c call function_f3b 
+6fc4 6fe08871 fetch 1 ,mem_master_sp_state 
+6fc5 c0056fc9 beq sp_stat_confirm_calc ,sp_confirm_calc_master 
+6fc6 7008700b jam sp_stat_confirm_send ,mem_sp_state 
+6fc7 70087201 jam sp_flag_commit ,mem_sp_flag 
+6fc8 20600000 rtn 
+
+sp_confirm_calc_master:
+6fc9 7008710b jam sp_stat_confirm_send ,mem_master_sp_state 
+6fca 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+6fcb 20600000 rtn 
+
+sp_master_key_prarm_push:
+6fcc d8a00940 arg mem_sp_prarm_stack ,contw 
+6fcd 6fe30041 fetch 6 ,mem_plap 
+6fce e7e30005 istore 6 ,contw 
+6fcf 6fe340a8 fetch 6 ,mem_lap 
+6fd0 e7e30005 istore 6 ,contw 
+6fd1 580008f0 setarg mem_sp_random_local_end 
+6fd2 e7e10005 istore 2 ,contw 
+6fd3 58000900 setarg mem_sp_random_remote_end 
+6fd4 e7e10005 istore 2 ,contw 
+6fd5 20206fe0 branch sp_link_key_calc 
+
+sp_link_key_prarm_push:
+6fd6 7008700f jam sp_stat_done ,mem_sp_state 
+6fd7 d8a00940 arg mem_sp_prarm_stack ,contw 
+6fd8 6fe340a8 fetch 6 ,mem_lap 
+6fd9 e7e30005 istore 6 ,contw 
+6fda 6fe30041 fetch 6 ,mem_plap 
+6fdb e7e30005 istore 6 ,contw 
+6fdc 58000900 setarg mem_sp_random_remote_end 
+6fdd e7e10005 istore 2 ,contw 
+6fde 580008f0 setarg mem_sp_random_local_end 
+6fdf e7e10005 istore 2 ,contw 
+
+sp_link_key_calc:
+6fe0 d8a005e9 arg mem_addr_value ,contw 
+6fe1 6fe30940 fetch 6 ,mem_sp_prarm_stack 
+6fe2 e7e30005 istore 6 ,contw 
+6fe3 6fe30946 fetch 6 ,mem_sp_prarm_stack + 6 
+6fe4 e7e30005 istore 6 ,contw 
+6fe5 204074a0 call function_f2 
+6fe6 7041ca01 jam 1 ,mem_link_key_exists 
+6fe7 d8a041cb arg mem_link_key ,contw 
+6fe8 d8c00910 arg mem_sp_calc_result_high ,contr 
+6fe9 20407d0c call memcpy16 
+6fea 202009c8 branch generate_linkkey_continue 
+
+sp_debug_private:
+6feb d8a0471c arg mem_sp_private_key ,contw 
+6fec 380118ff setsect 0 ,0x118ff 
+6fed 3807fd29 setsect 1 ,0x3fd29 
+6fee 3809ed2e setsect 2 ,0x1ed2e 
+6fef 380cad89 setsect 3 ,0xad89 
+6ff0 e7e48005 istore 9 ,contw 
+6ff1 38030c14 setsect 0 ,0x30c14 
+6ff2 380475b3 setsect 1 ,0x75b3 
+6ff3 380805df setsect 2 ,0x5df 
+6ff4 380f709c setsect 3 ,0x3709c 
+6ff5 e7e48005 istore 9 ,contw 
+6ff6 3802918d setsect 0 ,0x2918d 
+6ff7 380457e1 setsect 1 ,0x57e1 
+6ff8 38080079 setsect 2 ,0x79 
+6ff9 e7e30005 istore 6 ,contw 
+6ffa 20600000 rtn 
+
+sp_pubkey_calc:
+6ffb 473d402f bpatchx patch2f_2 ,mem_patch2f 
+6ffc 6fe0c6b9 fetch 1 ,mem_sp_local_key_invalid 
+6ffd c1800000 rtnne sp_key_invalid 
+6ffe 6fe08874 fetch 1 ,mem_sp_calc 
+6fff c1800000 rtnne sp_calc_standby 
+7000 d8a0471c arg mem_sp_private_key ,contw 
+7001 18000e0b force 11 ,queue 
+7002 20407032 call random_generator 
+7003 180a7e00 random pdata 
+7004 1fe37e00 rshift pdata ,pdata 
+7005 e7e10005 istore 2 ,contw 
+7006 6fe0c6b7 fetch 1 ,mem_sp_debug_mode 
+7007 245a6feb ncall sp_debug_private ,blank 
+7008 d8a00580 arg mem_k ,contw 
+7009 d8c0471c arg mem_sp_private_key ,contr 
+700a 20407d0b call memcpy24 
+700b d8a004a8 arg mem_ax ,contw 
+700c d8c00790 arg mem_gx ,contr 
+700d 20407d09 call memcpy48 
+700e d8a004d8 arg mem_az ,contw 
+700f 20407d16 call bn_zero 
+7010 7004d801 jam 1 ,mem_az 
+7011 2040740e call eckp_calc_init 
+7012 70087401 jam sp_calc_pubkey ,mem_sp_calc 
+7013 20600000 rtn 
+
+sp_pubkey_generated:
+7014 d8a04734 arg mem_sp_pubkey_local ,contw 
+7015 d8c004f0 arg mem_bx ,contr 
+7016 20407d09 call memcpy48 
+7017 7046b901 jam sp_key_valid ,mem_sp_local_key_invalid 
+7018 70087400 jam sp_calc_standby ,mem_sp_calc 
+7019 20600000 rtn 
+
+sp_dhkey_calc:
+701a 473dc02f bpatchx patch2f_3 ,mem_patch2f 
+701b 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+701c c1800000 rtnne sp_key_invalid 
+701d 6fe08874 fetch 1 ,mem_sp_calc 
+701e c1800000 rtnne sp_calc_standby 
+701f d8a00580 arg mem_k ,contw 
+7020 d8c0471c arg mem_sp_private_key ,contr 
+7021 20407d0b call memcpy24 
+7022 d8a004a8 arg mem_ax ,contw 
+7023 d8c00888 arg mem_sp_pubkey_remote ,contr 
+7024 20407d09 call memcpy48 
+7025 d8a004d8 arg mem_az ,contw 
+7026 20407d16 call bn_zero 
+7027 7004d801 jam 1 ,mem_az 
+7028 2040740e call eckp_calc_init 
+7029 70087402 jam sp_calc_dhkey ,mem_sp_calc 
+702a 20600000 rtn 
+
+sp_dhkey_generated:
+702b 70087501 jam sp_flag_commit ,mem_sp_dh_ready 
+702c d8a008c8 arg mem_sp_dhkey ,contw 
+702d d8c004f0 arg mem_bx ,contr 
+702e 20407d0b call memcpy24 
+702f 70087b01 jam sp_key_valid ,mem_sp_dhkey_invalid 
+7030 70087400 jam sp_calc_standby ,mem_sp_calc 
+7031 20600000 rtn 
+
+random_generator:
+7032 18e08fff increase -1 ,queue 
+7033 24610000 nrtn positive 
+7034 180a7e00 random pdata 
+7035 e7e10005 istore 2 ,contw 
+7036 20207032 branch random_generator 
+
+compare4:
+7037 18e08fff increase -1 ,queue 
+7038 24217043 nbranch compare4_success ,positive 
+7039 efe20011 ifetch 4 ,rega 
+703a 1fe20400 copy pdata ,temp 
+703b efe20012 ifetch 4 ,regb 
+703c 9842fe00 iflip temp ,pdata 
+703d 2422f041 nbranch compare4_failed ,zero 
+703e 1a20a204 increase 4 ,rega 
+703f 1a40a404 increase 4 ,regb 
+7040 20207037 branch compare4 
+
+compare4_failed:
+7041 7840fc00 disable true 
+7042 20600000 rtn 
+
+compare4_success:
+7043 7820fc00 enable true 
+7044 20600000 rtn 
+
+simple_pairing_sequence:
+7045 473e402f bpatchx patch2f_4 ,mem_patch2f 
+7046 6fe08872 fetch 1 ,mem_sp_flag 
+7047 207a0000 rtn blank 
+7048 204059e1 call lmo_fifo_check 
+7049 247a0000 nrtn blank 
+704a 70087200 jam sp_flag_standby ,mem_sp_flag 
+704b 6fe08870 fetch 1 ,mem_sp_state 
+704c c001d907 beq sp_stat_key_send ,sp_send_lmp_encapsulated_header 
+704d c002d929 beq sp_stat_commit_send ,sp_send_lmp_simple_pairing_comfirm 
+704e c003d934 beq sp_stat_random_send ,sp_send_lmp_simple_pairing_number 
+704f c005d949 beq sp_stat_confirm_send ,sp_send_lmp_dhkey_check 
+7050 c0016ed5 beq sp_stat_key_generate ,sp_generate_local_key 
+7051 c0026f4f beq sp_stat_commit_calc ,sp_calculate_commitment 
+7052 c004ef83 beq sp_stat_confirm_check ,sp_confirm_check 
+7053 c0056fb0 beq sp_stat_confirm_calc ,sp_confirm_calc 
+7054 c0066fd6 beq sp_stat_link_key_calc ,sp_link_key_prarm_push 
+7055 20600000 rtn 
+
+master_simple_paring_sequence:
+7056 473ec02f bpatchx patch2f_5 ,mem_patch2f 
+7057 6fe08873 fetch 1 ,mem_master_sp_flag 
+7058 207a0000 rtn blank 
+7059 204059e1 call lmo_fifo_check 
+705a 247a0000 nrtn blank 
+705b 70087300 jam sp_flag_standby ,mem_master_sp_flag 
+705c 6fe08871 fetch 1 ,mem_master_sp_state 
+705d c00958eb beq sp_master_stat_start_skip ,sp_master_send_io_cap_get 
+705e c009d8f0 beq sp_master_stat_start_done ,sp_master_send_io_cap_send 
+705f c001d8f4 beq sp_stat_key_send ,sp_master_send_lmp_encapsulated_header 
+7060 c0026f6e beq sp_stat_commit_calc ,master_sp_calculate_commitment 
+7061 c00a58f8 beq sp_stat_commitment_compare ,sp_master_commitment_compare 
+7062 c003d905 beq sp_stat_random_send ,sp_master_send_lmp_simple_pairing_number 
+7063 c0056fb0 beq sp_stat_confirm_calc ,sp_confirm_calc 
+7064 c005d948 beq sp_stat_confirm_send ,master_sp_send_lmp_dhkey_check 
+7065 c004ef83 beq sp_stat_confirm_check ,sp_confirm_check 
+7066 c00ad942 beq sp_state_end ,master_sp_sm_end 
+7067 20600000 rtn 
+
+master_set_mem_master_sp_flag:
+7068 70087301 jam sp_flag_commit ,mem_master_sp_flag 
+7069 20600000 rtn 
+
+master_clear_mem_master_sp_flag:
+706a 70087300 jam sp_flag_standby ,mem_master_sp_flag 
+706b 20600000 rtn 
+
+sp_calc_sequence:
+706c 473f402f bpatchx patch2f_6 ,mem_patch2f 
+706d 6fe0c764 fetch 1 ,mem_ssp_enable 
+706e 207a0000 rtn blank 
+706f 6fe08874 fetch 1 ,mem_sp_calc 
+7070 207a0000 rtn blank 
+7071 1fe0fe80 increase 0x80 ,pdata 
+7072 67e08874 store 1 ,mem_sp_calc 
+7073 c3838000 rtnbit1 7 
+7074 6fe084a5 fetch 1 ,mem_ec_loopc 
+7075 203a7077 branch sp_calc_sequence_done ,blank 
+7076 20207419 branch eckp_calc 
+
+sp_calc_sequence_done:
+7077 20407263 call ecunmapz 
+7078 6fe08874 fetch 1 ,mem_sp_calc 
+7079 c000f014 beq sp_calc_pubkey ,sp_pubkey_generated 
+707a c001702b beq sp_calc_dhkey ,sp_dhkey_generated 
+707b 20600000 rtn 
+
+bn_testbit:
+707c 1fe10e07 and pdata ,7 ,queue 
+707d 1fe97e00 rshift3 pdata ,pdata 
+707e 98c08c00 iadd contr ,contr 
+707f efe08006 ifetch 1 ,contr 
+7080 afec0000 qisolate0 pdata 
+7081 20600000 rtn 
+
+ec_copy:
+7082 20407d0b call memcpy24 
+7083 20407d0b call memcpy24 
+7084 20207d0b branch memcpy24 
+
+bn_eq_zero:
+7085 efe40006 ifetch 8 ,contr 
+7086 247a0000 nrtn blank 
+7087 efe40006 ifetch 8 ,contr 
+7088 247a0000 nrtn blank 
+7089 efe40006 ifetch 8 ,contr 
+708a 20600000 rtn 
+
+bn_eq_0:
+708b efe20011 ifetch 4 ,rega 
+708c 98000400 iforce temp 
+708d efe20012 ifetch 4 ,regb 
+708e 98467c00 isub temp ,null 
+708f 24628000 nrtn zero 
+7090 1a20a204 increase 4 ,rega 
+7091 1a40a404 increase 4 ,regb 
+7092 c200708b loop bn_eq_0 
+7093 20600000 rtn 
+
+bn_bigeq:
+7094 18007206 force 6 ,loopcnt 
+7095 1a20a214 increase 20 ,rega 
+7096 1a40a414 increase 20 ,regb 
+
+bn_bigeq_0:
+7097 efe20012 ifetch 4 ,regb 
+7098 98000400 iforce temp 
+7099 efe20011 ifetch 4 ,rega 
+709a 98467e00 isub temp ,pdata 
+709b 24610000 nrtn positive 
+709c 247a0000 nrtn blank 
+709d 1a20a3fc increase -4 ,rega 
+709e 1a40a5fc increase -4 ,regb 
+709f c2007097 loop bn_bigeq_0 
+70a0 20600000 rtn 
+
+bn_add:
+70a1 18007206 force 6 ,loopcnt 
+70a2 18002600 force 0 ,regc 
+
+bn_add_0:
+70a3 efe20011 ifetch 4 ,rega 
+70a4 98000400 iforce temp 
+70a5 efe20012 ifetch 4 ,regb 
+70a6 9840fe00 iadd temp ,pdata 
+70a7 9a60fe00 iadd regc ,pdata 
+70a8 e7e20005 istore 4 ,contw 
+70a9 2feffe20 isolate1 32 ,pdata 
+70aa 7920a600 setflag true ,0 ,regc 
+70ab 1a20a204 increase 4 ,rega 
+70ac 1a40a404 increase 4 ,regb 
+70ad c20070a3 loop bn_add_0 
+70ae 20600000 rtn 
+
+bn_sub:
+70af 18007206 force 6 ,loopcnt 
+70b0 18002600 force 0 ,regc 
+
+bn_sub_0:
+70b1 efe20012 ifetch 4 ,regb 
+70b2 98000400 iforce temp 
+70b3 efe20011 ifetch 4 ,rega 
+70b4 98467e00 isub temp ,pdata 
+70b5 9a667e00 isub regc ,pdata 
+70b6 e7e20005 istore 4 ,contw 
+70b7 2feffe20 isolate1 32 ,pdata 
+70b8 7920a600 setflag true ,0 ,regc 
+70b9 1a20a204 increase 4 ,rega 
+70ba 1a40a404 increase 4 ,regb 
+70bb c20070b1 loop bn_sub_0 
+70bc 20600000 rtn 
+
+bn_rshift6:
+70bd 18007206 force 6 ,loopcnt 
+70be 1a20a214 increase 20 ,rega 
+
+bn_rshift:
+70bf 18002600 force 0 ,regc 
+
+bn_rshift_0:
+70c0 efe20011 ifetch 4 ,rega 
+70c1 2feffe00 isolate1 0 ,pdata 
+70c2 7920a601 setflag true ,1 ,regc 
+70c3 1fe37e00 rshift pdata ,pdata 
+70c4 2a6ffe00 isolate1 0 ,regc 
+70c5 7920fe1f setflag true ,31 ,pdata 
+70c6 e7e20011 istore 4 ,rega 
+70c7 1a20a3fc increase -4 ,rega 
+70c8 1a632600 rshift regc ,regc 
+70c9 c20070c0 loop bn_rshift_0 
+70ca 20600000 rtn 
+
+bn_lshift:
+70cb 18007206 force 6 ,loopcnt 
+70cc 18002600 force 0 ,regc 
+
+bn_lshift_0:
+70cd efe20011 ifetch 4 ,rega 
+70ce 2feffe1f isolate1 31 ,pdata 
+70cf 7920a601 setflag true ,1 ,regc 
+70d0 1fe3fe00 lshift pdata ,pdata 
+70d1 2a6ffe00 isolate1 0 ,regc 
+70d2 7920fe00 setflag true ,0 ,pdata 
+70d3 e7e20011 istore 4 ,rega 
+70d4 1a20a204 increase 4 ,rega 
+70d5 1a632600 rshift regc ,regc 
+70d6 c20070cd loop bn_lshift_0 
+70d7 20600000 rtn 
+
+bn_lshiftmod:
+70d8 204070cb call bn_lshift 
+
+bn_lshiftmod_ismod:
+70d9 2a6ffe00 isolate1 0 ,regc 
+70da 2020f0e1 branch bn_lshiftmod_0 ,true 
+70db da400748 arg mem_p ,regb 
+70dc 1a222600 copy rega ,regc 
+70dd 1a20a3e8 increase -24 ,rega 
+70de 20407094 call bn_bigeq 
+70df 24610000 nrtn positive 
+70e0 1a622200 copy regc ,rega 
+
+bn_lshiftmod_0:
+70e1 1a20a3e8 increase -24 ,rega 
+70e2 da400748 arg mem_p ,regb 
+70e3 1a220a00 copy rega ,contw 
+70e4 202070af branch bn_sub 
+
+bn_addmod:
+70e5 204070a1 call bn_add 
+70e6 18a22200 copy contw ,rega 
+70e7 202070d9 branch bn_lshiftmod_ismod 
+
+bn_submod:
+70e8 204070af call bn_sub 
+70e9 2a6c0000 isolate0 0 ,regc 
+70ea 20608000 rtn true 
+70eb da400748 arg mem_p ,regb 
+70ec 18a0a3e8 add contw ,-24 ,rega 
+70ed 1a220a00 copy rega ,contw 
+70ee 202070a1 branch bn_add 
+
+bn_p192mod:
+70ef 18a21600 copy contw ,timeup 
+70f0 1a226000 copy rega ,alarm 
+70f1 da4005d8 arg mem_tmp2 ,regb 
+70f2 1a420a00 copy regb ,contw 
+70f3 1a208c18 add rega ,24 ,contr 
+70f4 efe40006 ifetch 8 ,contr 
+70f5 e7e40005 istore 8 ,contw 
+70f6 e7e40005 istore 8 ,contw 
+70f7 18007e00 force 0 ,pdata 
+70f8 e7e40005 istore 8 ,contw 
+70f9 19620a00 copy timeup ,contw 
+70fa 204070e5 call bn_addmod 
+70fb da4005d8 arg mem_tmp2 ,regb 
+70fc 1a420a00 copy regb ,contw 
+70fd 18007e00 force 0 ,pdata 
+70fe e7e40005 istore 8 ,contw 
+70ff 1e008c20 add alarm ,32 ,contr 
+7100 efe40006 ifetch 8 ,contr 
+7101 e7e40005 istore 8 ,contw 
+7102 e7e40005 istore 8 ,contw 
+7103 19622200 copy timeup ,rega 
+7104 1a220a00 copy rega ,contw 
+7105 204070e5 call bn_addmod 
+7106 da4005d8 arg mem_tmp2 ,regb 
+7107 1a420a00 copy regb ,contw 
+7108 1e008c28 add alarm ,40 ,contr 
+7109 efe40006 ifetch 8 ,contr 
+710a e7e40005 istore 8 ,contw 
+710b e7e40005 istore 8 ,contw 
+710c e7e40005 istore 8 ,contw 
+710d 19622200 copy timeup ,rega 
+710e 1a220a00 copy rega ,contw 
+710f 202070e5 branch bn_addmod 
+
+bn_load:
+7110 18007206 force 6 ,loopcnt 
+
+bn_load_0:
+7111 efe20006 ifetch 4 ,contr 
+7112 98005e00 iforce regext 
+7113 1f00f001 increase 1 ,regext_index 
+7114 c2007111 loop bn_load_0 
+7115 20600000 rtn 
+
+bn_mulmod:
+7116 18a21600 copy contw ,timeup 
+7117 d8a005a8 arg mem_tmp1 ,contw 
+7118 20407d16 call bn_zero 
+7119 d8a005a8 arg mem_tmp1 ,contw 
+711a 1a220c00 copy rega ,contr 
+711b 18007000 force 0 ,regext_index 
+711c 20407110 call bn_load 
+711d 1a420c00 copy regb ,contr 
+711e 20407110 call bn_load 
+711f 18002400 force 0 ,regb 
+
+bn_mulmod_1:
+7120 18000400 force 0 ,temp 
+7121 18002606 force 6 ,regc 
+
+bn_mulmod_0:
+7122 efe20005 ifetch 4 ,contw 
+7123 98002200 iforce rega 
+7124 1a427000 copy regb ,regext_index 
+7125 1de27e00 deposit regext 
+7126 1a627000 copy regc ,regext_index 
+7127 9deffe00 imul32 regext ,pdata 
+7128 9a20fe00 iadd rega ,pdata 
+7129 9840fe00 iadd temp ,pdata 
+712a e7e20005 istore 4 ,contw 
+712b 1fef0400 rshift32 pdata ,temp 
+712c 1a60a601 increase 1 ,regc 
+712d 2a61fe0c compare 12 ,regc ,0xff 
+712e 2420f122 nbranch bn_mulmod_0 ,true 
+712f 18427e00 deposit temp 
+7130 e7e20005 istore 4 ,contw 
+7131 18a08be8 increase -24 ,contw 
+7132 1a40a401 increase 1 ,regb 
+7133 2a41fe06 compare 6 ,regb ,0xff 
+7134 2420f120 nbranch bn_mulmod_1 ,true 
+7135 da2005a8 arg mem_tmp1 ,rega 
+7136 19620a00 copy timeup ,contw 
+7137 202070ef branch bn_p192mod 
+
+bn_sqrmod:
+7138 1a222400 copy rega ,regb 
+7139 20207116 branch bn_mulmod 
+
+bn_rshifteven:
+713a 1a226000 copy rega ,alarm 
+
+bn_rshifteven_1:
+713b 1e022200 copy alarm ,rega 
+713c efe08011 ifetch 1 ,rega 
+713d 2feffe00 isolate1 0 ,pdata 
+713e 20608000 rtn true 
+713f 204070bd call bn_rshift6 
+7140 efe08012 ifetch 1 ,regb 
+7141 2fec0000 isolate0 0 ,pdata 
+7142 2020f14a branch bn_rshifteven_0 ,true 
+7143 da200748 arg mem_p ,rega 
+7144 1a420a00 copy regb ,contw 
+7145 204070a1 call bn_add 
+7146 efe08012 ifetch 1 ,regb 
+7147 9a60fe00 iadd regc ,pdata 
+7148 e7e08012 istore 1 ,regb 
+7149 1a40a5e8 increase -24 ,regb 
+
+bn_rshifteven_0:
+714a 1a40a218 add regb ,24 ,rega 
+714b 18007207 force 7 ,loopcnt 
+714c 204070bf call bn_rshift 
+714d 2020713b branch bn_rshifteven_1 
+
+bn_invmod:
+714e 18a21600 copy contw ,timeup 
+714f d8a00608 arg mem_tmp0 ,contw 
+7150 20407d16 call bn_zero 
+7151 18007e00 force 0 ,pdata 
+7152 67e205c0 store 4 ,mem_tmp5 
+7153 67e20620 store 4 ,mem_t2 
+7154 70060801 jam 1 ,mem_tmp0 
+7155 d8a005a8 arg mem_tmp1 ,contw 
+7156 20407d16 call bn_zero 
+7157 d8c00748 arg mem_p ,contr 
+7158 d8a005d8 arg mem_tmp2 ,contw 
+7159 20407d0b call memcpy24 
+715a 1a220c00 copy rega ,contr 
+715b d8a005f0 arg mem_tmp3 ,contw 
+715c 20407d0b call memcpy24 
+
+bn_invmod_2:
+715d d8c005f0 arg mem_tmp3 ,contr 
+715e 20407085 call bn_eq_zero 
+715f 203a7186 branch bn_invmod_0 ,blank 
+7160 da2005f0 arg mem_tmp3 ,rega 
+7161 da400608 arg mem_tmp0 ,regb 
+7162 2040713a call bn_rshifteven 
+7163 da2005d8 arg mem_tmp2 ,rega 
+7164 da4005a8 arg mem_tmp1 ,regb 
+7165 2040713a call bn_rshifteven 
+7166 da2005f0 arg mem_tmp3 ,rega 
+7167 da4005d8 arg mem_tmp2 ,regb 
+7168 20407094 call bn_bigeq 
+7169 20217178 branch bn_invmod_1 ,positive 
+716a da2005d8 arg mem_tmp2 ,rega 
+716b da4005f0 arg mem_tmp3 ,regb 
+716c 1a220a00 copy rega ,contw 
+716d 204070af call bn_sub 
+716e da200608 arg mem_tmp0 ,rega 
+716f da4005a8 arg mem_tmp1 ,regb 
+7170 1a420a00 copy regb ,contw 
+7171 204070a1 call bn_add 
+7172 efe08011 ifetch 1 ,rega 
+7173 9a60a600 iadd regc ,regc 
+7174 efe08012 ifetch 1 ,regb 
+7175 9a60fe00 iadd regc ,pdata 
+7176 e7e08012 istore 1 ,regb 
+7177 2020715d branch bn_invmod_2 
+
+bn_invmod_1:
+7178 da2005f0 arg mem_tmp3 ,rega 
+7179 da4005d8 arg mem_tmp2 ,regb 
+717a 1a220a00 copy rega ,contw 
+717b 204070af call bn_sub 
+717c da2005a8 arg mem_tmp1 ,rega 
+717d da400608 arg mem_tmp0 ,regb 
+717e 1a420a00 copy regb ,contw 
+717f 204070a1 call bn_add 
+7180 efe08011 ifetch 1 ,rega 
+7181 9a60a600 iadd regc ,regc 
+7182 efe08012 ifetch 1 ,regb 
+7183 9a60fe00 iadd regc ,pdata 
+7184 e7e08012 istore 1 ,regb 
+7185 2020715d branch bn_invmod_2 
+
+bn_invmod_0:
+7186 d8a00608 arg mem_tmp0 ,contw 
+7187 20407d16 call bn_zero 
+7188 6fe085c0 fetch 1 ,mem_tmp5 
+7189 67e08608 store 1 ,mem_tmp0 
+718a 67e08610 store 1 ,mem_tmp0a 
+718b da200608 arg mem_tmp0 ,rega 
+718c da4005a8 arg mem_tmp1 ,regb 
+718d 1a420a00 copy regb ,contw 
+718e 204070e5 call bn_addmod 
+718f da200748 arg mem_p ,rega 
+7190 da4005a8 arg mem_tmp1 ,regb 
+7191 19620a00 copy timeup ,contw 
+7192 202070e8 branch bn_submod 
+
+ecdbl:
+7193 da200568 arg mem_cz ,rega 
+7194 d8a00620 arg mem_t2 ,contw 
+7195 20407138 call bn_sqrmod 
+7196 da200620 arg mem_t2 ,rega 
+7197 d8a00638 arg mem_t3 ,contw 
+7198 20407138 call bn_sqrmod 
+7199 da200760 arg mem_a ,rega 
+719a da400638 arg mem_t3 ,regb 
+719b d8a00638 arg mem_t3 ,contw 
+719c 20407116 call bn_mulmod 
+719d da200538 arg mem_cx ,rega 
+719e d8a00620 arg mem_t2 ,contw 
+719f 20407138 call bn_sqrmod 
+71a0 d8c00620 arg mem_t2 ,contr 
+71a1 d8a005f0 arg mem_t1 ,contw 
+71a2 20407d0b call memcpy24 
+71a3 da2005f0 arg mem_t1 ,rega 
+71a4 204070d8 call bn_lshiftmod 
+71a5 da200620 arg mem_t2 ,rega 
+71a6 da4005f0 arg mem_t1 ,regb 
+71a7 d8a00620 arg mem_t2 ,contw 
+71a8 204070e5 call bn_addmod 
+71a9 da200620 arg mem_t2 ,rega 
+71aa da400638 arg mem_t3 ,regb 
+71ab d8a00620 arg mem_t2 ,contw 
+71ac 204070e5 call bn_addmod 
+71ad d8c00538 arg mem_cx ,contr 
+71ae d8a005f0 arg mem_t1 ,contw 
+71af 20407d0b call memcpy24 
+71b0 da200550 arg mem_cy ,rega 
+71b1 d8a00638 arg mem_t3 ,contw 
+71b2 20407138 call bn_sqrmod 
+71b3 da2005f0 arg mem_t1 ,rega 
+71b4 204070d8 call bn_lshiftmod 
+71b5 da2005f0 arg mem_t1 ,rega 
+71b6 204070d8 call bn_lshiftmod 
+71b7 da2005f0 arg mem_t1 ,rega 
+71b8 da400638 arg mem_t3 ,regb 
+71b9 d8a005f0 arg mem_t1 ,contw 
+71ba 20407116 call bn_mulmod 
+71bb da200638 arg mem_t3 ,rega 
+71bc d8a00608 arg mem_t0 ,contw 
+71bd 20407138 call bn_sqrmod 
+71be da200608 arg mem_t0 ,rega 
+71bf 204070d8 call bn_lshiftmod 
+71c0 da200608 arg mem_t0 ,rega 
+71c1 204070d8 call bn_lshiftmod 
+71c2 da200608 arg mem_t0 ,rega 
+71c3 204070d8 call bn_lshiftmod 
+71c4 d8c00550 arg mem_cy ,contr 
+71c5 d8a00638 arg mem_t3 ,contw 
+71c6 20407d0b call memcpy24 
+71c7 da200638 arg mem_t3 ,rega 
+71c8 204070d8 call bn_lshiftmod 
+71c9 da200638 arg mem_t3 ,rega 
+71ca da400568 arg mem_cz ,regb 
+71cb d8a00568 arg mem_cz ,contw 
+71cc 20407116 call bn_mulmod 
+71cd da200620 arg mem_t2 ,rega 
+71ce d8a00638 arg mem_t3 ,contw 
+71cf 20407138 call bn_sqrmod 
+71d0 da200638 arg mem_t3 ,rega 
+71d1 da4005f0 arg mem_t1 ,regb 
+71d2 d8a00638 arg mem_t3 ,contw 
+71d3 204070e8 call bn_submod 
+71d4 da200638 arg mem_t3 ,rega 
+71d5 da4005f0 arg mem_t1 ,regb 
+71d6 d8a00538 arg mem_cx ,contw 
+71d7 204070e8 call bn_submod 
+71d8 da2005f0 arg mem_t1 ,rega 
+71d9 da400538 arg mem_cx ,regb 
+71da d8a00638 arg mem_t3 ,contw 
+71db 204070e8 call bn_submod 
+71dc da200638 arg mem_t3 ,rega 
+71dd da400620 arg mem_t2 ,regb 
+71de d8a00638 arg mem_t3 ,contw 
+71df 20407116 call bn_mulmod 
+71e0 da200638 arg mem_t3 ,rega 
+71e1 da400608 arg mem_t0 ,regb 
+71e2 d8a00550 arg mem_cy ,contw 
+71e3 202070e8 branch bn_submod 
+
+ecadd:
+71e4 da2004d8 arg mem_az ,rega 
+71e5 d8a00650 arg mem_t7 ,contw 
+71e6 20407138 call bn_sqrmod 
+71e7 da200538 arg mem_cx ,rega 
+71e8 da400650 arg mem_t7 ,regb 
+71e9 d8a00608 arg mem_t0 ,contw 
+71ea 20407116 call bn_mulmod 
+71eb da2004d8 arg mem_az ,rega 
+71ec da400650 arg mem_t7 ,regb 
+71ed d8a00650 arg mem_t7 ,contw 
+71ee 20407116 call bn_mulmod 
+71ef da200550 arg mem_cy ,rega 
+71f0 da400650 arg mem_t7 ,regb 
+71f1 d8a005f0 arg mem_t1 ,contw 
+71f2 20407116 call bn_mulmod 
+71f3 da200568 arg mem_cz ,rega 
+71f4 d8a00650 arg mem_t7 ,contw 
+71f5 20407138 call bn_sqrmod 
+71f6 da2004a8 arg mem_ax ,rega 
+71f7 da400650 arg mem_t7 ,regb 
+71f8 d8a00620 arg mem_t2 ,contw 
+71f9 20407116 call bn_mulmod 
+71fa da200568 arg mem_cz ,rega 
+71fb da400650 arg mem_t7 ,regb 
+71fc d8a00650 arg mem_t7 ,contw 
+71fd 20407116 call bn_mulmod 
+71fe da2004c0 arg mem_ay ,rega 
+71ff da400650 arg mem_t7 ,regb 
+7200 d8a00638 arg mem_t3 ,contw 
+7201 20407116 call bn_mulmod 
+7202 da200608 arg mem_t0 ,rega 
+7203 da400620 arg mem_t2 ,regb 
+7204 d8a00650 arg mem_t7 ,contw 
+7205 204070e8 call bn_submod 
+7206 da200608 arg mem_t0 ,rega 
+7207 da400620 arg mem_t2 ,regb 
+7208 d8a00608 arg mem_t0 ,contw 
+7209 204070e5 call bn_addmod 
+720a da2005f0 arg mem_t1 ,rega 
+720b da400638 arg mem_t3 ,regb 
+720c d8a00620 arg mem_t2 ,contw 
+720d 204070e8 call bn_submod 
+720e da2005f0 arg mem_t1 ,rega 
+720f da400638 arg mem_t3 ,regb 
+7210 d8a005f0 arg mem_t1 ,contw 
+7211 204070e5 call bn_addmod 
+7212 da2005f0 arg mem_t1 ,rega 
+7213 da400650 arg mem_t7 ,regb 
+7214 d8a005f0 arg mem_t1 ,contw 
+7215 20407116 call bn_mulmod 
+7216 da200568 arg mem_cz ,rega 
+7217 da4004d8 arg mem_az ,regb 
+7218 d8a00638 arg mem_t3 ,contw 
+7219 20407116 call bn_mulmod 
+721a da200638 arg mem_t3 ,rega 
+721b da400650 arg mem_t7 ,regb 
+721c d8a00568 arg mem_cz ,contw 
+721d 20407116 call bn_mulmod 
+721e da200650 arg mem_t7 ,rega 
+721f d8a00650 arg mem_t7 ,contw 
+7220 20407138 call bn_sqrmod 
+7221 da200650 arg mem_t7 ,rega 
+7222 da400608 arg mem_t0 ,regb 
+7223 d8a00638 arg mem_t3 ,contw 
+7224 20407116 call bn_mulmod 
+7225 da200650 arg mem_t7 ,rega 
+7226 da4005f0 arg mem_t1 ,regb 
+7227 d8a005f0 arg mem_t1 ,contw 
+7228 20407116 call bn_mulmod 
+7229 da200620 arg mem_t2 ,rega 
+722a d8a00538 arg mem_cx ,contw 
+722b 20407138 call bn_sqrmod 
+722c da200538 arg mem_cx ,rega 
+722d da400638 arg mem_t3 ,regb 
+722e d8a00538 arg mem_cx ,contw 
+722f 204070e8 call bn_submod 
+7230 d8c00538 arg mem_cx ,contr 
+7231 d8a00650 arg mem_t7 ,contw 
+7232 20407d0b call memcpy24 
+7233 da200650 arg mem_t7 ,rega 
+7234 204070d8 call bn_lshiftmod 
+7235 da200638 arg mem_t3 ,rega 
+7236 da400650 arg mem_t7 ,regb 
+7237 d8a00638 arg mem_t3 ,contw 
+7238 204070e8 call bn_submod 
+7239 da200638 arg mem_t3 ,rega 
+723a da400620 arg mem_t2 ,regb 
+723b d8a00620 arg mem_t2 ,contw 
+723c 20407116 call bn_mulmod 
+723d da200620 arg mem_t2 ,rega 
+723e da4005f0 arg mem_t1 ,regb 
+723f d8a00550 arg mem_cy ,contw 
+7240 204070e8 call bn_submod 
+7241 da200550 arg mem_cy ,rega 
+7242 da400748 arg mem_p ,regb 
+7243 d8a00550 arg mem_cy ,contw 
+7244 18002600 force 0 ,regc 
+7245 6fe08550 fetch 1 ,mem_cy 
+7246 2feffe00 isolate1 0 ,pdata 
+7247 2040f0a1 call bn_add ,true 
+7248 1a626000 copy regc ,alarm 
+7249 da200550 arg mem_cy ,rega 
+724a 204070bd call bn_rshift6 
+724b 6fe08567 fetch 1 ,mem_cy5 
+724c 2e0ffe00 isolate1 0 ,alarm 
+724d 7920fe07 setflag true ,7 ,pdata 
+724e 67e08567 store 1 ,mem_cy5 
+724f 20600000 rtn 
+
+eckp_0:
+7250 6fe084a5 fetch 1 ,mem_ec_loopc 
+7251 1fe0ffff increase -1 ,pdata 
+7252 24610000 nrtn positive 
+7253 67e084a5 store 1 ,mem_ec_loopc 
+7254 6fe084a4 fetch 1 ,mem_ec_infinite 
+7255 205a7193 call ecdbl ,blank 
+7256 6fe084a5 fetch 1 ,mem_ec_loopc 
+7257 d8c00580 arg mem_k ,contr 
+7258 2040707c call bn_testbit 
+7259 2020f250 branch eckp_0 ,true 
+725a 6fe084a4 fetch 1 ,mem_ec_infinite 
+725b 243a725e nbranch eckp_1 ,blank 
+725c 204071e4 call ecadd 
+725d 20207250 branch eckp_0 
+
+eckp_1:
+725e 7004a400 jam 0 ,mem_ec_infinite 
+725f d8c004a8 arg mem_ax ,contr 
+7260 d8a00538 arg mem_cx ,contw 
+7261 20407082 call ec_copy 
+7262 20207250 branch eckp_0 
+
+ecunmapz:
+7263 da200568 arg mem_cz ,rega 
+7264 d8a00638 arg mem_t3 ,contw 
+7265 2040714e call bn_invmod 
+7266 da200638 arg mem_t3 ,rega 
+7267 d8a005f0 arg mem_t1 ,contw 
+7268 20407138 call bn_sqrmod 
+7269 da200538 arg mem_cx ,rega 
+726a da4005f0 arg mem_t1 ,regb 
+726b d8a004f0 arg mem_bx ,contw 
+726c 20407116 call bn_mulmod 
+726d da200638 arg mem_t3 ,rega 
+726e da4005f0 arg mem_t1 ,regb 
+726f d8a00620 arg mem_t2 ,contw 
+7270 20407116 call bn_mulmod 
+7271 da200550 arg mem_cy ,rega 
+7272 da400620 arg mem_t2 ,regb 
+7273 d8a00508 arg mem_by ,contw 
+7274 20207116 branch bn_mulmod 
+
+sha_endian_swap2:
+7275 efe20006 ifetch 4 ,contr 
+7276 18002204 force 4 ,rega 
+7277 18a08a03 increase 3 ,contw 
+
+sha_endian_loop:
+7278 e7e08005 istore 1 ,contw 
+7279 1fecfe00 rshift8 pdata ,pdata 
+727a 18a08bfe increase -2 ,contw 
+727b 1a20a3ff increase -1 ,rega 
+727c 2422f278 nbranch sha_endian_loop ,zero 
+727d 18a08a05 increase 5 ,contw 
+727e c2007275 loop sha_endian_swap2 
+727f 20600000 rtn 
+
+sha_getw:
+7280 18ebfe00 lshift2 queue ,pdata 
+7281 99608c00 iadd timeup ,contr 
+7282 efe20006 ifetch 4 ,contr 
+7283 20600000 rtn 
+
+sha_r:
+7284 18006010 force 16 ,alarm 
+7285 d96004a8 arg memdat ,timeup 
+
+sha_r_loop:
+7286 1e008ff9 add alarm ,-7 ,queue 
+7287 20407280 call sha_getw 
+7288 98000400 iforce temp 
+7289 1e008ff0 add alarm ,-16 ,queue 
+728a 20407280 call sha_getw 
+728b 98408400 iadd temp ,temp 
+728c 1e008ffe add alarm ,-2 ,queue 
+728d 20407280 call sha_getw 
+728e 1fee7e01 shasx pdata ,1 ,pdata 
+728f 98408400 iadd temp ,temp 
+7290 1e008ff1 add alarm ,-15 ,queue 
+7291 20407280 call sha_getw 
+7292 1fee7e00 shasx pdata ,0 ,pdata 
+7293 98408400 iadd temp ,temp 
+7294 1e0bfe00 lshift2 alarm ,pdata 
+7295 99608a00 iadd timeup ,contw 
+7296 e0420005 istoret 4 ,contw 
+7297 1e00e001 increase 1 ,alarm 
+7298 2e01fe40 compare 64 ,alarm ,0xff 
+7299 2420f286 nbranch sha_r_loop ,true 
+729a 20600000 rtn 
+
+sha_init:
+729b d8c007c0 arg memh0 ,contr 
+729c 18007007 force 7 ,regext_index 
+
+sha_init_0:
+729d efe20006 ifetch 4 ,contr 
+729e 98005e00 iforce regext 
+729f 1f00f1ff increase -1 ,regext_index 
+72a0 2021729d branch sha_init_0 ,positive 
+72a1 20600000 rtn 
+
+sha:
+72a2 473fc02f bpatchx patch2f_7 ,mem_patch2f 
+72a3 20407284 call sha_r 
+72a4 d8a005a8 arg memahbak ,contw 
+72a5 18007000 force 0 ,regext_index 
+
+sha_0:
+72a6 1de27e00 deposit regext 
+72a7 e7e20005 istore 4 ,contw 
+72a8 1f00f001 increase 1 ,regext_index 
+72a9 2f01fe08 compare 8 ,regext_index ,0xff 
+72aa 2420f2a6 nbranch sha_0 ,true 
+72ab 20406df3 call enable_authrom 
+72ac d9609300 arg memk ,timeup 
+72ad de0004a8 arg memdat ,alarm 
+72ae 18007240 force 64 ,loopcnt 
+
+sha_loop:
+72af e8420030 ifetcht 4 ,alarm 
+72b0 efe2000b ifetch 4 ,timeup 
+72b1 19609604 increase 4 ,timeup 
+72b2 1e00e004 increase 4 ,alarm 
+72b3 9840fe00 iadd temp ,pdata 
+72b4 18007007 force 7 ,regext_index 
+72b5 9de08400 iadd regext ,temp 
+72b6 18007004 force 4 ,regext_index 
+72b7 1dee7e03 shasx regext ,3 ,pdata 
+72b8 98408400 iadd temp ,temp 
+72b9 18007005 force 5 ,regext_index 
+72ba 1de27e00 deposit regext 
+72bb 18007006 force 6 ,regext_index 
+72bc 9de2fe00 ixor regext ,pdata 
+72bd 18007004 force 4 ,regext_index 
+72be 9de17e00 iand regext ,pdata 
+72bf 18007006 force 6 ,regext_index 
+72c0 9de2fe00 ixor regext ,pdata 
+72c1 98408400 iadd temp ,temp 
+72c2 18007007 force 7 ,regext_index 
+72c3 18425e00 copy temp ,regext 
+72c4 18007003 force 3 ,regext_index 
+72c5 1de27e00 deposit regext 
+72c6 9840de00 iadd temp ,regext 
+72c7 18007000 force 0 ,regext_index 
+72c8 1de27e00 deposit regext 
+72c9 18007001 force 1 ,regext_index 
+72ca 9de10400 iand regext ,temp 
+72cb 9de1fe00 ior regext ,pdata 
+72cc 18007002 force 2 ,regext_index 
+72cd 9de17e00 iand regext ,pdata 
+72ce 98418400 ior temp ,temp 
+72cf 18007000 force 0 ,regext_index 
+72d0 1dee7e02 shasx regext ,2 ,pdata 
+72d1 9840fe00 iadd temp ,pdata 
+72d2 18007007 force 7 ,regext_index 
+72d3 9de0de00 iadd regext ,regext 
+72d4 980efc00 regexrot 
+72d5 c20072af loop sha_loop 
+72d6 d8c005a8 arg memahbak ,contr 
+72d7 18007000 force 0 ,regext_index 
+
+sha_1:
+72d8 efe20006 ifetch 4 ,contr 
+72d9 9de0de00 iadd regext ,regext 
+72da 1f00f001 increase 1 ,regext_index 
+72db 2f01fe08 compare 8 ,regext_index ,0xff 
+72dc 2420f2d8 nbranch sha_1 ,true 
+72dd 20206df7 branch disable_authrom 
+
+sha_result:
+72de d8a00900 arg memresult ,contw 
+72df 18007007 force 7 ,regext_index 
+
+sha_regext_save:
+72e0 1de27e00 deposit regext 
+72e1 e7e20005 istore 4 ,contw 
+72e2 1f00f1ff increase -1 ,regext_index 
+72e3 202172e0 branch sha_regext_save ,positive 
+72e4 20600000 rtn 
+
+pad_xor:
+72e5 d8a004a8 arg memdat ,contw 
+72e6 18c08dfc increase -4 ,contr 
+72e7 1f262210 sub loopcnt ,16 ,rega 
+
+pad_xor_0:
+72e8 efe20006 ifetch 4 ,contr 
+72e9 9842fe00 ixor temp ,pdata 
+72ea e7e20005 istore 4 ,contw 
+72eb 18c08df8 increase -8 ,contr 
+72ec c20072e8 loop pad_xor_0 
+72ed 1a227200 copy rega ,loopcnt 
+72ee 18427e00 deposit temp 
+
+pad_xor_1:
+72ef e7e20005 istore 4 ,contw 
+72f0 c20072ef loop pad_xor_1 
+72f1 20600000 rtn 
+
+g_noninit_number_confirm:
+72f2 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+72f3 c00172f9 beq encapsulated_minor_type_p256 ,g_noninit_number_confirm_256 
+72f4 c000f2f6 beq encapsulated_minor_type_p192 ,g_noninit_number_confirm_192 
+72f5 20600000 rtn 
+
+g_noninit_number_confirm_192:
+72f6 204072fe call g_noninit0_192 
+72f7 204072de call sha_result 
+72f8 20207324 branch g_common0 
+
+g_noninit_number_confirm_256:
+72f9 20407338 call g_noninit0_256 
+72fa 204072de call sha_result 
+72fb 20207324 branch g_common0 
+
+g_noninit_192:
+72fc 204072fe call g_noninit0_192 
+72fd 20207324 branch g_common0 
+
+g_noninit0_192:
+72fe d8c008a0 arg mem_sp_pubkey_remote_x_end ,contr 
+72ff d8a004a8 arg memdat ,contw 
+7300 18007206 force 6 ,loopcnt 
+7301 20407422 call memcpy_dword_swap 
+7302 d8c0474c arg mem_sp_pubkey_local_x_end ,contr 
+7303 18007206 force 6 ,loopcnt 
+7304 20407422 call memcpy_dword_swap 
+7305 d8c00900 arg mem_sp_random_remote_end ,contr 
+7306 20407421 call memcpy_dword_swap4 
+7307 2040729b call sha_init 
+7308 204072a2 call sha 
+7309 d8c008f0 arg mem_sp_random_local_end ,contr 
+730a d8a004a8 arg memdat ,contw 
+730b 2020731b branch g_common_192 
+
+g_init_192:
+730c d8c0474c arg mem_sp_pubkey_local_x_end ,contr 
+730d d8a004a8 arg memdat ,contw 
+730e 18007206 force 6 ,loopcnt 
+730f 20407422 call memcpy_dword_swap 
+7310 d8c008a0 arg mem_sp_pubkey_remote_x_end ,contr 
+7311 18007206 force 6 ,loopcnt 
+7312 20407422 call memcpy_dword_swap 
+7313 d8c008f0 arg mem_sp_random_local_end ,contr 
+7314 20407421 call memcpy_dword_swap4 
+7315 2040729b call sha_init 
+7316 204072a2 call sha 
+7317 d8c00900 arg mem_sp_random_remote_end ,contr 
+7318 d8a004a8 arg memdat ,contw 
+7319 2040731b call g_common_192 
+731a 20207324 branch g_common0 
+
+g_common_192:
+731b 20407421 call memcpy_dword_swap4 
+731c 58800000 setarg 0x800000 
+731d 1fed7e00 lshift8 pdata ,pdata 
+731e e7e20005 istore 4 ,contw 
+731f 18007205 force 5 ,loopcnt 
+7320 20407d17 call memset0 
+7321 58000280 setarg 640 
+7322 e7e20005 istore 4 ,contw 
+7323 202072a2 branch sha 
+
+g_common0:
+7324 6fe20900 fetch 4 ,memresult 
+7325 da2003e8 arg 1000 ,rega 
+7326 9a26fc00 idiv rega 
+7327 20407def call wait_div_end 
+7328 18077e00 remainder pdata 
+7329 67e2087c store 4 ,mem_gkey 
+732a 1807fe00 quotient pdata 
+732b da2003e8 arg 1000 ,rega 
+732c 9a26fc00 idiv rega 
+732d 20407def call wait_div_end 
+732e 18077e00 remainder pdata 
+732f da2003e8 arg 1000 ,rega 
+7330 9a2ffe00 imul32 rega ,pdata 
+7331 684a087c fetcht 4 ,mem_gkey 
+7332 9840fe00 iadd temp ,pdata 
+7333 67e2087c store 4 ,mem_gkey 
+7334 20600000 rtn 
+
+noninit_number_confirm:
+7335 20407338 call g_noninit0_256 
+7336 204072de call sha_result 
+7337 20207324 branch g_common0 
+
+g_noninit0_256:
+7338 d8c008a0 arg mem_le_pubkey_remote_x_256 + 32 ,contr 
+7339 d8a004a8 arg memdat ,contw 
+733a 18007208 force 8 ,loopcnt 
+733b 20407422 call memcpy_dword_swap 
+733c d8c046fc arg mem_sc_pubkey_local_x_256 + 32 ,contr 
+733d 18007208 force 8 ,loopcnt 
+733e 20407422 call memcpy_dword_swap 
+733f 2040729b call sha_init 
+7340 204072a2 call sha 
+7341 d8c00900 arg mem_sp_random_remote_end ,contr 
+7342 d8a004a8 arg memdat ,contw 
+7343 20407421 call memcpy_dword_swap4 
+7344 d8c008f0 arg mem_sp_random_local_end ,contr 
+7345 20207346 branch g_common_256 
+
+g_common_256:
+7346 20407421 call memcpy_dword_swap4 
+7347 58800000 setarg 0x800000 
+7348 1fed7e00 lshift8 pdata ,pdata 
+7349 e7e20005 istore 4 ,contw 
+734a 18007203 force 3 ,loopcnt 
+734b 20407d17 call memset0 
+734c 58000300 setarg 768 
+734d e7e20005 istore 4 ,contw 
+734e 202072a2 branch sha 
+
+function_f1_192_no_key:
+734f 70476e00 jam 0 ,mem_passkey_1bit 
+7350 20207353 branch function_f1_192_common 
+
+function_f1_192:
+7351 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+7352 c081734f bne ssp_mode_passkey_entry_flag ,function_f1_192_no_key 
+
+function_f1_192_common:
+7353 47404030 bpatchx patch30_0 ,mem_patch30 
+7354 58363636 setarg 0x363636 
+7355 1fed0400 lshift8 pdata ,temp 
+7356 18418436 or_into 0x36 ,temp 
+7357 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+7358 1fe20c00 copy pdata ,contr 
+7359 18007204 force 4 ,loopcnt 
+735a 204072e5 call pad_xor 
+735b 2040729b call sha_init 
+735c 204072a2 call sha 
+735d 6fe10942 fetch 2 ,mem_sp_prarm_stack + 2 
+735e 1fe20c00 copy pdata ,contr 
+735f d8a004a8 arg memdat ,contw 
+7360 18007206 force 6 ,loopcnt 
+7361 20407422 call memcpy_dword_swap 
+7362 6fe10944 fetch 2 ,mem_sp_prarm_stack + 4 
+7363 1fe20c00 copy pdata ,contr 
+7364 18007206 force 6 ,loopcnt 
+7365 20407422 call memcpy_dword_swap 
+7366 58800000 setarg 0x800000 
+7367 e7e18005 istore 3 ,contw 
+7368 6fe0c76e fetch 1 ,mem_passkey_1bit 
+7369 e7e08005 istore 1 ,contw 
+736a 18007e00 force 0 ,pdata 
+736b e7e40005 istore 8 ,contw 
+736c 58000388 setarg 0x0388 
+736d e7e20005 istore 4 ,contw 
+
+function_f1_common2:
+736e 204072a2 call sha 
+736f 204072de call sha_result 
+7370 d8c00900 arg memresult ,contr 
+7371 d8a005c8 arg memahsave ,contw 
+7372 20407d0a call memcpy32 
+7373 585c5c5c setarg 0x5c5c5c 
+7374 1fed0400 lshift8 pdata ,temp 
+7375 1841845c or_into 0x5c ,temp 
+7376 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+7377 1fe20c00 copy pdata ,contr 
+7378 18007204 force 4 ,loopcnt 
+7379 204072e5 call pad_xor 
+737a 2040729b call sha_init 
+737b 204072a2 call sha 
+737c d8c005e8 arg memahsave_end ,contr 
+737d d8a004a8 arg memdat ,contw 
+737e 18007208 force 8 ,loopcnt 
+737f 20407422 call memcpy_dword_swap 
+7380 58800000 setarg 0x800000 
+7381 1fed7e00 lshift8 pdata ,pdata 
+7382 e7e20005 istore 4 ,contw 
+7383 20407d16 call bn_zero 
+7384 58000300 setarg 0x0300 
+7385 e7e20005 istore 4 ,contw 
+7386 204072a2 call sha 
+7387 202072de branch sha_result 
+
+function_f2_192:
+7388 58363636 setarg 0x363636 
+7389 1fed0400 lshift8 pdata ,temp 
+738a 18418436 or_into 0x36 ,temp 
+738b d8c008e0 arg mem_sp_dhkey_end ,contr 
+738c 18007206 force 6 ,loopcnt 
+738d 204072e5 call pad_xor 
+738e 2040729b call sha_init 
+738f 204072a2 call sha 
+7390 6fe1094c fetch 2 ,mem_sp_prarm_stack + 12 
+7391 1fe20c00 copy pdata ,contr 
+7392 d8a004a8 arg memdat ,contw 
+7393 20407421 call memcpy_dword_swap4 
+7394 6fe1094e fetch 2 ,mem_sp_prarm_stack + 14 
+7395 1fe20c00 copy pdata ,contr 
+7396 20407421 call memcpy_dword_swap4 
+7397 5862746c setarg 0x62746c 
+7398 1fed7e00 lshift8 pdata ,pdata 
+7399 1fe1fe6b or_into 0x6b ,pdata 
+739a e7e20005 istore 4 ,contw 
+739b d8c005f5 arg mem_addr_value_end ,contr 
+739c 18007203 force 3 ,loopcnt 
+739d 20407422 call memcpy_dword_swap 
+739e 58800000 setarg 0x800000 
+739f 1fed7e00 lshift8 pdata ,pdata 
+73a0 e7e20005 istore 4 ,contw 
+73a1 18007e00 force 0 ,pdata 
+73a2 e7e40005 istore 8 ,contw 
+73a3 58000380 setarg 0x0380 
+73a4 e7e20005 istore 4 ,contw 
+73a5 204072a2 call sha 
+73a6 204072de call sha_result 
+73a7 d8c00900 arg memresult ,contr 
+73a8 d8a005c8 arg memahsave ,contw 
+73a9 20407d0a call memcpy32 
+73aa 585c5c5c setarg 0x5c5c5c 
+73ab 1fed0400 lshift8 pdata ,temp 
+73ac 1841845c or_into 0x5c ,temp 
+73ad d8c008e0 arg mem_sp_dhkey_end ,contr 
+73ae 18007206 force 6 ,loopcnt 
+73af 204072e5 call pad_xor 
+73b0 2040729b call sha_init 
+73b1 204072a2 call sha 
+73b2 d8c005e8 arg memahsave_end ,contr 
+73b3 d8a004a8 arg memdat ,contw 
+73b4 18007208 force 8 ,loopcnt 
+73b5 20407422 call memcpy_dword_swap 
+73b6 58800000 setarg 0x800000 
+73b7 1fed7e00 lshift8 pdata ,pdata 
+73b8 e7e20005 istore 4 ,contw 
+73b9 20407d16 call bn_zero 
+73ba 58000300 setarg 0x0300 
+73bb e7e20005 istore 4 ,contw 
+73bc 204072a2 call sha 
+73bd 202072de branch sha_result 
+
+function_f3a_192:
+73be 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+73bf c08173cf bne ssp_mode_passkey_entry_flag ,function_f3a_no_pin 
+
+function_f3a_common:
+73c0 4740c030 bpatchx patch30_1 ,mem_patch30 
+73c1 58363636 setarg 0x363636 
+73c2 1fed0400 lshift8 pdata ,temp 
+73c3 18418436 or_into 0x36 ,temp 
+73c4 d8c008e0 arg mem_sp_dhkey_end ,contr 
+73c5 18007206 force 6 ,loopcnt 
+73c6 204072e5 call pad_xor 
+73c7 2040729b call sha_init 
+73c8 204072a2 call sha 
+73c9 d8c00900 arg mem_sp_random_remote_end ,contr 
+73ca d8a004a8 arg memdat ,contw 
+73cb 20407421 call memcpy_dword_swap4 
+73cc d8c008f0 arg mem_sp_random_local_end ,contr 
+73cd 20407421 call memcpy_dword_swap4 
+73ce 202073e4 branch function_f3_common 
+
+function_f3a_no_pin:
+73cf 58000000 setarg 0 
+73d0 67e24794 store 4 ,mem_pin 
+73d1 202073c0 branch function_f3a_common 
+
+function_f3b_no_pin:
+73d2 58000000 setarg 0 
+73d3 67e24794 store 4 ,mem_pin 
+73d4 202073d7 branch function_f3b_common 
+
+function_f3b_192:
+73d5 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+73d6 c08173d2 bne ssp_mode_passkey_entry_flag ,function_f3b_no_pin 
+
+function_f3b_common:
+73d7 58363636 setarg 0x363636 
+73d8 1fed0400 lshift8 pdata ,temp 
+73d9 18418436 or_into 0x36 ,temp 
+73da d8c008e0 arg mem_sp_dhkey_end ,contr 
+73db 18007206 force 6 ,loopcnt 
+73dc 204072e5 call pad_xor 
+73dd 2040729b call sha_init 
+73de 204072a2 call sha 
+73df d8c008f0 arg mem_sp_random_local_end ,contr 
+73e0 d8a004a8 arg memdat ,contw 
+73e1 20407421 call memcpy_dword_swap4 
+73e2 d8c00900 arg mem_sp_random_remote_end ,contr 
+73e3 20407421 call memcpy_dword_swap4 
+
+function_f3_common:
+73e4 58000000 setarg 0x0 
+73e5 e7e40005 istore 8 ,contw 
+73e6 e7e20005 istore 4 ,contw 
+73e7 6fe24794 fetch 4 ,mem_pin 
+73e8 e7e20005 istore 4 ,contw 
+73e9 18a20400 copy contw ,temp 
+73ea 7005e880 jam 0x80 ,mem_addr_padding 
+73eb 18420a00 copy temp ,contw 
+73ec d8c005f8 arg mem_addr_iocap_end ,contr 
+73ed 20407421 call memcpy_dword_swap4 
+73ee 204072a2 call sha 
+73ef d8a004a8 arg memdat ,contw 
+73f0 18007207 force 7 ,loopcnt 
+73f1 20407d17 call memset0 
+73f2 e7e20005 istore 4 ,contw 
+73f3 580003f8 setarg 0x03F8 
+73f4 e7e20005 istore 4 ,contw 
+73f5 204072a2 call sha 
+73f6 204072de call sha_result 
+73f7 d8c00900 arg memresult ,contr 
+73f8 d8a005c8 arg memahsave ,contw 
+73f9 20407d0a call memcpy32 
+73fa 585c5c5c setarg 0x5c5c5c 
+73fb 1fed0400 lshift8 pdata ,temp 
+73fc 1841845c or_into 0x5c ,temp 
+73fd d8c008e0 arg mem_sp_dhkey_end ,contr 
+73fe 18007206 force 6 ,loopcnt 
+73ff 204072e5 call pad_xor 
+7400 2040729b call sha_init 
+7401 204072a2 call sha 
+7402 d8c005e8 arg memahsave_end ,contr 
+7403 d8a004a8 arg memdat ,contw 
+7404 18007208 force 8 ,loopcnt 
+7405 20407422 call memcpy_dword_swap 
+7406 58800000 setarg 0x800000 
+7407 1fed7e00 lshift8 pdata ,pdata 
+7408 e7e20005 istore 4 ,contw 
+7409 20407d16 call bn_zero 
+740a 58000300 setarg 0x0300 
+740b e7e20005 istore 4 ,contw 
+740c 204072a2 call sha 
+740d 202072de branch sha_result 
+
+eckp_calc_init:
+740e 7004a5c0 jam 192 ,mem_ec_loopc 
+
+eckp_calc_init_1:
+740f 6fe084a5 fetch 1 ,mem_ec_loopc 
+7410 207a0000 rtn blank 
+7411 1fe0ffff increase -1 ,pdata 
+7412 67e084a5 store 1 ,mem_ec_loopc 
+7413 d8c00580 arg mem_k ,contr 
+7414 2040707c call bn_testbit 
+7415 2020f40f branch eckp_calc_init_1 ,true 
+7416 d8c004a8 arg mem_ax ,contr 
+7417 d8a00538 arg mem_cx ,contw 
+7418 20207082 branch ec_copy 
+
+eckp_calc:
+7419 20407193 call ecdbl 
+741a 6fe084a5 fetch 1 ,mem_ec_loopc 
+741b 1fe0ffff increase -1 ,pdata 
+741c 67e084a5 store 1 ,mem_ec_loopc 
+741d d8c00580 arg mem_k ,contr 
+741e 2040707c call bn_testbit 
+741f 20608000 rtn true 
+7420 202071e4 branch ecadd 
+
+memcpy_dword_swap4:
+7421 18007204 force 4 ,loopcnt 
+
+memcpy_dword_swap:
+7422 18c08dfc increase -4 ,contr 
+
+memcpy_dword_swap_loop:
+7423 efe20006 ifetch 4 ,contr 
+7424 e7e20005 istore 4 ,contw 
+7425 18c08df8 increase -8 ,contr 
+7426 c2007423 loop memcpy_dword_swap_loop 
+7427 20600000 rtn 
+
+function_f1_no_key_256:
+7428 70476e00 jam 0 ,mem_passkey_1bit 
+7429 2020742c branch function_f1_common_256 
+
+function_f1_256:
+742a 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+742b c0817428 bne ssp_mode_passkey_entry_flag ,function_f1_no_key_256 
+
+function_f1_common_256:
+742c 58363636 setarg 0x363636 
+742d 1fed0400 lshift8 pdata ,temp 
+742e 18418436 or_into 0x36 ,temp 
+742f 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+7430 1fe20c00 copy pdata ,contr 
+7431 18007204 force 4 ,loopcnt 
+7432 204072e5 call pad_xor 
+7433 2040729b call sha_init 
+7434 204072a2 call sha 
+7435 6fe10942 fetch 2 ,mem_sp_prarm_stack + 2 
+7436 1fe20c00 copy pdata ,contr 
+7437 d8a004a8 arg memdat ,contw 
+7438 18007208 force 8 ,loopcnt 
+7439 20407422 call memcpy_dword_swap 
+743a 6fe10944 fetch 2 ,mem_sp_prarm_stack + 4 
+743b 1fe20c00 copy pdata ,contr 
+743c 18007208 force 8 ,loopcnt 
+743d 20407422 call memcpy_dword_swap 
+743e 204072a2 call sha 
+743f d8a004a8 arg memdat ,contw 
+7440 58800000 setarg 0x800000 
+7441 e7e18005 istore 3 ,contw 
+7442 6fe0c76e fetch 1 ,mem_passkey_1bit 
+7443 e7e08005 istore 1 ,contw 
+7444 df200007 arg 7 ,loopcnt 
+7445 20407d17 call memset0 
+7446 58000408 setarg 0x0408 
+7447 e7e20005 istore 4 ,contw 
+7448 2020736e branch function_f1_common2 
+
+function_f3a:
+7449 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+744a c001744d beq encapsulated_minor_type_p256 ,function_f3a_256 
+744b c000f3be beq encapsulated_minor_type_p192 ,function_f3a_192 
+744c 20600000 rtn 
+
+function_f3a_256:
+744d 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+744e c0817486 bne ssp_mode_passkey_entry_flag ,function_f3a_no_pin_256 
+
+function_f3a_common_256:
+744f 58363636 setarg 0x363636 
+7450 1fed0400 lshift8 pdata ,temp 
+7451 18418436 or_into 0x36 ,temp 
+7452 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7453 18007208 force 8 ,loopcnt 
+7454 204072e5 call pad_xor 
+7455 2040729b call sha_init 
+7456 204072a2 call sha 
+7457 d8c00900 arg mem_sp_random_remote_end ,contr 
+7458 d8a004a8 arg memdat ,contw 
+7459 20407421 call memcpy_dword_swap4 
+745a d8c008f0 arg mem_sp_random_local_end ,contr 
+745b 20407421 call memcpy_dword_swap4 
+
+function_f3_common_256:
+745c 58000000 setarg 0x0 
+745d e7e40005 istore 8 ,contw 
+745e e7e20005 istore 4 ,contw 
+745f 6fe24794 fetch 4 ,mem_pin 
+7460 e7e20005 istore 4 ,contw 
+7461 18a20400 copy contw ,temp 
+7462 7005e880 jam 0x80 ,mem_addr_padding 
+7463 18420a00 copy temp ,contw 
+7464 d8c005f8 arg mem_addr_iocap_end ,contr 
+7465 20407421 call memcpy_dword_swap4 
+7466 204072a2 call sha 
+7467 d8a004a8 arg memdat ,contw 
+7468 18007207 force 7 ,loopcnt 
+7469 20407d17 call memset0 
+746a e7e20005 istore 4 ,contw 
+746b 580003f8 setarg 0x03F8 
+746c e7e20005 istore 4 ,contw 
+746d 204072a2 call sha 
+746e 204072de call sha_result 
+746f d8c00900 arg memresult ,contr 
+7470 d8a005c8 arg memahsave ,contw 
+7471 20407d0a call memcpy32 
+7472 585c5c5c setarg 0x5c5c5c 
+7473 1fed0400 lshift8 pdata ,temp 
+7474 1841845c or_into 0x5c ,temp 
+7475 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7476 18007208 force 8 ,loopcnt 
+
+sha_end_common:
+7477 204072e5 call pad_xor 
+7478 2040729b call sha_init 
+7479 204072a2 call sha 
+747a d8c005e8 arg memahsave_end ,contr 
+747b d8a004a8 arg memdat ,contw 
+747c 18007208 force 8 ,loopcnt 
+747d 20407422 call memcpy_dword_swap 
+747e 58800000 setarg 0x800000 
+747f 1fed7e00 lshift8 pdata ,pdata 
+7480 e7e20005 istore 4 ,contw 
+7481 20407d16 call bn_zero 
+7482 58000300 setarg 0x0300 
+7483 e7e20005 istore 4 ,contw 
+7484 204072a2 call sha 
+7485 202072de branch sha_result 
+
+function_f3a_no_pin_256:
+7486 58000000 setarg 0 
+7487 67e24794 store 4 ,mem_pin 
+7488 2020744f branch function_f3a_common_256 
+
+function_f3b_no_pin_256:
+7489 58000000 setarg 0 
+748a 67e24794 store 4 ,mem_pin 
+748b 20207492 branch function_f3b_common_256 
+
+function_f3b:
+748c 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+748d c0017490 beq encapsulated_minor_type_p256 ,function_f3b_256 
+748e c000f3d5 beq encapsulated_minor_type_p192 ,function_f3b_192 
+748f 20600000 rtn 
+
+function_f3b_256:
+7490 6fe0c76c fetch 1 ,mem_ssp_mode_flag 
+7491 c0817489 bne ssp_mode_passkey_entry_flag ,function_f3b_no_pin_256 
+
+function_f3b_common_256:
+7492 58363636 setarg 0x363636 
+7493 1fed0400 lshift8 pdata ,temp 
+7494 18418436 or_into 0x36 ,temp 
+7495 d8c008e0 arg mem_sp_dhkey_end ,contr 
+7496 18007208 force 8 ,loopcnt 
+7497 204072e5 call pad_xor 
+7498 2040729b call sha_init 
+7499 204072a2 call sha 
+749a d8c008f0 arg mem_sp_random_local_end ,contr 
+749b d8a004a8 arg memdat ,contw 
+749c 20407421 call memcpy_dword_swap4 
+749d d8c00900 arg mem_sp_random_remote_end ,contr 
+749e 20407421 call memcpy_dword_swap4 
+749f 2020745c branch function_f3_common_256 
+
+function_f2:
+74a0 6fe0c645 fetch 1 ,mem_encapsulated_minor_type 
+74a1 c00174a4 beq encapsulated_minor_type_p256 ,function_f2_256 
+74a2 c000f388 beq encapsulated_minor_type_p192 ,function_f2_192 
+74a3 20600000 rtn 
+
+function_f2_256:
+74a4 58363636 setarg 0x363636 
+74a5 1fed0400 lshift8 pdata ,temp 
+74a6 18418436 or_into 0x36 ,temp 
+74a7 d8c008e0 arg mem_sp_dhkey_end ,contr 
+74a8 18007208 force 8 ,loopcnt 
+74a9 204072e5 call pad_xor 
+74aa 2040729b call sha_init 
+74ab 204072a2 call sha 
+74ac 6fe1094c fetch 2 ,mem_sp_prarm_stack + 12 
+74ad 1fe20c00 copy pdata ,contr 
+74ae d8a004a8 arg memdat ,contw 
+74af 20407421 call memcpy_dword_swap4 
+74b0 6fe1094e fetch 2 ,mem_sp_prarm_stack + 14 
+74b1 1fe20c00 copy pdata ,contr 
+74b2 20407421 call memcpy_dword_swap4 
+74b3 5862746c setarg 0x62746c 
+74b4 1fed7e00 lshift8 pdata ,pdata 
+74b5 1fe1fe6b or_into 0x6b ,pdata 
+74b6 e7e20005 istore 4 ,contw 
+74b7 d8c005f5 arg mem_addr_value_end ,contr 
+74b8 18007203 force 3 ,loopcnt 
+74b9 20407422 call memcpy_dword_swap 
+74ba 58800000 setarg 0x800000 
+74bb 1fed7e00 lshift8 pdata ,pdata 
+74bc e7e20005 istore 4 ,contw 
+74bd 18007e00 force 0 ,pdata 
+74be e7e40005 istore 8 ,contw 
+74bf 58000380 setarg 0x0380 
+74c0 e7e20005 istore 4 ,contw 
+74c1 204072a2 call sha 
+74c2 204072de call sha_result 
+74c3 d8c00900 arg memresult ,contr 
+74c4 d8a005c8 arg memahsave ,contw 
+74c5 20407d0a call memcpy32 
+74c6 585c5c5c setarg 0x5c5c5c 
+74c7 1fed0400 lshift8 pdata ,temp 
+74c8 1841845c or_into 0x5c ,temp 
+74c9 d8c008e0 arg mem_sp_dhkey_end ,contr 
+74ca 18007208 force 8 ,loopcnt 
+74cb 20207477 branch sha_end_common 
+
+function_h3:
+74cc 6fe340a8 fetch 6 ,mem_lap 
+74cd 67e305e9 store 6 ,mem_addr_value 
+74ce 6fe30041 fetch 6 ,mem_plap 
+74cf e7e30005 istore 6 ,contw 
+74d0 58363636 setarg 0x363636 
+74d1 1fed0400 lshift8 pdata ,temp 
+74d2 18418436 or_into 0x36 ,temp 
+74d3 d8c041db arg mem_link_key + 16 ,contr 
+74d4 18007204 force 4 ,loopcnt 
+74d5 204072e5 call pad_xor 
+74d6 2040729b call sha_init 
+74d7 204072a2 call sha 
+74d8 58627461 setarg 0x627461 
+74d9 1fed7e00 lshift8 pdata ,pdata 
+74da 1fe1fe6b or_into 0x6b ,pdata 
+74db 67e204a8 store 4 ,memdat 
+74dc d8c005f5 arg mem_addr_value + 12 ,contr 
+74dd 18007203 force 3 ,loopcnt 
+74de 20407422 call memcpy_dword_swap 
+74df d8c046b2 arg mem_ccm_iv + 8 ,contr 
+74e0 df200002 arg 2 ,loopcnt 
+74e1 20407422 call memcpy_dword_swap 
+74e2 58800000 setarg 0x800000 
+74e3 1fed7e00 lshift8 pdata ,pdata 
+74e4 e7e20005 istore 4 ,contw 
+74e5 df200004 arg 4 ,loopcnt 
+74e6 20407d17 call memset0 
+74e7 580002c0 setarg 704 
+74e8 e7e20005 istore 4 ,contw 
+74e9 204072a2 call sha 
+74ea 204072de call sha_result 
+74eb d8c00900 arg memresult ,contr 
+74ec d8a005c8 arg memahsave ,contw 
+74ed 20407d0a call memcpy32 
+74ee 585c5c5c setarg 0x5c5c5c 
+74ef 1fed0400 lshift8 pdata ,temp 
+74f0 1841845c or_into 0x5c ,temp 
+74f1 d8c041db arg mem_link_key + 16 ,contr 
+74f2 18007204 force 4 ,loopcnt 
+74f3 20207477 branch sha_end_common 
+
+function_h4:
+74f4 6fe340a8 fetch 6 ,mem_lap 
+74f5 67e305e9 store 6 ,mem_addr_value 
+74f6 6fe30041 fetch 6 ,mem_plap 
+74f7 e7e30005 istore 6 ,contw 
+74f8 58363636 setarg 0x363636 
+74f9 1fed0400 lshift8 pdata ,temp 
+74fa 18418436 or_into 0x36 ,temp 
+74fb d8c041db arg mem_link_key + 16 ,contr 
+74fc 18007204 force 4 ,loopcnt 
+74fd 204072e5 call pad_xor 
+74fe 2040729b call sha_init 
+74ff 204072a2 call sha 
+7500 58627464 setarg 0x627464 
+7501 1fed7e00 lshift8 pdata ,pdata 
+7502 1fe1fe6b or_into 0x6b ,pdata 
+7503 67e204a8 store 4 ,memdat 
+7504 d8c005f5 arg mem_addr_value + 12 ,contr 
+7505 18007203 force 3 ,loopcnt 
+7506 20407422 call memcpy_dword_swap 
+7507 58800000 setarg 0x800000 
+7508 1fed7e00 lshift8 pdata ,pdata 
+7509 e7e20005 istore 4 ,contw 
+750a df200005 arg 5 ,loopcnt 
+750b 20407d17 call memset0 
+750c 58000280 setarg 640 
+750d e7e20005 istore 4 ,contw 
+750e 204072a2 call sha 
+750f 204072de call sha_result 
+7510 d8c00900 arg memresult ,contr 
+7511 d8a005c8 arg memahsave ,contw 
+7512 20407d0a call memcpy32 
+7513 585c5c5c setarg 0x5c5c5c 
+7514 1fed0400 lshift8 pdata ,temp 
+7515 1841845c or_into 0x5c ,temp 
+7516 d8c041db arg mem_link_key + 16 ,contr 
+7517 18007204 force 4 ,loopcnt 
+7518 20207477 branch sha_end_common 
+
+function_h5:
+7519 d8c00910 arg mem_sp_calc_result_high ,contr 
+751a d8a00454 arg mem_input_store ,contw 
+751b 20407d0c call memcpy16 
+751c 58000900 setarg mem_sp_random_remote + 16 
+751d 67e10940 store 2 ,mem_sp_prarm_stack 
+751e 58000434 setarg mem_random_number + 16 
+751f e7e10005 istore 2 ,contw 
+7520 58363636 setarg 0x363636 
+7521 1fed0400 lshift8 pdata ,temp 
+7522 18418436 or_into 0x36 ,temp 
+7523 d8c00464 arg mem_input_store + 16 ,contr 
+7524 18007204 force 4 ,loopcnt 
+7525 204072e5 call pad_xor 
+7526 2040729b call sha_init 
+7527 204072a2 call sha 
+7528 d8a004a8 arg memdat ,contw 
+7529 6fe10940 fetch 2 ,mem_sp_prarm_stack 
+752a 1fe20c00 copy pdata ,contr 
+752b 20407421 call memcpy_dword_swap4 
+752c 6fe10942 fetch 2 ,mem_sp_prarm_stack + 2 
+752d 1fe20c00 copy pdata ,contr 
+752e 20407421 call memcpy_dword_swap4 
+752f 58800000 setarg 0x800000 
+7530 1fed7e00 lshift8 pdata ,pdata 
+7531 e7e20005 istore 4 ,contw 
+7532 df200003 arg 3 ,loopcnt 
+7533 20407d17 call memset0 
+7534 58000300 setarg 768 
+7535 e7e20005 istore 4 ,contw 
+7536 204072a2 call sha 
+7537 204072de call sha_result 
+7538 d8c00900 arg memresult ,contr 
+7539 d8a005c8 arg memahsave ,contw 
+753a 20407d0a call memcpy32 
+753b 585c5c5c setarg 0x5c5c5c 
+753c 1fed0400 lshift8 pdata ,temp 
+753d 1841845c or_into 0x5c ,temp 
+753e d8c00464 arg mem_input_store + 16 ,contr 
+753f 18007204 force 4 ,loopcnt 
+7540 20207477 branch sha_end_common 
+
+sp_initialize_256:
+7541 47414030 bpatchx patch30_2 ,mem_patch30 
+7542 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+7543 243a7562 nbranch sp_pubkey_calc_256 ,blank 
+
+sc_reset:
+7544 7046ba00 jam sp_calc_standby ,mem_sc_calc 
+7545 7046bb00 jam sp_key_invalid ,mem_sc_local_key_invalid 
+7546 20600000 rtn 
+
+sp_wait_pubkey_calc_256_done:
+7547 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+7548 207a0000 rtn blank 
+7549 6fe0c6bb fetch 1 ,mem_sc_local_key_invalid 
+754a c1018000 rtneq sp_key_valid_256 
+754b 20407597 call sp_calc_sequence_256 
+754c 20207547 branch sp_wait_pubkey_calc_256_done 
+
+sp_debug_private_256:
+754d d8a046bc arg mem_sc_private_key_256 ,contw 
+754e 38001abd setsect 0 ,0x1abd 
+754f 3805b34f setsect 1 ,0x1b34f 
+7550 38099b8a setsect 2 ,0x19b8a 
+7551 380e6562 setsect 3 ,0x26562 
+7552 e7e48005 istore 9 ,contw 
+7553 380340b7 setsect 0 ,0x340b7 
+7554 38041efa setsect 1 ,0x1efa 
+7555 3808aff6 setsect 2 ,0xaff6 
+7556 380cfd41 setsect 3 ,0xfd41 
+7557 e7e48005 istore 9 ,contw 
+7558 3803d210 setsect 0 ,0x3d210 
+7559 38066cf8 setsect 1 ,0x26cf8 
+755a 380b874c setsect 2 ,0x3874c 
+755b 380f157c setsect 3 ,0x3157c 
+755c e7e48005 istore 9 ,contw 
+755d 3802d4a3 setsect 0 ,0x2d4a3 
+755e 3807d27d setsect 1 ,0x3d27d 
+755f 38080003 setsect 2 ,0x3 
+7560 e7e28005 istore 5 ,contw 
+7561 20600000 rtn 
+
+sp_pubkey_calc_256:
+7562 6fe0c6bb fetch 1 ,mem_sc_local_key_invalid 
+7563 c1800000 rtnne sp_key_invalid 
+7564 6fe0c6ba fetch 1 ,mem_sc_calc 
+7565 c1800000 rtnne sp_calc_standby 
+7566 20406e52 call init_memp_256 
+7567 d8a046bc arg mem_sc_private_key_256 ,contw 
+7568 18000e0f force 15 ,queue 
+7569 20407032 call random_generator 
+756a 180a7e00 random pdata 
+756b 1fe37e00 rshift pdata ,pdata 
+756c e7e10005 istore 2 ,contw 
+756d 6fe0c6b7 fetch 1 ,mem_sp_debug_mode 
+756e 245a754d ncall sp_debug_private_256 ,blank 
+756f d8a00628 arg mem_k_256 ,contw 
+7570 d8c046bc arg mem_sc_private_key_256 ,contr 
+7571 20407d0a call memcpy32 
+7572 d8a00508 arg mem_ax_256 ,contw 
+7573 d8c00820 arg mem_gx_256 ,contr 
+7574 20407cff call memcpy64 
+7575 d8a00548 arg mem_az_256 ,contw 
+7576 20407d22 call clear_mem_256 
+7577 70054801 jam 1 ,mem_az_256 
+7578 204075af call eckp_calc_init_256 
+7579 7046ba03 jam sp_calc_pubkey_256 ,mem_sc_calc 
+757a 20600000 rtn 
+
+sp_pubkey_generated_256:
+757b d8a046dc arg mem_sc_pubkey_local_x_256 ,contw 
+757c d8c00568 arg mem_bx_256 ,contr 
+757d 20407cff call memcpy64 
+757e 7046bb03 jam sp_key_valid_256 ,mem_sc_local_key_invalid 
+757f 7046ba00 jam sp_calc_standby ,mem_sc_calc 
+7580 20600000 rtn 
+
+sp_dhkey_calc_256:
+7581 6fe0887b fetch 1 ,mem_sp_dhkey_invalid 
+7582 c1800000 rtnne sp_key_invalid 
+7583 6fe0c6ba fetch 1 ,mem_sc_calc 
+7584 c1800000 rtnne sp_calc_standby 
+7585 d8a00628 arg mem_k_256 ,contw 
+7586 d8c046bc arg mem_sc_private_key_256 ,contr 
+7587 20407d0a call memcpy32 
+7588 d8a00508 arg mem_ax_256 ,contw 
+7589 d8c00880 arg mem_le_pubkey_remote_x_256 ,contr 
+758a 20407cff call memcpy64 
+758b d8a00548 arg mem_az_256 ,contw 
+758c 20407d22 call clear_mem_256 
+758d 70054801 jam 1 ,mem_az_256 
+758e 204075af call eckp_calc_init_256 
+758f 7046ba04 jam sp_calc_dhkey_256 ,mem_sc_calc 
+7590 20600000 rtn 
+
+sp_dhkey_generated_256:
+7591 d8a008c0 arg mem_le_dhkey_256 ,contw 
+7592 d8c00568 arg mem_bx_256 ,contr 
+7593 20407d0a call memcpy32 
+7594 70087b03 jam sp_key_valid_256 ,mem_sp_dhkey_invalid 
+7595 7046ba00 jam sp_calc_standby ,mem_sc_calc 
+7596 20600000 rtn 
+
+sp_calc_sequence_256:
+7597 6fe0c6b8 fetch 1 ,mem_secure_connections_enable 
+7598 207a0000 rtn blank 
+7599 6fe0c6ba fetch 1 ,mem_sc_calc 
+759a 207a0000 rtn blank 
+759b 1fe0fe80 increase 0x80 ,pdata 
+759c 67e0c6ba store 1 ,mem_sc_calc 
+759d c3838000 rtnbit1 7 
+759e 6fe104a5 fetch 2 ,mem_ec_loopc 
+759f 203a75a1 branch sp_calc_sequence_done_256 ,blank 
+75a0 202075a7 branch eckp_calc_256 
+
+sp_calc_sequence_done_256:
+75a1 4741c030 bpatchx patch30_3 ,mem_patch30 
+75a2 204075bc call ecunmapz_256 
+75a3 6fe0c6ba fetch 1 ,mem_sc_calc 
+75a4 c001f57b beq sp_calc_pubkey_256 ,sp_pubkey_generated_256 
+75a5 c0027591 beq sp_calc_dhkey_256 ,sp_dhkey_generated_256 
+75a6 20600000 rtn 
+
+eckp_calc_256:
+75a7 204075ce call ecdbl_256 
+75a8 6fe104a5 fetch 2 ,mem_ec_loopc 
+75a9 1fe0ffff increase -1 ,pdata 
+75aa 67e104a5 store 2 ,mem_ec_loopc 
+75ab d8c00628 arg mem_k_256 ,contr 
+75ac 2040707c call bn_testbit 
+75ad 20608000 rtn true 
+75ae 2020761f branch ecadd_256 
+
+eckp_calc_init_256:
+75af 47424030 bpatchx patch30_4 ,mem_patch30 
+75b0 58000100 setarg 256 
+75b1 67e104a5 store 2 ,mem_ec_loopc 
+
+eckp_calc_init_256_1:
+75b2 6fe104a5 fetch 2 ,mem_ec_loopc 
+75b3 207a0000 rtn blank 
+75b4 1fe0ffff increase -1 ,pdata 
+75b5 67e104a5 store 2 ,mem_ec_loopc 
+75b6 d8c00628 arg mem_k_256 ,contr 
+75b7 2040707c call bn_testbit 
+75b8 2020f5b2 branch eckp_calc_init_256_1 ,true 
+75b9 d8c00508 arg mem_ax_256 ,contr 
+75ba d8a005c8 arg mem_cx_256 ,contw 
+75bb 20207cfe branch memcpy96 
+
+ecunmapz_256:
+75bc da200608 arg mem_cz_256 ,rega 
+75bd d8a00708 arg mem_t3_256 ,contw 
+75be 2040768b call bn_invmod_256 
+75bf da200708 arg mem_t3_256 ,rega 
+75c0 d8a006a8 arg mem_t1_256 ,contw 
+75c1 20407761 call bn_sqrmod_256 
+75c2 da2005c8 arg mem_cx_256 ,rega 
+75c3 da4006a8 arg mem_t1_256 ,regb 
+75c4 d8a00568 arg mem_bx_256 ,contw 
+75c5 204076c9 call bn_mulmod_256 
+75c6 da200708 arg mem_t3_256 ,rega 
+75c7 da4006a8 arg mem_t1_256 ,regb 
+75c8 d8a006e8 arg mem_t2_256 ,contw 
+75c9 204076c9 call bn_mulmod_256 
+75ca da2005e8 arg mem_cy_256 ,rega 
+75cb da4006e8 arg mem_t2_256 ,regb 
+75cc d8a00588 arg mem_by_256 ,contw 
+75cd 202076c9 branch bn_mulmod_256 
+
+ecdbl_256:
+75ce da200608 arg mem_cz_256 ,rega 
+75cf d8a006e8 arg mem_t2_256 ,contw 
+75d0 20407761 call bn_sqrmod_256 
+75d1 da2006e8 arg mem_t2_256 ,rega 
+75d2 d8a00708 arg mem_t3_256 ,contw 
+75d3 20407761 call bn_sqrmod_256 
+75d4 da200800 arg mem_a_256 ,rega 
+75d5 da400708 arg mem_t3_256 ,regb 
+75d6 d8a00708 arg mem_t3_256 ,contw 
+75d7 204076c9 call bn_mulmod_256 
+75d8 da2005c8 arg mem_cx_256 ,rega 
+75d9 d8a006e8 arg mem_t2_256 ,contw 
+75da 20407761 call bn_sqrmod_256 
+75db d8c006e8 arg mem_t2_256 ,contr 
+75dc d8a006a8 arg mem_t1_256 ,contw 
+75dd 20407d0a call memcpy32 
+75de da2006a8 arg mem_t1_256 ,rega 
+75df 20407768 call bn_lshiftmod_256 
+75e0 da2006e8 arg mem_t2_256 ,rega 
+75e1 da4006a8 arg mem_t1_256 ,regb 
+75e2 d8a006e8 arg mem_t2_256 ,contw 
+75e3 20407765 call bn_addmod_256 
+75e4 da2006e8 arg mem_t2_256 ,rega 
+75e5 da400708 arg mem_t3_256 ,regb 
+75e6 d8a006e8 arg mem_t2_256 ,contw 
+75e7 20407765 call bn_addmod_256 
+75e8 d8c005c8 arg mem_cx_256 ,contr 
+75e9 d8a006a8 arg mem_t1_256 ,contw 
+75ea 20407d0a call memcpy32 
+75eb da2005e8 arg mem_cy_256 ,rega 
+75ec d8a00708 arg mem_t3_256 ,contw 
+75ed 20407761 call bn_sqrmod_256 
+75ee da2006a8 arg mem_t1_256 ,rega 
+75ef 20407768 call bn_lshiftmod_256 
+75f0 da2006a8 arg mem_t1_256 ,rega 
+75f1 20407768 call bn_lshiftmod_256 
+75f2 da2006a8 arg mem_t1_256 ,rega 
+75f3 da400708 arg mem_t3_256 ,regb 
+75f4 d8a006a8 arg mem_t1_256 ,contw 
+75f5 204076c9 call bn_mulmod_256 
+75f6 da200708 arg mem_t3_256 ,rega 
+75f7 d8a006c8 arg mem_t0_256 ,contw 
+75f8 20407761 call bn_sqrmod_256 
+75f9 da2006c8 arg mem_t0_256 ,rega 
+75fa 20407768 call bn_lshiftmod_256 
+75fb da2006c8 arg mem_t0_256 ,rega 
+75fc 20407768 call bn_lshiftmod_256 
+75fd da2006c8 arg mem_t0_256 ,rega 
+75fe 20407768 call bn_lshiftmod_256 
+75ff d8c005e8 arg mem_cy_256 ,contr 
+7600 d8a00708 arg mem_t3_256 ,contw 
+7601 20407d0a call memcpy32 
+7602 da200708 arg mem_t3_256 ,rega 
+7603 20407768 call bn_lshiftmod_256 
+7604 da200708 arg mem_t3_256 ,rega 
+7605 da400608 arg mem_cz_256 ,regb 
+7606 d8a00608 arg mem_cz_256 ,contw 
+7607 204076c9 call bn_mulmod_256 
+7608 da2006e8 arg mem_t2_256 ,rega 
+7609 d8a00708 arg mem_t3_256 ,contw 
+760a 20407761 call bn_sqrmod_256 
+760b da200708 arg mem_t3_256 ,rega 
+760c da4006a8 arg mem_t1_256 ,regb 
+760d d8a00708 arg mem_t3_256 ,contw 
+760e 2040777e call bn_submod_256 
+760f da200708 arg mem_t3_256 ,rega 
+7610 da4006a8 arg mem_t1_256 ,regb 
+7611 d8a005c8 arg mem_cx_256 ,contw 
+7612 2040777e call bn_submod_256 
+7613 da2006a8 arg mem_t1_256 ,rega 
+7614 da4005c8 arg mem_cx_256 ,regb 
+7615 d8a00708 arg mem_t3_256 ,contw 
+7616 2040777e call bn_submod_256 
+7617 da200708 arg mem_t3_256 ,rega 
+7618 da4006e8 arg mem_t2_256 ,regb 
+7619 d8a00708 arg mem_t3_256 ,contw 
+761a 204076c9 call bn_mulmod_256 
+761b da200708 arg mem_t3_256 ,rega 
+761c da4006c8 arg mem_t0_256 ,regb 
+761d d8a005e8 arg mem_cy_256 ,contw 
+761e 2020777e branch bn_submod_256 
+
+ecadd_256:
+761f da200548 arg mem_az_256 ,rega 
+7620 d8a00728 arg mem_t7_256 ,contw 
+7621 20407761 call bn_sqrmod_256 
+7622 da2005c8 arg mem_cx_256 ,rega 
+7623 da400728 arg mem_t7_256 ,regb 
+7624 d8a006c8 arg mem_t0_256 ,contw 
+7625 204076c9 call bn_mulmod_256 
+7626 da200548 arg mem_az_256 ,rega 
+7627 da400728 arg mem_t7_256 ,regb 
+7628 d8a00728 arg mem_t7_256 ,contw 
+7629 204076c9 call bn_mulmod_256 
+762a da2005e8 arg mem_cy_256 ,rega 
+762b da400728 arg mem_t7_256 ,regb 
+762c d8a006a8 arg mem_t1_256 ,contw 
+762d 204076c9 call bn_mulmod_256 
+762e da200608 arg mem_cz_256 ,rega 
+762f d8a00728 arg mem_t7_256 ,contw 
+7630 20407761 call bn_sqrmod_256 
+7631 da200508 arg mem_ax_256 ,rega 
+7632 da400728 arg mem_t7_256 ,regb 
+7633 d8a006e8 arg mem_t2_256 ,contw 
+7634 204076c9 call bn_mulmod_256 
+7635 da200608 arg mem_cz_256 ,rega 
+7636 da400728 arg mem_t7_256 ,regb 
+7637 d8a00728 arg mem_t7_256 ,contw 
+7638 204076c9 call bn_mulmod_256 
+7639 da200528 arg mem_ay_256 ,rega 
+763a da400728 arg mem_t7_256 ,regb 
+763b d8a00708 arg mem_t3_256 ,contw 
+763c 204076c9 call bn_mulmod_256 
+763d da4006c8 arg mem_t0_256 ,regb 
+763e da2006e8 arg mem_t2_256 ,rega 
+763f d8a00728 arg mem_t7_256 ,contw 
+7640 2040777e call bn_submod_256 
+7641 da2006c8 arg mem_t0_256 ,rega 
+7642 da4006e8 arg mem_t2_256 ,regb 
+7643 d8a006c8 arg mem_t0_256 ,contw 
+7644 20407765 call bn_addmod_256 
+7645 da4006a8 arg mem_t1_256 ,regb 
+7646 da200708 arg mem_t3_256 ,rega 
+7647 d8a006e8 arg mem_t2_256 ,contw 
+7648 2040777e call bn_submod_256 
+7649 da2006a8 arg mem_t1_256 ,rega 
+764a da400708 arg mem_t3_256 ,regb 
+764b d8a006a8 arg mem_t1_256 ,contw 
+764c 20407765 call bn_addmod_256 
+764d da2006a8 arg mem_t1_256 ,rega 
+764e da400728 arg mem_t7_256 ,regb 
+764f d8a006a8 arg mem_t1_256 ,contw 
+7650 204076c9 call bn_mulmod_256 
+7651 da200608 arg mem_cz_256 ,rega 
+7652 da400548 arg mem_az_256 ,regb 
+7653 d8a00708 arg mem_t3_256 ,contw 
+7654 204076c9 call bn_mulmod_256 
+7655 da200708 arg mem_t3_256 ,rega 
+7656 da400728 arg mem_t7_256 ,regb 
+7657 d8a00608 arg mem_cz_256 ,contw 
+7658 204076c9 call bn_mulmod_256 
+7659 da200728 arg mem_t7_256 ,rega 
+765a d8a00728 arg mem_t7_256 ,contw 
+765b 20407761 call bn_sqrmod_256 
+765c da200728 arg mem_t7_256 ,rega 
+765d da4006c8 arg mem_t0_256 ,regb 
+765e d8a00708 arg mem_t3_256 ,contw 
+765f 204076c9 call bn_mulmod_256 
+7660 da200728 arg mem_t7_256 ,rega 
+7661 da4006a8 arg mem_t1_256 ,regb 
+7662 d8a006a8 arg mem_t1_256 ,contw 
+7663 204076c9 call bn_mulmod_256 
+7664 da2006e8 arg mem_t2_256 ,rega 
+7665 d8a005c8 arg mem_cx_256 ,contw 
+7666 20407761 call bn_sqrmod_256 
+7667 da2005c8 arg mem_cx_256 ,rega 
+7668 da400708 arg mem_t3_256 ,regb 
+7669 d8a005c8 arg mem_cx_256 ,contw 
+766a 2040777e call bn_submod_256 
+766b d8c005c8 arg mem_cx_256 ,contr 
+766c d8a00728 arg mem_t7_256 ,contw 
+766d 20407d0a call memcpy32 
+766e da200728 arg mem_t7_256 ,rega 
+766f 20407768 call bn_lshiftmod_256 
+7670 da200708 arg mem_t3_256 ,rega 
+7671 da400728 arg mem_t7_256 ,regb 
+7672 d8a00708 arg mem_t3_256 ,contw 
+7673 2040777e call bn_submod_256 
+7674 da200708 arg mem_t3_256 ,rega 
+7675 da4006e8 arg mem_t2_256 ,regb 
+7676 d8a006e8 arg mem_t2_256 ,contw 
+7677 204076c9 call bn_mulmod_256 
+7678 da2006e8 arg mem_t2_256 ,rega 
+7679 da4006a8 arg mem_t1_256 ,regb 
+767a d8a005e8 arg mem_cy_256 ,contw 
+767b 2040777e call bn_submod_256 
+767c da2005e8 arg mem_cy_256 ,rega 
+767d da4007e0 arg mem_p_256 ,regb 
+767e d8a005e8 arg mem_cy_256 ,contw 
+767f 18002600 force 0 ,regc 
+7680 6fe085e8 fetch 1 ,mem_cy_256 
+7681 2feffe00 isolate1 0 ,pdata 
+7682 2040f763 call bn_add_256 ,true 
+7683 1a626000 copy regc ,alarm 
+7684 da2005e8 arg mem_cy_256 ,rega 
+7685 20407793 call bn_rshift_256 
+7686 6fe08607 fetch 1 ,mem_cy5_256 
+7687 2e0ffe00 isolate1 0 ,alarm 
+7688 7920fe07 setflag true ,7 ,pdata 
+7689 67e08607 store 1 ,mem_cy5_256 
+768a 20600000 rtn 
+
+bn_invmod_256:
+768b 18a21600 copy contw ,timeup 
+768c d8a006c8 arg mem_tmp0_256 ,contw 
+768d 20407d22 call clear_mem_256 
+768e 18007e00 force 0 ,pdata 
+768f 67e206e8 store 4 ,mem_t2_256 
+7690 7006c801 jam 1 ,mem_tmp0_256 
+7691 d8a00648 arg mem_tmp1_256 ,contw 
+7692 20407d24 call clear_mem_512 
+7693 d8c007e0 arg mem_p_256 ,contr 
+7694 d8a00688 arg mem_tmp2_256 ,contw 
+7695 20407d0a call memcpy32 
+7696 1a220c00 copy rega ,contr 
+7697 d8a006a8 arg mem_tmp3_256 ,contw 
+7698 20407d0a call memcpy32 
+
+bn_invmod_256_2:
+7699 d8c006a8 arg mem_tmp3_256 ,contr 
+769a 2040779d call bn_eq_zero_256 
+769b 203a76c2 branch bn_invmod_256_0 ,blank 
+769c da2006a8 arg mem_tmp3_256 ,rega 
+769d da4006c8 arg mem_tmp0_256 ,regb 
+769e 204077a0 call bn_rshifteven_256 
+769f da200688 arg mem_tmp2_256 ,rega 
+76a0 da400648 arg mem_tmp1_256 ,regb 
+76a1 204077a0 call bn_rshifteven_256 
+76a2 da2006a8 arg mem_tmp3_256 ,rega 
+76a3 da400688 arg mem_tmp2_256 ,regb 
+76a4 20407799 call bn_bigeq_256 
+76a5 202176b4 branch bn_invmod_256_1 ,positive 
+76a6 da200688 arg mem_tmp2_256 ,rega 
+76a7 da4006a8 arg mem_tmp3_256 ,regb 
+76a8 1a220a00 copy rega ,contw 
+76a9 20407791 call bn_sub_256 
+76aa da2006c8 arg mem_tmp0_256 ,rega 
+76ab da400648 arg mem_tmp1_256 ,regb 
+76ac 1a420a00 copy regb ,contw 
+76ad 20407763 call bn_add_256 
+76ae efe08011 ifetch 1 ,rega 
+76af 9a60a600 iadd regc ,regc 
+76b0 efe08012 ifetch 1 ,regb 
+76b1 9a60fe00 iadd regc ,pdata 
+76b2 e7e08012 istore 1 ,regb 
+76b3 20207699 branch bn_invmod_256_2 
+
+bn_invmod_256_1:
+76b4 da2006a8 arg mem_tmp3_256 ,rega 
+76b5 da400688 arg mem_tmp2_256 ,regb 
+76b6 1a220a00 copy rega ,contw 
+76b7 20407791 call bn_sub_256 
+76b8 da200648 arg mem_tmp1_256 ,rega 
+76b9 da4006c8 arg mem_tmp0_256 ,regb 
+76ba 1a420a00 copy regb ,contw 
+76bb 20407763 call bn_add_256 
+76bc efe08011 ifetch 1 ,rega 
+76bd 9a60a600 iadd regc ,regc 
+76be efe08012 ifetch 1 ,regb 
+76bf 9a60fe00 iadd regc ,pdata 
+76c0 e7e08012 istore 1 ,regb 
+76c1 20207699 branch bn_invmod_256_2 
+
+bn_invmod_256_0:
+76c2 da200648 arg mem_tmp1_256 ,rega 
+76c3 19620a00 copy timeup ,contw 
+76c4 204076f2 call bn_p256mod 
+76c5 da2007e0 arg mem_p_256 ,rega 
+76c6 19622400 copy timeup ,regb 
+76c7 19620a00 copy timeup ,contw 
+76c8 2020777e branch bn_submod_256 
+
+bn_mulmod_256:
+76c9 18a21600 copy contw ,timeup 
+76ca 18007000 force 0 ,regext_index 
+76cb d8a00648 arg mem_tmp1_256 ,contw 
+76cc 20407d24 call clear_mem_512 
+76cd d8a0099e arg mem_regext ,contw 
+76ce 20407d24 call clear_mem_512 
+76cf 1a220c00 copy rega ,contr 
+76d0 70099e00 jam 0 ,mem_regext 
+76d1 58000000 setarg 0 
+76d2 2040775b call bn_load_mem 
+76d3 1a420c00 copy regb ,contr 
+76d4 2040775f call bn_load_256 
+76d5 18000e00 force 0 ,queue 
+76d6 d8a00648 arg mem_tmp1_256 ,contw 
+
+bn_mulmod_256_1:
+76d7 d840099e arg mem_regext ,temp 
+76d8 18e22400 copy queue ,regb 
+76d9 1a4bfe00 lshift2 regb ,pdata 
+76da 9840a400 iadd temp ,regb 
+76db 18000400 force 0 ,temp 
+76dc 18002600 force 0 ,regc 
+
+bn_mulmod_256_0:
+76dd efe20005 ifetch 4 ,contw 
+76de 98002200 iforce rega 
+76df efe20012 ifetch 4 ,regb 
+76e0 1a627000 copy regc ,regext_index 
+76e1 9deffe00 imul32 regext ,pdata 
+76e2 9a20fe00 iadd rega ,pdata 
+76e3 9840fe00 iadd temp ,pdata 
+76e4 e7e20005 istore 4 ,contw 
+76e5 1fef0400 rshift32 pdata ,temp 
+76e6 1a60a601 increase 1 ,regc 
+76e7 2a61fe08 compare 8 ,regc ,0xff 
+76e8 2420f6dd nbranch bn_mulmod_256_0 ,true 
+76e9 18427e00 deposit temp 
+76ea e7e20005 istore 4 ,contw 
+76eb 18a08be0 increase -32 ,contw 
+76ec 18e08e01 increase 1 ,queue 
+76ed 28e1fe08 compare 8 ,queue ,0xff 
+76ee 2420f6d7 nbranch bn_mulmod_256_1 ,true 
+76ef da200648 arg mem_tmp1_256 ,rega 
+76f0 19620a00 copy timeup ,contw 
+76f1 202076f2 branch bn_p256mod 
+
+bn_p256mod:
+76f2 4742c030 bpatchx patch30_5 ,mem_patch30 
+76f3 18a21600 copy contw ,timeup 
+76f4 1a226000 copy rega ,alarm 
+76f5 da400688 arg mem_tmp2_256 ,regb 
+76f6 1a420a00 copy regb ,contw 
+76f7 20407d1f call memset0_4 
+76f8 e7e40005 istore 8 ,contw 
+76f9 1a208c2c add rega ,44 ,contr 
+76fa 20407d06 call memcpy8 
+76fb 20407d02 call memcpy12 
+76fc 1a422200 copy regb ,rega 
+76fd 20407768 call bn_lshiftmod_256 
+76fe da400688 arg mem_tmp2_256 ,regb 
+76ff 1e022200 copy alarm ,rega 
+7700 19620a00 copy timeup ,contw 
+7701 20407765 call bn_addmod_256 
+7702 da400688 arg mem_tmp2_256 ,regb 
+7703 1a420a00 copy regb ,contw 
+7704 20407d1f call memset0_4 
+7705 e7e40005 istore 8 ,contw 
+7706 1e008c30 add alarm ,48 ,contr 
+7707 20407d0c call memcpy16 
+7708 20407d1f call memset0_4 
+7709 1a422200 copy regb ,rega 
+770a 20407768 call bn_lshiftmod_256 
+770b da400688 arg mem_tmp2_256 ,regb 
+770c 19622200 copy timeup ,rega 
+770d 1a220a00 copy rega ,contw 
+770e 20407765 call bn_addmod_256 
+770f da400688 arg mem_tmp2_256 ,regb 
+7710 1a420a00 copy regb ,contw 
+7711 1e008c20 add alarm ,32 ,contr 
+7712 20407d02 call memcpy12 
+7713 20407d1f call memset0_4 
+7714 e7e40005 istore 8 ,contw 
+7715 1e008c38 add alarm ,56 ,contr 
+7716 20407d06 call memcpy8 
+7717 19622200 copy timeup ,rega 
+7718 1a220a00 copy rega ,contw 
+7719 20407765 call bn_addmod_256 
+771a da400688 arg mem_tmp2_256 ,regb 
+771b 1a420a00 copy regb ,contw 
+771c 1e008c24 add alarm ,36 ,contr 
+771d 20407d02 call memcpy12 
+771e 1e008c34 add alarm ,52 ,contr 
+771f 20407d02 call memcpy12 
+7720 1e008c34 add alarm ,52 ,contr 
+7721 20407d03 call memcpy4 
+7722 1e008c20 add alarm ,32 ,contr 
+7723 20407d03 call memcpy4 
+7724 19622200 copy timeup ,rega 
+7725 1a220a00 copy rega ,contw 
+7726 20407765 call bn_addmod_256 
+7727 da400688 arg mem_tmp2_256 ,regb 
+7728 1a420a00 copy regb ,contw 
+7729 1e008c2c add alarm ,44 ,contr 
+772a 20407d02 call memcpy12 
+772b 20407d1f call memset0_4 
+772c e7e40005 istore 8 ,contw 
+772d 1e008c20 add alarm ,32 ,contr 
+772e 20407d03 call memcpy4 
+772f 1e008c28 add alarm ,40 ,contr 
+7730 20407d03 call memcpy4 
+7731 19622200 copy timeup ,rega 
+7732 1a220a00 copy rega ,contw 
+7733 2040777e call bn_submod_256 
+7734 da400688 arg mem_tmp2_256 ,regb 
+7735 1a420a00 copy regb ,contw 
+7736 1e008c30 add alarm ,48 ,contr 
+7737 20407d06 call memcpy8 
+7738 20407d06 call memcpy8 
+7739 18007e00 force 0 ,pdata 
+773a e7e40005 istore 8 ,contw 
+773b 1e008c24 add alarm ,36 ,contr 
+773c 20407d03 call memcpy4 
+773d 1e008c2c add alarm ,44 ,contr 
+773e 20407d03 call memcpy4 
+773f 19622200 copy timeup ,rega 
+7740 1a220a00 copy rega ,contw 
+7741 2040777e call bn_submod_256 
+7742 da400688 arg mem_tmp2_256 ,regb 
+7743 1a420a00 copy regb ,contw 
+7744 1e008c34 add alarm ,52 ,contr 
+7745 20407d02 call memcpy12 
+7746 1e008c20 add alarm ,32 ,contr 
+7747 20407d02 call memcpy12 
+7748 20407d1f call memset0_4 
+7749 1e008c30 add alarm ,48 ,contr 
+774a 20407d03 call memcpy4 
+774b 19622200 copy timeup ,rega 
+774c 1a220a00 copy rega ,contw 
+774d 2040777e call bn_submod_256 
+774e da400688 arg mem_tmp2_256 ,regb 
+774f 1a420a00 copy regb ,contw 
+7750 1e008c38 add alarm ,56 ,contr 
+7751 20407d06 call memcpy8 
+7752 20407d1f call memset0_4 
+7753 1e008c24 add alarm ,36 ,contr 
+7754 20407d02 call memcpy12 
+7755 20407d1f call memset0_4 
+7756 1e008c34 add alarm ,52 ,contr 
+7757 20407d03 call memcpy4 
+7758 19622200 copy timeup ,rega 
+7759 1a220a00 copy rega ,contw 
+775a 2020777e branch bn_submod_256 
+
+bn_load_mem:
+775b 18007220 force 32 ,loopcnt 
+775c d8a0099e arg mem_regext ,contw 
+775d 98a08a00 iadd contw ,contw 
+775e 20207d5f branch memcpy 
+
+bn_load_256:
+775f 18007208 force 8 ,loopcnt 
+7760 20207111 branch bn_load_0 
+
+bn_sqrmod_256:
+7761 1a222400 copy rega ,regb 
+7762 202076c9 branch bn_mulmod_256 
+
+bn_add_256:
+7763 18007208 force 8 ,loopcnt 
+7764 202070a2 branch bn_add + 1 
+
+bn_addmod_256:
+7765 20407763 call bn_add_256 
+7766 18a22200 copy contw ,rega 
+7767 20207769 branch bn_lshiftmod_ismod_256 
+
+bn_lshiftmod_256:
+7768 20407796 call bn_lshift_256 
+
+bn_lshiftmod_ismod_256:
+7769 2a6ffe00 isolate1 0 ,regc 
+776a 2020f772 branch bn_lshiftmod_p_256 ,true 
+776b da4007e0 arg mem_p_256 ,regb 
+776c 1a222600 copy rega ,regc 
+776d 1a20a3e0 increase -32 ,rega 
+776e 20407799 call bn_bigeq_256 
+776f 24610000 nrtn positive 
+7770 1a622200 copy regc ,rega 
+7771 2020777a branch sub_p2_256 
+
+bn_lshiftmod_p_256:
+7772 2040777a call sub_p2_256 
+7773 1a222600 copy rega ,regc 
+7774 1a20a3e0 increase -32 ,rega 
+7775 da4007e0 arg mem_p_256 ,regb 
+7776 20407799 call bn_bigeq_256 
+7777 24610000 nrtn positive 
+7778 1a622200 copy regc ,rega 
+7779 2020777a branch sub_p2_256 
+
+sub_p2_256:
+777a 1a20a3e0 increase -32 ,rega 
+777b da4007e0 arg mem_p_256 ,regb 
+777c 1a220a00 copy rega ,contw 
+777d 20207791 branch bn_sub_256 
+
+bn_submod_256:
+777e 20407791 call bn_sub_256 
+777f 2020f788 branch bn_submod_256_np ,true 
+7780 18a0a3e0 add contw ,-32 ,rega 
+7781 da4007e0 arg mem_p_256 ,regb 
+7782 20407799 call bn_bigeq_256 
+7783 24610000 nrtn positive 
+7784 da4007e0 arg mem_p_256 ,regb 
+7785 18a0a3e0 add contw ,-32 ,rega 
+7786 1a220a00 copy rega ,contw 
+7787 20207791 branch bn_sub_256 
+
+bn_submod_256_np:
+7788 18a0a3e0 add contw ,-32 ,rega 
+7789 da4007e0 arg mem_p_256 ,regb 
+778a 1a220a00 copy rega ,contw 
+778b 20407763 call bn_add_256 
+778c 20608000 rtn true 
+778d 18a0a3e0 add contw ,-32 ,rega 
+778e da4007e0 arg mem_p_256 ,regb 
+778f 1a220a00 copy rega ,contw 
+7790 20207763 branch bn_add_256 
+
+bn_sub_256:
+7791 18007208 force 8 ,loopcnt 
+7792 202070b0 branch bn_sub + 1 
+
+bn_rshift_256:
+7793 18007208 force 8 ,loopcnt 
+7794 1a20a21c increase 28 ,rega 
+7795 202070bf branch bn_rshift 
+
+bn_lshift_256:
+7796 18007208 force 8 ,loopcnt 
+7797 18002600 force 0 ,regc 
+7798 202070cd branch bn_lshift_0 
+
+bn_bigeq_256:
+7799 18007208 force 8 ,loopcnt 
+779a 1a20a21c increase 28 ,rega 
+779b 1a40a41c increase 28 ,regb 
+779c 20207097 branch bn_bigeq_0 
+
+bn_eq_zero_256:
+779d efe40006 ifetch 8 ,contr 
+779e 247a0000 nrtn blank 
+779f 20207085 branch bn_eq_zero 
+
+bn_rshifteven_256:
+77a0 1a226000 copy rega ,alarm 
+
+bn_rshifteven_256_1:
+77a1 1e022200 copy alarm ,rega 
+77a2 efe08011 ifetch 1 ,rega 
+77a3 2feffe00 isolate1 0 ,pdata 
+77a4 20608000 rtn true 
+77a5 20407793 call bn_rshift_256 
+77a6 efe08012 ifetch 1 ,regb 
+77a7 2fec0000 isolate0 0 ,pdata 
+77a8 2020f7b0 branch bn_rshifteven_256_0 ,true 
+77a9 da2007e0 arg mem_p_256 ,rega 
+77aa 1a420a00 copy regb ,contw 
+77ab 20407763 call bn_add_256 
+77ac efe08012 ifetch 1 ,regb 
+77ad 9a60fe00 iadd regc ,pdata 
+77ae e7e08012 istore 1 ,regb 
+77af 1a40a5e0 increase -32 ,regb 
+
+bn_rshifteven_256_0:
+77b0 1a40a220 add regb ,32 ,rega 
+77b1 18007209 force 9 ,loopcnt 
+77b2 204070bf call bn_rshift 
+77b3 202077a1 branch bn_rshifteven_256_1 
+
+ui_init:
+77b4 204015eb call lpm_disable_exen_output 
+77b5 20758000 rtn wake 
+77b6 204077bb call ui_button_init 
+77b7 20407861 call ui_timer_init 
+77b8 202077f0 branch ui_led_init_global 
+
+ui_dispatch:
+77b9 20407811 call ui_led_dispatch 
+77ba 20207850 branch ui_timer_check 
+
+ui_button_init:
+77bb 6fe0c790 fetch 1 ,mem_ui_button_gpio 
+77bc c17f8000 rtneq ui_button_gpio_disable 
+77bd 98000400 iforce temp 
+77be 20406069 call gpio_config_output 
+77bf 6848c790 fetcht 1 ,mem_ui_button_gpio 
+77c0 20406065 call gpio_out_inactive 
+77c1 20000064 nop 100 
+77c2 6848c790 fetcht 1 ,mem_ui_button_gpio 
+77c3 20406050 call gpio_config_input 
+77c4 202077c5 branch ui_button_polling 
+
+ui_button_polling:
+77c5 47434030 bpatchx patch30_6 ,mem_patch30 
+77c6 6fe0c790 fetch 1 ,mem_ui_button_gpio 
+77c7 c17f8000 rtneq ui_button_gpio_disable 
+77c8 1fe20400 copy pdata ,temp 
+77c9 20406059 call gpio_get_bit 
+77ca 2420f7d7 nbranch ui_button_up ,true 
+
+ui_button_down:
+77cb 204077e1 call ui_button_check_long_press 
+77cc 6fe1478c fetch 2 ,mem_ui_state_map 
+77cd 79207e0c set1 ui_state_btn_down ,pdata 
+77ce 67e1478c store 2 ,mem_ui_state_map 
+77cf 6fe0c783 fetch 1 ,mem_ui_button_last_state 
+77d0 c1000000 rtneq ui_button_state_down 
+77d1 70478300 jam ui_button_state_down ,mem_ui_button_last_state 
+77d2 6fe0c78f fetch 1 ,mem_ui_button_timeout 
+77d3 67e0c782 store 1 ,mem_ui_button_timer 
+77d4 204077e8 call lpm_button_get_wake_lock 
+77d5 70095b2c jam bt_evt_button_down ,mem_fifo_temp 
+77d6 20207871 branch ui_ipc_send_event 
+
+ui_button_up:
+77d7 6fe1478c fetch 2 ,mem_ui_state_map 
+77d8 793ffe0c set0 ui_state_btn_down ,pdata 
+77d9 67e1478c store 2 ,mem_ui_state_map 
+77da 6fe0c783 fetch 1 ,mem_ui_button_last_state 
+77db c1008000 rtneq ui_button_state_up 
+77dc 70478301 jam ui_button_state_up ,mem_ui_button_last_state 
+77dd 70478200 jam 0 ,mem_ui_button_timer 
+77de 204077ea call lpm_button_clean_wake_lock 
+77df 70095b2d jam bt_evt_button_up ,mem_fifo_temp 
+77e0 20207871 branch ui_ipc_send_event 
+
+ui_button_check_long_press:
+77e1 6fe0c782 fetch 1 ,mem_ui_button_timer 
+77e2 207a0000 rtn blank 
+77e3 1fe0ffff increase -1 ,pdata 
+77e4 67e0c782 store 1 ,mem_ui_button_timer 
+77e5 247a0000 nrtn blank 
+77e6 70095b10 jam bt_evt_button_long_pressed ,mem_fifo_temp 
+77e7 20207871 branch ui_ipc_send_event 
+
+lpm_button_get_wake_lock:
+77e8 d8e00007 arg wake_lock_button ,queue 
+77e9 202015ba branch lpm_get_wake_lock 
+
+lpm_button_clean_wake_lock:
+77ea d8e00007 arg wake_lock_button ,queue 
+77eb 202015be branch lpm_put_wake_lock 
+
+calc_curr_struct_prt:
+77ec 6fe1448d fetch 2 ,mem_ui_led_struct_ptr 
+77ed 1a2fa40b mul32 rega ,led_offset_length ,regb 
+77ee 9a40a400 iadd regb ,regb 
+77ef 20600000 rtn 
+
+ui_led_init_global:
+77f0 6fe0c48c fetch 1 ,mem_ui_led_struct_num 
+77f1 207a0000 rtn blank 
+77f2 1fe27200 copy pdata ,loopcnt 
+77f3 6fe1448d fetch 2 ,mem_ui_led_struct_ptr 
+77f4 1fe22400 copy pdata ,regb 
+
+ui_led_init_loop:
+77f5 1a40a602 add regb ,led_offset_led_gpio ,regc 
+77f6 e8408013 ifetcht 1 ,regc 
+77f7 20406069 call gpio_config_output 
+77f8 2040781a call ui_led_off_static 
+77f9 1a40a40b increase led_offset_length ,regb 
+77fa c20077f5 loop ui_led_init_loop 
+77fb 20600000 rtn 
+
+ui_led_on_global:
+77fc 204077ec call calc_curr_struct_prt 
+77fd 58000002 setarg ui_led_state_lighting 
+77fe e7e08012 istore 1 ,regb 
+77ff 2040784a call ui_led_stop_timer 
+7800 2020781f branch ui_led_on_static 
+
+ui_led_blink_stop_global:
+
+ui_led_off_global:
+7801 204077ec call calc_curr_struct_prt 
+7802 58000003 setarg ui_led_state_darking 
+7803 e7e08012 istore 1 ,regb 
+7804 2040784a call ui_led_stop_timer 
+7805 2020781a branch ui_led_off_static 
+
+ui_led_blink_start_global:
+7806 204077ec call calc_curr_struct_prt 
+7807 58000001 setarg ui_led_state_blink_start 
+7808 e7e08012 istore 1 ,regb 
+7809 580000ff setarg led_infinite_flash_num 
+780a e7e08005 istore 1 ,contw 
+780b 2020781a branch ui_led_off_static 
+
+ui_led_set_style_global:
+780c 204077ec call calc_curr_struct_prt 
+780d df20000b arg led_offset_length ,loopcnt 
+780e 1a620c00 copy regc ,contr 
+780f 1a420a00 copy regb ,contw 
+7810 20207d52 branch memcpy_fast 
+
+ui_led_dispatch:
+7811 6fe0c48c fetch 1 ,mem_ui_led_struct_num 
+7812 207a0000 rtn blank 
+7813 da200000 arg 0 ,rega 
+
+ui_led_blink_polling:
+7814 20407824 call ui_led_change_style_by_type 
+7815 1a20a201 increase 1 ,rega 
+7816 6fe0c48c fetch 1 ,mem_ui_led_struct_num 
+7817 9a267c00 isub rega ,null 
+7818 20628000 rtn zero 
+7819 20207814 branch ui_led_blink_polling 
+
+ui_led_off_static:
+781a 1a40a602 add regb ,led_offset_led_gpio ,regc 
+781b e8408013 ifetcht 1 ,regc 
+781c 6fe0c09a fetch 1 ,mem_device_option 
+781d c0044933 beq dvc_op_mouse ,mouse_ui_led_off_static 
+781e 20206065 branch gpio_out_inactive 
+
+ui_led_on_static:
+781f 1a40a602 add regb ,led_offset_led_gpio ,regc 
+7820 e8408013 ifetcht 1 ,regc 
+7821 6fe0c09a fetch 1 ,mem_device_option 
+7822 c004493f beq dvc_op_mouse ,mouse_ui_led_on_static 
+7823 20206069 branch gpio_out_active 
+
+ui_led_change_style_by_type:
+7824 1a208e0b add rega ,ui_led_blink ,queue 
+7825 20407d74 call timer_check 
+7826 247a0000 nrtn blank 
+7827 204077ec call calc_curr_struct_prt 
+7828 efe08012 ifetch 1 ,regb 
+7829 c001781f beq ui_led_state_lighting ,ui_led_on_static 
+782a c001f81a beq ui_led_state_darking ,ui_led_off_static 
+782b c000781a beq ui_led_state_blink_stop ,ui_led_off_static 
+782c c002f838 beq ui_led_state_blink_darking ,ui_led_blink_state_darking 
+
+ui_led_blink_state_lighting:
+782d 2040781f call ui_led_on_static 
+782e 1a40a607 add regb ,led_offset_cb_ledon ,regc 
+782f 20407cc8 call push_stack 
+7830 efe10013 ifetch 2 ,regc 
+7831 20407e05 call callback_func 
+7832 20407cd4 call pop_stack 
+7833 58000005 setarg ui_led_state_blink_darking 
+7834 e7e08012 istore 1 ,regb 
+7835 1a40a603 add regb ,led_offset_on_time ,regc 
+7836 efe10013 ifetch 2 ,regc 
+7837 20207848 branch ui_led_blink_timer_start 
+
+ui_led_blink_state_darking:
+7838 2040781a call ui_led_off_static 
+7839 1a40a609 add regb ,led_offset_cb_ledoff ,regc 
+783a 20407cc8 call push_stack 
+783b efe10013 ifetch 2 ,regc 
+783c 20407e05 call callback_func 
+783d 20407cd4 call pop_stack 
+783e 1a40a601 add regb ,led_offset_blink_count ,regc 
+783f efe08013 ifetch 1 ,regc 
+7840 c07ff844 beq led_infinite_flash_num ,ui_led_blink_infinite 
+7841 1fe0ffff increase -1 ,pdata 
+7842 e7e08013 istore 1 ,regc 
+7843 203a7801 branch ui_led_blink_stop_global ,blank 
+
+ui_led_blink_infinite:
+7844 58000004 setarg ui_led_state_blink_lighting 
+7845 e7e08012 istore 1 ,regb 
+7846 1a40a605 add regb ,led_offset_off_time ,regc 
+7847 efe10013 ifetch 2 ,regc 
+
+ui_led_blink_timer_start:
+7848 1a208e0b add rega ,ui_led_blink ,queue 
+7849 20207d66 branch timer_init 
+
+ui_led_stop_timer:
+784a 58000000 setarg 0 
+784b 20207848 branch ui_led_blink_timer_start 
+
+ui_timer_timeout:
+784c 58001000 setarg 0x1000 
+784d 1ff07e00 lshift16 pdata ,pdata 
+784e 9a40a400 iadd regb ,regb 
+784f 20600000 rtn 
+
+ui_timer_check:
+7850 4743c030 bpatchx patch30_7 ,mem_patch30 
+7851 da200000 arg 0 ,rega 
+7852 684a4784 fetcht 4 ,mem_ui_timer_last_btclk 
+7853 1c422400 copy clkn_bt ,regb 
+7854 1a427e00 copy regb ,pdata 
+7855 98467c00 isub temp ,null 
+7856 2441784c ncall ui_timer_timeout ,positive 
+
+ui_timer_check_loop:
+7857 1a427e00 copy regb ,pdata 
+7858 184084a0 increase 160 ,temp 
+7859 184084a0 increase 160 ,temp 
+785a 98467c00 isub temp ,null 
+785b 24217864 nbranch ui_timer_check_end ,positive 
+785c 1a20a201 increase 1 ,rega 
+785d 1a217e0f and rega ,0x0f ,pdata 
+785e 243a7857 nbranch ui_timer_check_loop ,blank 
+785f da200000 arg 0 ,rega 
+7860 2040786a call ui_timer_check_send_evt 
+
+ui_timer_init:
+7861 1c427e00 copy clkn_bt ,pdata 
+7862 67e24784 store 4 ,mem_ui_timer_last_btclk 
+7863 20600000 rtn 
+
+ui_timer_check_end:
+7864 1a227e00 copy rega ,pdata 
+7865 207a0000 rtn blank 
+7866 18408560 increase -160 ,temp 
+7867 18408560 increase -160 ,temp 
+7868 793f841c set0 28 ,temp 
+7869 604a4784 storet 4 ,mem_ui_timer_last_btclk 
+
+ui_timer_check_send_evt:
+786a 2020317b branch app_evt_timer 
+
+ui_ipc_get_lock:
+786b 70477001 jam 1 ,mem_ipc_lock_bt 
+
+ui_ipc_get_lock_wait:
+786c 6fe0c771 fetch 1 ,mem_ipc_lock_c51 
+786d 243a786c nbranch ui_ipc_get_lock_wait ,blank 
+786e 20600000 rtn 
+
+ui_ipc_put_lock:
+786f 70477000 jam 0 ,mem_ipc_lock_bt 
+7870 20600000 rtn 
+
+ui_ipc_send_event:
+7871 47444031 bpatchx patch31_0 ,mem_patch31 
+7872 2040786b call ui_ipc_get_lock 
+7873 1a227e00 copy rega ,pdata 
+7874 67e20953 store 4 ,mem_ipc_rega_temp 
+7875 da204772 arg mem_ipc_fifo_bt2c51 ,rega 
+7876 20407e25 call fifo_in 
+7877 6fe20953 fetch 4 ,mem_ipc_rega_temp 
+7878 1fe22200 copy pdata ,rega 
+7879 2020786f branch ui_ipc_put_lock 
+
+ui_ipc_send_cmd:
+787a 4744c031 bpatchx patch31_1 ,mem_patch31 
+787b 2040786b call ui_ipc_get_lock 
+787c 1a227e00 copy rega ,pdata 
+787d 67e20953 store 4 ,mem_ipc_rega_temp 
+787e da20477a arg mem_ipc_fifo_c512bt ,rega 
+787f 20407e25 call fifo_in 
+7880 6fe20953 fetch 4 ,mem_ipc_rega_temp 
+7881 1fe22200 copy pdata ,rega 
+7882 2020786f branch ui_ipc_put_lock 
+
+ui_ipc_clean_all_fifo:
+7883 58000000 setarg 0 
+7884 67e4477a store util_fifo_len ,mem_ipc_fifo_c512bt 
+7885 67e44772 store util_fifo_len ,mem_ipc_fifo_bt2c51 
+7886 20600000 rtn 
+
+check_51cmd:
+7887 47454031 bpatchx patch31_2 ,mem_patch31 
+7888 6fe0c1db fetch 1 ,mem_hci_cmd 
+7889 247a0000 nrtn blank 
+788a da20477a arg mem_ipc_fifo_c512bt ,rega 
+788b 20407e3d call fifo_is_empty 
+788c 207a0000 rtn blank 
+788d 70095200 jam ipc_continue_process ,mem_ipc_skip_continue_proc 
+788e 20407892 call check_51cmd_once 
+788f 6fe08952 fetch 1 ,mem_ipc_skip_continue_proc 
+7890 203a7887 branch check_51cmd ,blank 
+7891 20600000 rtn 
+
+check_51cmd_once:
+7892 2040786b call ui_ipc_get_lock 
+7893 da20477a arg mem_ipc_fifo_c512bt ,rega 
+7894 20407e31 call fifo_out 
+7895 1fe20400 copy pdata ,temp 
+7896 2040786f call ui_ipc_put_lock 
+7897 4745c031 bpatchx patch31_3 ,mem_patch31 
+7898 18427e00 copy temp ,pdata 
+7899 207a0000 rtn blank 
+789a c000f8c4 beq bt_cmd_start_discovery ,check_51cmd_start_discovery 
+789b c00178c9 beq bt_cmd_stop_discovery ,check_51cmd_stop_discovery 
+789c c001f8cf beq bt_cmd_reconnect ,check_51cmd_reconnect 
+789d c006f8ee beq bt_cmd_start_adv ,check_51cmd_adv 
+789e c00778f4 beq bt_cmd_stop_adv ,check_51cmd_stop_adv 
+789f c007f8f9 beq bt_cmd_start_direct_adv ,check_51cmd_direct_adv 
+78a0 c00878ff beq bt_cmd_stop_direct_adv ,check_51cmd_stop_direct_adv 
+78a1 c009f909 beq bt_cmd_led_off ,check_51cmd_led_off 
+78a2 c00a790b beq bt_cmd_led_on ,check_51cmd_led_on 
+78a3 c00af90d beq bt_cmd_led_blink ,check_51cmd_led_start_blink 
+78a4 c00b7917 beq bt_cmd_le_start_conn ,check_51cmd_le_start_con 
+78a5 c00bf91a beq bt_cmd_le_start_scan ,check_51cmd_start_scan 
+78a6 c00c791c beq bt_cmd_le_stop_scan ,check_51cmd_stop_scan 
+78a7 c00cf91f beq bt_cmd_enter_hibernate ,check_51cmd_hibernate 
+78a8 c00f7931 beq bt_cmd_bb_reconn_cancel ,check_51cmd_bb_reconn_cancel 
+78a9 67e0895b store 1 ,mem_fifo_temp 
+78aa 204059e1 call lmo_fifo_check 
+78ab 243a78c2 nbranch check_51cmd_restore ,blank 
+
+check_51cmd_once_continue:
+78ac 6fe0895b fetch 1 ,mem_fifo_temp 
+78ad c584f8bd bmark0 mark_context ,check_51cmd_check_idle 
+78ae 47464031 bpatchx patch31_4 ,mem_patch31 
+78af 6fe0895b fetch 1 ,mem_fifo_temp 
+78b0 c00278d1 beq bt_cmd_disconnect ,check_51cmd_disconnect 
+78b1 c002f8d4 beq bt_cmd_enter_sniff ,check_51cmd_enter_sniff 
+78b2 c00378df beq bt_cmd_exit_sniff ,check_51cmd_exit_sniff 
+78b3 c00578e1 beq bt_cmd_set_pin_code ,check_51cmd_pincode 
+78b4 c008f904 beq bt_cmd_le_disconnect ,check_51cmd_le_disconnect 
+78b5 c00df927 beq bt_cmd_le_smp_security_request ,check_51cmd_le_smp_sec_req 
+78b6 c0097908 beq bt_cmd_le_update_conn ,check_51cmd_ble_update_connect_param 
+78b7 c00ef928 beq bt_cmd_role_switch ,check_51cmd_role_switch 
+78b8 c00fe025 beq bt_cmd_store_reconn_info_le ,eeprom_store_le_reconn_info 
+78b9 c0106027 beq bt_cmd_store_reconn_info_bt ,eeprom_store_bd_reconn_info 
+78ba c010f933 beq bt_cmd_dhkey_not_accept ,check_51cmd_dhkey_not_accept 
+78bb c012df55 beq bt_cmd_store_reconn_info ,check_51cmd_store_reconn_info 
+78bc 20600000 rtn 
+
+check_51cmd_check_idle:
+78bd 67e0895b store 1 ,mem_fifo_temp 
+78be 20400a61 call context_check_idle 
+78bf 2022f8c2 branch check_51cmd_restore ,zero 
+78c0 20400a69 call context_search_plap 
+78c1 24628000 nrtn zero 
+
+check_51cmd_restore:
+78c2 70095201 jam ipc_skip_continue_process ,mem_ipc_skip_continue_proc 
+78c3 2020787a branch ui_ipc_send_cmd 
+
+check_51cmd_start_discovery:
+78c4 6fe1478c fetch 2 ,mem_ui_state_map 
+78c5 79207e06 set1 ui_state_bt_discovery ,pdata 
+78c6 67e1478c store 2 ,mem_ui_state_map 
+78c7 70409b03 jam 3 ,mem_scan_mode 
+78c8 20600000 rtn 
+
+check_51cmd_stop_discovery:
+78c9 70478a00 jam 0 ,mem_hid_handshake_timer_count 
+78ca 70409b00 jam 0 ,mem_scan_mode 
+78cb 6fe1478c fetch 2 ,mem_ui_state_map 
+78cc 793ffe06 set0 ui_state_bt_discovery ,pdata 
+78cd 67e1478c store 2 ,mem_ui_state_map 
+78ce 20600000 rtn 
+
+check_51cmd_reconnect:
+78cf 7041db05 jam hci_cmd_create_conn ,mem_hci_cmd 
+78d0 20600000 rtn 
+
+check_51cmd_disconnect:
+78d1 70007d07 jam lmp_detach ,mem_lmo_opcode2 
+78d2 70039e13 jam other_end_terminated ,mem_disconn_reason_send 
+78d3 20600000 rtn 
+
+check_51cmd_enter_sniff:
+78d4 70007d17 jam lmp_sniff_req ,mem_lmo_opcode2 
+78d5 d8a003ac arg mem_sniff_payload ,contw 
+78d6 58000000 setarg 0 
+78d7 2d0ffe1b isolate1 27 ,clke_bt 
+78d8 7920fe01 setflag true ,1 ,pdata 
+78d9 e7e08005 istore 1 ,contw 
+78da 58000000 setarg 0 
+78db e7e10005 istore 2 ,contw 
+78dc 6fe34455 fetch 6 ,mem_sniff_param_interval 
+78dd e7e30005 istore 6 ,contw 
+78de 20600000 rtn 
+
+check_51cmd_exit_sniff:
+78df 70007d18 jam lmp_unsniff_req ,mem_lmo_opcode2 
+78e0 20600000 rtn 
+
+check_51cmd_pincode:
+78e1 7003a802 jam pincode_state_pincode_ready ,mem_pincode_state 
+78e2 6fe0804c fetch 1 ,mem_op 
+78e3 c28178e7 bbit1 op_inrand_req ,check_51cmd_pincode_pair_passive 
+78e4 20405a14 call tid_initiate 
+78e5 70007d08 jam lmp_in_rand ,mem_lmo_opcode2 
+78e6 20600000 rtn 
+
+check_51cmd_pincode_pair_passive:
+78e7 793ffe02 set0 op_inrand_req ,pdata 
+78e8 67e0804c store 1 ,mem_op 
+78e9 204056f2 call lmp_accept_inrand 
+78ea 58000000 setarg 0 
+78eb 7934fe01 setflag master ,smap_lmptid ,pdata 
+78ec 67e08080 store 1 ,mem_lmo_tid2 
+78ed 20600000 rtn 
+
+check_51cmd_adv:
+78ee 70442701 jam on ,mem_le_adv_enable 
+78ef 70442a00 jam adv_ind ,mem_le_adv_type 
+78f0 6fe1478c fetch 2 ,mem_ui_state_map 
+78f1 79207e0b set1 ui_state_ble_adv ,pdata 
+78f2 67e1478c store 2 ,mem_ui_state_map 
+78f3 20600000 rtn 
+
+check_51cmd_stop_adv:
+78f4 6fe1478c fetch 2 ,mem_ui_state_map 
+78f5 793ffe0b set0 ui_state_ble_adv ,pdata 
+78f6 67e1478c store 2 ,mem_ui_state_map 
+78f7 70442700 jam off ,mem_le_adv_enable 
+78f8 20600000 rtn 
+
+check_51cmd_direct_adv:
+78f9 70442701 jam on ,mem_le_adv_enable 
+78fa 70442a01 jam adv_direct_ind ,mem_le_adv_type 
+78fb 6fe1478c fetch 2 ,mem_ui_state_map 
+78fc 79207e0b set1 ui_state_ble_adv ,pdata 
+78fd 67e1478c store 2 ,mem_ui_state_map 
+78fe 20600000 rtn 
+
+check_51cmd_stop_direct_adv:
+78ff 6fe1478c fetch 2 ,mem_ui_state_map 
+7900 793ffe0b set0 ui_state_ble_adv ,pdata 
+7901 67e1478c store 2 ,mem_ui_state_map 
+7902 70442700 jam off ,mem_le_adv_enable 
+7903 20600000 rtn 
+
+check_51cmd_le_disconnect:
+7904 58000014 setarg 20 
+7905 67e102b5 store 2 ,mem_le_superto 
+7906 67e14394 store 2 ,mem_le_init_superto 
+7907 20202187 branch le_send_terminate_ind_user_terminated 
+
+check_51cmd_ble_update_connect_param:
+7908 20201f57 branch le_l2cap_tx_update_req 
+
+check_51cmd_led_off:
+7909 da200000 arg 0 ,rega 
+790a 20207801 branch ui_led_off_global 
+
+check_51cmd_led_on:
+790b da200000 arg 0 ,rega 
+790c 202077fc branch ui_led_on_global 
+
+check_51cmd_led_start_blink:
+790d da200000 arg 0 ,rega 
+790e 204077ec call calc_curr_struct_prt 
+790f efe08012 ifetch 1 ,regb 
+7910 c000f914 beq ui_led_state_blink_start ,check_51cmd_led_start_blink_in_blink 
+7911 c0027914 beq ui_led_state_blink_lighting ,check_51cmd_led_start_blink_in_blink 
+7912 c002f914 beq ui_led_state_blink_darking ,check_51cmd_led_start_blink_in_blink 
+7913 20207806 branch ui_led_blink_start_global 
+
+check_51cmd_led_start_blink_in_blink:
+7914 efe08006 ifetch 1 ,contr 
+7915 c17f8000 rtneq led_infinite_flash_num 
+7916 20207806 branch ui_led_blink_start_global 
+
+check_51cmd_le_start_con:
+7917 7043e201 jam on ,mem_le_scan_enable 
+7918 7041db1b jam hci_cmd_le_create_conn ,mem_hci_cmd 
+7919 20600000 rtn 
+
+check_51cmd_start_scan:
+791a 7043e201 jam on ,mem_le_scan_enable 
+791b 20600000 rtn 
+
+check_51cmd_stop_scan:
+791c 7043e200 jam off ,mem_le_scan_enable 
+791d 7041db00 jam 0 ,mem_hci_cmd 
+791e 20600000 rtn 
+
+check_51cmd_hibernate:
+791f 6fe1445d fetch 2 ,mem_cb_before_hibernate 
+7920 20407e05 call callback_func 
+7921 6fe0c790 fetch 1 ,mem_ui_button_gpio 
+7922 c07ff925 beq ui_button_gpio_disable ,check_51cmd_hibernate_btn_disabled 
+7923 1fe20400 copy pdata ,temp 
+7924 20406050 call gpio_config_input 
+
+check_51cmd_hibernate_btn_disabled:
+7925 20407883 call ui_ipc_clean_all_fifo 
+7926 2020148c branch lpm_hibernate 
+
+check_51cmd_le_smp_sec_req:
+7927 20201f99 branch le_send_smp_security_request 
+
+check_51cmd_role_switch:
+7928 70007d34 jam lmp_slot_offset ,mem_lmo_opcode2 
+7929 79200003 set1 mark_switch_initiated ,mark 
+792a 24748000 nrtn master 
+792b 70464200 jam switch_flag_init ,mem_switch_flag 
+792c 70007d13 jam lmp_switch_req ,mem_lmo_opcode2 
+792d 6fe080bd fetch 1 ,mem_connection_options 
+792e 793ffe02 set0 connection_switch ,pdata 
+792f 67e080bd store 1 ,mem_connection_options 
+7930 20600000 rtn 
+
+check_51cmd_bb_reconn_cancel:
+7931 18000e03 force page_length_timer ,queue 
+7932 20207d65 branch timer_stop 
+
+check_51cmd_dhkey_not_accept:
+7933 20405a1d call tid_set_reply 
+7934 70007e41 jam lmp_dhkey_check ,mem_lmi_opcode2 
+7935 2020568e branch lmp_reject_pdu_not_allowed 
+
+ui_check_paring_button:
+7936 6fe0c78c fetch 1 ,mem_ui_state_map 
+7937 c4060000 rtnbit0 ui_state_btn_down 
+7938 c4038000 rtnbit0 ui_state_bt_reconnect 
+7939 20207931 branch check_51cmd_bb_reconn_cancel 
+
+queue_init:
+793a 6fe1448a fetch 2 ,mem_queue_ptr 
+793b 1fe08a02 add pdata ,queue_offset_curr_num ,contw 
+793c 58000000 setarg 0 
+793d e7e18005 istore 3 ,contw 
+793e 20600000 rtn 
+
+queue_push:
+793f 20407e56 call disable_user 
+7940 20407989 call queue_full 
+7941 207a0000 rtn blank 
+7942 6fe1448a fetch 2 ,mem_queue_ptr 
+7943 1fe0a402 add pdata ,queue_offset_curr_num ,regb 
+7944 e8408012 ifetcht 1 ,regb 
+7945 18408401 increase 1 ,temp 
+7946 e0408012 istoret 1 ,regb 
+7947 e840803f ifetcht 1 ,pdata 
+7948 18427200 copy temp ,loopcnt 
+7949 1fe0a404 add pdata ,queue_offset_write_ptr ,regb 
+794a efe08012 ifetch 1 ,regb 
+794b 984ffe00 imul32 temp ,pdata 
+794c 98c08a00 iadd contr ,contw 
+794d 1a220c00 copy rega ,contr 
+
+calc_queue_next_ptr:
+794e 20407d5f call memcpy 
+794f 2040798d call queue_get_size 
+7950 1fe0ffff pincrease -1 
+7951 e8408012 ifetcht 1 ,regb 
+7952 18408401 increase 1 ,temp 
+7953 98410400 iand temp ,temp 
+7954 e0408012 istoret 1 ,regb 
+7955 20207e54 branch enable_user 
+
+queue_pop:
+7956 20407e56 call disable_user 
+7957 20407985 call queue_empty 
+7958 207a0000 rtn blank 
+7959 6fe1448a fetch 2 ,mem_queue_ptr 
+795a 1fe0a402 add pdata ,queue_offset_curr_num ,regb 
+795b e8408012 ifetcht 1 ,regb 
+795c 184085ff increase -1 ,temp 
+795d e0408012 istoret 1 ,regb 
+795e e840803f ifetcht 1 ,pdata 
+795f 18427200 copy temp ,loopcnt 
+7960 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+7961 efe08012 ifetch 1 ,regb 
+7962 984ffe00 imul32 temp ,pdata 
+7963 98c08c00 iadd contr ,contr 
+7964 18c08c01 increase 1 ,contr 
+7965 1a220a00 copy rega ,contw 
+7966 2020794e branch calc_queue_next_ptr 
+
+queue_get_new_ele:
+7967 20407e56 call disable_user 
+7968 20407985 call queue_empty 
+7969 207a0000 rtn blank 
+796a 6fe1448a fetch 2 ,mem_queue_ptr 
+796b e840803f ifetcht 1 ,pdata 
+796c 18427200 copy temp ,loopcnt 
+796d 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+796e efe08012 ifetch 1 ,regb 
+796f 984ffe00 imul32 temp ,pdata 
+7970 98c08c00 iadd contr ,contr 
+7971 18c08c01 increase 1 ,contr 
+7972 18c22400 copy contr ,regb 
+7973 1a220a00 copy rega ,contw 
+7974 20407d5f call memcpy 
+7975 20207e54 branch enable_user 
+
+queue_store_new_ele:
+7976 20407e56 call disable_user 
+7977 20407985 call queue_empty 
+7978 207a0000 rtn blank 
+7979 6fe1448a fetch 2 ,mem_queue_ptr 
+797a e840803f ifetcht 1 ,pdata 
+797b 18427200 copy temp ,loopcnt 
+797c 1fe0a403 add pdata ,queue_offset_read_ptr ,regb 
+797d efe08012 ifetch 1 ,regb 
+797e 984ffe00 imul32 temp ,pdata 
+797f 98c08c00 iadd contr ,contr 
+7980 18c08a02 add contr ,2 ,contw 
+7981 1a220c00 copy rega ,contr 
+7982 1f20f3ff increase -1 ,loopcnt 
+7983 20407d5f call memcpy 
+7984 20207e54 branch enable_user 
+
+queue_empty:
+7985 6fe1448a fetch 2 ,mem_queue_ptr 
+7986 1fe08c02 add pdata ,queue_offset_curr_num ,contr 
+7987 efe08006 ifetch 1 ,contr 
+7988 20600000 rtn 
+
+queue_full:
+7989 2040798d call queue_get_size 
+798a e8408006 ifetcht 1 ,contr 
+798b 98467e00 isub temp ,pdata 
+798c 20600000 rtn 
+
+queue_get_size:
+798d 6fe1448a fetch 2 ,mem_queue_ptr 
+798e 1fe08c01 add pdata ,queue_offset_length ,contr 
+798f efe08006 ifetch 1 ,contr 
+7990 20600000 rtn 
+
+usb_isr:
+7991 4746c031 bpatchx patch31_5 ,mem_patch31 
+7992 6ff08c23 fetch 1 ,core_usb_status 
+7993 2feffe03 isolate1 usb_status_reset ,pdata 
+7994 2040f99d call usb_init ,true 
+7995 6ff08c23 fetch 1 ,core_usb_status 
+7996 67f08c23 store 1 ,core_usb_status 
+7997 67e089f6 store 1 ,mem_usb_status 
+7998 204079fd call usb_nak_state_judge 
+7999 20407a25 call usb_rx 
+799a 20407c0e call usb0_tx 
+799b 20407c56 call usb_tx 
+799c 202079f5 branch usb_nak_state 
+
+usb_init:
+799d 47474031 bpatchx patch31_6 ,mem_patch31 
+799e 20406df3 call enable_authrom 
+799f 204079bc call usb_init_param 
+79a0 708c0000 jam 0x00 ,core_usb_config 
+79a1 20002710 nop 10000 
+79a2 708c18c0 jam 0xc0 ,core_usb_trig 
+79a3 6ff10050 fetch 2 ,core_clkoff 
+79a4 793ffe0a set0 clock_off_usb ,pdata 
+79a5 67f10050 store 2 ,core_clkoff 
+79a6 708c1100 jam 0x0 ,core_usb_hmode 
+79a7 708c003c jam 0x3c ,core_usb_config 
+79a8 58000a4f setarg mem_usb_rxbuf 
+79a9 67f10c03 store 2 ,core_usb_rx_saddr 
+79aa 67f10c07 store 2 ,core_usb_rxptr 
+79ab 58000a8f setarg mem_usb_rxbuf_end 
+79ac 67f10c05 store 2 ,core_usb_rx_eaddr 
+79ad 708c1104 jam 0x4 ,core_usb_hmode 
+79ae 708c0200 jam 0 ,core_usb_addr 
+79af 708c23ff jam 0xff ,core_usb_status 
+79b0 58000c4b setarg mem_usb_clear_mem_end 
+79b1 d8a00b59 arg mem_usb_clear_mem_start ,contw 
+79b2 98a67200 isub contw ,loopcnt 
+79b3 20207d26 branch clear_mem 
+
+usb_offline_check_init:
+79b4 68488b58 fetcht 1 ,mem_usb_offline_check_gpio 
+79b5 20206050 branch gpio_config_input 
+
+usb_offline_state:
+79b6 6fe08bfa fetch 1 ,mem_usb_device_enumeration_endflag 
+79b7 207a0000 rtn blank 
+79b8 68488b58 fetcht 1 ,mem_usb_offline_check_gpio 
+79b9 20406059 call gpio_get_bit 
+79ba 2020f99d branch usb_init ,true 
+79bb 20600000 rtn 
+
+usb_init_param:
+79bc 700b5702 jam dev_default ,mem_usb0_state 
+79bd 58000000 setarg 0x0 
+79be 67e08a92 store 1 ,mem_remain 
+79bf 67e10b51 store 2 ,mem_usb_zero_packet 
+79c0 1fe0fe01 pincrease 1 
+79c1 67e10b53 store 2 ,mem_usb_ones_packet 
+79c2 1fe0fe01 pincrease 1 
+79c3 67e10b55 store 2 ,mem_usb_two_packet 
+79c4 d8a00ae6 arg mem_string0 ,contw 
+79c5 58030404 setarg 0x030404 
+79c6 e7e18005 istore 3 ,contw 
+79c7 58000409 setarg 0x0409 
+79c8 e7e10005 istore 2 ,contw 
+79c9 d8a00aeb arg mem_string1 ,contw 
+79ca 38015906 setsect 0 ,0x15906 
+79cb 380610d2 setsect 1 ,0x210d2 
+79cc 38090494 setsect 2 ,0x10494 
+79cd 380c0001 setsect 3 ,0x1 
+79ce e7e48005 istore 9 ,contw 
+79cf d8a00b09 arg mem_string2 ,contw 
+79d0 3801570f setsect 0 ,0x1570f 
+79d1 38055c9a setsect 1 ,0x15c9a 
+79d2 380a56c6 setsect 2 ,0x256c6 
+79d3 380dcdcd setsect 3 ,0x1cdcd 
+79d4 e7e48005 istore 9 ,contw 
+79d5 38014420 setsect 0 ,0x14420 
+79d6 38065d99 setsect 1 ,0x25d99 
+79d7 380a5636 setsect 2 ,0x25636 
+79d8 380c0001 setsect 3 ,0x1 
+79d9 e7e38005 istore 7 ,contw 
+79da d8a00b27 arg mem_string3 ,contw 
+79db 3801620a setsect 0 ,0x1620a 
+79dc 38040c8c setsect 1 ,0xc8c 
+79dd 380b0333 setsect 2 ,0x30333 
+79de 380cc0c0 setsect 3 ,0xc0c0 
+79df e7e48005 istore 9 ,contw 
+79e0 38003130 setsect 0 ,0x3130 
+79e1 e7e10005 istore 2 ,contw 
+79e2 580099a4 setarg usb_kbdata_vendor_define_addr 
+79e3 67e10a93 store 2 ,mem_hidreportdesc_kb 
+79e4 580099ff setarg usb_msdata_addr 
+79e5 67e10a95 store 2 ,mem_hidreportdesc_m 
+79e6 d8c09aa3 arg usb_devicedata_addr ,contr 
+79e7 d8a00a97 arg mem_devicedesc ,contw 
+79e8 df200013 arg 19 ,loopcnt 
+79e9 20407d5f call memcpy 
+79ea d8c09ab6 arg usb_confdata_addr ,contr 
+79eb d8a00aaa arg mem_confdesc ,contw 
+79ec df20003c arg 60 ,loopcnt 
+79ed 20407d5f call memcpy 
+
+usb_config_cb:
+79ee 6fe10b45 fetch 2 ,mem_cb_usb_config 
+79ef 20207e05 branch callback_func 
+
+usb_tx_interval_config:
+79f0 6fe08b47 fetch 1 ,mem_usb_tx_interval 
+79f1 207a0000 rtn blank 
+79f2 67e08acc store 1 ,mem_confdesc + 34 
+79f3 67e08ae5 store 1 ,mem_confdesc + 59 
+79f4 20600000 rtn 
+
+usb_nak_state:
+79f5 d8e00000 arg timer_nak ,queue 
+79f6 20407d74 call timer_check 
+79f7 247a0000 nrtn blank 
+79f8 6fe08bfb fetch 1 ,mem_usb_wakestate_onetime_flag 
+79f9 247a0000 nrtn blank 
+79fa 6fe08bfa fetch 1 ,mem_usb_device_enumeration_endflag 
+79fb 245a7cac ncall usb_mac_wakeup_judge ,blank 
+79fc 20600000 rtn 
+
+usb_nak_state_judge:
+79fd 6fe089f6 fetch 1 ,mem_usb_status 
+79fe c2817a00 bbit1 usb_status_nak ,usb_nak_state_timer_init 
+79ff 20600000 rtn 
+
+usb_nak_state_timer_init:
+7a00 20407a05 call usb0_attached_state_judge 
+7a01 20407d73 call timer_reinit 
+7a02 58000280 setarg timer_nak_delay 
+7a03 d8e00000 arg timer_nak ,queue 
+7a04 20207d66 branch timer_init 
+
+usb0_attached_state_judge:
+7a05 6fe08bec fetch 1 ,mem_usb_state 
+7a06 c0817a0a bne usb_connected ,usb_clear_halt_dispose 
+7a07 700bfb00 jam 0 ,mem_usb_wakestate_onetime_flag 
+7a08 700bfc00 jam 0 ,mem_usb_mac_wakeup_trig 
+7a09 20600000 rtn 
+
+usb_clear_halt_dispose:
+7a0a 6fe08bfe fetch 1 ,mem_usb_clear_halt 
+7a0b 207a0000 rtn blank 
+7a0c 700bfe00 jam 0 ,mem_usb_clear_halt 
+7a0d 700bec02 jam usb_connected ,mem_usb_state 
+7a0e 700bfa01 jam 1 ,mem_usb_device_enumeration_endflag 
+7a0f 20600000 rtn 
+
+usb_rx_no_data:
+7a10 6fe089f6 fetch 1 ,mem_usb_status 
+7a11 c2807a30 bbit1 usb_status_setup ,usb_class_type 
+7a12 20600000 rtn 
+
+usb_rx_data:
+7a13 6ff08c24 fetch 1 ,core_usb_txbusy 
+7a14 c3830000 rtnbit1 usb_status_rxempty 
+7a15 69510c03 fetchr contus ,2 ,core_usb_rx_saddr 
+7a16 6a110c05 fetchr contue ,2 ,core_usb_rx_eaddr 
+7a17 68710c07 fetchr contu ,2 ,core_usb_rxptr 
+7a18 efe10003 ifetch 2 ,contu 
+7a19 1fec8400 rshift8 pdata ,temp 
+7a1a 18518400 rshift4 temp ,temp 
+7a1b d8c00fff arg 0xfff ,contr 
+7a1c 98c17200 iand contr ,loopcnt 
+7a1d 1f222200 copy loopcnt ,rega 
+
+usb_rx_read:
+7a1e efe08003 ifetch 1 ,contu 
+7a1f e7e08005 istore 1 ,contw 
+7a20 c2007a1e loop usb_rx_read 
+7a21 60710c07 storer contu ,2 ,core_usb_rxptr 
+7a22 622109f8 storer rega ,2 ,mem_usb_read_len 
+7a23 20600000 rtn 
+
+usb_data_rx:
+7a24 20600000 rtn 
+
+usb_rx:
+7a25 4747c031 bpatchx patch31_7 ,mem_patch31 
+7a26 6fe089f6 fetch 1 ,mem_usb_status 
+7a27 c4028000 rtnbit0 usb_status_rxready 
+7a28 d8a00b59 arg mem_usb_setup ,contw 
+7a29 20407a13 call usb_rx_data 
+7a2a 18427e00 copy temp ,pdata 
+7a2b c0007a2d beq 0 ,usb0_rx 
+7a2c 20207a24 branch usb_data_rx 
+
+usb0_rx:
+7a2d 6fe089f8 fetch 1 ,mem_usb_read_len 
+7a2e 1fe67c07 sub pdata ,7 ,null 
+7a2f 20610000 rtn positive 
+
+usb_class_type:
+7a30 47484032 bpatchx patch32_0 ,mem_patch32 
+7a31 793f8023 set0 mark_isstr ,mark 
+7a32 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7a33 1fe17e80 and_into 0x80 ,pdata 
+7a34 c0407a37 beq in_device ,usb_in_device 
+7a35 c0007a3f beq out_device ,usb_out_device 
+7a36 2020137a branch assert 
+
+usb_in_device:
+7a37 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7a38 1ff1fe00 rshift4 pdata ,pdata 
+7a39 1fe37e00 rshift pdata ,pdata 
+7a3a 1fe17e03 and_into 0x03 ,pdata 
+7a3b c0007a47 beq standard_req ,usb_in_standard_req 
+7a3c c000fa4d beq class_req ,usb_in_class_req 
+7a3d c0017a52 beq manufacturer_req ,usb_in_manufacturer_req 
+7a3e 2020137a branch assert 
+
+usb_out_device:
+7a3f 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7a40 1ff1fe00 rshift4 pdata ,pdata 
+7a41 1fe37e00 rshift pdata ,pdata 
+7a42 1fe17e03 and_into 0x03 ,pdata 
+7a43 c0007a53 beq standard_req ,usb_out_standard_req 
+7a44 c000fa5b beq class_req ,usb_out_class_req 
+7a45 c0017a60 beq manufacturer_req ,usb_out_manufacturer_req 
+7a46 2020137a branch assert 
+
+usb_in_standard_req:
+7a47 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7a48 c0047a67 beq get_configuration ,usb0_request_get_configuration 
+7a49 c0037a7d beq get_descriptor ,usb0_request_get_descriptor 
+7a4a c0057ac2 beq get_interface ,usb0_request_get_interface 
+7a4b c0007ad4 beq get_status ,usb0_request_get_status 
+7a4c 20207a61 branch usb0_force_stall 
+
+usb_in_class_req:
+7a4d 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7a4e c0017b09 beq get_idle ,usb_get_idle 
+7a4f c000fb0d beq get_report ,usb_get_report 
+7a50 c001fb1e beq get_protocol ,usb_get_protocol_req 
+7a51 20207a61 branch usb0_force_stall 
+
+usb_in_manufacturer_req:
+7a52 20207a61 branch usb0_force_stall 
+
+usb_out_standard_req:
+7a53 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7a54 c000fb28 beq clear_feature ,usb0_request_clear_feature 
+7a55 c001fb57 beq set_feature ,usb0_request_set_feature 
+7a56 c002fb81 beq set_address ,usb0_request_set_address 
+7a57 c004fb9a beq set_configuration ,usb0_request_set_configuration 
+7a58 c005fbb5 beq set_interface ,usb0_request_set_interface 
+7a59 c003fa61 beq set_descriptor ,usb0_force_stall 
+7a5a 20207a61 branch usb0_force_stall 
+
+usb_out_class_req:
+7a5b 6fe08b5a fetch 1 ,mem_usb_setup_brequest 
+7a5c c0057bc6 beq set_idle ,usb_set_idle 
+7a5d c004fbd8 beq set_report ,usb_set_report 
+7a5e c005fbf5 beq set_protocol ,usb_set_protocol_req 
+7a5f 20207a61 branch usb0_force_stall 
+
+usb_out_manufacturer_req:
+7a60 20207a61 branch usb0_force_stall 
+
+usb0_force_stall:
+7a61 6ff08c19 fetch 1 ,core_usb_stall 
+7a62 79207e00 set1 0 ,pdata 
+7a63 67f08c19 store 1 ,core_usb_stall 
+7a64 20207a65 branch usb0_reply_zerolen 
+
+usb0_reply_zerolen:
+7a65 708c1810 jam 0x10 ,core_usb_trig 
+7a66 20600000 rtn 
+
+usb0_request_get_configuration:
+7a67 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7a68 c0c07a61 bne in_device ,usb0_force_stall 
+7a69 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7a6a c0807a61 bne 0 ,usb0_force_stall 
+7a6b 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7a6c c0807a61 bne 0 ,usb0_force_stall 
+7a6d 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7a6e c080fa61 bne 1 ,usb0_force_stall 
+7a6f 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7a70 c0807a61 bne 0 ,usb0_force_stall 
+7a71 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7a72 c0807a61 bne 0 ,usb0_force_stall 
+7a73 6fe08b5c fetch 1 ,mem_usb_setup_bvalue + 1 
+7a74 c0807a61 bne 0 ,usb0_force_stall 
+7a75 6fe08b57 fetch 1 ,mem_usb0_state 
+7a76 c0027a79 beq dev_configured ,usb0_request_get_cfg_dev_cfg 
+7a77 c001fa7b beq dev_address ,usb0_request_get_cfg_dev_addr 
+7a78 20207a61 branch usb0_force_stall 
+
+usb0_request_get_cfg_dev_cfg:
+7a79 da400001 arg 1 ,regb 
+7a7a 20207aee branch usb_send_ones_packet 
+
+usb0_request_get_cfg_dev_addr:
+7a7b da400001 arg 1 ,regb 
+7a7c 20207aec branch usb_send_zero_packet 
+
+usb0_request_get_descriptor:
+7a7d 4748c032 bpatchx patch32_1 ,mem_patch32 
+7a7e 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7a7f c000fa90 beq dsc_device ,dsc_device_info 
+7a80 c0017aa9 beq dsc_config ,dsc_config_info 
+7a81 c001faac beq dsc_string ,dsc_string_info 
+7a82 c010fa85 beq dsc_hid ,dsc_hid_info 
+7a83 c0117aba beq dsc_hid_report ,dsc_hid_report_info 
+7a84 20207a61 branch usb0_force_stall 
+
+dsc_hid_info:
+7a85 700be900 jam 0 ,mem_usb_get_protocol_flag 
+7a86 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7a87 c0007a8a beq 0 ,dsc_hid_info_interface0 
+7a88 c000fa8d beq 1 ,dsc_hid_info_interface1 
+7a89 20207a61 branch usb0_force_stall 
+
+dsc_hid_info_interface0:
+7a8a 6a408abd fetchr regb ,1 ,mem_confdesc + 19 
+7a8b da200abd arg mem_confdesc + 19 ,rega 
+7a8c 20207c04 branch usb0_respond 
+
+dsc_hid_info_interface1:
+7a8d 6a408ad6 fetchr regb ,1 ,mem_confdesc + 44 
+7a8e da200ad6 arg mem_confdesc + 44 ,rega 
+7a8f 20207c04 branch usb0_respond 
+
+dsc_device_info:
+7a90 6fe08bfd fetch 1 ,mem_usb_set_high_addr_flag 
+7a91 245a7aa1 ncall usb_set_high_addr ,blank 
+7a92 58000a97 setarg mem_devicedesc 
+7a93 68488a97 fetcht 1 ,mem_devicedesc 
+
+dsc_info_set_data_len:
+7a94 67e10bf4 store 2 ,mem_dsc_info_data_pointer 
+7a95 60488bf6 storet 1 ,mem_dsc_info_len 
+7a96 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7a97 98467c00 isub temp ,null 
+7a98 24217a9f nbranch dsc_info_set_current_data_len ,positive 
+
+dsc_info_set_initial_data_len:
+7a99 6fe08bf6 fetch 1 ,mem_dsc_info_len 
+
+dsc_info_set_data_size_completed:
+7a9a 98002400 iforce regb 
+7a9b 6fe10bf4 fetch 2 ,mem_dsc_info_data_pointer 
+7a9c 1fe0fe01 add pdata ,1 ,pdata 
+7a9d 98002200 iforce rega 
+7a9e 20207c04 branch usb0_respond 
+
+dsc_info_set_current_data_len:
+7a9f 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7aa0 20207a9a branch dsc_info_set_data_size_completed 
+
+usb_set_high_addr:
+7aa1 6ff08c02 fetch 1 ,core_usb_addr 
+7aa2 245a7aa5 ncall usb0_set_addr ,blank 
+7aa3 700bfd00 jam 0 ,mem_usb_set_high_addr_flag 
+7aa4 20600000 rtn 
+
+usb0_set_addr:
+7aa5 6ff08c02 fetch 1 ,core_usb_addr 
+7aa6 79207e07 set1 7 ,pdata 
+7aa7 67f08c02 store 1 ,core_usb_addr 
+7aa8 20600000 rtn 
+
+dsc_config_info:
+7aa9 58000aaa setarg mem_confdesc 
+7aaa 68488aaa fetcht 1 ,mem_confdesc 
+7aab 20207a94 branch dsc_info_set_data_len 
+
+dsc_string_info:
+7aac 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7aad 1fe67c03 sub pdata ,3 ,null 
+7aae 24217a61 nbranch usb0_force_stall ,positive 
+7aaf 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7ab0 da200ae6 arg mem_string0 ,rega 
+7ab1 c0007c02 beq 0 ,usb0_respond_length 
+7ab2 79200023 set1 mark_isstr ,mark 
+7ab3 da200aeb arg mem_string1 ,rega 
+7ab4 c000fc02 beq 1 ,usb0_respond_length 
+7ab5 da200b09 arg mem_string2 ,rega 
+7ab6 c0017c02 beq 2 ,usb0_respond_length 
+7ab7 da200b27 arg mem_string3 ,rega 
+7ab8 c001fc02 beq 3 ,usb0_respond_length 
+7ab9 20600000 rtn 
+
+dsc_hid_report_info:
+7aba 6fe10b5d fetch 2 ,mem_usb_setup_windex 
+7abb c000fabe beq 1 ,dsc_hid_report_info0 
+7abc 6a210a93 fetchr rega ,2 ,mem_hidreportdesc_kb 
+7abd 20207c02 branch usb0_respond_length 
+
+dsc_hid_report_info0:
+7abe 700bfa01 jam 1 ,mem_usb_device_enumeration_endflag 
+7abf 700bec01 jam usb_got_report_req ,mem_usb_state 
+7ac0 6a210a95 fetchr rega ,2 ,mem_hidreportdesc_m 
+7ac1 20207c02 branch usb0_respond_length 
+
+usb0_request_get_interface:
+7ac2 6fe08b57 fetch 1 ,mem_usb0_state 
+7ac3 c0827a61 bne dev_configured ,usb0_force_stall 
+7ac4 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7ac5 c0c0fa61 bne in_interface ,usb0_force_stall 
+7ac6 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7ac7 c0807a61 bne 0 ,usb0_force_stall 
+7ac8 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7ac9 c0807a61 bne 0 ,usb0_force_stall 
+7aca 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7acb c080fa61 bne 1 ,usb0_force_stall 
+7acc 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7acd c0807a61 bne 0 ,usb0_force_stall 
+7ace 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7acf c0807a61 bne 0 ,usb0_force_stall 
+7ad0 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7ad1 c0807a61 bne 0 ,usb0_force_stall 
+7ad2 da400001 arg 1 ,regb 
+7ad3 20207aec branch usb_send_zero_packet 
+
+usb0_request_get_status:
+7ad4 6fe08b57 fetch 1 ,mem_usb0_state 
+7ad5 c0017a61 beq dev_default ,usb0_force_stall 
+7ad6 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7ad7 c0807a61 bne 0 ,usb0_force_stall 
+7ad8 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7ad9 c0807a61 bne 0 ,usb0_force_stall 
+7ada 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7adb c0817a61 bne 2 ,usb0_force_stall 
+7adc 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7add c0807a61 bne 0 ,usb0_force_stall 
+7ade 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7adf c0807a61 bne 0 ,usb0_force_stall 
+7ae0 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7ae1 c0407ae7 beq in_device ,usb0_get_status_in_device 
+7ae2 c040faf2 beq in_interface ,usb0_get_status_in_interface 
+7ae3 c0417af6 beq in_endpoint ,usb0_get_status_in_endpoint 
+7ae4 20207a61 branch usb0_force_stall 
+
+usb0_sdsystem_dispose:
+7ae5 700bef01 jam 1 ,mem_sdsystem_wakeup_flag 
+7ae6 20207af0 branch usb_send_two_packet 
+
+usb0_get_status_in_device:
+7ae7 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7ae8 c0807a61 bne 0 ,usb0_force_stall 
+7ae9 da400002 arg 2 ,regb 
+7aea 6fe08bed fetch 1 ,mem_usb_remote_wakeup 
+7aeb c000fae5 beq 0x01 ,usb0_sdsystem_dispose 
+
+usb_send_zero_packet:
+7aec da200b51 arg mem_usb_zero_packet ,rega 
+7aed 20207c04 branch usb0_respond 
+
+usb_send_ones_packet:
+7aee da200b53 arg mem_usb_ones_packet ,rega 
+7aef 20207c04 branch usb0_respond 
+
+usb_send_two_packet:
+7af0 da200b55 arg mem_usb_two_packet ,rega 
+7af1 20207c04 branch usb0_respond 
+
+usb0_get_status_in_interface:
+7af2 6fe08b57 fetch 1 ,mem_usb0_state 
+7af3 c0827a61 bne dev_configured ,usb0_force_stall 
+7af4 da400002 arg 2 ,regb 
+7af5 20207aec branch usb_send_zero_packet 
+
+usb0_get_status_in_endpoint:
+7af6 6fe08b57 fetch 1 ,mem_usb0_state 
+7af7 c0827a61 bne dev_configured ,usb0_force_stall 
+7af8 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7af9 c040fb03 beq in_ep1 ,usb0_get_status_in_ep_in_ep1 
+7afa c0417b05 beq in_ep2 ,usb0_get_status_in_ep_in_ep2 
+7afb c041fb07 beq in_ep3 ,usb0_get_status_in_ep_in_ep3 
+7afc 1fe17e7f and_into 0x7f ,pdata 
+7afd c0007aff beq 0x00 ,usb0_get_status_in_ep_in_ep0 
+7afe 20207a61 branch usb0_force_stall 
+
+usb0_get_status_in_ep_in_ep0:
+7aff 6fe08bf0 fetch 1 ,mem_usb_ep0_stall_status 
+
+usb0_get_status_in_ep_in_ack:
+7b00 da400002 arg 2 ,regb 
+7b01 c000faee beq 1 ,usb_send_ones_packet 
+7b02 20207aec branch usb_send_zero_packet 
+
+usb0_get_status_in_ep_in_ep1:
+7b03 6fe08bf1 fetch 1 ,mem_usb_ep1_stall_status 
+7b04 20207b00 branch usb0_get_status_in_ep_in_ack 
+
+usb0_get_status_in_ep_in_ep2:
+7b05 6fe08bf2 fetch 1 ,mem_usb_ep2_stall_status 
+7b06 20207b00 branch usb0_get_status_in_ep_in_ack 
+
+usb0_get_status_in_ep_in_ep3:
+7b07 6fe08bf3 fetch 1 ,mem_usb_ep3_stall_status 
+7b08 20207b00 branch usb0_get_status_in_ep_in_ack 
+
+usb_get_idle:
+7b09 700be701 jam 1 ,mem_usb_idle_flag 
+7b0a da200be8 arg mem_usb_idle_rate ,rega 
+7b0b da400001 arg 1 ,regb 
+7b0c 20207c04 branch usb0_respond 
+
+usb_get_report:
+7b0d 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+7b0e d84001ba arg pc_get_report ,temp 
+7b0f 98467c00 isub temp ,null 
+7b10 2422fa61 nbranch usb0_force_stall ,zero 
+
+usb_get_report_dispose:
+7b11 6fe08be4 fetch 1 ,mem_usb0_data_ready_report 
+7b12 243a7b1b nbranch usb_get_report_data_success ,blank 
+7b13 700ba100 jam pc_get_nondata ,mem_usb0_get_report_data 
+
+usb_get_report_send_data:
+7b14 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b15 98002400 iforce regb 
+7b16 da200ba1 arg mem_usb0_get_report_data ,rega 
+7b17 20407c04 call usb0_respond 
+
+usb_get_report_data_release:
+7b18 d8a00ba1 arg mem_usb0_get_report_data ,contw 
+7b19 df200008 arg 8 ,loopcnt 
+7b1a 20207d17 branch memset0 
+
+usb_get_report_data_success:
+7b1b 700be400 jam 0 ,mem_usb0_data_ready_report 
+7b1c 700ba101 jam pc_get_data ,mem_usb0_get_report_data 
+7b1d 20207b14 branch usb_get_report_send_data 
+
+usb_get_protocol_req:
+7b1e 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b1f c080fa61 bne 1 ,usb0_force_stall 
+7b20 700be901 jam 1 ,mem_usb_get_protocol_flag 
+7b21 da400001 arg 1 ,regb 
+7b22 6fe08beb fetch 1 ,mem_usb_set_protocol_value 
+7b23 c0007b26 beq 0 ,usb_get_report_protocol 
+7b24 c000fb27 beq 1 ,usb_get_boot_protocol 
+7b25 20207aec branch usb_send_zero_packet 
+
+usb_get_report_protocol:
+7b26 20207aee branch usb_send_ones_packet 
+
+usb_get_boot_protocol:
+7b27 20207aec branch usb_send_zero_packet 
+
+usb0_request_clear_feature:
+7b28 6fe08b57 fetch 1 ,mem_usb0_state 
+7b29 c0827a61 bne dev_configured ,usb0_force_stall 
+7b2a 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b2b c0807a61 bne 0 ,usb0_force_stall 
+7b2c 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7b2d c0807a61 bne 0 ,usb0_force_stall 
+7b2e 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7b2f c0807a61 bne 0 ,usb0_force_stall 
+7b30 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7b31 c0807a61 bne 0 ,usb0_force_stall 
+7b32 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7b33 c0007b37 beq out_device ,usb0_request_clear_feature_out_device 
+7b34 c000fb44 beq out_interface ,usb0_request_clear_feature_out_interface 
+7b35 c0017b45 beq out_endpoint ,usb0_request_clear_feature_out_endpoint 
+7b36 20207a61 branch usb0_force_stall 
+
+usb0_request_clear_feature_out_device:
+7b37 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b38 c080fa61 bne device_remote_wakeup ,usb0_force_stall 
+7b39 6ff08c00 fetch 1 ,core_usb_config 
+7b3a 793ffe07 set0 7 ,pdata 
+7b3b 67f08c00 store 1 ,core_usb_config 
+7b3c 700bed00 jam 0 ,mem_usb_remote_wakeup 
+7b3d 700bee01 jam 1 ,mem_usb_clear_remote_wakeup 
+7b3e 6fe08bef fetch 1 ,mem_sdsystem_wakeup_flag 
+7b3f 203a7a65 branch usb0_reply_zerolen ,blank 
+7b40 700bef00 jam 0 ,mem_sdsystem_wakeup_flag 
+7b41 700bee00 jam 0 ,mem_usb_clear_remote_wakeup 
+7b42 700bec02 jam usb_connected ,mem_usb_state 
+7b43 20207a65 branch usb0_reply_zerolen 
+
+usb0_request_clear_feature_out_interface:
+7b44 20207a61 branch usb0_force_stall 
+
+usb0_request_clear_feature_out_endpoint:
+7b45 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b46 c0807a61 bne endpoint_halt ,usb0_force_stall 
+7b47 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7b48 c040fb50 beq in_ep1 ,usb0_force_stall_ep1_in_off 
+7b49 c0417b53 beq in_ep2 ,usb0_force_stall_ep2_in_off 
+7b4a c041fb55 beq in_ep3 ,usb0_force_stall_ep3_in_off 
+7b4b 1fe17e7f and_into 0x7f ,pdata 
+7b4c c0007b4e beq 0x00 ,usb0_force_stall_ep0_in_off 
+7b4d 20207a61 branch usb0_force_stall 
+
+usb0_force_stall_ep0_in_off:
+7b4e 700bf000 jam 0 ,mem_usb_ep0_stall_status 
+7b4f 20207a65 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep1_in_off:
+7b50 700bf100 jam 0 ,mem_usb_ep1_stall_status 
+
+usb0_force_stall_ep1_in_off_reply:
+7b51 700bfe01 jam 1 ,mem_usb_clear_halt 
+7b52 20207a65 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep2_in_off:
+7b53 700bf200 jam 0 ,mem_usb_ep2_stall_status 
+7b54 20207b51 branch usb0_force_stall_ep1_in_off_reply 
+
+usb0_force_stall_ep3_in_off:
+7b55 700bf300 jam 0 ,mem_usb_ep3_stall_status 
+7b56 20207b51 branch usb0_force_stall_ep1_in_off_reply 
+
+usb0_request_set_feature:
+7b57 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b58 c0807a61 bne 0 ,usb0_force_stall 
+7b59 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7b5a c0807a61 bne 0 ,usb0_force_stall 
+7b5b 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7b5c c0007b60 beq out_device ,usb0_request_set_feature_out_device 
+7b5d c000fb6d beq out_interface ,usb0_request_set_feature_out_interface 
+7b5e c0017b6e beq out_endpoint ,usb0_request_set_feature_out_endpoint 
+7b5f 20207a61 branch usb0_force_stall 
+
+usb0_request_set_feature_out_device:
+7b60 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b61 c080fa61 bne device_remote_wakeup ,usb0_force_stall 
+7b62 6ff08c00 fetch 1 ,core_usb_config 
+7b63 79207e07 set1 7 ,pdata 
+7b64 67f08c00 store 1 ,core_usb_config 
+7b65 700bed01 jam 1 ,mem_usb_remote_wakeup 
+7b66 700bec03 jam usb_sleep ,mem_usb_state 
+7b67 700be500 jam 0 ,mem_usb_tx_win_enable 
+7b68 20407a65 call usb0_reply_zerolen 
+
+usb_wakeup_timer_reinit:
+7b69 20407d73 call timer_reinit 
+7b6a 58001388 setarg timer_wakeup_delay 
+7b6b d8e0000f arg timer_wakeup ,queue 
+7b6c 20207d66 branch timer_init 
+
+usb0_request_set_feature_out_interface:
+7b6d 20207a61 branch usb0_force_stall 
+
+usb0_request_set_feature_out_endpoint:
+7b6e 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b6f c0807a61 bne endpoint_halt ,usb0_force_stall 
+7b70 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7b71 c0807a61 bne 0 ,usb0_force_stall 
+7b72 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7b73 c040fb7b beq in_ep1 ,usb0_force_stall_ep1_in_on 
+7b74 c0417b7d beq in_ep2 ,usb0_force_stall_ep2_in_on 
+7b75 c041fb7f beq in_ep3 ,usb0_force_stall_ep3_in_on 
+7b76 1fe17e7f and_into 0x7f ,pdata 
+7b77 c0007b79 beq 0x00 ,usb0_force_stall_ep0_in_on 
+7b78 20207a61 branch usb0_force_stall 
+
+usb0_force_stall_ep0_in_on:
+7b79 700bf001 jam 1 ,mem_usb_ep0_stall_status 
+7b7a 20207a65 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep1_in_on:
+7b7b 700bf101 jam 1 ,mem_usb_ep1_stall_status 
+7b7c 20207a65 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep2_in_on:
+7b7d 700bf201 jam 1 ,mem_usb_ep2_stall_status 
+7b7e 20207a65 branch usb0_reply_zerolen 
+
+usb0_force_stall_ep3_in_on:
+7b7f 700bf301 jam 1 ,mem_usb_ep3_stall_status 
+7b80 20207a65 branch usb0_reply_zerolen 
+
+usb0_request_set_address:
+7b81 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7b82 c0807a61 bne out_device ,usb0_force_stall 
+7b83 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7b84 c0807a61 bne 0 ,usb0_force_stall 
+7b85 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7b86 c0807a61 bne 0 ,usb0_force_stall 
+7b87 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7b88 c0807a61 bne 0 ,usb0_force_stall 
+7b89 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7b8a c0807a61 bne 0 ,usb0_force_stall 
+7b8b 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7b8c c0807a61 bne 0 ,usb0_force_stall 
+7b8d 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b8e 1fe17e80 and_into 0x80 ,pdata 
+7b8f c0807a61 bne 0 ,usb0_force_stall 
+7b90 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b91 c0807b98 bne 0 ,usb_usb0_state_set_dev_addr 
+
+usb_usb0_state_set_dev_default:
+7b92 700b5702 jam dev_default ,mem_usb0_state 
+
+usb0_request_set_wait_address:
+7b93 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7b94 67f08c02 store 1 ,core_usb_addr 
+7b95 20407a65 call usb0_reply_zerolen 
+7b96 700bfd01 jam 1 ,mem_usb_set_high_addr_flag 
+7b97 20600000 rtn 
+
+usb_usb0_state_set_dev_addr:
+7b98 700b5703 jam dev_address ,mem_usb0_state 
+7b99 20207b93 branch usb0_request_set_wait_address 
+
+usb0_request_set_configuration:
+7b9a 6fe08b57 fetch 1 ,mem_usb0_state 
+7b9b c0017a61 beq dev_default ,usb0_force_stall 
+7b9c 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7b9d c0807a61 bne out_device ,usb0_force_stall 
+7b9e 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7b9f c0807a61 bne 0 ,usb0_force_stall 
+7ba0 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7ba1 c0807a61 bne 0 ,usb0_force_stall 
+7ba2 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7ba3 c0807a61 bne 0 ,usb0_force_stall 
+7ba4 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7ba5 c0807a61 bne 0 ,usb0_force_stall 
+7ba6 6fe08b5c fetch 1 ,mem_usb_setup_bvalue + 1 
+7ba7 c0807a61 bne 0 ,usb0_force_stall 
+7ba8 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7ba9 1fe67c01 sub pdata ,usb_max_num_cfg ,null 
+7baa 24217a61 nbranch usb0_force_stall ,positive 
+7bab 6fe08b57 fetch 1 ,mem_usb0_state 
+7bac c001fbaf beq dev_address ,usb0_request_set_cfg_addr_state 
+7bad c0027baf beq dev_configured ,usb0_request_set_cfg_cfg_state 
+7bae 20207a61 branch usb0_force_stall 
+
+usb0_request_set_cfg_addr_state:
+
+usb0_request_set_cfg_cfg_state:
+7baf 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7bb0 c0007bb3 beq 0 ,usb0_request_set_cfg_stay_addr_state 
+7bb1 700b5704 jam dev_configured ,mem_usb0_state 
+7bb2 20207a65 branch usb0_reply_zerolen 
+
+usb0_request_set_cfg_stay_addr_state:
+7bb3 700b5703 jam dev_address ,mem_usb0_state 
+7bb4 20207a65 branch usb0_reply_zerolen 
+
+usb0_request_set_interface:
+7bb5 6fe08b57 fetch 1 ,mem_usb0_state 
+7bb6 c0827a61 bne dev_configured ,usb0_force_stall 
+7bb7 6fe08b59 fetch 1 ,mem_usb_setup_bmrequesttype 
+7bb8 c080fa61 bne out_interface ,usb0_force_stall 
+7bb9 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7bba c0807a61 bne 0 ,usb0_force_stall 
+7bbb 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7bbc c0807a61 bne 0 ,usb0_force_stall 
+7bbd 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7bbe c0807a61 bne 0 ,usb0_force_stall 
+7bbf 6fe08b60 fetch 1 ,mem_usb_setup_blengthh 
+7bc0 c0807a61 bne 0 ,usb0_force_stall 
+7bc1 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7bc2 c0807a61 bne 0 ,usb0_force_stall 
+7bc3 6fe08b5e fetch 1 ,mem_usb_setup_windex + 1 
+7bc4 c0807a61 bne 0 ,usb0_force_stall 
+7bc5 20207a65 branch usb0_reply_zerolen 
+
+usb_set_idle:
+7bc6 47494032 bpatchx patch32_2 ,mem_patch32 
+7bc7 700be701 jam 1 ,mem_usb_idle_flag 
+7bc8 6fe08b5c fetch 1 ,mem_usb_setup_bvalueh 
+7bc9 67e08be8 store 1 ,mem_usb_idle_rate 
+7bca 6fe08b5d fetch 1 ,mem_usb_setup_windex 
+7bcb 1fe67c01 sub pdata ,1 ,null 
+7bcc 2042fbd4 call usb_clear_remote_wakeup_set0 ,zero 
+7bcd 6fe08bec fetch 1 ,mem_usb_state 
+7bce c0827a65 bne usb_resume ,usb0_reply_zerolen 
+7bcf 700bec02 jam usb_connected ,mem_usb_state 
+7bd0 20407a65 call usb0_reply_zerolen 
+7bd1 20007530 nop 30000 
+7bd2 20007530 nop 30000 
+7bd3 20600000 rtn 
+
+usb_clear_remote_wakeup_set0:
+7bd4 700bfa01 jam 1 ,mem_usb_device_enumeration_endflag 
+7bd5 700bee00 jam 0 ,mem_usb_clear_remote_wakeup 
+7bd6 700bec04 jam usb_resume ,mem_usb_state 
+7bd7 20600000 rtn 
+
+usb_set_report:
+7bd8 d8a00b61 arg mem_usb0_set_report_data ,contw 
+7bd9 20407a13 call usb_rx_data 
+7bda 700be301 jam 1 ,mem_usb0_get_set_report 
+7bdb 20407be7 call usb_set_report_resume_judge 
+7bdc 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+7bdd 67e10be1 store 2 ,mem_usb_setup_bvalue_temp 
+7bde 20407a65 call usb0_reply_zerolen 
+7bdf 6fe0c09a fetch 1 ,mem_device_option 
+7be0 c1820000 rtnne dvc_op_dongle 
+7be1 6fe08be5 fetch 1 ,mem_usb_tx_win_enable 
+7be2 207a0000 rtn blank 
+7be3 6fe08b61 fetch 1 ,mem_usb0_set_report_data 
+7be4 67e0c8ca store 1 ,mem_24g_led_status 
+7be5 7048ba03 jam kb_led_ackpayload ,mem_24g_ackpayload_enable 
+7be6 20600000 rtn 
+
+usb_set_report_resume_judge:
+7be7 6fe10b5b fetch 2 ,mem_usb_setup_bvalue 
+7be8 d8400200 arg pc_set_report_bvalue ,temp 
+7be9 98467c00 isub temp ,null 
+7bea 24628000 nrtn zero 
+7beb 6fe10b5d fetch 2 ,mem_usb_setup_windex 
+7bec d8400000 arg pc_set_report_windex ,temp 
+7bed 98467c00 isub temp ,null 
+7bee 24628000 nrtn zero 
+7bef 6fe10b5f fetch 2 ,mem_usb_setup_blength 
+7bf0 d8400001 arg pc_set_report_blength ,temp 
+7bf1 98467c00 isub temp ,null 
+7bf2 24628000 nrtn zero 
+7bf3 700be501 jam 1 ,mem_usb_tx_win_enable 
+7bf4 20600000 rtn 
+
+usb_set_protocol_req:
+7bf5 6fe08b5f fetch 1 ,mem_usb_setup_blength 
+7bf6 c0807a61 bne 0 ,usb0_force_stall 
+7bf7 6fe08b5b fetch 1 ,mem_usb_setup_bvalue 
+7bf8 c0007bfb beq boot_protocol ,usb_set_boot_protocol 
+7bf9 c000fbfe beq report_protocol ,usb_set_report_protocol 
+7bfa 20207a61 branch usb0_force_stall 
+
+usb_set_boot_protocol:
+7bfb 700bea00 jam 0 ,mem_usb_set_protocol_status 
+7bfc 700beb01 jam 1 ,mem_usb_set_protocol_value 
+7bfd 20207a65 branch usb0_reply_zerolen 
+
+usb_set_report_protocol:
+7bfe 700be601 jam 1 ,mem_usb_tx_mac_enable 
+7bff 700bea01 jam 1 ,mem_usb_set_protocol_status 
+7c00 700beb00 jam 0 ,mem_usb_set_protocol_value 
+7c01 20207a65 branch usb0_reply_zerolen 
+
+usb0_respond_length:
+7c02 ea408011 ifetchr regb ,1 ,rega 
+7c03 1a20a201 increase 1 ,rega 
+
+usb0_respond:
+7c04 4749c032 bpatchx patch32_3 ,mem_patch32 
+7c05 7920000e set1 mark_usb_first_resp ,mark 
+7c06 c591fc09 bmark0 mark_isstr ,usb0_respond_nostr 
+7c07 1a40a401 increase 1 ,regb 
+7c08 1a43a400 lshift regb ,regb 
+
+usb0_respond_nostr:
+7c09 62210a90 storer rega ,2 ,mem_bufptr 
+7c0a 62408a92 storer regb ,1 ,mem_remain 
+7c0b 20207c0e branch usb0_tx 
+
+usb_no_respond_data:
+7c0c d8e00000 arg 0 ,queue 
+7c0d 20207c4e branch usb_trig 
+
+usb0_tx:
+7c0e 474a4032 bpatchx patch32_4 ,mem_patch32 
+7c0f 6ff08c24 fetch 1 ,core_usb_txbusy 
+7c10 c3800000 rtnbit1 0 
+7c11 6fe08a92 fetch 1 ,mem_remain 
+7c12 207a0000 rtn blank 
+7c13 1fe27200 copy pdata ,loopcnt 
+7c14 98000400 iforce temp 
+7c15 6fe10b5f fetch 2 ,mem_usb_setup_blength 
+7c16 1fe67c40 sub pdata ,ep0_packet_size ,null 
+7c17 20217c1c branch usb0_tx_short ,positive 
+7c18 1f267c40 sub loopcnt ,ep0_packet_size ,null 
+7c19 20217c20 branch usb0_tx_info ,positive 
+7c1a 18007240 force ep0_packet_size ,loopcnt 
+7c1b 20207c20 branch usb0_tx_info 
+
+usb0_tx_short:
+7c1c 9f267c00 isub loopcnt ,null 
+7c1d 20217c20 branch usb0_tx_info ,positive 
+7c1e 98007200 iforce loopcnt 
+7c1f 67e08a92 store 1 ,mem_remain 
+
+usb0_tx_info:
+7c20 6fe08a92 fetch 1 ,mem_remain 
+7c21 9f267e00 isub loopcnt ,pdata 
+7c22 67e08a92 store 1 ,mem_remain 
+7c23 1f20ffff add loopcnt ,-1 ,pdata 
+7c24 67e089fa store 1 ,mem_usb_txbuf 
+7c25 c591fc32 bmark0 mark_isstr ,usb0_tx_nostr 
+7c26 1fe37e00 rshift pdata ,pdata 
+7c27 1f20ffff add loopcnt ,-1 ,pdata 
+7c28 67e089fa store 1 ,mem_usb_txbuf 
+7c29 c5877c32 bmark0 mark_usb_first_resp ,usb0_tx_nostr 
+7c2a 793f800e set0 mark_usb_first_resp ,mark 
+7c2b e0408005 istoret 1 ,contw 
+7c2c 58000003 setarg 3 
+7c2d e7e08005 istore 1 ,contw 
+7c2e 1f20f3ff increase -1 ,loopcnt 
+7c2f 1f227e00 copy loopcnt ,pdata 
+7c30 2422fc32 nbranch usb0_tx_nostr ,zero 
+7c31 1f20f201 increase 1 ,loopcnt 
+
+usb0_tx_nostr:
+7c32 6fe10a90 fetch 2 ,mem_bufptr 
+7c33 1fe20c00 copy pdata ,contr 
+
+usb0_tx0:
+7c34 efe08006 ifetch 1 ,contr 
+7c35 e7e08005 istore 1 ,contw 
+7c36 c591fc39 bmark0 mark_isstr ,usb0_tx1 
+7c37 58000000 setarg 0 
+7c38 e7e08005 istore 1 ,contw 
+
+usb0_tx1:
+7c39 c2007c34 loop usb0_tx0 
+7c3a 18c27e00 copy contr ,pdata 
+7c3b 67e10a90 store 2 ,mem_bufptr 
+7c3c 580009fa setarg mem_usb_txbuf 
+7c3d 67f10c09 store 2 ,core_usb_tx_saddr0 
+7c3e d8e00000 arg 0 ,queue 
+7c3f 20407c4e call usb_trig 
+7c40 6fe08a92 fetch 1 ,mem_remain 
+7c41 247a0000 nrtn blank 
+7c42 6fe08bec fetch 1 ,mem_usb_state 
+7c43 c1808000 rtnne usb_got_report_req 
+7c44 700bec02 jam usb_connected ,mem_usb_state 
+7c45 20600000 rtn 
+
+usb_tx_ep1:
+7c46 d8e00001 arg 1 ,queue 
+7c47 da200a3b arg mem_usb_txbuf1 ,rega 
+7c48 62310c0b storer rega ,2 ,core_usb_tx_saddr1 
+
+usb_tx_buf:
+7c49 1f20ffff add loopcnt ,-1 ,pdata 
+7c4a e7e08011 istore 1 ,rega 
+
+usb_tx_loop:
+7c4b efe08006 ifetch 1 ,contr 
+7c4c e7e08005 istore 1 ,contw 
+7c4d c2007c4b loop usb_tx_loop 
+
+usb_trig:
+7c4e 58000000 setarg 0 
+7c4f f9207e00 qset1 pdata 
+7c50 67f08c18 store 1 ,core_usb_trig 
+7c51 20600000 rtn 
+
+usb_tx_ep2:
+7c52 d8e00002 arg 2 ,queue 
+7c53 da200a45 arg mem_usb_txbuf2 ,rega 
+7c54 62310c0d storer rega ,2 ,core_usb_tx_saddr2 
+7c55 20207c49 branch usb_tx_buf 
+
+usb_tx:
+7c56 474ac032 bpatchx patch32_5 ,mem_patch32 
+7c57 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7c58 207a0000 rtn blank 
+7c59 6fe08bfa fetch 1 ,mem_usb_device_enumeration_endflag 
+7c5a 203a7c7a branch usb_tx_fifo_release ,blank 
+7c5b 6fe08bec fetch 1 ,mem_usb_state 
+7c5c c001fcb4 beq usb_sleep ,usb_windows_wakeup 
+7c5d c0817c7a bne usb_connected ,usb_tx_fifo_release 
+7c5e 6fe08bee fetch 1 ,mem_usb_clear_remote_wakeup 
+7c5f 243a7c7a nbranch usb_tx_fifo_release ,blank 
+7c60 20407c62 call usb_tx_data_ep1 
+7c61 20207c6d branch usb_tx_data_ep2 
+
+usb_tx_data_ep1:
+7c62 6ff08c24 fetch 1 ,core_usb_txbusy 
+7c63 c3808000 rtnbit1 1 
+7c64 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7c65 c4008000 rtnbit0 1 
+7c66 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7c67 793ffe01 set0 1 ,pdata 
+7c68 67e08bf9 store 1 ,mem_usb_tx_enable 
+7c69 6fe08bf7 fetch 1 ,mem_usb_ep1_data 
+7c6a 207a0000 rtn blank 
+7c6b c0087c9c beq usb_ep1_kb ,usb_tx_kb_normal_data 
+7c6c 2020137a branch assert 
+
+usb_tx_data_ep2:
+7c6d 6ff08c24 fetch 1 ,core_usb_txbusy 
+7c6e c3810000 rtnbit1 2 
+7c6f 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7c70 c4010000 rtnbit0 2 
+7c71 6fe08bf9 fetch 1 ,mem_usb_tx_enable 
+7c72 793ffe02 set0 2 ,pdata 
+7c73 67e08bf9 store 1 ,mem_usb_tx_enable 
+7c74 6fe08bf8 fetch 1 ,mem_usb_ep2_data 
+7c75 207a0000 rtn blank 
+7c76 c0107c7d beq usb_ep2_ms ,usb_tx_ms_data 
+7c77 c010fc98 beq usb_ep2_multikey ,usb_tx_kb_multikey_data 
+7c78 c0117ca0 beq usb_ep2_systemkey ,usb_tx_kb_systemkey_data 
+7c79 2020137a branch assert 
+
+usb_tx_fifo_release:
+7c7a d8a00bff arg mem_usb_mouse_data ,contw 
+7c7b df200008 arg 8 ,loopcnt 
+7c7c 20207d17 branch memset0 
+
+usb_tx_ms_data:
+7c7d 6fe08be7 fetch 1 ,mem_usb_idle_flag 
+7c7e 68488be9 fetcht 1 ,mem_usb_get_protocol_flag 
+7c7f 98417e00 iand temp ,pdata 
+7c80 203a7c94 branch usb_tx_ms_data_normal_mode ,blank 
+7c81 68488bea fetcht 1 ,mem_usb_set_protocol_status 
+7c82 9840fe00 iadd temp ,pdata 
+7c83 c000fc85 beq mac_boot_mode ,usb_tx_ms_data_mac_boot_mode 
+7c84 20207c94 branch usb_tx_ms_data_normal_mode 
+
+usb_tx_ms_data_mac_boot_mode:
+7c85 700bf800 jam 0 ,mem_usb_ep2_data 
+
+usb_tx_ms_data_mac_boot_regroup:
+7c86 6fe08c00 fetch 1 ,mem_usb_mouse_data + 1 
+7c87 c0017c95 beq r_key ,usb_tx_mac_boot_ms_regroup_r_or_lrkey 
+7c88 c001fc95 beq lr_key ,usb_tx_mac_boot_ms_regroup_r_or_lrkey 
+7c89 6fe08c00 fetch 1 ,mem_usb_mouse_data + 1 
+7c8a 67e08bff store 1 ,mem_usb_mouse_data 
+7c8b 6fe08c01 fetch 1 ,mem_usb_mouse_data + 2 
+7c8c e7e08005 istore 1 ,contw 
+7c8d 6fe08c03 fetch 1 ,mem_usb_mouse_data + 4 
+7c8e e7e08005 istore 1 ,contw 
+7c8f 6fe08c05 fetch 1 ,mem_usb_mouse_data + 6 
+7c90 e7e08005 istore 1 ,contw 
+7c91 df200004 arg 4 ,loopcnt 
+7c92 d8c00bff arg mem_usb_mouse_data ,contr 
+7c93 20207c52 branch usb_tx_ep2 
+
+usb_tx_ms_data_normal_mode:
+7c94 700bf800 jam 0 ,mem_usb_ep2_data 
+
+usb_tx_mac_boot_ms_regroup_r_or_lrkey:
+7c95 df200008 arg 8 ,loopcnt 
+7c96 d8c00bff arg mem_usb_mouse_data ,contr 
+7c97 20207c52 branch usb_tx_ep2 
+
+usb_tx_kb_multikey_data:
+7c98 700bf800 jam 0 ,mem_usb_ep2_data 
+7c99 df200003 arg 3 ,loopcnt 
+7c9a d8c00c1f arg mem_usb_kb_multikey ,contr 
+7c9b 20207c52 branch usb_tx_ep2 
+
+usb_tx_kb_normal_data:
+7c9c 700bf700 jam 0 ,mem_usb_ep1_data 
+7c9d df200008 arg 8 ,loopcnt 
+7c9e d8c00c0f arg mem_usb_kb_data ,contr 
+7c9f 20207c46 branch usb_tx_ep1 
+
+usb_tx_kb_systemkey_data:
+7ca0 700bf800 jam 0 ,mem_usb_ep2_data 
+7ca1 df200002 arg 2 ,loopcnt 
+7ca2 d8c00c2f arg mem_usb_kb_system ,contr 
+7ca3 20207c52 branch usb_tx_ep2 
+
+usb_inwake_state_tx_dispose:
+7ca4 6fe08bec fetch 1 ,mem_usb_state 
+7ca5 c0017ca7 beq usb_connected ,usb_mac_wakeup_trig 
+7ca6 20600000 rtn 
+
+usb_mac_wakeup_trig:
+7ca7 6ff08c00 fetch 1 ,core_usb_config 
+7ca8 79207e07 set1 7 ,pdata 
+7ca9 67f08c00 store 1 ,core_usb_config 
+7caa 700bfc01 jam 1 ,mem_usb_mac_wakeup_trig 
+7cab 20600000 rtn 
+
+usb_mac_wakeup_judge:
+7cac 6fe08bec fetch 1 ,mem_usb_state 
+7cad c1018000 rtneq usb_sleep 
+7cae c0017cb0 beq usb_connected ,usb_mac_wakeup 
+7caf 20600000 rtn 
+
+usb_mac_wakeup:
+7cb0 6fe08bfc fetch 1 ,mem_usb_mac_wakeup_trig 
+7cb1 207a0000 rtn blank 
+7cb2 700bfb01 jam 1 ,mem_usb_wakestate_onetime_flag 
+7cb3 20207cb7 branch usb_wakeup 
+
+usb_windows_wakeup:
+7cb4 d8e0000f arg timer_wakeup ,queue 
+7cb5 20407d74 call timer_check 
+7cb6 247a0000 nrtn blank 
+
+usb_wakeup:
+7cb7 6ff08c00 fetch 1 ,core_usb_config 
+7cb8 c4038000 rtnbit0 7 
+7cb9 708c00fc jam 0xfc ,core_usb_config 
+7cba 20007530 nop 30000 
+7cbb 708c003c jam 0x3c ,core_usb_config 
+7cbc 20600000 rtn 
+
+right_shift_n:
+7cbd 1f267c00 sub loopcnt ,0 ,null 
+7cbe 20628000 rtn zero 
+
+right_shift_n_loop:
+7cbf 1fe37e00 rshift pdata ,pdata 
+7cc0 c2007cbf loop right_shift_n_loop 
+7cc1 20600000 rtn 
+
+left_shift_n:
+7cc2 18007e01 force 1 ,pdata 
+7cc3 1f267c00 sub loopcnt ,0 ,null 
+7cc4 20628000 rtn zero 
+
+left_shift_n_loop:
+7cc5 1fe3fe00 lshift pdata ,pdata 
+7cc6 c2007cc5 loop left_shift_n_loop 
+7cc7 20600000 rtn 
+
+push_stack:
+7cc8 60a1097d storer contw ,2 ,mem_contw 
+7cc9 604c0964 storet 8 ,mem_temp 
+7cca 6162096c storer timeup ,4 ,mem_timeup 
+7ccb 20407cd0 call push_stack_rega_b_c 
+7ccc 60c1097b storer contr ,2 ,mem_contr 
+7ccd 67210987 storer loopcnt ,2 ,mem_loopcnt 
+7cce 60e10985 storer queue ,2 ,mem_queue 
+7ccf 20600000 rtn 
+
+push_stack_rega_b_c:
+7cd0 62220970 storer rega ,4 ,mem_rega 
+7cd1 62420974 storer regb ,4 ,mem_regb 
+7cd2 62618978 storer regc ,3 ,mem_regc 
+7cd3 20600000 rtn 
+
+pop_stack:
+7cd4 6fe1097d fetch 2 ,mem_contw 
+7cd5 98000a00 iforce contw 
+7cd6 684c0964 fetcht 8 ,mem_temp 
+7cd7 6962096c fetchr timeup ,4 ,mem_timeup 
+7cd8 20407cde call pop_stack_rega_b_c 
+7cd9 6f210987 fetchr loopcnt ,2 ,mem_loopcnt 
+7cda 68e10985 fetchr queue ,2 ,mem_queue 
+7cdb 6fe1097b fetch 2 ,mem_contr 
+7cdc 98000c00 iforce contr 
+7cdd 20600000 rtn 
+
+pop_stack_rega_b_c:
+7cde 6a220970 fetchr rega ,4 ,mem_rega 
+7cdf 6a420974 fetchr regb ,4 ,mem_regb 
+7ce0 6a618978 fetchr regc ,3 ,mem_regc 
+7ce1 20600000 rtn 
+
+get_contw:
+7ce2 6fe1097d fetch 2 ,mem_contw 
+7ce3 1fe20a00 copy pdata ,contw 
+7ce4 20600000 rtn 
+
+get_contr:
+7ce5 6fe1097b fetch 2 ,mem_contr 
+7ce6 1fe20c00 copy pdata ,contr 
+7ce7 20600000 rtn 
+
+store_contw:
+7ce8 18a27e00 copy contw ,pdata 
+7ce9 67e1097d store 2 ,mem_contw 
+7cea 20600000 rtn 
+
+store_contr:
+7ceb 18c27e00 copy contr ,pdata 
+7cec 67e1097b store 2 ,mem_contr 
+7ced 20600000 rtn 
+
+save_cont_pointers:
+7cee 18a27e00 copy contw ,pdata 
+7cef 67e10959 store 2 ,mem_hold_contw 
+7cf0 18c27e00 copy contr ,pdata 
+7cf1 67e10957 store 2 ,mem_hold_contr 
+7cf2 20600000 rtn 
+
+load_cont_pointers:
+7cf3 6fe10959 fetch 2 ,mem_hold_contw 
+7cf4 1fe20a00 copy pdata ,contw 
+7cf5 6fe10957 fetch 2 ,mem_hold_contr 
+7cf6 1fe20c00 copy pdata ,contr 
+7cf7 20600000 rtn 
+
+get_diff:
+7cf8 98462200 isub temp ,rega 
+7cf9 20610000 rtn positive 
+7cfa da200100 arg 0x100 ,rega 
+7cfb 9a20fe00 iadd rega ,pdata 
+7cfc 98462200 isub temp ,rega 
+7cfd 20600000 rtn 
+
+memcpy96:
+7cfe 20407d0a call memcpy32 
+
+memcpy64:
+7cff 20407d0a call memcpy32 
+7d00 20207d0a branch memcpy32 
+
+memcpy20:
+7d01 20407d06 call memcpy8 
+
+memcpy12:
+7d02 20407d06 call memcpy8 
+
+memcpy4:
+7d03 efe20006 ifetch 4 ,contr 
+7d04 e7e20005 istore 4 ,contw 
+7d05 20600000 rtn 
+
+memcpy8:
+7d06 efe40006 ifetch 8 ,contr 
+7d07 e7e40005 istore 8 ,contw 
+7d08 20600000 rtn 
+
+memcpy48:
+7d09 20407d0c call memcpy16 
+
+memcpy32:
+7d0a 20407d06 call memcpy8 
+
+memcpy24:
+7d0b 20407d06 call memcpy8 
+
+memcpy16:
+7d0c 20407d06 call memcpy8 
+7d0d 20207d06 branch memcpy8 
+
+delay:
+7d0e 1fe0ffff increase -1 ,pdata 
+7d0f 20000026 nop 38 
+7d10 243a7d0e nbranch delay ,blank 
+7d11 20600000 rtn 
+
+delay_10ms:
+7d12 df20000a arg 10 ,loopcnt 
+
+delay_ms_wait:
+7d13 20002ee0 nop 12000 
+7d14 c2007d13 loop delay_ms_wait 
+7d15 20600000 rtn 
+
+bn_zero:
+7d16 18007203 force 3 ,loopcnt 
+
+memset0:
+7d17 18007e00 force 0 ,pdata 
+
+memset8:
+7d18 e7e40005 istore 8 ,contw 
+7d19 c2007d18 loop memset8 
+7d1a 20600000 rtn 
+
+memset0_16:
+7d1b 20407d1c call memset0_8 
+
+memset0_8:
+7d1c 18007e00 force 0 ,pdata 
+7d1d e7e40005 istore 8 ,contw 
+7d1e 20600000 rtn 
+
+memset0_4:
+7d1f 18007e00 force 0 ,pdata 
+7d20 e7e20005 istore 4 ,contw 
+7d21 20600000 rtn 
+
+clear_mem_256:
+7d22 18007204 force 4 ,loopcnt 
+7d23 20207d17 branch memset0 
+
+clear_mem_512:
+7d24 18007208 force 8 ,loopcnt 
+7d25 20207d17 branch memset0 
+
+clear_mem:
+7d26 1f227e00 deposit loopcnt 
+7d27 207a0000 rtn blank 
+7d28 58000000 setarg 0 
+
+clear_mem_loop:
+7d29 e7e08005 istore 1 ,contw 
+7d2a c2007d29 loop clear_mem_loop 
+7d2b 20600000 rtn 
+
+clear_temp_block:
+7d2c df200020 arg 32 ,loopcnt 
+7d2d d8a0098e arg mem_temp_block0 ,contw 
+7d2e 20207d26 branch clear_mem 
+
+xor_loop:
+7d2f efe20013 ifetch 4 ,regc 
+7d30 e8420011 ifetcht 4 ,rega 
+7d31 9842fe00 ixor temp ,pdata 
+7d32 e7e20005 istore 4 ,contw 
+7d33 1a20a204 increase 4 ,rega 
+7d34 1a60a604 increase 4 ,regc 
+7d35 c2007d2f loop xor_loop 
+7d36 20600000 rtn 
+
+inverse_data:
+7d37 474b4032 bpatchx patch32_6 ,mem_patch32 
+7d38 1f227e00 copy loopcnt ,pdata 
+7d39 1fe67c01 sub pdata ,1 ,null 
+7d3a 20610000 rtn positive 
+7d3b 9a20a400 iadd rega ,regb 
+7d3c 1a40a5ff increase -1 ,regb 
+7d3d 1f237200 rshift loopcnt ,loopcnt 
+
+inverse_loop:
+7d3e e8408011 ifetcht 1 ,rega 
+7d3f efe08012 ifetch 1 ,regb 
+7d40 e7e08011 istore 1 ,rega 
+7d41 e0408012 istoret 1 ,regb 
+7d42 1a40a5ff increase -1 ,regb 
+7d43 1a20a201 increase 1 ,rega 
+7d44 c2007d3e loop inverse_loop 
+7d45 20600000 rtn 
+
+le2be_6byte:
+
+inverse_data_6byte:
+7d46 1fef0400 rshift32 pdata ,temp 
+7d47 20407d4c call inverse_data_4byte 
+7d48 18508400 byteswap temp ,temp 
+7d49 1ff07e00 lshift16 pdata ,pdata 
+7d4a 9841fe00 ior temp ,pdata 
+7d4b 20600000 rtn 
+
+le2be_4byte:
+
+inverse_data_4byte:
+7d4c 1ff10c00 rshift16 pdata ,contr 
+7d4d 18d08c00 byteswap contr ,contr 
+7d4e 1ff0fe00 byteswap pdata ,pdata 
+7d4f 1ff07e00 lshift16 pdata ,pdata 
+7d50 98c1fe00 ior contr ,pdata 
+7d51 20600000 rtn 
+
+memcpy_fast:
+7d52 1f227e00 deposit loopcnt 
+7d53 207a0000 rtn blank 
+
+memcpy_fast_loop:
+7d54 1f20f3f8 increase -8 ,loopcnt 
+7d55 20417d06 call memcpy8 ,positive 
+7d56 20628000 rtn zero 
+7d57 20217d54 branch memcpy_fast_loop ,positive 
+7d58 1f20f208 increase 8 ,loopcnt 
+
+memcpy_fast_loop_four:
+7d59 1f20f3fc increase -4 ,loopcnt 
+7d5a 20417d03 call memcpy4 ,positive 
+7d5b 20628000 rtn zero 
+7d5c 20217d59 branch memcpy_fast_loop_four ,positive 
+7d5d 1f20f204 increase 4 ,loopcnt 
+7d5e 20207d5f branch memcpy 
+
+memcpy:
+7d5f 1f227e00 deposit loopcnt 
+7d60 207a0000 rtn blank 
+
+memcpy_loop:
+7d61 efe08006 ifetch 1 ,contr 
+7d62 e7e08005 istore 1 ,contw 
+7d63 c2007d61 loop memcpy_loop 
+7d64 20600000 rtn 
+
+timer_stop:
+7d65 58000000 setarg 0 
+
+timer_init:
+7d66 1c430400 rshift clkn_bt ,temp 
+7d67 604a409c storet 4 ,mem_last_clkn 
+7d68 d8a041aa arg mem_timers ,contw 
+7d69 98000400 iforce temp 
+7d6a 18e3fe00 lshift queue ,pdata 
+7d6b 98a08a00 iadd contw ,contw 
+7d6c e0410005 istoret 2 ,contw 
+7d6d 474bc032 bpatchx patch32_7 ,mem_patch32 
+7d6e 20600000 rtn 
+
+timer_check_timeout:
+7d6f d9600800 arg 0x800 ,timeup 
+7d70 19701600 lshift16 timeup ,timeup 
+7d71 9960fe00 iadd timeup ,pdata 
+7d72 20600000 rtn 
+
+timer_reinit:
+7d73 d8e00000 arg 0 ,queue 
+
+timer_check:
+7d74 474c4033 bpatchx patch33_0 ,mem_patch33 
+7d75 684a409c fetcht 4 ,mem_last_clkn 
+7d76 1c437e00 rshift clkn_bt ,pdata 
+7d77 67e2409c store 4 ,mem_last_clkn 
+7d78 98467c00 isub temp ,null 
+7d79 24417d6f ncall timer_check_timeout ,positive 
+7d7a 98461600 isub temp ,timeup 
+7d7b 19620400 copy timeup ,temp 
+7d7c d8c041aa arg mem_timers ,contr 
+7d7d 18c20a00 copy contr ,contw 
+7d7e df200010 arg 16 ,loopcnt 
+
+timer_loop:
+7d7f efe10006 ifetch 2 ,contr 
+7d80 98467e00 isub temp ,pdata 
+7d81 20217d83 branch timer_counting ,positive 
+7d82 18007e00 force 0 ,pdata 
+
+timer_counting:
+7d83 e7e10005 istore 2 ,contw 
+7d84 c2007d7f loop timer_loop 
+7d85 d8c041aa arg mem_timers ,contr 
+7d86 18e3fe00 lshift queue ,pdata 
+7d87 98c08c00 iadd contr ,contr 
+7d88 efe10006 ifetch 2 ,contr 
+7d89 20600000 rtn 
+
+clk_add:
+7d8a 98408400 iadd temp ,temp 
+7d8b 18427200 copy temp ,loopcnt 
+7d8c 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+7d8d 9f267e00 isub loopcnt ,pdata 
+7d8e 20610000 rtn positive 
+7d8f 1fe67e00 sub pdata ,0 ,pdata 
+7d90 18510400 rshift16 temp ,temp 
+7d91 18408401 increase 1 ,temp 
+7d92 18500400 lshift16 temp ,temp 
+7d93 98418400 ior temp ,temp 
+7d94 20600000 rtn 
+
+clk_diff_rt:
+7d95 20407d97 call clk_diff 
+7d96 20207da4 branch clk2rt 
+
+clk_diff:
+7d97 78547c00 disable user 
+7d98 98467e00 isub temp ,pdata 
+7d99 20217d9c branch clk_diff_pos ,positive 
+7d9a 78347c00 enable user 
+7d9b 1fe67e00 sub pdata ,0 ,pdata 
+
+clk_diff_pos:
+7d9c c4078000 rtnbit0 15 
+7d9d 1fe22800 copy pdata ,regab 
+7d9e d8410000 arg 0x10000 ,temp 
+7d9f 6fe10163 fetch 2 ,mem_param_rt_rthalfslot 
+7da0 98467e00 isub temp ,pdata 
+7da1 9a80fe00 iadd regab ,pdata 
+7da2 793ffe40 set0 64 ,pdata 
+7da3 20600000 rtn 
+
+clk2rt:
+7da4 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+7da5 98000c00 iforce contr 
+7da6 1ff17e00 rshift16 pdata ,pdata 
+7da7 984ffe00 imul32 temp ,pdata 
+7da8 98c0fe00 iadd contr ,pdata 
+7da9 20600000 rtn 
+
+clk2lpo:
+7daa 1fed7e00 lshift8 pdata ,pdata 
+7dab 1ff27e00 lshift4 pdata ,pdata 
+7dac 6849c174 fetcht 3 ,mem_clks_per_lpo 
+7dad 9846fc00 idiv temp 
+7dae 20407def call wait_div_end 
+7daf 18078400 quotient temp 
+7db0 20600000 rtn 
+
+clk2bt:
+7db1 68490163 fetcht 2 ,mem_param_rt_rthalfslot 
+7db2 9846fc00 idiv temp 
+7db3 20407dec call get_div_result 
+7db4 1ff07e00 lshift16 pdata ,pdata 
+7db5 18070400 remainder temp 
+7db6 98418400 ior temp ,temp 
+7db7 20600000 rtn 
+
+string2dec_from_uart:
+7db8 d8400000 arg 0 ,temp 
+
+string2dec_from_uart_done:
+7db9 18422800 copy temp ,regab 
+7dba efe08003 ifetch 1 ,contu 
+7dbb 20407dc4 call uchar2dialog 
+7dbc 1a820400 copy regab ,temp 
+7dbd 20407dfe call swap 
+7dbe da40000a arg 10 ,regb 
+7dbf 9a4ffe00 imul32 regb ,pdata 
+7dc0 9840fe00 iadd temp ,pdata 
+7dc1 1fe20400 copy pdata ,temp 
+7dc2 c2007db9 loop string2dec_from_uart_done 
+7dc3 20600000 rtn 
+
+uchar2dialog:
+7dc4 d840003a arg 0x3a ,temp 
+7dc5 98467c00 isub temp ,null 
+7dc6 24217dcd nbranch uchar2dialog_number ,positive 
+7dc7 d8400061 arg 0x61 ,temp 
+7dc8 98467c00 isub temp ,null 
+7dc9 20217dd0 branch uchar2dialog_a2f ,positive 
+7dca d8400037 arg 0x37 ,temp 
+7dcb 98467e00 isub temp ,pdata 
+7dcc 20600000 rtn 
+
+uchar2dialog_number:
+7dcd d8400030 arg 0x30 ,temp 
+7dce 98467e00 isub temp ,pdata 
+7dcf 20600000 rtn 
+
+uchar2dialog_a2f:
+7dd0 d8400057 arg 0x57 ,temp 
+7dd1 98467e00 isub temp ,pdata 
+7dd2 20600000 rtn 
+
+pn9:
+7dd3 18426000 copy temp ,alarm 
+7dd4 580001ff setarg 0x1ff 
+7dd5 18002400 force 0 ,regb 
+
+pn9_loop:
+7dd6 1fe92200 rshift3 pdata ,rega 
+7dd7 1a232200 rshift rega ,rega 
+7dd8 9a22a200 ixor rega ,rega 
+7dd9 2a2ffe00 isolate1 0 ,rega 
+7dda 7920fe09 setflag true ,9 ,pdata 
+7ddb 18430400 rshift temp ,temp 
+7ddc 2feffe00 isolate1 0 ,pdata 
+7ddd 79208407 setflag true ,7 ,temp 
+7dde 1fe37e00 rshift pdata ,pdata 
+7ddf 1a40a401 increase 1 ,regb 
+7de0 2a400e00 compare 0 ,regb ,0x7 
+7de1 2420fdd6 nbranch pn9_loop ,true 
+7de2 e0408005 istoret 1 ,contw 
+7de3 c2007dd6 loop pn9_loop 
+7de4 1e020400 copy alarm ,temp 
+7de5 20600000 rtn 
+
+calc_average:
+7de6 58000000 setarg 0 
+7de7 1f222200 copy loopcnt ,rega 
+
+calc_average_loop:
+7de8 e8410006 ifetcht 2 ,contr 
+7de9 9840fe00 iadd temp ,pdata 
+7dea c2007de8 loop calc_average_loop 
+7deb 9a26fc00 idiv rega 
+
+get_div_result:
+7dec 20407def call wait_div_end 
+7ded 1807fe00 quotient pdata 
+7dee 20600000 rtn 
+
+wait_div_end:
+7def 207a8000 rtn modone 
+7df0 20207def branch wait_div_end 
+
+compare_loop:
+
+string_compare:
+7df1 efe08011 ifetch 1 ,rega 
+7df2 e8408012 ifetcht 1 ,regb 
+7df3 98467c00 isub temp ,null 
+7df4 24628000 nrtn zero 
+7df5 1a20a201 increase 1 ,rega 
+7df6 1a40a401 increase 1 ,regb 
+7df7 c2007df1 loop string_compare 
+7df8 18007c00 force 0 ,null 
+7df9 20600000 rtn 
+
+ceiling:
+7dfa 98467c00 isub temp ,null 
+7dfb 24610000 nrtn positive 
+7dfc 18427e00 deposit temp 
+7dfd 20600000 rtn 
+
+swap:
+7dfe 9840fe00 iadd temp ,pdata 
+7dff 98460400 isub temp ,temp 
+7e00 98467e00 isub temp ,pdata 
+7e01 20600000 rtn 
+
+clean_mem:
+7e02 df200200 arg 0x200 ,loopcnt 
+7e03 d8a04000 arg 0x4000 ,contw 
+7e04 20207d17 branch memset0 
+
+callback_func:
+7e05 207a0000 rtn blank 
+7e06 1fe27a00 copy pdata ,pc 
+
+wait_uarttx:
+7e07 6ff1010e fetch 2 ,core_uart_txitems 
+7e08 243a7e07 nbranch wait_uarttx ,blank 
+7e09 20600000 rtn 
+
+ice_break:
+7e0a 70820301 jam 0x1 ,core_ice_ctrl 
+7e0b 20600000 rtn 
+
+ice_setbp:
+7e0c 67f10205 store 2 ,core_ice_break0 
+7e0d 6ff08203 fetch 1 ,core_ice_ctrl 
+7e0e 79207e04 set1 4 ,pdata 
+7e0f 67f08203 store 1 ,core_ice_ctrl 
+7e10 20600000 rtn 
+
+ice_setbp2:
+7e11 67f10207 store 2 ,core_ice_break1 
+7e12 6ff08203 fetch 1 ,core_ice_ctrl 
+7e13 79207e06 set1 6 ,pdata 
+7e14 67f08203 store 1 ,core_ice_ctrl 
+7e15 20600000 rtn 
+
+ice_set_write_bp:
+7e16 67f10205 store 2 ,core_ice_break0 
+7e17 70820330 jam 0x30 ,core_ice_ctrl 
+7e18 20600000 rtn 
+
+test_no_white:
+7e19 6ff08043 fetch 1 ,core_config 
+7e1a 79207e04 set1 whiteoff_bit ,pdata 
+7e1b 67f08043 store 1 ,core_config 
+7e1c 20600000 rtn 
+
+test_enable_white:
+7e1d 6ff08043 fetch 1 ,core_config 
+7e1e 793ffe04 set0 whiteoff_bit ,pdata 
+7e1f 67f08043 store 1 ,core_config 
+7e20 20600000 rtn 
+
+check_uart_tx_buff:
+7e21 6ff1010e fetch 2 ,core_uart_txitems 
+7e22 d8400200 arg uart_air_control_threshold ,temp 
+
+pdata_sub_temp:
+7e23 98467c00 isub temp ,null 
+7e24 20600000 rtn 
+
+fifo_in:
+7e25 474cc033 bpatchx patch33_1 ,mem_patch33 
+7e26 e8440011 ifetcht util_fifo_len ,rega 
+7e27 18417eff and temp ,0xff ,pdata 
+7e28 243a7e2b nbranch fifo_in_push ,blank 
+7e29 184cfe00 rshift8 temp ,pdata 
+7e2a e7e40011 istore util_fifo_len ,rega 
+
+fifo_in_push:
+7e2b 1a20a207 increase util_fifo_len + util_fifo_offset ,rega 
+7e2c efe08011 ifetch 1 ,rega 
+7e2d 243a137a nbranch assert ,blank 
+7e2e 6fe0895b fetch 1 ,mem_fifo_temp 
+7e2f e7e08011 istore 1 ,rega 
+7e30 20600000 rtn 
+
+fifo_out:
+7e31 474d4033 bpatchx patch33_2 ,mem_patch33 
+7e32 df200008 arg util_fifo_len ,loopcnt 
+7e33 efe40011 ifetch util_fifo_len ,rega 
+7e34 207a0000 rtn blank 
+
+fifo_out_loop:
+7e35 efe08011 ifetch 1 ,rega 
+7e36 243a7e3a nbranch fifo_out_end ,blank 
+7e37 1a20a201 increase 1 ,rega 
+7e38 c2007e35 loop fifo_out_loop 
+7e39 2020137a branch assert 
+
+fifo_out_end:
+7e3a d8400000 arg 0 ,temp 
+7e3b e0408011 istoret 1 ,rega 
+7e3c 20600000 rtn 
+
+fifo_is_empty:
+7e3d efe40011 ifetch util_fifo_len ,rega 
+7e3e 20600000 rtn 
+
+fifo_is_full:
+7e3f efe08011 ifetch 1 ,rega 
+7e40 20600000 rtn 
+
+fifo_is_near_full:
+7e41 efe10011 ifetch 2 ,rega 
+7e42 20600000 rtn 
+
+fifo_content_count:
+7e43 d8400000 arg 0 ,temp 
+
+fifo_content_count_loop:
+7e44 6fe08006 fetch 1 ,contr 
+7e45 c2007e44 loop fifo_content_count_loop ,blank 
+7e46 18408401 increase 1 ,temp 
+7e47 c2007e44 loop fifo_content_count_loop 
+7e48 18427e00 copy temp ,pdata 
+7e49 20600000 rtn 
+
+not_greater_than:
+7e4a 98467c00 isub temp ,null 
+7e4b 24610000 nrtn positive 
+
+copy_temp2pdata:
+7e4c 18427e00 copy temp ,pdata 
+7e4d 20600000 rtn 
+
+disable_positive:
+7e4e 18007dff force -1 ,null 
+7e4f 20600000 rtn 
+
+enable_positive:
+
+disable_zero:
+7e50 18007c01 force 1 ,null 
+7e51 20600000 rtn 
+
+enable_zero:
+7e52 18007c00 force 0 ,null 
+7e53 20600000 rtn 
+
+enable_user:
+7e54 78347c00 enable user 
+7e55 20600000 rtn 
+
+disable_user:
+7e56 78547c00 disable user 
+7e57 20600000 rtn 
+
+enable_user2:
+7e58 78367c00 enable user2 
+7e59 20600000 rtn 
+
+disable_user2:
+7e5a 78567c00 disable user2 
+7e5b 20600000 rtn 
+
+enable_user7:
+7e5c 7838fc00 enable user7 
+7e5d 20600000 rtn 
+
+disable_blank:
+7e5e 58000001 setarg 1 
+7e5f 20600000 rtn 
+
+enable_blank:
+
+set_pdata_0:
+7e60 58000000 setarg 0 
+7e61 20600000 rtn 
+
+cal_sum:
+7e62 1f267c00 sub loopcnt ,0 ,null 
+7e63 20628000 rtn zero 
+
+cal_sum_loop:
+7e64 e8408006 ifetcht 1 ,contr 
+7e65 9840fe00 iadd temp ,pdata 
+7e66 c2007e64 loop cal_sum_loop 
+7e67 20600000 rtn 
+
+reverse_byte:
+7e68 1f227e00 copy loopcnt ,pdata 
+7e69 207a0000 rtn blank 
+7e6a 18c27e00 copy contr ,pdata 
+7e6b 9f20fe00 iadd loopcnt ,pdata 
+7e6c 1fe0ffff increase -1 ,pdata 
+7e6d 1fe20c00 copy pdata ,contr 
+
+reverse_loop:
+7e6e efe08006 ifetch 1 ,contr 
+7e6f 18c08dfe increase -2 ,contr 
+7e70 e7e08005 istore 1 ,contw 
+7e71 c2007e6e loop reverse_loop 
+7e72 20600000 rtn 
+
+calc_k12:
+7e73 19622400 copy timeup ,regb 
+
+calc_k:
+7e74 da609420 arg mem_local_sig ,regc 
+7e75 18007224 force 36 ,loopcnt 
+7e76 18005600 force 0 ,rege 
+7e77 18006e00 force 0 ,regf 
+
+rxcal_k1_loop:
+7e78 20407e88 call complex_mult16to8 
+7e79 52207e00 preload rega 
+7e7a 9d60d600 iadd rege ,rege 
+7e7b 50407e00 preload temp 
+7e7c 9ee0ee00 iadd regf ,regf 
+7e7d 1a40a404 increase 4 ,regb 
+7e7e 1a60a602 increase 2 ,regc 
+7e7f c2007e78 loop rxcal_k1_loop 
+7e80 55607e00 preload rege 
+7e81 d8400024 arg 36 ,temp 
+7e82 20407ed4 call signed_div 
+7e83 e7e20005 istore 4 ,contw 
+7e84 56e07e00 preload regf 
+7e85 20407ed4 call signed_div 
+7e86 e7e20005 istore 4 ,contw 
+7e87 20600000 rtn 
+
+complex_mult16to8:
+7e88 edc10012 ifetchr nap ,2 ,regb 
+7e89 eb808013 ifetchr fhs_misc ,1 ,regc 
+7e8a 20407eb9 call signed_ext16by8 
+7e8b 98482200 imults temp ,rega 
+7e8c eb808006 ifetchr fhs_misc ,1 ,contr 
+7e8d 20347e8f branch complex_not_conj ,user 
+7e8e 1b863800 sub fhs_misc ,0 ,fhs_misc 
+
+complex_not_conj:
+7e8f 1a408c02 add regb ,2 ,contr 
+7e90 edc10006 ifetchr nap ,2 ,contr 
+7e91 20407eb9 call signed_ext16by8 
+7e92 98483000 imults temp ,regd 
+7e93 52207e00 preload rega 
+7e94 9b062200 isub regd ,rega 
+7e95 edc10012 ifetchr nap ,2 ,regb 
+7e96 55c07e00 preload nap 
+7e97 98483000 imults temp ,regd 
+7e98 edc10006 ifetchr nap ,2 ,contr 
+7e99 eb808013 ifetchr fhs_misc ,1 ,regc 
+7e9a 20407eb9 call signed_ext16by8 
+7e9b 98480400 imults temp ,temp 
+7e9c 53007e00 preload regd 
+7e9d 98408400 iadd temp ,temp 
+7e9e 20600000 rtn 
+
+complex_mult32to32:
+7e9f efe20012 ifetch 4 ,regb 
+7ea0 ea220013 ifetchr rega ,4 ,regc 
+7ea1 9a285600 imults rega ,rege 
+7ea2 ea220006 ifetchr rega ,4 ,contr 
+7ea3 52206e00 aligned rega ,regf 
+7ea4 1a408c04 add regb ,4 ,contr 
+7ea5 efe20006 ifetch 4 ,contr 
+7ea6 9a280400 imults rega ,temp 
+7ea7 55607e00 preload rege 
+7ea8 98465600 isub temp ,rege 
+7ea9 efe20012 ifetch 4 ,regb 
+7eaa 9ee86e00 imults regf ,regf 
+7eab efe20006 ifetch 4 ,contr 
+7eac ea220013 ifetchr rega ,4 ,regc 
+7ead 9a287e00 imults rega ,pdata 
+7eae 9ee0ee00 iadd regf ,regf 
+7eaf 20600000 rtn 
+
+lshift14:
+7eb0 1ff07e00 lshift16 pdata ,pdata 
+
+rshift2:
+7eb1 1feb7e00 rshift2 pdata ,pdata 
+7eb2 20600000 rtn 
+
+lshift6:
+7eb3 1fed7e00 lshift8 pdata ,pdata 
+7eb4 20207eb1 branch rshift2 
+
+calc_vok:
+7eb5 9feffe00 imul32 pdata ,pdata 
+
+rshift7:
+7eb6 1ff1fe00 rshift4 pdata ,pdata 
+7eb7 1fe97e00 rshift3 pdata ,pdata 
+7eb8 20600000 rtn 
+
+signed_ext16by8:
+7eb9 55c07e00 preload nap 
+7eba 53800400 aligned fhs_misc ,temp 
+7ebb 20600000 rtn 
+
+abs32:
+7ebc c40f8000 rtnbit0 31 
+7ebd 18000400 force 0 ,temp 
+7ebe 79200420 set1 32 ,temp 
+7ebf 184085ff increase -1 ,temp 
+7ec0 9842fe00 ixor temp ,pdata 
+7ec1 1fe0fe01 pincrease 1 
+7ec2 20600000 rtn 
+
+sqrt:
+7ec3 98002200 iforce rega 
+7ec4 db000000 arg 0 ,regd 
+7ec5 7920301e set1 30 ,regd 
+7ec6 da400000 arg 0 ,regb 
+7ec7 df200010 arg 16 ,loopcnt 
+
+sqrt_loop:
+7ec8 1b027e00 deposit regd 
+7ec9 9a40fe00 iadd regb ,pdata 
+7eca 1a432400 rshift regb ,regb 
+7ecb 9a267e00 isub rega ,pdata 
+7ecc 2022fece branch sqrt_less ,zero 
+7ecd 20217ed1 branch sqrt_greater ,positive 
+
+sqrt_less:
+7ece 1fe62200 sub pdata ,0 ,rega 
+7ecf 1b027e00 deposit regd 
+7ed0 9a41a400 ior regb ,regb 
+
+sqrt_greater:
+7ed1 1b0b3000 rshift2 regd ,regd 
+7ed2 c2007ec8 loop sqrt_loop 
+7ed3 20600000 rtn 
+
+signed_div:
+7ed4 793f802c set0 mark_temp ,mark 
+7ed5 c31ffed8 bbit0 63 ,signed_div_unsigna 
+7ed6 7920002c set1 mark_temp ,mark 
+7ed7 1fe67e00 sub pdata ,0 ,pdata 
+
+signed_div_unsigna:
+7ed8 284c003f isolate0 63 ,temp 
+7ed9 2020fedc branch signed_div_unsignb ,true 
+7eda 7940002c setflip mark_temp ,mark 
+7edb 18460400 sub temp ,0 ,temp 
+
+signed_div_unsignb:
+7edc 9846fc00 idiv temp 
+7edd 20407dec call get_div_result 
+7ede c6960000 rtnmark0 mark_temp 
+7edf 1fe67e00 sub pdata ,0 ,pdata 
+7ee0 20600000 rtn 
+
+rx_iq_comp:
+7ee1 20407ee7 call calc_k1 
+7ee2 20407eea call calc_k2 
+7ee3 20407eec call calc_absk12_sqr 
+7ee4 20407efb call calc_g 
+7ee5 20407f0a call calc_a 
+7ee6 20207f17 branch calc_c22 
+
+calc_k1:
+7ee7 78347c00 enable user 
+7ee8 d8a00a01 arg mem_tmp_buffer ,contw 
+7ee9 20207e73 branch calc_k12 
+
+calc_k2:
+7eea 78547c00 disable user 
+7eeb 20207e73 branch calc_k12 
+
+calc_absk12_sqr:
+7eec 6fe20a01 fetch 4 ,mem_tmp_buffer 
+7eed 684a0a09 fetcht 4 ,mem_tmp_buffer + 8 
+7eee 9840fe00 iadd temp ,pdata 
+7eef 20407ebc call abs32 
+7ef0 98000400 iforce temp 
+7ef1 984fd600 imul32 temp ,rege 
+7ef2 6fe20a05 fetch 4 ,mem_tmp_buffer + 4 
+7ef3 684a0a0d fetcht 4 ,mem_tmp_buffer + 12 
+7ef4 98467e00 isub temp ,pdata 
+7ef5 20407ebc call abs32 
+7ef6 98000400 iforce temp 
+7ef7 984ffe00 imul32 temp ,pdata 
+7ef8 9d60fe00 iadd rege ,pdata 
+7ef9 67e40a11 store 8 ,mem_tmp_buffer + 16 
+7efa 20600000 rtn 
+
+calc_g:
+7efb da400a01 arg mem_tmp_buffer ,regb 
+7efc da600a09 arg mem_tmp_buffer + 8 ,regc 
+7efd 20407e9f call complex_mult32to32 
+7efe 55607e00 preload rege 
+7eff 1fe67e00 sub pdata ,0 ,pdata 
+7f00 1ff07e00 lshift16 pdata ,pdata 
+7f01 1febfe00 lshift2 pdata ,pdata 
+7f02 684c0a11 fetcht 8 ,mem_tmp_buffer + 16 
+7f03 9848fc00 idiv48 temp 
+7f04 da210000 arg 0x10000 ,rega 
+7f05 20407dec call get_div_result 
+7f06 9a20fe00 iadd rega ,pdata 
+7f07 20407ec3 call sqrt 
+7f08 1a425600 copy regb ,rege 
+7f09 20600000 rtn 
+
+calc_a:
+7f0a 184f7e00 rshift32 temp ,pdata 
+7f0b 9a4fa200 imul32 regb ,rega 
+7f0c 1a427e00 deposit regb 
+7f0d 984f8400 imul32 temp ,temp 
+7f0e 1a307e00 lshift16 rega ,pdata 
+7f0f 1ff07e00 lshift16 pdata ,pdata 
+7f10 98408400 iadd temp ,temp 
+7f11 56e07e00 preload regf 
+7f12 1fe67e00 sub pdata ,0 ,pdata 
+7f13 1ff07e00 lshift16 pdata ,pdata 
+7f14 1fe3fe00 lshift pdata ,pdata 
+7f15 9848fc00 idiv48 temp 
+7f16 20207dec branch get_div_result 
+
+calc_c22:
+7f17 1fe32600 rshift pdata ,regc 
+7f18 9fef8400 imul32 pdata ,temp 
+7f19 58010000 setarg 0x10000 
+7f1a 98467e00 isub temp ,pdata 
+7f1b 20407ec3 call sqrt 
+7f1c 1a427e00 deposit regb 
+7f1d 9d6f8400 imul32 rege ,temp 
+7f1e 58000000 setarg 0 
+7f1f 79207e1c set1 28 ,pdata 
+7f20 9848fc00 idiv48 temp 
+7f21 20407def call wait_div_end 
+7f22 18078400 quotient temp 
+7f23 58001000 setarg 0x1000 
+7f24 98466e00 isub temp ,regf 
+7f25 20600000 rtn 
+
+tx_iq_precomp:
+7f26 20407f2c call calc_vok1 
+7f27 20407f30 call calc_sumvok 
+7f28 20407f37 call calc_ad_bc 
+7f29 20407f3e call calc_omega 
+7f2a 20407f4d call calc_b1 
+7f2b 20207f58 branch calc_b2 
+
+calc_vok1:
+7f2c 6fe089f6 fetch 1 ,mem_vdk 
+7f2d 20407eb5 call calc_vok 
+7f2e 67e089f8 store 1 ,mem_vok 
+7f2f 20600000 rtn 
+
+calc_sumvok:
+7f30 98002600 iforce regc 
+7f31 9fef8400 imul32 pdata ,temp 
+7f32 efe08006 ifetch 1 ,contr 
+7f33 20407eb5 call calc_vok 
+7f34 e7e08005 istore 1 ,contw 
+7f35 9a60a200 iadd regc ,rega 
+7f36 20600000 rtn 
+
+calc_ad_bc:
+7f37 9feffe00 imul32 pdata ,pdata 
+7f38 9840a400 iadd temp ,regb 
+7f39 1a227e00 deposit rega 
+7f3a 9a2f8400 imul32 rega ,temp 
+7f3b 1a43fe00 lshift regb ,pdata 
+7f3c 98460400 isub temp ,temp 
+7f3d 20600000 rtn 
+
+calc_omega:
+7f3e 58400000 setarg 0x400000 
+7f3f 9846fc00 idiv temp 
+7f40 20407dec call get_div_result 
+7f41 67e109fc store 2 ,mem_omega 
+7f42 1a307e00 lshift16 rega ,pdata 
+7f43 1feb7e00 rshift2 pdata ,pdata 
+7f44 9846fc00 idiv temp 
+7f45 20407dec call get_div_result 
+7f46 e7e10005 istore 2 ,contw 
+7f47 1a4d7e00 lshift8 regb ,pdata 
+7f48 1fe37e00 rshift pdata ,pdata 
+7f49 9846fc00 idiv temp 
+7f4a 20407dec call get_div_result 
+7f4b e7e10005 istore 2 ,contw 
+7f4c 20600000 rtn 
+
+calc_b1:
+7f4d 1a707e00 lshift16 regc ,pdata 
+7f4e 1feb7e00 rshift2 pdata ,pdata 
+7f4f 9a46fc00 idiv regb 
+7f50 20407dec call get_div_result 
+7f51 67e10a02 store 2 ,mem_b1 
+7f52 6fe089f6 fetch 1 ,mem_vdk 
+7f53 20407eb3 call lshift6 
+7f54 9a26fc00 idiv rega 
+7f55 20407dec call get_div_result 
+7f56 e7e10005 istore 2 ,contw 
+7f57 20600000 rtn 
+
+calc_b2:
+7f58 6fe089f9 fetch 1 ,mem_vok + 1 
+7f59 20407eb0 call lshift14 
+7f5a 9a46fc00 idiv regb 
+7f5b 20407dec call get_div_result 
+7f5c 67e10a06 store 2 ,mem_b2 
+7f5d 6fe089f7 fetch 1 ,mem_vdk + 1 
+7f5e 20407eb3 call lshift6 
+7f5f 9a26fc00 idiv rega 
+7f60 20407dec call get_div_result 
+7f61 e7e10005 istore 2 ,contw 
+7f62 20600000 rtn 
+
+tx_iq_cal:
+7f63 d8a00a2a arg mem_q ,contw 
+7f64 df200002 arg 2 ,loopcnt 
+7f65 20407d17 call memset0 
+7f66 d8e00004 arg 4 ,queue 
+
+tx_iq_cal_loop:
+7f67 20407f83 call calc_mk1 
+7f68 20407f86 call calc_d 
+7f69 20407f89 call calc_c 
+7f6a 20407f92 call calc_est1 
+7f6b 20407f98 call calc_est2 
+7f6c 20407f9e call calc_u1 
+7f6d 20407fa4 call calc_u2 
+7f6e 20407faa call calc_qest 
+7f6f 19609620 increase 32 ,timeup 
+7f70 18e08fff increase -1 ,queue 
+7f71 2422ff67 nbranch tx_iq_cal_loop ,zero 
+
+calc_tx_c22:
+7f72 6fe20a2a fetch 4 ,mem_q 
+7f73 d8c00100 arg 0x100 ,contr 
+7f74 98c0d600 iadd contr ,rege 
+7f75 6fe20a2e fetch 4 ,mem_q + 4 
+7f76 9fe80400 imults pdata ,temp 
+7f77 58010000 setarg 0x10000 
+7f78 98467e00 isub temp ,pdata 
+7f79 20407ec3 call sqrt 
+7f7a 1a427e00 deposit regb 
+7f7b 9d680400 imults rege ,temp 
+7f7c 58000000 setarg 0 
+7f7d 79207e1c set1 28 ,pdata 
+7f7e 20407ed4 call signed_div 
+7f7f d8401000 arg 0x1000 ,temp 
+7f80 98467e00 isub temp ,pdata 
+7f81 1fe67e00 sub pdata ,0 ,pdata 
+7f82 20600000 rtn 
+
+calc_mk1:
+7f83 19620c00 copy timeup ,contr 
+7f84 df200008 arg 8 ,loopcnt 
+7f85 20207de6 branch calc_average 
+
+calc_d:
+7f86 98002400 iforce regb 
+7f87 df200008 arg 8 ,loopcnt 
+7f88 20207de6 branch calc_average 
+
+calc_c:
+7f89 9a40a600 iadd regb ,regc 
+7f8a 684889f9 fetcht 1 ,mem_vok + 1 
+7f8b 984f8400 imul32 temp ,temp 
+7f8c 6fe089f8 fetch 1 ,mem_vok 
+7f8d 9a4ffe00 imul32 regb ,pdata 
+7f8e 9840fe00 iadd temp ,pdata 
+7f8f 1ff1fe00 rshift4 pdata ,pdata 
+7f90 1fe92200 rshift3 pdata ,rega 
+7f91 20600000 rtn 
+
+calc_est1:
+7f92 6fe109fe fetch 2 ,mem_omega + 2 
+7f93 9a6f8400 imul32 regc ,temp 
+7f94 6fe109fc fetch 2 ,mem_omega 
+7f95 9a2ffe00 imul32 rega ,pdata 
+7f96 98462400 isub temp ,regb 
+7f97 20600000 rtn 
+
+calc_est2:
+7f98 6fe109fe fetch 2 ,mem_omega + 2 
+7f99 9a2f8400 imul32 rega ,temp 
+7f9a efe10006 ifetch 2 ,contr 
+7f9b 9a6ffe00 imul32 regc ,pdata 
+7f9c 98462200 isub temp ,rega 
+7f9d 20600000 rtn 
+
+calc_u1:
+7f9e 6fe089f8 fetch 1 ,mem_vok 
+7f9f 20407fc5 call mults_rshift7 
+7fa0 9a20ee00 iadd rega ,regf 
+7fa1 19622600 copy timeup ,regc 
+7fa2 d8a00a0a arg mem_u1 ,contw 
+7fa3 20207fc8 branch theta_mul 
+
+calc_u2:
+7fa4 6fe089f9 fetch 1 ,mem_vok + 1 
+7fa5 20407fc5 call mults_rshift7 
+7fa6 9a20ee00 iadd rega ,regf 
+7fa7 1960a610 add timeup ,16 ,regc 
+7fa8 d8a00a1a arg mem_u2 ,contw 
+7fa9 20207fc8 branch theta_mul 
+
+calc_qest:
+7faa 52406e00 aligned regb ,regf 
+7fab 6a410a02 fetchr regb ,2 ,mem_b1 
+7fac 6a610a06 fetchr regc ,2 ,mem_b2 
+7fad da200a0a arg mem_u1 ,rega 
+7fae ddc00a1a arg mem_u2 ,nap 
+7faf d8a00a2a arg mem_q ,contw 
+7fb0 20407fb6 call calc_q 
+7fb1 20407fb6 call calc_q 
+7fb2 6a410a04 fetchr regb ,2 ,mem_b1 + 2 
+7fb3 6a610a08 fetchr regc ,2 ,mem_b2 + 2 
+7fb4 20407fb6 call calc_q 
+7fb5 20207fb6 branch calc_q 
+
+calc_q:
+7fb6 efe20011 ifetch 4 ,rega 
+7fb7 18c22200 copy contr ,rega 
+7fb8 9a485600 imults regb ,rege 
+7fb9 efe2002e ifetch 4 ,nap 
+7fba 18c25c00 copy contr ,nap 
+7fbb 9a687e00 imults regc ,pdata 
+7fbc 9d60fe00 iadd rege ,pdata 
+7fbd 1fed7e00 lshift8 pdata ,pdata 
+7fbe 1ee20400 copy regf ,temp 
+7fbf 20407ed4 call signed_div 
+7fc0 ed620005 ifetchr rege ,4 ,contw 
+7fc1 9d667e00 isub rege ,pdata 
+7fc2 1fe63000 sub pdata ,0 ,regd 
+7fc3 e3020005 istorer regd ,4 ,contw 
+7fc4 20600000 rtn 
+
+mults_rshift7:
+7fc5 9a480400 imults regb ,temp 
+7fc6 50407e00 preload temp 
+7fc7 20207eb6 branch rshift7 
+
+theta_mul:
+7fc8 d9000004 arg 4 ,debug 
+7fc9 ddc09400 arg mem_theta ,nap 
+
+theta_mul_loop0:
+7fca dd600000 arg 0 ,rege 
+7fcb df200008 arg 8 ,loopcnt 
+
+theta_mul_loop1:
+7fcc efe10013 ifetch 2 ,regc 
+7fcd 18c22600 copy contr ,regc 
+7fce 9ee67e00 isub regf ,pdata 
+7fcf eb80802e ifetchr fhs_misc ,1 ,nap 
+7fd0 18c25c00 copy contr ,nap 
+7fd1 53800400 aligned fhs_misc ,temp 
+7fd2 98487e00 imults temp ,pdata 
+7fd3 9d60d600 iadd rege ,rege 
+7fd4 c2007fcc loop theta_mul_loop1 
+7fd5 1d6cfe00 rshift8 rege ,pdata 
+7fd6 1fe37e00 rshift pdata ,pdata 
+7fd7 e7e20005 istore 4 ,contw 
+7fd8 1a60a7f0 increase -16 ,regc 
+7fd9 190091ff increase -1 ,debug 
+7fda 2422ffca nbranch theta_mul_loop0 ,zero 
+7fdb 20600000 rtn 
+
+clear_wake:
+7fdc 58000000 setarg 0 
+7fdd 79207e13 set1 19 ,pdata 
+7fde 67e4009f store 8 ,mem_gpio_wakeup_low 
+7fdf 20600000 rtn 
+
Index: output/romcode.rom
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/romcode.rom	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/output/romcode.rom	(working copy)
@@ -0,0 +1,30720 @@
+20401410
+44804000
+20800000
+204030f3
+2040124a
+20405d96
+20401384
+20404dc7
+4480c000
+204062bb
+20405381
+204077b4
+204030dc
+2455e0b9
+44814000
+2055b0ea
+20406ea4
+20406ec6
+205594b5
+4481c000
+2040706c
+20407597
+20406ea7
+20401b92
+2040083a
+20403107
+44824000
+20400891
+20400b07
+20400b7a
+20400822
+204021d1
+204014dd
+20200813
+c61a0000
+20400828
+c6848000
+793f8009
+20400a32
+202016b2
+4482c000
+20400a6d
+24228831
+20400a19
+1a208c01
+efe08006
+c280161f
+c280896b
+20200be0
+20400a3a
+1f227c00
+20628000
+20400a19
+6fe08031
+c28188d5
+6fe08032
+c280896b
+20200be0
+6fe0c1db
+207a0000
+c000884a
+c001084f
+c0018852
+c0028857
+c00d8847
+20400a66
+20628000
+20400a69
+20628000
+7041db00
+20600000
+7002e01b
+7041db00
+20600000
+7920001c
+793f801e
+70008dff
+70008b1f
+20200845
+793f801c
+18003600
+20200845
+20400a69
+20628000
+18000401
+7000be05
+2020085e
+44834000
+6fe341dd
+20000001
+70478b01
+70005603
+2020085d
+18000425
+4483c000
+6fe080a8
+203a0864
+1fe9fe00
+1ff27e00
+1fe0ffff
+67e0c0ae
+67e080a7
+70008c1f
+793f800c
+20400a4a
+24228885
+2040135d
+67e08078
+6048807d
+6fe341dd
+67e30041
+44844001
+20407d73
+18007e00
+2841fe01
+7d20fe05
+79207e03
+67e08031
+70095b03
+20407871
+18007e00
+7920fe04
+67e0804d
+58000000
+79207e01
+67e08032
+7834fc00
+20400a32
+7854fc00
+18000e03
+6fe140c1
+20407d66
+20200845
+4484c001
+6fe341dd
+67e30041
+2841fe01
+2020888b
+20200845
+d8a00a01
+df200008
+20407d17
+70095b04
+20407871
+20200845
+c61a0000
+c68e0000
+18000e01
+20407d74
+7d3a001c
+243a0898
+20600000
+44854001
+684940c3
+18000e04
+20400f44
+20740000
+204010fa
+18004800
+20618000
+793f800b
+793f8000
+1c40c201
+280ffe1e
+7920c802
+2c200400
+242088c1
+4485c001
+6fe08012
+1fe0fe01
+67e08012
+2040112e
+20401128
+20401148
+2040133e
+20401343
+20401351
+20400e80
+204008b4
+2020089f
+44864001
+6fe0808b
+1fe0ffff
+67e0808b
+20610000
+70008b1f
+6fe0808d
+1fe0ffff
+67e0808d
+20610000
+7940001e
+70008dff
+20600000
+4486c001
+2040112e
+20401122
+20401148
+20401348
+204012d3
+204012f9
+202c08cb
+204008b4
+202008a2
+44874001
+2040127d
+20401359
+20400d47
+793f8001
+c6858000
+6fe08013
+1fe0fe01
+67e08013
+20600000
+4487c001
+7834fc00
+78387c00
+6fe140bd
+203a08dd
+18000e08
+20407d74
+247a0000
+44884002
+684940bf
+18000e28
+20400f44
+20340916
+18000e03
+20407d74
+243a08f2
+6fe0804d
+c28208e8
+202008eb
+d8a00a01
+df200008
+20407d17
+4488c002
+70003100
+20405382
+70478b00
+70095b13
+20407871
+20200916
+44894002
+18001600
+34730200
+6fe080a9
+1fe0ffff
+9c42fe00
+2fe00600
+242088f2
+18827e00
+67e080e6
+18004c00
+18004800
+4489c002
+20218916
+20401132
+69610157
+34730200
+448a4002
+6fe200a9
+98004200
+1fe0fe01
+67e200a9
+280ffe0c
+7920c802
+2c200400
+2420892a
+6fe0800c
+1fe0fe01
+67e0800c
+20401128
+2040133e
+20401343
+20401351
+20400e80
+2040091c
+202008fe
+448ac002
+7854fc00
+6fe140bd
+207a0000
+18000e08
+20207d66
+448b4002
+6fe0808c
+1fe0ffff
+67e0808c
+20610000
+70008c1f
+6fe080a7
+1fe0ffff
+67e080a7
+20610000
+7940000c
+6fe0c0ae
+67e080a7
+20600000
+448bc002
+20401122
+20401348
+204012d3
+204012f9
+202c0932
+2040091c
+20200903
+20400e80
+6fe0800d
+1fe0fe01
+67e0800d
+18003600
+6fe200a9
+448c4003
+2040133c
+20401132
+1cc0cc01
+1c2143fd
+1c8149fc
+20401128
+2040133e
+20401343
+20401351
+1c427e00
+67e200b1
+18000800
+18000202
+20401359
+20400f8e
+448cc003
+2040133a
+1c21c202
+1c8149fc
+20401122
+20401348
+204012d3
+204012f9
+204c0e80
+202c0957
+6fe08010
+203a08fe
+1fe0ffff
+67e08010
+20200938
+448d4003
+6fe0800e
+1fe0fe01
+67e0800e
+20400c46
+79200033
+20400b01
+202c0963
+793f8033
+20400c66
+243a095c
+202008fe
+448dc003
+793f8033
+6fe08031
+793ffe03
+67e08031
+20400c51
+7854fc00
+20600000
+448e4003
+7834fc00
+78387c00
+204009e5
+20740000
+2040133c
+1c40c201
+20401138
+18004803
+20406579
+20400c9a
+20401128
+2040133e
+20401343
+20401351
+20400f8a
+448ec003
+20405394
+20400af3
+24368984
+20401376
+20400f50
+6fe0800f
+1fe0fe01
+67e0800f
+448f4003
+20406561
+2040098f
+24748000
+20400f20
+243a098c
+7854fc00
+20600000
+20400c9a
+20400ae9
+2020097b
+20368992
+2040136d
+202109a0
+204009ab
+243409a0
+6fe0804d
+c4020000
+c3818000
+6fe0804c
+c3818000
+204009b2
+247a0000
+6fe080be
+1fe0ffff
+67e080be
+247a0000
+202056f7
+448fc003
+20400c6e
+7854fc00
+6fe0804d
+c28209a6
+20600000
+6fe0804d
+c3818000
+d8a00a01
+df200008
+20207d17
+44904004
+78347c00
+6fe0804c
+c4018000
+204009b2
+247a0000
+20207e56
+6fe08073
+1fe0ffff
+67e08073
+20600000
+4490c004
+6fe08031
+c28389bf
+6fe08877
+203a09bf
+70087700
+70095b18
+20407871
+202009bf
+44914004
+20400a63
+6fe08031
+79207e07
+67e08031
+7041ca01
+6fe08056
+c08b09c7
+20600000
+70087701
+6fe08031
+793ffe07
+67e08031
+20600000
+4491c004
+78547c00
+6fe10033
+d840ffff
+98467c00
+24628000
+6fe20035
+203809d7
+9d067e00
+202009d8
+9c467e00
+1fe67c04
+24610000
+18007e00
+67e10033
+20207e54
+1fe20400
+604a0035
+44924004
+70464201
+5800ffff
+67e10033
+70007401
+20600000
+4492c004
+204009cd
+24740000
+78547c00
+70001120
+793f800b
+793f8031
+2040133c
+20400af5
+c50589fa
+20400c66
+243a09ec
+c5188a04
+44934004
+78547c00
+1c427e00
+67e240d1
+78387c00
+7834fc00
+70095b2a
+20207871
+4493c004
+2040133a
+d8200010
+20400aeb
+79200031
+793f800b
+6fe08078
+98000800
+70001102
+202009ec
+6fe200b5
+1fe0fe08
+67e200b5
+78587c00
+7854fc00
+20401039
+20400c46
+44944005
+20400c8d
+20368a11
+20400c66
+243a0a0b
+202009f2
+6fe08032
+793ffe01
+67e08032
+20401376
+20401061
+78347c00
+70095b2b
+20207871
+4494c005
+79200009
+1a227e00
+67e1001f
+18007258
+d8a00287
+1a208c01
+efe08006
+1a220c00
+c2807d5f
+d8a00031
+20407d5f
+78577c00
+6fe08078
+98000800
+70008901
+20348a2b
+70008901
+6fe08031
+c4008000
+6fe08074
+67e08089
+6fe08075
+67e0808a
+20600000
+44954005
+6fe1001f
+98000a00
+18007258
+d8c00287
+203b7d5f
+d8c00031
+20207d5f
+df200001
+68488015
+18408401
+2841fe01
+24208a40
+d8400000
+60488015
+184ffe58
+da204040
+9a20a200
+efe08011
+c2808a48
+c3800000
+c3818000
+c2000a3c
+20600000
+4495c005
+da600a79
+20400a70
+24628000
+1a227e00
+67e1001f
+18007c00
+20600000
+20400f4d
+20208a5a
+6fe1001f
+1fe08a17
+6fe08048
+e7e08005
+da600ab9
+20200a70
+6fe08048
+2feffe03
+20208a5f
+18007c01
+20600000
+18007c00
+20600000
+da600ab6
+20200a70
+6849001f
+da600ade
+20200a70
+6848c1dc
+da600a84
+20200a70
+44964005
+684b41dd
+da600a7d
+20200a70
+da600a8a
+20200a70
+da600ad5
+4496c005
+da204040
+df200001
+efe08011
+1a627a00
+1a20a258
+c2000a73
+18007c01
+20600000
+c2800a75
+c2818a75
+18007c00
+20600000
+c2818a7f
+c3000a75
+1a208c10
+efe30006
+98467c00
+20628000
+20200a75
+c3000a75
+1a208c16
+efe08006
+98467c00
+20628000
+20200a75
+c3008a75
+20400ac2
+20400aa6
+98467e00
+1fe0fe01
+20210aa0
+18c22400
+67e48964
+6fe0c6ba
+243a0a98
+6fe48964
+1a420c00
+1fe0fe05
+20200a9b
+6fe48964
+1a420c00
+1fe0fe14
+24210a75
+18424200
+20400ace
+18007c00
+20600000
+98002400
+1a208c02
+efe10006
+203a0a9c
+20400ace
+20200a8b
+1ff11600
+196c9600
+20228ab0
+29601e0f
+24608000
+18511600
+196c9600
+24628000
+7920041c
+20600000
+18511600
+196c9600
+29601e0f
+24608000
+79207e1c
+20600000
+c3000a75
+18007c00
+20600000
+c3000a75
+1a208c01
+efe08006
+c2800a75
+1a208c17
+efe08006
+c3018a75
+18007c00
+20600000
+1a208c01
+e8408006
+1c427e00
+284ffe01
+1a208c04
+e8420006
+20608000
+1a208c08
+efe30006
+20401077
+1d027e00
+20600000
+1a208c02
+1a208a04
+efe10006
+98409600
+19627e00
+e7e20005
+20201705
+c3008a75
+20400ac2
+9b60fe00
+9b60fe00
+98e0fe00
+98467c00
+24210a75
+18007c00
+20600000
+c3000a75
+18427e00
+9a267c00
+203f0a75
+1a208c01
+efe08006
+c2800a75
+efe08011
+793ffe07
+e7e08011
+20200a75
+44974005
+2040133c
+1c40c201
+20401138
+18004803
+20401128
+2040133e
+20401343
+20401351
+20200f8a
+4497c005
+2040133a
+1c40c201
+20401138
+18004803
+20401122
+20400c3b
+204012d8
+20401348
+204012d3
+204012f9
+246c0000
+2040127d
+20200d44
+44984006
+6fe080e6
+98000800
+18000201
+20400ae9
+20200af3
+c61a0000
+6fe0c09b
+c4000000
+18000e04
+20407d74
+247a0000
+684940b5
+18000e04
+20400f44
+20740000
+20400b18
+18000e04
+6fe140b7
+242c7d66
+180a7e00
+9ea17e00
+20207d66
+4498c006
+7000e600
+78587c00
+78577c00
+204010fa
+1c4143fc
+18004801
+2040112e
+20401122
+7940001d
+6fe08006
+1fe0fe01
+67e08006
+20401148
+204012d3
+20401300
+246c0000
+44994006
+18003600
+2040114f
+6fe08007
+1fe0fe01
+67e08007
+2040112e
+2040133a
+1c21c202
+18004801
+20401128
+20401148
+2040133e
+2040134c
+1c427e00
+67e200b1
+20401351
+18000202
+18000800
+20401359
+20400f8e
+20400b42
+1c2143fd
+1cc0cc01
+20600000
+4499c006
+6fe0c0d8
+207a0000
+d8a000f1
+6fe0c5fc
+1fe27200
+1fe0fe01
+e7e08005
+18a20400
+1fe0fe01
+67e141e6
+18420a00
+58000009
+e7e08005
+d8c045fd
+20407d5f
+da604678
+df200004
+20400b64
+da604662
+df200001
+20400b64
+1800020a
+7041e502
+580000f1
+67e100bf
+2040133a
+20401128
+2040133e
+2040134c
+20401351
+20401359
+20400f8e
+20600000
+18a20400
+1a620c00
+efe08006
+207a0000
+1fe3fe00
+c2000b68
+1fe22200
+1fe0fe02
+1fe20e00
+6fe141e6
+98e0fe00
+67e141e6
+18420a00
+1a227e00
+1fe0fe01
+e7e08005
+1a620c00
+efe08006
+efe08006
+e7e08005
+1a227200
+20207d5f
+c61a0000
+6fe0c09b
+c4008000
+18000e05
+20407d74
+247a0000
+684940b9
+18000e28
+20400f44
+20740000
+18000800
+70001008
+793f800b
+20400b8b
+18000e05
+6fe140bb
+20207d66
+449a4006
+78587c00
+204010fa
+6fe08008
+1fe0fe01
+67e08008
+18004c00
+20401138
+1c40c201
+18004802
+449ac006
+20401122
+204012d3
+20401300
+246c0000
+2040114f
+6fe08009
+1fe0fe01
+67e08009
+18003600
+2040133a
+1c21c202
+18004801
+20401128
+2040133e
+2040134c
+20401351
+20400e80
+18000800
+69610157
+35330200
+1d01d003
+1c2143fd
+449b4006
+1cc0cc01
+20401122
+204012d3
+204012f3
+242c0bb5
+20401359
+20400d47
+c5058bbc
+449bc006
+6fe08010
+207a0000
+1fe0ffff
+67e08010
+2040133c
+20200bac
+449c4007
+793fd001
+79205000
+6fe0800a
+1fe0fe01
+67e0800a
+2040133a
+1c21c202
+20401128
+2040133e
+2040134c
+20401351
+20400e80
+2d000603
+20208bcd
+37cb8200
+20200bc9
+6fe200b5
+1fe1fe03
+1fe25000
+449cc007
+6fe300c8
+67e30041
+20400c46
+20400c8d
+20368bd9
+20400c66
+243a0bd4
+20600000
+449d4007
+20400c51
+20400a4a
+24628000
+70003200
+20401061
+20200a32
+449dc007
+20401073
+20400c05
+20740000
+449e4007
+20406561
+20400d3c
+24368bf4
+6fe14477
+20407e05
+20401376
+20406579
+20400c9a
+20400f7f
+20400f50
+20405394
+6fe0800b
+1fe0fe01
+67e0800b
+20401061
+449ec007
+20401527
+2040136d
+20210bfd
+204009ab
+24340bfd
+20400f20
+243a0be4
+20600000
+449f4007
+700a5100
+7000e400
+20400c6e
+793f8011
+20407e1d
+6fe08031
+20600000
+204009cd
+24740000
+18820400
+2040135d
+67e080e6
+18420800
+70001120
+449fc007
+2040133c
+18000202
+20400f77
+1c427e00
+67e200b1
+20400f8a
+2040133a
+7837fc00
+20400d1d
+202c0c1e
+2040114f
+20400c66
+243a0c0c
+c6820000
+70007d34
+79200003
+20600000
+78387c00
+20400c46
+204010fa
+44a04008
+20400b01
+202c0c2a
+20400c66
+243a0c21
+78587c00
+1d027e00
+67e240d1
+20600000
+7834fc00
+c5820c30
+793f8004
+70007d03
+70007e33
+20405a1d
+18827e00
+67e08078
+18007e00
+67e30039
+6fe08032
+79207e01
+67e08032
+20401376
+7854fc00
+78347c00
+20600000
+44a0c008
+7856fc00
+793f8005
+793f800a
+793f8010
+793f800f
+6fe08048
+793ffe05
+79207e04
+67e08048
+20600000
+44a14008
+70001120
+70004850
+6fe140c6
+67e1003f
+1c427e00
+67e240d1
+20780000
+1d027e00
+67e240d1
+20600000
+44a1c008
+20405390
+20400c6a
+67e08047
+58000000
+67e1030e
+58001c80
+67e10052
+6fe08031
+79207e00
+67e08031
+70004c00
+70004d00
+70009e00
+20201376
+44a24008
+18007e00
+67e441cb
+e7e40005
+204009c9
+20200a63
+6fe08011
+1fe0ffff
+67e08011
+20600000
+6fe0c0d6
+1fe0fe01
+67e0c0d6
+20600000
+44a2c008
+6fe0c1db
+c0018c73
+6fe08049
+c0808c77
+20404d88
+24228c77
+204009a8
+7041db00
+44a34008
+204031cc
+20400f16
+70095b02
+20407871
+20405382
+20404dc8
+20406ecc
+6fe08031
+793ffe00
+67e08031
+70478b00
+6fe0804d
+2fe18000
+20208c87
+793f8001
+6fe08048
+c3018c89
+6fe0804c
+c4030000
+793f8002
+20600000
+44a3c008
+6fe080c4
+207a0000
+1fe20800
+20400d3c
+24768000
+18000200
+20400f7f
+18827e00
+67e08078
+18007e00
+67e080c4
+20600000
+44a44009
+6fe08031
+c3010ca7
+18000207
+c5838ca6
+20400f4d
+24208ca7
+20370ca7
+20400ce8
+58000002
+67e140cf
+20600000
+24770000
+44a4c009
+20400a52
+24228cb8
+6fe08048
+c3018cc1
+c5028cc5
+6fe080e4
+c2830ccb
+6fe140cf
+1fe0ffff
+67e140cf
+203a0cb6
+6fe0c0cc
+98000200
+20600000
+44a54009
+20400ebb
+20400f4d
+20208cc1
+204056fb
+20340ccf
+6fe0804c
+c2830cdb
+c5028cc5
+6fe080e4
+c2830ccb
+18000201
+20748000
+18000200
+20600000
+44a5c009
+6fe0801a
+98000200
+c1808000
+18000200
+20600000
+6fe08a58
+1fe1020f
+79200005
+20600000
+18000213
+20400ce8
+20400de1
+207a0000
+7041e403
+6fe0838a
+1fe17ff8
+1fe97e00
+67e146b2
+1fe22200
+da60038b
+20206c9b
+20400cf1
+20400ce8
+20400de1
+207a0000
+6fe0c1e5
+1fe17e03
+67e0c1e4
+6fe141e6
+1fe22200
+67e146b2
+6fe100bf
+1fe22600
+20206c9b
+44a64009
+68488048
+79200403
+60488048
+18227e00
+67e0c0cc
+5800ffff
+67e140cf
+20600000
+44a6c009
+6fe0804d
+2feffe05
+6fe141e6
+20208d07
+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
+6fe08031
+c3008d1c
+6fe10033
+203a0d1c
+24370d1e
+2040133c
+1d00c201
+78287c00
+6fe1003f
+1fe37e00
+6849015d
+9840fe00
+20401311
+20401140
+18004803
+20401122
+20400c3b
+204012d8
+44a74009
+6fe1003f
+1fe37e00
+20401311
+204012d3
+7826fc00
+6fe1003f
+6849015b
+9840b600
+37c18400
+1b420400
+604b0098
+7846fc00
+246c0000
+6fe1015b
+1fe25200
+1c225000
+20359473
+20600000
+44a7c009
+20400d17
+242c114f
+2040127d
+c5888d44
+6fe109f6
+1fe0fe01
+67e109f6
+20404caf
+1c230400
+18419c40
+44a8400a
+7823fc00
+78257c00
+7825fc00
+09800003
+198cfe00
+67e080ad
+09800004
+08008007
+19827e00
+67e0801a
+09800003
+198cfe00
+67e080ae
+6fe0801a
+1fe67c03
+20210d5c
+c0038d5c
+6fe0804d
+2feffe05
+7920aa01
+44a8c00a
+09800008
+7845fc00
+78457c00
+20230e63
+c5888d65
+6fe109f8
+1fe0fe01
+67e109f8
+44a9400a
+6fe080ad
+2fe00e00
+7920800a
+20208d73
+a8800e00
+20208d71
+c5838e80
+6fe08048
+793ffe05
+79207e04
+67e08048
+20404cb2
+7836fc00
+44a9c00a
+6fe0801a
+1fe20200
+c5050d82
+684880ae
+6fe08048
+793ffe00
+284ffe00
+7920fe00
+284ffe01
+7920fe01
+67e08048
+284c0001
+20208d82
+20400ebb
+44aa400a
+d8400000
+20401309
+18217e0f
+c0008d9e
+c0000e80
+c0010e8c
+684880ae
+6fe08048
+a8400800
+24208d90
+c5850d8f
+c3038d90
+7920000f
+44aac00a
+18227e00
+c0018da0
+c0020da4
+c0040da3
+d8400004
+20401309
+c0050d9f
+c0058da2
+d8400008
+20401309
+c0070d9f
+c0078da2
+20600000
+20200e80
+79200010
+78267c00
+20200da5
+79200010
+79202a02
+7826fc00
+44ab400a
+c5198e80
+c5008e80
+2aac0001
+20208db2
+7843fc00
+7826fc00
+78467c00
+1c409602
+34530400
+242c0e6f
+79200010
+7823fc00
+44abc00a
+78277c00
+7824fc00
+09800003
+198cfe00
+67e080e5
+09800005
+c5080dbd
+19897200
+1f297200
+20200dc0
+09800005
+19837200
+09800003
+44ac400b
+1f227e00
+67e100af
+203a0dd8
+20400de1
+203a0dc8
+1f20f204
+1f227e00
+9ea67c00
+20210e6f
+44acc00b
+793f8000
+6fe080e5
+1fe17e03
+d8a000cf
+c0018de6
+c5088dd6
+6fe080e5
+1fe17e03
+c0010deb
+c0008dff
+20200e6f
+d8a01000
+20200e10
+20400de1
+203a0e14
+58000000
+67e146b2
+09800020
+1fef7e00
+1fecfe00
+67e20273
+20200e14
+6fe0804d
+c3017e60
+6fe0c645
+c0817e60
+20207e5e
+6fe100af
+1fe67c11
+24210e6f
+c5078e50
+20200e10
+44ad400b
+c5078e50
+6fe100af
+d84002e0
+98467c00
+20210e6f
+6fe08314
+c3000df5
+c3008dfa
+20200e80
+70031201
+6fe1030e
+c0800e80
+d8a01000
+20200e10
+70031202
+6fe10310
+c0800e80
+d8a01400
+20200e10
+44adc00b
+c5078e50
+6fe100af
+d84002e0
+98467c00
+20210e6f
+6fe08312
+c0008e09
+c0010e0d
+20200e80
+d8a01000
+6fe1030e
+98a08a00
+20200e10
+d8a01400
+6fe10310
+98a08a00
+09800008
+19897e00
+e7e08005
+c2000e10
+44ae400b
+09800010
+20230e69
+20400de1
+20407e58
+245a6ccc
+24360e70
+20404cae
+6fe0c5f3
+c0008e70
+c5088e3d
+c5078e7d
+6fe080e5
+2fe00603
+20208e3d
+6fe100af
+203a0e3d
+44aec00b
+6fe08312
+c0008e2a
+c0010e34
+2020137a
+6fe1030e
+684900af
+9840fe00
+67e1030e
+207a0000
+68491000
+18408404
+98467c00
+20428f6f
+20200e3d
+6fe10310
+684900af
+9840fe00
+67e10310
+207a0000
+68491400
+18408404
+98467c00
+20428f73
+44af400b
+6848804d
+6fe080e5
+2fe00603
+79208406
+7d208407
+6048804d
+24208e46
+79200001
+c5888e50
+284ffe06
+20208e50
+6fe109fa
+1fe0fe01
+67e109fa
+79200005
+793f8407
+793f8001
+6048804d
+44afc00b
+20400de1
+245a6cf3
+684880ae
+6fe08048
+79207e05
+284ffe02
+7920fe02
+280ffe0a
+7920fe07
+67e08048
+6fe100af
+243a0e80
+6fe0804d
+793ffe07
+67e0804d
+6fe080e5
+2fe00e01
+20200e80
+44b0400c
+7856fc00
+6fe1001b
+1fe0fe01
+67e1001b
+20200e80
+6fe1001d
+1fe0fe01
+67e1001d
+20400e71
+c5888e6f
+79200005
+20200e80
+20200e69
+44b0c00c
+6fe080e5
+2fe00603
+24208e79
+6848804d
+793f8406
+6048804d
+20600000
+6848804d
+793f8407
+6048804d
+20600000
+6fe08048
+79207e05
+67e08048
+44b1400c
+784efc00
+784e7c00
+7846fc00
+78467c00
+7844fc00
+78477c00
+7843fc00
+2030914f
+37d38200
+20000064
+2020114f
+44b1c00c
+7824fc00
+78267c00
+09800048
+2feffe3a
+79208000
+1c020400
+57e04000
+57e03c00
+782afc00
+380bffff
+380cffff
+20000020
+29a80000
+1d827e00
+67e180c8
+1da27e00
+67e080cb
+18424000
+20208ea1
+20200e6f
+44b2400c
+09800048
+57e03e00
+57e00800
+57e05c00
+57e02400
+18007e00
+09800010
+20230e6f
+20404cae
+5ffffffc
+9a417e00
+67e200b5
+1ba27e00
+67e180c5
+1b827e00
+67e080c3
+18827e00
+67e080c4
+1dc27e00
+67e100cc
+1c227e00
+08008220
+28201e02
+7920800b
+20200e80
+44b2c00c
+6fe08048
+c4018000
+793ffe03
+79407e06
+67e08048
+20400de1
+245a6cb9
+6fe0c0cc
+c0098ed2
+c1038000
+6fe0804c
+c4030000
+793ffe06
+79207e07
+67e0804c
+793f8002
+6fe144d6
+247a0000
+6fe0804c
+793ffe07
+67e0804c
+202052e0
+44b3400c
+6fe0c5f6
+1fe37e00
+c0088ee5
+c0090eef
+c00c0f16
+c03f8edd
+c1818000
+6fe0838c
+c0088ee0
+20600000
+6fe0838c
+79207e07
+20600000
+20748000
+6fe08031
+c3820000
+70007d31
+20600000
+44b3c00c
+6fe0804d
+79207e02
+67e0804d
+70801101
+18007e00
+67e2c6a1
+79207e25
+67e2c69c
+20600000
+44b4400d
+6fe0804d
+793ffe02
+67e0804d
+70801100
+20600000
+44b4c00d
+1c40a203
+20348ef9
+1d00a203
+68490033
+1a227e00
+793ffe1b
+9846fc00
+6fe10076
+20407def
+18072600
+9a667e00
+20210f03
+9840fe00
+9a20fe00
+67e20035
+70464200
+6fe08031
+79207e01
+67e08031
+6fe08074
+67e08089
+58000000
+67e1c16e
+67e1c171
+67e0c15e
+70095b0b
+20407871
+6fe140c8
+67e1003f
+24748000
+18808fff
+20600000
+44b5400d
+6fe08031
+c4008000
+793ffe01
+67e08031
+6fe140c6
+67e1003f
+7855fc00
+70095b0c
+20207871
+44b5c00d
+78377c00
+6fe08031
+c2808f2d
+c6088000
+6fe08048
+c3818000
+6fe08049
+247a0000
+6fe0804c
+c3830000
+18007e00
+20600000
+c3010f37
+6fe08089
+c0010f33
+6fe08048
+c2818f40
+c5840f40
+24348f40
+6fe08049
+243a0f40
+20200f2b
+6fe08089
+c0808f40
+6fe0808a
+203a0f40
+1fe0ffff
+67e0808a
+6fe08048
+c3818000
+24768000
+6fe08089
+1fe0ffff
+67e08089
+20600000
+44b6400d
+78487c00
+18423600
+20400a6f
+78547c00
+24628000
+18003600
+78347c00
+20600000
+6fe0c15d
+a881fe00
+20600000
+44b6c00d
+793f8001
+70031b00
+6fe08314
+207a0000
+2feffe00
+d8c01000
+2040cdd6
+44b7400d
+6fe0831b
+c0008f63
+70031b00
+6fe08314
+c4008000
+d8c01400
+20404dd6
+6fe0831b
+c0008f69
+20600000
+6fe08314
+793ffe00
+67e08314
+58000000
+67e1030e
+20600000
+6fe08314
+793ffe01
+67e08314
+58000000
+67e10310
+20600000
+6fe08314
+79207e00
+67e08314
+20600000
+6fe08314
+79207e01
+67e08314
+20600000
+44b7c00d
+1d00c201
+20401140
+18004803
+20401128
+2040133e
+2040134c
+20201351
+44b8400e
+2040133a
+1d027e00
+684a40d1
+98467e00
+c1808000
+28203e00
+24208f89
+6fe0801a
+207a0000
+20400f77
+28203e10
+20208e80
+1c230400
+18419c40
+44b8c00e
+7823fc00
+78257c00
+782dfc00
+793f8010
+18827e00
+08008603
+18227e00
+08008604
+6fe08048
+08008004
+08008603
+78247c00
+08008608
+784dfc00
+78447c00
+78457c00
+793faa02
+d8400000
+20401309
+44b9400e
+18217e1f
+c0098fd2
+c0000e80
+c0008e80
+c0010fb3
+c0018fe1
+c0020fe7
+c0040fe6
+d8400004
+20401309
+c0050fe3
+c0058fe9
+d8400008
+20401309
+c0078fe9
+20200fe3
+44b9c00e
+6fe080e6
+1fe20800
+6fe0808e
+1fe23800
+6fe1c0b2
+1fe23a00
+6fe140ac
+1fe25c00
+7824fc00
+782e7c00
+1c022200
+20401138
+782afc00
+20000020
+1c221600
+6fe200b1
+1fe24200
+53c07e00
+79207e3a
+08008648
+53e07e00
+08008648
+19624200
+1a224000
+78247c00
+08008610
+78447c00
+20200e80
+78477c00
+20200fd6
+44ba400e
+20400de1
+243a0fd0
+78277c00
+7824fc00
+782e7c00
+6fe0838a
+1fe105f8
+d8c0038a
+18408408
+18497200
+efe08006
+08008608
+c2000fdd
+20201013
+782e7c00
+20200fec
+782e7c00
+79200010
+20200fec
+79202a02
+782efc00
+20200fec
+79202a02
+782efc00
+79200010
+44bac00e
+6fe0804d
+c3029001
+18267c03
+20211001
+78477c00
+784e7c00
+782efc00
+7843fc00
+79202a01
+2aaffe02
+20208ffb
+580abeee
+08008614
+20200fff
+585faeba
+08008618
+58000012
+08008606
+7823fc00
+79200010
+78277c00
+7824fc00
+c5029021
+6fe0c1e5
+08008603
+6fe141e6
+98007200
+c508100b
+08008605
+2020100c
+0800860d
+1f227e00
+203a1013
+6fe100bf
+98000c00
+efe08006
+08008608
+c2001010
+44bb400e
+20400de1
+203a1018
+6fe2026f
+08008620
+78247c00
+08008610
+78447c00
+20400ce8
+6fe0804d
+c3028e80
+18007e00
+08008606
+20200e80
+44bbc00e
+c5081029
+6fe080e5
+08008603
+6fe080af
+98002600
+08008605
+2020102e
+6fe080e5
+08008603
+6fe100af
+98002600
+0800860d
+d8c01000
+1a627c00
+20229035
+efe08006
+08008608
+1a60a7ff
+2020102f
+6fe109fc
+1fe0fe01
+67e109fc
+20201013
+6fe200b5
+1fe0a207
+6fe100c1
+243a103f
+1a20a3fd
+20201047
+1feffe0c
+68590040
+18408401
+98467e00
+24211046
+1a20a3ff
+20201042
+1fe67e00
+37d18200
+2c400600
+24209047
+98005200
+1a225000
+98005200
+20600000
+44bc400f
+37d10200
+1b427e00
+98000c00
+1ff17e00
+9c467200
+1f217203
+24229058
+18007e00
+2020105c
+68490163
+18007e00
+9840fe00
+c200105a
+98c0fe00
+1fe6fc0c
+20407dec
+67e100c1
+20600000
+44bcc00f
+1b427e00
+1b220400
+98467c00
+7d217e2c
+98460400
+6fe10163
+284c000f
+2020906f
+18426000
+d8410000
+6fe10163
+98467e00
+9e008400
+604b028f
+207b0000
+604b0039
+20600000
+78587c00
+6fe3028f
+203b1077
+6fe30039
+9b20e000
+1e00e00a
+6fe10163
+9e067e00
+2fec000f
+20209083
+58010000
+6b010163
+9b067e00
+9e00e000
+1e023400
+20600000
+18007c00
+20201081
+203b10ad
+58402c17
+67e189ee
+19317e00
+1fe90400
+df200030
+58000000
+67e189f1
+18437e00
+9842fe00
+1fe17e03
+c3009092
+1fe0ffff
+d8a009f1
+98a08a00
+efe08005
+1fe0fe01
+e7e08005
+18430400
+c200108d
+da2009f3
+da4009ee
+da600000
+df200003
+efe08011
+e8408012
+984ffe00
+9a60a600
+1a20a3ff
+1a40a401
+c200109d
+6fe089ef
+1fed7e00
+1ff27e00
+9a66fc00
+20407def
+1807fe00
+67f10938
+67e109f4
+20600000
+6fe109f4
+67f10938
+20600000
+58402d19
+67e189ee
+192f7e00
+1fe90400
+df200020
+2020108b
+44bd400f
+20401161
+1c227e00
+1fe17f80
+2c800e03
+242090bf
+1fe97e00
+9ae0fe00
+202010c0
+1ae27e00
+1fe6fc4f
+782afc00
+20407def
+18072200
+1a2085d8
+202110c8
+1a238400
+202010ca
+18438400
+18408401
+44bdc00f
+6fe08032
+c30190db
+6fe240d9
+9c267c00
+202110db
+204010fa
+6fe0c0e0
+207a0000
+6fe08032
+79207e02
+67e08032
+6fe2c0ee
+67e2c0e1
+efe28006
+67e2c0e6
+204010ff
+6fe08032
+c4010000
+2c2ffe01
+202090f7
+18492200
+18410e07
+580040e1
+9a20a200
+efe08011
+afec0000
+202090e8
+18427e00
+202010f4
+6fe0c0eb
+98002400
+1c227e00
+1fe17f80
+1fe97e00
+9ae0fe00
+9a46fc00
+580040f9
+20407def
+18072200
+9a208c00
+efe08006
+67e0c0ec
+98000400
+20600000
+6fe0c0ec
+98000400
+20600000
+6fe08032
+793ffe02
+793ffe03
+67e08032
+20600000
+44be400f
+d8a040f9
+1800720a
+20407d17
+d8a040f9
+18002600
+18000e02
+6fe2c0e1
+98000400
+28e1fe02
+2020910b
+18430400
+284c0000
+2020910f
+1a627e00
+e7e08005
+184b0400
+1a60a602
+2a61fc28
+24209118
+6fe2c0e6
+98000400
+28e1fe02
+20209118
+18430400
+1a667c4e
+2021110b
+18002601
+18e08fff
+24229106
+da2040f9
+18a27e00
+9a267e00
+67e0c0eb
+20600000
+44bec00f
+204010b6
+6fe080e4
+c3029127
+684883a0
+2020118f
+44bf400f
+204010b6
+6fe080e4
+c302112d
+6848839f
+20201205
+18005a00
+6fe1c0af
+98005800
+20600000
+44bfc00f
+6fe0c1e0
+1fe25a00
+6fe1c1dd
+1fe25800
+20600000
+44c04010
+6fe140ac
+1fe25c00
+6fe0c0ab
+1fe25a00
+6fe1c0a8
+1fe25800
+20600000
+44c0c010
+6fe10045
+1fe25c00
+6fe08044
+1fe25a00
+6fe18041
+1fe25800
+20600000
+c510114b
+c68e8000
+c68f8000
+1d815900
+782afc00
+20000020
+20600000
+44c14010
+20404cad
+18002a08
+18002a00
+7850fc00
+78507c00
+782f7c00
+70890005
+20000002
+70890000
+20401161
+708a1600
+708a0a10
+6ff08a09
+793ffe07
+67f08a09
+708a0b00
+2020129c
+44c1c010
+70890005
+20000002
+70890000
+6fe0c0c5
+c00c1168
+c004117d
+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
+20201178
+44c24010
+6fe0c0c5
+1fe67c18
+2042919a
+244291a0
+60488017
+1840fe00
+c5169198
+1840fe01
+204011c5
+20201085
+708a4300
+708a3d04
+708a3e00
+708a8403
+708a8940
+20600000
+708a4330
+708a3d06
+708a3e00
+708a8420
+708a8915
+20600000
+44c2c010
+20404ca7
+6fe0c1ea
+c07f91af
+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
+202011d4
+44c3c010
+6fe0c0c5
+1fe67c18
+204291f7
+244291fe
+58000960
+9a20fe00
+1fe3fe00
+6848c0c5
+184f8403
+18438400
+9846fc00
+20407def
+1807fe00
+67f08a3f
+18077e00
+1ff07e00
+1fed7e00
+9846fc00
+20407def
+1807fe00
+67f08a42
+1fecfe00
+67f08a41
+1fecfe00
+67f08a40
+68588a43
+184104f0
+60588a43
+2000000c
+6fe0c0c5
+c00c11eb
+c00411f1
+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
+204011ca
+200003c0
+44c4c011
+708a10aa
+708a112a
+708a1210
+708a0a7f
+6ff08a09
+793ffe07
+67f08a09
+708a0b07
+2000003c
+708a190d
+708a1af9
+708a1000
+708a1120
+2000000a
+70890001
+20000002
+70890003
+44c54011
+6fe0c1e8
+c001922d
+c0029232
+c0031235
+c0039238
+c005123b
+c041923e
+c0429241
+c04a1244
+c04f1247
+708a396a
+708a3a07
+708a14a3
+708a1507
+20600000
+708a3966
+708a3a0b
+708a14aa
+708a150a
+20600000
+708a396c
+708a3a0d
+2020122f
+708a396b
+708a3a0f
+2020122f
+708a39a7
+708a3a0f
+2020122f
+708a39b6
+708a3a0f
+2020122f
+708a3968
+708a3a05
+2020122a
+708a3960
+708a3a05
+2020122a
+708a3953
+708a3a01
+2020122a
+708a394c
+708a3a00
+2020122a
+70804206
+6fe140ca
+c307124b
+98000c00
+d8408a00
+efe08006
+c07f9255
+98418a00
+efe08006
+e7e08005
+2020124f
+44c5c011
+708a8be6
+2040126a
+20401271
+20401277
+708a6d09
+708a0305
+708a7a94
+6fe0c0c5
+c0841260
+708a0834
+708a01ff
+20000064
+708a020e
+708a0003
+20401228
+708a9a2b
+708a9b13
+70804205
+7041f00c
+202016b2
+6fe0c4d1
+203a126f
+1fe1fe20
+67f08a87
+20600000
+708a8729
+20600000
+6fe0c4d2
+203a1275
+67f08a0d
+20600000
+708a0d00
+20600000
+6fe0c4d3
+203a127b
+67f08a6c
+20600000
+708a6cd3
+20600000
+44c64011
+70001920
+6ff089a0
+67e0c1e9
+1fe67cfc
+24610000
+1fe67c7f
+20610000
+6ff089a3
+1fe1040f
+18438400
+1ff1fe00
+98408400
+184f8403
+6fe0c1e9
+1fe67eff
+9840fe00
+1fe0fffb
+67e08019
+20600000
+6fe08019
+20401295
+67e08018
+20600000
+1fe17eff
+1fe6fc0a
+20407dec
+1ff27e00
+18070400
+9841fe00
+20600000
+6fe0c1ea
+c17f8000
+242c12c2
+6fe0c1e9
+1fe67cf0
+242112c6
+1fe67c7f
+202112c6
+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
+c00092cb
+c00112cd
+202012cb
+6fe0c1ea
+c00012cd
+c00092c9
+7041ea02
+20600000
+7041ea00
+20600000
+7041ea01
+20600000
+58000f0f
+20201591
+5800080f
+20201591
+44c6c011
+78507c00
+7830fc00
+782b7c00
+202011a6
+44c74011
+20400de1
+243a12e8
+6fe0804d
+2feffe02
+7920fe00
+67f08011
+d8c00063
+efe48006
+98006400
+efe38006
+98006600
+6fe08055
+1fe0e9ff
+782d7c00
+20600000
+70801100
+20600000
+1b427e00
+67e30098
+7846fc00
+242c114f
+6fe1015b
+1fe25200
+1d00d001
+1d0151fc
+20600000
+7826fc00
+37cb8400
+202c12ea
+2d000402
+242092f4
+202012ea
+44c7c011
+69610159
+7826fc00
+34730400
+7846fc00
+242c114f
+20600000
+44c84012
+7826fc00
+37c18400
+7846fc00
+242c114f
+6fe1015b
+1fe25200
+1d0151fc
+20600000
+44c8c012
+98002200
+1c227e00
+98409600
+19627e00
+67e240d1
+1a227e00
+20600000
+1fe20400
+44c94012
+18427e00
+20407db1
+1c307e00
+79207e2c
+20407d97
+793ffe2c
+20401365
+20407d97
+20740000
+20407da4
+98003600
+37c18200
+20600000
+44c9c012
+20381325
+35330200
+1d020400
+20201328
+20371327
+34730200
+1c420400
+20341334
+28400601
+24209320
+44ca4012
+6fe08031
+c4000000
+6fe240d1
+98467e00
+24610000
+1fe67cff
+20211320
+20600000
+28400603
+24209320
+2020132b
+44cac012
+69610157
+20201320
+78547c00
+20201337
+78347c00
+20201337
+44cb4012
+204012d8
+7850fc00
+78307c00
+20600000
+44cbc012
+69610155
+34730200
+782b7c00
+20600000
+44cc4013
+6961015f
+34730200
+20600000
+44ccc013
+69610155
+35330200
+782b7c00
+20600000
+44cd4013
+20404cb5
+51207e00
+782efc00
+79202a00
+08008648
+784efc00
+20600000
+1ca20400
+18418460
+18421c00
+20600000
+44cdc013
+6fe0c098
+1fe0fe01
+c0839362
+18007e01
+67e0c098
+98000800
+20600000
+1b220400
+20748000
+1b420400
+20600000
+1c427e00
+20748000
+1d027e00
+20600000
+44ce4013
+684a004e
+20401369
+98461600
+19627e00
+68490052
+18438400
+98467e00
+20600000
+44cec013
+20401369
+67e2004e
+20600000
+44cf4013
+2020137a
+2020137c
+207a0000
+1fe37e00
+1fe0fffd
+1fe0ffff
+24229380
+18007e00
+20600000
+df200010
+d8a00000
+20407d17
+d8a00287
+df20000a
+20407d17
+70087400
+70095b00
+7002df00
+7000e400
+7003a500
+7000bd00
+700a5100
+700a5c00
+589e8b33
+67e1c0af
+70008e60
+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
+20406dfb
+58000880
+d8a00870
+98a67200
+20407d26
+44cfc013
+20758000
+7045f709
+5800050e
+67e145f8
+58000008
+67e145fa
+7044cf7f
+58000024
+67e140b5
+67e140b9
+58000200
+67e140b7
+67e140bb
+58000020
+67e140c3
+67e140bf
+58002000
+67e140c1
+58000480
+67e140c6
+58000c00
+67e140c8
+58000c3f
+67e1417e
+58000333
+e7e10005
+5824109d
+67e1c183
+20407fdc
+58000000
+67e141e6
+1c437e00
+67e2409c
+20600000
+70804206
+70804201
+2000000a
+58001d4a
+67f10040
+20600000
+580013e4
+67e14463
+580013e4
+67e14465
+20600000
+6fe08031
+c30093ea
+7920000d
+6fe3416e
+67e345fd
+20600000
+6fe08a51
+c4010000
+6fe08a5c
+1fe0fe01
+67e08a5c
+c1828000
+700a5c00
+6fe08a51
+793ffe02
+67e08a51
+c281940b
+2feffe07
+2040fe19
+2440fe1d
+6fe08a58
+2fe06020
+6fe0804d
+7920fe05
+67e0804d
+6fe08a51
+684880e4
+2feffe04
+79208406
+2feffe06
+79208404
+79208405
+604880e4
+6fe08a54
+67e0839f
+6fe08a55
+67e083a0
+79200011
+20600000
+793f8011
+700a5100
+6fe08a5b
+67e080e4
+20207e1d
+5800ee21
+67f10050
+6ff2011c
+67e2098a
+6ff0813b
+67e08989
+6ff0813e
+c301db6a
+7835fc00
+c3039421
+7855fc00
+1ce27e00
+243a1421
+6ff0813b
+c2811421
+d85fffff
+202014b0
+6ff20134
+67f2004c
+6ff08135
+1fe17ee0
+67f0804d
+204015af
+6ff1813c
+67f1804c
+efe08006
+1fe1feef
+e7e08005
+2040159c
+6ff0804f
+79207e04
+67f0804f
+2040159c
+20559453
+6ff0804e
+793ffe03
+67f0804e
+2040159c
+2435db6a
+2040143b
+c6958000
+70800608
+20600000
+6fe1c4cc
+207a0000
+67e18a01
+20205c49
+6fe0c4d0
+c0009447
+c001144b
+c001944f
+6fe0c183
+1fe17ee0
+67e0c183
+20600000
+6fe0c183
+1fe17ee0
+1fe1fe1d
+20201445
+6fe0c183
+1fe17ee0
+1fe1fe1b
+20201445
+6fe0c183
+1fe17ee0
+1fe1fe17
+20201445
+6fe0c1a5
+67f08086
+d8c04186
+d8a08070
+20407d01
+6fe4419d
+98000000
+6ff40140
+67e4009f
+20205c05
+18027e00
+67e4419d
+d8c08070
+d8a04186
+20407d01
+6ff08086
+67e0c1a5
+202015b1
+6ff08085
+1ff1fe00
+243a146e
+6fe1c174
+247a0000
+6ff08085
+1fe1fec0
+67f08085
+70800680
+6ff0812d
+c4008000
+6ff18149
+67e1c174
+20600000
+44d04014
+1b427e00
+20407d95
+684a4164
+18467cff
+20610000
+1fed7e00
+1ff27e00
+9846fc00
+20407dec
+d84000c8
+20407dfa
+67e08097
+24341482
+1fe67e00
+6849c174
+9840fe00
+67e1c174
+58000000
+67e24164
+20600000
+6fe0c17c
+79207e02
+67e0c17c
+20201490
+d85fffff
+6fe0c17b
+793ffe07
+67e0c17b
+44d0c014
+204015b1
+6fe0c15c
+67e0c181
+6fe0c17f
+79207e07
+67e0c17f
+44d14014
+204012cf
+6fe24164
+9840fe00
+67e24164
+2040145d
+2040143f
+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
+202294c0
+6ff0813c
+6858813d
+98467c00
+202114be
+18427e00
+9ce67e00
+1fe0fe01
+1fe0fe0a
+37d98200
+9e20fe00
+684a4160
+9840fe00
+6849c174
+984ffe00
+1fecfe00
+1ff1fe00
+1fe0fe6e
+68490163
+9846fc00
+20407dec
+1ff07e00
+18070400
+9841fe00
+684b4168
+20407d8a
+18423200
+6fe34048
+20401077
+1b427e00
+67e3095c
+1ce27e00
+e7e08005
+6ff0811d
+1fe1fef0
+e7e08005
+20600000
+44d24014
+20401465
+6fe1c174
+207a0000
+6fe0c099
+207a0000
+6fe0c764
+203a14e7
+6fe0c6b9
+207a0000
+6fe0c6ba
+247a0000
+c61a0000
+da600ab9
+20400a70
+20628000
+204015c2
+247a0000
+6fe0c040
+2fe00e03
+24209514
+6fe14042
+207a0000
+20758000
+44d2c014
+6848809e
+6fe14042
+984ffe00
+18518400
+184b0400
+98467e00
+684a4044
+9840fe00
+6848c15b
+98467e00
+1ff06000
+44d34014
+6fe1404e
+1fe37e00
+20407db1
+1e027e00
+20407d97
+1b420400
+20407d95
+20740000
+20407daa
+44d3c014
+6fe0c17d
+98467c00
+20211485
+604a4160
+20403143
+2040534e
+684a4160
+20201497
+44d44015
+6fe0c040
+c3800000
+c3818000
+6fe0c764
+203a151c
+6fe0c6b9
+207a0000
+6fe0c427
+243a1520
+6fe0c09b
+207a0000
+6fe14159
+207a0000
+6848c15b
+98467e00
+d8401d4c
+984ffe00
+2020150a
+44d4c015
+7855fc00
+6fe08031
+c4008000
+24369549
+20401544
+6fe140c8
+67e1003f
+6fe08048
+c2819557
+c5869557
+204052f7
+243a1557
+6fe0c643
+c2809557
+6fe14471
+20407e05
+243a1557
+70009e00
+c5869557
+6fe0c179
+203a155b
+1fe0ffff
+67e0c179
+20600000
+d8e00001
+202057e4
+d8e00001
+202057e8
+70415e00
+6fe1c16e
+1fe0fe01
+67e1c16e
+20600000
+44d54015
+684940c8
+18430400
+6fe1003f
+9840fe00
+67e1003f
+70009e00
+6fe1c171
+1fe0fe01
+67e1c171
+6fe0c15e
+1fe0fe01
+67e0c15e
+20600000
+70009e00
+6fe0c178
+67e0c179
+20600000
+6848c177
+6048809e
+20600000
+44d5c015
+6fe0c17d
+247a0000
+70804206
+58000f0c
+20401591
+58030d40
+2040137d
+37d98200
+1e226000
+204012cf
+70804204
+2000000a
+37d98200
+1e227e00
+9e067e00
+1fe0fe30
+d84000ff
+20407dfa
+67e0c17d
+20007530
+20007530
+20007530
+20600000
+6fe0c17d
+247a0000
+708044ff
+70804206
+204012cf
+580003e8
+9e20e000
+07e00000
+1e227e00
+20002ee0
+20002ee0
+20002ee0
+20002ee0
+20002ee0
+20002ee0
+20002ee0
+20002ee0
+20002ee0
+9e067e00
+1fe0fe30
+d84000ff
+20407dfa
+67e0c17d
+20007530
+20007530
+20007530
+20600000
+d8a00fff
+98a10a00
+6fe0c17a
+1fe17ef0
+1fed7e00
+98a1fe00
+67f1004c
+efe10006
+e7e10005
+58000001
+2020159d
+58000002
+37d98200
+67f08005
+37d98200
+37d98200
+20600000
+70418200
+6ff20134
+67f2004c
+6ff08134
+1fe17ec1
+67f0804c
+202015af
+7041823e
+6ff20134
+67f2004c
+6ff08134
+1fe1fe3e
+67f0804c
+58000020
+2020159d
+44d64015
+6fe2009f
+67f2004c
+58000004
+2040159d
+6fe200a3
+67f2004c
+58000008
+2020159d
+6fe14157
+f9207e00
+67e14157
+20600000
+6fe14157
+f93ffe00
+67e14157
+20600000
+44d6c015
+20403141
+6fe14157
+1fe22200
+6fe0804d
+2feffe06
+7920a20b
+6fe08079
+6848807d
+9840fe00
+68488049
+9840fe00
+7d3a220a
+6fe1c4f0
+7d3a2201
+6fe1030e
+68490310
+9840fe00
+7d3a220d
+6fe44772
+7d3a220f
+6fe4477a
+7d3a220e
+6fe0c1db
+7d3a2208
+6fe0c09a
+2fe1fe0a
+204095e1
+1a227e00
+67e14157
+20600000
+6ff10112
+7d3a2206
+6ff1010e
+7d3a2205
+20600000
+6ff20138
+793ffe1b
+67f2004c
+2040159a
+2020137a
+6ff2013c
+793ffe14
+67f2004c
+2020159c
+474dc033
+7855fc00
+70029d01
+70028703
+70029e01
+5fffffff
+67e102a1
+18007e00
+67e0829f
+67e082aa
+67e1c16e
+67e1c171
+20401955
+7041f501
+7041f600
+7002bc01
+7002bd01
+70443500
+20201a30
+474e4033
+7834fc00
+70028803
+70443701
+70099e01
+5800ffff
+67e109a0
+18007e00
+67e2c6a1
+79207e27
+67e2c69c
+202015ef
+474ec033
+7854fc00
+58000017
+67e14382
+1fe0fe04
+67e14444
+70028801
+70442700
+70009e00
+2040167a
+6fe102b5
+67e14394
+6fe10289
+1feffe05
+1ff1fe00
+67e102b5
+202015ef
+474f4033
+204016a5
+6fe08287
+2feffe04
+79208032
+2040310f
+6fe08288
+c2809628
+2020163a
+474fc033
+7834fc00
+20401a27
+20211637
+204016f6
+2040196a
+7856fc00
+20401828
+24768000
+6fe08005
+1fe0fe01
+67e08005
+2040191b
+7854fc00
+20600000
+2040166e
+7854fc00
+20600000
+47504034
+7043dd00
+793f8030
+20407597
+204020b7
+78577c00
+20401a27
+2021166e
+6fe082bc
+2040168b
+204016f6
+2040174e
+242c1660
+2040167e
+2036964b
+c518164b
+2020165a
+4750c034
+6fe0c3dd
+1fe0fe01
+67e0c3dd
+c006165a
+2040191b
+2040196a
+6fe082bd
+2040168b
+20401836
+204019cd
+6fe1446d
+20407e05
+20401663
+20341668
+47514034
+2040207d
+20402074
+20407887
+6fe082aa
+c281966e
+4751c034
+20401afa
+20201061
+78547c00
+c5157e54
+c514fe54
+c5187e54
+20600000
+47524034
+78377c00
+2040182c
+2036964b
+c518164b
+2020165a
+4752c034
+20401675
+204031d1
+2040167a
+204020c5
+70095b15
+20207871
+d8a044e6
+20407d1b
+70029d00
+70028800
+70028700
+47534034
+70439c00
+70439b00
+20206ecc
+4753c034
+6fe08005
+1fe0fe01
+67e08005
+6fe08287
+c3818000
+79207e03
+67e08287
+6fe14394
+67e102b5
+58000000
+67e243bc
+20600000
+1fe20400
+47544035
+18427e00
+c28016a5
+c2809694
+c30116a5
+c28396a2
+c281169a
+202016a5
+204016a5
+7920002d
+793f802f
+70890103
+70892084
+20600000
+204016a5
+7920002f
+793f802e
+70890105
+70892080
+70893020
+7089340a
+20600000
+2040169a
+7920002e
+20600000
+4754c035
+783b7c00
+793f802d
+793f802f
+70890101
+70892080
+708925a7
+70893003
+70893358
+7089340a
+70893740
+708a6d09
+20600000
+47554035
+785b7c00
+793f8032
+70890100
+70892080
+708925a3
+70893003
+70893368
+70893409
+70893728
+708a6d09
+20600000
+7844fc00
+7843fc00
+6fe182af
+98001e00
+6fe08016
+1fed8400
+79200401
+18431c00
+20600000
+204016d0
+2040118f
+6fe1015d
+2040137d
+202011a6
+2036920b
+c518120b
+204016d0
+20201205
+4755c035
+20401161
+6fe082df
+243a16e3
+6fe08016
+1fe67c24
+202116dd
+18000400
+c1128000
+18000418
+c1130000
+1800044e
+20600000
+1fe67c0a
+202116e0
+1fe0fe01
+1fe3fe00
+1fe08402
+20600000
+6fe08016
+1fe38400
+20600000
+d84001f4
+207a0000
+d84000fa
+c1008000
+d8400096
+c1010000
+d8400064
+c1018000
+d840004b
+c1020000
+d8400032
+c1028000
+d8400028
+c1030000
+d8400014
+20600000
+47564035
+78287c00
+6fe202ab
+98001200
+204010b0
+2040172c
+58000200
+20349700
+6fe10295
+1fe37e00
+6849015d
+9840fe00
+20401311
+1b427e00
+20600000
+4756c035
+20407cd0
+67210987
+1a208c01
+efe08006
+c4000000
+1a208a1a
+efe10005
+1fe0fe01
+e7e10005
+20401898
+204018bd
+204018c6
+20401716
+20407cde
+6f210987
+20600000
+1a208c19
+efe08006
+1a208a18
+e8408005
+9840fe00
+1fe67c24
+2021171e
+1fe0ffdb
+e7e08005
+20600000
+1a208c30
+efe28006
+18000400
+18007225
+c3001726
+18408401
+1fe37e00
+c2001724
+1840ffff
+1a208a22
+e7e08005
+20600000
+47574035
+6fe0829f
+98000e00
+684a82b7
+a84fffff
+20209741
+6fe082a9
+98e67e00
+20211737
+1fe60fff
+20201732
+18e27200
+18000e00
+a84fffff
+2020973c
+1f20f201
+1f227e00
+203a1741
+18e08e01
+1f20f3ff
+20201739
+18e27e00
+67e08016
+20600000
+20349747
+37c18200
+20600000
+d9600ea0
+34730200
+20600000
+78487c00
+6fe143e5
+1fe21600
+20201754
+4757c035
+204017b8
+78287c00
+6fe10295
+684a43bc
+98409600
+204016c7
+47584036
+204016be
+c597975c
+783cfc00
+2000001e
+204016be
+19699600
+7856fc00
+7826fc00
+7830fc00
+78507c00
+19623600
+37c18400
+20371765
+1b420400
+604b0098
+242c17f3
+4758c036
+78287c00
+db604eab
+6fe0c1f0
+9b6fb600
+20404caf
+20371772
+204017f7
+6fe08287
+c3019772
+684b0098
+20559473
+2040127d
+7823fc00
+7824fc00
+09800008
+19897e00
+67e0816b
+09800008
+19897e00
+67e0816c
+1fe27200
+20229797
+c5191783
+09800008
+19897e00
+e7e08005
+c200177e
+20201797
+18a22400
+20401914
+6a20816c
+1a20a3fc
+242117eb
+204017bd
+1a420a00
+d8400000
+6f20816c
+1f20f3fc
+20229795
+09800008
+19897e00
+e7e08005
+18408401
+18417c0f
+204297da
+c200178e
+204017e2
+1a420a00
+47594036
+09800018
+1fef7e00
+1ff17e00
+e7e18005
+78287c00
+20401805
+202317ef
+c59917a9
+6fe0816c
+203a17a9
+1fe0fffc
+67e0816c
+20406d53
+6ff08108
+c30397eb
+1800700c
+65e20273
+20404cae
+7836fc00
+793f8030
+20406d55
+6fe082bc
+7d3e7e07
+67e082bc
+4759c036
+68488017
+1840a202
+c51697b5
+1840a202
+7846fc00
+20401161
+202011ca
+c6990000
+20406dc7
+1800700c
+20406dcc
+20206dcb
+7080d500
+7080d601
+6fe0816b
+1fe17e03
+67f080d7
+5800016d
+67f100d1
+67f100d3
+6a20816c
+1a20a3fc
+684ac6a1
+280ffe0f
+204097d0
+20406c61
+58000000
+67f100da
+70800a06
+70800a07
+20600000
+18467c00
+202297d5
+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
+202017f5
+20401805
+20400e80
+202017a9
+20404cb0
+c51817f3
+79200030
+202017ac
+793f8030
+202017f5
+20406d55
+20200e80
+c51797fd
+c5169801
+6fe10165
+1fe25200
+1c225000
+20600000
+6fe10169
+1fe25200
+1c20d001
+20600000
+6fe10167
+1fe25200
+1c225000
+20600000
+6fe0816c
+1fe08405
+18498400
+6fe082bc
+c517980c
+c280180e
+c280980f
+203e1811
+20201814
+20201819
+18430400
+20201819
+18408403
+18438400
+20201816
+18408403
+18498400
+58000028
+98408400
+20201819
+6fe0c1f0
+984f8400
+da204e20
+9a2ffe00
+98460400
+1b627e00
+98463600
+20600000
+20401838
+68488017
+2040118f
+204011a6
+78287c00
+d960157c
+20201755
+475a4036
+6fe082bd
+2040168b
+20401838
+6fe082bc
+2040168b
+68488017
+2040118f
+204011a6
+78287c00
+d960157c
+c5979755
+d9602134
+20201755
+20401838
+20200e80
+475ac036
+204016be
+204016cc
+20404cb5
+79202a00
+782efc00
+78307c00
+7850fc00
+20401744
+785d7c00
+c517987a
+c516988c
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+7823fc00
+7824fc00
+475b4036
+6fe0c1f5
+08008608
+efe08006
+1fe27200
+08008608
+1f267c00
+20229859
+6ff0800a
+203a1855
+c519186f
+d8c041f7
+efe08006
+08008608
+c2001856
+78247c00
+08008618
+78447c00
+c5979860
+7843fc00
+58000000
+08008603
+37d38200
+20000064
+784efc00
+785c7c00
+20401161
+20404cb3
+6fe0c1f5
+1fe17e03
+c1818000
+6fe0c39c
+c0011955
+c1828000
+6fe0c1f7
+c0029950
+20600000
+1f20f3fc
+1f220400
+20406d40
+d8c041f7
+efe08006
+08008608
+c2001873
+20406d45
+1de27e00
+08008620
+20201859
+df20000a
+5800003c
+08008608
+c200187b
+784efc00
+783c7c00
+19317e00
+1ff17e00
+1ff1fe00
+08008620
+c5171889
+58000001
+08008605
+783d7c00
+20201848
+58000000
+08008605
+20201848
+6fe0c1f0
+1fe37200
+20000002
+c200188e
+19317e00
+1fecfe00
+1ff18400
+18427e00
+08008608
+18427e00
+08008628
+20201848
+da60189c
+da4018b0
+d8e00005
+202018f4
+1a208c04
+e8420006
+1a208c37
+efe08006
+1a208a2b
+e7e08005
+efe10006
+1febfe00
+98409600
+1a208a04
+19627e00
+e7e20005
+efe10006
+1febfe00
+1a208a02
+e7e10005
+efe20006
+1a208a2c
+e7e20005
+20201a33
+efe08011
+793ffe03
+e7e08011
+6fe102b5
+67e14394
+62210970
+70095b44
+20407871
+6a210970
+1a208c2e
+efe10006
+67e14394
+20600000
+da600000
+da4018c1
+d8e00006
+202018f4
+1a208c37
+efe28006
+1a208a30
+e7e28005
+20201720
+da600000
+da4018ca
+d8e00007
+202018f4
+1a208c37
+efe08006
+204018d7
+e7e08005
+1a208c38
+efe08006
+204018e5
+e7e08005
+62210970
+70095b42
+20407871
+6a210970
+20600000
+205a18df
+1a208a35
+24748000
+6848c442
+284ffe07
+7920fe07
+1a208a36
+20600000
+1a208c35
+efe08006
+24748000
+1a208c36
+efe08006
+20600000
+205a18ee
+6848c442
+284ffe07
+7920fe07
+1a208a36
+24748000
+793ffe07
+1a208a35
+20600000
+1a208c36
+efe08006
+24748000
+1a208c35
+efe08006
+20600000
+efe08011
+afec0000
+20608000
+1a208c1a
+e8410006
+1a208c20
+efe10006
+98467e00
+20229903
+24211908
+1fe67c01
+20229901
+20600000
+1a627e00
+20207e05
+efe08011
+f93ffe00
+e7e08011
+1a427e00
+20207e05
+1a208c1a
+efe10006
+1a208c20
+efe10006
+98467e00
+d840ffff
+98467c00
+20229903
+d840f000
+98467c00
+24211903
+20600000
+6848829e
+6fe0816b
+1fe37e00
+9842fe00
+2feffe02
+7920800f
+20600000
+475bc036
+20401a30
+c6180000
+20401942
+6fe0816b
+2feffe04
+7920802a
+1fe37e00
+9842fe00
+2feffe02
+7920800f
+c6078000
+6fe0816c
+203a1934
+6fe08287
+c3021934
+684a0273
+6fe246a6
+98467c00
+2022937a
+604a46a6
+6fe2c6a1
+1fe0fe01
+79207e27
+67e2c6a1
+6848829e
+79400402
+6048829e
+6fe0c3c0
+c4030000
+475c4037
+6fe0816c
+207a0000
+6fe0816b
+2fe00601
+20209f2a
+2fe00602
+20209f18
+20600000
+475cc037
+6848829e
+284c0005
+20608000
+6fe0816b
+1fe3fe00
+9842fe00
+c4018000
+793f8405
+79400403
+6048829e
+28400603
+24608000
+20600000
+6fe08287
+79207e04
+67e08287
+79200032
+20600000
+475d4037
+70439c00
+dfe00000
+67e246a6
+67e2c69c
+79207e27
+67e2c6a1
+6fe08287
+793ffe04
+67e08287
+793f8032
+20600000
+da200001
+6fe0816b
+c3830000
+da200000
+20600000
+18c20a00
+68494444
+18a20c00
+20600000
+475dc037
+6fe0829e
+c3828000
+2040198b
+20401b60
+203a19af
+efe10006
+e8410006
+18422200
+9a267e00
+20401966
+20407e4a
+1fe20400
+e8208006
+1a227e00
+98c0fe00
+67e1097b
+2040199f
+204019b1
+20401b60
+efe10006
+1fe22200
+18c22600
+e8410006
+18422400
+9a467e00
+20401966
+20407e4a
+9a40fe00
+e7e10013
+9a267c00
+24628000
+20201b79
+20401992
+c6148000
+6fe0c3c0
+c301199d
+20401b63
+203a199d
+2020199b
+20401b60
+203a199d
+efe10006
+e8410006
+98462200
+20401966
+18427e00
+9a267c00
+2021199d
+79200029
+20600000
+793f8029
+20600000
+1a227e00
+207a0000
+d8200001
+20600000
+475e4037
+18408401
+20401a62
+18c08dfe
+efe10006
+d8402902
+98467c00
+24628000
+18c08c01
+18c22200
+efe08006
+20600000
+18000400
+18000201
+475ec037
+6048c1f6
+6848829e
+79200405
+18417efc
+9821fe00
+67e0829e
+1fe17e1f
+280ffe29
+7920fe04
+67e0c1f5
+6fe0c1f5
+28200601
+242099c1
+6fe0c1f6
+207a0000
+c51919c7
+6f20c1f6
+6fe1097b
+1fe20c00
+d8a041f7
+20207d52
+20406dc7
+20206d27
+d8e00000
+202015ba
+d8e00000
+202015be
+475f4037
+c6078000
+c6180000
+6fe0816b
+1fe17e03
+67e0c3d3
+6fe0816c
+207a0000
+5800016d
+67e143d8
+475fc037
+6fe0c3d3
+c001a10b
+204019e7
+243419c9
+204019cb
+58000000
+67e143d6
+6fe143d8
+1fe08c02
+47604038
+efe10006
+c0021cd1
+c0031f8c
+c0029f4e
+20600000
+6fe0c3d3
+c00119f6
+c0009a0d
+20600000
+20407e54
+d8400004
+9fe67c00
+20628000
+d8400005
+9fe67c00
+20628000
+d8400006
+9fe67c00
+20628000
+20207e56
+6fe143d8
+1fe20c00
+efe10006
+67e143d4
+efe10006
+204019eb
+24740000
+6848816c
+604943d6
+6fe143d4
+1fe0fe04
+98467c00
+2022fe54
+6f20816c
+d8a01000
+6fe143d8
+1fe20c00
+20407d52
+20207e56
+20407e54
+6fe143d6
+247a0000
+20207e56
+20401a09
+24740000
+6fe143d6
+d8a01000
+98a0a200
+6848816c
+9840fe00
+67e143d6
+6f20816c
+1a220a00
+6fe143d8
+1fe20c00
+20407d52
+58001000
+67e143d8
+6fe143d4
+1fe0fe04
+684943d6
+98467c00
+2022fe54
+20207e56
+20407ceb
+d8a04359
+20201f12
+6fe1446b
+20207e05
+684a02a3
+20401369
+98461600
+19627e00
+684902b5
+18520400
+18438400
+98467e00
+20600000
+20401369
+67e202a3
+20600000
+4760c038
+1a208c50
+efe08006
+204016e6
+1a208c02
+efe10006
+984ffe00
+68490163
+984ffe00
+d84f4240
+9846fc00
+d8400682
+6fe0c1f0
+984f8400
+1a208c2b
+efe08006
+984ffe00
+9840fe00
+67e243bc
+6fe140c8
+20407def
+18078400
+9840fe00
+1a208a0e
+e7e10005
+20600000
+47614038
+6fe1099e
+98002400
+6fe109a0
+98002600
+6fe14396
+98000c00
+78347c00
+20600000
+efe10006
+1fe17eff
+207a0000
+9a467c00
+24610000
+9a667c00
+20628000
+20211a60
+18007c01
+20600000
+18007e00
+20600000
+20401a65
+20229a72
+20600000
+4761c038
+6fe14396
+98000c00
+efe10006
+1fe17eff
+207a0000
+98467c00
+20628000
+efe08006
+98c08c00
+efe08006
+98c08c00
+20201a68
+efe08006
+98c08c00
+20600000
+47624038
+6fe14396
+98000c00
+efe10006
+1fe17eff
+207a0000
+efe08006
+98c08c00
+18c08dfe
+efe10006
+98467c00
+20628000
+efe08006
+98c08c00
+20201a78
+6fe14396
+98000c00
+efe10006
+1fe17eff
+207a0000
+1fe08401
+efe08006
+98c08c00
+efe08006
+98c08c00
+18c20a00
+20201a86
+6fe109b4
+20201a94
+4762c038
+6fe14396
+98000c00
+efe10006
+1fe17eff
+203a1a9f
+98467c00
+20229aa0
+efe08006
+98c08c00
+efe08006
+98c08c00
+20201a95
+20207e5e
+efe08006
+67e089ba
+1fe27200
+d8a009bb
+20407d52
+efe08006
+67e089b3
+20407ceb
+20207e60
+47634038
+20401aac
+20201abe
+d8402a00
+20401a75
+207a0000
+efe08006
+18c20a00
+6848c2f7
+18427200
+98467c00
+24211abb
+98460400
+d8c042f8
+20407d52
+18427200
+24429af6
+20600000
+1fe27200
+d8c042f8
+20207d52
+da604407
+da2043e8
+20401acb
+58000000
+79347e00
+67e0895c
+da604427
+da204408
+20401acb
+20740000
+6fe0895c
+203a137a
+20600000
+4763c038
+20407e54
+20407d2c
+da400000
+d8a0098f
+20401ae5
+6fe0c2f7
+1fe08401
+9a40a200
+1a20a202
+1a267c1f
+24211ae3
+e0408005
+d8400009
+e0408005
+98007200
+20407d52
+1a222400
+1a427e00
+67e0898e
+d8c0098e
+5fffffe0
+9a608a00
+20207d0a
+20407e56
+20201add
+efe08011
+207a0000
+1fe0fe01
+e8408006
+18467c09
+20229af4
+9a40a400
+1a220c00
+98007200
+20407d52
+18c22200
+1a227e00
+9a667c00
+20610000
+20201ae5
+9a20a200
+20201af0
+58000020
+e7e08005
+c2001af6
+20600000
+47644039
+7855fc00
+20371afe
+24369b0c
+20401544
+6fe140c8
+67e10295
+24369557
+c5079557
+6fe0816c
+243a1557
+6fe0c1f6
+243a1557
+6fe0c3c0
+c2829557
+6fe08287
+c2829557
+20201536
+684940c8
+18430400
+6fe10295
+9840fe00
+67e10295
+2020154f
+d8e00000
+20201b2a
+d8e00000
+20201b2e
+d8e00001
+20201b2a
+d8e00001
+20201b2e
+d8e00002
+20201b2a
+d8e00002
+20201b2e
+d8e00003
+20201b2a
+d8e00003
+20201b2e
+d8e00004
+20201b2a
+d8e00004
+20201b2e
+d8e00005
+20201b2a
+d8e00005
+20201b2e
+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
+20201b56
+d8200003
+20401b56
+1a427e00
+e7e08005
+20600000
+18000202
+1a20a204
+20401b56
+1a20a3fc
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+20600000
+1a20a205
+204052a1
+1a20a3fb
+1a227e00
+e7e10005
+58000000
+e7e10005
+18227e00
+e7e08005
+20600000
+204052db
+1fe20c00
+20600000
+6fe144ee
+20600000
+20401b68
+1fe20c00
+20600000
+6fe144f1
+20600000
+20401b60
+18c08c05
+20600000
+20401b60
+18c08c09
+20600000
+20401b65
+18c08c09
+20600000
+20401b65
+18c08c05
+20600000
+202052f1
+202052f4
+202052f7
+202052e0
+67e4444c
+20201b8c
+184122ff
+20401b80
+184ca200
+20201b86
+6220c442
+2a2ffe01
+20409b88
+2a2ffe02
+20409b8a
+20600000
+6220c443
+20201b81
+d8e00008
+20201b8e
+d8e0000b
+20201b8e
+d8e00005
+20201b8e
+6fe4443a
+f9207e00
+67e4443a
+20600000
+c61a0000
+7002bc01
+7002bd01
+204016a5
+20401b99
+20401c17
+202016b2
+4764c039
+6fe0c3e2
+c1808000
+d8e00002
+20407d74
+247a0000
+6fe143e3
+684943e5
+98467e00
+d8e00002
+20407d66
+7854fc00
+20401c38
+20401bb8
+24768000
+47654039
+6fe3016d
+67e30297
+6fe08002
+1fe0fe01
+67e08002
+20401bbf
+20748000
+20401c5f
+24768000
+6fe08004
+1fe0fe01
+67e08004
+6fe48173
+67e48a01
+20600000
+4765c039
+20401caa
+2040174a
+6fe08001
+1fe0fe01
+67e08001
+20600000
+47664039
+6fe082e0
+c18d8000
+6fe30297
+684b436b
+98467c00
+24628000
+20400a4a
+24628000
+20401bcf
+20401602
+7041db00
+7002d700
+7043e200
+7002e000
+20200a32
+4766c039
+18007fff
+38080001
+67e282b7
+da200287
+20401720
+18007204
+d8a002ab
+20405a32
+6fe14378
+67e102b5
+180a7e00
+1fe17e0f
+1fe67c04
+20211bda
+67e082a0
+67e085a8
+47674039
+684941f3
+60490289
+18422600
+1c40fe07
+9a66fc00
+20407def
+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
+4767c039
+58000000
+e7e10005
+6fe14378
+e7e10005
+6fe282b7
+e7e28005
+6fe082a0
+d84000a0
+9841fe00
+e7e08005
+20401836
+580041f5
+1fe08c12
+efe18006
+67e182af
+20600000
+70001624
+70098e00
+6fe0c427
+207a0000
+d8e00000
+20407d74
+247a0000
+4768403a
+78287c00
+20401c38
+20401caa
+20401c41
+24369c2b
+6fe08003
+1fe0fe01
+67e08003
+6fe0816b
+1fe17e0f
+c0019c70
+c0029c82
+4768c03a
+6fe0898e
+6848c432
+98467c00
+24229c19
+180a7e00
+d84001ff
+98417e00
+1fe0fefa
+20407d0e
+d8e00000
+6fe14428
+20207d66
+4769403a
+7854fc00
+588e89be
+1fed7e00
+1fe1fed6
+98001200
+58555555
+67e182af
+202010b0
+4769c03a
+6fe0c42a
+6848c42b
+18520400
+184b8400
+98408400
+6048c1f5
+c0009c52
+6848c3e7
+1840fe06
+67e0c1f6
+6fe3437a
+67e341f7
+18427200
+d8c043e8
+20407d52
+20201c58
+5800000c
+67e0c1f6
+6fe3437a
+67e341f7
+6fe341dd
+e7e30005
+476a403a
+6fe08000
+1fe0fe01
+67e08000
+db600708
+7856fc00
+20201821
+476ac03a
+6fe0c433
+c1808000
+6fe08000
+1fe0fe01
+67e08000
+d8400c03
+6fe0c434
+7d3a0406
+1a227e00
+7d3a0407
+604941f5
+6fe3437a
+e7e30005
+6fe30297
+e7e30005
+20201821
+6fe30173
+684b437a
+98467c00
+24628000
+d8400004
+6fe0c42b
+7d3a0406
+6048c1f5
+6848c407
+1840fe06
+67e0c1f6
+6fe3437a
+67e341f7
+d8c04408
+18427200
+20407d52
+20401836
+20201c2b
+6fe30173
+684b437a
+98467c00
+24628000
+20401961
+6220c36a
+6fe3016d
+67e30297
+6fe40179
+67e402ab
+68490181
+476b403a
+184b8400
+6fe10183
+1febfe00
+67e10289
+67e2028b
+98467e00
+1fe0d1fe
+6fe48185
+67e482b3
+6fe0818e
+1fe1041f
+604882a0
+1ff18400
+18430400
+604882d7
+da200287
+20401a33
+da200287
+20401720
+2040160e
+20400a4a
+24628000
+476bc03a
+20401061
+20401f6b
+70095b14
+20407871
+20200a32
+476c403b
+6fe08016
+c0129cb0
+c0131cb6
+c0139cbc
+20201cbc
+6848c432
+284ffe01
+20209cc7
+284ffe02
+20209ccc
+20201cc2
+6848c432
+284ffe02
+20209ccc
+284ffe00
+20209cc2
+20201cc7
+6848c432
+284ffe00
+20209cc2
+284ffe01
+20209cc7
+20201ccc
+70001625
+6fe0898e
+79207e00
+67e0898e
+20600000
+70001626
+6fe0898e
+79207e01
+67e0898e
+20600000
+70001627
+6fe0898e
+79207e02
+67e0898e
+20600000
+efe18006
+67e1c436
+c0011ce8
+c0019cf0
+c0021cf3
+c0031d1c
+c0041d69
+c0051de7
+c0061e16
+c0081e2c
+c0091e6f
+c00b1e93
+c00c1ea6
+c00f1eab
+c0291eaf
+20600000
+18002203
+20401ed4
+58000002
+e7e08005
+6fe14380
+e7e10005
+20600000
+20401cf0
+18002203
+20401ed4
+58000003
+e7e08005
+6fe14380
+e7e10005
+20600000
+1fecfe00
+67e14382
+20600000
+20401f03
+20407e54
+20201cf6
+d9600003
+20401a4d
+20401a56
+203a1d1a
+24211d17
+18c08dfe
+20407ceb
+20407ce2
+24341d0a
+20407cd0
+20407e56
+6162096c
+18002214
+20401ed4
+6962096c
+20407cde
+58000005
+e7e08005
+58000001
+e7e08005
+20407ce5
+efe10006
+1fe17eff
+e7e10005
+efe08006
+1fe27200
+20407d5f
+20407ce8
+196097ff
+20229d1a
+efe08006
+98c08c00
+20201cf8
+efe08006
+98c08c00
+20201d14
+20341ec8
+20201ef7
+20401f03
+efe10006
+67e1435a
+20407ceb
+d8a009a2
+6fe143d4
+1fe0fff9
+20401f14
+20201d2f
+78547c00
+6849099e
+6fe109a0
+98467c00
+24211d2c
+18427e00
+c1800000
+78347c00
+7002d801
+20201ec9
+20401d25
+20740000
+6849435a
+58002800
+98467c00
+20229d36
+20201ec8
+70443900
+6849099e
+60490964
+20401a92
+243a1ec8
+68490964
+20401a92
+243a1d4f
+18c22200
+6fe089b3
+1fe27200
+684889a2
+98467c00
+24229d4b
+da4009a3
+20407df1
+20229d52
+6fe109bb
+6849435a
+98467c00
+20229d5a
+6fe10964
+1fe0fe01
+67e10964
+20201d3b
+6fe0c439
+c0009d5a
+20201ec8
+6fe109bb
+6849435a
+98467c00
+24229d4b
+70443901
+68490964
+604909b6
+20201d4b
+6fe0c439
+c0001d4b
+70443902
+68490964
+184085ff
+604909b8
+da200005
+20401ed4
+58000007
+e7e08005
+6fe109b6
+e7e10005
+6fe109b8
+e7e10005
+20600000
+20401f03
+20401f10
+20201d6c
+6849099e
+60490964
+20401a4d
+20401a65
+18c08dfe
+18c27e00
+67e109b4
+684909a3
+58002a00
+98467c00
+20229dd3
+58002803
+98467c00
+24229dbf
+d9600002
+20401eda
+24211d9c
+68490964
+20401a90
+243a1d9c
+20401ede
+24229d9a
+24341d9e
+78547c00
+da200014
+20401ed4
+58000009
+e7e08005
+18a26000
+18a08a01
+20401dac
+20401ed6
+20401a90
+20401db3
+6fe089ba
+1fe0a205
+e2208030
+1a267c07
+2442fe58
+2042fe5a
+20401f08
+9a26fc00
+20407def
+18079600
+196097ff
+20229d9c
+20401ed6
+20201d7b
+20341ec8
+20201ef7
+20401ee9
+20401ed6
+20401a90
+20401e5d
+243a1d9c
+20407ce2
+6fe10964
+1fe0ffff
+e7e10005
+20401ef3
+20401db3
+196097ff
+20229d9c
+20201d9a
+6fe10964
+e7e10005
+6fe089b3
+1fe27200
+20407ce5
+20407d52
+20207ce8
+20407ce2
+6fe10964
+e7e10005
+20407ce8
+6fe089ba
+1fe27200
+20407ce2
+20407ce5
+9f260c00
+18c08dff
+20407d52
+20207ce8
+20401a75
+203a1ec8
+18c22600
+18c08dfb
+efe10006
+67e10964
+da200014
+20401ed4
+58000009
+e7e08005
+efe08013
+1fe27200
+1fe0fe02
+e7e08005
+6fe10964
+e7e10005
+1a608c01
+20407d52
+20407ce8
+20201ef7
+d8402a00
+20401a75
+207a0000
+18c08dfb
+efe10006
+67e10964
+da200014
+20401ed4
+58000009
+e7e08005
+6fe0c2f7
+1fe27200
+1fe0fe02
+e7e08005
+6fe10964
+e7e10005
+d8c042f8
+20407d52
+20407ce8
+20201ef7
+20401e8d
+68494437
+6fe0c3c0
+c2819e0c
+20401a65
+24229ec8
+20541e12
+20740000
+20401a72
+18c08dfe
+efe10006
+d8402a00
+98467c00
+20229e02
+efe08006
+1fe67c16
+20211df9
+18007e16
+1fe22600
+20407ceb
+1a60a201
+20401ed4
+5800000b
+e7e08005
+1a627200
+20407ce5
+20207d5f
+20407ceb
+6fe0c2f7
+1fe0a201
+20401ed4
+5800000b
+e7e08005
+6fe0c2f7
+1fe27200
+d8c042f8
+20207d5f
+6fe143d1
+98467c00
+24229deb
+24341deb
+7002d805
+20201ec9
+18c08dfe
+efe10006
+c2871e10
+20207e56
+efe10006
+67e109a2
+da200014
+20401ed4
+5800000d
+e7e08005
+6fe109a2
+98002200
+68494437
+20401a62
+203a1ec8
+efe08006
+9a267200
+24211ec8
+1f267c16
+20211e27
+18007216
+1a227e00
+98c08c00
+20407d52
+20407ce8
+20201ef7
+20401f03
+20401f10
+20201e2f
+d9600002
+6849099e
+60490964
+20401a65
+18c08dfe
+18c27e00
+67e109b4
+20401eda
+24211e65
+68490964
+20401a90
+243a1e68
+20401ede
+24229e5b
+19627e00
+c0001e68
+24341e51
+78547c00
+da200014
+20401ed4
+58000011
+e7e08005
+6fe089b3
+1fe0a204
+e2208005
+20407ce8
+1a267c06
+2442fe58
+2042fe5a
+20401f08
+9a26fc00
+20407def
+18079600
+20201e57
+20401e5f
+243a1e68
+6fe10964
+1fe0ffff
+67e109b8
+20401eee
+6fe10964
+67e109b6
+20401ee9
+196097ff
+20401ed6
+20201e36
+6fe089ba
+20201e60
+6fe089b3
+20361e63
+1fe0fffe
+20600000
+1fe0fff0
+20600000
+6fe10964
+67e109b8
+20201e6c
+6fe10964
+1fe0ffff
+67e109b8
+20201e6c
+20341ec8
+20401eee
+20201ef7
+18c22200
+6fe143d4
+1fe0a5fd
+20401a25
+20401e8d
+68494437
+20401a65
+24229e8b
+20541e87
+20740000
+6fe0c3c0
+c3021e82
+68494437
+6fe143d1
+98467c00
+24229e82
+20401e8d
+24341e82
+20201e10
+18002201
+20401ed4
+58000013
+e7e08005
+20600000
+18c08dfe
+efe10006
+c2879e10
+20207e56
+7002d801
+20201ec9
+20407e56
+6fe0c39d
+c1000000
+6fe0c040
+c3820000
+20207e54
+18c0a202
+6fe143d4
+1fe0a5fb
+20401a25
+20201e98
+6fe143d4
+1fe22200
+20401ed4
+58000017
+e7e08005
+6fe14437
+e7e10005
+6fe143d4
+1fe0f3fb
+6fe143d8
+1fe08c07
+efe10006
+e7e10005
+20207d52
+18002201
+20401ed4
+58000019
+e7e08005
+20600000
+6fe0c435
+793ffe00
+67e0c435
+20600000
+18c22200
+6fe143d4
+1fe0a5fd
+20201a25
+18422600
+1a20a203
+20401ed4
+1a20a3fd
+5800001b
+e7e08005
+1a620400
+e0410005
+20600000
+6fe0c435
+79207e00
+67e0c435
+18422600
+1a20a203
+20401ed4
+1a20a3fd
+5800001d
+e7e08005
+1a620400
+e0410005
+20600000
+7002d80a
+18002205
+20401ed4
+58000001
+e7e08005
+6fe0c436
+e7e08005
+6fe14437
+e7e10005
+6fe082d8
+e7e08005
+20600000
+18002404
+20201b4d
+68490964
+18408401
+60490964
+20600000
+68490964
+6fe109a0
+98467c00
+20600000
+684889a2
+da2009a3
+6fe089ba
+1fe27200
+98467c00
+24628000
+da4009bb
+20207df1
+6848c359
+da20435a
+20201ee0
+6fe089b3
+67e08a01
+1fe27200
+20407ce5
+20207d52
+20407ce2
+6fe109b6
+e7e10005
+6fe109b8
+e7e10005
+6fe08a01
+1fe27200
+20407d52
+20207ce8
+20407ce2
+20401b70
+18a27e00
+98c62200
+20401b73
+1a227e00
+e7e10006
+1a20a204
+20401b65
+1a227e00
+e7e08006
+20600000
+1fecfe00
+67e1099e
+efe10006
+67e109a0
+20600000
+6fe14382
+1fe0fffe
+68494380
+184085fe
+20407e4a
+d84000f0
+20407e4a
+20600000
+20407ceb
+d8a009a2
+6fe143d4
+1fe0fffb
+e7e08005
+1fe27200
+20407ce5
+20207d52
+6fe1016f
+c1820000
+6fe0c435
+79207e01
+67e0c435
+6fe18171
+67e1c436
+7920000f
+c0091f33
+c0291f38
+c00c1ea6
+c0011ce8
+c00f1eab
+793f800f
+6fe0c435
+793ffe01
+67e0c435
+20600000
+6fe0c435
+c4008000
+7920000f
+20401f42
+20401f48
+20541f26
+6fe0c436
+c0091e73
+20600000
+20401f38
+20201f35
+20401f48
+24740000
+20201e73
+20401f3b
+da200174
+20201a25
+6fe0816c
+1fe0a5f9
+1fe0fffc
+67e143d6
+6849016d
+604943d4
+20600000
+6a40816c
+6fe143d6
+9a408400
+604943d6
+da20016d
+20201a25
+20407e56
+6fe143d6
+684943d4
+98467c00
+24628000
+20207e54
+efe08006
+e8408006
+e8410006
+c0099f53
+20600000
+efe10006
+67e143db
+70095b40
+20207871
+da20000c
+da600012
+20401f5f
+58000008
+e7e10005
+6fe44372
+e7e40005
+20600000
+20401f67
+da400005
+20401b4d
+1a627e00
+e7e08005
+6fe0c3da
+e7e08005
+20600000
+6fe0c3da
+1fe0fe01
+67e0c3da
+c1800000
+7043da01
+20600000
+6fe0c39d
+c0001f7c
+c0009f7f
+c0011f81
+c0409f75
+c0411f77
+c0419f7a
+20600000
+7043530d
+20201f7d
+7043530d
+70435101
+20600000
+7043530d
+20201f82
+70435300
+70435103
+20600000
+70435305
+20201f7d
+70435305
+70435100
+20600000
+6fe0c6b8
+79207e00
+67e0c6b8
+20600000
+6fe0c6b8
+793ffe00
+67e0c6b8
+20600000
+efe08006
+c0009fa0
+c0019fc7
+c0021fe8
+c0029ff5
+c003a05d
+c0042049
+c004a059
+c005205d
+c005a05d
+c006205e
+c006a063
+20600000
+18002202
+20402109
+5800000b
+e7e08005
+6fe0c353
+e7e08005
+20600000
+67e0c349
+efe30006
+e7e30005
+6fe0c39d
+c0001ffa
+20401fc2
+6fe0c6b6
+203a1fac
+6fe0c34c
+c301b20f
+6fe0c39d
+c303b20f
+70439b03
+6fe0c34a
+c0001fb4
+c0009fb4
+c0019fb4
+6fe0c39d
+c0011fb7
+c1418000
+dfe00000
+67e2439e
+20600000
+6fe0c3c0
+c2801fc0
+da20439e
+1a220a00
+df200003
+20405a32
+6fe143a0
+1fe17e07
+67e143a0
+70095b34
+20207871
+18002207
+20402109
+6fe3c350
+e7e38005
+20600000
+70439b05
+d8a04327
+20407d0c
+6fe0c39d
+c0419fcf
+c0021fd2
+c0421fd4
+20201fd7
+70439802
+70439908
+20600000
+70095b43
+20207871
+6fe2439e
+203a1fd2
+20201fcf
+70439b06
+6fe0c39d
+c2839fe0
+20406c52
+18002211
+20402109
+58000003
+e7e08005
+20206dd1
+d8a04337
+20405a31
+20406a7b
+18002211
+20402109
+58000003
+e7e08005
+20206ab7
+18c22200
+6fe0c39d
+c2839ffc
+1a220c00
+20406c4a
+2022a011
+7002d904
+18002202
+20402109
+58000005
+e7e08005
+6fe082d9
+e7e08005
+18000e0a
+20407d65
+70439b00
+70095b30
+20207871
+7002d905
+20201fef
+d8a00277
+1a220c00
+20407d0c
+6fe0c39d
+c041a008
+c0422008
+20406a05
+20402016
+6fe0c39d
+c1c10000
+70095b3b
+20207871
+20406a70
+d8a009be
+20406ab7
+da2009be
+da404327
+df200010
+20407df1
+24229fee
+20202016
+20406c46
+70095b31
+20407871
+70432601
+70439b09
+18002211
+20402109
+58000004
+e7e08005
+d8c04337
+20207d0c
+18002211
+20402109
+58000006
+e7e08005
+6fe0c3c0
+c280a024
+d8c04316
+20207d0c
+d8c043c1
+20207d0c
+d8a043a2
+1800720a
+20405a32
+1800220b
+20402109
+58000007
+e7e08005
+6fe143a2
+e7e10005
+6fe443a4
+e7e40005
+20600000
+18002211
+20402109
+58000008
+e7e08005
+58000000
+e7e40005
+e7e40005
+20600000
+18002208
+20402109
+58000009
+e7e08005
+6fe0c371
+e7e08005
+6fe3437a
+e7e30005
+20600000
+7002d908
+20201fef
+6fe0c355
+6848c355
+98417e00
+20600000
+d8a043ac
+20407d0c
+20402045
+2fec0001
+2020a043
+6fe0c09a
+c1850000
+20402053
+24740000
+2020321d
+20407e56
+6fe0c36a
+c1000000
+6fe0c34e
+c4008000
+20207e54
+20402045
+2fec0001
+2020a043
+20600000
+20600000
+d8a00880
+20407cff
+70439802
+70439901
+20600000
+d8a00930
+20407d0c
+70439906
+70439802
+20600000
+18002241
+20402109
+5800000c
+e7e08005
+d8c046dc
+20207cff
+20406a1c
+18002211
+20402109
+5800000d
+e7e08005
+20206ab7
+6fe0c39b
+c17f8000
+d8400003
+98467c00
+24610000
+d8e0000a
+20407d74
+247a0000
+20202043
+476cc03b
+20401b77
+247a0000
+6fe0c39b
+c000208a
+c000a090
+c001208a
+c001a092
+c004a096
+c005a0a6
+c00620a8
+c006a0af
+20600000
+6fe0c39c
+c1820000
+70439cff
+70439bff
+70095b3f
+20207871
+70439b02
+20201f99
+70439b04
+58017700
+d8e0000a
+20207d66
+6fe0c39c
+c0022099
+20600000
+6fe0c39d
+c283a0a4
+70439b0b
+2040201c
+70095b29
+20407871
+6fe0c09a
+c1850000
+20402053
+20740000
+2020321d
+70439b0c
+2020209d
+70439b0c
+20202026
+6fe0c34f
+6848c356
+98417e00
+2fec0001
+2020a0b1
+70439b0d
+20202032
+2040203a
+202020b1
+18000e0a
+20407d65
+70439cff
+70439bff
+70095b3e
+20207871
+476d403b
+6fe0c39d
+c4038000
+6fe0c398
+c1810000
+70439800
+6fe0c399
+c000a0ff
+c0012106
+c001a0f7
+c00320dc
+c003a0d3
+c00420c9
+20600000
+70439800
+70439900
+70439a00
+20600000
+6fe0c76d
+1fe20e00
+1fe0fe01
+67e0c76d
+6fe2439e
+afefffff
+58000080
+7920fe00
+67e0c76e
+202020fb
+6fe0c39a
+70439a00
+c000a0d8
+70439802
+20600000
+70095b31
+20407871
+70439b09
+2020206e
+6fe0887b
+c001a0e0
+70439802
+20600000
+20406a43
+6fe0c39d
+c041a0e5
+c04220e5
+20401fb4
+20406a30
+da2009be
+da400930
+df200010
+20407df1
+2022a0ed
+7002d90b
+20201fef
+20406eed
+2422a0eb
+70432601
+6fe0c39d
+c040a0d8
+c041a0d8
+c04220d8
+70439802
+70439907
+20600000
+6fe0c39d
+c041a0fc
+c04220fc
+70476e00
+20201fd7
+70476d00
+c1420000
+20201fb7
+70439802
+6fe0c6bb
+c001a103
+20600000
+70439902
+70087b00
+20207581
+70439802
+70439903
+20202068
+18002406
+20201b4d
+6fe0816d
+c0002122
+c000a12a
+c0012132
+c001a136
+c0022155
+c002a15a
+c003215e
+c003a163
+c0042164
+c004a165
+c0052166
+c005a16a
+c006216b
+c006a16d
+c009216e
+c009a16f
+c00a2170
+c00aa172
+c00b217d
+c00c217e
+6a60816d
+202021a1
+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
+67e246aa
+2040218e
+476dc03b
+6fe0c39b
+c004a148
+6fe0c3c0
+c280a14b
+6fe0c489
+245a6016
+6fe0c326
+c0002150
+70439c01
+2040219c
+20206c58
+70432601
+d8c043c1
+d8a04316
+20407d0c
+20202148
+476e403b
+70439c00
+70439b00
+70095b41
+20207871
+efe40006
+67e4438c
+efe20006
+67e246ae
+20206c58
+6fe08287
+79207e04
+67e08287
+20600000
+20748000
+70095b32
+20407871
+70439c04
+2020219f
+20600000
+202021a6
+20600000
+70439c02
+204021ad
+70095b33
+20207871
+20600000
+20748000
+202021af
+20600000
+202021bb
+20600000
+20402172
+202021bf
+efe40006
+67e44444
+6fe14444
+68494450
+20407e4a
+67e14444
+6fe14448
+6849444c
+20407e4a
+67e14448
+20600000
+202021c5
+efe10006
+67e102be
+efe10006
+67e102a7
+207a0000
+6fe08287
+79207e07
+67e08287
+20600000
+da600013
+da200002
+da400002
+20401b48
+1a627e00
+e7e08005
+20600000
+d8a0438c
+18007208
+20405a32
+d8a046ae
+18007204
+20405a32
+da20000d
+da400004
+20401b48
+6fe4438c
+e7e40005
+6fe246ae
+e7e20005
+20600000
+70439c05
+da400005
+202021cf
+da400006
+202021cf
+da200002
+da400007
+20401b48
+e2608005
+20600000
+da200009
+da400009
+20401b48
+6fe4443a
+1fe1fe01
+e7e40005
+20600000
+da40000b
+202021cf
+da200006
+da40000c
+20401b48
+6fe2c5f7
+e7e28005
+20600000
+da200002
+da40000d
+20401b48
+58000006
+e7e08005
+20600000
+da400013
+202021cf
+da400014
+202021c0
+da400015
+da200009
+20401b48
+6fe4444c
+e7e40005
+20600000
+da200003
+da400017
+20401b48
+6fe0c442
+1fe17e07
+e7e08005
+6fe0c443
+1fe17e07
+e7e08005
+20600000
+da200001
+20201b48
+476ec03b
+c61a0000
+c513a40e
+2020261b
+7844fc00
+7843fc00
+58555555
+98001e00
+6fe0c83a
+202016c3
+476f403b
+6fe0c864
+2040168b
+6fe2483c
+98001200
+204010b0
+20401161
+6848c83a
+204016c8
+204021d5
+c597a1e9
+783cfc00
+2000001e
+204021d5
+7857fc00
+7826fc00
+7830fc00
+78507c00
+78287c00
+6fe14838
+98003600
+37c18400
+242c223d
+20404caf
+c517a1f6
+7846fc00
+7825fc00
+7823fc00
+7824fc00
+2040223a
+67e0c85a
+6848c859
+98467c00
+2422a23f
+476fc03b
+7858fc00
+280ffe2f
+2040a22c
+2038a23f
+2040223a
+67e0c7a4
+c513a209
+6fe0c7a4
+6848c836
+a8400e00
+2420a23f
+2040223a
+280ffe2f
+2040a235
+e7e08005
+1fe97e00
+1fe67c1f
+2421223f
+1fe27200
+2022a215
+2040223a
+e7e08005
+c2002212
+c513a21a
+18a22200
+2040223a
+67e0c87e
+1a220a00
+09800018
+1fef7e00
+1ff17e00
+e7e18005
+7845fc00
+280ffe27
+2040a5de
+2023223f
+20404cae
+7837fc00
+204017b0
+4770403c
+c6138000
+6fe0c87e
+6848c8cd
+98467c00
+20417e4c
+202025e2
+2040223a
+1fe67c01
+20217e5c
+1fe0fffe
+c513a233
+203a7e5c
+1fe0ffff
+67e08964
+20600000
+1fe17e07
+68488964
+18498400
+9841fe00
+20600000
+09800008
+19897e00
+20600000
+280ffe27
+2040a5fa
+204016b2
+784dfc00
+7845fc00
+20200e80
+20401161
+6848c83a
+20201205
+4770c03c
+6fe0c865
+2040168b
+6fe2483c
+98001200
+204021d5
+20402243
+79202a00
+782efc00
+78307c00
+7850fc00
+20404cb5
+785d7c00
+c517a273
+c516a285
+19317e00
+1fecfe00
+1ff1fe00
+08008628
+c517a25c
+784efc00
+782dfc00
+7823fc00
+7824fc00
+6fe0c837
+98007200
+d8c047e6
+efe08006
+08008608
+c2002261
+78247c00
+08008618
+78447c00
+c597a26b
+7843fc00
+58000000
+08008603
+37d38200
+20000064
+785d7c00
+784efc00
+784dfc00
+785c7c00
+20401161
+20204cb3
+df20000a
+5800003c
+08008608
+c2002274
+784efc00
+783c7c00
+19317e00
+1ff17e00
+1ff1fe00
+08008620
+c5172282
+58000001
+08008605
+783d7c00
+20202259
+58000000
+08008605
+20202259
+6fe0c1f0
+1fe37200
+20000002
+c2002287
+19317e00
+1fecfe00
+1ff18400
+18427e00
+08008608
+18427e00
+08008628
+20202259
+6fe0c865
+c28122b0
+6fe0c835
+1fe0fe03
+67e0c837
+6fe0c859
+67e0c7e6
+6fe0c836
+e7e08005
+6fe0c835
+1fe9fe00
+6848c82b
+18410403
+18438400
+9841fe00
+6848c82c
+9840fe00
+e7e08005
+6fe0c835
+98007200
+d8c047c6
+20407d5f
+c6938000
+6fe08019
+e7e08005
+6fe0c865
+c3810000
+6fe0c837
+1fe0fe01
+67e0c837
+20600000
+6fe0c835
+1fe0fe04
+c593a2b4
+1fe0fe01
+67e0c837
+6fe0c859
+67e0c7e6
+6fe0c837
+1fe0fffe
+e7e08005
+6fe0c836
+e7e08005
+58000000
+2020229b
+6fe0c7a5
+1fe97e00
+67e0c82a
+1fe0fe01
+d8c047a5
+98c08c00
+efe18006
+67e1c82d
+6fe0c7a5
+1fe37e00
+1fe17e03
+67e0c833
+20600000
+6848c83b
+204022cf
+6048c83b
+20600000
+204022d3
+18408401
+18410403
+20600000
+6fe0c83c
+1fe17e03
+1fefa204
+58004840
+9a20fe00
+98408c00
+efe08006
+67e0c83a
+20600000
+67e2483c
+da200000
+df200004
+d8c0483c
+efe08006
+9a20a200
+c20022e0
+1a227e00
+67e14857
+6fe0c857
+6848c858
+9840fe00
+67e0c859
+20600000
+20407e56
+684a4850
+1c427e00
+98467c00
+244122f9
+1fe22400
+6fe24850
+6848c854
+98408400
+1a427e00
+98467c00
+24610000
+793ffe1c
+67e24850
+20207e54
+20628000
+79207e1c
+20600000
+58000000
+67e24850
+20600000
+38001300
+3805908b
+380b6150
+380c3d20
+67e4c840
+38003a1a
+3804c453
+3808d312
+380c0001
+e7e38005
+6fe0c866
+207a0000
+d8c04867
+d8a04840
+20207d0c
+584e001e
+67e1c868
+58032303
+e7e18005
+58250642
+e7e18005
+58094c06
+e7e18005
+583c0927
+e7e18005
+70486601
+20600000
+d8407530
+c513a320
+d84012c0
+6fe0c864
+c3012320
+d8402ee0
+60494838
+20600000
+70486401
+70486501
+20600000
+70487b4e
+58101520
+67e1c877
+58000005
+e7e08005
+20600000
+da604883
+da40267c
+20203191
+79200026
+6fe0c8a1
+793ffe02
+79207e01
+67e0c8a1
+58000000
+67e14887
+6fe14881
+67e14883
+70488000
+2040236c
+70482b00
+6fe0c87b
+67e0c83a
+6fe0c87c
+67e0c1e8
+6fe24877
+202022dc
+4771403c
+6fe0c87f
+c07fa38e
+c000a348
+c001234a
+c001a350
+c0022356
+20600000
+7047c6ff
+20202357
+6fe0c85b
+203a234e
+6fe248a9
+204022dc
+7047c6aa
+20202357
+7047c655
+6fe0c85b
+203a2357
+6fe24891
+67e247c8
+20202359
+7047c622
+6fe248a9
+67e247c8
+6fe0c836
+1fe17e07
+67e0c7c7
+7047cc00
+70483507
+20402291
+2040265b
+246c0000
+24778000
+20402597
+20402672
+4771c03c
+6fe0c87f
+c17f8000
+c000a371
+c0012373
+c001a379
+c0022381
+20600000
+70487f02
+6fe0c85b
+207a0000
+70487f01
+20600000
+70487f02
+20202657
+6fe0c85b
+203a2377
+6fe2480c
+67e24891
+70487f03
+20202657
+6fe0c85b
+203a237f
+6fe2480c
+684a48a9
+98467c00
+24628000
+70487f04
+20202657
+6fe0c85b
+203a2387
+6fe2480c
+684a4891
+98467c00
+24628000
+70487fff
+70095b39
+20407871
+58000000
+67e14883
+6fe2480c
+204022dc
+6fe0c8a1
+793ffe01
+67e0c8a1
+20202657
+7048bf01
+7048be00
+20600000
+6fe0c8be
+c3808000
+79207e01
+67e0c8be
+58000000
+67e1c87e
+67e248cd
+7048ba01
+20202339
+7048ba01
+70483508
+d8c04881
+d8a047c6
+20207d06
+20402427
+204021db
+2437a427
+204023b0
+243423ae
+20402455
+6fe0c85b
+207a0000
+6fe248cd
+207a0000
+202022dc
+20402427
+2020223f
+7048cb05
+20407e56
+d8c047a4
+d8a04891
+20407d06
+4772403c
+6fe0c893
+c05523bc
+c02aa3c9
+c01123e6
+c07fa5b5
+20202427
+6fe0c894
+c000a3c0
+c00123c6
+20600000
+70487e01
+70488101
+70488280
+6fe340a8
+67e34883
+20207e54
+70487f01
+70488102
+202023c2
+6fe0c85b
+203a23cf
+6fe24895
+684a40a8
+98467c00
+24628000
+6fe0c894
+c000a3d3
+c00123de
+20600000
+6fe0c87e
+c000a3d6
+20600000
+70487e02
+6fe0c85b
+203a23c1
+70488101
+70488280
+6fe248cd
+67e24883
+20207e54
+6fe0c87f
+c000a3e1
+20600000
+70487f02
+6fe0c85b
+203a23c7
+70488102
+202023da
+6fe0c85b
+203a23ec
+6fe24895
+684a48cd
+98467c00
+24628000
+6fe0c894
+c000a3f0
+c00123fa
+20600000
+6fe0c87e
+c00123f3
+20600000
+204023c1
+6fe0c880
+1fe1fe01
+67e0c880
+58000000
+67e1487e
+20600000
+6fe0c87f
+c08023fd
+20600000
+204023c7
+6fe0c880
+1fe1fe02
+67e0c880
+204023f7
+6fe0c09a
+c1820000
+6fe0c8e9
+c12d8000
+7048e95b
+20403657
+20205d8c
+79200027
+6fe0c1e8
+67e0c8cc
+2040231a
+202025ed
+6fe14889
+20207e05
+70483500
+6fe0c8ba
+207a0000
+6fe1488b
+20207e05
+20402452
+2437a427
+20402444
+24342427
+6fe0c82a
+203a2427
+1fe0fe02
+98007200
+d8c047a4
+d8a04891
+20407d5f
+7048bc00
+6fe0c8b9
+205a245f
+6fe0c893
+c000a42a
+c0012438
+c07fa5b5
+d8a047a4
+df200042
+20207d26
+20402553
+6fe0c8b3
+6848c891
+284ffe03
+7920fe00
+67e0c8b3
+c000a43d
+6fe0c8bb
+6848c891
+284ffe04
+7920fe00
+67e0c8bb
+6fe1488d
+20207e05
+6848c891
+284ffe03
+2020a442
+6fe1488f
+20207e05
+6fe0c09a
+1fe67c0e
+2042b476
+6fe2489b
+202025bc
+6fe2489b
+202025c1
+20407e56
+6fe0c833
+6848c834
+98467c00
+2442fe54
+6fe0c833
+67e0c834
+6fe1c82d
+6849c830
+98467c00
+2442fe54
+6fe1c82d
+67e1c830
+20600000
+20402427
+204021db
+24778000
+6fe0c7a4
+67e0c836
+204022be
+6fe0c7a5
+2feffe00
+2020a45e
+20402410
+20402291
+20402246
+2020223f
+7048bd01
+58000280
+d8e00008
+20207d66
+7048bc01
+7048c000
+704854ff
+202022fc
+4772c03c
+6fe0c8bc
+207a0000
+204022ea
+24740000
+20402474
+6fe0c8c0
+1fe0fe01
+1fe17e01
+67e0c8c0
+c0002479
+c000a47c
+20600000
+6fe0c8cb
+207a0000
+1fe0ffff
+67e0c8cb
+20600000
+6fe0c8cb
+247a0000
+2020248d
+6fe0c8cb
+247a0000
+20202392
+6fe0c8be
+c3800000
+79207e00
+67e0c8be
+6fe0c8cc
+67e0c1e8
+7048ba00
+700bf900
+7048b301
+70482b00
+6fe240a8
+204022dc
+204022cb
+20202427
+7048ba00
+7048bf00
+7048be00
+20600000
+6fe0c8bf
+c1800000
+2040247f
+2040253e
+20202415
+4773403c
+6fe0c8bf
+c1808000
+20402395
+204023a3
+6fe0c8b9
+247a0000
+6fe0c880
+207a0000
+7048bc00
+2040248d
+2040245f
+202022fc
+6fe0c8be
+c3838000
+79207e07
+67e0c8be
+7048c000
+7048ba01
+58000000
+67e1c8de
+67e3c8c3
+2040252e
+24628000
+6fe0c83b
+67e0c8c2
+6fe0c83a
+67e0c8c1
+20600000
+4773c03c
+6fe0c8bf
+c1838000
+204024a3
+204024d7
+20402452
+2437a427
+2040252e
+2042a417
+7048bf00
+6fe0c8be
+79207e00
+67e0c8be
+6fe0c8ba
+1fe67c02
+2442a52c
+20402427
+2040245f
+2040252e
+2022a4d0
+6fe2483c
+684a48d5
+98467c00
+2022a4d3
+6fe2483c
+684a48d1
+98467c00
+2022a4d5
+20600000
+6fe0c8c2
+67e0c83b
+20600000
+6fe0c8c8
+202024d1
+6fe0c8c5
+202024d1
+6fe0c8c0
+1fe0fe01
+1fe17e03
+67e0c8c0
+c00024fa
+c000a514
+c00124e0
+c001a514
+20600000
+204023c1
+6fe248d1
+203a24d7
+204022dc
+6fe0c8c6
+205a24f5
+6fe0c8c4
+67e0c83a
+6848c8df
+6a2148e5
+204025c3
+6048c8df
+204025cb
+6048c8dc
+18467c50
+24610000
+6848c8c5
+204022cf
+6048c8c5
+67e0c8c4
+20600000
+7048c601
+d8400000
+204022d3
+67e0c8c4
+20600000
+204023c7
+6fe248d5
+203a24d7
+204022dc
+6fe0c8c9
+205a250f
+6fe0c8c7
+67e0c83a
+6848c8e0
+6a2148e7
+204025c3
+6048c8e0
+204025cb
+6048c8dd
+18467c50
+24610000
+6848c8c8
+204022cf
+6048c8c8
+67e0c8c7
+20600000
+7048c901
+d8400000
+204022d3
+67e0c8c7
+20600000
+204023c1
+6fe240a8
+204022dc
+6fe0c8c3
+205a2528
+6fe0c8c1
+67e0c83a
+6848c8de
+6a2148e3
+204025c3
+6048c8de
+204025cb
+6048c8db
+18467c50
+24610000
+6848c8c2
+204022cf
+6048c8c2
+67e0c8c1
+20600000
+7048c301
+6fe0c8c1
+67e0c83a
+20600000
+7048ba00
+20600000
+6fe2483c
+684a40a8
+98467c00
+20600000
+6fe0c8ba
+c1010000
+6fe0c8bd
+207a0000
+d8e00008
+20407d74
+247a0000
+7048bd00
+7048cb00
+7048bf07
+7048be00
+20202427
+6fe0c8b3
+c000a601
+6fe0c8bb
+c000a551
+684a48b4
+1c427e00
+98467c00
+244122f9
+1fe22400
+6fe248b4
+6848c8b8
+98408400
+1a427e00
+98467c00
+24610000
+793ffe1c
+67e248b4
+7048b301
+202022cb
+7048bb00
+202022cb
+1c427e00
+67e248b4
+20600000
+da604887
+da40267c
+20203191
+4774403d
+79200026
+6fe0c8a1
+793ffe01
+79207e02
+67e0c8a1
+6fe0c88c
+203a256e
+6fe0c88b
+c000a566
+c0012566
+c001a575
+c0022575
+6fe0c87c
+67e0c1e8
+6848c895
+6048c83b
+6fe2488d
+2040257e
+6048c895
+20600000
+7041e803
+6848c896
+6048c83b
+6fe24891
+2040257e
+6048c896
+20600000
+7041e803
+6848c897
+6048c83b
+6fe248a9
+2040257e
+6048c897
+20600000
+6fe2480c
+67e24891
+204022dc
+202022cb
+4774c03d
+2040259a
+2040265b
+242c25a1
+2437a5a1
+20402672
+6fe0c8a1
+793ffe02
+67e0c8a1
+58000000
+67e14883
+67e14889
+67e14887
+6fe24877
+684a483c
+98467c00
+2022a32e
+6fe248a9
+684a483c
+98467c00
+2042a57c
+70095b3c
+20407871
+df200004
+d8a047c6
+20207d17
+7047c6ff
+6fe0c836
+67e0c7c7
+6fe248a9
+67e247c8
+70483506
+20202291
+6fe0c88c
+203a22cb
+6fe14889
+1fe0fe01
+67e14889
+2feffe03
+6fe0c88b
+c000a5ad
+c00125af
+c001a5b1
+c00225b3
+2020256e
+2020a56e
+20202566
+2020a575
+20202566
+2020a575
+2020256e
+2020a339
+20202575
+6fe0c894
+c000a5b9
+c00125be
+20600000
+20407e54
+6fe24895
+67e248cd
+67e248d1
+20600000
+20407e54
+6fe24895
+67e248cd
+67e248d5
+20600000
+1a227e00
+98408a00
+6fe08018
+e7e08005
+18408401
+6fe0c87d
+98410400
+20600000
+6fe0c87d
+1fe0fe01
+67e10987
+1fe27200
+1a220c00
+dfe00000
+e8408006
+9840fe00
+c20025d1
+68490987
+9846fc00
+20407def
+18078400
+c6138000
+18427e00
+c6930000
+20401295
+1fe20400
+20600000
+2040127d
+20201291
+6fe14899
+202025f4
+1fe22200
+6848c898
+6fe14899
+98408a00
+1a227e00
+e7e08005
+18408401
+6fe0c87d
+98410400
+6048c898
+20600000
+6fe148e1
+204025f4
+6fe148e3
+204025f4
+6fe148e5
+204025f4
+6fe148e7
+207a0000
+1fe20a00
+6fe0c87d
+1fe0fe01
+1fe27200
+20207d26
+204025de
+207a0000
+6848c8da
+6a2148e1
+204025c3
+6048c8da
+20600000
+6a2148e1
+204025cb
+6048c8d9
+18467c50
+24610000
+202022cb
+6fe240a8
+67e248a9
+2040231a
+202025e0
+58002fb2
+67e1c8ad
+58100c0c
+67e1c854
+5800bb80
+67e1c8b0
+7048c605
+20600000
+5800f80c
+67e1c8ad
+581c1919
+67e1c854
+58017700
+67e1c8b0
+7048c60b
+20600000
+c6930000
+6fe0c8a1
+c280a340
+c2812580
+6fe0c8bd
+c000a6c6
+4775403d
+20402631
+243426a1
+20402646
+204026ee
+6fe0c09a
+c00447ef
+6fe448b0
+67e4485c
+6fe148c2
+67e148c4
+204026bb
+24740000
+20407fdc
+6fe1c8ad
+2020150a
+20402634
+24740000
+20202291
+6fe1489b
+20407e05
+2034263a
+6fe3c7c7
+207a0000
+20207e54
+7048a700
+1a20fe01
+67e0c835
+20402642
+67e0c7c6
+1a420c00
+1a227200
+20207d5f
+6fe0c836
+1fe17e07
+67e0c836
+20600000
+7048a600
+6961015f
+34730200
+2040265b
+6fe0c82c
+c000a651
+242c2669
+2437a669
+20402672
+6fe0c09a
+c00447eb
+20402720
+20402597
+6fe0c82b
+1fe0fe01
+67e0c82b
+20402694
+58000000
+67e0c8a2
+67e148a3
+20600000
+7857fc00
+20402246
+6fe0c82c
+c000a23f
+18002a00
+6fe2483c
+98001200
+204010b0
+68488017
+2040118f
+204011a6
+204021e4
+2057a23f
+20600000
+6fe0c8a7
+247a0000
+6fe148a3
+1fe0fe01
+67e148a3
+6fe0c8a4
+c2822679
+2040267e
+20202647
+204022be
+6fe0c82a
+207a0000
+98007200
+d8c047a6
+d8a0480a
+20207d5f
+58000000
+67e148a3
+7048a501
+70095b3a
+20207871
+4775c03d
+6848c8a6
+6fe0c8c6
+98467c00
+2421269c
+18408401
+6048c8a6
+6fe0c8c6
+c002a68b
+6fe0c8a6
+c0032696
+c0062696
+20600000
+6fe0c8a6
+c001a696
+c0032696
+20600000
+c517a692
+67e0c7e7
+20600000
+67e0c7e8
+20600000
+6fe0c836
+c4020000
+6fe0c836
+793ffe04
+67e0c836
+2040268f
+20402724
+202022cb
+20402714
+20402724
+202022cb
+6fe1489d
+20207e05
+6fe0c8a7
+205a26a7
+6fe0c8bd
+c1008000
+2040269f
+202026b5
+70483601
+7048a701
+20402642
+67e0c7c6
+58000000
+67e3c7c7
+6fe248a9
+67e247ce
+7048350c
+6fe0c836
+79207e03
+67e0c836
+20402291
+20202624
+204026bb
+24740000
+6fe4485c
+20407daa
+604a4160
+20201497
+4776403d
+78347c00
+20401465
+6fe1c174
+203a7e56
+6fe0c099
+203a7e56
+6fe0c8bd
+c000fe56
+6fe1489f
+20207e05
+204022ea
+24740000
+204026db
+6fe148be
+1fe0fe01
+67e148be
+684948c0
+98467c00
+2042a6d0
+20202621
+7048bd00
+58000000
+67e148be
+58000064
+67e148c0
+7048bc00
+6fe0c855
+67e0c854
+20600000
+6fe0c856
+202026d7
+6fe0c8bc
+1fe0fe01
+67e0c8bc
+c00226d9
+c002a6d5
+20600000
+7048bd01
+58000000
+67e148be
+20600000
+df200002
+d8c0483c
+20407e54
+5800ffff
+e8410006
+98467c00
+2442fe56
+c20026e9
+20600000
+4776c03d
+6fe1478c
+c3858000
+c3838000
+c3830000
+6a214899
+204025cb
+6048c8c7
+6fe0c8cc
+c51326f9
+6fe0c8cf
+98467c00
+24212713
+6fe0c8c9
+1fe67c02
+24212701
+6fe0c8c9
+c0002714
+20600000
+6fe0c8c9
+6848c8ca
+98467c00
+24628000
+7048c900
+6848c8c7
+6fe0c8cb
+c513270a
+6fe0c8ce
+98467c00
+24610000
+6fe0c8c8
+c000271b
+1fe0ffff
+67e0c8c8
+c000271b
+7041e800
+20600000
+7048c900
+6fe0c8c8
+c0012719
+1fe0fe01
+67e0c8c8
+c000a711
+7041e806
+20600000
+7041e885
+20600000
+7048c801
+7048c900
+20600000
+6fe0c8c9
+1fe0fe01
+67e0c8c9
+20600000
+6fe0c8c9
+1fe67c02
+2441272c
+6fe0c8c9
+c1000000
+1fe0ffff
+67e0c8c9
+20600000
+7048c903
+20600000
+6fe08be0
+67e089f6
+1e020c00
+20407d0b
+20402785
+6fe149b7
+20207e05
+6fe089f7
+c000273d
+c0402d68
+c0412e5e
+c068a789
+c06827a2
+c06aa7a2
+20600000
+d8c009fb
+d8a04afe
+20407d0c
+70493300
+20402ae5
+20402757
+20402748
+2040274d
+70493300
+6fe149b9
+20207e05
+6fe08c3a
+70493304
+c1008000
+70493300
+20600000
+58000080
+67e08a10
+58000003
+e7e08005
+58000000
+e7e08005
+6fe189f8
+e7e18005
+700a0f06
+20202ff2
+6fe149d9
+c3810000
+20402de1
+1a20a606
+5fffffff
+e7e40013
+e7e40005
+efe10011
+e7e10013
+1a427e00
+9a20a200
+c200275a
+6fe149d5
+20207e05
+58000082
+67e08a10
+58000004
+e7e08005
+6fe089f9
+e7e08005
+700a0f03
+20202ff2
+58000082
+67e08a10
+5800004e
+e7e08005
+6fe109f9
+e7e10005
+700a0f04
+20202ff2
+58000082
+67e08a10
+58000060
+e7e08005
+6fe209f9
+e7e20005
+700a0f06
+20202ff2
+5800005e
+67e08a10
+58000000
+e7e08005
+6fe109f9
+e7e10005
+700a0f04
+20202ff2
+6f208be0
+1e022200
+da400050
+202029db
+204027a3
+24740000
+6fe109fb
+d840f01f
+98467c00
+2022a7b7
+d840f010
+98467c00
+2022a7bb
+d840f011
+98467c00
+2022a7c4
+d840f012
+98467c00
+2022a7cd
+d8400534
+98467c00
+2022a7ae
+d8400533
+98467c00
+2022a7b1
+d8400123
+98467c00
+2022a7b4
+20600000
+20600000
+20407e56
+6fe109f8
+d84001a8
+98467c00
+24628000
+6848c7a4
+6fe089fa
+98467c00
+20628000
+67e0c7a4
+20207e54
+2040281f
+6fe149c9
+20207e05
+2040281f
+6fe149cb
+20207e05
+20402819
+6fe149cd
+20207e05
+2040281b
+6fe209fd
+67e247a6
+20202850
+20402815
+204027e6
+207a0000
+6fe089fd
+204027e2
+684c09fd
+e0440005
+6fe149d7
+20207e05
+20402817
+204027e6
+207a0000
+700a0459
+6fe089fd
+204027e2
+6fe409fd
+e7e40005
+202027c2
+204027df
+204027e6
+207a0000
+6fe089fd
+207a0000
+204027e2
+d8400000
+e0408005
+6fe089f6
+1fe67c08
+2042a7d9
+202027c2
+204027e6
+6fe089fe
+204027e2
+d8400000
+e0408005
+20600000
+6fe089f6
+c003a81f
+2020281d
+1fe0ffff
+1fe9fe00
+98a08a00
+20600000
+20402de1
+1a20a204
+6fe0ca12
+9a4ffe00
+9a20a200
+efe10011
+1fe20a00
+20600000
+580000d3
+67e08a10
+580001a8
+e7e10005
+6fe0c7a4
+e7e08005
+e0410005
+20600000
+d8e00000
+d8400003
+da20f009
+20202827
+da200100
+20202827
+d8e00000
+da20f004
+2020282c
+d8e00000
+da200534
+20202827
+d8e00000
+da200533
+20202827
+d8e00000
+20402e94
+da200121
+2020282c
+d8e00000
+20402ea2
+da200122
+2020282c
+18438400
+18418411
+da20f009
+2020282c
+20402833
+5800f009
+e7e10005
+20600000
+df200008
+20202821
+df200008
+20202821
+df200006
+20202821
+df200004
+20202821
+df200002
+20202821
+df200001
+20202821
+1f20fe06
+67e08a0f
+204027ee
+d8c009fd
+20407d5f
+20202ff2
+20402833
+e2210005
+e0408005
+700a0f07
+20202831
+20402833
+e2210005
+e0410005
+700a0f08
+20202831
+20402ef8
+20202ff2
+6fe0c932
+67e08c14
+580000f0
+67e10c35
+6fe0c7a5
+1fe0fe01
+67e0c7a5
+c0602842
+580000d4
+67e08a10
+580001a8
+e7e10005
+6fe0c7a5
+e7e08005
+20600000
+7047a580
+20600000
+1c420400
+6fe247aa
+98467c00
+20412856
+2040285d
+98467c00
+20610000
+20402851
+6fe247a6
+1fe0fe01
+67e247a6
+20202861
+1c427e00
+67e247aa
+6fe0c7ad
+1fe17e0f
+67e0c7ad
+20600000
+20628000
+1fe22400
+58100000
+1fed7e00
+98408400
+1a427e00
+20600000
+df200014
+1fe0fea0
+c200285e
+20600000
+20402de1
+1a20a204
+704a1200
+20402eee
+efe10011
+203a2869
+1fe26000
+20402873
+20402ef3
+6fe0ca12
+1fe0fe01
+67e0ca12
+6848c9db
+98467e00
+20628000
+1a427e00
+9a20a200
+20202864
+df200028
+1f227e00
+67e08c00
+efe08030
+245a287d
+1e00e008
+6fe08c00
+1fe27200
+c2002874
+20600000
+e8440030
+604c09fd
+6fe08a04
+c02ca897
+684a47a6
+6fe209fe
+98467c00
+6fe08a04
+2022a887
+20600000
+67e089f9
+6fe149bf
+20407e05
+1e027e00
+67e10c08
+68e0ca12
+e8408030
+2040280d
+684889f9
+68e0ca12
+204027fa
+6fe10c08
+1fe26000
+58000000
+e7e08030
+202027c2
+6fe247a6
+d840003c
+9846fc00
+20407def
+18077e00
+247a0000
+6fe247a6
+d8454600
+98467e00
+d8493a80
+9846fc00
+20407def
+18077e00
+d8415180
+9846fc00
+20407def
+18072200
+18078e00
+58000000
+f9207e00
+68488a00
+98417e00
+207a0000
+1a227e00
+d840003c
+9846fc00
+20407def
+18078400
+580001e0
+98408400
+6fe109fe
+98467c00
+24628000
+6fe08a03
+20202887
+4777403d
+700a7414
+6fe0c957
+67e08a75
+6fe08bff
+1fe0fe0b
+1fe0f3fe
+67e08a76
+1fe0ffff
+e7e08005
+5800002a
+e7e08005
+d8c04b3d
+20407d52
+6a210c02
+204028cb
+2020793f
+1a208c02
+efe10006
+67e1448a
+da200a74
+20600000
+da6028d2
+20202dec
+1a208c16
+efe08006
+c1808000
+58000002
+1a208a16
+e7e08005
+20202a09
+204028e7
+1840fe0d
+67e0c7ae
+204028fe
+1840fe09
+e7e08005
+580000ff
+e7e08005
+6fe40bec
+e7e40005
+1a220c00
+18427200
+20407d5f
+20202943
+580ea801
+67e18bec
+58000007
+67e08bef
+6fe0c8d1
+67e08bf0
+6fe08a75
+67e08bf1
+6fe08a74
+2feffe07
+204028f5
+67e08bf2
+60488bf3
+20600000
+da200a79
+d8400012
+58000021
+24608000
+da200a8b
+68488a76
+184085ee
+58000022
+20600000
+d8a047af
+58000002
+e7e08005
+58000001
+e7e08005
+58000002
+e7e08005
+20600000
+d8401827
+58000003
+e7e08005
+58000003
+e7e08005
+e0410005
+20600000
+2020290e
+204016a5
+20401c38
+20402918
+24768000
+6fe08002
+1fe0fe01
+67e08002
+6fe149b5
+20407e05
+202016b2
+2040291a
+2020174a
+6fe0c7ce
+1fe0fe01
+67e0c7ce
+67e08016
+c1940000
+7047ce25
+70001625
+20600000
+6fe0816b
+1fe17e0f
+c0002927
+c0012927
+20600000
+e8408006
+18467c06
+20610000
+18467c25
+24610000
+1840a3fa
+18c0a406
+e8408012
+18467c01
+20610000
+18467c1e
+24610000
+18427e00
+207a0000
+4777c03d
+efe08006
+c07fac3d
+c0152f06
+c003acb5
+1840fe01
+9a267c00
+20610000
+9a40a400
+18467fff
+9a20a200
+1a227e00
+207a0000
+2020292e
+6fe08000
+1fe0fe01
+67e08000
+4778403e
+204016a5
+df200027
+d8c041f5
+d8a00a97
+20407d52
+70001625
+db600708
+7856fc00
+20401c38
+2040295f
+180a7e00
+d84001ff
+98417e00
+1fe0fe64
+20407d0e
+6fe08016
+1fe0fe01
+67e08016
+c094294f
+df200027
+d8a041f5
+d8c00a97
+20407d52
+202016b2
+d8400002
+6048c1f5
+6848c7ae
+1840fe06
+67e0c1f6
+6fe3437a
+67e341f7
+18427200
+d8c047af
+20407d52
+20201836
+4778c03e
+68490be1
+6fe08be0
+18420c00
+da2048f2
+de004902
+20402b88
+20407e56
+1a627e00
+9e008c00
+684a4902
+6fe10bfd
+1fe22200
+df20000a
+efe20011
+203a2985
+98467c00
+20628000
+1a20a204
+c2002978
+6fe10bfd
+1fe20a00
+1fe08c04
+df200024
+20407d52
+e0420005
+20207e54
+e0420011
+20207e54
+2040298e
+20402992
+20402999
+2040299d
+204029a1
+204029a5
+202029a9
+d840001a
+da20499b
+da400000
+20205ddc
+d8400013
+da20493e
+da40001a
+20405ddc
+6fe0c94e
+67e0ca16
+20600000
+d8400010
+da204afe
+da40002d
+20205ddc
+d8400010
+da204824
+da40003d
+20205ddc
+20600000
+d8400001
+da40004d
+20205ddc
+d8400003
+da204b37
+da40004e
+20205ddc
+6fe149d9
+c3810000
+d8400040
+da20098e
+da400051
+20405ddc
+20402de1
+d8c0098e
+1a20a206
+1a220a00
+20407d0c
+1a427e00
+9a20a200
+c20029b2
+20600000
+204029bb
+204029bf
+202029c3
+d8400013
+da20493e
+da40001a
+20205e02
+d8400010
+da204afe
+da40002d
+20205e02
+d8400010
+da204824
+da40003d
+20205e02
+d8400003
+da204b37
+da40004e
+20205e02
+204029d0
+d8400040
+da20098e
+da400051
+20205e02
+20402de1
+d8a0098e
+1a20a206
+1a220c00
+20407d0c
+1a427e00
+9a20a200
+c20029d3
+20600000
+d8400000
+202029e3
+d8400001
+202029e3
+d8400002
+202029e3
+d8400003
+202029e3
+d8400004
+202029e3
+4779403e
+20407cc8
+20405f11
+580000aa
+e7e08003
+58000003
+e7e08003
+1f20fe04
+e7e08003
+e0410003
+e2410003
+1a220c00
+20405f1f
+580000bb
+e7e08003
+20405f15
+20207cd4
+204029fb
+d84e1000
+20405eca
+20405ed7
+d8400081
+60588061
+20600000
+58001c00
+67e1095c
+58001c01
+e7e10005
+58001c02
+e7e10005
+58001fff
+e7e10005
+6fe4095c
+20205eb2
+20402a15
+20202a0d
+20402a72
+20202a68
+7047cf01
+20600000
+7047cf00
+20600000
+da402a11
+da200015
+d8e0000d
+20202a5d
+6fe0c933
+c1800000
+da602a19
+20202dec
+da402a26
+da20001d
+d8e0000e
+20202a5d
+1a208c1a
+efe08006
+c4008000
+204028cb
+20407967
+24740000
+6fe08a76
+1fe0fffe
+67e08a76
+6fe08a74
+79407e07
+e7e08012
+202028d9
+6fe0c933
+c0002a2a
+c0012a5b
+20202a4a
+da602a2c
+20202dec
+204028cb
+20407967
+24740000
+6fe08a74
+1fe0ffff
+e7e08012
+c2832a3d
+1fe17e3f
+205a2a44
+6a210c02
+1a208c1a
+efe08006
+c4000000
+d8a047ae
+d8c00a76
+20407d0a
+20202943
+1fe17e3f
+247a0000
+6a210c02
+1a208a16
+58000000
+e7e08005
+2020793a
+da200a74
+20407956
+20407985
+247a0000
+700a7454
+2020793f
+20402c16
+20402c22
+20402c30
+20402a53
+24628000
+6fe0c933
+c001aa57
+c000aa59
+20600000
+6fe0c7d2
+1fe0ffff
+67e0c7d2
+20600000
+7047d358
+20202a0b
+7047d306
+20202a0b
+20402c93
+20202943
+180a7e00
+1fe17e07
+9a20a200
+6fe0c7cf
+c1808000
+20407d74
+247a0000
+1a227e00
+20407d66
+1a427e00
+20207e05
+da6047d0
+da402a6b
+20203191
+6fe0c933
+c1808000
+6fe0c936
+79207e00
+67e0c936
+70493303
+20202a7b
+da6047d3
+da402a75
+2020318a
+6fe0c933
+c001aa7b
+c000aa79
+20600000
+7047d206
+20202a09
+7047d206
+20202a09
+20402a83
+20402a8b
+20402a90
+20402a95
+20402a9d
+20202aa1
+20402aae
+d8c04844
+df20000f
+20402b0e
+20402b28
+d8c00900
+d8a04834
+20207d0c
+20402ab1
+20402b28
+d8c00900
+d8a047e4
+20207d0c
+20402ab1
+20402b28
+d8c00900
+d8a04814
+20207d0c
+6fe44804
+67e447dc
+6fe4480c
+67e447d4
+d8c047d4
+da204834
+de0047f4
+20202b76
+d8c04804
+da204834
+de004804
+20202b76
+d8c047f4
+df200010
+20402b0b
+d8c0485d
+df200009
+20402b0e
+20402b28
+d8c00900
+d8a04824
+20207d0c
+20402aaf
+d8c04804
+20202b0a
+20402aac
+d8c0480c
+20202b0a
+d8c0499b
+df200004
+20402b11
+d8c0499f
+df200006
+20402b11
+d8c049a5
+df200010
+20202b0b
+20402ac6
+da20493b
+da400900
+df20000b
+efe10011
+e8410012
+9842fe00
+e7e10011
+1a20a202
+1a40a402
+c2002abe
+20600000
+d8c047f4
+df200010
+20402b0b
+d8c04853
+df20000a
+20402b0e
+20202b28
+d8c0493e
+d8a04891
+20407d0c
+d8c04891
+da2048a1
+de0048b1
+20402b78
+de0048c1
+da400001
+58000000
+20402b7a
+6fe0c8d0
+1fe17e7f
+67e0c8d1
+de0048e2
+da400002
+58000010
+da2048c1
+20402b7a
+de0048d2
+da400003
+58000010
+da2048e2
+20202b7a
+d8c04afe
+da2048f2
+de004902
+20402b78
+d8c04912
+da204902
+de004922
+58000004
+20402b88
+6fe0c931
+1fe17e3f
+79207e06
+67e0c932
+20600000
+da204b3e
+6fe3cb44
+20202af8
+da200c0c
+6fe38c12
+67e38bc7
+58000000
+67e28bbe
+20402b01
+6fe30bce
+e8430011
+9842fe00
+e7e30011
+20600000
+6fe24a13
+67e20bc3
+d8c048d2
+20406dbe
+d8c00bbe
+20406dc0
+20406d59
+d8a00bce
+20206dd1
+df200008
+20402b18
+20402b67
+20202b15
+20402b18
+20407d5f
+20202b15
+20402b18
+20402b67
+5800002c
+e7e08005
+18a27e00
+67e14877
+20600000
+18c20400
+1f222200
+6fe14877
+1fe20a00
+6fe0c866
+205a2b21
+18420c00
+1a227200
+20600000
+70486601
+20402b25
+d8a00abe
+20600000
+df200020
+d8a00abe
+20207d17
+20402b45
+da400010
+da200abe
+6f244867
+204029d9
+20402b60
+58000abe
+67e1487e
+2040729b
+6fe1487e
+1fe20c00
+d8a004a8
+20407cff
+204072a2
+6fe1487e
+1fe0fe40
+67e1487e
+6fe0c87b
+1fe0ffff
+67e0c87b
+243a2b31
+204072de
+da200900
+df200020
+20407d37
+da400011
+da200900
+df200020
+202029d9
+70486600
+6fe14877
+1fe20a00
+d8400080
+e0408005
+d8400abe
+98467e00
+67e44867
+1fe98400
+604c486f
+1ff1a600
+1a6b2600
+1fe17e3f
+1fe67c37
+24412b5e
+1a60fe01
+67e0c87b
+1fefa240
+1ff22600
+1a60a7ff
+58000aba
+9a20a200
+6fe2486f
+e7e20011
+20600000
+1a60a601
+20600000
+da200abe
+df200004
+20407d37
+1a20a202
+1a60a7ff
+2422ab61
+20600000
+efe08006
+1ff18400
+20402b70
+e0408005
+1fe1040f
+20402b70
+e0408005
+c2002b67
+20600000
+18467c09
+20212b74
+18408457
+20600000
+18408430
+20600000
+58000020
+20202b88
+58000010
+20202b88
+6848c880
+18408401
+98408400
+604884a7
+1a220c00
+1fe27200
+20407d52
+6848c880
+18427200
+20407d5f
+1a427e00
+e7e08005
+da2048b1
+20202b8b
+67e084a7
+1fe27200
+20407d52
+1a220c00
+d8a0098e
+20407d0c
+da400012
+da2004a8
+6f2084a7
+204029d9
+da400013
+da20098e
+df200010
+204029d9
+20406a86
+1e020a00
+20406dd1
+da400014
+1e022200
+df200010
+202029d9
+68488beb
+20202ba0
+18000401
+18007000
+6fe10bde
+1fe20c00
+efe18006
+1fed7e00
+9841de00
+1f00f001
+efe20006
+1fe25e00
+1f00f001
+efe20006
+1fe25e00
+1f00f001
+1a30de00
+1df05e00
+efe10006
+9de1de00
+20600000
+6fe08be0
+1fe22200
+20402b9d
+20406d59
+1800700c
+1de27e00
+1a227200
+68490be1
+18420c00
+20406da8
+20206c88
+700beb19
+20202bc1
+700beb09
+20202bc1
+67e08be0
+60490be1
+4779c03e
+20402bb2
+18007008
+98005e00
+1800700d
+1de27e00
+18007009
+98005e00
+18002200
+18422600
+20402b9f
+20406d5f
+20402c00
+604c0be3
+6fe08be0
+1fe22400
+20402c08
+68488be0
+6fe10be1
+9840a200
+684c0be3
+e0420011
+6fe08beb
+1fe67e09
+207a0000
+e0440011
+20600000
+700beb19
+20202be2
+700beb09
+20202be2
+67e08be0
+60490be1
+18422600
+1fe22400
+9a608c00
+477a403e
+efe40006
+18007008
+98005e00
+18007009
+1fef7e00
+98005e00
+18002200
+20402b9f
+20406d5f
+20402c00
+604c0be3
+20402c08
+20402bb2
+20402c00
+6fe08beb
+c00cabfd
+604a0be7
+6fe20be3
+684a0be7
+98467e00
+20600000
+6fe40be3
+98467e00
+20600000
+1800700c
+1de27e00
+1800700d
+1de20400
+18500400
+18500400
+98418400
+20600000
+1a20a201
+20402b9f
+1a620c00
+20406dbc
+20406d5f
+20406dd8
+1a60a610
+1a40a5f0
+20212c08
+20600000
+70493301
+70493400
+7047cf01
+20600000
+580001a8
+67e10bec
+6fe0c935
+e7e08005
+6fe2499b
+20407d4c
+e7e20005
+6fe3437a
+e7e30005
+6fe1c936
+e7e18005
+20600000
+20402c24
+20202943
+7047ae15
+58000014
+67e0c7af
+5800002b
+e7e08005
+58000000
+e7e08005
+d8c00bec
+20407d0c
+6fe14939
+e7e10005
+20600000
+20402c32
+20202943
+7047ae1d
+204028fe
+20402906
+20402c37
+20202c2b
+58000015
+e7e08005
+58000016
+e7e08005
+e0410005
+20600000
+1840f3ff
+20402d01
+24740000
+efe08006
+c0002c45
+c0012c60
+c0032c7f
+20600000
+20402c52
+24740000
+20402a7d
+20402c4a
+20202ca9
+d8400012
+20402c81
+58000001
+e7e08005
+6fe149a3
+e7e10005
+d8c04804
+20207d0c
+20407e56
+e8410006
+d8a04804
+20407d0c
+6fe149a3
+98467c00
+24628000
+6fe0c934
+c3808000
+79207e01
+67e0c934
+70493302
+20402ca5
+20207e54
+18c22200
+6fe0c933
+c1000000
+6fe0c934
+c4008000
+c3810000
+1a220c00
+df200016
+d8a0493b
+20407d5f
+20402aba
+6849493b
+6fe149a3
+98467c00
+24628000
+20402cad
+6fe0c934
+79207e02
+67e0c934
+20402acd
+6fe0c94e
+67e0ca16
+20402c78
+20202cb1
+d8400006
+20402c81
+58000003
+e7e08005
+6fe3499f
+e7e30005
+20600000
+da400012
+20202ceb
+477ac03e
+20402c9f
+58008fff
+67e14955
+20402a09
+1840fe09
+67e0c7ae
+204028fe
+1840fe05
+e7e08005
+580000ff
+e7e08005
+580001a8
+1ff0fe00
+e7e10005
+6fe08bfc
+e7e08005
+20600000
+6fe24951
+243a2c96
+20202c9f
+1c427e00
+684a4951
+98460400
+6fe14955
+98467c00
+20610000
+20402a0b
+6fe149bb
+20207e05
+1c427e00
+67e24951
+20600000
+18c0a3fd
+da400001
+202029d9
+df200001
+da400002
+da204934
+202029db
+6f20c7ae
+da400003
+da2047af
+202029db
+df200001
+da400004
+da204934
+202029db
+6f20c7ae
+da400005
+da2047af
+202029db
+20402cf9
+24740000
+6fe08bef
+c0032ce9
+6fe0c933
+c1000000
+c1018000
+6fe10bf0
+684949a3
+98467c00
+24628000
+da200bf2
+da400007
+20402d0b
+20740000
+477b403e
+6fe08bef
+c0002cca
+c0012cce
+c0022cdd
+20600000
+6fe149a3
+67e10a78
+d8c00a78
+20202c45
+6fe0c933
+c1000000
+6fe0c934
+c4008000
+c3810000
+d8c00a7a
+df200014
+d8a0493d
+20407d5f
+20402ac6
+da20493d
+da400900
+df20000a
+20402abe
+20202c6f
+6fe0c933
+c1808000
+70493302
+d8400003
+20402c81
+58000005
+e7e08005
+6fe149a3
+e7e10005
+58000001
+e7e08005
+20600000
+d8c00bf0
+da400008
+477bc03e
+efe08006
+18c22200
+6848c8d1
+98467c00
+24628000
+20402c9f
+20402d0b
+20740000
+700c3a01
+68488a79
+18408401
+d8c00a7a
+20202f07
+d8a00bec
+20407d0c
+da200bec
+df200010
+20407d37
+df200010
+d8c00bec
+20202d01
+20407e56
+e8410006
+580001a8
+1ff0fe00
+98467c00
+24628000
+efe08006
+67e08bfc
+20407e54
+20202ca2
+477c403f
+20402d44
+20202d0e
+1a208c01
+e8408006
+1851fe00
+c000ad3e
+1fe67c04
+24217e54
+1fe27200
+20402d34
+18410e0f
+98e67c00
+2042ad2d
+18e08fff
+6fe08a78
+afefffff
+2020fe54
+f9207e00
+67e08a78
+1a208c02
+efe08006
+1fe27200
+1a427e00
+98effe00
+d8a00a7a
+98a08a00
+20407d52
+6fe08a78
+9a667c00
+2442fe54
+2422ad39
+20402d65
+20207e56
+1fe0ffff
+9a4ffe00
+1a208c02
+e8408006
+9840fe00
+67e08a79
+20600000
+da600000
+1f208fff
+f9202600
+c2002d35
+20600000
+6fe10a74
+1fe20a00
+d8c00a76
+df200021
+20207d52
+efe08006
+1fe27200
+67e08a79
+d8a00a7a
+20407d5f
+20207e56
+70495832
+20402d53
+68494959
+98467c00
+2022ad57
+18467c00
+2022ad57
+6849497a
+98467c00
+2022ad5a
+18467c00
+2022ad5a
+20402d65
+20402d53
+20202d57
+efe08011
+207a0000
+79207e08
+20600000
+67e14959
+58004959
+20202d5d
+67e1497a
+5800497a
+20202d5d
+67e10a74
+1fe20c00
+d8a00a76
+df200021
+20207d52
+da604958
+da402d65
+2020318a
+d8a04959
+df200042
+20207d26
+6fe089f8
+c024ad6d
+c00dad76
+c00e2d7d
+20600000
+20402d70
+6fe149d1
+20207e05
+58000080
+67e08a10
+5800004a
+e7e08005
+700a0f02
+20202ff2
+20402d9b
+6fe149d9
+c3810000
+20402da5
+20402dae
+6fe149d5
+20207e05
+20402d9b
+6fe149d9
+c3810000
+20402da5
+684909fb
+184cfe00
+1ff1fe00
+c0062d8b
+20402d90
+24740000
+58000000
+e7e10011
+6fe149d5
+20207e05
+5fffffff
+e7e40011
+e7e40005
+6fe149d5
+20207e05
+df200008
+efe10011
+da40ffff
+9a467c00
+2022fe54
+98467c00
+2022fe54
+1a20a202
+c2002d91
+20407e56
+20600000
+58000080
+67e08a10
+5800001f
+e7e08005
+58000000
+e7e08005
+6fe309f9
+e7e30005
+700a0f09
+20202ff2
+20402de1
+1a20a206
+6fe109f9
+6849494f
+18508400
+98467e00
+9a4ffe00
+9a20a200
+20600000
+684909fb
+df200008
+efe10011
+203a2db8
+da40ffff
+9a467c00
+2022adb8
+1a20a202
+c2002db0
+20600000
+18508400
+e0410011
+20600000
+20406dfb
+58002922
+67e149b5
+58002de5
+67e14465
+58002f68
+67e149cf
+580029b8
+67e149b9
+580029cb
+67e149d5
+580029c7
+67e149d3
+58002dea
+67e1446f
+58002735
+67e149b7
+20758000
+7047ce24
+20402842
+477cc03f
+204029f4
+20402df5
+da20493e
+da400000
+df200001
+204029db
+20402987
+20402ddd
+6fe0c93e
+c07fac12
+20402ae5
+20402acd
+202027f6
+6fe3499f
+20407d46
+67e3437a
+20600000
+6f20c9db
+6a2149dc
+6a4149de
+20600000
+20402844
+20402a05
+20403018
+204028d0
+2020290d
+20402a07
+20202d62
+20402de1
+20402eee
+1a627e00
+20407e05
+20402ef3
+1a427e00
+9a20a200
+c2002ded
+20600000
+7080700c
+7080734d
+7080722c
+7080712d
+7080743e
+20205dbf
+477d403f
+6fe08c14
+c283ae00
+704b0e00
+20202fb6
+20402e05
+20402e22
+20740000
+20402e32
+20202e3e
+df200003
+da200c15
+20407d37
+6fe18c15
+1fe1041f
+6048c9e4
+1ff1fe00
+1fe37e00
+1fe1041f
+6048c9e3
+1ff1fe00
+1fe37e00
+da201fff
+9a210400
+1fe22400
+6fe149e1
+98467c00
+2442ae1e
+604949e1
+1a4cfe00
+1ff1fe00
+1fe37e00
+67e0c9e0
+67e0cb0e
+20600000
+58000000
+67e249e5
+7049ea00
+20600000
+20407e56
+6fe0c9e3
+1fe20e00
+6fe249e5
+afefffff
+2020fe54
+f9207e00
+67e249e5
+6848c9e4
+1840f201
+1f208fff
+afefffff
+24608000
+c2002e2c
+7049e901
+20600000
+6fe08c0a
+1fe0fffa
+1fe27200
+6848c9ea
+98408400
+6048c9ea
+d8a049eb
+6fe0c9e3
+1feffe0c
+98a08a00
+d8c00c18
+20207d5f
+6fe0c9e9
+c1000000
+58000000
+67e2c9e5
+68490c0e
+18508400
+5800e000
+98410400
+6fe149e1
+9841fe00
+1ff0fe00
+67e10c0e
+20202fc0
+6fe08a0f
+1fe08401
+1fe27200
+60488bff
+6fe08c14
+793ffe07
+67e0cb46
+d8c00a10
+20407d52
+20202f9e
+1a208404
+1a227200
+60488bff
+d8a04b4a
+20407d52
+6fe08c14
+79207e07
+67e0cb46
+20202f9e
+6fe089f8
+c000ae65
+c0012e6b
+c0212e70
+c0262e73
+c02f2e79
+20600000
+da602e67
+20202edd
+6fe149bd
+20407e05
+67e089f9
+20202765
+da602e6d
+20202edd
+20402765
+6fe149bf
+20207e05
+2040277d
+6fe149c1
+20207e05
+6fe109f9
+20402e88
+67e089fe
+2040276d
+6fe149c3
+20207e05
+6fe14a0f
+684909fb
+98467c00
+20628000
+6fe109fb
+20402e9a
+67e08a03
+6fe109fb
+67e14a0f
+6fe149c5
+20407e05
+604909f9
+20402775
+6fe149c7
+20207e05
+207a0000
+1feffe64
+d840ffff
+9846fc00
+20407def
+18070400
+184c8400
+1807fe00
+18467cff
+24628000
+1fe0fe01
+20600000
+dfe0ffff
+984ffe00
+1fe6fc64
+20407def
+18078400
+20600000
+d8400320
+98462200
+20402ea9
+1a227e00
+9846fc00
+20407def
+1807fe00
+20600000
+18422200
+20402ea9
+1a227e00
+984ffe00
+d8400320
+98408400
+20600000
+58004e20
+d8400320
+98467e00
+1fe6fc64
+20407def
+18078400
+20600000
+d8e00000
+6f20c9db
+20407e56
+6fe1494f
+98467c00
+2022aebc
+1ff0fe00
+1fe0fe01
+1ff0fe00
+18e08e01
+c2002eb4
+20600000
+704a1100
+60e0ca12
+20402ef8
+20207e54
+d8e00000
+da600000
+20402de1
+20407e56
+6fe149d9
+c3012ed3
+efe10011
+98467c00
+2042aed1
+1a427e00
+9a20a200
+18e08e01
+c2002ec4
+1a627e00
+207a0000
+67e0ca11
+20207e54
+f9202600
+20600000
+1a208c06
+de000008
+efe10006
+98467c00
+2022aedb
+1e00e1ff
+2022aec9
+20202ed5
+20402ed1
+20202ec9
+d8e00000
+6fe0ca11
+203a2ee9
+1fe22400
+6f20c9db
+60e0ca12
+aa4fffff
+2040aee9
+68e0ca12
+18e08e01
+c2002ee2
+20600000
+20402eee
+20402ef8
+1a627e00
+20407e05
+20202ef3
+67210c00
+62210c02
+62410c04
+62610c06
+20600000
+6f210c00
+6a210c02
+6a410c04
+6a610c06
+20600000
+477dc03f
+6fe1494f
+1ff0fe00
+98e0fe00
+1ff0fe00
+67e14b3a
+20402de1
+18e27e00
+9a4ffe00
+9a20a200
+1a208c17
+efe10006
+67e1448a
+20600000
+700c3a00
+18467c0c
+20610000
+18467c1e
+24610000
+477e403f
+20402f60
+20402f2e
+24740000
+20402af6
+20402f57
+6fe08c0a
+d8400c12
+20402be0
+24628000
+477ec03f
+68490c12
+20402eb0
+20342f3b
+df20001d
+d8a00a98
+d8c00c0b
+20407d5f
+20402f24
+df20001d
+d8c00a98
+d8a00c0b
+20407d5f
+6fe149cf
+20207e05
+20402ec0
+20342f3b
+704a11ff
+5800ffcf
+98467c00
+2022af3b
+5800ffff
+98467c00
+2022af3b
+20600000
+20407e56
+68488c0b
+1851fe00
+1fe97e00
+6a20ca16
+1a212201
+9a267c00
+24628000
+1841047f
+6fe0c8d1
+98467c00
+24628000
+20207e54
+da204a17
+df20000a
+68490c10
+efe10011
+203a2f45
+98467c00
+2022af46
+1a20a205
+c2002f3d
+da204a17
+e0410011
+60490c35
+1a20a602
+efe18013
+67e18c37
+20202f4b
+20402f54
+6fe18c37
+68498c0d
+98467c00
+20610000
+e0418013
+20402f54
+20402fb1
+20202dfb
+da200c0d
+df200003
+20207d37
+20402f5a
+d8c048e2
+20206dbe
+d8a00c28
+58000000
+e7e08005
+6fe30c0c
+e7e40005
+20202fac
+1840fff4
+67e08c0a
+df20001d
+d8a00c0b
+20407d26
+1840f3ff
+d8a00c0b
+20207d52
+20402f79
+24740000
+20402f8e
+700a740a
+6fe08c0a
+1fe0840d
+60488a76
+184085ff
+e0408005
+5800002a
+e7e08005
+1840f3ff
+6fe38c0b
+d8c00c0b
+20407d5f
+da200a74
+2020793f
+20407e56
+6fe08c3a
+c1008000
+6fe149d9
+c3808000
+6fe0c933
+c1800000
+68490c10
+20402eb0
+24740000
+20402f93
+24740000
+20402f96
+6fe08c0c
+207a0000
+1fe0ffff
+207a0000
+67e08c0c
+58004a71
+67e1448a
+20207e54
+20402f57
+6fe08c0a
+d8400c12
+20402bbf
+20202af6
+58004a49
+67e10bfd
+2020296a
+df200002
+da200c12
+da400021
+204029db
+6f208be0
+6a210be1
+da400021
+202029d9
+477f403f
+20402fa2
+20402fab
+202028ba
+6fe08bff
+1fe0a202
+1fe0fe04
+67e08bff
+d8404b44
+20202fa8
+20402f57
+1a227e00
+20202bbf
+20202af3
+6fe24a13
+e7e20005
+18a0fff3
+67e10bde
+20600000
+6fe08c0a
+1fe0f20b
+da200c0b
+da400020
+202029d9
+c3032fb9
+20402fdf
+20202fbb
+20402fec
+20202fbb
+6fe08c0a
+1fe0fff9
+de000c15
+20407e56
+20202fcd
+6fe08c14
+c3032fc4
+20402fdf
+20202fc6
+20402fec
+20202fc6
+6fe0cb0e
+245a7e54
+205a7e56
+6fe0c9ea
+1fe0fffc
+7049ea00
+de0049eb
+1e020400
+20402fd9
+24628000
+df200001
+da200be0
+da400040
+204029db
+20402fdc
+24740000
+6fe10be1
+1fe26000
+2020272e
+24342be0
+1fe0fffc
+20202bde
+58004b0f
+67e10bfd
+2020296a
+20402fe2
+d8c04afe
+20206dbe
+d8a00c28
+58000001
+e7e08005
+6fe0cb0e
+d8400000
+7d3a0407
+e0408005
+6fe38c0d
+e7e38005
+20202fac
+20402fef
+d8c04824
+20206dbe
+d8a00c28
+58000002
+20202fe4
+477fc03f
+204030d7
+204030d8
+204030a7
+20402ffb
+20740000
+20403010
+da200c43
+2020793f
+20407e56
+d8400002
+6fe0c933
+98408400
+6fe08c3a
+1fe67c01
+79228406
+60488c43
+6fe4cb3d
+67e48c47
+6fe08a10
+c1ea0000
+6fe0c933
+c0807e54
+6fe08a13
+67e08c46
+6fe08c43
+1fe0fe01
+79207e05
+67e08c43
+20600000
+6fe08a0f
+1fe27200
+67e08c50
+6fe08c14
+67e08c51
+d8a00c56
+d8c00a10
+20207d5f
+da60301a
+20202dec
+1a208c16
+efe08006
+247a0000
+efe10006
+67e1448a
+da200c43
+20407967
+24740000
+6a210c02
+68488c43
+18417e0f
+203a3056
+1a208a16
+58000001
+e7e08005
+20403040
+68488c43
+20403046
+1a208a19
+e7e08005
+79200404
+184085ff
+e0408012
+68488c43
+284ffe04
+2420b05b
+68488c50
+60488a0f
+18427200
+d8a00a10
+d8c00c56
+20407d5f
+18467c0f
+2421303d
+20202e4b
+6fe20c52
+67e20c3e
+2020307c
+6fe08c51
+67e08c14
+6fe48c47
+67e4cb3d
+67e48c0b
+20600000
+58000003
+20403053
+6fe08c46
+284ffe05
+20608000
+58000001
+20403053
+58000000
+284ffe06
+24608000
+58000002
+20403053
+20207e60
+1a208a1a
+e7e08005
+20600000
+58000000
+1a208a19
+e7e08005
+da200c43
+20207956
+2040309f
+204030b3
+6fe4cb3d
+67e48c47
+20403074
+58000000
+67e0cb0e
+20403095
+68488a0f
+60488c50
+18427200
+d8c00a10
+d8a00c56
+20407d5f
+18467c0f
+2421306e
+da200c44
+20407976
+20202e4b
+204030bb
+6fe20c3e
+67e20c52
+da200c44
+20407976
+2020307c
+6fe08c50
+1fe27200
+67e08a0f
+6fe08c51
+67e08c14
+d8c00c56
+d8a00a10
+20207d5f
+204030c8
+58000a10
+67e10c3b
+20403040
+2040309f
+204030b3
+68488a0f
+5800000c
+20407e4a
+1fe22200
+18427e00
+9a267e00
+67e08a0f
+6fe10c3b
+1fe20c00
+9a208400
+60490c3b
+20402e55
+6fe08a0f
+207a0000
+6fe08c40
+1fe0fe01
+67e08c40
+204030c8
+2020307f
+6fe08c14
+c3033099
+20402fdf
+2020309a
+20402fec
+6fe08a0f
+1fe08404
+60488a0f
+d8400a10
+20202bbf
+6fe1cb37
+1fe0fe01
+67e1cb37
+6fe0c957
+1fe0fe01
+67e0c957
+6fe149d3
+20207e05
+6fe0ca16
+1ff27e00
+1fe9fe00
+6848c8d1
+9841fe00
+67e0cb3d
+6fe0cb3c
+67e0cb3e
+6fe14b3a
+67e14b42
+6fe10c35
+67e14b44
+6fe1cb37
+67e1cb3f
+da204b3f
+df200003
+20407d37
+6fe44b3e
+67e40c0c
+20600000
+6fe08a0f
+1fe6fc0c
+20407def
+18078400
+18077e00
+205a30d5
+60488c41
+700c4000
+6fe1cb37
+d8401fff
+98417e00
+67e10c3e
+20600000
+6fe10c3e
+1ff27e00
+1fe3fe00
+68488c40
+9841fe00
+1ff27e00
+1fe3fe00
+68488c41
+9841fe00
+67e1cb47
+df200003
+da204b47
+20207d37
+184085ff
+20600000
+20600000
+da200a10
+6f208a0f
+da400041
+202029db
+44d74015
+6fe0c09a
+203a30dc
+c0023620
+c007b247
+c004cad6
+c0053764
+c00733e2
+c006c9c0
+c0064cba
+c005adbb
+c00293df
+c0043bc1
+20600000
+700a5100
+7000e400
+7000e500
+58000000
+67e28870
+6fe0c09a
+203a30ea
+c005378d
+20600000
+20758000
+20405c15
+20405c1e
+20405c24
+20405c29
+20405c2f
+20405c33
+6fe0c09a
+c004cc15
+c002362c
+c0043c02
+c006ca90
+20600000
+7041efff
+580041ef
+67e140ca
+704790ff
+70417a88
+70417cce
+20600000
+204060dc
+204077b9
+20407887
+20403111
+6fe14465
+20207e05
+6fe14463
+20207e05
+6fe14461
+20207e05
+44d7c015
+da204772
+20407e31
+207a0000
+1fe22600
+2040311a
+2020313f
+da600000
+20600000
+c000b12c
+c0083173
+c002b150
+c0093157
+c003316f
+c00231b1
+c00131b6
+c009b1b1
+c00a3166
+c00ab16a
+c001b149
+c005b15b
+c0063162
+c00b3177
+c00c3145
+c0153135
+c015b133
+20600000
+6fe1478c
+79207e00
+67e1478c
+6fe14480
+793ffe00
+67e14480
+202078c9
+70030c00
+20600000
+6fe0830c
+1fe0fe01
+67e0830c
+1fe67c01
+202131ec
+70030c00
+6fe14480
+79207e09
+67e14480
+202031f6
+6fe14467
+20207e05
+6fe1445b
+20207e05
+6fe1445f
+20207e05
+6fe14480
+79207e01
+67e14480
+2020321f
+6fe1478c
+79207e07
+67e1478c
+6fe14480
+79207e02
+67e14480
+20600000
+6fe1478c
+79207e01
+67e1478c
+6fe14480
+79207e04
+67e14480
+20600000
+6fe1478c
+79207e03
+67e1478c
+20600000
+6fe1478c
+79207e05
+67e1478c
+6fe14480
+79207e03
+67e14480
+20600000
+6fe1478c
+793ffe05
+67e1478c
+20600000
+6fe1478c
+79207e09
+67e1478c
+20600000
+70443500
+6fe1478c
+793ffe09
+67e1478c
+20203225
+6fe1478c
+79207e02
+67e1478c
+20600000
+6fe14480
+79207e00
+67e14480
+20600000
+6fe14480
+79207e08
+67e14480
+202031f6
+67e0830d
+44d84016
+6fe0830d
+207a0000
+1fe0ffff
+67e0830d
+204077c5
+204031e3
+204031a4
+204031aa
+20405cdc
+204060d9
+6fe1446f
+20407e05
+2020317c
+efe08013
+207a0000
+1fe0ffff
+e7e08013
+247a0000
+1a427e00
+20207e05
+efe10013
+207a0000
+1fe0ffff
+e7e10013
+247a0000
+1a427e00
+20207e05
+684944ca
+1840a601
+da40319c
+2020318a
+2040323b
+c000b19f
+20203217
+58000002
+e7e08013
+1840a408
+efe10012
+20207e05
+da60447b
+da4031a7
+2020318a
+20400a61
+2022b21b
+20600000
+da604788
+da4031ad
+20203191
+204031fd
+20403215
+6fe14469
+20207e05
+204031c9
+6fe1478c
+793ffe07
+67e1478c
+20600000
+70447b00
+6fe1478c
+c283b1bb
+2fec0001
+2040b118
+44d8c016
+6fe1478c
+793ffe00
+793ffe01
+793ffe02
+793ffe03
+793ffe07
+67e1478c
+20203225
+204031c6
+20203217
+58000000
+67e1447e
+20600000
+58000000
+67e14480
+20600000
+6fe14480
+67e1447e
+58000000
+67e14480
+20600000
+6fe14480
+79207e07
+67e1447e
+58000000
+67e14480
+20600000
+6fe0c78c
+2feffe05
+20600000
+6fe0c641
+67e0c47b
+20600000
+d8e00009
+202015ba
+d8e00009
+202015be
+70447c05
+202031dd
+da60447c
+da4031df
+2020318a
+7045f301
+20600000
+7045f300
+20600000
+70095b0a
+2020787a
+70095b1d
+2020787a
+44d94016
+6fe0c47d
+67e080bd
+70030b01
+70095b03
+2020787a
+70095b1e
+2020787a
+70095b04
+2020787a
+6fe14791
+67e14788
+20403211
+70095b01
+2020787a
+58000000
+67e14788
+70095b02
+2020787a
+70095b0f
+2020787a
+70095b10
+2020787a
+70095b0e
+2020787a
+70095b0d
+2020787a
+70095b17
+2020787a
+70095b18
+2020787a
+70095b16
+2020787a
+70095b11
+2020787a
+70095b15
+2020787a
+70095b14
+2020787a
+70095b13
+2020787a
+70095b19
+2020787a
+70095b06
+2020787a
+70095b05
+2020787a
+70095b1f
+2020787a
+70095b20
+2020787a
+70095b25
+2020787a
+7920000d
+20600000
+793f800d
+20600000
+2040323b
+c0013231
+58000001
+e7e08013
+1840a203
+1840a406
+e8408011
+1a60a601
+e0408013
+202031a2
+58000000
+e7e08013
+6fe1478c
+c304b237
+20402187
+2040320f
+684944ca
+1840a202
+1840a404
+2020322d
+684944ca
+1840a600
+efe08013
+20600000
+2040323b
+c0803242
+20203217
+1840a40a
+202031a2
+58000002
+67e0c78a
+20600000
+20758000
+58003276
+67e1445d
+58006197
+67e1445f
+58003319
+67e14465
+58003318
+67e14461
+58003291
+67e14467
+580032ce
+67e1446f
+58003278
+67e1446d
+58003283
+67e1445b
+58003325
+67e1446b
+44d9c016
+204033be
+20403274
+20406172
+204033d0
+204077f0
+204077bb
+5800332f
+67e14870
+58003320
+67e14867
+5800331c
+67e14869
+5800327f
+67e1486b
+580033c5
+67e147b3
+580033c7
+67e147b5
+580033cc
+67e147be
+580033c9
+67e147c0
+6fe1478c
+c3860000
+20203217
+7045f707
+20600000
+204033a9
+20203217
+20401b77
+247a0000
+da2009d2
+20407956
+24740000
+d8c009d2
+20204c0d
+6fe148a1
+67e1489b
+70485d01
+202033b2
+6fe0c8a7
+c000b28c
+6fe1478c
+c304b28c
+6fe0c8a8
+c000b1dd
+6fe0c80a
+243a31dd
+202031df
+6fe0c8a5
+6848c8a6
+9841fe00
+c000b1dd
+202031df
+1a627e00
+c016b23f
+c0083227
+c00a3303
+c00ab30c
+c0203299
+c02232a3
+20600000
+2040329f
+6fe143db
+c000b2a9
+70489402
+7048993c
+20600000
+6fe08287
+c3828000
+704a6001
+20600000
+6fe0ca60
+207a0000
+704a6000
+6fe102c3
+203a32be
+20600000
+6fe14376
+203a32bc
+70489401
+684948be
+6fe14372
+9840fe00
+67e14372
+1fe22200
+6fe14374
+9840fe00
+67e14374
+9a20fe00
+1fe30400
+6fe148ca
+9846fc00
+20407dec
+67e14376
+70489a01
+20600000
+70489403
+20600000
+70417700
+70489a00
+6fe102c1
+684948c8
+98467c00
+79212200
+6fe148ca
+684902c1
+98467e00
+79212201
+2a200603
+20608000
+6fe448c8
+67e44372
+70489a01
+20600000
+20403198
+204032dd
+204032e2
+204032f9
+204032ee
+204032e8
+204032d6
+202032fd
+da604a61
+da4032d9
+2020318a
+204033d2
+204033d2
+204033d2
+202033dc
+da6048a3
+da4032e0
+2020318a
+7048a400
+20600000
+da60489d
+da4032e5
+20203191
+da6047c9
+da4047a8
+202033b4
+da604899
+da4032eb
+2020318a
+6fe14376
+67e0c177
+20600000
+da60489a
+da4032f1
+2020318a
+6fe08287
+2fe0c000
+2420b2f7
+70489401
+20403223
+20201f57
+70489a01
+20600000
+da60489b
+da4032fc
+20203191
+20203227
+da604897
+da403300
+20203191
+6fe148b1
+67e14897
+202033d2
+6fe148b1
+67e14897
+58000000
+67e1489d
+67e1489b
+20403380
+204033a9
+70417700
+20203205
+58000000
+67e24897
+67e1c894
+67e143db
+7048aa01
+6fe148a1
+67e1489b
+2040793a
+6fe0c863
+c1000000
+204033b2
+20203392
+2020332c
+6fe0c863
+c1810000
+2020332c
+da6047d7
+204033a5
+da6047d0
+202033a7
+70442700
+da6047e5
+204033a5
+da6047de
+2020331f
+6fe0c436
+c0093328
+20600000
+6fe14437
+c006b35a
+c005b395
+20600000
+6fe0c85d
+207a0000
+202061a3
+1a227e00
+203a3334
+18e27e00
+c0003337
+20600000
+18e27e00
+c000333f
+20600000
+7048a701
+da604801
+204033a5
+da6047fa
+204033a7
+6fe1478c
+c304b356
+20203345
+7048a700
+20203341
+6fe0c8a4
+c1808000
+7048a305
+20600000
+6fe0c8a4
+1fe0fe01
+67e0c8a4
+c000b34b
+c001334f
+20600000
+20403380
+70487b01
+da604876
+20203368
+7048a400
+70487b02
+da604876
+20403368
+6fe0c8a8
+c000b375
+20600000
+6fe148a1
+67e1489b
+20403380
+202033b2
+44da4016
+204034f3
+efe08011
+c001b360
+c003b364
+20600000
+6fe0c8a8
+c0003375
+c000b380
+20600000
+efe08012
+c000b388
+c000338d
+20600000
+44dac016
+6fe0c895
+2feffe00
+24608000
+1a608c06
+efe10006
+1ff0fe00
+1fe0f205
+1a608c03
+204034e7
+e7e08006
+1a622200
+2020793f
+6fe0c863
+207a0000
+7048a801
+da6047f3
+204033a5
+da6047ec
+204033a7
+70488a04
+70488d01
+da604885
+20203368
+6fe0c8a8
+207a0000
+7048a800
+204033a9
+70488a04
+70488d00
+da604885
+20203368
+7048a901
+70488a07
+70488d01
+da604885
+20203368
+7048a900
+70488a07
+70488d00
+da604885
+20203368
+6fe0c8a9
+207a0000
+20203375
+efe10011
+67e14895
+2feffe00
+24608000
+6fe0c8aa
+207a0000
+7048aa00
+6fe448c0
+67e44372
+704a6103
+70488a07
+70489a1e
+6fe0c8a9
+67e0c88d
+da604885
+20203368
+da200001
+202033a8
+da200000
+202033af
+da200000
+20407801
+da200001
+20407801
+6fe148ab
+20206216
+204077ec
+df200007
+2020780e
+da6047c2
+da4047a4
+204033b9
+204033a7
+6fe1489f
+67e1489d
+20203207
+efe10012
+67e14159
+efe10006
+67e14428
+20600000
+da200000
+204061d1
+6fe348ab
+67e3095c
+204061f8
+6fe148ab
+20206216
+7048a501
+20600000
+7048a500
+20600000
+7048a600
+6fe148ab
+20206216
+7048a601
+6fe348ab
+67e3095c
+202061f8
+7044a000
+20600000
+20406125
+67e148ba
+da2048b4
+20406152
+67e0c8b3
+58000065
+c00033e1
+1fe67c64
+242133df
+67e0c88d
+70488a05
+da604885
+20203368
+70488d64
+202033dc
+20203227
+20758000
+20406df3
+580035da
+67e14889
+5800239e
+67e1488b
+5800360c
+67e1488d
+5800345e
+67e1445d
+58003460
+67e1445f
+58003217
+67e14469
+58003462
+67e14465
+58003483
+67e14467
+580031dd
+67e1445b
+580034ed
+67e1446b
+580034ad
+67e1446f
+44db4016
+20403444
+20403470
+2040793a
+70417702
+704c5800
+6fe0ca1a
+67e0c8e9
+c000340d
+6fe0ca1b
+67e0c790
+70442700
+204077bb
+204077c5
+704a4201
+6fe1478c
+c3860000
+20203217
+2020342b
+704a4202
+70442701
+58000020
+20404c09
+d8a042ff
+6fe0c37a
+1fe104f0
+18518400
+20403425
+e0408005
+1fe1040f
+20403425
+e0408005
+20401aac
+6848c2f7
+18427200
+d8a043ea
+d8c042f8
+20407d5f
+6848c2f7
+18427200
+d8a0440a
+d8c042f8
+20207d5f
+18467c09
+20213429
+18408437
+20600000
+18408430
+20600000
+6fe0ca0f
+c0ffb43d
+6fe0ca0d
+c0ffb440
+6fe0ca18
+c0ffb442
+6fe0c97b
+1fe27200
+5800497c
+1fe22200
+1a220c00
+efe08006
+18c22200
+c07fb43b
+1fe20400
+20406069
+c2003435
+20600000
+6fe44a0f
+67e4497e
+2020342d
+67e0c97c
+2020342f
+67e0c97d
+20203431
+204035d6
+da200000
+204061d1
+2040342b
+20403478
+2040345c
+2020344b
+6fe0cc45
+1fe27200
+58004c46
+1fe22200
+1a220c00
+efe08006
+18c22200
+c07fb456
+1fe20400
+67e0cc4a
+20403458
+c200344f
+20600000
+6fe0cc4a
+c17f8000
+98000400
+20206069
+704a1e64
+20600000
+2040609d
+20206197
+20206197
+202061a3
+2040347a
+20403465
+20203461
+6fe1478c
+c3848000
+6fe0cc58
+c000b46a
+20600000
+6fe0ca39
+c1008000
+704a3901
+20403474
+20403476
+2020348d
+6fe14c5d
+67e14c5f
+704c6100
+20600000
+58000000
+20203471
+da200000
+20207801
+da200000
+20207806
+6fe1478c
+c4048000
+20401b77
+247a0000
+da204967
+20407956
+24740000
+d8c04967
+20204c0d
+1a627e00
+c016b23f
+c0083227
+c00a3489
+c00ab493
+20600000
+20403474
+20403476
+793f8027
+2020348f
+6fe14a3a
+67e14a3c
+704a1d14
+70409900
+20403205
+20203223
+79200027
+20403470
+2040358a
+2040357e
+58000000
+67e2c9eb
+58000004
+20406216
+58000005
+20406216
+58000014
+20406216
+58000015
+20406216
+58000016
+20406216
+58000007
+20406216
+2040793a
+7049ad0a
+7049af0a
+7049b10a
+70417702
+58000020
+20404c09
+20203207
+2040352b
+2040352e
+20403531
+20403198
+204034c3
+204034bd
+204034b5
+202034b8
+da604c59
+da400000
+2020318a
+da604c5f
+da4034bb
+20203191
+704c6101
+20600000
+da604a3c
+da4034c0
+20203191
+704a3902
+704c5800
+20203497
+6fe0ca17
+207a0000
+da604a1d
+da4034c8
+2020318a
+6fe0ca1c
+67e0ca1d
+6fe0ca20
+247a0000
+20406125
+67e14a37
+da204a31
+20406152
+6848ca1e
+98467c00
+202134d5
+67e0ca1e
+1fe20400
+6048ca1f
+6fe0ca19
+98467c00
+204134e0
+6048ca2a
+df200006
+d8c04a25
+204034e7
+67e0ca2b
+da204a22
+2020793f
+6fe0ca21
+247a0000
+704a2101
+da200001
+20207806
+da200001
+20207801
+da200000
+efe08006
+9a20a200
+c20034e8
+1a217eff
+20600000
+6fe0c436
+c00934f0
+20600000
+6fe14437
+c00a3507
+20600000
+44dbc016
+efe28011
+67e289de
+6fe109de
+d8406b5a
+98467c00
+24628000
+6fe109e1
+1ff0fe00
+67e109e1
+1fe27200
+1a20a205
+1a220c00
+d8a009e3
+20407d5f
+efe08006
+67e089ed
+da2009e0
+da4009e3
+20600000
+58000000
+67e2c9a1
+67e2c9a6
+204034f3
+1a420c00
+d8a049a1
+df20000a
+20407d5f
+44dc4017
+efe08011
+c001353a
+c001b54f
+c0023556
+c002b556
+c00335c6
+c003b5c7
+c00435ca
+20600000
+20403507
+6fe089e0
+c002351e
+c002b51e
+20600000
+6fe0c9a1
+245a3525
+6fe0c9a3
+245a3527
+6fe0c9a5
+245a3529
+20600000
+704c4205
+20600000
+704c4305
+20600000
+704c4405
+20600000
+da604c42
+da403534
+2020318a
+da604c43
+da403536
+2020318a
+da604c44
+da403538
+2020318a
+7049a100
+20203556
+7049a300
+20203556
+7049a500
+20203556
+6fe0c9a1
+67e0c9ac
+6fe0c9a2
+67e0c9ae
+20203560
+6fe0c9a1
+67e0c9ae
+2020356e
+6fe0c9ad
+20403547
+6fe0c9a2
+67e0c9ac
+2020356c
+c001354b
+c001b54d
+67e0c9ad
+20600000
+7049ad05
+20600000
+7049ad0a
+20600000
+6fe0c9a1
+20403547
+6fe0c9ad
+204035ba
+204035bd
+70095d00
+2020620a
+6fe0ca3f
+247a0000
+6fe349a1
+67e349ac
+6fe0c9ad
+6848c9af
+98417e00
+6848c9b1
+98417e00
+205a3572
+44dcc017
+6fe1478c
+2feffe09
+2440b470
+2040356c
+2040356e
+20203567
+6fe0c9ac
+6848c9ae
+9840fe00
+243a790b
+20207909
+d8c049ac
+20203574
+d8c049ae
+20203579
+d8c049b0
+20203596
+704a2000
+20600000
+efe08006
+c000357e
+c000b582
+c0013586
+20600000
+efe08006
+c000358a
+c001358e
+c000b592
+20600000
+6848cc46
+20406065
+6848cc47
+20206065
+6848cc46
+20406069
+6848cc47
+20206065
+6848cc46
+20406065
+6848cc47
+20206069
+6848cc48
+20406065
+6848cc49
+20206065
+6848cc48
+20406069
+6848cc49
+20206065
+6848cc48
+20406065
+6848cc49
+20206069
+44dd4017
+efe08006
+c00035a3
+c000b59c
+c001359e
+20600000
+7049ca00
+2020359f
+7049ca01
+efe08006
+67e0c9cc
+efe40012
+202035a8
+efe08012
+20406216
+1a40a401
+efe08012
+20206216
+67e449cd
+704a2001
+6fe0c9ca
+c00035b6
+6fe0c9ce
+67e0c9cf
+6fe0c9cd
+20406216
+6fe0c9cc
+204035ba
+67e0c9d4
+6fe349cf
+67e3095c
+202061f8
+6fe0c9cd
+67e0c9cf
+6fe0c9ce
+202035af
+1feffe05
+1fe0fe32
+20600000
+d8402ee0
+984ffe00
+1fe6fc64
+20407def
+18078400
+18422200
+58002ee0
+98462400
+20600000
+20600000
+6fe449a1
+67e449eb
+20600000
+6fe0ca08
+67e0c9fe
+6fe0ca09
+67e0c9ff
+6fe0ca0a
+67e0ca00
+df20000d
+d8c049f9
+204034e7
+67e0ca06
+da2049f6
+2020793f
+58000000
+67e44881
+20402409
+20202463
+204035de
+204035e6
+204035f5
+20203613
+20402467
+6fe0c8bf
+c1808000
+6fe0cc59
+243a248d
+6fe0ca39
+c001248d
+20600000
+6fe0c8bf
+c1800000
+20402491
+2037b5f3
+6fe0cc61
+207a0000
+6fe0cc62
+1fe0fe01
+67e0cc62
+c00235f3
+204022cb
+20402415
+2437b5ea
+704c6200
+20600000
+6fe0c8bf
+c1808000
+20402395
+20403609
+204023a3
+6fe0c880
+243a3602
+20402532
+6fe0c8bd
+207a0000
+58000000
+67e248d1
+20600000
+7048bc00
+da200000
+20407801
+2040248d
+204022fc
+6fe240a8
+202022dc
+6fe248d1
+207a0000
+202022dc
+6fe1478c
+c3848000
+6fe14a3a
+67e14a3c
+704c5801
+da204894
+20203519
+6fe0cc61
+207a0000
+2040361b
+24740000
+6fe1c85c
+20407daa
+604a4160
+20201497
+78347c00
+20401465
+6fe1c174
+203a7e56
+20203460
+5800364e
+67e14889
+58003701
+67e1488d
+58003712
+67e1488f
+580036f5
+67e1488b
+5800365b
+67e10b45
+20403653
+2020799d
+20403649
+6fe0c909
+2feffe05
+2020b633
+6fe0c909
+2feffe06
+2040a30e
+6fe0c909
+1fe17e1f
+67e0c1e8
+20403100
+70487dff
+58000c4b
+67e148e1
+58000d4b
+67e148e3
+58000e4b
+67e148e5
+58000f4b
+67e148e7
+20402322
+20402409
+20402325
+204022ff
+6fe0c913
+67e08b47
+6fe4c90a
+67e48b48
+20600000
+7040c518
+6fe0c909
+c4038000
+7040c508
+20600000
+6fe0c8b9
+c00036e6
+c000b682
+c007b67e
+20600000
+d8400001
+da2048e9
+5800002a
+20205e63
+df200001
+da2048e9
+d840002a
+20205e75
+6fe0c8e9
+c0adb661
+7048e95b
+6ff21aac
+79207e1d
+67e20aa0
+20403678
+204079f0
+20403665
+2020366e
+6fe08b48
+207a0000
+6fe0c8e9
+c02db66c
+6fe20b49
+67e20aa0
+20600000
+6fe20b4d
+2020366a
+6fe0c8e9
+c02db674
+580099a4
+67e10a93
+700ac41a
+20600000
+580099bf
+67e10a93
+700ac43f
+20600000
+6fe0c914
+207a0000
+d8c04914
+d8a00b09
+df20001e
+20207d5f
+2040248d
+204036ed
+204036b4
+2020367f
+2040248d
+204036ed
+20402496
+204036b4
+20203683
+2040368a
+20403699
+202036a8
+6fe0c908
+207a0000
+d8e0000b
+20407d74
+247a0000
+70490800
+58000001
+67e08bff
+58000000
+e7e38005
+700bf820
+6fe08bf9
+79207e02
+67e08bf9
+20600000
+6fe0c906
+207a0000
+d8e0000e
+20407d74
+247a0000
+70490600
+d8a00c0f
+df200002
+20407d17
+700c0f00
+700bf710
+6fe08bf9
+79207e01
+67e08bf9
+20600000
+6fe0c907
+207a0000
+d8e0000c
+20407d74
+247a0000
+70490700
+d8a00c1f
+df200002
+20407d17
+700c1f03
+700bf821
+20203695
+44ddc017
+20407991
+6fe08be3
+207a0000
+700be300
+6fe10be1
+d84002ba
+98467c00
+24628000
+6fe08b61
+c1dd0000
+6fe08b62
+c05036c7
+c050b6cd
+c05336d9
+c053b6db
+c054b6e1
+700be400
+20600000
+6fe08b63
+c040b6ca
+202036c5
+20402392
+700be401
+20600000
+6fe08b63
+c000b6d2
+c04236d5
+c053b6d7
+202036c5
+6fe0c880
+67e08ba2
+202036cb
+2040248e
+202036d2
+700ba2a1
+202036cb
+700ba215
+202036cb
+6fe0c8bf
+c00036df
+c000b6d7
+20600000
+700ba2a0
+202036cb
+700ba200
+700ba300
+700ba401
+700ba507
+202036cb
+20402463
+20402467
+204036ed
+20402496
+204024b3
+204036b4
+202036e7
+44de4017
+6fe0c8bf
+c1800000
+20402491
+20403687
+6fe0c8b9
+247a0000
+20202532
+6fe0c8ba
+c000a39e
+c001b6f9
+20600000
+6fe0c7a6
+c000a39e
+c07fa39e
+700be500
+70483501
+6fe0c8ca
+67e0c7c6
+20600000
+58000001
+67e08bff
+6fe3c894
+e7e38005
+6fe0c894
+245a370a
+6fe0c894
+205a370e
+20203694
+70490801
+58000180
+d8e0000b
+20207d66
+70490800
+58000000
+d8e0000b
+20207d66
+6fe0c894
+c0003717
+c001374a
+c001b732
+20202427
+6fe0c896
+67e0c8ba
+70489600
+d8a00c0f
+d8c04895
+df200008
+20407d5f
+6fe40c0f
+245a372a
+6fe40c0f
+205a372e
+6fe40c0f
+67e448ea
+684c48f2
+98467c00
+2442b6a3
+6fe448ea
+67e448f2
+20202427
+70490601
+58000180
+d8e0000e
+20207d66
+70490600
+58000000
+d8e0000e
+20207d66
+d8a00c1f
+d8c04894
+df200003
+20407d5f
+6fe10c20
+245a3742
+6fe10c20
+205a3746
+6fe18c1f
+67e1c8fa
+6849c8fd
+98467c00
+2442b6b2
+6fe1c8fa
+67e1c8fd
+20202427
+70490701
+58000180
+d8e0000c
+20207d66
+70490700
+58000000
+d8e0000c
+20207d66
+d8a00c2f
+d8c04894
+df200002
+20407d5f
+6fe10c2f
+245a375a
+6fe10c2f
+205a375e
+6fe10c2f
+67e14900
+68494903
+98467c00
+2442b762
+6fe14900
+67e14903
+20202427
+70490701
+58000180
+d8e0000c
+20207d66
+70490700
+58000000
+d8e0000c
+20207d66
+700bf822
+20203695
+20758000
+20401aa9
+580037ab
+67e14465
+58003798
+67e14463
+580037af
+67e14467
+58003794
+67e1445b
+580038e8
+67e1446d
+58003ae1
+67e1465a
+58003b84
+67e1446b
+58003b9b
+67e1446f
+204037a8
+44dec017
+2040377b
+2040378f
+20203af7
+6ff08060
+793ffe00
+67f08060
+6fe447b4
+20405eb0
+6fe147bc
+20405ec4
+20405ed7
+70807d08
+70807e49
+7080790a
+70807a0b
+d8400081
+6fe147c3
+2feffe00
+79208404
+60588060
+20600000
+204037a8
+2020377b
+6848c7a8
+20406069
+20403812
+6848c7a6
+20206050
+6848c7a6
+20406059
+2420b1df
+202031dd
+2040379a
+20203baa
+6fe0c78c
+c30237a8
+58003eff
+684a47cb
+98408400
+1c427e00
+98467c00
+24610000
+6fe1478c
+c282b7a8
+6fe147c3
+c3850000
+20403bad
+2040321b
+1c427e00
+67e247cb
+20600000
+20403baa
+204052f1
+247a0000
+20203817
+1a627e00
+c000b7ff
+c00137ce
+c0023802
+c002b7ef
+c00437d5
+c004b7dc
+c00537f5
+c005b7e1
+c00637ed
+c009b802
+c00a37fb
+c00ab7f1
+c010b7f6
+c011b7f7
+c01237fa
+c0183b3f
+c018bb41
+c0193b4f
+c019bb4d
+c01a3b39
+c01abb22
+c01b3b37
+c01bbb43
+c01c3b45
+c01dbb22
+c01ebb19
+c020b804
+c0213806
+c021bb37
+20600000
+204037a8
+6fe0c76f
+245a3b43
+20403802
+6fe1478c
+c4020000
+202037dc
+6fe1478c
+79207e04
+67e1478c
+6fe0c7b1
+67e0c177
+20403812
+20203acc
+6fe1478c
+c4020000
+793ffe04
+67e1478c
+20203ad0
+204037a8
+6fe14042
+1fe37e00
+68494455
+98467c00
+2422b7e8
+20203223
+6fe147c3
+c3848000
+6ff10112
+245a3bb1
+20203219
+20403baf
+20203225
+204037a8
+20203809
+20401b1c
+7047c500
+20403802
+20203ad2
+202031ea
+20203baf
+6fe147c3
+c304b21b
+20203bb3
+20203bb3
+20403809
+6fe0c7b2
+67e0c177
+20203ace
+70476b00
+20403baf
+20203bb3
+2040387f
+20203807
+204021b5
+20201f99
+20203b65
+6848c7a8
+20206069
+2040380b
+20203812
+6fe0c7ab
+2feffe00
+2040b1fd
+6fe0c7ab
+2feffe01
+2040b205
+20600000
+6848c7a8
+20206065
+6fe0c656
+c1000000
+202064df
+6ff0810b
+c2813814
+20405ef7
+efe08003
+c080b82d
+6ff10112
+1fe67c02
+20610000
+efe08003
+67e089cf
+e8408003
+18622200
+604889d0
+18408403
+6ff10112
+98460400
+24610000
+7009d101
+2040383b
+6fe089d1
+c1000000
+20203836
+20407d12
+20403b28
+20203830
+44df4017
+20405ef7
+6ff10112
+207a0000
+98608600
+2020383a
+20405ef7
+18608602
+efe08003
+98608600
+20205f03
+44dfc017
+6fe089cf
+c000386d
+c000b872
+c0013877
+c001b88c
+c0023896
+c002b89a
+c004b8bc
+c005b910
+c0063911
+c006b935
+c0073938
+c007b940
+c0083948
+c008b94c
+c0093950
+c00ab954
+c0133959
+c014395e
+c014b96e
+c0153977
+c015b9aa
+c01639b0
+c01839b7
+c018b9c1
+c01939d2
+c019b9dd
+c01a3a0a
+c01aba0d
+c01b3a16
+c01bba1f
+c01c3a22
+c0203a2a
+c0213a34
+c0243a39
+c024ba44
+c028ba4a
+c030ba4e
+c03b3a5d
+c03bba63
+c03c3a68
+c03d3a9e
+c0483aac
+c048bab1
+c0493ab5
+c049baba
+c04a3abe
+c07fbac4
+20203ac6
+6fe089d0
+c0833ac6
+efe30003
+67e340a8
+20203ac9
+6fe089d0
+c0833ac6
+efe30003
+67e3437a
+20203ac9
+6fe089d0
+c080bac6
+e8408003
+6048c7b3
+20403ac9
+6fe1478c
+c3848000
+c3800000
+6fe0c7ab
+2feffe00
+2420b885
+6848c7b3
+18417e03
+67e0c09b
+6fe0c7ab
+2feffe01
+24608000
+6848c7b3
+284ffe02
+2020b207
+20203205
+6fe089d0
+1fe67c43
+24213ac6
+67e0c5fc
+df200008
+20407d17
+6f2089d0
+d8a045fd
+20405f39
+20203ac9
+dfe0001f
+d8a042f7
+20403a10
+20201aa9
+6fe0c78c
+c3023ac6
+204031d7
+2020b8aa
+7009d100
+204037a8
+6fe0c653
+207a0000
+6fe1465e
+243a38a8
+6fe089d0
+67e1465e
+67e1465c
+6061465c
+204038ac
+20206504
+7009d100
+20203b95
+204038b2
+6fe1465e
+684947a9
+98467e00
+67e1465e
+20600000
+6fe1465e
+68494657
+20407e4a
+68494649
+20407e4a
+67e147a9
+20600000
+7009d101
+7009cf05
+20203ac9
+6fe1478c
+c304bac6
+2040390d
+20343ac6
+7009d100
+6fe147c3
+c28438e1
+6fe0c7c5
+247a0000
+7009d101
+efe10003
+67e147c6
+606147c8
+6fe089d0
+1fe0fffe
+24213ac6
+2022bac6
+67e0c7c5
+684947c6
+184085ff
+20401a65
+203a38e4
+e8420006
+59280302
+98467c00
+2422b8e4
+efe08006
+67e0c7ca
+1fe17e30
+203a38e4
+7009d100
+20401b1a
+204038e8
+204038e8
+204038e8
+6fe147c3
+c4040000
+7009d101
+20403bb7
+20203ac9
+7047c500
+7009d101
+20403bb7
+20203ac6
+6fe0c7c5
+207a0000
+20401b77
+247a0000
+20403908
+44e04018
+6fe0c435
+c3800000
+1840fffd
+d84000fb
+20407e4a
+6848c7c5
+20407e4a
+1fe22200
+18427e00
+9a267e00
+67e0c7c5
+20403903
+6fe147c8
+1fe20600
+1a227200
+20405f39
+18627e00
+67e147c8
+6fe0c7c5
+247a0000
+20203bb5
+684947c6
+6fe0c7ca
+c2829ebc
+c2821eb3
+20600000
+d8400017
+6fe147c3
+c3808000
+68494382
+20600000
+6fe147c3
+c2811e8d
+20207e56
+20203afb
+efe08003
+c040b91e
+c0413920
+c041b922
+1fe22200
+20406ebb
+20407544
+1a227e00
+c0003924
+c000b927
+c0013931
+c001b933
+20203ac6
+20406eb7
+20203927
+20406eb7
+20203931
+20406eb7
+20203933
+20406ec2
+70476400
+20203ac9
+58000003
+67e0c76c
+67e0c765
+58000000
+67e0c766
+58000004
+67e0c767
+204057ae
+70476401
+20203ac9
+58000002
+20203928
+58000001
+20203928
+dfe00010
+d8a04793
+20203a10
+efe08003
+6848c7c3
+7d3a0400
+6048c7c3
+68588060
+7d3a0404
+60588060
+20203ac9
+6f2089d0
+20407db8
+20405ecc
+67e147bc
+20403ac9
+20407e07
+6fe147bc
+20205ec4
+da200002
+da4047a4
+d8400000
+20203ad4
+6fe1478c
+c3003ac6
+20403ac9
+202031f6
+6fe1478c
+c304bac6
+20403ac9
+2020320f
+6fe089d0
+c081bac6
+efe18003
+67e1c0b2
+20203ac9
+6f2089d0
+6fe14487
+1fe20a00
+20405f39
+20203ac9
+6fe1478c
+c284ba39
+c3003ac6
+efe08003
+6848c76b
+793a0400
+79200407
+6048c76b
+20403ac9
+6fe0c76b
+c283396a
+20600000
+c2805686
+70476b00
+70095b21
+2020787a
+6fe0c78c
+c4020000
+6fe0c656
+c1000000
+efe08003
+6848c654
+98408400
+6048c654
+20600000
+df200040
+d8a043e7
+20407d26
+58000000
+67e08974
+1a220600
+18627e00
+67e10978
+204039a5
+6fe08974
+68488964
+18408401
+9840fe00
+67e08974
+1fe67c1f
+24213991
+6848c3e7
+580043e8
+9840fe00
+67e1097d
+68488964
+18408401
+6fe0c3e7
+9840fe00
+67e0c3e7
+2020399a
+6848c407
+58004408
+9840fe00
+67e1097d
+68488964
+18408401
+6fe0c407
+9840fe00
+67e0c407
+6fe1097d
+1fe20a00
+6fe10978
+1fe20600
+18427200
+20405f39
+6fe089d0
+68488974
+98467c00
+2422b97d
+20203ac9
+efe08003
+67e08964
+efe08003
+67e08970
+20600000
+d8400000
+da200002
+6fe147c0
+67e1098e
+da40098e
+20203ad4
+6fe089d0
+c080bac6
+efe08003
+67e0c7be
+58000000
+67e147c0
+20203ac9
+6fe089d0
+c0823ac6
+6fe1478c
+c284ba9e
+efe20003
+67e24794
+70479304
+70476d00
+20403ac9
+20205606
+6fe089d0
+c081bac6
+efe08003
+c00039c7
+c000b9cd
+20203ac6
+20403ac9
+e8408003
+efe08003
+c001607f
+7d3a0407
+20206050
+20403ac9
+e8408003
+efe08003
+203a6069
+20206065
+6fe089d0
+c080bac6
+e8408003
+20406059
+58000000
+7d20fe00
+da200001
+67e1098e
+da40098e
+d8400000
+20203ad4
+efe08003
+1fe20400
+c040b9ec
+c04139f0
+c041b9f5
+c04239f9
+67e0c39d
+20407544
+20401f88
+6fe0c39d
+c00039fd
+c000ba00
+c0013a02
+c0023a04
+20203ac6
+6048c39d
+20401f84
+7043530d
+202039fe
+6048c39d
+20401f84
+7043530d
+70435101
+20203ac9
+6048c39d
+20401f84
+7043530d
+20203a08
+6048c39d
+20401f84
+7043530d
+20203a06
+70435300
+70435103
+20203ac9
+70435301
+202039fe
+70435305
+20203a08
+70435305
+20203a06
+70435102
+20203ac9
+70435100
+20203ac9
+dfe0001f
+d8a043e7
+20203a10
+dfe0001f
+d8a04407
+20203a10
+6f2089d0
+9f267c00
+24213ac6
+e7208005
+20405f39
+20203ac9
+6fe1478c
+c304bac6
+6fe089d0
+c0843ac6
+efe40003
+67e44372
+70095b12
+2040787a
+20203ac9
+efe10003
+67e14428
+20203ac9
+6fe0c39d
+203a3ac6
+6fe0c39b
+c0803ac6
+6fe0c39c
+c0803ac6
+20407927
+20203ac9
+6fe089d0
+c082bac6
+efe08003
+67e0c7ac
+efe20003
+67e247ad
+6848c7ac
+20406069
+20403b82
+20203ac9
+6fe089d0
+c080bac6
+efe08003
+67e0c1e8
+20203ac9
+efe08003
+c000ba42
+6fe0c399
+c001ba40
+c0033a40
+c003ba40
+20203ac6
+70439a01
+20203ac9
+20401fee
+20203ac9
+6fe089d0
+c080bac6
+20403ac9
+efe08003
+203a57e2
+202057e0
+20403ac9
+20407e07
+70801001
+2020137c
+6fe089d0
+c0003ac6
+efe08003
+203a3a5b
+6fe089d0
+c082bac6
+efe20003
+d84f4240
+98467c00
+20213ac6
+67e2439e
+20401b12
+20203ac9
+20401b14
+20203ac9
+e8410003
+20401a65
+18c08bfe
+58000000
+e7e10005
+20203ac9
+20403a6c
+20403a9a
+58000000
+e7e10005
+20203b5c
+efe08003
+20403a70
+20403a77
+20203b5c
+20403a97
+58280002
+e7e18005
+20600000
+67e0895c
+20403a97
+59280302
+e7e20005
+6fe0895c
+e7e18005
+20600000
+20401a84
+efe08003
+1fe1721f
+1fe22200
+2a2ffe07
+7920840f
+2a2ffe06
+7920840e
+e0410005
+1f227e00
+e7e08005
+20405f4d
+20403a9a
+58000000
+e7e10005
+184104ff
+184085ff
+20401a65
+18c08c04
+efe08006
+c2823a8f
+c282ba8f
+18408401
+20600000
+20401a84
+2a2ffe05
+7920840f
+e0410005
+5a290202
+e7e40005
+184085ff
+20600000
+20401a84
+e0410005
+20600000
+efe08003
+1fe27200
+e7e08005
+20205f4d
+6fe0c39b
+c082bac6
+6fe0c39d
+c0023aaa
+c0423aa4
+20203ac6
+70439802
+70439908
+20203aa7
+efe20003
+67e2439e
+20203ac9
+20403aa7
+20201fd7
+6fe089d0
+c0813ac6
+e8410003
+20401b7c
+20203ac9
+d8400000
+da200002
+da404075
+20203ad4
+6fe089d0
+c0843ac6
+efe40003
+20401b7a
+20203ac9
+ea208003
+ea410003
+d8400000
+20203ad4
+6f2089d0
+1f20f3fe
+efe10003
+1fe20a00
+20405f39
+20203ac9
+70409900
+20203ac9
+d8400001
+da200000
+20203ad4
+d8400000
+da200000
+20203ad4
+7009cf00
+20203af8
+7009cf02
+20203af8
+7009cf03
+20203af8
+7009cf05
+20203af8
+6fe089cf
+1fe22600
+7009cf06
+58000002
+9a20fe00
+20403b6b
+1a627e00
+e7e08003
+e0408003
+1a227200
+1a420c00
+20405f33
+20203b75
+204037a8
+7009cf07
+6fe083d2
+207a0000
+20403b6b
+6fe083d2
+1fe27200
+6fe103d4
+1fe20c00
+20405f1f
+20203b75
+7009cf08
+1f20fe02
+20403b6b
+6fe109fa
+e7e10003
+6fe109f8
+1fe20c00
+20405f1f
+18c27e00
+67e109f8
+20203b75
+7009cf09
+58000000
+20403b6b
+20203b75
+7009cf0a
+58000001
+20403b6b
+20403b0c
+6fe1478c
+d8e00002
+afefffff
+79208403
+d8e00009
+afefffff
+79208405
+6fe0c78c
+d8e00004
+afefffff
+79208404
+e0408003
+20203b75
+d8400000
+6fe0c09b
+d8e00000
+afefffff
+79208400
+d8e00001
+afefffff
+79208401
+6fe0c427
+d8e00000
+afefffff
+79208402
+20600000
+7009cf0d
+6fe0c489
+1feffe22
+1fe27200
+20403b6b
+6fe14487
+1fe20c00
+20405f1f
+20203b75
+7009cf0e
+58000004
+20403b6b
+6fe2087c
+e7e20003
+20203b75
+7009cf0f
+6ff10112
+d8400040
+20407e4a
+1fe22200
+1fe27200
+20405ef7
+d8a0098e
+20405f39
+1a227e00
+1a227200
+20403b6b
+d8c0098e
+20405f1f
+20203b75
+7009cf10
+20203af8
+7009cf11
+58000004
+20403b6b
+6fe2439e
+e7e20003
+20203b75
+da200180
+20203b46
+da200080
+20203b46
+da200101
+20203b46
+da200001
+70476b00
+7009cf14
+58000002
+20403b6b
+1a227e00
+e7e10003
+20203b75
+da600000
+20203b50
+da600001
+7009cf15
+58000001
+20403b6b
+1a627e00
+e7e08003
+20203b75
+7009cf1d
+58000004
+20403b6b
+6fe2087c
+e7e20003
+20203b75
+60490964
+7009cf29
+58000002
+20403b6b
+68490964
+e0410003
+20203b75
+7009cf2b
+20203af8
+7009cf40
+58000002
+20403b6b
+6fe14075
+e7e10003
+20203b75
+7009ce02
+67e089d0
+604c0964
+44e0c018
+20403b77
+684c0964
+20405f0f
+6fe189ce
+e7e18003
+20600000
+44e14018
+20205f13
+20403b80
+20608000
+20403b7e
+6fe247ad
+1feb7e00
+207a0000
+20207d0e
+6848c7ac
+20206069
+6848c7ac
+20206074
+6848c7ac
+20206065
+622109f8
+624109f6
+6fe14437
+67e109fa
+2040390d
+20740000
+684909f6
+6fe0c7c2
+20407e4a
+1fe27200
+18427e00
+9f267e00
+67e109f6
+20403aec
+6fe109f6
+207a0000
+20203b8a
+6fe147c3
+c3848000
+20403bb1
+20203219
+70417702
+20600000
+6fe0c7be
+207a0000
+6fe0c7bf
+207a0000
+1fe0ffff
+67e0c7bf
+247a0000
+7047bf32
+20406125
+1fe6fc64
+20407dec
+18070400
+67e0c7c0
+6048c7c1
+20600000
+20407e21
+202131e6
+202031e8
+d8e0000a
+20203bbd
+d8e0000a
+20203bb9
+d8e00009
+20203bbd
+d8e00009
+20203bb9
+d8e00008
+20203bbd
+d8e00008
+20203bb9
+6fe147c3
+f93ffe00
+67e147c3
+20600000
+6fe147c3
+f9207e00
+67e147c3
+20600000
+20403bf0
+204041a7
+2040408e
+20758000
+20403d8a
+20404728
+20403bcf
+2040423c
+6fe0c92a
+c3838000
+6fe1478c
+c2864553
+204046a0
+20203d52
+58004866
+67e1489b
+5800488f
+67e1489d
+58003e40
+67e1489f
+5800439f
+67e14461
+58004457
+67e14463
+58003e3b
+67e1445f
+58004334
+67e14467
+5800464b
+67e14465
+58003e25
+67e1445d
+58004388
+67e1446b
+580044b5
+67e1446f
+58003f69
+67e14473
+58003e13
+67e1445b
+580049a8
+67e1446d
+580049aa
+67e14477
+580049bd
+67e14471
+20600000
+20758000
+20402607
+204022ff
+20403f1e
+20403d13
+20401b16
+20401b3f
+20401b32
+20401b1e
+6fe44bab
+c289c635
+c28945f6
+20600000
+7040c508
+6fe44bab
+c3860000
+7040c518
+20600000
+700b58ff
+704790ff
+70478f1e
+5800492d
+67e1448d
+70448c01
+58004ab5
+67e14899
+70483601
+6fe148fe
+67e14791
+6fe14900
+67e14881
+6fe0c903
+67e14885
+6fe2c905
+67e2c8cb
+6fe0c904
+67e0c87c
+6fe44bab
+247a0000
+58020800
+67e1cbab
+58800700
+e7e18005
+58000300
+e7e10005
+70409901
+6fe0c90a
+2feffe00
+2040c6e6
+6fe0c90a
+2feffe02
+2040c6e8
+6fe0c90a
+2feffe01
+2040c6ea
+6fe0c90a
+2feffe03
+2040c6ec
+6fe0c90a
+2feffe04
+2040c6ee
+6fe0c90a
+2feffe05
+2040c6f8
+6fe0c866
+245a230e
+20403bfd
+6fe0c90b
+1fe10407
+6048c4a1
+1fe97e00
+1fe10401
+6048c866
+1fe37e00
+1fe10403
+6048c8fd
+1feb7e00
+1fe17e03
+204047d4
+6fe0c90c
+1fe10403
+6048c924
+1feb7e00
+1fe10403
+6048c925
+1feb7e00
+1fe17e03
+67e0c926
+67e0c992
+1feb7e00
+1fe17e03
+67e0cbb4
+580b0c0a
+67e1c918
+58ffffff
+e7e18005
+580607ff
+e7e18005
+58ffffff
+e7e18005
+7048f70a
+58000064
+67e14bc8
+20403e7b
+58001770
+67e14bbe
+704bc014
+58000190
+67e14bc6
+67e14bc2
+580003e8
+67e14bc4
+70487d07
+7048ca7d
+7041e800
+70488c01
+58000f0f
+67e1488d
+67e1488f
+6fe140a8
+67e140ac
+d8a0437a
+d8c040a8
+df200006
+20407e68
+704b8a20
+70493934
+6fe3437a
+67e34950
+704bb302
+7043e71f
+58050102
+67e1c3e8
+58120303
+e7e18005
+58190318
+e7e18005
+580003c2
+e7e10005
+5806ff06
+67e1cad2
+58000300
+e7e18005
+58090c80
+e7e18005
+58355442
+e7e18005
+5820322e
+e7e18005
+58756f4d
+e7e18005
+58006573
+e7e10005
+7044071f
+d8c04ad9
+d8a04408
+df20000d
+20407d5f
+6fe0c408
+1fe0ffff
+67e0c2f7
+d8c0440a
+d8a042f8
+df20000b
+20407d5f
+58070007
+67e1c372
+58002000
+e7e18005
+5800012c
+e7e10005
+58181203
+67e1cacc
+580000ff
+67e1cacf
+380000fb
+3806c212
+3808800f
+380c0021
+67e4444c
+70443207
+58000015
+67e14ae7
+58000019
+67e14357
+5800001d
+67e14ae9
+58000021
+67e14aeb
+58000030
+67e14aed
+58000022
+67e143d1
+704af096
+70493800
+20402322
+20402325
+58604800
+67e1c85c
+5800012c
+67e148c2
+58000050
+67e148c0
+58000005
+67e14bba
+58000708
+67e14bbc
+58010403
+67e1c9d0
+582a2002
+e7e18005
+5822153f
+e7e18005
+58114433
+e7e18005
+58265a09
+67e1c9df
+58041934
+e7e18005
+58000009
+e7e10005
+5800ffff
+e7e10005
+580d5a09
+67e1c9f3
+58ed1d10
+e7e18005
+5800807d
+e7e10005
+5800ffff
+e7e10005
+58ff5a09
+67e1ca39
+5840ab27
+e7e18005
+58a0d1be
+e7e18005
+5812a141
+e7e18005
+58a784a5
+e7e18005
+58d0b5ff
+e7e18005
+58ff00b6
+e7e18005
+58000900
+e7e18005
+5800ffff
+e7e10005
+580d5a09
+67e1ca53
+58c50e10
+e7e18005
+58109a5b
+e7e18005
+58421138
+e7e18005
+58412828
+e7e18005
+58394923
+e7e18005
+584bb04a
+e7e18005
+58904ca0
+e7e18005
+5809704d
+e7e18005
+58ffff00
+e7e18005
+5846a509
+67e1ca81
+58101934
+e7e18005
+58690760
+e7e18005
+58207d04
+e7e18005
+5809007e
+e7e18005
+58220d00
+e7e18005
+58ff220e
+e7e18005
+704a96ff
+580b5a09
+67e1caa3
+580009f3
+e7e18005
+5800ffff
+e7e10005
+20203100
+58009468
+67e14660
+58009732
+67e14396
+58002580
+67e1c0b2
+70417803
+70415b08
+704b9e00
+704b9e00
+704b9f00
+58000200
+67e14159
+70438017
+70438217
+58000a77
+67e14484
+38000306
+38044440
+38090000
+380c4408
+67e4c662
+38001224
+38044000
+38080000
+e7e28005
+3803ffff
+3806fe23
+380999d9
+380c020d
+67e440a0
+58004af5
+67e143de
+58000010
+67e143e0
+2040490e
+204048c6
+20403e8e
+6fe44bab
+c30dbd3f
+7044550c
+58000006
+67e14372
+67e14374
+20402613
+6fe44bab
+c30c3d43
+2040260b
+6fe0c938
+67e0cab4
+6fe1c37d
+67e1cac9
+6fe0c8fd
+1fe17efe
+67e0c8fd
+67e0c4a0
+58000000
+67e3c8d0
+6fe0c78f
+67e0cb9b
+67e0cb9c
+20401aa9
+202042a0
+44e1c018
+6fe44bab
+c297c80a
+6fe0c938
+c00047f6
+20403d65
+243442eb
+44e24018
+da204939
+6fe0c938
+1fe0ffff
+1feffe1d
+9a20a200
+efe08011
+67e0c482
+6fe0c482
+c019bd6f
+c01a3d7b
+20204553
+44e2c018
+78547c00
+6fe44bab
+c305bd6c
+6fe08989
+c3013d6c
+78347c00
+6fe0cab1
+67e0cab0
+20600000
+68494bb8
+6fe0cac1
+c07fbd73
+68494bb5
+604940c1
+6fe341dd
+203a31f8
+70447d17
+6fe0c764
+243a31ee
+70447d04
+202031ee
+704ac701
+6848cbb7
+6fe0cac1
+c07fbd80
+6848c902
+6048cb77
+20403225
+6fe1cacf
+67e1c3ec
+204043e8
+58000004
+e7e08006
+d8c04408
+204043ef
+202078ee
+6fe44bab
+c4068000
+58003d90
+67e10b45
+70492ba5
+20203dc1
+20403d93
+20403d98
+20203da8
+70492c00
+6fe44bab
+c40a8000
+70492c5b
+20600000
+6fe44bab
+c28ebd9f
+c28f3da2
+c28fbda5
+70492919
+700b4708
+20600000
+7049290c
+700b4704
+20600000
+70492906
+700b4702
+20600000
+70492903
+700b4701
+20600000
+204079f0
+20403dab
+20203db0
+6fe08b48
+207a0000
+6fe0c92c
+c02db66c
+20203669
+6fe0c92c
+2020366f
+6ff08c02
+c303bdb6
+c283bdb9
+20600000
+6fe0c92a
+c4038000
+20205d8c
+6fe0c92a
+c3838000
+204047f2
+20204316
+6fe44bab
+c4068000
+20407991
+20203dc1
+44e34018
+68488b58
+20406059
+2020bdc6
+20203dcd
+6fe0c92b
+c1528000
+70492ba5
+700bfa00
+7009f600
+700bec00
+20203bcb
+6fe0c92b
+c12d0000
+70492b5a
+204047f2
+20404316
+2040490e
+2020799d
+6fe44bab
+c4068000
+20403db2
+6ff08c02
+67e0c92a
+c4038000
+20403e0b
+6fe24abd
+6848c929
+98408400
+1c427e00
+98467c00
+24610000
+67e24abd
+20403f70
+24740000
+6ff08c02
+c4038000
+6fe44bab
+c30abdea
+6fe0cb8b
+c000bdf0
+20403694
+58000001
+67e08bff
+6fe3c8d0
+e7e38005
+20600000
+6fe0cb8c
+203a3dfb
+6fe44bcd
+67e4095c
+6fe0cbcc
+c001bdfd
+c0013e04
+204036a2
+6fe4095c
+67e40c0f
+20600000
+6fe44bd6
+20203df3
+20403695
+700bf821
+58000003
+67e08c1f
+6fe1095c
+e7e10005
+20600000
+20403695
+700bf822
+58000002
+67e08c2f
+6fe0895c
+e7e08005
+20600000
+684a4abd
+1c427e00
+98467c00
+24413e10
+20600000
+58000000
+67e24abd
+20600000
+c51331dd
+6fe0caac
+203a31dd
+6fe0caf4
+c000b1dd
+6fe144d8
+243a31dd
+6fe0c8e1
+243a31dd
+202031df
+6fe0c902
+67e0cac4
+20600000
+44e3c018
+20404232
+2040423c
+20403e33
+20203217
+44e44019
+78347c00
+6ff20138
+79347e1a
+67f2004c
+2040159a
+20406df7
+2040490e
+20404015
+20403e33
+2040462d
+2040609d
+6848c911
+20206042
+44e4c019
+204042e9
+20407fdc
+20403e40
+20406082
+d8400013
+20403f56
+20203f58
+c6130000
+20403e40
+6fe0809e
+247a0000
+20206042
+44e54019
+20403f88
+6848c91f
+20406069
+20405b04
+6848c918
+20406036
+6848c919
+20406036
+6848c91a
+20406036
+6848c90d
+20406036
+6848c90e
+20406036
+6848c90f
+20406036
+6848c91b
+20406036
+6848c912
+20406036
+6848c913
+20406032
+6848c914
+20406032
+6848c91c
+20406032
+6848c91d
+20406032
+6848c911
+20206036
+6fe1478c
+c284be64
+6fe1478c
+c2803e67
+20600000
+1a227e00
+243a1b26
+20201b28
+1a227e00
+243a1540
+20201542
+6fe0c4a0
+c1810000
+44e5c019
+6848c4a1
+18467c03
+20213e78
+18408405
+6048c8fc
+18422200
+20406098
+c01fc954
+20404952
+1a220400
+2020607f
+18408404
+6048c8fc
+20203e72
+6fe0c8fd
+c0013e84
+c0003e89
+7048fd00
+582c0172
+67e1c8e3
+58014001
+e7e18005
+20600000
+585d0099
+67e1c8e3
+58007100
+e7e18005
+20600000
+58c8012c
+67e1c8e3
+5800dc00
+e7e18005
+20600000
+6fe44bab
+c40a0000
+7048f501
+c3970000
+c3958000
+7048f500
+20600000
+6fe0c8f6
+1fe0fe01
+67e0c8f6
+6848c8f7
+98467c00
+20600000
+6fe44bab
+c40a0000
+20403e6a
+6fe0c8f5
+203a3eb2
+6fe0c4a0
+c0013ea7
+7048f503
+20403e95
+20213ea9
+20403eae
+20203eb8
+7048f502
+20203eb8
+20403e6c
+7044a002
+6fe0cbaa
+245a3eae
+20203eb8
+7048f600
+6fe0c8fd
+67e0c4a0
+20600000
+6fe0c4a0
+c0813eb6
+6fe0cbaa
+247a0000
+20403e95
+24610000
+44e64019
+6fe0cbaa
+247a0000
+7048f600
+20406125
+67e148e9
+6fe0c4a0
+c0813ec6
+684948e9
+184ffe08
+1fe6fc0a
+20407dec
+9840fe00
+67e148e9
+da2048e3
+20403ed8
+6fe0c4a4
+c2813f1a
+c280bf1c
+c3003ed0
+7048fa01
+20203ece
+d8e00004
+202046f0
+d8e00004
+204046f4
+7048f80c
+6fe0c8fa
+207a0000
+7048fa00
+6848c921
+2020492b
+44e6c019
+efe40011
+67e4095c
+6fe0c8f5
+c0003ef0
+c0013edf
+c001bf0f
+6fe44bab
+c3173ee5
+6fe10962
+684948eb
+98467c00
+24213f12
+6fe44bab
+c315bef0
+7048fb00
+6fe10962
+684948ed
+98467c00
+24213eee
+204046a9
+20203ef0
+204046ad
+20203ef0
+20403f16
+2040616e
+20406166
+6fe10962
+6849095e
+98467c00
+2441616a
+68490960
+98467c00
+24416162
+6fe10962
+6849095c
+98467c00
+20213f0b
+6849095e
+98467e00
+24213f0d
+203a3f0d
+1fefa264
+6fe1095c
+6849095e
+98460400
+1a227e00
+9846fc00
+20407dec
+67e0caef
+20600000
+704aef64
+20600000
+704aef00
+20600000
+6fe0c4a0
+c0013edf
+20203ef0
+6848c4a4
+79200402
+6048c4a4
+20600000
+6848c4a4
+793f8402
+6048c4a4
+20600000
+7048fb01
+20600000
+2040490e
+20203e20
+6848c4c1
+20406069
+204079b4
+6848c918
+20403f56
+6848c919
+20403f56
+6848c91a
+20403f56
+6848c90d
+20403f56
+6848c90e
+20403f56
+6848c90f
+20403f56
+6848c910
+20403f56
+6848c91b
+20403f56
+6848c912
+20403f56
+6848c913
+20403f56
+6848c914
+20403f56
+6848c91c
+20403f56
+6848c91d
+20403f56
+6848c911
+20403f56
+6848c91e
+20403f56
+6848caab
+20406069
+6848c921
+20406069
+6848c915
+20406069
+6848c916
+20406069
+6848c922
+20406069
+6848c923
+20406069
+6848c917
+20203f56
+18467cff
+20628000
+18410e7f
+6ff2011c
+afefffff
+2020bf56
+20203f54
+79200407
+20206050
+793f8407
+20206050
+6fe1cbde
+67e1895c
+df200014
+d8400000
+6fe1895c
+2feffe00
+2040e07f
+6fe1895c
+1fe3fe00
+67e1895c
+18408401
+c2003f5c
+20600000
+20403f6a
+70448473
+20403f69
+20205b08
+20205cb5
+6fe0c91f
+d8400021
+20406093
+6fe0c920
+d8400023
+20206093
+44e74019
+78547c00
+58000000
+67e348d1
+20404240
+20403f7e
+20403f83
+204040dc
+6fe0c8d0
+1fe17e1f
+67e0c8d0
+24344728
+2040471a
+20204544
+6fe0c8e0
+207a0000
+67e0c8d5
+7048e000
+20207e54
+6fe0c8dc
+207a0000
+67e0c8d6
+7048dc00
+20207e54
+20403f95
+20403fd1
+6fe0c8da
+6848c8d9
+67e0c8d9
+98467c00
+2422b1e1
+6fe0c8de
+6848c8dd
+67e0c8dd
+98467c00
+2422b1e1
+20600000
+6fe0c91c
+c17f8000
+da200000
+6848c91c
+20406059
+7920a200
+6848c91d
+20406059
+7920a201
+1a227e00
+67e0c8da
+c000bfa5
+c0013fa9
+6fe0c8db
+c283bfb5
+20600000
+6fe0c8d9
+c0003fad
+c001bfaf
+20600000
+6fe0c8d9
+c0003fb1
+c001bfb3
+20600000
+7048db82
+20600000
+7048db81
+20600000
+7048db80
+20600000
+7048db83
+20600000
+6fe0c8db
+793ffe07
+67e0c8db
+c0003fbd
+c000bfc0
+c0013fc3
+c001bfc6
+20600000
+6fe0c8da
+c001bfc9
+20600000
+6fe0c8da
+c0003fc9
+20600000
+6fe0c8da
+c001bfcd
+20600000
+6fe0c8da
+c0003fcd
+20600000
+6fe0c8dc
+1fe0fe01
+67e0c8dc
+20600000
+6fe0c8dc
+1fe0ffff
+67e0c8dc
+20600000
+6fe0c913
+c17f8000
+da200000
+6848c913
+20406059
+7920a200
+6848c914
+20406059
+7920a201
+1a227e00
+67e0c8de
+c000bfe1
+c0013fe5
+6fe0c8df
+c283bff1
+20600000
+6fe0c8dd
+c0003fe9
+c001bfeb
+20600000
+6fe0c8dd
+c0003fed
+c001bfef
+20600000
+7048df82
+20600000
+7048df81
+20600000
+7048df80
+20600000
+7048df83
+20600000
+6fe0c8df
+793ffe07
+67e0c8df
+c0003ff9
+c000bffc
+c0013fff
+c001c002
+20600000
+6fe0c8de
+c001c005
+20600000
+6fe0c8de
+c0004005
+20600000
+6fe0c8de
+c001c009
+20600000
+6fe0c8de
+c0004009
+20600000
+6fe0c8e0
+1fe0fe01
+67e0c8e0
+20600000
+6fe0c8e0
+1fe0ffff
+67e0c8e0
+20600000
+6848c913
+20406032
+6848c914
+20406032
+6848c91c
+20406032
+6848c91d
+20206032
+6848c913
+20403f4d
+6848c914
+20403f4d
+6848c91c
+20403f4d
+6848c91d
+20203f4d
+6fe148d5
+207a0000
+7048e101
+7048e20a
+20600000
+da6048e2
+da404025
+2020318a
+7048e100
+20600000
+6fe44bab
+c2974036
+6fe0c90f
+c17f8000
+da200000
+704b9605
+6848c90f
+20404039
+67e0cb93
+6fe0c910
+c07fc042
+20404168
+1a227e00
+c282c052
+20204059
+6fe0c8fb
+203a4059
+20204052
+6fe44bab
+c2964048
+6fe0cb93
+1fe22600
+6fe0c910
+c07fc195
+6fe0cb9a
+243a4045
+2020404a
+6848c90f
+20403f56
+20204033
+7049dd00
+704b9300
+20600000
+6fe0cb93
+20204187
+20406059
+6848c910
+2020c048
+6848c910
+20406069
+6848c90f
+6fe0cb93
+20204187
+6fe0c9dd
+c1008000
+7049dd01
+6fe44bab
+c3940000
+c39b0000
+20204069
+6fe0c9dd
+c1000000
+7049dd00
+6fe44bab
+c2944060
+c29b4060
+20600000
+6fe0c9de
+243a4064
+6fe0cb9c
+245a4069
+7049de00
+6fe0c78f
+67e0cb9c
+67e0cb9b
+20600000
+44e7c019
+20404072
+20740000
+6fe0c992
+1fe0fe01
+1fe17e03
+67e0c992
+20404095
+202045ee
+78547c00
+6fe44bab
+c3960000
+c3970000
+6fe0cb8e
+207a0000
+6fe0cb8f
+207a0000
+78347c00
+20600000
+6fe44bab
+c2944080
+c29b4087
+20600000
+6fe0c9dd
+c1808000
+da604b9c
+da404085
+2020318a
+7049de01
+202046b5
+6fe0c9dd
+c1808000
+da604b9b
+da40408c
+2020318a
+7049de01
+202044d4
+20204098
+6fe44bab
+c38e0000
+6fe0c992
+c1818000
+70499200
+20600000
+44e8401a
+2040408f
+204048e1
+6fe0c927
+c001c0bb
+c005c0cf
+6fe0c992
+c00040a2
+c000c0a0
+c00140a4
+c001c0a6
+6848c9d1
+202040a8
+6848c9d0
+202040a8
+6848c9d2
+202040a8
+6848c9d3
+202040a8
+6fe0c927
+c00240b7
+c002c0b7
+c00440b9
+c003c0b9
+c00340b7
+6048c9dc
+58000006
+20405b0d
+1fe104f8
+6fe0c9dc
+9840fe00
+1fed7e00
+1fe0fe06
+20205b0c
+184085ff
+202040ae
+18408402
+202040ae
+6fe0c992
+c00040c2
+c000c0c0
+c00140c4
+c001c0c6
+6fe0c9d5
+202040c7
+6fe0c9d4
+202040c7
+6fe0c9d6
+202040c7
+6fe0c9d7
+67e0c9dc
+1fed7e00
+1fe22200
+1fe0fe0d
+20405b0c
+1a227e00
+1fe0fe0e
+20205b0c
+6fe0c992
+c00040d6
+c000c0d4
+c00140d8
+c001c0da
+6fe0c9d9
+202040c7
+6fe0c9d8
+202040c7
+6fe0c9da
+202040c7
+6fe0c9db
+202040c7
+20404115
+204040ed
+20403e5f
+204040e8
+1a227e00
+6848c8d8
+67e0c8d8
+67e0c8d0
+9842fe00
+1fe67c00
+20628000
+20207e54
+c6930000
+1a227e00
+207a0000
+67e0c8d0
+20207e54
+704b9800
+704b9900
+704b9a00
+1fe20400
+204040fd
+20404100
+20404103
+20404106
+6fe0cb99
+207a0000
+6fe0cb98
+207a0000
+704b9a01
+6fe0c8d8
+1fe22200
+20600000
+18417e09
+c004c10e
+20600000
+18417e14
+c00a410e
+20600000
+18417e18
+c00c410c
+20600000
+18417e07
+c001c10c
+c002c10c
+c003410c
+c003c10c
+20600000
+704b9901
+20600000
+704b9801
+20600000
+20404121
+20404115
+58000000
+67e1cb8e
+20600000
+44e8c01a
+6fe0cbe1
+245a4121
+da200000
+20404124
+2040412a
+20404130
+20404136
+2040414f
+2040416a
+1a227e00
+20600000
+58030303
+67e1cb8e
+20600000
+704b9600
+6848c918
+6fe0cb8e
+20404187
+67e0cb8e
+20600000
+704b9601
+6848c919
+6fe0cb8f
+20404187
+67e0cb8f
+20600000
+704b9602
+6848c91a
+6fe0cb90
+20404187
+67e0cb90
+20600000
+6fe0c90d
+c17f8000
+704b9603
+6fe0cb91
+1fe22600
+6848c90d
+6fe0c910
+c07fc14b
+20406059
+2020c147
+6848c910
+20406069
+6848c90d
+6fe0cb91
+20404187
+67e0cb91
+20204168
+6848c910
+6fe0cb91
+20404187
+20204145
+20404195
+67e0cb91
+6848c90d
+20203f56
+6fe0c90e
+c17f8000
+704b9604
+6fe0cb92
+1fe22600
+6848c90e
+6fe0c910
+c07fc164
+20406059
+2020c160
+6848c910
+20406069
+6848c90e
+6fe0cb92
+20404187
+67e0cb92
+20204168
+6848c910
+6fe0cb92
+20404187
+2020415e
+20404195
+67e0cb92
+6848c90e
+20203f56
+6848c910
+20203f56
+704b8b00
+6fe44bab
+c40a8000
+6fe0c912
+c17f8000
+704b9607
+6848c912
+6fe0cb95
+20404187
+67e0cb95
+1a227e00
+c283c17a
+2040417d
+6fe0cb8c
+67e0cb8d
+20600000
+704b8c01
+20404180
+20204177
+704b8c00
+6fe0cb8d
+207a0000
+704b8b01
+20600000
+20406059
+6848cb96
+18420e00
+2020c193
+20204191
+1fe3fe00
+1fe22400
+20406059
+7920a400
+1a417e07
+6848cb96
+18420e00
+c003c193
+c0004191
+20600000
+f93fa200
+20600000
+f9202200
+20600000
+44e9401a
+1a627e00
+67e0cb97
+1fe3fe00
+1fe22400
+18422600
+20403f54
+1a620400
+20406059
+7d20a400
+204041a1
+2020418b
+6848cb97
+18410401
+1a417e01
+98467c00
+2422c32f
+20600000
+44e9c01a
+20403f65
+20758000
+20404236
+204041b5
+c01841bc
+c018c217
+c02c4220
+204041b2
+20001af4
+202041ab
+6fe0c91f
+20405af7
+20203f6a
+58000001
+20405b0d
+67e0c9c2
+58000000
+20405b0d
+67e0c9c1
+20600000
+6fe0c9c2
+c02d41c5
+c06c41cb
+c068c1da
+c06941e3
+c00141ea
+c02a41ed
+c0284214
+202041ab
+70492705
+20404232
+20407d12
+da604a39
+2040422b
+2020408e
+58000016
+20405b0d
+1fe67cbd
+2422c1a7
+58000019
+20405b0d
+1fe67c55
+2422c1a7
+5800001b
+20405b0d
+1fe67c1d
+2422c1a7
+70492706
+da604a71
+2020422b
+70492700
+da6049f3
+2040422b
+da6049fd
+2040422b
+58000943
+20405b0c
+da604a17
+2020422b
+70492702
+da6049e9
+2040422b
+da6049fd
+2040422b
+da604a17
+2020422b
+70492703
+da6049df
+2020422b
+20404229
+58009a5b
+20405b0c
+5800000d
+20405b0d
+1fe67c12
+2022c201
+1fe67c0a
+2422c204
+5800000e
+20405b0d
+1fe67ce5
+2422c1ab
+58000010
+20405b0d
+1fe67ca5
+2022c201
+20404211
+70492708
+20600000
+70492709
+da604a53
+2020422b
+1fe67c10
+2422c1ab
+5800000e
+20405b0d
+1fe67cc5
+2422c1ab
+58000010
+20405b0d
+1fe67c38
+2422c1ab
+20404211
+7049270a
+20600000
+5800005b
+20405b0c
+20204227
+70492707
+da604a97
+2020422b
+20404236
+6fe0c9c2
+c038421e
+c000421c
+202041ab
+70492701
+20600000
+70492704
+20600000
+20404236
+6fe0c9c2
+c02cc224
+202041bc
+7049270b
+da604a81
+2020422b
+58000009
+20205b0c
+58005a09
+20205b0c
+efe10013
+d840ffff
+98467c00
+20628000
+20405b0c
+1a60a602
+2020422b
+58008006
+20405b0c
+20002ee0
+20600000
+44ea401a
+20403f65
+20404232
+da604aa3
+2040422b
+2020408e
+204041a7
+20403f65
+58000806
+20205b0c
+6fe0c4ac
+c1800000
+6fe0c927
+c000424c
+c000c24c
+c004424c
+c001424c
+c001c270
+c002424c
+c0034295
+c005c28e
+2020424c
+204042c4
+78547c00
+6fe0c911
+c07fc253
+6848c911
+20406059
+24608000
+58000000
+20405b0d
+c0984266
+58000002
+20405b0d
+c4038000
+204042db
+6fe0c8d1
+204042d3
+67e148d1
+6fe0c8d3
+204042d3
+67e148d3
+6fe0c928
+c0004268
+c000c26a
+c001426c
+c001c26e
+20600000
+c018c256
+202041b2
+204042ad
+202042e2
+204042b5
+202042e2
+204042b1
+202042e2
+204042bd
+202042e2
+204042c4
+6fe0c911
+c07fc276
+6848c911
+20406059
+24608000
+58000000
+20405b0d
+c09841b2
+58000002
+20405b0d
+c4038000
+204042db
+2040428c
+67e0c8d7
+1ff1fe00
+204042d7
+67e0c8d2
+6fe0c8d7
+1fe17e0f
+204042d7
+67e0c8d4
+6fe0c928
+c00042ad
+c000c2b5
+c00142b1
+c001c2bd
+20600000
+58000012
+20205b0d
+204042c4
+6fe0c911
+c07fc294
+6848c911
+20406059
+24608000
+20204279
+204042c4
+78547c00
+58000002
+20405b0d
+c4038000
+58000008
+20405b0d
+203a4259
+58000000
+67e348d1
+20600000
+6fe0c924
+67e0c928
+6fe0c917
+c17f8000
+6848c917
+20403f56
+6848c917
+20406059
+2040c2aa
+20203f54
+6fe0c925
+67e0c928
+20600000
+6fe148d1
+1fe67e00
+67e148d1
+20207e54
+6fe148d3
+1fe67e00
+67e148d3
+20207e54
+6fe148d3
+1fe67e00
+67e148d3
+6fe148d1
+1fe67e00
+67e148d1
+204042bf
+20207e54
+204042bf
+20207e54
+6fe148d3
+684948d1
+67e148d1
+604948d3
+20600000
+6fe0c9c8
+205a42db
+7049c801
+20600000
+704aac01
+20401b1a
+202041a7
+6fe0c911
+c1ff8000
+6fe0caae
+c1808000
+58000000
+67e0caae
+67e248d1
+202042ca
+c4038000
+d840ff00
+9841fe00
+20600000
+c4018000
+d84000f0
+9841fe00
+20600000
+dfe00003
+20405b0d
+67e148d1
+dfe00004
+20405b0d
+67e148d3
+20600000
+6848c920
+20406059
+20608000
+5800000a
+20405b0d
+200003e8
+202042e2
+58008100
+20205b0c
+704ac1ff
+6fe0cbb3
+c280c2ef
+c28042f4
+70448234
+580f0f0f
+67e1c37a
+67e1c37d
+20203d61
+70448233
+d8c04974
+204045c8
+20203d61
+44eac01a
+204045bd
+20404314
+6fe0c938
+c000c2ff
+c0014301
+20600000
+6fe3493a
+20204302
+6fe34957
+684b4974
+98467c00
+2022c553
+20203d59
+20404314
+6fe0c5fc
+1fe0fe03
+1fe22200
+20404dc0
+6fe144de
+e7e10005
+580004a1
+e7e10005
+6fe0c5fc
+1fe0fe01
+1fe27200
+d8c045fc
+20207d5f
+704ac15a
+20600000
+6fe1478c
+c283c322
+c284b20f
+c28031f6
+20204576
+58000000
+67e14ab2
+6fe1478c
+c284b20f
+6fe1478c
+c28031f6
+20600000
+204046de
+20207931
+6fe44bab
+c40d8000
+2434432c
+6fe0caad
+1fe0fe01
+1fe17e0f
+67e0caad
+247a0000
+704aad00
+78547c00
+20600000
+6fe0c911
+c1ff8000
+70417700
+704aaf1e
+20600000
+44eb401a
+1a627e00
+c00a4350
+c000c3fa
+c00ac35f
+c00143fe
+c002c421
+c008454e
+c0094424
+c0033244
+c0024432
+c009c432
+c00cb1ec
+c015c43d
+c010c443
+c005444a
+c01731da
+c018c36a
+c014c36c
+c019436e
+c01f4379
+c020437a
+c013c44c
+c01cc857
+c01d4833
+c01e484e
+c0224390
+20600000
+704aae00
+204042ca
+704ac601
+20404822
+6fe0cac7
+243a4357
+704ac814
+6fe14480
+793ffe00
+67e14480
+704b7700
+6fe14af0
+67e14af2
+20404544
+20204576
+704ac600
+58000006
+6fe44bab
+c28dc364
+58000007
+67e14372
+67e14374
+704af400
+704aac00
+20401b1c
+202043fe
+d8e00002
+20204375
+70095b12
+2020787a
+6fe0cac7
+c000c371
+20204373
+2040436c
+704b7614
+d8e00001
+20204375
+6fe0cb75
+f9207e00
+67e0cb75
+20600000
+2020321d
+6fe143db
+c1000000
+6fe08289
+1feb7e00
+1fe67c0c
+20610000
+58000009
+67e14372
+67e14374
+2040436c
+704af401
+20600000
+704af400
+20600000
+6fe0cac7
+247a0000
+6fe0c437
+1fe67e22
+24628000
+704b7600
+d8e00000
+20204375
+6fe082c1
+1fe67c0c
+24214384
+6fe082c3
+6848cb8a
+98467c00
+2021439a
+6fe082c3
+67e0c177
+20204386
+6fe0cb8a
+67e0c177
+20204386
+704b7500
+20600000
+44ebc01a
+20401b77
+247a0000
+6fe0cac1
+c07fc3a7
+6fe0cb75
+1fe17e03
+c1818000
+6fe0caac
+205a42c8
+6fe44bab
+c280c3d1
+c28043d1
+c282c3d1
+c28343d1
+20403f70
+20404324
+24740000
+2040432f
+204042cb
+2040401d
+6fe44bab
+c30ac3b8
+6fe0cb8b
+c000c3b9
+202043d3
+6fe0cb8c
+203a43c3
+6fe44bcd
+67e4095c
+6fe0cbcc
+c001c3c5
+c00143c8
+704ae608
+68494ae7
+202043d8
+6fe44bd6
+202043bc
+704ae603
+68494ae9
+202043d8
+704ae602
+68494aeb
+202043d8
+da200001
+68494aed
+20401eb3
+6fe0caef
+e7e08005
+20600000
+58000000
+67e3c8d0
+704ae607
+6fe3c8d0
+67e3895c
+68494357
+202043d8
+6fe0cae6
+1fe22200
+20401eb3
+6848cae6
+18427200
+d8c0095c
+20207d5f
+704ac700
+6fe1cacc
+67e1c3ec
+204043e8
+58000005
+e7e08006
+d8c04ad2
+204043ef
+202078ee
+da2043e8
+efe08011
+207a0000
+98c0a200
+efe08006
+c1008000
+202043e9
+d8a043f3
+df200013
+20407d5f
+20201abe
+5800000c
+67e14455
+6fe44bab
+c38d8000
+5800000e
+67e14455
+20600000
+704aae00
+204042ca
+20404822
+20204576
+704b7f00
+704b8800
+204043f3
+20404409
+6fe1447e
+c283c410
+c28031c6
+c280c414
+c2814417
+c281c417
+20204553
+58000000
+67e448d9
+e7e20005
+7049c800
+70445400
+70432600
+20600000
+2040439d
+6fe1447e
+c28031c6
+20203e20
+c282c417
+c281c417
+20204553
+6fe1478c
+c2864553
+204031c6
+20404110
+204044dc
+6fe0cb9f
+c000be1d
+6fe0cac4
+247a0000
+20203e20
+20600000
+704b8704
+20600000
+70445401
+20403223
+2040321f
+58000000
+67e14788
+67e0c78a
+20404422
+2020321b
+704b8000
+6fe0c5f5
+2feffe00
+20608000
+704b8001
+20600000
+6fe0cac1
+c07fc2f8
+6fe1478c
+c3860000
+c3830000
+c3858000
+6fe44bab
+c3828000
+c299c553
+c297c81f
+20203e20
+6fe0cb7f
+c1810000
+704b7f00
+204043f3
+20404422
+2020321b
+6fe0cb7f
+c1010000
+1fe0fe01
+67e0cb7f
+70445512
+20404422
+2020321b
+20405af1
+202031ea
+58000001
+67e30041
+7000e833
+2020458d
+5fffffff
+67e30041
+7000e833
+704ac1ff
+204045a2
+704939ff
+202045ee
+44ec401b
+20770000
+6fe0c454
+207a0000
+204052f4
+247a0000
+6fe0cac1
+c07fc306
+6fe0caac
+205a42c8
+6fe44bab
+c280c48e
+c280448e
+c282c48e
+c283448e
+20403f70
+20404324
+24740000
+2040432f
+204042cb
+2040401d
+6fe0cb80
+c000c47d
+6fe0cb88
+207a0000
+6fe44bab
+c30ac474
+6fe0cb8b
+c000c491
+da200009
+20404dc0
+6fe144de
+e7e10005
+580002a1
+e7e10005
+6fe3c8d0
+e7e38005
+20600000
+6fe0c8d0
+67e0cb81
+6fe0c8d1
+e7e08005
+6fe0c8d3
+e7e08005
+6fe148d5
+e7e10005
+da200007
+20404dc0
+6fe144de
+e7e10005
+580002a1
+e7e10005
+6fe2cb81
+e7e28005
+20600000
+58000000
+67e3c8d0
+20204474
+6fe0cb8c
+203a44b3
+6fe44bcd
+67e4095c
+6fe0cbcc
+c001c4a1
+c00144aa
+da20000a
+20404dc0
+6fe144de
+e7e10005
+580001a1
+e7e10005
+6fe4095c
+e7e40005
+20600000
+da200004
+20404dc0
+6fe144de
+e7e10005
+580003a1
+e7e10005
+6fe1095c
+e7e10005
+20600000
+da200003
+20404dc0
+6fe144de
+e7e10005
+580004a1
+e7e10005
+6fe0895c
+e7e08005
+20600000
+6fe44bd6
+20204494
+44ecc01b
+20403e9b
+20404956
+2040232b
+20402556
+204047cd
+204048be
+204048ef
+2040407c
+204044cc
+204044dc
+204044ff
+20404504
+20404512
+2040451f
+20404515
+2040452a
+2040452d
+20404532
+20404535
+20404022
+20404547
+2020453c
+6fe44bab
+c29bc4cf
+20600000
+6fe0cb9e
+c1808000
+da604b9b
+da4044d4
+2020318a
+6fe0c938
+c1000000
+6fe44bab
+c3830000
+d8e00006
+204046f0
+20403173
+2020454e
+6fe0c938
+c00044e2
+6fe44bab
+c41a8000
+6848cbca
+202044e5
+6fe44bab
+c4190000
+6848cbcb
+6048cb9d
+20404115
+1fe17e07
+6848cb9d
+98467c00
+2022c4f1
+6fe0c78f
+67e0cba0
+6fe0cb9f
+c1000000
+704b9f00
+20600000
+204044f6
+6fe0cb9f
+c1008000
+704b9f01
+20207931
+da404827
+da604ba0
+6fe0c938
+c000318a
+da4044d4
+2040318a
+6fe0cba0
+c000c6e2
+20600000
+da604ac2
+da404502
+20203191
+20404576
+20203e20
+da604b77
+da40450a
+20403191
+6fe0cb77
+c000b203
+20600000
+6fe0cac1
+c07fc2f8
+6fe0cab0
+243a470e
+6fe44bab
+c299c553
+c297c81f
+20203e20
+da604b76
+da40438e
+2020318a
+6fe0cac6
+207a0000
+da604ac8
+da40451a
+2020318a
+6fe0cac7
+247a0000
+6fe0c39b
+c1800000
+20202090
+da604af2
+da404522
+2020318a
+6fe14af0
+67e14af2
+202043cb
+6fe0cb75
+c3810000
+2040436c
+d8e00000
+20204375
+da60478a
+da404424
+2020318a
+da604b87
+da404530
+2020318a
+704b8801
+20600000
+da604ac4
+da403e20
+2020318a
+da604aaf
+da404538
+2020318a
+6fe0cb8a
+67e0c177
+704aae01
+20600000
+6fe0c92a
+c3838000
+da604ab2
+da404541
+20203191
+6fe0c938
+c00047e1
+2020431b
+6fe14bbe
+67e14ab2
+20600000
+da6049bf
+da40454a
+2020318a
+204045f1
+6fe0cac5
+243a46c0
+20600000
+280ffe26
+2040c7f2
+2040431b
+2040439d
+20204553
+44ed401b
+20404314
+6fe1478c
+c285c55f
+6fe44bab
+c304455f
+68494997
+18408401
+60494997
+6049437b
+180a7e00
+67e0c37a
+6fe1cac9
+67e1c37d
+20403225
+6fe14791
+67e14ac2
+7000bd06
+58000000
+67e14ab2
+67e0cb77
+67e0cac4
+67e0cba7
+67e0caac
+d8e00002
+204046f0
+204046e4
+6fe0cbb3
+2feffe01
+2040c3df
+6fe0cbb3
+2feffe00
+2040f8c4
+2040498e
+202048cc
+44edc01b
+d8e00006
+204046f4
+704ac400
+6fe0cbb3
+2feffe01
+2040c581
+6fe0cbb3
+2feffe00
+2040c583
+20204912
+704b7700
+202078f4
+58000000
+67e14ac2
+202078c9
+44ee401b
+6fe44bab
+c4010000
+204048c6
+d8e00002
+204046f4
+2040458f
+204045a2
+202045ee
+6fe080e8
+c01a4593
+c019c596
+20600000
+67e0cb78
+6fe30297
+20204598
+67e0cb78
+6fe30041
+67e34b79
+6fe3cb78
+d8c04939
+df200003
+e8438006
+98467c00
+2022c5b7
+18c08c16
+c200459c
+20600000
+da204939
+6fe0c938
+1fe0ffff
+1feffe1d
+9a20a200
+6fe080e8
+e7e08011
+c01a45ac
+c019c5b3
+20600000
+6fe30297
+e7e30005
+d8c04316
+20407d0c
+6fe3437a
+e7e30005
+20600000
+6fe30041
+e7e30005
+d8c041cb
+20207d0c
+18c08dfa
+18c20a00
+684b4b79
+18408403
+e0430005
+20600000
+da204939
+6fe0c938
+c1000000
+1fe0ffff
+1feffe1d
+9a20a200
+efe08011
+67e0c482
+c019c5c8
+c01a45cd
+20600000
+efe30006
+67e341dd
+d8a041cb
+20407d0c
+2020602c
+efe30006
+67e341dd
+d8a04316
+20407d0c
+efe30006
+67e3437a
+20600000
+6fe14990
+d840aa55
+98467c00
+2022c5e2
+60494990
+204045e7
+6fe0cab4
+67e0c938
+6fe0c926
+67e0c992
+6fe2488d
+67e24891
+67e2483c
+20600000
+204045bd
+6fe24993
+67e24891
+67e2483c
+20600000
+6fe3437a
+67e34950
+1fe0ff00
+67e3496d
+1fe0ff00
+67e3498a
+20600000
+6fe0c9c0
+67e0c9bf
+20600000
+44eec01b
+6fe44bab
+c289c63f
+c2894603
+20600000
+20405d10
+2040460a
+204045fd
+20405d33
+20404611
+204045d4
+20203f65
+580049b8
+d8404938
+98460400
+6fe1c9b8
+da204938
+20600000
+20405d10
+2040460a
+2040461f
+204045fd
+20404622
+20404611
+20203f65
+700964ab
+204061d7
+20405d15
+da2049bb
+68488964
+20404613
+202061d7
+700964b9
+2020460b
+e0408011
+1ff10400
+e0408005
+1fec8400
+e0408005
+e7e08005
+1a227e00
+67f1008a
+58000000
+67f1008e
+70800602
+20205ccf
+6fe1c9b8
+67e1c4a5
+20205ceb
+1fe22600
+1a227e00
+1fe0fffc
+1fe22400
+efe20012
+67e249bb
+1a627e00
+20405d22
+6fe249bb
+e7e20012
+20600000
+6fe44bab
+c4090000
+20404611
+20405b08
+6848c4b5
+20406065
+6848c4ba
+20203f54
+20405da5
+6fe44bab
+2feffe09
+2440ddbf
+2040463b
+202045d4
+d8400080
+da204938
+da400000
+20205ddc
+d8400080
+da204938
+da400000
+20205dce
+d8400001
+da204992
+da40005a
+20205dce
+d8400001
+da204992
+da40005a
+20205ddc
+44ef401b
+20404990
+20407936
+20404027
+20404655
+204046a0
+204046d6
+20403dbd
+20403f88
+20203dd4
+6fe44bab
+c294c65a
+c29bc65a
+20600000
+704b9403
+6fe0c91b
+c17f8000
+da200000
+704b9606
+6848c91b
+2040466a
+67e0cb94
+6fe0c910
+c07fc667
+20404168
+1a227e00
+c283468b
+20204680
+6848c91b
+20403f56
+20204664
+6fe44bab
+c296c676
+6fe0cb94
+1fe22600
+6fe0c910
+c07fc195
+6fe0cb9a
+243a4673
+20204678
+704b9e00
+704b9400
+20600000
+6fe0cb94
+20204187
+20406059
+6848c910
+2020c676
+6848c910
+20406069
+6848c91b
+6fe0cb94
+20204187
+6fe0cb9e
+c1000000
+704b9e00
+6fe44bab
+c39a0000
+6fe0cb9b
+1fe67c14
+244146b5
+6fe0c78f
+67e0cb9b
+20600000
+20404697
+20740000
+6fe0cb9e
+c1008000
+704b9e01
+6fe44bab
+c29a44d4
+6fe0cb77
+207a0000
+6fe0c902
+67e0cb77
+20600000
+78547c00
+6fe44bab
+c3968000
+6fe0cb8e
+207a0000
+6fe0cb8f
+207a0000
+78347c00
+20600000
+6fe44bab
+c29546a4
+c295be9b
+20600000
+6848c91e
+20403f56
+6848c91e
+20406059
+2020c6ad
+6fe0c938
+c1008000
+70493801
+20204316
+6fe44bab
+c315c6b1
+6fe348ef
+67e348e3
+6fe0c938
+c1000000
+70493800
+202047f2
+44efc01b
+6fe0cbb4
+c1008000
+204046c2
+6048c938
+7041ca00
+204046da
+20404316
+204046dc
+704ac501
+202045ee
+204046da
+20205d8c
+6848c938
+18408401
+6fe44bab
+c288c6c9
+18467c02
+244146d0
+20600000
+6fe0cbb4
+1fe0ffff
+98467c00
+244146ce
+20600000
+d8400000
+20600000
+d8400001
+20600000
+d8400001
+da204938
+da400000
+20205dce
+6fe44bab
+c41a0000
+2040465a
+20600000
+d8e00000
+202046f0
+d8e00000
+202046f4
+d8e00003
+202046f0
+d8e00003
+202046f4
+d8e00005
+202046f0
+d8e00005
+202046f4
+d8e00014
+202046f0
+d8e00018
+202046f0
+d8e00016
+202046f0
+d8e0000c
+202046f0
+d8e0001c
+202046f0
+6fe44bab
+f9207e00
+67e44bab
+20600000
+6fe44bab
+f93ffe00
+67e44bab
+20600000
+d8e00015
+204046f0
+58000000
+67e44bcc
+67e44bd5
+6fe0c90a
+1fe17ec0
+c0204705
+c0404707
+c060470c
+58070008
+67e44bcd
+20600000
+58040005
+20204703
+58022303
+67e44bcc
+58000003
+67e44bd5
+20600000
+5800cd03
+20204708
+44f0401c
+6fe0cab0
+1fe0ffff
+67e0cab0
+6848c938
+18467c01
+2442c6c2
+6048c938
+7041ca00
+204046d2
+204045a2
+20203d59
+6fe44bab
+c41c0000
+6fe248d1
+207a0000
+204047bd
+58000003
+204047b3
+205a47af
+245a47b1
+58000002
+204047b8
+205a47af
+6fe0c9c9
+c000c72d
+6fe44bab
+c41c0000
+df200005
+d8a049c9
+20207d26
+20404741
+6fe149ca
+67e109f8
+6fe148d1
+67e109fa
+20404779
+6fe109f8
+67e149ca
+6fe109fa
+67e148d1
+6fe149cc
+67e109f8
+6fe148d3
+67e109fa
+20404781
+6fe109f8
+67e149cc
+6fe109fa
+67e148d3
+20600000
+6fe44bab
+c41c8000
+6fe149ca
+67e109ff
+20404754
+67e149ca
+6fe148d1
+67e109ff
+20404762
+67e148d1
+6fe149cc
+67e109ff
+20404754
+67e149cc
+6fe148d3
+67e109ff
+20404762
+67e148d3
+20600000
+6fe08a00
+203a4757
+2020475c
+6fe089ff
+2040476f
+67e089ff
+6fe109ff
+20600000
+6fe089ff
+204047ab
+2040476f
+205a7e5e
+204047a7
+2020475a
+6fe08a00
+203a4765
+20204769
+6fe089ff
+20404774
+67e089ff
+2020475a
+6fe089ff
+204047ab
+20404774
+205a7e5e
+204047a7
+2020475a
+1feffe04
+1fe6fc05
+20407def
+1807fe00
+20600000
+1feffe0c
+1fe6fc0a
+20407def
+1807fe00
+20600000
+6fe109f8
+684909fa
+9840fe00
+6848c9ce
+9840fe00
+1fe10401
+6048c9ce
+20204789
+6fe109f8
+684909fa
+9840fe00
+6848c9cf
+9840fe00
+1fe10401
+6048c9cf
+20204789
+67e189fc
+2feffe10
+2020c793
+6fe089fd
+c07fc79a
+6fe089fc
+1fe37e00
+67e109f8
+67e109fa
+20600000
+6fe089fd
+c0004797
+6fe189fc
+2020478f
+7009fe00
+6fe089fc
+2020478f
+6fe089fc
+204047a5
+67e089f8
+67e089fa
+203a47a3
+580000ff
+67e089f9
+67e089fb
+20600000
+58000000
+202047a0
+204047ab
+1fe37e00
+204047ac
+1fe67e00
+67e089ff
+20600000
+1fe67e00
+67e08970
+6fe08970
+20600000
+7049c900
+20600000
+7049c901
+20600000
+9a267c00
+24217e5e
+9a467c00
+24217e5e
+20207e60
+9a267c00
+24610000
+9a467c00
+24610000
+20207e60
+6fe148d1
+204047c4
+1fe22200
+6fe148d3
+204047c4
+1fe22400
+20600000
+67e109fa
+6fe089fb
+c07fc7ca
+6fe089fa
+1fe17eff
+20600000
+6fe109fa
+1fe67e00
+202047c8
+da6048c4
+da4047d0
+2020318a
+6fe248b8
+67e2485c
+704aae01
+20600000
+c00047db
+c000c7dd
+c00147d8
+c001c7df
+580ea600
+67e248b8
+20600000
+5805e740
+202047d9
+580927c0
+202047d9
+58124f80
+202047d9
+7048a500
+20402652
+5fffffff
+67e2485c
+58000000
+67e3c8d0
+704be101
+2040423c
+20403e33
+202026b5
+6fe0cbe1
+245a41aa
+704be100
+20202651
+6fe0cbe1
+243a262c
+20202628
+793f8026
+7048a100
+d8e00001
+202046f4
+6fe44bab
+c308c803
+20403d65
+20344806
+6fe44bab
+c298480c
+c318c80c
+20404110
+1fe17e07
+6848cbcb
+98467c00
+2022c827
+2020480c
+6fe0cab0
+243a470e
+20600000
+6fe14885
+67e14887
+70488b03
+20202559
+20403d65
+20344816
+70493800
+6fe14bba
+67e14887
+70488b02
+20202559
+204048cc
+6fe14881
+67e14887
+70488b04
+20202559
+6fe0c938
+c0004806
+20404314
+2020481a
+204047f2
+2040490e
+70493801
+204045bd
+20203d59
+20403d65
+20343e20
+20204553
+20403d65
+20740000
+6fe44bab
+c297c5ee
+20600000
+d8e00001
+204046f0
+58000000
+67e14887
+20404576
+2040498e
+204048cc
+70483601
+6fe44bab
+c30aa32e
+70483602
+2020232e
+6fe0c8a5
+243a47e1
+6fe0c88b
+c0014840
+c0024844
+c001c849
+20404912
+204047f2
+6fe0cab0
+243a470e
+6fe0c938
+c0003e20
+20600000
+6fe44bab
+c297c811
+c2984811
+20204806
+6fe44bab
+c317c839
+6fe0cbb4
+c000c839
+2020481a
+6fe44bab
+c317c839
+c289c839
+c2894839
+20204812
+204042ca
+704aae00
+7048a100
+70488b00
+6fe24891
+6fe2488d
+98467c00
+20628000
+20204822
+d8e00001
+204046f4
+204048c6
+58000000
+67e14883
+67e14887
+67e0c8a1
+67e0c9c8
+67e0c88b
+204042ca
+204042db
+6fe2483c
+67e24891
+67e24993
+202045ee
+c6930000
+20403f70
+24740000
+6fe44bab
+c30ac86d
+6fe0cb8b
+243a4884
+204042cb
+6fe0c836
+c280c87c
+6848c7c7
+6fe0c8d0
+9841fe00
+67e0c8d0
+6848c7cc
+6fe0c8d5
+9840fe00
+67e0c8d5
+6848c7cd
+6fe0c8d6
+9840fe00
+67e0c8d6
+70483601
+da200007
+da4048d0
+6fe44bab
+c28c26e1
+6fe148d5
+207a0000
+202026e1
+70483602
+da200009
+6fe0cb8c
+243a488a
+da404bd5
+20600000
+da404bcc
+20600000
+58000000
+67e1cba4
+20600000
+6fe44bab
+c40b0000
+6fe0caae
+207a0000
+6fe0c8a7
+207a0000
+6fe0cba1
+1fe0fe01
+1fe17e03
+67e0cba1
+247a0000
+704ba200
+6fe0cba2
+1fe0fe01
+67e0cba2
+1fe67c08
+242148a5
+2040259a
+2040265b
+242c48ab
+2437c8ab
+204048b5
+20402597
+6fe0cba3
+1fe0fe01
+67e0cba3
+c00848ad
+20600000
+204022cb
+2020489b
+704ba300
+6fe0cba4
+c3800000
+79207e00
+67e0cba4
+6fe14bbc
+67e14ab2
+2020423c
+6fe0c8a7
+203a488c
+704ba300
+6fe0cba4
+c4000000
+793ffe00
+67e0cba4
+20404544
+202041aa
+6fe44bab
+c4100000
+6fe0cba7
+207a0000
+1fe0ffff
+67e0cba7
+203a4912
+20204920
+6fe44bab
+c4100000
+2040498e
+6fe0cbc0
+67e0cba7
+20600000
+704ba700
+6fe14bc4
+67e14930
+67e14932
+6fe0c938
+c00048d5
+c000c8d7
+c00148d9
+20600000
+6fe0c915
+202048da
+6fe0c916
+202048da
+6fe0c922
+67e08964
+20404912
+6fe08964
+67e0c92f
+da200000
+70492d01
+20207806
+6fe0c923
+c17f8000
+6fe14ac2
+247a0000
+6fe14883
+247a0000
+6fe14887
+247a0000
+6fe0cba7
+247a0000
+6fe0cbc1
+203a48f2
+67e0cba8
+20600000
+da604ba8
+da4048f2
+2020318a
+6fe0c923
+67e0c92f
+6fe14bc2
+67e14930
+67e14932
+da200000
+6848c992
+18408401
+6fe44bab
+c30e48ff
+18408401
+18467c04
+24414902
+6048c92e
+70492d01
+20600000
+d8400001
+20600000
+78547c00
+6fe0c923
+6848c92f
+98467c00
+24628000
+6fe0c92e
+207a0000
+7048f900
+78347c00
+20600000
+2040491e
+20404917
+2040491a
+2020491c
+6fe0c938
+c0004917
+c000c91a
+c001491c
+20600000
+704baa00
+6848c915
+2020492b
+6848c916
+2020492b
+6848c922
+2020492b
+6848c923
+2020492b
+6fe0c938
+c0004925
+c000c927
+c0014929
+20600000
+6848c915
+2020492f
+6848c916
+2020492f
+6848c922
+2020492f
+44f0c01c
+6048c92f
+da200000
+20207801
+44f1401c
+6048c92f
+da200000
+202077fc
+6fe0c915
+98467c00
+2042c952
+6fe44bab
+c3126065
+20404943
+20404947
+2040494b
+6fe0cba9
+203a6065
+704ba900
+2020607f
+6fe0c915
+98467c00
+2042c954
+20206069
+6fe44bab
+c4130000
+6fe0c922
+2020494e
+6fe44bab
+c4128000
+6fe0c923
+2020494e
+6fe44bab
+c4138000
+6fe0c921
+98467c00
+24628000
+704ba901
+20600000
+704baa00
+20600000
+704baa01
+20600000
+6fe14ac2
+247a0000
+6fe14883
+247a0000
+6fe14887
+247a0000
+6fe0cba7
+247a0000
+20404904
+20740000
+6fe44bab
+c4108000
+c4020000
+c291c97c
+6fe0c8f8
+1fe0fe01
+67e0c8f8
+1fe67c14
+2441496e
+c0014970
+c0024976
+c0034970
+c0044976
+20600000
+7048f801
+20204976
+6fe44bab
+c2914920
+6fe0c921
+c17f8000
+6848c921
+2020492f
+6fe44bab
+c2914912
+6fe0c921
+c17f8000
+6848c921
+2020492b
+6fe14bbe
+68494ab2
+98460400
+6fe14bc8
+98467c00
+2421498e
+6fe0c8f9
+247a0000
+7048f901
+20204986
+6fe14bc6
+67e14930
+67e14932
+6fe44bab
+c29148d0
+6fe0c921
+c17f8000
+202048da
+7048f900
+20204976
+6fe44bab
+c4108000
+c4020000
+c291c9a2
+6fe0c8f8
+1fe67c0a
+2021499e
+6fe0c938
+c000499b
+70409901
+20600000
+6fe44bab
+c38c0000
+202026d0
+6fe0c938
+c00026e1
+70409900
+20600000
+6fe0c8f9
+243a499e
+20204997
+20401291
+6fe08018
+202025e2
+204049a5
+202026ee
+204049a5
+6fe08031
+2feffe00
+24608000
+6fe08048
+2feffe03
+2040a724
+2440a720
+202026ee
+6fe0cb75
+2fe00603
+2420fe5e
+20403223
+20207e60
+204052f7
+247a0000
+70008901
+70008a00
+20207e60
+6fe1478c
+c284c9b3
+202049b8
+20758000
+20406172
+58004a74
+67e1489b
+58004a03
+67e1489f
+580049fe
+67e1445d
+58004a3e
+67e14465
+58004a40
+67e14467
+58004a59
+67e1446f
+580049f3
+67e14991
+580049e3
+67e14995
+44f1c01c
+20405dbc
+204049fa
+2040793a
+6fe0c961
+67e0c8d0
+c00049e2
+6fe0c962
+67e0c790
+204049f3
+204077bb
+204077c5
+70498d01
+6fe1478c
+c3860000
+20203217
+70498d02
+204049f3
+da200000
+20407806
+204049ef
+20405ddc
+204026e5
+2034232e
+6fe2483c
+67e24891
+6fe14885
+67e14887
+20202559
+d8400004
+da20483c
+da400000
+20600000
+44f2401c
+6fe0c95f
+c0ffc9f8
+6848c93c
+20206069
+67e0c93c
+202049f6
+20402607
+6fe14989
+67e1498b
+20600000
+20404a03
+6fe0c932
+79207e07
+d840003f
+20206092
+2040609f
+20206197
+204061a3
+20404a16
+20404a09
+20204a24
+6fe0c998
+c1808000
+6fe2499c
+203a4a10
+7049a200
+78347c00
+2020790b
+6fe0c9a2
+c17f8000
+1fe0fe01
+67e0c9a2
+78547c00
+20207909
+684944c8
+18417e01
+18430400
+67e0c99c
+18417e01
+18430400
+67e0c99d
+18417e01
+18430400
+67e0c99e
+18417e01
+18430400
+67e0c99f
+20600000
+44f2c01c
+20404a34
+20404a39
+20404a2a
+24740000
+20204a70
+6fe0c998
+c1808000
+6fe0c9a2
+207a0000
+1fe67c01
+24610000
+6fe14885
+67e14887
+78347c00
+20600000
+6fe0c99c
+243a4a64
+6fe0c99d
+243a4a66
+20204a6c
+6fe0c99e
+243a4a68
+6fe0c99f
+243a4a6a
+20204a6e
+20404a4e
+20204a05
+1a627e00
+c016b23f
+c0083227
+c01cca48
+c01e4a4a
+c01d4a47
+20600000
+20202597
+204049ef
+20405dce
+7048a100
+70499901
+70499a01
+20600000
+6fe0c999
+c1000000
+6fe0c998
+c1008000
+70499801
+da200000
+20207801
+da200000
+20407801
+204049f3
+20203217
+20403198
+2040232b
+20402556
+20204a5d
+6fe0c963
+207a0000
+6fe0c4c8
+243a49fb
+da60498b
+da404a55
+20203191
+70496a01
+20600000
+70496a02
+20600000
+70496c01
+20600000
+70496c02
+20600000
+70496a00
+20600000
+70496c00
+20600000
+da204964
+2020793f
+da204971
+2020793f
+6fe0c99a
+c000ca7e
+da20497a
+20407956
+24344a83
+d8c0497a
+efe08006
+1fe22200
+da40497b
+20600000
+70499a00
+78347c00
+da200001
+da40499b
+20600000
+6fe0c97d
+c0024a87
+c002ca87
+20600000
+6fe0c980
+243a4a8e
+6fe0c982
+243a4a8e
+6fe0c984
+243a4a8e
+20600000
+78347c00
+20204a79
+70478f14
+70478301
+5800060f
+67e148d1
+580048d1
+67e1448a
+70409901
+70415b06
+70417802
+7048d000
+58004930
+67e1448d
+70448c01
+704931ff
+58000296
+67e14933
+5800073a
+67e14935
+5800498d
+67e144ca
+58000c0c
+67e1498f
+58004944
+67e144c6
+70496100
+70495fff
+704962ff
+70495d00
+70495e00
+70496000
+70496301
+58004e55
+67e14950
+67e14952
+58000007
+67e14956
+7044a002
+38035a0c
+3804011a
+38080060
+380c0028
+67e4c964
+3802000a
+38040002
+e7e20005
+38035a08
+3804019a
+38080000
+380c0000
+67e4c971
+58000064
+67e14989
+7041e800
+70483601
+7048a806
+70485b01
+70488c00
+2040231a
+20402613
+204022ff
+20402325
+58000708
+67e14881
+58000050
+67e14885
+580a7700
+67e1c8b0
+58604800
+67e1c85c
+20203100
+20758000
+20406df3
+58004b5b
+67e1445d
+58004b59
+67e1445f
+58003217
+67e14469
+58004b57
+67e14465
+58004b06
+67e14467
+58004b00
+67e1445b
+58004bc8
+67e1446b
+58004b3d
+67e1446f
+58004ba3
+67e147e8
+58004bdf
+67e147e3
+58004be0
+67e147e5
+20404afb
+20401aa9
+20404bcb
+20406172
+2040793a
+204077f0
+44f3401c
+20404bd8
+6fe0c7de
+c0004afd
+6fe0c7df
+67e0c790
+20204be7
+7045f707
+20600000
+704790ff
+7047e001
+20204b76
+6fe0c7e0
+c00131dd
+20405301
+6fe0c4e6
+243a31dd
+202031df
+1a627e00
+c00a4b0f
+c00acb13
+c01fcb16
+c0204b1c
+c0084b22
+c0164b23
+c016cb2e
+20600000
+20404b5d
+58000000
+67e147b8
+20203215
+2040793a
+7047b100
+20204b76
+2040793a
+7047b101
+6fe447c2
+67e44372
+20403223
+20201f57
+6fe143db
+c1000000
+6fe447ca
+207a0000
+67e44372
+20201f57
+20204bf8
+6fe0c7de
+c1000000
+6fe0c7e0
+c1808000
+20404b29
+20203213
+7049e001
+df20000b
+d8a049e1
+d8c049ca
+20207d5f
+6fe0c7de
+c1000000
+6fe0c7e0
+c000cb33
+20204bf4
+6fe0c9e0
+c1808000
+7049e000
+6fe1478c
+c2803215
+c284b215
+df20000b
+d8c049e1
+d8a049ca
+20207d5f
+20404b40
+20404b47
+20204b52
+da6047dc
+da404b43
+20203191
+7047e002
+20403215
+20404b87
+20204be4
+da6049ed
+da404b4a
+2020318a
+6fe1478c
+c284cbe4
+c2804be4
+6fe0c9ca
+c000cbe4
+c0024be4
+c002cbe4
+20203217
+6fe0c7e0
+c1808000
+da6047b8
+da404b64
+20203191
+20404bb4
+202061a3
+2040609f
+20206197
+2040609f
+20206df7
+6fe0c7a4
+c2804b60
+20600000
+6fe147d8
+67e147da
+67e147dc
+20203205
+6fe0c7e0
+c1808000
+6fe0c7a4
+c2804b69
+20600000
+6fe1478c
+c3848000
+6fe147d6
+67e147da
+67e147dc
+6fe147b4
+20404c09
+20403211
+6fe247be
+67e249cd
+6fe1478c
+c3858000
+20203207
+6fe0c7e0
+c1808000
+6fe0c7a4
+c2804b7b
+20600000
+6fe147b8
+684947b6
+604947b8
+247a0000
+6fe147b2
+20404c09
+20403211
+6fe247ba
+67e249cd
+6fe1478c
+c3858000
+20203207
+6fe1478c
+c284b20f
+20204b5d
+20407e56
+6fe1478c
+c284cb8e
+20600000
+6fe0c7b1
+207a0000
+20207e54
+20407e56
+6fe1478c
+c3800000
+c3848000
+20207e54
+6fe0c7a4
+c2804b99
+20600000
+20204b76
+78567c00
+6fe147da
+67e147dc
+20404b91
+20344b96
+20404b8a
+24740000
+78367c00
+20600000
+20404b9a
+24760000
+1a227e00
+203a4baa
+20403213
+da6047f2
+20204bac
+20403215
+da60481a
+dfe00005
+98effe00
+9a60a600
+efe08013
+207a0000
+20404bc0
+1a60a601
+20204baf
+6fe1478c
+c284cbb7
+20600000
+20401b77
+247a0000
+20404bc3
+24740000
+1fe0ffff
+1feffe05
+d8404842
+98408c00
+20204c0d
+67e0895c
+da20095c
+2020793f
+da20095c
+20407956
+24740000
+6fe0895c
+20600000
+6fe14437
+c00c4b16
+20600000
+58000002
+67e0c9ec
+58200008
+67e247c2
+592c0005
+e7e20005
+70438017
+5800001b
+67e143d1
+20401b16
+20401b32
+20401b3f
+20201b1e
+df200028
+d8a04842
+d8c09e57
+20207d52
+df20017e
+d8c09af2
+20207d52
+20204b76
+da200000
+da6049d5
+2040780c
+20404b87
+6fe0c9ec
+67e0c9ed
+20600000
+58000000
+20404bef
+70478301
+204077bb
+204077c5
+6fe1478c
+c3860000
+20203217
+684944ca
+e7e08002
+efe08005
+67e0c78f
+20600000
+6fe144ca
+efe0803f
+c1800000
+20203217
+684944ca
+efe08002
+c000cc03
+58000001
+684944ca
+e7e08002
+18408c02
+efe08006
+e7e0800f
+efe10006
+20207e05
+58000002
+20404bef
+18408c05
+efe10006
+203a3217
+20207e05
+67e14159
+1fe0fffc
+67e14428
+20600000
+efe08006
+1fe22200
+e8410006
+20407ceb
+20401eb3
+1a227200
+20407ce5
+20207d5f
+6fe149ee
+67e147ea
+6fe0c9f0
+67e0c9cc
+67e0c9d7
+6fe0c9f1
+67e0c7de
+6fe0c9f2
+67e0c7df
+7047a401
+58000030
+67e147af
+58000000
+67e147a5
+58000001
+67e147f2
+67e147f7
+58000006
+67e1481a
+67e1481f
+58000007
+67e147fc
+58000008
+67e14824
+580047e0
+67e144ca
+58201400
+67e1c7e0
+70409901
+58000100
+67e14159
+70415b08
+70417705
+70417802
+58000030
+67e14455
+58000001
+e7e10005
+7046410a
+58000096
+67e147ba
+e7e10005
+58000296
+67e147be
+e7e10005
+38000010
+38048008
+380ac000
+380c0004
+67e447ca
+70448c01
+580049ca
+67e1448d
+58000000
+67e149ca
+380001a0
+38040068
+38080000
+380c0000
+67e449cd
+58000301
+67e149d5
+380001a0
+380400e8
+38080000
+380c0000
+67e449d8
+5800000e
+67e147b2
+58000140
+67e147b4
+67e14428
+58000050
+67e147b6
+70443207
+70442700
+380000fb
+3806c212
+3808800f
+380c0021
+67e4444c
+3800ff00
+38043fc0
+38080ff0
+380c03fc
+67e447d2
+580048fb
+67e1448a
+58002001
+67e148fb
+7043e71f
+38010102
+380480c1
+38098120
+380c640c
+67e4c3e8
+380003c1
+e7e10005
+7044071f
+3802090d
+38074c15
+380a8532
+380dd1d5
+67e4c408
+38026574
+3804001c
+e7e18005
+580047e7
+67e144c6
+7047e702
+70447d17
+58004920
+67e14487
+70448905
+58002540
+67e140b2
+58040003
+67e1c765
+70476c03
+70476401
+70478e01
+70415f00
+3803ffff
+3806fe23
+380999d9
+380c020d
+67e440a0
+58009af2
+67e14396
+7040d801
+38010306
+38040004
+38082010
+380c9040
+67e4c662
+38020011
+38040044
+e7e28005
+70467800
+58009c70
+67e14660
+7040c518
+20203100
+6fe0c4d4
+d840003e
+20206092
+6fe0c4d4
+d840003f
+20206092
+20404ca7
+20404ca4
+20204ca7
+20404cab
+20204ca4
+20204cab
+20404cab
+20204cad
+20204ca4
+6fe0c4d5
+20204ca5
+6fe0c4d5
+20204ca8
+20404cb3
+20404cb5
+20204cb3
+20800000
+20404cc4
+20404cce
+20404ce2
+20404d01
+20404d05
+7009fc01
+7009f904
+20404d10
+20204cc2
+6fe08a2c
+c283cccc
+708a01ff
+20000064
+708a020e
+708a0003
+70804205
+20600000
+70804204
+20600000
+20404cd2
+20404cd6
+20404cda
+20204cde
+6fe0c7a4
+247a0000
+7047a40d
+20600000
+6fe0c7a5
+247a0000
+7047a50e
+20600000
+6fe0c7a6
+247a0000
+7047a609
+20600000
+6fe0c7a7
+247a0000
+7047a70a
+20600000
+58001800
+67e1095c
+58001bff
+e7e10005
+58001c00
+e7e10005
+58001fff
+e7e10005
+6fe4095c
+20405eb0
+6fe08a2c
+2feffe07
+2040ded7
+2440dedb
+d841c200
+20405ec8
+6fe0c7a4
+d8400008
+20406093
+6fe0c7a5
+d8400049
+20406093
+6fe0c7a6
+d840000a
+20406093
+6fe0c7a7
+d840000b
+20406093
+d8400081
+60588060
+20207e02
+6fe0c7a8
+247a0000
+7047a80c
+20600000
+6fe0c7a8
+d8400010
+20406093
+da200040
+204061d1
+da200000
+da400000
+58000000
+2040620a
+d8e00000
+2020621d
+6ff10112
+1fe0a3fc
+24610000
+20405ef7
+efe08003
+c000cd18
+20407d12
+20205f07
+efe10003
+67e109fd
+d84003ff
+98410400
+604909f6
+1feb7e00
+1fecfe00
+67e089f8
+efe08003
+1fe0ffff
+9a267c00
+20610000
+20404d26
+20204d81
+6fe089f8
+c01fcd29
+20204d6d
+44f3c01c
+6fe089f6
+c0004d6c
+c000cd34
+c0014d39
+c001cd47
+c0024d51
+c002cd6c
+c0084d62
+c00a4d68
+20204d6c
+7009ff00
+6ff10000
+67e10a00
+df200003
+20204d74
+efe10003
+67f10052
+20600000
+efe08003
+1fe20400
+67f08024
+efe08003
+98408400
+79207e07
+67f08023
+efe08003
+98408400
+1fe27200
+20600000
+20404d3c
+efe08003
+67f08025
+98408400
+c2004d48
+184104ff
+efe08003
+98467c00
+2422cd60
+20204d6c
+df200020
+d8a04000
+d8400000
+efe08003
+e7e08005
+98408400
+c2004d54
+184104ff
+efe08003
+98467c00
+2422cd60
+70802300
+20404d6c
+20407e07
+20200801
+70802300
+20204d6d
+efe08003
+1fe27200
+efe10003
+1fe20a00
+20405f4d
+20204d6c
+6ff08060
+79207e04
+67f08060
+20204d6c
+20204d71
+7009ff01
+20204d72
+7009ff0c
+20204d72
+7009ff00
+df200001
+20204d74
+7009fa0e
+1f20fe03
+67e089fb
+20404d7d
+6fe189fc
+e7e18003
+d8c009ff
+20405f33
+20205f13
+20405f0f
+6fe189f9
+e7e18003
+20600000
+20405ef7
+18608603
+efe08003
+98608600
+20205f03
+7041db00
+20600000
+6fe341dd
+684b0041
+98467c00
+20600000
+44f4401d
+6fe10315
+1fe20c00
+efe08006
+67e0c5f5
+1fe1040f
+1ff1fe00
+c004cdad
+c003cdad
+c0054dbc
+c002cda5
+c000cd99
+20600000
+18427e00
+c002cd9d
+c001cda4
+20600000
+70095b27
+20407871
+6fe0c09a
+c1840000
+18427e00
+c002c44c
+20600000
+20600000
+20404dbc
+da200001
+20404dc0
+6fe144dc
+e7e10005
+58000000
+e7e08005
+20600000
+da200001
+20404dc0
+6fe144dc
+e7e10005
+58000000
+e7e08005
+70095001
+6fe0c4e2
+79207e06
+67e0c4e2
+70095b12
+20407871
+6fe0c09a
+c1840000
+2020442c
+efe08006
+c000cdbf
+20600000
+20600000
+2040529d
+1a220400
+60488950
+1fe20a00
+1a227e00
+e7e10005
+20600000
+2035cdcc
+580045f6
+d8a044d6
+98a67200
+20407d26
+44f4c01d
+58000424
+d8a003e4
+98a67200
+20407d26
+5800037a
+d8a0030e
+98a67200
+20407d26
+2020536b
+44f5401d
+18c20400
+18420c00
+efe10006
+67e10317
+efe10006
+67e10319
+18c27e00
+67e10315
+6fe0c78b
+c0004de2
+2020514d
+6fe10317
+203a4e5a
+44f5c01d
+6fe08319
+c000cdf8
+c0284e3a
+c028ce53
+c0294e51
+c029ce51
+20204e5a
+44f6401d
+20405301
+6fe0c4e6
+c0007e60
+c000fe60
+c0017e60
+c001fe60
+c040fe60
+c0607e60
+c0407e60
+c0207e60
+20600000
+20404dec
+247a0000
+2040530b
+20404e5f
+68490320
+203a4e59
+20405314
+6fe10320
+e7e10005
+18007e01
+e7e10005
+20204e5a
+6fe0c5f4
+207a0000
+1fe22200
+44f6c01d
+6fe20386
+d8400100
+98408400
+1c427e00
+98467c00
+24610000
+7045f400
+1a227e00
+c0284e12
+2020137a
+d9000000
+2040530b
+20404ed8
+20405316
+20407cee
+20404f0b
+20405314
+5800000c
+e7e10005
+18007e01
+e7e10005
+20204e5a
+44f7401d
+6fe10326
+1fe0fe04
+20407eb6
+1fe08401
+d8c044f0
+efe18006
+207a0000
+67e1898e
+6fe0898e
+1fe22200
+20404e2d
+1a427e00
+67e0c4f0
+20600000
+d8e00000
+da400000
+18e67c07
+24610000
+aa2fffff
+2020ce34
+20204e38
+18427e00
+203a4e38
+f9202400
+184085ff
+18e08e01
+20204e2f
+204052f7
+247a0000
+20404dec
+247a0000
+20405318
+20406df3
+204066c7
+20406df7
+20404e1e
+20204e4a
+204052f7
+247a0000
+20405318
+20406df3
+204066c7
+20406df7
+20405321
+6fe10326
+203a4e59
+e7e10005
+6fe144d8
+e7e10005
+20204e5a
+20404d8c
+20204e5a
+44f7c01d
+70033500
+20406341
+6fe08335
+c1008000
+20204e5a
+204052e7
+58000000
+67e10317
+67e10319
+70031b01
+20600000
+44f8401e
+20405316
+18002400
+6fe10317
+1fe22600
+6fe10315
+98000c00
+20404e6e
+1a627e00
+1a60a7fc
+1fe0fffc
+243a4e66
+1a427e00
+67e10320
+20600000
+44f8c01e
+efe08006
+c000cea7
+c0014eaf
+c001cf33
+c0024f63
+c002d000
+c0035029
+c003d079
+c00450ae
+c004d0be
+c0054e7d
+c005d0bf
+204050c0
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+5800000b
+e7e08005
+18e27e00
+e7e08005
+efe10006
+c0014e8b
+c001ce91
+20600000
+58020008
+e7e30005
+58000280
+e7e20005
+18007e0c
+20204e96
+5803000c
+e7e30005
+58000006
+e7e40005
+18007e10
+9a40a400
+20204e7c
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+67e10964
+1a627e00
+9a262600
+20405316
+5800000b
+e7e08005
+18e27e00
+e7e08005
+6fe10964
+20204e88
+efe08006
+1fe20e00
+efe10006
+1fe22200
+98c08c00
+1a627e00
+9a262600
+20204e7c
+20407cee
+20407cf3
+d9000000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+1fe20400
+efe10006
+1fe21600
+44f9401e
+18427e00
+c000cec2
+c001cee4
+c008cef0
+c009cefb
+204050c0
+20204f32
+20407cee
+d8400050
+6fe144d8
+243a4f2c
+19627e00
+67e144d8
+1c427e00
+67e20386
+20404ecc
+20204f07
+60490384
+19627e00
+67e1037a
+1a227e00
+67e1037c
+1a427e00
+67e1037e
+1a627e00
+67e10380
+18e27e00
+67e10382
+20600000
+68490384
+6fe1037a
+1fe21600
+6fe1037c
+1fe22200
+6fe1037e
+1fe22400
+6fe10380
+1fe22600
+6fe10382
+1fe20e00
+20600000
+20407cee
+58000051
+d8400051
+6fe144da
+243a4f2c
+19627e00
+67e144da
+6fe0c4e1
+79207e00
+79207e01
+67e0c4e1
+20204f0f
+20407cee
+d8400052
+6fe144dc
+243a4f2c
+19627e00
+67e144dc
+6fe0c4e2
+79207e00
+79207e01
+67e0c4e2
+20204f0f
+20407cee
+1b427e00
+d8400053
+6fe144de
+243a4f2c
+19627e00
+67e144de
+6fe0c4e3
+79207e00
+79207e01
+67e0c4e3
+20204f0f
+58000001
+67e1032e
+7045f450
+20204f11
+6fe0c4e0
+79207e00
+79207e01
+67e0c4e0
+58000000
+67e1032e
+44f9c01e
+20407cf3
+58000003
+e7e08005
+18e27e00
+e7e08005
+58000008
+e7e10005
+18427e00
+e7e10005
+19627e00
+e7e10005
+6fe1032e
+c000cf27
+290c0000
+2020cf22
+58000004
+e7e10005
+18007e00
+e7e10005
+5800000c
+20204f2e
+e7e10005
+18007e02
+e7e10005
+5800000c
+20204f2e
+79201000
+20204f0f
+9a40a400
+1a627e00
+9a262600
+20204f32
+20204e7c
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe21600
+efe10006
+1fe20400
+44fa401e
+58000050
+98467c00
+2022cf4b
+58000051
+98467c00
+2022cf51
+58000052
+98467c00
+2022cf5d
+58000053
+98467c00
+2022cf57
+20600000
+19627e00
+67e144d8
+6fe0c4e0
+79207e01
+67e0c4e0
+20204e7c
+19627e00
+67e144da
+6fe0c4e1
+79207e01
+67e0c4e1
+20600000
+19627e00
+67e144dc
+6fe0c4e3
+79207e01
+67e0c4e3
+20600000
+19627e00
+67e144de
+6fe0c4e2
+79207e01
+67e0c4e2
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe20400
+18422200
+44fac01e
+58000050
+98467c00
+2022cf7a
+58000051
+98467c00
+2022cf98
+58000052
+98467c00
+2022cf84
+58000053
+98467c00
+2022cf8e
+202050c0
+18a21600
+6fe0c4e0
+79207e04
+79207e03
+67e0c4e0
+19620a00
+d9600050
+6fe144d8
+1fe20400
+20204fa1
+18a21600
+6fe0c4e2
+79207e04
+79207e03
+67e0c4e2
+19620a00
+d9600052
+6fe144dc
+1fe20400
+20204fa1
+18a21600
+6fe0c4e3
+79207e04
+79207e03
+67e0c4e3
+19620a00
+d9600053
+6fe144de
+1fe20400
+20204fa1
+18a21600
+6fe0c4e1
+79207e04
+79207e03
+67e0c4e1
+19620a00
+d9600051
+6fe144da
+1fe20400
+44fb401e
+58000005
+e7e08005
+18e27e00
+e7e08005
+58000006
+e7e10005
+18427e00
+e7e10005
+18007e00
+e7e10005
+18007e00
+e7e10005
+18007e0a
+9a40a400
+60490333
+18e27e00
+67e08332
+18007e50
+a961fe00
+2020cfb7
+1fe0fe01
+20600000
+78547c00
+c3810000
+c4000000
+c4008000
+79207e02
+18c20a00
+18a08bff
+e7e08005
+78347c00
+20600000
+6fe0c4e0
+20404fb8
+24344fc9
+70033150
+6fe144d8
+67e10333
+20204fdd
+6fe0c4e1
+20404fb8
+24344fd0
+70033151
+6fe144da
+67e10333
+20204fdd
+6fe0c4e2
+20404fb8
+24344fd7
+70033152
+6fe144dc
+67e10333
+20204fdd
+6fe0c4e3
+20404fb8
+24740000
+70033153
+6fe144de
+67e10333
+44fbc01e
+20405297
+2040530b
+18002400
+20405316
+18007e04
+e7e08005
+6fe0c4e5
+e7e08005
+58000008
+e7e10005
+6fe10333
+e7e10005
+58000000
+e7e10005
+18007e01
+e7e08005
+18007e02
+e7e08005
+6fe08331
+c028cff5
+58000030
+e7e10005
+20204ff7
+580003e3
+e7e10005
+d840000c
+60490320
+20405314
+6fe10320
+e7e10005
+18007e01
+e7e10005
+70033100
+20204e7c
+18c08c01
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe22200
+44fc401f
+58000050
+9a267c00
+2022d018
+58000051
+9a267c00
+2022d01c
+58000052
+9a267c00
+2022d020
+58000053
+9a267c00
+2022d024
+18c08c02
+efe10006
+98007c00
+20204e7c
+6fe0c4e0
+79207e05
+67e0c4e0
+20204e7c
+6fe0c4e1
+79207e05
+67e0c4e1
+20204e7c
+6fe0c4e2
+79207e05
+67e0c4e2
+20204e7c
+6fe0c4e3
+79207e05
+67e0c4e3
+70095b06
+20207871
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe22200
+efe10006
+1fe21600
+1a220400
+20407cee
+44fcc01f
+58000050
+98467c00
+2022d050
+58000051
+98467c00
+2022d060
+58000052
+98467c00
+2022d044
+58000053
+98467c00
+2022d04a
+204050c0
+20205075
+19620400
+6fe144dc
+98467c00
+2022d056
+204050c0
+20205075
+19620400
+6fe144de
+98467c00
+2022d058
+204050c0
+20205075
+19620400
+6fe144d8
+98467c00
+2022d05c
+204050c0
+20205075
+204050d7
+20205068
+204050dd
+6fe144dc
+203a5068
+20205068
+204050d2
+6fe08339
+243a5068
+20205068
+19620400
+6fe144da
+98467c00
+2022d066
+204050c0
+20205075
+204050cd
+20205068
+20407cf3
+58000007
+e7e08005
+18e27e00
+e7e08005
+58000004
+e7e10005
+1a227e00
+e7e10005
+19627e00
+e7e10005
+18007e08
+20205077
+20407cf3
+20205077
+9a40a400
+20204e7c
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe21600
+efe10006
+1fe20400
+20407cee
+44fd401f
+58000050
+98467c00
+2022d093
+58000051
+98467c00
+2022d099
+58000052
+98467c00
+2022d09f
+58000053
+98467c00
+2022d0a5
+204050c0
+202050ad
+18422200
+19620400
+6fe144d8
+98467c00
+2042d0d2
+202050ab
+18422200
+19620400
+6fe144da
+98467c00
+2042d0cd
+202050ab
+18422200
+19620400
+6fe144dc
+98467c00
+2042d0d7
+202050ab
+18422200
+19620400
+6fe144de
+98467c00
+2042d0dd
+202050ab
+20407cf3
+20204e7c
+20204e7c
+efe08006
+1fe20e00
+efe10006
+1fe22200
+98c08c00
+58000009
+e7e08005
+18e27e00
+e7e08005
+18007e00
+e7e10005
+18007e04
+9a40a400
+1a627e00
+9a262600
+20204e7c
+20204e7c
+20204e7c
+18002400
+20405316
+58000001
+e7e08005
+18e27e00
+e7e08005
+58000002
+e7e10005
+58000000
+e7e10005
+1a40a406
+da600004
+20204e7c
+58000000
+67e1032c
+67e144da
+7044e100
+20600000
+58000000
+67e10326
+67e144d8
+7044e000
+20600000
+58000000
+67e144dc
+7044e200
+6fe0c4e3
+c00050e3
+20600000
+58000000
+67e144de
+7044e300
+6fe0c4e2
+c00050e3
+20600000
+70095b07
+20207871
+6fe08330
+793ffe00
+67e08330
+6fe144de
+207a0000
+2040530b
+6fe144de
+1fe22200
+18002453
+202050f8
+6fe08330
+793ffe07
+67e08330
+6fe144dc
+207a0000
+2040530b
+6fe144dc
+1fe22200
+18002452
+20405297
+20405316
+18007e06
+e7e08005
+6fe0c4e5
+e7e08005
+58000004
+e7e10005
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+18000408
+2020513c
+44fdc01f
+20405297
+20405316
+58000002
+e7e08005
+6fe0c4e5
+e7e08005
+58000004
+e7e10005
+18427e00
+e7e10005
+19627e00
+e7e10005
+d8400008
+2020513c
+44fe401f
+20405297
+20405316
+58000004
+e7e08005
+6fe0c4e5
+e7e08005
+58000008
+e7e10005
+18427e00
+e7e10005
+58000000
+e7e10005
+58000001
+e7e08005
+58000002
+e7e08005
+580003e3
+e7e10005
+d840000c
+2020513c
+44fec01f
+20405297
+20405316
+58000006
+e7e08005
+6fe0c4e5
+1fe0fe01
+18a22200
+67e0c4e5
+1a220a00
+e7e08005
+58000004
+e7e10005
+18427e00
+e7e10005
+19627e00
+e7e10005
+d8400008
+60490320
+18427e00
+203a52e7
+20405314
+6fe10320
+e7e10005
+18007e01
+e7e10005
+20600000
+6fe10326
+203a137a
+20405321
+6fe10326
+e7e10005
+6fe144d8
+e7e10005
+20600000
+6fe10317
+203a4e5a
+44ff401f
+6fe08319
+c000d157
+c0284e44
+c028ce53
+c0294e51
+c029ce51
+20204e5a
+2040530b
+18002400
+20405316
+1fe20a00
+6fe10317
+1fe22600
+6fe10315
+98000c00
+20405165
+1a60a7fc
+2422d15f
+1a420400
+2040513c
+20204e5a
+efe08006
+c0015170
+c000d173
+c001d17d
+c002d1b9
+c00251eb
+c003d270
+c003523e
+c00450ae
+c0054e98
+2020528b
+20407cee
+20407cf3
+20204eaf
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe08006
+1a20a3ff
+2422d179
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+1fe21600
+efe10006
+1fe20400
+efe10006
+1fe67c00
+2022d18f
+c001518b
+c002518b
+2020518d
+70095b16
+20407871
+efe10006
+202051b6
+20407cee
+44ffc01f
+58000050
+98467c00
+2022d19e
+58000051
+98467c00
+2022d1a4
+58000053
+98467c00
+2022d1b0
+58000052
+98467c00
+2022d1aa
+202051b6
+19627e00
+67e144d8
+6fe0c4e0
+79207e01
+67e0c4e0
+202051b5
+19627e00
+67e144da
+6fe0c4e1
+79207e01
+67e0c4e1
+202051b5
+19627e00
+67e144dc
+6fe0c4e2
+79207e01
+67e0c4e2
+202051b5
+19627e00
+67e144de
+6fe0c4e3
+79207e01
+67e0c4e3
+20407cf3
+1a627e00
+9a262600
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe21600
+efe10006
+efe10006
+243a51e5
+20407cee
+19620400
+47004020
+58000050
+98467c00
+2022d1d3
+58000051
+98467c00
+2022d1d7
+58000052
+98467c00
+2022d1db
+58000053
+98467c00
+2022d1df
+6fe0c4e0
+79207e05
+67e0c4e0
+20600000
+6fe0c4e1
+79207e05
+67e0c4e1
+20600000
+6fe0c4e2
+79207e05
+67e0c4e2
+20600000
+6fe0c4e3
+79207e05
+67e0c4e3
+70095b06
+20207871
+20407cf3
+1a20a3fa
+2022d1ea
+18c08c01
+1a20a3ff
+202051e6
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+18c08c02
+1fe20400
+58000005
+e7e08005
+18e27e00
+e7e08005
+1a20a202
+1a227e00
+e7e10005
+20407cee
+4700c020
+58000050
+98467c00
+2022d20a
+58000051
+98467c00
+2022d21b
+58000052
+98467c00
+2022d221
+58000053
+98467c00
+2022d227
+2020522c
+6fe0c4e0
+79207e04
+79207e03
+67e0c4e0
+c2815218
+68488330
+79200406
+60488330
+18e27e00
+1fe0fe01
+67e08332
+6fe0c4e0
+79207e02
+67e0c4e0
+6fe144d8
+67e10333
+2020522c
+6fe0c4e1
+79207e04
+79207e03
+67e0c4e1
+6fe144da
+2020522c
+6fe0c4e2
+79207e04
+79207e03
+67e0c4e2
+6fe144dc
+2020522c
+6fe0c4e3
+79207e04
+79207e03
+67e0c4e3
+6fe144de
+1fe21600
+20407cf3
+19627e00
+e7e10005
+18007e00
+e7e10005
+18007e00
+e7e10005
+18007e0a
+9a40a400
+1a20a3fa
+2022d23d
+efe08006
+e7e08005
+1a40a401
+1a20a3ff
+20205237
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+1a627e00
+9a262600
+efe10006
+1fe22200
+efe10006
+1fe21600
+20407cee
+47014020
+58000050
+1a220400
+98467c00
+2022d257
+58000052
+1a220400
+98467c00
+2022d25c
+58000053
+1a220400
+98467c00
+2022d25e
+20205260
+58000000
+67e10326
+67e144d8
+67e0c4e0
+20205262
+204050d7
+20205262
+204050dd
+20205262
+58000000
+67e1032c
+20407cf3
+58000007
+e7e08005
+18e27e00
+e7e08005
+58000004
+e7e10005
+1a227e00
+e7e10005
+19627e00
+e7e10005
+18007e08
+9a40a400
+20600000
+efe08006
+1fe20e00
+efe10006
+1fe22200
+efe10006
+1fe21600
+efe10006
+1fe20400
+20407cee
+4701c020
+6fe0c4e5
+a8e1fe00
+2420d287
+58000050
+98467c00
+2022d284
+58000051
+98467c00
+2022d287
+20205287
+7044d800
+7044e000
+20205287
+20407cf3
+1a627e00
+9a262600
+20600000
+58000001
+e7e08005
+efe08006
+e7e08005
+58000002
+e7e10005
+58000000
+e7e10005
+58000006
+9a40a400
+18002604
+20600000
+6fe0c4e5
+1fe0fe01
+c080529b
+1fe0fe01
+67e0c4e5
+20600000
+db001800
+dd600080
+20407e54
+202052a5
+6b0143de
+6d6143e0
+20407e56
+202052a5
+47024020
+204052f1
+243a137a
+20405301
+df200008
+6848c4e6
+1f260e08
+a84fffff
+2020d2b2
+204052b9
+242152b2
+204052cf
+202052b6
+1d627e00
+9b00b000
+c20052aa
+2020137a
+1b027e00
+1b020a00
+20600000
+4702c020
+1f260e08
+d8400000
+d9600000
+18e27e00
+c00452ca
+6fe0c4e6
+afefffff
+2020d2ca
+f9201600
+1d627e00
+98408400
+18e08e01
+1a227e00
+98467c00
+2022d2ca
+202152bd
+18427e00
+9a267c00
+24628000
+f9201600
+20600000
+47034020
+204052f1
+243a137a
+204052f7
+203a52d8
+6fe4c4ea
+67e4c4e7
+58000000
+e7e18005
+6160c4f0
+630144f1
+20600000
+4703c020
+204052fa
+18c08c01
+efe10006
+20600000
+47044021
+204052fa
+18c20a00
+18c20400
+58000000
+e7e18005
+20600000
+4704c021
+204052f7
+203a137a
+6fe1c4ed
+67e1c4f0
+6fe1c4ea
+67e1c4ed
+6fe1c4e7
+67e1c4ea
+20600000
+47054021
+6fe1c4e7
+20600000
+4705c021
+6fe1c4ea
+20600000
+47064021
+6fe1c4f0
+20600000
+204052f7
+203a52ff
+d8c044e7
+efe18006
+203a52fd
+18c08dfd
+20600000
+4706c021
+df200004
+d8c044e7
+d8400000
+efe18006
+1fe17eff
+98418400
+c2005305
+6048c4e6
+20600000
+47074021
+da20007f
+2040529d
+67e1031c
+1fe0fe04
+67e1031e
+58000000
+67e10320
+20600000
+6fe1031c
+20205335
+6fe1031e
+20205335
+4707c021
+da2000fa
+2040529d
+67e10322
+1fe0fe04
+67e10324
+58000000
+67e10326
+20600000
+6fe10322
+20205335
+6fe10324
+20205335
+47084022
+20407cc8
+70033501
+204052f1
+247a0000
+da20007f
+2040529d
+67e10328
+1fe0fe04
+67e1032a
+58000000
+67e1032c
+70033500
+20207cd4
+6fe10328
+20205335
+203a137a
+1fe20a00
+20600000
+4708c022
+da400000
+da2044e7
+1a20a3fe
+1a20a202
+580044f3
+9a267c00
+2022d348
+efe08011
+1a20a201
+203a533c
+e8410011
+efe10002
+9a40a400
+1a40a404
+2020533c
+1a427e00
+20600000
+d8e0000c
+202015ba
+d8e0000c
+202015be
+47094022
+20405301
+6fe0c4e6
+207a0000
+20405338
+d8400100
+98467c00
+2021534a
+2040534c
+d8a044f3
+da2044e7
+580044f3
+9a267c00
+20628000
+efe08011
+1a20a201
+243a5362
+e7e10005
+1a20a202
+20205359
+efe10011
+1a20a202
+1fe20c00
+efe10006
+e7e10005
+1fe27200
+1f20f202
+20407d5f
+20205359
+4709c022
+20405301
+6fe0c4e6
+207a0000
+da2044e8
+1a20a3fd
+d8c044f3
+1a20a203
+580044f4
+9a267c00
+20628000
+efe10006
+203a5372
+1fe0fe04
+1fe27200
+18c22400
+efe10011
+1fe20a00
+1a420c00
+18c08dfe
+20407d5f
+20205372
+20758000
+470a4022
+58000000
+67e08049
+67e08056
+67e08079
+67e0807d
+67e0c15d
+67e080bd
+67e08877
+67e1c644
+67e0c647
+70464200
+70030c00
+7003ab00
+70087700
+70087600
+7003a500
+20600000
+470ac022
+2054da24
+2454da28
+204059e1
+247a0000
+6fe0804d
+c4030000
+793ffe06
+793f8001
+67e0804d
+6fe080cf
+6848804d
+2feffe00
+79208401
+6048804d
+18410402
+60488080
+6848804d
+1fe37e00
+67e0807e
+470b4022
+6fe0807e
+c03fd3f6
+c001d462
+c0025473
+c01e53e9
+c002d3e5
+c007d699
+c00854d8
+c011d4f7
+c01cd6b2
+c01c56ad
+c018d4dd
+c01bd579
+c013d575
+c019d572
+c012d577
+c01354f3
+c003d4ec
+c016d4e3
+c01754e4
+c000d56e
+c0015559
+c01456a4
+c004d54f
+c005d516
+c00454f8
+c0065528
+c00fd4ef
+c01054f1
+c010d593
+c0115593
+c01ad594
+c01b5595
+c0125593
+c01a5596
+c00bd59f
+c008d5b9
+c00955c6
+c009d5c8
+c006d5d8
+c00755d8
+c017d573
+c01855d8
+c00555d8
+c00c55d9
+c01955d8
+c01ed5de
+c01f5627
+c01fd620
+c020566a
+c020d67b
+c0035698
+c01d53e7
+c01553e3
+c014d3e4
+70007f19
+70007d04
+20600000
+202054ed
+20600000
+70007d06
+20600000
+70007d3b
+20600000
+6fe200d0
+1fe3fe00
+67e240d9
+6fe080d4
+67e0c0e0
+6fe280d5
+67e2c0ee
+6fe280da
+e7e28005
+6fe08032
+79207e03
+67e08032
+20600000
+470bc022
+6fe080d0
+79207e07
+67e0807e
+c040d41b
+c0415420
+c04ad57a
+c04b5593
+c045d588
+c041d436
+c0425458
+c048540d
+c04bd42f
+c04c5434
+c04cd410
+c04d5413
+c050d40b
+c1420000
+70007d82
+70007f19
+20600000
+70007da2
+20600000
+70007d82
+70007f2e
+20600000
+20405415
+70007d9a
+20600000
+20405415
+20205419
+d8a04768
+6fe180d1
+e7e18005
+20600000
+2020f068
+20600000
+6fe080d2
+79207e07
+67e0839d
+c045d425
+20600000
+6fe080d2
+79207e07
+67e0839d
+c045d429
+20600000
+6fe0c15f
+6848804d
+7d3a0405
+6048804d
+6fe08031
+c4028000
+793ffe05
+67e08031
+70007d31
+20600000
+2434d432
+70007d12
+20205a10
+70007d97
+20600000
+20405a10
+202056ef
+efe08006
+67e083a1
+c000d43b
+c0015440
+20600000
+70007d84
+18c08c01
+efe08006
+c281d452
+20205455
+70007d84
+18c08c01
+efe10006
+c2845445
+2020544e
+6fe0c647
+79207e01
+20405450
+6fe0c647
+c1818000
+6fe0c6b8
+c4008000
+70464502
+20600000
+6fe0c647
+793ffe01
+67e0c647
+20600000
+6fe0c647
+79207e00
+20205450
+6fe0c647
+793ffe00
+20205450
+684880d3
+18410401
+604883a4
+6fe0c1db
+c0a8d45e
+7041db00
+6fe08056
+c18a8000
+70005604
+20205a40
+470c4023
+6fe080d0
+67e0839d
+c019d489
+c0045498
+c007d49f
+c00854a5
+c008d4a6
+c00954ae
+c00c54c7
+c00bd4ca
+c009d480
+c01ed5f3
+c01f5654
+c02055f5
+c020d612
+20600000
+470cc023
+6fe080d0
+67e0839d
+c000d4be
+c019d493
+c005d4af
+c00454b5
+c009d483
+c02054bf
+c020d4c2
+c00c54c5
+c00bd4d6
+20600000
+70095b20
+20407871
+202009df
+70095b19
+20407871
+70464202
+58000050
+d8e00006
+20207d66
+6fe083a5
+79207e00
+67e083a5
+70095b01
+20407871
+70007d8b
+6fe08056
+c082d393
+70005606
+20600000
+70039e0b
+70007d07
+70005600
+2020d393
+20600000
+6fe0c1ca
+247a0000
+20400c60
+204056ed
+20748000
+79200021
+20600000
+24748000
+70007d10
+6fe0804d
+c4010000
+70007d12
+20600000
+202056ef
+2040574b
+6fe08031
+c3820000
+70007d31
+6fe08056
+c1850000
+7000560b
+20600000
+20600000
+6fe0c09a
+1fe67c08
+2042be1d
+70007d07
+70039e13
+20600000
+6fe080d1
+c00354bb
+c18c0000
+70039e18
+70007d07
+20600000
+70039e06
+70007d07
+20600000
+20600000
+70087000
+70007d07
+20205393
+70087000
+70007d07
+20205393
+70095b24
+20207871
+70095b23
+20407871
+20200f16
+70095b22
+20407871
+58000000
+67e10076
+6fe14455
+1fe3fe00
+67e10033
+6fe0c457
+67e08074
+6fe0c459
+67e08075
+20200ef5
+70095b21
+20207871
+684880d0
+18467c06
+2021568e
+60488055
+202054ed
+6fe083a5
+79207e02
+67e083a5
+c3818000
+70007d31
+20205393
+20600000
+6fe0c0d7
+684880d0
+98467c00
+202154ed
+70007d04
+70007f1f
+70007e2e
+20600000
+20205862
+70007d03
+20600000
+70007d21
+20600000
+70007d22
+20600000
+6fe08056
+c1098000
+70005602
+20600000
+20600000
+6fe0c6b6
+243a5501
+204056ea
+7003a801
+70095b0a
+20407871
+20405a18
+2420d6f2
+2434d505
+70007d04
+70007e08
+70007f23
+20600000
+6fe0804c
+79207e02
+67e0804c
+20600000
+6848804d
+7d3a0401
+6048804d
+20600000
+6fe08080
+1fe37e00
+1fe17e01
+20600000
+6fe0c489
+207a0000
+6fe08877
+205a6009
+20600000
+20405511
+2040550d
+67e083a9
+6fe0c645
+c0015523
+204056ea
+70007d0c
+6fe0c1ca
+247a0000
+6fe08031
+c3830000
+70007f06
+202053e1
+70007d0b
+d8a008f0
+d8c000d0
+20407d0c
+2020551d
+6fe0c645
+c0015538
+da200041
+20406b3e
+684a0454
+6fe200d0
+98467c00
+2022d533
+70007d07
+70039e05
+20600000
+20406c3c
+20405541
+6fe0c764
+203a5613
+20600000
+6fe200d0
+684a091c
+98467c00
+2022d53d
+20205530
+20405541
+6fe0c6b8
+c280d613
+20600000
+204009b6
+6fe0804c
+2feffe01
+793ffe01
+67e0804c
+6fe08056
+c00cd54a
+c00c554a
+20600000
+6fe08877
+c1800000
+6fe0804d
+c3810000
+20205ad7
+da2000d0
+da400444
+d8a00424
+20406c08
+da200041
+20405a36
+70007d0b
+6fe08031
+c30356ed
+20600000
+6fe100af
+1fe0f3fd
+684880d0
+58000a01
+98408a00
+d8c000d2
+20407d5f
+68488054
+6fe080d1
+98467e00
+1fe67c0e
+20215569
+1840fe0e
+67e08054
+70007d01
+20600000
+6fe0804d
+79207e03
+67e0804d
+c28256f7
+20600000
+6fe080d0
+67e0807e
+70007d02
+20600000
+202054ed
+70007d30
+20600000
+70007d28
+20600000
+70007d26
+20600000
+20600000
+6fe10033
+98000400
+6fe080d1
+67e08093
+984f8400
+6fe100d2
+1fe3fe00
+67e10094
+6fe200d4
+1fe3fe00
+67e2008f
+18427e00
+67e10096
+20600000
+6848c15f
+6fe080d1
+9842fc00
+2422d408
+2feffe00
+6fe0804d
+7920fe05
+67e0804d
+70007d81
+70007e8b
+20600000
+20600000
+202054ed
+202054ed
+6fe100d0
+67e100c1
+20600000
+6fe100d3
+6848c177
+984ffe00
+d8400640
+98467c00
+20600000
+6fe100d5
+203a568e
+20405599
+2021568e
+6fe0c09a
+1fe67c0a
+2042bb99
+6fe08031
+c280d68e
+6fe100d1
+1fe3fe00
+67e10076
+6fe100d3
+1fe3fe00
+67e10033
+6fe100d5
+67e08074
+98000400
+6fe100d7
+67e08075
+98467c00
+242155b6
+67e08074
+70007d03
+70007e17
+20600000
+6fe0c645
+c00155bf
+204054ed
+204056ea
+20406b41
+20200ee5
+204054ed
+20400ee5
+204074cc
+d8a00063
+d8c00910
+df200010
+20207e68
+204054ed
+20200eef
+6fe200d0
+1fe3fe00
+2034d5d2
+6848c1ca
+243a55cf
+70007e13
+2020568e
+70007d34
+70005600
+202009dd
+204009dd
+79200022
+6fe080bd
+793ffe02
+67e080bd
+202054ed
+20600000
+70007d03
+70007e18
+70095b2e
+20407871
+20200f16
+70087900
+6fe080d0
+67e0c644
+c080d68e
+684880d1
+6048c645
+6fe0c6b6
+203a55e8
+18467c02
+2422d530
+6fe080d2
+c02055ec
+c01855ec
+2020568e
+67e0c646
+20405a21
+2020d5f0
+70087001
+70007d03
+70007e3d
+20205393
+70007d3e
+20600000
+6fe0c76c
+c000d5fc
+c0015600
+20405a21
+20608000
+70087008
+20600000
+204072f2
+70095b35
+20407871
+202055f8
+20405a21
+20608000
+6fe0c76d
+c009d610
+1fe0fe01
+67e0c76d
+70087201
+70087004
+6fe0c76d
+1fe20e00
+6fe34794
+afefffff
+58000080
+7920fe00
+67e0c76e
+20600000
+70087008
+20600000
+20405618
+6fe0c76f
+207a0000
+70476f00
+70095b38
+20207871
+20405a21
+2440f2fc
+2040f30c
+20405a21
+20608000
+7008700c
+70087201
+20600000
+d8a00930
+d8c000d0
+20407d0c
+6fe0c76c
+c1010000
+20207068
+20600000
+6fe0c645
+c000d63d
+c001562b
+2020568e
+6fe08871
+c003d62f
+6fe08870
+c080d68e
+6fe08879
+1fe60a30
+2421568e
+d8a00880
+98a08a00
+6fe400d0
+e7e40005
+6fe400d8
+e7e40005
+6fe08879
+1fe0fe10
+67e08879
+c0a054ed
+2020564e
+6fe08871
+c003d641
+6fe08870
+c080d68e
+6fe08879
+1fe60a20
+2421568e
+d8a00888
+98a08a00
+6fe400d0
+e7e40005
+6fe400d8
+e7e40005
+6fe08879
+1fe0fe10
+67e08879
+c09854ed
+20405a21
+2020d4ed
+70087a01
+70087002
+70087201
+202054ed
+6fe0c645
+c000d658
+c001565c
+20600000
+6fe08878
+c0185660
+70007d3e
+20600000
+6fe08878
+c0205660
+70007d3e
+20600000
+20405a21
+2020d669
+6fe0c76c
+c0015667
+70087201
+70087004
+20205393
+70095b36
+20207871
+20205393
+6fe08871
+c003d66e
+6fe08870
+c083568e
+d8a008f0
+6fe400d0
+e7e40005
+6fe400d8
+e7e40005
+20405a21
+2020d678
+70087007
+70087201
+202054ed
+70087104
+20207068
+2020568e
+6fe08871
+c005d67f
+6fe08870
+c084568e
+d8a00920
+d8c000d0
+20407d0c
+20405a21
+2020d68b
+6fe0c76c
+c000d690
+70476b00
+70087009
+70087201
+70007e41
+20205393
+70087109
+70087301
+20205393
+70007f24
+202053e1
+6fe0c76b
+c283d695
+79207e06
+67e0c76b
+20600000
+c2805686
+70476b00
+2020568e
+20205393
+6fe080bd
+793ffe01
+67e080bd
+204054ed
+24748000
+6fe080d0
+6848804c
+793a0404
+7d3a0405
+6048804c
+20600000
+684c00d0
+6fe08056
+c1818000
+6fe080bd
+c30256ab
+70005614
+20600000
+70005604
+20600000
+6fe080e4
+67e08a5b
+70007d03
+70007e38
+20600000
+70007d03
+70007e39
+18007209
+d8c000d0
+d8a00a52
+efe08006
+1fe2fe55
+e7e08005
+c20056b7
+6fe08a52
+68488a51
+793f8407
+793f8404
+c07fd6cb
+c00056e4
+c002d6d8
+c003d6d7
+c00356d8
+c00456d7
+c000d6d0
+c00156d0
+c001d6d0
+c004d6d0
+c00256d0
+20600000
+6fe08a51
+79207e03
+79207e02
+67e08a51
+20600000
+79200404
+7000e505
+6fe10a59
+98007200
+67e100af
+d8a000cf
+20407dd3
+79200407
+79200402
+18007e00
+67e0800b
+67e109fa
+67e109fc
+67e109f8
+67e109f6
+6fe08a53
+2fe1fe00
+79208406
+60488a51
+20600000
+793f8011
+700a5100
+6fe080e4
+793ffe06
+67e080e4
+20600000
+d8c000d0
+d8a00424
+20207d0c
+70007d09
+20600000
+24748000
+70007d11
+20600000
+da2040a8
+20406b0b
+70007d03
+70007e08
+20600000
+7000730a
+70007d07
+70039e16
+20600000
+470d4023
+78547c00
+204059e6
+6fe08049
+207a0000
+c283d730
+c000d87a
+c00157fb
+c001d73c
+c0025752
+c013d8e6
+c014581f
+c018580b
+c012d8e1
+c013581a
+c018d8ce
+c01bd875
+c019d867
+c0045968
+c004d95e
+c005d973
+c0065980
+c007d86d
+c00859b6
+c008d9ac
+c003d85d
+c0155889
+c005588a
+c00fd8c7
+c0035810
+c010d86a
+c016d8bd
+c01758c2
+c011586a
+c01a588b
+c009d8a0
+c00bd8af
+c00959b3
+c017d8b5
+c00c58ba
+c01ed909
+c01f5911
+c01fd92c
+c0205936
+c020d94b
+c011d95a
+c01dd955
+c002d95b
+c014d95c
+c01c595d
+c01cd880
+2020137a
+20600000
+c040d75f
+c041d824
+c042578e
+c0415768
+c045d831
+c04bd859
+c04cd7ec
+c04d57bb
+c04ad7f1
+c04b57f2
+c051578b
+2020137a
+18007e02
+204059bc
+6fe0804a
+e7e08005
+204059cb
+470dc023
+6fe0804a
+c0045772
+c007d776
+c0085781
+c00bd751
+c019d784
+c020d78a
+c008d74b
+20600000
+6fe08056
+207a0000
+7000561b
+5800000c
+d8e00007
+20207d66
+20200ef5
+18007e03
+204059bc
+6fe0804a
+c005d75a
+e7e08005
+6fe0804b
+e7e08005
+202059cb
+e7e08005
+6fe0804b
+e7e08005
+d84003a9
+20205a07
+18000e04
+204059c4
+5800007f
+e7e08005
+6fe0804a
+793ffe07
+e7e08005
+6fe0804a
+202059cb
+18000e05
+204059c4
+5800007f
+e7e08005
+6fe0804a
+793ffe07
+e7e08005
+6fe0804b
+e7e08005
+202059cb
+20400c60
+20405a18
+20608000
+202056ed
+6fe0804c
+c282d77d
+c4020000
+70007d12
+793ffe04
+20405a10
+2020577f
+70007d10
+793ffe05
+67e0804c
+20600000
+20405a21
+2020d6ef
+20600000
+70007d8b
+6fe083a5
+79207e00
+67e083a5
+70095b01
+20207871
+20600000
+18000e02
+204059c4
+202059d4
+1fe22200
+204057a4
+6fe083a1
+c000d794
+c001579c
+20600000
+1a227e00
+18000e0c
+204059c4
+58000001
+e7e08005
+6fe103a2
+e7e48005
+202059d4
+1a227e00
+18000e0c
+204059c4
+58000002
+e7e08005
+58010002
+e7e48005
+202059d4
+6fe0c764
+203a57a8
+204057ae
+202057b5
+6fe0c0a6
+793ffe03
+67e0c0a6
+58000001
+67e103a2
+20206ecc
+470e4023
+6fe0c0a6
+79207e03
+67e0c0a6
+58000101
+67e103a2
+20600000
+6fe0c6b8
+c280d7b8
+20600000
+58000902
+67e103a2
+20600000
+18000e05
+204059c4
+6fe1c765
+e7e18005
+204059d4
+70476f01
+6fe0c765
+c000d7cc
+c00157c6
+c001d7d2
+20600000
+6fe0c768
+c00057de
+c000d7de
+c00157de
+c001d7d8
+20600000
+6fe0c768
+c00057d8
+c000d7dc
+c00157de
+c001d7d8
+20600000
+6fe0c768
+c00057d8
+c000d7d8
+c00157d8
+c001d7d8
+20600000
+70476c03
+6fe0c643
+c28031f6
+20600000
+70476c01
+20600000
+70476c02
+20600000
+d8e00000
+202057e4
+d8e00000
+202057e8
+6fe0c643
+f9207e00
+67e0c643
+20600000
+6fe0c643
+f93ffe00
+67e0c643
+20600000
+18000e05
+204059c4
+6fe1c765
+e7e18005
+202059d6
+20600000
+18000e09
+204059c4
+6fe08093
+e7e08005
+6fe10094
+e7e10005
+6fe2008f
+e7e20005
+202059d4
+18007e11
+204059bc
+6fe0804a
+1fe20400
+c0005803
+c0075803
+c00e5803
+20600000
+e7e08005
+6fe0c5fc
+e7e08005
+df20000e
+580045fd
+98408c00
+20407d5f
+202059d4
+18007e03
+204059bc
+58000114
+e7e10005
+202059d4
+18007e03
+204059bc
+6fe200b5
+9c467e00
+2034d816
+1fe67e00
+1feb7e00
+793ffe0f
+e7e10005
+202059d4
+18007e06
+204059bc
+6fe2c5f7
+e7e28005
+202059d4
+18007e09
+204059bc
+6fe440a0
+e7e40005
+202059d4
+204057a4
+6fe08049
+18000e0c
+204059c4
+58000001
+e7e08005
+6fe103a2
+e7e10005
+58000000
+e7e18005
+58000000
+e7e20005
+202059d6
+18000e03
+204059c4
+6fe0c15f
+e7e08005
+78547c00
+204059d6
+24740000
+24748000
+6fe0c0df
+c4000000
+2040583d
+20205847
+7040df03
+58000000
+67e24149
+d8a040e1
+2040584b
+d8a040ee
+2040584b
+d8a0414d
+2040584b
+20205852
+d8a040ee
+2040584b
+20405852
+20205855
+58ffffff
+e7e18005
+e7e18005
+e7e18005
+5800007f
+e7e08005
+20600000
+58000000
+67e140dd
+20600000
+6fe0c0df
+79207e02
+67e0c0df
+20600000
+18000e02
+204059c4
+2434d9d4
+202059d6
+18007e02
+204059bc
+6fe0839e
+e7e08005
+204059d6
+6fe0804c
+79207e03
+67e0804c
+70007332
+20600000
+18007e01
+204059bc
+202059d6
+18007e01
+204059bc
+202059d4
+18007e02
+204059bc
+6fe0804d
+2fec0002
+7920fe00
+1fe17e01
+e7e08005
+202059d6
+18007e03
+204059bc
+6fe10052
+e7e10005
+202059d6
+700073fa
+18007e02
+204059bc
+6fe08054
+e7e08005
+202059d6
+18007e0a
+204059bc
+d8c00a52
+18007209
+efe08006
+1fe2fe55
+e7e08005
+c2005884
+202059d6
+202059d6
+202059d6
+20748000
+2040104e
+18007e09
+204059bc
+6fe100c1
+e7e10005
+6fe1c0a8
+e7e18005
+6fe0c0ab
+e7e08005
+6fe140ac
+e7e10005
+c581d89c
+793f8003
+204059d6
+70007d13
+20600000
+204059d4
+70007d03
+70007e13
+20600000
+d8400200
+2034d8a4
+1d027e00
+202058a5
+1c427e00
+1c227e00
+9840fe00
+1fe17ffc
+67e20035
+18007e05
+204059bc
+6fe20035
+1fe37e00
+e7e20005
+202059d6
+18007e0a
+204059bc
+d8c003ac
+efe48006
+e7e48005
+202059d6
+18007e03
+204059bc
+58000114
+e7e10005
+202059d6
+18007e01
+204059bc
+202059d6
+18007e02
+204059bc
+6fe0c0d7
+e7e08005
+202059d6
+18007e02
+204059bc
+58000005
+e7e08005
+202059d6
+18007e02
+204059bc
+58000000
+e7e08005
+202059d6
+70007d2e
+20600000
+6fe0c09a
+1fe67c0a
+2042d8cc
+6fe08031
+79207e04
+67e08031
+1c427e00
+67e203bc
+6fe083a5
+c281d8df
+79207e03
+67e083a5
+70095b05
+20407871
+18007e01
+204059bc
+202059d6
+70004900
+20600000
+18007e06
+204059bc
+6fe2c5f7
+e7e28005
+202059d6
+18007e09
+204059bc
+6fe440a0
+e7e40005
+202059d6
+70087301
+6fe0c6b9
+c1808000
+70087113
+20600000
+20405a14
+70007d99
+70087103
+20600000
+20405a14
+70007d3d
+70087107
+20600000
+da200910
+da400930
+df200010
+20407df1
+2022d901
+70087100
+2040706a
+70007e40
+2020568e
+7008710a
+20407068
+70007e40
+202054ed
+70007d40
+20600000
+70007d3d
+20600000
+70087800
+18007e04
+204059bc
+6fe1c644
+e7e18005
+20405a21
+2020d9d6
+202059d4
+6fe0c645
+c0015915
+c000d91a
+20600000
+18007e11
+204059bc
+6fe08878
+d8c046dc
+2020591e
+18007e11
+204059bc
+6fe08878
+d8c04734
+98c08c00
+efe40006
+e7e40005
+efe40006
+e7e40005
+6fe08878
+1fe0fe10
+67e08878
+20405a21
+2020d9d6
+202059d4
+70087006
+70007d3f
+20600000
+18007e11
+204059bc
+d8c00910
+efe40006
+e7e40005
+efe40006
+e7e40005
+202059d4
+70007d40
+20600000
+20405a21
+2040ef7e
+18007e11
+204059bc
+d8c008e0
+efe40006
+e7e40005
+efe40006
+e7e40005
+20405a21
+2420d9d4
+2020d9d6
+7008710f
+20405a14
+70007d0b
+20405a2c
+2020efcc
+20206fd6
+20405a10
+70007d41
+20600000
+18007e11
+204059bc
+d8c00910
+efe40006
+e7e40005
+efe40006
+e7e40005
+20405a21
+2420d9d4
+2020d9d6
+18007e03
+204059bc
+5800fffe
+e7e10005
+202059d4
+202059d6
+202059d6
+202059d6
+202059d6
+20405a30
+da2040a8
+20405a36
+18007e11
+204059bc
+da200444
+da400424
+20406c08
+2434d9cb
+202059d1
+20405a30
+da200041
+20406b0b
+18007e11
+204059bc
+d8c00424
+20407d0c
+6fe08056
+c00cd9d6
+c00c59d6
+202059d1
+6fe0c645
+c001597e
+6fe08877
+203a597b
+20405a21
+2040da14
+2440da10
+2020597c
+20405a14
+20405a30
+2020596b
+70007d0c
+20205977
+6fe0c645
+c001599a
+da2040a8
+20406b3e
+18007e05
+204059bc
+6fe20454
+e7e20005
+d84003a9
+20405a07
+20406c3c
+20405a21
+2020d991
+7003ab01
+6fe08877
+207a0000
+70007d0b
+6fe0c1ca
+207a0000
+20405a21
+2420d996
+20600000
+c6908000
+793f8021
+70007d0f
+20600000
+204074f4
+20407519
+18007e05
+204059bc
+6fe20918
+e7e20005
+d84003a9
+20405a07
+204059a9
+20405a21
+2020d991
+7003ab01
+6fe08877
+207a0000
+20205991
+6fe40910
+67e446aa
+20600000
+20405a30
+20406b41
+18007e11
+204059bc
+d8c00424
+20407d0c
+202059d1
+18007e01
+204059bc
+202059d1
+18007e02
+204059bc
+18007e10
+e7e08005
+67e08055
+202059d1
+1fe9fe00
+1fe1fe07
+67e0838a
+df200011
+d8a0038c
+20407d26
+d8a0038c
+20600000
+1fe1227f
+7000497f
+18e27e00
+204059bc
+1a227e00
+e7e08005
+20600000
+6fe08049
+1fe3fe00
+6848804d
+284ffe01
+7920fe00
+202059db
+6848804d
+18410401
+202059d7
+18000400
+202059d7
+18000401
+6fe08049
+1fe3fe00
+7934fe00
+9842fe00
+67e0838b
+67e0c5f6
+70004900
+204059ec
+78347c00
+20600000
+6fe0807d
+207a0000
+204059e6
+6fe0807d
+20600000
+470ec023
+6fe08049
+203a59ec
+6fe08079
+247a0000
+202059f6
+6fe08079
+203a59fc
+6fe18079
+67e18049
+6848807c
+6fe0804d
+793ffe01
+9841fe00
+67e0804d
+70007900
+6fe0807d
+207a0000
+6fe2007d
+67e20079
+70007d00
+20600000
+6fe0807d
+207a0000
+6fe1807d
+67e18049
+68488080
+6fe0804d
+793ffe01
+9841fe00
+67e0804d
+70007d00
+20600000
+470f4023
+6fe0804d
+1fe22600
+efe08002
+20405509
+204059cb
+1a627e00
+67e0804d
+20600000
+6848804d
+793f8400
+6048804d
+20600000
+6848804d
+79200400
+6048804d
+20600000
+7d34fe01
+6848804d
+9842fe00
+2feffe01
+20600000
+6fe0804d
+7934fe01
+67e0804d
+20600000
+6fe08876
+2fe0fe01
+20600000
+6fe08876
+79207e07
+67e08876
+20600000
+6fe08876
+793ffe07
+67e08876
+20600000
+6fe08876
+2feffe07
+67e08876
+20600000
+d8a00424
+18007210
+180a7e00
+e7e08005
+c2005a32
+20600000
+20406b0f
+da2041cb
+da400454
+efe40011
+68488031
+7d3a0406
+60488031
+1a220a00
+20406c08
+202009c8
+470fc023
+204059e1
+247a0000
+6fe08056
+207a0000
+c0025a94
+c002da9a
+c0015a8b
+c001daa2
+c0075a8e
+c0035abe
+c003dad6
+c004dad7
+c0055ae0
+c005dae4
+c0065aac
+c006daaf
+c007dab5
+c0095a7e
+c009daa2
+c0085a81
+c00a5a7b
+c00adaa2
+c00b5a75
+c00c5a7a
+c00bda6e
+c00cda74
+c00d5a5f
+c00dda69
+70005600
+20600000
+6fe083a5
+c4010000
+c4018000
+70005600
+20405a65
+202065a5
+6fe080bd
+c4008000
+7000560a
+20600000
+d8e00007
+20407d74
+247a0000
+7000561a
+20600000
+6fe080bd
+793ffe00
+67e080bd
+70005619
+70007d0b
+20600000
+20600000
+6fe083a8
+c1810000
+20405ae6
+70005618
+20600000
+20600000
+70005615
+70007d83
+20600000
+70005613
+70007d25
+20600000
+6fe0c642
+c1000000
+c000da89
+d8e00006
+20407d74
+247a0000
+70464200
+20205aa3
+20748000
+20205abe
+70005603
+70007d27
+20600000
+70007d13
+79200003
+70005605
+580001ff
+67e103a6
+20600000
+70005605
+580000ff
+67e103a6
+793f8022
+70007d33
+20205390
+c6110000
+6fe103a6
+1fe0ffff
+2022daa0
+67e103a6
+20600000
+7000560e
+20600000
+20600000
+6fe083a5
+c4018000
+c4010000
+6fe080bd
+793ffe02
+67e080bd
+70007d13
+70005610
+20600000
+7000560d
+70007d31
+20600000
+6fe083a5
+c4010000
+70005600
+20600000
+70005606
+20600000
+6fe103a6
+1fe0ffff
+203a5aba
+67e103a6
+20600000
+70007d07
+70039e16
+70005600
+20600000
+6fe080bd
+c2815aa3
+c2805ac3
+7000561a
+20600000
+6fe0c1ca
+203a5acf
+6fe083a5
+c4018000
+c4010000
+6fe203bc
+d8400064
+98408400
+1c427e00
+98467c00
+24610000
+20205a6e
+70005616
+70479304
+58003030
+67e14794
+e7e10005
+7003a802
+20205a75
+20600000
+6fe080bd
+c280dadb
+7000561a
+20600000
+6fe080bd
+793ffe01
+67e080bd
+70007d0f
+20600000
+6fe083ab
+207a0000
+70005600
+20205adb
+7000560c
+20600000
+6fe0804c
+c2815aeb
+20405a14
+70007d08
+20204d86
+6fe0804c
+793ffe02
+67e0804c
+204056f2
+20405a1d
+20204d86
+58000004
+67e0c793
+58003030
+e7e10005
+e7e10005
+20600000
+47104024
+1fe17eff
+d8a08070
+98a08a00
+18a22200
+d840003e
+e0408005
+20405b04
+2000001e
+1a220a00
+d840003f
+e0408005
+20205b08
+6ff08085
+1fe17efb
+67f08085
+20600000
+6ff08085
+1fe1fe04
+67f08085
+20600000
+20205cbf
+20205cc6
+6ff08085
+1fe17efd
+67f08085
+20600000
+24345b16
+6ff08085
+1fe1fe02
+67f08085
+18427c00
+2022db19
+1a627a00
+2fcc0000
+20205be7
+18000404
+da2002eb
+20405b0e
+20405b16
+da2055aa
+6fe102eb
+e8410006
+9a267c00
+20600000
+d8400002
+da2002f1
+20405b16
+6fe102f1
+67e102e4
+20545b2b
+20600000
+d8400010
+da2002f3
+20405b0e
+20405b16
+d8c002f3
+df200010
+20406db2
+20406d62
+20406dcb
+20206d5c
+7856fc00
+20405b1b
+24628000
+7836fc00
+70802380
+70802200
+70802400
+da208025
+20405b12
+70802300
+d8400006
+20405b1c
+24628000
+efe10006
+98002200
+20405b16
+20205b3f
+6fe08a04
+d8c00a01
+98c08c00
+70802380
+70802200
+70802400
+da208025
+ef208006
+1f267c00
+2442db58
+70802300
+efe08006
+207a0000
+1fe27200
+ea410006
+1a420a00
+20407d61
+20205b51
+efe08006
+e7e08011
+c2005b58
+20600000
+20407e02
+58001000
+67e102e4
+da605de2
+df200002
+20405b1b
+24628000
+6fe102e4
+1ff0fe00
+9840fe00
+1ff0fe00
+67e102e4
+c2005b61
+20205b3f
+20407e02
+70805025
+58000000
+da200a01
+d8400040
+20405e63
+20405bb8
+20405c12
+78547c00
+6fe08a01
+c301db7c
+70800608
+7920002b
+18007004
+20406dcc
+18007004
+6de20a3d
+78347c00
+6fe20a01
+203a5b81
+67e1c4cc
+20405c49
+20405b46
+7041e300
+6fe08a01
+c2815b9c
+20405be0
+20405b94
+20405dbf
+20405bda
+2436db8c
+6fe082e1
+c3005b82
+20205baa
+20405dbc
+6fe08a01
+c2815b9c
+20405bda
+2436db9c
+6fe082e1
+c3005b82
+20205baa
+6fe0c4c3
+6848c4c2
+98467c00
+2422dda5
+7044c102
+7044c201
+7044c300
+20205da5
+7041e300
+20405be0
+6fe08a01
+c280dbaa
+20405d10
+200000c8
+20405d1e
+20000064
+da605d52
+20405b24
+20405b35
+2436dbaa
+6fe082e1
+c3005b9d
+6fe08a01
+c3005bae
+20405bae
+20204cba
+58000000
+67e20a3d
+18007004
+20406dcc
+70805021
+20600000
+1ff18400
+1fe17e0f
+9842fe00
+20600000
+6fe20a01
+207a0000
+6fe08a01
+20405bb4
+c087dbe6
+6fe08a02
+20405bb4
+c087dbe6
+6fe08a01
+e8408006
+9840fe00
+e8408006
+9840fe00
+e8408006
+9840a200
+dfe00a01
+98408c00
+1a227e00
+ef208006
+9f20fe00
+20407e62
+20405bd3
+e8408006
+1fe17eff
+98467c00
+2422dbe6
+20600000
+ef208006
+1f267c00
+20628000
+9f20fe00
+1f20f202
+20407e62
+20205bd3
+58000000
+67e102e4
+da605de2
+20405d8e
+20405b24
+20205b35
+6fe0c1e3
+1fe0fe01
+1fe67c03
+24215be6
+67e0c1e3
+20600000
+20205c94
+6fe082e1
+1fe3fe00
+7920fe00
+2a2c000f
+20608000
+67e082e1
+20600000
+6ff08085
+c4008000
+20205bf4
+6ff0812c
+afefffff
+20608000
+6ff08108
+c300dbf1
+20406d5c
+20205bf1
+1f220400
+604941a8
+70802380
+70802200
+70802400
+67e141a6
+98000a00
+1f2bf200
+6ff08025
+e7e08005
+c2005c00
+70802300
+20600000
+6fe141a6
+207a0000
+70802380
+70802200
+70802400
+684941a8
+184bf200
+98000c00
+efe08006
+67f08025
+c2005c0d
+70802300
+20600000
+6fe08a2c
+c28315a9
+202015a2
+6fe08a2c
+1fe17e0f
+207a0000
+67e0c09a
+6fe08a2d
+67e0c17b
+6fe08a2e
+67e0c17d
+20600000
+6fe08a2c
+1fe17e30
+1ff1fe00
+207a0000
+67e0c4d0
+20600000
+6fe08a32
+1fe17e0f
+207a0000
+67e0c4d1
+20600000
+6fe08a32
+1fe17e30
+1ff1fe00
+207a0000
+67e0c4d2
+20600000
+6fe08a33
+207a0000
+67e0c4d3
+20600000
+6fe08a32
+c283dc3c
+7041eb88
+7041ec66
+7041ed44
+6fe10a2f
+207a0000
+67e141ec
+20600000
+7041eaff
+6fe08a32
+1fe17e40
+1fe97e00
+67e0c1ee
+20600000
+70800273
+37d98200
+37d98200
+6ff10120
+793ffe0d
+67f1004c
+20205caf
+6fe08a02
+1fe17e0f
+c0055c57
+c000dc57
+c0025c5a
+c002dc5f
+c0045c61
+c004dc66
+c005dc6b
+c0065c57
+c006dc6e
+c0075c73
+c007dc78
+20600000
+20405c42
+20405c7d
+20205c9e
+20405c42
+dfe03764
+d8404c03
+20405c83
+20205c9e
+20405c42
+20205c9e
+20405c42
+dfe03247
+d8403bbd
+20405c83
+20205c9e
+20405c42
+dfe03247
+d8404a8e
+20405c83
+20205c9e
+20405c42
+20405c86
+20205c9e
+20405c42
+dfe03247
+d84049a2
+20405c83
+20205c9e
+20405c42
+dfe03620
+d8404c03
+20405c83
+20205c9e
+20405c42
+dfe033e2
+d8404c03
+20405c83
+20205c9e
+dfe0272e
+d84030d7
+20205c83
+20405c42
+dfe03764
+d8403bbd
+67f10013
+60590015
+20600000
+dfe03247
+d8404c03
+20205c83
+dfe05394
+d8405aeb
+20205c8e
+dfe01cd1
+d84021cf
+67f10017
+60590019
+20600000
+dfe021d5
+d840272c
+20205c8e
+20405c89
+dfe01cd1
+d84021cf
+20205c83
+6fe08a03
+1fe17ec0
+c0605c94
+c2835c8c
+c283dc89
+20600000
+20405c98
+6fe08a03
+1fe1221f
+6fe08a01
+1fe17e0f
+68488a02
+1841040f
+18520400
+9841fe00
+1a2d2200
+9a21fe00
+79207e0d
+79207e0e
+67f2004c
+20405caf
+70801108
+20600000
+58000002
+37d98200
+67f08012
+37d98200
+37d98200
+20600000
+4710c024
+6fe0c484
+67f08086
+6fe0c485
+67f08087
+580002e2
+67f1008a
+580002e7
+67f1008c
+20205b04
+79207e07
+67e102e2
+47114024
+70808802
+70808e00
+70800602
+20205ccf
+18000401
+67e082e2
+4711c024
+70808801
+6059008e
+70800602
+20405ccf
+6fe082e7
+20600000
+6fe140dd
+1fe0fe01
+67e140dd
+6ff0812c
+c301dccf
+20600000
+78547c00
+1fe22400
+6fe0c4ac
+c1800000
+78347c00
+1a427e00
+20205ce3
+6fe0c4ac
+c000dce3
+c0015ce9
+c001dcf1
+c0025cf5
+c002dcfb
+20600000
+67e1c4a5
+1a227e00
+67e144a8
+604944aa
+7044ac02
+20205d10
+20405d10
+7044ac03
+20405d15
+da2002e2
+70808804
+6fe1c4a5
+d8400020
+20205d26
+20405d10
+20405d49
+7044ac04
+20600000
+20405d10
+7044ac05
+20405d15
+20405d08
+20405d22
+20205d03
+20405d10
+20405d15
+58000005
+20405cc6
+c3800000
+7044ac00
+6fe14473
+20207e05
+6fe20964
+684944a8
+184085fc
+e7e20002
+20600000
+684944a8
+18422200
+184085fc
+efe20002
+67e20964
+684944aa
+6fe1c4a5
+20600000
+20405d74
+20405b04
+58000000
+67e202e2
+20600000
+7002e206
+58000000
+67f1008e
+58000001
+67f10088
+580002e2
+67f1008a
+70800602
+20205ccf
+7002e2ab
+20205d16
+7002e2b9
+20205d16
+18408404
+60590088
+d8400002
+1a20a3fc
+e0408011
+1ff10400
+e0408005
+1fec8400
+e0408005
+e7e08005
+1a227e00
+67f1008a
+58000000
+67f1008e
+70800602
+20405ccf
+20205d49
+6059008e
+1ff10400
+604882e3
+1fec8400
+604882e4
+67e082e5
+58000004
+67f10088
+7002e203
+580002e2
+67f1008a
+1a227e00
+67f1008c
+6ff08086
+2a2c000f
+7920fe06
+67f08086
+70800602
+6ff0812c
+c283dd45
+d8e00003
+20205ccf
+580007d0
+2040137d
+20405d15
+580002e7
+67f1008c
+58000005
+20405cc6
+c2805d49
+20600000
+6059008e
+58000004
+67f10088
+7002e203
+580002e2
+67f1008a
+1a227e00
+67f1008c
+6ff08086
+2a2c000f
+7920fe06
+67f08086
+70800602
+6ff0812c
+c283dd5f
+d8e00003
+20405bee
+20405ccf
+2feffe02
+20405be7
+6fe082e3
+1ff02400
+6fe082e4
+1fed7e00
+9a41a400
+6fe082e5
+9a41fe00
+9840fe00
+67e082e5
+1fecfe00
+67e082e4
+1fecfe00
+67e082e3
+20600000
+6fe0c4b5
+6848c4b7
+98467c00
+2422dd79
+20405d85
+6fe0c4b5
+d8400020
+20406093
+6fe0c4b8
+d8400021
+20406093
+6fe0c4b6
+d8400022
+20406093
+6fe0c4b7
+d840001f
+20206093
+7044b50e
+7044b60d
+7044b710
+7044b80f
+7044b911
+7044ba12
+20600000
+70801001
+20600000
+70809105
+70809207
+70809307
+70809407
+70809507
+70809605
+70809700
+20600000
+7080910c
+7080920d
+7080930d
+7080940d
+7080950d
+7080960c
+70809700
+20600000
+20405dd3
+6fe0c4c2
+d840006c
+20406093
+6fe0c4c3
+d840006d
+20206093
+20405dda
+20205d9f
+6ff0812c
+c302dda7
+20600000
+67e082e6
+580002e6
+67f1009a
+58000001
+67f10098
+6059009e
+6231009c
+70809001
+70800604
+20205da7
+58000000
+67f1009e
+67f1009c
+60590098
+6231009a
+70809001
+70800604
+20205da7
+79200028
+70448308
+20600000
+793f8028
+70448320
+20600000
+6fe0c479
+9a40fe00
+67e082e4
+20205dc9
+6fe102e4
+1ff0fe00
+67e082e4
+58000003
+67f10098
+7002e3a0
+7002e5a1
+20205de8
+60490964
+20405dd3
+68490964
+20405e02
+20205dda
+6fe0c4c1
+c17f8000
+c3035dd8
+580249f0
+2040137d
+6848c4c1
+20206069
+6848c4c1
+20206065
+47124024
+c5145dc2
+6fe14479
+9a40fe00
+1ff0fe00
+67e102e4
+4712c024
+c5145dc6
+58000004
+67f10098
+7002e3a0
+7002e6a1
+580002e3
+67f1009a
+6059009e
+6231009c
+58000002
+2a2c000f
+7920fe00
+67f08090
+70800604
+d8e00005
+20405bee
+20405da7
+2feffe04
+20405be7
+c5145dfd
+6fe102e4
+1ff0fe00
+9840fe00
+1ff0fe00
+67e102e4
+20600000
+6fe082e4
+9840fe00
+1ff0fe00
+67e102e4
+20600000
+6fe14479
+9a40fe00
+67e1095c
+47134024
+60490964
+6221097b
+20405e17
+68490974
+6a21097b
+6fe1095c
+20405e38
+6fe10974
+6849097b
+98408400
+6049097b
+6849095c
+98408400
+6049095c
+6fe10964
+243a5e08
+20600000
+4713c024
+6fe0c483
+1fe0ffff
+6849095c
+9841fe00
+1fe0fe01
+67e18978
+6fe10964
+9840fe00
+68498978
+98467e00
+24215e29
+67e10964
+6fe18978
+6849095c
+98467e00
+67e10974
+20600000
+6fe10964
+67e10974
+58000000
+67e10964
+20600000
+1a427e00
+18408402
+60590098
+1a20a3fe
+e8418011
+18422400
+d84000a0
+e0408011
+e7e08005
+20205e45
+1fe22400
+47144025
+c5145e2e
+1a427e00
+18408403
+60590098
+1a20a3fd
+e8418011
+18422400
+d84000a0
+e0408011
+1ff0fe00
+e7e10005
+6231009a
+58000000
+67f1009e
+70809001
+70800604
+20405da7
+e2418011
+4714c025
+7002e600
+58000001
+67f10098
+7002e3a0
+580002e3
+67f1009a
+58000000
+67f1009e
+67f1009c
+58000003
+67f08090
+70800604
+20405da7
+6ff0812c
+c4030000
+200005dc
+6fe082e6
+1fe0fe01
+67e082e6
+1fe67c28
+24610000
+20205e4e
+18427200
+1fe20400
+47154025
+18498400
+20405e96
+70804780
+70804786
+60590045
+18408408
+70804787
+6ff08007
+e7e08011
+1a20a201
+c2005e69
+70804786
+70804780
+70804700
+20205e9e
+20405e8e
+70804780
+18498400
+1a220c00
+efe08006
+da400008
+1fe17c01
+2442deaa
+1fe37e00
+18408401
+1a40a5ff
+2422de7b
+c2005e79
+70804780
+70804700
+20205e9e
+6ff08a0a
+79207e01
+67f08a0a
+200000c8
+6ff08a0b
+79207e00
+67f08a0b
+200007d0
+20600000
+20405e85
+6ff08a0b
+793ffe05
+79207e04
+79207e03
+67f08a0b
+200001f4
+20600000
+20405e85
+6ff08a0b
+79207e05
+79207e04
+793ffe03
+67f08a0b
+200001f4
+20600000
+4715c025
+6ff08a0b
+793ffe05
+793ffe04
+793ffe03
+793ffe00
+67f08a0b
+200000c8
+6ff08a0a
+793ffe01
+67f08a0a
+20600000
+70804780
+2000000a
+60590045
+70804781
+2000006e
+20600000
+20407e54
+20205eb4
+20407e56
+20205eb4
+1ff10400
+20545ee7
+24545eeb
+1fef7e00
+1ff10400
+20545edf
+24545ee3
+24345ec0
+6ff10050
+793ffe0f
+67f10050
+20600000
+6ff10050
+793ffe0e
+67f10050
+20600000
+67f10052
+20600000
+67f10062
+20600000
+20405ecc
+20205ec4
+20405ecc
+20205ec6
+20405ed1
+9846fc00
+20407def
+1807fe00
+20600000
+6ff08043
+c3005ed5
+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
+20405ef7
+6ff10112
+98608600
+20205f03
+20405efb
+6ff10158
+98608600
+20205f05
+20405f17
+20205eef
+20405f17
+20205ef3
+20405eff
+20205f1b
+20405f01
+20205f1b
+60610983
+61410981
+6201097f
+20600000
+68610983
+69410981
+6a01097f
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20415f2d
+20628000
+20215f21
+1f20f208
+1f20f3fc
+20415f30
+20628000
+20215f26
+1f20f204
+20205f33
+20405f2d
+efe40006
+e7e40003
+20600000
+efe20006
+e7e20003
+20600000
+1f227e00
+207a0000
+efe08006
+e7e08003
+c2005f35
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20415f47
+20628000
+20215f3b
+1f20f208
+1f20f3fc
+20415f4a
+20628000
+20215f40
+1f20f204
+20205f4d
+20405f47
+efe40003
+e7e40005
+20600000
+efe20003
+e7e20005
+20600000
+1f227e00
+207a0000
+efe08003
+e7e08005
+c2005f4f
+20600000
+70095b3d
+20207871
+47164025
+6fe0c489
+207a0000
+20405ffa
+2042e000
+20407e5a
+20405f89
+6fe0c489
+1fe22600
+68494487
+604900ef
+1a627e00
+203a5f53
+1a60a7ff
+18422200
+efe08011
+684880e7
+98467c00
+2042df70
+20215f6c
+efe08011
+1fe0fe01
+e7e08011
+684900ef
+18408422
+604900ef
+20205f60
+58000000
+e7e08011
+6fe080e8
+e7e08005
+c099df7e
+da4041cb
+efe30006
+e7e40005
+58000000
+e7e40005
+1a420c00
+20407d0c
+18007c01
+20600000
+c01b5f82
+c01bdf86
+da404316
+20205f76
+d8c043ac
+20407d0c
+d8c04316
+20205f7b
+d8c043a4
+20407d0c
+20205f84
+20407e56
+6fe0c489
+207a0000
+4716c025
+6fe1478c
+c2805fac
+c4048000
+6fe0c36a
+c0005fa5
+6fe0829c
+2fe180c0
+2020df98
+2fe18040
+2020dfaa
+20205f9f
+20365f9c
+6fe0c34e
+c300dfa5
+20205f9f
+20405fa5
+20740000
+20205f9f
+6fe0c39d
+c283dfa2
+20205fa8
+6fe30297
+67e443a4
+20205fa8
+7000e835
+6fe30297
+20205fae
+7000e837
+20205fae
+7000e836
+20205fae
+7000e833
+6fe30041
+67e300e9
+6fe14487
+e840803f
+1fe0fe01
+67e100ef
+604880e7
+6fe0c489
+1fe22600
+6fe100ef
+1fe22200
+20405fc6
+20740000
+684900ef
+18408422
+604900ef
+184085ff
+efe08002
+67e080e7
+1a60a7ff
+2422dfb6
+6fe0c489
+1fe0ffff
+67e080e7
+20600000
+6fe080e8
+c099dfcd
+da4000e8
+df200007
+20407df1
+2022fe54
+20600000
+c01b5fd0
+c01bdfeb
+20205fc8
+e8408011
+98467c00
+24628000
+d8a0098e
+df200010
+20407d26
+6fe1829a
+67e1898e
+20405fe2
+6fe109ab
+1ff0fe00
+1fed0400
+efe08006
+9840fe00
+68498297
+98467c00
+2022fe54
+20600000
+d8c0098e
+20406dc0
+efe08011
+20406dc1
+18006c38
+18006c00
+20406d57
+d8a0099e
+20206dd1
+e8408011
+98467c00
+24628000
+18c22200
+18c0a608
+da4043a4
+df200008
+20407df1
+2022fe54
+1a622200
+da4043ac
+df200008
+20407df1
+2022fe54
+20600000
+6fe14487
+e840803f
+1fe0fe22
+efe0803f
+98467c00
+20600000
+6fe0c489
+1fe27200
+68494487
+58000000
+e7e08002
+18408422
+1fe0fe01
+c2006004
+20600000
+47174025
+20407e58
+20405f89
+6fe08031
+79347e06
+67e08031
+24346014
+1a208c0a
+d8a041cb
+20407d0c
+2020602c
+7041ca00
+20600000
+6fe4c3a2
+203a6023
+20407e58
+20405f89
+24346023
+6fe100ef
+1fe08c01
+d8a043ac
+20407d0c
+d8a04316
+20407d0c
+70432601
+20600000
+70432600
+20600000
+7000e834
+20206028
+7000e833
+6fe0c09a
+c0055f55
+c0044586
+20600000
+6fe441cb
+684c41d3
+9841fe00
+207a0000
+7041ca01
+20600000
+4717c025
+79200407
+20406059
+7d208407
+47184026
+18467cff
+20628000
+284c0007
+18410e1f
+6fe2009f
+f920fe00
+67e2009f
+6fe200a3
+fd20fe00
+67e200a3
+20600000
+4718c026
+18467cff
+20628000
+284c0007
+18410e1f
+6fe2009f
+f93ffe00
+67e2009f
+6fe200a3
+f93ffe00
+67e200a3
+20600000
+20406042
+20206053
+18467cff
+20628000
+2455e036
+2040608b
+58000000
+284ffe07
+7d20fe06
+7920fe07
+2020607d
+d8a0811c
+18410e07
+18497e00
+1fe17e03
+98a08a00
+efe08005
+284ffe07
+2020e063
+afec0000
+20600000
+afefffff
+20600000
+18467cff
+20628000
+2fcffe07
+2020606c
+18467cff
+20628000
+2fcc0007
+58000000
+7d20fe07
+98428400
+2040608b
+5800003f
+284ffe07
+7920fe00
+2020607d
+2040608b
+efe08005
+c2806079
+284c0007
+20600000
+284c0007
+20600000
+2040608b
+580000c0
+e7e08005
+20600000
+2040608b
+58000000
+2020607d
+d8c08070
+df200013
+efe08006
+243a6089
+58000080
+18c08bff
+e7e08005
+c2006084
+20600000
+18417e3f
+d8a08070
+98a08a00
+20600000
+1fe104ff
+1fecfe00
+20206093
+c4038000
+1fe17e3f
+d8a08070
+98a08a00
+e0408005
+20600000
+1841043f
+58008070
+98408c00
+efe08006
+20600000
+47194026
+20600000
+df200014
+d8c08070
+18c20a00
+efe08006
+c00160b3
+c001e0b3
+c00260b3
+c002e0b3
+c00360b3
+c003e0b3
+c00fe0b3
+c01060b3
+c010e0b3
+c01160b3
+c011e0b3
+c01660b3
+c016e0b3
+c00060b3
+c20060a1
+20600000
+58000040
+e7e08005
+202060b1
+58000080
+e7e08005
+202060b1
+4719c026
+da20099e
+d840000c
+58000030
+20405e63
+20406102
+204060d5
+6fe409a1
+203a60cc
+d8c009a1
+d8a04490
+df200003
+efe18006
+1ff20400
+e0410005
+1fec8400
+e0410005
+c20060c5
+20600000
+5800469a
+67e14490
+5800ab77
+67e14496
+580073d0
+67e1449a
+58009658
+67e14494
+20600000
+6fe0899e
+247a0000
+70448f0c
+20600000
+da60449c
+da406102
+2020318a
+c69a0000
+1c417eff
+6848c49d
+20407cf8
+6fe0c48f
+9a267c00
+20610000
+6ff10150
+67e144a2
+793f8034
+70449c32
+6ff08053
+793ffe07
+67f08053
+708a9700
+20600000
+c3008a75
+1a208c01
+efe08006
+c28060f6
+1a208c02
+efe10006
+d840ffff
+98467c00
+2022fe52
+20200a75
+efe08011
+c301fe52
+c282fe52
+c2837e52
+c283fe52
+1a208c1a
+efe10006
+1fe67c07
+20217e52
+20200a75
+70449c01
+20600000
+471a4026
+da6060ec
+20400a70
+2022e100
+708a11aa
+708a0a0c
+6ff08a09
+79207e07
+67f08a09
+708a0b04
+2000003c
+708a1600
+708a1706
+2040611a
+67f08a97
+7080dc03
+2000003c
+6ff08053
+79207e07
+67f08053
+79200034
+1c427e00
+67e0c49d
+20600000
+6fe0c4a0
+c0006121
+c000e123
+6fe0c4a1
+1fe9fe00
+1fe1fe07
+20600000
+58000057
+20600000
+5800004f
+20600000
+471ac026
+6fe0c4a0
+c000612b
+c000e131
+c0016137
+20600000
+58000064
+67e1449e
+6849449a
+6fe14494
+da60012c
+2020613c
+580000c8
+67e1449e
+68494498
+6fe14492
+da6001f4
+2020613c
+580000c8
+67e1449e
+68494490
+6fe14496
+da60012c
+98462200
+6fe144a2
+98467e00
+24216149
+6849449e
+984fa400
+1a627e00
+9a2ffe00
+9a467e00
+9a26fc00
+20407def
+1807fe00
+20600000
+18427e00
+684944a2
+98467e00
+6849449e
+984fa400
+1a627e00
+9a2ffe00
+9a40fe00
+20206145
+efe40011
+67e4095c
+6fe1095c
+6849095e
+98462200
+6fe10962
+98462400
+68490960
+98467c00
+24416162
+1a4ffe64
+9a26fc00
+20407def
+1807fe00
+205a616a
+20600000
+6fe0c4a4
+79207e00
+67e0c4a4
+20600000
+6fe0c4a4
+793ffe00
+67e0c4a4
+20600000
+6848c4a4
+79200401
+6048c4a4
+20600000
+6848c4a4
+793f8401
+6048c4a4
+20600000
+6fe144c6
+efe0803f
+207a0000
+1fe27200
+6fe144c6
+1fe0fe03
+1fe22200
+e8408011
+20406050
+1a20a201
+c2006179
+20600000
+6fe144c6
+1fe0fe03
+1fe22200
+18002400
+58000000
+67e109de
+e8408011
+20406059
+471b4026
+6fe109de
+1a420e00
+f920fe00
+67e109de
+1a20a201
+1a40a401
+6fe144c6
+efe0803f
+9a42fc00
+2422e184
+6fe109de
+684944c8
+9842fc00
+20628000
+78347c00
+20600000
+6fe144c6
+efe0803f
+207a0000
+1fe27200
+6fe144c6
+1fe0fe03
+1fe22200
+e8408011
+20406032
+1a20a201
+c200619e
+20600000
+d8e00009
+20407d74
+247a0000
+58000020
+d8e00009
+20407d66
+78547c00
+20406197
+471bc026
+6fe144c6
+efe0803f
+207a0000
+2040617e
+243477ea
+204077e8
+78547c00
+6fe109de
+67e109e5
+7009e700
+18000e00
+6fe144c8
+1fe30400
+604944c8
+1fe17e01
+684909e5
+18412201
+18430400
+604909e5
+9a22fc00
+2442e1cc
+6fe144c6
+efe0803f
+684889e7
+18408401
+604889e7
+18420e00
+98e2fc00
+2422e1b7
+6fe109de
+67e144c8
+20600000
+471c4027
+6fe144c6
+1fe0fe01
+efe1003f
+20207e05
+6ff08042
+9a21fe00
+67f08042
+6ff10050
+793ffe0d
+67f10050
+20000064
+20600000
+6ff08042
+c28361de
+c283e1e0
+58b71b00
+20600000
+596e3600
+20600000
+580080e8
+20600000
+6fe0895d
+c28261e6
+c30261ed
+20600000
+78347c00
+1fe10e0f
+204061f4
+1807a400
+18427e00
+9a462200
+20600000
+78547c00
+1fe10e0f
+204061f4
+1807a200
+18427e00
+9a262400
+20600000
+6ff080d8
+f9347e00
+67f080d8
+20600000
+6849895e
+204061d9
+9846fc00
+20407def
+18078400
+6fe08961
+984ffe00
+1fe6fc64
+20407def
+204061e2
+6fe0895d
+2040620a
+6fe0895c
+6848895d
+1841040f
+184d0400
+9841fe00
+20206213
+1fe17e0f
+d8a080a0
+1feffe04
+98a08a00
+1a227e00
+e7e10005
+1a427e00
+e7e10005
+20600000
+78347c00
+20406228
+20206218
+78547c00
+20406223
+18427e00
+1fed7e00
+18e08410
+9841fe00
+2040608f
+6ff08084
+70808400
+200004b0
+f9347e00
+67f08084
+20600000
+1fe20400
+1fecfe00
+1fe20e00
+20600000
+78547c00
+20406223
+6ff080dd
+fd347e00
+67f080dd
+20206218
+d8402710
+984ffe00
+d841312d
+9846fc00
+20407def
+18078400
+58000800
+98467e00
+1fe20400
+1841040f
+6058800b
+1fe20400
+18518400
+60588004
+20600000
+78347c00
+2020623f
+78547c00
+6ff08043
+79347e03
+67f08043
+20600000
+d8400031
+67f200ca
+67f100ce
+605880d0
+20600000
+6ff10130
+20600000
+687100ce
+695100ca
+6a1100cc
+20600000
+607100ce
+20600000
+20407e54
+dd600000
+20406248
+c0016292
+1fe67c04
+20610000
+2040624a
+e8410003
+5800a654
+2040629b
+24216280
+1b020400
+58017f8e
+2040629b
+24216280
+1b020400
+58002328
+2040629b
+20216277
+e8410003
+58001194
+2040629b
+20216277
+20406248
+1fe67c85
+20610000
+df200020
+e8410003
+58000230
+2040629b
+20216277
+e8410003
+5800069a
+2040629b
+2421627c
+1b020400
+58000230
+2040629b
+2421627d
+1b020400
+5800ffff
+98467c00
+2022e297
+2020624e
+79205620
+1d635600
+c200626b
+2020628b
+20406248
+1fe67c07
+20610000
+e8410003
+58002328
+2040629b
+20216277
+e8410003
+580008ca
+2040629b
+20216277
+e8410003
+58000230
+2040629b
+20216277
+2040624e
+1a627e00
+20207e05
+2040624a
+e8410003
+5800ffff
+98467c00
+24628000
+2040624e
+20407e56
+1a627e00
+20207e05
+da40000a
+18423000
+9a4fa400
+18438400
+98462200
+244162a4
+1a2ffe64
+9a467c00
+20600000
+1a262200
+20600000
+7041f018
+70804201
+58001d4b
+67f10040
+df20000b
+da200155
+efe10011
+1fe3fe00
+e7e10011
+1a20a202
+c20062ac
+20600000
+1b63b600
+20600000
+70804204
+7041f00c
+58000ea5
+67f10040
+20600000
+70804205
+202062b5
+20758000
+70465200
+7003c003
+7003c103
+7003c511
+7003c613
+58000000
+67e183c2
+67e0c4e4
+70478b00
+58000000
+67e0c4e4
+67e0c64f
+67e0c648
+6fe0c656
+c000e2cd
+70465450
+20600000
+70465400
+20600000
+18418402
+20600000
+18427e00
+1fedfe00
+67e0c64d
+18007e3f
+1fedfe00
+67e0c64c
+18007e01
+1fedfe00
+67e0c64b
+20406307
+18427e00
+20600000
+1fedfe00
+67e0c64d
+18007e73
+1fedfe00
+67e0c64c
+18007e01
+1fedfe00
+67e0c64b
+20206307
+6fe0c64e
+203a62ea
+58000070
+20600000
+580000aa
+20600000
+1fedfe00
+67e0c64d
+18007eef
+204062fb
+684903ca
+18420a00
+e7e08005
+18a20400
+604903ca
+18007eff
+204062fb
+684903ca
+18420a00
+e7e08005
+20600000
+1fedfe00
+67e0c64c
+6fe1464c
+1fed7e00
+67e183c7
+da200107
+da40000f
+20406314
+1fe2fed7
+1fe47e00
+1fedfe00
+20600000
+6fe1c64b
+67e183c7
+da200107
+da40000f
+20406314
+1fed7e00
+da400007
+20406314
+1fe2fe2b
+1fe47e00
+1fedfe00
+1fe20400
+20600000
+da600000
+1a427200
+20407cbd
+1fe20400
+18427e00
+1a63a600
+c304631d
+9a228400
+1a60a601
+18438400
+6fe183c7
+1a40a5ff
+2a41feff
+2020e327
+1a427200
+20407cbd
+2feffe00
+79208400
+20206318
+18437e00
+20600000
+6848c648
+184b8400
+79200400
+6fe0c64e
+245a62cf
+604883e0
+20600000
+18438400
+6fe0c64e
+793a0400
+20600000
+684883cf
+7003d1d7
+2040646d
+6fe0c4e1
+79207e06
+79207e07
+67e0c4e1
+70464e00
+2020644e
+6fe0c4e1
+79207e07
+67e0c4e1
+2020644e
+471cc027
+6fe0c78b
+c0006345
+20206403
+6fe10315
+1fe20c00
+2040636f
+6fe083cf
+c000634b
+202063cf
+471d4027
+6fe083d0
+c01fe334
+c039e33d
+c077e352
+c029e3fb
+20600000
+6fe103d4
+1fe20c00
+2040637a
+6fe083d6
+c020e35c
+c0206364
+c038e39d
+c03863a9
+c024e3b4
+2020644e
+20406366
+2020635e
+6fe0c4e4
+79207e00
+79207e01
+67e0c4e4
+20406497
+2020644e
+20406366
+2020644e
+20406382
+2020638e
+20406382
+efe08006
+1fe97e00
+67e0c655
+efe08006
+67e083db
+20600000
+efe08006
+67e083ce
+1fe97e00
+67e083cf
+efe08006
+67e083d0
+20406385
+604903d2
+18c27e00
+67e103d4
+20600000
+efe08006
+1fe37e00
+67e083d6
+20406385
+604903d7
+18c27e00
+67e103d9
+20600000
+6fe103d9
+1fe20c00
+20600000
+efe08006
+1fe20400
+18430400
+c3800000
+efe08006
+1fe9fe00
+1ff27e00
+98408400
+20600000
+efe08006
+67e0c648
+efe08006
+67e083dc
+efe08006
+67e083dd
+efe08006
+67e083de
+efe10006
+67e14649
+efe08006
+67e083df
+efe08006
+67e0c653
+20600000
+20406368
+2020639f
+6fe0c4e4
+79207e05
+79207e06
+67e0c4e4
+6848c648
+184b8400
+18418403
+204064c8
+70465203
+2020644e
+70095b08
+20407871
+20406368
+6fe0c655
+1fe67c01
+2022e3b0
+2020137a
+6fe0c4e4
+79207e07
+67e0c4e4
+2020644e
+20406382
+efe08006
+67e0898e
+20405325
+20405333
+5800000e
+e7e10005
+6fe144da
+e7e10005
+6fe0c64e
+1fe3fe00
+79207e00
+e7e08005
+471dc027
+580015ef
+e7e10005
+58001191
+e7e10005
+6fe0898e
+e7e08005
+58000007
+e7e28005
+58000001
+e7e10005
+204062e6
+e7e08005
+20600000
+202063d0
+471e4027
+6fe083d0
+c039e3d8
+c01fe3dc
+c077e3f6
+c07fe3ee
+c029e3fd
+20600000
+6fe0c4e4
+79207e03
+67e0c4e4
+2020644e
+6fe0c4e4
+79207e03
+79207e02
+67e0c4e4
+6fe083ce
+204062dd
+67e083d1
+2040646d
+6fe083ce
+1feb7e00
+67e0c648
+1febfe00
+793ffe01
+79207e00
+d8404650
+604903ca
+204062ec
+2020644e
+6fe103d4
+1fe20c00
+1fe0fe01
+67e103d4
+efe08006
+6848c653
+9840fe00
+67e0c653
+204064f9
+20406329
+204064df
+20406502
+2020644e
+70095b09
+20407871
+204062c5
+6fe083ce
+204062dd
+67e083d1
+2040646d
+2020644e
+6fe10315
+1fe20c00
+2040636f
+6fe083cf
+c0006409
+2020643d
+471ec027
+6fe083d0
+c01fe334
+c039e33d
+c077e40f
+2020644e
+6fe103d4
+1fe20c00
+2040637a
+6fe083d6
+c020e418
+c0206418
+c038e423
+c0386433
+2020644e
+20406366
+6fe0c648
+1fe37e00
+6848c64f
+98467c00
+2022e41f
+2020137a
+6fe0c4e4
+79207e01
+67e0c4e4
+2020644e
+20406368
+6fe0c655
+6848c64f
+98467c00
+2022e42a
+2020137a
+2020644e
+6fe0c4e4
+79207e05
+79207e06
+67e0c4e4
+6848c648
+184b8400
+18418403
+204064c8
+2020644e
+20406368
+6fe0c655
+6848c64f
+98467c00
+2022e439
+2020137a
+6fe0c4e4
+79207e07
+67e0c4e4
+2020644e
+6fe083cf
+6848c64f
+98467c00
+2022e443
+2020137a
+2020644e
+6fe083d0
+c039e448
+c077e3f6
+c07fe3ee
+c029e44d
+6fe0c4e4
+79207e03
+67e0c4e4
+2020644e
+2020644c
+202063fd
+20600000
+6fe0c652
+207a0000
+c001e453
+2020137a
+70465200
+20405325
+d8400001
+6848c648
+184b8400
+18418403
+da2000aa
+204064b3
+20405333
+18a20c00
+efe10006
+203a137a
+20600000
+20405333
+58000004
+e7e10005
+6fe144da
+e7e10005
+6fe083ce
+e7e08005
+471f4027
+5800013f
+e7e10005
+6fe083d1
+e7e08005
+20600000
+20405325
+20405333
+58000004
+e7e10005
+6fe144da
+e7e10005
+6fe083ce
+e7e08005
+471fc027
+58000173
+e7e10005
+6fe083d1
+e7e08005
+20600000
+20405333
+5800000e
+e7e10005
+6fe144da
+e7e10005
+6fe0c64e
+1fe3fe00
+79207e00
+e7e08005
+47204028
+580015ef
+e7e10005
+58001183
+e7e10005
+18427e00
+e7e08005
+580000f0
+e7e18005
+5800007f
+e7e10005
+58000000
+e7e08005
+58000001
+e7e08005
+204062e6
+e7e08005
+70465410
+20600000
+20405325
+20405333
+5800000e
+e7e10005
+6fe144da
+e7e10005
+6fe0c64e
+1fe3fe00
+79207e00
+e7e08005
+4720c028
+580015ef
+e7e10005
+58001181
+e7e10005
+6fe0c648
+e7e08005
+580000e0
+e7e18005
+6fe14657
+e7e10005
+58000000
+e7e08005
+6fe0c659
+e7e08005
+204062e6
+e7e08005
+20600000
+20405333
+58000008
+e7e10005
+6fe144da
+e7e10005
+6fe0c64e
+1fe3fe00
+79207e00
+e7e08005
+47214028
+580009ef
+e7e10005
+580005e3
+e7e10005
+18427e00
+e7e08005
+5800008d
+e7e08005
+204062e6
+e7e08005
+20600000
+20405325
+20405333
+58000008
+e7e10005
+6fe144da
+e7e10005
+18421600
+6fe0c64e
+1fe3fe00
+79207e00
+e7e08005
+4721c028
+580009ef
+e7e10005
+580005e1
+e7e10005
+19627e00
+e7e08005
+5800008d
+e7e08005
+204062e6
+e7e08005
+20600000
+47224028
+6fe0c654
+207a0000
+6ff10112
+247a0000
+1a227e00
+67e0895d
+6048895c
+204052f1
+247a0000
+20405325
+20405333
+58000005
+e7e10005
+6fe144da
+e7e10005
+6fe083e0
+e7e08005
+580001ff
+e7e10005
+6fe0c654
+e7e08005
+6fe0c651
+e7e08005
+70465400
+20600000
+4722c028
+6fe0c656
+c1008000
+6fe103d2
+207a0000
+6fe0c654
+1fe0fe01
+67e0c654
+20600000
+6fe1465a
+20207e05
+47234028
+6fe0c653
+207a0000
+1fe0ffff
+67e0c653
+6fe14649
+684947a9
+98467c00
+2021650e
+67e147a9
+6fe0c654
+203a6516
+7003e301
+6fe0c651
+67e083e2
+580000ff
+67e083e1
+2020651b
+7003e300
+6fe0c650
+67e083e2
+580000ef
+67e083e1
+4723c028
+6fe147a9
+1fe67c7f
+20216522
+6fe083e3
+1fe0fe01
+67e083e3
+20406329
+6fe147a9
+1fe0fe08
+684883e3
+9840a200
+2040529d
+67e10328
+1fe0fe04
+67e1032a
+1fe20a00
+6fe083e0
+e7e08005
+6fe083e1
+e7e08005
+2040654c
+2040655d
+47244029
+6fe1465c
+1fe20600
+6fe147a9
+1fe27200
+20405f39
+18a20400
+18627e00
+67e1465c
+18420a00
+6fe083e2
+e7e08005
+6fe10328
+1fe20a00
+6fe147a9
+684883e3
+9840fe00
+1fe0fe04
+e7e10005
+6fe144da
+e7e10005
+70465400
+6fe1465e
+c00038b9
+7009d100
+20600000
+4724c029
+6fe147a9
+1fe67c7f
+24216554
+1fe3fe00
+79207e00
+e7e08005
+20600000
+6fe147a9
+1fe97e00
+1ff18400
+1fe17e7f
+1fe3fe00
+793ffe00
+e7e08005
+e0408005
+20600000
+6fe0c654
+207a0000
+e7e08005
+20600000
+47254029
+20407887
+20403111
+20405a40
+4725c029
+2040706c
+20407045
+20407056
+204052f1
+247a0000
+20404e04
+204052f1
+247a0000
+47264029
+204065ab
+20404fc2
+2040644f
+20406575
+4726c029
+2020310d
+6fe08330
+c28050e5
+c283d0ef
+20600000
+47274029
+204052f7
+207a0000
+6fe0804c
+c3830000
+204052db
+67e100bf
+1fe20c00
+efe10006
+1fe0fe04
+67e141e6
+7041e506
+4727c029
+6fe144d6
+203a6594
+6fe0804c
+c4038000
+793ffe07
+67e0804c
+7041e505
+684944d6
+6fe100bf
+9840fe00
+67e100bf
+6fe141e6
+98467e00
+67e141e6
+6fe141e6
+203a137a
+d8400104
+98467e00
+2022e59f
+2421659f
+604941e6
+6fe144d6
+9840fe00
+67e144d6
+202065a1
+58000000
+67e144d6
+6fe0804c
+79207e06
+67e0804c
+20600000
+6fe0c78e
+c28065a9
+70033801
+20600000
+7003380f
+20600000
+6fe0c78b
+243a65b1
+6fe08337
+207a0000
+70033700
+20600000
+4728402a
+6fe08338
+207a0000
+c000e5d1
+c001662a
+c001e5d7
+c002662e
+c01de5e1
+c01e6631
+c006e5e6
+c0076636
+c007e5e9
+c008663c
+c008e5ef
+c0096640
+c009e5f5
+c00a6644
+c00ae5fb
+c00b6648
+c00be601
+c00c664d
+c00ce607
+c00d6651
+c00de60d
+c00e6655
+c00ee613
+c00f665a
+c00fe619
+c010665e
+c010e624
+c0116662
+20600000
+2040666d
+70033802
+6fe0c4e0
+79207e00
+67e0c4e0
+20600000
+70033804
+6fe0c4e0
+c3810000
+70033803
+20406674
+70033804
+6fe0c4e0
+79207e02
+67e0c4e0
+20600000
+204052f7
+247a0000
+20406683
+7003383c
+20600000
+20406679
+7003380e
+20600000
+20406693
+70033810
+6fe0c4e2
+79207e00
+67e0c4e2
+20600000
+2040669a
+70033812
+6fe0c4e2
+79207e02
+67e0c4e2
+20600000
+2040669f
+70033814
+6fe0c4e3
+79207e00
+67e0c4e3
+20600000
+204066a6
+70033816
+6fe0c4e3
+79207e02
+67e0c4e3
+20600000
+20406687
+70033818
+6fe0c4e1
+79207e00
+67e0c4e1
+20600000
+2040668e
+7003381a
+6fe0c4e1
+79207e02
+67e0c4e1
+20600000
+204066ab
+7003381c
+6fe0c4e1
+79207e06
+67e0c4e1
+20600000
+204066b2
+6fe0c4e4
+79207e00
+67e0c4e4
+7003381e
+20600000
+204066b8
+6fe0c4e4
+79207e02
+67e0c4e4
+70033820
+6fe0c64f
+1fe9fe00
+1fe1fe03
+d8404650
+604903ca
+202062ec
+204066c2
+6fe0c4e4
+79207e04
+67e0c4e4
+70033822
+20600000
+6fe0c4e0
+c4008000
+70033803
+202065b1
+6fe0c4e0
+c19f8000
+7003383b
+6fe08336
+c18b8000
+70033600
+7003380d
+202065b1
+6fe0c4e0
+247a0000
+6fe0c78e
+c2806665
+c2836667
+2020666b
+6fe0c4e2
+c4008000
+70033811
+202065b1
+6fe0c4e2
+c19f8000
+70033813
+202065b1
+6fe0c4e3
+c4008000
+70033815
+202065b1
+6fe0c4e3
+c19f8000
+6fe0c78e
+c2836667
+2020666b
+6fe0c4e1
+c4008000
+70033819
+202065b1
+6fe0c4e1
+c19f8000
+7003381b
+202065b1
+6fe0c4e1
+c1ff8000
+6fe0c78e
+c2836669
+2020666b
+6fe0c4e4
+c4008000
+7003381f
+202065b1
+6fe0c4e4
+c4018000
+70033821
+202065b1
+6fe0c4e4
+c1ff8000
+2020666b
+7003380f
+202065b1
+70033817
+202065b1
+7003381d
+202065b1
+70033800
+20600000
+4728c02a
+2040530b
+58000001
+1fe20400
+58000050
+1fe21600
+20205106
+4729402a
+2040530b
+6fe144d8
+1fe20400
+20205115
+4729c02a
+2040530b
+6fe144d8
+1fe20400
+d9600050
+2040512a
+6fe0c4e0
+793ffe05
+67e0c4e0
+20600000
+472a402a
+20405318
+204069ee
+20205145
+472ac02a
+2040530b
+58000003
+1fe20400
+58000051
+1fe21600
+20205106
+472b402a
+2040530b
+6fe144da
+1fe20400
+20205115
+472bc02a
+2040530b
+58000011
+1fe20400
+58000052
+1fe21600
+20205106
+472c402b
+2040530b
+6fe144dc
+1fe20400
+20205115
+472cc02b
+2040530b
+58000013
+1fe20400
+58000053
+1fe21600
+20205106
+472d402b
+2040530b
+6fe144de
+1fe20400
+20205115
+472dc02b
+20405325
+7003ce03
+7003d11c
+20406460
+70464e01
+20600000
+472e402b
+20405325
+6848c64f
+20406330
+6048c648
+2020647b
+472ec02b
+20405325
+6848c648
+2040632a
+204062d1
+67e083d1
+6848c648
+2040632a
+604883ce
+20206460
+472f402b
+20405325
+6848c648
+2040632a
+202064b3
+472fc02b
+6fe10315
+98000c00
+efe08006
+1fe22400
+67e083ee
+efe10006
+67e103ef
+efe08006
+1fed1600
+efe08006
+99609600
+4730402c
+18c20400
+df200004
+d8a003fd
+20407d17
+18420c00
+1a427e00
+c000e870
+c00166e2
+c001e870
+c002670a
+c002e870
+c00367b8
+c003e870
+20206877
+4730c02c
+20406886
+2841fe01
+2020e8f6
+2841feff
+2020e87a
+efe10006
+67e103f5
+196097fe
+196097ff
+2422e874
+d96003e4
+efe1000b
+207a0000
+20406938
+20405323
+18007e03
+e7e08005
+6fe103ef
+e7e10005
+18ebfe00
+1fe0fe05
+1fe0a605
+1ff0fe00
+e7e10005
+18e27e00
+1ff0fe00
+e7e10005
+e7e10005
+d8c003fd
+18e27200
+2022e705
+efe20006
+e7e20005
+c2006702
+18007e00
+e7e08005
+1a627e00
+67e10326
+20600000
+4731402c
+efe20006
+67e203f7
+196097fc
+204067e4
+67e103f3
+196097fe
+204068de
+2022e87a
+2a21fe05
+2020e718
+d8a003fd
+18000e00
+20206727
+efe08006
+c085687a
+efe10006
+243a6725
+efe08006
+c0ffe723
+efe08006
+c0ffe721
+2020676e
+18c08dfb
+20206715
+18c08dfc
+20206715
+18c08dfd
+20206715
+efe08006
+c004e73c
+c005672a
+efe10006
+e7e10005
+18e08e01
+1ff0a400
+efe10006
+1ff0fe00
+1a40a401
+9a467c00
+24216739
+1fe22600
+1a50fe00
+e7e10005
+18e08e01
+1a627e00
+20206730
+196097fb
+1a20a3fb
+20206741
+efe10006
+e7e10005
+18e08e01
+196097fd
+1a20a3fd
+2421687a
+2422e727
+196097ff
+2422e87a
+20405323
+18a08a0a
+da2003fd
+18e27e00
+203a675b
+efe10011
+203a675b
+98002400
+6fe203f7
+98000400
+2040699d
+18c27e00
+203a6758
+18c08dfd
+efe18006
+e7e18005
+20406911
+98007200
+20407d5f
+1a20a202
+18e08fff
+20206748
+da200005
+2040683a
+6fe10326
+c005e8f9
+20206850
+efe08006
+c0006764
+c000e766
+c0016769
+196097ff
+2020676c
+efe08006
+196097fe
+2020676c
+efe10006
+1ff0fe00
+196097fd
+67e103ec
+20600000
+196097fb
+20406760
+2422e874
+684a03f7
+20406967
+2422e871
+18c22200
+20405323
+1a220c00
+18a08a03
+18c21600
+20406918
+1fe22200
+6fe103ec
+1fe22400
+1a227e00
+9a462400
+6fe103f3
+9a467c00
+2421679d
+78547c00
+6fe103ec
+203a6790
+99608c00
+1a40a403
+1a427200
+1f227e00
+1fe0fe03
+1ff0fe00
+e7e10005
+1f227e00
+1ff0fe00
+e7e10005
+202067ab
+1a20f206
+20346794
+1f30fe00
+20206797
+1f227e00
+1fe0fe02
+1ff0fe00
+e7e10005
+1f20f3fd
+1f30fe00
+e7e10005
+19620c00
+202067ab
+78347c00
+6fe103f3
+1fe22200
+1a227200
+6fe103ec
+203a6790
+99608c00
+1a227e00
+1fe0fe05
+1ff0fe00
+e7e10005
+1a227e00
+1ff0fe00
+e7e10005
+20407d5f
+243467b4
+18007e02
+e7e08005
+18c27e00
+99667e00
+1ff0fe00
+e7e10005
+202067b6
+18007e00
+e7e08005
+da200005
+20206866
+4731c02c
+20406886
+2841feff
+2020e87a
+204067e4
+67e103f3
+196097fe
+204068de
+d8a003fd
+18000e00
+efe08006
+c00567ec
+efe10006
+e7e10005
+18e08e01
+196097fd
+1a20a3fd
+2421687a
+2422e7c2
+196097ff
+2422e87a
+20405323
+18a08a0d
+6fe103e4
+98002600
+da2003fd
+efe10011
+203a67df
+98002400
+2040697c
+203a67dd
+18c08dfd
+efe18006
+e7e18005
+20406911
+98007200
+20407d5f
+1a20a202
+202067d2
+20406839
+6fe10326
+c00768fc
+20406850
+20206850
+efe10006
+1ff0fe00
+1fe0fffd
+d84000c8
+98467c00
+24610000
+580000c8
+20600000
+18c08c04
+196097fb
+1a20a3fb
+2422e87a
+20406760
+2422e874
+d96003e4
+20406938
+18e27e00
+203a68fc
+67e08421
+1a427e00
+67e1041f
+d8e00000
+da200000
+20405323
+18a08a0a
+20406822
+2434137a
+18c21600
+1fe22600
+9a20a200
+6fe103ec
+1fe22400
+203a682b
+1a227e00
+9a462400
+2022e81d
+2421681d
+6fe103f3
+9a467c00
+2022e814
+24216814
+1a427200
+20406817
+6fe08421
+18e08e01
+98e67c00
+2022e839
+20206856
+1fe27200
+20406817
+20206856
+18a08bfd
+1f220400
+1a627e00
+9a467e00
+99608c00
+20207d5f
+6fe08421
+18e08e01
+98e67c00
+20628000
+202067fd
+20407e56
+d8c003fd
+18ebfe00
+98c08c00
+e8420006
+20406967
+24628000
+20406911
+20207e54
+6fe103f3
+9a267c00
+24216845
+1a227200
+1f220400
+19620c00
+20407d5f
+6fe1041f
+9a267c00
+2022e837
+20406856
+2020684a
+20406839
+2020684a
+da200007
+18007e00
+e7e08005
+20406866
+68490326
+184085fb
+1850fe00
+e7e10005
+184085fd
+1850fe00
+e7e10005
+20600000
+1fe27200
+1f220400
+19620c00
+20407d5f
+20406856
+58000036
+e7e08005
+6fe1041f
+1ff0fe00
+e7e10005
+20600000
+58000036
+e7e08005
+184085fd
+1850fe00
+e7e10005
+20600000
+da200007
+58000002
+e7e08005
+6fe103ec
+98408400
+1850fe00
+e7e10005
+20406866
+68490326
+184085fb
+1850fe00
+e7e10005
+184085fb
+1850fe00
+e7e10005
+20600000
+6fe10324
+98a67e00
+1fe67e00
+67e10326
+20405323
+1a227e00
+e7e08005
+6fe103ef
+e7e10005
+20600000
+20600000
+58000200
+67e1041d
+2020687c
+58000400
+67e1041d
+2020687c
+58000600
+67e1041d
+2020687c
+58000300
+67e1041d
+20405323
+e7e08005
+6fe103ef
+e7e10005
+58000200
+e7e10005
+6fe1041d
+e7e10005
+70032607
+20600000
+da400000
+18000400
+d8a003e4
+204068de
+2022e8dc
+1a40a401
+efe08006
+1a20a3ff
+196097ff
+2fe1f018
+2420e8dc
+2fe00e04
+2420e8a9
+18000401
+efe08006
+1a20a3ff
+196097ff
+c080689d
+efe08006
+1a20a3ff
+196097ff
+c00068ae
+202068a0
+18c08c01
+1a20a3ff
+196097ff
+18c08c02
+1a20a3fe
+196097fe
+2841fe00
+2020e8d6
+18c08c0c
+1a20a3f4
+196097f4
+202068d6
+2fe00e02
+2420e8ac
+20206894
+2fe00e01
+2420e8dc
+1a20a3fe
+196097fe
+efe10006
+1a467c04
+2022e8b4
+e7e10005
+2841fe00
+2020e8d6
+18c20400
+efe08006
+c08068cf
+efe08006
+c08068cf
+efe08006
+c08868cf
+efe08006
+c08068cf
+efe08006
+c0c068cf
+efe08006
+c08068cf
+efe08006
+c08068cf
+efe08006
+c0c068cf
+efe08006
+c0afe8cf
+efe08006
+c0cde8cf
+efe08006
+c09a68cf
+efe08006
+c07de8d4
+18420c00
+18c08c0c
+18000e00
+18000400
+202068d4
+196097f4
+1a20a3f4
+18000400
+2a21fe00
+2420e88b
+18007e00
+e7e10005
+20600000
+d84000ff
+20600000
+4733402c
+efe08006
+196097ff
+2fe1f030
+2420e8f4
+2fe00e07
+2020e8ed
+2fe00e06
+2020e8ef
+2fe00e05
+2420e8f4
+efe08006
+1fe22200
+196097ff
+202068f2
+18c08c02
+196097fe
+efe10006
+1ff0a200
+196097fe
+18007e01
+20600000
+18007e00
+20600000
+58000003
+67e083ee
+202068fe
+58000005
+67e083ee
+202068fe
+58000007
+67e083ee
+20405323
+6fe083ee
+1fe22400
+e7e08005
+6fe103ef
+e7e10005
+58000500
+e7e10005
+2a41fe05
+2020e90d
+2a41fe07
+2020e90d
+58000000
+e7e28005
+2020690f
+58350200
+e7e28005
+7003260a
+20600000
+20407ce8
+20407ceb
+20406918
+20407ce2
+20407ce5
+18427e00
+20600000
+efe08006
+1fe17207
+1fe97e00
+c0806922
+18007e01
+18000401
+20600000
+20407cc2
+1fe08401
+20600000
+1f227e00
+1fe67c04
+2021691f
+c002e929
+c003692c
+c003e930
+20600000
+efe08006
+1fe08402
+20600000
+efe10006
+1ff0fe00
+1fe08403
+20600000
+efe10006
+1ff0fe00
+e8410006
+18508400
+18500400
+9840fe00
+1fe08405
+20600000
+4733c02c
+18000e00
+da400000
+d8a003fd
+efe1000b
+207a0000
+20406943
+18e27e00
+c1038000
+19609602
+2020693c
+98002600
+6fe14660
+98000c00
+18e27e00
+c1038000
+78547c00
+efe08006
+207a0000
+98007200
+efe10006
+9a667c00
+2422e950
+78347c00
+c200694c
+e8420006
+18c22200
+24346963
+d8c003fd
+df200007
+efe20006
+203a695c
+98467c00
+2022e963
+c2006956
+20600000
+e0420005
+18e08e01
+1a220c00
+20406911
+9a40a400
+98c08c00
+20206946
+1a220c00
+20406918
+98c08c00
+20206946
+4734402d
+6fe14660
+98000c00
+efe08006
+203a7e50
+1fe3fe00
+98c08c00
+efe20006
+98467c00
+20628000
+18a27e00
+67e1097d
+604c0964
+20406918
+98c08c00
+18c27e00
+6849097d
+18420a00
+684c0964
+1fe20c00
+2020696a
+4734c02d
+6fe14660
+98000c00
+efe08006
+203a699a
+98007200
+efe10006
+9a667c00
+2022e98a
+c2006982
+18c08c04
+20406918
+98c08c00
+2020697f
+1f20f3ff
+1f23fe00
+98c08c00
+18c08c04
+20406918
+98c09600
+18c08c01
+efe10006
+9a467c00
+2022fe5e
+20406911
+98c08c00
+19627e00
+98c67c00
+2022e99a
+20206990
+18000c00
+18007e00
+20600000
+4735402d
+6fe14660
+98000c00
+efe08006
+203a69b6
+1fe3fe00
+98c08c00
+efe20006
+98467c00
+2022e9aa
+20406918
+98c08c00
+202069a0
+20406918
+98c09600
+18c08c01
+efe10006
+9a467c00
+20628000
+20406911
+98c08c00
+19627e00
+98c67c00
+2022e9b6
+202069ac
+18000c00
+20600000
+da400400
+204069aa
+da400300
+204069c3
+24740000
+1a267c03
+20217e56
+efe08006
+c0847e56
+efe08006
+20600000
+4735c02d
+20406918
+1fe22200
+efe08006
+1fe17207
+1fe97e00
+1fe67c03
+2022e9df
+1f227e00
+c002e9d6
+c00369d9
+c003e9dc
+18c08dff
+20406918
+98c08c00
+1a227e00
+98462200
+2022fe56
+202069c6
+1a20a3fe
+18c08c01
+202069c6
+1a20a3fd
+18c08c02
+202069c6
+1a20a3fb
+18c08c04
+202069c6
+1a20a3ff
+1f227e00
+c000e9e8
+c00169e6
+c00269e5
+20207e56
+1a20a3f4
+efe10006
+1a20a3fe
+efe10006
+9a467c00
+2022fe54
+1a20a3fe
+2022fe56
+202069c6
+20405323
+1fe20a00
+58000006
+e7e08005
+5800006e
+e7e10005
+58000f00
+e7e10005
+581a0535
+e7e18005
+58000111
+1ff07e00
+e7e20005
+58002600
+e7e10005
+58000335
+e7e10005
+58000009
+e7e10005
+58000004
+e7e10005
+70032614
+20600000
+4736402d
+7004a750
+d8a004a8
+d8c04337
+20407d0c
+d8c046dc
+20407d0a
+d8c00880
+20407d0a
+20406ac0
+d8c00277
+20406abb
+20406a86
+d8a009be
+20406ab7
+580f4240
+1fe22200
+6fe209be
+9a26fc00
+20407def
+18077e00
+67e2087c
+20600000
+7004a741
+d8a004a8
+20406a6b
+20406a66
+6fe1c351
+e7e18005
+20406a2c
+d8c00277
+20407d0c
+d8c04337
+20407d0c
+20406ac0
+d8c009de
+d8a0098e
+20407d0c
+20206a86
+6fe2439e
+e7e20005
+20407d1f
+20207d1c
+4736c02d
+7004a741
+d8a004a8
+20406a66
+20406a6b
+6fe1c34a
+e7e18005
+20406a2c
+d8c04337
+20407d0c
+d8c00277
+20407d0c
+20406ac0
+d8c009de
+d8a0098e
+20407d0c
+20406a86
+d8a009be
+20206ab7
+7004a720
+d8c008c0
+d8a004a8
+20407d0a
+20406ac0
+d8c00860
+20406abb
+20406a86
+d8a0098e
+20406dd1
+d8400001
+20406a55
+d8a04316
+20406ab7
+d8400000
+20406a55
+d8a009de
+20206dd1
+4737402d
+7004a735
+58000100
+67e104a8
+20406a66
+20406a6b
+d8c04337
+20407d0c
+d8c00277
+20407d0c
+58006c65
+e7e10005
+58006274
+e7e10005
+e0408005
+20406ac0
+20206a86
+6fe3437a
+e7e30005
+6fe0c371
+e7e08005
+20600000
+6fe30297
+e7e30005
+6fe0c36a
+e7e08005
+20600000
+7004a741
+6fe0c76e
+67e084a8
+d8c046dc
+20407d0a
+d8c00880
+20407d0a
+20406ac0
+d8c00277
+20406abb
+20206a86
+7004a741
+6fe0c76e
+67e084a8
+d8c00880
+20407d0a
+d8c046dc
+20407d0a
+20406ac0
+d8c04337
+20406abb
+20206a86
+4737c02d
+20406ad5
+6fe084a7
+1fe20400
+1fe0fe0f
+1ff1fe00
+1fe22400
+203a6a98
+18417e0f
+243a6a9b
+da60099e
+dfe004a8
+1fe0fff0
+9840a200
+d8a009ce
+df200004
+20407d2f
+20206aa6
+da400001
+da200000
+20206a9c
+1841220f
+dfe004a8
+9840fe00
+9a260c00
+d8a009be
+20406afb
+da6009ae
+da2009be
+d8a009ce
+df200004
+20407d2f
+20406dcb
+20406d62
+d8c004a8
+1a40a5ff
+1a427e00
+203a6aaf
+20406dc0
+20406d5c
+20206aa9
+d8a009be
+20406dd1
+d8c009ce
+20406dc0
+20406d62
+d8c009be
+20406dc0
+20206d5c
+18a22200
+20406dd1
+df200010
+20207d37
+d8a0098e
+20407d0c
+df200010
+da20098e
+20207d37
+6fe084a7
+1fe27200
+da2004a8
+20207d37
+efe08011
+1fe3fe00
+2a6ffe00
+7920fe00
+2feffe08
+7920a600
+e7e08011
+1a20a3ff
+c2006ac4
+20600000
+da20099e
+1a20a20f
+18007210
+18002600
+20206ac4
+da2009ae
+20206acf
+d8c0098e
+20406dbe
+18007008
+20406dcc
+20406dcb
+20406d59
+d8a0099e
+20406dd1
+4738402e
+6fe0899e
+2feffe07
+2420eae6
+20406ace
+da60099e
+d8a0099e
+20406af0
+20206ae7
+20406ace
+d8c0099e
+d8a009ae
+20407d0c
+6fe089ae
+2feffe07
+2420ead3
+20406ad3
+da6009ae
+d8a009ae
+df200003
+d8400000
+20406af7
+1a60a604
+c2006af1
+d8408700
+18500400
+efe20013
+9842fe00
+e7e20005
+20600000
+4738c02e
+df200010
+dfe00000
+9a267c00
+2022eb06
+20216b09
+e8408006
+e0408005
+1fe0fe01
+c2006afe
+20600000
+d8400080
+e0408005
+20206b03
+d8400000
+20206b07
+20406b1e
+d8c00454
+d8a00444
+20207d0c
+78547c00
+20406c15
+d8c00424
+d8a00464
+1800720f
+20407d5f
+efe08006
+1fe2fe06
+e7e08005
+58000474
+67e10498
+58000464
+67e10496
+79200012
+20206b5e
+6848c793
+18002410
+1840a606
+1a667c10
+20216b24
+18002610
+d8a00464
+d8c04794
+18427200
+78547c00
+efe08006
+e7e08005
+1a40a5ff
+2022eb32
+c2006b28
+20346b25
+78347c00
+18007206
+1a220c00
+20206b28
+d8c00424
+d8a00474
+20407d0c
+6fe08483
+9a62fe00
+67e08483
+58000474
+67e10498
+58000464
+67e10496
+79200012
+20206b5e
+78547c00
+20406c15
+20206b48
+da200057
+78347c00
+20406c15
+20406b48
+d8c00454
+d8a00063
+20207d0c
+58000424
+67e10498
+580041cb
+67e10496
+793f8012
+20406b5e
+da200454
+da400424
+d8a00464
+20406c08
+da200464
+da400474
+1a420a00
+78347c00
+20406c06
+20406c20
+58000474
+67e10498
+58000464
+67e10496
+79200012
+20206b5e
+70049a00
+6fe10496
+98000c00
+d8a00484
+20407d0c
+6fe10498
+98000c00
+d8a00454
+20407d0c
+20406b85
+78547c00
+c5896b6f
+6fe0849a
+c0826b6f
+6fe10498
+98002400
+20406bb7
+20406bb6
+20406bc9
+6fe0849a
+1fe0fe01
+67e0849a
+20406b85
+78347c00
+20406bb6
+20406bd8
+20406be7
+20406bd8
+20406be7
+20406bd8
+20406be7
+20406bd8
+6fe0849a
+1fe0fe01
+67e0849a
+c0886b67
+20406b85
+78547c00
+20206bb6
+6fe0849a
+d8c00484
+203a6bac
+98002400
+18007211
+18c20a00
+efe08006
+1fe98400
+1feb7e00
+1fe97e00
+9841fe00
+e7e08005
+c2006b8b
+58000484
+9a408c00
+18007210
+d8a00434
+efe08006
+e7e08005
+28c1fe95
+2420eb9b
+18c08def
+c2006b96
+18002200
+1a40a7ff
+1a6ba600
+1a6ba600
+20406df3
+58009000
+9a60a600
+d8a00434
+18007210
+e8408013
+efe08005
+9840fe00
+e7e08005
+1a60a601
+c2006ba5
+20206df7
+18007210
+18000400
+efe08006
+98428400
+c2006bae
+18427e00
+e7e08006
+d8c00484
+d8a00434
+20207d0c
+da400434
+18007210
+da200454
+1a220a00
+e8408011
+efe08012
+9842e000
+1f212603
+24346bc0
+1a62a603
+1a662601
+20216bc3
+9840e000
+1e027e00
+e7e08005
+1a20a201
+1a40a401
+c2006bba
+20600000
+20406df3
+18007210
+da200454
+efe08011
+d8c09100
+1f212603
+1a667c01
+20216bd2
+d8c09200
+98c08c00
+efe08006
+e7e08011
+1a20a201
+c2006bcc
+20206df7
+18007208
+d8c00454
+18c20a00
+efe08006
+98002200
+efe08006
+98002400
+1a23fe00
+9a40fe00
+e7e08005
+1a227e00
+9a40fe00
+e7e08005
+c2006bdb
+20600000
+588ae42c
+98000400
+18007207
+20406bf6
+580d751b
+98000400
+18007205
+20406bf6
+6fe08463
+98002200
+6fe08457
+67e08463
+1a227e00
+67e08457
+20600000
+1841240f
+18417e0f
+d8a00454
+98a08a00
+efe08005
+98002600
+1a227e00
+e7e08005
+1a622200
+18518400
+c2006bf7
+58000454
+9a408a00
+1a227e00
+e7e08005
+20600000
+78347c00
+20206c09
+78547c00
+18007210
+e8408011
+efe08012
+20346c0f
+9842fe00
+20206c10
+9840fe00
+e7e08005
+1a20a201
+1a40a401
+c2006c0a
+20600000
+d8a00474
+efe30011
+e7e30005
+20346c1b
+efe30011
+20206c1c
+efe30006
+e7e30005
+efe20011
+e7e20005
+20600000
+d8c041cb
+d8a00464
+d8400000
+588395a7
+20406c41
+58b3c1df
+20406c41
+5800e5e9
+20406c42
+18422800
+78547c00
+20406c2f
+1a820400
+78347c00
+20206c2f
+18007208
+efe08006
+2f200201
+20346c36
+2020ec37
+9840fe00
+20206c38
+2020ec34
+9842fe00
+e7e08005
+184c8400
+c2006c30
+20600000
+6fe30458
+67e30057
+efe30006
+e7e30005
+20600000
+184d0400
+18500400
+98418400
+20600000
+20206c45
+4739402e
+20406d65
+d8a04316
+20206dd1
+d8a04337
+2034ec4d
+d8a00277
+18c22200
+20407d0c
+20406d7a
+d8c04327
+20206dea
+da200277
+2034ec55
+da204337
+1a220a00
+20405a31
+20206d7a
+d8c04384
+20406dc0
+d8c04316
+20406dc1
+18006c38
+18006c00
+20406d57
+d8a002c7
+20206dd1
+18007008
+18007e49
+20206c68
+18007e49
+20206c67
+18007e01
+18007000
+184d5e00
+9de1de00
+1f00f001
+184cde00
+1df15e00
+6fe146aa
+1ff07e00
+9de1de00
+1f00f001
+ede20006
+1f00f001
+efe10006
+1a30de00
+1df05e00
+9de1de00
+1f00f001
+20600000
+1a608c01
+efe08006
+98002200
+20406c64
+20406d59
+18007000
+efe08013
+1fe17e03
+1ff05e00
+79205e08
+20406dc9
+20406d5c
+1a227200
+1a608c02
+20406da8
+20406db2
+20406d5c
+1f227e00
+203a6c8d
+20206c88
+1800700c
+1de27e00
+67e2026f
+20600000
+1a20a201
+20406c66
+1a620c00
+20406dbc
+20406d5f
+20406dd8
+1a60a610
+1a40a5f0
+20216c91
+20600000
+20406d4c
+4739c02e
+d8c00063
+20406dbe
+7080d500
+18217e0f
+1fe9fe00
+9881fe00
+67f080d6
+6fe0c1e4
+67f080d7
+627100d1
+627100d3
+6a2146b2
+684ac69c
+20406cbd
+20406c61
+70800a02
+70800a03
+6fe146b2
+67f100da
+1fe0fe04
+67e146b2
+1a627e00
+9a20a200
+20406d53
+df00000c
+e5e20011
+65e2026f
+20600000
+6fe2c69c
+1fe0fe01
+67e2c69c
+20206cc3
+6fe0c1e4
+c1808000
+6fe146b2
+247a0000
+79200424
+20600000
+6fe0c6a0
+1fe17e0f
+1fe1fe20
+67e0c6a0
+20600000
+6fe0c6a5
+1fe17e0f
+67e0c6a5
+20600000
+18a27e00
+684900af
+18408404
+98467e00
+67e146b4
+67f100d1
+67f100d3
+20407e5a
+20406d4c
+d8c00063
+20406dbe
+7080d500
+6fe0801a
+1fe17e0f
+1fe9fe00
+9881fe00
+67f080d6
+6fe080e5
+1fe17e03
+67e0c1e4
+67f080d7
+6a2100af
+622146b2
+6fe146b4
+9a208c00
+18007000
+ede20006
+65e20273
+684ac6a1
+20406cbd
+20406c61
+70800a06
+70800a07
+6fe100af
+67f100da
+20406d53
+6ff08108
+c4038000
+20207e58
+c6078000
+684a0273
+604a46a6
+6fe2c6a1
+1fe0fe01
+67e2c6a1
+20206cc8
+20406d4c
+7080d500
+7080d601
+6fe0816b
+1fe17e03
+67f080d7
+5800016d
+67f100d1
+67f100d3
+6a20816c
+1a20a3fc
+24217e5e
+6220816c
+5800016d
+9a208c00
+18007000
+ede20006
+65e20273
+684ac6a1
+20406c61
+70800a06
+70800a07
+6fe0816c
+67f100da
+20406d53
+6ff08108
+c303fe5e
+684a0273
+6fe246a6
+98467e00
+207a0000
+604a46a6
+6fe2c6a1
+1fe0fe01
+79207e27
+67e2c6a1
+18007e00
+20600000
+20406d27
+580041f7
+9a20a200
+20406d53
+df00000c
+e5e20011
+20600000
+20406d4c
+473a402e
+7080d500
+7080d601
+6fe0c1f5
+1fe17e03
+67f080d7
+6fe1097b
+67f100d1
+580041f7
+67f100d3
+6a20c1f6
+684ac69c
+20406c61
+70800a02
+70800a03
+6fe0c1f6
+67f100da
+1fe0fe04
+67e0c1f6
+6fe2c69c
+1fe0fe01
+793ffe27
+67e2c69c
+20600000
+6ff1011a
+98467c00
+20628000
+247a0000
+20206d40
+6ff08108
+c303137a
+580041f7
+98408a00
+df00000c
+e5e20005
+20206d55
+473ac02e
+1800700c
+20406dcc
+20406dcb
+58000000
+67f100da
+20600000
+6ff08108
+c3036d53
+70800a00
+20600000
+243bed57
+20600000
+18006c30
+18006c00
+20206d57
+18006c32
+18006c02
+20206d57
+18006c34
+18006c04
+20206d57
+18006c01
+18006c00
+20600000
+18007000
+6fe20277
+98005e00
+1f00f001
+efe20006
+98005e00
+1f00f001
+6fe24337
+98005e00
+1f00f001
+efe20006
+98005e00
+1f00f001
+20406dcc
+1f00f1fc
+6fe2439e
+1fe25e00
+1f00f004
+18006c38
+18006c08
+20206d57
+473b402e
+6fe3437a
+684b0297
+2034ed80
+6fe30297
+684b437a
+18007008
+18425e00
+1f00f001
+184f5e00
+1ff07e00
+9de1de00
+1f00f001
+1fef5e00
+1f00f001
+18005e00
+18007e00
+6fe0c36a
+6848c42b
+2434ed90
+6fe0c371
+6848c36a
+67e0c347
+6048c348
+18007000
+da404347
+18007204
+efe20011
+e8420012
+9842de00
+1f00f001
+1a20a204
+1a40a404
+c2006d95
+20406dcc
+1f00f1fc
+6fe2439e
+1fe25e00
+1f00f004
+18006c38
+18006c0c
+20406d57
+20406dcb
+18006c3a
+18006c08
+20206d57
+2f200600
+20608000
+18c27e00
+9f208a00
+18007e00
+e7e08005
+1f20f201
+2f200600
+20608000
+20206dad
+18007000
+1f227e00
+203a6db7
+efe20006
+1f20f3fc
+98005e00
+1f00f001
+2f001e04
+20608000
+20206db3
+18007008
+20206dc1
+18007004
+20206dc1
+18007000
+18007204
+efe20006
+98005e00
+1f00f001
+c2006dc2
+20600000
+d8c002c7
+20206dbe
+18007204
+20206dce
+18007000
+18007204
+18005e00
+1f00f001
+c2006dcd
+20600000
+1800700c
+18007204
+1de27e00
+e7e20005
+1f00f001
+c2006dd3
+20600000
+1800700c
+1a620a00
+1a40f201
+1f267c0f
+20216dde
+18007210
+1de27e00
+1f267c03
+20216de6
+e7e20005
+1f20f3fc
+20628000
+1f00f001
+20206dde
+e7e08005
+1fecfe00
+c2006de6
+20600000
+1800700c
+18007204
+efe20006
+9de67c00
+24628000
+1f00f001
+c2006dec
+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
+6fe0c764
+243a6ebf
+20207541
+473bc02e
+6fe0c764
+207a0000
+6fe0c6b9
+c1808000
+6fe0c6b8
+207a0000
+6fe0c6bb
+c1018000
+6fe1478c
+c2806eb5
+6fe0c6ba
+c0007541
+20600000
+7046ba00
+20600000
+6fe0c6b8
+79207e01
+67e0c6b8
+20600000
+6fe0c6b8
+793ffe01
+67e0c6b8
+20600000
+473c402f
+6fe0c764
+243a6ffb
+20406ecc
+7046b900
+70087400
+20600000
+6fe0c764
+207a0000
+6fe0c6b9
+c1008000
+2040706c
+20206ec6
+473cc02f
+58000880
+d8a00870
+98a67200
+20407d26
+58004770
+d8a04768
+98a67200
+20207d26
+70087201
+6fe0c645
+c0016eda
+c000eee5
+20600000
+6fe0c6bb
+c001eedd
+20207562
+20407581
+6fe08871
+247a0000
+70087003
+20600000
+6fe0c6b9
+c000f01a
+2020137a
+6fe0c6b9
+c000eee8
+20206ffb
+2040701a
+6fe08871
+247a0000
+70087003
+20600000
+20406f08
+da2008a0
+d8a00728
+20407761
+da200880
+d8a006e8
+20407761
+da2006e8
+da400880
+d8a006e8
+204076c9
+da200800
+da400880
+d8a00708
+204076c9
+da200708
+da4006e8
+d8a006e8
+20407765
+da2006c8
+da4006e8
+d8a006c8
+20407765
+df200020
+da200728
+da4006c8
+20207df1
+da200840
+d8a006c8
+20407761
+da200820
+d8a006e8
+20407761
+da2006e8
+da400820
+d8a006e8
+204076c9
+da200800
+da400820
+d8a00708
+204076c9
+da200708
+da4006e8
+d8a006e8
+20407765
+da2006c8
+da4006e8
+d8a006c8
+2020777e
+20406f39
+da2008a8
+d8a00728
+20407138
+da200888
+d8a006e8
+20407138
+da2006e8
+da400888
+d8a006e8
+20407116
+da200760
+da400888
+d8a00708
+20407116
+da200708
+da4006e8
+d8a006e8
+204070e5
+da2006c8
+da4006e8
+d8a006c8
+204070e5
+df200018
+da200728
+da4006c8
+20207df1
+da2007a8
+d8a006c8
+20407138
+da200790
+d8a006e8
+20407138
+da2006e8
+da400790
+d8a006e8
+20407116
+da200760
+da400790
+d8a00708
+20407116
+da200708
+da4006e8
+d8a006e8
+204070e5
+da2006c8
+da4006e8
+d8a006c8
+202070e8
+6fe0c645
+c0016f53
+c000ef63
+20600000
+6fe0c6ba
+c0806f81
+20406f7e
+d8a00940
+580008f0
+e7e10005
+580046fc
+e7e10005
+580008a0
+e7e10005
+2040742a
+6fe08871
+c0026f7b
+70087201
+70087005
+20600000
+6fe08874
+c0806f81
+20406f7e
+d8a00940
+580008f0
+e7e10005
+5800474c
+e7e10005
+580008a0
+e7e10005
+20206f75
+d8a00940
+58000900
+e7e10005
+580008a0
+e7e10005
+5800474c
+e7e10005
+20407351
+6fe08871
+c0026f7b
+70087201
+70087005
+20600000
+70087114
+20406ee2
+20207068
+d8a008e0
+18000e08
+20207032
+70087201
+20600000
+6fe0c645
+c0016f89
+c000ef8c
+70087009
+70087201
+20600000
+6fe0887b
+c081ef86
+20206f8e
+6fe0887b
+c080ef86
+d8a005e9
+6fe340a8
+e7e30005
+6fe30041
+e7e30005
+6fe1c768
+e7e18005
+20407449
+da200910
+da400920
+18000e04
+20407037
+2420efa7
+20406f9e
+70007e41
+20205a1d
+6fe08871
+c004efa4
+7008700a
+70087201
+70007d03
+20600000
+70007d03
+70087115
+20207068
+6fe08871
+c004efad
+70087000
+70007d04
+70007f05
+20600000
+70007d04
+70087100
+20600000
+6fe0c645
+c0016fb4
+c000efb8
+20600000
+6fe0887b
+c001efbc
+7008710a
+20207068
+6fe08875
+c000efbc
+7008710a
+20207068
+d8a005e9
+6fe30041
+e7e30005
+6fe340a8
+e7e30005
+6fe1c765
+e7e18005
+2040748c
+6fe08871
+c0056fc9
+7008700b
+70087201
+20600000
+7008710b
+70087301
+20600000
+d8a00940
+6fe30041
+e7e30005
+6fe340a8
+e7e30005
+580008f0
+e7e10005
+58000900
+e7e10005
+20206fe0
+7008700f
+d8a00940
+6fe340a8
+e7e30005
+6fe30041
+e7e30005
+58000900
+e7e10005
+580008f0
+e7e10005
+d8a005e9
+6fe30940
+e7e30005
+6fe30946
+e7e30005
+204074a0
+7041ca01
+d8a041cb
+d8c00910
+20407d0c
+202009c8
+d8a0471c
+380118ff
+3807fd29
+3809ed2e
+380cad89
+e7e48005
+38030c14
+380475b3
+380805df
+380f709c
+e7e48005
+3802918d
+380457e1
+38080079
+e7e30005
+20600000
+473d402f
+6fe0c6b9
+c1800000
+6fe08874
+c1800000
+d8a0471c
+18000e0b
+20407032
+180a7e00
+1fe37e00
+e7e10005
+6fe0c6b7
+245a6feb
+d8a00580
+d8c0471c
+20407d0b
+d8a004a8
+d8c00790
+20407d09
+d8a004d8
+20407d16
+7004d801
+2040740e
+70087401
+20600000
+d8a04734
+d8c004f0
+20407d09
+7046b901
+70087400
+20600000
+473dc02f
+6fe0887b
+c1800000
+6fe08874
+c1800000
+d8a00580
+d8c0471c
+20407d0b
+d8a004a8
+d8c00888
+20407d09
+d8a004d8
+20407d16
+7004d801
+2040740e
+70087402
+20600000
+70087501
+d8a008c8
+d8c004f0
+20407d0b
+70087b01
+70087400
+20600000
+18e08fff
+24610000
+180a7e00
+e7e10005
+20207032
+18e08fff
+24217043
+efe20011
+1fe20400
+efe20012
+9842fe00
+2422f041
+1a20a204
+1a40a404
+20207037
+7840fc00
+20600000
+7820fc00
+20600000
+473e402f
+6fe08872
+207a0000
+204059e1
+247a0000
+70087200
+6fe08870
+c001d907
+c002d929
+c003d934
+c005d949
+c0016ed5
+c0026f4f
+c004ef83
+c0056fb0
+c0066fd6
+20600000
+473ec02f
+6fe08873
+207a0000
+204059e1
+247a0000
+70087300
+6fe08871
+c00958eb
+c009d8f0
+c001d8f4
+c0026f6e
+c00a58f8
+c003d905
+c0056fb0
+c005d948
+c004ef83
+c00ad942
+20600000
+70087301
+20600000
+70087300
+20600000
+473f402f
+6fe0c764
+207a0000
+6fe08874
+207a0000
+1fe0fe80
+67e08874
+c3838000
+6fe084a5
+203a7077
+20207419
+20407263
+6fe08874
+c000f014
+c001702b
+20600000
+1fe10e07
+1fe97e00
+98c08c00
+efe08006
+afec0000
+20600000
+20407d0b
+20407d0b
+20207d0b
+efe40006
+247a0000
+efe40006
+247a0000
+efe40006
+20600000
+efe20011
+98000400
+efe20012
+98467c00
+24628000
+1a20a204
+1a40a404
+c200708b
+20600000
+18007206
+1a20a214
+1a40a414
+efe20012
+98000400
+efe20011
+98467e00
+24610000
+247a0000
+1a20a3fc
+1a40a5fc
+c2007097
+20600000
+18007206
+18002600
+efe20011
+98000400
+efe20012
+9840fe00
+9a60fe00
+e7e20005
+2feffe20
+7920a600
+1a20a204
+1a40a404
+c20070a3
+20600000
+18007206
+18002600
+efe20012
+98000400
+efe20011
+98467e00
+9a667e00
+e7e20005
+2feffe20
+7920a600
+1a20a204
+1a40a404
+c20070b1
+20600000
+18007206
+1a20a214
+18002600
+efe20011
+2feffe00
+7920a601
+1fe37e00
+2a6ffe00
+7920fe1f
+e7e20011
+1a20a3fc
+1a632600
+c20070c0
+20600000
+18007206
+18002600
+efe20011
+2feffe1f
+7920a601
+1fe3fe00
+2a6ffe00
+7920fe00
+e7e20011
+1a20a204
+1a632600
+c20070cd
+20600000
+204070cb
+2a6ffe00
+2020f0e1
+da400748
+1a222600
+1a20a3e8
+20407094
+24610000
+1a622200
+1a20a3e8
+da400748
+1a220a00
+202070af
+204070a1
+18a22200
+202070d9
+204070af
+2a6c0000
+20608000
+da400748
+18a0a3e8
+1a220a00
+202070a1
+18a21600
+1a226000
+da4005d8
+1a420a00
+1a208c18
+efe40006
+e7e40005
+e7e40005
+18007e00
+e7e40005
+19620a00
+204070e5
+da4005d8
+1a420a00
+18007e00
+e7e40005
+1e008c20
+efe40006
+e7e40005
+e7e40005
+19622200
+1a220a00
+204070e5
+da4005d8
+1a420a00
+1e008c28
+efe40006
+e7e40005
+e7e40005
+e7e40005
+19622200
+1a220a00
+202070e5
+18007206
+efe20006
+98005e00
+1f00f001
+c2007111
+20600000
+18a21600
+d8a005a8
+20407d16
+d8a005a8
+1a220c00
+18007000
+20407110
+1a420c00
+20407110
+18002400
+18000400
+18002606
+efe20005
+98002200
+1a427000
+1de27e00
+1a627000
+9deffe00
+9a20fe00
+9840fe00
+e7e20005
+1fef0400
+1a60a601
+2a61fe0c
+2420f122
+18427e00
+e7e20005
+18a08be8
+1a40a401
+2a41fe06
+2420f120
+da2005a8
+19620a00
+202070ef
+1a222400
+20207116
+1a226000
+1e022200
+efe08011
+2feffe00
+20608000
+204070bd
+efe08012
+2fec0000
+2020f14a
+da200748
+1a420a00
+204070a1
+efe08012
+9a60fe00
+e7e08012
+1a40a5e8
+1a40a218
+18007207
+204070bf
+2020713b
+18a21600
+d8a00608
+20407d16
+18007e00
+67e205c0
+67e20620
+70060801
+d8a005a8
+20407d16
+d8c00748
+d8a005d8
+20407d0b
+1a220c00
+d8a005f0
+20407d0b
+d8c005f0
+20407085
+203a7186
+da2005f0
+da400608
+2040713a
+da2005d8
+da4005a8
+2040713a
+da2005f0
+da4005d8
+20407094
+20217178
+da2005d8
+da4005f0
+1a220a00
+204070af
+da200608
+da4005a8
+1a420a00
+204070a1
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+2020715d
+da2005f0
+da4005d8
+1a220a00
+204070af
+da2005a8
+da400608
+1a420a00
+204070a1
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+2020715d
+d8a00608
+20407d16
+6fe085c0
+67e08608
+67e08610
+da200608
+da4005a8
+1a420a00
+204070e5
+da200748
+da4005a8
+19620a00
+202070e8
+da200568
+d8a00620
+20407138
+da200620
+d8a00638
+20407138
+da200760
+da400638
+d8a00638
+20407116
+da200538
+d8a00620
+20407138
+d8c00620
+d8a005f0
+20407d0b
+da2005f0
+204070d8
+da200620
+da4005f0
+d8a00620
+204070e5
+da200620
+da400638
+d8a00620
+204070e5
+d8c00538
+d8a005f0
+20407d0b
+da200550
+d8a00638
+20407138
+da2005f0
+204070d8
+da2005f0
+204070d8
+da2005f0
+da400638
+d8a005f0
+20407116
+da200638
+d8a00608
+20407138
+da200608
+204070d8
+da200608
+204070d8
+da200608
+204070d8
+d8c00550
+d8a00638
+20407d0b
+da200638
+204070d8
+da200638
+da400568
+d8a00568
+20407116
+da200620
+d8a00638
+20407138
+da200638
+da4005f0
+d8a00638
+204070e8
+da200638
+da4005f0
+d8a00538
+204070e8
+da2005f0
+da400538
+d8a00638
+204070e8
+da200638
+da400620
+d8a00638
+20407116
+da200638
+da400608
+d8a00550
+202070e8
+da2004d8
+d8a00650
+20407138
+da200538
+da400650
+d8a00608
+20407116
+da2004d8
+da400650
+d8a00650
+20407116
+da200550
+da400650
+d8a005f0
+20407116
+da200568
+d8a00650
+20407138
+da2004a8
+da400650
+d8a00620
+20407116
+da200568
+da400650
+d8a00650
+20407116
+da2004c0
+da400650
+d8a00638
+20407116
+da200608
+da400620
+d8a00650
+204070e8
+da200608
+da400620
+d8a00608
+204070e5
+da2005f0
+da400638
+d8a00620
+204070e8
+da2005f0
+da400638
+d8a005f0
+204070e5
+da2005f0
+da400650
+d8a005f0
+20407116
+da200568
+da4004d8
+d8a00638
+20407116
+da200638
+da400650
+d8a00568
+20407116
+da200650
+d8a00650
+20407138
+da200650
+da400608
+d8a00638
+20407116
+da200650
+da4005f0
+d8a005f0
+20407116
+da200620
+d8a00538
+20407138
+da200538
+da400638
+d8a00538
+204070e8
+d8c00538
+d8a00650
+20407d0b
+da200650
+204070d8
+da200638
+da400650
+d8a00638
+204070e8
+da200638
+da400620
+d8a00620
+20407116
+da200620
+da4005f0
+d8a00550
+204070e8
+da200550
+da400748
+d8a00550
+18002600
+6fe08550
+2feffe00
+2040f0a1
+1a626000
+da200550
+204070bd
+6fe08567
+2e0ffe00
+7920fe07
+67e08567
+20600000
+6fe084a5
+1fe0ffff
+24610000
+67e084a5
+6fe084a4
+205a7193
+6fe084a5
+d8c00580
+2040707c
+2020f250
+6fe084a4
+243a725e
+204071e4
+20207250
+7004a400
+d8c004a8
+d8a00538
+20407082
+20207250
+da200568
+d8a00638
+2040714e
+da200638
+d8a005f0
+20407138
+da200538
+da4005f0
+d8a004f0
+20407116
+da200638
+da4005f0
+d8a00620
+20407116
+da200550
+da400620
+d8a00508
+20207116
+efe20006
+18002204
+18a08a03
+e7e08005
+1fecfe00
+18a08bfe
+1a20a3ff
+2422f278
+18a08a05
+c2007275
+20600000
+18ebfe00
+99608c00
+efe20006
+20600000
+18006010
+d96004a8
+1e008ff9
+20407280
+98000400
+1e008ff0
+20407280
+98408400
+1e008ffe
+20407280
+1fee7e01
+98408400
+1e008ff1
+20407280
+1fee7e00
+98408400
+1e0bfe00
+99608a00
+e0420005
+1e00e001
+2e01fe40
+2420f286
+20600000
+d8c007c0
+18007007
+efe20006
+98005e00
+1f00f1ff
+2021729d
+20600000
+473fc02f
+20407284
+d8a005a8
+18007000
+1de27e00
+e7e20005
+1f00f001
+2f01fe08
+2420f2a6
+20406df3
+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
+c20072af
+d8c005a8
+18007000
+efe20006
+9de0de00
+1f00f001
+2f01fe08
+2420f2d8
+20206df7
+d8a00900
+18007007
+1de27e00
+e7e20005
+1f00f1ff
+202172e0
+20600000
+d8a004a8
+18c08dfc
+1f262210
+efe20006
+9842fe00
+e7e20005
+18c08df8
+c20072e8
+1a227200
+18427e00
+e7e20005
+c20072ef
+20600000
+6fe0c645
+c00172f9
+c000f2f6
+20600000
+204072fe
+204072de
+20207324
+20407338
+204072de
+20207324
+204072fe
+20207324
+d8c008a0
+d8a004a8
+18007206
+20407422
+d8c0474c
+18007206
+20407422
+d8c00900
+20407421
+2040729b
+204072a2
+d8c008f0
+d8a004a8
+2020731b
+d8c0474c
+d8a004a8
+18007206
+20407422
+d8c008a0
+18007206
+20407422
+d8c008f0
+20407421
+2040729b
+204072a2
+d8c00900
+d8a004a8
+2040731b
+20207324
+20407421
+58800000
+1fed7e00
+e7e20005
+18007205
+20407d17
+58000280
+e7e20005
+202072a2
+6fe20900
+da2003e8
+9a26fc00
+20407def
+18077e00
+67e2087c
+1807fe00
+da2003e8
+9a26fc00
+20407def
+18077e00
+da2003e8
+9a2ffe00
+684a087c
+9840fe00
+67e2087c
+20600000
+20407338
+204072de
+20207324
+d8c008a0
+d8a004a8
+18007208
+20407422
+d8c046fc
+18007208
+20407422
+2040729b
+204072a2
+d8c00900
+d8a004a8
+20407421
+d8c008f0
+20207346
+20407421
+58800000
+1fed7e00
+e7e20005
+18007203
+20407d17
+58000300
+e7e20005
+202072a2
+70476e00
+20207353
+6fe0c76c
+c081734f
+47404030
+58363636
+1fed0400
+18418436
+6fe10940
+1fe20c00
+18007204
+204072e5
+2040729b
+204072a2
+6fe10942
+1fe20c00
+d8a004a8
+18007206
+20407422
+6fe10944
+1fe20c00
+18007206
+20407422
+58800000
+e7e18005
+6fe0c76e
+e7e08005
+18007e00
+e7e40005
+58000388
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+6fe10940
+1fe20c00
+18007204
+204072e5
+2040729b
+204072a2
+d8c005e8
+d8a004a8
+18007208
+20407422
+58800000
+1fed7e00
+e7e20005
+20407d16
+58000300
+e7e20005
+204072a2
+202072de
+58363636
+1fed0400
+18418436
+d8c008e0
+18007206
+204072e5
+2040729b
+204072a2
+6fe1094c
+1fe20c00
+d8a004a8
+20407421
+6fe1094e
+1fe20c00
+20407421
+5862746c
+1fed7e00
+1fe1fe6b
+e7e20005
+d8c005f5
+18007203
+20407422
+58800000
+1fed7e00
+e7e20005
+18007e00
+e7e40005
+58000380
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007206
+204072e5
+2040729b
+204072a2
+d8c005e8
+d8a004a8
+18007208
+20407422
+58800000
+1fed7e00
+e7e20005
+20407d16
+58000300
+e7e20005
+204072a2
+202072de
+6fe0c76c
+c08173cf
+4740c030
+58363636
+1fed0400
+18418436
+d8c008e0
+18007206
+204072e5
+2040729b
+204072a2
+d8c00900
+d8a004a8
+20407421
+d8c008f0
+20407421
+202073e4
+58000000
+67e24794
+202073c0
+58000000
+67e24794
+202073d7
+6fe0c76c
+c08173d2
+58363636
+1fed0400
+18418436
+d8c008e0
+18007206
+204072e5
+2040729b
+204072a2
+d8c008f0
+d8a004a8
+20407421
+d8c00900
+20407421
+58000000
+e7e40005
+e7e20005
+6fe24794
+e7e20005
+18a20400
+7005e880
+18420a00
+d8c005f8
+20407421
+204072a2
+d8a004a8
+18007207
+20407d17
+e7e20005
+580003f8
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007206
+204072e5
+2040729b
+204072a2
+d8c005e8
+d8a004a8
+18007208
+20407422
+58800000
+1fed7e00
+e7e20005
+20407d16
+58000300
+e7e20005
+204072a2
+202072de
+7004a5c0
+6fe084a5
+207a0000
+1fe0ffff
+67e084a5
+d8c00580
+2040707c
+2020f40f
+d8c004a8
+d8a00538
+20207082
+20407193
+6fe084a5
+1fe0ffff
+67e084a5
+d8c00580
+2040707c
+20608000
+202071e4
+18007204
+18c08dfc
+efe20006
+e7e20005
+18c08df8
+c2007423
+20600000
+70476e00
+2020742c
+6fe0c76c
+c0817428
+58363636
+1fed0400
+18418436
+6fe10940
+1fe20c00
+18007204
+204072e5
+2040729b
+204072a2
+6fe10942
+1fe20c00
+d8a004a8
+18007208
+20407422
+6fe10944
+1fe20c00
+18007208
+20407422
+204072a2
+d8a004a8
+58800000
+e7e18005
+6fe0c76e
+e7e08005
+df200007
+20407d17
+58000408
+e7e20005
+2020736e
+6fe0c645
+c001744d
+c000f3be
+20600000
+6fe0c76c
+c0817486
+58363636
+1fed0400
+18418436
+d8c008e0
+18007208
+204072e5
+2040729b
+204072a2
+d8c00900
+d8a004a8
+20407421
+d8c008f0
+20407421
+58000000
+e7e40005
+e7e20005
+6fe24794
+e7e20005
+18a20400
+7005e880
+18420a00
+d8c005f8
+20407421
+204072a2
+d8a004a8
+18007207
+20407d17
+e7e20005
+580003f8
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007208
+204072e5
+2040729b
+204072a2
+d8c005e8
+d8a004a8
+18007208
+20407422
+58800000
+1fed7e00
+e7e20005
+20407d16
+58000300
+e7e20005
+204072a2
+202072de
+58000000
+67e24794
+2020744f
+58000000
+67e24794
+20207492
+6fe0c645
+c0017490
+c000f3d5
+20600000
+6fe0c76c
+c0817489
+58363636
+1fed0400
+18418436
+d8c008e0
+18007208
+204072e5
+2040729b
+204072a2
+d8c008f0
+d8a004a8
+20407421
+d8c00900
+20407421
+2020745c
+6fe0c645
+c00174a4
+c000f388
+20600000
+58363636
+1fed0400
+18418436
+d8c008e0
+18007208
+204072e5
+2040729b
+204072a2
+6fe1094c
+1fe20c00
+d8a004a8
+20407421
+6fe1094e
+1fe20c00
+20407421
+5862746c
+1fed7e00
+1fe1fe6b
+e7e20005
+d8c005f5
+18007203
+20407422
+58800000
+1fed7e00
+e7e20005
+18007e00
+e7e40005
+58000380
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+d8c008e0
+18007208
+20207477
+6fe340a8
+67e305e9
+6fe30041
+e7e30005
+58363636
+1fed0400
+18418436
+d8c041db
+18007204
+204072e5
+2040729b
+204072a2
+58627461
+1fed7e00
+1fe1fe6b
+67e204a8
+d8c005f5
+18007203
+20407422
+d8c046b2
+df200002
+20407422
+58800000
+1fed7e00
+e7e20005
+df200004
+20407d17
+580002c0
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+d8c041db
+18007204
+20207477
+6fe340a8
+67e305e9
+6fe30041
+e7e30005
+58363636
+1fed0400
+18418436
+d8c041db
+18007204
+204072e5
+2040729b
+204072a2
+58627464
+1fed7e00
+1fe1fe6b
+67e204a8
+d8c005f5
+18007203
+20407422
+58800000
+1fed7e00
+e7e20005
+df200005
+20407d17
+58000280
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+d8c041db
+18007204
+20207477
+d8c00910
+d8a00454
+20407d0c
+58000900
+67e10940
+58000434
+e7e10005
+58363636
+1fed0400
+18418436
+d8c00464
+18007204
+204072e5
+2040729b
+204072a2
+d8a004a8
+6fe10940
+1fe20c00
+20407421
+6fe10942
+1fe20c00
+20407421
+58800000
+1fed7e00
+e7e20005
+df200003
+20407d17
+58000300
+e7e20005
+204072a2
+204072de
+d8c00900
+d8a005c8
+20407d0a
+585c5c5c
+1fed0400
+1841845c
+d8c00464
+18007204
+20207477
+47414030
+6fe0c6b8
+243a7562
+7046ba00
+7046bb00
+20600000
+6fe0c6b8
+207a0000
+6fe0c6bb
+c1018000
+20407597
+20207547
+d8a046bc
+38001abd
+3805b34f
+38099b8a
+380e6562
+e7e48005
+380340b7
+38041efa
+3808aff6
+380cfd41
+e7e48005
+3803d210
+38066cf8
+380b874c
+380f157c
+e7e48005
+3802d4a3
+3807d27d
+38080003
+e7e28005
+20600000
+6fe0c6bb
+c1800000
+6fe0c6ba
+c1800000
+20406e52
+d8a046bc
+18000e0f
+20407032
+180a7e00
+1fe37e00
+e7e10005
+6fe0c6b7
+245a754d
+d8a00628
+d8c046bc
+20407d0a
+d8a00508
+d8c00820
+20407cff
+d8a00548
+20407d22
+70054801
+204075af
+7046ba03
+20600000
+d8a046dc
+d8c00568
+20407cff
+7046bb03
+7046ba00
+20600000
+6fe0887b
+c1800000
+6fe0c6ba
+c1800000
+d8a00628
+d8c046bc
+20407d0a
+d8a00508
+d8c00880
+20407cff
+d8a00548
+20407d22
+70054801
+204075af
+7046ba04
+20600000
+d8a008c0
+d8c00568
+20407d0a
+70087b03
+7046ba00
+20600000
+6fe0c6b8
+207a0000
+6fe0c6ba
+207a0000
+1fe0fe80
+67e0c6ba
+c3838000
+6fe104a5
+203a75a1
+202075a7
+4741c030
+204075bc
+6fe0c6ba
+c001f57b
+c0027591
+20600000
+204075ce
+6fe104a5
+1fe0ffff
+67e104a5
+d8c00628
+2040707c
+20608000
+2020761f
+47424030
+58000100
+67e104a5
+6fe104a5
+207a0000
+1fe0ffff
+67e104a5
+d8c00628
+2040707c
+2020f5b2
+d8c00508
+d8a005c8
+20207cfe
+da200608
+d8a00708
+2040768b
+da200708
+d8a006a8
+20407761
+da2005c8
+da4006a8
+d8a00568
+204076c9
+da200708
+da4006a8
+d8a006e8
+204076c9
+da2005e8
+da4006e8
+d8a00588
+202076c9
+da200608
+d8a006e8
+20407761
+da2006e8
+d8a00708
+20407761
+da200800
+da400708
+d8a00708
+204076c9
+da2005c8
+d8a006e8
+20407761
+d8c006e8
+d8a006a8
+20407d0a
+da2006a8
+20407768
+da2006e8
+da4006a8
+d8a006e8
+20407765
+da2006e8
+da400708
+d8a006e8
+20407765
+d8c005c8
+d8a006a8
+20407d0a
+da2005e8
+d8a00708
+20407761
+da2006a8
+20407768
+da2006a8
+20407768
+da2006a8
+da400708
+d8a006a8
+204076c9
+da200708
+d8a006c8
+20407761
+da2006c8
+20407768
+da2006c8
+20407768
+da2006c8
+20407768
+d8c005e8
+d8a00708
+20407d0a
+da200708
+20407768
+da200708
+da400608
+d8a00608
+204076c9
+da2006e8
+d8a00708
+20407761
+da200708
+da4006a8
+d8a00708
+2040777e
+da200708
+da4006a8
+d8a005c8
+2040777e
+da2006a8
+da4005c8
+d8a00708
+2040777e
+da200708
+da4006e8
+d8a00708
+204076c9
+da200708
+da4006c8
+d8a005e8
+2020777e
+da200548
+d8a00728
+20407761
+da2005c8
+da400728
+d8a006c8
+204076c9
+da200548
+da400728
+d8a00728
+204076c9
+da2005e8
+da400728
+d8a006a8
+204076c9
+da200608
+d8a00728
+20407761
+da200508
+da400728
+d8a006e8
+204076c9
+da200608
+da400728
+d8a00728
+204076c9
+da200528
+da400728
+d8a00708
+204076c9
+da4006c8
+da2006e8
+d8a00728
+2040777e
+da2006c8
+da4006e8
+d8a006c8
+20407765
+da4006a8
+da200708
+d8a006e8
+2040777e
+da2006a8
+da400708
+d8a006a8
+20407765
+da2006a8
+da400728
+d8a006a8
+204076c9
+da200608
+da400548
+d8a00708
+204076c9
+da200708
+da400728
+d8a00608
+204076c9
+da200728
+d8a00728
+20407761
+da200728
+da4006c8
+d8a00708
+204076c9
+da200728
+da4006a8
+d8a006a8
+204076c9
+da2006e8
+d8a005c8
+20407761
+da2005c8
+da400708
+d8a005c8
+2040777e
+d8c005c8
+d8a00728
+20407d0a
+da200728
+20407768
+da200708
+da400728
+d8a00708
+2040777e
+da200708
+da4006e8
+d8a006e8
+204076c9
+da2006e8
+da4006a8
+d8a005e8
+2040777e
+da2005e8
+da4007e0
+d8a005e8
+18002600
+6fe085e8
+2feffe00
+2040f763
+1a626000
+da2005e8
+20407793
+6fe08607
+2e0ffe00
+7920fe07
+67e08607
+20600000
+18a21600
+d8a006c8
+20407d22
+18007e00
+67e206e8
+7006c801
+d8a00648
+20407d24
+d8c007e0
+d8a00688
+20407d0a
+1a220c00
+d8a006a8
+20407d0a
+d8c006a8
+2040779d
+203a76c2
+da2006a8
+da4006c8
+204077a0
+da200688
+da400648
+204077a0
+da2006a8
+da400688
+20407799
+202176b4
+da200688
+da4006a8
+1a220a00
+20407791
+da2006c8
+da400648
+1a420a00
+20407763
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+20207699
+da2006a8
+da400688
+1a220a00
+20407791
+da200648
+da4006c8
+1a420a00
+20407763
+efe08011
+9a60a600
+efe08012
+9a60fe00
+e7e08012
+20207699
+da200648
+19620a00
+204076f2
+da2007e0
+19622400
+19620a00
+2020777e
+18a21600
+18007000
+d8a00648
+20407d24
+d8a0099e
+20407d24
+1a220c00
+70099e00
+58000000
+2040775b
+1a420c00
+2040775f
+18000e00
+d8a00648
+d840099e
+18e22400
+1a4bfe00
+9840a400
+18000400
+18002600
+efe20005
+98002200
+efe20012
+1a627000
+9deffe00
+9a20fe00
+9840fe00
+e7e20005
+1fef0400
+1a60a601
+2a61fe08
+2420f6dd
+18427e00
+e7e20005
+18a08be0
+18e08e01
+28e1fe08
+2420f6d7
+da200648
+19620a00
+202076f2
+4742c030
+18a21600
+1a226000
+da400688
+1a420a00
+20407d1f
+e7e40005
+1a208c2c
+20407d06
+20407d02
+1a422200
+20407768
+da400688
+1e022200
+19620a00
+20407765
+da400688
+1a420a00
+20407d1f
+e7e40005
+1e008c30
+20407d0c
+20407d1f
+1a422200
+20407768
+da400688
+19622200
+1a220a00
+20407765
+da400688
+1a420a00
+1e008c20
+20407d02
+20407d1f
+e7e40005
+1e008c38
+20407d06
+19622200
+1a220a00
+20407765
+da400688
+1a420a00
+1e008c24
+20407d02
+1e008c34
+20407d02
+1e008c34
+20407d03
+1e008c20
+20407d03
+19622200
+1a220a00
+20407765
+da400688
+1a420a00
+1e008c2c
+20407d02
+20407d1f
+e7e40005
+1e008c20
+20407d03
+1e008c28
+20407d03
+19622200
+1a220a00
+2040777e
+da400688
+1a420a00
+1e008c30
+20407d06
+20407d06
+18007e00
+e7e40005
+1e008c24
+20407d03
+1e008c2c
+20407d03
+19622200
+1a220a00
+2040777e
+da400688
+1a420a00
+1e008c34
+20407d02
+1e008c20
+20407d02
+20407d1f
+1e008c30
+20407d03
+19622200
+1a220a00
+2040777e
+da400688
+1a420a00
+1e008c38
+20407d06
+20407d1f
+1e008c24
+20407d02
+20407d1f
+1e008c34
+20407d03
+19622200
+1a220a00
+2020777e
+18007220
+d8a0099e
+98a08a00
+20207d5f
+18007208
+20207111
+1a222400
+202076c9
+18007208
+202070a2
+20407763
+18a22200
+20207769
+20407796
+2a6ffe00
+2020f772
+da4007e0
+1a222600
+1a20a3e0
+20407799
+24610000
+1a622200
+2020777a
+2040777a
+1a222600
+1a20a3e0
+da4007e0
+20407799
+24610000
+1a622200
+2020777a
+1a20a3e0
+da4007e0
+1a220a00
+20207791
+20407791
+2020f788
+18a0a3e0
+da4007e0
+20407799
+24610000
+da4007e0
+18a0a3e0
+1a220a00
+20207791
+18a0a3e0
+da4007e0
+1a220a00
+20407763
+20608000
+18a0a3e0
+da4007e0
+1a220a00
+20207763
+18007208
+202070b0
+18007208
+1a20a21c
+202070bf
+18007208
+18002600
+202070cd
+18007208
+1a20a21c
+1a40a41c
+20207097
+efe40006
+247a0000
+20207085
+1a226000
+1e022200
+efe08011
+2feffe00
+20608000
+20407793
+efe08012
+2fec0000
+2020f7b0
+da2007e0
+1a420a00
+20407763
+efe08012
+9a60fe00
+e7e08012
+1a40a5e0
+1a40a220
+18007209
+204070bf
+202077a1
+204015eb
+20758000
+204077bb
+20407861
+202077f0
+20407811
+20207850
+6fe0c790
+c17f8000
+98000400
+20406069
+6848c790
+20406065
+20000064
+6848c790
+20406050
+202077c5
+47434030
+6fe0c790
+c17f8000
+1fe20400
+20406059
+2420f7d7
+204077e1
+6fe1478c
+79207e0c
+67e1478c
+6fe0c783
+c1000000
+70478300
+6fe0c78f
+67e0c782
+204077e8
+70095b2c
+20207871
+6fe1478c
+793ffe0c
+67e1478c
+6fe0c783
+c1008000
+70478301
+70478200
+204077ea
+70095b2d
+20207871
+6fe0c782
+207a0000
+1fe0ffff
+67e0c782
+247a0000
+70095b10
+20207871
+d8e00007
+202015ba
+d8e00007
+202015be
+6fe1448d
+1a2fa40b
+9a40a400
+20600000
+6fe0c48c
+207a0000
+1fe27200
+6fe1448d
+1fe22400
+1a40a602
+e8408013
+20406069
+2040781a
+1a40a40b
+c20077f5
+20600000
+204077ec
+58000002
+e7e08012
+2040784a
+2020781f
+204077ec
+58000003
+e7e08012
+2040784a
+2020781a
+204077ec
+58000001
+e7e08012
+580000ff
+e7e08005
+2020781a
+204077ec
+df20000b
+1a620c00
+1a420a00
+20207d52
+6fe0c48c
+207a0000
+da200000
+20407824
+1a20a201
+6fe0c48c
+9a267c00
+20628000
+20207814
+1a40a602
+e8408013
+6fe0c09a
+c0044933
+20206065
+1a40a602
+e8408013
+6fe0c09a
+c004493f
+20206069
+1a208e0b
+20407d74
+247a0000
+204077ec
+efe08012
+c001781f
+c001f81a
+c000781a
+c002f838
+2040781f
+1a40a607
+20407cc8
+efe10013
+20407e05
+20407cd4
+58000005
+e7e08012
+1a40a603
+efe10013
+20207848
+2040781a
+1a40a609
+20407cc8
+efe10013
+20407e05
+20407cd4
+1a40a601
+efe08013
+c07ff844
+1fe0ffff
+e7e08013
+203a7801
+58000004
+e7e08012
+1a40a605
+efe10013
+1a208e0b
+20207d66
+58000000
+20207848
+58001000
+1ff07e00
+9a40a400
+20600000
+4743c030
+da200000
+684a4784
+1c422400
+1a427e00
+98467c00
+2441784c
+1a427e00
+184084a0
+184084a0
+98467c00
+24217864
+1a20a201
+1a217e0f
+243a7857
+da200000
+2040786a
+1c427e00
+67e24784
+20600000
+1a227e00
+207a0000
+18408560
+18408560
+793f841c
+604a4784
+2020317b
+70477001
+6fe0c771
+243a786c
+20600000
+70477000
+20600000
+47444031
+2040786b
+1a227e00
+67e20953
+da204772
+20407e25
+6fe20953
+1fe22200
+2020786f
+4744c031
+2040786b
+1a227e00
+67e20953
+da20477a
+20407e25
+6fe20953
+1fe22200
+2020786f
+58000000
+67e4477a
+67e44772
+20600000
+47454031
+6fe0c1db
+247a0000
+da20477a
+20407e3d
+207a0000
+70095200
+20407892
+6fe08952
+203a7887
+20600000
+2040786b
+da20477a
+20407e31
+1fe20400
+2040786f
+4745c031
+18427e00
+207a0000
+c000f8c4
+c00178c9
+c001f8cf
+c006f8ee
+c00778f4
+c007f8f9
+c00878ff
+c009f909
+c00a790b
+c00af90d
+c00b7917
+c00bf91a
+c00c791c
+c00cf91f
+c00f7931
+67e0895b
+204059e1
+243a78c2
+6fe0895b
+c584f8bd
+47464031
+6fe0895b
+c00278d1
+c002f8d4
+c00378df
+c00578e1
+c008f904
+c00df927
+c0097908
+c00ef928
+c00fe025
+c0106027
+c010f933
+c012df55
+20600000
+67e0895b
+20400a61
+2022f8c2
+20400a69
+24628000
+70095201
+2020787a
+6fe1478c
+79207e06
+67e1478c
+70409b03
+20600000
+70478a00
+70409b00
+6fe1478c
+793ffe06
+67e1478c
+20600000
+7041db05
+20600000
+70007d07
+70039e13
+20600000
+70007d17
+d8a003ac
+58000000
+2d0ffe1b
+7920fe01
+e7e08005
+58000000
+e7e10005
+6fe34455
+e7e30005
+20600000
+70007d18
+20600000
+7003a802
+6fe0804c
+c28178e7
+20405a14
+70007d08
+20600000
+793ffe02
+67e0804c
+204056f2
+58000000
+7934fe01
+67e08080
+20600000
+70442701
+70442a00
+6fe1478c
+79207e0b
+67e1478c
+20600000
+6fe1478c
+793ffe0b
+67e1478c
+70442700
+20600000
+70442701
+70442a01
+6fe1478c
+79207e0b
+67e1478c
+20600000
+6fe1478c
+793ffe0b
+67e1478c
+70442700
+20600000
+58000014
+67e102b5
+67e14394
+20202187
+20201f57
+da200000
+20207801
+da200000
+202077fc
+da200000
+204077ec
+efe08012
+c000f914
+c0027914
+c002f914
+20207806
+efe08006
+c17f8000
+20207806
+7043e201
+7041db1b
+20600000
+7043e201
+20600000
+7043e200
+7041db00
+20600000
+6fe1445d
+20407e05
+6fe0c790
+c07ff925
+1fe20400
+20406050
+20407883
+2020148c
+20201f99
+70007d34
+79200003
+24748000
+70464200
+70007d13
+6fe080bd
+793ffe02
+67e080bd
+20600000
+18000e03
+20207d65
+20405a1d
+70007e41
+2020568e
+6fe0c78c
+c4060000
+c4038000
+20207931
+6fe1448a
+1fe08a02
+58000000
+e7e18005
+20600000
+20407e56
+20407989
+207a0000
+6fe1448a
+1fe0a402
+e8408012
+18408401
+e0408012
+e840803f
+18427200
+1fe0a404
+efe08012
+984ffe00
+98c08a00
+1a220c00
+20407d5f
+2040798d
+1fe0ffff
+e8408012
+18408401
+98410400
+e0408012
+20207e54
+20407e56
+20407985
+207a0000
+6fe1448a
+1fe0a402
+e8408012
+184085ff
+e0408012
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08c01
+1a220a00
+2020794e
+20407e56
+20407985
+207a0000
+6fe1448a
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08c01
+18c22400
+1a220a00
+20407d5f
+20207e54
+20407e56
+20407985
+207a0000
+6fe1448a
+e840803f
+18427200
+1fe0a403
+efe08012
+984ffe00
+98c08c00
+18c08a02
+1a220c00
+1f20f3ff
+20407d5f
+20207e54
+6fe1448a
+1fe08c02
+efe08006
+20600000
+2040798d
+e8408006
+98467e00
+20600000
+6fe1448a
+1fe08c01
+efe08006
+20600000
+4746c031
+6ff08c23
+2feffe03
+2040f99d
+6ff08c23
+67f08c23
+67e089f6
+204079fd
+20407a25
+20407c0e
+20407c56
+202079f5
+47474031
+20406df3
+204079bc
+708c0000
+20002710
+708c18c0
+6ff10050
+793ffe0a
+67f10050
+708c1100
+708c003c
+58000a4f
+67f10c03
+67f10c07
+58000a8f
+67f10c05
+708c1104
+708c0200
+708c23ff
+58000c4b
+d8a00b59
+98a67200
+20207d26
+68488b58
+20206050
+6fe08bfa
+207a0000
+68488b58
+20406059
+2020f99d
+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
+20407d5f
+d8c09ab6
+d8a00aaa
+df20003c
+20407d5f
+6fe10b45
+20207e05
+6fe08b47
+207a0000
+67e08acc
+67e08ae5
+20600000
+d8e00000
+20407d74
+247a0000
+6fe08bfb
+247a0000
+6fe08bfa
+245a7cac
+20600000
+6fe089f6
+c2817a00
+20600000
+20407a05
+20407d73
+58000280
+d8e00000
+20207d66
+6fe08bec
+c0817a0a
+700bfb00
+700bfc00
+20600000
+6fe08bfe
+207a0000
+700bfe00
+700bec02
+700bfa01
+20600000
+6fe089f6
+c2807a30
+20600000
+6ff08c24
+c3830000
+69510c03
+6a110c05
+68710c07
+efe10003
+1fec8400
+18518400
+d8c00fff
+98c17200
+1f222200
+efe08003
+e7e08005
+c2007a1e
+60710c07
+622109f8
+20600000
+20600000
+4747c031
+6fe089f6
+c4028000
+d8a00b59
+20407a13
+18427e00
+c0007a2d
+20207a24
+6fe089f8
+1fe67c07
+20610000
+47484032
+793f8023
+6fe08b59
+1fe17e80
+c0407a37
+c0007a3f
+2020137a
+6fe08b59
+1ff1fe00
+1fe37e00
+1fe17e03
+c0007a47
+c000fa4d
+c0017a52
+2020137a
+6fe08b59
+1ff1fe00
+1fe37e00
+1fe17e03
+c0007a53
+c000fa5b
+c0017a60
+2020137a
+6fe08b5a
+c0047a67
+c0037a7d
+c0057ac2
+c0007ad4
+20207a61
+6fe08b5a
+c0017b09
+c000fb0d
+c001fb1e
+20207a61
+20207a61
+6fe08b5a
+c000fb28
+c001fb57
+c002fb81
+c004fb9a
+c005fbb5
+c003fa61
+20207a61
+6fe08b5a
+c0057bc6
+c004fbd8
+c005fbf5
+20207a61
+20207a61
+6ff08c19
+79207e00
+67f08c19
+20207a65
+708c1810
+20600000
+6fe08b59
+c0c07a61
+6fe08b5d
+c0807a61
+6fe08b5e
+c0807a61
+6fe08b5f
+c080fa61
+6fe08b60
+c0807a61
+6fe08b5b
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b57
+c0027a79
+c001fa7b
+20207a61
+da400001
+20207aee
+da400001
+20207aec
+4748c032
+6fe08b5c
+c000fa90
+c0017aa9
+c001faac
+c010fa85
+c0117aba
+20207a61
+700be900
+6fe08b5d
+c0007a8a
+c000fa8d
+20207a61
+6a408abd
+da200abd
+20207c04
+6a408ad6
+da200ad6
+20207c04
+6fe08bfd
+245a7aa1
+58000a97
+68488a97
+67e10bf4
+60488bf6
+6fe08b5f
+98467c00
+24217a9f
+6fe08bf6
+98002400
+6fe10bf4
+1fe0fe01
+98002200
+20207c04
+6fe08b5f
+20207a9a
+6ff08c02
+245a7aa5
+700bfd00
+20600000
+6ff08c02
+79207e07
+67f08c02
+20600000
+58000aaa
+68488aaa
+20207a94
+6fe08b5b
+1fe67c03
+24217a61
+6fe08b5b
+da200ae6
+c0007c02
+79200023
+da200aeb
+c000fc02
+da200b09
+c0017c02
+da200b27
+c001fc02
+20600000
+6fe10b5d
+c000fabe
+6a210a93
+20207c02
+700bfa01
+700bec01
+6a210a95
+20207c02
+6fe08b57
+c0827a61
+6fe08b59
+c0c0fa61
+6fe08b5b
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b5f
+c080fa61
+6fe08b60
+c0807a61
+6fe08b5d
+c0807a61
+6fe08b5e
+c0807a61
+da400001
+20207aec
+6fe08b57
+c0017a61
+6fe08b5b
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b5f
+c0817a61
+6fe08b60
+c0807a61
+6fe08b5e
+c0807a61
+6fe08b59
+c0407ae7
+c040faf2
+c0417af6
+20207a61
+700bef01
+20207af0
+6fe08b5d
+c0807a61
+da400002
+6fe08bed
+c000fae5
+da200b51
+20207c04
+da200b53
+20207c04
+da200b55
+20207c04
+6fe08b57
+c0827a61
+da400002
+20207aec
+6fe08b57
+c0827a61
+6fe08b5d
+c040fb03
+c0417b05
+c041fb07
+1fe17e7f
+c0007aff
+20207a61
+6fe08bf0
+da400002
+c000faee
+20207aec
+6fe08bf1
+20207b00
+6fe08bf2
+20207b00
+6fe08bf3
+20207b00
+700be701
+da200be8
+da400001
+20207c04
+6fe10b5b
+d84001ba
+98467c00
+2422fa61
+6fe08be4
+243a7b1b
+700ba100
+6fe08b5f
+98002400
+da200ba1
+20407c04
+d8a00ba1
+df200008
+20207d17
+700be400
+700ba101
+20207b14
+6fe08b5f
+c080fa61
+700be901
+da400001
+6fe08beb
+c0007b26
+c000fb27
+20207aec
+20207aee
+20207aec
+6fe08b57
+c0827a61
+6fe08b5f
+c0807a61
+6fe08b60
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b5e
+c0807a61
+6fe08b59
+c0007b37
+c000fb44
+c0017b45
+20207a61
+6fe08b5b
+c080fa61
+6ff08c00
+793ffe07
+67f08c00
+700bed00
+700bee01
+6fe08bef
+203a7a65
+700bef00
+700bee00
+700bec02
+20207a65
+20207a61
+6fe08b5b
+c0807a61
+6fe08b5d
+c040fb50
+c0417b53
+c041fb55
+1fe17e7f
+c0007b4e
+20207a61
+700bf000
+20207a65
+700bf100
+700bfe01
+20207a65
+700bf200
+20207b51
+700bf300
+20207b51
+6fe08b5f
+c0807a61
+6fe08b60
+c0807a61
+6fe08b59
+c0007b60
+c000fb6d
+c0017b6e
+20207a61
+6fe08b5b
+c080fa61
+6ff08c00
+79207e07
+67f08c00
+700bed01
+700bec03
+700be500
+20407a65
+20407d73
+58001388
+d8e0000f
+20207d66
+20207a61
+6fe08b5b
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b5d
+c040fb7b
+c0417b7d
+c041fb7f
+1fe17e7f
+c0007b79
+20207a61
+700bf001
+20207a65
+700bf101
+20207a65
+700bf201
+20207a65
+700bf301
+20207a65
+6fe08b59
+c0807a61
+6fe08b5d
+c0807a61
+6fe08b5e
+c0807a61
+6fe08b5f
+c0807a61
+6fe08b60
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b5b
+1fe17e80
+c0807a61
+6fe08b5b
+c0807b98
+700b5702
+6fe08b5b
+67f08c02
+20407a65
+700bfd01
+20600000
+700b5703
+20207b93
+6fe08b57
+c0017a61
+6fe08b59
+c0807a61
+6fe08b5d
+c0807a61
+6fe08b5e
+c0807a61
+6fe08b5f
+c0807a61
+6fe08b60
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b5b
+1fe67c01
+24217a61
+6fe08b57
+c001fbaf
+c0027baf
+20207a61
+6fe08b5b
+c0007bb3
+700b5704
+20207a65
+700b5703
+20207a65
+6fe08b57
+c0827a61
+6fe08b59
+c080fa61
+6fe08b5b
+c0807a61
+6fe08b5c
+c0807a61
+6fe08b5f
+c0807a61
+6fe08b60
+c0807a61
+6fe08b5d
+c0807a61
+6fe08b5e
+c0807a61
+20207a65
+47494032
+700be701
+6fe08b5c
+67e08be8
+6fe08b5d
+1fe67c01
+2042fbd4
+6fe08bec
+c0827a65
+700bec02
+20407a65
+20007530
+20007530
+20600000
+700bfa01
+700bee00
+700bec04
+20600000
+d8a00b61
+20407a13
+700be301
+20407be7
+6fe10b5b
+67e10be1
+20407a65
+6fe0c09a
+c1820000
+6fe08be5
+207a0000
+6fe08b61
+67e0c8ca
+7048ba03
+20600000
+6fe10b5b
+d8400200
+98467c00
+24628000
+6fe10b5d
+d8400000
+98467c00
+24628000
+6fe10b5f
+d8400001
+98467c00
+24628000
+700be501
+20600000
+6fe08b5f
+c0807a61
+6fe08b5b
+c0007bfb
+c000fbfe
+20207a61
+700bea00
+700beb01
+20207a65
+700be601
+700bea01
+700beb00
+20207a65
+ea408011
+1a20a201
+4749c032
+7920000e
+c591fc09
+1a40a401
+1a43a400
+62210a90
+62408a92
+20207c0e
+d8e00000
+20207c4e
+474a4032
+6ff08c24
+c3800000
+6fe08a92
+207a0000
+1fe27200
+98000400
+6fe10b5f
+1fe67c40
+20217c1c
+1f267c40
+20217c20
+18007240
+20207c20
+9f267c00
+20217c20
+98007200
+67e08a92
+6fe08a92
+9f267e00
+67e08a92
+1f20ffff
+67e089fa
+c591fc32
+1fe37e00
+1f20ffff
+67e089fa
+c5877c32
+793f800e
+e0408005
+58000003
+e7e08005
+1f20f3ff
+1f227e00
+2422fc32
+1f20f201
+6fe10a90
+1fe20c00
+efe08006
+e7e08005
+c591fc39
+58000000
+e7e08005
+c2007c34
+18c27e00
+67e10a90
+580009fa
+67f10c09
+d8e00000
+20407c4e
+6fe08a92
+247a0000
+6fe08bec
+c1808000
+700bec02
+20600000
+d8e00001
+da200a3b
+62310c0b
+1f20ffff
+e7e08011
+efe08006
+e7e08005
+c2007c4b
+58000000
+f9207e00
+67f08c18
+20600000
+d8e00002
+da200a45
+62310c0d
+20207c49
+474ac032
+6fe08bf9
+207a0000
+6fe08bfa
+203a7c7a
+6fe08bec
+c001fcb4
+c0817c7a
+6fe08bee
+243a7c7a
+20407c62
+20207c6d
+6ff08c24
+c3808000
+6fe08bf9
+c4008000
+6fe08bf9
+793ffe01
+67e08bf9
+6fe08bf7
+207a0000
+c0087c9c
+2020137a
+6ff08c24
+c3810000
+6fe08bf9
+c4010000
+6fe08bf9
+793ffe02
+67e08bf9
+6fe08bf8
+207a0000
+c0107c7d
+c010fc98
+c0117ca0
+2020137a
+d8a00bff
+df200008
+20207d17
+6fe08be7
+68488be9
+98417e00
+203a7c94
+68488bea
+9840fe00
+c000fc85
+20207c94
+700bf800
+6fe08c00
+c0017c95
+c001fc95
+6fe08c00
+67e08bff
+6fe08c01
+e7e08005
+6fe08c03
+e7e08005
+6fe08c05
+e7e08005
+df200004
+d8c00bff
+20207c52
+700bf800
+df200008
+d8c00bff
+20207c52
+700bf800
+df200003
+d8c00c1f
+20207c52
+700bf700
+df200008
+d8c00c0f
+20207c46
+700bf800
+df200002
+d8c00c2f
+20207c52
+6fe08bec
+c0017ca7
+20600000
+6ff08c00
+79207e07
+67f08c00
+700bfc01
+20600000
+6fe08bec
+c1018000
+c0017cb0
+20600000
+6fe08bfc
+207a0000
+700bfb01
+20207cb7
+d8e0000f
+20407d74
+247a0000
+6ff08c00
+c4038000
+708c00fc
+20007530
+708c003c
+20600000
+1f267c00
+20628000
+1fe37e00
+c2007cbf
+20600000
+18007e01
+1f267c00
+20628000
+1fe3fe00
+c2007cc5
+20600000
+60a1097d
+604c0964
+6162096c
+20407cd0
+60c1097b
+67210987
+60e10985
+20600000
+62220970
+62420974
+62618978
+20600000
+6fe1097d
+98000a00
+684c0964
+6962096c
+20407cde
+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
+20407d0a
+20407d0a
+20207d0a
+20407d06
+20407d06
+efe20006
+e7e20005
+20600000
+efe40006
+e7e40005
+20600000
+20407d0c
+20407d06
+20407d06
+20407d06
+20207d06
+1fe0ffff
+20000026
+243a7d0e
+20600000
+df20000a
+20002ee0
+c2007d13
+20600000
+18007203
+18007e00
+e7e40005
+c2007d18
+20600000
+20407d1c
+18007e00
+e7e40005
+20600000
+18007e00
+e7e20005
+20600000
+18007204
+20207d17
+18007208
+20207d17
+1f227e00
+207a0000
+58000000
+e7e08005
+c2007d29
+20600000
+df200020
+d8a0098e
+20207d26
+efe20013
+e8420011
+9842fe00
+e7e20005
+1a20a204
+1a60a604
+c2007d2f
+20600000
+474b4032
+1f227e00
+1fe67c01
+20610000
+9a20a400
+1a40a5ff
+1f237200
+e8408011
+efe08012
+e7e08011
+e0408012
+1a40a5ff
+1a20a201
+c2007d3e
+20600000
+1fef0400
+20407d4c
+18508400
+1ff07e00
+9841fe00
+20600000
+1ff10c00
+18d08c00
+1ff0fe00
+1ff07e00
+98c1fe00
+20600000
+1f227e00
+207a0000
+1f20f3f8
+20417d06
+20628000
+20217d54
+1f20f208
+1f20f3fc
+20417d03
+20628000
+20217d59
+1f20f204
+20207d5f
+1f227e00
+207a0000
+efe08006
+e7e08005
+c2007d61
+20600000
+58000000
+1c430400
+604a409c
+d8a041aa
+98000400
+18e3fe00
+98a08a00
+e0410005
+474bc032
+20600000
+d9600800
+19701600
+9960fe00
+20600000
+d8e00000
+474c4033
+684a409c
+1c437e00
+67e2409c
+98467c00
+24417d6f
+98461600
+19620400
+d8c041aa
+18c20a00
+df200010
+efe10006
+98467e00
+20217d83
+18007e00
+e7e10005
+c2007d7f
+d8c041aa
+18e3fe00
+98c08c00
+efe10006
+20600000
+98408400
+18427200
+6fe10163
+9f267e00
+20610000
+1fe67e00
+18510400
+18408401
+18500400
+98418400
+20600000
+20407d97
+20207da4
+78547c00
+98467e00
+20217d9c
+78347c00
+1fe67e00
+c4078000
+1fe22800
+d8410000
+6fe10163
+98467e00
+9a80fe00
+793ffe40
+20600000
+68490163
+98000c00
+1ff17e00
+984ffe00
+98c0fe00
+20600000
+1fed7e00
+1ff27e00
+6849c174
+9846fc00
+20407def
+18078400
+20600000
+68490163
+9846fc00
+20407dec
+1ff07e00
+18070400
+98418400
+20600000
+d8400000
+18422800
+efe08003
+20407dc4
+1a820400
+20407dfe
+da40000a
+9a4ffe00
+9840fe00
+1fe20400
+c2007db9
+20600000
+d840003a
+98467c00
+24217dcd
+d8400061
+98467c00
+20217dd0
+d8400037
+98467e00
+20600000
+d8400030
+98467e00
+20600000
+d8400057
+98467e00
+20600000
+18426000
+580001ff
+18002400
+1fe92200
+1a232200
+9a22a200
+2a2ffe00
+7920fe09
+18430400
+2feffe00
+79208407
+1fe37e00
+1a40a401
+2a400e00
+2420fdd6
+e0408005
+c2007dd6
+1e020400
+20600000
+58000000
+1f222200
+e8410006
+9840fe00
+c2007de8
+9a26fc00
+20407def
+1807fe00
+20600000
+207a8000
+20207def
+efe08011
+e8408012
+98467c00
+24628000
+1a20a201
+1a40a401
+c2007df1
+18007c00
+20600000
+98467c00
+24610000
+18427e00
+20600000
+9840fe00
+98460400
+98467e00
+20600000
+df200200
+d8a04000
+20207d17
+207a0000
+1fe27a00
+6ff1010e
+243a7e07
+20600000
+70820301
+20600000
+67f10205
+6ff08203
+79207e04
+67f08203
+20600000
+67f10207
+6ff08203
+79207e06
+67f08203
+20600000
+67f10205
+70820330
+20600000
+6ff08043
+79207e04
+67f08043
+20600000
+6ff08043
+793ffe04
+67f08043
+20600000
+6ff1010e
+d8400200
+98467c00
+20600000
+474cc033
+e8440011
+18417eff
+243a7e2b
+184cfe00
+e7e40011
+1a20a207
+efe08011
+243a137a
+6fe0895b
+e7e08011
+20600000
+474d4033
+df200008
+efe40011
+207a0000
+efe08011
+243a7e3a
+1a20a201
+c2007e35
+2020137a
+d8400000
+e0408011
+20600000
+efe40011
+20600000
+efe08011
+20600000
+efe10011
+20600000
+d8400000
+6fe08006
+c2007e44
+18408401
+c2007e44
+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
+c2007e64
+20600000
+1f227e00
+207a0000
+18c27e00
+9f20fe00
+1fe0ffff
+1fe20c00
+efe08006
+18c08dfe
+e7e08005
+c2007e6e
+20600000
+19622400
+da609420
+18007224
+18005600
+18006e00
+20407e88
+52207e00
+9d60d600
+50407e00
+9ee0ee00
+1a40a404
+1a60a602
+c2007e78
+55607e00
+d8400024
+20407ed4
+e7e20005
+56e07e00
+20407ed4
+e7e20005
+20600000
+edc10012
+eb808013
+20407eb9
+98482200
+eb808006
+20347e8f
+1b863800
+1a408c02
+edc10006
+20407eb9
+98483000
+52207e00
+9b062200
+edc10012
+55c07e00
+98483000
+edc10006
+eb808013
+20407eb9
+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
+20207eb1
+9feffe00
+1ff1fe00
+1fe97e00
+20600000
+55c07e00
+53800400
+20600000
+c40f8000
+18000400
+79200420
+184085ff
+9842fe00
+1fe0fe01
+20600000
+98002200
+db000000
+7920301e
+da400000
+df200010
+1b027e00
+9a40fe00
+1a432400
+9a267e00
+2022fece
+20217ed1
+1fe62200
+1b027e00
+9a41a400
+1b0b3000
+c2007ec8
+20600000
+793f802c
+c31ffed8
+7920002c
+1fe67e00
+284c003f
+2020fedc
+7940002c
+18460400
+9846fc00
+20407dec
+c6960000
+1fe67e00
+20600000
+20407ee7
+20407eea
+20407eec
+20407efb
+20407f0a
+20207f17
+78347c00
+d8a00a01
+20207e73
+78547c00
+20207e73
+6fe20a01
+684a0a09
+9840fe00
+20407ebc
+98000400
+984fd600
+6fe20a05
+684a0a0d
+98467e00
+20407ebc
+98000400
+984ffe00
+9d60fe00
+67e40a11
+20600000
+da400a01
+da600a09
+20407e9f
+55607e00
+1fe67e00
+1ff07e00
+1febfe00
+684c0a11
+9848fc00
+da210000
+20407dec
+9a20fe00
+20407ec3
+1a425600
+20600000
+184f7e00
+9a4fa200
+1a427e00
+984f8400
+1a307e00
+1ff07e00
+98408400
+56e07e00
+1fe67e00
+1ff07e00
+1fe3fe00
+9848fc00
+20207dec
+1fe32600
+9fef8400
+58010000
+98467e00
+20407ec3
+1a427e00
+9d6f8400
+58000000
+79207e1c
+9848fc00
+20407def
+18078400
+58001000
+98466e00
+20600000
+20407f2c
+20407f30
+20407f37
+20407f3e
+20407f4d
+20207f58
+6fe089f6
+20407eb5
+67e089f8
+20600000
+98002600
+9fef8400
+efe08006
+20407eb5
+e7e08005
+9a60a200
+20600000
+9feffe00
+9840a400
+1a227e00
+9a2f8400
+1a43fe00
+98460400
+20600000
+58400000
+9846fc00
+20407dec
+67e109fc
+1a307e00
+1feb7e00
+9846fc00
+20407dec
+e7e10005
+1a4d7e00
+1fe37e00
+9846fc00
+20407dec
+e7e10005
+20600000
+1a707e00
+1feb7e00
+9a46fc00
+20407dec
+67e10a02
+6fe089f6
+20407eb3
+9a26fc00
+20407dec
+e7e10005
+20600000
+6fe089f9
+20407eb0
+9a46fc00
+20407dec
+67e10a06
+6fe089f7
+20407eb3
+9a26fc00
+20407dec
+e7e10005
+20600000
+d8a00a2a
+df200002
+20407d17
+d8e00004
+20407f83
+20407f86
+20407f89
+20407f92
+20407f98
+20407f9e
+20407fa4
+20407faa
+19609620
+18e08fff
+2422ff67
+6fe20a2a
+d8c00100
+98c0d600
+6fe20a2e
+9fe80400
+58010000
+98467e00
+20407ec3
+1a427e00
+9d680400
+58000000
+79207e1c
+20407ed4
+d8401000
+98467e00
+1fe67e00
+20600000
+19620c00
+df200008
+20207de6
+98002400
+df200008
+20207de6
+9a40a600
+684889f9
+984f8400
+6fe089f8
+9a4ffe00
+9840fe00
+1ff1fe00
+1fe92200
+20600000
+6fe109fe
+9a6f8400
+6fe109fc
+9a2ffe00
+98462400
+20600000
+6fe109fe
+9a2f8400
+efe10006
+9a6ffe00
+98462200
+20600000
+6fe089f8
+20407fc5
+9a20ee00
+19622600
+d8a00a0a
+20207fc8
+6fe089f9
+20407fc5
+9a20ee00
+1960a610
+d8a00a1a
+20207fc8
+52406e00
+6a410a02
+6a610a06
+da200a0a
+ddc00a1a
+d8a00a2a
+20407fb6
+20407fb6
+6a410a04
+6a610a08
+20407fb6
+20207fb6
+efe20011
+18c22200
+9a485600
+efe2002e
+18c25c00
+9a687e00
+9d60fe00
+1fed7e00
+1ee20400
+20407ed4
+ed620005
+9d667e00
+1fe63000
+e3020005
+20600000
+9a480400
+50407e00
+20207eb6
+d9000004
+ddc09400
+dd600000
+df200008
+efe10013
+18c22600
+9ee67e00
+eb80802e
+18c25c00
+53800400
+98487e00
+9d60d600
+c2007fcc
+1d6cfe00
+1fe37e00
+e7e20005
+1a60a7f0
+190091ff
+2422ffca
+20600000
+58000000
+79207e13
+67e4009f
+20600000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000000
+00000839
Index: program/app.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app.prog	(working copy)
@@ -0,0 +1,591 @@
+app_init:
+	bpatch patch15_6,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
+	beq dvc_op_test,test_init
+	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
+	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 idle_read_adc_wait
+	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_7,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 patch16_0,mem_patch16
+	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	
+	call adc_wait_timer
+	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_1,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_2,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: program/app_antiLost.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_antiLost.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_antiLost.prog	(working copy)
@@ -0,0 +1,592 @@
+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_3,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
+	branch antilost_adc_check_timer
+
+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
+	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_4,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_5,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: program/app_car.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_car.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_car.prog	(working copy)
@@ -0,0 +1,803 @@
+ifdef COMPILE_CAR
+
+car_init:
+	rtn wake
+	call enable_authrom
+	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_6,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:
+	call gpio_set_before_lpm_common
+	branch keyscan_process_lpm_before
+
+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_7,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 patch17_0,mem_patch17
+	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_1,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_2,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
+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: program/app_dongle.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_dongle.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_dongle.prog	(working copy)
@@ -0,0 +1,449 @@
+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
+
+	call dongle_read_kb_bind_status
+	branch usb_init
+
+
+dongle_default_init:
+	//sys init
+	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 0x1f,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
+	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_kb_bind_flag
+	bne DONGLE_KB_BIND_SUCCESS,dongle_usb_config_param
+	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_3,mem_patch17
+	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
+	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_4,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_ackpayload_enable
+	beq BIND_ACKPAYLOAD,g24_bind_ackpayload_prep
+	beq KB_LED_ACKPAYLOAD,dongle_g24_kb_led_ackpayload_prep
+	rtn
+
+dongle_g24_kb_led_ackpayload_prep:
+	fetch 1,mem_24g_rxbuf+2
+	beq DATATYPE_DEVICE1,g24_bind_ackpayload_prep
+	beq DATATYPE_ATTEMP,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
+
+	
+
+
+endif
+
+
Index: program/app_esl.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_esl.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/app_module.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_module.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_module.prog	(working copy)
@@ -0,0 +1,1794 @@
+
+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_5,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_6,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_7,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 31,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 patch18_0,mem_patch18
+	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_1,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_2,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:
+	//call ice_break
+	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 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*******************/
+
+
+else
+
+endif
Index: program/app_mouse.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_mouse.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_mouse.prog	(working copy)
@@ -0,0 +1,4939 @@
+
+ifdef COMPILE_MOUSE
+mouse_init:
+	call mouse_setting_config
+	call mouse_init_sunt
+	call mouse_dpi_config
+	rtn wake
+	call mouse_usb_check_enable
+	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_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
+
+	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,0x03,pdata
+	store 1,mem_config_sensor_dpi
+	store 1,mem_mouse_dpi
+	rshift2 pdata,pdata
+	and pdata,0x03,pdata
+	store 1,mem_device_number
+
+
+	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
+mouse_default_init_next:
+	
+/* 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 0xa0d1be
+	istore 3,contw
+	setarg 0x12a141
+	istore 3,contw
+	setarg 0xa784a5
+	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
+
+
+/*************************usb**********************************/
+mouse_usb_check_enable:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_USB
+	setarg mouse_usb_config_param
+	store 2,mem_cb_usb_config
+	jam MOUSE_USB_INTERFACE_REMOVE,mem_mouse_usb_vdd_status
+	branch mouse_usb_interface_check
+
+mouse_usb_config_param:
+	call mouse_usb_config_kb_check
+	call mouse_usb_config_param_init
+	branch mouse_usb_config_param_setup
+
+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
+
+mouse_usb_config_param_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_USB_250,mouse_usb_report_rate_set_250hz
+	bbit1 MOUSE_ENABLE_USB_500,mouse_usb_report_rate_set_500hz
+	bbit1 MOUSE_ENABLE_USB_1000,mouse_usb_report_rate_set_1000hz
+	jam 0x19,mem_wire_usb_interval
+	jam 0x08,mem_usb_tx_interval
+	rtn
+mouse_usb_report_rate_set_250hz:
+	jam 0x0c,mem_wire_usb_interval
+	jam 0x04,mem_usb_tx_interval
+	rtn
+mouse_usb_report_rate_set_500hz:
+	jam 0x06,mem_wire_usb_interval
+	jam 0x02,mem_usb_tx_interval
+	rtn
+mouse_usb_report_rate_set_1000hz:
+	jam 0x03,mem_wire_usb_interval
+	jam 0x01,mem_usb_tx_interval
+	rtn
+
+mouse_usb_config_param_setup:
+	call usb_tx_interval_config
+	call mouse_usb_vid_pid_config
+	branch mouse_usb_hid_icon_config
+
+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
+
+mouse_usb_hid_icon_config:
+	fetch 1,mem_mouse_usb_keyboard_flag
+	branch dongle_usb_hid_icon_config+1
+
+
+mouse_usb_check:
+	fetch 1,core_usb_addr
+	bbit0 7,mouse_usb_no_exsit
+	bbit1 7,mouse_usb_exsit
+	rtn
+mouse_usb_no_exsit:
+	fetch 1,mem_usb_addr
+	rtnbit0 7
+	branch soft_reset_chip
+mouse_usb_exsit:
+	fetch 1,mem_usb_addr
+	rtnbit1 7
+	call mouse_24g_stop
+	branch mouse_stop_bluetooth_mode
+
+mouse_usb_isr:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_USB
+	call usb_isr
+	branch mouse_usb_interface_check
+//	branch usb_offline_state
+
+
+mouse_usb_interface_check:
+	bpatch patch18_6,mem_patch18
+	fetcht 1,mem_usb_offline_check_gpio
+	call gpio_get_bit
+	branch mouse_usb_gpio_low,true
+	branch mouse_usb_gpio_high
+
+
+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_device_enumeration_endflag
+	jam 0,mem_usb_status
+	jam 0,mem_usb_state
+	branch mouse_init_wireless
+	
+	
+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
+	call mouse_24g_stop
+	call mouse_stop_bluetooth_mode
+	call mouse_device_led_all_off
+	branch usb_init
+	
+	
+mouse_usb_mode:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_USB
+	call mouse_usb_check
+	fetch 1,core_usb_addr
+	store 1,mem_usb_addr
+	rtnbit0 7
+	call mouse_clkn_check 
+	fetch 4,mem_btclk_sensor
+	fetcht 1,mem_wire_usb_interval
+	iadd temp,temp
+	copy clkn_bt,pdata
+	isub temp,null
+	nrtn positive
+	store 4,mem_btclk_sensor
+	call mouse_motion
+	nrtn user
+mouse_push_data_to_usb:
+	fetch 1,core_usb_addr
+	rtnbit0 7
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_KEYBOARD,mouse_push_mouse_data_to_usb
+	fetch 1,mem_customer_key
+	beq 1,mouse_push_keyboard_data_to_usb
+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
+
+mouse_push_keyboard_data_to_usb:
+	fetch 1,mem_customer_data_trigger
+	branch mouse_push_release_keyboard_data_to_usb,blank
+	fetch 8,mem_customer_key_press+1
+mouse_push_keyboard_package_data_to_usb:
+	store 8,mem_pdatatemp
+	fetch 1,mem_customer_key_press
+	beq KB_MULTIKEY_REPORT_ID,mouse_push_multimedia_key_data_to_usb
+	beq KB_SYSTEM_CONCTRL_REPORT_ID,mouse_push_systemctrl_key_data_to_usb
+	call dongle_usb_tx_kb_data
+	fetch 8,mem_pdatatemp
+	store 8,mem_usb_kb_data
+	rtn
+	
+mouse_push_release_keyboard_data_to_usb:
+	fetch 8,mem_customer_key_release+1
+	branch mouse_push_keyboard_package_data_to_usb
+
+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
+
+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
+
+	
+/*************************usb**********************************/
+
+
+/*****************system clk***********************************/
+
+mouse_clkn_check:
+	fetcht 4,mem_btclk_sensor
+	copy clkn_bt,pdata
+	isub temp,null
+	ncall mouse_clkn_timeout,positive
+	rtn
+mouse_clkn_timeout:
+	setarg 0
+	store 4,mem_btclk_sensor
+	rtn
+
+
+/*
+mouse_enable_clock_qdecoder:
+	fetch 2,core_clkoff
+	set0 CLOCK_OFF_QDECODER,pdata
+	store 2,core_clkoff
+	rtn
+*/
+
+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_7,mem_patch18
+	call mouse_sensor_reset
+	call mouse_sensor_powerdown
+	call mouse_setgpio_hibernate
+	branch app_enter_hibernate
+
+	
+mouse_before_hibernate:
+	bpatch patch19_0,mem_patch19
+	enable user
+	fetch 4,0x8138
+	setflag user,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
+	call gpio_set_before_lpm_common
+	fetcht 1,mem_sensor_motion_gpio
+	branch gpio_clr_wake
+
+
+mouse_setgpio_hibernate:
+	bpatch patch19_1,mem_patch19
+	call mouse_set_sdio_high
+	call clear_wake
+	call mouse_lpm_before_common
+	call gpio_pd_idle
+	arg 19,temp
+	call mouse_gpio_config_input_pu
+	branch mouse_gpio_set_high_impedance
+	
+
+	
+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_2,mem_patch19
+	
+	call mouse_wheel_check
+	fetcht 1,mem_mouse_sensor_sclk_gpio					// set sclk high
+	call gpio_config_output
+mouse_lpm_before_common_next:	
+	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_3,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_4,mem_patch19
+	fetch 1,mem_24g_device_led_status
+	nrtn blank
+	jam 0,mem_adc_read_timer
+	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_5,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_sensor_reset_gpio
+	call gpio_config_output
+
+	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_6,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_7,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 patch1a_0,mem_patch1a
+	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_1,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_2,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_3,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
+	call twspi_write
+	nop 12000
+	rtn
+	
+mouse_sensor_poweron:
+	bpatch patch1a_4,mem_patch1a
+	call mouse_sensor_spi_init
+	call mouse_sensor_reset
+	arg mem_sensor_poweron_init,regc
+	call mouse_sensor_wr_seq
+	branch mouse_dpi_config
+
+mouse_sensor_powerdown:
+	call mouse_init_sunt
+	call mouse_sensor_spi_init
+	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
+	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_5,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_6,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_7,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 patch1b_0,mem_patch1b
+	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_1,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_2,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_3,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_4,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_5,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_6,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
+	call mouse_usb_isr
+	call mouse_wheel_check
+	branch mouse_usb_mode
+
+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_7,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 patch1c_0,mem_patch1c
+	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:
+	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 MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_250Hz,g24_transmit_by_interrupt_enable
+	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_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
+
+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
+
+/**************************************g24 search receiver*****************************************/
+
+
+
+/*******************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_1,mem_patch1c
+	storet 1,mem_mouse_struct_led_gpio
+	arg 0,rega
+	branch ui_led_off_global
+mouse_led_on:
+	bpatch patch1c_2,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
+
+/*****************close define  COMPILE_MOUSE**********/
+else
+mouse_init:
+mouse_irtual_cable_unplug:
+mouse_store_remote_bdaddr:
+mouse_ui_led_off_static:
+mouse_ui_led_on_static:
+mouse_bt_hid_handshake_boot_check:
+mouse_delay_enter_hibernata:
+mouse_low_voltage_led_no_enter_lpm_blink:
+	rtn
+endif
+
+
+
Index: program/app_remote_car.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_remote_car.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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_3,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_4,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_5,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: program/app_shutter.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_shutter.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/app_shutter.prog	(working copy)
@@ -0,0 +1,1008 @@
+
+ifdef COMPILE_SHUTTER
+
+//define CLASSIC_SHUTTER_FUCTION
+
+shutter_init:
+	rtn wake
+	call enable_authrom
+	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_6,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,0xff00
+	setsect 1,0x3fc0
+	setsect 2,0xff0
+	setsect 3,0x3fc
+	store 8,mem_classic_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
+	branch app_sys_param_init
+	
+	
+
+/*************shutter default_init ending*********************/
+
+
+
+
+
+else
+	branch assert
+	
+endif
Index: program/ble_protocol_stack/le.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le.prog	(working copy)
@@ -0,0 +1,2002 @@
+ifdef COMPILE_LE
+//******************************************//
+//*************LE INIT ****************//
+//******************************************//
+
+le_init_conn:
+	bpatchx patch33_3,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_4,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_5,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_6,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_7,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 patch34_0,mem_patch34
+	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 patch34_1,mem_patch34
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch35_0,mem_patch35
+	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 patch35_1,mem_patch35
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch36_0,mem_patch36
+	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 patch36_1,mem_patch36
+	enable swfine
+	arg PARAM_T_IFS_150US+PARAM_20MS_INIT+PARAM_SYNC_TIME_DIFFERENCE,stop_watch
+	fetch 1,mem_system_clk
+	imul32 stop_watch,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_2,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_3,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_4,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_5,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_6,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_7,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 patch37_0,mem_patch37
+	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 patch37_1,mem_patch37
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch38_0,mem_patch38
+	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 patch38_1,mem_patch38
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch39_0,mem_patch39
+	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:
+	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: program/ble_protocol_stack/le_advertising.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_advertising.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_advertising.prog	(working copy)
@@ -0,0 +1,382 @@
+
+/*
+ble core spec advertising
+*/
+
+le_advertising_dispatch:
+	rtnmark1 mark_adc_enable
+	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_1,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_2,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_3,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_4,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_5,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_6,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_7,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 patch3a_0,mem_patch3a
+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_1,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_2,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_3,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_4,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_5,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_6,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_7,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 patch3b_0,mem_patch3b
+	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: program/ble_protocol_stack/le_l2cap_att.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_l2cap_att.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_l2cap_att.prog	(working copy)
@@ -0,0 +1,873 @@
+
+
+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:
+	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: program/ble_protocol_stack/le_l2cap_att_wechat.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_l2cap_att_wechat.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/ble_protocol_stack/le_l2cap_signalling.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_l2cap_signalling.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/ble_protocol_stack/le_l2cap_smp.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_l2cap_smp.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/ble_protocol_stack/le_ll.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ble_protocol_stack/le_ll.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/bt.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/bt.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/bt.prog	(working copy)
@@ -0,0 +1,4605 @@
+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_ESL
+//define COMPILE_WECHAT
+//define COMPLIE_TEST
+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
+	ncall adc_init_data,wake
+//	ncall load_chip_option,wake
+	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:
+	rtnmark1 mark_adc_enable
+	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
+	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:
+	rtnmark1 mark_adc_enable
+	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:
+	rtnmark1 mark_adc_enable
+	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:	
+	rtnmark1 mark_adc_enable
+	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
+
+	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 0xe6,core_syn_aac_cfg1
+
+	call initialize_syn_afc_cfg1
+	call initialize_rf_ldo_cfg1
+	call initialize_rc_cal
+	
+	jam 0x09,core_rx_bq_cfg0
+
+	jam 5,core_clkpll_cfg0
+	jam 0x94,core_rx_iqadc_cfg
+	
+	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
+	
+	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
+
+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
+
+
+/*****************************************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 4,mem_sleep_counter_all
+	iadd temp,pdata
+	store 4,mem_sleep_counter_all
+	call lpm_save_context
+	call lpm_ctrl3_cfg_dig_vsel
+	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	
+	rtnmark1 mark_adc_enable
+	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:
+	bpatch patch15_3,mem_patch15
+	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_vdd3v3:
+	jam 0x00,mem_lpm_ctrl3
+	fetch 4,core_lpm_ctrl2
+	store 4,core_lpm_reg
+	fetch 1,core_lpm_ctrl2
+	and_into 0xc1,pdata			//select 3.3v
+	store 1,core_lpm_reg
+	branch lpm_write_ctrl3
+
+lpm_write_sel_vdd5v:
+	jam 0x3e,mem_lpm_ctrl3
+	fetch 4,core_lpm_ctrl2
+	store 4,core_lpm_reg
+	fetch 1,core_lpm_ctrl2
+	or_into 0x3e,pdata			//select 5v
+	store 1,core_lpm_reg
+lpm_write_ctrl3:
+	setarg lpmreg_sel_ctrl3
+	branch lpm_write
+
+
+lpm_write_gpio_wakeup:
+	bpatch patch15_4,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_5,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: program/debug.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/debug.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/g24_protocol_stack/24g.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g.prog	(working copy)
@@ -0,0 +1,516 @@
+
+
+g24_dispatch:
+	bpatchx patch3b_5,mem_patch3b
+	rtnmark1 mark_adc_enable
+	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
+	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
+	disable decode_fec1
+	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_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
+	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
+	disable encode_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 0x7530,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: program/g24_protocol_stack/24g_pair.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_pair.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_pair.prog	(working copy)
@@ -0,0 +1,360 @@
+
+
+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
+	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
+	nbranch g24_bind_data_error,user
+	call g24_transmit_ack
+	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
+	call disable_user
+	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
+	branch g24_rx_interrupt_clear
+
+
+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
+	branch enable_user
+
+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_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_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
+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
+	jam DONGLE_KB_BIND_SUCCESS,mem_dg_kb_bind_flag
+	call dongle_write_kb_bind_status
+	branch soft_reset_chip
+
+
+
+
+
+
+/****************************g24 pair receiver end********************************/
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: program/g24_protocol_stack/24g_receiver.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_receiver.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_receiver.prog	(working copy)
@@ -0,0 +1,483 @@
+
+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_attemp	//reconn packet
+g24_rx_interrupt_clear:
+	arg mem_24g_rxbuf,contw
+	arg 66,loopcnt
+	branch clear_mem
+
+
+g24_data_device1:
+	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:
+	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:
+	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 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
+	//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
+	//no data for more than 100ms,then go to search
+	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: program/g24_protocol_stack/24g_reconn.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_reconn.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_reconn.prog	(working copy)
@@ -0,0 +1,163 @@
+
+/****************************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
+	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:
+	call enable_user
+	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:
+	call enable_user
+	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: program/g24_protocol_stack/24g_rssi.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_rssi.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/g24_protocol_stack/24g_transmitter.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_transmitter.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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 lpm_dispatch_sleep
+
+
+
+
+/****************************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_sleep2:
+	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: program/g24_protocol_stack/24g_txpower_ctrl.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_txpower_ctrl.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/g24_protocol_stack/24g_txpower_ctrl.prog	(working copy)
@@ -0,0 +1,95 @@
+
+/****************************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
+	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: program/hci_main.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/hci_main.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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_7,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: program/hid.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/hid.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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 patch1d_0,mem_patch1d
+	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: program/kscan_peipherals.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/kscan_peipherals.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/l2cap.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/l2cap.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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_1,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_2,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_3,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_4,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_5,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_6,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_7,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 patch1e_0,mem_patch1e
+	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_1,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_2,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_3,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_4,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_5,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_6,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_7,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 patch1f_0,mem_patch1f
+	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_1,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_2,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_3,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_4,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_5,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_6,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_7,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
+	bpatchx patch20_0,mem_patch20
+	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_1,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_2,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_3,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_4,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_5,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_6,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_7,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 patch21_0,mem_patch21
+	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_1,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_2,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_3,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_4,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_5,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_6,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_7,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 patch22_0,mem_patch22
+	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_1,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_2,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_3,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: program/lmp.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/lmp.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/lmp.prog	(working copy)
@@ -0,0 +1,2744 @@
+	
+/******************************************/
+/*************   LMP Parse   **************/
+/******************************************/
+init_lmp:
+	rtn wake
+init_lmp_work:
+	bpatchx patch22_4,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_5,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_6,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_7,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 patch23_0,mem_patch23
+	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_1,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_2,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_3,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_4,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_5,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_6,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_7,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: program/mesh_protocol_stack/mesh_access_layer.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_access_layer.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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_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: program/mesh_protocol_stack/mesh_ali_vendor_message.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_ali_vendor_message.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_ali_vendor_message.prog	(working copy)
@@ -0,0 +1,503 @@
+
+/*
+	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
+	rtn
+
+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: program/mesh_protocol_stack/mesh_bearer_layer.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_bearer_layer.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_bearer_layer.prog	(working copy)
@@ -0,0 +1,106 @@
+
+/*
+	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
+	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: program/mesh_protocol_stack/mesh_ble_core_advertising.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_ble_core_advertising.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_ble_core_advertising.prog	(working copy)
@@ -0,0 +1,151 @@
+
+
+
+//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:
+	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: program/mesh_protocol_stack/mesh_chip_peripherals.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_chip_peripherals.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_chip_peripherals.prog	(working copy)
@@ -0,0 +1,258 @@
+
+//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
+	arg MESH_EEP_RESET_COUNT_LENGTH,temp
+//	arg mem_mesh_switch_reset_count,rega
+	arg MESH_EEP_RESET_COUNT_OFFSET,regb
+	branch iicd_read_eep_data
+
+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_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_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_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_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_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
+	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:
+	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: program/mesh_protocol_stack/mesh_control_ble_advertising.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_control_ble_advertising.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_control_ble_advertising.prog	(working copy)
@@ -0,0 +1,228 @@
+
+//
+//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
+	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_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: program/mesh_protocol_stack/mesh_encrypt_function.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_encrypt_function.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_encrypt_function.prog	(working copy)
@@ -0,0 +1,607 @@
+/*
+	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
+
+
+//********* 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: program/mesh_protocol_stack/mesh_fast_pairing.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_fast_pairing.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_fast_pairing.prog	(working copy)
@@ -0,0 +1,526 @@
+
+
+/*
+	阿里极速配网协议配网阶段包的解析与组包
+*/
+
+
+/*
+	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
+	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:
+	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: program/mesh_protocol_stack/mesh_health_message.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_health_message.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/mesh_protocol_stack/mesh_init_function.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_init_function.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_init_function.prog	(working copy)
@@ -0,0 +1,102 @@
+
+/*
+	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
+
+	rtn wake
+	
+	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_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 gpcfg_uartb_txd,core_gpio_conf
+	jam gpcfg_uartb_rxd|gpcfg_pullup,core_gpio_conf+3
+//	jam 0,0x8081
+	jam gpcfg_iic_scl,core_gpio_conf+2
+	jam gpcfg_iic_sda,core_gpio_conf+1
+	jam gpcfg_output_low,core_gpio_conf+4
+	branch clear_eeprom_size_2k
+
Index: program/mesh_protocol_stack/mesh_lower_transport_layer.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_lower_transport_layer.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_lower_transport_layer.prog	(working copy)
@@ -0,0 +1,144 @@
+/*
+	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
+	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:
+	arg 3,loopcnt
+	arg mem_mesh_message_segment_access_SZMIC_SeqZero_SegO_SegN,rega
+	call inverse_data
+	fetch 3,mem_mesh_message_segment_access_SZMIC_SeqZero_SegO_SegN
+	and pdata,0x1f,temp
+	storet 1,mem_mesh_segmented_access_message_SegN
+	rshift4 pdata,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
+	arg mem_mesh_segmented_access_message_Segment,contw
+	fetch 1,mem_mesh_segmented_access_message_SegO
+	mul32 pdata,12,pdata
+//	lshift3 pdata,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: program/mesh_protocol_stack/mesh_model_layer.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_model_layer.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/mesh_protocol_stack/mesh_more_element_check.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_more_element_check.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/mesh_protocol_stack/mesh_network_layer.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_network_layer.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_network_layer.prog	(working copy)
@@ -0,0 +1,286 @@
+
+/*
+	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
+	arg mem_mesh_queue_ele_temp,rega
+	branch queue_push
+
+//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: program/mesh_protocol_stack/mesh_upper_transport_layer.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_upper_transport_layer.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/mesh_protocol_stack/mesh_upper_transport_layer.prog	(working copy)
@@ -0,0 +1,445 @@
+
+/*
+	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_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
+	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: program/patch.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/patch.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/patch.prog	(working copy)
@@ -0,0 +1,1391 @@
+
+//define BATTERY_SERVICE_CANCEL
+//define G24_AUTO_PAIR_NERVER_BEEN_PAIRED
+
+	bbit1 8,pf_patch_ext
+	beq patch00_0,p_soft_reset
+	beq patch00_3,p_main_loop
+	beq patch10_3,p_set_sync_on
+	beq patch11_2,p_txon_next
+	beq patch11_3,p_initialize_radio_cont	
+	beq patch13_7,p_init_param
+	beq patch15_6,p_app_init
+	beq patch16_0,p_app_evt_100ms_loop
+	beq patch18_3,p_mouse_start_work
+	beq patch18_7,p_mouse_app_enter_hibernate
+	beq patch19_1,p_mouse_setgpio_hibernate
+	beq patch19_2,p_mouse_lpm_before_common
+	beq patch19_4,p_mouse_adc_read_start
+	beq patch19_6,p_mouse_motion
+	beq patch1a_0,p_mouse_seting_dpi
+	beq patch1a_1,p_mouse_check_key_gpio
+	beq patch1a_3,p_mouse_init_sunt
+	beq patch1a_4,p_mouse_sensor_poweron
+	beq patch1a_6,p_mouse_priority_bb_event
+	beq patch1b_1,p_mouse_bb_event_timer
+	beq patch1b_2,p_mouse_start_discovery
+	beq patch1b_6,p_mouse_idle
+	beq patch1d_0,p_hid_rx_process
+	branch loop
+
+pf_patch_ext:
+	beq patch26_3,p_adc_init_data
+	beq patch26_4,p_enable_adc
+	beq patch30_7,p_ui_timer_check		
+	beq patch34_1,p_le_slave_match
+	beq patch35_1,p_le_enable
+	
+//ifdef BATTERY_SERVICE_CANCEL
+//	beq patch38_0,p_le_parse_l2cap
+//endif	
+	beq patch3b_5,p_g24_dispatch
+	beq patch3c_2,p_g24_pair_dispatch
+	beq patch3d_1,p_g24_reconn_dispatch
+	beq patch3d_2,p_g24_transmit_no_interrupt
+	beq patch3d_4,p_g24_lpm_wait
+	branch loop
+
+
+p_soft_reset:
+	clear_stack
+	call app_param_init
+	call mouse_xtal_init		// 16M / 24M
+	branch soft_reset+3
+
+/////////////////////////////////// adc//////////////////////////////////////
+p_main_loop:
+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+1
+	call idle_dispatch
+	call app_process_idle+1
+	call inquiry_dispatch+1
+	call inquiry_scan_dispatch+1
+	call page_scan_dispatch+1
+	call connection_dispatch+1
+	call g24_dispatch+2
+	call p_lpm_dispatch
+	branch main_loop
+	
+p_txon_next:
+	fetch 1,mem_tx_power
+	beq TX_POWER_3DB,set_tx_power_3db
+	beq TX_POWER_5DB,set_tx_power_7db
+	beq TX_POWER_6DB,set_tx_power_10db
+	beq TX_POWER_7DB,set_tx_power_10db
+	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
+	branch set_tx_power_0db
+p_lpm_dispatch:
+	call lpo_calibration
+	fetch 3,mem_clks_per_lpo
+	rtn blank
+	fetch 1,mem_lpm_mode
+	rtn blank
+	fetch 1,mem_ssp_enable
+	branch p_lpm_dispatch_next,blank
+	fetch 1,mem_sp_local_key_invalid	// simple pairing is not ready
+	rtn blank
+p_lpm_dispatch_next:
+	fetch 1,mem_sc_calc
+	nrtn blank	
+	branch lpm_dispatch_next+3
+
+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
+	beq XTAL_16M,p_set_sync_on_16m
+	branch set_sync_on_24m
+
+p_set_sync_on_16m:
+	jam 0x29,core_syn_afc_cfg1
+	branch set_sync_on_16m
+
+p_adc_init_data:
+	arg mem_temp_block2,rega
+	arg 12,temp
+	setarg EFUSE_OFFSET_ADC_PARAM
+	call efuse_read_data
+	branch adc_init_data+6
+
+p_enable_adc:	
+	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 0x07,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
+	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
+
+p_app_evt_100ms_loop:
+	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	
+//	call adc_wait_timer
+	fetch 2,mem_cb_event_timer
+	call callback_func
+	branch p_app_evt_100ms_loop
+
+/////////////////////////////////// adc//////////////////////////////////////
+
+
+p_initialize_radio_cont:
+	//config osc_xtal_ctrim
+	call init_lpm_ctrl
+	nop 100
+
+	jam 0xe6,core_syn_aac_cfg1
+
+	call initialize_syn_afc_cfg1
+	call initialize_rf_ldo_cfg1
+	call initialize_rc_cal
+
+	jam 0x09,core_rx_bq_cfg0
+
+	jam 5,core_clkpll_cfg0
+	jam 0x94,core_rx_iqadc_cfg
+
+	jam 0x0b,core_rf_ldo_cfg2
+	jam 0x05,core_rf_ldo_cfg3
+	jam 0x90,core_syn_pfd_lkd_cfg
+
+	jam 0x00,core_syn_loopdiv_dsm_cfg
+	jam 0x40,core_rx_ctrl1
+	branch initialize_radio_cont+8
+
+p_le_enable:
+	call le_enable+1
+	jam 0x89,core_rx_bq_cfg0
+	fetch 1,core_syn_cal_ctrl
+	or pdata,0x0f,pdata
+	store 1,core_syn_cal_ctrl
+	rtn
+
+p_init_param:
+	jam 0,mem_lmo_tid2			// classic can't reconnect
+	branch init_param_next+1
+
+
+/////////////////////////////////// g24 250Hz use lpm//////////////////////////////////////
+p_app_init:
+p_mouse_init:	
+	call enable_authrom
+	call p_mouse_setting_config
+	call mouse_init_sunt
+	rtn wake
+	call p_mouse_dpi_config
+	call mouse_usb_check_enable
+	call mouse_drawing_optima_init
+	call p_mouse_cb_fuction
+	call p_mouse_sensor_powerdown
+	call p_mouse_mode_24g_device_multi_led_on
+	branch mouse_init+8
+
+p_mouse_wheel_set_wakeup:
+	fetch 1,mem_whee_a_data_gpio
+	arg gpcfg_pullup,temp
+ 	call gpio_config_function_int
+	fetch 1,mem_whee_b_data_gpio
+	arg gpcfg_pullup,temp
+ 	branch gpio_config_function_int
+
+p_mouse_setting_config:
+	rtn wake
+	call g24_transmit_init
+	call g24_chmap_param_init
+	call mouse_gpio_init
+	call mouse_param_init
+	setarg 6000
+	store 3,mem_24g_short_sleep_set
+	setarg 1800
+	store 2,mem_24g_reconn_timeout_init
+	arg 0x1e00,temp
+	storet 2,mem_24g_rx_window
+	call p_mouse_sensor_set_angle
+	branch mouse_setting_config+5
+
+p_mouse_sensor_set_angle:
+	fetch 1,mem_sensor_angle_connect_gnd
+	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
+	nbranch p_mouse_sensor_switch_angle_next,true
+	branch mouse_gpio_config_input_pd
+
+p_mouse_sensor_switch_angle_next:
+	fetch 1,mem_sensor_angle_connect_vin
+	store 1,mem_config_sensor_angle
+	call mouse_gpio_config_input_pd
+	fetcht 1,mem_select_sensor_angle_gpio
+	call gpio_get_bit
+	branch p_mouse_sensor_switch_angle_impedance,true
+	branch mouse_gpio_config_input_pu
+
+p_mouse_sensor_switch_angle_impedance:
+	fetch 1,mem_sensor_angle_high_impedance
+	store 1,mem_config_sensor_angle
+	branch mouse_gpio_set_high_impedance
+
+p_mouse_cb_fuction:
+	setarg p_mouse_24g_package_data
+	store 2,mem_cb_24g_transmit_data
+	setarg p_mouse_24g_search_dongle
+	store 2,mem_cb_24g_search_receiver
+	branch mouse_cb_fuction+4
+
+p_mouse_24g_package_data:		// 250Hz
+	rtnmark0 mark_24g
+	call mouse_motion
+	nrtn user
+	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 mouse_data_xy_release
+	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 MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_24G_250Hz,g24_transmit_by_interrupt_enable
+	fetch 2,mem_mouse_z
+	rtn blank
+	branch g24_transmit_by_interrupt_enable
+
+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 g24_transmit_receive_ack
+	nbranch p_mouse_24g_search_dongle_loop_retry,sync
+	nbranch p_mouse_24g_search_dongle_loop_retry,user3
+	call 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		//3min
+	store 2,mem_mouse_no_data_timer
+	branch p_mouse_sensor_powerdown
+
+p_g24_dispatch:
+	rtnmark1 mark_adc_enable
+	bmark1 mark_24g_rxmode,g24_receive_dispatch
+p_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,p_g24_transmit_by_interrupt
+	branch g24_transmit_no_interrupt
+
+p_g24_transmit_by_interrupt:
+	call g24_timer_check
+	nbranch p_g24_transmit_dispatch,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
+	branch g24_transmit_no_interrupt
+	
+p_g24_pair_dispatch:
+	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,g24_pair_dispatch+1
+	rtn
+
+p_g24_reconn_dispatch:
+	fetch 2,mem_24g_reconn_count
+	and pdata,0xff,pdata
+	beq 0,p_g24_reconn_dispatch_next
+	fetch 2,mem_24g_reconn_count
+	increase 1,pdata
+	store 2,mem_24g_reconn_count
+	rtn
+p_g24_reconn_dispatch_next:
+	call g24_reconn_data_prep
+	call g24_transmit_receive_ack
+	nbranch p_g24_reconn_device_fail,sync
+	nbranch p_g24_reconn_device_fail,user3
+	call g24_ackpayload_parse
+	branch g24_reconn_receiver_succ
+
+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
+	fetch 1,mem_24g_reconn_count+1
+	isolate1 0,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
+p_g24_transmit_no_interrupt:
+	call g24_txdata_prep
+	nbranch p_g24_nodata_transmit,user
+p_g24_transmit_start:
+	call p_g24_transmit_process
+	call power_ctrl_start
+	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
+	call clear_wake
+	fetch 3,mem_24g_short_sleep_set
+	branch g24_long_sleep2
+
+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
+	fetch 1,mem_sensor_shutdown_flag
+	ncall p_mouse_setgpio_hibernate_new,blank
+	fetch 8,mem_24g_enter_hibernate
+	branch g24_long_sleep2
+
+p_mouse_setgpio_hibernate_new:	
+	call p_mouse_setgpio_hibernate
+
+	fetcht 1,mem_whee_a_data_gpio
+	call gpio_clr_wake
+	fetcht 1,mem_whee_b_data_gpio
+	call gpio_clr_wake
+	
+	fetch 1,mem_whee_a_data_gpio
+	arg gpcfg_pulldown,temp
+	call gpio_config_function_int
+	fetch 1,mem_whee_b_data_gpio
+	arg gpcfg_pulldown,temp
+	branch gpio_config_function_int
+
+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_g24_transmit_process:
+	jam 0,mem_24g_retry
+p_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 p_g24_retransmit,sync
+	nbranch p_g24_retransmit,user3
+	call g24_ackpayload_parse
+	call p_mouse_wakeup_24g
+	branch g24_transmit_no_ack
+
+p_mouse_wakeup_24g:
+	fetch 1,mem_sensor_shutdown_flag
+	ncall p_mouse_init_sensor_wakeup,blank
+	fetch 1,mem_sensor_shutdown_flag
+	ncall p_mouse_wheel_set_wakeup,blank
+	jam 0,mem_sensor_shutdown_flag
+	rtn
+
+p_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 1,g24_tx_attempt_fail
+	call g24_transmit_hop_process
+	call p_delay_40ms
+	branch p_g24_transmit_loop
+/////////////////////////////////// g24 250Hz use lpm//////////////////////////////////////
+
+
+p_delay_40ms:
+	fetch 1,mem_24g_txfail_cnt+1
+	sub pdata,0x00,null
+	rtn positive
+	arg 40,loopcnt
+p_delay_ms_wait:
+	nop 12000
+	loop delay_ms_wait
+	rtn	
+
+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_setgpio_hibernate:
+	call mouse_set_sdio_high
+	call clear_wake
+	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
+	arg gpcfg_output_high,temp
+	call gpio_config_function_int
+	call mouse_setgpio_hibernate+3
+	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 gpcfg_no_ie,temp
+ 	branch gpio_config_function_int
+	
+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
+	
+	call mouse_wheel_check
+	fetch 1,mem_mouse_sensor_sclk_gpio	// set sclk high
+	arg gpcfg_output_high,temp
+ 	call gpio_config_function_int
+ 	branch mouse_lpm_before_common_next
+
+p_mouse_24g_hibernate_set:
+	jam 0,mem_24g_attempt_fail_flag
+	call g24_transmit_next_packet
+	setarg -1
+	store 8,mem_24g_enter_hibernate
+	setarg 0
+	store 7,mem_mouse_key
+	jam 1,mem_sensor_shutdown_flag
+	call p_mouse_sensor_powerdown
+	branch p_g24_long_sleep
+	
+p_mouse_priority_bb_event:
+	copy regc,pdata
+	beq BT_EVT_24G_PAIRING_COMPLETE,p_mouse_24g_pairing_complete
+	beq BT_EVT_24G_ATTEMPT_SUCCESS,p_mouse_24g_attempt_success
+//ifdef define G24_AUTO_PAIR_NERVER_BEEN_PAIRED	
+	beq BT_EVT_24G_ATTEMPT_FAIL,p_mouse_24g_attempt_fail
+//endif
+	beq BT_EVT_LE_START_ENC,p_mouse_le_ll_start_encryt
+	beq BT_EVT_LE_PARSE_CONN_PARAM_ACCEPTED,p_mouse_le_parse_conn_param_accepted
+	branch mouse_priority_bb_event+2
+
+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 5,mem_le_start_encrypt_timer
+	branch mouse_le_ll_enable_start_enc_flag
+
+p_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
+	store 2,mem_le_interval_min
+	store 2,mem_le_interval_min+2
+	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_init						// mouse_le_lpm_mult_reinit function will reinit mem_lpm_mult
+	branch mouse_le_conn_param_lpm_enable
+
+p_mouse_24g_pairing_complete:
+	call p_mouse_discovey_led_blink_off
+	branch mouse_24g_pairing_complete
+
+p_mouse_24g_attempt_success:
+	call p_mouse_discovey_led_blink_off
+	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 mouse_device_poweron_timer_init
+	branch mouse_24g_attempt_success
+
+//ifdef define G24_AUTO_PAIR_NERVER_BEEN_PAIRED
+p_mouse_24g_attempt_fail:
+	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 PAIR_AND_3_0_ADDR,p_mouse_24g_auto_pair_attempt_fail
+	beq RECEIVER_AND_3_0_ADDR,p_mouse_reconn_dongle_attempt_fail
+	call p_mouse_multi_led_blink_off
+	branch mouse_24g_attempt_fail_enter_hibernate+1
+
+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
+	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_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 p_mouse_discovery_multi_led_blink
+	branch mouse_24g_start_pair_mode+7
+	
+p_mouse_24g_start_auto_pair:
+	call p_mouse_discovery_multi_led_blink
+	branch mouse_24g_start_auto_pair+1
+		
+p_mouse_24g_auto_pair_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag 
+	bbit0 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,p_mouse_24g_attempt_fail_enter_hibernate
+	fetch 1,mem_device_number
+	beq 1,p_mouse_24g_attempt_fail_enter_hibernate		//24g first mode and only 2.4g device
+	branch mouse_24g_first_bluetooth_reconnect
+
+p_mouse_24g_attempt_fail_enter_hibernate:
+	call p_mouse_multi_led_blink_off	
+	branch p_mouse_24g_hibernate_set
+
+p_mouse_reconn_dongle_attempt_fail:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit0 MOUSE_ENABLE_24G_FIRST_AUTO_PAIRING,p_mouse_24g_attempt_fail_enter_hibernate
+	bbit1 MOUSE_ENABLE_EEPROM,p_mouse_24g_attempt_fail_enter_hibernate
+	bbit1 MOUSE_ENABLE_FLASH,p_mouse_24g_attempt_fail_enter_hibernate
+	branch mouse_24g_start_auto_pair+1
+	
+
+//endif	
+
+p_mouse_start_work:
+	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,p_mouse_24g_start_mode
+	call p_mouse_check_key_gpio
+	beq MOUSE_LM_BUTTON,p_mouse_24g_start_mode
+	branch mouse_start_work+5
+
+p_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		// pdata output:00
+	and rega,0x07,pdata
+	branch mouse_24g_start_mode+9
+
+
+///////////////////dpi led adjust////////////////////////////////////////////////////////////////////
+p_mouse_seting_dpi:
+	call mouse_setting_dpi_4_level
+	call p_mouse_dpi_led_blink_delay
+p_mouse_dpi_config:
+p_mouse_seting_sensor_type:
+	fetch 1,mem_config_sensor_type
+	beq P3212,mouse_seting_3212_dpi
+	beq KA8G2,p_mouse_seting_ka8g2_dpi
+	beq P3205,mouse_seting_sensor_type+3
+	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_cpi3		//1000
+	branch mouse_set_cpi1
+
+
+p_mouse_seting_ka8g2_dpi:
+	fetch 1,mem_mouse_dpi
+	beq MOUSE_DPI_LEVEL1,mouse_set_pka8g2_cpi0		//1200
+	beq MOUSE_DPI_LEVEL2,mouse_set_pka8g2_cpi1		//1600
+	beq MOUSE_DPI_LEVEL3,mouse_set_pka8g2_cpi2		//1000
+	branch mouse_set_pka8g2_cpi1
+
+p_mouse_dpi_led_blink_delay:
+	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_dpi_led_delay_count_init
+	branch p_mouse_dpi_led_blink_init,blank
+	store 1,mem_mouse_dpi_led_delay_count  //delay 1s led blink
+	rtn
+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,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
+	beq P_MX8650,p_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 p_mouse_init_sensor
+
+p_mouse_mx8650_init_param:
+	jam MX8650,mem_config_sensor_type
+	call mouse_sensor_reset
+	call delay_10ms
+	arg mem_sensor_8650_init_new,regc
+	call mouse_sensor_wr_seq
+	branch p_mouse_dpi_config
+
+
+p_mouse_sensor_poweron:
+	call mouse_sensor_spi_init
+	fetch 1,mem_config_sensor_type
+	beq KA8G2,p_mouse_ka8g2_sensor_init
+	call mouse_sensor_reset
+	arg mem_sensor_poweron_init,regc
+	call mouse_sensor_wr_seq
+	branch p_mouse_dpi_config
+p_mouse_ka8g2_sensor_init:
+	call p_mouse_ka8g2_sensor_reset
+	arg mem_ka8g2_sensor_poweron_init,regc
+	call mouse_sensor_wr_seq
+	branch p_mouse_dpi_config
+
+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
+	call twspi_write
+	nop 12000
+	rtn
+	
+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
+	setarg 0x0806
+	branch twspi_write
+p_mouse_ka8g2_sensor_powerdown:
+	setarg 0x1f06		// reset to factory settings
+	branch twspi_write
+
+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 mouse_24g_long_sleep_param_update_timer
+	//led	
+	call p_mouse_dpi_led_blink_delay_timer
+	call p_mouse_multi_led_blink_timer
+	call p_mouse_multi_led_enable_delay_timer
+
+	call mouse_dpi_key_check_long_press
+	call mouse_bt_discovery_check
+	call p_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 p_mouse_check_no_data_timeout_timer
+
+p_mouse_multi_led_blink_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_multi_led_type_on:
+	call p_mouse_multi_led_on
+	fetch 1,mem_mouse_multi_led_on_timer
+	increase 1,pdata
+	store 1,mem_mouse_multi_led_on_timer
+	fetcht 1,mem_mouse_multi_led_on_timer_init
+	isub temp,null
+	call p_mouse_multi_led_off_poweron2s,zero
+	rtn
+
+p_mouse_multi_led_off_poweron2s:
+	jam 0,mem_mouse_multi_led_on_poweron2s_flag
+	branch p_mouse_multi_led_off
+
+p_mouse_discovery_multi_led_blink:
+	jam 2,mem_mouse_multi_led_blink_timer_init	//300ms
+p_mouse_discovery_multi_led_blink1:	
+	jam 0,mem_mouse_multi_led_blink_count_limited
+	jam 1,mem_mouse_multi_led_blink_count//0 will clear mem_mouse_multi_led_blink_enable/mem_mouse_multi_led_type
+p_mouse_multi_led_blink_enable:
+	jam 5,mem_mouse_multi_led_blink_timer
+	jam ON,mem_mouse_multi_led_blink_enable
+	jam MULTI_LED_BLINK,mem_mouse_multi_led_type
+	rtn
+
+p_mouse_multi_led_type_blink:
+	arg mem_mouse_multi_led_blink_timer,regc
+	arg p_mouse_multi_led_type_blink_timeout,regb
+	branch timer_single_step
+p_mouse_multi_led_type_blink_timeout:
+	fetch 1,mem_mouse_multi_led_blink_timer_init
+	store 1,mem_mouse_multi_led_blink_timer
+	fetch 1,mem_mouse_multi_led_blink_count_limited
+	branch p_mouse_multi_led_blink_count_no_limited,blank
+	fetch 1,mem_mouse_multi_led_blink_count
+	branch p_mouse_multi_led_blink_off,blank
+	increase -1,pdata
+	store 1,mem_mouse_multi_led_blink_count
+p_mouse_multi_led_blink_count_no_limited:
+	fetch 1,mem_mouse_multi_led_state
+	beq ON,p_mouse_multi_led_off
+p_mouse_multi_led_on:
+	jam ON,mem_mouse_multi_led_state	
+	fetcht 1,mem_mouse_multi_led_gpio
+	branch gpio_out_active
+
+p_mouse_discovey_led_blink_off:
+//	fetch 1,mem_mouse_multi_led_on_timer
+//	nrtn blank
+//	fetch 1,mem_mouse_multi_led_on_poweron2s_flag
+//	nrtn blank
+p_mouse_multi_led_blink_off:
+	setarg 0
+	store 3,mem_mouse_multi_led_blink_timer
+p_mouse_multi_led_off:
+	fetch 1,mem_mouse_multi_led_blink_count
+	nbranch p_mouse_multi_led_off_wait_blink_over,blank
+	jam 0,mem_mouse_multi_led_blink_enable
+	jam 0,mem_mouse_multi_led_type
+p_mouse_multi_led_off_wait_blink_over:
+	jam 0,mem_mouse_multi_led_on_timer
+	jam OFF,mem_mouse_multi_led_state
+p_mouse_multi_led_gpio_set_high:
+	fetch 1,mem_mouse_multi_led_gpio
+	beq ICE_REUSE_GPIO,p_mouse_multi_led_gpio_config_input
+	fetcht 1,mem_mouse_multi_led_gpio
+	branch gpio_out_inactive
+
+p_mouse_multi_led_gpio_config_input:
+	fetcht 1,mem_mouse_multi_led_gpio
+	branch mouse_gpio_config_input_pu
+
+p_mouse_mode_bt_device1_multi_led_on:
+p_mouse_mode_24g_device_multi_led_on:
+	jam 3,mem_mouse_led_enable_delay_timer
+	rtn
+	
+p_mouse_mode_24g_device_multi_led_on_enable:
+	jam 1,mem_mouse_multi_led_on_poweron2s_flag
+	jam ON,mem_mouse_multi_led_blink_enable
+	jam MULTI_LED_ON,mem_mouse_multi_led_type
+	jam 0,mem_mouse_multi_led_on_timer
+	rtn
+p_mouse_multi_led_enable_delay_timer:
+	arg mem_mouse_led_enable_delay_timer,regc
+	arg p_mouse_mode_24g_device_multi_led_on_enable,regb
+	branch timer_single_step
+
+p_mouse_dpi_multi_led_blink:
+	jam 2,mem_mouse_multi_led_blink_timer_init	//200ms
+	jam 1,mem_mouse_multi_led_blink_count_limited
+	branch p_mouse_multi_led_blink_enable
+
+p_mouse_check_no_data_timeout_timer:
+	fetch 1,mem_usb_addr
+	rtnbit1 7
+	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_device_flag
+	beq MODE_24G_DEVICE,p_mouse_24g_hibernate_set
+	branch mouse_disconnect
+
+p_mouse_dpi_led_blink_delay_timer:
+	arg mem_mouse_dpi_led_delay_count,regc
+	arg p_mouse_dpi_led_blink_init,regb
+	branch timer_single_step	
+	
+//p_mouse_dpi_led_blink_init:	//result:    level3: 2  3  1     level4: 3  4  1  2
+//	fetch 1,mem_config_sensor_type
+//	beq P3212,p_mouse_3212_and_ka8g2_dpi_led_blink_init		//result:    level3: 1  2  3     level4: 2  3  4  1
+//	beq KA8G2,p_mouse_3212_and_ka8g2_dpi_led_blink_init	//result:    level3: 1  2  3     level4: 2  3  4  1
+//	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 2,temp	// 2 3 4 (5)
+//	sub temp,3,null
+//	call p_mouse_dpi_led_blink_init_level_4,positive
+//	ncall p_mouse_dpi_led_blink_count_clean,positive
+//	storet 1,mem_mouse_multi_led_blink_count
+//	branch p_mouse_dpi_multi_led_blink
+
+//p_mouse_dpi_led_blink_init_level_4:
+//	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+//	rtnbit0 MOUSE_ENABLE_DPI_LEVEL_4
+//	increase 1,temp  	// 2-->3   3-->4
+//	rtn
+
+//p_mouse_dpi_led_blink_count_clean:
+//	increase -3,temp		// 4-->1  5-->2
+//	rtn
+
+p_mouse_dpi_led_blink_init:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	bbit1 MOUSE_ENABLE_DPI_LEVEL_4,p_mouse_dpi_led_blink_four_level
+p_mouse_dpi_led_blink_three_level:	
+	fetch 1,mem_mouse_dpi
+	beq 0,p_mouse_dpi_led_blink_twice
+	beq 1,p_mouse_dpi_led_blink_thrice
+	branch p_mouse_dpi_led_blink_once
+p_mouse_dpi_led_blink_four_level:
+	fetch 1,mem_mouse_dpi
+	beq 0,p_mouse_dpi_led_blink_thrice
+	beq 1,p_mouse_dpi_led_blink_quartic
+	beq 2,p_mouse_dpi_led_blink_once
+	branch p_mouse_dpi_led_blink_twice
+
+p_mouse_dpi_led_blink_once:
+	jam 1,mem_mouse_multi_led_blink_count
+	branch p_mouse_dpi_multi_led_blink
+p_mouse_dpi_led_blink_twice:
+	jam 3,mem_mouse_multi_led_blink_count
+	branch p_mouse_dpi_multi_led_blink
+p_mouse_dpi_led_blink_thrice:
+	jam 5,mem_mouse_multi_led_blink_count
+	branch p_mouse_dpi_multi_led_blink
+p_mouse_dpi_led_blink_quartic:	
+	jam 7,mem_mouse_multi_led_blink_count
+	branch p_mouse_dpi_multi_led_blink
+	
+/////////////////////////////////////////////////////////////////////////////////////////////////
+
+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 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_start_discovery:
+	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
+	branch mouse_start_discovery+1
+
+
+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_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_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_parse_l2cap:
+	ifetch 2,contr
+	beq LE_L2CAP_CID_ATT,p_le_parse_att
+	branch le_parse_l2cap+10
+		
+p_le_parse_att:
+//ifdef BATTERY_SERVICE_CANCEL
+//	call store_contr
+//	call p_mouse_le_reconn_write_enable_timer_reinit
+//	call get_contr
+//endif	
+	ifetch 3,contr
+	store 3,mem_le_att_opcode
+//ifdef BATTERY_SERVICE_CANCEL
+//	beq ATTOP_READ_REQUEST,p_le_parse_att_read_request
+//endif
+	beq ATTOP_WRITE_REQUEST,p_le_parse_att_write_request	
+	branch le_parse_att+2
+	
+//ifdef BATTERY_SERVICE_CANCEL	
+//p_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
+//	call le_check_encrypt_state
+//	nbranch p_le_send_att_read_response,user
+//	branch le_send_att_read_response_error_insufficient_auth
+
+//p_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
+//endif
+
+
+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
+	jam ATT_ERR_INSUFFICIENT_AUTHENTICATION,mem_le_err_code
+	branch le_send_att_error_response
+
+p_g24_lpm_wait:			// ice connect led
+	fetch 1,mem_24g_device_led_status
+	ncall g24_transmit_by_interrupt_enable,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
+p_g24_setgpio_lpm_before:
+	fetch 2,mem_cb_24g_lpm_before
+	branch callback_func	
+
+p_mouse_motion:
+	disable user
+	setarg 0
+	store 6,mem_mouse_x
+	call mouse_check_sensor_data
+	call p_mouse_dpi_config
+	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 p_mouse_drawing_optima
+	branch mouse_no_data_timer_init
+
+p_mouse_drawing_optima:
+	fetch MOUSE_FLAG_LEN,mem_mouse_flag
+	rtnbit0 MOUSE_ENABLE_SMOOTHER
+	fetch 1,mem_config_sensor_type
+	rtneq p3212
+	rtneq p3205
+	fetch 4,mem_mouse_x
+	rtn blank
+	call mouse_data_abs_check
+	setarg 0x06	//asm_flag enable condition
+	call mouse_pdata_greater_than_check
+	call mouse_disable_asm,blank
+	ncall mouse_enable_asm,blank
+	setarg 0x04	//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
+	branch mouse_drawing_optima_init
+
+p_mouse_adc_read_start:
+	fetch 1,mem_24g_device_led_status
+	nrtn blank
+	call p_enable_adc
+	jam 0,mem_adc_read_timer
+	call vdd_calculate_by_mode
+	store 2,mem_mouse_vdd_now_vol
+	arg 0x0012,temp
+	isub temp,null
+	nbranch p_mouse_adc_gpio_connect_gnd,positive
+	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 2,mouse_adc_button_press
+	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_gpio_connect_gnd:
+	fetcht 1,mem_adc_channel_gpio
+	call mouse_gpio_config_input_pd
+
+p_mouse_adc_no_low_voltage:
+	arg MOUSE_LOW_VOLTAGE_FLAG,queue
+	call mouse_disable_function_flag
+	fetch 1,mem_mouse_adc_last_low_voltage_flag
+	rtn blank
+	jam 0,mem_mouse_adc_last_low_voltage_flag
+	branch p_mouse_multi_led_off
+
+p_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,50,null
+	ncall p_mouse_adc_low_volatage_led_timer_count_clean,positive
+	beq 30,p_mouse_multi_led_on
+	beq 39,p_mouse_multi_led_off
+	rtn
+p_mouse_adc_low_volatage_led_timer_count_clean:
+	jam 1,mem_adc_low_volatage_led_timer_count
+	branch p_mouse_multi_led_off
+
+
+//////////////////////////////modify key start///////////////////////////////////////////////
+p_mouse_check_key_gpio:	//when mem_matrix_public_gpio=0xff
+	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
+	branch 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
+	branch 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:
+	arg gpcfg_output_high,temp
+	branch gpio_config_function_int
+		
+//input:pdata gpio number
+p_mouse_gpio_config_output_low:
+	arg gpcfg_output_low,temp
+	branch gpio_config_function_int	
+
+p_mouse_idle:
+	call mouse_low_voltage_led_no_enter_lpm
+	call ui_check_paring_button
+	call p_mouse_dpi_check
+	branch mouse_idle+4
+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
+	
+//////////////////////////////modify key end///////////////////////////////////////////////
+
+
Index: program/peripherals.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/peripherals.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/peripherals.prog	(working copy)
@@ -0,0 +1,3179 @@
+
+/* ===================== two wire SPI gpio ======================= */
+
+//pdata:gpio number
+twspi_reset:
+	bpatchx patch24_0,mem_patch24
+	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
+
+twspi_write:
+	branch spid_write_reg
+
+twspi_read:
+	branch spid_read_reg
+
+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
+	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:
+	disable match
+	call get_block_header
+	nrtn zero
+	enable match
+	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
+	nrtn zero
+	ifetch 2,contr
+	iforce rega
+	call read_function
+	branch load_storage_loop
+
+load_storage_efuse:
+//	disable match
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_OFFSET
+	arg mem_tmp_buffer,contr
+	iadd contr,contr	//code addr
+//	enable match
+	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_loop,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
+
+	/* 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
+
+
+loadcode:
+	call clean_mem
+	jam 0x25,core_clkoff			// disable debug uart
+	
+	setarg 0
+	arg mem_tmp_buffer,rega
+	arg 64,temp
+	call efuse_read_data
+	call loadcode_efuse_check
+	call app_read_efuse_app_vsel
+	disable user
+	
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit0 UCODE_FLAG_ENC, loadcode_efuse
+
+	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
+	
+	enable user					// set user for aes
+loadcode_efuse:
+	fetch 4,mem_tmp_buffer
+	branch loadcode_iic,blank
+	store 3,mem_efuse_header
+	call app_lpm_peripheral_lock_check
+	call load_storage_efuse
+loadcode_iic:
+	jam 0,mem_loadcode_times
+loadcode_iic_2:	
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit1 UCODE_FLAG_SKIP_EEP,loadcode_spi
+	call loadcode_check_times
+	call iicd_load_gpio_init
+	call clear_eeprom_size_2k
+	call loadcode_iic_by_eeprom
+	nbranch loadcode_iic_eeprom_2k,match
+	fetch 1,mem_ucode_status
+	bbit0 0,loadcode_iic_2			// crc error, try again
+	branch loadcode_hci
+loadcode_iic_eeprom_2k:
+	call set_eeprom_size_2k
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit1 UCODE_FLAG_SKIP_EEP,loadcode_spi
+	call loadcode_iic_by_eeprom
+	nbranch loadcode_spi,match
+	fetch 1,mem_ucode_status
+	bbit0 0,loadcode_iic_2			// 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:
+	jam 2,mem_eeprom_wp_gpio
+	jam 1,mem_eeprom_scl_gpio
+	jam 0,mem_eeprom_sda_gpio
+	branch iicd_read_init_pin
+	
+loadcode_spi:
+	jam 0,mem_loadcode_times
+loadcode_spi_loop:
+	call loadcode_check_times
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_UCODE
+	bbit1 UCODE_FLAG_SKIP_FLASH, loadcode_hci
+	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_hci,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
+	force regidx_key,regext_index
+	call aes_clear
+	jam 0x21,core_clkoff		// enable debug uart
+	rtn
+
+//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, loadcode_error
+	fetch 1,mem_tmp_buffer+EFUSE_OFFSET_DEVICE_LOCK
+	call loadcode_efuse_check_xor
+	bne 0x0f, loadcode_error
+
+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 loadcode_error,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
+	bbit1 6,lpm_write_sel_vdd5v
+	branch lpm_write_sel_vdd3v3
+
+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
+	beq dvc_op_test,app_lpm_peripheral_lock_test
+	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
+
+app_lpm_peripheral_lock_test:
+	call app_lpm_efuse_lock_prep
+	branch lpm_write_lock
+
+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_1,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
+	
+
+
+/* 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_2,mem_patch24
+	jam 2,core_spid_txlen
+	jam 0,core_spid_rxlen
+	jam spid_start,core_misc_ctrl
+	branch wait_spid_done
+
+/* 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_3,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
+//	branch spid_write_flash_common
+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:
+	jam 14,mem_spi_cs_gpio
+	jam 13,mem_spi_si_gpio
+	jam 16,mem_spi_so_gpio
+	jam 15,mem_spi_sclk_gpio
+	jam 17,mem_spi_wp_gpio
+	jam 18,mem_spi_hold_gpio
+	rtn
+
+
+/* ===================== SPI2 dma ======================= */
+ifdef SPI2
+spid2_init:
+	branch spid2_init_common
+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
+	fetch 1,core_spid2_ctrl
+	set1 3,pdata
+	store 1,core_spid2_ctrl
+	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_4,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_5,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_6,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_7,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 patch25_0,mem_patch25
+	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_1,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_2,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_lna_pa_ldo_on:
+	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_3,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
+	rtn
+
+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_4,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_5,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_6,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_7,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 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
+	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_1,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:
+	isolate0 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
+
+//set all unused gpio to pull down mode to save power
+gpio_pd_idle:
+	arg core_gpio_conf,contr
+	arg 19,loopcnt
+gpio_pd_idle_loop:
+	ifetch 1,contr
+	nbranch gpio_pd_idle_configured,blank
+	setarg 0x80
+	add contr,-1,contw
+	istore 1,contw
+gpio_pd_idle_configured:
+	loop gpio_pd_idle_loop
+	rtn
+
+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
+
+gpio_set_before_lpm_common:
+	bpatchx patch26_2,mem_patch26
+	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_3,mem_patch26
+	arg mem_temp_block2,rega
+	arg 12,temp
+	setarg EFUSE_OFFSET_ADC_PARAM
+	call efuse_read_data
+	call enable_adc
+	call adc_init_wait_count
+adc_init_cal_data:
+	fetch 8,mem_temp_block2+3
+	branch adc_init_cal_data_default,blank
+	arg mem_temp_block2+3,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	
+	
+adc_init_wait_count:
+	fetch 1,mem_temp_block2
+	nrtn blank
+	jam 12,mem_adc_wait_count
+	rtn	
+
+
+adc_wait_timer:
+	arg mem_app_adc_read_count,regc
+	arg enable_adc,regb
+	branch timer_single_step
+	
+idle_read_adc_wait:
+	rtnmark0 mark_adc_enable
+	and clkn_bt,0xff,pdata
+	fetcht 1,mem_start_adc_clkn
+	call get_diff
+	fetch 1,mem_adc_wait_count
+	isub rega,null
+	rtn positive
+	fetch 2,core_adc_sum
+	store 2,mem_adc_current_value
+	set0 mark_adc_enable,mark
+	jam 50,mem_app_adc_read_count
+	fetch 1,core_sum_en
+	set0 7,pdata
+	store 1,core_sum_en
+	jam 0,core_gpadc_ctrl
+	rtn
+
+	
+// zero: disable adc
+enable_adc_check:
+	bbit0 state_insniff,context_search_next
+	add rega,coffset_mode,contr
+	ifetch 1,contr
+	bbit1 mode_le,enable_adc_check_le
+//	bbit1 mode_master, context_search_next
+	add rega,coffset_tsniff,contr
+	ifetch 2,contr
+	arg 0xffff,temp
+	isub temp,null
+	branch enable_zero,zero
+	branch context_search_next
+	
+enable_adc_check_le:
+	ifetch 1,rega
+	bbit0 lestate_got_first_packet,enable_zero
+	bbit1 lestate_update_param,enable_zero
+	bbit1 lestate_update_map,enable_zero
+	bbit1 lestate_update_phy,enable_zero
+	add rega,coffset_le_event_cnt,contr
+	ifetch 2,contr
+	sub pdata,7,null
+	branch enable_zero,positive
+	branch context_search_next
+	
+enable_adc_wait:
+	jam 1,mem_app_adc_read_count
+	rtn
+	
+enable_adc:	
+	bpatchx patch26_4,mem_patch26
+	arg enable_adc_check,regc
+	call context_search
+	branch enable_adc_wait,zero
+	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 0x07,core_gpadc_ctrl
+	jam 0x03,core_sum_ctrl
+	nop 60
+	fetch 1,core_sum_en
+	set1 7,pdata
+	store 1,core_sum_en
+//	nop 500  // 1/24ms
+//	fetch 2,core_adc_sum
+//	store 2,mem_adc_current_value
+	set1 mark_adc_enable,mark
+	copy clkn_bt,pdata
+	store 1,mem_start_adc_clkn
+	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_5,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 200
+	store 2,mem_reference_voltage //diff
+	fetcht 2,mem_5v_adc_hvin_data
+	fetch 2,mem_3v_adc_hvin_data
+	arg 500,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_6,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_7,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 patch27_0,mem_patch27
+	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 user
+	branch wdt_init_set
+wdt_set_disable:
+	disable user
+wdt_init_set:
+	fetch 1,core_config
+   	setflag user,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:
+	arg 10,regb
+
+//检查数据是否合法，宽度范围
+//输入: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: program/rfcomm.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/rfcomm.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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 patch27_1,mem_patch27
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch28_0,mem_patch28
+	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 patch28_1,mem_patch28
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch29_0,mem_patch29
+	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 patch29_1,mem_patch29
+	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: program/scheduler.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/scheduler.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/scheduler.prog	(working copy)
@@ -0,0 +1,460 @@
+scheduler_process:
+	bpatchx patch29_2,mem_patch29
+	call check_51cmd
+	call app_process_bb_event
+	call process_conn_sm
+/* check the connection state sequence byte */
+	bpatchx patch29_3,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_4,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_5,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_6,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_7,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 patch2a_0,mem_patch2a
+	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 patch2a_1,mem_patch2a
+	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_2,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_3,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_4,mem_patch2a
+	call l2cap_malloc_sdp_channel
+	call sdp_send_spp_request
+	branch MSDP_send_req_done
+
+upper_sm_send_rfcomm_conn:
+	bpatchx patch2a_5,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_6,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_7,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 patch2b_0,mem_patch2b
+	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 patch2b_1,mem_patch2b
+	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_2,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_3,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_4,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_5,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_6,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: program/sdp.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/sdp.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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_7,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 patch2c_0,mem_patch2c
+	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 patch2c_1,mem_patch2c
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch2d_0,mem_patch2d
+	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 patch2d_1,mem_patch2d
+	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_2,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_3,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: program/security.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/security.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/security.prog	(working copy)
@@ -0,0 +1,2058 @@
+
+ifdef SECURE_CONNECTION
+	
+function_g2:
+	bpatchx patch2d_4,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_5,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_6,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_7,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 patch2e_0,mem_patch2e
+	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 patch2e_1,mem_patch2e
+	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_2,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_3,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_4,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_5,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_6,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
+
+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: program/sim.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/sim.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: program/simple_pairing.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/simple_pairing.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/simple_pairing.prog	(working copy)
@@ -0,0 +1,2919 @@
+
+publickey_init:
+	fetch 1,mem_ssp_enable
+	nbranch sp_initialize,blank
+	branch sp_initialize_256
+
+sp_calc_sequence_256_check:
+	bpatchx patch2e_7,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 patch2f_0,mem_patch2f
+	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 patch2f_1,mem_patch2f
+	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_2,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_3,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_4,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_5,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_6,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_7,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 patch30_0,mem_patch30
+	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 patch30_1,mem_patch30
+	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_2,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_3,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_4,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_5,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: program/ui.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/ui.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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_6,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_7,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 patch31_0,mem_patch31
+	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 patch31_1,mem_patch31
+	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_2,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_3,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_4,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: program/usb.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/usb.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/usb.prog	(working copy)
@@ -0,0 +1,1067 @@
+ ifdef COMPILE_USB
+
+usb_isr:
+	bpatchx patch31_5,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_6,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_7,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
+	sub pdata,7,null
+	rtn positive
+usb_class_type:
+	bpatchx patch32_0,mem_patch32
+	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_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 patch32_1,mem_patch32
+//	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
+	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_2,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
+	store 1,mem_24g_led_status
+	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_3,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_4,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_5,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: program/utility.prog
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/utility.prog	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/program/utility.prog	(working copy)
@@ -0,0 +1,1175 @@
+
+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
+
+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_6,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_7,mem_patch32
+	rtn
+
+timer_check_timeout:
+	arg 0x800,timeup
+	lshift16 timeup,timeup
+	iadd timeup,pdata
+	rtn
+
+
+timer_reinit:
+	arg 0,queue
+timer_check:
+	bpatchx patch33_0,mem_patch33
+	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
+	
+test_no_white:
+	fetch 1,core_config
+	set1 whiteoff_bit,pdata
+	store 1,core_config			/* whitening off */
+	rtn
+
+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 patch33_1,mem_patch33
+	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_2,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	
+
+	// 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
+
+clear_wake:
+	setarg 0
+	set1 19,pdata	//enable ice low wakeup
+	store 8,mem_gpio_wakeup_low
+	rtn
+
+
+
+
Index: sched/1308.dat
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/sched/1308.dat	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/sched/1308.dat	(working copy)
@@ -0,0 +1,2 @@
+
+
Index: sched/mouse.dat
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/sched/mouse.dat	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/sched/mouse.dat	(working copy)
@@ -0,0 +1,506 @@
+mem_device_option:08	#08 mouse
+
+mem_lpm_config:88 1c ce	#4khz
+mem_fcomp_div:18
+
+mem_rf_init_data:ff
+mem_rf_init_ptr:mem_rf_init_data
+mem_lpm_xtalcnt:70
+
+
+mem_dig_aon_vsel:00
+#hw agc
+mem_gain_fix:ff
+mem_gain_second_agc_en:00
+
+
+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
+18
+
+#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
+1a
+
+#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
+01
+
+#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
+07
+
+#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
+80
+
+#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
+03
+
+#mouse flag byte8
+#bit0 MOUSE_ENABLE_SMOOTHER
+#bit1 MOUSE_ENABLE_XY_OFFSET
+01
+
+mem_mouse_discovery_timeout:b0 04	#2min
+mem_mouse_24g_pair_timeout_init:08 07#3min	    24g reconn timer&pair timer
+mem_mouse_direct_timeout:64  #05s
+mem_mouse_24g_reconn_timeout_init:ff #10s
+
+mem_mouse_24g_pair_tx_power:94 #-20dBm
+mem_rssi_dis_min_24g_init:85
+mem_rssi_dis_max_24g_init:90
+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:0b
+mem_fw_button_gpio:0c
+mem_dpi_button_gpio:0d
+mem_matrix_public_gpio:ff
+mem_sensor_motion_gpio:ff
+mem_customer_key_gpio:ff
+mem_whee_a_data_gpio:05
+mem_whee_b_data_gpio:04
+mem_config_device_24g_led_gpio:ff
+mem_config_device_bt1_led_gpio:ff
+mem_select_sensor_angle_gpio:08
+
+mem_lbutton_gpio:0b
+mem_rbutton_gpio:0c
+mem_mbutton_gpio:0d
+mem_config_select_device_button_gpio:ff
+mem_whee_ta_data_gpio:ff
+mem_whee_tb_data_gpio:ff
+mem_device_switch_gpio:ff
+mem_mouse_sensor_sclk_gpio:07
+mem_mouse_sensor_sdio_gpio:06
+mem_config_low_voltage_alarm_gpio:ff
+mem_config_device_bt2_led_gpio:ff
+mem_dpi_led_gpio:ff#03
+#mem_rf_debug_rx_gpio:8b
+#mem_rf_debug_tx_gpio:8b
+#mem_sensor_angle_default:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+#mem_sensor_angle_switch:02	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+mem_config_sensor_dpi:00		#00--1200   01--1600
+
+mem_sensor_angle_connect_gnd:03	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+mem_sensor_angle_high_impedance:00	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+mem_sensor_angle_connect_vin:02	#00--6CLK   01--9CLK   02--12CLK   03--3CLK
+
+
+mem_mouse_multi_led_gpio:03
+mem_mouse_multi_led_on_timer_init:14
+mem_mouse_multi_led_blink_timer_init:05
+
+mem_usb_offline_check_gpio:ff
+
+
+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
+
+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
+
+mem_lpm_mode:01
+
+
+mem_mouse_bluetooth_type:03	#03 bt3.0+ble   #02 ble   #01 bt3.0
+mem_device_number:03  #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:05 00 #500ms
+mem_mouse_24g_search_dongle_time_init: 64 00
+mem_mouse_no_data_timeout:70 17 #10min
+
+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
+
+
+#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:02
+
+#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:05 01		#1.5V
+9f 00#mem_mouse_vdd_empty_vol  :0.9V
+b1 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_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
+mem_adc_read_time_init:0a 	#1s
+mem_adc_low_volatage_led_blink_timer:64 00	#10s
+#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:15 a0 c8 12 23 51
+mem_local_name_length:
+'Bluetooth Mouse 3.0
+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_interval_min:
+07 00 #min interval
+07 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_lap:8e b1 3a 0e 8e ed
+
+
+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_ui_button_gpio:ff
+mem_ui_button_timeout:1e
+
+
+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_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_8650_init_new:
+09 5a
+ff 27
+ab 40
+b3 56
+9b e6
+a8 12
+a9 c0
+be e6
+a5 af
+a0 21
+a1 02
+b8 10
+b9 0b
+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
+46 34
+60 07
+69 04
+7d 20
+7e 00
+09 00
+#0d 1b
+#0e 1b
+
+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_ui_led_struct_ptr:mem_mouse_led_type
+mem_ui_led_struct_num:01
+
+  
+#24g init
+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:07
+mem_rssi_signal_buf_ptr:mem_mouse_rssi_signal_buf
+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:01#3dbm
+
+
+
Index: util/crc16.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: util/crc16.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: util/crc16.pl
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/util/crc16.pl	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: util/eeprom2fulleeprom.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: util/eeprom2fulleeprom.exe
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: util/eeprom2fulleeprom.pl
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/util/eeprom2fulleeprom.pl	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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: util/mergepatch.pl
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/util/mergepatch.pl	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/util/mergepatch.pl	(working copy)
@@ -0,0 +1,276 @@
+#!/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 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;
+		}
+		$defs .= $1 . " " if(/^define\s+(\w+)\s*/);
+		if(/^\s*ifdef\s+(\w+)\s*/) {
+			push @valid, ($defs =~ /(^|\s)$1(\s|$)/ ? 1 : 0) & $valid[$#valid];
+		} elsif(/^\s*ifndef\s+(\w+)\s*/) {
+			push @valid, ($defs =~ /(^|\s)$1(\s|$)/ ? 0 : 1) & $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 {
+				print file $_;
+			}
+		}
+	}
+	close file;
+}
+
+sub genpatch
+{
+	print "genpatch\n";
+	$patched = 0;
+	open file,"program/patch.prog";
+	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, $z = 1;$i < @f;$i++) {
+		$_ = $f[$i];
+		$line = $i - 1 if(/^org\s+0x[23]000/ && $line == 0);
+		if(/^org z\s*$/) {
+			$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);
+	for($i = 0;$i < @f;$i++) {
+		$_ = $f[$i];
+		$label = "";
+		if(/^\s*(branch|nbranch|call|ncall)\s+(\w+)\s*$/ || /^\s*(branch|nbranch|call|ncall)\s+(\w+)\s*,\s*(\w+)\s*$/) {
+			$label = $2;
+		}
+		if(/^\s*(bmark|beq|bne|bbit[01])\s+(\w+)\s*,\s*(\w+)\s*$/) {
+			$label = $3;
+		}
+		if(exists($lab{$label})) {
+			$nlabel = "jmpz_" . $label;
+			$f[$i] =~ s/$label/eval "$nlabel"/e;
+			if($lab{$label} > 100) {
+				$f[$line] .= sprintf("%s:\n\tsetarg 0x%x\n\tbranch p_zcode_entrance_2Bytes_common\n\n", $nlabel, int($lab{$label}/0x1000));
+				$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;
+}
+
+parseif("output/bt_program23.meta");
+parseif("output/bt_format.meta");
+genpatch() if($defs !~ / SIM /);
+malloc();
+zcode();
Index: util/patch.pl
===================================================================
--- /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/util/patch.pl	(nonexistent)
+++ /YC1308AC/branch/mouse_project/SA_Project/SA9538 2.4G connect first/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;
