//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR ARM ANSI C/C++ Compiler V4.40A/W32 EVALUATION   28/Mar/2008  19:07:29 /
// Copyright 1999-2005 IAR Systems. All rights reserved.                     /
//                                                                           /
//    Cpu mode        =  interwork                                           /
//    Endian          =  little                                              /
//    Stack alignment =  4                                                   /
//    Source file     =  E:\Ivo\arm\IVOPLAY\MAINMENU.C                       /
//    Command line    =  E:\Ivo\arm\IVOPLAY\MAINMENU.C -D X65 -lC            /
//                       E:\Ivo\arm\IVOPLAY\Release\List\ -lA                /
//                       E:\Ivo\arm\IVOPLAY\Release\List\ -o                 /
//                       E:\Ivo\arm\IVOPLAY\Release\Obj\ -s9 --no_cse        /
//                       --no_unroll --no_inline --no_code_motion --no_tbaa  /
//                       --no_clustering --no_scheduling --cpu_mode arm      /
//                       --endian little --cpu ARM926EJ-S --stack_align 4    /
//                       --interwork -e --fpu None --dlib_config             /
//                       D:\arm\ARM\LIB\dl5tpainl8n.h -I D:\arm\ARM\INC\     /
//    List file       =  E:\Ivo\arm\IVOPLAY\Release\List\MAINMENU.s79        /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME MAINMENU

        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 ??About??rT
        MULTWEAK ??CLOSECURENTCSM??rA
        MULTWEAK ??Cleaner??rT
        MULTWEAK ??CloseMAINMENU??rT
        MULTWEAK ??CreateNewPlaylist??rT
??DataTable0 EQU 0
??DataTable2 EQU 0
        MULTWEAK ??JaLiuBLiuPYVo??rT
        MULTWEAK ??ShowMainMenu??rT
        MULTWEAK ??tmenu_ghook??rT
        PUBWEAK ?init?tab?DATA_I
        PUBWEAK ?init?tab?DATA_Z
        PUBLIC About
        FUNCTION About,0601H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC Cleaner
        FUNCTION Cleaner,0201H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC CloseMAINMENU
        FUNCTION CloseMAINMENU,0201H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC CreateNewPlaylist
        FUNCTION CreateNewPlaylist,0601H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC JaLiuBLiuPYVo
        FUNCTION JaLiuBLiuPYVo,0201H
        LOCFRAME CSTACK, 4, STACK
        PUBLIC JaLiuBlIuJuliu
        PUBLIC MainMenu_ID
        PUBLIC ShowMainMenu
        FUNCTION ShowMainMenu,0201H
        LOCFRAME CSTACK, 20, STACK
        PUBLIC `data`
        PUBLIC icon_about
        PUBLIC icon_mediateka
        PUBLIC icon_new_playlist
        PUBLIC icon_playlist
        FUNCTION menuitemhandler,0603H
        LOCFRAME CSTACK, 20, STACK
        FUNCTION patch_header,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC tmenu_ghook
        FUNCTION tmenu_ghook,0603H
        LOCFRAME CSTACK, 4, STACK
        FUNCTION tmenu_keyhook,0603H
        LOCFRAME CSTACK, 8, STACK
        
        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 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 cfiCommon0
        
        
        CFI Common cfiCommon1 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 cfiCommon1
        
