//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR ARM ANSI C/C++ Compiler V4.40A/W32 EVALUATION   28/Mar/2008  19:07:09 /
// Copyright 1999-2005 IAR Systems. All rights reserved.                     /
//                                                                           /
//    Cpu mode        =  interwork                                           /
//    Endian          =  little                                              /
//    Stack alignment =  4                                                   /
//    Source file     =  E:\Ivo\arm\IVOPLAY\playlists.c                      /
//    Command line    =  E:\Ivo\arm\IVOPLAY\playlists.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\playlists.s79       /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME playlists

        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 ??CloseMAINMENU??rA
        MULTWEAK ??CreateMenuFindPlaylist??rT
??DataTable0 EQU 0
        MULTWEAK ??main??rA
        MULTWEAK ??patch_header??rT
        MULTWEAK ??selipl_menu_ghook??rT
        MULTWEAK ??selipl_menu_iconhndl??rT
        MULTWEAK ??selipl_menu_onkey??rT
        MULTWEAK ??strcmp_nocase??rA
        PUBWEAK ?init?tab?DATA_I
        PUBLIC CreateMenuFindPlaylist
        FUNCTION CreateMenuFindPlaylist,0201H
        LOCFRAME CSTACK, 872, STACK
        PUBLIC patch_header
        FUNCTION patch_header,0203H
        LOCFRAME CSTACK, 8, STACK
        PUBLIC selipl_HDR
        PUBLIC selipl_STRUCT
        PUBLIC selipl_menu_ghook
        FUNCTION selipl_menu_ghook,0603H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC selipl_menu_iconhndl
        FUNCTION selipl_menu_iconhndl,0603H
        LOCFRAME CSTACK, 24, STACK
        PUBLIC selipl_menu_onkey
        FUNCTION selipl_menu_onkey,0603H
        LOCFRAME CSTACK, 272, STACK
        PUBLIC selipl_sk
        PUBLIC selipl_skt
        PUBLIC selipl_softkeys
        
        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
        
CloseMAINMENU       SYMBOL "CloseMAINMENU"
main                SYMBOL "main"
strcmp_nocase       SYMBOL "strcmp_nocase"
??CloseMAINMENU??rA SYMBOL "??rA", CloseMAINMENU
CreateMenuFindPlaylist SYMBOL "CreateMenuFindPlaylist"
??CreateMenuFindPlaylist??rT SYMBOL "??rT", CreateMenuFindPlaylist
??main??rA          SYMBOL "??rA", main
patch_header        SYMBOL "patch_header"
??patch_header??rT  SYMBOL "??rT", patch_header
selipl_menu_ghook   SYMBOL "selipl_menu_ghook"
??selipl_menu_ghook??rT SYMBOL "??rT", selipl_menu_ghook
selipl_menu_iconhndl SYMBOL "selipl_menu_iconhndl"
??selipl_menu_iconhndl??rT SYMBOL "??rT", selipl_menu_iconhndl
selipl_menu_onkey   SYMBOL "selipl_menu_onkey"
??selipl_menu_onkey??rT SYMBOL "??rT", selipl_menu_onkey
??strcmp_nocase??rA SYMBOL "??rA", strcmp_nocase

        EXTERN CloseMAINMENU
        FUNCTION CloseMAINMENU,0200H
        EXTERN main
        FUNCTION main,0a02H
        EXTERN playerfolder
        EXTERN strcmp_nocase
        FUNCTION strcmp_nocase,0202H


        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(0)
