// AUTOGENERATED by scripts/genToolbox.py from NList.Data.
// DO NOT EDIT by hand — regenerate to update.
// Source: tools/nlist/NList.Data.txt (Dave Lyons' NiftyList database).
//
// Complete IIgs toolbox + GS/OS surface (~2000 routines).
// Names match Apple's IIgs Toolbox Reference (TLStartUp,
// MMStartUp, NewWindow, SysBeep, etc.).  Multi-arg wrappers
// (those whose stub body uses memory operands) live in
// runtime/src/iigsToolbox.s; zero-arg / single-arg simple
// ones are inlined here.

#ifndef IIGS_TOOLBOX_H
#define IIGS_TOOLBOX_H

#ifdef __cplusplus
extern "C" {
#endif

// IigsCursorT - opaque handle for the QD CursorRecord layout.
// Apple/ORCA `Cursor` is variable-length (cursorData[] and
// cursorMask[] sized by cursorHeight/cursorWidth), so we expose
// it as an opaque blob.  Use iigs/cursor.h helpers to push/pop
// stock ROM shapes (arrow, busy) without poking the fields by
// hand.  Pointer-sized; pass to SetCursor() / GetCursorAdr().
typedef struct IigsCursorT IigsCursorT;

extern void Create(void * a0, unsigned short a1, unsigned short a2, unsigned long a3, unsigned short a4, unsigned long a5, unsigned long a6);  // 0x2001
extern void Destroy(void * a0);  // 0x2002
// tool 0x2003  set 0x03  (MiscTools)
static inline void OSShutdown(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2003\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void ChangePath(void * a0, void * a1, unsigned short a2);  // 0x2004
extern void GetFileInfo(void * a0, unsigned short a1, unsigned short a2, unsigned long a3, unsigned short a4, long long a5, long long a6, void * a7, unsigned long a8, unsigned long a9, unsigned long a10, unsigned long a11);  // 0x2006
extern void JudgeName(unsigned short a0, unsigned short a1, void * a2, unsigned short a3, void * a4, unsigned short a5);  // 0x2007
extern void Volume(void * a0, void * a1, unsigned long a2, unsigned long a3, unsigned short a4, unsigned short a5, unsigned short a6, unsigned short a7);  // 0x2008
extern void SetPrefix(unsigned short a0, void * a1);  // 0x2009
extern void GetPrefix(unsigned short a0, void * a1);  // 0x200A
extern void ClearBackup(void * a0);  // 0x200B
// tool 0x200C  set 0x0C  (TextTools)
static inline void SetSysPrefs(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x200C\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x200D  set 0x0D  (?)
static inline void Null(void) {
    __asm__ volatile (
        "ldx #0x200D\n"
        "jsl 0xe100a8\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void ExpandPath(void * a0, void * a1, unsigned short a2);  // 0x200E
// tool 0x200F  set 0x0F  (MenuManager)
static inline void GetSysPrefs(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x200F\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void Open(unsigned short a0, void * a1, unsigned short a2, unsigned short a3, unsigned short a4, unsigned short a5);  // 0x2010
extern void NewLine(unsigned short a0, unsigned short a1, unsigned short a2, void * a3);  // 0x2011
extern void Read(unsigned short a0, void * a1, unsigned long a2, unsigned long a3, unsigned short a4);  // 0x2012
extern void Write(unsigned short a0, void * a1, unsigned long a2, unsigned long a3, unsigned short a4);  // 0x2013
// tool 0x2014  set 0x14  (LineEdit)
static inline void Close(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2014\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void Flush(unsigned short a0, unsigned short a1);  // 0x2015
extern void SetMark(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x2016
extern void GetMark(unsigned short a0, unsigned long a1);  // 0x2017
extern void SetEOF(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x2018
extern void GetEOF(unsigned short a0, unsigned long a1);  // 0x2019
extern void SetLevel(unsigned short a0, unsigned short a1);  // 0x201A
extern void GetLevel(unsigned short a0, unsigned short a1);  // 0x201B
extern void GetDirEntry(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, void * a4, unsigned short a5, unsigned short a6, unsigned long a7, unsigned long a8, long long a9, long long a10, unsigned short a11, unsigned long a12, unsigned short a13, void * a14, unsigned long a15, unsigned long a16);  // 0x201C
// tool 0x201D  set 0x1D  (ACETools)
static inline void BeginSession(void) {
    __asm__ volatile (
        "ldx #0x201D\n"
        "jsl 0xe100a8\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x201E  set 0x1E  (ResourceManager)
static inline void EndSession(void) {
    __asm__ volatile (
        "ldx #0x201E\n"
        "jsl 0xe100a8\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x201F  set 0x1F  (MIDITools)
static inline void SessionStatus(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x201F\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void GetDevNumber(void * a0, unsigned short a1);  // 0x2020
extern void Format(void * a0, void * a1, unsigned short a2, unsigned short a3, unsigned short a4, unsigned short a5);  // 0x2024
extern void EraseDisk(void * a0, void * a1, unsigned short a2, unsigned short a3, unsigned short a4, unsigned short a5);  // 0x2025
// tool 0x2026  set 0x26  (?)
static inline void ResetCache(void) {
    __asm__ volatile (
        "ldx #0x2026\n"
        "jsl 0xe100a8\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void GetName(void * a0);  // 0x2027
extern void GetBootvol(void * a0);  // 0x2028
extern void Quit(void * a0, unsigned short a1);  // 0x2029
// tool 0x202A  set 0x2A  (?)
static inline void GetVersion(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x202A\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void GetFSTInfo(unsigned short a0, unsigned short a1, void * a2, unsigned short a3, unsigned short a4, unsigned short a5, unsigned long a6, unsigned long a7);  // 0x202B
extern void DInfo(unsigned short a0, void * a1, unsigned short a2, unsigned long a3, unsigned short a4, unsigned short a5, unsigned short a6, unsigned short a7, void * a8, void * a9);  // 0x202C
extern void DStatus(unsigned short a0, unsigned short a1, void * a2, unsigned long a3, unsigned long a4);  // 0x202D
extern void DControl(unsigned short a0, unsigned short a1, void * a2, unsigned long a3, unsigned long a4);  // 0x202E
extern void DRead(unsigned short a0, void * a1, unsigned long a2, unsigned long a3, unsigned short a4, unsigned long a5);  // 0x202F
extern void DWrite(unsigned short a0, void * a1, unsigned long a2, unsigned long a3, unsigned short a4, unsigned long a5);  // 0x2030
extern void BindInt(unsigned short a0, unsigned short a1, void * a2);  // 0x2031
// tool 0x2032  set 0x32  (MediaControl2)
static inline void UnbindInt(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2032\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x2033  set 0x33  (?)
static inline void FSTSpecific(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2033\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void AddNotifyProc(void * a0);  // 0x2034
extern void DelNotifyProc(void * a0);  // 0x2035
extern void DRename(unsigned short a0, void * a1);  // 0x2036
extern void GetStdRefNum(unsigned short a0, unsigned short a1);  // 0x2037
extern void GetRefNum(void * a0, unsigned short a1, unsigned short a2, unsigned short a3, unsigned short a4, unsigned short a5);  // 0x2038
extern void GetRefInfo(unsigned short a0, unsigned short a1, void * a2, unsigned short a3, unsigned short a4);  // 0x2039
extern void SetStdRefNum(unsigned short a0, unsigned short a1);  // 0x203A
// tool 0x0101  set 0x01  (ToolLocator)
static inline void TLBootInit(void) {
    __asm__ volatile (
        "ldx #0x0101\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0201  set 0x01  (ToolLocator)
static inline void TLStartUp(void) {
    __asm__ volatile (
        "ldx #0x0201\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0301  set 0x01  (ToolLocator)
static inline void TLShutDown(void) {
    __asm__ volatile (
        "ldx #0x0301\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0401  set 0x01  (ToolLocator)
static inline unsigned short TLVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0401\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0501  set 0x01  (ToolLocator)
static inline void TLReset(void) {
    __asm__ volatile (
        "ldx #0x0501\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0601  set 0x01  (ToolLocator)
static inline unsigned short TLStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0601\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * GetTSPtr(unsigned short a0, unsigned short a1);  // 0x0901
extern void SetTSPtr(unsigned short a0, unsigned short a1, void * a2);  // 0x0A01
extern void * GetFuncPtr(unsigned short a0, unsigned short a1);  // 0x0B01
extern void * GetWAP(unsigned short a0, unsigned short a1);  // 0x0C01
extern void SetWAP(unsigned short a0, unsigned short a1, void * a2);  // 0x0D01
extern void LoadTools(void * a0);  // 0x0E01
extern void LoadOneTool(unsigned short a0, unsigned short a1);  // 0x0F01
// tool 0x1001  set 0x01  (ToolLocator)
static inline void UnloadOneTool(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1001\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern unsigned short TLMountVolume(unsigned short a0, unsigned short a1, void * a2, void * a3, void * a4, void * a5);  // 0x1101
extern unsigned short TLTextMountVolume(void * a0, void * a1, void * a2, void * a3);  // 0x1201
extern void * SaveTextState(void);  // 0x1301
extern void RestoreTextState(void * a0);  // 0x1401
extern void MessageCenter(unsigned short a0, unsigned short a1, void * a2);  // 0x1501
// tool 0x1601  set 0x01  (ToolLocator)
static inline void SetDefaultTPT(void) {
    __asm__ volatile (
        "ldx #0x1601\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned long MessageByName(unsigned short a0, void * a1);  // 0x1701
extern unsigned long StartUpTools(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x1801
extern void ShutDownTools(unsigned short a0, unsigned long a1);  // 0x1901
extern void * GetMsgHandle(unsigned short a0, unsigned long a1);  // 0x1A01
extern void AcceptRequests(void * a0, unsigned short a1, void * a2);  // 0x1B01
extern void SendRequest(unsigned short a0, unsigned short a1, unsigned long a2, void * a3, void * a4);  // 0x1C01
// tool 0x0102  set 0x02  (MemoryManager)
static inline void MMBootInit(void) {
    __asm__ volatile (
        "ldx #0x0102\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0202  set 0x02  (MemoryManager)
static inline unsigned short MMStartUp(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0202\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0302  set 0x02  (MemoryManager)
static inline void MMShutDown(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0302\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0402  set 0x02  (MemoryManager)
static inline unsigned short MMVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0402\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0502  set 0x02  (MemoryManager)
static inline void MMReset(void) {
    __asm__ volatile (
        "ldx #0x0502\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0602  set 0x02  (MemoryManager)
static inline unsigned short MMStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0602\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * NewHandle(unsigned long a0, unsigned short a1, unsigned short a2, void * a3);  // 0x0902
extern void ReAllocHandle(unsigned long a0, unsigned short a1, unsigned short a2, void * a3, void * a4);  // 0x0A02
extern void RestoreHandle(void * a0);  // 0x0B02
extern void AddToOOMQueue(void * a0);  // 0x0C02
extern void RemoveFromOOMQueue(void * a0);  // 0x0D02
extern void DisposeHandle(void * a0);  // 0x1002
// tool 0x1102  set 0x02  (MemoryManager)
static inline void DisposeAll(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1102\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void PurgeHandle(void * a0);  // 0x1202
// tool 0x1302  set 0x02  (MemoryManager)
static inline void PurgeAll(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1302\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern unsigned long GetHandleSize(void * a0);  // 0x1802
extern void SetHandleSize(unsigned long a0, void * a1);  // 0x1902
extern void * FindHandle(void * a0);  // 0x1A02
extern unsigned long FreeMem(void);  // 0x1B02
extern unsigned long MaxBlock(void);  // 0x1C02
extern unsigned long TotalMem(void);  // 0x1D02
extern void CheckHandle(void * a0);  // 0x1E02
// tool 0x1F02  set 0x02  (MemoryManager)
static inline void CompactMem(void) {
    __asm__ volatile (
        "ldx #0x1F02\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void HLock(void * a0);  // 0x2002
// tool 0x2102  set 0x02  (MemoryManager)
static inline void HLockAll(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2102\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void HUnlock(void * a0);  // 0x2202
// tool 0x2302  set 0x02  (MemoryManager)
static inline void HUnlockAll(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2302\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SetPurge(unsigned short a0, void * a1);  // 0x2402
extern void SetPurgeAll(unsigned short a0, unsigned short a1);  // 0x2502
extern void PtrToHand(void * a0, void * a1, unsigned long a2);  // 0x2802
extern void HandToPtr(void * a0, void * a1, unsigned long a2);  // 0x2902
extern void HandToHand(void * a0, void * a1, unsigned long a2);  // 0x2A02
extern void BlockMove(void * a0, void * a1, unsigned long a2);  // 0x2B02
extern unsigned long RealFreeMem(void);  // 0x2F02
extern unsigned short SetHandleID(unsigned short a0, unsigned short a1);  // 0x3002
// tool 0x0103  set 0x03  (MiscTools)
static inline void MTBootInit(void) {
    __asm__ volatile (
        "ldx #0x0103\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0203  set 0x03  (MiscTools)
static inline void MTStartUp(void) {
    __asm__ volatile (
        "ldx #0x0203\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0303  set 0x03  (MiscTools)
static inline void MTShutDown(void) {
    __asm__ volatile (
        "ldx #0x0303\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0403  set 0x03  (MiscTools)
static inline unsigned short MTVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0403\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0503  set 0x03  (MiscTools)
static inline void MTReset(void) {
    __asm__ volatile (
        "ldx #0x0503\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0603  set 0x03  (MiscTools)
static inline unsigned short MTStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0603\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void WriteBRam(void * a0);  // 0x0903
extern void ReadBRam(void * a0);  // 0x0A03
extern void WriteBParam(unsigned short a0, unsigned short a1);  // 0x0B03
// tool 0x0C03  set 0x03  (MiscTools)
static inline unsigned short ReadBParam(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0C03\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern long long ReadTimeHex(void);  // 0x0D03
extern void WriteTimeHex(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x0E03
extern void ReadAsciiTime(void * a0);  // 0x0F03
extern void SetVector(unsigned short a0, void * a1);  // 0x1003
extern void * GetVector(unsigned short a0);  // 0x1103
extern void SetHeartBeat(void * a0);  // 0x1203
extern void DelHeartBeat(void * a0);  // 0x1303
// tool 0x1403  set 0x03  (MiscTools)
static inline void ClrHeartBeat(void) {
    __asm__ volatile (
        "ldx #0x1403\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SysFailMgr(unsigned short a0, void * a1);  // 0x1503
extern void * GetAddr(unsigned short a0);  // 0x1603
extern void * ReadMouse(void);  // 0x1703
// tool 0x1803  set 0x03  (MiscTools)
static inline void InitMouse(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1803\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1903  set 0x03  (MiscTools)
static inline void SetMouse(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1903\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1A03  set 0x03  (MiscTools)
static inline void HomeMouse(void) {
    __asm__ volatile (
        "ldx #0x1A03\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x1B03  set 0x03  (MiscTools)
static inline void ClearMouse(void) {
    __asm__ volatile (
        "ldx #0x1B03\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void ClampMouse(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x1C03
extern long long GetMouseClamp(void);  // 0x1D03
extern void PosMouse(unsigned short a0, unsigned short a1);  // 0x1E03
// tool 0x1F03  set 0x03  (MiscTools)
static inline unsigned short ServeMouse(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1F03\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x2003  set 0x03  (MiscTools)
static inline unsigned short GetNewID(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x2003\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x2103  set 0x03  (MiscTools)
static inline void DeleteID(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2103\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x2203  set 0x03  (MiscTools)
static inline void StatusID(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2203\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x2303  set 0x03  (MiscTools)
static inline void IntSource(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2303\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern long long FWEntry(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x2403
extern unsigned long GetTick(void);  // 0x2503
extern unsigned short PackBytes(void * a0, void * a1, void * a2, unsigned short a3);  // 0x2603
extern unsigned short UnPackBytes(void * a0, unsigned short a1, void * a2, void * a3);  // 0x2703
extern unsigned short Munger(void * a0, void * a1, void * a2, unsigned short a3, void * a4, unsigned short a5, void * a6);  // 0x2803
// tool 0x2903  set 0x03  (MiscTools)
static inline unsigned short GetIRQEnable(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x2903\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetAbsClamp(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x2A03
extern long long GetAbsClamp(void);  // 0x2B03
// tool 0x2C03  set 0x03  (MiscTools)
static inline void SysBeep(void) {
    __asm__ volatile (
        "ldx #0x2C03\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void AddToQueue(void * a0, void * a1);  // 0x2E03
extern void DeleteFromQueue(void * a0, void * a1);  // 0x2F03
extern void SetInterruptState(void * a0, unsigned short a1);  // 0x3003
extern void GetInterruptState(void * a0, unsigned short a1);  // 0x3103
// tool 0x3203  set 0x03  (MiscTools)
static inline unsigned short GetIntStateRecSize(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x3203\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * ReadMouse2(void);  // 0x3303
extern void * GetCodeResConverter(void);  // 0x3403
extern unsigned short GetROMResource(unsigned short a0, unsigned long a1);  // 0x3503
extern void ReleaseROMResource(unsigned short a0, unsigned long a1);  // 0x3603
extern unsigned long ConvSeconds(unsigned short a0, unsigned long a1, void * a2);  // 0x3703
// tool 0x3803  set 0x03  (MiscTools)
static inline void SysBeep2(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x3803\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void VersionString(unsigned short a0, unsigned long a1, void * a2);  // 0x3903
extern unsigned short WaitUntil(unsigned short a0, unsigned short a1);  // 0x3A03
extern unsigned long StringToText(unsigned short a0, void * a1, unsigned short a2, void * a3);  // 0x3B03
extern void ShowBootInfo(void * a0, void * a1);  // 0x3C03
// tool 0x3D03  set 0x03  (MiscTools)
static inline unsigned short ScanDevices(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x3D03\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short AlertMessage(void * a0, unsigned short a1, void * a2);  // 0x3E03
extern unsigned short DoSysPrefs(unsigned short a0, unsigned short a1);  // 0x3F03
// tool 0x0104  set 0x04  (QuickDraw)
static inline void QDBootInit(void) {
    __asm__ volatile (
        "ldx #0x0104\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void QDStartUp(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x0204
// tool 0x0304  set 0x04  (QuickDraw)
static inline void QDShutDown(void) {
    __asm__ volatile (
        "ldx #0x0304\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0404  set 0x04  (QuickDraw)
static inline unsigned short QDVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0404\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0504  set 0x04  (QuickDraw)
static inline void QDReset(void) {
    __asm__ volatile (
        "ldx #0x0504\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0604  set 0x04  (QuickDraw)
static inline unsigned short QDStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0604\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * GetAddress(unsigned short a0);  // 0x0904
// tool 0x0A04  set 0x04  (QuickDraw)
static inline void GrafOn(void) {
    __asm__ volatile (
        "ldx #0x0A04\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0B04  set 0x04  (QuickDraw)
static inline void GrafOff(void) {
    __asm__ volatile (
        "ldx #0x0B04\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0C04  set 0x04  (QuickDraw)
static inline unsigned short GetStandardSCB(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0C04\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void InitColorTable(void * a0);  // 0x0D04
extern void SetColorTable(unsigned short a0, void * a1);  // 0x0E04
extern void GetColorTable(unsigned short a0, void * a1);  // 0x0F04
extern void SetColorEntry(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x1004
extern unsigned short GetColorEntry(unsigned short a0, unsigned short a1);  // 0x1104
extern void SetSCB(unsigned short a0, unsigned short a1);  // 0x1204
// tool 0x1304  set 0x04  (QuickDraw)
static inline unsigned short GetSCB(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1304\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1404  set 0x04  (QuickDraw)
static inline void SetAllSCBs(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1404\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1504  set 0x04  (QuickDraw)
static inline void ClearScreen(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1504\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1604  set 0x04  (QuickDraw)
static inline void SetMasterSCB(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1604\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1704  set 0x04  (QuickDraw)
static inline unsigned short GetMasterSCB(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1704\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void OpenPort(void * a0);  // 0x1804
extern void InitPort(void * a0);  // 0x1904
extern void ClosePort(void * a0);  // 0x1A04
extern void SetPort(void * a0);  // 0x1B04
extern void * GetPort(void);  // 0x1C04
extern void SetPortLoc(void * a0);  // 0x1D04
extern void GetPortLoc(void * a0);  // 0x1E04
extern void SetPortRect(void * a0);  // 0x1F04
extern void GetPortRect(void * a0);  // 0x2004
extern void SetPortSize(unsigned short a0, unsigned short a1);  // 0x2104
extern void MovePortTo(unsigned short a0, unsigned short a1);  // 0x2204
extern void SetOrigin(unsigned short a0, unsigned short a1);  // 0x2304
extern void SetClip(void * a0);  // 0x2404
extern void GetClip(void * a0);  // 0x2504
extern void ClipRect(void * a0);  // 0x2604
// tool 0x2704  set 0x04  (QuickDraw)
static inline void HidePen(void) {
    __asm__ volatile (
        "ldx #0x2704\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x2804  set 0x04  (QuickDraw)
static inline void ShowPen(void) {
    __asm__ volatile (
        "ldx #0x2804\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void GetPen(void * a0);  // 0x2904
extern void SetPenState(void * a0);  // 0x2A04
extern void GetPenState(void * a0);  // 0x2B04
extern void SetPenSize(unsigned short a0, unsigned short a1);  // 0x2C04
extern void GetPenSize(void * a0);  // 0x2D04
// tool 0x2E04  set 0x04  (QuickDraw)
static inline void SetPenMode(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2E04\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x2F04  set 0x04  (QuickDraw)
static inline unsigned short GetPenMode(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x2F04\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetPenPat(void * a0);  // 0x3004
extern void GetPenPat(void * a0);  // 0x3104
extern void SetPenMask(void * a0);  // 0x3204
extern void GetPenMask(void * a0);  // 0x3304
extern void SetBackPat(void * a0);  // 0x3404
extern void GetBackPat(void * a0);  // 0x3504
// tool 0x3604  set 0x04  (QuickDraw)
static inline void PenNormal(void) {
    __asm__ volatile (
        "ldx #0x3604\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x3704  set 0x04  (QuickDraw)
static inline void SetSolidPenPat(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x3704\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x3804  set 0x04  (QuickDraw)
static inline void SetSolidBackPat(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x3804\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SolidPattern(unsigned short a0, void * a1);  // 0x3904
extern void MoveTo(unsigned short a0, unsigned short a1);  // 0x3A04
extern void Move(unsigned short a0, unsigned short a1);  // 0x3B04
extern void LineTo(unsigned short a0, unsigned short a1);  // 0x3C04
extern void Line(unsigned short a0, unsigned short a1);  // 0x3D04
extern void SetPicSave(unsigned long a0);  // 0x3E04
extern unsigned long GetPicSave(void);  // 0x3F04
extern void SetRgnSave(unsigned long a0);  // 0x4004
extern unsigned long GetRgnSave(void);  // 0x4104
extern void SetPolySave(unsigned long a0);  // 0x4204
extern unsigned long GetPolySave(void);  // 0x4304
extern void SetGrafProcs(void * a0);  // 0x4404
extern void * GetGrafProcs(void);  // 0x4504
extern void SetUserField(unsigned long a0);  // 0x4604
extern unsigned long GetUserField(void);  // 0x4704
extern void SetSysField(unsigned long a0);  // 0x4804
extern unsigned long GetSysField(void);  // 0x4904
extern void SetRect(void * a0, unsigned short a1, unsigned short a2, unsigned short a3, unsigned short a4);  // 0x4A04
extern void OffsetRect(void * a0, unsigned short a1, unsigned short a2);  // 0x4B04
extern void InsetRect(void * a0, unsigned short a1, unsigned short a2);  // 0x4C04
extern unsigned short SectRect(void * a0, void * a1, void * a2);  // 0x4D04
extern void UnionRect(void * a0, void * a1, void * a2);  // 0x4E04
extern unsigned short PtInRect(void * a0, void * a1);  // 0x4F04
extern void Pt2Rect(void * a0, void * a1, void * a2);  // 0x5004
extern unsigned short EqualRect(void * a0, void * a1);  // 0x5104
extern unsigned short NotEmptyRect(void * a0);  // 0x5204
extern void FrameRect(void * a0);  // 0x5304
extern void PaintRect(void * a0);  // 0x5404
extern void EraseRect(void * a0);  // 0x5504
extern void InvertRect(void * a0);  // 0x5604
extern void FillRect(void * a0, void * a1);  // 0x5704
extern void FrameOval(void * a0);  // 0x5804
extern void PaintOval(void * a0);  // 0x5904
extern void EraseOval(void * a0);  // 0x5A04
extern void InvertOval(void * a0);  // 0x5B04
extern void FillOval(void * a0, void * a1);  // 0x5C04
extern void FrameRRect(void * a0, unsigned short a1, unsigned short a2);  // 0x5D04
extern void PaintRRect(void * a0, unsigned short a1, unsigned short a2);  // 0x5E04
extern void EraseRRect(void * a0, unsigned short a1, unsigned short a2);  // 0x5F04
extern void InvertRRect(void * a0, unsigned short a1, unsigned short a2);  // 0x6004
extern void FillRRect(void * a0, unsigned short a1, unsigned short a2, void * a3);  // 0x6104
extern void FrameArc(void * a0, unsigned short a1, unsigned short a2);  // 0x6204
extern void PaintArc(void * a0, unsigned short a1, unsigned short a2);  // 0x6304
extern void EraseArc(void * a0, unsigned short a1, unsigned short a2);  // 0x6404
extern void InvertArc(void * a0, unsigned short a1, unsigned short a2);  // 0x6504
extern void FillArc(void * a0, unsigned short a1, unsigned short a2, void * a3);  // 0x6604
extern void * NewRgn(void);  // 0x6704
extern void DisposeRgn(void * a0);  // 0x6804
extern void CopyRgn(void * a0, void * a1);  // 0x6904
extern void SetEmptyRgn(void * a0);  // 0x6A04
extern void SetRectRgn(void * a0, unsigned short a1, unsigned short a2, unsigned short a3, unsigned short a4);  // 0x6B04
extern void RectRgn(void * a0, void * a1);  // 0x6C04
// tool 0x6D04  set 0x04  (QuickDraw)
static inline void OpenRgn(void) {
    __asm__ volatile (
        "ldx #0x6D04\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void CloseRgn(void * a0);  // 0x6E04
extern void OffsetRgn(void * a0, unsigned short a1, unsigned short a2);  // 0x6F04
extern void InsetRgn(void * a0, unsigned short a1, unsigned short a2);  // 0x7004
extern void SectRgn(unsigned short a0, unsigned short a1, void * a2);  // 0x7104
extern void UnionRgn(unsigned short a0, unsigned short a1, void * a2);  // 0x7204
extern void DiffRgn(unsigned short a0, unsigned short a1, void * a2);  // 0x7304
extern void XorRgn(unsigned short a0, unsigned short a1, void * a2);  // 0x7404
extern unsigned short PtInRgn(void * a0, void * a1);  // 0x7504
extern unsigned short RectInRgn(void * a0, void * a1);  // 0x7604
extern unsigned short EqualRgn(unsigned short a0, unsigned short a1);  // 0x7704
extern unsigned short EmptyRgn(void * a0);  // 0x7804
extern void FrameRgn(void * a0);  // 0x7904
extern void PaintRgn(void * a0);  // 0x7A04
extern void EraseRgn(void * a0);  // 0x7B04
extern void InvertRgn(void * a0);  // 0x7C04
extern void FillRgn(void * a0, void * a1);  // 0x7D04
extern void ScrollRect(void * a0, unsigned short a1, unsigned short a2, void * a3);  // 0x7E04
extern void PaintPixels(void * a0);  // 0x7F04
extern void AddPt(void * a0, void * a1);  // 0x8004
extern void SubPt(void * a0, void * a1);  // 0x8104
extern void SetPt(void * a0, unsigned short a1, unsigned short a2);  // 0x8204
extern unsigned short EqualPt(void * a0, void * a1);  // 0x8304
extern void LocalToGlobal(void * a0);  // 0x8404
extern void GlobalToLocal(void * a0);  // 0x8504
// tool 0x8604  set 0x04  (QuickDraw)
static inline unsigned short Random(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x8604\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetRandSeed(unsigned long a0);  // 0x8704
extern unsigned short GetPixel(unsigned short a0, unsigned short a1);  // 0x8804
extern void ScalePt(void * a0, void * a1, void * a2);  // 0x8904
extern void MapPt(void * a0, void * a1, void * a2);  // 0x8A04
extern void MapRect(void * a0, void * a1, void * a2);  // 0x8B04
extern void MapRgn(void * a0, void * a1, void * a2);  // 0x8C04
extern void SetStdProcs(void * a0);  // 0x8D04
extern void SetCursor(void * a0);  // 0x8E04
extern void * GetCursorAdr(void);  // 0x8F04
// tool 0x9004  set 0x04  (QuickDraw)
static inline void HideCursor(void) {
    __asm__ volatile (
        "ldx #0x9004\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x9104  set 0x04  (QuickDraw)
static inline void ShowCursor(void) {
    __asm__ volatile (
        "ldx #0x9104\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x9204  set 0x04  (QuickDraw)
static inline void ObscureCursor(void) {
    __asm__ volatile (
        "ldx #0x9204\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SetFont(void * a0);  // 0x9404
extern void * GetFont(void);  // 0x9504
extern void GetFontInfo(void * a0);  // 0x9604
extern void GetFontGlobals(void * a0);  // 0x9704
// tool 0x9804  set 0x04  (QuickDraw)
static inline void SetFontFlags(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x9804\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x9904  set 0x04  (QuickDraw)
static inline unsigned short GetFontFlags(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x9904\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x9A04  set 0x04  (QuickDraw)
static inline void SetTextFace(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x9A04\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x9B04  set 0x04  (QuickDraw)
static inline unsigned short GetTextFace(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x9B04\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x9C04  set 0x04  (QuickDraw)
static inline void SetTextMode(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x9C04\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x9D04  set 0x04  (QuickDraw)
static inline unsigned short GetTextMode(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x9D04\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x9E04  set 0x04  (QuickDraw)
static inline void SetSpaceExtra(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x9E04\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x9F04  set 0x04  (QuickDraw)
static inline unsigned short GetSpaceExtra(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x9F04\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0xA004  set 0x04  (QuickDraw)
static inline void SetForeColor(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xA004\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0xA104  set 0x04  (QuickDraw)
static inline unsigned short GetForeColor(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0xA104\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0xA204  set 0x04  (QuickDraw)
static inline void SetBackColor(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xA204\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0xA304  set 0x04  (QuickDraw)
static inline unsigned short GetBackColor(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0xA304\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0xA404  set 0x04  (QuickDraw)
static inline void DrawChar(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xA404\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void DrawString(void * a0);  // 0xA504
extern void DrawCString(void * a0);  // 0xA604
extern void DrawText(void * a0, unsigned short a1);  // 0xA704
// tool 0xA804  set 0x04  (QuickDraw)
static inline unsigned short CharWidth(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0xA804\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short StringWidth(void * a0);  // 0xA904
extern unsigned short CStringWidth(void * a0);  // 0xAA04
extern unsigned short TextWidth(void * a0, unsigned short a1);  // 0xAB04
extern void CharBounds(unsigned short a0, void * a1);  // 0xAC04
extern void StringBounds(void * a0, void * a1);  // 0xAD04
extern void CStringBounds(void * a0, void * a1);  // 0xAE04
extern void TextBounds(void * a0, unsigned short a1, void * a2);  // 0xAF04
// tool 0xB004  set 0x04  (QuickDraw)
static inline void SetArcRot(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xB004\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0xB104  set 0x04  (QuickDraw)
static inline unsigned short GetArcRot(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0xB104\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetSysFont(void * a0);  // 0xB204
extern void * GetSysFont(void);  // 0xB304
extern void SetVisRgn(void * a0);  // 0xB404
extern void GetVisRgn(void * a0);  // 0xB504
// tool 0xB604  set 0x04  (QuickDraw)
static inline void SetIntUse(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xB604\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void * OpenPicture(void * a0);  // 0xB704
extern void PicComment(unsigned short a0, unsigned short a1, void * a2);  // 0xB804
// tool 0xB904  set 0x04  (QuickDraw)
static inline void ClosePicture(void) {
    __asm__ volatile (
        "ldx #0xB904\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void DrawPicture(void * a0, void * a1);  // 0xBA04
extern void KillPicture(void * a0);  // 0xBB04
extern void FramePoly(void * a0);  // 0xBC04
extern void PaintPoly(void * a0);  // 0xBD04
extern void ErasePoly(void * a0);  // 0xBE04
extern void InvertPoly(void * a0);  // 0xBF04
extern void FillPoly(void * a0, void * a1);  // 0xC004
extern void * OpenPoly(void);  // 0xC104
// tool 0xC204  set 0x04  (QuickDraw)
static inline void ClosePoly(void) {
    __asm__ volatile (
        "ldx #0xC204\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void KillPoly(void * a0);  // 0xC304
extern void OffsetPoly(void * a0, unsigned short a1, unsigned short a2);  // 0xC404
extern void MapPoly(void * a0, void * a1, void * a2);  // 0xC504
extern void SetClipHandle(void * a0);  // 0xC604
extern void * GetClipHandle(void);  // 0xC704
extern void SetVisHandle(void * a0);  // 0xC804
extern void * GetVisHandle(void);  // 0xC904
// tool 0xCA04  set 0x04  (QuickDraw)
static inline void InitCursor(void) {
    __asm__ volatile (
        "ldx #0xCA04\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SetBufDims(unsigned short a0, unsigned short a1, unsigned short a2);  // 0xCB04
extern void ForceBufDims(unsigned short a0, unsigned short a1, unsigned short a2);  // 0xCC04
extern void SaveBufDims(void * a0);  // 0xCD04
extern void RestoreBufDims(void * a0);  // 0xCE04
// tool 0xCF04  set 0x04  (QuickDraw)
static inline unsigned short GetFGSize(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0xCF04\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetFontID(unsigned long a0);  // 0xD004
extern unsigned long GetFontID(void);  // 0xD104
// tool 0xD204  set 0x04  (QuickDraw)
static inline void SetTextSize(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xD204\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0xD304  set 0x04  (QuickDraw)
static inline unsigned short GetTextSize(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0xD304\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0xD404  set 0x04  (QuickDraw)
static inline void SetCharExtra(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xD404\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0xD504  set 0x04  (QuickDraw)
static inline unsigned short GetCharExtra(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0xD504\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void PPToPort(void * a0, void * a1, unsigned short a2, unsigned short a3, unsigned short a4);  // 0xD604
extern void InflateTextBuffer(unsigned short a0, unsigned short a1);  // 0xD704
extern void GetRomFont(void * a0);  // 0xD804
extern unsigned short GetFontLore(void * a0, unsigned short a1);  // 0xD904
extern void * Get640Colors(void);  // 0xDA04
// tool 0xDB04  set 0x04  (QuickDraw)
static inline void Set640Color(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0xDB04\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0105  set 0x05  (DeskManager)
static inline void DeskBootInit(void) {
    __asm__ volatile (
        "ldx #0x0105\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0205  set 0x05  (DeskManager)
static inline void DeskStartUp(void) {
    __asm__ volatile (
        "ldx #0x0205\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0305  set 0x05  (DeskManager)
static inline void DeskShutDown(void) {
    __asm__ volatile (
        "ldx #0x0305\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0405  set 0x05  (DeskManager)
static inline unsigned short DeskVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0405\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0505  set 0x05  (DeskManager)
static inline void DeskReset(void) {
    __asm__ volatile (
        "ldx #0x0505\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0605  set 0x05  (DeskManager)
static inline unsigned short DeskStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0605\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0905  set 0x05  (DeskManager)
static inline void SaveScrn(void) {
    __asm__ volatile (
        "ldx #0x0905\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0A05  set 0x05  (DeskManager)
static inline void RestScrn(void) {
    __asm__ volatile (
        "ldx #0x0A05\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0B05  set 0x05  (DeskManager)
static inline void SaveAll(void) {
    __asm__ volatile (
        "ldx #0x0B05\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0C05  set 0x05  (DeskManager)
static inline void RestAll(void) {
    __asm__ volatile (
        "ldx #0x0C05\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0E05  set 0x05  (DeskManager)
static inline void InstallNDA(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0E05\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0F05  set 0x05  (DeskManager)
static inline void InstallCDA(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0F05\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1105  set 0x05  (DeskManager)
static inline void ChooseCDA(void) {
    __asm__ volatile (
        "ldx #0x1105\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SetDAStrPtr(void * a0, void * a1);  // 0x1305
extern void * GetDAStrPtr(void);  // 0x1405
// tool 0x1505  set 0x05  (DeskManager)
static inline unsigned short OpenNDA(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1505\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1605  set 0x05  (DeskManager)
static inline void CloseNDA(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1605\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SystemClick(void * a0, void * a1, unsigned short a2);  // 0x1705
// tool 0x1805  set 0x05  (DeskManager)
static inline unsigned short SystemEdit(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1805\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1905  set 0x05  (DeskManager)
static inline void SystemTask(void) {
    __asm__ volatile (
        "ldx #0x1905\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned short SystemEvent(unsigned short a0, unsigned long a1, unsigned long a2, unsigned long a3, unsigned short a4);  // 0x1A05
// tool 0x1B05  set 0x05  (DeskManager)
static inline unsigned short GetNumNDAs(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1B05\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void CloseNDAbyWinPtr(void * a0);  // 0x1C05
// tool 0x1D05  set 0x05  (DeskManager)
static inline void CloseAllNDAs(void) {
    __asm__ volatile (
        "ldx #0x1D05\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x1E05  set 0x05  (DeskManager)
static inline void FixAppleMenu(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1E05\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void AddToRunQ(void * a0);  // 0x1F05
extern void RemoveFromRunQ(void * a0);  // 0x2005
// tool 0x2105  set 0x05  (DeskManager)
static inline void RemoveCDA(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2105\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x2205  set 0x05  (DeskManager)
static inline void RemoveNDA(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2205\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void GetDeskAccInfo(unsigned short a0, unsigned long a1, unsigned short a2, void * a3);  // 0x2305
extern unsigned short CallDeskAcc(unsigned short a0, unsigned long a1, unsigned short a2, unsigned long a3);  // 0x2405
extern unsigned long GetDeskGlobal(unsigned short a0);  // 0x2505
// tool 0x0106  set 0x06  (EventManager)
static inline void EMBootInit(void) {
    __asm__ volatile (
        "ldx #0x0106\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void EMStartUp(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, unsigned short a4, unsigned short a5, unsigned short a6);  // 0x0206
// tool 0x0306  set 0x06  (EventManager)
static inline void EMShutDown(void) {
    __asm__ volatile (
        "ldx #0x0306\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0406  set 0x06  (EventManager)
static inline unsigned short EMVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0406\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0506  set 0x06  (EventManager)
static inline void EMReset(void) {
    __asm__ volatile (
        "ldx #0x0506\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0606  set 0x06  (EventManager)
static inline unsigned short EMStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0606\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0906  set 0x06  (EventManager)
static inline unsigned short DoWindows(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0906\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short GetNextEvent(unsigned short a0, void * a1);  // 0x0A06
extern unsigned short EventAvail(unsigned short a0, void * a1);  // 0x0B06
extern void GetMouse(void * a0);  // 0x0C06
// tool 0x0D06  set 0x06  (EventManager)
static inline unsigned short Button(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0D06\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0E06  set 0x06  (EventManager)
static inline unsigned short StillDown(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0E06\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0F06  set 0x06  (EventManager)
static inline unsigned short WaitMouseUp(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0F06\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned long TickCount(void);  // 0x1006
extern unsigned long GetDblTime(void);  // 0x1106
extern unsigned long GetCaretTime(void);  // 0x1206
// tool 0x1306  set 0x06  (EventManager)
static inline void SetSwitch(void) {
    __asm__ volatile (
        "ldx #0x1306\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned short PostEvent(unsigned short a0, unsigned long a1);  // 0x1406
extern unsigned short FlushEvents(unsigned short a0, unsigned short a1);  // 0x1506
extern unsigned short GetOSEvent(unsigned short a0, void * a1);  // 0x1606
extern unsigned short OSEventAvail(unsigned short a0, void * a1);  // 0x1706
// tool 0x1806  set 0x06  (EventManager)
static inline void SetEventMask(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1806\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void FakeMouse(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, unsigned short a4);  // 0x1906
// tool 0x1A06  set 0x06  (EventManager)
static inline void SetAutoKeyLimit(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1A06\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1B06  set 0x06  (EventManager)
static inline unsigned short GetKeyTranslation(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1B06\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1C06  set 0x06  (EventManager)
static inline void SetKeyTranslation(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1C06\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0107  set 0x07  (Scheduler)
static inline void SchBootInit(void) {
    __asm__ volatile (
        "ldx #0x0107\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0207  set 0x07  (Scheduler)
static inline void SchStartUp(void) {
    __asm__ volatile (
        "ldx #0x0207\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0307  set 0x07  (Scheduler)
static inline void SchShutDown(void) {
    __asm__ volatile (
        "ldx #0x0307\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0407  set 0x07  (Scheduler)
static inline unsigned short SchVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0407\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0507  set 0x07  (Scheduler)
static inline void SchReset(void) {
    __asm__ volatile (
        "ldx #0x0507\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0607  set 0x07  (Scheduler)
static inline unsigned short SchStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0607\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short SchAddTask(void * a0);  // 0x0907
// tool 0x0A07  set 0x07  (Scheduler)
static inline void SchFlush(void) {
    __asm__ volatile (
        "ldx #0x0A07\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0108  set 0x08  (SoundManager)
static inline void SoundBootInit(void) {
    __asm__ volatile (
        "ldx #0x0108\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0208  set 0x08  (SoundManager)
static inline void SoundStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0208\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0308  set 0x08  (SoundManager)
static inline void SoundShutDown(void) {
    __asm__ volatile (
        "ldx #0x0308\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0408  set 0x08  (SoundManager)
static inline unsigned short SoundVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0408\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0508  set 0x08  (SoundManager)
static inline void SoundReset(void) {
    __asm__ volatile (
        "ldx #0x0508\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0608  set 0x08  (SoundManager)
static inline unsigned short SoundToolStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0608\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void WriteRamBlock(void * a0, unsigned short a1, unsigned short a2);  // 0x0908
extern void ReadRamBlock(void * a0, unsigned short a1, unsigned short a2);  // 0x0A08
extern void * GetTableAddress(void);  // 0x0B08
// tool 0x0C08  set 0x08  (SoundManager)
static inline unsigned short GetSoundVolume(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0C08\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetSoundVolume(unsigned short a0, unsigned short a1);  // 0x0D08
extern void FFStartSound(unsigned short a0, void * a1);  // 0x0E08
// tool 0x0F08  set 0x08  (SoundManager)
static inline void FFStopSound(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0F08\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1008  set 0x08  (SoundManager)
static inline unsigned short FFSoundStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1008\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1108  set 0x08  (SoundManager)
static inline unsigned short FFGeneratorStatus(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1108\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetSoundMIRQV(void * a0);  // 0x1208
extern void * SetUserSoundIRQV(void * a0);  // 0x1308
// tool 0x1408  set 0x08  (SoundManager)
static inline unsigned short FFSoundDoneStatus(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1408\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void FFSetUpSound(unsigned short a0, void * a1);  // 0x1508
// tool 0x1608  set 0x08  (SoundManager)
static inline void FFStartPlaying(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1608\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SetDocReg(void * a0);  // 0x1708
extern void ReadDocReg(void * a0);  // 0x1808
// tool 0x0109  set 0x09  (AppleDeskBus)
static inline void ADBBootInit(void) {
    __asm__ volatile (
        "ldx #0x0109\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0209  set 0x09  (AppleDeskBus)
static inline void ADBStartUp(void) {
    __asm__ volatile (
        "ldx #0x0209\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0309  set 0x09  (AppleDeskBus)
static inline void ADBShutDown(void) {
    __asm__ volatile (
        "ldx #0x0309\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0409  set 0x09  (AppleDeskBus)
static inline unsigned short ADBVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0409\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0509  set 0x09  (AppleDeskBus)
static inline void ADBReset(void) {
    __asm__ volatile (
        "ldx #0x0509\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0609  set 0x09  (AppleDeskBus)
static inline unsigned short ADBStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0609\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SendInfo(unsigned short a0, void * a1, unsigned short a2);  // 0x0909
extern void ReadKeyMicroData(unsigned short a0, void * a1, unsigned short a2);  // 0x0A09
extern void ReadKeyMicroMemory(void * a0, void * a1, unsigned short a2);  // 0x0B09
extern void AsyncADBReceive(void * a0, unsigned short a1);  // 0x0D09
extern void SyncADBReceive(unsigned short a0, void * a1, unsigned short a2);  // 0x0E09
// tool 0x0F09  set 0x09  (AppleDeskBus)
static inline void AbsOn(void) {
    __asm__ volatile (
        "ldx #0x0F09\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x1009  set 0x09  (AppleDeskBus)
static inline void AbsOff(void) {
    __asm__ volatile (
        "ldx #0x1009\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x1109  set 0x09  (AppleDeskBus)
static inline unsigned short RdAbs(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1109\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetAbsScale(void * a0);  // 0x1209
extern void GetAbsScale(void * a0);  // 0x1309
extern void SRQPoll(void * a0, unsigned short a1);  // 0x1409
// tool 0x1509  set 0x09  (AppleDeskBus)
static inline void SRQRemove(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1509\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1609  set 0x09  (AppleDeskBus)
static inline void ClearSRQTable(void) {
    __asm__ volatile (
        "ldx #0x1609\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x010A  set 0x0A  (SANE)
static inline void SANEBootInit(void) {
    __asm__ volatile (
        "ldx #0x010A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x020A  set 0x0A  (SANE)
static inline void SANEStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x020A\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x030A  set 0x0A  (SANE)
static inline void SANEShutDown(void) {
    __asm__ volatile (
        "ldx #0x030A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x040A  set 0x0A  (SANE)
static inline unsigned short SANEVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x040A\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x050A  set 0x0A  (SANE)
static inline void SANEReset(void) {
    __asm__ volatile (
        "ldx #0x050A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x060A  set 0x0A  (SANE)
static inline unsigned short SANEStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x060A\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x010B  set 0x0B  (IntegerMath)
static inline void IMBootInit(void) {
    __asm__ volatile (
        "ldx #0x010B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x020B  set 0x0B  (IntegerMath)
static inline void IMStartUp(void) {
    __asm__ volatile (
        "ldx #0x020B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x030B  set 0x0B  (IntegerMath)
static inline void IMShutDown(void) {
    __asm__ volatile (
        "ldx #0x030B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x040B  set 0x0B  (IntegerMath)
static inline unsigned short IMVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x040B\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x050B  set 0x0B  (IntegerMath)
static inline void IMReset(void) {
    __asm__ volatile (
        "ldx #0x050B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x060B  set 0x0B  (IntegerMath)
static inline unsigned short IMStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x060B\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned long Multiply(unsigned short a0, unsigned short a1);  // 0x090B
extern unsigned long SDivide(unsigned short a0, unsigned short a1);  // 0x0A0B
extern unsigned long UDivide(unsigned short a0, unsigned short a1);  // 0x0B0B
extern long long LongMul(unsigned long a0, unsigned long a1);  // 0x0C0B
extern long long LongDivide(unsigned long a0, unsigned long a1);  // 0x0D0B
extern unsigned long FixRatio(unsigned short a0, unsigned short a1);  // 0x0E0B
extern unsigned long FixMul(unsigned long a0, unsigned long a1);  // 0x0F0B
extern unsigned long FracMul(unsigned long a0, unsigned long a1);  // 0x100B
extern unsigned long FixDiv(unsigned long a0, unsigned long a1);  // 0x110B
extern unsigned long FracDiv(unsigned long a0, unsigned long a1);  // 0x120B
extern unsigned short FixRound(unsigned long a0);  // 0x130B
extern unsigned long FracSqrt(unsigned long a0);  // 0x140B
extern unsigned long FracCos(unsigned long a0);  // 0x150B
extern unsigned long FracSin(unsigned long a0);  // 0x160B
extern unsigned long FixATan2(unsigned long a0, unsigned long a1);  // 0x170B
extern unsigned short HiWord(unsigned long a0);  // 0x180B
extern unsigned short LoWord(unsigned long a0);  // 0x190B
extern unsigned long Long2Fix(unsigned long a0);  // 0x1A0B
extern unsigned long Fix2Long(unsigned long a0);  // 0x1B0B
extern unsigned long Fix2Frac(unsigned long a0);  // 0x1C0B
extern unsigned long Frac2Fix(unsigned long a0);  // 0x1D0B
extern void Fix2X(unsigned long a0, void * a1);  // 0x1E0B
extern void Frac2X(unsigned long a0, void * a1);  // 0x1F0B
extern unsigned long X2Fix(void * a0);  // 0x200B
extern unsigned long X2Frac(void * a0);  // 0x210B
extern void Int2Hex(unsigned short a0, void * a1, unsigned short a2);  // 0x220B
extern void Long2Hex(unsigned long a0, void * a1, unsigned short a2);  // 0x230B
extern unsigned short Hex2Int(void * a0, unsigned short a1);  // 0x240B
extern unsigned long Hex2Long(void * a0, unsigned short a1);  // 0x250B
extern void Int2Dec(unsigned short a0, void * a1, unsigned short a2, unsigned short a3);  // 0x260B
extern void Long2Dec(unsigned long a0, void * a1, unsigned short a2, unsigned short a3);  // 0x270B
extern unsigned short Dec2Int(void * a0, unsigned short a1, unsigned short a2);  // 0x280B
extern unsigned long Dec2Long(void * a0, unsigned short a1, unsigned short a2);  // 0x290B
extern unsigned long HexIt(unsigned short a0);  // 0x2A0B
// tool 0x010C  set 0x0C  (TextTools)
static inline void TextBootInit(void) {
    __asm__ volatile (
        "ldx #0x010C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x020C  set 0x0C  (TextTools)
static inline void TextStartUp(void) {
    __asm__ volatile (
        "ldx #0x020C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x030C  set 0x0C  (TextTools)
static inline void TextShutDown(void) {
    __asm__ volatile (
        "ldx #0x030C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x040C  set 0x0C  (TextTools)
static inline unsigned short TextVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x040C\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x050C  set 0x0C  (TextTools)
static inline void TextReset(void) {
    __asm__ volatile (
        "ldx #0x050C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x060C  set 0x0C  (TextTools)
static inline unsigned short TextStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x060C\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetInGlobals(unsigned short a0, unsigned short a1);  // 0x090C
extern void SetOutGlobals(unsigned short a0, unsigned short a1);  // 0x0A0C
extern void SetErrGlobals(unsigned short a0, unsigned short a1);  // 0x0B0C
extern unsigned long GetInGlobals(void);  // 0x0C0C
extern unsigned long GetOutGlobals(void);  // 0x0D0C
extern unsigned long GetErrGlobals(void);  // 0x0E0C
extern void SetInputDevice(unsigned short a0, void * a1);  // 0x0F0C
extern void SetOutputDevice(unsigned short a0, void * a1);  // 0x100C
extern void SetErrorDevice(unsigned short a0, void * a1);  // 0x110C
extern void * GetInputDevice(void);  // 0x120C
extern void * GetOutputDevice(void);  // 0x130C
extern void * GetErrorDevice(void);  // 0x140C
// tool 0x150C  set 0x0C  (TextTools)
static inline void InitTextDev(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x150C\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void CtlTextDev(unsigned short a0, unsigned short a1);  // 0x160C
extern void StatusTextDev(unsigned short a0, unsigned short a1);  // 0x170C
// tool 0x180C  set 0x0C  (TextTools)
static inline void WriteChar(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x180C\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x190C  set 0x0C  (TextTools)
static inline void ErrWriteChar(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x190C\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void WriteLine(void * a0);  // 0x1A0C
extern void ErrWriteLine(void * a0);  // 0x1B0C
extern void WriteString(void * a0);  // 0x1C0C
extern void ErrWriteString(void * a0);  // 0x1D0C
extern void TextWriteBlock(void * a0, unsigned short a1, unsigned short a2);  // 0x1E0C
extern void ErrWriteBlock(void * a0, unsigned short a1, unsigned short a2);  // 0x1F0C
extern void WriteCString(void * a0);  // 0x200C
extern void ErrWriteCString(void * a0);  // 0x210C
// tool 0x220C  set 0x0C  (TextTools)
static inline unsigned short ReadChar(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x220C\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void TextReadBlock(void * a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x230C
extern unsigned short ReadLine(void * a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x240C
// tool 0x010E  set 0x0E  (WindowManager)
static inline void WindBootInit(void) {
    __asm__ volatile (
        "ldx #0x010E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x020E  set 0x0E  (WindowManager)
static inline void WindStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x020E\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x030E  set 0x0E  (WindowManager)
static inline void WindShutDown(void) {
    __asm__ volatile (
        "ldx #0x030E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x040E  set 0x0E  (WindowManager)
static inline unsigned short WindVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x040E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x050E  set 0x0E  (WindowManager)
static inline void WindReset(void) {
    __asm__ volatile (
        "ldx #0x050E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x060E  set 0x0E  (WindowManager)
static inline unsigned short WindStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x060E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * NewWindow(void * a0);  // 0x090E
extern unsigned short CheckUpdate(void * a0);  // 0x0A0E
extern void CloseWindow(void * a0);  // 0x0B0E
extern unsigned long Desktop(unsigned short a0, unsigned long a1);  // 0x0C0E
extern void SetWTitle(void * a0, void * a1);  // 0x0D0E
extern void * GetWTitle(void * a0);  // 0x0E0E
extern void SetFrameColor(void * a0, void * a1);  // 0x0F0E
extern void GetFrameColor(void * a0, void * a1);  // 0x100E
extern void SelectWindow(void * a0);  // 0x110E
extern void HideWindow(void * a0);  // 0x120E
extern void ShowWindow(void * a0);  // 0x130E
extern void SendBehind(void * a0, void * a1);  // 0x140E
extern void * FrontWindow(void);  // 0x150E
extern void SetInfoDraw(void * a0, void * a1);  // 0x160E
extern unsigned short FindWindow(void * a0, unsigned short a1, unsigned short a2);  // 0x170E
extern unsigned short TrackGoAway(unsigned short a0, unsigned short a1, void * a2);  // 0x180E
extern void MoveWindow(unsigned short a0, unsigned short a1, void * a2);  // 0x190E
extern void DragWindow(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, void * a4, void * a5);  // 0x1A0E
extern unsigned long GrowWindow(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, void * a4);  // 0x1B0E
extern void SizeWindow(unsigned short a0, unsigned short a1, void * a2);  // 0x1C0E
extern unsigned short TaskMaster(unsigned short a0, void * a1);  // 0x1D0E
extern void BeginUpdate(void * a0);  // 0x1E0E
extern void EndUpdate(void * a0);  // 0x1F0E
extern void * GetWMgrPort(void);  // 0x200E
extern unsigned long PinRect(unsigned short a0, unsigned short a1, void * a2);  // 0x210E
extern void HiliteWindow(unsigned short a0, void * a1);  // 0x220E
extern void ShowHide(unsigned short a0, void * a1);  // 0x230E
extern void BringToFront(void * a0);  // 0x240E
// tool 0x250E  set 0x0E  (WindowManager)
static inline void WindNewRes(void) {
    __asm__ volatile (
        "ldx #0x250E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned short TrackZoom(unsigned short a0, unsigned short a1, void * a2);  // 0x260E
extern void ZoomWindow(void * a0);  // 0x270E
extern void SetWRefCon(unsigned long a0, void * a1);  // 0x280E
extern unsigned long GetWRefCon(void * a0);  // 0x290E
extern void * GetNextWindow(void * a0);  // 0x2A0E
extern unsigned short GetWKind(void * a0);  // 0x2B0E
extern unsigned short GetWFrame(void * a0);  // 0x2C0E
extern void SetWFrame(unsigned short a0, void * a1);  // 0x2D0E
extern void * GetStructRgn(void * a0);  // 0x2E0E
extern void * GetContentRgn(void * a0);  // 0x2F0E
extern void * GetUpdateRgn(void * a0);  // 0x300E
extern void * GetDefProc(void * a0);  // 0x310E
extern void SetDefProc(void * a0, void * a1);  // 0x320E
extern void * GetWControls(void * a0);  // 0x330E
extern void SetOriginMask(unsigned short a0, void * a1);  // 0x340E
extern unsigned long GetInfoRefCon(void * a0);  // 0x350E
extern void SetInfoRefCon(unsigned long a0, void * a1);  // 0x360E
extern void * GetZoomRect(void * a0);  // 0x370E
extern void SetZoomRect(void * a0, void * a1);  // 0x380E
extern void RefreshDesktop(void * a0);  // 0x390E
extern void InvalRect(void * a0);  // 0x3A0E
extern void InvalRgn(void * a0);  // 0x3B0E
extern void ValidRect(void * a0);  // 0x3C0E
extern void ValidRgn(void * a0);  // 0x3D0E
extern unsigned long GetContentOrigin(void * a0);  // 0x3E0E
extern void SetContentOrigin(unsigned short a0, unsigned short a1, void * a2);  // 0x3F0E
extern unsigned long GetDataSize(void * a0);  // 0x400E
extern void SetDataSize(unsigned short a0, unsigned short a1, void * a2);  // 0x410E
extern unsigned long GetMaxGrow(void * a0);  // 0x420E
extern void SetMaxGrow(unsigned short a0, unsigned short a1, void * a2);  // 0x430E
extern unsigned long GetScroll(void * a0);  // 0x440E
extern void SetScroll(unsigned short a0, unsigned short a1, void * a2);  // 0x450E
extern unsigned long GetPage(void * a0);  // 0x460E
extern void SetPage(unsigned short a0, unsigned short a1, void * a2);  // 0x470E
extern void * GetContentDraw(void * a0);  // 0x480E
extern void SetContentDraw(void * a0, void * a1);  // 0x490E
extern void * GetInfoDraw(void * a0);  // 0x4A0E
extern void SetSysWindow(void * a0);  // 0x4B0E
extern unsigned short GetSysWFlag(void * a0);  // 0x4C0E
extern void StartDrawing(void * a0);  // 0x4D0E
extern void * SetWindowIcons(void * a0);  // 0x4E0E
extern void GetRectInfo(void * a0, void * a1);  // 0x4F0E
extern void StartInfoDrawing(void * a0, void * a1);  // 0x500E
// tool 0x510E  set 0x0E  (WindowManager)
static inline void EndInfoDrawing(void) {
    __asm__ volatile (
        "ldx #0x510E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void * GetFirstWindow(void);  // 0x520E
extern unsigned long WindDragRect(void * a0, void * a1, unsigned short a2, unsigned short a3, void * a4, void * a5, void * a6, unsigned short a7);  // 0x530E
extern void * Private01(void);  // 0x540E
extern void DrawInfoBar(void * a0);  // 0x550E
// tool 0x560E  set 0x0E  (WindowManager)
static inline unsigned short WindowGlobal(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x560E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetContentOrigin2(unsigned short a0, unsigned short a1, unsigned short a2, void * a3);  // 0x570E
extern void * GetWindowMgrGlobals(void);  // 0x580E
extern unsigned short AlertWindow(unsigned short a0, void * a1, unsigned long a2);  // 0x590E
extern void StartFrameDrawing(void * a0);  // 0x5A0E
// tool 0x5B0E  set 0x0E  (WindowManager)
static inline void EndFrameDrawing(void) {
    __asm__ volatile (
        "ldx #0x5B0E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void ResizeWindow(unsigned short a0, void * a1, void * a2);  // 0x5C0E
extern unsigned short TaskMasterDA(unsigned short a0, void * a1);  // 0x5F0E
extern void * CompileText(unsigned short a0, void * a1, void * a2, unsigned short a3);  // 0x600E
extern void * NewWindow2(void * a0, unsigned long a1, void * a2, void * a3, unsigned short a4, unsigned long a5, unsigned short a6);  // 0x610E
extern unsigned short ErrorWindow(unsigned short a0, void * a1, unsigned short a2);  // 0x620E
extern void * GetAuxWindInfo(void * a0);  // 0x630E
extern unsigned long DoModalWindow(void * a0, void * a1, void * a2, void * a3, unsigned short a4);  // 0x640E
// tool 0x650E  set 0x0E  (WindowManager)
static inline unsigned short MWGetCtlPart(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x650E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * MWSetMenuProc(void * a0);  // 0x660E
// tool 0x670E  set 0x0E  (WindowManager)
static inline void MWStdDrawProc(void) {
    __asm__ volatile (
        "ldx #0x670E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x680E  set 0x0E  (WindowManager)
static inline void MWSetUpEditMenu(void) {
    __asm__ volatile (
        "ldx #0x680E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned short FindCursorCtl(void * a0, unsigned short a1, unsigned short a2, void * a3);  // 0x690E
extern void ResizeInfoBar(unsigned short a0, unsigned short a1, void * a2);  // 0x6A0E
extern unsigned long HandleDiskInsert(unsigned short a0, unsigned short a1);  // 0x6B0E
extern void UpdateWindow(unsigned short a0, void * a1);  // 0x6C0E
// tool 0x010F  set 0x0F  (MenuManager)
static inline void MenuBootInit(void) {
    __asm__ volatile (
        "ldx #0x010F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void MenuStartUp(unsigned short a0, unsigned short a1);  // 0x020F
// tool 0x030F  set 0x0F  (MenuManager)
static inline void MenuShutDown(void) {
    __asm__ volatile (
        "ldx #0x030F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x040F  set 0x0F  (MenuManager)
static inline unsigned short MenuVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x040F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x050F  set 0x0F  (MenuManager)
static inline void MenuReset(void) {
    __asm__ volatile (
        "ldx #0x050F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x060F  set 0x0F  (MenuManager)
static inline unsigned short MenuStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x060F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void MenuKey(void * a0, void * a1);  // 0x090F
extern void * GetMenuBar(void);  // 0x0A0F
extern void MenuRefresh(void * a0);  // 0x0B0F
// tool 0x0C0F  set 0x0F  (MenuManager)
static inline void FlashMenuBar(void) {
    __asm__ volatile (
        "ldx #0x0C0F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void InsertMenu(void * a0, unsigned short a1);  // 0x0D0F
// tool 0x0E0F  set 0x0F  (MenuManager)
static inline void DeleteMenu(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0E0F\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void InsertMItem(void * a0, unsigned short a1, unsigned short a2);  // 0x0F0F
// tool 0x100F  set 0x0F  (MenuManager)
static inline void DeleteMItem(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x100F\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void * GetSysBar(void);  // 0x110F
extern void SetSysBar(void * a0);  // 0x120F
// tool 0x130F  set 0x0F  (MenuManager)
static inline unsigned short FixMenuBar(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x130F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x140F  set 0x0F  (MenuManager)
static inline unsigned short CountMItems(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x140F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void * NewMenuBar(void * a0);  // 0x150F
extern void * GetMHandle(unsigned short a0);  // 0x160F
extern void SetBarColors(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x170F
extern unsigned long GetBarColors(void);  // 0x180F
// tool 0x190F  set 0x0F  (MenuManager)
static inline void SetMTitleStart(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x190F\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1A0F  set 0x0F  (MenuManager)
static inline unsigned short GetMTitleStart(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1A0F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * GetMenuMgrPort(void);  // 0x1B0F
extern void CalcMenuSize(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x1C0F
extern void SetMTitleWidth(unsigned short a0, unsigned short a1);  // 0x1D0F
// tool 0x1E0F  set 0x0F  (MenuManager)
static inline unsigned short GetMTitleWidth(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1E0F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetMenuFlag(unsigned short a0, unsigned short a1);  // 0x1F0F
// tool 0x200F  set 0x0F  (MenuManager)
static inline unsigned short GetMenuFlag(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x200F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetMenuTitle(void * a0, unsigned short a1);  // 0x210F
extern void * GetMenuTitle(unsigned short a0);  // 0x220F
// tool 0x230F  set 0x0F  (MenuManager)
static inline unsigned short MenuGlobal(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x230F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetMItem(void * a0, unsigned short a1);  // 0x240F
extern void * GetMItem(unsigned short a0);  // 0x250F
extern void SetMItemFlag(unsigned short a0, unsigned short a1);  // 0x260F
// tool 0x270F  set 0x0F  (MenuManager)
static inline unsigned short GetMItemFlag(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x270F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x280F  set 0x0F  (MenuManager)
static inline void SetMItemBlink(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x280F\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x290F  set 0x0F  (MenuManager)
static inline void MenuNewRes(void) {
    __asm__ volatile (
        "ldx #0x290F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x2A0F  set 0x0F  (MenuManager)
static inline void DrawMenuBar(void) {
    __asm__ volatile (
        "ldx #0x2A0F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void MenuSelect(void * a0, void * a1);  // 0x2B0F
extern void HiliteMenu(unsigned short a0, unsigned short a1);  // 0x2C0F
extern void * NewMenu(void * a0);  // 0x2D0F
extern void DisposeMenu(void * a0);  // 0x2E0F
// tool 0x2F0F  set 0x0F  (MenuManager)
static inline void InitPalette(void) {
    __asm__ volatile (
        "ldx #0x2F0F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x300F  set 0x0F  (MenuManager)
static inline void EnableMItem(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x300F\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x310F  set 0x0F  (MenuManager)
static inline void DisableMItem(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x310F\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void CheckMItem(unsigned short a0, unsigned short a1);  // 0x320F
extern void SetMItemMark(unsigned short a0, unsigned short a1);  // 0x330F
// tool 0x340F  set 0x0F  (MenuManager)
static inline unsigned short GetMItemMark(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x340F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetMItemStyle(unsigned short a0, unsigned short a1);  // 0x350F
// tool 0x360F  set 0x0F  (MenuManager)
static inline unsigned short GetMItemStyle(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x360F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetMenuID(unsigned short a0, unsigned short a1);  // 0x370F
extern void SetMItemID(unsigned short a0, unsigned short a1);  // 0x380F
extern void SetMenuBar(void * a0);  // 0x390F
extern void SetMItemName(void * a0, unsigned short a1);  // 0x3A0F
extern void * GetPopUpDefProc(void);  // 0x3B0F
extern unsigned short PopUpMenuSelect(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, void * a4);  // 0x3C0F
extern void * NewMenu2(unsigned short a0, unsigned long a1);  // 0x3E0F
extern void InsertMItem2(unsigned short a0, unsigned long a1, unsigned short a2, unsigned short a3);  // 0x3F0F
extern void SetMenuTitle2(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x400F
extern void SetMItem2(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x410F
extern void SetMItemName2(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x420F
extern void * NewMenuBar2(unsigned short a0, unsigned long a1, void * a2);  // 0x430F
// tool 0x450F  set 0x0F  (MenuManager)
static inline void HideMenuBar(void) {
    __asm__ volatile (
        "ldx #0x450F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x460F  set 0x0F  (MenuManager)
static inline void ShowMenuBar(void) {
    __asm__ volatile (
        "ldx #0x460F\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SetMItemIcon(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x470F
extern unsigned long GetMItemIcon(unsigned short a0);  // 0x480F
extern void SetMItemStruct(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x490F
extern unsigned long GetMItemStruct(unsigned short a0);  // 0x4A0F
// tool 0x4B0F  set 0x0F  (MenuManager)
static inline void RemoveMItemStruct(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x4B0F\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x4C0F  set 0x0F  (MenuManager)
static inline unsigned short GetMItemFlag2(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x4C0F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetMItemFlag2(unsigned short a0, unsigned short a1);  // 0x4D0F
// tool 0x4F0F  set 0x0F  (MenuManager)
static inline unsigned short GetMItemBlink(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x4F0F\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void InsertPathMItems(unsigned short a0, void * a1, unsigned short a2, unsigned short a3, unsigned short a4, unsigned short a5, void * a6);  // 0x500F
// tool 0x0110  set 0x10  (ControlManager)
static inline void CtlBootInit(void) {
    __asm__ volatile (
        "ldx #0x0110\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void CtlStartUp(unsigned short a0, unsigned short a1);  // 0x0210
// tool 0x0310  set 0x10  (ControlManager)
static inline void CtlShutDown(void) {
    __asm__ volatile (
        "ldx #0x0310\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0410  set 0x10  (ControlManager)
static inline unsigned short CtlVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0410\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0510  set 0x10  (ControlManager)
static inline void CtlReset(void) {
    __asm__ volatile (
        "ldx #0x0510\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0610  set 0x10  (ControlManager)
static inline unsigned short CtlStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0610\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short NewControl(void * a0, void * a1, void * a2, unsigned short a3, unsigned short a4, unsigned short a5, unsigned short a6, void * a7, unsigned long a8, void * a9);  // 0x0910
extern void DisposeControl(void * a0);  // 0x0A10
extern void KillControls(void * a0);  // 0x0B10
extern void SetCtlTitle(void * a0, void * a1);  // 0x0C10
extern void * GetCtlTitle(void * a0);  // 0x0D10
extern void HideControl(void * a0);  // 0x0E10
extern void ShowControl(void * a0);  // 0x0F10
extern void DrawControls(void * a0);  // 0x1010
extern void HiliteControl(unsigned short a0, void * a1);  // 0x1110
// tool 0x1210  set 0x10  (ControlManager)
static inline void CtlNewRes(void) {
    __asm__ volatile (
        "ldx #0x1210\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned short FindControl(void * a0, unsigned short a1, unsigned short a2, void * a3);  // 0x1310
extern unsigned short TestControl(unsigned short a0, unsigned short a1, void * a2);  // 0x1410
extern unsigned short TrackControl(unsigned short a0, unsigned short a1, void * a2, void * a3);  // 0x1510
extern void MoveControl(unsigned short a0, unsigned short a1, void * a2);  // 0x1610
extern void DragControl(unsigned short a0, unsigned short a1, void * a2, void * a3, unsigned short a4, void * a5);  // 0x1710
extern void * SetCtlIcons(void * a0);  // 0x1810
extern void SetCtlValue(unsigned short a0, void * a1);  // 0x1910
extern unsigned short GetCtlValue(void * a0);  // 0x1A10
extern void SetCtlParams(unsigned short a0, unsigned short a1, void * a2);  // 0x1B10
extern unsigned long GetCtlParams(void * a0);  // 0x1C10
extern unsigned long DragRect(void * a0, void * a1, unsigned short a2, unsigned short a3, void * a4, void * a5, void * a6, unsigned short a7);  // 0x1D10
extern unsigned long GrowSize(void);  // 0x1E10
// tool 0x1F10  set 0x10  (ControlManager)
static inline unsigned short GetCtlDpage(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1F10\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SetCtlAction(void * a0, void * a1);  // 0x2010
extern unsigned long GetCtlAction(void * a0);  // 0x2110
extern void SetCtlRefCon(unsigned long a0, void * a1);  // 0x2210
extern unsigned long GetCtlRefCon(void * a0);  // 0x2310
extern void EraseControl(void * a0);  // 0x2410
extern void DrawOneCtl(void * a0);  // 0x2510
extern void * FindTargetCtl(void);  // 0x2610
extern void * MakeNextCtlTarget(void);  // 0x2710
extern void MakeThisCtlTarget(void * a0);  // 0x2810
extern unsigned short SendEventToCtl(unsigned short a0, void * a1, void * a2);  // 0x2910
extern unsigned long GetCtlID(void * a0);  // 0x2A10
extern void SetCtlID(unsigned long a0, void * a1);  // 0x2B10
extern unsigned long CallCtlDefProc(void * a0, unsigned short a1, unsigned long a2);  // 0x2C10
extern void NotifyCtls(unsigned short a0, unsigned short a1, unsigned long a2, void * a3);  // 0x2D10
extern unsigned short GetCtlMoreFlags(void * a0);  // 0x2E10
extern void SetCtlMoreFlags(unsigned short a0, void * a1);  // 0x2F10
extern void * GetCtlHandleFromID(void * a0, unsigned long a1);  // 0x3010
extern void * NewControl2(void * a0, unsigned short a1, unsigned long a2);  // 0x3110
extern unsigned short CMLoadResource(unsigned short a0, unsigned long a1);  // 0x3210
extern void CMReleaseResource(unsigned short a0, unsigned long a1);  // 0x3310
extern void SetCtlParamPtr(void * a0);  // 0x3410
extern void * GetCtlParamPtr(void);  // 0x3510
extern void InvalCtls(void * a0);  // 0x3710
extern unsigned short FindRadioButton(void * a0, unsigned short a1);  // 0x3910
extern void SetLETextByID(void * a0, unsigned long a1, void * a2);  // 0x3A10
extern void GetLETextByID(void * a0, unsigned long a1, void * a2);  // 0x3B10
extern void SetCtlValueByID(unsigned short a0, void * a1, unsigned long a2);  // 0x3C10
extern unsigned short GetCtlValueByID(void * a0, unsigned long a1);  // 0x3D10
extern void InvalOneCtlByID(void * a0, unsigned long a1);  // 0x3E10
extern void HiliteCtlByID(unsigned short a0, void * a1, unsigned long a2);  // 0x3F10
// tool 0x0111  set 0x11  (Loader)
static inline void LoaderBootInit(void) {
    __asm__ volatile (
        "ldx #0x0111\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0211  set 0x11  (Loader)
static inline void LoaderStartUp(void) {
    __asm__ volatile (
        "ldx #0x0211\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0311  set 0x11  (Loader)
static inline void LoaderShutDown(void) {
    __asm__ volatile (
        "ldx #0x0311\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0411  set 0x11  (Loader)
static inline unsigned short LoaderVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0411\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0511  set 0x11  (Loader)
static inline void LoaderReset(void) {
    __asm__ volatile (
        "ldx #0x0511\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0611  set 0x11  (Loader)
static inline unsigned short LoaderStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0611\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern long double InitialLoad(unsigned short a0, void * a1, unsigned short a2);  // 0x0911
extern long double Restart(unsigned short a0);  // 0x0A11
extern void * LoadSegNum(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x0B11
extern void UnloadSegNum(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x0C11
extern long double LoadSegName(unsigned short a0, void * a1, void * a2);  // 0x0D11
extern void * UnloadSeg(void * a0);  // 0x0E11
extern void GetLoadSegInfo(unsigned short a0, unsigned short a1, unsigned short a2, void * a3);  // 0x0F11
extern unsigned short GetUserID(void * a0);  // 0x1011
extern void * LGetPathname(unsigned short a0, unsigned short a1);  // 0x1111
extern unsigned short UserShutDown(unsigned short a0, unsigned short a1);  // 0x1211
extern void RenamePathname(void * a0, void * a1);  // 0x1311
extern long double InitialLoad2(unsigned short a0, void * a1, unsigned short a2, unsigned short a3);  // 0x2011
extern unsigned short GetUserID2(void * a0);  // 0x2111
extern void * LGetPathname2(unsigned short a0, unsigned short a1);  // 0x2211
// tool 0x0112  set 0x12  (QDAuxiliary)
static inline void QDAuxBootInit(void) {
    __asm__ volatile (
        "ldx #0x0112\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0212  set 0x12  (QDAuxiliary)
static inline void QDAuxStartUp(void) {
    __asm__ volatile (
        "ldx #0x0212\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0312  set 0x12  (QDAuxiliary)
static inline void QDAuxShutDown(void) {
    __asm__ volatile (
        "ldx #0x0312\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0412  set 0x12  (QDAuxiliary)
static inline unsigned short QDAuxVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0412\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0512  set 0x12  (QDAuxiliary)
static inline void QDAuxReset(void) {
    __asm__ volatile (
        "ldx #0x0512\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0612  set 0x12  (QDAuxiliary)
static inline unsigned short QDAuxStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0612\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void CopyPixels(void * a0, void * a1, void * a2, void * a3, unsigned short a4, void * a5);  // 0x0912
// tool 0x0A12  set 0x12  (QDAuxiliary)
static inline void WaitCursor(void) {
    __asm__ volatile (
        "ldx #0x0A12\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void DrawIcon(void * a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x0B12
extern void SpecialRect(void * a0, unsigned short a1, unsigned short a2);  // 0x0C12
extern void SeedFill(void * a0, void * a1, void * a2, void * a3, unsigned short a4, unsigned short a5, unsigned short a6, void * a7, void * a8);  // 0x0D12
extern void CalcMask(void * a0, void * a1, void * a2, void * a3, unsigned short a4, void * a5, void * a6);  // 0x0E12
extern void * GetSysIcon(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x0F12
extern void * PixelMap2Rgn(void * a0, unsigned short a1, unsigned short a2);  // 0x1012
// tool 0x1312  set 0x12  (QDAuxiliary)
static inline void IBeamCursor(void) {
    __asm__ volatile (
        "ldx #0x1312\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void WhooshRect(unsigned long a0, void * a1, void * a2);  // 0x1412
extern void DrawStringWidth(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x1512
extern void * UseColorTable(unsigned short a0, void * a1, unsigned short a2);  // 0x1612
extern void RestoreColorTable(void * a0, unsigned short a1);  // 0x1712
// tool 0x0113  set 0x13  (PrintManager)
static inline void PMBootInit(void) {
    __asm__ volatile (
        "ldx #0x0113\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void PMStartUp(unsigned short a0, unsigned short a1);  // 0x0213
// tool 0x0313  set 0x13  (PrintManager)
static inline void PMShutDown(void) {
    __asm__ volatile (
        "ldx #0x0313\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0413  set 0x13  (PrintManager)
static inline unsigned short PMVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0413\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0513  set 0x13  (PrintManager)
static inline void PMReset(void) {
    __asm__ volatile (
        "ldx #0x0513\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0613  set 0x13  (PrintManager)
static inline unsigned short PMStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0613\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void PrDefault(void * a0);  // 0x0913
extern unsigned short PrValidate(void * a0);  // 0x0A13
extern unsigned short PrStlDialog(void * a0);  // 0x0B13
extern unsigned short PrJobDialog(void * a0);  // 0x0C13
extern void PrPixelMap(void * a0, void * a1, unsigned short a2);  // 0x0D13
extern void * PrOpenDoc(void * a0, void * a1);  // 0x0E13
extern void PrCloseDoc(void * a0);  // 0x0F13
extern void PrOpenPage(void * a0, void * a1);  // 0x1013
extern void PrClosePage(void * a0);  // 0x1113
extern void PrPicFile(void * a0, void * a1, void * a2);  // 0x1213
// tool 0x1413  set 0x13  (PrintManager)
static inline unsigned short PrError(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1413\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1513  set 0x13  (PrintManager)
static inline void PrSetError(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1513\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1613  set 0x13  (PrintManager)
static inline unsigned short PrChoosePrinter(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1613\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned long PrGetPrinterSpecs(void);  // 0x1813
extern void PrDevPrChanged(void * a0);  // 0x1913
extern void PrDevStartup(void * a0, void * a1);  // 0x1A13
// tool 0x1B13  set 0x13  (PrintManager)
static inline void PrDevShutDown(void) {
    __asm__ volatile (
        "ldx #0x1B13\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void PrDevOpen(void * a0, unsigned long a1);  // 0x1C13
extern unsigned short PrDevRead(void * a0, unsigned short a1);  // 0x1D13
extern void PrDevWrite(void * a0, void * a1, unsigned short a2);  // 0x1E13
// tool 0x1F13  set 0x13  (PrintManager)
static inline void PrDevClose(void) {
    __asm__ volatile (
        "ldx #0x1F13\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void PrDevStatus(void * a0);  // 0x2013
extern unsigned short PrDevAsyncRead(void * a0, unsigned short a1, void * a2);  // 0x2113
extern void PrDevWriteBackground(void * a0, unsigned short a1, void * a2);  // 0x2213
// tool 0x2313  set 0x13  (PrintManager)
static inline unsigned short PrDriverVer(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x2313\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x2413  set 0x13  (PrintManager)
static inline unsigned short PrPortVer(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x2413\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * PrGetZoneName(void);  // 0x2513
extern void * PrGetPrinterDvrName(void);  // 0x2813
extern void * PrGetPortDvrName(void);  // 0x2913
extern void * PrGetUserName(void);  // 0x2A13
extern void * PrGetNetworkName(void);  // 0x2B13
// tool 0x3013  set 0x13  (PrintManager)
static inline unsigned short PrDevIsItSafe(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x3013\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x3413  set 0x13  (PrintManager)
static inline void PMUnloadDriver(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x3413\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x3513  set 0x13  (PrintManager)
static inline void PMLoadDriver(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x3513\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void * PrGetDocName(void);  // 0x3613
extern void PrSetDocName(void * a0);  // 0x3713
extern unsigned short PrGetPgOrientation(void * a0);  // 0x3813
// tool 0x0114  set 0x14  (LineEdit)
static inline void LEBootInit(void) {
    __asm__ volatile (
        "ldx #0x0114\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void LEStartUp(unsigned short a0, unsigned short a1);  // 0x0214
// tool 0x0314  set 0x14  (LineEdit)
static inline void LEShutDown(void) {
    __asm__ volatile (
        "ldx #0x0314\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0414  set 0x14  (LineEdit)
static inline unsigned short LEVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0414\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0514  set 0x14  (LineEdit)
static inline void LEReset(void) {
    __asm__ volatile (
        "ldx #0x0514\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0614  set 0x14  (LineEdit)
static inline unsigned short LEStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0614\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short LENew(void * a0, void * a1, unsigned short a2);  // 0x0914
// tool 0x0A14  set 0x14  (LineEdit)
static inline void LEDispose(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0A14\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void LESetText(void * a0, unsigned short a1, unsigned short a2);  // 0x0B14
// tool 0x0C14  set 0x14  (LineEdit)
static inline void LEIdle(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0C14\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void LEClick(void * a0, unsigned short a1);  // 0x0D14
extern void LESetSelect(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x0E14
// tool 0x0F14  set 0x14  (LineEdit)
static inline void LEActivate(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0F14\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1014  set 0x14  (LineEdit)
static inline void LEDeactivate(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1014\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void LEKey(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x1114
// tool 0x1214  set 0x14  (LineEdit)
static inline void LECut(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1214\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1314  set 0x14  (LineEdit)
static inline void LECopy(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1314\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1414  set 0x14  (LineEdit)
static inline void LEPaste(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1414\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1514  set 0x14  (LineEdit)
static inline void LEDelete(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1514\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void LEInsert(void * a0, unsigned short a1, unsigned short a2);  // 0x1614
// tool 0x1714  set 0x14  (LineEdit)
static inline void LEUpdate(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1714\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void LETextBox(void * a0, unsigned short a1, void * a2, unsigned short a3);  // 0x1814
// tool 0x1914  set 0x14  (LineEdit)
static inline void LEFromScrap(void) {
    __asm__ volatile (
        "ldx #0x1914\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x1A14  set 0x14  (LineEdit)
static inline void LEToScrap(void) {
    __asm__ volatile (
        "ldx #0x1A14\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void * LEScrapHandle(void);  // 0x1B14
// tool 0x1C14  set 0x14  (LineEdit)
static inline unsigned short LEGetScrapLen(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1C14\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1D14  set 0x14  (LineEdit)
static inline void LESetScrapLen(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1D14\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void LESetHilite(void * a0, unsigned short a1);  // 0x1E14
extern void LESetCaret(void * a0, unsigned short a1);  // 0x1F14
extern void LETextBox2(void * a0, unsigned short a1, void * a2, unsigned short a3);  // 0x2014
extern void LESetJust(unsigned short a0, unsigned short a1);  // 0x2114
extern void * LEGetTextHand(unsigned short a0);  // 0x2214
// tool 0x2314  set 0x14  (LineEdit)
static inline unsigned short LEGetTextLen(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x2314\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void * GetLEDefProc(void);  // 0x2414
extern unsigned short LEClassifyKey(void * a0);  // 0x2514
// tool 0x0115  set 0x15  (DialogManager)
static inline void DialogBootInit(void) {
    __asm__ volatile (
        "ldx #0x0115\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0215  set 0x15  (DialogManager)
static inline void DialogStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0215\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0315  set 0x15  (DialogManager)
static inline void DialogShutDown(void) {
    __asm__ volatile (
        "ldx #0x0315\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0415  set 0x15  (DialogManager)
static inline unsigned short DialogVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0415\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0515  set 0x15  (DialogManager)
static inline void DialogReset(void) {
    __asm__ volatile (
        "ldx #0x0515\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0615  set 0x15  (DialogManager)
static inline unsigned short DialogStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0615\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void ErrorSound(void * a0);  // 0x0915
extern void * NewModalDialog(void * a0, unsigned short a1, unsigned long a2);  // 0x0A15
extern void * NewModelessDialog(void * a0, void * a1, void * a2, unsigned short a3, unsigned long a4, void * a5);  // 0x0B15
extern void CloseDialog(void * a0);  // 0x0C15
extern void NewDItem(void * a0, unsigned short a1, void * a2, unsigned short a3, unsigned long a4, unsigned short a5, unsigned short a6, void * a7);  // 0x0D15
extern void RemoveDItem(void * a0, unsigned short a1);  // 0x0E15
extern unsigned short ModalDialog(void * a0);  // 0x0F15
extern unsigned short IsDialogEvent(void * a0);  // 0x1015
extern unsigned short DialogSelect(void * a0, void * a1, void * a2);  // 0x1115
extern void DlgCut(void * a0);  // 0x1215
extern void DlgCopy(void * a0);  // 0x1315
extern void DlgPaste(void * a0);  // 0x1415
extern void DlgDelete(void * a0);  // 0x1515
extern void DrawDialog(void * a0);  // 0x1615
extern unsigned short Alert(void * a0, void * a1);  // 0x1715
extern unsigned short StopAlert(void * a0, void * a1);  // 0x1815
extern unsigned short NoteAlert(void * a0, void * a1);  // 0x1915
extern unsigned short CautionAlert(void * a0, void * a1);  // 0x1A15
extern void ParamText(void * a0, void * a1, void * a2, void * a3);  // 0x1B15
extern void SetDAFont(void * a0);  // 0x1C15
extern void * GetControlDItem(void * a0, unsigned short a1);  // 0x1E15
extern void GetIText(void * a0, unsigned short a1, void * a2);  // 0x1F15
extern void SetIText(void * a0, unsigned short a1, void * a2);  // 0x2015
extern void SelectIText(void * a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x2115
extern void HideDItem(void * a0, unsigned short a1);  // 0x2215
extern void ShowDItem(void * a0, unsigned short a1);  // 0x2315
extern unsigned short FindDItem(void * a0, unsigned long a1);  // 0x2415
extern void UpdateDialog(void * a0, void * a1);  // 0x2515
extern unsigned short GetDItemType(void * a0, unsigned short a1);  // 0x2615
extern void SetDItemType(unsigned short a0, void * a1, unsigned short a2);  // 0x2715
extern void GetDItemBox(void * a0, unsigned short a1, void * a2);  // 0x2815
extern void SetDItemBox(void * a0, unsigned short a1, void * a2);  // 0x2915
extern unsigned short GetFirstDItem(void * a0);  // 0x2A15
extern unsigned short GetNextDItem(void * a0, unsigned short a1);  // 0x2B15
extern unsigned long ModalDialog2(void * a0);  // 0x2C15
extern unsigned short GetDItemValue(void * a0, unsigned short a1);  // 0x2E15
extern void SetDItemValue(unsigned short a0, void * a1, unsigned short a2);  // 0x2F15
extern void * GetNewModalDialog(void * a0);  // 0x3215
extern void GetNewDItem(void * a0, void * a1);  // 0x3315
// tool 0x3415  set 0x15  (DialogManager)
static inline unsigned short GetAlertStage(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x3415\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x3515  set 0x15  (DialogManager)
static inline void ResetAlertStage(void) {
    __asm__ volatile (
        "ldx #0x3515\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned short DefaultFilter(void * a0, void * a1, void * a2);  // 0x3615
extern unsigned short GetDefButton(void * a0);  // 0x3715
extern void SetDefButton(unsigned short a0, void * a1);  // 0x3815
extern void DisableDItem(void * a0, unsigned short a1);  // 0x3915
extern void EnableDItem(void * a0, unsigned short a1);  // 0x3A15
// tool 0x0116  set 0x16  (ScrapManager)
static inline void ScrapBootInit(void) {
    __asm__ volatile (
        "ldx #0x0116\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0216  set 0x16  (ScrapManager)
static inline void ScrapStartUp(void) {
    __asm__ volatile (
        "ldx #0x0216\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0316  set 0x16  (ScrapManager)
static inline void ScrapShutDown(void) {
    __asm__ volatile (
        "ldx #0x0316\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0416  set 0x16  (ScrapManager)
static inline unsigned short ScrapVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0416\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0516  set 0x16  (ScrapManager)
static inline void ScrapReset(void) {
    __asm__ volatile (
        "ldx #0x0516\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0616  set 0x16  (ScrapManager)
static inline unsigned short ScrapStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0616\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0916  set 0x16  (ScrapManager)
static inline void UnloadScrap(void) {
    __asm__ volatile (
        "ldx #0x0916\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0A16  set 0x16  (ScrapManager)
static inline void LoadScrap(void) {
    __asm__ volatile (
        "ldx #0x0A16\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0B16  set 0x16  (ScrapManager)
static inline void ZeroScrap(void) {
    __asm__ volatile (
        "ldx #0x0B16\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void PutScrap(unsigned long a0, unsigned short a1, void * a2);  // 0x0C16
extern void GetScrap(void * a0, unsigned short a1);  // 0x0D16
extern void * GetScrapHandle(unsigned short a0);  // 0x0E16
extern unsigned long GetScrapSize(unsigned short a0);  // 0x0F16
extern void * GetScrapPath(void);  // 0x1016
extern void SetScrapPath(void * a0);  // 0x1116
// tool 0x1216  set 0x16  (ScrapManager)
static inline unsigned short GetScrapCount(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1216\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1316  set 0x16  (ScrapManager)
static inline unsigned short GetScrapState(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1316\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void GetIndScrap(unsigned short a0, void * a1);  // 0x1416
extern void * ShowClipboard(unsigned short a0, void * a1);  // 0x1516
// tool 0x0117  set 0x17  (StandardFile)
static inline void SFBootInit(void) {
    __asm__ volatile (
        "ldx #0x0117\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SFStartUp(unsigned short a0, unsigned short a1);  // 0x0217
// tool 0x0317  set 0x17  (StandardFile)
static inline void SFShutDown(void) {
    __asm__ volatile (
        "ldx #0x0317\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0417  set 0x17  (StandardFile)
static inline unsigned short SFVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0417\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0517  set 0x17  (StandardFile)
static inline void SFReset(void) {
    __asm__ volatile (
        "ldx #0x0517\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0617  set 0x17  (StandardFile)
static inline unsigned short SFStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0617\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void SFGetFile(unsigned short a0, unsigned short a1, void * a2, void * a3, void * a4, void * a5);  // 0x0917
extern void SFPutFile(unsigned short a0, unsigned short a1, void * a2, void * a3, unsigned short a4, void * a5);  // 0x0A17
extern void SFPGetFile(unsigned short a0, unsigned short a1, void * a2, void * a3, void * a4, void * a5, void * a6, void * a7);  // 0x0B17
extern void SFPPutFile(unsigned short a0, unsigned short a1, void * a2, void * a3, unsigned short a4, void * a5, void * a6, void * a7);  // 0x0C17
// tool 0x0D17  set 0x17  (StandardFile)
static inline void SFAllCaps(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0D17\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SFGetFile2(unsigned short a0, unsigned short a1, unsigned short a2, unsigned long a3, void * a4, void * a5, void * a6);  // 0x0E17
extern void SFPutFile2(unsigned short a0, unsigned short a1, unsigned short a2, unsigned long a3, unsigned short a4, unsigned long a5, void * a6);  // 0x0F17
extern void SFPGetFile2(unsigned short a0, unsigned short a1, void * a2, unsigned short a3, unsigned long a4, void * a5, void * a6, void * a7, void * a8, void * a9);  // 0x1017
extern void SFPPutFile2(unsigned short a0, unsigned short a1, void * a2, unsigned short a3, unsigned long a4, unsigned short a5, unsigned long a6, void * a7, void * a8, void * a9);  // 0x1117
// tool 0x1217  set 0x17  (StandardFile)
static inline unsigned short SFShowInvisible(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1217\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void SFReScan(void * a0, void * a1);  // 0x1317
extern void SFMultiGet2(unsigned short a0, unsigned short a1, unsigned short a2, unsigned long a3, void * a4, void * a5, void * a6);  // 0x1417
extern void SFPMultiGet2(unsigned short a0, unsigned short a1, void * a2, unsigned short a3, unsigned long a4, void * a5, void * a6, void * a7, void * a8, void * a9);  // 0x1517
// tool 0x0119  set 0x19  (NoteSynth)
static inline void NSBootInit(void) {
    __asm__ volatile (
        "ldx #0x0119\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void NSStartUp(unsigned short a0, void * a1);  // 0x0219
// tool 0x0319  set 0x19  (NoteSynth)
static inline void NSShutDown(void) {
    __asm__ volatile (
        "ldx #0x0319\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0419  set 0x19  (NoteSynth)
static inline unsigned short NSVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0419\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0519  set 0x19  (NoteSynth)
static inline void NSReset(void) {
    __asm__ volatile (
        "ldx #0x0519\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0619  set 0x19  (NoteSynth)
static inline unsigned short NSStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0619\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0919  set 0x19  (NoteSynth)
static inline unsigned short AllocGen(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0919\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0A19  set 0x19  (NoteSynth)
static inline void DeallocGen(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0A19\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void NoteOn(unsigned short a0, unsigned short a1, unsigned short a2, void * a3);  // 0x0B19
extern void NoteOff(unsigned short a0, unsigned short a1);  // 0x0C19
// tool 0x0D19  set 0x19  (NoteSynth)
static inline void AllNotesOff(void) {
    __asm__ volatile (
        "ldx #0x0D19\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0E19  set 0x19  (NoteSynth)
static inline unsigned short NSSetUpdateRate(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0E19\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void * NSSetUserUpdateRtn(void * a0);  // 0x0F19
// tool 0x011A  set 0x1A  (NoteSequencer)
static inline void SeqBootInit(void) {
    __asm__ volatile (
        "ldx #0x011A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SeqStartUp(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x021A
// tool 0x031A  set 0x1A  (NoteSequencer)
static inline void SeqShutDown(void) {
    __asm__ volatile (
        "ldx #0x031A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x041A  set 0x1A  (NoteSequencer)
static inline unsigned short SeqVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x041A\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x051A  set 0x1A  (NoteSequencer)
static inline void SeqReset(void) {
    __asm__ volatile (
        "ldx #0x051A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x061A  set 0x1A  (NoteSequencer)
static inline unsigned short SeqStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x061A\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x091A  set 0x1A  (NoteSequencer)
static inline void SetIncr(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x091A\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0A1A  set 0x1A  (NoteSequencer)
static inline unsigned short ClearIncr(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0A1A\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0B1A  set 0x1A  (NoteSequencer)
static inline unsigned short GetTimer(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0B1A\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * GetLoc(void);  // 0x0C1A
// tool 0x0D1A  set 0x1A  (NoteSequencer)
static inline void SeqAllNotesOff(void) {
    __asm__ volatile (
        "ldx #0x0D1A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SetTrkInfo(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x0E1A
extern void StartSeq(void * a0, void * a1, void * a2);  // 0x0F1A
// tool 0x101A  set 0x1A  (NoteSequencer)
static inline void StepSeq(void) {
    __asm__ volatile (
        "ldx #0x101A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x111A  set 0x1A  (NoteSequencer)
static inline void StopSeq(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x111A\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SetInstTable(void * a0);  // 0x121A
// tool 0x131A  set 0x1A  (NoteSequencer)
static inline void StartInts(void) {
    __asm__ volatile (
        "ldx #0x131A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x141A  set 0x1A  (NoteSequencer)
static inline void StopInts(void) {
    __asm__ volatile (
        "ldx #0x141A\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void StartSeqRel(void * a0, void * a1, void * a2);  // 0x151A
// tool 0x011B  set 0x1B  (FontManager)
static inline void FMBootInit(void) {
    __asm__ volatile (
        "ldx #0x011B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void FMStartUp(unsigned short a0, unsigned short a1);  // 0x021B
// tool 0x031B  set 0x1B  (FontManager)
static inline void FMShutDown(void) {
    __asm__ volatile (
        "ldx #0x031B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x041B  set 0x1B  (FontManager)
static inline unsigned short FMVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x041B\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x051B  set 0x1B  (FontManager)
static inline void FMReset(void) {
    __asm__ volatile (
        "ldx #0x051B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x061B  set 0x1B  (FontManager)
static inline unsigned short FMStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x061B\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x091B  set 0x1B  (FontManager)
static inline unsigned short CountFamilies(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x091B\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short FindFamily(unsigned short a0, unsigned short a1, void * a2);  // 0x0A1B
extern unsigned short GetFamInfo(unsigned short a0, void * a1);  // 0x0B1B
extern unsigned short GetFamNum(void * a0);  // 0x0C1B
extern void AddFamily(unsigned short a0, void * a1);  // 0x0D1B
extern void InstallFont(unsigned long a0, unsigned short a1);  // 0x0E1B
extern void SetPurgeStat(unsigned long a0, unsigned short a1);  // 0x0F1B
extern unsigned short CountFonts(unsigned long a0, unsigned short a1);  // 0x101B
extern void FindFontStats(unsigned long a0, unsigned short a1, unsigned short a2, void * a3);  // 0x111B
extern void LoadFont(unsigned long a0, unsigned short a1, unsigned short a2, void * a3);  // 0x121B
// tool 0x131B  set 0x1B  (FontManager)
static inline void LoadSysFont(void) {
    __asm__ volatile (
        "ldx #0x131B\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void AddFontVar(void * a0, unsigned short a1);  // 0x141B
extern void FixFontMenu(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x151B
extern unsigned long ChooseFont(unsigned long a0, unsigned short a1);  // 0x161B
// tool 0x171B  set 0x1B  (FontManager)
static inline unsigned short ItemID2FamNum(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x171B\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void FMSetSysFont(unsigned long a0);  // 0x181B
extern unsigned long FMGetSysFID(void);  // 0x191B
extern unsigned long FMGetCurFID(void);  // 0x1A1B
// tool 0x1B1B  set 0x1B  (FontManager)
static inline unsigned short FamNum2ItemID(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1B1B\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void InstallWithStats(unsigned long a0, unsigned short a1, void * a2);  // 0x1C1B
// tool 0x011C  set 0x1C  (ListManager)
static inline void ListBootInit(void) {
    __asm__ volatile (
        "ldx #0x011C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x021C  set 0x1C  (ListManager)
static inline void ListStartUp(void) {
    __asm__ volatile (
        "ldx #0x021C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x031C  set 0x1C  (ListManager)
static inline void ListShutDown(void) {
    __asm__ volatile (
        "ldx #0x031C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x041C  set 0x1C  (ListManager)
static inline unsigned short ListVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x041C\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x051C  set 0x1C  (ListManager)
static inline void ListReset(void) {
    __asm__ volatile (
        "ldx #0x051C\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x061C  set 0x1C  (ListManager)
static inline unsigned short ListStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x061C\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * CreateList(void * a0, void * a1);  // 0x091C
extern void SortList(void * a0, void * a1);  // 0x0A1C
extern void * NextMember(void * a0, void * a1);  // 0x0B1C
extern void DrawMember(void * a0, void * a1);  // 0x0C1C
extern void SelectMember(void * a0, void * a1);  // 0x0D1C
extern void * GetListDefProc(void);  // 0x0E1C
extern unsigned long ResetMember(void * a0);  // 0x0F1C
extern void NewList(void * a0, void * a1);  // 0x101C
extern void DrawMember2(unsigned short a0, void * a1);  // 0x111C
extern unsigned short NextMember2(unsigned short a0, void * a1);  // 0x121C
extern unsigned short ResetMember2(void * a0);  // 0x131C
extern void SelectMember2(unsigned short a0, void * a1);  // 0x141C
extern void SortList2(void * a0, void * a1);  // 0x151C
extern void NewList2(void * a0, unsigned short a1, unsigned long a2, unsigned short a3, unsigned short a4, void * a5);  // 0x161C
extern void ListKey(unsigned short a0, void * a1, void * a2);  // 0x171C
extern unsigned short CompareStrings(unsigned short a0, void * a1, void * a2);  // 0x181C
// tool 0x011D  set 0x1D  (ACETools)
static inline void ACEBootInit(void) {
    __asm__ volatile (
        "ldx #0x011D\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x021D  set 0x1D  (ACETools)
static inline void ACEStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x021D\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x031D  set 0x1D  (ACETools)
static inline void ACEShutDown(void) {
    __asm__ volatile (
        "ldx #0x031D\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x041D  set 0x1D  (ACETools)
static inline unsigned short ACEVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x041D\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x051D  set 0x1D  (ACETools)
static inline void ACEReset(void) {
    __asm__ volatile (
        "ldx #0x051D\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x061D  set 0x1D  (ACETools)
static inline unsigned short ACEStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x061D\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned long ACEInfo(unsigned short a0);  // 0x071D
extern void ACECompress(void * a0, unsigned long a1, void * a2, unsigned long a3, unsigned short a4, unsigned short a5);  // 0x091D
extern void ACEExpand(void * a0, unsigned long a1, void * a2, unsigned long a3, unsigned short a4, unsigned short a5);  // 0x0A1D
// tool 0x0B1D  set 0x1D  (ACETools)
static inline void ACECompBegin(void) {
    __asm__ volatile (
        "ldx #0x0B1D\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0C1D  set 0x1D  (ACETools)
static inline void ACEExpBegin(void) {
    __asm__ volatile (
        "ldx #0x0C1D\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void GetACEExpState(void * a0);  // 0x0D1D
extern void SetACEExpState(void * a0);  // 0x0E1D
// tool 0x011E  set 0x1E  (ResourceManager)
static inline void ResourceBootInit(void) {
    __asm__ volatile (
        "ldx #0x011E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x021E  set 0x1E  (ResourceManager)
static inline void ResourceStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x021E\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x031E  set 0x1E  (ResourceManager)
static inline void ResourceShutDown(void) {
    __asm__ volatile (
        "ldx #0x031E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x041E  set 0x1E  (ResourceManager)
static inline unsigned short ResourceVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x041E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x051E  set 0x1E  (ResourceManager)
static inline void ResourceReset(void) {
    __asm__ volatile (
        "ldx #0x051E\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x061E  set 0x1E  (ResourceManager)
static inline unsigned short ResourceStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x061E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void CreateResourceFile(unsigned long a0, unsigned short a1, unsigned short a2, void * a3);  // 0x091E
extern unsigned short OpenResourceFile(unsigned short a0, void * a1, void * a2);  // 0x0A1E
// tool 0x0B1E  set 0x1E  (ResourceManager)
static inline void CloseResourceFile(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0B1E\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void AddResource(void * a0, unsigned short a1, unsigned short a2, unsigned long a3);  // 0x0C1E
// tool 0x0D1E  set 0x1E  (ResourceManager)
static inline void UpdateResourcefile(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0D1E\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void * LoadResource(unsigned short a0, unsigned long a1);  // 0x0E1E
extern void RemoveResource(unsigned short a0, unsigned long a1);  // 0x0F1E
extern void MarkResourceChange(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x101E
// tool 0x111E  set 0x1E  (ResourceManager)
static inline void SetCurResourceFile(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x111E\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x121E  set 0x1E  (ResourceManager)
static inline unsigned short GetCurResourceFile(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x121E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x131E  set 0x1E  (ResourceManager)
static inline void SetCurResourceApp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x131E\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x141E  set 0x1E  (ResourceManager)
static inline unsigned short GetCurResourceApp(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x141E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short HomeResourceFile(unsigned short a0, unsigned long a1);  // 0x151E
extern void WriteResource(unsigned short a0, unsigned long a1);  // 0x161E
extern void ReleaseResource(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x171E
extern void DetachResource(unsigned short a0, unsigned long a1);  // 0x181E
extern unsigned long UniqueResourceID(unsigned short a0, unsigned short a1);  // 0x191E
extern void SetResourceID(unsigned long a0, unsigned short a1, unsigned long a2);  // 0x1A1E
extern unsigned short GetResourceAttr(unsigned short a0, unsigned long a1);  // 0x1B1E
extern void SetResourceAttr(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x1C1E
extern unsigned long GetResourceSize(unsigned short a0, unsigned long a1);  // 0x1D1E
extern void MatchResourceHandle(void * a0, void * a1);  // 0x1E1E
// tool 0x1F1E  set 0x1E  (ResourceManager)
static inline unsigned short GetOpenFileRefNum(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1F1E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x201E  set 0x1E  (ResourceManager)
static inline unsigned short CountTypes(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x201E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x211E  set 0x1E  (ResourceManager)
static inline unsigned short GetIndType(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x211E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned long CountResources(unsigned short a0);  // 0x221E
extern unsigned long GetIndResource(unsigned short a0, unsigned long a1);  // 0x231E
// tool 0x241E  set 0x1E  (ResourceManager)
static inline unsigned short SetResourceLoad(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x241E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x251E  set 0x1E  (ResourceManager)
static inline unsigned short SetResourceFileDepth(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x251E\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void * GetMapHandle(unsigned short a0);  // 0x261E
extern unsigned long LoadAbsResource(void * a0, unsigned long a1, unsigned short a2, unsigned long a3);  // 0x271E
extern void ResourceConverter(void * a0, unsigned short a1, unsigned short a2);  // 0x281E
extern void * LoadResource2(unsigned short a0, void * a1, unsigned short a2, unsigned long a3);  // 0x291E
extern unsigned long RMFindNamedResource(unsigned short a0, void * a1, void * a2);  // 0x2A1E
extern void RMGetResourceName(unsigned short a0, unsigned long a1, void * a2);  // 0x2B1E
extern void * RMLoadNamedResource(unsigned short a0, void * a1);  // 0x2C1E
extern void RMSetResourceName(unsigned short a0, unsigned long a1, void * a2);  // 0x2D1E
extern unsigned short OpenResourceFileByID(unsigned short a0, unsigned short a1);  // 0x2E1E
extern void CompactResourceFile(unsigned short a0, unsigned short a1);  // 0x2F1E
// tool 0x0120  set 0x20  (VideoOverlay)
static inline void MidiBootInit(void) {
    __asm__ volatile (
        "ldx #0x0120\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void MidiStartUp(unsigned short a0, unsigned short a1);  // 0x0220
// tool 0x0320  set 0x20  (VideoOverlay)
static inline void MidiShutDown(void) {
    __asm__ volatile (
        "ldx #0x0320\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0420  set 0x20  (VideoOverlay)
static inline unsigned short MidiVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0420\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0520  set 0x20  (VideoOverlay)
static inline void MidiReset(void) {
    __asm__ volatile (
        "ldx #0x0520\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0620  set 0x20  (VideoOverlay)
static inline unsigned short MidiStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0620\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void MidiControl(unsigned short a0, unsigned long a1);  // 0x0920
extern void MidiDevice(unsigned short a0, void * a1);  // 0x0A20
extern void MidiClock(unsigned short a0, unsigned long a1);  // 0x0B20
extern unsigned long MidiInfo(unsigned short a0);  // 0x0C20
extern unsigned short MidiReadPacket(void * a0, unsigned short a1);  // 0x0D20
extern unsigned short MidiWritePacket(void * a0);  // 0x0E20
// tool 0x0121  set 0x21  (Teletext)
static inline void VDBootInit(void) {
    __asm__ volatile (
        "ldx #0x0121\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0221  set 0x21  (Teletext)
static inline void VDStartUp(void) {
    __asm__ volatile (
        "ldx #0x0221\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0321  set 0x21  (Teletext)
static inline void VDShutDown(void) {
    __asm__ volatile (
        "ldx #0x0321\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0421  set 0x21  (Teletext)
static inline unsigned short VDVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0421\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0521  set 0x21  (Teletext)
static inline void VDReset(void) {
    __asm__ volatile (
        "ldx #0x0521\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0621  set 0x21  (Teletext)
static inline unsigned short VDStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0621\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0921  set 0x21  (Teletext)
static inline unsigned short VDInStatus(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0921\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0A21  set 0x21  (Teletext)
static inline void VDInSetStd(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0A21\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0B21  set 0x21  (Teletext)
static inline unsigned short VDInGetStd(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0B21\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void VDInConvAdj(unsigned short a0, unsigned short a1);  // 0x0C21
extern void VDKeyControl(unsigned short a0, unsigned short a1);  // 0x0D21
// tool 0x0E21  set 0x21  (Teletext)
static inline unsigned short VDKeyStatus(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x0E21\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void VDKeySetKCol(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x0F21
// tool 0x1021  set 0x21  (Teletext)
static inline unsigned short VDKeyGetKRCol(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1021\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1121  set 0x21  (Teletext)
static inline unsigned short VDKeyGetKGCol(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1121\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1221  set 0x21  (Teletext)
static inline unsigned short VDKeyGetKBCol(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1221\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1321  set 0x21  (Teletext)
static inline void VDKeySetKDiss(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1321\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1421  set 0x21  (Teletext)
static inline unsigned short VDKeyGetKDiss(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1421\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1521  set 0x21  (Teletext)
static inline void VDKeySetNKDiss(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1521\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1621  set 0x21  (Teletext)
static inline unsigned short VDKeyGetNKDiss(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1621\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1721  set 0x21  (Teletext)
static inline void VDOutSetStd(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1721\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1821  set 0x21  (Teletext)
static inline unsigned short VDOutGetStd(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1821\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void VDOutControl(unsigned short a0, unsigned short a1);  // 0x1921
// tool 0x1A21  set 0x21  (Teletext)
static inline unsigned short VDOutStatus(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1A21\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1B21  set 0x21  (Teletext)
static inline unsigned short VDGetFeatures(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1B21\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

extern void VDInControl(unsigned short a0, unsigned short a1);  // 0x1C21
extern void VDGGControl(unsigned short a0, unsigned short a1);  // 0x1D21
// tool 0x1E21  set 0x21  (Teletext)
static inline unsigned short VDGGStatus(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x1E21\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0122  set 0x22  (TextEdit)
static inline void TEBootInit(void) {
    __asm__ volatile (
        "ldx #0x0122\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void TEStartUp(unsigned short a0, unsigned short a1);  // 0x0222
// tool 0x0322  set 0x22  (TextEdit)
static inline void TEShutDown(void) {
    __asm__ volatile (
        "ldx #0x0322\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0422  set 0x22  (TextEdit)
static inline unsigned short TEVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0422\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0522  set 0x22  (TextEdit)
static inline void TEReset(void) {
    __asm__ volatile (
        "ldx #0x0522\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0622  set 0x22  (TextEdit)
static inline unsigned short TEStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0622\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned short TENew(void * a0);  // 0x0922
// tool 0x0A22  set 0x22  (TextEdit)
static inline void TEKill(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0A22\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void TESetText(unsigned short a0, unsigned long a1, unsigned long a2, unsigned short a3, unsigned long a4, unsigned short a5);  // 0x0B22
extern unsigned long TEGetText(unsigned short a0, unsigned long a1, unsigned long a2, unsigned short a3, unsigned long a4, unsigned short a5);  // 0x0C22
extern void TEGetTextInfo(void * a0, unsigned short a1, unsigned short a2);  // 0x0D22
// tool 0x0E22  set 0x22  (TextEdit)
static inline void TEIdle(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0E22\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0F22  set 0x22  (TextEdit)
static inline void TEActivate(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0F22\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1022  set 0x22  (TextEdit)
static inline void TEDeactivate(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1022\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void TEClick(void * a0, unsigned short a1);  // 0x1122
// tool 0x1222  set 0x22  (TextEdit)
static inline void TEUpdate(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1222\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern unsigned long TEPaintText(void * a0, unsigned long a1, void * a2, unsigned short a3, unsigned short a4);  // 0x1322
extern void TEKey(void * a0, unsigned short a1);  // 0x1422
// tool 0x1622  set 0x22  (TextEdit)
static inline void TECut(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1622\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1722  set 0x22  (TextEdit)
static inline void TECopy(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1722\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1822  set 0x22  (TextEdit)
static inline void TEPaste(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1822\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1922  set 0x22  (TextEdit)
static inline void TEClear(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1922\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void TEInsert(unsigned short a0, unsigned long a1, unsigned long a2, unsigned short a3, unsigned long a4, unsigned short a5);  // 0x1A22
extern void TEReplace(unsigned short a0, unsigned long a1, unsigned long a2, unsigned short a3, unsigned long a4, unsigned short a5);  // 0x1B22
extern void TEGetSelection(void * a0, void * a1, unsigned short a2);  // 0x1C22
extern void TESetSelection(unsigned long a0, unsigned long a1, unsigned short a2);  // 0x1D22
extern unsigned short TEGetSelectionStyle(void * a0, unsigned short a1, unsigned short a2);  // 0x1E22
extern void TEStyleChange(unsigned short a0, void * a1, unsigned short a2);  // 0x1F22
extern void TEOffsetToPoint(unsigned long a0, void * a1, void * a2, unsigned short a3);  // 0x2022
extern unsigned long TEPointToOffset(unsigned long a0, unsigned long a1, unsigned short a2);  // 0x2122
extern void * TEGetDefProc(void);  // 0x2222
extern void TEGetRuler(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x2322
extern void TESetRuler(unsigned short a0, unsigned long a1, unsigned short a2);  // 0x2422
extern unsigned long TEScroll(unsigned short a0, unsigned long a1, unsigned long a2, unsigned short a3);  // 0x2522
extern void * TEGetInternalProc(void);  // 0x2622
extern unsigned short TEGetLastError(unsigned short a0, unsigned short a1);  // 0x2722
// tool 0x2822  set 0x22  (TextEdit)
static inline void TECompactRecord(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2822\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0123  set 0x23  (MediaControl)
static inline void MSBootInit(void) {
    __asm__ volatile (
        "ldx #0x0123\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0223  set 0x23  (MediaControl)
static inline void MSStartUp(void) {
    __asm__ volatile (
        "ldx #0x0223\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0323  set 0x23  (MediaControl)
static inline void MSShutDown(void) {
    __asm__ volatile (
        "ldx #0x0323\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0423  set 0x23  (MediaControl)
static inline unsigned short MSVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0423\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0523  set 0x23  (MediaControl)
static inline void MSReset(void) {
    __asm__ volatile (
        "ldx #0x0523\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0623  set 0x23  (MediaControl)
static inline unsigned short MSStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0623\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0923  set 0x23  (MediaControl)
static inline void SetBasicChannel(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0923\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0A23  set 0x23  (MediaControl)
static inline void SetMIDIMode(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0A23\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void PlayNote(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x0B23
extern void StopNote(unsigned short a0, unsigned short a1);  // 0x0C23
// tool 0x0D23  set 0x23  (MediaControl)
static inline void KillAllNotes(void) {
    __asm__ volatile (
        "ldx #0x0D23\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0E23  set 0x23  (MediaControl)
static inline void SetRecTrack(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0E23\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SetPlayTrack(unsigned short a0, unsigned short a1);  // 0x0F23
extern void TrackToChannel(unsigned short a0, unsigned short a1);  // 0x1023
extern void * Locate(unsigned long a0, void * a1);  // 0x1123
// tool 0x1223  set 0x23  (MediaControl)
static inline void SetVelComp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1223\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SetMIDIPort(unsigned short a0, unsigned short a1);  // 0x1323
extern void SetInstrument(void * a0, unsigned short a1);  // 0x1423
extern void SeqPlayer(void * a0);  // 0x1523
// tool 0x1623  set 0x23  (MediaControl)
static inline void SetTempo(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1623\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void SetCallBack(void * a0);  // 0x1723
extern void SysExOut(void * a0, unsigned short a1, void * a2);  // 0x1823
// tool 0x1923  set 0x23  (MediaControl)
static inline void SetBeat(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1923\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void MIDIMessage(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, unsigned short a4);  // 0x1A23
extern void * LocateEnd(void * a0);  // 0x1B23
extern void Merge(void * a0, void * a1);  // 0x1C23
extern void DeleteTrack(unsigned short a0, void * a1);  // 0x1D23
extern void SetMetro(unsigned short a0, unsigned short a1, void * a2);  // 0x1E23
extern long long GetMSData(void);  // 0x1F23
extern unsigned long ConvertToTime(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3);  // 0x2023
extern void * ConvertToMeasure(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x2123
// tool 0x2223  set 0x23  (MediaControl)
static inline void MSSuspend(void) {
    __asm__ volatile (
        "ldx #0x2223\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x2323  set 0x23  (MediaControl)
static inline void MSResume(void) {
    __asm__ volatile (
        "ldx #0x2323\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void SetTuningTable(void * a0);  // 0x2423
extern void GetTuningTable(void * a0);  // 0x2523
extern void SetTrackOut(unsigned short a0, unsigned short a1);  // 0x2623
extern void InitMIDIDriver(unsigned short a0, unsigned short a1, unsigned short a2, void * a3);  // 0x2723
// tool 0x2823  set 0x23  (MediaControl)
static inline void RemoveMIDIDriver(void) {
    __asm__ volatile (
        "ldx #0x2823\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0126  set 0x26  (?)
static inline void MCBootInit(void) {
    __asm__ volatile (
        "ldx #0x0126\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0226  set 0x26  (?)
static inline void MCStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0226\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0326  set 0x26  (?)
static inline void MCShutDown(void) {
    __asm__ volatile (
        "ldx #0x0326\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0426  set 0x26  (?)
static inline unsigned short MCVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0426\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0526  set 0x26  (?)
static inline void MCReset(void) {
    __asm__ volatile (
        "ldx #0x0526\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0626  set 0x26  (?)
static inline unsigned short MCStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0626\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void MCGetErrorMsg(unsigned short a0, void * a1);  // 0x0926
// tool 0x0A26  set 0x26  (?)
static inline void MCLoadDriver(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0A26\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0B26  set 0x26  (?)
static inline void MCUnLoadDriver(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0B26\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern unsigned long MCTimeToBin(unsigned long a0);  // 0x0C26
extern unsigned long MCBinToTime(unsigned long a0);  // 0x0D26
extern void MCGetTrackTitle(unsigned long a0, unsigned short a1, void * a2);  // 0x0E26
extern void MCSetTrackTitle(unsigned long a0, unsigned short a1, void * a2);  // 0x0F26
extern void MCGetProgram(unsigned long a0, void * a1);  // 0x1026
extern void MCSetProgram(unsigned long a0, void * a1);  // 0x1126
extern void MCGetDiscTitle(unsigned long a0, void * a1);  // 0x1226
extern void MCSetDiscTitle(unsigned long a0, void * a1);  // 0x1326
extern void MCDStartUp(unsigned short a0, void * a1, unsigned short a2);  // 0x1426
// tool 0x1526  set 0x26  (?)
static inline void MCDShutDown(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1526\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern unsigned long MCGetFeatures(unsigned short a0, unsigned short a1);  // 0x1626
// tool 0x1726  set 0x26  (?)
static inline void MCPlay(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1726\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x1826  set 0x26  (?)
static inline void MCPause(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x1826\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void MCSendRawData(unsigned short a0, void * a1);  // 0x1926
extern unsigned short MCGetStatus(unsigned short a0, unsigned short a1);  // 0x1A26
extern void MCControl(unsigned short a0, unsigned short a1);  // 0x1B26
extern void MCScan(unsigned short a0, unsigned short a1);  // 0x1C26
extern void MCGetSpeeds(unsigned short a0, void * a1);  // 0x1D26
extern void MCSpeed(unsigned short a0, unsigned short a1);  // 0x1E26
extern void MCStopAt(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x1F26
extern void MCJog(unsigned short a0, unsigned short a1, unsigned long a2, unsigned short a3);  // 0x2026
extern void MCSearchTo(unsigned short a0, unsigned short a1, unsigned long a2);  // 0x2126
// tool 0x2226  set 0x26  (?)
static inline unsigned short MCSearchDone(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x2226\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x2326  set 0x26  (?)
static inline void MCSearchWait(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2326\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern unsigned long MCGetPosition(unsigned short a0, unsigned short a1);  // 0x2426
extern void MCSetAudio(unsigned short a0, unsigned short a1);  // 0x2526
extern unsigned long MCGetTimes(unsigned short a0, unsigned short a1);  // 0x2626
extern unsigned long MCGetDiscTOC(unsigned short a0, unsigned short a1);  // 0x2726
extern unsigned long MCGetDiscID(unsigned short a0);  // 0x2826
// tool 0x2926  set 0x26  (?)
static inline unsigned short MCGetNoTracks(unsigned short a0) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "pha\n"               // arg0
        "ldx #0x2926\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        : "a"(a0)
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x2A26  set 0x26  (?)
static inline void MCRecord(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2A26\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x2B26  set 0x26  (?)
static inline void MCStop(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x2B26\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void MCWaitRawData(unsigned short a0, void * a1, unsigned short a2, unsigned short a3);  // 0x2C26
extern void MCGetName(unsigned short a0, void * a1);  // 0x2D26
extern void MCSetVolume(unsigned short a0, unsigned short a1, unsigned short a2);  // 0x2E26
// tool 0x0132  set 0x32  (MediaControl2)
static inline void MaleBootInit(void) {
    __asm__ volatile (
        "ldx #0x0132\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0232  set 0x32  (MediaControl2)
static inline void MaleStartUp(void) {
    __asm__ volatile (
        "ldx #0x0232\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0332  set 0x32  (MediaControl2)
static inline void MaleShutDown(void) {
    __asm__ volatile (
        "ldx #0x0332\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0432  set 0x32  (MediaControl2)
static inline unsigned short MaleVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0432\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0532  set 0x32  (MediaControl2)
static inline void MaleReset(void) {
    __asm__ volatile (
        "ldx #0x0532\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0632  set 0x32  (MediaControl2)
static inline unsigned short MaleStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0632\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void MaleSpeak(unsigned short a0, unsigned short a1, unsigned short a2, void * a3);  // 0x0932
// tool 0x0133  set 0x33  (?)
static inline void FemaleBootInit(void) {
    __asm__ volatile (
        "ldx #0x0133\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0233  set 0x33  (?)
static inline void FemaleStartUp(void) {
    __asm__ volatile (
        "ldx #0x0233\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0333  set 0x33  (?)
static inline void FemaleShutDown(void) {
    __asm__ volatile (
        "ldx #0x0333\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0433  set 0x33  (?)
static inline unsigned short FemaleVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0433\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0533  set 0x33  (?)
static inline void FemaleReset(void) {
    __asm__ volatile (
        "ldx #0x0533\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0633  set 0x33  (?)
static inline unsigned short FemaleStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0633\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void FemaleSpeak(unsigned short a0, unsigned short a1, unsigned short a2, void * a3);  // 0x0933
// tool 0x0134  set 0x34  (?)
static inline void SpeechBootInit(void) {
    __asm__ volatile (
        "ldx #0x0134\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0234  set 0x34  (?)
static inline void SpeechStartUp(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0234\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0334  set 0x34  (?)
static inline void SpeechShutDown(void) {
    __asm__ volatile (
        "ldx #0x0334\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0434  set 0x34  (?)
static inline unsigned short SpeechVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0434\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0534  set 0x34  (?)
static inline void SpeechReset(void) {
    __asm__ volatile (
        "ldx #0x0534\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0634  set 0x34  (?)
static inline unsigned short SpeechStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0634\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void Parse(void * a0, void * a1, unsigned short a2);  // 0x0934
extern void DictInsert(void * a0, void * a1);  // 0x0A34
extern void DictDelete(void * a0);  // 0x0B34
extern void * DictDump(void * a0, void * a1);  // 0x0C34
extern void SetSayGlobals(unsigned short a0, unsigned short a1, unsigned short a2, unsigned short a3, unsigned short a4);  // 0x0D34
// tool 0x0E34  set 0x34  (?)
static inline void DictInit(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0E34\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

extern void Say(void * a0);  // 0x0F34
// tool 0x04FF  set 0xFF  (?)
static inline unsigned short DebugVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x04FF\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x06FF  set 0xFF  (?)
static inline unsigned short DebugStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x06FF\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void DebugStr(void * a0);  // 0x09FF
extern void SetMileStone(void * a0);  // 0x0AFF
extern void DebugSetHook(void * a0);  // 0x0BFF
extern unsigned long DebugGetInfo(unsigned short a0);  // 0x0CFF
extern void DebugControl(unsigned long a0, unsigned long a1, unsigned short a2, unsigned short a3);  // 0x0DFF
extern unsigned long DebugQuery(unsigned long a0, unsigned short a1, unsigned short a2);  // 0x0EFF
// tool 0x0101  set 0x01  (ToolLocator)
static inline void fmdBootInit(void) {
    __asm__ volatile (
        "ldx #0x0101\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0201  set 0x01  (ToolLocator)
static inline void fmdStartUp(void) {
    __asm__ volatile (
        "ldx #0x0201\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0301  set 0x01  (ToolLocator)
static inline void fmdShutDown(void) {
    __asm__ volatile (
        "ldx #0x0301\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0401  set 0x01  (ToolLocator)
static inline unsigned short fmdVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0401\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0501  set 0x01  (ToolLocator)
static inline void fmdReset(void) {
    __asm__ volatile (
        "ldx #0x0501\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0601  set 0x01  (ToolLocator)
static inline unsigned short fmdStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0601\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern unsigned long fakeModalDialog(void * a0, void * a1, void * a2, void * a3, unsigned short a4);  // 0x0901
extern void fmdSetMenuProc(void * a0);  // 0x0A01
extern void * fmdGetMenuProc(void);  // 0x0B01
// tool 0x0C01  set 0x01  (ToolLocator)
static inline void fmdStdDrawProc(void) {
    __asm__ volatile (
        "ldx #0x0C01\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0D01  set 0x01  (ToolLocator)
static inline void fmdEditMenu(void) {
    __asm__ volatile (
        "ldx #0x0D01\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern unsigned short fmdFindCursorCtl(void * a0, unsigned short a1, unsigned short a2, void * a3);  // 0x0E01
extern void fmdLESetText(void * a0, unsigned long a1, void * a2);  // 0x0F01
extern void fmdLEGetText(void * a0, unsigned long a1, void * a2);  // 0x1001
extern unsigned short fmdWhichRadio(void * a0, unsigned long a1);  // 0x1101
// tool 0x1201  set 0x01  (ToolLocator)
static inline void fmdIBeamCursor(void) {
    __asm__ volatile (
        "ldx #0x1201\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x1301  set 0x01  (ToolLocator)
static inline void fmdInitIBeam(void) {
    __asm__ volatile (
        "ldx #0x1301\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

extern void fmdSetIBeam(void * a0);  // 0x1401
extern void * fmdGetIBeamAdr(void);  // 0x1501
// tool 0x1601  set 0x01  (ToolLocator)
static inline unsigned short fmdGetCtlPart(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1601\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x1701  set 0x01  (ToolLocator)
static inline unsigned short fmdGetError(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x1701\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0102  set 0x02  (MemoryManager)
static inline void pmapBootInit(void) {
    __asm__ volatile (
        "ldx #0x0102\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0202  set 0x02  (MemoryManager)
static inline void pmapStartUp(void) {
    __asm__ volatile (
        "ldx #0x0202\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0302  set 0x02  (MemoryManager)
static inline void pmapShutDown(void) {
    __asm__ volatile (
        "ldx #0x0302\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0402  set 0x02  (MemoryManager)
static inline unsigned short pmapVersion(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0402\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

// tool 0x0502  set 0x02  (MemoryManager)
static inline void pmapReset(void) {
    __asm__ volatile (
        "ldx #0x0502\n"
        "jsl 0xe10000\n"
        :
        :
        : "a", "x", "y", "memory"
    );
}

// tool 0x0602  set 0x02  (MemoryManager)
static inline unsigned short pmapStatus(void) {
    unsigned short _r;
    __asm__ volatile (
        "pha\n"               // result space
        "ldx #0x0602\n"
        "jsl 0xe10000\n"
        "pla\n"
        : "=a"(_r)
        :
        : "x", "y", "memory"
    );
    return _r;
}

extern void * pixelMap2Rgn(void * a0, unsigned short a1, unsigned short a2);  // 0x0902
extern void * newPort(void * a0);  // 0x0A02
extern void killPort(void * a0);  // 0x0B02
extern void OS_KIND(unsigned short a0, unsigned short a1);  // 0x00BC
// tool 0x00BD  set 0xBD  (?)
static inline void OS_BOOT(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x00BD\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x00BE  set 0xBE  (?)
static inline void OS_BUSY(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x00BE\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x006A  set 0x6A  (?)
static inline void fstError(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x006A\n"
        "jsl 0xe100a8\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x0201  set 0x01  (ToolLocator)
static inline void memErr(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x0201\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}

// tool 0x8000  set 0x00  (?)
static inline void tellFinderGetDebugInfo(unsigned short a0) {
    __asm__ volatile (
        "pha\n"               // arg0
        "ldx #0x8000\n"
        "jsl 0xe10000\n"
        :
        : "a"(a0)
        : "x", "y", "memory"
    );
}


#ifdef __cplusplus
}
#endif

#endif  // IIGS_TOOLBOX_H