#ifndef DEFINES_VMM_H
#define DEFINES_VMM_H

/*
    *** Automatically generated from '/home/aros/ABIv11/AROS/AROS/workbench/system/VMM/vmm.lib/vmm.conf'. Edits will be lost. ***
    Copyright (C) 1995-2026, The AROS Development Team. All rights reserved.
*/

/*
    Desc: Defines for vmm
*/

#include <aros/libcall.h>
#include <exec/types.h>
#include <aros/symbolsets.h>
#include <aros/preprocessor/variadic/cast2iptr.hpp>

#if !defined(__VMM_LIBBASE)
#define __VMM_LIBBASE __aros_getbase_VMMBase()
#endif
#ifndef __aros_getbase_VMMBase
extern struct Library *__aros_getbase_VMMBase(void);
#endif

__BEGIN_DECLS


#if !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__)

#define __AllocVMem_WB(__VMMBase, __arg1, __arg2) ({\
        AROS_LIBREQ(VMMBase,40)\
        AROS_LC2(APTR, AllocVMem,\
         AROS_LCA(ULONG, (__arg1), D0), \
         AROS_LCA(ULONG, (__arg2), D1), \
        struct Library *, (__VMMBase), 5, VMM);\
})

#define AllocVMem(arg1, arg2) \
    __AllocVMem_WB(__VMM_LIBBASE, (arg1), (arg2))

#endif /* !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__) */

#if !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__)

#define __FreeVMem_WB(__VMMBase, __arg1, __arg2) ({\
        AROS_LIBREQ(VMMBase,40)\
        AROS_LC2NR(void, FreeVMem,\
         AROS_LCA(APTR, (__arg1), A1), \
         AROS_LCA(ULONG, (__arg2), D0), \
        struct Library *, (__VMMBase), 6, VMM);\
})

#define FreeVMem(arg1, arg2) \
    __FreeVMem_WB(__VMM_LIBBASE, (arg1), (arg2))

#endif /* !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__) */

#if !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__)

#define __AvailVMem_WB(__VMMBase, __arg1) ({\
        AROS_LIBREQ(VMMBase,40)\
        AROS_LC1(ULONG, AvailVMem,\
         AROS_LCA(ULONG, (__arg1), D1), \
        struct Library *, (__VMMBase), 7, VMM);\
})

#define AvailVMem(arg1) \
    __AvailVMem_WB(__VMM_LIBBASE, (arg1))

#endif /* !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__) */

#if !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__)

#define __AllocVVec_WB(__VMMBase, __arg1, __arg2) ({\
        AROS_LIBREQ(VMMBase,40)\
        AROS_LC2(APTR, AllocVVec,\
         AROS_LCA(ULONG, (__arg1), D0), \
         AROS_LCA(ULONG, (__arg2), D1), \
        struct Library *, (__VMMBase), 8, VMM);\
})

#define AllocVVec(arg1, arg2) \
    __AllocVVec_WB(__VMM_LIBBASE, (arg1), (arg2))

#endif /* !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__) */

#if !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__)

#define __FreeVVec_WB(__VMMBase, __arg1) ({\
        AROS_LIBREQ(VMMBase,40)\
        AROS_LC1NR(void, FreeVVec,\
         AROS_LCA(APTR, (__arg1), A1), \
        struct Library *, (__VMMBase), 9, VMM);\
})

#define FreeVVec(arg1) \
    __FreeVVec_WB(__VMM_LIBBASE, (arg1))

#endif /* !defined(__VMM_LIBAPI__) || (40 <= __VMM_LIBAPI__) */

__END_DECLS

#endif /* DEFINES_VMM_H*/
