#ifndef COMPILE_H
#include "COMPILE.H"
#endif
#ifdef MEDIA767_AU2E
extern int16_t F1318_FIO1_29_();
extern int16_t F1319_FIO1_28_();
extern long F1320_FIO1_27_();
extern char F1322_FIO1_26_();
extern unsigned int16_t F1323_FIO1_25_();
extern int16_t F1324_FIO1_24_();
extern int16_t F1327_FIO1_23_();
extern int16_t F1328_FIO1_22_();
extern int16_t F1329_FIO1_21_Open();
extern int16_t F1330_FIO1_20_Create();
extern int16_t F1331_FIO1_19_Close();
extern int16_t F1332_FIO1_18_GetSize();
extern int16_t F1333_FIO1_17_Tell();
extern int16_t F1334_FIO1_16_Seek();
extern int16_t F1335_FIO1_15_Read();
extern int16_t F1336_FIO1_14_Write();
extern int16_t F1337_FIO1_13_Lock();
extern int16_t F1338_FIO1_12_Delete();
extern int16_t F1339_FIO1_11_Rename();
extern char F1341_FIO1_10_();
extern int16_t F1340_FIO1_09_();
extern void F1342_FIO1_08_();
extern void F1321_FIO1_07_SubstituteStringInFileName();
extern int16_t F1343_FIO1_06_();
extern int16_t F1326_FIO1_05_FormatSaveDisk();
extern BOOLEAN F1325_FIO1_04_IsDiskWriteable();
extern void F1307_FIO1_03_Expunge();

extern FTL_LIBRARY* F9008_OpenPRIM();
extern FIO1_FTL_LIBRARY* F1305_OpenFTLLibrary();
extern void F1317_UninitializeLibrary();

extern FTL_LIBRARY* G3318_FIO1base;

struct {
        void* Functions[29];
        FIO1_FTL_LIBRARY Data;
} G3320_s_FIO1Library = {
        { (void*)F1318_FIO1_29_,                                /* 29 -$74 */
          (void*)F1319_FIO1_28_,                                /* 28 -$70 */
          (void*)F1320_FIO1_27_,                                /* 27 -$6C */
          (void*)F1322_FIO1_26_,                                /* 26 -$68 */
          (void*)F1323_FIO1_25_,                                /* 25 -$64 */
          (void*)F1324_FIO1_24_,                                /* 24 -$60 */
          (void*)F1327_FIO1_23_,                                /* 23 -$5C */
          (void*)F1328_FIO1_22_,                                /* 22 -$58 */
          (void*)F1329_FIO1_21_Open,                            /* 21 -$54 */
          (void*)F1330_FIO1_20_Create,                          /* 20 -$50 */
          (void*)F1331_FIO1_19_Close,                           /* 19 -$4C */
          (void*)F1332_FIO1_18_GetSize,                         /* 18 -$48 */
          (void*)F1333_FIO1_17_Tell,                            /* 17 -$44 */
          (void*)F1334_FIO1_16_Seek,                            /* 16 -$40 */
          (void*)F1335_FIO1_15_Read,                            /* 15 -$3C */
          (void*)F1336_FIO1_14_Write,                           /* 14 -$38 */
          (void*)F1337_FIO1_13_Lock,                            /* 13 -$34 */
          (void*)F1338_FIO1_12_Delete,                          /* 12 -$30 */
          (void*)F1339_FIO1_11_Rename,                          /* 11 -$2C */
          (void*)F1341_FIO1_10_,                                /* 10 -$28 */
          (void*)F1340_FIO1_09_,                                /* 09 -$24 */
          (void*)F1342_FIO1_08_,                                /* 08 -$20 */
          (void*)F1321_FIO1_07_SubstituteStringInFileName,      /* 07 -$1C */
          (void*)F1343_FIO1_06_,                                /* 06 -$18 */
          (void*)F1326_FIO1_05_FormatSaveDisk,                  /* 05 -$14 */
          (void*)F1325_FIO1_04_IsDiskWriteable,                 /* 04 -$10 */
          (void*)F1307_FIO1_03_Expunge,                         /* 03 -$0C */
          NULL,                                                 /* 02 -$08 */
          NULL                                                  /* 01 -$04 */
} };


void F1306_Unreferenced(
)
{
        ASM_STUB_PREFIX
        ASM_STUB_SUFFIX
}

void main(
FTL_LIBRARY* P4400_ps_FTLLibrary)
{
        G3320_s_FIO1Library.Data.FTLLibrary.FTLNode.Name = FTL_FIO1;
        G3320_s_FIO1Library.Data.FTLLibrary.Version = 1;
        G3320_s_FIO1Library.Data.FTLLibrary.Unused1 = 0;
        F1305_OpenFTLLibrary(P4400_ps_FTLLibrary, &G3320_s_FIO1Library.Data.FTLLibrary);
}

FIO1_FTL_LIBRARY* F1305_OpenFTLLibrary(
FTL_LIBRARY* P4403_ps_FTLLibrary_PRIM,
register FTL_LIBRARY* P4404_ps_FTLLibrary_FIO1)
{
        if (F9008_OpenPRIM(P4403_ps_FTLLibrary_PRIM, 4) == NULL) {
                return NULL;
        }
        G3318_FIO1base = P4404_ps_FTLLibrary_FIO1;
        F1088_OpenAmigaStuff();
        F1316_InitializeLibrary();
        return P4404_ps_FTLLibrary_FIO1;
}

void F1307_FIO1_03_Expunge(
)
{
        ASM_STUB_PREFIX
        F1317_UninitializeLibrary();
        F1089_CloseAmigaStuff();
        F9009_ClosePRIM();
        ASM_STUB_SUFFIX
}
#endif
