#include <stdint.h>
#include <dlfcn.h>
#include <stdio.h>


typedef union op {
   uint64_t n;
   uint8_t *p;
   uint8_t b[8];
   struct {uint32_t l, h;};
   float f;
   double d;
} op, *ptr;

uint16_t Code[];
uint16_t *PC;
uint8_t *Stack;
op A, C, E, X, Y, Z, L, S;
uint64_t Result;
int Carry;
void mul2(uint64_t a) {}
void div2(uint64_t a) {}
void begin(int a,int b,int c,int d,int e,int f,int g) {}
void *argv(int a,ptr b) {}
void retv(int a,ptr b) {}

void (*FirstLib)(void);


op Data[];


int main() {
	void * h = dlopen("lib/ext", RTLD_LAZY | RTLD_GLOBAL);
	printf("%s\n", dlerror());
	printf("%p %p\n", h, dlsym(h, "Snx"));
	return 0;
}