`?<Constant "+">`:
        DATA
        DC8 "+"

        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 "%sivoplay.elf">`:
        DATA
        DC8 "%sivoplay.elf"
        DC8 0, 0

        RSEG DATA_C:CONST:SORT:NOROOT(2)
`?<Constant "\\317\\356\\354\\350\\353\\352\\340">`:
        DATA
        DC8 "\317\356\354\350\353\352\340"

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

        RSEG DATA_C:CONST:SORT:NOROOT(2)
        DATA
        DC8 "*.*"
// E:\Ivo\arm\IVOPLAY\playlists.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
??patch_header??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock0
        REQUIRE patch_header
//    4 #include "mainmenu.h"
//    5 #include "conf_loader.h"
//    6 
//    7 extern const char playerfolder[128];

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

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock2 Using cfiCommon0
        CFI NoFunction
        THUMB
??selipl_menu_onkey??rT:
        BX       PC
        Nop      
        CFI EndBlock cfiBlock2
        REQUIRE selipl_menu_onkey
//   15 
//   16 typedef struct
//   17 {
//   18   void *next;
//   19   char cfgname[64];
//   20   char fullpath[128];
//   21 }SEL_IPL;
//   22 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock3 Using cfiCommon1
        CFI Function selipl_menu_onkey
        ARM
//   23 int selipl_menu_onkey(void *gui, GUI_MSG *msg)
//   24 {
selipl_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
        SUB      SP,SP,#+256
        CFI CFA R13+272
        MOV      R4,R0
        MOV      R5,R1
//   25   SEL_IPL *sbtop=MenuGetUserPointer(gui);
        SWI      +480
        MOV      R6,R0
//   26   if (msg->keys==0x3D || msg->keys==0x18)
        LDRSH    R0,[R5, #+2]
        CMP      R0,#+61
        CMPNE    R0,#+24
        BNE      ??selipl_menu_onkey_0
//   27   {
//   28     int i=GetCurMenuItem(gui);
        MOV      R0,R4
        SWI      +399
//   29     for (int n=0; n!=i; n++) sbtop=sbtop->next;
        MOV      R1,#+0
        CMP      R0,#+0
        BEQ      ??selipl_menu_onkey_1
??selipl_menu_onkey_2:
        LDR      R6,[R6, #+0]
        ADD      R1,R1,#+1
        CMP      R1,R0
        BNE      ??selipl_menu_onkey_2
//   30     if (sbtop)
??selipl_menu_onkey_1:
        CMP      R6,#+0
        BEQ      ??selipl_menu_onkey_0
//   31     {
//   32       /*
//   33       //Закрываем плеер и запускаем снова с новым плейлистом
//   34       CLOSECURENTCSM();
//   35       WSHDR* ws=AllocWS(128);
//   36       wsprintf(ws,"%sivoplay.elf",playerfolder);
//   37       ExecuteFile(ws,0,sbtop->fullpath);  
//   38       FreeWS(ws);
//   39       //Пока так, а там посмотрим...
//   40       */
//   41       char shliah[255];
//   42       sprintf(shliah,"%sivoplay.elf",playerfolder);
        LDR      R2,??DataTable1  ;; playerfolder
        LDR      R1,??selipl_menu_onkey_3  ;; `?<Constant "%sivoplay.elf">`
        MOV      R0,SP
        SWI      +22
//   43       main(shliah,sbtop->fullpath);
        ADD      R1,R6,#+68
        MOV      R0,SP
        _BLF     main,??main??rA
//   44       return (1);
        MOV      R0,#+1
        ADD      SP,SP,#+256
        CFI CFA R13+16
        POP      {R4-R6,PC}
        CFI CFA R13+272
//   45     }
//   46   }
//   47   return (0);
??selipl_menu_onkey_0:
        MOV      R0,#+0
        ADD      SP,SP,#+256      ;; stack cleaning
        CFI CFA R13+16
        POP      {R4-R6,PC}       ;; return
        DATA
??selipl_menu_onkey_3:
        DC32     `?<Constant "%sivoplay.elf">`
        CFI EndBlock cfiBlock3
//   48 }

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

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock5 Using cfiCommon1
        CFI Function selipl_menu_ghook
        ARM
//   50 void selipl_menu_ghook(void *gui, int cmd)
//   51 {
selipl_menu_ghook:
        PUSH     {R4,R5,LR}
        CFI ?RET Frame(CFA, -4)
        CFI R5 Frame(CFA, -8)
        CFI R4 Frame(CFA, -12)
        CFI CFA R13+12
        MOV      R4,R1
//   52   SEL_IPL *sbtop=MenuGetUserPointer(gui);
        SWI      +480
        MOV      R5,R0
//   53   if (cmd==3)
        CMP      R4,#+3
        BNE      ??selipl_menu_ghook_0
//   54   {
//   55     while(sbtop)
??selipl_menu_ghook_1:
        CMP      R5,#+0
        POPEQ    {R4,R5,PC}
//   56     {
//   57       SEL_IPL *sb=sbtop;
        MOV      R0,R5
//   58       sbtop=sbtop->next;
        LDR      R5,[R5, #+0]
//   59       mfree(sb);
        SWI      +21
        B        ??selipl_menu_ghook_1
//   60     }    
//   61   }
//   62   if (cmd==0x0A)
??selipl_menu_ghook_0:
        CMP      R4,#+10
        POPNE    {R4,R5,PC}
//   63   {
//   64     DisableIDLETMR();
        SWI      +383
//   65   }
//   66 }
        POP      {R4,R5,PC}       ;; return
        CFI EndBlock cfiBlock5

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

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   68 int selipl_softkeys[]={0,1,2};
selipl_softkeys:
        DS8 12
        REQUIRE `?<Initializer for selipl_softkeys>`

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   69 SOFTKEY_DESC selipl_sk[]=
selipl_sk:
        DS8 24
        REQUIRE `?<Initializer for selipl_sk>`
//   70 {
//   71   {0x0018,0x0000,(int)LG_SELECT},
//   72   {0x0001,0x0000,(int)LG_CLOSE},
//   73   {0x003D,0x0000,(int)"+"}
//   74 };
//   75 

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//   76 SOFTKEYSTAB selipl_skt=
selipl_skt:
        DS8 8
        REQUIRE `?<Initializer for selipl_skt>`
//   77 {
//   78   selipl_sk,0
//   79 };
//   80 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock7 Using cfiCommon1
        CFI Function selipl_menu_iconhndl
        ARM
//   81 void selipl_menu_iconhndl(void *gui, int cur_item, void *user_pointer)
//   82 {
selipl_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
        MOV      R6,R2
//   83   SEL_IPL *sbtop=user_pointer;
//   84   WSHDR *ws;
//   85   int len;
//   86   for (int n=0; n!=cur_item; n++) sbtop=sbtop->next;
        MOV      R0,#+0
        CMP      R5,#+0
        BEQ      ??selipl_menu_iconhndl_0
??selipl_menu_iconhndl_1:
        LDR      R6,[R6, #+0]
        ADD      R0,R0,#+1
        CMP      R0,R5
        BNE      ??selipl_menu_iconhndl_1
//   87   void *item=AllocMenuItem(gui);
??selipl_menu_iconhndl_0:
        MOV      R0,R4
        SWI      +407
        MOV      R7,R0
//   88   if (sbtop)
        CMP      R6,#+0
        BEQ      ??selipl_menu_iconhndl_2
//   89   {
//   90     len=strlen(sbtop->cfgname);
        ADD      R0,R6,#+4
        SWI      +27
//   91     ws=AllocMenuWS(gui,len+4);
        ADD      R1,R0,#+4
        MOV      R0,R4
        SWI      +408
        MOV      R8,R0
//   92     utf8_2ws(ws,sbtop->cfgname,320);
        MOV      R2,#+320
        ADD      R1,R6,#+4
        SWI      +483
        B        ??selipl_menu_iconhndl_3
//   93   }
//   94   else
//   95   {
//   96     ws=AllocMenuWS(gui,10);
??selipl_menu_iconhndl_2:
        MOV      R1,#+10
        MOV      R0,R4
        SWI      +408
        MOV      R8,R0
//   97     wsprintf(ws,pt,LG_ERROR);
        LDR      R2,??selipl_menu_iconhndl_4  ;; `?<Constant "\\317\\356\\354\\350\\353\\352\\340">`
        LDR      R1,??selipl_menu_iconhndl_4+0x4  ;; pt
        SWI      +292
//   98   }
//   99   SetMenuItemText(gui, item, ws, cur_item);
??selipl_menu_iconhndl_3:
        MOV      R3,R5
        MOV      R2,R8
        MOV      R1,R7
        MOV      R0,R4
        SWI      +410
//  100 }
        POP      {R4-R8,PC}       ;; return
        DATA
??selipl_menu_iconhndl_4:
        DC32     `?<Constant "\\317\\356\\354\\350\\353\\352\\340">`
        DC32     pt
        CFI EndBlock cfiBlock7

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

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//  102 MENU_DESC selipl_STRUCT=
selipl_STRUCT:
        DS8 44
        REQUIRE `?<Initializer for selipl_STRUCT>`
//  103 {
//  104   8,selipl_menu_onkey,selipl_menu_ghook,NULL,
//  105   selipl_softkeys,
//  106   &selipl_skt,
//  107   0x10,
//  108   selipl_menu_iconhndl,
//  109   NULL,   //Items
//  110   NULL,   //Procs
//  111   0   //n
//  112 };
//  113 

        RSEG DATA_I:DATA:SORT:NOROOT(2)
//  114 HEADER_DESC selipl_HDR={0,0,0,0,NULL,(int)LG_SELECT_PLAYLIST,LGP_NULL};
selipl_HDR:
        DS8 20
        REQUIRE `?<Initializer for selipl_HDR>`
//  115 
//  116 

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock9 Using cfiCommon1
        CFI Function CreateMenuFindPlaylist
        ARM
//  117 int CreateMenuFindPlaylist()
//  118 {
CreateMenuFindPlaylist:
        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
        SUB      SP,SP,#+832
        CFI CFA R13+856
//  119   CloseMAINMENU();
        _BLF     CloseMAINMENU,??CloseMAINMENU??rA
//  120   unsigned int err;
//  121   DIR_ENTRY de;
//  122   char e[256];
//  123   sprintf(e,"%splaylists\\",playerfolder);
        LDR      R2,??DataTable1  ;; playerfolder
        LDR      R1,??CreateMenuFindPlaylist_0+0x4  ;; `?<Constant "%splaylists\\\\">`
        ADD      R0,SP,#+448
        SWI      +22
//  124   const char *s=e;
        ADD      R4,SP,#+448
//  125   SEL_IPL *sbtop=0;
        MOV      R1,#+0
        STR      R1,[SP, #+0]
//  126   SEL_IPL *sb;
//  127   int n_ipl=0;
        MOV      R5,#+0
//  128   char str[128];
//  129   strcpy(str,s);
        MOV      R1,R4
        ADD      R0,SP,#+704
        SWI      +26
//  130   strcat(str,"*.*");
        ADR      R1,??CreateMenuFindPlaylist_0  ;; "*.*"
        ADD      R0,SP,#+704
        SWI      +23
//  131   if (FindFirstFile(&de,str,&err))
        ADD      R2,SP,#+4
        ADD      R1,SP,#+704
        ADD      R0,SP,#+8
        SWI      +107
        CMP      R0,#+0
        BEQ      ??CreateMenuFindPlaylist_1
//  132   {
//  133     do
//  134     {
//  135       if (!(de.file_attr&FA_DIRECTORY))
??CreateMenuFindPlaylist_2:
        LDRSH    R0,[SP, #+22]
        TST      R0,#0x10
        BNE      ??CreateMenuFindPlaylist_3
//  136       {
//  137         extern int strcmp_nocase(const char *s, const char *d);
//  138         sb=malloc(sizeof(SEL_IPL));
        MOV      R0,#+196
        SWI      +20
        MOV      R6,R0
//  139         strcpy(sb->fullpath,s);
        MOV      R1,R4
        ADD      R0,R6,#+68
        SWI      +26
//  140         strcat(sb->fullpath,de.file_name);
        ADD      R1,SP,#+177
        ADD      R0,R6,#+68
        SWI      +23
//  141         strcpy(sb->cfgname,de.file_name);
        ADD      R1,SP,#+177
        ADD      R0,R6,#+4
        SWI      +26
//  142         sb->cfgname[strlen(de.file_name)-4]=0;
        ADD      R0,SP,#+177
        SWI      +27
        MOV      R1,#+0
        STRB     R1,[R0, +R6]
//  143         sb->next=0;
        MOV      R0,#+0
        STR      R0,[R6, #+0]
//  144         if (sbtop)
        LDR      R0,[SP, #+0]
        CMP      R0,#+0
        BEQ      ??CreateMenuFindPlaylist_4
//  145         {
//  146           SEL_IPL *sbr, *sbt;
//  147           sbr=(SEL_IPL *)&sbtop;
        MOV      R7,SP
//  148           sbt=sbtop;
        MOV      R8,R0
//  149           while(strcmp_nocase(sbt->cfgname,sb->cfgname)<0)
??CreateMenuFindPlaylist_5:
        ADD      R1,R6,#+4
        ADD      R0,R8,#+4
        _BLF     strcmp_nocase,??strcmp_nocase??rA
        CMP      R0,#+0
        BPL      ??CreateMenuFindPlaylist_6
//  150           {
//  151             sbr=sbt;
        MOV      R7,R8
//  152             sbt=sbt->next;
        LDR      R8,[R8, #+0]
//  153             if (!sbt) break;
        CMP      R8,#+0
        BNE      ??CreateMenuFindPlaylist_5
//  154           }
//  155           sb->next=sbt;
??CreateMenuFindPlaylist_6:
        STR      R8,[R6, #+0]
//  156           sbr->next=sb;
        STR      R6,[R7, #+0]
        B        ??CreateMenuFindPlaylist_7
//  157         }
//  158         else
//  159         {
//  160           sbtop=sb;
??CreateMenuFindPlaylist_4:
        STR      R6,[SP, #+0]
//  161         }
//  162         n_ipl++;
??CreateMenuFindPlaylist_7:
        ADD      R5,R5,#+1
//  163       }
//  164     }
//  165     while(FindNextFile(&de,&err));
??CreateMenuFindPlaylist_3:
        ADD      R1,SP,#+4
        ADD      R0,SP,#+8
        SWI      +108
        CMP      R0,#+0
        BNE      ??CreateMenuFindPlaylist_2
//  166   }
//  167   FindClose(&de,&err);
??CreateMenuFindPlaylist_1:
        ADD      R1,SP,#+4
        ADD      R0,SP,#+8
        SWI      +109
//  168   patch_header(&selipl_HDR);
        LDR      R0,??CreateMenuFindPlaylist_0+0x8  ;; selipl_HDR
        BL       patch_header
//  169   return CreateMenu(0,0,&selipl_STRUCT,&selipl_HDR,0,n_ipl,sbtop,0);
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+860
        LDR      R0,[SP, #+4]
        PUSH     {R0}
        CFI CFA R13+864
        PUSH     {R5}
        CFI CFA R13+868
        MOV      R0,#+0
        PUSH     {R0}
        CFI CFA R13+872
        LDR      R3,??CreateMenuFindPlaylist_0+0x8  ;; selipl_HDR
        LDR      R2,??CreateMenuFindPlaylist_0+0xC  ;; selipl_STRUCT
        MOV      R1,#+0
        SWI      +338
        ADD      SP,SP,#+848      ;; stack cleaning
        CFI CFA R13+24
        POP      {R4-R8,PC}       ;; return
        DATA
??CreateMenuFindPlaylist_0:
        DC8      "*.*"
        DC32     `?<Constant "%splaylists\\\\">`
        DC32     selipl_HDR
        DC32     selipl_STRUCT
        CFI EndBlock cfiBlock9
//  170 }

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

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock10 Using cfiCommon1
        CFI NoFunction
        ARM
??main??rA:
        LDR      R12,??Subroutine5_0  ;; main
        BX       R12
        DATA
??Subroutine5_0:
        DC32     main
        CFI EndBlock cfiBlock10

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock11 Using cfiCommon1
        CFI NoFunction
        ARM
??CloseMAINMENU??rA:
        LDR      R12,??Subroutine6_0  ;; CloseMAINMENU
        BX       R12
        DATA
??Subroutine6_0:
        DC32     CloseMAINMENU
        CFI EndBlock cfiBlock11

        RSEG CODE:CODE:NOROOT(2)
        CFI Block cfiBlock12 Using cfiCommon1
        CFI NoFunction
        ARM
??strcmp_nocase??rA:
        LDR      R12,??Subroutine7_0  ;; strcmp_nocase
        BX       R12
        DATA
??Subroutine7_0:
        DC32     strcmp_nocase
        CFI EndBlock cfiBlock12

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

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for selipl_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 `?<Constant "+">`

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

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for selipl_STRUCT>`:
        DATA
        DC32 8, selipl_menu_onkey, selipl_menu_ghook, 0H, selipl_softkeys
        DC32 selipl_skt, 16, selipl_menu_iconhndl, 0H, 0H, 0

        RSEG DATA_ID:CONST:SORT:NOROOT(2)
`?<Initializer for selipl_HDR>`:
        DATA
        DC16 0, 0, 0, 0
        DC32 0H, `?<Constant "\\302\\350\\341i\\360 \\361\\357\\350\\361`
        DC32 32767

        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
// 
// 836 bytes in segment CODE
//  81 bytes in segment DATA_C
// 108 bytes in segment DATA_I
// 108 bytes in segment DATA_ID
//  12 bytes in segment INITTAB
// 
// 780 bytes of CODE  memory (+ 68 bytes shared)
// 189 bytes of CONST memory
// 108 bytes of DATA  memory
//
//Errors: none
//Warnings: none
