// 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 freebsd_x86_32.c ; ./a.out > freebsd_x86_32.h
	{"_", "0x80"},
	{"accept", "0x80,30,3,ipp s name anamelen"},
	{"0x80.30", "accept"},
	{"access", "0x80,33,2,zx path amode"},
	{"0x80.33", "access"},
	{"acct", "0x80,51,1,z path"},
	{"0x80.51", "acct"},
	{"break", "0x80,17,1,p nsize"},
	{"0x80.17", "break"},
	{"chdir", "0x80,12,1,z path"},
	{"0x80.12", "chdir"},
	{"chflags", "0x80,34,2,zx path flags"},
	{"0x80.34", "chflags"},
	{"chmod", "0x80,15,2,zx path mode"},
	{"0x80.15", "chmod"},
	{"chown", "0x80,16,3,zii path uid gid"},
	{"0x80.16", "chown"},
	{"chroot", "0x80,61,1,z path"},
	{"0x80.61", "chroot"},
	{"clone", "0x80,120,3,ipi fd iovp iovcnt"},
	{"0x80.120", "clone"},
	{"close", "0x80,6,1,i fd"},
	{"0x80.6", "close"},
	{"dup", "0x80,41,1,i fd"},
	{"0x80.41", "dup"},
	{"execve", "0x80,59,3,zpp fname argv envv"},
	{"0x80.59", "execve"},
	{"exit", "0x80,1,1,i rval"},
	{"0x80.1", "exit"},
	{"exit_group", "0x80,252,1,i arg0"},
	{"0x80.252", "exit_group"},
	{"fchdir", "0x80,13,1,i fd"},
	{"0x80.13", "fchdir"},
	{"fchflags", "0x80,35,2,ix fd flags"},
	{"0x80.35", "fchflags"},
	{"fcntl64", "0x80,221,3,iii key nsems semflg"},
	{"0x80.221", "fcntl64"},
	{"fork", "0x80,2,0,"},
	{"0x80.2", "fork"},
	{"fstat64", "0x80,197,7,pixxiii addr len prot flags fd pad pos"},
	{"0x80.197", "fstat64"},
	{"get_thread_area", "0x80,244,4,ixpp clock_id flags rqtp rmtp"},
	{"0x80.244", "get_thread_area"},
	{"getepid", "0x80,43,0,"},
	{"0x80.43", "getepid"},
	{"getgid", "0x80,47,0,"},
	{"0x80.47", "getgid"},
	{"getlogin", "0x80,49,2,pi namebuf namelen"},
	{"0x80.49", "getlogin"},
	{"getpeername", "0x80,31,3,ipp fdes asa alen"},
	{"0x80.31", "getpeername"},
	{"getpid", "0x80,20,0,"},
	{"0x80.20", "getpid"},
	{"getsockname", "0x80,32,3,ipp fdes asa alen"},
	{"0x80.32", "getsockname"},
	{"gettid", "0x80,224,3,ixp msqid cmd buf"},
	{"0x80.224", "gettid"},
	{"getuid", "0x80,24,0,"},
	{"0x80.24", "getuid"},
	{"ioctl", "0x80,54,3,iip fd com data"},
	{"0x80.54", "ioctl"},
	{"kill", "0x80,37,2,ii pid signum"},
	{"0x80.37", "kill"},
	{"ktrace", "0x80,45,4,zxii fname ops facs pid"},
	{"0x80.45", "ktrace"},
	{"link", "0x80,9,2,zp path link"},
	{"0x80.9", "link"},
	{"mknod", "0x80,14,3,zxi path mode dev"},
	{"0x80.14", "mknod"},
	{"mmap", "0x80,90,7,pixxiii addr len prot flags fd pad pos"},
	{"0x80.90", "mmap"},
	{"mmap2", "0x80,192,2,ii fd name"},
	{"0x80.192", "mmap2"},
	{"mount", "0x80,21,4,pzxp type path flags data"},
	{"0x80.21", "mount"},
	{"mprotect", "0x80,125,3,pix addr len prot"},
	{"0x80.125", "mprotect"},
	{"munmap", "0x80,91,2,pi addr len"},
	{"0x80.91", "munmap"},
	{"old_creat", "0x80,8,2,zx path mode"},
	{"0x80.8", "old_creat"},
	{"old_execve", "0x80,11,3,iii arg0 arg1 arg2"},
	{"0x80.11", "old_execve"},
	{"old_fsstat", "0x80,18,3,pix buf bufsize mode"},
	{"0x80.18", "old_fsstat"},
	{"old_lseek", "0x80,19,3,iix fd offset whence"},
	{"0x80.19", "old_lseek"},
	{"open", "0x80,5,3,zxx path flags mode"},
	{"0x80.5", "open"},
	{"pipe", "0x80,42,1,i arg0"},
	{"0x80.42", "pipe"},
	{"profil", "0x80,44,4,piii samples size offset scale"},
	{"0x80.44", "profil"},
	{"ptrace", "0x80,26,4,xipi req pid addr data"},
	{"0x80.26", "ptrace"},
	{"read", "0x80,3,3,ipi fd buf nbyte"},
	{"0x80.3", "read"},
	{"readlink", "0x80,58,3,zpi path buf count"},
	{"0x80.58", "readlink"},
	{"reboot", "0x80,55,1,x opt"},
	{"0x80.55", "reboot"},
	{"recvfrom", "0x80,29,6,ipixpp s buf len flags from fromlenaddr"},
	{"0x80.29", "recvfrom"},
	{"recvmsg", "0x80,27,3,ipx s msg flags"},
	{"0x80.27", "recvmsg"},
	{"revoke", "0x80,56,1,z path"},
	{"0x80.56", "revoke"},
	{"rt_sigaction", "0x80,174,5,ipiii fd buf nbyte pad offset"},
	{"0x80.174", "rt_sigaction"},
	{"rt_sigprocmask", "0x80,175,1,i fibnum"},
	{"0x80.175", "rt_sigprocmask"},
	{"sendmsg", "0x80,28,3,ipx s msg flags"},
	{"0x80.28", "sendmsg"},
	{"set_thread_area", "0x80,243,1,p cest"},
	{"0x80.243", "set_thread_area"},
	{"setlogin", "0x80,50,1,p namebuf"},
	{"0x80.50", "setlogin"},
	{"setuid", "0x80,23,1,i uid"},
	{"0x80.23", "setuid"},
	{"sigaltstack", "0x80,53,2,pp ss oss"},
	{"0x80.53", "sigaltstack"},
	{"signal", "0x80,48,2,xx how mask"},
	{"0x80.48", "signal"},
	{"sigreturn", "0x80,119,1,p sigcntxp"},
	{"0x80.119", "sigreturn"},
	{"socketcall", "0x80,102,4,ipix s buf len flags"},
	{"0x80.102", "socketcall"},
	{"symlink", "0x80,57,2,zp path link"},
	{"0x80.57", "symlink"},
	{"sync", "0x80,36,0,"},
	{"0x80.36", "sync"},
	{"syscall", "0x80,0,4,iiii number arg1 arg2 arg3"},
	{"0x80.0", "syscall"},
	{"sysctl", "0x80,149,6,pipppi name namelen old oldlenp new newlen"},
	{"0x80.149", "sysctl"},
	{"umask", "0x80,60,1,x newmask"},
	{"0x80.60", "umask"},
	{"unlink", "0x80,10,1,z path"},
	{"0x80.10", "unlink"},
	{"unmount", "0x80,22,2,zx path flags"},
	{"0x80.22", "unmount"},
	{"wait4", "0x80,7,4,ipxp pid status options rusage"},
	{"0x80.7", "wait4"},
	{"write", "0x80,4,3,ipi fd buf nbyte"},
	{"0x80.4", "write"},
  {NULL, NULL}
};
typedef int (*GperfForeachCallback)(void *user, const char *k, const char *v);
int gperf_freebsd_x86_32_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_freebsd_x86_32_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_freebsd_x86_32(x,y) gperf_freebsd_x86_32_hash(x)
const unsigned int gperf_freebsd_x86_32_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_freebsd_x86_32 = {
  .name = "freebsd-x86-32",
  .get = &gperf_freebsd_x86_32_get,
  .hash = &gperf_freebsd_x86_32_hash,
  .foreach = &gperf_freebsd_x86_32_foreach
};

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