CLOSECURENTCSM      SYMBOL "CLOSECURENTCSM"
About               SYMBOL "About"
??About??rT         SYMBOL "??rT", About
??CLOSECURENTCSM??rA SYMBOL "??rA", CLOSECURENTCSM
Cleaner             SYMBOL "Cleaner"
??Cleaner??rT       SYMBOL "??rT", Cleaner
CloseMAINMENU       SYMBOL "CloseMAINMENU"
??CloseMAINMENU??rT SYMBOL "??rT", CloseMAINMENU
CreateNewPlaylist   SYMBOL "CreateNewPlaylist"
??CreateNewPlaylist??rT SYMBOL "??rT", CreateNewPlaylist
JaLiuBLiuPYVo       SYMBOL "JaLiuBLiuPYVo"
??JaLiuBLiuPYVo??rT SYMBOL "??rT", JaLiuBLiuPYVo
ShowMainMenu        SYMBOL "ShowMainMenu"
??ShowMainMenu??rT  SYMBOL "??rT", ShowMainMenu
tmenu_ghook         SYMBOL "tmenu_ghook"
??tmenu_ghook??rT   SYMBOL "??rT", tmenu_ghook

        EXTERN CLOSECURENTCSM
        FUNCTION CLOSECURENTCSM,0200H
        EXTERN CreateBaseOfMediafiles
        FUNCTION CreateBaseOfMediafiles,0600H
        EXTERN CreateMenuFindPlaylist
        FUNCTION CreateMenuFindPlaylist,0600H
        EXTERN CreateMenuLibrary
        FUNCTION CreateMenuLibrary,0600H
        EXTERN playerfolder


        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">`:
        DATA
        DC8 "0:\\Zbin\\Ivoplay\\menu\\new_playlist.png"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\314\\345\\355\\376">`:
        DATA
        DC8 "\314\345\355\376"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\314\\345\\344i\\340\\362\\345\\352\\340"`:
        DATA
        DC8 "\314\345\344i\340\362\345\352\340"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\302\\350\\341i\\360 \\361\\357\\350\\361`:
        DATA
        DC8 "\302\350\341i\360 \361\357\350\361\352\363"
        DC8 0, 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\321\\362\\342\\356\\360\\350\\362\\350 \\`:
        DATA
        DC8 "\321\362\342\356\360\350\362\350 \361\357\350\361\356\352"

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\317\\360\\356 \\345\\353\\374\\364...">`:
        DATA
        DC8 "\317\360\356 \345\353\374\364..."

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\301\\340\\347\\340 \\344\\340\\355\\350\\`:
        DATA
        DC8 "\301\340\347\340 \344\340\355\350\365 \354\345\344i\340\364\340\351\353i\342"
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\302\\350\\341i\\360">`:
        DATA
        DC8 "\302\350\341i\360"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\315\\340\\347\\340\\344">`:
        DATA
        DC8 "\315\340\347\340\344"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "Ivoplay\\nv 7.0\\n(c) by ...">`:
        DATA
        DC8 49H, 76H, 6FH, 70H, 6CH, 61H, 79H, 0AH
        DC8 76H, 20H, 37H, 2EH, 30H, 0AH, 28H, 63H
        DC8 29H, 20H, 62H, 79H, 20H, 49H, 76H, 6FH
        DC8 0AH, 28H, 72H, 29H, 20H, 53H, 54H, 41H
        DC8 4CH, 4BH, 45H, 52H, 5FH, 37H, 31H, 2CH
        DC8 20H, 4BH, 72H, 65H, 4EH, 2CH, 20H, 44H
        DC8 72H, 75H, 69H, 64H, 2CH, 20H, 66H, 65H
        DC8 61H, 6EH, 6FH, 72H, 2CH, 20H, 28H, 53H
        DC8 75H, 44H, 65H, 58H, 29H, 2CH, 20H, 44H
        DC8 6FH, 62H, 62H, 79H, 30H, 30H, 37H, 2CH
        DC8 20H, 54H, 68H, 65H, 5FH, 5AH, 65H, 6EH
        DC8 0
        DC8 0, 0, 0

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

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

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

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "control_panel|add_poi...">`:
        DATA
        DC8 63H, 6FH, 6EH, 74H, 72H, 6FH, 6CH, 5FH
        DC8 70H, 61H, 6EH, 65H, 6CH, 7CH, 61H, 64H
        DC8 64H, 5FH, 70H, 6FH, 69H, 6EH, 74H, 7CH
        DC8 49H, 76H, 6FH, 70H, 6CH, 61H, 79H, 7CH
        DC8 30H, 3AH, 5CH, 5AH, 62H, 69H, 6EH, 5CH
        DC8 49H, 76H, 6FH, 70H, 6CH, 61H, 79H, 5CH
        DC8 6DH, 65H, 6EH, 75H, 5CH, 70H, 6CH, 61H
        DC8 79H, 6CH, 69H, 73H, 74H, 2EH, 70H, 6EH
        DC8 67H, 7CH, 0
        DC8 0

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

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">_1`:
        DATA
        DC8 "0:\\Zbin\\Ivoplay\\menu\\mediateka.png"
        DC8 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">_2`:
        DATA
        DC8 "0:\\Zbin\\Ivoplay\\menu\\playlist.png"
        DC8 0, 0

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

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">_3`:
        DATA
        DC8 "0:\\Zbin\\Ivoplay\\menu\\about.png"
        DC8 0
