//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR ARM ANSI C/C++ Compiler V4.41A/W32 EVALUATION   09/Dec/2007  21:15:05 /
// Copyright 1999-2005 IAR Systems. All rights reserved.                     /
//                                                                           /
//    Cpu mode        =  interwork                                           /
//    Endian          =  little                                              /
//    Stack alignment =  4                                                   /
//    Source file     =  D:\Pasha\elf\googlecode\SieTextView\main.c          /
//    Command line    =  D:\Pasha\elf\googlecode\SieTextView\main.c -D       /
//                       NEWSGOLD -D ELKA -lC D:\Pasha\elf\googlecode\SieTex /
//                       tView\Release\List\ -lA D:\Pasha\elf\googlecode\Sie /
//                       TextView\Release\List\ -o                           /
//                       D:\Pasha\elf\googlecode\SieTextView\Release\Obj\    /
//                       -s9 --no_unroll --cpu_mode arm --endian little      /
//                       --cpu ARM926EJ-S --stack_align 4 --interwork -e     /
//                       --fpu None -I "D:\Pasha\ARM_Embedded_Workbench\Embe /
//                       dded Workbench 4.0 Evaluation\ARM\INC\"             /
//                       --inline_threshold=2                                /
//    List file       =  D:\Pasha\elf\googlecode\SieTextView\Release\List\ma /
//                       in.s79                                              /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME main

        RTMODEL "StackAlign4", "USED"
        RTMODEL "__cpu_mode", "__pcs__interwork"
        RTMODEL "__data_model", "absolute"
        RTMODEL "__endian", "little"
        RTMODEL "__rt_version", "6"

        RSEG CSTACK:DATA:NOROOT(2)

        PUBWEAK `?*?DATA_ID`
        MULTWEAK ??AddToFList??rT
        MULTWEAK ??Add_Blist_Item??rT
        MULTWEAK ??CreateRootMenu??rT
??DataTable1 EQU 0
??DataTable10 EQU 0
??DataTable11 EQU 0
??DataTable12 EQU 0
??DataTable13 EQU 0
??DataTable14 EQU 0
??DataTable15 EQU 0
??DataTable16 EQU 0
??DataTable17 EQU 0
??DataTable18 EQU 0
??DataTable2 EQU 0
??DataTable22 EQU 0
??DataTable23 EQU 0
??DataTable24 EQU 0
??DataTable25 EQU 0
??DataTable27 EQU 0
??DataTable28 EQU 0
??DataTable29 EQU 0
??DataTable3 EQU 0
??DataTable30 EQU 0
??DataTable31 EQU 0
??DataTable32 EQU 0
??DataTable33 EQU 0
??DataTable34 EQU 0
??DataTable38 EQU 0
??DataTable39 EQU 0
??DataTable4 EQU 0
??DataTable40 EQU 0
??DataTable41 EQU 0
??DataTable42 EQU 0
??DataTable43 EQU 0
??DataTable44 EQU 0
??DataTable46 EQU 0
??DataTable48 EQU 0
??DataTable5 EQU 0
??DataTable6 EQU 0
??DataTable7 EQU 0
??DataTable8 EQU 0
??DataTable9 EQU 0
        MULTWEAK ??DrawInfoDialog??rT
        MULTWEAK ??DrawScreen??rT
        MULTWEAK ??DrawStateBar??rT
        MULTWEAK ??ElfKiller??rT
        MULTWEAK ??Fill_BLIST??rT
        MULTWEAK ??FindBLISTtByN??rT
        MULTWEAK ??FindFLISTtByN??rT
        MULTWEAK ??FindFLISTtByNS??rT
        MULTWEAK ??FindFiles??rT
        MULTWEAK ??Free_BLIST??rT
        MULTWEAK ??Free_FLIST??rT
        MULTWEAK ??InitConfig??rA
        MULTWEAK ??InitSettings??rT
        MULTWEAK ??KillIndex??rT
        MULTWEAK ??LaunchEditor??rT
        MULTWEAK ??Rand??rA
        MULTWEAK ??SavePath??rT
        MULTWEAK ??UpdateCSMname??rT
        MULTWEAK ??WriteLog??rT
        MULTWEAK ??add2bmk??rT
        MULTWEAK ??adjustWindowsSize??rT
        MULTWEAK ??bmklist_menu_ghook??rT
        MULTWEAK ??bmklist_menu_iconhndl??rT
        MULTWEAK ??bmklist_menu_onkey??rT
        MULTWEAK ??createIndex??rT
        MULTWEAK ??create_menu_bookmark??rT
        MULTWEAK ??create_menu_goto??rT
        MULTWEAK ??create_menu_main??rT
        MULTWEAK ??deletebmk??rT
        MULTWEAK ??div??rT
        MULTWEAK ??filelist_menu_ghook??rT
        MULTWEAK ??filelist_menu_iconhndl??rT
        MULTWEAK ??filelist_menu_onkey??rT
        MULTWEAK ??gb2unicode??rA
        MULTWEAK ??getCodeType??rA
        MULTWEAK ??getStartOffset??rT
        MULTWEAK ??gotoPos??rT
        MULTWEAK ??gotomenu_bookmark??rT
        MULTWEAK ??gotomenu_end??rT
        MULTWEAK ??gotomenu_random??rT
        MULTWEAK ??gotomenu_readed??rT
        MULTWEAK ??gotomenu_start??rT
        MULTWEAK ??inp_ghook??rT
        MULTWEAK ??inp_locret??rT
        MULTWEAK ??inp_onkey??rT
        MULTWEAK ??kill_data??rA
        MULTWEAK ??loadBuffer??rT
        MULTWEAK ??loadFile??rT
        MULTWEAK ??main??rT
        MULTWEAK ??maincsm_onclose??rT
        MULTWEAK ??maincsm_oncreate??rT
        MULTWEAK ??maincsm_onmessage??rT
        MULTWEAK ??mainmenu_add2bmk??rT
        MULTWEAK ??mainmenu_edit??rT
        MULTWEAK ??mainmenu_goto??rT
        MULTWEAK ??mainmenu_help??rT
        MULTWEAK ??mainmenu_open??rT
        MULTWEAK ??mainmenu_quit??rT
        MULTWEAK ??mainmenu_search??rT
        MULTWEAK ??mainmenu_sendsms??rT
        MULTWEAK ??mainmenu_set??rT
        MULTWEAK ??method0??rT
        MULTWEAK ??method1??rT
        MULTWEAK ??method2??rT
        MULTWEAK ??method3??rT
        MULTWEAK ??method4??rT
        MULTWEAK ??method5??rT
        MULTWEAK ??method7??rT
        MULTWEAK ??method8??rT
        MULTWEAK ??method9??rT
        MULTWEAK ??openFile??rT
        MULTWEAK ??open_select_file_gui??rT
        MULTWEAK ??patch_header??rA
        MULTWEAK ??readAddrInt??rA
        MULTWEAK ??rowFluctuate??rT
        MULTWEAK ??saveText??rT
        MULTWEAK ??str2ws_unicode??rA
        MULTWEAK ??strcmp_nocase??rT
        MULTWEAK ??unicode2gb??rA
        MULTWEAK ??unicode2utf8??rA
        MULTWEAK ??unicodeSwitch??rA
        MULTWEAK ??utf82unicode??rA
        MULTWEAK ??writeAddrInt??rA
        MULTWEAK ??ws2str_unicode??rA
        PUBWEAK ?init?tab?DATA_I
        PUBWEAK ?init?tab?DATA_Z
        PUBLIC AddToFList
        FUNCTION AddToFList,0203H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC Add_Blist_Item
        FUNCTION Add_Blist_Item,0203H
        LOCFRAME CSTACK, 36, STACK
        PUBLIC Canvas
        PUBLIC CreateRootMenu
        FUNCTION CreateRootMenu,0201H
        LOCFRAME CSTACK, 56, STACK
        PUBLIC DrawInfoDialog
        FUNCTION DrawInfoDialog,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC DrawScreen
        FUNCTION DrawScreen,0203H
        LOCFRAME CSTACK, 56, STACK
        PUBLIC DrawStateBar
        FUNCTION DrawStateBar,0203H
        LOCFRAME CSTACK, 88, STACK
        PUBLIC ElfKiller
        FUNCTION ElfKiller,0603H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC Fill_BLIST
        FUNCTION Fill_BLIST,0201H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC FindBLISTtByN
        FUNCTION FindBLISTtByN,0203H
        PUBLIC FindFLISTtByN
        FUNCTION FindFLISTtByN,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC FindFLISTtByNS
        FUNCTION FindFLISTtByNS,0203H
        PUBLIC FindFiles
        FUNCTION FindFiles,0203H
        LOCFRAME CSTACK, 1252, STACK
        PUBLIC Free_BLIST
        FUNCTION Free_BLIST,0203H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC Free_FLIST
        FUNCTION Free_FLIST,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC InitSettings
        FUNCTION InitSettings,0201H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC KillIndex
        FUNCTION KillIndex,0201H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC LaunchEditor
        FUNCTION LaunchEditor,0203H
        LOCFRAME CSTACK, 72, STACK
        PUBLIC MAINCSM
        PUBLIC Quit_Required
        PUBLIC SavePath
        FUNCTION SavePath,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC UpdateCSMname
        FUNCTION UpdateCSMname,0203H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC WriteLog
        FUNCTION WriteLog,0203H
        LOCFRAME CSTACK, 20, STACK
        PUBLIC add2bmk
        FUNCTION add2bmk,0203H
        LOCFRAME CSTACK, 20, STACK
        PUBLIC adjustWindowsSize
        FUNCTION adjustWindowsSize,0201H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC back
        PUBLIC bltop
        PUBLIC bmkfd
        PUBLIC bmklist_HDR
        PUBLIC bmklist_STRUCT
        PUBLIC bmklist_menu_ghook
        FUNCTION bmklist_menu_ghook,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC bmklist_menu_iconhndl
        FUNCTION bmklist_menu_iconhndl,0603H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC bmklist_menu_onkey
        FUNCTION bmklist_menu_onkey,0603H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC bmknum
        PUBLIC bookmark
        PUBLIC buff
        PUBLIC buffloaded
        PUBLIC bytelen
        PUBLIC codetype
        PUBLIC createIndex
        FUNCTION createIndex,0203H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC create_menu_bookmark
        FUNCTION create_menu_bookmark,0203H
        LOCFRAME CSTACK, 28, STACK
        PUBLIC create_menu_goto
        FUNCTION create_menu_goto,0203H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC create_menu_main
        FUNCTION create_menu_main,0203H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC curblock
        PUBLIC deletebmk
        FUNCTION deletebmk,0203H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC div
        FUNCTION div,0203H
        PUBLIC fd
        PUBLIC fileindex
        PUBLIC filelist_HDR
        PUBLIC filelist_STRUCT
        PUBLIC filelist_menu_ghook
        FUNCTION filelist_menu_ghook,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC filelist_menu_iconhndl
        FUNCTION filelist_menu_iconhndl,0603H
        LOCFRAME CSTACK, 28, STACK
        PUBLIC filelist_menu_onkey
        FUNCTION filelist_menu_onkey,0603H
        LOCFRAME CSTACK, 16, STACK
        PUBLIC fltop
        PUBLIC foffset
        PUBLIC getStartOffset
        FUNCTION getStartOffset,0203H
        PUBLIC gotoPos
        FUNCTION gotoPos,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC gotomenu_HDR
        PUBLIC gotomenu_HNDLS
        PUBLIC gotomenu_ITEMS
        PUBLIC gotomenu_STRUCT
        PUBLIC gotomenu_bookmark
        FUNCTION gotomenu_bookmark,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC gotomenu_end
        FUNCTION gotomenu_end,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC gotomenu_random
        FUNCTION gotomenu_random,0603H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC gotomenu_readed
        FUNCTION gotomenu_readed,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC gotomenu_start
        FUNCTION gotomenu_start,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC gui_methods
        PUBLIC header
        PUBLIC inp_desc
        PUBLIC inp_ghook
        FUNCTION inp_ghook,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC inp_hdr
        PUBLIC inp_locret
        FUNCTION inp_locret,0603H
        PUBLIC inp_onkey
        FUNCTION inp_onkey,0603H
        LOCFRAME CSTACK, 52, STACK
        PUBLIC llen
        PUBLIC loadBuffer
        FUNCTION loadBuffer,0203H
        LOCFRAME CSTACK, 20, STACK
        PUBLIC loadFile
        FUNCTION loadFile,0203H
        LOCFRAME CSTACK, 20, STACK
        PUBLIC main
        FUNCTION main,0a03H
        LOCFRAME CSTACK, 80, STACK
        PUBLIC maincsm_name_body
        PUBLIC maincsm_onclose
        FUNCTION maincsm_onclose,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC maincsm_oncreate
        FUNCTION maincsm_oncreate,0603H
        LOCFRAME CSTACK, 16, STACK
        PUBLIC maincsm_onmessage
        FUNCTION maincsm_onmessage,0603H
        LOCFRAME CSTACK, 16, STACK
        PUBLIC mainmenu_HDR
        PUBLIC mainmenu_HNDLS
        PUBLIC mainmenu_ITEMS
        PUBLIC mainmenu_STRUCT
        PUBLIC mainmenu_add2bmk
        FUNCTION mainmenu_add2bmk,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC mainmenu_edit
        FUNCTION mainmenu_edit,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC mainmenu_goto
        FUNCTION mainmenu_goto,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC mainmenu_help
        FUNCTION mainmenu_help,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC mainmenu_open
        FUNCTION mainmenu_open,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC mainmenu_quit
        FUNCTION mainmenu_quit,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC mainmenu_search
        FUNCTION mainmenu_search,0603H
        PUBLIC mainmenu_sendsms
        FUNCTION mainmenu_sendsms,0603H
        PUBLIC mainmenu_set
        FUNCTION mainmenu_set,0603H
        LOCFRAME CSTACK, 20, STACK
        PUBLIC menu_sk
        PUBLIC menu_skt
        PUBLIC menusoftkeys
        PUBLIC method0
        FUNCTION method0,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC method1
        FUNCTION method1,0603H
        PUBLIC method2
        FUNCTION method2,0603H
        PUBLIC method3
        FUNCTION method3,0603H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC method4
        FUNCTION method4,0603H
        PUBLIC method5
        FUNCTION method5,0603H
        LOCFRAME CSTACK, 16, STACK
        PUBLIC method7
        FUNCTION method7,0603H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC method8
        FUNCTION method8,0603H
        PUBLIC method9
        FUNCTION method9,0603H
        PUBLIC minus11
        PUBLIC openFile
        FUNCTION openFile,0203H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC open_select_file_gui
        FUNCTION open_select_file_gui,0203H
        LOCFRAME CSTACK, 36, STACK
        PUBWEAK patch_header
        FUNCTION patch_header,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC procfile
        PUBLIC rlen
        PUBLIC rowFluctuate
        FUNCTION rowFluctuate,0203H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC saveText
        FUNCTION saveText,0203H
        LOCFRAME CSTACK, 172, STACK
        PUBLIC sbw
        PUBLIC showinfo
        PUBLIC strcmp_nocase
        FUNCTION strcmp_nocase,0203H
        PUBLIC ul
        PUBLIC viewlen
        PUBLIC viewpos
        PUBLIC viewrow
        PUBLIC winh
        PUBLIC winw
        PUBLIC winx
        PUBLIC winy
        
        CFI Names cfiNames0
        CFI StackFrame CFA R13 HUGEDATA
        CFI Resource R0:32, R1:32, R2:32, R3:32, R4:32, R5:32, R6:32, R7:32
        CFI Resource R8:32, R9:32, R10:32, R11:32, R12:32, CPSR:32, R13:32
        CFI Resource R14:32, SPSR:32
        CFI VirtualResource ?RET:32
        CFI EndNames cfiNames0
        
        CFI Common cfiCommon0 Using cfiNames0
        CFI CodeAlign 4
        CFI DataAlign 4
        CFI ReturnAddress ?RET CODE
        CFI CFA R13+0
        CFI R0 Undefined
        CFI R1 Undefined
        CFI R2 Undefined
        CFI R3 Undefined
        CFI R4 SameValue
        CFI R5 SameValue
        CFI R6 SameValue
        CFI R7 SameValue
        CFI R8 SameValue
        CFI R9 SameValue
        CFI R10 SameValue
        CFI R11 SameValue
        CFI R12 Undefined
        CFI CPSR SameValue
        CFI R14 Undefined
        CFI SPSR SameValue
        CFI ?RET R14
        CFI EndCommon cfiCommon0
        
        
        CFI Common cfiCommon1 Using cfiNames0
        CFI CodeAlign 2
        CFI DataAlign 4
        CFI ReturnAddress ?RET CODE
        CFI CFA R13+0
        CFI R0 Undefined
        CFI R1 Undefined
        CFI R2 Undefined
        CFI R3 Undefined
        CFI R4 SameValue
        CFI R5 SameValue
        CFI R6 SameValue
        CFI R7 SameValue
        CFI R8 SameValue
        CFI R9 SameValue
        CFI R10 SameValue
        CFI R11 SameValue
        CFI R12 Undefined
        CFI CPSR SameValue
        CFI R14 Undefined
        CFI SPSR SameValue
        CFI ?RET R14
        CFI EndCommon cfiCommon1
        
InitConfig          SYMBOL "InitConfig"
Rand                SYMBOL "Rand"
gb2unicode          SYMBOL "gb2unicode"
getCodeType         SYMBOL "getCodeType"
kill_data           SYMBOL "kill_data"
readAddrInt         SYMBOL "readAddrInt"
str2ws_unicode      SYMBOL "str2ws_unicode"
unicode2gb          SYMBOL "unicode2gb"
unicode2utf8        SYMBOL "unicode2utf8"
unicodeSwitch       SYMBOL "unicodeSwitch"
utf82unicode        SYMBOL "utf82unicode"
writeAddrInt        SYMBOL "writeAddrInt"
ws2str_unicode      SYMBOL "ws2str_unicode"
AddToFList          SYMBOL "AddToFList"
??AddToFList??rT    SYMBOL "??rT", AddToFList
Add_Blist_Item      SYMBOL "Add_Blist_Item"
??Add_Blist_Item??rT SYMBOL "??rT", Add_Blist_Item
CreateRootMenu      SYMBOL "CreateRootMenu"
??CreateRootMenu??rT SYMBOL "??rT", CreateRootMenu
DrawInfoDialog      SYMBOL "DrawInfoDialog"
??DrawInfoDialog??rT SYMBOL "??rT", DrawInfoDialog
DrawScreen          SYMBOL "DrawScreen"
??DrawScreen??rT    SYMBOL "??rT", DrawScreen
DrawStateBar        SYMBOL "DrawStateBar"
??DrawStateBar??rT  SYMBOL "??rT", DrawStateBar
ElfKiller           SYMBOL "ElfKiller"
??ElfKiller??rT     SYMBOL "??rT", ElfKiller
Fill_BLIST          SYMBOL "Fill_BLIST"
??Fill_BLIST??rT    SYMBOL "??rT", Fill_BLIST
FindBLISTtByN       SYMBOL "FindBLISTtByN"
??FindBLISTtByN??rT SYMBOL "??rT", FindBLISTtByN
FindFLISTtByN       SYMBOL "FindFLISTtByN"
??FindFLISTtByN??rT SYMBOL "??rT", FindFLISTtByN
FindFLISTtByNS      SYMBOL "FindFLISTtByNS"
??FindFLISTtByNS??rT SYMBOL "??rT", FindFLISTtByNS
FindFiles           SYMBOL "FindFiles"
??FindFiles??rT     SYMBOL "??rT", FindFiles
Free_BLIST          SYMBOL "Free_BLIST"
??Free_BLIST??rT    SYMBOL "??rT", Free_BLIST
Free_FLIST          SYMBOL "Free_FLIST"
??Free_FLIST??rT    SYMBOL "??rT", Free_FLIST
??InitConfig??rA    SYMBOL "??rA", InitConfig
InitSettings        SYMBOL "InitSettings"
??InitSettings??rT  SYMBOL "??rT", InitSettings
KillIndex           SYMBOL "KillIndex"
??KillIndex??rT     SYMBOL "??rT", KillIndex
LaunchEditor        SYMBOL "LaunchEditor"
??LaunchEditor??rT  SYMBOL "??rT", LaunchEditor
??Rand??rA          SYMBOL "??rA", Rand
SavePath            SYMBOL "SavePath"
??SavePath??rT      SYMBOL "??rT", SavePath
UpdateCSMname       SYMBOL "UpdateCSMname"
??UpdateCSMname??rT SYMBOL "??rT", UpdateCSMname
WriteLog            SYMBOL "WriteLog"
??WriteLog??rT      SYMBOL "??rT", WriteLog
add2bmk             SYMBOL "add2bmk"
??add2bmk??rT       SYMBOL "??rT", add2bmk
adjustWindowsSize   SYMBOL "adjustWindowsSize"
??adjustWindowsSize??rT SYMBOL "??rT", adjustWindowsSize
bmklist_menu_ghook  SYMBOL "bmklist_menu_ghook"
??bmklist_menu_ghook??rT SYMBOL "??rT", bmklist_menu_ghook
bmklist_menu_iconhndl SYMBOL "bmklist_menu_iconhndl"
??bmklist_menu_iconhndl??rT SYMBOL "??rT", bmklist_menu_iconhndl
bmklist_menu_onkey  SYMBOL "bmklist_menu_onkey"
??bmklist_menu_onkey??rT SYMBOL "??rT", bmklist_menu_onkey
createIndex         SYMBOL "createIndex"
??createIndex??rT   SYMBOL "??rT", createIndex
create_menu_bookmark SYMBOL "create_menu_bookmark"
??create_menu_bookmark??rT SYMBOL "??rT", create_menu_bookmark
create_menu_goto    SYMBOL "create_menu_goto"
??create_menu_goto??rT SYMBOL "??rT", create_menu_goto
create_menu_main    SYMBOL "create_menu_main"
??create_menu_main??rT SYMBOL "??rT", create_menu_main
deletebmk           SYMBOL "deletebmk"
??deletebmk??rT     SYMBOL "??rT", deletebmk
div                 SYMBOL "div"
??div??rT           SYMBOL "??rT", div
filelist_menu_ghook SYMBOL "filelist_menu_ghook"
??filelist_menu_ghook??rT SYMBOL "??rT", filelist_menu_ghook
filelist_menu_iconhndl SYMBOL "filelist_menu_iconhndl"
??filelist_menu_iconhndl??rT SYMBOL "??rT", filelist_menu_iconhndl
filelist_menu_onkey SYMBOL "filelist_menu_onkey"
??filelist_menu_onkey??rT SYMBOL "??rT", filelist_menu_onkey
??gb2unicode??rA    SYMBOL "??rA", gb2unicode
??getCodeType??rA   SYMBOL "??rA", getCodeType
getStartOffset      SYMBOL "getStartOffset"
??getStartOffset??rT SYMBOL "??rT", getStartOffset
gotoPos             SYMBOL "gotoPos"
??gotoPos??rT       SYMBOL "??rT", gotoPos
gotomenu_bookmark   SYMBOL "gotomenu_bookmark"
??gotomenu_bookmark??rT SYMBOL "??rT", gotomenu_bookmark
gotomenu_end        SYMBOL "gotomenu_end"
??gotomenu_end??rT  SYMBOL "??rT", gotomenu_end
gotomenu_random     SYMBOL "gotomenu_random"
??gotomenu_random??rT SYMBOL "??rT", gotomenu_random
gotomenu_readed     SYMBOL "gotomenu_readed"
??gotomenu_readed??rT SYMBOL "??rT", gotomenu_readed
gotomenu_start      SYMBOL "gotomenu_start"
??gotomenu_start??rT SYMBOL "??rT", gotomenu_start
inp_ghook           SYMBOL "inp_ghook"
??inp_ghook??rT     SYMBOL "??rT", inp_ghook
inp_locret          SYMBOL "inp_locret"
??inp_locret??rT    SYMBOL "??rT", inp_locret
inp_onkey           SYMBOL "inp_onkey"
??inp_onkey??rT     SYMBOL "??rT", inp_onkey
??kill_data??rA     SYMBOL "??rA", kill_data
loadBuffer          SYMBOL "loadBuffer"
??loadBuffer??rT    SYMBOL "??rT", loadBuffer
loadFile            SYMBOL "loadFile"
??loadFile??rT      SYMBOL "??rT", loadFile
main                SYMBOL "main"
??main??rT          SYMBOL "??rT", main
maincsm_onclose     SYMBOL "maincsm_onclose"
??maincsm_onclose??rT SYMBOL "??rT", maincsm_onclose
maincsm_oncreate    SYMBOL "maincsm_oncreate"
??maincsm_oncreate??rT SYMBOL "??rT", maincsm_oncreate
maincsm_onmessage   SYMBOL "maincsm_onmessage"
??maincsm_onmessage??rT SYMBOL "??rT", maincsm_onmessage
mainmenu_add2bmk    SYMBOL "mainmenu_add2bmk"
??mainmenu_add2bmk??rT SYMBOL "??rT", mainmenu_add2bmk
mainmenu_edit       SYMBOL "mainmenu_edit"
??mainmenu_edit??rT SYMBOL "??rT", mainmenu_edit
mainmenu_goto       SYMBOL "mainmenu_goto"
??mainmenu_goto??rT SYMBOL "??rT", mainmenu_goto
mainmenu_help       SYMBOL "mainmenu_help"
??mainmenu_help??rT SYMBOL "??rT", mainmenu_help
mainmenu_open       SYMBOL "mainmenu_open"
??mainmenu_open??rT SYMBOL "??rT", mainmenu_open
mainmenu_quit       SYMBOL "mainmenu_quit"
??mainmenu_quit??rT SYMBOL "??rT", mainmenu_quit
mainmenu_search     SYMBOL "mainmenu_search"
??mainmenu_search??rT SYMBOL "??rT", mainmenu_search
mainmenu_sendsms    SYMBOL "mainmenu_sendsms"
??mainmenu_sendsms??rT SYMBOL "??rT", mainmenu_sendsms
mainmenu_set        SYMBOL "mainmenu_set"
??mainmenu_set??rT  SYMBOL "??rT", mainmenu_set
method0             SYMBOL "method0"
??method0??rT       SYMBOL "??rT", method0
method1             SYMBOL "method1"
??method1??rT       SYMBOL "??rT", method1
method2             SYMBOL "method2"
??method2??rT       SYMBOL "??rT", method2
method3             SYMBOL "method3"
??method3??rT       SYMBOL "??rT", method3
method4             SYMBOL "method4"
??method4??rT       SYMBOL "??rT", method4
method5             SYMBOL "method5"
??method5??rT       SYMBOL "??rT", method5
method7             SYMBOL "method7"
??method7??rT       SYMBOL "??rT", method7
method8             SYMBOL "method8"
??method8??rT       SYMBOL "??rT", method8
method9             SYMBOL "method9"
??method9??rT       SYMBOL "??rT", method9
openFile            SYMBOL "openFile"
??openFile??rT      SYMBOL "??rT", openFile
open_select_file_gui SYMBOL "open_select_file_gui"
??open_select_file_gui??rT SYMBOL "??rT", open_select_file_gui
patch_header        SYMBOL "patch_header"
??patch_header??rA  SYMBOL "??rA", patch_header
??readAddrInt??rA   SYMBOL "??rA", readAddrInt
rowFluctuate        SYMBOL "rowFluctuate"
??rowFluctuate??rT  SYMBOL "??rT", rowFluctuate
saveText            SYMBOL "saveText"
??saveText??rT      SYMBOL "??rT", saveText
??str2ws_unicode??rA SYMBOL "??rA", str2ws_unicode
strcmp_nocase       SYMBOL "strcmp_nocase"
??strcmp_nocase??rT SYMBOL "??rT", strcmp_nocase
??unicode2gb??rA    SYMBOL "??rA", unicode2gb
??unicode2utf8??rA  SYMBOL "??rA", unicode2utf8
??unicodeSwitch??rA SYMBOL "??rA", unicodeSwitch
??utf82unicode??rA  SYMBOL "??rA", utf82unicode
??writeAddrInt??rA  SYMBOL "??rA", writeAddrInt
??ws2str_unicode??rA SYMBOL "??rA", ws2str_unicode

        EXTERN ELF_BEGIN
        EXTERN InitConfig
        FUNCTION InitConfig,0200H
        EXTERN LAST
        EXTERN Rand
        FUNCTION Rand,0200H
        EXTERN acbm
        EXTERN bgcolor
        EXTERN charset
        EXTERN font
        EXTERN fontcolor
        EXTERN gb2unicode
        FUNCTION gb2unicode,0202H
        EXTERN getCodeType
        FUNCTION getCodeType,0202H
        EXTERN kill_data
        FUNCTION kill_data,0202H
        EXTERN readAddrInt
        FUNCTION readAddrInt,0202H
        EXTERN space
        EXTERN statbgcolor
        EXTERN statfont
        EXTERN statfontcolor
        EXTERN status
        EXTERN str2ws_unicode
        FUNCTION str2ws_unicode,0202H
        EXTERN unicode2gb
        FUNCTION unicode2gb,0202H
        EXTERN unicode2utf8
        FUNCTION unicode2utf8,0202H
        EXTERN unicodeSwitch
        FUNCTION unicodeSwitch,0202H
        EXTERN utf82unicode
        FUNCTION utf82unicode,0202H
        EXTERN writeAddrInt
        FUNCTION writeAddrInt,0202H
        EXTERN ws2str_unicode
        FUNCTION ws2str_unicode,0202H

