// SDB-CGEN V2.6.2
#include <ctype.h>
#include <stdio.h>
#include <string.h>

struct kv { const char *name; const char *value; };
static const struct kv kvs[] = {
// gcc -DMAIN=1 types_darwin_64.c ; ./a.out > types_darwin_64.h
	{"NSString", "struct"},
	{"struct.NSString", "p0,p1,str,len"},
	{"struct.NSString.len", "int,24,0"},
	{"struct.NSString.len.meta", "4"},
	{"struct.NSString.p0", "void *,0,0"},
	{"struct.NSString.p0.meta", "4"},
	{"struct.NSString.p1", "size_t,8,0"},
	{"struct.NSString.p1.meta", "4"},
	{"struct.NSString.str", "char *,16,0"},
	{"struct.NSString.str.meta", "4"},
  {NULL, NULL}
};
typedef int (*GperfForeachCallback)(void *user, const char *k, const char *v);
int gperf_types_darwin_64_foreach(GperfForeachCallback cb, void *user) {
  int i = 0; while (kvs[i].name) {
  cb (user, kvs[i].name, kvs[i].value);
  i++;}
  return 0;
}
const char *gperf_types_darwin_64_get(const char *s) {
  int i = 0; while (kvs[i].name) {
  if (!strcmp (s, kvs[i].name)) return kvs[i].value;
  i++;}
  return NULL;
}
#define sdb_hash_c_types_darwin_64(x,y) gperf_types_darwin_64_hash(x)
const unsigned int gperf_types_darwin_64_hash(const char *s) {
  int sum = strlen (s);
  while (*s) { sum += *s; s++; }
  return sum;
}
struct {const char *name;void *get;void *hash;void *foreach;} gperf_types_darwin_64 = {
  .name = "types-darwin-64",
  .get = &gperf_types_darwin_64_get,
  .hash = &gperf_types_darwin_64_hash,
  .foreach = &gperf_types_darwin_64_foreach
};

#if MAIN
int main () {
	const char *s = ((char*(*)(char*))gperf_types_darwin_64.get)("foo");
	printf ("%s\n", s);
}
#endif