// E:\Ivo\arm\IVOPLAY\MAINMENU.C
//    1 #include "../inc/swilib.h"
//    2 #include "language.h"
//    3 #include "main.h"

        RSEG DATA_C:CONST:SORT:NOROOT(0)
// static char const __data pt[3]
pt:
        DATA
        DC8 "%t"

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock0 Using cfiCommon0
        CFI NoFunction
        THUMB
??About??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock0
        REQUIRE About
//    4 #include "spysok.h"
//    5 #include "conf_loader.h"
//    6 #include "mediafiles_base.h"
//    7 
//    8 extern const char playerfolder[128];
//    9 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock1 Using cfiCommon1
        CFI Function About
        ARM
//   10 void About()
//   11 {
About:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//   12   ShowMSG(0,(int)LG_COPYRIGHT);
        LDR      R1,??About_0     ;; `?<Constant "Ivoplay\\nv 7.0\\n(c) by ...">`
        MOV      R0,#+0
        SWI      +328
//   13 }
        POP      {PC}             ;; return
        DATA
??About_0:
        DC32     `?<Constant "Ivoplay\\nv 7.0\\n(c) by ...">`
        CFI EndBlock cfiBlock1

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock2 Using cfiCommon0
        CFI NoFunction
        THUMB
??CreateNewPlaylist??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock2
        REQUIRE CreateNewPlaylist
//   14 
//   15 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock3 Using cfiCommon1
        CFI Function CreateNewPlaylist
        ARM
//   16 void CreateNewPlaylist()
//   17 {
CreateNewPlaylist:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//   18   CLOSECURENTCSM();
        _BLF     CLOSECURENTCSM,??CLOSECURENTCSM??rA
//   19   WSHDR* w=AllocWS(128);
        MOV      R0,#+128
        SWI      +293
        MOV      R4,R0
//   20   wsprintf(w,"%sivoplay.elf",playerfolder);
        LDR      R2,??DataTable1  ;; playerfolder
        LDR      R1,??CreateNewPlaylist_0  ;; `?<Constant "%sivoplay.elf">`
        SWI      +292
//   21   ExecuteFile(w,0,"1.new");
        LDR      R2,??CreateNewPlaylist_0+0x4  ;; `?<Constant "1.new">`
        MOV      R1,#+0
        MOV      R0,R4
        SWI      +148
//   22   FreeWS(w);
        MOV      R0,R4
        SWI      +297
//   23 }
        POP      {R4,PC}          ;; return
        DATA
??CreateNewPlaylist_0:
        DC32     `?<Constant "%sivoplay.elf">`
        DC32     `?<Constant "1.new">`
        CFI EndBlock cfiBlock3

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock4 Using cfiCommon0
        CFI NoFunction
        THUMB
??JaLiuBLiuPYVo??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock4
        REQUIRE JaLiuBLiuPYVo

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
//   24 IPC_REQ JaLiuBlIuJuliu;
JaLiuBlIuJuliu:
        DS8 12

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock5 Using cfiCommon1
        CFI Function JaLiuBLiuPYVo
        ARM