// D:\Pasha\elf\googlecode\SieTextView\main.c
//    1 #include "..\inc\swilib.h"
//    2 #include "..\inc\cfg_items.h"
//    3 #include "conf_loader.h"
//    4 #include "code.h"
//    5 #include "bookmark.h"
//    6 
//    7 /* 待完成
//    8   -页码与边界控制
//    9   -字符集控制
//   10   -书签载入/生成
//   11   -定位控制
//   12   -搜索
//   13   -编辑
//   14 */
//   15 /*
//   16 ===============================
//   17          窗口调整
//   18 ===============================
//   19 */
//   20 #pragma inline

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function patch_header
        ARM
//   21 void patch_header(HEADER_DESC* head) {
patch_header:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        MOV      R4,R0
//   22   head->rc.x = 0;
        MOV      R0,#+0
        STRH     R0,[R4, #+0]
//   23   head->rc.y = YDISP;
        MOV      R0,#+24
        STRH     R0,[R4, #+2]
//   24   head->rc.x2 = ScreenW() - 1;
        SWI      +33160
        SUB      R0,R0,#+1
        STRH     R0,[R4, #+4]
//   25   head->rc.y2 = HeaderH() + YDISP;
        SWI      +33162
        ADD      R0,R0,#+24
        STRH     R0,[R4, #+6]
//   26 }
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock0

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock1 Using cfiCommon1
        CFI NoFunction
        THUMB
??getStartOffset??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock1
        REQUIRE getStartOffset
//   27 
//   28 #pragma inline
//   29 void patch_input(INPUTDIA_DESC* inp) {
//   30   inp->rc.x = 0;
//   31   inp->rc.y = HeaderH() + 1 + YDISP;
//   32   inp->rc.x2 = ScreenW() - 1;
//   33   inp->rc.y2 = ScreenH() - SoftkeyH() - 1;
//   34 }
//   35 
//   36 #pragma inline
//   37 void patch_rect(RECT* rc, int x, int y, int x2, int y2) {
//   38   rc->x = x;
//   39   rc->y = y;
//   40   rc->x2 = x2;
//   41   rc->y2 = y2;
//   42 }
//   43 
//   44 /*
//   45 ===============================
//   46            end
//   47 ===============================
//   48 */
//   49 
//   50 
//   51 /*
//   52 ===============================
//   53           参数定义
//   54 ===============================
//   55 */
//   56 int Quit_Required = 0;
//   57 /*---------文件----------*/
//   58 #define BUF_LEN 32768			//缓存长度
//   59 
//   60 typedef struct DataIndex {
//   61   struct DataIndex *next;
//   62   struct DataIndex *prev;
//   63   int offset;
//   64   int uc16len, datalen;
//   65 } DataIndex;
//   66 
//   67 DataIndex *fileindex;			//文件索引
//   68 DataIndex *curblock;		  //当前块
//   69 char* buff;	        			//缓存
//   70 int codetype = 0;
//   71 char procfile[128];
//   72 int buffloaded = 0;
//   73 int fd = 0;	        			//文件号
//   74 unsigned int ul = 0;	
//   75 int foffset = 0;					//文件偏移
//   76 
//   77 int rlen = 0, llen = 0;
//   78 
//   79 int bmkfd = 0;          	//书签文件号
//   80 int* bookmark;          	//书签
//   81 int bmknum;              	//数量
//   82 /*---------end-----------*/
//   83 
//   84 /*---------屏幕----------*/
//   85 int winx = 0, winy = 0, winw = 0, winh = 0;
//   86 int viewlen = 0;                    //一次性转换的字节数
//   87 int bytelen = 0;										//显示缓存字节数
//   88 int viewpos = 0;                    //显示起始缓存偏移
//   89 int viewrow = 0;                		//
//   90 short showinfo = 0;
//   91 WSHDR *sbw;													//屏幕显存
//   92 
//   93 extern const int charset;				//编码
//   94 extern const int space;					//行间距
//   95 extern const int font;					//字体
//   96 extern const int status;				//显示状态条
//   97 extern const int acbm;					//自动生成书签
//   98 extern const int statfont;			//状态条字体
//   99 extern const int fileicon;			//文件图标
//  100 extern const int foldicon;			//文件夹图标
//  101 extern const char fontcolor[4];	//字体颜色
//  102 extern const char bgcolor[4];		//背景颜色
//  103 extern const char statbgcolor[4]; 	//状态栏背景颜色
//  104 extern const char statfontcolor[4]; //状态栏字体颜色
//  105 extern const char LAST[];				//上次打开的文件
//  106 /*---------end-----------*/
//  107 /*
//  108 ===============================
//  109            end
//  110 ===============================
//  111 */
//  112 
//  113 
//  114 /*
//  115 ===============================
//  116            文件
//  117 ===============================
//  118 */

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock2 Using cfiCommon0
        CFI Function getStartOffset
        ARM
//  119 int getStartOffset(void) {
//  120   int offset = 0;
//  121   if (charset) codetype = charset;
getStartOffset:
        LDR      R1,??DataTable0  ;; charset
        LDR      R2,??DataTable19  ;; inp_desc
        LDR      R1,[R1, #+0]
        MOV      R0,#+0
        CMP      R1,#+0
        STRNE    R1,[R2, #+76]
        BXNE     LR
//  122   else {
//  123 		switch (codetype) {
        LDR      R1,[R2, #+76]
        SUB      R1,R1,#+2
        CMP      R1,#+1
        BLS      ??getStartOffset_0
        SUBS     R1,R1,#+2
        BEQ      ??getStartOffset_1
        BX       LR
//  124   	case 2: case 3: offset += 2; break;
??getStartOffset_0:
        MOV      R0,#+2
        BX       LR
//  125   	case 4: offset += 3; break;
??getStartOffset_1:
        MOV      R0,#+3
//  126   	}
//  127   }
//  128   return offset;
        BX       LR               ;; return
        CFI EndBlock cfiBlock2
//  129 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable0:
        DC32     charset

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock3 Using cfiCommon1
        CFI NoFunction
        THUMB
??createIndex??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock3
        REQUIRE createIndex
//  130 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock4 Using cfiCommon0
        CFI Function createIndex
        ARM
//  131 int createIndex(void) {
createIndex:
        PUSH     {R4-R7,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
//  132 	
//  133 	int readlen = BUF_LEN - (BUF_LEN >> 2);
//  134 
//  135   char *tb = NULL;
//  136   DataIndex *p;
//  137   foffset = getStartOffset();
        LDR      R5,??DataTable19  ;; inp_desc
        MOV      R4,#+0
        MOV      R7,#+0
        BL       getStartOffset
        STR      R0,[R5, #+88]
//  138   
//  139   //链表头，保存整个文件的信息
//  140   fileindex = malloc(sizeof (DataIndex));
        MOV      R0,#+20
        SWI      +20
        STR      R0,[R5, #+64]
//  141   fileindex->prev = NULL;
        STR      R4,[R0, #+4]
//  142   fileindex->next = NULL;
        LDR      R0,[R5, #+64]
//  143   fileindex->offset = foffset;
//  144   fileindex->uc16len = 0;
//  145   fileindex->datalen = 0;
//  146   p = fileindex;
//  147   
//  148   if (lseek(fd, foffset, S_SET, &ul, &ul) != foffset) return 0;
        ADD      R3,R5,#+408
        STR      R4,[R0, #+0]
        LDR      R6,[R5, #+64]
        LDR      R0,[R5, #+88]
        MOV      R2,R4
        STR      R0,[R6, #+8]
        STR      R4,[R6, #+12]
        STR      R4,[R6, #+16]
        ADD      R0,R5,#+408
        PUSH     {R0}
        CFI CFA R13+24
        LDR      R1,[R5, #+88]
        LDR      R0,[R5, #+84]
        SWI      +15
        LDR      R1,[R5, #+88]
        ADD      SP,SP,#+4
        CFI CFA R13+20
        CMP      R0,R1
        BEQ      ??createIndex_0
??createIndex_1:
        MOV      R0,#+0
        POP      {R4-R7,PC}
//  149   
//  150   while ((rlen = llen = fread(fd, buff, readlen, &ul)) > 0) {
//  151   	fileindex->datalen += llen;
//  152   	switch (codetype) {
//  153   		case 1: //ansi
//  154   		tb = gb2unicode(buff, rlen, &rlen, &llen);
//  155   		break;
//  156 		case 2:   //unicode le
//  157 			rlen = rlen >> 1 << 1;
//  158 			llen = rlen;
//  159 			tb = malloc(1);
//  160     	break;
//  161 		case 3:   //unicode be
//  162 			tb = unicodeSwitch(buff, rlen, &rlen, &llen);
//  163 			break;
//  164 		case 4:   //utf8
//  165 			tb = utf82unicode(buff, rlen, &rlen, &llen);
??createIndex_2:
        LDR      R1,[R5, #+92]
        LDR      R0,[R5, #+72]
        ADD      R3,R5,#+96
        ADD      R2,R5,#+92
        _BLF     utf82unicode,??utf82unicode??rA
??createIndex_3:
        MOV      R7,R0
//  166 			break;
//  167 		default:
//  168 			break;
//  169   	}
//  170   	if (!tb) return 0;
??createIndex_4:
        CMP      R7,#+0
        BEQ      ??createIndex_1
//  171   	mfree(tb);
        MOV      R0,R7
        SWI      +21
//  172   	p->next = malloc(sizeof (DataIndex));
        MOV      R0,#+20
        SWI      +20
        STR      R0,[R6, #+0]
//  173   	p->next->offset = foffset;
        LDR      R1,[R5, #+88]
        STR      R1,[R0, #+8]
//  174   	p->next->uc16len = rlen;
        LDR      R1,[R5, #+92]
        STR      R1,[R0, #+12]
//  175   	p->next->datalen = llen;
        LDR      R1,[R5, #+96]
        STR      R1,[R0, #+16]
//  176   	p->next->prev = p;
        STR      R6,[R0, #+4]
//  177   	p->next->next = NULL;
        LDR      R0,[R6, #+0]
        STR      R4,[R0, #+0]
//  178   	fileindex->uc16len += rlen;
        LDR      R0,[R5, #+64]
        LDR      R2,[R5, #+92]
        LDR      R1,[R0, #+12]
        ADD      R1,R2,R1
        STR      R1,[R0, #+12]
//  179   	foffset += llen;
        LDR      R0,[R5, #+88]
        LDR      R1,[R5, #+96]
        ADD      R0,R1,R0
        STR      R0,[R5, #+88]
//  180   	p = p->next;
        LDR      R6,[R6, #+0]
??createIndex_0:
        LDR      R0,[R5, #+84]
        LDR      R1,[R5, #+72]
        ADD      R3,R5,#+408
        MOV      R2,#+24576
        SWI      +11
        STR      R0,[R5, #+96]
        STR      R0,[R5, #+92]
        CMP      R0,#+1
        LDR      R0,[R5, #+64]
        BLT      ??createIndex_5
        LDR      R1,[R0, #+16]
        LDR      R2,[R5, #+96]
        ADD      R1,R2,R1
        STR      R1,[R0, #+16]
        LDR      R0,[R5, #+76]
        SUBS     R0,R0,#+1
        BEQ      ??createIndex_6
        SUBS     R0,R0,#+1
        BEQ      ??createIndex_7
        SUBS     R0,R0,#+1
        BEQ      ??createIndex_8
        SUBS     R0,R0,#+1
        BEQ      ??createIndex_2
        B        ??createIndex_4
??createIndex_6:
        LDR      R1,[R5, #+92]
        LDR      R0,[R5, #+72]
        ADD      R3,R5,#+96
        ADD      R2,R5,#+92
        _BLF     gb2unicode,??gb2unicode??rA
        B        ??createIndex_3
??createIndex_7:
        LDR      R0,[R5, #+92]
        ASR      R0,R0,#+1
        LSL      R0,R0,#+1
        STR      R0,[R5, #+92]
        STR      R0,[R5, #+96]
        MOV      R0,#+1
        SWI      +20
        B        ??createIndex_3
??createIndex_8:
        LDR      R1,[R5, #+92]
        LDR      R0,[R5, #+72]
        ADD      R3,R5,#+96
        ADD      R2,R5,#+92
        _BLF     unicodeSwitch,??unicodeSwitch??rA
        B        ??createIndex_3
//  181   }
//  182   
//  183   if (!fileindex->next) { //0字节文件
??createIndex_5:
        LDR      R0,[R0, #+0]
        CMP      R0,#+0
        BNE      ??createIndex_9
//  184   	p = malloc(sizeof (DataIndex));
        MOV      R0,#+20
        SWI      +20
        MOV      R6,R0
//  185   	p->uc16len = p->datalen = 0;
        STR      R4,[R6, #+16]
        STR      R4,[R6, #+12]
//  186   	p->offset = 0;
        STR      R4,[R6, #+8]
//  187   	p->prev = fileindex;
        LDR      R0,[R5, #+64]
        STR      R0,[R6, #+4]
//  188   	p->next= NULL;
        STR      R4,[R6, #+0]
//  189   	fileindex->next = p;
        LDR      R0,[R5, #+64]
        STR      R6,[R0, #+0]
//  190 	}
//  191 	fileindex->prev = p;
??createIndex_9:
        LDR      R0,[R5, #+64]
        STR      R6,[R0, #+4]
//  192   return 1;
        MOV      R0,#+1
        POP      {R4-R7,PC}       ;; return
        CFI EndBlock cfiBlock4
//  193 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock5 Using cfiCommon1
        CFI NoFunction
        THUMB
??WriteLog??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock5
        REQUIRE WriteLog
//  194 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock6 Using cfiCommon0
        CFI Function WriteLog
        ARM
//  195 int WriteLog(char *text, unsigned int len) {			//调试
WriteLog:
        PUSH     {R4-R7,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
        MOV      R4,R0
        MOV      R5,R1
//  196   if (!text) return 0;
        CMP      R4,#+0
        BEQ      ??WriteLog_0
//  197   int f = fopen("0:\\test.log", A_ReadWrite + A_Create + A_BIN, P_READ + P_WRITE, &ul);
        LDR      R6,??DataTable19  ;; inp_desc
        LDR      R0,??WriteLog_1  ;; `?<Constant "0:\\\\test.log">`
        ADD      R3,R6,#+408
        MOV      R2,#+384
        MOV      R1,#+2
        ORR      R1,R1,#0x8100
        SWI      +10
        MOV      R7,R0
//  198   if (f != -1) {
        CMN      R7,#+1
        BEQ      ??WriteLog_0
//  199     fwrite(f, text, len, &ul);
        ADD      R3,R6,#+408
        MOV      R2,R5
        MOV      R1,R4
        SWI      +12
//  200     fclose(f, &ul);
        ADD      R1,R6,#+408
        MOV      R0,R7
        SWI      +13
//  201     return 1;
        MOV      R0,#+1
        POP      {R4-R7,PC}
//  202   }
//  203   return 0;
??WriteLog_0:
        MOV      R0,#+0
        POP      {R4-R7,PC}       ;; return
        DATA
??WriteLog_1:
        DC32     `?<Constant "0:\\\\test.log">`
        CFI EndBlock cfiBlock6
//  204 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock7 Using cfiCommon1
        CFI NoFunction
        THUMB
??openFile??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock7
        REQUIRE openFile
//  205 
//  206 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock8 Using cfiCommon0
        CFI Function openFile
        ARM
//  207 int openFile(char *filename) {
openFile:
        PUSH     {R4,R5,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
//  208 	if (fd > 0) fclose(fd, &ul);
        LDR      R5,??DataTable19  ;; inp_desc
        MOV      R4,R0
        LDR      R0,[R5, #+84]
        CMP      R0,#+1
        BLT      ??openFile_0
        ADD      R1,R5,#+408
        SWI      +13
//  209 	buffloaded = 0;
??openFile_0:
        MOV      R0,#+0
        STR      R0,[R5, #+80]
//  210 	if ((fd = fopen(filename, A_ReadOnly + A_BIN, P_READ, &ul)) != -1) {
        ADD      R3,R5,#+408
        MOV      R2,#+128
        MOV      R1,#+32768
        MOV      R0,R4
        SWI      +10
        STR      R0,[R5, #+84]
        CMN      R0,#+1
        BEQ      ??openFile_1
//  211     if (fread(fd, buff, 3, &ul) > 0) {
        LDR      R1,[R5, #+72]
        ADD      R3,R5,#+408
        MOV      R2,#+3
        SWI      +11
        CMP      R0,#+1
        BLT      ??openFile_2
//  212     	codetype = getCodeType(buff);
        LDR      R0,[R5, #+72]
        _BLF     getCodeType,??getCodeType??rA
        STR      R0,[R5, #+76]
//  213     }
//  214     if (!createIndex()) return 0;
??openFile_2:
        BL       createIndex
        CMP      R0,#+0
        POPEQ    {R4,R5,PC}
//  215     foffset = fileindex->offset;
        LDR      R0,[R5, #+64]
        LDR      R1,[R0, #+8]
        STR      R1,[R5, #+88]
//  216     curblock = fileindex->next;
        LDR      R0,[R0, #+0]
        STR      R0,[R5, #+68]
//  217     return 1;
        MOV      R0,#+1
        POP      {R4,R5,PC}
//  218   }
//  219   return 0;
??openFile_1:
        MOV      R0,#+0
        POP      {R4,R5,PC}       ;; return
        CFI EndBlock cfiBlock8
//  220 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock9 Using cfiCommon1
        CFI NoFunction
        THUMB
??loadBuffer??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock9
        REQUIRE loadBuffer
//  221 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock10 Using cfiCommon0
        CFI Function loadBuffer
        ARM
//  222 int loadBuffer(void) {
loadBuffer:
        PUSH     {R4-R6,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R6 Frame(CFA, -8)
        CFI R5 Frame(CFA, -12)
        CFI R4 Frame(CFA, -16)
        CFI CFA R13+16
//  223 	
//  224 	if (curblock && lseek(fd, curblock->offset, S_SET, &ul, &ul) == curblock->offset) {
        LDR      R4,??DataTable19  ;; inp_desc
        LDR      R0,[R4, #+68]
        CMP      R0,#+0
        POPEQ    {R4-R6,PC}
        ADD      R1,R4,#+408
        PUSH     {R1}
        CFI CFA R13+20
        ADD      R3,R4,#+408
        LDR      R1,[R0, #+8]
        LDR      R0,[R4, #+84]
        MOV      R2,#+0
        SWI      +15
        LDR      R1,[R4, #+68]
        LDR      R1,[R1, #+8]
        ADD      SP,SP,#+4
        CFI CFA R13+16
        CMP      R0,R1
        BNE      ??loadBuffer_0
//  225 		char *ms = malloc (50);
        MOV      R0,#+50
        SWI      +20
//  226 		char *tb = NULL;
//  227 		if ((rlen = llen = fread(fd, buff, BUF_LEN, &ul)) > 0) { 
        LDR      R0,[R4, #+84]
        LDR      R1,[R4, #+72]
        MOV      R5,#+0
        ADD      R3,R4,#+408
        MOV      R2,#+32768
        SWI      +11
        STR      R0,[R4, #+96]
        STR      R0,[R4, #+92]
        CMP      R0,#+1
        BLT      ??loadBuffer_1
//  228   		switch (codetype) {
        LDR      R2,[R4, #+76]
        LDR      R0,[R4, #+72]
        LDR      R1,[R4, #+92]
        MOV      R6,#+1
        ORR      R6,R6,#0x8000
        SUBS     R2,R2,#+1
        BEQ      ??loadBuffer_2
        SUBS     R2,R2,#+1
        BEQ      ??loadBuffer_3
        SUBS     R2,R2,#+1
        BEQ      ??loadBuffer_4
        SUBS     R2,R2,#+1
        BEQ      ??loadBuffer_5
        B        ??loadBuffer_6
//  229   			case 1: //ansi
//  230   			tb = gb2unicode(buff, rlen, &rlen, &llen);
??loadBuffer_2:
        ADD      R3,R4,#+96
        ADD      R2,R4,#+92
        _BLF     gb2unicode,??gb2unicode??rA
??loadBuffer_7:
        MOV      R5,R0
//  231   			if (rlen > BUF_LEN) {
        LDR      R0,[R4, #+92]
        CMP      R0,R6
        BLT      ??loadBuffer_8
//  232   				mfree(buff);
        LDR      R0,[R4, #+72]
        SWI      +21
//  233   				buff = malloc(rlen);
        LDR      R0,[R4, #+92]
        SWI      +20
        STR      R0,[R4, #+72]
//  234   			}
//  235   			memcpy(buff, tb, rlen);
??loadBuffer_8:
        LDR      R2,[R4, #+92]
        LDR      R0,[R4, #+72]
        MOV      R1,R5
        SWI      +286
//  236   			break;
//  237 			case 2:   //unicode le
//  238     		break;
//  239 			case 3:   //unicode be
//  240 				tb = unicodeSwitch(buff, rlen, &rlen, &llen);
//  241 				if (rlen > BUF_LEN) {
//  242   				mfree(buff);
//  243   				buff = malloc(rlen);
//  244   			}
//  245 				memcpy(buff, tb, rlen);
//  246   			break;
//  247 			case 4:   //utf8
//  248 				tb = utf82unicode(buff, rlen, &rlen, &llen);
//  249 				if (rlen > BUF_LEN) {
//  250   				mfree(buff);
//  251   				buff = malloc(rlen);
//  252   			}
//  253   			memcpy(buff, tb, rlen);
//  254   			break;
//  255 			default:
//  256 				ShowMSG(1, (int) "Unkonwn code type!");
//  257 				break;
//  258   		}
//  259   		if (tb) mfree(tb);
??loadBuffer_3:
        CMP      R5,#+0
        BEQ      ??loadBuffer_1
        MOV      R0,R5
        SWI      +21
//  260   	}
//  261   	
//  262 		buffloaded = 1;
??loadBuffer_1:
        MOV      R0,#+1
        STR      R0,[R4, #+80]
//  263   	foffset = curblock->offset;
        LDR      R0,[R4, #+68]
        LDR      R0,[R0, #+8]
        STR      R0,[R4, #+88]
//  264   	return 1;	
        MOV      R0,#+1
        POP      {R4-R6,PC}
??loadBuffer_4:
        ADD      R3,R4,#+96
        ADD      R2,R4,#+92
        _BLF     unicodeSwitch,??unicodeSwitch??rA
        B        ??loadBuffer_7
??loadBuffer_5:
        ADD      R3,R4,#+96
        ADD      R2,R4,#+92
        _BLF     utf82unicode,??utf82unicode??rA
        B        ??loadBuffer_7
??loadBuffer_6:
        LDR      R1,??loadBuffer_9  ;; `?<Constant "Unkonwn code type!">`
        MOV      R0,#+1
        SWI      +328
        B        ??loadBuffer_1
//  265   }
//  266   else
//  267 		return 0;
??loadBuffer_0:
        MOV      R0,#+0
        POP      {R4-R6,PC}       ;; return
        DATA
??loadBuffer_9:
        DC32     `?<Constant "Unkonwn code type!">`
        CFI EndBlock cfiBlock10
//  268 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock11 Using cfiCommon1
        CFI NoFunction
        THUMB
??gotoPos??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock11
        REQUIRE gotoPos
//  269 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock12 Using cfiCommon0
        CFI Function gotoPos
        ARM
//  270 int gotoPos(int offset) {
//  271 	DataIndex *p = curblock;
gotoPos:
        LDR      R1,??DataTable19  ;; inp_desc
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        LDR      R2,[R1, #+68]
//  272 	curblock = fileindex->next;
        LDR      R3,[R1, #+64]
        B        ??gotoPos_0
//  273 	while (curblock && offset > curblock->offset + curblock->uc16len) {
??gotoPos_1:
        LDR      R12,[R3, #+8]
        LDR      R4,[R3, #+12]
        ADD      R4,R4,R12
        CMP      R4,R0
        BGE      ??gotoPos_2
//  274 		curblock = curblock->next;
??gotoPos_0:
        LDR      R3,[R3, #+0]
        STR      R3,[R1, #+68]
//  275 	}
        LDR      R3,[R1, #+68]
        CMP      R3,#+0
        BNE      ??gotoPos_1
//  276 	if (curblock) {
//  277 		viewpos = (offset - curblock->offset) >> 1 << 1;
//  278 		if (viewpos < 0) {
//  279 			viewpos = 0;
//  280 			offset = curblock->offset;
//  281 		}
//  282 		foffset = offset;
//  283 		return loadBuffer();	
//  284 	}
//  285 	else {
//  286 		curblock = p;
        STR      R2,[R1, #+68]
//  287 		ShowMSG(1, (int) "no buff?");
        LDR      R1,??gotoPos_3   ;; `?<Constant "no buff?">`
        MOV      R0,#+1
        SWI      +328
//  288 		return 0;
        MOV      R0,#+0
        POP      {R4,PC}
//  289 	}
??gotoPos_2:
        SUB      R2,R0,R12
        ASR      R2,R2,#+1
        LSLS     R2,R2,#+1
        STR      R2,[R1, #+136]
        MOVMI    R0,#+0
        STRMI    R0,[R1, #+136]
        LDRMI    R0,[R3, #+8]
        STR      R0,[R1, #+88]
        BL       loadBuffer
        POP      {R4,PC}          ;; return
        DATA
??gotoPos_3:
        DC32     `?<Constant "no buff?">`
        CFI EndBlock cfiBlock12
//  290 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock13 Using cfiCommon1
        CFI NoFunction
        THUMB
??loadFile??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock13
        REQUIRE loadFile
//  291 
//  292 int InitSettings();
//  293 void KillIndex();

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock14 Using cfiCommon0
        CFI Function loadFile
        ARM
//  294 int loadFile(char *filename) {
loadFile:
        PUSH     {R4-R6,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R6 Frame(CFA, -8)
        CFI R5 Frame(CFA, -12)
        CFI R4 Frame(CFA, -16)
        CFI CFA R13+16
//  295 	LockSched();
//  296 	InitSettings();
//  297 	viewpos = 0;
        LDR      R5,??DataTable19  ;; inp_desc
        MOV      R4,R0
        MOV      R6,#+0
        SWI      +326
        BL       InitSettings
        STR      R6,[R5, #+136]
//  298 	KillIndex();
        BL       KillIndex
//  299   if (openFile(filename)) {
        MOV      R0,R4
        BL       openFile
        CMP      R0,#+0
        BEQ      ??loadFile_0
//  300 		//载入书签
//  301 		if (bookmark) {
        LDR      R0,[R5, #+104]
        CMP      R0,#+0
        BEQ      ??loadFile_1
//  302 			mfree(bookmark);
        SWI      +21
//  303 			bookmark = NULL;
        STR      R6,[R5, #+104]
//  304 		}
//  305     bookmark = readAddrInt(filename, &bmkfd, &ul, &bmknum, acbm);
??loadFile_1:
        LDR      R0,??DataTable26  ;; acbm
        ADD      R3,R5,#+108
        LDR      R0,[R0, #+0]
        ADD      R2,R5,#+408
        PUSH     {R0}
        CFI CFA R13+20
        ADD      R1,R5,#+100
        MOV      R0,R4
        _BLF     readAddrInt,??readAddrInt??rA
        STR      R0,[R5, #+104]
//  306     if (bookmark && bmknum > 0)
        CMP      R0,#+0
        ADD      SP,SP,#+4
        CFI CFA R13+16
        BEQ      ??loadFile_2
        LDR      R1,[R5, #+108]
        CMP      R1,#+1
        BLT      ??loadFile_2
//  307     	gotoPos(*bookmark);
        LDR      R0,[R0, #+0]
        BL       gotoPos
        B        ??loadFile_3
//  308     else
//  309     	foffset = 0;
??loadFile_2:
        STR      R6,[R5, #+88]
//  310     if (!buffloaded) {
??loadFile_3:
        LDR      R0,[R5, #+80]
        CMP      R0,#+0
        BNE      ??loadFile_4
//  311     	curblock = fileindex->next;
        LDR      R0,[R5, #+64]
        LDR      R0,[R0, #+0]
        STR      R0,[R5, #+68]
//  312     	loadBuffer();
        BL       loadBuffer
//  313     }
//  314     strcpy(procfile, filename);
??loadFile_4:
        MOV      R1,R4
        ADD      R0,R5,#+280
        SWI      +26
//  315  		UnlockSched();
        SWI      +327
//  316  		return 1;
        MOV      R0,#+1
        POP      {R4-R6,PC}
//  317   }
//  318   UnlockSched();
??loadFile_0:
        SWI      +327
//  319 	return 0;
        MOV      R0,#+0
        POP      {R4-R6,PC}       ;; return
        CFI EndBlock cfiBlock14
//  320 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock15 Using cfiCommon1
        CFI NoFunction
        THUMB
??div??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock15
        REQUIRE div
//  321 /*
//  322 ===============================
//  323            end
//  324 ===============================
//  325 */
//  326 
//  327 /*
//  328 ===============================
//  329           初始化
//  330 ===============================
//  331 */

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock16 Using cfiCommon0
        CFI Function div
        ARM
//  332 int div(int a, int b) {
//  333   if (b == 0) return 0;
div:
        CMP      R1,#+0
        MOVEQ    R0,#+0
        BXEQ     LR
//  334   int symbol = 1;
        MOV      R2,#+1
//  335   if (a < 0) symbol *= -1;
        CMP      R0,#+0
        RSBMI    R2,R2,#+0
//  336   if (b < 0) symbol *= -1;
        CMP      R1,#+0
        RSBMI    R2,R2,#+0
//  337   int result = 0;
        MOV      R3,#+0
        B        ??div_0
//  338   while (result * b < a) result++;
??div_1:
        ADD      R3,R3,#+1
??div_0:
        MUL      R12,R1,R3
        CMP      R12,R0
        BLT      ??div_1
//  339   return result * symbol;
        MUL      R0,R2,R3
        BX       LR               ;; return
        CFI EndBlock cfiBlock16
//  340 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock17 Using cfiCommon1
        CFI NoFunction
        THUMB
??adjustWindowsSize??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock17
        REQUIRE adjustWindowsSize
//  341 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock18 Using cfiCommon0
        CFI Function adjustWindowsSize
        ARM
//  342 void adjustWindowsSize() {
adjustWindowsSize:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//  343 	winx = 0;
        LDR      R4,??DataTable19  ;; inp_desc
        MOV      R0,#+0
        STR      R0,[R4, #+112]
//  344   winy = YDISP;
        MOV      R0,#+24
        STR      R0,[R4, #+116]
//  345   winw = ScreenW() - winx;
        SWI      +33160
        LDR      R1,[R4, #+112]
        SUB      R0,R0,R1
        STR      R0,[R4, #+120]
//  346   winh = ScreenH() - winy;
        SWI      +33161
        LDR      R1,[R4, #+116]
        SUB      R0,R0,R1
        STR      R0,[R4, #+124]
//  347 }
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock18

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock19 Using cfiCommon1
        CFI NoFunction
        THUMB
??InitSettings??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock19
        REQUIRE InitSettings
//  348 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock20 Using cfiCommon0
        CFI Function InitSettings
        ARM
//  349 int InitSettings() {
InitSettings:
        PUSH     {R4,R5,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
//  350   //初始化各项设置
//  351   adjustWindowsSize();
//  352   InitConfig();
//  353   viewrow = div(winh, GetFontYSIZE(font) + space);
        LDR      R4,??DataTable19  ;; inp_desc
        BL       adjustWindowsSize
        _BLF     InitConfig,??InitConfig??rA
        LDR      R0,??DataTable20  ;; font
        LDR      R5,[R0, #+0]
        MOV      R0,R5
        SWI      +453
        LDR      R1,??DataTable21  ;; space
        LDR      R1,[R1, #+0]
        ADD      R1,R1,R0
        LDR      R0,[R4, #+124]
        BL       div
        STR      R0,[R4, #+140]
//  354   viewlen = div(winw, GetSymbolWidth(' ', font)) * viewrow;
        MOV      R1,R5
        MOV      R0,#+32
        SWI      +481
        MOV      R1,R0
        LDR      R0,[R4, #+120]
        BL       div
        LDR      R1,[R4, #+140]
        MUL      R0,R1,R0
        STR      R0,[R4, #+128]
//  355   viewlen = viewlen >> 1 << 1;
        ASR      R0,R0,#+1
        LSL      R0,R0,#+1
        STR      R0,[R4, #+128]
//  356   if (sbw) {
        LDR      R0,[R4, #+144]
        CMP      R0,#+0
        BEQ      ??InitSettings_0
//  357   	FreeWS(sbw);
        SWI      +297
//  358   	sbw = NULL;
        MOV      R0,#+0
        STR      R0,[R4, #+144]
//  359   }
//  360   sbw = AllocWS(viewlen);
??InitSettings_0:
        LDR      R0,[R4, #+128]
        SWI      +293
        STR      R0,[R4, #+144]
//  361   if (sbw) return 1; else return 0;
        CMP      R0,#+0
        MOVNE    R0,#+1
        POP      {R4,R5,PC}       ;; return
        CFI EndBlock cfiBlock20
//  362 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock21 Using cfiCommon1
        CFI NoFunction
        THUMB
??KillIndex??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock21
        REQUIRE KillIndex
//  363 
//  364 //销毁索引

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock22 Using cfiCommon0
        CFI Function KillIndex
        ARM
//  365 void KillIndex() {
KillIndex:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        LDR      R4,??DataTable19  ;; inp_desc
        LDR      R0,[R4, #+64]
        CMP      R0,#+0
        POPEQ    {R4,PC}
//  366 	while (fileindex) {
//  367 		curblock = fileindex;
??KillIndex_0:
        LDR      R0,[R4, #+64]
        STR      R0,[R4, #+68]
//  368 		fileindex = fileindex->next;
        LDR      R1,[R0, #+0]
        STR      R1,[R4, #+64]
//  369 		mfree(curblock);
        SWI      +21
//  370 	}
        LDR      R0,[R4, #+64]
        CMP      R0,#+0
        BNE      ??KillIndex_0
//  371 	fileindex = NULL;
//  372 }
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock22

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock23 Using cfiCommon1
        CFI NoFunction
        THUMB
??ElfKiller??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock23
        REQUIRE ElfKiller
//  373 
//  374 //销毁
//  375 extern void kill_data(void *p, void (*func_p)(void *));

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock24 Using cfiCommon0
        CFI Function ElfKiller
        ARM
//  376 void ElfKiller(void) {
ElfKiller:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//  377 	KillIndex();
//  378 	mfree(buff);
        LDR      R4,??DataTable19  ;; inp_desc
        BL       KillIndex
        LDR      R0,[R4, #+72]
        SWI      +21
//  379   mfree(bookmark);
        LDR      R0,[R4, #+104]
        SWI      +21
//  380   FreeWS(sbw);
        LDR      R0,[R4, #+144]
        SWI      +297
//  381   fclose(fd, &ul);
        LDR      R0,[R4, #+84]
        ADD      R1,R4,#+408
        SWI      +13
//  382   fclose(bmkfd, &ul);
        LDR      R0,[R4, #+100]
        ADD      R1,R4,#+408
        SWI      +13
//  383   extern void *ELF_BEGIN;
//  384   kill_data(&ELF_BEGIN, (void (*)(void *))mfree_adr());
        SWI      +32789
        MOV      R1,R0
        LDR      R0,??ElfKiller_0  ;; ELF_BEGIN
        POP      {R4,LR}          ;; Pop
        CFI R4 SameValue
        CFI ?RET R14
        CFI CFA R13+0
        _BF      kill_data,??kill_data??rA  ;; tailcall
        DATA
??ElfKiller_0:
        DC32     ELF_BEGIN
        CFI EndBlock cfiBlock24
//  385 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock25 Using cfiCommon1
        CFI NoFunction
        THUMB
??rowFluctuate??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock25
        REQUIRE rowFluctuate
//  386 /*
//  387 ===============================
//  388             end
//  389 ===============================
//  390 */
//  391 
//  392 
//  393 /*
//  394 ===============================
//  395           屏幕控制
//  396 ===============================
//  397 */
//  398 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock26 Using cfiCommon0
        CFI Function rowFluctuate
        ARM
//  399 void rowFluctuate(int param) {
rowFluctuate:
        PUSH     {R4-R8,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R8 Frame(CFA, -8)
        CFI R7 Frame(CFA, -12)
        CFI R6 Frame(CFA, -16)
        CFI R5 Frame(CFA, -20)
        CFI R4 Frame(CFA, -24)
        CFI CFA R13+24
        LDR      R5,??DataTable19  ;; inp_desc
        MOV      R4,R0
        B        ??rowFluctuate_0
//  400 	
//  401 	if (!buffloaded || param == 0) return;
//  402 	int i = 0, curwidth = 0, offset = viewlen;
//  403 	if (param < 0) {
//  404 		if (viewpos - viewlen < 0) {
//  405 			if (curblock->prev != fileindex) { //载入上一块
//  406 				curblock = curblock->prev;
//  407 				loadBuffer();
//  408 				viewpos = viewpos - viewlen + rlen;
//  409 				if (viewpos <= 0) {
//  410 					viewpos = 0;
//  411 					return;
//  412 				}
//  413 			}
//  414 			else if (viewpos < 0) {
//  415 				viewpos = 0;
//  416 				return;
//  417 			}
//  418 			else {
//  419 				offset = viewpos;
//  420 			}
//  421 		}
//  422 		str2ws_unicode(sbw, buff + viewpos - offset, offset);
//  423     for (i = sbw->wsbody[0]; i > 0; i--) {
//  424       if (sbw->wsbody[i] == 0x0a && i > 1 && sbw->wsbody[i - 1] == 0x0d) {
//  425       	if (param + 1 == 0) {
//  426       		if (i != sbw->wsbody[0]) {
//  427       			param++;
//  428       			i++;
//  429       			break;
//  430       		}
//  431       		else {
//  432       			param--;
//  433       		}
//  434       	}
//  435 				i--;
//  436       	goto L_CALROW1;
//  437       }
//  438      	else if (sbw->wsbody[i] == 0x0d) {
??rowFluctuate_1:
        LDRH     R1,[R0, #+0]
        CMP      R1,#+13
        BEQ      ??rowFluctuate_2
//  439      		goto L_CALROW1;
//  440      	}
//  441       else {
//  442         curwidth += GetSymbolWidth(sbw->wsbody[i], font);
        LDRH     R0,[R0, #+0]
        LDR      R1,??DataTable20  ;; font
        LDR      R1,[R1, #+0]
        SWI      +481
        ADD      R6,R0,R6
//  443         if (curwidth > winw) {
        LDR      R0,[R5, #+120]
        CMP      R0,R6
        BGE      ??rowFluctuate_3
//  444         	i++;
        MOV      R7,R8
//  445         L_CALROW1:
//  446           curwidth = 0;
??rowFluctuate_2:
        MOV      R6,#+0
//  447           param++;
        ADDS     R4,R4,#+1
//  448          	if (param == 0) break;
        BNE      ??rowFluctuate_3
//  449         }
//  450       }
//  451     }
//  452     viewpos -= (sbw->wsbody[0] - i + 1) << 1;
??rowFluctuate_4:
        LDR      R1,[R5, #+144]
        LDR      R0,[R5, #+136]
        LDR      R1,[R1, #+0]
        LDRH     R1,[R1, #+0]
        SUB      R1,R1,R7
        ADD      R1,R1,#+1
        SUB      R0,R0,R1, LSL #+1
        STR      R0,[R5, #+136]
??rowFluctuate_0:
        LDR      R0,[R5, #+80]
        CMP      R0,#+0
        CMPNE    R4,#+0
        POPEQ    {R4-R8,PC}
??rowFluctuate_5:
        LDR      R2,[R5, #+128]
        MOV      R6,#+0
        MOV      R7,R2
        CMP      R4,#+0
        BPL      ??rowFluctuate_6
        LDR      R0,[R5, #+136]
        SUBS     R1,R0,R2
        BPL      ??rowFluctuate_7
        LDR      R1,[R5, #+68]
        LDR      R2,[R5, #+64]
        LDR      R1,[R1, #+4]
        CMP      R1,R2
        BEQ      ??rowFluctuate_8
        STR      R1,[R5, #+68]
        BL       loadBuffer
        LDR      R0,[R5, #+136]
        LDR      R1,[R5, #+128]
        SUB      R0,R0,R1
        LDR      R1,[R5, #+92]
        ADD      R0,R1,R0
        STR      R0,[R5, #+136]
        CMP      R0,#+1
        BGE      ??rowFluctuate_7
??rowFluctuate_9:
        MOV      R0,#+0
        B        ??rowFluctuate_10
??rowFluctuate_8:
        CMP      R0,#+0
        BMI      ??rowFluctuate_9
        MOV      R7,R0
??rowFluctuate_7:
        LDR      R1,[R5, #+136]
        LDR      R3,[R5, #+72]
        MOV      R2,R7
        RSB      R0,R7,#+0
        ADD      R1,R1,R3
        ADD      R1,R0,R1
        LDR      R0,[R5, #+144]
        _BLF     str2ws_unicode,??str2ws_unicode??rA
        LDR      R0,[R5, #+144]
        LDR      R0,[R0, #+0]
        LDRH     R7,[R0, #+0]
        B        ??rowFluctuate_11
??rowFluctuate_3:
        SUB      R7,R7,#+1
??rowFluctuate_11:
        CMP      R7,#+1
        BLT      ??rowFluctuate_4
        LDR      R0,[R5, #+144]
        ADD      R8,R7,#+1
        LDR      R1,[R0, #+0]
        ADD      R0,R1,R7, LSL #+1
        LDRH     R2,[R0, #+0]
        CMP      R2,#+10
        BNE      ??rowFluctuate_1
        CMP      R7,#+2
        BLT      ??rowFluctuate_1
        LDRH     R2,[R0, #-2]
        CMP      R2,#+13
        BNE      ??rowFluctuate_1
        ADDS     R0,R4,#+1
        BNE      ??rowFluctuate_12
        LDRH     R1,[R1, #+0]
        CMP      R7,R1
        MOVNE    R4,R0
        MOVNE    R7,R8
        BNE      ??rowFluctuate_4
        SUB      R4,R4,#+1
??rowFluctuate_12:
        SUB      R7,R7,#+1
        B        ??rowFluctuate_2
//  453   }
//  454 	else if (param > 0) {
??rowFluctuate_6:
        CMP      R4,#+1
        BLT      ??rowFluctuate_5
//  455 		str2ws_unicode(sbw, buff + viewpos, viewlen > rlen ? rlen : viewlen);
        LDR      R0,[R5, #+92]
        LDR      R1,[R5, #+72]
        CMP      R0,R2
        MOVLT    R2,R0
        LDR      R0,[R5, #+136]
//  456     for (i = 1; i <= sbw->wsbody[0]; i++) {
        MOV      R7,#+1
        ADD      R1,R0,R1
        LDR      R0,[R5, #+144]
        _BLF     str2ws_unicode,??str2ws_unicode??rA
        B        ??rowFluctuate_13
??rowFluctuate_14:
        ADD      R7,R7,#+1
??rowFluctuate_13:
        LDR      R0,[R5, #+144]
        LDR      R0,[R0, #+0]
        LDRH     R1,[R0, #+0]
        CMP      R1,R7
        BLT      ??rowFluctuate_15
//  457       if (sbw->wsbody[i] == 0x0a || sbw->wsbody[i] == 0x0d) {
        ADD      R2,R0,R7, LSL #+1
        LDRH     R1,[R2, #+0]
        CMP      R1,#+10
        CMPNE    R1,#+13
        BNE      ??rowFluctuate_16
//  458         if (i < sbw->wsbody[0] && sbw->wsbody[i + 1] == 0x0a) i++;
        LDRH     R0,[R0, #+0]
        CMP      R7,R0
        BGE      ??rowFluctuate_17
        LDRH     R0,[R2, #+2]
        CMP      R0,#+10
        BNE      ??rowFluctuate_17
        ADD      R7,R7,#+1
        B        ??rowFluctuate_17
//  459         goto L_CALROW2;
//  460       }
//  461       else {
//  462         curwidth += GetSymbolWidth(sbw->wsbody[i], font);
??rowFluctuate_16:
        LDR      R0,??DataTable20  ;; font
        LDR      R1,[R0, #+0]
        LDRH     R0,[R2, #+0]
        SWI      +481
        ADD      R6,R0,R6
//  463         if (curwidth > winw) {
        LDR      R0,[R5, #+120]
        CMP      R0,R6
        BGE      ??rowFluctuate_14
//  464         	i--;
        SUB      R7,R7,#+1
//  465         L_CALROW2:
//  466           curwidth = 0;
??rowFluctuate_17:
        MOV      R6,#+0
//  467           param--;
        SUBS     R4,R4,#+1
//  468           if (param == 0) break;
        BNE      ??rowFluctuate_14
//  469         }
//  470       }
//  471     }
//  472     viewpos += i << 1;
??rowFluctuate_15:
        LDR      R1,[R5, #+136]
//  473     if (rlen < viewlen) {
        LDR      R2,[R5, #+92]
        LDR      R3,[R5, #+128]
        LSL      R0,R7,#+1
        ADD      R1,R0,R1
        STR      R1,[R5, #+136]
        CMP      R2,R3
        BGE      ??rowFluctuate_18
//  474     	viewpos -= i << 1;
??rowFluctuate_19:
        SUB      R0,R1,R0
??rowFluctuate_10:
        STR      R0,[R5, #+136]
//  475     	return;
        POP      {R4-R8,PC}
//  476     }
//  477     if (viewpos > curblock->uc16len) {
??rowFluctuate_18:
        LDR      R2,[R5, #+68]
        LDR      R3,[R2, #+12]
        CMP      R3,R1
        BGE      ??rowFluctuate_0
//  478     	if (curblock->next) {
        LDR      R2,[R2, #+0]
        CMP      R2,#+0
        BEQ      ??rowFluctuate_19
//  479     		viewpos -= curblock->uc16len;
        SUB      R0,R1,R3
        STR      R0,[R5, #+136]
//  480     		curblock = curblock->next;
        STR      R2,[R5, #+68]
//  481     		loadBuffer();
        BL       loadBuffer
//  482     		if (viewpos > rlen) {
        LDR      R0,[R5, #+92]
        LDR      R1,[R5, #+136]
        CMP      R0,R1
        BGE      ??rowFluctuate_0
        MOV      R0,#+0
        STR      R0,[R5, #+136]
        POP      {R4-R8,PC}
        CFI EndBlock cfiBlock26
//  483     			viewpos = 0;
//  484     			return;
//  485     		}
//  486     	}
//  487     	else {
//  488 				viewpos -= i << 1;
//  489 				return;
//  490 			}
//  491     }
//  492   }
//  493   rowFluctuate(param);
//  494 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock27 Using cfiCommon1
        CFI NoFunction
        THUMB
??DrawStateBar??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock27
        REQUIRE DrawStateBar
//  495 
//  496 /*
//  497 //卷动条
//  498 void DrawIndication(void) {
//  499 	
//  500 	int progress =  winh * ((viewpos / curblock->uc16len) * (curblock->offset / fileindex->datalen));
//  501 	progress = progress * , ;
//  502 	
//  503 	DrawRectangle(winw + winx - 3,
//  504                 winy,
//  505                 winw + winx - 1,
//  506                 winy + winh,
//  507                 1,     //border-type 0=outline 1=dotted 2=inline
//  508                 GetPaletteAdrByColorIndex(3),
//  509                 GetPaletteAdrByColorIndex(3));
//  510   int indh = div(winh, div(fileindex->uc16len, viewlen));
//  511   if (indh < 3) indh = 3;
//  512   int indy = div(winh, progress);
//  513   DrawRectangle(winw + winx - 3,
//  514                 winy + indy,
//  515                 //winy + 70,
//  516                 winw + winx - 1,
//  517                 winy + indy + indh,
//  518                 //winy + 100,
//  519                 0,     //border-type 0=outline 1=dotted 2=inline
//  520                 GetPaletteAdrByColorIndex(5),
//  521                 GetPaletteAdrByColorIndex(5));
//  522 }
//  523 */
//  524 //状态栏

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock28 Using cfiCommon0
        CFI Function DrawStateBar
        ARM
//  525 void DrawStateBar(void) {
DrawStateBar:
        PUSH     {R4-R8,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R8 Frame(CFA, -8)
        CFI R7 Frame(CFA, -12)
        CFI R6 Frame(CFA, -16)
        CFI R5 Frame(CFA, -20)
        CFI R4 Frame(CFA, -24)
        CFI CFA R13+24
//  526     DrawRectangle(winx,
//  527                 winy + winh - GetFontYSIZE(FONT_SMALL_ITALIC_BOLD),
//  528                 winx + winw,
//  529                 winy + winh,
//  530                 0,
//  531                 //GetPaletteAdrByColorIndex(bgcolor),
//  532                 //GetPaletteAdrByColorIndex(bgcolor)
//  533                 statbgcolor,
//  534                 statbgcolor
//  535                 );
        LDR      R4,??DataTable19  ;; inp_desc
        LDR      R5,??DrawStateBar_0  ;; statbgcolor
        SUB      SP,SP,#+16
        CFI CFA R13+40
        MOV      R0,#+11
        SWI      +453
        LDR      R2,[R4, #+124]
        MOV      R1,R0
        LDR      R0,[R4, #+116]
        ADD      R6,R2,R0
        LDR      R0,[R4, #+112]
        MOV      R2,R5
        PUSH     {R2}
        CFI CFA R13+44
        PUSH     {R2}
        CFI CFA R13+48
        MOV      R3,R6
        SUB      R1,R6,R1
        MOV      R2,#+0
        PUSH     {R2}
        CFI CFA R13+52
        LDR      R2,[R4, #+120]
        ADD      R2,R2,R0
        SWI      +436
//  536 	WSHDR* ws = AllocWS(50);
        MOV      R0,#+50
        SWI      +293
        MOV      R6,R0
//  537 	TDate d;
//  538   TTime t;
//  539   GetDateTime(&d, &t);
        ADD      R1,SP,#+12
        ADD      R0,SP,#+20
        SWI      +180
//  540   int progress = div((viewpos + viewlen) * 1000, curblock->uc16len);
        LDR      R0,[R4, #+136]
        LDR      R2,[R4, #+128]
        LDR      R7,[R4, #+68]
        ADD      R0,R2,R0
        LDR      R1,[R7, #+12]
        MOV      R2,#+1000
        MUL      R0,R2,R0
        BL       div
        MOV      R8,R0
//  541   if (progress <= 0) progress = 1;
        ADD      SP,SP,#+12
        CFI CFA R13+40
//  542   int factor = div((curblock->offset + curblock->datalen) * 1000, fileindex->datalen);
        LDR      R0,[R4, #+64]
        LDR      R2,[R7, #+16]
        LDR      R1,[R0, #+16]
        LDR      R0,[R7, #+8]
        CMP      R8,#+1
        ADD      R0,R2,R0
        MOV      R2,#+1000
        MUL      R0,R2,R0
        MOVLT    R8,#+1
        BL       div
//  543   if (factor <= 0) factor = 1;
        CMP      R0,#+1
        MOVLT    R0,#+1
//  544 	progress = progress * factor;
//  545 	progress /= 1000;
        MUL      R1,R0,R8
        LDR      R0,??DrawStateBar_0+0x4  ;; 0x10624dd3
        SMULL    R2,R3,R0,R1
//  546   if (progress > 1000) progress = 1000;
//  547   wsprintf(ws, "%d%d%d.%d%c %d%d:%d%d", progress / 1000, progress / 100 % 10, progress / 10 % 10, progress % 10, '%',
//  548   																			t.hour / 10, t.hour % 10, t.min / 10, t.min % 10);
        LDRB     R2,[SP, #+1]
        ASR      R3,R3,#+6
        ADD      R0,R3,R1, LSR #+31
        LDR      R3,??DrawStateBar_0+0x8  ;; 0x66666667
        MOV      R1,#+233
        SMULL    R7,R8,R2,R3
        MOV      R7,#+10
        ASR      R8,R8,#+2
        MUL      R8,R7,R8
        ORR      R1,R1,#0x300
        CMP      R0,R1
        LDRB     R1,[SP, #+0]
        SUB      R3,R2,R8
        PUSH     {R3}
        CFI CFA R13+44
        LDR      R3,??DrawStateBar_0+0x8  ;; 0x66666667
        MOVGE    R0,#+1000
        SMULL    R7,R8,R3,R2
        ASR      R8,R8,#+2
        ADD      R2,R8,R2, LSR #+31
        PUSH     {R2}
        CFI CFA R13+48
        MOV      R2,R3
        SMULL    R3,R7,R1,R2
        MOV      R3,#+10
        ASR      R7,R7,#+2
        MUL      R7,R3,R7
        SUB      R2,R1,R7
        PUSH     {R2}
        CFI CFA R13+52
        LDR      R2,??DrawStateBar_0+0x8  ;; 0x66666667
        SMULL    R3,R7,R2,R1
        ASR      R7,R7,#+2
        ADD      R1,R7,R1, LSR #+31
        PUSH     {R1}
        CFI CFA R13+56
        MOV      R1,#+37
        PUSH     {R1}
        CFI CFA R13+60
        MOV      R1,R2
        SMULL    R2,R3,R0,R1
        MOV      R2,#+10
        ASR      R3,R3,#+2
        ADD      R3,R3,R0, LSR #+31
        MUL      R3,R2,R3
        SUB      R1,R0,R3
        PUSH     {R1}
        CFI CFA R13+64
        LDR      R1,??DrawStateBar_0+0x8  ;; 0x66666667
        SMULL    R2,R3,R1,R0
        LDR      R2,??DrawStateBar_0+0x8  ;; 0x66666667
        ASR      R3,R3,#+2
        ADD      R1,R3,R0, LSR #+31
        SMULL    R3,R7,R1,R2
        MOV      R3,#+10
        ASR      R7,R7,#+2
        ADD      R7,R7,R1, LSR #+31
        MUL      R7,R3,R7
        SUB      R1,R1,R7
        PUSH     {R1}
        CFI CFA R13+68
        LDR      R1,??DrawStateBar_0+0xC  ;; 0x51eb851f
        SMULL    R2,R3,R1,R0
        LDR      R2,??DrawStateBar_0+0x8  ;; 0x66666667
        ASR      R3,R3,#+5
        ADD      R1,R3,R0, LSR #+31
        SMULL    R3,R7,R1,R2
        MOV      R3,#+10
        ASR      R7,R7,#+2
        ADD      R7,R7,R1, LSR #+31
        MUL      R7,R3,R7
        SUB      R3,R1,R7
        LDR      R1,??DrawStateBar_0+0x4  ;; 0x10624dd3
        SMULL    R2,R7,R1,R0
        LDR      R1,??DrawStateBar_0+0x10  ;; `?<Constant "%d%d%d.%d%c %d%d:%d%d">`
        ASR      R7,R7,#+6
        ADD      R2,R7,R0, LSR #+31
        MOV      R0,R6
        SWI      +292
//  549 	DrawString(ws,
//  550 							winx, winy + winh - GetFontYSIZE(FONT_SMALL_ITALIC_BOLD), winx + winw - 1, winy + winh - 1,
//  551               statfont,
//  552               TEXT_ALIGNRIGHT,
//  553               statfontcolor,
//  554               statbgcolor
//  555               //GetPaletteAdrByColorIndex(fontcolor),
//  556               //GetPaletteAdrByColorIndex(bgcolor)
//  557              );
        MOV      R0,#+11
        SWI      +453
        LDR      R1,[R4, #+116]
        LDR      R2,[R4, #+124]
        LDR      R3,??DrawStateBar_0+0x14  ;; statfontcolor
        ADD      R2,R2,R1
        LDR      R1,[R4, #+112]
        PUSH     {R5}
        CFI CFA R13+72
        PUSH     {R3}
        CFI CFA R13+76
        MOV      R3,#+4
        PUSH     {R3}
        CFI CFA R13+80
        LDR      R3,??DrawStateBar_0+0x18  ;; statfont
        LDR      R3,[R3, #+0]
        PUSH     {R3}
        CFI CFA R13+84
        SUB      R3,R2,#+1
        PUSH     {R3}
        CFI CFA R13+88
        LDR      R3,[R4, #+120]
        SUB      R2,R2,R0
        MOV      R0,R6
        ADD      R3,R3,R1
        SUB      R3,R3,#+1
        SWI      +332
        ADD      SP,SP,#+48
        CFI CFA R13+40
//  558 	FreeWS(ws);
        MOV      R0,R6
        SWI      +297
//  559 }
        POP      {R0-R8,PC}       ;; return
        DATA
??DrawStateBar_0:
        DC32     statbgcolor
        DC32     0x10624dd3
        DC32     0x66666667
        DC32     0x51eb851f
        DC32     `?<Constant "%d%d%d.%d%c %d%d:%d%d">`
        DC32     statfontcolor
        DC32     statfont
        CFI EndBlock cfiBlock28

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock29 Using cfiCommon1
        CFI NoFunction
        THUMB
??DrawInfoDialog??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock29
        REQUIRE DrawInfoDialog
//  560 
//  561 //信息框

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock30 Using cfiCommon0
        CFI Function DrawInfoDialog
        ARM
//  562 void DrawInfoDialog(void) {
DrawInfoDialog:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//  563 	  char *s = malloc(100);
        MOV      R0,#+100
        SWI      +20
        MOV      R4,R0
//  564 	  ShowMSG(1, (int)s);
        MOV      R1,R4
        MOV      R0,#+1
        SWI      +328
//  565 	  mfree(s);
        MOV      R0,R4
        SWI      +21
//  566 }
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock30

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock31 Using cfiCommon1
        CFI NoFunction
        THUMB
??DrawScreen??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock31
        REQUIRE DrawScreen
//  567 
//  568 //主窗口

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock32 Using cfiCommon0
        CFI Function DrawScreen
        ARM
//  569 void DrawScreen(void) {     //显示位置bug
DrawScreen:
        PUSH     {R4-R11,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R11 Frame(CFA, -8)
        CFI R10 Frame(CFA, -12)
        CFI R9 Frame(CFA, -16)
        CFI R8 Frame(CFA, -20)
        CFI R7 Frame(CFA, -24)
        CFI R6 Frame(CFA, -28)
        CFI R5 Frame(CFA, -32)
        CFI R4 Frame(CFA, -36)
        CFI CFA R13+36
//  570 	
//  571   DrawRectangle(winx,
//  572                 winy,
//  573                 winx + winw,
//  574                 winy + winh,
//  575                 0,                               //border-type 0=outline 1=dotted 2=inline
//  576                 bgcolor,
//  577                 bgcolor
//  578                 );
        LDR      R4,??DataTable19  ;; inp_desc
        LDR      R5,??DrawScreen_0  ;; bgcolor
        LDR      R0,[R4, #+112]
        LDR      R1,[R4, #+116]
        MOV      R2,R5
        PUSH     {R2}
        CFI CFA R13+40
        PUSH     {R2}
        CFI CFA R13+44
        MOV      R2,#+0
        PUSH     {R2}
        CFI CFA R13+48
        LDR      R2,[R4, #+124]
        ADD      R3,R2,R1
        LDR      R2,[R4, #+120]
        ADD      R2,R2,R0
        SWI      +436
//  579   if (!buffloaded) return;
        LDR      R0,[R4, #+80]
        ADD      SP,SP,#+12
        CFI CFA R13+36
        CMP      R0,#+0
        POPEQ    {R4-R11,PC}
//  580   bytelen = rlen - viewpos < viewlen ? rlen - viewpos : viewlen;
        LDR      R0,[R4, #+136]
        LDR      R1,[R4, #+92]
//  581   str2ws_unicode(sbw, buff + viewpos, bytelen);
//  582   WSHDR *tws = AllocWS(sbw->wsbody[0]);      //实际输出字符串，自动换行和行间距
//  583   int curwidth = 0, drawrow = 0;
        MOV      R7,#+0
        SUB      R2,R1,R0
        LDR      R1,[R4, #+128]
        MOV      R8,#+0
        CMP      R2,R1
        MOVGE    R2,R1
        LDR      R1,[R4, #+72]
        STR      R2,[R4, #+132]
        ADD      R1,R0,R1
        LDR      R0,[R4, #+144]
//  584   int i = 1, j = 1;
        MOV      R11,#+1
        _BLF     str2ws_unicode,??str2ws_unicode??rA
        LDR      R0,[R4, #+144]
//  585   for (i = 1; i <= sbw->wsbody[0]; i++) {
        MOV      R9,R11
        LDR      R0,[R0, #+0]
        LDRH     R0,[R0, #+0]
        SWI      +293
        MOV      R6,R0
        B        ??DrawScreen_1
//  586     if (sbw->wsbody[i] == 0x0a || sbw->wsbody[i] == 0x0d) {
//  587       if (i < sbw->wsbody[0] && sbw->wsbody[i + 1] == 0x0a) i++;
//  588       goto L_DRAWCHAR;
//  589     }
//  590     else {
//  591       curwidth += GetSymbolWidth(sbw->wsbody[i], font);
//  592       if (curwidth > winw) {
//  593       	i--;
//  594       L_DRAWCHAR:
//  595         DrawString(tws,
//  596                     1, 1 + winy + (space + GetFontYSIZE(font)) * drawrow++, (curwidth << 1), winy + winh - 1,
//  597                     font,
//  598                     TEXT_ALIGNLEFT,
//  599                     fontcolor,
//  600                     bgcolor
//  601                   );
//  602         curwidth = 0;
//  603         j = 1;
//  604       }
//  605       else {
//  606       	tws->wsbody[j] = sbw->wsbody[i];
??DrawScreen_2:
        LDR      R2,[R4, #+144]
        LDR      R0,[R6, #+0]
        LDR      R2,[R2, #+0]
        ADD      R1,R0,R11, LSL #+1
        ADD      R2,R2,R9, LSL #+1
        LDRH     R2,[R2, #+0]
        STRH     R2,[R1, #+0]
//  607       	tws->wsbody[0] = j++; 
        STRH     R11,[R0, #+0]
        ADD      R11,R11,#+1
//  608       }
??DrawScreen_3:
        ADD      R9,R9,#+1
??DrawScreen_1:
        LDR      R0,[R4, #+144]
        LDR      R1,??DataTable20  ;; font
        LDR      R0,[R0, #+0]
        LDR      R10,[R1, #+0]
        LDRH     R1,[R0, #+0]
        CMP      R1,R9
        BLT      ??DrawScreen_4
        ADD      R2,R0,R9, LSL #+1
        LDRH     R1,[R2, #+0]
        CMP      R1,#+10
        CMPNE    R1,#+13
        BNE      ??DrawScreen_5
        LDRH     R0,[R0, #+0]
        CMP      R9,R0
        BGE      ??DrawScreen_6
        LDRH     R0,[R2, #+2]
        CMP      R0,#+10
        BNE      ??DrawScreen_6
        ADD      R9,R9,#+1
        B        ??DrawScreen_6
??DrawScreen_5:
        LDRH     R0,[R2, #+0]
        MOV      R1,R10
        SWI      +481
        ADD      R7,R0,R7
        LDR      R0,[R4, #+120]
        CMP      R0,R7
        BGE      ??DrawScreen_2
        SUB      R9,R9,#+1
??DrawScreen_6:
        MOV      R0,R10
        SWI      +453
        LDR      R1,[R4, #+116]
        MOV      R2,R5
        PUSH     {R2}
        CFI CFA R13+40
        LDR      R2,??DrawScreen_0+0x4  ;; fontcolor
        LSL      R3,R7,#+1
        PUSH     {R2}
        CFI CFA R13+44
        MOV      R7,#+0
        MOV      R11,#+1
        MOV      R2,#+1
        PUSH     {R2}
        CFI CFA R13+48
        PUSH     {R10}
        CFI CFA R13+52
        LDR      R2,[R4, #+124]
        ADD      R2,R1,R2
        SUB      R2,R2,#+1
        PUSH     {R2}
        CFI CFA R13+56
        LDR      R2,??DataTable21  ;; space
        LDR      R2,[R2, #+0]
        ADD      R0,R0,R2
        MLA      R0,R8,R0,R1
        MOV      R1,#+1
        ADD      R2,R0,#+1
        MOV      R0,R6
        SWI      +332
        ADD      R8,R8,#+1
        ADD      SP,SP,#+20
        CFI CFA R13+36
        B        ??DrawScreen_3
//  609     }
//  610   }
//  611   if (curwidth > 0 && i > sbw->wsbody[0]) {
??DrawScreen_4:
        CMP      R7,#+1
        BLT      ??DrawScreen_7
        CMP      R1,R9
//  612     i = sbw->wsbody[0];
        MOVLT    R9,R1
//  613     goto L_DRAWCHAR;
        BLT      ??DrawScreen_6
//  614   }
//  615   FreeWS(tws);
??DrawScreen_7:
        MOV      R0,R6
        SWI      +297
//  616   
//  617   //if (scroll) DrawIndication();
//  618   if (status) DrawStateBar();
        LDR      R0,??DrawScreen_0+0x8  ;; status
        LDR      R0,[R0, #+0]
        CMP      R0,#+0
        POPEQ    {R4-R11,PC}
        BL       DrawStateBar
        POP      {R4-R11,PC}      ;; return
        DATA
??DrawScreen_0:
        DC32     bgcolor
        DC32     fontcolor
        DC32     status
        CFI EndBlock cfiBlock32
//  619   //if (showinfo) DrawInfoDialog();
//  620 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable19:
        DC32     inp_desc

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable20:
        DC32     font

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable21:
        DC32     space

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock33 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_open??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock33
        REQUIRE mainmenu_open
//  621 /*
//  622 ===============================
//  623            end
//  624 ===============================
//  625 */
//  626 
//  627 
//  628 /*
//  629 ===============================
//  630            菜单
//  631 ===============================
//  632 */
//  633 /*---------软键----------*/
//  634 int menusoftkeys[] = {0, 1, 2};
//  635 SOFTKEY_DESC menu_sk[] = {
//  636   {0x0018, 0x0000, (int) "Select"},
//  637   {0x0001, 0x0000, (int) "Back"},
//  638   {0x003D, 0x0000, (int) LGP_DOIT_PIC}
//  639 };
//  640 
//  641 SOFTKEYSTAB menu_skt = {
//  642   menu_sk, 0
//  643 };
//  644 
//  645 
//  646 /*--------主菜单---------*/
//  647 //int create_menu_folder(void);
//  648 void open_select_file_gui(int);
//  649 int create_menu_goto(void);
//  650 int create_menu_bookmark(void);
//  651 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock34 Using cfiCommon0
        CFI Function mainmenu_open
        ARM
//  652 void mainmenu_open(GUI *data) {
mainmenu_open:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  653   GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  654   //create_menu_folder();
//  655   open_select_file_gui(1);
        MOV      R0,#+1
        POP      {LR}             ;; Pop
        CFI ?RET R14
        CFI CFA R13+0
        B        open_select_file_gui  ;; tailcall
        CFI EndBlock cfiBlock34
//  656 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock35 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_quit??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock35
        REQUIRE mainmenu_quit
//  657 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock36 Using cfiCommon0
        CFI Function mainmenu_quit
        ARM
//  658 void mainmenu_quit(GUI *data) {
mainmenu_quit:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  659   GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  660   Quit_Required = 1;
        LDR      R0,??mainmenu_quit_0  ;; inp_desc + 60
        MOV      R1,#+1
        STR      R1,[R0, #+0]
//  661 }
        POP      {PC}             ;; return
        DATA
??mainmenu_quit_0:
        DC32     inp_desc + 60
        CFI EndBlock cfiBlock36

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock37 Using cfiCommon1
        CFI NoFunction
        THUMB
??add2bmk??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock37
        REQUIRE add2bmk
//  662 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock38 Using cfiCommon0
        CFI Function add2bmk
        ARM
//  663 int add2bmk(void) {
add2bmk:
        PUSH     {R4,R5,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
//  664   
//  665 	if (!buffloaded) return 0;
        LDR      R4,??DataTable37  ;; inp_desc
        LDR      R0,[R4, #+80]
        CMP      R0,#+0
        BNE      ??add2bmk_0
??add2bmk_1:
        MOV      R0,#+0
        POP      {R4,R5,PC}
//  666 	if (bookmark && bmknum == 0) {
??add2bmk_0:
        LDR      R3,[R4, #+104]
        MOV      R5,#+280
        CMP      R3,#+0
        BEQ      ??add2bmk_2
        LDR      R0,[R4, #+108]
        CMP      R0,#+0
        BNE      ??add2bmk_3
//  667 		bookmark[bmknum++] = curblock->offset + viewpos;
        LDR      R0,[R4, #+68]
        LDR      R2,[R4, #+136]
        LDR      R1,[R0, #+8]
        ADD      R1,R2,R1
        STR      R1,[R3, #+0]
        LDR      R1,[R4, #+108]
//  668 		bookmark[bmknum++] = curblock->offset + viewpos;
        LDR      R2,[R4, #+136]
        ADD      R1,R1,#+1
        STR      R1,[R4, #+108]
        LDR      R0,[R0, #+8]
        ADD      R0,R2,R0
        STR      R0,[R3, +R1, LSL #+2]
        LDR      R0,[R4, #+108]
//  669 		writeAddrInt(procfile, &bmkfd, &ul, bookmark, bmknum, acbm);
        LDR      R1,??DataTable26  ;; acbm
        ADD      R0,R0,#+1
        LDR      R1,[R1, #+0]
        STR      R0,[R4, #+108]
        PUSH     {R1}
        CFI CFA R13+16
        PUSH     {R0}
        CFI CFA R13+20
        ADD      R2,R4,#+408
        ADD      R1,R4,#+100
        ADD      R0,R5,R4
        _BLF     writeAddrInt,??writeAddrInt??rA
        ADD      SP,SP,#+8
        CFI CFA R13+12
//  670 	}
//  671 	
//  672   if (bookmark && bmknum < BOOK_NUM) {
??add2bmk_2:
        LDR      R0,[R4, #+104]
        CMP      R0,#+0
        POPEQ    {R4,R5,PC}
??add2bmk_3:
        LDR      R0,[R4, #+108]
        CMP      R0,#+100
        BGE      ??add2bmk_1
//  673   	int bmkaddr = curblock->offset + viewpos;
        LDR      R1,[R4, #+68]
        LDR      R2,[R4, #+136]
        LDR      R1,[R1, #+8]
//  674   	int i;
//  675   	for (i = 2; i < bmknum; i++) {
        LDR      R3,[R4, #+104]
        ADD      R1,R2,R1
        MOV      R2,#+2
        CMP      R0,#+3
        BLT      ??add2bmk_4
        ADD      R12,R3,#+8
//  676   		if (bmkaddr == bookmark[i]) break;
??add2bmk_5:
        LDR      LR,[R12], #+4
        CMP      R1,LR
        BEQ      ??add2bmk_4
//  677   	}
        ADD      R2,R2,#+1
        CMP      R2,R0
        BLT      ??add2bmk_5
//  678   	if (i == bmknum) {
??add2bmk_4:
        CMP      R2,R0
        BNE      ??add2bmk_1
//  679     	bookmark[bmknum++] = bmkaddr;
        STR      R1,[R3, +R0, LSL #+2]
        LDR      R0,[R4, #+108]
//  680     	writeAddrInt(procfile, &bmkfd, &ul, bookmark, bmknum, acbm);
        LDR      R1,??DataTable26  ;; acbm
        ADD      R0,R0,#+1
        LDR      R1,[R1, #+0]
        STR      R0,[R4, #+108]
        PUSH     {R1}
        CFI CFA R13+16
        PUSH     {R0}
        CFI CFA R13+20
        ADD      R2,R4,#+408
        ADD      R1,R4,#+100
        ADD      R0,R5,R4
        _BLF     writeAddrInt,??writeAddrInt??rA
//  681     	return 1;
        MOV      R0,#+1
        ADD      SP,SP,#+8
        CFI CFA R13+12
        POP      {R4,R5,PC}       ;; return
        CFI EndBlock cfiBlock38
//  682     }
//  683    }
//  684    return 0;
//  685 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock39 Using cfiCommon1
        CFI NoFunction
        THUMB
??deletebmk??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock39
        REQUIRE deletebmk
//  686 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock40 Using cfiCommon0
        CFI Function deletebmk
        ARM
//  687 int deletebmk(int n) {
//  688 	if (!buffloaded || !bookmark || n > bmknum || bmknum < 3) return 0;
deletebmk:
        LDR      R12,??DataTable37  ;; inp_desc
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
        LDR      R1,[R12, #+80]
        CMP      R1,#+0
        LDRNE    R3,[R12, #+104]
        CMPNE    R3,#+0
        BEQ      ??deletebmk_0
        LDR      R1,[R12, #+108]
        CMP      R1,R0
        CMPGE    R1,#+3
        BGE      ??deletebmk_1
??deletebmk_0:
        MOV      R0,#+0
        POP      {PC}
//  689 	bmknum--;
??deletebmk_1:
        SUB      R1,R1,#+1
        STR      R1,[R12, #+108]
//  690   int i;
//  691 	for (i = n; i < bmknum; i++)
        ADD      R1,R3,R0, LSL #+2
        B        ??deletebmk_2
//  692 		bookmark[i] = bookmark[i + 1];
??deletebmk_3:
        LDR      R2,[R1, #+4]
        ADD      R0,R0,#+1
        STR      R2,[R1], #+4
??deletebmk_2:
        LDR      R2,[R12, #+108]
        CMP      R0,R2
        BLT      ??deletebmk_3
//  693 	writeAddrInt(procfile, &bmkfd, &ul, bookmark, bmknum, acbm);
        LDR      R0,??DataTable26  ;; acbm
        ADD      R1,R12,#+100
        LDR      R0,[R0, #+0]
        PUSH     {R0}
        CFI CFA R13+8
        PUSH     {R2}
        CFI CFA R13+12
        ADD      R2,R12,#+408
        ADD      R0,R12,#+280
        _BLF     writeAddrInt,??writeAddrInt??rA
//  694 	return 1;
        MOV      R0,#+1
        ADD      SP,SP,#+8
        CFI CFA R13+4
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock40
//  695 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable26:
        DC32     acbm

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock41 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_add2bmk??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock41
        REQUIRE mainmenu_add2bmk
//  696 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock42 Using cfiCommon0
        CFI Function mainmenu_add2bmk
        ARM
//  697 void mainmenu_add2bmk(GUI *data){
mainmenu_add2bmk:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  698 	GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  699 	add2bmk();
        BL       add2bmk
//  700 	create_menu_bookmark();
        POP      {LR}             ;; Pop
        CFI ?RET R14
        CFI CFA R13+0
        B        create_menu_bookmark  ;; tailcall
        CFI EndBlock cfiBlock42
//  701 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock43 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_search??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock43
        REQUIRE mainmenu_search
//  702 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock44 Using cfiCommon0
        CFI Function mainmenu_search
        ARM
//  703 void mainmenu_search(GUI *data){
//  704 
//  705 }
mainmenu_search:
        BX       LR               ;; return
        CFI EndBlock cfiBlock44

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock45 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_goto??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock45
        REQUIRE mainmenu_goto
//  706 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock46 Using cfiCommon0
        CFI Function mainmenu_goto
        ARM
//  707 void mainmenu_goto(GUI *data){
mainmenu_goto:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  708   GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  709   create_menu_goto();
        POP      {LR}             ;; Pop
        CFI ?RET R14
        CFI CFA R13+0
        B        create_menu_goto  ;; tailcall
        CFI EndBlock cfiBlock46
//  710 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock47 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_edit??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock47
        REQUIRE mainmenu_edit
//  711 
//  712 int LaunchEditor(void);

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock48 Using cfiCommon0
        CFI Function mainmenu_edit
        ARM
//  713 void mainmenu_edit(GUI *data){
mainmenu_edit:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  714 	GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  715 	LaunchEditor();
        POP      {LR}             ;; Pop
        CFI ?RET R14
        CFI CFA R13+0
        B        LaunchEditor     ;; tailcall
        CFI EndBlock cfiBlock48
//  716 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock49 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_sendsms??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock49
        REQUIRE mainmenu_sendsms
//  717 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock50 Using cfiCommon0
        CFI Function mainmenu_sendsms
        ARM
//  718 void mainmenu_sendsms(GUI *data) {
//  719 
//  720 }
mainmenu_sendsms:
        BX       LR               ;; return
        CFI EndBlock cfiBlock50

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock51 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_set??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock51
        REQUIRE mainmenu_set
//  721 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock52 Using cfiCommon0
        CFI Function mainmenu_set
        ARM
//  722 void mainmenu_set(GUI *data){
mainmenu_set:
        PUSH     {R4-R7,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
//  723   WSHDR *ws = AllocWS(150);
//  724   int fd1;
//  725   if ((fd1 = fopen("4:\\ZBin\\etc\\SieTxtView.bcfg", A_ReadOnly + A_BIN, P_READ, &ul)) != -1)
        LDR      R5,??mainmenu_set_0  ;; `?<Constant "0:\\\\ZBin\\\\etc\\\\SieTxtVie...">`
        LDR      R6,??DataTable37  ;; inp_desc
        MOV      R0,#+150
        SWI      +293
        MOV      R4,R0
        ADD      R3,R6,#+408
        MOV      R2,#+128
        MOV      R1,#+32768
        ADD      R0,R5,#+28
        SWI      +10
        MOV      R7,R0
        CMN      R7,#+1
        MOV      R2,#+128
//  726     str_2ws(ws, "4:\\ZBin\\etc\\SieTxtView.bcfg", 128);
        ADDNE    R1,R5,#+28
//  727   else
//  728     str_2ws(ws, "0:\\ZBin\\etc\\SieTxtView.bcfg", 128);
        MOVEQ    R1,R5
        MOV      R0,R4
        SWI      +364
//  729   fclose(fd1, &ul);
        ADD      R1,R6,#+408
        MOV      R0,R7
        SWI      +13
//  730   ExecuteFile(ws, 0, 0);
        MOV      R2,#+0
        MOV      R1,#+0
        MOV      R0,R4
        SWI      +148
//  731   FreeWS(ws);
        MOV      R0,R4
        SWI      +297
//  732 }
        POP      {R4-R7,PC}       ;; return
        DATA
??mainmenu_set_0:
        DC32     `?<Constant "0:\\\\ZBin\\\\etc\\\\SieTxtVie...">`
        CFI EndBlock cfiBlock52

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock53 Using cfiCommon1
        CFI NoFunction
        THUMB
??mainmenu_help??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock53
        REQUIRE mainmenu_help
//  733 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock54 Using cfiCommon0
        CFI Function mainmenu_help
        ARM
//  734 void mainmenu_help(GUI *data){
//  735   ShowMSG(1, (int)"Siemens Text Viewer v0.3f\nby HanikLZ\n2007");
mainmenu_help:
        LDR      R1,??mainmenu_help_0  ;; `?<Constant "Siemens Text Viewer v...">`
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
        MOV      R0,#+1
        SWI      +328
//  736 }
        POP      {PC}             ;; return
        DATA
??mainmenu_help_0:
        DC32     `?<Constant "Siemens Text Viewer v...">`
        CFI EndBlock cfiBlock54

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock55 Using cfiCommon1
        CFI NoFunction
        THUMB
??create_menu_main??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock55
        REQUIRE create_menu_main
//  737 
//  738 const MENUPROCS_DESC mainmenu_HNDLS[9] = {
//  739   mainmenu_open,
//  740   mainmenu_add2bmk,
//  741   mainmenu_search,
//  742   mainmenu_goto,
//  743   mainmenu_edit,
//  744   mainmenu_sendsms,
//  745   mainmenu_set,
//  746   mainmenu_help,
//  747   mainmenu_quit
//  748 };
//  749 
//  750 MENUITEM_DESC mainmenu_ITEMS[9] = {
//  751   {NULL, (int)"Open...",  		LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  752   {NULL, (int)"bookmark...",  LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  753   {NULL, (int)"Search...",  	LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  754   {NULL, (int)"Go to...",  		LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  755   {NULL, (int)"Edit...",  		LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  756   {NULL, (int)"Send SMS...",  LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  757   {NULL, (int)"Set...",  			LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  758   {NULL, (int)"Help",  				LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  759   {NULL, (int)"Quit",     		LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2}
//  760 };
//  761 
//  762 HEADER_DESC mainmenu_HDR = {0, 0, 0, 0, 0 //icon
//  763                             ,(int)"Main Menu", LGP_NULL};
//  764 
//  765 MENU_DESC mainmenu_STRUCT = {
//  766   8, NULL, NULL, NULL,
//  767   menusoftkeys,
//  768   &menu_skt,
//  769   0,
//  770   NULL,
//  771   mainmenu_ITEMS,
//  772   mainmenu_HNDLS,
//  773   9
//  774 };
//  775 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock56 Using cfiCommon0
        CFI Function create_menu_main
        ARM
//  776 int create_menu_main(void) {
create_menu_main:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//  777   patch_header(&mainmenu_HDR);
        LDR      R4,??create_menu_main_0  ;; mainmenu_HDR
        MOV      R0,R4
        _BLF     patch_header,??patch_header??rA
//  778   return CreateMenu(0, 0, &mainmenu_STRUCT, &mainmenu_HDR, 0, 9, 0, 0);
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+12
        PUSH     {R0}
        CFI CFA R13+16
        MOV      R3,R4
        ADD      R2,R4,#+20
        MOV      R1,#+0
        MOV      R0,#+9
        PUSH     {R0}
        CFI CFA R13+20
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+24
        SWI      +338
        ADD      SP,SP,#+16
        CFI CFA R13+8
        POP      {R4,PC}          ;; return
        DATA
??create_menu_main_0:
        DC32     mainmenu_HDR
        CFI EndBlock cfiBlock56
//  779 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock57 Using cfiCommon1
        CFI NoFunction
        THUMB
??gotomenu_start??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock57
        REQUIRE gotomenu_start
//  780 /*----------end--------------*/
//  781 
//  782 /*--------GOTO---------*/

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock58 Using cfiCommon0
        CFI Function gotomenu_start
        ARM
//  783 void gotomenu_start(GUI *data) {
gotomenu_start:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  784 	GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  785 	gotoPos(0);
        MOV      R0,#+0
        POP      {LR}             ;; Pop
        CFI ?RET R14
        CFI CFA R13+0
        B        gotoPos          ;; tailcall
        CFI EndBlock cfiBlock58
//  786 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock59 Using cfiCommon1
        CFI NoFunction
        THUMB
??gotomenu_readed??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock59
        REQUIRE gotomenu_readed
//  787 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock60 Using cfiCommon0
        CFI Function gotomenu_readed
        ARM
//  788 void gotomenu_readed(GUI *data) {
gotomenu_readed:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  789   
//  790 	GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  791 	if (!bookmark || bmknum < 2 || !gotoPos(bookmark[1]))
        LDR      R0,??DataTable37  ;; inp_desc
        LDR      R1,[R0, #+104]
        CMP      R1,#+0
        BEQ      ??gotomenu_readed_0
        LDR      R0,[R0, #+108]
        CMP      R0,#+2
        BLT      ??gotomenu_readed_0
        LDR      R0,[R1, #+4]
        BL       gotoPos
        CMP      R0,#+0
        POPNE    {PC}
//  792 		ShowMSG(1, (int) "Load bookmark failed!");
??gotomenu_readed_0:
        LDR      R1,??gotomenu_readed_1  ;; `?<Constant "Load bookmark failed!">`
        MOV      R0,#+1
        SWI      +328
//  793 }
        POP      {PC}             ;; return
        DATA
??gotomenu_readed_1:
        DC32     `?<Constant "Load bookmark failed!">`
        CFI EndBlock cfiBlock60

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock61 Using cfiCommon1
        CFI NoFunction
        THUMB
??gotomenu_end??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock61
        REQUIRE gotomenu_end
//  794 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock62 Using cfiCommon0
        CFI Function gotomenu_end
        ARM
//  795 void gotomenu_end(GUI *data) {
gotomenu_end:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  796 	GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  797 	if (!buffloaded) return;
        LDR      R0,??DataTable37  ;; inp_desc
        LDR      R1,[R0, #+80]
        CMP      R1,#+0
        POPEQ    {PC}
        LDR      R1,[R0, #+64]
        LDR      R0,[R0, #+128]
        LDR      R1,[R1, #+4]
        LDR      R2,[R1, #+12]
        SUB      R2,R2,R0
        CMP      R2,#+1
        LDRGE    R2,[R1, #+12]
        LDR      R1,[R1, #+8]
        SUBGE    R0,R2,R0
        MOVLT    R0,#+0
        ADD      R0,R0,R1
//  798 	gotoPos(fileindex->prev->offset + 
//  799   				((fileindex->prev->uc16len - viewlen) > 0 ? (fileindex->prev->uc16len - viewlen) : 0));
        BL       gotoPos
//  800 }
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock62

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock63 Using cfiCommon1
        CFI NoFunction
        THUMB
??gotomenu_random??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock63
        REQUIRE gotomenu_random
//  801 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock64 Using cfiCommon0
        CFI Function gotomenu_random
        ARM
//  802 void gotomenu_random(GUI *data) {
gotomenu_random:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//  803 	
//  804 	GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  805 	if (!buffloaded) return;
        LDR      R0,??gotomenu_random_0+0x4  ;; inp_desc + 80
        LDR      R0,[R0, #+0]
        CMP      R0,#+0
        POPEQ    {R4,PC}
//  806 	char *s = malloc(10);
        MOV      R0,#+10
        SWI      +20
        MOV      R4,R0
//  807 	sprintf(s, "%d", Rand());
        _BLF     Rand,??Rand??rA
        MOV      R2,R0
        ADR      R1,??gotomenu_random_0  ;; "%d"
        MOV      R0,R4
        SWI      +22
//  808   ShowMSG(1, (int) s);
        MOV      R1,R4
        MOV      R0,#+1
        SWI      +328
//  809   mfree(s);
        MOV      R0,R4
        SWI      +21
//  810 }
        POP      {R4,PC}          ;; return
        DATA
??gotomenu_random_0:
        DC8      "%d",+0
        DC32     inp_desc + 80
        CFI EndBlock cfiBlock64

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock65 Using cfiCommon1
        CFI NoFunction
        THUMB
??gotomenu_bookmark??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock65
        REQUIRE gotomenu_bookmark
//  811 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock66 Using cfiCommon0
        CFI Function gotomenu_bookmark
        ARM
//  812 void gotomenu_bookmark(GUI *data) {
gotomenu_bookmark:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  813 	GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
//  814   create_menu_bookmark();
        POP      {LR}             ;; Pop
        CFI ?RET R14
        CFI CFA R13+0
        B        create_menu_bookmark  ;; tailcall
        CFI EndBlock cfiBlock66
//  815 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock67 Using cfiCommon1
        CFI NoFunction
        THUMB
??create_menu_goto??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock67
        REQUIRE create_menu_goto
//  816 
//  817 const MENUPROCS_DESC gotomenu_HNDLS[5] = {
//  818 	gotomenu_start,
//  819   gotomenu_readed,
//  820   gotomenu_end,
//  821   gotomenu_random,
//  822   gotomenu_bookmark
//  823 };
//  824 
//  825 MENUITEM_DESC gotomenu_ITEMS[5] = {
//  826   {NULL, (int)"Start",  					LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  827 	{NULL, (int)"Readed",  					LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  828   {NULL, (int)"End",    					LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  829   {NULL, (int)"Random position",  LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2},
//  830 	{NULL, (int)"Bookmark...",  		LGP_NULL, 0, NULL, MENU_FLAG3, MENU_FLAG2}
//  831 };
//  832 
//  833 HEADER_DESC gotomenu_HDR = {0, 0, 0, 0, 0 //icon
//  834                             ,(int)"Go to...", LGP_NULL};
//  835 
//  836 MENU_DESC gotomenu_STRUCT = {
//  837   8, NULL, NULL, NULL,
//  838   menusoftkeys,
//  839   &menu_skt,
//  840   0,
//  841   NULL,
//  842   gotomenu_ITEMS,
//  843   gotomenu_HNDLS,
//  844   5
//  845 };
//  846 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock68 Using cfiCommon0
        CFI Function create_menu_goto
        ARM
//  847 int create_menu_goto(void) {
create_menu_goto:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//  848   patch_header(&gotomenu_HDR);
        LDR      R4,??create_menu_goto_0  ;; gotomenu_HDR
        MOV      R0,R4
        _BLF     patch_header,??patch_header??rA
//  849   return CreateMenu(0, 0, &gotomenu_STRUCT, &gotomenu_HDR, 0, 5, 0, 0);
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+12
        PUSH     {R0}
        CFI CFA R13+16
        MOV      R3,R4
        ADD      R2,R4,#+20
        MOV      R1,#+0
        MOV      R0,#+5
        PUSH     {R0}
        CFI CFA R13+20
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+24
        SWI      +338
        ADD      SP,SP,#+16
        CFI CFA R13+8
        POP      {R4,PC}          ;; return
        DATA
??create_menu_goto_0:
        DC32     gotomenu_HDR
        CFI EndBlock cfiBlock68
//  850 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock69 Using cfiCommon1
        CFI NoFunction
        THUMB
??saveText??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock69
        REQUIRE saveText
//  851 /*----------end--------------*/
//  852 /*
//  853 ===============================
//  854             end
//  855 ===============================
//  856 */
//  857 
//  858 
//  859 /*
//  860 ===============================
//  861          编辑框
//  862 ===============================
//  863 */
//  864 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock70 Using cfiCommon0
        CFI Function saveText
        ARM
//  865 int saveText(void) {
saveText:
        PUSH     {R4-R11,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R11 Frame(CFA, -8)
        CFI R10 Frame(CFA, -12)
        CFI R9 Frame(CFA, -16)
        CFI R8 Frame(CFA, -20)
        CFI R7 Frame(CFA, -24)
        CFI R6 Frame(CFA, -28)
        CFI R5 Frame(CFA, -32)
        CFI R4 Frame(CFA, -36)
        CFI CFA R13+36
//  866 	fclose(fd, &ul);
        LDR      R4,??DataTable37  ;; inp_desc
        SUB      SP,SP,#+132
        CFI CFA R13+168
        LDR      R0,[R4, #+84]
        ADD      R1,R4,#+408
        SWI      +13
//  867 	fd = -1;
        MVN      R0,#+0
        STR      R0,[R4, #+84]
//  868 	char temp[128];
//  869   strncpy(temp, procfile, strlen(procfile));
        MOV      R5,#+280
        ADD      R0,R5,R4
        SWI      +27
        MOV      R2,R0
        ADD      R1,R5,R4
        ADD      R0,SP,#+4
        SWI      +278
        LDR      R1,??saveText_0  ;; `?<Constant "File failed!">` + 16
        ADD      R0,SP,#+4
//  870   strcat(temp, ".temp");
        SWI      +23
//  871   
//  872   unlink(temp, &ul);
        ADD      R1,R4,#+408
        ADD      R0,SP,#+4
        SWI      +363
//  873   fmove(procfile, temp, &ul);
        ADD      R2,R4,#+408
        ADD      R1,SP,#+4
        ADD      R0,R5,R4
        SWI      +142
//  874   int sfd = fopen(temp, A_ReadOnly, P_READ, &ul);
        ADD      R3,R4,#+408
        MOV      R2,#+128
        MOV      R1,#+0
        ADD      R0,SP,#+4
        SWI      +10
        MOV      R6,R0
//  875   int dfd = fopen(procfile, A_ReadWrite + A_Create + A_Truncate, P_READ + P_WRITE, &ul);
        ADD      R3,R4,#+408
        MOV      R2,#+384
        MOV      R1,#+2
        ORR      R1,R1,#0x300
        ADD      R0,R5,R4
        SWI      +10
        MOV      R7,R0
//  876   char *tbuff = malloc(BUF_LEN);
        MOV      R0,#+32768
        SWI      +20
        MOV      R8,R0
//  877   
//  878   int maxlen = curblock->offset;
        LDR      R0,[R4, #+68]
//  879   int len = 0;
        MOV      R1,#+0
        LDR      R9,[R0, #+8]
        STR      R1,[SP, #+0]
        MOV      R10,#+1
        ORR      R10,R10,#0x8000
        CMP      R9,#+1
        BLT      ??saveText_1
//  880   while (maxlen > 0) {
//  881   	if ((len = fread(sfd, tbuff, maxlen > BUF_LEN ? BUF_LEN : maxlen, &ul)) <= 0) break;
??saveText_2:
        CMP      R9,R10
        MOVGE    R2,#+32768
        MOVLT    R2,R9
        ADD      R3,R4,#+408
        MOV      R1,R8
        MOV      R0,R6
        SWI      +11
        STR      R0,[SP, #+0]
        CMP      R0,#+1
        BLT      ??saveText_1
//  882   	fwrite(dfd, tbuff, len, &ul);
        ADD      R3,R4,#+408
        MOV      R2,R0
        MOV      R1,R8
        MOV      R0,R7
        SWI      +12
//  883   	maxlen -= BUF_LEN;
        SUB      R9,R9,#+32768
//  884 	}
        CMP      R9,#+1
        BGE      ??saveText_2
//  885 	
//  886 	len = sbw->wsbody[0] << 1;
??saveText_1:
        LDR      R1,[R4, #+144]
        LDR      R1,[R1, #+0]
        LDRH     R1,[R1, #+0]
        LSL      R1,R1,#+1
        STR      R1,[SP, #+0]
//  887 	char *s = malloc(len);
        MOV      R0,R1
        SWI      +20
//  888 	ws2str_unicode(s, sbw, &len);
        LDR      R1,[R4, #+144]
        MOV      R9,R0
        MOV      R2,SP
        _BLF     ws2str_unicode,??ws2str_unicode??rA
//  889 	
//  890 	maxlen = rlen - viewpos - bytelen;
        LDR      R0,[R4, #+132]
        LDR      R1,[R4, #+92]
        LDR      R2,[R4, #+136]
        SUB      R2,R1,R2
        SUB      R11,R2,R0
//  891 	rlen = rlen - bytelen + len;
        SUB      R0,R1,R0
        LDR      R1,[SP, #+0]
        ADD      R0,R1,R0
        STR      R0,[R4, #+92]
//  892 	if (rlen > BUF_LEN) {
        CMP      R0,R10
        BLT      ??saveText_3
//  893 		mfree(tbuff);
        MOV      R0,R8
        SWI      +21
//  894 		tbuff = malloc(rlen);
        LDR      R0,[R4, #+92]
        SWI      +20
        MOV      R8,R0
//  895 	}
//  896 	
//  897 	memcpy(tbuff, buff, viewpos);
??saveText_3:
        LDR      R2,[R4, #+136]
        LDR      R1,[R4, #+72]
        MOV      R0,R8
        SWI      +286
//  898 	memcpy(tbuff + viewpos, s, len);
        LDR      R0,[R4, #+136]
        LDR      R2,[SP, #+0]
        MOV      R1,R9
        ADD      R0,R0,R8
        SWI      +286
//  899 	memcpy(tbuff + viewpos + len, buff + viewpos + bytelen, maxlen);
        LDR      R0,[R4, #+136]
        LDR      R1,[R4, #+132]
        LDR      R3,[R4, #+72]
        MOV      R2,R11
        ADD      R3,R0,R3
        ADD      R1,R1,R3
        LDR      R3,[SP, #+0]
        ADD      R0,R0,R8
        ADD      R0,R3,R0
        SWI      +286
//  900 	mfree(s);
        MOV      R0,R9
        SWI      +21
//  901 	
//  902 	maxlen = curblock->offset + llen;
        LDR      R0,[R4, #+68]
        LDR      R1,[R4, #+96]
        LDR      R0,[R0, #+8]
        ADD      R9,R1,R0
//  903 	char *tb = NULL;
//  904  	switch (codetype) {
        LDR      R0,[R4, #+76]
        SUBS     R0,R0,#+2
        BEQ      ??saveText_4
        SUBS     R0,R0,#+1
        BEQ      ??saveText_5
        SUBS     R0,R0,#+1
        ADD      R1,R4,#+92
        MOV      R0,R8
        BEQ      ??saveText_6
//  905 	case 1: //ansi
//  906   	tb = unicode2gb(tbuff, &rlen);
        _BLF     unicode2gb,??unicode2gb??rA
        B        ??saveText_7
//  907   	break;
//  908 	case 2:   //unicode le
//  909 		tb = malloc(rlen);
??saveText_4:
        LDR      R0,[R4, #+92]
        SWI      +20
//  910 		memcpy(tbuff, tb, rlen);
        LDR      R2,[R4, #+92]
        MOV      R11,R0
        MOV      R1,R11
        MOV      R0,R8
        SWI      +286
        B        ??saveText_8
//  911    	break;
//  912 	case 3:   //unicode be
//  913 		tb = unicodeSwitch(tbuff, rlen, &rlen, &llen);
??saveText_5:
        LDR      R1,[R4, #+92]
        ADD      R3,R4,#+96
        ADD      R2,R4,#+92
        MOV      R0,R8
        _BLF     unicodeSwitch,??unicodeSwitch??rA
        B        ??saveText_7
//  914 		break;
//  915 	case 4:   //utf8
//  916 		tb = unicode2utf8(tbuff, &rlen);
??saveText_6:
        _BLF     unicode2utf8,??unicode2utf8??rA
??saveText_7:
        MOV      R11,R0
//  917 		break;
//  918 	default:
//  919 		tb = unicode2gb(tbuff, &rlen);
//  920 		break;
//  921   }
//  922   //WriteLog(tb, rlen);
//  923   fwrite(dfd, tb, rlen, &ul);
??saveText_8:
        LDR      R2,[R4, #+92]
        ADD      R3,R4,#+408
        MOV      R1,R11
        MOV      R0,R7
        SWI      +12
//  924 	mfree(tb);
        MOV      R0,R11
        SWI      +21
//  925 	if (lseek(sfd, maxlen, S_SET, &ul, &ul) == maxlen) {
        ADD      R0,R4,#+408
        PUSH     {R0}
        CFI CFA R13+172
        ADD      R3,R4,#+408
        MOV      R2,#+0
        MOV      R1,R9
        MOV      R0,R6
        SWI      +15
        CMP      R0,R9
        ADD      SP,SP,#+4
        CFI CFA R13+168
        BNE      ??saveText_9
//  926 		maxlen = fileindex->datalen - maxlen + 1;
        LDR      R0,[R4, #+64]
        LDR      R0,[R0, #+16]
        SUB      R0,R0,R9
        ADD      R9,R0,#+1
        CMP      R9,#+1
        BLT      ??saveText_9
//  927   	while (maxlen > 0) {
//  928   		if ((len = fread(sfd, tbuff, maxlen > BUF_LEN ? BUF_LEN : maxlen, &ul)) <= 0) break;
??saveText_10:
        CMP      R9,R10
        MOVGE    R2,#+32768
        MOVLT    R2,R9
        ADD      R3,R4,#+408
        MOV      R1,R8
        MOV      R0,R6
        SWI      +11
        STR      R0,[SP, #+0]
        CMP      R0,#+1
        BLT      ??saveText_9
//  929   		fwrite(dfd, tbuff, len, &ul);
        ADD      R3,R4,#+408
        MOV      R2,R0
        MOV      R1,R8
        MOV      R0,R7
        SWI      +12
//  930   		maxlen -= BUF_LEN;
        SUB      R9,R9,#+32768
//  931 		}
        CMP      R9,#+1
        BGE      ??saveText_10
//  932 	}
//  933 	
//  934 	int addr = 0;
//  935 	if (curblock) addr = curblock->offset + viewpos;
??saveText_9:
        LDR      R0,[R4, #+68]
        MOV      R9,#+0
        CMP      R0,#+0
        LDRNE    R0,[R0, #+8]
        LDRNE    R1,[R4, #+136]
        ADDNE    R9,R1,R0
//  936 	
//  937 	/*
//  938 	sprintf(tbuff, "%d\0", addr);
//  939   ShowMSG(1, (int) tbuff);
//  940   */
//  941   mfree(tbuff);
        MOV      R0,R8
        SWI      +21
//  942 	fclose(dfd, &ul);
        ADD      R1,R4,#+408
        MOV      R0,R7
        SWI      +13
//  943 	fclose(sfd, &ul);
        ADD      R1,R4,#+408
        MOV      R0,R6
        SWI      +13
//  944 	unlink(temp, &ul);
        ADD      R1,R4,#+408
        ADD      R0,SP,#+4
        SWI      +363
//  945 	if (loadFile(procfile)) {
        ADD      R0,R5,R4
        BL       loadFile
        CMP      R0,#+0
        BEQ      ??saveText_11
//  946 		gotoPos(addr);
        MOV      R0,R9
        BL       gotoPos
//  947 	}
//  948 	else {
//  949 		rlen = llen = 0;
//  950 		ShowMSG(1, (int) "File failed!");
//  951 		return 0;
//  952 	}
//  953 	return 1;
        MOV      R0,#+1
        ADD      SP,SP,#+132
        CFI CFA R13+36
        POP      {R4-R11,PC}
        CFI CFA R13+168
??saveText_11:
        LDR      R1,??DataTable36  ;; `?<Constant "File failed!">`
        STR      R0,[R4, #+96]
        STR      R0,[R4, #+92]
        MOV      R0,#+1
        SWI      +328
        MOV      R0,#+0
        ADD      SP,SP,#+132
        CFI CFA R13+36
        POP      {R4-R11,PC}      ;; return
        DATA
??saveText_0:
        DC32     `?<Constant "File failed!">` + 16
        CFI EndBlock cfiBlock70
//  954 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock71 Using cfiCommon1
        CFI NoFunction
        THUMB
??inp_onkey??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock71
        REQUIRE inp_onkey
//  955 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock72 Using cfiCommon0
        CFI Function inp_onkey
        ARM
//  956 int inp_onkey(GUI *gui, GUI_MSG *msg) {
inp_onkey:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        SUB      SP,SP,#+44
        CFI CFA R13+52
//  957 	
//  958 	EDITCONTROL ec;
//  959   
//  960   if(msg->gbsmsg->submess == RED_BUTTON) {
        LDR      R2,[R1, #+4]
        LDR      R2,[R2, #+8]
        CMP      R2,#+12
        BNE      ??inp_onkey_0
//  961     return 1;
??inp_onkey_1:
        MOV      R0,#+1
        B        ??inp_onkey_2
//  962   }
//  963   
//  964   if(msg->gbsmsg->submess == GREEN_BUTTON) {
//  965   	
//  966     
//  967   }
//  968   
//  969   if (msg->keys == 0x18) {
??inp_onkey_0:
        LDRSH    R1,[R1, #+2]
        CMP      R1,#+24
        BNE      ??inp_onkey_3
//  970   	
//  971   	ExtractEditControl(gui, 1, &ec);
//  972     if (sbw) FreeWS(sbw);
        LDR      R4,??DataTable37  ;; inp_desc
        MOV      R2,SP
        MOV      R1,#+1
        SWI      +361
        LDR      R0,[R4, #+144]
        CMP      R0,#+0
        BEQ      ??inp_onkey_4
        SWI      +297
//  973     sbw = AllocWS(viewlen);
??inp_onkey_4:
        LDR      R0,[R4, #+128]
        SWI      +293
        STR      R0,[R4, #+144]
//  974     wstrcpy(sbw, ec.pWS);
        LDR      R1,[SP, #+40]
        SWI      +287
//  975 /*    char *s = malloc(100);
//  976     sprintf(s, "%d:%d", sbw->wsbody[0], ec.pWS->wsbody[0]);
//  977    	ShowMSG(1, (int) s);
//  978    	mfree(s);*/
//  979     if(saveText()) {
        BL       saveText
        CMP      R0,#+0
        BNE      ??inp_onkey_1
//  980       return 1;
//  981     }
//  982   	/*
//  983     ExtractEditControl(gui, 1, &ec);    
//  984     wstrcpy(editstr, ec.pWS);
//  985     patch_header(&menuhdr);
//  986     menu_gui_id = CreateMenu(0, 0, &tmenu, &menuhdr, 0, 4, editstr, 0);*/
//  987     return -1; //do redraw
        MVN      R0,#+0
??inp_onkey_2:
        ADD      SP,SP,#+44
        CFI CFA R13+8
        POP      {R4,PC}
        CFI CFA R13+52
//  988   }
//  989   return 0; //Do standart keys
??inp_onkey_3:
        MOV      R0,#+0
        ADD      SP,SP,#+44
        CFI CFA R13+8
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock72
//  990   //1: close
//  991 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock73 Using cfiCommon1
        CFI NoFunction
        THUMB
??inp_ghook??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock73
        REQUIRE inp_ghook
//  992 
//  993 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock74 Using cfiCommon0
        CFI Function inp_ghook
        ARM
//  994 void inp_ghook(GUI *gui, int cmd) {
inp_ghook:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  995 	
//  996   static SOFTKEY_DESC sk = {0x0018, 0x0000, (int)"Save"};
//  997   
//  998   //WSHDR *editstr = EDIT_GetUserPointer(gui);
//  999   
// 1000   if (cmd == 2) {
// 1001     //Called after onCreate
// 1002   }
// 1003   
// 1004   if (cmd == 3) {
// 1005   	//退出
// 1006     //FreeWS(tmostr);    
// 1007   }    
// 1008   if (cmd == 7) {
        CMP      R1,#+7
        POPNE    {PC}
// 1009   	SetSoftKey(gui, &sk, SET_SOFT_KEY_N);    
        LDR      R1,??inp_ghook_0  ;; ??sk
        MOV      R2,#+0
        SWI      +360
// 1010   }
// 1011 }
        POP      {PC}             ;; return
        DATA
??inp_ghook_0:
        DC32     ??sk
        CFI EndBlock cfiBlock74

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock75 Using cfiCommon1
        CFI NoFunction
        THUMB
??inp_locret??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock75
        REQUIRE inp_locret
// 1012 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock76 Using cfiCommon0
        CFI Function inp_locret
        ARM
// 1013 void inp_locret(void){}
inp_locret:
        BX       LR               ;; return
        CFI EndBlock cfiBlock76

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock77 Using cfiCommon1
        CFI NoFunction
        THUMB
??LaunchEditor??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock77
        REQUIRE LaunchEditor
// 1014 
// 1015 INPUTDIA_DESC inp_desc = {
// 1016   1,
// 1017   inp_onkey,
// 1018   inp_ghook,
// 1019   (void *)inp_locret,
// 1020   0,
// 1021   &menu_skt,
// 1022   {0, 22, 131, 153},
// 1023   4,
// 1024   100,
// 1025   101,
// 1026   0,
// 1027   0,
// 1028   0x40000000
// 1029 };
// 1030 
// 1031 
// 1032 HEADER_DESC inp_hdr = {0, 0, 131, 21,/*icon*/NULL, (int)"Edit", LGP_NULL};
// 1033 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock78 Using cfiCommon0
        CFI Function LaunchEditor
        ARM
// 1034 int LaunchEditor(void) {
LaunchEditor:
        PUSH     {R4-R7,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
// 1035 	if (!buffloaded) return 0;
        LDR      R4,??LaunchEditor_0  ;; inp_desc
        SUB      SP,SP,#+44
        CFI CFA R13+64
        LDR      R0,[R4, #+80]
        CMP      R0,#+0
        BEQ      ??LaunchEditor_1
// 1036   void *ma = malloc_adr();
        SWI      +32788
        MOV      R6,R0
// 1037   void *eq;
// 1038   EDITCONTROL ec;
// 1039   PrepareEditControl(&ec);
        MOV      R0,SP
        SWI      +356
// 1040   eq = AllocEQueue(ma, mfree_adr());
        SWI      +32789
        MOV      R1,R0
        MOV      R0,R6
        SWI      +355
        MOV      R5,R0
// 1041   ConstructEditControl(&ec, 4, 0x40, sbw, viewlen);
        LDR      R0,[R4, #+128]
        MOV      R2,#+64
        PUSH     {R0}
        CFI CFA R13+68
        LDR      R3,[R4, #+144]
        MOV      R1,#+4
        ADD      R0,SP,#+4
        SWI      +357
// 1042   AddEditControlToEditQend(eq, &ec, ma);
        MOV      R2,R6
        ADD      R1,SP,#+4
        MOV      R0,R5
        SWI      +358
// 1043   patch_header(&inp_hdr);
        MOV      R6,#+412
        ADD      R0,R6,R4
        _BLF     patch_header,??patch_header??rA
// 1044   patch_input(&inp_desc);
        MOV      R0,#+0
        STRH     R0,[R4, #+24]
        SWI      +33162
        ADD      R0,R0,#+25
        STRH     R0,[R4, #+26]
        SWI      +33160
        SUB      R0,R0,#+1
        STRH     R0,[R4, #+28]
        SWI      +33161
        MOV      R7,R0
        SWI      +33163
        SUB      R0,R7,R0
        SUB      R0,R0,#+1
        STRH     R0,[R4, #+30]
// 1045   return CreateInputTextDialog(&inp_desc, &inp_hdr, eq, 1, sbw);
        LDR      R0,[R4, #+144]
        MOV      R3,#+1
        PUSH     {R0}
        CFI CFA R13+72
        MOV      R2,R5
        ADD      R1,R6,R4
        MOV      R0,R4
        SWI      +359
        ADD      SP,SP,#+8
        CFI CFA R13+64
??LaunchEditor_1:
        ADD      SP,SP,#+44       ;; stack cleaning
        CFI CFA R13+20
        POP      {R4-R7,PC}       ;; return
        DATA
??LaunchEditor_0:
        DC32     inp_desc
        CFI EndBlock cfiBlock78
// 1046 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock79 Using cfiCommon1
        CFI NoFunction
        THUMB
??Free_FLIST??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock79
        REQUIRE Free_FLIST
// 1047 
// 1048 /*
// 1049 ===============================
// 1050            end
// 1051 ===============================
// 1052 */
// 1053 
// 1054 
// 1055 /* need fix
// 1056 ===============================
// 1057          文件列表
// 1058 ===============================
// 1059 */
// 1060 typedef struct {
// 1061   void *next;
// 1062   int is_folder;
// 1063   char *fullname;
// 1064   char *name;
// 1065 } FLIST;
// 1066 
// 1067 typedef struct {
// 1068   void *gui;
// 1069   int type;
// 1070 } FVIEW;
// 1071 

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
// 1072 volatile FLIST *fltop;
fltop:
        DS8 4
// 1073 enum TYPES {IS_BACK, IS_FOLDER, IS_FILE}; 
// 1074 const char back[] = "..";
// 1075 char header[128];
// 1076 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock80 Using cfiCommon0
        CFI Function Free_FLIST
        ARM
// 1077 void Free_FLIST(void) {
Free_FLIST:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
// 1078 	
// 1079   LockSched();
        SWI      +326
// 1080   FLIST *fl = (FLIST *)fltop;
        LDR      R0,??DataTable35  ;; fltop
// 1081   fltop = 0;
        MOV      R1,#+0
        LDR      R4,[R0, #+0]
        STR      R1,[R0, #+0]
// 1082   UnlockSched();
        SWI      +327
        CMP      R4,#+0
        POPEQ    {R4,PC}
// 1083   while (fl) {
// 1084   	FLIST *fl_prev = fl;
??Free_FLIST_0:
        MOV      R0,R4
// 1085     fl = fl->next;
        LDR      R4,[R4, #+0]
// 1086     mfree(fl_prev);
        SWI      +21
// 1087   }
        CMP      R4,#+0
        BNE      ??Free_FLIST_0
// 1088 }
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock80

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock81 Using cfiCommon1
        CFI NoFunction
        THUMB
??strcmp_nocase??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock81
        REQUIRE strcmp_nocase
// 1089 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock82 Using cfiCommon0
        CFI Function strcmp_nocase
        ARM
// 1090 int strcmp_nocase(const char *s, const char *d) {
// 1091 	
// 1092   int cs;
// 1093   int ds;
// 1094   do {
// 1095     cs = *s++;
strcmp_nocase:
??strcmp_nocase_0:
        LDRB     R2,[R0], #+1
// 1096     if (cs & 0x40) cs &= 0xDF;
// 1097     ds = *d++;
        LDRB     R3,[R1], #+1
        TST      R2,#0x40
        ANDNE    R2,R2,#0xDF
// 1098     if (ds & 0x40) ds &= 0xDF;
        TST      R3,#0x40
        ANDNE    R3,R3,#0xDF
// 1099     cs -= ds;
        SUBS     R2,R2,R3
// 1100     if (cs) break;
        BNE      ??strcmp_nocase_1
// 1101   }
// 1102   while(ds);
        CMP      R3,#+0
        BNE      ??strcmp_nocase_0
// 1103   return(cs);
??strcmp_nocase_1:
        MOV      R0,R2
        BX       LR               ;; return
        CFI EndBlock cfiBlock82
// 1104 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock83 Using cfiCommon1
        CFI NoFunction
        THUMB
??AddToFList??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock83
        REQUIRE AddToFList
// 1105 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock84 Using cfiCommon0
        CFI Function AddToFList
        ARM
// 1106 FLIST *AddToFList(const char* full_name, const char *name, int is_folder) {
AddToFList:
        PUSH     {R4-R8,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R8 Frame(CFA, -8)
        CFI R7 Frame(CFA, -12)
        CFI R6 Frame(CFA, -16)
        CFI R5 Frame(CFA, -20)
        CFI R4 Frame(CFA, -24)
        CFI CFA R13+24
        MOV      R5,R0
        MOV      R6,R1
        MOV      R7,R2
// 1107 	
// 1108   int l_fname;
// 1109   FLIST *fl;
// 1110   FLIST *fn = malloc(sizeof (FLIST) + (l_fname = strlen(full_name)) + strlen(name) + 2);
        SWI      +27
        MOV      R8,R0
        MOV      R0,R6
        SWI      +27
        ADD      R0,R0,R8
        ADD      R0,R0,#+18
        SWI      +20
        MOV      R4,R0
// 1111   fn->fullname = (char *)fn + sizeof (FLIST);
        ADD      R0,R4,#+16
        STR      R0,[R4, #+8]
// 1112   fn->name = (char *)fn + sizeof (FLIST) + l_fname + 1;
        ADD      R0,R8,R4
        ADD      R0,R0,#+17
        STR      R0,[R4, #+12]
// 1113   strcpy(fn->fullname, full_name);
        LDR      R0,[R4, #+8]
        MOV      R1,R5
// 1114   strcpy(fn->name, name);
// 1115   fn->is_folder = is_folder;
// 1116   fn->next = 0;
// 1117   fl = (FLIST *)fltop;
        LDR      R5,??DataTable35  ;; fltop
        SWI      +26
        LDR      R0,[R4, #+12]
        MOV      R1,R6
        SWI      +26
        STR      R7,[R4, #+4]
        MOV      R0,#+0
        STR      R0,[R4, #+0]
        LDR      R6,[R5, #+0]
// 1118   if (fl) {
        CMP      R6,#+0
        BEQ      ??AddToFList_0
// 1119   	
// 1120     FLIST *pr;
// 1121     pr = (FLIST *) &fltop;
        LDR      R7,[R4, #+12]
// 1122     while (strcmp_nocase(fl->name, fn->name) < 0) {
??AddToFList_1:
        LDR      R0,[R6, #+12]
        MOV      R1,R7
        BL       strcmp_nocase
        CMP      R0,#+0
        BPL      ??AddToFList_2
// 1123       pr = fl;
        MOV      R5,R6
// 1124       fl = fl->next;
        LDR      R6,[R6, #+0]
// 1125       if (!fl) break;
        CMP      R6,#+0
        BNE      ??AddToFList_1
// 1126     }
// 1127     fn->next = fl;
??AddToFList_2:
        STR      R6,[R4, #+0]
// 1128     pr->next = fn;
// 1129   }
// 1130   else {
// 1131     fltop=fn;
??AddToFList_0:
        STR      R4,[R5, #+0]
// 1132   }
// 1133   return (fn);
        MOV      R0,R4
        POP      {R4-R8,PC}       ;; return
        CFI EndBlock cfiBlock84
// 1134 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock85 Using cfiCommon1
        CFI NoFunction
        THUMB
??FindFiles??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock85
        REQUIRE FindFiles
// 1135 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock86 Using cfiCommon0
        CFI Function FindFiles
        ARM
// 1136 int FindFiles(char *str, int type) {// type == 0 SelectFolder, type == 1 SelectFile
FindFiles:
        PUSH     {R4-R9,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R9 Frame(CFA, -8)
        CFI R8 Frame(CFA, -12)
        CFI R7 Frame(CFA, -16)
        CFI R6 Frame(CFA, -20)
        CFI R5 Frame(CFA, -24)
        CFI R4 Frame(CFA, -28)
        CFI CFA R13+28
        SUB      SP,SP,#+200
        CFI CFA R13+228
        SUB      SP,SP,#+1024
        CFI CFA R13+1252
        MOV      R4,R1
// 1137 
// 1138   DIR_ENTRY de;
// 1139   unsigned int err;
// 1140   char *rev, *s, *d;
// 1141   int i, c, n = 0;
// 1142   char path[256];
// 1143   char name[128];
// 1144   
// 1145   strcpy(path, str);
        MOV      R1,R0
        ADD      R0,SP,#+840
        SWI      +26
// 1146   Free_FLIST();
        BL       Free_FLIST
// 1147   s = path;
        ADD      R0,SP,#+840
// 1148   d = name;
        ADD      R1,SP,#+72
        ADD      R1,R1,#+1024
// 1149   rev = 0;
        MOV      R5,#+0
        MOV      R2,#+0
        B        ??FindFiles_0
// 1150   while ((c = *s++)) {
// 1151     *d++ = c;
??FindFiles_1:
        STRB     R3,[R1], #+1
// 1152     if (c == '\\' && *s != '\0') rev = d;
        CMP      R3,#+92
        BNE      ??FindFiles_0
        LDRB     R3,[R0, #+0]
        CMP      R3,#+0
        MOVNE    R2,R1
// 1153   }
??FindFiles_0:
        LDRB     R3,[R0], #+1
        CMP      R3,#+0
        BNE      ??FindFiles_1
// 1154   if(rev == 0)
        LDR      R0,??FindFiles_2  ;; back
        CMP      R2,#+0
// 1155     AddToFList("ROOT", back, IS_BACK);
        MOVEQ    R1,R0
        ADDEQ    R0,R0,#+4
        BEQ      ??FindFiles_3
// 1156   else {
// 1157     *rev=0;
        STRB     R5,[R2, #+0]
// 1158     AddToFList(name, back, IS_BACK);
        MOV      R2,#+0
        MOV      R1,R0
        ADD      R0,SP,#+72
        ADD      R0,R0,#+1024
??FindFiles_3:
        BL       AddToFList
// 1159   }
// 1160   n++;
        MOV      R6,#+1
// 1161   
// 1162   i = strlen(path);
        ADD      R0,SP,#+840
        SWI      +27
        MOV      R9,R0
// 1163   path[i++] = '*';
        ADD      R0,SP,#+840
        ADD      R0,R9,R0
        MOV      R1,#+42
        STRB     R1,[R0, #+0]
// 1164   path[i] = '\0';
        STRB     R5,[R0, #+1]
// 1165   if (FindFirstFile(&de, path, &err)) {
        MOV      R2,SP
        ADD      R1,SP,#+840
        ADD      R0,SP,#+4
        SWI      +107
        CMP      R0,#+0
        MOV      R7,#+92
        BEQ      ??FindFiles_4
// 1166     do {
// 1167       i = strlen(de.folder_name);
??FindFiles_5:
        ADD      R0,SP,#+56
        SWI      +27
        MOV      R9,R0
// 1168       strcpy(path, de.folder_name);
        ADD      R1,SP,#+56
        ADD      R0,SP,#+840
        SWI      +26
// 1169       path[i++] = '\\';
        ADD      R0,SP,#+840
        ADD      R0,R9,R0
        STRB     R7,[R0], #+1
// 1170       strcpy(path + i, de.file_name);
        ADD      R1,SP,#+185
        SWI      +26
// 1171       if (de.file_attr & FA_DIRECTORY) {
        LDRSH    R0,[SP, #+48]
        ADD      R8,R6,#+1
        TST      R0,#0x10
        BEQ      ??FindFiles_6
// 1172         i = strlen(path);
        ADD      R0,SP,#+840
        SWI      +27
        MOV      R9,R0
// 1173         path[i++] = '\\';
        ADD      R0,SP,#+840
        ADD      R0,R9,R0
        STRB     R7,[R0, #+0]
// 1174         path[i] = 0;
        STRB     R5,[R0, #+1]
// 1175         name[0] = '\\';
        STRB     R7,[SP, #+1096]
// 1176         strcpy(name + 1, de.file_name);
        ADD      R1,SP,#+185
        ADD      R0,SP,#+73
        ADD      R0,R0,#+1024
        SWI      +26
// 1177         AddToFList(path, name, IS_FOLDER);
        MOV      R2,#+1
        ADD      R1,SP,#+72
        ADD      R1,R1,#+1024
        B        ??FindFiles_7
// 1178         n++;
// 1179       }
// 1180       else {
// 1181         if (type != 0) {
??FindFiles_6:
        CMP      R4,#+0
        BEQ      ??FindFiles_8
// 1182           AddToFList(path,de.file_name, IS_FILE);
        MOV      R2,#+2
        ADD      R1,SP,#+185
??FindFiles_7:
        ADD      R0,SP,#+840
        BL       AddToFList
// 1183           n++;
        MOV      R6,R8
// 1184         }
// 1185       }
// 1186     }
// 1187     while(FindNextFile(&de, &err));
??FindFiles_8:
        MOV      R1,SP
        ADD      R0,SP,#+4
        SWI      +108
        CMP      R0,#+0
        BNE      ??FindFiles_5
// 1188   }
// 1189   FindClose(&de, &err);
??FindFiles_4:
        MOV      R1,SP
        ADD      R0,SP,#+4
        SWI      +109
// 1190   return n;
        MOV      R0,R6
        ADD      SP,SP,#+200
        CFI CFA R13+1052
        ADD      SP,SP,#+1024
        CFI CFA R13+28
        POP      {R4-R9,PC}       ;; return
        DATA
??FindFiles_2:
        DC32     back
        CFI EndBlock cfiBlock86
// 1191 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock87 Using cfiCommon1
        CFI NoFunction
        THUMB
??FindFLISTtByNS??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock87
        REQUIRE FindFLISTtByNS
// 1192 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock88 Using cfiCommon0
        CFI Function FindFLISTtByNS
        ARM
// 1193 FLIST *FindFLISTtByNS(int *i, int si) {
// 1194   FLIST *fl;
// 1195   fl = (FLIST *)fltop;
FindFLISTtByNS:
        LDR      R2,??DataTable35  ;; fltop
        B        ??FindFLISTtByNS_0
// 1196   while (fl) {
// 1197     if (fl->is_folder == si) {
// 1198       if (!(*i)) return (fl);
// 1199       (*i)--;
??FindFLISTtByNS_1:
        SUB      R3,R3,#+1
        STR      R3,[R0, #+0]
// 1200     }    
// 1201     fl = fl->next;
??FindFLISTtByNS_0:
        LDR      R2,[R2, #+0]
        CMP      R2,#+0
        BEQ      ??FindFLISTtByNS_2
        LDR      R3,[R2, #+4]
        CMP      R3,R1
        BNE      ??FindFLISTtByNS_0
        LDR      R3,[R0, #+0]
        CMP      R3,#+0
        BNE      ??FindFLISTtByNS_1
        MOV      R0,R2
        BX       LR
// 1202   }
// 1203   return fl;
??FindFLISTtByNS_2:
        MOV      R0,#+0
        BX       LR               ;; return
        CFI EndBlock cfiBlock88
// 1204 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable35:
        DC32     fltop

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock89 Using cfiCommon1
        CFI NoFunction
        THUMB
??FindFLISTtByN??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock89
        REQUIRE FindFLISTtByN
// 1205   

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock90 Using cfiCommon0
        CFI Function FindFLISTtByN
        ARM
// 1206 FLIST *FindFLISTtByN(int n) {
FindFLISTtByN:
        PUSH     {R0,LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+8
// 1207   
// 1208   FLIST *fl;
// 1209   fl = FindFLISTtByNS(&n, IS_BACK); if ((!n) && (fl)) return(fl);
        MOV      R1,#+0
        MOV      R0,SP
        BL       FindFLISTtByNS
        LDR      R1,[SP, #+0]
        CMP      R1,#+0
        BNE      ??FindFLISTtByN_0
        CMP      R0,#+0
        POPNE    {R1,PC}
// 1210   fl = FindFLISTtByNS(&n, IS_FOLDER); if ((!n) && (fl)) return(fl);
??FindFLISTtByN_0:
        MOV      R1,#+1
        MOV      R0,SP
        BL       FindFLISTtByNS
        LDR      R1,[SP, #+0]
        CMP      R1,#+0
        BNE      ??FindFLISTtByN_1
        CMP      R0,#+0
        POPNE    {R1,PC}
// 1211   fl = FindFLISTtByNS(&n, IS_FILE); if ((!n) && (fl)) return(fl);
??FindFLISTtByN_1:
        MOV      R1,#+2
        MOV      R0,SP
        BL       FindFLISTtByNS
        POP      {R1,PC}
        CFI EndBlock cfiBlock90
// 1212   return fl;
// 1213 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock91 Using cfiCommon1
        CFI NoFunction
        THUMB
??SavePath??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock91
        REQUIRE SavePath
// 1214 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock92 Using cfiCommon0
        CFI Function SavePath
        ARM
// 1215 void SavePath(FLIST *fl) {
SavePath:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        MOV      R4,R0
// 1216 	
// 1217 	if (loadFile(fl->fullname)) {
        LDR      R0,[R4, #+8]
        BL       loadFile
        CMP      R0,#+0
        BEQ      ??SavePath_0
// 1218    		//ShowMSG(1, (int)"File loaded!");
// 1219   	strcpy(procfile, fl->fullname);
        LDR      R1,[R4, #+8]
        LDR      R0,??SavePath_1  ;; inp_desc + 280
        SWI      +26
        POP      {R4,PC}
// 1220   }
// 1221   else {
// 1222    	ShowMSG(1, (int)"File failed!");
??SavePath_0:
        LDR      R1,??DataTable36  ;; `?<Constant "File failed!">`
        MOV      R0,#+1
        SWI      +328
// 1223 	}
// 1224 	/*
// 1225   EDITCONTROL ec;
// 1226   EDIT_ExtractFocusedControl(ed_gui,&ec);
// 1227   WSHDR *ws=AllocWS(ec.maxlen);
// 1228   str_2ws(ws,fl->fullname,ec.maxlen);
// 1229   EDIT_SetTextToFocused(ed_gui,ws);
// 1230   FreeWS(ws);*/
// 1231 }
        POP      {R4,PC}          ;; return
        DATA
??SavePath_1:
        DC32     inp_desc + 280
        CFI EndBlock cfiBlock92

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable36:
        DC32     `?<Constant "File failed!">`

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock93 Using cfiCommon1
        CFI NoFunction
        THUMB
??filelist_menu_onkey??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock93
        REQUIRE filelist_menu_onkey
// 1232 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock94 Using cfiCommon0
        CFI Function filelist_menu_onkey
        ARM
// 1233 int filelist_menu_onkey(void *data, GUI_MSG *msg) {
filelist_menu_onkey:
        PUSH     {R4-R6,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R6 Frame(CFA, -8)
        CFI R5 Frame(CFA, -12)
        CFI R4 Frame(CFA, -16)
        CFI CFA R13+16
        MOV      R4,R0
        MOV      R6,R1
// 1234 	
// 1235   FLIST *fl;
// 1236   int i, n;
// 1237   i = GetCurMenuItem(data);
        SWI      +399
// 1238   fl = FindFLISTtByN(i);
        BL       FindFLISTtByN
        MOV      R5,R0
// 1239   
// 1240   if (msg->keys == 0x3D || msg->keys == 0x18) {
        LDRSH    R0,[R6, #+2]
        CMP      R0,#+61
        CMPNE    R0,#+24
        BNE      ??filelist_menu_onkey_0
// 1241   	
// 1242     if (fl) {
        CMP      R5,#+0
        BEQ      ??filelist_menu_onkey_1
// 1243       if (fl->is_folder == IS_FOLDER || fl->is_folder == IS_BACK) {
        LDR      R0,[R5, #+4]
        CMP      R0,#+1
        CMPNE    R0,#+0
        BNE      ??filelist_menu_onkey_2
// 1244         int len;
// 1245         if (strcmp(fl->fullname, "ROOT")) {
        LDR      R0,[R5, #+8]
        LDR      R1,??filelist_menu_onkey_3  ;; back + 4
        SWI      +25
        CMP      R0,#+0
        BEQ      ??filelist_menu_onkey_4
// 1246           strncpy(header, fl->fullname, sizeof (header) - 1);
        LDR      R6,??DataTable37  ;; inp_desc
        LDR      R1,[R5, #+8]
        MOV      R2,#+127
        ADD      R0,R6,#+152
        SWI      +278
// 1247           len = strlen(fl->fullname);
        LDR      R0,[R5, #+8]
        SWI      +27
// 1248           header[len > sizeof(header) - 1 ? sizeof (header) - 1 : len] = 0;
        CMP      R0,#+128
        MOVCS    R0,#+127
        ADD      R0,R0,R6
        MOV      R1,#+0
        STRB     R1,[R0, #+152]
// 1249           n = FindFiles(fl->fullname, 1);
        LDR      R0,[R5, #+8]
        MOV      R1,#+1
        BL       FindFiles
        B        ??filelist_menu_onkey_5
// 1250         }
// 1251         else {
// 1252           int CreateRootMenu();
// 1253           n = CreateRootMenu();
??filelist_menu_onkey_4:
        BL       CreateRootMenu
??filelist_menu_onkey_5:
        MOV      R1,R0
// 1254         }         
// 1255         Menu_SetItemCountDyn(data, n);
        MOV      R0,R4
        SWI      +486
// 1256         SetCursorToMenuItem(data, 0);
        MOV      R1,#+0
        MOV      R0,R4
        SWI      +452
// 1257         RefreshGUI();
        SWI      +406
// 1258       }
// 1259       else {
// 1260       	SavePath(fl);        
// 1261         return 1;
// 1262       }
// 1263     }
// 1264     //    GeneralFunc_F1(1);
// 1265     return -1;
??filelist_menu_onkey_1:
        MVN      R0,#+0
        POP      {R4-R6,PC}
??filelist_menu_onkey_2:
        MOV      R0,R5
        BL       SavePath
        MOV      R0,#+1
        POP      {R4-R6,PC}
// 1266   }
// 1267   return 0;
??filelist_menu_onkey_0:
        MOV      R0,#+0
        POP      {R4-R6,PC}       ;; return
        DATA
??filelist_menu_onkey_3:
        DC32     back + 4
        CFI EndBlock cfiBlock94
// 1268 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable37:
        DC32     inp_desc

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock95 Using cfiCommon1
        CFI NoFunction
        THUMB
??filelist_menu_ghook??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock95
        REQUIRE filelist_menu_ghook
// 1269 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock96 Using cfiCommon0
        CFI Function filelist_menu_ghook
        ARM
// 1270 void filelist_menu_ghook(void *data, int cmd) {
filelist_menu_ghook:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
// 1271   if (cmd == 3) {
        CMP      R1,#+3
        BNE      ??filelist_menu_ghook_0
// 1272     Free_FLIST();
        POP      {LR}             ;; Pop
        CFI ?RET R14
        CFI CFA R13+0
        B        Free_FLIST       ;; tailcall
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
// 1273  	}
// 1274   if (cmd == 0x0A) {
??filelist_menu_ghook_0:
        CMP      R1,#+10
        POPNE    {PC}
// 1275     DisableIDLETMR();
        SWI      +383
// 1276   }
// 1277 }
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock96

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock97 Using cfiCommon1
        CFI NoFunction
        THUMB
??filelist_menu_iconhndl??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock97
        REQUIRE filelist_menu_iconhndl
// 1278 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock98 Using cfiCommon0
        CFI Function filelist_menu_iconhndl
        ARM
// 1279 void filelist_menu_iconhndl(void *data, int curitem, void *user_pointer) {
filelist_menu_iconhndl:
        PUSH     {R4-R9,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R9 Frame(CFA, -8)
        CFI R8 Frame(CFA, -12)
        CFI R7 Frame(CFA, -16)
        CFI R6 Frame(CFA, -20)
        CFI R5 Frame(CFA, -24)
        CFI R4 Frame(CFA, -28)
        CFI CFA R13+28
        MOV      R4,R0
        MOV      R5,R1
// 1280 	
// 1281   FLIST *fl;
// 1282   WSHDR *ws;
// 1283   void *item = AllocMenuItem(data);
        SWI      +407
        MOV      R6,R0
// 1284   int len;
// 1285   fl = FindFLISTtByN(curitem);
        MOV      R0,R5
        BL       FindFLISTtByN
        MOVS     R7,R0
// 1286   if (fl) {
        BEQ      ??filelist_menu_iconhndl_0
// 1287     len = strlen(fl->name);
        LDR      R0,[R7, #+12]
        SWI      +27
        MOV      R8,R0
// 1288     ws = AllocMenuWS(data, len + 4);
        ADD      R1,R8,#+4
        MOV      R0,R4
        SWI      +408
        MOV      R9,R0
// 1289     if (fl->is_folder == IS_BACK || fl->is_folder == IS_FOLDER) {
        LDR      R0,[R7, #+4]
        CMP      R0,#+0
        CMPNE    R0,#+1
        BNE      ??filelist_menu_iconhndl_1
// 1290       str_2ws(ws, fl->name,len);
        LDR      R1,[R7, #+12]
        MOV      R2,R8
        MOV      R0,R9
        SWI      +364
// 1291       wsInsertChar(ws, 0x0002, 1);
        MOV      R2,#+1
        MOV      R1,#+2
        MOV      R0,R9
        SWI      +29
// 1292       wsInsertChar(ws, 0xE008, 1);
        MOV      R2,#+1
        MOV      R1,#+8
        ORR      R1,R1,#0xE000
        MOV      R0,R9
        SWI      +29
        B        ??filelist_menu_iconhndl_2
// 1293     }
// 1294     else {
// 1295       str_2ws(ws, fl->name, len);
??filelist_menu_iconhndl_1:
        LDR      R1,[R7, #+12]
        MOV      R2,R8
        MOV      R0,R9
        SWI      +364
        B        ??filelist_menu_iconhndl_2
// 1296     }
// 1297   }
// 1298   else {
// 1299     ws = AllocMenuWS(data, 10);
??filelist_menu_iconhndl_0:
        MOV      R1,#+10
        MOV      R0,R4
        SWI      +408
        MOV      R9,R0
// 1300     wsprintf(ws, "?");
        ADR      R1,??filelist_menu_iconhndl_3  ;; "\?"
        SWI      +292
// 1301   }
// 1302   SetMenuItemText(data, item, ws, curitem);
??filelist_menu_iconhndl_2:
        MOV      R3,R5
        MOV      R2,R9
        MOV      R1,R6
        MOV      R0,R4
        SWI      +410
// 1303 }
        POP      {R4-R9,PC}       ;; return
        DATA
??filelist_menu_iconhndl_3:
        DC8      "\?",+0,+0
        CFI EndBlock cfiBlock98

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock99 Using cfiCommon1
        CFI NoFunction
        THUMB
??CreateRootMenu??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock99
        REQUIRE CreateRootMenu
// 1304 
// 1305 HEADER_DESC filelist_HDR = {0, 0, 0, 0, NULL, (int)header, LGP_NULL};
// 1306 
// 1307 MENU_DESC filelist_STRUCT = {
// 1308 	
// 1309   8,filelist_menu_onkey,filelist_menu_ghook, NULL,
// 1310  	menusoftkeys,
// 1311   &menu_skt,
// 1312   0x10,
// 1313   filelist_menu_iconhndl,
// 1314   NULL,   //Items
// 1315   NULL,   //Procs
// 1316   0   //n
// 1317 };
// 1318 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock100 Using cfiCommon0
        CFI Function CreateRootMenu
        ARM
// 1319 int CreateRootMenu() {
CreateRootMenu:
        PUSH     {R4-R7,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
        SUB      SP,SP,#+36
        CFI CFA R13+56
// 1320   char path[32];
// 1321   unsigned int err;
// 1322   int n = 0;
        MOV      R4,#+0
// 1323   Free_FLIST();
// 1324   for (int i = 0; i != 5; i++) {
        MOV      R5,#+0
        BL       Free_FLIST
        MOV      R6,#+92
        MOV      R7,#+58
// 1325     path[0] = i+'0';
??CreateRootMenu_0:
        ADD      R1,R5,#+48
        STRB     R1,[SP, #+4]
// 1326     path[1] = ':';
        STRB     R7,[SP, #+5]
// 1327     path[2] = '\\';
        STRB     R6,[SP, #+6]
// 1328     path[3] = 0;
        MOV      R1,#+0
        STRB     R1,[SP, #+7]
// 1329     if (isdir(path,&err)) {
        MOV      R1,SP
        ADD      R0,SP,#+4
        SWI      +145
        CMP      R0,#+0
        BEQ      ??CreateRootMenu_1
// 1330       AddToFList(path, path, IS_FOLDER);
        MOV      R2,#+1
        ADD      R1,SP,#+4
        ADD      R0,SP,#+4
        BL       AddToFList
// 1331       n++;
        ADD      R4,R4,#+1
// 1332     }
// 1333   }
??CreateRootMenu_1:
        ADD      R5,R5,#+1
        CMP      R5,#+5
        BNE      ??CreateRootMenu_0
// 1334   strcpy(header, "Root");
        LDR      R1,??CreateRootMenu_2  ;; `?<Constant "Root">`
        LDR      R0,??CreateRootMenu_2+0x4  ;; inp_desc + 152
        SWI      +26
// 1335   return (n);
        MOV      R0,R4
        ADD      SP,SP,#+36
        CFI CFA R13+20
        POP      {R4-R7,PC}       ;; return
        DATA
??CreateRootMenu_2:
        DC32     `?<Constant "Root">`
        DC32     inp_desc + 152
        CFI EndBlock cfiBlock100
// 1336 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock101 Using cfiCommon1
        CFI NoFunction
        THUMB
??open_select_file_gui??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock101
        REQUIRE open_select_file_gui
// 1337 
// 1338 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock102 Using cfiCommon0
        CFI Function open_select_file_gui
        ARM
// 1339 void open_select_file_gui(int type) {
open_select_file_gui:
        PUSH     {R4-R7,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
// 1340   char *s, *rev=0;
// 1341   int n, c, len;
// 1342   
// 1343 	s = procfile;
        LDR      R4,??DataTable49  ;; inp_desc
        MOV      R5,R0
        MOV      R6,#+0
        MOV      R0,#+0
        MOV      R7,#+280
        ADD      R1,R7,R4
        B        ??open_select_file_gui_0
// 1344   while ((c = *s++)) {
// 1345     if (c == '\\' && *s != '\0') rev = s;
??open_select_file_gui_1:
        CMP      R2,#+92
        BNE      ??open_select_file_gui_0
        LDRB     R2,[R1, #+0]
        CMP      R2,#+0
        MOVNE    R0,R1
// 1346   }
??open_select_file_gui_0:
        LDRB     R2,[R1], #+1
        CMP      R2,#+0
        BNE      ??open_select_file_gui_1
// 1347   if (!rev)
        CMP      R0,#+0
        BNE      ??open_select_file_gui_2
// 1348     n = CreateRootMenu();
        BL       CreateRootMenu
        B        ??open_select_file_gui_3
// 1349   else {
// 1350     *rev = 0;
??open_select_file_gui_2:
        STRB     R6,[R0, #+0]
// 1351     strncpy(header, procfile, sizeof (header) - 1);
        MOV      R2,#+127
        ADD      R1,R7,R4
        ADD      R0,R4,#+152
        SWI      +278
// 1352     len = strlen(procfile);
        ADD      R0,R7,R4
        SWI      +27
// 1353     header[len > sizeof (header) - 1 ? sizeof (header) - 1 : len] = 0;
        CMP      R0,#+128
        MOVCS    R0,#+127
        ADD      R0,R0,R4
        STRB     R6,[R0, #+152]
// 1354     n = FindFiles(procfile, type);
        MOV      R1,R5
        ADD      R0,R7,R4
        BL       FindFiles
??open_select_file_gui_3:
        MOV      R5,R0
// 1355   }    
// 1356   patch_header(&filelist_HDR);
        MOV      R6,#+432
        ADD      R0,R6,R4
        _BLF     patch_header,??patch_header??rA
// 1357   CreateMenu(0, 0, &filelist_STRUCT, &filelist_HDR, 0, n, 0, 0);
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+24
        PUSH     {R0}
        CFI CFA R13+28
        PUSH     {R5}
        CFI CFA R13+32
        PUSH     {R0}
        CFI CFA R13+36
        ADD      R3,R6,R4
        ADD      R2,R4,#+452
        MOV      R1,#+0
        SWI      +338
// 1358 }
        POP      {R0-R7,PC}       ;; return
        CFI EndBlock cfiBlock102

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock103 Using cfiCommon1
        CFI NoFunction
        THUMB
??Free_BLIST??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock103
        REQUIRE Free_BLIST
// 1359 /*
// 1360 ===============================
// 1361            end
// 1362 ===============================
// 1363 */
// 1364 
// 1365 /*
// 1366 ===============================
// 1367          书签列表
// 1368 ===============================
// 1369 */
// 1370 typedef struct BMKLIST {
// 1371   struct BMKLIST *next;
// 1372   struct BMKLIST *prior;
// 1373   int address;
// 1374   WSHDR *preview;
// 1375 } BMKLIST;
// 1376 
// 1377 BMKLIST *bltop = NULL;

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock104 Using cfiCommon0
        CFI Function Free_BLIST
        ARM
// 1378 void Free_BLIST(void) {       //清空列表
Free_BLIST:
        PUSH     {R4,R5,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
        LDR      R4,??DataTable49  ;; inp_desc
        LDR      R0,[R4, #+148]
        CMP      R0,#+0
        POPEQ    {R4,R5,PC}
// 1379   BMKLIST *bl;
// 1380  	while (bltop) {
// 1381   	bl = bltop;
??Free_BLIST_0:
        LDR      R5,[R4, #+148]
// 1382   	bltop = bltop->next;
        LDR      R0,[R5, #+0]
        STR      R0,[R4, #+148]
// 1383   	FreeWS(bl->preview);
        LDR      R0,[R5, #+12]
        SWI      +297
// 1384     mfree(bl);
        MOV      R0,R5
        SWI      +21
// 1385   }
        LDR      R0,[R4, #+148]
        CMP      R0,#+0
        BNE      ??Free_BLIST_0
// 1386 }
        POP      {R4,R5,PC}       ;; return
        CFI EndBlock cfiBlock104

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock105 Using cfiCommon1
        CFI NoFunction
        THUMB
??Add_Blist_Item??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock105
        REQUIRE Add_Blist_Item
// 1387 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock106 Using cfiCommon0
        CFI Function Add_Blist_Item
        ARM
// 1388 void Add_Blist_Item(int offset) {
Add_Blist_Item:
        PUSH     {R4-R11,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R11 Frame(CFA, -8)
        CFI R10 Frame(CFA, -12)
        CFI R9 Frame(CFA, -16)
        CFI R8 Frame(CFA, -20)
        CFI R7 Frame(CFA, -24)
        CFI R6 Frame(CFA, -28)
        CFI R5 Frame(CFA, -32)
        CFI R4 Frame(CFA, -36)
        CFI CFA R13+36
// 1389   
// 1390   int len = 100;
// 1391   WSHDR *ws; 
// 1392   BMKLIST* bl = bltop;
        LDR      R5,??DataTable49  ;; inp_desc
        MOV      R4,R0
        LDR      R7,[R5, #+148]
// 1393   if (!bl) {
        MOV      R6,#+0
        CMP      R7,#+0
        BNE      ??Add_Blist_Item_0
// 1394   	bltop = bl = malloc(sizeof (BMKLIST));
        MOV      R0,#+16
        SWI      +20
        MOV      R7,R0
        STR      R7,[R5, #+148]
// 1395   	bltop->prior = NULL;
        STR      R6,[R0, #+4]
        B        ??Add_Blist_Item_1
// 1396   }
// 1397   else {
// 1398   	while (bl->next) bl = bl->next;
??Add_Blist_Item_2:
        MOV      R7,R0
??Add_Blist_Item_0:
        LDR      R0,[R7, #+0]
        CMP      R0,#+0
        BNE      ??Add_Blist_Item_2
// 1399   	bl->next = malloc(sizeof (BMKLIST));
        MOV      R0,#+16
        SWI      +20
        STR      R0,[R7, #+0]
// 1400   	bl->next->prior = bl;
        STR      R7,[R0, #+4]
// 1401   	bl = bl->next;
        LDR      R7,[R7, #+0]
// 1402 	}
// 1403   ws = AllocWS(len);
??Add_Blist_Item_1:
        MOV      R0,#+100
        SWI      +293
        MOV      R8,R0
// 1404   char *tbuff = malloc(len);
        MOV      R0,#+100
        SWI      +20
// 1405   DataIndex *block = curblock;
        LDR      R10,[R5, #+68]
// 1406   int view = viewpos;
        LDR      R11,[R5, #+136]
        MOV      R9,R0
// 1407   gotoPos(offset);
        MOV      R0,R4
        BL       gotoPos
// 1408   str2ws_unicode(ws, buff + viewpos, 20);
        LDR      R0,[R5, #+136]
        LDR      R1,[R5, #+72]
        MOV      R2,#+20
        ADD      R1,R0,R1
        MOV      R0,R8
        _BLF     str2ws_unicode,??str2ws_unicode??rA
// 1409   bl->preview = ws;
        STR      R8,[R7, #+12]
// 1410   bl->next = NULL;
        STR      R6,[R7, #+0]
// 1411   bl->address = offset;
        STR      R4,[R7, #+8]
// 1412   mfree(tbuff);
        MOV      R0,R9
        SWI      +21
// 1413   curblock = block;
        STR      R10,[R5, #+68]
// 1414   viewpos = view;
        STR      R11,[R5, #+136]
// 1415 }
        POP      {R4-R11,PC}      ;; return
        CFI EndBlock cfiBlock106

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock107 Using cfiCommon1
        CFI NoFunction
        THUMB
??Fill_BLIST??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock107
        REQUIRE Fill_BLIST
// 1416 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock108 Using cfiCommon0
        CFI Function Fill_BLIST
        ARM
// 1417 int Fill_BLIST() {
Fill_BLIST:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
// 1418 	for (int i = 2; i < bmknum; i++) {
        MOV      R4,#+2
        B        ??Fill_BLIST_0
// 1419 	  Add_Blist_Item(bookmark[i]);
??Fill_BLIST_1:
        LDR      R0,[R1, #+104]
        LDR      R0,[R0, +R4, LSL #+2]
// 1420 	}
        ADD      R4,R4,#+1
        BL       Add_Blist_Item
??Fill_BLIST_0:
        LDR      R1,??DataTable49  ;; inp_desc
        LDR      R0,[R1, #+108]
        CMP      R4,R0
        BLT      ??Fill_BLIST_1
// 1421 	return bmknum;
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock108
// 1422 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock109 Using cfiCommon1
        CFI NoFunction
        THUMB
??FindBLISTtByN??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock109
        REQUIRE FindBLISTtByN
// 1423 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock110 Using cfiCommon0
        CFI Function FindBLISTtByN
        ARM
// 1424 BMKLIST *FindBLISTtByN(int n) {
// 1425   BMKLIST *bl = bltop;
FindBLISTtByN:
        LDR      R1,??FindBLISTtByN_0  ;; inp_desc + 148
// 1426   int i = 0;
        MOV      R2,#+0
        LDR      R1,[R1, #+0]
        B        ??FindBLISTtByN_1
// 1427   while(bl && (i != n)) {
// 1428     bl = bl->next;
??FindBLISTtByN_2:
        LDR      R1,[R1, #+0]
// 1429     i++;
        ADD      R2,R2,#+1
// 1430   }
??FindBLISTtByN_1:
        CMP      R1,#+0
        CMPNE    R2,R0
        BNE      ??FindBLISTtByN_2
// 1431   return bl;
        MOV      R0,R1
        BX       LR               ;; return
        DATA
??FindBLISTtByN_0:
        DC32     inp_desc + 148
        CFI EndBlock cfiBlock110
// 1432 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock111 Using cfiCommon1
        CFI NoFunction
        THUMB
??bmklist_menu_onkey??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock111
        REQUIRE bmklist_menu_onkey
// 1433 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock112 Using cfiCommon0
        CFI Function bmklist_menu_onkey
        ARM
// 1434 int bmklist_menu_onkey(void *data, GUI_MSG *msg) {
bmklist_menu_onkey:
        PUSH     {R4-R8,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R8 Frame(CFA, -8)
        CFI R7 Frame(CFA, -12)
        CFI R6 Frame(CFA, -16)
        CFI R5 Frame(CFA, -20)
        CFI R4 Frame(CFA, -24)
        CFI CFA R13+24
// 1435   int keycode = msg->keys;
        LDRSH    R7,[R1, #+2]
        MOV      R4,R0
// 1436   int i = GetCurMenuItem(data);
        SWI      +399
        MOV      R8,R0
// 1437   BMKLIST* bl;
// 1438   bl = FindBLISTtByN(i);
        BL       FindBLISTtByN
        MOV      R6,R0
// 1439   if (keycode == 0x3D || keycode == 0x18) {
        CMP      R7,#+61
        CMPNE    R7,#+24
        BNE      ??bmklist_menu_onkey_0
// 1440     gotoPos(bl->address);
        LDR      R0,[R6, #+8]
        BL       gotoPos
// 1441     GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
        MOV      R0,#+0
        POP      {R4-R8,PC}
// 1442   }
// 1443   else if (keycode == 0x14) { //'*' 添加
??bmklist_menu_onkey_0:
        LDR      R5,??DataTable49  ;; inp_desc
        CMP      R7,#+20
        BNE      ??bmklist_menu_onkey_1
// 1444   	if (add2bmk()) {
        BL       add2bmk
        CMP      R0,#+0
        POPEQ    {R4-R8,PC}
// 1445   		Add_Blist_Item(curblock->offset + viewpos);
        LDR      R0,[R5, #+68]
        LDR      R1,[R5, #+136]
        LDR      R0,[R0, #+8]
        ADD      R0,R1,R0
        BL       Add_Blist_Item
// 1446   		Menu_SetItemCountDyn(data, bmknum - 2);
        B        ??bmklist_menu_onkey_2
// 1447       SetCursorToMenuItem(data, 0);
// 1448   	}
// 1449 	}
// 1450 	else if (keycode == 0x15) { //'#' 删除
??bmklist_menu_onkey_1:
        CMP      R7,#+21
        BNE      ??bmklist_menu_onkey_3
// 1451 		if (deletebmk(i + 2)) {
        ADD      R0,R8,#+2
        BL       deletebmk
        CMP      R0,#+0
        POPEQ    {R4-R8,PC}
// 1452 			if (bl->prior) bl->prior->next = bl->next;
        LDR      R0,[R6, #+4]
        LDR      R1,[R6, #+0]
        CMP      R0,#+0
        STRNE    R1,[R0, #+0]
// 1453 			else bltop = bl->next;
        STREQ    R1,[R5, #+148]
// 1454 			if (bl->next) bl->next->prior = bl->prior;
        LDR      R0,[R6, #+0]
        CMP      R0,#+0
        LDRNE    R1,[R6, #+4]
        STRNE    R1,[R0, #+4]
// 1455 			mfree(bl);
        MOV      R0,R6
        SWI      +21
// 1456 			Menu_SetItemCountDyn(data, bmknum - 2);
??bmklist_menu_onkey_2:
        LDR      R0,[R5, #+108]
        SUB      R1,R0,#+2
        MOV      R0,R4
        SWI      +486
// 1457       SetCursorToMenuItem(data, 0);
        MOV      R1,#+0
        MOV      R0,R4
        SWI      +452
// 1458 		}
// 1459 	}
// 1460   return 0;
??bmklist_menu_onkey_3:
        MOV      R0,#+0
        POP      {R4-R8,PC}       ;; return
        CFI EndBlock cfiBlock112
// 1461 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock113 Using cfiCommon1
        CFI NoFunction
        THUMB
??bmklist_menu_ghook??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock113
        REQUIRE bmklist_menu_ghook
// 1462 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock114 Using cfiCommon0
        CFI Function bmklist_menu_ghook
        ARM
// 1463 void bmklist_menu_ghook(void *data, int cmd) {
bmklist_menu_ghook:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
// 1464   if (cmd == 3) {
        CMP      R1,#+3
        POPNE    {PC}
// 1465     Free_BLIST();
        BL       Free_BLIST
// 1466     //loadBuffer(curblock->offset, curblock->alen);
// 1467   }
// 1468 }
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock114

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock115 Using cfiCommon1
        CFI NoFunction
        THUMB
??bmklist_menu_iconhndl??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock115
        REQUIRE bmklist_menu_iconhndl
// 1469 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock116 Using cfiCommon0
        CFI Function bmklist_menu_iconhndl
        ARM
// 1470 void bmklist_menu_iconhndl(void *data, int curitem, void *unk) {
bmklist_menu_iconhndl:
        PUSH     {R4-R8,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R8 Frame(CFA, -8)
        CFI R7 Frame(CFA, -12)
        CFI R6 Frame(CFA, -16)
        CFI R5 Frame(CFA, -20)
        CFI R4 Frame(CFA, -24)
        CFI CFA R13+24
        MOV      R4,R0
        MOV      R5,R1
// 1471   BMKLIST *t;
// 1472   WSHDR *ws;
// 1473   void *item = AllocMenuItem(data);
        SWI      +407
        MOV      R6,R0
// 1474   t = FindBLISTtByN(curitem);
        MOV      R0,R5
        BL       FindBLISTtByN
        MOVS     R7,R0
// 1475   if (t) {
        BEQ      ??bmklist_menu_iconhndl_0
// 1476   	ws = AllocMenuWS(data, t->preview->wsbody[0]);
        LDR      R0,[R7, #+12]
        LDR      R0,[R0, #+0]
        LDRH     R1,[R0, #+0]
        MOV      R0,R4
        SWI      +408
// 1477     wstrcpy(ws, t->preview);
        LDR      R1,[R7, #+12]
        MOV      R8,R0
        SWI      +287
        B        ??bmklist_menu_iconhndl_1
// 1478   }
// 1479   else {
// 1480     ws = AllocMenuWS(data, 10);
??bmklist_menu_iconhndl_0:
        MOV      R1,#+10
        MOV      R0,R4
        SWI      +408
// 1481     wsprintf(ws, "error");
        LDR      R1,??bmklist_menu_iconhndl_2  ;; `?<Constant "error">`
        MOV      R8,R0
        SWI      +292
// 1482   }
// 1483   //SetMenuItemIconArray(data, item, S_ICONS);
// 1484   SetMenuItemText(data, item, ws, curitem);
??bmklist_menu_iconhndl_1:
        MOV      R3,R5
        MOV      R2,R8
        MOV      R1,R6
        MOV      R0,R4
        SWI      +410
// 1485   SetMenuItemIcon(data, curitem, 0);
        MOV      R2,#+0
        MOV      R1,R5
        MOV      R0,R4
        SWI      +405
// 1486 }
        POP      {R4-R8,PC}       ;; return
        DATA
??bmklist_menu_iconhndl_2:
        DC32     `?<Constant "error">`
        CFI EndBlock cfiBlock116

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock117 Using cfiCommon1
        CFI NoFunction
        THUMB
??create_menu_bookmark??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock117
        REQUIRE create_menu_bookmark

        RSEG DATA_I:DATA:SORT:NOROOT(2)
inp_desc:
        DS8 56
        REQUIRE `?<Initializer for inp_desc>`
showinfo:
        DS8 2
        REQUIRE `?<Initializer for showinfo>`
        DS8 2
Quit_Required:
        DS8 4
        REQUIRE `?<Initializer for Quit_Required>`
fileindex:
        DS8 4
        REQUIRE `?<Initializer for fileindex>`
curblock:
        DS8 4
        REQUIRE `?<Initializer for curblock>`
buff:
        DS8 4
        REQUIRE `?<Initializer for buff>`
codetype:
        DS8 4
        REQUIRE `?<Initializer for codetype>`
buffloaded:
        DS8 4
        REQUIRE `?<Initializer for buffloaded>`
fd:
        DS8 4
        REQUIRE `?<Initializer for fd>`
foffset:
        DS8 4
        REQUIRE `?<Initializer for foffset>`
rlen:
        DS8 4
        REQUIRE `?<Initializer for rlen>`
llen:
        DS8 4
        REQUIRE `?<Initializer for llen>`
bmkfd:
        DS8 4
        REQUIRE `?<Initializer for bmkfd>`
bookmark:
        DS8 4
        REQUIRE `?<Initializer for bookmark>`
bmknum:
        DS8 4
        REQUIRE `?<Initializer for bmknum>`
winx:
        DS8 4
        REQUIRE `?<Initializer for winx>`
winy:
        DS8 4
        REQUIRE `?<Initializer for winy>`
winw:
        DS8 4
        REQUIRE `?<Initializer for winw>`
winh:
        DS8 4
        REQUIRE `?<Initializer for winh>`
viewlen:
        DS8 4
        REQUIRE `?<Initializer for viewlen>`
bytelen:
        DS8 4
        REQUIRE `?<Initializer for bytelen>`
viewpos:
        DS8 4
        REQUIRE `?<Initializer for viewpos>`
viewrow:
        DS8 4
        REQUIRE `?<Initializer for viewrow>`
sbw:
        DS8 4
        REQUIRE `?<Initializer for sbw>`
bltop:
        DS8 4
        REQUIRE `?<Initializer for bltop>`
header:
        DS8 128
        REQUIRE `?<Initializer for header>`
procfile:
        DS8 128
        REQUIRE `?<Initializer for procfile>`
ul:
        DS8 4
        REQUIRE `?<Initializer for ul>`
inp_hdr:
        DS8 20
        REQUIRE `?<Initializer for inp_hdr>`
filelist_HDR:
        DS8 20
        REQUIRE `?<Initializer for filelist_HDR>`
filelist_STRUCT:
        DS8 44
        REQUIRE `?<Initializer for filelist_STRUCT>`
// 1487 
// 1488 HEADER_DESC bmklist_HDR = {0, 0, 0, 0, 0, (int)header, LGP_NULL};
bmklist_HDR:
        DS8 20
        REQUIRE `?<Initializer for bmklist_HDR>`
// 1489 
// 1490 MENU_DESC bmklist_STRUCT = {
bmklist_STRUCT:
        DS8 44
        REQUIRE `?<Initializer for bmklist_STRUCT>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
menusoftkeys:
        DS8 12
        REQUIRE `?<Initializer for menusoftkeys>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
menu_sk:
        DS8 24
        REQUIRE `?<Initializer for menu_sk>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
menu_skt:
        DS8 8
        REQUIRE `?<Initializer for menu_skt>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
mainmenu_ITEMS:
        DS8 252
        REQUIRE `?<Initializer for mainmenu_ITEMS>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
mainmenu_HDR:
        DS8 20
        REQUIRE `?<Initializer for mainmenu_HDR>`
mainmenu_STRUCT:
        DS8 44
        REQUIRE `?<Initializer for mainmenu_STRUCT>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
gotomenu_ITEMS:
        DS8 140
        REQUIRE `?<Initializer for gotomenu_ITEMS>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
gotomenu_HDR:
        DS8 20
        REQUIRE `?<Initializer for gotomenu_HDR>`
gotomenu_STRUCT:
        DS8 44
        REQUIRE `?<Initializer for gotomenu_STRUCT>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
??sk:
        DS8 8
        REQUIRE `?<Initializer for sk>`
// 1491   8, bmklist_menu_onkey, bmklist_menu_ghook, NULL,
// 1492   menusoftkeys,
// 1493   &menu_skt,
// 1494   1 + 0x10,
// 1495   bmklist_menu_iconhndl,
// 1496   NULL,   //Items
// 1497   NULL,   //Procs
// 1498   0   //n
// 1499 };
// 1500 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock118 Using cfiCommon0
        CFI Function create_menu_bookmark
        ARM
// 1501 int create_menu_bookmark(void) {
create_menu_bookmark:
        PUSH     {R4,R5,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
// 1502   Free_BLIST();
// 1503   Fill_BLIST();
// 1504   strncpy(header, "Bookmarks", 10);
        LDR      R4,??DataTable49  ;; inp_desc
        BL       Free_BLIST
        BL       Fill_BLIST
        LDR      R1,??create_menu_bookmark_0  ;; `?<Constant "Bookmarks">`
        MOV      R2,#+10
        ADD      R0,R4,#+152
        SWI      +278
// 1505   patch_header(&bmklist_HDR);
        MOV      R5,#+496
        ADD      R0,R5,R4
        _BLF     patch_header,??patch_header??rA
// 1506   int n = bmknum - 2;
        LDR      R0,[R4, #+108]
// 1507   if (n < 0) n = 0;
// 1508 	return CreateMenu(0, 0, &bmklist_STRUCT, &bmklist_HDR, 0, n, 0, 0);
        MOV      R1,#+0
        SUBS     R0,R0,#+2
        MOVMI    R0,#+0
        PUSH     {R1}
        CFI CFA R13+16
        PUSH     {R1}
        CFI CFA R13+20
        PUSH     {R0}
        CFI CFA R13+24
        ADD      R3,R5,R4
        ADD      R2,R4,#+516
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+28
        SWI      +338
        ADD      SP,SP,#+16
        CFI CFA R13+12
        POP      {R4,R5,PC}       ;; return
        DATA
??create_menu_bookmark_0:
        DC32     `?<Constant "Bookmarks">`
        CFI EndBlock cfiBlock118
// 1509 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock119 Using cfiCommon1
        CFI NoFunction
        THUMB
??method0??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock119
        REQUIRE method0
// 1510 /*
// 1511 ===============================
// 1512             end
// 1513 ===============================
// 1514 */
// 1515 
// 1516 
// 1517 /*
// 1518 ===============================
// 1519             GUI
// 1520 ===============================
// 1521 */
// 1522 const int minus11 = -11;
// 1523 const RECT Canvas = {0, 0, 0, 0};   //窗口
// 1524 
// 1525 typedef struct {
// 1526   GUI gui;
// 1527   //  WSHDR *ws1;
// 1528   //  WSHDR *ws2;
// 1529   //  int i1;
// 1530 } MAIN_GUI;
// 1531 
// 1532 typedef struct {
// 1533   CSM_RAM csm;
// 1534   int gui_id;
// 1535 } MAIN_CSM;
// 1536 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock120 Using cfiCommon0
        CFI Function method0
        ARM
// 1537 void method0(MAIN_GUI *data) {
method0:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
// 1538   if (data->gui.state == 2) {
        LDRB     R0,[R0, #+12]
        CMP      R0,#+2
        POPNE    {PC}
// 1539     DrawScreen();
        BL       DrawScreen
// 1540   }
// 1541 }
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock120

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock121 Using cfiCommon1
        CFI NoFunction
        THUMB
??method1??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock121
        REQUIRE method1
// 1542 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock122 Using cfiCommon0
        CFI Function method1
        ARM
// 1543 void method1(MAIN_GUI *data, void *(*malloc_adr)(int)) {
// 1544   data->gui.state = 1;
method1:
        MOV      R1,#+1
        STRB     R1,[R0, #+12]
// 1545 }
        BX       LR               ;; return
        CFI EndBlock cfiBlock122

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock123 Using cfiCommon1
        CFI NoFunction
        THUMB
??method2??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock123
        REQUIRE method2
// 1546 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock124 Using cfiCommon0
        CFI Function method2
        ARM
// 1547 void method2(MAIN_GUI *data, void (*mfree_adr)(void *)) {
// 1548   data->gui.state = 0;
method2:
        MOV      R1,#+0
        STRB     R1,[R0, #+12]
// 1549 }
        BX       LR               ;; return
        CFI EndBlock cfiBlock124

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock125 Using cfiCommon1
        CFI NoFunction
        THUMB
??method3??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock125
        REQUIRE method3
// 1550 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock126 Using cfiCommon0
        CFI Function method3
        ARM
// 1551 void method3(MAIN_GUI *data, void *(*malloc_adr)(int), void (*mfree_adr)(void *)) {
method3:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        MOV      R4,R0
// 1552   DisableIDLETMR();
        SWI      +383
// 1553   data->gui.state = 2;
        MOV      R0,#+2
        STRB     R0,[R4, #+12]
// 1554 }
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock126

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock127 Using cfiCommon1
        CFI NoFunction
        THUMB
??method4??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock127
        REQUIRE method4
// 1555 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock128 Using cfiCommon0
        CFI Function method4
        ARM
// 1556 void method4(MAIN_GUI *data, void (*mfree_adr)(void *)) {
// 1557   if (data->gui.state != 2) return;
method4:
        LDRB     R1,[R0, #+12]
        CMP      R1,#+2
// 1558   data->gui.state = 1;
        MOVEQ    R1,#+1
        STRBEQ   R1,[R0, #+12]
// 1559 }
        BX       LR               ;; return
        CFI EndBlock cfiBlock128

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock129 Using cfiCommon1
        CFI NoFunction
        THUMB
??method7??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock129
        REQUIRE method7
// 1560 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock130 Using cfiCommon0
        CFI Function method7
        ARM
// 1561 void method7(MAIN_GUI *data, void (*mfree_adr)(void *)) {
// 1562   kill_data(data, mfree_adr);
method7:
        _BF      kill_data,??kill_data??rA  ;; tailcall
        CFI EndBlock cfiBlock130
// 1563   //  mfree_adr(data);
// 1564 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock131 Using cfiCommon1
        CFI NoFunction
        THUMB
??method8??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock131
        REQUIRE method8
// 1565 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock132 Using cfiCommon0
        CFI Function method8
        ARM
// 1566 int method8(void){return 0;}
method8:
        MOV      R0,#+0
        BX       LR               ;; return
        CFI EndBlock cfiBlock132

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock133 Using cfiCommon1
        CFI NoFunction
        THUMB
??method9??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock133
        REQUIRE method9
// 1567 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock134 Using cfiCommon0
        CFI Function method9
        ARM
// 1568 int method9(void){return 0;}
method9:
        MOV      R0,#+0
        BX       LR               ;; return
        CFI EndBlock cfiBlock134

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock135 Using cfiCommon1
        CFI NoFunction
        THUMB
??method5??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock135
        REQUIRE method5
// 1569 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock136 Using cfiCommon0
        CFI Function method5
        ARM
// 1570 int method5(MAIN_GUI *data, GUI_MSG *msg) {
method5:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
// 1571   int result = 0;
// 1572   if (msg->gbsmsg->msg == KEY_DOWN || msg->gbsmsg->msg == LONG_PRESS) {
        LDR      R0,[R1, #+4]
        MOV      R2,#+147
        LDR      R1,[R0, #+4]
        ORR      R2,R2,#0x100
        CMP      R1,R2
        ADDNE    R2,R2,#+2
        CMPNE    R1,R2
        BNE      ??method5_1
// 1573     switch(msg->gbsmsg->submess) {
        LDR      R4,??DataTable49  ;; inp_desc
        LDR      R0,[R0, #+8]
        LDR      R1,[R4, #+140]
        MOV      R2,#+1
        SUB      R0,R0,#+1
        CMP      R0,#+61
        BHI      ??method5_1
        ADR      R3,??method5_0
        LDRB     R3,[R3, R0]
        ADD      PC,PC,R3, LSL #+2
        DATA
??method5_0:
        DC8      +20,+16,+16,+23
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+18,+15
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+16,+16,+16
        DC8      +16,+25,+52,+52
        DC8      +70,+75,+77,+77
        DC8      +16,+16,+25,+77
        DC8      +52,+75,+0,+0
        ARM
// 1574     case RED_BUTTON:
// 1575       Quit_Required = 1;
??method5_2:
        STR      R2,[R4, #+60]
// 1576       /*result = 1;*/
// 1577       break;
// 1578     case GREEN_BUTTON:
// 1579     	LaunchEditor();
// 1580     	break;
// 1581     case ENTER_BUTTON:
// 1582     	break;
// 1583     case LEFT_SOFT:
// 1584     	create_menu_goto();
// 1585     	break;
// 1586     case RIGHT_SOFT:
// 1587       create_menu_main();
// 1588       break;
// 1589     case '2': case UP_BUTTON:
// 1590     	rowFluctuate(-1);
// 1591     	if (bmknum > 1) {
// 1592     		int offset = viewpos + curblock->offset;
// 1593     		bookmark[0] = offset;
// 1594     		if (offset > bookmark[1]) bookmark[1] = offset;
// 1595     		writeAddrInt(procfile, &bmkfd, &ul, bookmark, bmknum, acbm);
// 1596     	}
// 1597     	REDRAW();
// 1598     	break;
// 1599     case VOL_UP_BUTTON:
// 1600     case '1':
// 1601     	break;
// 1602     case '3':
// 1603     case '4': case LEFT_BUTTON:
// 1604       rowFluctuate(1 - viewrow);
// 1605       if (bookmark && bmknum > 1) {
// 1606     		int offset = viewpos + curblock->offset;
// 1607     		bookmark[0] = offset;
// 1608     		if (offset > bookmark[1]) bookmark[1] = offset;
// 1609     		writeAddrInt(procfile, &bmkfd, &ul, bookmark, bmknum, acbm);
// 1610     	}
// 1611       REDRAW();
// 1612       break;
// 1613     case '5':
// 1614     	showinfo = !showinfo;
// 1615     	//DrawInfoDialog();
// 1616     	break;
// 1617     case '6': case RIGHT_BUTTON:
// 1618       rowFluctuate(viewrow - 1);
// 1619       if (bookmark && bmknum > 1) {
// 1620     		int offset = viewpos + curblock->offset;
// 1621     		bookmark[0] = offset;
// 1622     		if (offset > bookmark[1]) bookmark[1] = offset;
// 1623     		writeAddrInt(procfile, &bmkfd, &ul, bookmark, bmknum, acbm);
// 1624     	}
// 1625       REDRAW();
// 1626       break;
// 1627     case '7':
// 1628     case '8': case DOWN_BUTTON:
// 1629       rowFluctuate(1);
// 1630       if (bookmark && bmknum > 1) {
// 1631     		int offset = viewpos + curblock->offset;
// 1632     		bookmark[0] = offset;
// 1633     		if (offset > bookmark[1]) bookmark[1] = offset;
// 1634     		writeAddrInt(procfile, &bmkfd, &ul, bookmark, bmknum, acbm);
// 1635     	}
// 1636       REDRAW();
// 1637       break;
// 1638     case '9':
// 1639     case '0':      
// 1640     case '*':
// 1641       break;
// 1642     case '#':
// 1643       break;
// 1644     default:
// 1645       break;
// 1646     }
// 1647     return result;
??method5_1:
        MOV      R0,#+0
        POP      {R4,PC}          ;; return
??method5_3:
        BL       LaunchEditor
        B        ??method5_4
??method5_5:
        BL       create_menu_goto
??method5_4:
        MOV      R0,#+0
        POP      {R4,PC}
??method5_6:
        BL       create_menu_main
        B        ??method5_4
??method5_7:
        RSB      R0,R2,#+0
        BL       rowFluctuate
        LDR      R0,[R4, #+108]
        CMP      R0,#+2
        BLT      ??method5_8
        LDR      R1,[R4, #+68]
        LDR      R0,[R4, #+136]
        LDR      R1,[R1, #+8]
        ADD      R0,R1,R0
        LDR      R1,[R4, #+104]
        STR      R0,[R1, #+0]
        LDR      R2,[R1, #+4]
        CMP      R2,R0
        STRLT    R0,[R1, #+4]
??method5_9:
        LDR      R0,??DataTable45  ;; acbm
        ADD      R2,R4,#+408
        LDR      R0,[R0, #+0]
        ADD      R1,R4,#+100
        PUSH     {R0}
        CFI CFA R13+12
        LDR      R0,[R4, #+108]
        PUSH     {R0}
        CFI CFA R13+16
        LDR      R3,[R4, #+104]
        ADD      R0,R4,#+280
        _BLF     writeAddrInt,??writeAddrInt??rA
        ADD      SP,SP,#+8
        CFI CFA R13+8
??method5_8:
        SWI      +370
        B        ??method5_4
??method5_10:
        RSB      R0,R1,#+1
??method5_11:
        BL       rowFluctuate
        LDR      R0,[R4, #+104]
        CMP      R0,#+0
        BEQ      ??method5_8
        LDR      R1,[R4, #+108]
        CMP      R1,#+2
        BLT      ??method5_8
        LDR      R2,[R4, #+68]
        LDR      R1,[R4, #+136]
        LDR      R2,[R2, #+8]
        ADD      R1,R2,R1
        STR      R1,[R0, #+0]
        LDR      R2,[R0, #+4]
        CMP      R2,R1
        BGE      ??method5_9
        STR      R1,[R0, #+4]
        B        ??method5_9
??method5_12:
        LDRSH    R0,[R4, #+56]
        CMP      R0,#+0
        MOVNE    R2,#+0
        STRH     R2,[R4, #+56]
        B        ??method5_4
??method5_13:
        SUB      R0,R1,#+1
        B        ??method5_11
??method5_14:
        MOV      R0,#+1
        B        ??method5_11
        CFI EndBlock cfiBlock136
// 1648   }
// 1649   return 0;
// 1650 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable45:
        DC32     acbm

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock137 Using cfiCommon1
        CFI NoFunction
        THUMB
??maincsm_oncreate??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock137
        REQUIRE maincsm_oncreate
// 1651 
// 1652 const void * const gui_methods[11] = {
// 1653   (void *)method0,	//Redraw
// 1654   (void *)method1,	//Create
// 1655   (void *)method2,	//Close
// 1656   (void *)method3,	//Focus
// 1657   (void *)method4,	//Unfocus
// 1658   (void *)method5,	//OnKey
// 1659   0,
// 1660   (void *)method7,	//Destroy
// 1661   (void *)method8,
// 1662   (void *)method9,
// 1663   0
// 1664 };
// 1665 /*
// 1666 ===============================
// 1667             end
// 1668 ===============================
// 1669 */
// 1670 
// 1671 
// 1672 /*
// 1673 ===============================
// 1674             CSM
// 1675 ===============================
// 1676 */

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
// 1677 unsigned short maincsm_name_body[140];
maincsm_name_body:
        DS8 280

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock138 Using cfiCommon0
        CFI Function maincsm_oncreate
        ARM
// 1678 void maincsm_oncreate(CSM_RAM *data) {
maincsm_oncreate:
        PUSH     {R4-R6,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R6 Frame(CFA, -8)
        CFI R5 Frame(CFA, -12)
        CFI R4 Frame(CFA, -16)
        CFI CFA R13+16
        MOV      R4,R0
// 1679   
// 1680   MAIN_GUI *main_gui = malloc(sizeof (MAIN_GUI));
        MOV      R0,#+52
        SWI      +20
        MOV      R5,R0
// 1681   MAIN_CSM *csm = (MAIN_CSM *) data;
// 1682   zeromem(main_gui, sizeof (MAIN_GUI));
        MOV      R1,#+52
        SWI      +285
// 1683   patch_rect((RECT*)&Canvas, 0, 0, ScreenW() - 1, ScreenH() - 1);
        SWI      +33161
        MOV      R6,R0
        SWI      +33160
        LDR      R2,??maincsm_oncreate_0  ;; Canvas
        SUB      R1,R6,#+1
        SUB      R0,R0,#+1
        MOV      R6,#+0
        STR      R6,[R2, #+0]
        STRH     R0,[R2, #+4]
        STRH     R1,[R2, #+6]
// 1684   main_gui->gui.canvas = (void *)(&Canvas);
        STR      R2,[R5, #+0]
// 1685   main_gui->gui.flag30 = 2;
        MOV      R0,#+2
        STR      R0,[R5, #+48]
// 1686   main_gui->gui.methods = (void *)gui_methods;
        ADD      R0,R2,#+8
        STR      R0,[R5, #+4]
// 1687   main_gui->gui.item_ll.data_mfree = (void (*)(void *))mfree_adr();
        SWI      +32789
        STR      R0,[R5, #+32]
// 1688   csm->csm.state = 0;
        STR      R6,[R4, #+16]
// 1689   csm->csm.unk1 = 0;
        STR      R6,[R4, #+20]
// 1690   csm->gui_id = CreateGUI(main_gui);
        MOV      R0,R5
        SWI      +311
        STR      R0,[R4, #+40]
// 1691 }
        POP      {R4-R6,PC}       ;; return
        DATA
??maincsm_oncreate_0:
        DC32     Canvas
        CFI EndBlock cfiBlock138

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock139 Using cfiCommon1
        CFI NoFunction
        THUMB
??maincsm_onclose??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock139
        REQUIRE maincsm_onclose
// 1692 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock140 Using cfiCommon0
        CFI Function maincsm_onclose
        ARM
// 1693 void maincsm_onclose(CSM_RAM *csm) {
// 1694   SUBPROC((void *)ElfKiller);
maincsm_onclose:
        LDR      R0,??maincsm_onclose_0  ;; ElfKiller
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
        SWI      +369
// 1695 }
        POP      {PC}             ;; return
        DATA
??maincsm_onclose_0:
        DC32     ElfKiller
        CFI EndBlock cfiBlock140

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock141 Using cfiCommon1
        CFI NoFunction
        THUMB
??maincsm_onmessage??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock141
        REQUIRE maincsm_onmessage
// 1696 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock142 Using cfiCommon0
        CFI Function maincsm_onmessage
        ARM
// 1697 int maincsm_onmessage(CSM_RAM *data, GBS_MSG *msg) {
maincsm_onmessage:
        PUSH     {R4-R6,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R6 Frame(CFA, -8)
        CFI R5 Frame(CFA, -12)
        CFI R4 Frame(CFA, -16)
        CFI CFA R13+16
// 1698   MAIN_CSM *csm = (MAIN_CSM *) data;
// 1699   
// 1700   if (Quit_Required) {
        LDR      R5,??DataTable49  ;; inp_desc
        MOV      R4,R0
        LDR      R0,[R5, #+60]
        MOV      R6,R1
        CMP      R0,#+0
        BEQ      ??maincsm_onmessage_0
// 1701     fclose(fd, &ul);
        LDR      R0,[R5, #+84]
        ADD      R1,R5,#+408
        SWI      +13
// 1702     GeneralFuncF1(1);
        MOV      R0,#+1
        SWI      +315
// 1703   }
// 1704   
// 1705   if (msg->msg == MSG_GUI_DESTROYED) {
??maincsm_onmessage_0:
        LDR      R0,[R6, #+4]
        MOV      R1,#+14
        ORR      R1,R1,#0x6400
        CMP      R0,R1
        BNE      ??maincsm_onmessage_1
// 1706     if ((int)msg->data0 == csm->gui_id) {
        LDR      R0,[R6, #+12]
        LDR      R1,[R4, #+40]
        CMP      R0,R1
        BNE      ??maincsm_onmessage_2
// 1707       csm->csm.state = -3;
        MVN      R0,#+2
        STR      R0,[R4, #+16]
        MOV      R0,#+1
        POP      {R4-R6,PC}
// 1708     }
// 1709   }
// 1710   
// 1711   else if (msg->msg == MSG_RECONFIGURE_REQ) {
??maincsm_onmessage_1:
        MOV      R1,#+175
        ORR      R1,R1,#0xDE00
        CMP      R0,R1
        BNE      ??maincsm_onmessage_2
// 1712   	LockSched();
        SWI      +326
// 1713 		InitSettings();
        BL       InitSettings
// 1714 		if (buffloaded && charset != codetype) {
        LDR      R0,[R5, #+80]
        CMP      R0,#+0
        BEQ      ??maincsm_onmessage_3
        LDR      R0,??DataTable47  ;; charset
        LDR      R1,[R5, #+76]
        LDR      R0,[R0, #+0]
        CMP      R0,R1
        BEQ      ??maincsm_onmessage_3
// 1715 			KillIndex();
        BL       KillIndex
// 1716 			if (createIndex()) {
        BL       createIndex
        CMP      R0,#+0
        BEQ      ??maincsm_onmessage_3
// 1717 				curblock = fileindex->next;
        LDR      R0,[R5, #+64]
        LDR      R0,[R0, #+0]
        STR      R0,[R5, #+68]
// 1718 				loadBuffer();
        BL       loadBuffer
// 1719 				viewpos = 0;
        MOV      R0,#+0
        STR      R0,[R5, #+136]
// 1720 			}
// 1721 		}
// 1722 		UnlockSched();
??maincsm_onmessage_3:
        SWI      +327
// 1723     RefreshGUI();
        SWI      +406
// 1724   }
// 1725   return 1;
??maincsm_onmessage_2:
        MOV      R0,#+1
        POP      {R4-R6,PC}       ;; return
        CFI EndBlock cfiBlock142
// 1726 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable47:
        DC32     charset

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock143 Using cfiCommon1
        CFI NoFunction
        THUMB
??UpdateCSMname??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock143
        REQUIRE UpdateCSMname

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Root">`:
        DATA
        DC8 "Root"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Send SMS...">`:
        DATA
        DC8 "Send SMS..."

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Edit...">`:
        DATA
        DC8 "Edit..."

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Go to...">`:
        DATA
        DC8 "Go to..."
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "bookmark...">`:
        DATA
        DC8 "bookmark..."

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Back">`:
        DATA
        DC8 "Back"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Unkonwn code type!">`:
        DATA
        DC8 "Unkonwn code type!"
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Select">`:
        DATA
        DC8 "Select"
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "error">`:
        DATA
        DC8 "error"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Bookmarks">`:
        DATA
        DC8 "Bookmarks"
        DC8 0, 0
// 1727 
// 1728 const struct {
// 1729   CSM_DESC maincsm;
// 1730   WSHDR maincsm_name;

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "SieTxtView">`:
        DATA
        DC8 "SieTxtView"
        DC8 0
        DC8 "Alloc memory error!"
// 1731 } MAINCSM = {
MAINCSM:
        DC32 maincsm_onmessage, maincsm_oncreate, 0, 0, 0, 0, maincsm_onclose
        DC32 44, 1, minus11, maincsm_name_body, 55AACCCCH, 3333AA55H, 0, 139

        RSEG DATA_C:CONST:SORT:NOROOT(0)
        DATA
        DC8 "%d"

        RSEG DATA_C:CONST:SORT:NOROOT(0)
        DATA
        DC8 "?"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
back:
        DATA
        DC8 ".."
        DC8 0
        DC8 "ROOT"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Save">`:
        DATA
        DC8 "Save"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "File failed!">`:
        DATA
        DC8 "File failed!"
        DC8 0, 0, 0
        DC8 ".temp"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Load bookmark failed!">`:
        DATA
        DC8 "Load bookmark failed!"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Siemens Text Viewer v...">`:
        DATA
        DC8 "Siemens Text Viewer v0.3f\012by HanikLZ\0122007"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "0:\\\\ZBin\\\\etc\\\\SieTxtVie...">`:
        DATA
        DC8 "0:\\ZBin\\etc\\SieTxtView.bcfg"
        DC8 "4:\\ZBin\\etc\\SieTxtView.bcfg"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "%d%d%d.%d%c %d%d:%d%d">`:
        DATA
        DC8 "%d%d%d.%d%c %d%d:%d%d"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "no buff?">`:
        DATA
        DC8 "no buff?"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Open...">`:
        DATA
        DC8 "Open..."

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "0:\\\\test.log">`:
        DATA
        DC8 "0:\\test.log"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Edit">`:
        DATA
        DC8 "Edit"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Bookmark...">`:
        DATA
        DC8 "Bookmark..."

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Random position">`:
        DATA
        DC8 "Random position"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "End">`:
        DATA
        DC8 "End"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Readed">`:
        DATA
        DC8 "Readed"
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Start">`:
        DATA
        DC8 "Start"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Main Menu">`:
        DATA
        DC8 "Main Menu"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Search...">`:
        DATA
        DC8 "Search..."
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Quit">`:
        DATA
        DC8 "Quit"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Help">`:
        DATA
        DC8 "Help"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Set...">`:
        DATA
        DC8 "Set..."
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
mainmenu_HNDLS:
        DATA
        DC32 mainmenu_open, mainmenu_add2bmk, mainmenu_search, mainmenu_goto
        DC32 mainmenu_edit, mainmenu_sendsms, mainmenu_set, mainmenu_help
        DC32 mainmenu_quit

        RSEG DATA_C:CONST:SORT:NOROOT(2)
gotomenu_HNDLS:
        DATA
        DC32 gotomenu_start, gotomenu_readed, gotomenu_end, gotomenu_random
        DC32 gotomenu_bookmark

        RSEG DATA_C:CONST:SORT:NOROOT(2)
minus11:
        DATA
        DC32 -11

        RSEG DATA_C:CONST:SORT:NOROOT(2)
Canvas:
        DATA
        DC16 0, 0, 0, 0
gui_methods:
        DC32 method0, method1, method2, method3, method4, method5, 0H, method7
        DC32 method8, method9, 0H
// 1732   {
// 1733     maincsm_onmessage,
// 1734     maincsm_oncreate,
// 1735     #ifdef NEWSGOLD
// 1736     0,
// 1737     0,
// 1738     0,
// 1739     0,
// 1740     #endif
// 1741     maincsm_onclose,
// 1742     sizeof(MAIN_CSM),
// 1743     1,
// 1744     &minus11
// 1745   },
// 1746   {
// 1747     maincsm_name_body,
// 1748     NAMECSM_MAGIC1,
// 1749     NAMECSM_MAGIC2,
// 1750     0x0,
// 1751     139
// 1752   }
// 1753 };
// 1754 
// 1755 //更新进程名称

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock144 Using cfiCommon0
        CFI Function UpdateCSMname
        ARM
// 1756 void UpdateCSMname(void) {
// 1757   wsprintf((WSHDR *)(&MAINCSM.maincsm_name), "SieTxtView");
UpdateCSMname:
        LDR      R0,??DataTable50  ;; `?<Constant "SieTxtView">`
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
        MOV      R1,R0
        ADD      R0,R0,#+72
        SWI      +292
// 1758   
// 1759   /*
// 1760   //中文名
// 1761   char csmname[] = {0};
// 1762   str2ws_unicode((WSHDR *)(&MAINCSM.maincsm_name), csmname);
// 1763   */
// 1764 }
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock144

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock145 Using cfiCommon1
        CFI NoFunction
        THUMB
??main??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock145
        REQUIRE main
// 1765 /*
// 1766 ===============================
// 1767            end
// 1768 ===============================
// 1769 */
// 1770 
// 1771 /*
// 1772 ===============================
// 1773           程序入口
// 1774 ===============================
// 1775 */

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock146 Using cfiCommon0
        CFI Function main
        ARM
// 1776 int main(char *exename, char *fname) {
main:
        PUSH     {R4-R7,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R7 Frame(CFA, -8)
        CFI R6 Frame(CFA, -12)
        CFI R5 Frame(CFA, -16)
        CFI R4 Frame(CFA, -20)
        CFI CFA R13+20
        SUB      SP,SP,#+60
        CFI CFA R13+80
        MOV      R4,R1
// 1777 
// 1778   TDate d;
// 1779   TTime t;
// 1780   GetDateTime(&d, &t);
        ADD      R1,SP,#+8
// 1781   srand((unsigned int)(d.year + d.month + d.day + t.hour + t.min + t.sec));
// 1782   //打开文件
// 1783   buff = malloc(BUF_LEN);
        LDR      R5,??DataTable49  ;; inp_desc
// 1784   if (!buff) {
        LDR      R6,??DataTable50  ;; `?<Constant "SieTxtView">`
        MOV      R0,SP
        SWI      +180
        LDRB     R1,[SP, #+4]
        LDR      R0,[SP, #+0]
        ADD      R0,R1,R0
        LDRB     R1,[SP, #+5]
        ADD      R0,R1,R0
        LDRB     R1,[SP, #+8]
        ADD      R0,R1,R0
        LDRB     R1,[SP, #+9]
        ADD      R0,R1,R0
        LDRB     R1,[SP, #+10]
        ADD      R0,R1,R0
        SWI      +518
        MOV      R0,#+32768
        SWI      +20
        STR      R0,[R5, #+72]
        CMP      R0,#+0
        BNE      ??main_0
// 1785   	ShowMSG(1, (int)"Alloc memory error!");
        ADD      R1,R6,#+12
        MOV      R0,#+1
        SWI      +328
// 1786   	return 0;
        MOV      R0,#+0
        ADD      SP,SP,#+60
        CFI CFA R13+20
        POP      {R4-R7,PC}
        CFI CFA R13+80
// 1787 	}
// 1788 	
// 1789   if (fname && strlen(fname) < 128)
??main_0:
        MOV      R7,#+280
        CMP      R4,#+0
        BEQ      ??main_1
        MOV      R0,R4
        SWI      +27
        CMP      R0,#+128
// 1790     strcpy(procfile, fname);
        MOVCC    R1,R4
        BCC      ??main_2
// 1791   else
// 1792     strcpy(procfile, LAST);
??main_1:
        LDR      R1,??main_3      ;; LAST
??main_2:
        ADD      R0,R7,R5
        SWI      +26
// 1793   
// 1794 	if (!loadFile(procfile)) adjustWindowsSize();
        ADD      R0,R7,R5
        BL       loadFile
        CMP      R0,#+0
        BNE      ??main_4
        BL       adjustWindowsSize
// 1795   char dummy[sizeof(MAIN_CSM)];
// 1796   LockSched();
??main_4:
        SWI      +326
// 1797   CreateCSM(&MAINCSM.maincsm, dummy, 0);
        MOV      R2,#+0
        ADD      R1,SP,#+16
        ADD      R0,R6,#+32
        SWI      +263
// 1798   UnlockSched();
        SWI      +327
// 1799   UpdateCSMname();
        BL       UpdateCSMname
// 1800 
// 1801 	//fclose(fd, &ul);}
// 1802   return 1;
        MOV      R0,#+1
        ADD      SP,SP,#+60
        CFI CFA R13+20
        POP      {R4-R7,PC}       ;; return
        DATA
??main_3:
        DC32     LAST
        CFI EndBlock cfiBlock146
// 1803  
// 1804 }

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable49:
        DC32     inp_desc

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable50:
        DC32     `?<Constant "SieTxtView">`

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock147 Using cfiCommon0
        CFI NoFunction
        ARM
??utf82unicode??rA:
        LDR      R12,??Subroutine73_0  ;; utf82unicode
        BX       R12
        DATA
??Subroutine73_0:
        DC32     utf82unicode
        CFI EndBlock cfiBlock147

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock148 Using cfiCommon0
        CFI NoFunction
        ARM
??gb2unicode??rA:
        LDR      R12,??Subroutine74_0  ;; gb2unicode
        BX       R12
        DATA
??Subroutine74_0:
        DC32     gb2unicode
        CFI EndBlock cfiBlock148

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock149 Using cfiCommon0
        CFI NoFunction
        ARM
??unicodeSwitch??rA:
        LDR      R12,??Subroutine75_0  ;; unicodeSwitch
        BX       R12
        DATA
??Subroutine75_0:
        DC32     unicodeSwitch
        CFI EndBlock cfiBlock149

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock150 Using cfiCommon0
        CFI NoFunction
        ARM
??getCodeType??rA:
        LDR      R12,??Subroutine76_0  ;; getCodeType
        BX       R12
        DATA
??Subroutine76_0:
        DC32     getCodeType
        CFI EndBlock cfiBlock150

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock151 Using cfiCommon0
        CFI NoFunction
        ARM
??readAddrInt??rA:
        LDR      R12,??Subroutine77_0  ;; readAddrInt
        BX       R12
        DATA
??Subroutine77_0:
        DC32     readAddrInt
        CFI EndBlock cfiBlock151

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock152 Using cfiCommon0
        CFI NoFunction
        ARM
??InitConfig??rA:
        LDR      R12,??Subroutine78_0  ;; InitConfig
        BX       R12
        DATA
??Subroutine78_0:
        DC32     InitConfig
        CFI EndBlock cfiBlock152

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock153 Using cfiCommon0
        CFI NoFunction
        ARM
??kill_data??rA:
        LDR      R12,??Subroutine79_0  ;; kill_data
        BX       R12
        DATA
??Subroutine79_0:
        DC32     kill_data
        CFI EndBlock cfiBlock153

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock154 Using cfiCommon0
        CFI NoFunction
        ARM
??str2ws_unicode??rA:
        LDR      R12,??Subroutine80_0  ;; str2ws_unicode
        BX       R12
        DATA
??Subroutine80_0:
        DC32     str2ws_unicode
        CFI EndBlock cfiBlock154

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock155 Using cfiCommon0
        CFI NoFunction
        ARM
??writeAddrInt??rA:
        LDR      R12,??Subroutine81_0  ;; writeAddrInt
        BX       R12
        DATA
??Subroutine81_0:
        DC32     writeAddrInt
        CFI EndBlock cfiBlock155

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock156 Using cfiCommon0
        CFI NoFunction
        ARM
??patch_header??rA:
        LDR      R12,??Subroutine82_0  ;; patch_header
        BX       R12
        DATA
??Subroutine82_0:
        DC32     patch_header
        CFI EndBlock cfiBlock156

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock157 Using cfiCommon0
        CFI NoFunction
        ARM
??Rand??rA:
        LDR      R12,??Subroutine83_0  ;; Rand
        BX       R12
        DATA
??Subroutine83_0:
        DC32     Rand
        CFI EndBlock cfiBlock157

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock158 Using cfiCommon0
        CFI NoFunction
        ARM
??ws2str_unicode??rA:
        LDR      R12,??Subroutine84_0  ;; ws2str_unicode
        BX       R12
        DATA
??Subroutine84_0:
        DC32     ws2str_unicode
        CFI EndBlock cfiBlock158

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock159 Using cfiCommon0
        CFI NoFunction
        ARM
??unicode2gb??rA:
        LDR      R12,??Subroutine85_0  ;; unicode2gb
        BX       R12
        DATA
??Subroutine85_0:
        DC32     unicode2gb
        CFI EndBlock cfiBlock159

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock160 Using cfiCommon0
        CFI NoFunction
        ARM
??unicode2utf8??rA:
        LDR      R12,??Subroutine86_0  ;; unicode2utf8
        BX       R12
        DATA
??Subroutine86_0:
        DC32     unicode2utf8
        CFI EndBlock cfiBlock160

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for inp_desc>`:
        DATA
        DC32 1, inp_onkey, inp_ghook, inp_locret, 0, menu_skt
        DC16 0, 22, 131, 153
        DC32 4, 100, 101, 0, 0, 1073741824
`?<Initializer for showinfo>`:
        DC16 0
        DC8 0, 0
`?<Initializer for Quit_Required>`:
        DC32 0
`?<Initializer for fileindex>`:
        DC8 0, 0, 0, 0
`?<Initializer for curblock>`:
        DC8 0, 0, 0, 0
`?<Initializer for buff>`:
        DC8 0, 0, 0, 0
`?<Initializer for codetype>`:
        DC32 0
`?<Initializer for buffloaded>`:
        DC32 0
`?<Initializer for fd>`:
        DC32 0
`?<Initializer for foffset>`:
        DC32 0
`?<Initializer for rlen>`:
        DC32 0
`?<Initializer for llen>`:
        DC32 0
`?<Initializer for bmkfd>`:
        DC32 0
`?<Initializer for bookmark>`:
        DC8 0, 0, 0, 0
`?<Initializer for bmknum>`:
        DC8 0, 0, 0, 0
`?<Initializer for winx>`:
        DC32 0
`?<Initializer for winy>`:
        DC32 0
`?<Initializer for winw>`:
        DC32 0
`?<Initializer for winh>`:
        DC32 0
`?<Initializer for viewlen>`:
        DC32 0
`?<Initializer for bytelen>`:
        DC32 0
`?<Initializer for viewpos>`:
        DC32 0
`?<Initializer for viewrow>`:
        DC32 0
`?<Initializer for sbw>`:
        DC8 0, 0, 0, 0
`?<Initializer for bltop>`:
        DC32 0H
`?<Initializer for header>`:
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
`?<Initializer for procfile>`:
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        DC8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
`?<Initializer for ul>`:
        DC32 0
`?<Initializer for inp_hdr>`:
        DC16 0, 0, 131, 21
        DC32 0H, `?<Constant "Edit">`, 2147483647
`?<Initializer for filelist_HDR>`:
        DC16 0, 0, 0, 0
        DC32 0H, header, 2147483647
`?<Initializer for filelist_STRUCT>`:
        DC32 8, filelist_menu_onkey, filelist_menu_ghook, 0H, menusoftkeys
        DC32 menu_skt, 16, filelist_menu_iconhndl, 0H, 0H, 0
`?<Initializer for bmklist_HDR>`:
        DC16 0, 0, 0, 0
        DC32 0H, header, 2147483647
`?<Initializer for bmklist_STRUCT>`:
        DC32 8, bmklist_menu_onkey, bmklist_menu_ghook, 0H, menusoftkeys
        DC32 menu_skt, 17, bmklist_menu_iconhndl, 0H, 0H, 0

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for menusoftkeys>`:
        DATA
        DC32 0, 1, 2

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for menu_sk>`:
        DATA
        DC16 24, 0
        DC32 `?<Constant "Select">`
        DC16 1, 0
        DC32 `?<Constant "Back">`
        DC16 61, 0
        DC32 2147467515

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for menu_skt>`:
        DATA
        DC32 menu_sk, 0

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for mainmenu_ITEMS>`:
        DATA
        DC32 0H, `?<Constant "Open...">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "bookmark...">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Search...">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Go to...">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Edit...">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Send SMS...">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Set...">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Help">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Quit">`, 2147483647, 0, 0H, 3, 1442

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for mainmenu_HDR>`:
        DATA
        DC16 0, 0, 0, 0
        DC32 0H, `?<Constant "Main Menu">`, 2147483647
`?<Initializer for mainmenu_STRUCT>`:
        DC32 8, 0H, 0H, 0H, menusoftkeys, menu_skt, 0, 0H, mainmenu_ITEMS
        DC32 mainmenu_HNDLS, 9

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for gotomenu_ITEMS>`:
        DATA
        DC32 0H, `?<Constant "Start">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Readed">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "End">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Random position">`, 2147483647, 0, 0H, 3, 1442, 0H
        DC32 `?<Constant "Bookmark...">`, 2147483647, 0, 0H, 3, 1442

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for gotomenu_HDR>`:
        DATA
        DC16 0, 0, 0, 0
        DC32 0H, `?<Constant "Go to...">`, 2147483647
`?<Initializer for gotomenu_STRUCT>`:
        DC32 8, 0H, 0H, 0H, menusoftkeys, menu_skt, 0, 0H, gotomenu_ITEMS
        DC32 gotomenu_HNDLS, 5

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for sk>`:
        DATA
        DC16 24, 0
        DC32 `?<Constant "Save">`

        RSEG INITTAB:CODE:ROOT(2)
        DATA
?init?tab?DATA_Z:
        DCD      sfe(DATA_Z) - sfb(DATA_Z), sfb(DATA_Z), sfb(DATA_Z)

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?*?DATA_ID`:

        RSEG INITTAB:CODE:ROOT(2)
        DATA
?init?tab?DATA_I:
        DCD      sfe(DATA_I) - sfb(DATA_I), sfb(DATA_I), sfb(DATA_ID)

        END
// 1805 /*
// 1806 ===============================
// 1807             end
// 1808 ===============================
// 1809 */
// 
// 10 360 bytes in segment CODE
//    645 bytes in segment DATA_C
//  1 132 bytes in segment DATA_I
//  1 132 bytes in segment DATA_ID
//    284 bytes in segment DATA_Z
//     24 bytes in segment INITTAB
// 
// 9 848 bytes of CODE  memory (+ 536 bytes shared)
// 1 777 bytes of CONST memory
// 1 416 bytes of DATA  memory
//
//Errors: none
//Warnings: 1
