<?xml version="1.0"?>
<def format="1">
  <memory>
    <dealloc>free</dealloc>
    <alloc init="true">get_current_dir_name</alloc>
  </memory>
  <!-- http://man7.org/linux/man-pages/man2/accept.2.html -->
  <!-- int accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags); -->
  <function name="accept">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-uninit/>
      <not-null/>
    </arg>
    <arg nr="4">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- long long atoq(const char *nptr); -->
  <function name="atoq">
    <use-retval/>
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
  </function>
  <!-- char *strndupa(const char *s, size_t n); -->
  <function name="strndupa">
    <use-retval/>
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
  </function>
  <!-- char *strdupa(const char *s); -->
  <function name="strdupa">
    <use-retval/>
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
  </function>
  <!-- http://www.gnu.org/software/libc/manual/html_node/Backtraces.html -->
  <!-- int backtrace (void **buffer, int size) -->
  <function name="backtrace">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-null/>
      <minsize type="argvalue" arg="2"/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
  </function>
  <!-- char ** backtrace_symbols (void *const *buffer, int size) -->
  <function name="backtrace_symbols">
    <noreturn>false</noreturn>
    <use-retval/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
      <minsize type="argvalue" arg="2"/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
  </function>
  <!-- void backtrace_symbols_fd (void *const *buffer, int size, int fd) -->
  <function name="backtrace_symbols_fd">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
      <minsize type="argvalue" arg="2"/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-uninit/>
    </arg>
  </function>
  <!-- char *qecvt(long double value, int ndigit, int * decpt, int * sign); -->
  <function name="ecvt">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <arg nr="4">
      <not-null/>
    </arg>
  </function>
  <!-- char *qfcvt(double value, int ndigit, int * decpt, int * sign); -->
  <function name="qfcvt">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <arg nr="4">
      <not-null/>
    </arg>
  </function>
  <!-- char *qgcvt(long double value, int ndigit, char *buf); -->
  <function name="qgcvt">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
  </function>
  <!-- int ecvt_r (double value, int ndigit, int *decpt, int *neg, char *buf, size_t len); -->
  <function name="ecvt_r">
    <noreturn>false</noreturn>
    <pure/>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <arg nr="4">
      <not-null/>
    </arg>
    <arg nr="5">
      <not-null/>
    </arg>
    <arg nr="6"/>
  </function>
  <!-- int fcvt_r (double value, int ndigit, int *decpt, int *neg, char *buf, size_t len); -->
  <function name="fcvt_r">
    <noreturn>false</noreturn>
    <pure/>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <arg nr="4">
      <not-null/>
    </arg>
    <arg nr="5">
      <not-null/>
    </arg>
    <arg nr="6"/>
  </function>
  <!-- int qecvt_r (long double value, int ndigit, int *decpt, int *neg, char *buf, size_t len); -->
  <function name="qecvt_r">
    <noreturn>false</noreturn>
    <pure/>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <arg nr="4">
      <not-null/>
    </arg>
    <arg nr="5">
      <not-null/>
    </arg>
    <arg nr="6"/>
  </function>
  <!-- int qfcvt_r (long double value, int ndigit, int *decpt, int *neg, char *buf, size_t len); -->
  <function name="qfcvt_r">
    <noreturn>false</noreturn>
    <pure/>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <arg nr="4">
      <not-null/>
    </arg>
    <arg nr="5">
      <not-null/>
    </arg>
    <arg nr="6"/>
  </function>
  <!-- https://www.gnu.org/software/gnulib/manual/html_node/c_002dstrcasestr.html -->
  <!-- size_t strcasestr(const char *s1, const char *s2); -->
  <function name="strcasestr">
    <use-retval/>
    <noreturn>false</noreturn>
    <leak-ignore/>
    <pure/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-null/>
      <not-uninit/>
    </arg>
  </function>
  <!-- http://linux.die.net/man/2/getresuid -->
  <!-- int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); -->
  <function name="getresuid">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <pure/>
    <arg nr="1">
      <not-null/>
    </arg>
    <arg nr="2">
      <not-null/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
  </function>
  <!-- http://linux.die.net/man/2/getresuid -->
  <!-- int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); -->
  <function name="getresgid">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <pure/>
    <arg nr="1">
      <not-null/>
    </arg>
    <arg nr="2">
      <not-null/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
  </function>
  <!-- http://man7.org/linux/man-pages/man2/setresuid.2.html -->
  <!-- int setresuid(uid_t ruid, uid_t euid, uid_t suid);-->
  <function name="setresuid">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- http://man7.org/linux/man-pages/man2/setresuid.2.html -->
  <!-- int setresgid(gid_t rgid, gid_t egid, gid_t sgid);-->
  <function name="setresgid">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- int inet_aton (const char *name, struct in_addr *addr); -->
  <function name="inet_aton">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
      <not-null/>
    </arg>
    <arg nr="2">
      <not-null/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- uint32_t inet_addr (const char *name); -->
  <function name="inet_addr">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
      <not-null/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- uint32_t inet_network (const char *name); -->
  <function name="inet_network">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
      <not-null/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- char * inet_ntoa (struct in_addr addr); -->
  <function name="inet_ntoa">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- struct in_addr inet_makeaddr (uint32_t net, uint32_t local); -->
  <function name="inet_makeaddr">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- uint32_t inet_lnaof (struct in_addr addr); -->
  <function name="inet_lnaof">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- uint32_t inet_netof (struct in_addr addr); -->
  <function name="inet_netof">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- int inet_pton (int af, const char *cp, void *buf); -->
  <function name="inet_pton">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
      <not-null/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- const char * inet_ntop (int af, const void *cp, char *buf, socklen_t len);-->
  <function name="inet_ntop">
    <noreturn>false</noreturn>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
      <not-null/>
    </arg>
    <arg nr="3">
      <not-null/>
    </arg>
    <arg nr="4">
      <not-uninit/>
    </arg>
    <leak-ignore/>
  </function>
  <!-- char *canonicalize_file_name(const char *path); -->
  <function name="canonicalize_file_name">
    <use-retval/>
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
    </arg>
  </function>
  <!-- int execvpe(const char *file, char *const argv[], char *const envp[]); -->
  <function name="execvpe">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-uninit/>
    </arg>
  </function>
  <!-- int mkostemp(char *template, int flags); 
       int mkstemps(char *template, int suffixlen);-->
  <function name="mkostemp,mkstemps">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
  </function>
  <!-- int mkostemps(char *template, int suffixlen, int flags); -->
  <function name="mkostemps">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-uninit/>
    </arg>
  </function>
  <!-- see http://man7.org/linux/man-pages/man3/memmem.3.html-->
  <!-- void *memmem(const void *haystack, size_t haystacklen,
                    const void *needle, size_t needlelen);-->
  <function name="memmem">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="4">
      <not-uninit/>
    </arg>
  </function>
  <!-- http://man7.org/linux/man-pages/man3/memrchr.3.html -->
  <!-- void *memrchr(const void *s, int c, size_t n); -->
  <function name="memrchr">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
      <not-bool/>
      <valid>0:</valid>
    </arg>
    <arg nr="3">
      <not-bool/>
      <valid>0:</valid>
    </arg>
  </function>
  <!-- http://man7.org/linux/man-pages/man3/rawmemchr.3.html -->
  <!-- void *rawmemchr(const void *s, int c); -->
  <function name="rawmemchr">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
      <not-bool/>
      <valid>0:</valid>
    </arg>
  </function>
  <!-- http://man7.org/linux/man-pages/man3/ffs.3.html -->
  <!-- int ffsl(long int i); 
       int ffsll(long long int i); -->
  <function name="ffsl,ffsll">
    <use-retval/>
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-uninit/>
    </arg>
  </function>
  <!-- http://man7.org/linux/man-pages/man3/strchr.3.html -->
  <!-- char *strchrnul(const char *s, int c); -->
  <function name="strchrnul">
    <use-retval/>
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-null/>
      <not-uninit/>
      <strz/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
  </function>
  <!-- http://man7.org/linux/man-pages/man2/setrlimit.2.html -->
  <!-- int prlimit(pid_t pid, int resource, const struct rlimit *new_limit,
                   struct rlimit *old_limit); -->
  <function name="prlimit">
    <noreturn>false</noreturn>
    <leak-ignore/>
    <arg nr="1">
      <not-uninit/>
    </arg>
    <arg nr="2">
      <not-uninit/>
    </arg>
    <arg nr="3">
      <not-uninit/>
    </arg>
    <arg nr="4"/>
  </function>
  <!-- see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html -->
  <define name="__builtin_expect(X,Y)" value="(X)"/>
  <!-- see http://kernelnewbies.org/FAQ/LikelyUnlikely -->
  <define name="likely(X)" value="(X)"/>
  <define name="unlikely(X)" value="(X)"/>
</def>
