/*
** This file was automatically generated by fdtrans 52.1.
** Do not edit it by hand. Instead, edit the sfd file
** that was used to generate this file
*/

#ifdef __USE_INLINE__
#undef __USE_INLINE__
#endif
#ifndef __NOGLOBALIFACE__
#define __NOGLOBALIFACE__
#endif

#include <exec/interfaces.h>
#include <exec/libraries.h>
#include <exec/emulation.h>
#include <interfaces/exec.h>
#include <interfaces/xfdmaster.h>
#include <proto/xfdmaster.h>


static inline int8  convert_int8 (uint32 x) { return x; }
static inline int16 convert_int16(uint32 x) { return x; }


STATIC struct Library * stub_OpenPPC(uint32 *regarray)
{
    struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
    struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
    struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;

    return Self->Open(0);
}
STATIC CONST struct EmuTrap stub_Open = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_OpenPPC };

STATIC APTR stub_ClosePPC(uint32 *regarray)
{
    struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
    struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
    struct LibraryManagerInterface *Self = (struct LibraryManagerInterface *) ExtLib->ILibrary;

    return Self->Close();
}
STATIC CONST struct EmuTrap stub_Close = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_ClosePPC };

STATIC APTR stub_ExpungePPC(uint32 *regarray UNUSED)
{
    return NULL;
}
STATIC CONST struct EmuTrap stub_Expunge = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_ExpungePPC };

STATIC uint32 stub_ReservedPPC(uint32 *regarray UNUSED)
{
    return 0;
}
STATIC CONST struct EmuTrap stub_Reserved = { TRAPINST, TRAPTYPE, stub_ReservedPPC };

static struct xfdBufferInfo * stub_xfdAllocBufferInfoPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdAllocBufferInfo(
	);
}
STATIC CONST struct EmuTrap stub_xfdAllocBufferInfo = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdAllocBufferInfoPPC };

static void stub_xfdFreeBufferInfoPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	Self->xfdFreeBufferInfo(
		(struct xfdBufferInfo *)regarray[9]
	);
}
STATIC CONST struct EmuTrap stub_xfdFreeBufferInfo = { TRAPINST, TRAPTYPENR, (uint32 (*)(uint32 *))stub_xfdFreeBufferInfoPPC };

static struct xfdSegmentInfo * stub_xfdAllocSegmentInfoPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdAllocSegmentInfo(
	);
}
STATIC CONST struct EmuTrap stub_xfdAllocSegmentInfo = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdAllocSegmentInfoPPC };

static void stub_xfdFreeSegmentInfoPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	Self->xfdFreeSegmentInfo(
		(struct xfdSegmentInfo *)regarray[9]
	);
}
STATIC CONST struct EmuTrap stub_xfdFreeSegmentInfo = { TRAPINST, TRAPTYPENR, (uint32 (*)(uint32 *))stub_xfdFreeSegmentInfoPPC };

static BOOL stub_xfdRecogBufferPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdRecogBuffer(
		(struct xfdBufferInfo *)regarray[8]
	);
}
STATIC CONST struct EmuTrap stub_xfdRecogBuffer = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdRecogBufferPPC };

static BOOL stub_xfdDecrunchBufferPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdDecrunchBuffer(
		(struct xfdBufferInfo *)regarray[8]
	);
}
STATIC CONST struct EmuTrap stub_xfdDecrunchBuffer = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdDecrunchBufferPPC };

static BOOL stub_xfdRecogSegmentPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdRecogSegment(
		(struct xfdSegmentInfo *)regarray[8]
	);
}
STATIC CONST struct EmuTrap stub_xfdRecogSegment = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdRecogSegmentPPC };

static BOOL stub_xfdDecrunchSegmentPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdDecrunchSegment(
		(struct xfdSegmentInfo *)regarray[8]
	);
}
STATIC CONST struct EmuTrap stub_xfdDecrunchSegment = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdDecrunchSegmentPPC };

static CONST_STRPTR stub_xfdGetErrorTextPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdGetErrorText(
		(ULONG)regarray[0]
	);
}
STATIC CONST struct EmuTrap stub_xfdGetErrorText = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdGetErrorTextPPC };

static BOOL stub_xfdTestHunkStructurePPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdTestHunkStructure(
		(APTR)regarray[8],
		(ULONG)regarray[0]
	);
}
STATIC CONST struct EmuTrap stub_xfdTestHunkStructure = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdTestHunkStructurePPC };

static UWORD stub_xfdTestHunkStructureNewPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdTestHunkStructureNew(
		(APTR)regarray[8],
		(ULONG)regarray[0]
	);
}
STATIC CONST struct EmuTrap stub_xfdTestHunkStructureNew = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdTestHunkStructureNewPPC };

