/* Machine generated file, do not modify */
#include <stdlib.h>
#include "HsFFI.h"
#include "HsOpenGL.h"

static HugsAPI5 *hugs = 0;

static void hugsprim_v8240_18(HugsStackPtr);
static void hugsprim_v8240_18(HugsStackPtr hugs_root)
{
    void (*v8240)(HsWord32 arg1, HsInt32 arg2, HsInt32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsInt32 arg7, HsInt32 arg8, HsWord32 arg9, HsInt32 arg10, HsPtr arg11);
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsInt32 arg8;
    HsWord32 arg9;
    HsInt32 arg10;
    HsPtr arg11;
    v8240 = (void (*)(HsWord32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsWord32, HsInt32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getInt32();
    arg9 = hugs->getWord32();
    arg10 = hugs->getInt32();
    arg11 = hugs->getPtr();
    v8240(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8241_17(HugsStackPtr);
static void hugsprim_v8241_17(HugsStackPtr hugs_root)
{
    void (*v8241)(HsWord32 arg1, HsInt32 arg2, HsInt32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsWord32 arg7, HsInt32 arg8, HsPtr arg9);
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsWord32 arg7;
    HsInt32 arg8;
    HsPtr arg9;
    v8241 = (void (*)(HsWord32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsWord32, HsInt32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getWord32();
    arg8 = hugs->getInt32();
    arg9 = hugs->getPtr();
    v8241(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8242_16(HugsStackPtr);
static void hugsprim_v8242_16(HugsStackPtr hugs_root)
{
    void (*v8242)(HsWord32 arg1, HsInt32 arg2, HsInt32 arg3, HsInt32 arg4, HsWord32 arg5, HsInt32 arg6, HsPtr arg7);
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsWord32 arg5;
    HsInt32 arg6;
    HsPtr arg7;
    v8242 = (void (*)(HsWord32, HsInt32, HsInt32, HsInt32, HsWord32, HsInt32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getWord32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getPtr();
    v8242(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8243_15(HugsStackPtr);
static void hugsprim_v8243_15(HugsStackPtr hugs_root)
{
    void (*v8243)(HsWord32 arg1, HsInt32 arg2, HsPtr arg3);
    HsWord32 arg1;
    HsInt32 arg2;
    HsPtr arg3;
    v8243 = (void (*)(HsWord32, HsInt32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getPtr();
    v8243(arg1, arg2, arg3);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8244_14(HugsStackPtr);
static void hugsprim_v8244_14(HugsStackPtr hugs_root)
{
    void (*v8244)(HsWord32 arg1, HsInt32 arg2, HsWord32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsInt32 arg7, HsInt32 arg8, HsPtr arg9);
    HsWord32 arg1;
    HsInt32 arg2;
    HsWord32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsInt32 arg8;
    HsPtr arg9;
    v8244 = (void (*)(HsWord32, HsInt32, HsWord32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getWord32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getInt32();
    arg9 = hugs->getPtr();
    v8244(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8245_13(HugsStackPtr);
static void hugsprim_v8245_13(HugsStackPtr hugs_root)
{
    void (*v8245)(HsWord32 arg1, HsInt32 arg2, HsWord32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsInt32 arg7, HsPtr arg8);
    HsWord32 arg1;
    HsInt32 arg2;
    HsWord32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsPtr arg8;
    v8245 = (void (*)(HsWord32, HsInt32, HsWord32, HsInt32, HsInt32, HsInt32, HsInt32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getWord32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getPtr();
    v8245(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8246_12(HugsStackPtr);
static void hugsprim_v8246_12(HugsStackPtr hugs_root)
{
    void (*v8246)(HsWord32 arg1, HsInt32 arg2, HsWord32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsPtr arg7);
    HsWord32 arg1;
    HsInt32 arg2;
    HsWord32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsPtr arg7;
    v8246 = (void (*)(HsWord32, HsInt32, HsWord32, HsInt32, HsInt32, HsInt32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getWord32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getPtr();
    v8246(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8247_11(HugsStackPtr);
static void hugsprim_v8247_11(HugsStackPtr hugs_root)
{
    void (*v8247)(HsWord32 arg1, HsInt32 arg2, HsInt32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsInt32 arg7, HsInt32 arg8, HsInt32 arg9);
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsInt32 arg8;
    HsInt32 arg9;
    v8247 = (void (*)(HsWord32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getInt32();
    arg9 = hugs->getInt32();
    v8247(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glCopyTexSubImage2D
#endif

static void hugsprim_glCopyTexSubImage2D_10(HugsStackPtr);
static void hugsprim_glCopyTexSubImage2D_10(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsInt32 arg8;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getInt32();
    glCopyTexSubImage2D(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glCopyTexSubImage1D
#endif

static void hugsprim_glCopyTexSubImage1D_9(HugsStackPtr);
static void hugsprim_glCopyTexSubImage1D_9(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    glCopyTexSubImage1D(arg1, arg2, arg3, arg4, arg5, arg6);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8248_8(HugsStackPtr);
static void hugsprim_v8248_8(HugsStackPtr hugs_root)
{
    void (*v8248)(HsWord32 arg1, HsInt32 arg2, HsInt32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsInt32 arg7, HsInt32 arg8, HsWord32 arg9, HsWord32 arg10, HsPtr arg11);
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsInt32 arg8;
    HsWord32 arg9;
    HsWord32 arg10;
    HsPtr arg11;
    v8248 = (void (*)(HsWord32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsWord32, HsWord32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getInt32();
    arg9 = hugs->getWord32();
    arg10 = hugs->getWord32();
    arg11 = hugs->getPtr();
    v8248(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glTexSubImage2D
#endif

static void hugsprim_glTexSubImage2D_7(HugsStackPtr);
static void hugsprim_glTexSubImage2D_7(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsWord32 arg7;
    HsWord32 arg8;
    HsPtr arg9;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getWord32();
    arg8 = hugs->getWord32();
    arg9 = hugs->getPtr();
    glTexSubImage2D(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glTexSubImage1D
#endif

static void hugsprim_glTexSubImage1D_6(HugsStackPtr);
static void hugsprim_glTexSubImage1D_6(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsWord32 arg5;
    HsWord32 arg6;
    HsPtr arg7;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getWord32();
    arg6 = hugs->getWord32();
    arg7 = hugs->getPtr();
    glTexSubImage1D(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glCopyTexImage2D
#endif

static void hugsprim_glCopyTexImage2D_5(HugsStackPtr);
static void hugsprim_glCopyTexImage2D_5(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsWord32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsInt32 arg8;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getWord32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getInt32();
    glCopyTexImage2D(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glCopyTexImage1D
#endif

static void hugsprim_glCopyTexImage1D_4(HugsStackPtr);
static void hugsprim_glCopyTexImage1D_4(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsWord32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getWord32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    glCopyTexImage1D(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glGetTexImage
#endif

static void hugsprim_glGetTexImage_3(HugsStackPtr);
static void hugsprim_glGetTexImage_3(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsWord32 arg3;
    HsWord32 arg4;
    HsPtr arg5;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getWord32();
    arg4 = hugs->getWord32();
    arg5 = hugs->getPtr();
    glGetTexImage(arg1, arg2, arg3, arg4, arg5);
    
    hugs->returnIO(hugs_root,0);
}

static void hugsprim_v8249_2(HugsStackPtr);
static void hugsprim_v8249_2(HugsStackPtr hugs_root)
{
    void (*v8249)(HsWord32 arg1, HsInt32 arg2, HsInt32 arg3, HsInt32 arg4, HsInt32 arg5, HsInt32 arg6, HsInt32 arg7, HsWord32 arg8, HsWord32 arg9, HsPtr arg10);
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsInt32 arg7;
    HsWord32 arg8;
    HsWord32 arg9;
    HsPtr arg10;
    v8249 = (void (*)(HsWord32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsInt32, HsWord32, HsWord32, HsPtr))hugs->getFunPtr();
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getInt32();
    arg8 = hugs->getWord32();
    arg9 = hugs->getWord32();
    arg10 = hugs->getPtr();
    v8249(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glTexImage2D
#endif

static void hugsprim_glTexImage2D_1(HugsStackPtr);
static void hugsprim_glTexImage2D_1(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsInt32 arg6;
    HsWord32 arg7;
    HsWord32 arg8;
    HsPtr arg9;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getInt32();
    arg7 = hugs->getWord32();
    arg8 = hugs->getWord32();
    arg9 = hugs->getPtr();
    glTexImage2D(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    
    hugs->returnIO(hugs_root,0);
}

#ifndef ENABLE_MACRO_INTERFACE
#undef glTexImage1D
#endif

static void hugsprim_glTexImage1D_0(HugsStackPtr);
static void hugsprim_glTexImage1D_0(HugsStackPtr hugs_root)
{
    HsWord32 arg1;
    HsInt32 arg2;
    HsInt32 arg3;
    HsInt32 arg4;
    HsInt32 arg5;
    HsWord32 arg6;
    HsWord32 arg7;
    HsPtr arg8;
    arg1 = hugs->getWord32();
    arg2 = hugs->getInt32();
    arg3 = hugs->getInt32();
    arg4 = hugs->getInt32();
    arg5 = hugs->getInt32();
    arg6 = hugs->getWord32();
    arg7 = hugs->getWord32();
    arg8 = hugs->getPtr();
    glTexImage1D(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
    
    hugs->returnIO(hugs_root,0);
}

static struct hugs_primitive hugs_primTable[] = {
    {"dyn_glCompressedTexSubImage3DARB", 13, hugsprim_v8240_18},
    {"dyn_glCompressedTexSubImage2DARB", 11, hugsprim_v8241_17},
    {"dyn_glCompressedTexSubImage1DARB", 9, hugsprim_v8242_16},
    {"dyn_glGetCompressedTexImageARB", 5, hugsprim_v8243_15},
    {"dyn_glCompressedTexImage3DARB", 11, hugsprim_v8244_14},
    {"dyn_glCompressedTexImage2DARB", 10, hugsprim_v8245_13},
    {"dyn_glCompressedTexImage1DARB", 9, hugsprim_v8246_12},
    {"dyn_glCopyTexSubImage3DEXT", 11, hugsprim_v8247_11},
    {"glCopyTexSubImage2D", 9, hugsprim_glCopyTexSubImage2D_10},
    {"glCopyTexSubImage1D", 7, hugsprim_glCopyTexSubImage1D_9},
    {"dyn_glTexSubImage3DEXT", 13, hugsprim_v8248_8},
    {"glTexSubImage2D", 10, hugsprim_glTexSubImage2D_7},
    {"glTexSubImage1D", 8, hugsprim_glTexSubImage1D_6},
    {"glCopyTexImage2D", 9, hugsprim_glCopyTexImage2D_5},
    {"glCopyTexImage1D", 8, hugsprim_glCopyTexImage1D_4},
    {"glGetTexImage", 6, hugsprim_glGetTexImage_3},
    {"dyn_glTexImage3DEXT", 12, hugsprim_v8249_2},
    {"glTexImage2D", 10, hugsprim_glTexImage2D_1},
    {"glTexImage1D", 9, hugsprim_glTexImage1D_0},
};

static void hugs_primControl(int);
static void hugs_primControl(what)
int what; {
}

#ifdef STATIC_LINKAGE
#define initModule initGROGTSpecification
#endif

static struct hugs_primInfo hugs_prims = { hugs_primControl, hugs_primTable, 0 };

#ifdef __cplusplus
extern "C" {
#endif
#ifndef __cplusplus
DLLEXPORT(int)  HugsAPIVersion(void);
#endif
DLLEXPORT(int)  HugsAPIVersion() {return (5);}
DLLEXPORT(void) initModule(HugsAPI5 *);
DLLEXPORT(void) initModule(HugsAPI5 *hugsAPI) {
    hugs = hugsAPI;
    hugs->registerPrims(&hugs_prims);
}
#ifdef __cplusplus
}
#endif