//   25 void JaLiuBLiuPYVo()
//   26 {
JaLiuBLiuPYVo:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//   27     JaLiuBlIuJuliu.name_from="Ivoplay";    
        LDR      R0,??JaLiuBLiuPYVo_0  ;; JaLiuBlIuJuliu + 4
        LDR      R1,??JaLiuBLiuPYVo_0+0x4  ;; `?<Constant "Ivoplay">`
        STR      R1,[R0, #+0]
//   28     JaLiuBlIuJuliu.name_to="control_panel|add_point|Ivoplay|0:\\Zbin\\Ivoplay\\menu\\playlist.png|";
        LDR      R0,??JaLiuBLiuPYVo_0+0x8  ;; JaLiuBlIuJuliu
        LDR      R1,??JaLiuBLiuPYVo_0+0xC  ;; `?<Constant "control_panel|add_poi...">`
        STR      R1,[R0, #+0]
//   29     JaLiuBlIuJuliu.data=0;
        LDR      R0,??JaLiuBLiuPYVo_0+0x10  ;; JaLiuBlIuJuliu + 8
        MOV      R1,#+0
        STR      R1,[R0, #+0]
//   30     GBS_SendMessage(MMI_CEPID,MSG_IPC,0,&JaLiuBlIuJuliu);
        LDR      R3,??JaLiuBLiuPYVo_0+0x8  ;; JaLiuBlIuJuliu
        MOV      R2,#+0
        MOV      R1,#+242
        ORR      R1,R1,#0x300
        MOV      R0,#+9
        ORR      R0,R0,#0x4200
        SWI      +256
//   31 }
        POP      {PC}             ;; return
        DATA
??JaLiuBLiuPYVo_0:
        DC32     JaLiuBlIuJuliu + 4
        DC32     `?<Constant "Ivoplay">`
        DC32     JaLiuBlIuJuliu
        DC32     `?<Constant "control_panel|add_poi...">`
        DC32     JaLiuBlIuJuliu + 8
        CFI EndBlock cfiBlock5

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock6 Using cfiCommon0
        CFI NoFunction
        THUMB
??Cleaner??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock6
        REQUIRE Cleaner
//   32 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock7 Using cfiCommon1
        CFI Function Cleaner
        ARM
//   33 void Cleaner()
//   34 {
Cleaner:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
//   35   WSHDR* w=AllocWS(128);
        MOV      R0,#+128
        SWI      +293
        MOV      R4,R0
//   36   wsprintf(w,"%scleaner.elf",playerfolder);
        LDR      R2,??DataTable1  ;; playerfolder
        LDR      R1,??Cleaner_0+0x4  ;; `?<Constant "%scleaner.elf">`
        SWI      +292
//   37   ExecuteFile(w,0,"");
        ADR      R2,??Cleaner_0   ;; ""
        MOV      R1,#+0
        MOV      R0,R4
        SWI      +148
//   38   FreeWS(w);
        MOV      R0,R4
        SWI      +297
//   39 }
        POP      {R4,PC}          ;; return
        DATA
??Cleaner_0:
        DC8      "",+0,+0,+0
        DC32     `?<Constant "%scleaner.elf">`
        CFI EndBlock cfiBlock7

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable1:
        DC32     playerfolder

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock8 Using cfiCommon0
        CFI NoFunction
        THUMB
??patch_header??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock8
        REQUIRE patch_header
//   40 

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
//   41 CSM_RAM *data;
`data`:
        DS8 4

        RSEG DATA_Z:DATA:SORT:NOROOT(2)
//   42 int MainMenu_ID;
MainMenu_ID:
        DS8 4
//   43 

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   44 int icon_mediateka[] = {(int)"0:\\Zbin\\Ivoplay\\menu\\mediateka.png",0};
icon_mediateka:
        DS8 8
        REQUIRE `?<Initializer for icon_mediateka>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   45 int icon_playlist[] = {(int)"0:\\Zbin\\Ivoplay\\menu\\playlist.png",0};
icon_playlist:
        DS8 8
        REQUIRE `?<Initializer for icon_playlist>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   46 int icon_new_playlist[] = {(int)"0:\\Zbin\\Ivoplay\\menu\\new_playlist.png",0};
icon_new_playlist:
        DS8 8
        REQUIRE `?<Initializer for icon_new_playlist>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   47 int icon_about[] = {(int)"0:\\Zbin\\Ivoplay\\menu\\about.png",0};
icon_about:
        DS8 8
        REQUIRE `?<Initializer for icon_about>`
//   48 
//   49 
//   50 
//   51 #define NUMITEMS 5
//   52 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock9 Using cfiCommon1
        CFI Function patch_header
        ARM
//   53 static void patch_header(const HEADER_DESC* head)
//   54 {
patch_header:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        MOV      R4,R0
//   55   ((HEADER_DESC*)head)->rc.x=0;
        MOV      R0,#+0
        STRH     R0,[R4, #+0]
//   56   ((HEADER_DESC*)head)->rc.y=YDISP;
        STRH     R0,[R4, #+2]
//   57   ((HEADER_DESC*)head)->rc.x2=ScreenW()-1;
        SWI      +33160
        SUB      R0,R0,#+1
        STRH     R0,[R4, #+4]
//   58   ((HEADER_DESC*)head)->rc.y2=HeaderH()-1+YDISP;
        SWI      +33162
        SUB      R0,R0,#+1
        STRH     R0,[R4, #+6]
//   59 }
        POP      {R4,PC}          ;; return
        CFI EndBlock cfiBlock9

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock10 Using cfiCommon0
        CFI NoFunction
        THUMB
??tmenu_ghook??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock10
        REQUIRE tmenu_ghook
//   60 
//   61 
//   62 

        RSEG DATA_C:CONST:SORT:NOROOT(2)
//   63 static const HEADER_DESC menuhdr={0,0,0,0,NULL,(int)LG_MENU,LGP_NULL};
menuhdr:
        DATA
        DC16 0, 0, 0, 0
        DC32 0H, `?<Constant "\\314\\345\\355\\376">`, 32767
//   64 

        RSEG DATA_C:CONST:SORT:NOROOT(2)
//   65 static const int mmenusoftkeys[]={0,1,2};
mmenusoftkeys:
        DATA
        DC32 0, 1, 2
//   66 

        RSEG DATA_C:CONST:SORT:NOROOT(2)
//   67 static const char * const menutexts[NUMITEMS]=
menutexts:
        DATA
        DC32 `?<Constant "\\314\\345\\344i\\340\\362\\345\\352\\340"`
        DC32 `?<Constant "\\302\\350\\341i\\360 \\361\\357\\350\\361`
        DC32 `?<Constant "\\321\\362\\342\\356\\360\\350\\362\\350 \\`
        DC32 `?<Constant "\\317\\360\\356 \\345\\353\\374\\364...">`
        DC32 `?<Constant "\\301\\340\\347\\340 \\344\\340\\355\\350\\`
//   68 {
//   69   LG_MEDIALIBRARY,
//   70   LG_SELECT_PLAYLIST,
//   71   LG_NEW_PLAYLIST,
//   72   LG_ABOUT,
//   73   LG_MEDIAFILES,
//   74 };
//   75 

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   76 static const void *menuprocs[NUMITEMS]=
menuprocs:
        DS8 20
        REQUIRE `?<Initializer for menuprocs>`
//   77 {
//   78   (void *)CreateMenuLibrary,
//   79   (void *)CreateMenuFindPlaylist,
//   80   (void *)CreateNewPlaylist,
//   81   (void *)About,
//   82   (void *)CreateBaseOfMediafiles,
//   83 };
//   84 

        RSEG DATA_C:CONST:SORT:NOROOT(2)
//   85 static const SOFTKEY_DESC mmenu_sk[]=
mmenu_sk:
        DATA
        DC16 24, 0
        DC32 `?<Constant "\\302\\350\\341i\\360">`
        DC16 1, 0
        DC32 `?<Constant "\\315\\340\\347\\340\\344">`
        DC16 61, 0
        DC32 2147467515
//   86 {
//   87   {0x0018,0x0000,(int)LG_SELECT},
//   88   {0x0001,0x0000,(int)LG_CLOSE},
//   89   {0x003D,0x0000,(int)LGP_DOIT_PIC}
//   90 };
//   91 

        RSEG DATA_C:CONST:SORT:NOROOT(2)
//   92 static const SOFTKEYSTAB mmenu_skt=
mmenu_skt:
        DATA
        DC32 mmenu_sk, 0
//   93 {
//   94   mmenu_sk,0
//   95 };
//   96 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock11 Using cfiCommon1
        CFI Function tmenu_ghook
        ARM
//   97 void tmenu_ghook(void *data, int cmd)
//   98 {
tmenu_ghook:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//   99   //PNGTOP_DESC *pltop=PNG_TOP();
//  100   if (cmd==9)
//  101   {
//  102     //pltop->dyn_pltop=NULL;
//  103   }
//  104   if (cmd==0x0A)
        CMP      R1,#+10
        POPNE    {PC}
//  105   {
//  106     //pltop->dyn_pltop=XStatusesImgList;
//  107     DisableIDLETMR();
        SWI      +383
//  108   }
//  109 }
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock11

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock12 Using cfiCommon0
        CFI NoFunction
        THUMB
??menuitemhandler??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock12
        REQUIRE menuitemhandler
//  110 //static int icon_array[2];
//  111 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock13 Using cfiCommon1
        CFI Function menuitemhandler
        ARM
//  112 static void menuitemhandler(void *data, int curitem, void *unk)
//  113 {
menuitemhandler:
        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
//  114   WSHDR *ws;
//  115   void *item=AllocMenuItem(data);
        SWI      +407
        MOV      R6,R0
//  116   ws=AllocMenuWS(data,strlen(menutexts[curitem]));
        LDR      R0,??menuitemhandler_1  ;; menutexts
        LDR      R0,[R0, +R5, LSL #+2]
        SWI      +27
        MOV      R1,R0
        MOV      R0,R4
        SWI      +408
        MOV      R7,R0
//  117   wsprintf(ws,pt,menutexts[curitem]);
        LDR      R0,??menuitemhandler_1  ;; menutexts
        LDR      R2,[R0, +R5, LSL #+2]
        LDR      R1,??menuitemhandler_1+0x4  ;; pt
        MOV      R0,R7
        SWI      +292
//  118   switch(curitem)
        MOV      R0,R5
        CMP      R0,#+4
        BHI      ??menuitemhandler_2
        ADR      R1,??menuitemhandler_0
        LDRB     R1,[R1, R0]
        ADD      PC,PC,R1, LSL #+2
        DATA
??menuitemhandler_0:
        DC8      +1,+3,+5,+7
        DC8      +1,+0,+0,+0
        ARM
//  119   {
//  120     case 0:
//  121     SetMenuItemIconArray(data,item,icon_mediateka);
??menuitemhandler_3:
        LDR      R2,??menuitemhandler_1+0x8  ;; icon_mediateka
        B        ??menuitemhandler_4
//  122     break;
//  123     case 1:
//  124     SetMenuItemIconArray(data,item,icon_playlist);
??menuitemhandler_5:
        LDR      R2,??menuitemhandler_1+0xC  ;; icon_playlist
        B        ??menuitemhandler_4
//  125     break;
//  126     case 2:
//  127     SetMenuItemIconArray(data,item,icon_new_playlist);
??menuitemhandler_6:
        LDR      R2,??menuitemhandler_1+0x10  ;; icon_new_playlist
        B        ??menuitemhandler_4
//  128     break;
//  129     case 3:
//  130     SetMenuItemIconArray(data,item,icon_about);
??menuitemhandler_7:
        LDR      R2,??menuitemhandler_1+0x14  ;; icon_about
??menuitemhandler_4:
        MOV      R1,R6
        MOV      R0,R4
        SWI      +409
//  131     break;
//  132     case 4:
//  133     SetMenuItemIconArray(data,item,icon_mediateka);
//  134     break;
//  135   }
//  136   SetMenuItemText(data, item, ws, curitem);
??menuitemhandler_2:
        MOV      R3,R5
        MOV      R2,R7
        MOV      R1,R6
        MOV      R0,R4
        SWI      +410
//  137 }
        POP      {R4-R7,PC}       ;; return
        DATA
??menuitemhandler_1:
        DC32     menutexts
        DC32     pt
        DC32     icon_mediateka
        DC32     icon_playlist
        DC32     icon_new_playlist
        DC32     icon_about
        CFI EndBlock cfiBlock13

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock14 Using cfiCommon0
        CFI NoFunction
        THUMB
??tmenu_keyhook??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock14
        REQUIRE tmenu_keyhook
//  138 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock15 Using cfiCommon1
        CFI Function tmenu_keyhook
        ARM
//  139 static int tmenu_keyhook(void *data, GUI_MSG *msg)
//  140 {
tmenu_keyhook:
        PUSH     {R4,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R4 Frame(CFA, -8)
        CFI CFA R13+8
        MOV      R4,R0
//  141   if ((msg->keys==0x18)||(msg->keys==0x3D))
        LDRSH    R0,[R1, #+2]
        CMP      R0,#+24
        CMPNE    R0,#+61
        BNE      ??tmenu_keyhook_0
//  142   {
//  143     ((void (*)(void))(menuprocs[GetCurMenuItem(data)]))();
        MOV      R0,R4
        SWI      +399
        LDR      R1,??tmenu_keyhook_1  ;; menuprocs
        LDR      R0,[R1, +R0, LSL #+2]
        BLX      R0
//  144     if (GetCurMenuItem(data)==2) {return(1);}
        MOV      R0,R4
        SWI      +399
        CMP      R0,#+2
        MOVEQ    R0,#+1
        POPEQ    {R4,PC}
//  145   }
//  146   return(0);
??tmenu_keyhook_0:
        MOV      R0,#+0
        POP      {R4,PC}          ;; return
        DATA
??tmenu_keyhook_1:
        DC32     menuprocs
        CFI EndBlock cfiBlock15
//  147 }

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock16 Using cfiCommon0
        CFI NoFunction
        THUMB
??CloseMAINMENU??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock16
        REQUIRE CloseMAINMENU
//  148 
//  149 

        RSEG DATA_C:CONST:SORT:NOROOT(2)
//  150 static const MENU_DESC tmenu=
tmenu:
        DATA
        DC32 8, tmenu_keyhook, tmenu_ghook, 0H, mmenusoftkeys, mmenu_skt, 17
        DC32 menuitemhandler, 0H, 0H, 5
//  151 {
//  152   8,tmenu_keyhook,tmenu_ghook,NULL,
//  153   mmenusoftkeys,
//  154   &mmenu_skt,
//  155   0x11,//MENU_FLAG,
//  156   menuitemhandler,
//  157   NULL,//menuitems,
//  158   NULL,//menuprocs,
//  159   NUMITEMS
//  160 };
//  161 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock17 Using cfiCommon1
        CFI Function CloseMAINMENU
        ARM
//  162 void CloseMAINMENU()
//  163 {
CloseMAINMENU:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  164   GeneralFunc_flag1 (MainMenu_ID,1);
        MOV      R1,#+1
        LDR      R0,??DataTable3  ;; MainMenu_ID
        LDR      R0,[R0, #+0]
        SWI      +317
//  165 }
        POP      {PC}             ;; return
        CFI EndBlock cfiBlock17

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock18 Using cfiCommon0
        CFI NoFunction
        THUMB
??ShowMainMenu??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock18
        REQUIRE ShowMainMenu
//  166 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock19 Using cfiCommon1
        CFI Function ShowMainMenu
        ARM
//  167 void ShowMainMenu()
//  168 {
ShowMainMenu:
        PUSH     {LR}
        CFI ?RET Frame(CFA, -4)
        CFI CFA R13+4
//  169   patch_header(&menuhdr);
        LDR      R0,??ShowMainMenu_0  ;; menuhdr
        BL       patch_header
//  170   MainMenu_ID=CreateMenu(0,0,&tmenu,&menuhdr,0,NUMITEMS,0,0);
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+8
        PUSH     {R0}
        CFI CFA R13+12
        MOV      R0,#+5
        PUSH     {R0}
        CFI CFA R13+16
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+20
        LDR      R3,??ShowMainMenu_0  ;; menuhdr
        LDR      R2,??ShowMainMenu_0+0x4  ;; tmenu
        MOV      R1,#+0
        SWI      +338
        LDR      R1,??DataTable3  ;; MainMenu_ID
        STR      R0,[R1, #+0]
//  171 }
        ADD      SP,SP,#+16       ;; stack cleaning
        CFI CFA R13+4
        POP      {PC}             ;; return
        DATA
??ShowMainMenu_0:
        DC32     menuhdr
        DC32     tmenu
        CFI EndBlock cfiBlock19

        RSEG CODE:CODE:NOROOT(2)
        DATA
??DataTable3:
        DC32     MainMenu_ID

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock20 Using cfiCommon1
        CFI NoFunction
        ARM
??CLOSECURENTCSM??rA:
        LDR      R12,??Subroutine10_0  ;; CLOSECURENTCSM
        BX       R12
        DATA
??Subroutine10_0:
        DC32     CLOSECURENTCSM
        CFI EndBlock cfiBlock20

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for icon_mediateka>`:
        DATA
        DC32 `?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">_1`, 0

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for icon_playlist>`:
        DATA
        DC32 `?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">_2`, 0

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for icon_new_playlist>`:
        DATA
        DC32 `?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">`, 0

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for icon_about>`:
        DATA
        DC32 `?<Constant "0:\\\\Zbin\\\\Ivoplay\\\\menu\\\\...">_3`, 0

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for menuprocs>`:
        DATA
        DC32 CreateMenuLibrary, CreateMenuFindPlaylist, CreateNewPlaylist
        DC32 About, CreateBaseOfMediafiles

        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)

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

        END
// 
// 744 bytes in segment CODE
// 588 bytes in segment DATA_C
//  52 bytes in segment DATA_I
//  52 bytes in segment DATA_ID
//  20 bytes in segment DATA_Z
//  24 bytes in segment INITTAB
// 
// 692 bytes of CODE  memory (+ 76 bytes shared)
// 640 bytes of CONST memory
//  72 bytes of DATA  memory
//
//Errors: none
//Warnings: none