static UWORD stub_xfdRelocatePPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdRelocate(
		(APTR)regarray[8],
		(ULONG)regarray[0],
		(ULONG *)regarray[9],
		(ULONG)regarray[1]
	);
}
STATIC CONST struct EmuTrap stub_xfdRelocate = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdRelocatePPC };

static UWORD stub_xfdTestHunkStructureFlagsPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdTestHunkStructureFlags(
		(APTR)regarray[8],
		(ULONG)regarray[0],
		(ULONG)regarray[1]
	);
}
STATIC CONST struct EmuTrap stub_xfdTestHunkStructureFlags = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdTestHunkStructureFlagsPPC };

static UWORD stub_xfdStripHunksPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdStripHunks(
		(APTR)regarray[8],
		(ULONG)regarray[0],
		(ULONG *)regarray[9],
		(ULONG)regarray[1]
	);
}
STATIC CONST struct EmuTrap stub_xfdStripHunks = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdStripHunksPPC };

static APTR stub_xfdAllocObjectPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdAllocObject(
		(ULONG)regarray[0]
	);
}
STATIC CONST struct EmuTrap stub_xfdAllocObject = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdAllocObjectPPC };

static void stub_xfdFreeObjectPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	Self->xfdFreeObject(
		(APTR)regarray[9]
	);
}
STATIC CONST struct EmuTrap stub_xfdFreeObject = { TRAPINST, TRAPTYPENR, (uint32 (*)(uint32 *))stub_xfdFreeObjectPPC };

static BOOL stub_xfdRecogLinkerPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdRecogLinker(
		(struct xfdLinkerInfo *)regarray[8]
	);
}
STATIC CONST struct EmuTrap stub_xfdRecogLinker = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdRecogLinkerPPC };

static BOOL stub_xfdUnlinkPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdUnlink(
		(struct xfdLinkerInfo *)regarray[8]
	);
}
STATIC CONST struct EmuTrap stub_xfdUnlink = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdUnlinkPPC };

static UWORD stub_xfdScanDataPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdScanData(
		(APTR)regarray[8],
		(ULONG)regarray[0],
		(ULONG *)regarray[9],
		(ULONG)regarray[1],
		(struct xfdScanHook *)regarray[10]
	);
}
STATIC CONST struct EmuTrap stub_xfdScanData = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdScanDataPPC };

static void stub_xfdFreeScanListPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	Self->xfdFreeScanList(
		(struct xfdScanNode *)regarray[9]
	);
}
STATIC CONST struct EmuTrap stub_xfdFreeScanList = { TRAPINST, TRAPTYPENR, (uint32 (*)(uint32 *))stub_xfdFreeScanListPPC };

static ULONG stub_xfdObjectTypePPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdObjectType(
		(APTR)regarray[9]
	);
}
STATIC CONST struct EmuTrap stub_xfdObjectType = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdObjectTypePPC };

static struct xfdScanHook * stub_xfdInitScanHookPPC(uint32 *regarray)
{
	struct Library *Base = (struct Library *) regarray[REG68K_A6/4];
	struct ExtendedLibrary *ExtLib = (struct ExtendedLibrary *) ((uint32)Base + Base->lib_PosSize);
	struct xfdMasterIFace *Self = (struct xfdMasterIFace *) ExtLib->MainIFace;

	return Self->xfdInitScanHook(
		(BOOL (*)())regarray[8],
		(APTR)regarray[9]
	);
}
STATIC CONST struct EmuTrap stub_xfdInitScanHook = { TRAPINST, TRAPTYPE, (uint32 (*)(uint32 *))stub_xfdInitScanHookPPC };

CONST CONST_APTR VecTable68K[] =
{
	&stub_Open,
	&stub_Close,
	&stub_Expunge,
	&stub_Reserved,
	&stub_xfdAllocBufferInfo,
	&stub_xfdFreeBufferInfo,
	&stub_xfdAllocSegmentInfo,
	&stub_xfdFreeSegmentInfo,
	&stub_xfdRecogBuffer,
	&stub_xfdDecrunchBuffer,
	&stub_xfdRecogSegment,
	&stub_xfdDecrunchSegment,
	&stub_xfdGetErrorText,
	&stub_xfdTestHunkStructure,
	&stub_xfdTestHunkStructureNew,
	&stub_xfdRelocate,
	&stub_xfdTestHunkStructureFlags,
	&stub_xfdStripHunks,
	&stub_xfdAllocObject,
	&stub_xfdFreeObject,
	&stub_xfdRecogLinker,
	&stub_xfdUnlink,
	&stub_xfdScanData,
	&stub_xfdFreeScanList,
	&stub_xfdObjectType,
	&stub_xfdInitScanHook,
	(CONST_APTR)-1
};
