parse in a getopt-style?

TYPE_INFO variadic_conversion_f(Args*... args);
TYPE_INFO variadic_cleanup_f(Args*... args);


#define ARGS64_MAXSIZE ...
#define ARGS64_MAXCOUNT ...

unsigned variadic_conversion_f(Args... args, const void *stack_args_32, void *args_64, arg64_t argtypes[ARGS64_MAXCOUNT]);
void variadic_cleanup_f(Args... args, const void *stack_args_32, void *args_64, unsigned bytes);

variadic_conversion_f pushes arguments to stack (in reverse order) and returns the size of the arguments.

(conv data)
---
|3|
|2|
|1|
|0|
---


---
Alternate Idea

- Compile printf parser for 32-bit
- Call external 32-bit wrapper for 64-bit function that writes 
- Translate to 64-bit

---

[ ] List of symbols to NOT generate stubs for; these stubs are manually written.

---------

[ ] Conversion functions should return bool (or size).

0-----

Ideas:
*** Generate C code for converting between structs. This should be easy enough -- use libclang to get types.
* Make abigen & abiconv more modular -- define settings file that can be used to generate library.

Generate file with 32-bit and 64-bit struct definitions. Add _32 and _64 suffix to each, .e.g.
struct stat -> struct stat32, struct stat64.

Need function that converts given type to 32-bit or 64-bit equivalent, with knowledge of host arch.
E.g.
struct node {
   long data;
   struct node *next;
};
becomes
struct node_32 {
   int32_t data;
   struct node_32 *next;
};
and
struct node_64 {
  int64_t data;
  struct node_64 *next;
};

The conversion functions have signature
void convert_node_32_to_64(const struct node_32 *, struct node_64 *);
void convert_node_64_to_32(const struct node_64 *, struct node_32 *);
---
2 files required: header (cconv.h) and implementation (cconv.c).
cconv.h divided into 4 sections: include directives, struct forward declarations, struct definitions, and conversion function prototypes.
cconv.c contains conversion function definitions